Skip to content

Commit 6daa8c9

Browse files
committed
Deploy MultipleMerkleDistributor arbitrum
1 parent b738d7e commit 6daa8c9

File tree

6 files changed

+902
-1
lines changed

6 files changed

+902
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ Note: for contracts with both an implementation and proxy, when interaction with
138138
| EscrowMigrator Proxy | [`0xC9aF789Ae606F69cF8Ed073A04eC92f2354b027d`](https://optimistic.etherscan.io/address/0xC9aF789Ae606F69cF8Ed073A04eC92f2354b027d) |
139139
| EscrowMigrator Implementation | [`0x10B04483d762Bd4F193F35600112ad52391004A7`](https://optimistic.etherscan.io/address/0x10B04483d762Bd4F193F35600112ad52391004A7) |
140140
| MultipleMerkleDistributor | [`0xf486A72E8c8143ACd9F65A104A16990fDb38be14`](https://optimistic.etherscan.io/address/0xf486A72E8c8143ACd9F65A104A16990fDb38be14) |
141+
| MultipleMerkleDistributor (ARB) | [`0x5733Ef72c134E7A276029CB4ba07Bff8b1163086`](https://arbiscan.io/address/0x5733Ef72c134E7A276029CB4ba07Bff8b1163086) |
141142
| vKWENTA | [`0x6789D8a7a7871923Fc6430432A602879eCB6520a`](https://optimistic.etherscan.io/token/0x6789d8a7a7871923fc6430432a602879ecb6520a) |
142143
| vKWENTARedeemer | [`0x8132EE584bCD6f8Eb1bea141DB7a7AC1E72917b9`](https://optimistic.etherscan.io/address/0x8132EE584bCD6f8Eb1bea141DB7a7AC1E72917b9) |
143144

deployments/arbitrum-mainnet/.chainId

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
42161

deployments/arbitrum-mainnet/MultipleMerkleDistributor.json

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

deployments/arbitrum-mainnet/solcInputs/b560387ef8e523f752ce28e86fda37a4.json

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

hardhat.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ export default {
116116
url: `https://opt-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
117117
accounts: process.env.DEPLOYER_PRIVATE_KEY ? [process.env.DEPLOYER_PRIVATE_KEY] : undefined,
118118
},
119+
"arbitrum-mainnet": {
120+
url: `https://arb-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
121+
accounts: process.env.DEPLOYER_PRIVATE_KEY ? [process.env.DEPLOYER_PRIVATE_KEY] : undefined,
122+
},
119123
tenderly: {
120124
url: process.env.TENDERLY_FORK_URL ?? ""
121125
}
@@ -139,6 +143,6 @@ export default {
139143
]
140144
},
141145
exposed: {
142-
exclude: ["**/libraries/SafeDecimalMath.sol", "**/misc/LPRewards.sol"]
146+
exclude: ["**/libraries/SafeDecimalMath.sol", "**/misc/LPRewards.sol", "**/TokenDistributor.sol"]
143147
},
144148
};
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
2+
import { ethers } from "hardhat";
3+
import { saveDeployments, verify } from "./utils";
4+
5+
const REWARD_DISTRIBUTOR = "0x5566B4d1767C1019F430F65C6877237bAe25D6B9";
6+
const ARB_TOKEN_ADDRESS = "0x912CE59144191C1204E64559FE8253a0e49E6548";
7+
8+
async function main() {
9+
const [deployer] = await ethers.getSigners();
10+
console.log("Deploying contracts with the account:", deployer.address);
11+
console.log("Account balance:", (await deployer.getBalance()).toString());
12+
13+
const tradingRewards = await deployMultipleMerkleDistributor(
14+
deployer,
15+
ARB_TOKEN_ADDRESS
16+
);
17+
18+
await tradingRewards.nominateNewOwner(REWARD_DISTRIBUTOR);
19+
console.log(
20+
"TradingRewards nominated owner: ",
21+
await tradingRewards.nominatedOwner()
22+
);
23+
}
24+
25+
async function deployMultipleMerkleDistributor(
26+
owner: SignerWithAddress,
27+
token: string
28+
) {
29+
const MultipleMerkleDistributor = await ethers.getContractFactory(
30+
"MultipleMerkleDistributor"
31+
);
32+
const multipleMerkleDistributor = await MultipleMerkleDistributor.deploy(
33+
owner.address,
34+
token
35+
);
36+
await multipleMerkleDistributor.deployed();
37+
await saveDeployments(
38+
"MultipleMerkleDistributor",
39+
multipleMerkleDistributor
40+
);
41+
console.log(
42+
"MultipleMerkleDistributor deployed to: ",
43+
multipleMerkleDistributor.address
44+
);
45+
46+
await verify(
47+
multipleMerkleDistributor.address,
48+
[owner.address, token],
49+
"contracts/MultipleMerkleDistributor.sol:MultipleMerkleDistributor" // to prevent bytecode clashes with contracts-exposed versions
50+
);
51+
52+
return multipleMerkleDistributor;
53+
}
54+
55+
// We recommend this pattern to be able to use async/await everywhere
56+
// and properly handle errors.
57+
main()
58+
.then(() => process.exit(0))
59+
.catch((error) => {
60+
console.error(error);
61+
process.exit(1);
62+
});

0 commit comments

Comments
 (0)