Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
cr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stana-miric authored and Stefan-Ethernal committed Sep 6, 2023
1 parent 442c90b commit 837f82e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 0 additions & 4 deletions chain/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ type Params struct {
BurnContract map[uint64]types.Address `json:"burnContract"`
// Destination address to initialize default burn contract with
BurnContractDestinationAddress types.Address `json:"burnContractDestinationAddress,omitempty"`

// ProxyContractsAdmin is the address that will have the privilege to change both the proxy
// implementation address and the admin
ProxyContractsAdmin types.Address `json:"proxyContractsAdmin,omitempty"`
}

type AddressListConfig struct {
Expand Down
5 changes: 2 additions & 3 deletions command/genesis/polybft_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ func (p *genesisParams) generatePolyBftChainConfig(o command.OutputFormatter) er
WalletAddress: walletPremineInfo.address,
WalletAmount: walletPremineInfo.amount,
},
BlockTimeDrift: p.blockTimeDrift,
BlockTimeDrift: p.blockTimeDrift,
ProxyContractsAdmin: types.StringToAddress(p.proxyContractsAdmin),
GovernanceConfig: &polyCommon.GovernanceConfig{
VotingDelay: voteDelay,
VotingPeriod: votingPeriod,
Expand Down Expand Up @@ -370,8 +371,6 @@ func (p *genesisParams) generatePolyBftChainConfig(o command.OutputFormatter) er
chainConfig.Genesis.BaseFeeEM = command.DefaultGenesisBaseFeeEM
}

chainConfig.Params.ProxyContractsAdmin = types.StringToAddress(p.proxyContractsAdmin)

return helper.WriteGenesisConfigToDisk(chainConfig, params.genesisPath)
}

Expand Down
4 changes: 4 additions & 0 deletions consensus/polybft/common/polybft_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ type PolyBFTConfig struct {

// GovernanceConfig defines on chain governance configuration
GovernanceConfig *GovernanceConfig `json:"governanceConfig,omitempty"`

// ProxyContractsAdmin is the address that will have the privilege to change both the proxy
// implementation address and the admin
ProxyContractsAdmin types.Address `json:"proxyContractsAdmin,omitempty"`
}

// LoadPolyBFTConfig loads chain config from provided path and unmarshals PolyBFTConfig
Expand Down
2 changes: 1 addition & 1 deletion consensus/polybft/polybft.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func GenesisPostHookFactory(config *chain.Chain, engineName string) func(txn *st
proxyAddr[contracts.RewardTokenContract] = contracts.RewardTokenContractV1
}

if err = setUpProxies(transition, config.Params.ProxyContractsAdmin, proxyAddr); err != nil {
if err = setUpProxies(transition, polyBFTConfig.ProxyContractsAdmin, proxyAddr); err != nil {
return err
}

Expand Down

0 comments on commit 837f82e

Please sign in to comment.