diff --git a/typescript/infra/config/environments/mainnet/core/verification/verification.json b/typescript/infra/config/environments/mainnet/core/verification/verification.json index 37b2b104d..aeeb29b68 100644 --- a/typescript/infra/config/environments/mainnet/core/verification/verification.json +++ b/typescript/infra/config/environments/mainnet/core/verification/verification.json @@ -134,6 +134,24 @@ "address": "0x8105a095368f1a184CceA86cCe21318B5Ee5BE28", "constructorArguments": "0000000000000000000000005332d1ac0a626d265298c14ff681c0a8d28db86d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000448624c35c00000000000000000000000000000000000000000000000000000000006574680000000000000000000000002fca7f6ec3d4a0408900f2bb30004d4616ee985e00000000000000000000000000000000000000000000000000000000", "isProxy": true + }, + { + "name": "interchainGasPaymaster", + "address": "0x70EbA87Cd15616f32C736B3f3BdCfaeD0713a82B", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0x99fEFc1119E86Ee0153eb887cF8E8ab2d92A16e8", + "constructorArguments": "00000000000000000000000070eba87cd15616f32c736b3f3bdcfaed0713a82b00000000000000000000000048083c69f5a42c6b69abbad48ae195bd36770ee2", + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0xCDeb368Db32ecCefaf7018e152DA9120565cb572", + "constructorArguments": "00000000000000000000000099fefc1119e86ee0153eb887cf8e8ab2d92a16e8000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000", + "isProxy": true } ], "ethereum": [ @@ -271,6 +289,24 @@ "address": "0xF7af65596A16740b16CF755F3A43206C96285da0", "constructorArguments": "00000000000000000000000014c3ceee8f431ae947364f43429a98ea89800238000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000448624c35c0000000000000000000000000000000000000000000000000000000000006f70000000000000000000000000f5739a4af21346aa937bf7feb5d3b21c2d23013800000000000000000000000000000000000000000000000000000000", "isProxy": true + }, + { + "name": "interchainGasPaymaster", + "address": "0x1Ab68dC4f7b6cfcd00218D4b761b7F3b5a724555", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0xFC62DeF1f08793aBf0E67f69257c6be258194F72", + "constructorArguments": "0000000000000000000000001ab68dc4f7b6cfcd00218d4b761b7f3b5a7245550000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x17E216fBb22dF4ef8A6640ae9Cb147C92710ac84", + "constructorArguments": "000000000000000000000000fc62def1f08793abf0e67f69257c6be258194f72000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000", + "isProxy": true } ], "avalanche": [ @@ -408,6 +444,24 @@ "address": "0x0E3239277501d215e17a4d31c487F86a425E110B", "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000448624c35c000000000000000000000000000000000000000000000000000000000065746800000000000000000000000028efbcada00a7ed6772b3666f3898d276e88cae300000000000000000000000000000000000000000000000000000000", "isProxy": true + }, + { + "name": "interchainGasPaymaster", + "address": "0xcAf034CE568fad5B85Cfbf088FF43974C39287cC", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0xcf2d1D59C51a341818d23b0f6AfB7c85d668Dc77", + "constructorArguments": "000000000000000000000000caf034ce568fad5b85cfbf088ff43974c39287cc0000000000000000000000002c1fabecd7bfbdebf27ccdb67baadb38b6df90fc", + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0xed9a722c543883FB7e07E78F3879762DE09eA7D5", + "constructorArguments": "000000000000000000000000cf2d1d59c51a341818d23b0f6afb7c85d668dc77000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000", + "isProxy": true } ], "polygon": [ @@ -545,6 +599,24 @@ "address": "0x6A55822cf11f9fcBc4c75BC2638AfE8Eb942cAdd", "constructorArguments": "000000000000000000000000db670e1a1e312bf17425b08ce55bdf2cd8f8ed54000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000448624c35c00000000000000000000000000000000000000000000000000000000006574680000000000000000000000008105a095368f1a184ccea86cce21318b5ee5be2800000000000000000000000000000000000000000000000000000000", "isProxy": true + }, + { + "name": "interchainGasPaymaster", + "address": "0x13E83ac41e696856B6996263501fB3225AD5E6F5", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0x61374178e45F65fF9D6252d017Cd580FC60B7654", + "constructorArguments": "00000000000000000000000013e83ac41e696856b6996263501fb3225ad5e6f500000000000000000000000012582c7b0f43c6a667cbaa7fa8b112f7fb1e69f0", + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x60B8d195f1b2EcaC26d54b95C69E6399cFD64b53", + "constructorArguments": "00000000000000000000000061374178e45f65ff9d6252d017cd580fc60b7654000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000", + "isProxy": true } ], "bsc": [ @@ -682,6 +754,24 @@ "address": "0xE0C452DDA7506f0F4dE5C8C1d383F7aD866eA4F0", "constructorArguments": "0000000000000000000000002fa5f5c96419c222cdbcec797d696e6ce428a7a9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000448624c35c00000000000000000000000000000000000000000000000000000000006574680000000000000000000000006fae4d9935e2fcb11fc79a64e917fb2bf14dafaa00000000000000000000000000000000000000000000000000000000", "isProxy": true + }, + { + "name": "interchainGasPaymaster", + "address": "0x4419922ca3C11F92bd11D31489932C39BAB57DA3", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0xc2Da384799488B4e1E773d70a83346529145085B", + "constructorArguments": "0000000000000000000000004419922ca3c11f92bd11d31489932c39bab57da3000000000000000000000000149db7afd694722747035d5aec7007ccb6f8f112", + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x47bf94790241B1764fC41A35a8329A15569E121C", + "constructorArguments": "000000000000000000000000c2da384799488b4e1e773d70a83346529145085b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000", + "isProxy": true } ], "arbitrum": [ @@ -819,6 +909,24 @@ "address": "0x552D41c0B5c774F529C956E7CC77d0e054D7aFa8", "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000448624c35c000000000000000000000000000000000000000000000000000000000065746800000000000000000000000023ce76645ec601148fa451e751eeb75785b97a0000000000000000000000000000000000000000000000000000000000", "isProxy": true + }, + { + "name": "interchainGasPaymaster", + "address": "0x5c12ADC734699C07b095fe30B8312F1A7bbaA788", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0xc23BaF5Eb5848D19701BbE7f139645e6bd58a319", + "constructorArguments": "0000000000000000000000005c12adc734699c07b095fe30b8312f1a7bbaa7880000000000000000000000002c1fabecd7bfbdebf27ccdb67baadb38b6df90fc", + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x376aD181E8cd45eAd5403F78d5A871D08c3c4D77", + "constructorArguments": "000000000000000000000000c23baf5eb5848d19701bbe7f139645e6bd58a319000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000", + "isProxy": true } ], "optimism": [ @@ -956,6 +1064,24 @@ "address": "0xea820f9BCFD5E16a0dd42071EB61A29874Ad81A4", "constructorArguments": "0000000000000000000000005e01d8f34b629e3f92d69546bbc4142a7adee7e9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000448624c35c0000000000000000000000000000000000000000000000000000000000657468000000000000000000000000b3fccd379ad66ced0c91028520c64226611a48c900000000000000000000000000000000000000000000000000000000", "isProxy": true + }, + { + "name": "interchainGasPaymaster", + "address": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0x6119B76720CcfeB3D256EC1b91218EEfFD6756E1", + "constructorArguments": "000000000000000000000000fb9e40d811cea562cc8a322b029ef2bdcc3ef6ed00000000000000000000000015ab173bdb6832f9b64276ba128659b0ed77730b", + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0xc5D6aCaafBCcEC6D7fD7d92F4509befce641c563", + "constructorArguments": "0000000000000000000000006119b76720ccfeb3d256ec1b91218eeffd6756e1000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000", + "isProxy": true } ] } diff --git a/typescript/infra/config/environments/testnet2/core/verification/verification.json b/typescript/infra/config/environments/testnet2/core/verification/verification.json index 8f52fe0c5..04ff3581c 100644 --- a/typescript/infra/config/environments/testnet2/core/verification/verification.json +++ b/typescript/infra/config/environments/testnet2/core/verification/verification.json @@ -121,6 +121,30 @@ 2 ], "isProxy": false + }, + { + "name": "interchainGasPaymaster", + "address": "0x67fA6577A7558a55BFDA87118dDBbeFB34521758", + "constructorArguments": [], + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0xd95091C1c1A7E0e5DdD7d44568A04588e76e4dDe", + "constructorArguments": [ + "0x67fA6577A7558a55BFDA87118dDBbeFB34521758", + "0x15e07BD101dfB4e8C2D0B368AbFeE3524e541277" + ], + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x1Fb165396FB26AC4178ca4240b3724039F75EED7", + "constructorArguments": [ + "0xd95091C1c1A7E0e5DdD7d44568A04588e76e4dDe", + "0x8129fc1c" + ], + "isProxy": true } ], "kovan": [ @@ -245,6 +269,30 @@ 2 ], "isProxy": false + }, + { + "name": "interchainGasPaymaster", + "address": "0x1c554e54745aeaA7cf33c9Df17A70b9B258279e1", + "constructorArguments": [], + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0xA07b287Bd5Bb8101D28b331Bcd499aea949BC6dc", + "constructorArguments": [ + "0x1c554e54745aeaA7cf33c9Df17A70b9B258279e1", + "0x38030040C09B213ec47F121c9B8a396D7FC2636b" + ], + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x74234D5EEb6229fD75fF5370fab7D9819295F0D5", + "constructorArguments": [ + "0xA07b287Bd5Bb8101D28b331Bcd499aea949BC6dc", + "0x8129fc1c" + ], + "isProxy": true } ], "fuji": [ @@ -369,6 +417,30 @@ 2 ], "isProxy": false + }, + { + "name": "interchainGasPaymaster", + "address": "0x5309959109F031B8459deD683d958aE3393A1786", + "constructorArguments": [], + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0x9CA79aDb726866c764f3D4ec6D01d5976351f50F", + "constructorArguments": [ + "0x5309959109F031B8459deD683d958aE3393A1786", + "0x97Bbc6bBaFa5Ce3b2FA966c121Af63bD09e940f8" + ], + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x4834a491f78BBF48e983F9Ce0E20D1E4DbE013D8", + "constructorArguments": [ + "0x9CA79aDb726866c764f3D4ec6D01d5976351f50F", + "0x8129fc1c" + ], + "isProxy": true } ], "mumbai": [ @@ -493,6 +565,30 @@ 2 ], "isProxy": false + }, + { + "name": "interchainGasPaymaster", + "address": "0xc67b416734FDfa1c37760858aB30a18af6101383", + "constructorArguments": [], + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0x4F49f89b6e350B8A3BE3aB8c9Aa6bcd3179FaA02", + "constructorArguments": [ + "0xc67b416734FDfa1c37760858aB30a18af6101383", + "0xC81e6D1070aFA48DA4e4f35E744CC1aE43532a10" + ], + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x9A27744C249A11f68B3B56f09D280599585DFBb8", + "constructorArguments": [ + "0x4F49f89b6e350B8A3BE3aB8c9Aa6bcd3179FaA02", + "0x8129fc1c" + ], + "isProxy": true } ], "bsctestnet": [ @@ -617,6 +713,30 @@ 2 ], "isProxy": false + }, + { + "name": "interchainGasPaymaster", + "address": "0x407eB16cdC073bB9cb0Da779aeb0a9246940D3B8", + "constructorArguments": [], + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0xC6A00ce0f86e88dD9eE45f28a79AB8FA833F01F6", + "constructorArguments": [ + "0x407eB16cdC073bB9cb0Da779aeb0a9246940D3B8", + "0x638A831b4d11Be6a72AcB97d1aE79DA05Ae9B1D3" + ], + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x155b1F1801030Ea4dF038107d3cc1b4bA496916e", + "constructorArguments": [ + "0xC6A00ce0f86e88dD9eE45f28a79AB8FA833F01F6", + "0x8129fc1c" + ], + "isProxy": true } ], "arbitrumrinkeby": [ @@ -741,6 +861,30 @@ 2 ], "isProxy": false + }, + { + "name": "interchainGasPaymaster", + "address": "0xAFd1f0E77555A835987B1b8A683bA7C67105DFDc", + "constructorArguments": [], + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0x3e1420105177FED86Cd55762fd21b14278E1e93e", + "constructorArguments": [ + "0xAFd1f0E77555A835987B1b8A683bA7C67105DFDc", + "0xA6cb9B457d1670bb5cDa4AAADA56a2d010E49bb9" + ], + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0x76D20943b68985dF999C5bb13d6E7AdF3CFc276F", + "constructorArguments": [ + "0x3e1420105177FED86Cd55762fd21b14278E1e93e", + "0x8129fc1c" + ], + "isProxy": true } ], "optimismkovan": [ @@ -865,6 +1009,30 @@ 2 ], "isProxy": false + }, + { + "name": "interchainGasPaymaster", + "address": "0xE48fb6dAF7e7a71856dAA7d5728BE2132175d256", + "constructorArguments": [], + "isProxy": false + }, + { + "name": "UpgradeBeacon", + "address": "0x07eCE1601749a4813f293F54ec9507DF5e926B10", + "constructorArguments": [ + "0xE48fb6dAF7e7a71856dAA7d5728BE2132175d256", + "0xc0Ce04851bF6Ea149fA06bf7a4808c9db81af189" + ], + "isProxy": false + }, + { + "name": "UpgradeBeaconProxy", + "address": "0xD7D2B0f61B834D98772e938Fa64425587C0f3481", + "constructorArguments": [ + "0x07eCE1601749a4813f293F54ec9507DF5e926B10", + "0x8129fc1c" + ], + "isProxy": true } ] } diff --git a/typescript/infra/scripts/check-deploy.ts b/typescript/infra/scripts/check-deploy.ts index 5709ba6c1..8c276f663 100644 --- a/typescript/infra/scripts/check-deploy.ts +++ b/typescript/infra/scripts/check-deploy.ts @@ -15,7 +15,13 @@ async function check() { config.core, ); await coreChecker.check(); - coreChecker.expectEmpty(); + + if (coreChecker.violations.length > 0) { + console.error(coreChecker.violations); + throw new Error( + `Checking core deploy yielded ${coreChecker.violations.length} violations`, + ); + } } check().then(console.log).catch(console.error); diff --git a/typescript/infra/scripts/deploy-igp.ts b/typescript/infra/scripts/deploy-igp.ts new file mode 100644 index 000000000..21dbe760a --- /dev/null +++ b/typescript/infra/scripts/deploy-igp.ts @@ -0,0 +1,89 @@ +import { + AbacusCore, + ChainMap, + ChainName, + CoreConfig, + CoreContracts, + MultiProvider, + objMap, + serializeContracts, +} from '@abacus-network/sdk'; + +import { AbacusCoreInfraDeployer } from '../src/core/deploy'; +import { readJSON, writeJSON } from '../src/utils/utils'; + +import { + getCoreContractsSdkFilepath, + getCoreEnvironmentConfig, + getCoreVerificationDirectory, + getEnvironment, +} from './utils'; + +class IGPDeployer< + Chain extends ChainName, +> extends AbacusCoreInfraDeployer { + constructor( + multiProvider: MultiProvider, + configMap: ChainMap, + public readonly existingContracts: ChainMap< + Chain, + CoreContracts + >, + ) { + super(multiProvider, configMap); + } + + async deployIGP() { + const chains = this.multiProvider.chains(); + for (const chain of chains) { + const contracts = this.existingContracts[chain]; + const interchainGasPaymaster = await this.deployProxiedContract( + chain, + 'interchainGasPaymaster', + [], + contracts.upgradeBeaconController.address, + [], + ); + contracts.interchainGasPaymaster = interchainGasPaymaster; + } + + return this.existingContracts; + } +} + +async function main() { + const environment = await getEnvironment(); + const config = getCoreEnvironmentConfig(environment) as any; + const multiProvider = await config.getMultiProvider(); + const existingCore = AbacusCore.fromEnvironment(environment, multiProvider); + const deployer = new IGPDeployer( + multiProvider, + config.core, + existingCore.contractsMap, + ); + + const contracts = await deployer.deployIGP(); + + writeJSON( + getCoreContractsSdkFilepath(), + `${environment}.json`, + serializeContracts(contracts), + ); + + const existingVerifications = readJSON( + getCoreVerificationDirectory(environment), + 'verification.json', + ); + + const mergedVerificationInputs = objMap( + deployer.verificationInputs, + (chain, inputs) => [...existingVerifications[chain], ...inputs], + ); + writeJSON( + getCoreVerificationDirectory(environment), + 'verification.json', + mergedVerificationInputs, + ); +} + +main().then(console.log).catch(console.error); diff --git a/typescript/sdk/src/consts/environments/mainnet.json b/typescript/sdk/src/consts/environments/mainnet.json index e7bc14d74..5bf8fa30f 100644 --- a/typescript/sdk/src/consts/environments/mainnet.json +++ b/typescript/sdk/src/consts/environments/mainnet.json @@ -2,7 +2,12 @@ "avalanche": { "upgradeBeaconController": "0x2C1FAbEcd7bFBdEBF27CcdB67baADB38b6Df90fC", "abacusConnectionManager": "0x8b83fefd896fAa52057798f6426E9f0B080FCCcE", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0xed9a722c543883FB7e07E78F3879762DE09eA7D5", + "implementation": "0xcAf034CE568fad5B85Cfbf088FF43974C39287cC", + "beacon": "0xcf2d1D59C51a341818d23b0f6AfB7c85d668Dc77" + }, "inboxes": { "celo": { "inbox": { @@ -70,7 +75,12 @@ "bsc": { "upgradeBeaconController": "0x149db7afD694722747035d5AEC7007ccb6F8f112", "abacusConnectionManager": "0x19dc38aeae620380430C200a6E990D5Af5480117", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x47bf94790241B1764fC41A35a8329A15569E121C", + "implementation": "0x4419922ca3C11F92bd11D31489932C39BAB57DA3", + "beacon": "0xc2Da384799488B4e1E773d70a83346529145085B" + }, "inboxes": { "avalanche": { "inbox": { @@ -138,7 +148,12 @@ "polygon": { "upgradeBeaconController": "0x12582c7B0f43c6A667CBaA7fA8b112F7fb1E69F0", "abacusConnectionManager": "0x1Ab68dC4f7b6cfcd00218D4b761b7F3b5a724555", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x60B8d195f1b2EcaC26d54b95C69E6399cFD64b53", + "implementation": "0x13E83ac41e696856B6996263501fB3225AD5E6F5", + "beacon": "0x61374178e45F65fF9D6252d017Cd580FC60B7654" + }, "inboxes": { "bsc": { "inbox": { @@ -206,7 +221,12 @@ "celo": { "upgradeBeaconController": "0x48083C69f5a42c6B69ABbAd48AE195BD36770ee2", "abacusConnectionManager": "0x12582c7B0f43c6A667CBaA7fA8b112F7fb1E69F0", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0xCDeb368Db32ecCefaf7018e152DA9120565cb572", + "implementation": "0x70EbA87Cd15616f32C736B3f3BdCfaeD0713a82B", + "beacon": "0x99fEFc1119E86Ee0153eb887cF8E8ab2d92A16e8" + }, "inboxes": { "bsc": { "inbox": { @@ -274,7 +294,12 @@ "arbitrum": { "upgradeBeaconController": "0x2C1FAbEcd7bFBdEBF27CcdB67baADB38b6Df90fC", "abacusConnectionManager": "0x8b83fefd896fAa52057798f6426E9f0B080FCCcE", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x376aD181E8cd45eAd5403F78d5A871D08c3c4D77", + "implementation": "0x5c12ADC734699C07b095fe30B8312F1A7bbaA788", + "beacon": "0xc23BaF5Eb5848D19701BbE7f139645e6bd58a319" + }, "inboxes": { "bsc": { "inbox": { @@ -342,7 +367,12 @@ "optimism": { "upgradeBeaconController": "0x15ab173bDB6832f9b64276bA128659b0eD77730B", "abacusConnectionManager": "0xd83A4F747fE80Ed98839e05079B1B7Fe037b1638", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0xc5D6aCaafBCcEC6D7fD7d92F4509befce641c563", + "implementation": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", + "beacon": "0x6119B76720CcfeB3D256EC1b91218EEfFD6756E1" + }, "inboxes": { "bsc": { "inbox": { @@ -410,7 +440,12 @@ "ethereum": { "upgradeBeaconController": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "abacusConnectionManager": "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x17E216fBb22dF4ef8A6640ae9Cb147C92710ac84", + "implementation": "0x1Ab68dC4f7b6cfcd00218D4b761b7F3b5a724555", + "beacon": "0xFC62DeF1f08793aBf0E67f69257c6be258194F72" + }, "inboxes": { "bsc": { "inbox": { diff --git a/typescript/sdk/src/consts/environments/testnet2.json b/typescript/sdk/src/consts/environments/testnet2.json index 4caaa3472..4bd566b02 100644 --- a/typescript/sdk/src/consts/environments/testnet2.json +++ b/typescript/sdk/src/consts/environments/testnet2.json @@ -2,7 +2,12 @@ "alfajores": { "upgradeBeaconController": "0x15e07BD101dfB4e8C2D0B368AbFeE3524e541277", "abacusConnectionManager": "0xc41169650335Ad274157Ea5116Cdf227430A68a3", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x1Fb165396FB26AC4178ca4240b3724039F75EED7", + "implementation": "0x67fA6577A7558a55BFDA87118dDBbeFB34521758", + "beacon": "0xd95091C1c1A7E0e5DdD7d44568A04588e76e4dDe" + }, "inboxes": { "kovan": { "inbox": { @@ -70,7 +75,12 @@ "kovan": { "upgradeBeaconController": "0x38030040C09B213ec47F121c9B8a396D7FC2636b", "abacusConnectionManager": "0xfA1fBF362144ae1bEf2E33409948dA1FB812bb41", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x74234D5EEb6229fD75fF5370fab7D9819295F0D5", + "implementation": "0x1c554e54745aeaA7cf33c9Df17A70b9B258279e1", + "beacon": "0xA07b287Bd5Bb8101D28b331Bcd499aea949BC6dc" + }, "inboxes": { "alfajores": { "inbox": { @@ -138,7 +148,12 @@ "fuji": { "upgradeBeaconController": "0x97Bbc6bBaFa5Ce3b2FA966c121Af63bD09e940f8", "abacusConnectionManager": "0x33AbaF6708be03Bdf0595DA0745A7111b01dB8c7", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x4834a491f78BBF48e983F9Ce0E20D1E4DbE013D8", + "implementation": "0x5309959109F031B8459deD683d958aE3393A1786", + "beacon": "0x9CA79aDb726866c764f3D4ec6D01d5976351f50F" + }, "inboxes": { "alfajores": { "inbox": { @@ -206,7 +221,12 @@ "mumbai": { "upgradeBeaconController": "0xC81e6D1070aFA48DA4e4f35E744CC1aE43532a10", "abacusConnectionManager": "0xb636B2c65A75d41F0dBe98fB33eb563d245a241a", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x9A27744C249A11f68B3B56f09D280599585DFBb8", + "implementation": "0xc67b416734FDfa1c37760858aB30a18af6101383", + "beacon": "0x4F49f89b6e350B8A3BE3aB8c9Aa6bcd3179FaA02" + }, "inboxes": { "alfajores": { "inbox": { @@ -274,7 +294,12 @@ "bsctestnet": { "upgradeBeaconController": "0x638A831b4d11Be6a72AcB97d1aE79DA05Ae9B1D3", "abacusConnectionManager": "0xe403E16db1f5997bC62Dc611A8d42836364A7f01", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x155b1F1801030Ea4dF038107d3cc1b4bA496916e", + "implementation": "0x407eB16cdC073bB9cb0Da779aeb0a9246940D3B8", + "beacon": "0xC6A00ce0f86e88dD9eE45f28a79AB8FA833F01F6" + }, "inboxes": { "alfajores": { "inbox": { @@ -342,7 +367,12 @@ "arbitrumrinkeby": { "upgradeBeaconController": "0xA6cb9B457d1670bb5cDa4AAADA56a2d010E49bb9", "abacusConnectionManager": "0xFb55597F07417b08195Ba674f4dd58aeC9B89FBB", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0x76D20943b68985dF999C5bb13d6E7AdF3CFc276F", + "implementation": "0xAFd1f0E77555A835987B1b8A683bA7C67105DFDc", + "beacon": "0x3e1420105177FED86Cd55762fd21b14278E1e93e" + }, "inboxes": { "alfajores": { "inbox": { @@ -410,7 +440,12 @@ "optimismkovan": { "upgradeBeaconController": "0xc0Ce04851bF6Ea149fA06bf7a4808c9db81af189", "abacusConnectionManager": "0x740bEd6E4eEc7c57a2818177Fba3f9E896D5DE1c", - "interchainGasPaymaster": "0x0000000000000000000000000000000000000000", + "interchainGasPaymaster": { + "kind": "UpgradeBeacon", + "proxy": "0xD7D2B0f61B834D98772e938Fa64425587C0f3481", + "implementation": "0xE48fb6dAF7e7a71856dAA7d5728BE2132175d256", + "beacon": "0x07eCE1601749a4813f293F54ec9507DF5e926B10" + }, "inboxes": { "alfajores": { "inbox": { diff --git a/typescript/sdk/src/deploy/core/AbacusCoreChecker.ts b/typescript/sdk/src/deploy/core/AbacusCoreChecker.ts index c256f9846..54304120e 100644 --- a/typescript/sdk/src/deploy/core/AbacusCoreChecker.ts +++ b/typescript/sdk/src/deploy/core/AbacusCoreChecker.ts @@ -28,6 +28,7 @@ export class AbacusCoreChecker< await this.checkInboxes(chain); await this.checkAbacusConnectionManager(chain); await this.checkValidatorManagers(chain); + await this.checkInterchainGasPaymaster(chain); } async checkDomainOwnership(chain: Chain): Promise { @@ -227,4 +228,27 @@ export class AbacusCoreChecker< ), ); } + + async checkInterchainGasPaymaster(chain: Chain): Promise { + const contracts = this.app.getContracts(chain); + if (contracts.interchainGasPaymaster.addresses) { + await this.checkUpgradeBeacon( + chain, + 'InterchainGasPaymaster', + contracts.interchainGasPaymaster.addresses, + ); + } else { + this.violations.push({ + type: CoreViolationType.NotDeployed, + chain: chain, + expected: undefined, + actual: undefined, + data: { + contract: 'InterchainGasPaymaster', + }, + }); + } + + return; + } } diff --git a/typescript/sdk/src/deploy/core/types.ts b/typescript/sdk/src/deploy/core/types.ts index 7005f004f..849a21826 100644 --- a/typescript/sdk/src/deploy/core/types.ts +++ b/typescript/sdk/src/deploy/core/types.ts @@ -16,6 +16,7 @@ export type CoreConfig = { export enum CoreViolationType { ValidatorManager = 'ValidatorManager', Validator = 'Validator', + NotDeployed = 'NotDeployed', } export enum ValidatorViolationType { @@ -35,3 +36,10 @@ export interface ValidatorViolation extends CheckerViolation { validatorManager: MultisigValidatorManager; }; } + +export interface NotDeployedViolation extends CheckerViolation { + type: CoreViolationType.NotDeployed; + data: { + contract: string; + }; +}