Skip to content

Commit 59936e9

Browse files
authored
feat: Deploy pre-audit versions of MulticallHandler (#533)
* feat: Initial MulticallHandler deployments * feat: Deploy pre-audit versions of MulticallHandler These are likely to match post-audit versions but are marked pre-audit officially
1 parent c715a6a commit 59936e9

23 files changed

+7440
-19
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { DeployFunction } from "hardhat-deploy/types";
2+
import { HardhatRuntimeEnvironment } from "hardhat/types";
3+
4+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
5+
const { deployments, getNamedAccounts } = hre;
6+
const { deploy } = deployments;
7+
8+
const { deployer } = await getNamedAccounts();
9+
10+
// @note if deploying this contract on a chain like Linea that only supports up to
11+
// solc 0.8.19, the hardhat.config solc version needs to be overridden and this
12+
// contract needs to be recompiled.
13+
await deploy("Multicallhandler", {
14+
contract: "MulticallHandler",
15+
from: deployer,
16+
log: true,
17+
skipIfAlreadyDeployed: true,
18+
args: [],
19+
deterministicDeployment: "0x12345678", // Salt for the create2 call. This will deploy this contract
20+
// at the same address on all chains except ZkSync and Linea which are not EVM equivalent.
21+
});
22+
};
23+
module.exports = func;
24+
func.tags = ["Multicallhandler"];
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import * as zk from "zksync-web3";
2+
import { Deployer as zkDeployer } from "@matterlabs/hardhat-zksync-deploy";
3+
import { DeployFunction, DeploymentSubmission } from "hardhat-deploy/types";
4+
import { HardhatRuntimeEnvironment } from "hardhat/types";
5+
6+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
7+
const contractName = "MulticallHandler";
8+
const { deployments } = hre;
9+
10+
const mnemonic = hre.network.config.accounts.mnemonic;
11+
const wallet = zk.Wallet.fromMnemonic(mnemonic);
12+
const deployer = new zkDeployer(hre, wallet);
13+
14+
const artifact = await deployer.loadArtifact(contractName);
15+
const constructorArgs = [];
16+
17+
const _deployment = await deployer.deploy(artifact, constructorArgs);
18+
const newAddress = _deployment.address;
19+
console.log(`New ${contractName} implementation deployed @ ${newAddress}`);
20+
21+
// Save the deployment manually because OZ's hardhat-upgrades packages bypasses hardhat-deploy.
22+
// See also: https://stackoverflow.com/questions/74870472
23+
const extendedArtifact = await deployments.getExtendedArtifact(contractName);
24+
const deployment: DeploymentSubmission = {
25+
address: newAddress,
26+
...extendedArtifact,
27+
};
28+
await deployments.save(contractName, deployment);
29+
30+
await hre.run("verify:verify", { address: newAddress, constructorArguments: constructorArgs });
31+
};
32+
33+
module.exports = func;
34+
func.tags = ["MulticallHandlerZk", "zksync"];

deployments/README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,46 +19,54 @@
1919
| Mode Adapter | [0xf1B59868697f3925b72889ede818B9E7ba0316d0](https://etherscan.io/address/0xf1B59868697f3925b72889ede818B9E7ba0316d0) |
2020
| AcrossConfigStore | [0x3B03509645713718B78951126E0A6de6f10043f5](https://etherscan.io/address/0x3B03509645713718B78951126E0A6de6f10043f5) |
2121
| Across Bond Token | [0xee1dc6bcf1ee967a350e9ac6caaaa236109002ea](https://etherscan.io/address/0xee1dc6bcf1ee967a350e9ac6caaaa236109002ea) |
22+
| MulticallHandler | [0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F](https://etherscan.io/address/0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F) |
2223

2324
## Optimism mainnet (10)
2425

2526
| Contract Name | Address |
2627
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
2728
| Optimism_SpokePool | [0x6f26Bf09B1C792e3228e5467807a900A503c0281](https://optimistic.etherscan.io/address/0x6f26Bf09B1C792e3228e5467807a900A503c0281) |
29+
| MulticallHandler | [0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F](https://optimistic.etherscan.io/address/0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F) |
2830

2931
## Polygon mainnet(137)
3032

3133
| Contract Name | Address |
3234
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ |
3335
| PolygonTokenBridger | [0x48d990AbDA20afa1fD1da713AbC041B60a922c65](https://polygonscan.com/address/0x48d990AbDA20afa1fD1da713AbC041B60a922c65) |
3436
| Polygon_SpokePool | [0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096](https://polygonscan.com/address/0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096) |
37+
| MulticallHandler | [0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F](https://polygonscan.com/address/0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F) |
3538

3639
## zkSync mainnet (324)
3740

3841
| Contract Name | Address |
3942
| ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
4043
| zkSync_SpokePool | [0xE0B015E54d54fc84a6cB9B666099c46adE9335FF](https://explorer.zksync.io/address/0xE0B015E54d54fc84a6cB9B666099c46adE9335FF) |
44+
| MulticallHandler | [0x863859ef502F0Ee9676626ED5B418037252eFeb2](https://explorer.zksync.io/address/0x863859ef502F0Ee9676626ED5B418037252eFeb2) |
4145

4246
## Arbitrum mainnet (42161)
4347

4448
| Contract Name | Address |
4549
| ------------------ | -------------------------------------------------------------------------------------------------------------------- |
4650
| Arbitrum_SpokePool | [0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A](https://arbiscan.io/address/0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A) |
51+
| MulticallHandler | [0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F](https://arbiscan.io/address/0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F) |
4752

4853
## Base mainnet (8453)
4954

50-
| Contract Name | Address |
51-
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
52-
| Base_SpokePool | [0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64](https://basescan.org/address/0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64) |
55+
| Contract Name | Address |
56+
| ---------------- | --------------------------------------------------------------------------------------------------------------------- |
57+
| Base_SpokePool | [0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64](https://basescan.org/address/0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64) |
58+
| MulticallHandler | [0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F](https://basescan.org/address/0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F) |
5359

5460
## Linea mainnet (59144)
5561

56-
| Contract Name | Address |
57-
| --------------- | ------------------------------------------------------------------------------------------------------------------------ |
58-
| Linea_SpokePool | [0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75](https://lineascan.build/address/0x7e63a5f1a8f0b4d0934b2f2327daed3f6bb2ee75) |
62+
| Contract Name | Address |
63+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
64+
| Linea_SpokePool | [0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75](https://lineascan.build/address/0x7e63a5f1a8f0b4d0934b2f2327daed3f6bb2ee75) |
65+
| MulticallHandler | [0x1015c58894961F4F7Dd7D68ba033e28Ed3ee1cDB](https://lineascan.build/address/0x1015c58894961F4F7Dd7D68ba033e28Ed3ee1cDB) |
5966

6067
## Mode mainnet (34443)
6168

62-
| Contract Name | Address |
63-
| -------------- | -------------------------------------------------------------------------------------------------------------------- |
64-
| Mode_SpokePool | [0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96](https://modescan.io/address/0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96) |
69+
| Contract Name | Address |
70+
| ---------------- | -------------------------------------------------------------------------------------------------------------------- |
71+
| Mode_SpokePool | [0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96](https://modescan.io/address/0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96) |
72+
| MulticallHandler | [0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F](https://modescan.io/address/0xA18cD406a857e174397814F32c0Ef7cC68Ddc20F) |

deployments/arbitrum/Multicallhandler.json

Lines changed: 281 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)