Deploy to Gnosis (#1675)

* Gnosis deploy mainnet2 jan 26

* Fix rust

* PR review

* Set etheruem finality to 14 blocks

* Fix testnet verification artifacts

* fix artifact

* Fix key funding logic

* Deploy agents
mattie/fix-kathy
Nam Chu Hoai 2 years ago committed by GitHub
parent 4a086fc593
commit 19dc142b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      rust/agents/relayer/src/msg/gas_payment/policies/meets_estimated_cost.rs
  2. 2
      rust/agents/relayer/src/msg/gelato_submitter/mod.rs
  3. 21
      rust/config/mainnet2/mainnet2_config.json
  4. 2
      rust/gelato/src/types.rs
  5. 7
      rust/hyperlane-core/src/chain.rs
  6. 7
      typescript/infra/config/environments/mainnet2/agent.ts
  7. 1
      typescript/infra/config/environments/mainnet2/chains.ts
  8. 1
      typescript/infra/config/environments/mainnet2/core.ts
  9. 104
      typescript/infra/config/environments/mainnet2/core/verification/verification.json
  10. 6
      typescript/infra/config/environments/mainnet2/create2/addresses.json
  11. 16
      typescript/infra/config/environments/mainnet2/create2/verification.json
  12. 2
      typescript/infra/config/environments/mainnet2/funding.ts
  13. 3
      typescript/infra/config/environments/mainnet2/helloworld/hyperlane/addresses.json
  14. 8
      typescript/infra/config/environments/mainnet2/helloworld/hyperlane/verification.json
  15. 32
      typescript/infra/config/environments/mainnet2/validators.ts
  16. 64
      typescript/infra/config/environments/testnet3/core/verification/verification.json
  17. 18
      typescript/infra/scripts/funding/fund-keys-from-deployer.ts
  18. 31
      typescript/infra/src/create2/index.ts
  19. 35
      typescript/sdk/src/consts/chainMetadata.ts
  20. 2
      typescript/sdk/src/consts/chains.ts
  21. 21
      typescript/sdk/src/consts/environments/mainnet.json
  22. 26
      typescript/sdk/src/deploy/core/HyperlaneCoreDeployer.ts
  23. 51
      typescript/sdk/src/deploy/verify/ContractVerifier.ts

@ -50,6 +50,7 @@ fn hyperlane_domain_id_to_native_token_coingecko_id(domain_id: u32) -> Result<&'
BinanceSmartChain => "binancecoin",
Celo => "celo",
Moonbeam => "moonbeam",
Gnosis => "xdai",
_ => eyre::bail!("No CoinGecko ID for domain {hyperlane_domain}"),
})
}

@ -233,6 +233,8 @@ pub fn hyperlane_domain_id_to_gelato_chain(domain: &HyperlaneDomain) -> Result<C
KnownHyperlaneDomain::Moonbeam => Chain::Moonbeam,
KnownHyperlaneDomain::MoonbaseAlpha => Chain::MoonbaseAlpha,
KnownHyperlaneDomain::Gnosis => Chain::Gnosis,
KnownHyperlaneDomain::Zksync2Testnet => Chain::Zksync2Testnet,
_ => bail!("No Gelato Chain for domain {domain}"),

@ -30,7 +30,7 @@
},
"signer": null,
"protocol": "ethereum",
"finalityBlocks": "20",
"finalityBlocks": "14",
"connection": {
"type": "http",
"url": ""
@ -152,6 +152,25 @@
"index": {
"from": "2595747"
}
},
"gnosis": {
"name": "gnosis",
"domain": "100",
"addresses": {
"mailbox": "0x35231d4c2D8B8ADcB5617A638A0c4548684c7C70",
"interchainGasPaymaster": "0x6cA0B6D22da47f091B7613223cD4BB03a2d77918",
"validatorAnnounce": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524"
},
"signer": null,
"protocol": "ethereum",
"finalityBlocks": "14",
"connection": {
"type": "http",
"url": ""
},
"index": {
"from": "25900000"
}
}
},
"db": "db_path",

@ -37,6 +37,8 @@ pub enum Chain {
MoonbaseAlpha = 1287,
Moonbeam = 1284,
Gnosis = 100,
Zksync2Testnet = 280,
}

@ -99,6 +99,8 @@ pub enum KnownHyperlaneDomain {
Moonbeam = 1284,
MoonbaseAlpha = 1287,
Gnosis = 100,
Zksync2Testnet = 280,
// -- Local test chains --
@ -163,7 +165,8 @@ impl KnownHyperlaneDomain {
many_to_one!(match self {
Mainnet: [
Ethereum, Avalanche, Arbitrum, Polygon, Optimism, BinanceSmartChain, Celo,
Moonbeam
Moonbeam,
Gnosis
],
Testnet: [
Goerli, Mumbai, Fuji, ArbitrumGoerli, OptimismGoerli, BinanceSmartChainTestnet,
@ -179,7 +182,7 @@ impl KnownHyperlaneDomain {
many_to_one!(match self {
HyperlaneDomainProtocol::Ethereum: [
Ethereum, Goerli, Polygon, Mumbai, Avalanche, Fuji, Arbitrum, ArbitrumGoerli,
Optimism, OptimismGoerli, BinanceSmartChain, BinanceSmartChainTestnet, Celo,
Optimism, OptimismGoerli, BinanceSmartChain, BinanceSmartChainTestnet, Celo, Gnosis,
Alfajores, Moonbeam, MoonbaseAlpha, Zksync2Testnet, Test1, Test2, Test3
],
HyperlaneDomainProtocol::Fuel: [FuelTest1],

@ -17,7 +17,7 @@ export const hyperlane: AgentConfig<MainnetChains> = {
context: Contexts.Hyperlane,
docker: {
repo: 'gcr.io/abacus-labs-dev/hyperlane-agent',
tag: 'sha-c163fce',
tag: 'sha-d1ad862',
},
aws: {
region: 'us-east-1',
@ -39,7 +39,7 @@ export const hyperlane: AgentConfig<MainnetChains> = {
reorgPeriod: 0,
},
ethereum: {
reorgPeriod: 20,
reorgPeriod: 14,
},
bsc: {
reorgPeriod: 15,
@ -59,6 +59,9 @@ export const hyperlane: AgentConfig<MainnetChains> = {
moonbeam: {
reorgPeriod: 0,
},
gnosis: {
reorgPeriod: 14,
},
},
},
relayer: {

@ -29,6 +29,7 @@ export const mainnetConfigs = {
},
},
moonbeam: chainConnectionConfigs.moonbeam,
gnosis: chainConnectionConfigs.gnosis,
};
export type MainnetChains = keyof typeof mainnetConfigs;

@ -12,6 +12,7 @@ const owners: ChainMap<MainnetChains, string> = {
arbitrum: '0xbA47E1b575980B7D1b1508cc48bE1Df4EE508111',
optimism: '0xb523CFAf45AACF472859f8B793CB0BFDB16bD257',
moonbeam: '0xF0cb1f968Df01fc789762fddBfA704AE0F952197',
gnosis: '0x36b0AA0e7d04e7b825D7E409FEa3c9A3d57E4C22',
};
export const core: ChainMap<MainnetChains, CoreConfig> = objMap(

@ -48,12 +48,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
},
{
"name": "InterchainGasPaymaster",
"address": "0xAb311C7DAE251C1eB24c5A5409d47a415828d5E5",
@ -73,7 +67,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
@ -141,17 +135,11 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
},
{
"name": "ValidatorAnnounce",
"address": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
@ -215,17 +203,11 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
},
{
"name": "ValidatorAnnounce",
"address": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
@ -289,17 +271,11 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
},
{
"name": "ValidatorAnnounce",
"address": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
@ -363,17 +339,11 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
},
{
"name": "ValidatorAnnounce",
"address": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
@ -437,17 +407,11 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
},
{
"name": "ValidatorAnnounce",
"address": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
@ -511,17 +475,11 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
},
{
"name": "ValidatorAnnounce",
"address": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
@ -585,16 +543,60 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "ValidatorAnnounce",
"address": "0xB5bc6369bc2Dc8969B18f6C25488EC0a38cA637f",
"address": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
"isProxy": false,
"constructorArguments": "0x00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70"
}
],
"gnosis": [
{
"name": "MultisigIsm",
"address": "0xC343A7054838FE9F249D7E3Ec1Fa6f1D108694b8",
"constructorArguments": "",
"isProxy": false
},
{
"name": "ProxyAdmin",
"address": "0x81a92A1a272cb09d7b4970b07548463dC7aE0cB7",
"constructorArguments": "",
"isProxy": false
},
{
"name": "InterchainGasPaymaster",
"address": "0xAb311C7DAE251C1eB24c5A5409d47a415828d5E5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x6cA0B6D22da47f091B7613223cD4BB03a2d77918",
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "OverheadIgp",
"address": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000006ca0b6d22da47f091b7613223cd4bb03a2d77918"
},
{
"name": "Mailbox",
"address": "0x8e1d6B03F7A823e9302c9042cd0d00728F456e70",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000000000000000000000000000000000000000000064"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x35231d4c2D8B8ADcB5617A638A0c4548684c7C70",
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",

@ -19,5 +19,11 @@
},
"ethereum": {
"Create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a"
},
"moonbeam": {
"Create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a"
},
"gnosis": {
"Create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a"
}
}

@ -54,5 +54,21 @@
"constructorArguments": "",
"isProxy": false
}
],
"moonbeam": [
{
"name": "Create2Factory",
"address": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a",
"constructorArguments": "",
"isProxy": false
}
],
"gnosis": [
{
"name": "Create2Factory",
"address": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a",
"constructorArguments": "",
"isProxy": false
}
]
}

@ -9,7 +9,7 @@ export const keyFunderConfig: KeyFunderConfig = {
docker: {
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
// TODO: Use an image built off of main
tag: 'sha-507557e',
tag: 'sha-d1ad862',
},
// We're currently using the same deployer key as mainnet.
// To minimize nonce clobbering we offset the key funder cron

@ -22,5 +22,8 @@
},
"moonbeam": {
"router": "0xbaa8e84def81f92ECB4161e45BA5Eda16B255397"
},
"gnosis": {
"router": "0xBC9cd961BF6c224FAc51fb049aB6788e38e4A9C0"
}
}

@ -62,5 +62,13 @@
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c70000000000000000000000000de86327fbfd04c4ea11dc0f270da6083534c2582",
"isProxy": false
}
],
"gnosis": [
{
"name": "HelloWorld",
"address": "0xBC9cd961BF6c224FAc51fb049aB6788e38e4A9C0",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
]
}

@ -429,4 +429,36 @@ export const validators: ChainValidatorSets<MainnetChains> = {
},
],
},
gnosis: {
threshold: 2,
validators: [
{
address: '0xd0529ec8df08d0d63c0f023786bfa81e4bb51fd6',
name: s3BucketName('gnosis', 0),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('gnosis', 0),
region: s3BucketRegion,
},
},
{
address: '0x829d6ec129bc7187fb1ed161adcf7939fe0c515f',
name: s3BucketName('gnosis', 1),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('gnosis', 1),
region: s3BucketRegion,
},
},
{
address: '0x00009f8935e94bfe52ab3441df3526ab7cc38db1',
name: s3BucketName('gnosis', 2),
checkpointSyncer: {
type: CheckpointSyncerType.S3,
bucket: s3BucketName('gnosis', 2),
region: s3BucketRegion,
},
},
],
},
};

@ -24,12 +24,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -43,7 +37,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"
@ -92,12 +86,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -111,7 +99,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"
@ -160,12 +148,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -179,7 +161,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"
@ -228,12 +210,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -247,7 +223,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"
@ -296,12 +272,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -315,7 +285,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"
@ -364,12 +334,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -383,7 +347,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"
@ -432,12 +396,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -451,7 +409,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"
@ -500,12 +458,6 @@
"isProxy": true,
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "ValidatorAnnounce",
"address": "0x81c196606092fF966446078BE3033F464Efc8655",
"isProxy": false,
"constructorArguments": "0x000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685"
},
{
"name": "InterchainGasPaymaster",
"address": "0x94096588fc66f0D3a348306c2555d474b3B6302a",
@ -519,7 +471,7 @@
"constructorArguments": "0x000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a000000000000000000000000c97d8e6f57b0d64971453ddc6eb8483fec9d163a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"
},
{
"name": "DefaultIsmInterchainGasPaymaster",
"name": "OverheadIgp",
"address": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"isProxy": false,
"constructorArguments": "0x0000000000000000000000008f9c3888bfc8a5b25aed115a82ecbb788b196d2a"

@ -107,6 +107,7 @@ const desiredBalancePerChain: CompleteChainMap<string> = {
moonbeam: '0.1',
optimismgoerli: '0.1',
arbitrumgoerli: '0.1',
gnosis: '0.1',
// unused
test1: '0',
test2: '0',
@ -319,11 +320,18 @@ class ContextFunder {
for (const role of this.rolesToFund) {
const keys = this.getKeysWithRole(role);
for (const chain of this.chains) {
// Relayer keys should not be funded on the origin chain.
const filteredKeys = keys.filter(
(key) => role !== KEY_ROLE_ENUM.Relayer || key.chainName !== chain,
);
chainKeys[chain] = filteredKeys;
if (role === KEY_ROLE_ENUM.Relayer) {
// Relayer keys should not be funded on the origin chain
for (const remote of this.chains) {
chainKeys[remote] = chainKeys[remote].concat(
keys.filter(
(_) => _.chainName !== remote && _.chainName === chain,
),
);
}
} else {
chainKeys[chain] = chainKeys[chain].concat(keys);
}
}
}
return chainKeys;

@ -4,6 +4,7 @@ import {
HyperlaneDeployer,
MultiProvider,
} from '@hyperlane-xyz/sdk';
import { CREATE2FACTORY_ADDRESS } from '@hyperlane-xyz/sdk/dist/deploy/HyperlaneDeployer';
export const factories = {
Create2Factory: new Create2Factory__factory(),
@ -13,6 +14,10 @@ type Contracts = {
Create2Factory: Create2Factory;
};
// Hardcode the bytecode here to be indpendent of the compiler version
const CREATE2FACTORYBYTECODE =
'0x608060405234801561001057600080fd5b50610640806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80634af63f0214610046578063c2b1041c14610082578063cf4d643214610095575b600080fd5b610059610054366004610486565b6100a8565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b610059610090366004610514565b6100e7565b6100596100a336600461058a565b6101f4565b604080513360208201529081018290526000906100e09084906060015b604051602081830303815290604052805190602001206102c6565b9392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602082015290810182905260009081906060016040516020818303038152906040528051906020012090503081878760405161013f9291906105fa565b6040519081900381206101b49392916020017fff00000000000000000000000000000000000000000000000000000000000000815260609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830191909152603582015260550190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209695505050505050565b604080513360208201529081018490526000906102159086906060016100c5565b905060008173ffffffffffffffffffffffffffffffffffffffff1684846040516102409291906105fa565b6000604051808303816000865af19150503d806000811461027d576040519150601f19603f3d011682016040523d82523d6000602084013e610282565b606091505b50509050806102bd576040517f4f77232300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50949350505050565b60008251600003610303576040517f21744a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818351602085016000f5905073ffffffffffffffffffffffffffffffffffffffff811661035c576040517f4102e83a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8251602084012060405173ffffffffffffffffffffffffffffffffffffffff83169184917f27b8e3132afa95254770e1c1d214eafde52bc47d1b6e1f5dfcbb380c3ca3f53290600090a492915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126103ec57600080fd5b813567ffffffffffffffff80821115610407576104076103ac565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561044d5761044d6103ac565b8160405283815286602085880101111561046657600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561049957600080fd5b823567ffffffffffffffff8111156104b057600080fd5b6104bc858286016103db565b95602094909401359450505050565b60008083601f8401126104dd57600080fd5b50813567ffffffffffffffff8111156104f557600080fd5b60208301915083602082850101111561050d57600080fd5b9250929050565b6000806000806060858703121561052a57600080fd5b843567ffffffffffffffff81111561054157600080fd5b61054d878288016104cb565b909550935050602085013573ffffffffffffffffffffffffffffffffffffffff8116811461057a57600080fd5b9396929550929360400135925050565b600080600080606085870312156105a057600080fd5b843567ffffffffffffffff808211156105b857600080fd5b6105c4888389016103db565b95506020870135945060408701359150808211156105e157600080fd5b506105ee878288016104cb565b95989497509550505050565b818382376000910190815291905056fea2646970667358221220959b7947b895d33da4de69733c07a0543161262edcf0e8d1784935027b47462c64736f6c63430008110033';
export class Create2FactoryDeployer<
Chain extends ChainName,
> extends HyperlaneDeployer<Chain, any, Contracts, typeof factories> {
@ -24,10 +29,28 @@ export class Create2FactoryDeployer<
);
}
async deployContracts(chain: Chain) {
const Create2Factory = await this.deployContract(
chain,
'Create2Factory',
[],
const chainConnection = this.multiProvider.getChainConnection(chain);
const signer = this.multiProvider.getChainSigner(chain);
if (
(await chainConnection.provider.getCode(CREATE2FACTORY_ADDRESS)) === '0x'
) {
const tx = await signer.signTransaction({
data: CREATE2FACTORYBYTECODE,
chainId: 0,
gasPrice: 100_000_000_000, // 100 gwei
gasLimit: 5000000,
value: 0,
nonce: 0,
});
await chainConnection.handleTx(
chainConnection.provider.sendTransaction(tx),
);
}
const Create2Factory = Create2Factory__factory.connect(
CREATE2FACTORY_ADDRESS,
signer,
);
return {
Create2Factory,

@ -80,6 +80,7 @@ const celoToken = {
};
const etherToken = { name: 'Ether', symbol: 'ETH', decimals: 18 };
const maticToken = { name: 'MATIC', symbol: 'MATIC', decimals: 18 };
const xDaiToken = { name: 'xDai', symbol: 'xDai', decimals: 18 };
/**
* Chain metadata
@ -286,7 +287,7 @@ export const ethereum: ChainMetadata = {
],
blocks: {
confirmations: 7,
reorgPeriod: 20,
reorgPeriod: 14,
estimateBlockTime: 13,
},
gnosisSafeTransactionServiceUrl: 'https://safe-transaction.gnosis.io',
@ -503,6 +504,37 @@ export const polygon: ChainMetadata = {
'https://safe-transaction.polygon.gnosis.io/',
};
export const gnosis: ChainMetadata = {
id: 100,
name: Chains.gnosis,
displayName: 'Gnosis',
nativeToken: xDaiToken,
publicRpcUrls: [
{
http: 'https://rpc.gnosischain.com',
pagination: {
blocks: 10000,
from: 25997478,
},
},
],
blockExplorers: [
{
name: 'GnosisScan',
url: 'https://gnosisscan.io/',
apiUrl: 'https://api.gnosisscan.io/',
family: ExplorerFamily.Etherscan,
},
],
blocks: {
confirmations: 1,
reorgPeriod: 14,
estimateBlockTime: 5,
},
gasCurrencyCoinGeckoId: 'xdai',
gnosisSafeTransactionServiceUrl: 'https://safe-transaction.xdai.gnosis.io/',
};
export const test1: ChainMetadata = {
id: 13371,
name: Chains.test1,
@ -568,6 +600,7 @@ export const chainMetadata = {
optimism,
optimismgoerli,
polygon,
gnosis,
test1,
test2,
test3,

@ -19,6 +19,7 @@ export enum Chains {
optimism = 'optimism',
optimismgoerli = 'optimismgoerli',
polygon = 'polygon',
gnosis = 'gnosis',
test1 = 'test1',
test2 = 'test2',
test3 = 'test3',
@ -46,6 +47,7 @@ export const Mainnets = [
Chains.moonbeam,
Chains.optimism,
Chains.polygon,
Chains.gnosis,
] as Array<ChainName>;
export const Testnets = [

@ -147,8 +147,23 @@
},
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0xf3b1F415740A26568C45b1c771A737E31C198F09",
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a",
"interchainAccountRouter": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a"
},
"gnosis": {
"validatorAnnounce": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
"proxyAdmin": "0x81a92A1a272cb09d7b4970b07548463dC7aE0cB7",
"mailbox": {
"kind": "Transparent",
"proxy": "0x35231d4c2D8B8ADcB5617A638A0c4548684c7C70",
"implementation": "0x8e1d6B03F7A823e9302c9042cd0d00728F456e70"
},
"interchainGasPaymaster": {
"kind": "Transparent",
"proxy": "0x6cA0B6D22da47f091B7613223cD4BB03a2d77918",
"implementation": "0xAb311C7DAE251C1eB24c5A5409d47a415828d5E5"
},
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0xC343A7054838FE9F249D7E3Ec1Fa6f1D108694b8",
"create2Factory": "0xc97D8e6f57b0d64971453dDc6EB8483fec9d163a"
}
}

@ -294,19 +294,19 @@ export class HyperlaneCoreDeployer<
): Promise<ethers.ContractReceipt[]> {
const owner = this.configMap[chain].owner;
const chainConnection = this.multiProvider.getChainConnection(chain);
const receipts = await Promise.all(
ownables.map(async (ownable) => {
const currentOwner = await ownable.owner();
if (currentOwner.toLowerCase() !== owner.toLowerCase()) {
return super.runIfOwner(chain, ownable, () =>
chainConnection.handleTx(
ownable.transferOwnership(owner, chainConnection.overrides),
),
);
}
return undefined;
}),
);
const receipts: ethers.ContractReceipt[] = [];
for (const ownable of ownables) {
const currentOwner = await ownable.owner();
if (currentOwner.toLowerCase() !== owner.toLowerCase()) {
const receipt = await super.runIfOwner(chain, ownable, () =>
chainConnection.handleTx(
ownable.transferOwnership(owner, chainConnection.overrides),
),
);
if (receipt) receipts.push(receipt);
}
}
return receipts.filter((x) => x !== undefined) as ethers.ContractReceipt[];
}
}

@ -102,7 +102,10 @@ export class ContractVerifier<Chain extends ChainName> extends MultiGeneric<
this.logger(`Proxy verification failed, try manually?`);
return;
default:
this.logger(`Verification failed for some unknown reason`, result);
this.logger(
`Verification failed for some unknown reason on ${chain}`,
result,
);
throw new Error(`Verification failed: ${result.result}`);
}
}
@ -146,27 +149,41 @@ export class ContractVerifier<Chain extends ChainName> extends MultiGeneric<
// poll for verified status
if (guid) {
await this.submitForm(chain, ExplorerApiActions.CHECK_STATUS, { guid });
this.logger(`Successfully verified ${addressUrl}#code`);
try {
await this.submitForm(chain, ExplorerApiActions.CHECK_STATUS, { guid });
this.logger(`Successfully verified ${addressUrl}#code`);
} catch (error) {
console.error(
`Verifying implementation at ${input.address} failed on ${chain}`,
);
throw error;
}
}
// mark as proxy (if applicable)
if (input.isProxy) {
const proxyGuid = await this.submitForm(
chain,
ExplorerApiActions.MARK_PROXY,
{
address: input.address,
},
);
// poll for verified proxy status
if (proxyGuid) {
await this.submitForm(chain, ExplorerApiActions.CHECK_PROXY_STATUS, {
guid: proxyGuid,
});
this.logger(
`Successfully verified proxy ${addressUrl}#readProxyContract`,
try {
const proxyGuid = await this.submitForm(
chain,
ExplorerApiActions.MARK_PROXY,
{
address: input.address,
},
);
// poll for verified proxy status
if (proxyGuid) {
await this.submitForm(chain, ExplorerApiActions.CHECK_PROXY_STATUS, {
guid: proxyGuid,
});
this.logger(
`Successfully verified proxy ${addressUrl}#readProxyContract`,
);
}
} catch (error) {
console.error(
`Verification of proxy at ${input.address} failed on ${chain}`,
);
throw error;
}
}
}

Loading…
Cancel
Save