Skip to content

Commit f0fadfa

Browse files
[hebaov2] Add config info for Arbitrum One (#2465)
1 parent 3ec26b5 commit f0fadfa

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

packages/hebao_v2/hardhat.config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default {
6060
accounts: loadTestAccounts().map(item => item.privateKey)
6161
},
6262

63-
arbitrum: {
63+
arbitrum_test5: {
6464
chainId: 144545313136048,
6565
url: "https://kovan5.arbitrum.io/rpc",
6666
gas: "auto",
@@ -71,6 +71,17 @@ export default {
7171
accounts: loadTestAccounts()
7272
.map(item => item.privateKey)
7373
.slice()
74+
},
75+
76+
arbitrum_one: {
77+
chainId: 42161,
78+
url: "https://arb1.arbitrum.io/rpc",
79+
gas: "auto",
80+
gasPrice: "auto",
81+
gasMultiplier: 1,
82+
timeout: 20000,
83+
httpHeaders: undefined,
84+
accounts: ["priv-key-str"]
7485
}
7586
},
7687

packages/hebao_v2/script/deploy-arbitrum.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@ async function newWallet() {
1010
// const walletFactoryAddress = "0x44B74caF7CB28cC243EaA9D1d1b3eCb2Ddc2C9f1";
1111

1212
// walletFactory and smartWallet contract on test v5:
13-
const smartWalletAddress = "0xE708Cb725D6F2aDeEab2258262Aa9129D2A28312";
14-
const walletFactoryAddress = "0x5Dd70df24364DC05D46C8F40611BFDd107927263";
13+
// const smartWalletAddress = "0xE708Cb725D6F2aDeEab2258262Aa9129D2A28312";
14+
// const walletFactoryAddress = "0x5Dd70df24364DC05D46C8F40611BFDd107927263";
15+
16+
// walletFactory and smartWallet contract on Arbitrum One:
17+
const smartWalletAddress = "0xc53Ec1cc77Be1793AfE12A7FA6fE0575960F0c36";
18+
const walletFactoryAddress = "0xE23c3fD23fd58C0FEE42455A17d15A24637750f6";
1519

1620
const ownerAccount = (await ethers.getSigners())[0];
1721
const ownerAddr = await ownerAccount.getAddress();
18-
const fakeGuardian1 = "0x" + "12".repeat(20);
1922
const salt = 1;
2023
const signature = signCreateWallet(
2124
walletFactoryAddress,
2225
ownerAddr,
23-
[fakeGuardian1],
26+
[],
2427
new BN(0),
2528
ethers.constants.AddressZero,
2629
ethers.constants.AddressZero,
@@ -30,7 +33,7 @@ async function newWallet() {
3033
);
3134
const walletConfig: any = {
3235
owner: ownerAddr,
33-
guardians: [fakeGuardian1],
36+
guardians: [],
3437
quota: 0,
3538
inheritor: ethers.constants.AddressZero,
3639
feeRecipient: ethers.constants.AddressZero,

packages/hebao_v2/test/helper/Constants.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ export class Constants {
22
static readonly emptyBytes: any = [];
33
static readonly zeroAddress = "0x" + "00".repeat(20);
44
static readonly emptyBytes32 = "0x" + "00".repeat(32);
5-
static readonly chainId = 31337; // hardhat & ganache default chainId
5+
// static readonly chainId = 31337; // hardhat & ganache default chainId
6+
7+
static readonly chainId = 42161; // Arbitrum One
68

79
// static readonly chainId = 144545313136048; // arbitrum testnet v5 chainId
810
// static readonly chainId = 97; // binance bsc testnet chainId

0 commit comments

Comments
 (0)