Skip to content

Commit

Permalink
Merge branch 'main' into trevor/bump-manta-reorg-period
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy authored Jan 4, 2024
2 parents 95c31b0 + c720ee1 commit 6f5e975
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
7 changes: 6 additions & 1 deletion typescript/infra/config/environments/testnet4/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ export const ethereumTestnetConfigs: ChainMap<ChainMetadata> = {
maxPriorityFeePerGas: 40 * 10 ** 9, // 40 gwei
},
},
bsctestnet: chainMetadata.bsctestnet,
bsctestnet: {
...chainMetadata.bsctestnet,
transactionOverrides: {
gasPrice: 80 * 10 ** 9, // 8 gwei
},
},
goerli: chainMetadata.goerli,
scrollsepolia: chainMetadata.scrollsepolia,
sepolia: chainMetadata.sepolia,
Expand Down
8 changes: 4 additions & 4 deletions typescript/sdk/src/consts/bytecode.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export enum BytecodeHash {
V3_MAILBOX_BYTECODE_HASH = '0x6e853444a6e38bb1d7ac7608b92a70cee83153c891c70ed882b2432134bb23a0', // without optimizer
OPT_V3_MAILBOX_BYTECODE_HASH = '0x7cc944e10fa5597f10265bdac4a808e705711451ee7f117ebf9a97193b796136', // with optimizer
TRANSPARENT_PROXY_BYTECODE_HASH = '0x320bda003dfa31828115be5c01b9f3e7eecaf2532afdb89d2b53559f2e7ab86d',
PROXY_ADMIN_BYTECODE_HASH = '0x13855ae57da3aadecb9259cecece16e1f434b8850fe95531f422e4e262f3f200', // without optimizer
OPT_PROXY_ADMIN_BYTECODE_HASH = '0x30aa3b1506a94c0fe2749af099851623685d9a24a65e2e8b3746c272499979d1', // with optimizer
TRANSPARENT_PROXY_BYTECODE_HASH = '0x320bda003dfa31828115be5c01b9f3e7eecaf2532afdb89d2b53559f2e7ab86d', // without optimizer
OPT_TRANSPARENT_PROXY_BYTECODE_HASH = '0x30aa3b1506a94c0fe2749af099851623685d9a24a65e2e8b3746c272499979d1', // with optimizer
PROXY_ADMIN_BYTECODE_HASH = '0x13855ae57da3aadecb9259cecece16e1f434b8850fe95531f422e4e262f3f200',
V2_PROXY_ADMIN_BYTECODE_HASH = '0x7c378e9d49408861ca754fe684b9f7d1ea525bddf095ee0463902df701453ba0', // reused from v2
INTERCHAIN_GAS_PAYMASTER_BYTECODE_HASH = '0xe995bcd732f4861606036357edb2a4d4c3e9b8d7e599fe548790ac1cf26888f8',
INTERCHAIN_GAS_PAYMASTER_BYTECODE_HASH = '0x69325ab0957fcca37e2eac622af6186380f4cddb279183a97c37511459d40f18',
OWNER_INITIALIZABLE_INTERCHAIN_GAS_PAYMASTER_BYTECODE_HASH = '0xd2c5b00ac2d058117491d581d63c3c4fcf6aeb2667c6cc0c7caed359c9eebea1',
OVERHEAD_IGP_BYTECODE_HASH = '0x3cfed1f24f1e9b28a76d5a8c61696a04f7bc474404b823a2fcc210ea52346252',
}
6 changes: 4 additions & 2 deletions typescript/sdk/src/consts/multisigIsm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const defaultMultisigConfigs: ChainMap<MultisigConfig> = {
'0xec68258a7c882ac2fc46b81ce80380054ffb4ef2', // dsrv
'0x5450447aee7b544c462c9352bef7cad049b0c2dc', // zeeprime
'0x092e1c19da58e87ea65198785ee83867fe4bb418', // everstake
// '0xc2d68e109a7e80e12098d50ac4ef9fa7b3061684', // staked (not yet announced)
'0xc2d68e109a7e80e12098d50ac4ef9fa7b3061684', // staked
],
},

Expand Down Expand Up @@ -47,6 +47,7 @@ export const defaultMultisigConfigs: ChainMap<MultisigConfig> = {
'0x64889519ad3ffc8f3ae436fcd63efc6b853fd63f', // staked
'0x41188cb5a5493a961c467ba38a3f8b1f1d35ee63', // everstake
'0xcff391b4e516452d424db66beb9052b041a9ed79', // dsrv
'0x5450447aee7b544c462c9352bef7cad049b0c2dc', // zeeprime
],
},

Expand Down Expand Up @@ -85,6 +86,7 @@ export const defaultMultisigConfigs: ChainMap<MultisigConfig> = {
'0x622e43baf06ad808ca8399360d9a2d9a1a12688b', // dsrv
'0xf2c1e3888eb618f1f1a071ef3618f134715a9a49', // everstake
'0x46ecbc794574727abb8f97f01dacd9db6135f47a', // staked
'0x5450447aee7b544c462c9352bef7cad049b0c2dc', // zeeprime
],
},

Expand All @@ -104,7 +106,7 @@ export const defaultMultisigConfigs: ChainMap<MultisigConfig> = {
'0x94438a7de38d4548ae54df5c6010c4ebc5239eae', // dsrv
'0x5450447aee7b544c462c9352bef7cad049b0c2dc', // zeeprime
'0xce327111035dd38698c92c3778884dbbb0ca8103', // everstake
// '0xb2f5a6a6e6046e2ede213617e989329666a6c4bc', // staked (not yet announced)
'0xb2f5a6a6e6046e2ede213617e989329666a6c4bc', // staked
],
},

Expand Down
2 changes: 1 addition & 1 deletion typescript/sdk/src/core/HyperlaneCoreChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class HyperlaneCoreChecker extends HyperlaneAppChecker<
contracts.mailbox.address,
[
BytecodeHash.TRANSPARENT_PROXY_BYTECODE_HASH,
BytecodeHash.OPT_PROXY_ADMIN_BYTECODE_HASH,
BytecodeHash.OPT_TRANSPARENT_PROXY_BYTECODE_HASH,
],
);
await this.checkBytecode(
Expand Down
28 changes: 10 additions & 18 deletions typescript/sdk/src/gas/HyperlaneIgpChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ export class HyperlaneIgpChecker extends HyperlaneAppChecker<

async checkBytecodes(chain: ChainName): Promise<void> {
const contracts = this.app.getContracts(chain);
await this.checkBytecode(
chain,
'InterchainGasPaymaster proxy',
contracts.interchainGasPaymaster.address,
[BytecodeHash.TRANSPARENT_PROXY_BYTECODE_HASH],
);
const implementation = await proxyImplementation(
this.multiProvider.getProvider(chain),
contracts.interchainGasPaymaster.address,
Expand All @@ -55,24 +49,22 @@ export class HyperlaneIgpChecker extends HyperlaneAppChecker<
'InterchainGasPaymaster implementation',
implementation,
[BytecodeHash.INTERCHAIN_GAS_PAYMASTER_BYTECODE_HASH],
(bytecode) =>
bytecode // We persist the block number in the bytecode now too, so we have to strip it
.replaceAll(
/(00000000000000000000000000000000000000000000000000000000[a-f0-9]{0,22})81565/g,
(match, _offset) => (match.length % 2 === 0 ? '' : '0'),
),
);

await this.checkBytecode(
chain,
'InterchainGasPaymaster proxy',
contracts.interchainGasPaymaster.address,
[BytecodeHash.TRANSPARENT_PROXY_BYTECODE_HASH],
(bytecode) =>
bytecode
// We persist the block number in the bytecode now too, so we have to strip it
.replaceAll(
/(00000000000000000000000000000000000000000000000000000000[a-f0-9]{0,22})81565/g,
(match, _offset) => (match.length % 2 === 0 ? '' : '0'),
)
.replaceAll(
/(0000000000000000000000000000000000000000000000000000[a-f0-9]{0,22})6118123373/g,
(match, _offset) => (match.length % 2 === 0 ? '' : '0'),
),
[
BytecodeHash.TRANSPARENT_PROXY_BYTECODE_HASH,
BytecodeHash.OPT_TRANSPARENT_PROXY_BYTECODE_HASH,
],
);
}

Expand Down
2 changes: 1 addition & 1 deletion typescript/sdk/src/providers/MultiProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export class MultiProvider<MetaExt = {}> extends ChainMetadataManager<MetaExt> {
tx: ContractTransaction | Promise<ContractTransaction>,
): Promise<ContractReceipt> {
const confirmations =
this.getChainMetadata(chainNameOrId).blocks?.confirmations || 1;
this.getChainMetadata(chainNameOrId).blocks?.confirmations ?? 1;
const response = await tx;
const txUrl = this.tryGetExplorerTxUrl(chainNameOrId, response);
this.logger(
Expand Down

0 comments on commit 6f5e975

Please sign in to comment.