Redeploy Interchain Accounts (#2081)

### Description

This PR contains the deployment artifacts from a fresh deploy of PI
Interchain Account middleware to testnet and mainnet.

The deployment hit some strange issues with polygon where it was
complaining about underpriced txs. I was able to fix by submitting the
failed transactions manually with cast.

### Drive-by changes
- Changes the return type of HyperlaneDeployer.readCache, which was
accidentally omitted from #2078
- Logs completion of HyperlaneConnectionClient initialization in
deployer
- Fixes proxy admin fetching in `changeAdmin`
- Uses transaction overrides in `upgradeAndInitialize`
- Allows for caching of `InterchainAccountRouter` if it has been
deployed completely but adminship hasn't been changed
- Submit initialization and ownership transfer txs sequentially in
HyperlaneRouterDeployer, which hopefully fixes an issue in which logs
were not showing up
- Return early in governor if no violations


### Related issues

- Fixes #2107

### Backward compatibility

_Are these changes backward compatible?_

No, the ICA docs need to be updated

_Are there any infrastructure implications, e.g. changes that would
prohibit deploying older commits using this infra tooling?_

None


### Testing

_What kind of testing have these changes undergone?_

Checker is passing
pull/2083/head
Asa Oines 2 years ago committed by GitHub
parent 179921b2bb
commit 32407592e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/node.yml
  2. 110
      typescript/infra/config/environments/mainnet2/middleware/accounts/verification.json
  3. 116
      typescript/infra/config/environments/test/ism/verification.json
  4. 110
      typescript/infra/config/environments/testnet3/middleware/accounts/verification.json
  5. 2
      typescript/infra/src/govern/HyperlaneAppGovernor.ts
  6. 27
      typescript/sdk/src/consts/environments/mainnet.json
  7. 35
      typescript/sdk/src/consts/environments/testnet.json
  8. 36
      typescript/sdk/src/deploy/HyperlaneDeployer.ts
  9. 72
      typescript/sdk/src/middleware/account/InterchainAccountDeployer.ts
  10. 28
      typescript/sdk/src/router/HyperlaneRouterDeployer.ts

@ -115,7 +115,7 @@ jobs:
strategy:
matrix:
environment: [testnet3, mainnet2]
module: [core, igp]
module: [core, igp, ica]
steps:
- uses: actions/checkout@v3

@ -5,6 +5,18 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0xF9A4e3BA5e532906c241310f6832d2Ee8D1c5609",
"constructorArguments": "00000000000000000000000065993af9d0d3a64ec77590db7ba362d6eb78ef70000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0xFCA9d3C334F12D2Ae30cdEC6283A1928A988BC55",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000000038000000000000000000000000f9a4e3ba5e532906c241310f6832d2ee8d1c5609",
"isProxy": false
}
],
"avalanche": [
@ -13,6 +25,18 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x77c509140A45B4B85E1A28f8c21AaEB3Ca8788B3",
"constructorArguments": "000000000000000000000000d7cf8c05fd81b8ca7cff8e6c49b08a9d63265c9b000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0xbAD979697E99d722B4B0295a45D59D8371B7E9bd",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000a86a00000000000000000000000077c509140a45b4b85e1a28f8c21aaeb3ca8788b3",
"isProxy": false
}
],
"polygon": [
@ -21,6 +45,18 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x4a4D878c41C7F71eCff182F526b7691aDC6e4150",
"constructorArguments": "000000000000000000000000c4f7590c5d30be959225dc75640657954a86b980000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x4C96a1abc44dc846775CE702C9E9BE821D3b487c",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000000890000000000000000000000004a4d878c41c7f71ecff182f526b7691adc6e4150",
"isProxy": false
}
],
"celo": [
@ -29,6 +65,18 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0xB193eBf06faD5D66492BB41DBbCd202640aE83fF",
"constructorArguments": "00000000000000000000000090f9a2e9ece93516d65fdab726a3c62f5960a1b9000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x155332Fad14bdE126255E6Ab6A09Fe88D2864294",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000a4ec000000000000000000000000b193ebf06fad5d66492bb41dbbcd202640ae83ff",
"isProxy": false
}
],
"arbitrum": [
@ -37,6 +85,18 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0xAC2BE81884C66E6c05B80C05C907B54C74eA2C49",
"constructorArguments": "00000000000000000000000080cebd56a65e46c474a1a101e89e76c4c51d179c000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0xc67ABC50E7557609077E03e6aeA6834f3E4cf4cE",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000a4b1000000000000000000000000ac2be81884c66e6c05b80c05c907b54c74ea2c49",
"isProxy": false
}
],
"optimism": [
@ -45,6 +105,18 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x652e2F475Af7b1154817E09f5408f9011037492a",
"constructorArguments": "000000000000000000000000e047cb95fb3b7117989e911c6afb34771183fc35000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x5e8ee6840caa4f367aff1FF28aA36D5B1b836d35",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000652e2f475af7b1154817e09f5408f9011037492a",
"isProxy": false
}
],
"ethereum": [
@ -53,6 +125,18 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x5fD075C2157567F7F80e6cB20dDd75F40905bd87",
"constructorArguments": "00000000000000000000000075ee15ee1b4a75fa3e2fdf5df3253c25599cc659000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x7fd95Df406dDF612597F1B2C52340d7D96aeD071",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000005fd075c2157567f7f80e6cb20ddd75f40905bd87",
"isProxy": false
}
],
"moonbeam": [
@ -61,6 +145,32 @@
"address": "0xE0Be420779cAd6E2bEA1E4F7C02F996D9ED1fCB5",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x5b6311e0417CfD3Fb10318108897E63777CFE8D7",
"constructorArguments": "0000000000000000000000006a9cda3dd1f593983bfd142eb35e6ce4137bd5ce000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x859aD208A717F707bc57FD1fAfEa74311E5a3EeD",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000005040000000000000000000000005b6311e0417cfd3fb10318108897e63777cfe8d7",
"isProxy": false
}
],
"gnosis": [
{
"name": "TransparentUpgradeableProxy",
"address": "0x32e77b20bf0cf034eB80ea9DD02De881016B01B3",
"constructorArguments": "00000000000000000000000081a92a1a272cb09d7b4970b07548463dc7ae0cb7000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x632b4F32d65F7b25B37a27C57dD510f8e4a58Bf9",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000006400000000000000000000000032e77b20bf0cf034eb80ea9dd02de881016b01b3",
"isProxy": false
}
]
}

@ -0,0 +1,116 @@
{
"test1": [
{
"name": "MultisigIsmFactory",
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
"constructorArguments": "",
"isProxy": false
},
{
"name": "AggregationIsmFactory",
"address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"constructorArguments": "",
"isProxy": false
},
{
"name": "RoutingIsmFactory",
"address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MultisigIsmFactory",
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
"constructorArguments": "",
"isProxy": false
},
{
"name": "AggregationIsmFactory",
"address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"constructorArguments": "",
"isProxy": false
},
{
"name": "RoutingIsmFactory",
"address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"constructorArguments": "",
"isProxy": false
}
],
"test2": [
{
"name": "MultisigIsmFactory",
"address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
"constructorArguments": "",
"isProxy": false
},
{
"name": "AggregationIsmFactory",
"address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"constructorArguments": "",
"isProxy": false
},
{
"name": "RoutingIsmFactory",
"address": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MultisigIsmFactory",
"address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
"constructorArguments": "",
"isProxy": false
},
{
"name": "AggregationIsmFactory",
"address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"constructorArguments": "",
"isProxy": false
},
{
"name": "RoutingIsmFactory",
"address": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
"constructorArguments": "",
"isProxy": false
}
],
"test3": [
{
"name": "MultisigIsmFactory",
"address": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
"constructorArguments": "",
"isProxy": false
},
{
"name": "AggregationIsmFactory",
"address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"constructorArguments": "",
"isProxy": false
},
{
"name": "RoutingIsmFactory",
"address": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MultisigIsmFactory",
"address": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
"constructorArguments": "",
"isProxy": false
},
{
"name": "AggregationIsmFactory",
"address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"constructorArguments": "",
"isProxy": false
},
{
"name": "RoutingIsmFactory",
"address": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
"constructorArguments": "",
"isProxy": false
}
]
}

@ -5,6 +5,18 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0xDb91D575F17d8AAf1aFEC0eaDBD5Ac9e5Cef4ad0",
"constructorArguments": "0000000000000000000000004e4d563e2cbfc35c4bc16003685443fae2fa702f000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x06d237b73a1f353B14475f15012e4309580C5395",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000aef3000000000000000000000000db91d575f17d8aaf1afec0eadbd5ac9e5cef4ad0",
"isProxy": false
}
],
"fuji": [
@ -13,6 +25,18 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0xf82b58Bf348a6CEA6e19413e9DE040dB1a363128",
"constructorArguments": "00000000000000000000000013474f85b808034c911b7697dee60b7d8d50ee36000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x7D7D885ebeb3B46340E9CF9bD0cA847492C16D4a",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000a869000000000000000000000000f82b58bf348a6cea6e19413e9de040db1a363128",
"isProxy": false
}
],
"mumbai": [
@ -21,6 +45,18 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x6a9CeD0e13E738517558aA283DA0E93e5904D49b",
"constructorArguments": "00000000000000000000000096b49e136581f8dff370adb3015d48465572a318000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x01E05434f5D5e8B0BA6a0d05AdDeD777Cc1ac8c3",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000138810000000000000000000000006a9ced0e13e738517558aa283da0e93e5904d49b",
"isProxy": false
}
],
"bsctestnet": [
@ -29,6 +65,18 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x951c74D83a85833b53A448caaB7397bd3fa6CFB2",
"constructorArguments": "000000000000000000000000fb149bc17dd3fe858fa64d678ba0c706deac61ee000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x91B08a1b96d6ac153eB102Bd9Eb9F2D416d449A1",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000000061000000000000000000000000951c74d83a85833b53a448caab7397bd3fa6cfb2",
"isProxy": false
}
],
"goerli": [
@ -37,6 +85,18 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0xCb0ba89F564e31180A101Df54b7971206e03ee9b",
"constructorArguments": "0000000000000000000000008f919348f9c4619a196acb5e377f49e5e2c0b569000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0xA748586f78dD2a4A90b02aD72ddc014Cc05C19b1",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cb0ba89f564e31180a101df54b7971206e03ee9b",
"isProxy": false
}
],
"moonbasealpha": [
@ -45,6 +105,18 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x209Ccdbe13BB913104117B1D6f7801684e98FA1F",
"constructorArguments": "000000000000000000000000eed449c54156163bf50cff30408975af43f43115000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x443f8614728327Ce0cAb864DD463Fe2702b57597",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000000507000000000000000000000000209ccdbe13bb913104117b1d6f7801684e98fa1f",
"isProxy": false
}
],
"optimismgoerli": [
@ -53,6 +125,18 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x12EBd8cb561c68b587C392e0c5405B9866FD5820",
"constructorArguments": "000000000000000000000000cd19ff7306e04ea6b8f4b5ab1c5a198c186aab42000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x860EDf9C38875ad7444BD6e6331866450c9589e4",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000001a400000000000000000000000012ebd8cb561c68b587c392e0c5405b9866fd5820",
"isProxy": false
}
],
"arbitrumgoerli": [
@ -61,6 +145,32 @@
"address": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x4266D8Dd66D8Eb3934c8942968d1e54214D072d3",
"constructorArguments": "000000000000000000000000cd19ff7306e04ea6b8f4b5ab1c5a198c186aab42000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0x759c4Eb4575B651a9f0Fb46653dd7B2F32fD7310",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000066eed0000000000000000000000004266d8dd66d8eb3934c8942968d1e54214d072d3",
"isProxy": false
}
],
"sepolia": [
{
"name": "TransparentUpgradeableProxy",
"address": "0xB057Fb841027a8554521DcCdeC3c3474CaC99AB5",
"constructorArguments": "0000000000000000000000007fe7ea170cf08a25c2ff315814d96d93c311e692000000000000000000000000fad1c94469700833717fa8a3017278bc1ca8031c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "InterchainAccountRouter",
"address": "0xe0B988062A0C6492177d64823Ab95a9c256c2a5F",
"constructorArguments": "0000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000b057fb841027a8554521dccdec3c3474cac99ab5",
"isProxy": false
}
]
}

@ -50,6 +50,8 @@ export abstract class HyperlaneAppGovernor<
}
async govern(confirm = true, chain?: ChainName) {
if (this.checker.violations.length === 0) return;
// 1. Produce calls from checker violations.
await this.mapViolationsToCalls();

@ -8,7 +8,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0x9bDE63104EE030d9De419EEd6bA7D14b86D6fE3f",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0xB193eBf06faD5D66492BB41DBbCd202640aE83fF"
},
"ethereum": {
"storageGasOracle": "0xc9a103990A8dB11b4f627bc5CD1D0c2685484Ec5",
@ -19,7 +20,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0xec48E52D960E54a179f70907bF28b105813877ee",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0x5fD075C2157567F7F80e6cB20dDd75F40905bd87"
},
"avalanche": {
"storageGasOracle": "0x175821F30AdCAA4bbB72Ce98eF76C2E0De2C3f21",
@ -30,7 +32,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0xeE80ab5B563cB3825133f29502bA34eD3707cb8C",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0x77c509140A45B4B85E1A28f8c21AaEB3Ca8788B3"
},
"polygon": {
"storageGasOracle": "0xA3a24EC5670F1F416AB9fD554FcE2f226AE9D7eB",
@ -41,7 +44,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0x61A80297e77FC5395bd6Ff60EEacf7CD4f18d4a4",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0x4a4D878c41C7F71eCff182F526b7691aDC6e4150"
},
"bsc": {
"storageGasOracle": "0x91d23D603d60445411C06e6443d81395593B7940",
@ -52,7 +56,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0x3a579C0bd04FC4C98A8D70EEABD9094e7be4B26D",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0xF9A4e3BA5e532906c241310f6832d2Ee8D1c5609"
},
"arbitrum": {
"storageGasOracle": "0xD3805207b65d99C075ceA938Fa7c0587026a5DF5",
@ -63,7 +68,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0x32B92bd3e5045B67FDD8dbb7A58D25980836d04C",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0xAC2BE81884C66E6c05B80C05C907B54C74eA2C49"
},
"optimism": {
"storageGasOracle": "0x27e88AeB8EA4B159d81df06355Ea3d20bEB1de38",
@ -74,7 +80,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0xAab1D11E2063Bae5EB01fa946cA8d2FDe3db05D5",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0x652e2F475Af7b1154817E09f5408f9011037492a"
},
"moonbeam": {
"storageGasOracle": "0x448b7ADB0dA36d41AA2AfDc9d63b97541A7b3819",
@ -85,7 +92,8 @@
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0xf3b1F415740A26568C45b1c771A737E31C198F09",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784"
"interchainQueryRouter": "0x234b19282985882d6d6fd54dEBa272271f4eb784",
"interchainAccountRouter": "0x5b6311e0417CfD3Fb10318108897E63777CFE8D7"
},
"gnosis": {
"storageGasOracle": "0x5E01d8F34b629E3f92d69546bbc4142A7Adee7e9",
@ -95,6 +103,7 @@
"interchainGasPaymaster": "0x6cA0B6D22da47f091B7613223cD4BB03a2d77918",
"defaultIsmInterchainGasPaymaster": "0x56f52c0A1ddcD557285f7CBc782D3d83096CE1Cc",
"multisigIsm": "0xC343A7054838FE9F249D7E3Ec1Fa6f1D108694b8",
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35"
"testRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"interchainAccountRouter": "0x32e77b20bf0cf034eB80ea9DD02De881016B01B3"
}
}

@ -8,8 +8,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0x4D06A1671A2a345B14B15cbD50027979A5D1d8C9",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0xDb91D575F17d8AAf1aFEC0eaDBD5Ac9e5Cef4ad0"
},
"fuji": {
"storageGasOracle": "0xd44E79A697136888f0d720Fb6703400a9204FD39",
@ -20,8 +20,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0xD713Db664509bd057aC2b378F4B65Db468F634A5",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0xf82b58Bf348a6CEA6e19413e9DE040dB1a363128"
},
"mumbai": {
"storageGasOracle": "0x8970bdA0B0A01d1bA2656b510B2859560e75a7c5",
@ -32,8 +32,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0xd71f1A64659beC0781b2aa21bc7a72F7290F6Bf3",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0x6a9CeD0e13E738517558aA283DA0E93e5904D49b"
},
"bsctestnet": {
"storageGasOracle": "0x1a75f55e8f574CdB5abb1b2702b9caF2E5F7d4D6",
@ -44,8 +44,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0x34add51924C500b4428067E251168807b3f5faED",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0x951c74D83a85833b53A448caaB7397bd3fa6CFB2"
},
"goerli": {
"storageGasOracle": "0xce8E9D701A1DFfe672c1d8dB20De2B3fa6F4437D",
@ -56,8 +56,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0x32B34F0D86b275b92e9289d9054Db5Ec32d2CC6C",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0xCb0ba89F564e31180A101Df54b7971206e03ee9b"
},
"moonbasealpha": {
"storageGasOracle": "0xAd754Dbc3F725259E49A90CAB347AeC343D432ed",
@ -68,8 +68,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0xec8875C7cE0a814A56654618D366641859F32C7A",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0x209Ccdbe13BB913104117B1D6f7801684e98FA1F"
},
"optimismgoerli": {
"storageGasOracle": "0xdE72697715aAeC4CaBbD638C0Aba64488005C64b",
@ -80,8 +80,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0x47384E33E67007B7fE4326fb096Bdf9CbA7AB6E4",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0x12EBd8cb561c68b587C392e0c5405B9866FD5820"
},
"arbitrumgoerli": {
"storageGasOracle": "0xfFAEF09B3cd11D9b20d1a19bECca54EEC2884766",
@ -92,8 +92,8 @@
"defaultIsmInterchainGasPaymaster": "0xF90cB82a76492614D07B82a7658917f3aC811Ac1",
"multisigIsm": "0x47384E33E67007B7fE4326fb096Bdf9CbA7AB6E4",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xc61Bbf8eAb0b748Ecb532A7ffC49Ab7ca6D3a39D",
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818"
"interchainQueryRouter": "0xF782C6C4A02f2c71BB8a1Db0166FAB40ea956818",
"interchainAccountRouter": "0x4266D8Dd66D8Eb3934c8942968d1e54214D072d3"
},
"sepolia": {
"storageGasOracle": "0x1D5EbC3e15e9ECDe0e3530C85899556797eeaea5",
@ -103,6 +103,7 @@
"interchainGasPaymaster": "0x8f9C3888bFC8a5B25AED115A82eCbb788b196d2a",
"defaultIsmInterchainGasPaymaster": "0xF987d7edcb5890cB321437d8145E3D51131298b6",
"multisigIsm": "0xD3d062a5dcBA85ae863618d4c264d2358300c283",
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE"
"testRecipient": "0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE",
"interchainAccountRouter": "0xB057Fb841027a8554521DcCdeC3c3474CaC99AB5"
}
}

@ -142,7 +142,7 @@ export abstract class HyperlaneDeployer<
config: ConnectionClientConfig,
): Promise<void> {
this.logger(`Initializing connection client on ${local}...`);
return this.runIfOwner(local, connectionClient, async () => {
await this.runIfOwner(local, connectionClient, async () => {
// set mailbox if not already set (and configured)
if (config.mailbox !== (await connectionClient.mailbox())) {
this.logger(`Set mailbox on (${local})`);
@ -181,6 +181,7 @@ export abstract class HyperlaneDeployer<
);
}
});
this.logger(`Connection client on ${local} initialized...`);
}
protected async deployContractFromFactory<F extends ethers.ContractFactory>(
@ -190,9 +191,9 @@ export abstract class HyperlaneDeployer<
constructorArgs: Parameters<F['deploy']>,
initializeArgs?: Parameters<Awaited<ReturnType<F['deploy']>>['initialize']>,
): Promise<ReturnType<F['deploy']>> {
const cache = this.readCache(chain, factory, contractName);
if (cache.hit) {
return cache.contract;
const cachedContract = this.readCache(chain, factory, contractName);
if (cachedContract) {
return cachedContract;
}
const signer = this.multiProvider.getSigner(chain);
@ -246,7 +247,11 @@ export abstract class HyperlaneDeployer<
proxy: TransparentUpgradeableProxy,
admin: string,
): Promise<void> {
if (utils.eqAddress(admin, await proxy.callStatic.admin())) {
const actualAdmin = await proxyAdmin(
this.multiProvider.getProvider(chain),
proxy.address,
);
if (utils.eqAddress(admin, actualAdmin)) {
this.logger(`Admin set correctly, skipping admin change`);
return;
}
@ -281,13 +286,14 @@ export abstract class HyperlaneDeployer<
'initialize',
initializeArgs,
);
const overrides = this.multiProvider.getTransactionOverrides(chain);
await this.runIfAdmin(
chain,
proxy,
() =>
this.multiProvider.handleTx(
chain,
proxy.upgradeToAndCall(implementation.address, initData),
proxy.upgradeToAndCall(implementation.address, initData, overrides),
),
(proxyAdmin: ProxyAdmin) =>
this.multiProvider.handleTx(
@ -296,6 +302,7 @@ export abstract class HyperlaneDeployer<
proxy.address,
implementation.address,
initData,
overrides,
),
),
);
@ -330,22 +337,22 @@ export abstract class HyperlaneDeployer<
return implementation.attach(proxy.address) as C;
}
private writeCache<K extends keyof Factories>(
protected writeCache<K extends keyof Factories>(
chain: ChainName,
contractName: K,
address: types.Address,
) {
): void {
if (!this.cachedAddresses[chain]) {
this.cachedAddresses[chain] = {};
}
this.cachedAddresses[chain][contractName] = address;
}
private readCache<F extends ethers.ContractFactory>(
protected readCache<F extends ethers.ContractFactory>(
chain: ChainName,
factory: F,
contractName: string,
): { hit: boolean; contract: Awaited<ReturnType<F['deploy']>> } {
): Awaited<ReturnType<F['deploy']>> | undefined {
const cachedAddress = this.cachedAddresses[chain]?.[contractName];
const hit = !!cachedAddress;
const contractAddress = hit ? cachedAddress : ethers.constants.AddressZero;
@ -358,8 +365,9 @@ export abstract class HyperlaneDeployer<
this.logger(
`Recovered ${contractName.toString()} on ${chain} ${cachedAddress}`,
);
return contract;
}
return { hit, contract };
return undefined;
}
/**
@ -373,13 +381,13 @@ export abstract class HyperlaneDeployer<
constructorArgs: Parameters<Factories[K]['deploy']>,
initializeArgs?: Parameters<HyperlaneContracts<Factories>[K]['initialize']>,
): Promise<HyperlaneContracts<Factories>[K]> {
const cache = this.readCache(
const cachedContract = this.readCache(
chain,
this.factories[contractName],
contractName.toString(),
);
if (cache.hit) {
return cache.contract;
if (cachedContract) {
return cachedContract;
}
// Try to initialize the implementation even though it may not be necessary

@ -1,6 +1,7 @@
import { ethers } from 'ethers';
import {
InterchainAccountRouter,
Router,
TransparentUpgradeableProxy__factory,
} from '@hyperlane-xyz/core';
@ -41,46 +42,53 @@ export class InterchainAccountDeployer extends HyperlaneRouterDeployer<
): Promise<HyperlaneContracts<InterchainAccountFactories>> {
const proxyAdmin = await this.deployContract(chain, 'proxyAdmin', []);
let interchainAccountRouter: InterchainAccountRouter;
// adapted from HyperlaneDeployer.deployProxiedContract
const cached = this.deployedContracts[chain]?.interchainAccountRouter;
if (cached) {
this.logger('Recovered InterchainAccountRouter');
return {
proxyAdmin,
interchainAccountRouter: cached,
};
}
const deployer = await this.multiProvider.getSignerAddress(chain);
// 1. deploy the proxy first with a dummy implementation (proxy admin contract)
const proxy = await this.deployContractFromFactory(
const cachedContract = this.readCache(
chain,
new TransparentUpgradeableProxy__factory(),
'TransparentUpgradeableProxy',
[proxyAdmin.address, deployer, '0x'],
this.factories['interchainAccountRouter'],
'interchainAccountRouter',
);
if (cachedContract) {
interchainAccountRouter = cachedContract;
} else {
const deployer = await this.multiProvider.getSignerAddress(chain);
// 2. deploy the real InterchainAccountRouter and OwnableMulticall implementation with proxy address
const domainId = this.multiProvider.getDomainId(chain);
const implementation = await this.deployContract(
chain,
'interchainAccountRouter',
[domainId, proxy.address],
// 1. deploy the proxy first with a dummy implementation (proxy admin contract)
const proxy = await this.deployContractFromFactory(
chain,
new TransparentUpgradeableProxy__factory(),
'TransparentUpgradeableProxy',
[proxyAdmin.address, deployer, '0x'],
);
// 2. deploy the real InterchainAccountRouter and OwnableMulticall implementation with proxy address
const domainId = this.multiProvider.getDomainId(chain);
const implementation = await this.deployContract(
chain,
'interchainAccountRouter',
[domainId, proxy.address],
);
// 3. upgrade the proxy to the real implementation and initialize
const owner = deployer;
await super.upgradeAndInitialize(chain, proxy, implementation, [
config.mailbox,
config.interchainGasPaymaster,
config.interchainSecurityModule ?? ethers.constants.AddressZero,
owner,
]);
interchainAccountRouter = implementation.attach(proxy.address);
this.writeCache(chain, 'interchainAccountRouter', proxy.address);
}
const proxy = TransparentUpgradeableProxy__factory.connect(
interchainAccountRouter.address,
this.multiProvider.getSignerOrProvider(chain),
);
// 3. upgrade the proxy to the real implementation and initialize
const owner = deployer;
await super.upgradeAndInitialize(chain, proxy, implementation, [
config.mailbox,
config.interchainGasPaymaster,
config.interchainSecurityModule ?? ethers.constants.AddressZero,
owner,
]);
await super.changeAdmin(chain, proxy, proxyAdmin.address);
const interchainAccountRouter = implementation.attach(proxy.address);
return {
proxyAdmin,
interchainAccountRouter,

@ -10,7 +10,6 @@ import {
import { HyperlaneDeployer } from '../deploy/HyperlaneDeployer';
import { RouterConfig } from '../router/types';
import { ChainMap } from '../types';
import { objMap, promiseObjAll } from '../utils/objects';
export abstract class HyperlaneRouterDeployer<
Config extends RouterConfig,
@ -22,15 +21,11 @@ export abstract class HyperlaneRouterDeployer<
contractsMap: HyperlaneContractsMap<Factories>,
configMap: ChainMap<Config>,
): Promise<void> {
await promiseObjAll(
objMap(contractsMap, async (local, contracts) =>
super.initConnectionClient(
local,
this.router(contracts),
configMap[local],
),
),
);
for (const chain of Object.keys(contractsMap)) {
const contracts = contractsMap[chain];
const config = configMap[chain];
await super.initConnectionClient(chain, this.router(contracts), config);
}
}
async enrollRemoteRouters(
@ -92,13 +87,12 @@ export abstract class HyperlaneRouterDeployer<
configMap: ChainMap<Config>,
): Promise<void> {
this.logger(`Transferring ownership of ownables...`);
await promiseObjAll(
objMap(contractsMap, async (chain, contracts) => {
const owner = configMap[chain].owner;
const ownables = await filterOwnableContracts(contracts);
await this.transferOwnershipOfContracts(chain, owner, ownables);
}),
);
for (const chain of Object.keys(contractsMap)) {
const contracts = contractsMap[chain];
const owner = configMap[chain].owner;
const ownables = await filterOwnableContracts(contracts);
await this.transferOwnershipOfContracts(chain, owner, ownables);
}
}
async deploy(

Loading…
Cancel
Save