Skip to content

Commit

Permalink
set readOnlyAddress for gnosis
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier committed Mar 1, 2024
1 parent 4055674 commit 90b1bb2
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions integration-tests/contracts/contract_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"github.com/smartcontractkit/chainlink-testing-framework/networks"
"math/big"
"strings"
"time"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 90b1bb2

Please sign in to comment.