From 90b1bb245ed4892535213e829e6efcdaceb5e4c5 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:27:20 +0400 Subject: [PATCH] set readOnlyAddress for gnosis --- .../contracts/contract_deployer.go | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/integration-tests/contracts/contract_deployer.go b/integration-tests/contracts/contract_deployer.go index 78ec0c18c64..6d65becaf55 100644 --- a/integration-tests/contracts/contract_deployer.go +++ b/integration-tests/contracts/contract_deployer.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "github.com/smartcontractkit/chainlink-testing-framework/networks" "math/big" "strings" "time" @@ -957,17 +958,22 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( switch e.client.GetChainID().Int64() { //Arbitrum payment model //Goerli Arbitrum - case 421613: + case networks.ArbitrumGoerli.ChainID: mode = uint8(1) //Sepolia Arbitrum - case 421614: + case networks.ArbitrumSepolia.ChainID: mode = uint8(1) //Optimism payment model //Goerli Optimism - case 420: + case networks.OptimismGoerli.ChainID: + mode = uint8(2) + case networks.OptimismSepolia.ChainID: mode = uint8(2) //Goerli Base - case 84531: + case networks.BaseGoerli.ChainID: + mode = uint8(2) + //Goerli Sepolia + case networks.BaseSepolia.ChainID: mode = uint8(2) default: mode = uint8(0) @@ -1227,21 +1233,21 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( var err error chainId := e.client.GetChainID().Int64() - if chainId == 534352 || chainId == 534351 { // Scroll / Scroll Sepolia + if chainId == networks.ScrollSepolia.ChainID || chainId == networks.ScrollMainnet.ChainID { chainModuleAddr, _, _, err = e.client.DeployContract("ScrollModule", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { return scroll_module.DeployScrollModule(auth, backend) }) - } else if chainId == 42161 || chainId == 421614 || chainId == 421613 { // Arbitrum One / Sepolia / Goerli + } else if chainId == networks.ArbitrumMainnet.ChainID || chainId == networks.ArbitrumSepolia.ChainID { chainModuleAddr, _, _, err = e.client.DeployContract("ArbitrumModule", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { return arbitrum_module.DeployArbitrumModule(auth, backend) }) - } else if chainId == 10 || chainId == 11155420 { // Optimism / Optimism Sepolia + } else if chainId == networks.OptimismMainnet.ChainID || chainId == networks.OptimismSepolia.ChainID { chainModuleAddr, _, _, err = e.client.DeployContract("OptimismModule", func( auth *bind.TransactOpts, backend bind.ContractBackend, @@ -1269,8 +1275,10 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( } var allowedReadOnlyAddress common.Address - if chainId == 1101 || chainId == 1442 || chainId == 2442 { + if chainId == networks.PolygonZkEvmMainnet.ChainID || chainId == networks.PolygonZkEvmCardona.ChainID { allowedReadOnlyAddress = common.HexToAddress("0x1111111111111111111111111111111111111111") + } else if chainId == networks.GnosisMainnet.ChainID || chainId == networks.GnosisChiado.ChainID { + allowedReadOnlyAddress = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe") } else { allowedReadOnlyAddress = common.HexToAddress("0x0000000000000000000000000000000000000000") }