diff --git a/packages/hebao_v2/hardhat.config.ts b/packages/hebao_v2/hardhat.config.ts index 0eaf97513..0fa7d4ff1 100644 --- a/packages/hebao_v2/hardhat.config.ts +++ b/packages/hebao_v2/hardhat.config.ts @@ -60,7 +60,7 @@ export default { accounts: loadTestAccounts().map(item => item.privateKey) }, - arbitrum: { + arbitrum_test5: { chainId: 144545313136048, url: "https://kovan5.arbitrum.io/rpc", gas: "auto", @@ -71,6 +71,17 @@ export default { accounts: loadTestAccounts() .map(item => item.privateKey) .slice() + }, + + arbitrum_one: { + chainId: 42161, + url: "https://arb1.arbitrum.io/rpc", + gas: "auto", + gasPrice: "auto", + gasMultiplier: 1, + timeout: 20000, + httpHeaders: undefined, + accounts: ["priv-key-str"] } }, diff --git a/packages/hebao_v2/script/deploy-arbitrum.ts b/packages/hebao_v2/script/deploy-arbitrum.ts index 79982ac02..22f9343c0 100644 --- a/packages/hebao_v2/script/deploy-arbitrum.ts +++ b/packages/hebao_v2/script/deploy-arbitrum.ts @@ -10,17 +10,20 @@ async function newWallet() { // const walletFactoryAddress = "0x44B74caF7CB28cC243EaA9D1d1b3eCb2Ddc2C9f1"; // walletFactory and smartWallet contract on test v5: - const smartWalletAddress = "0xE708Cb725D6F2aDeEab2258262Aa9129D2A28312"; - const walletFactoryAddress = "0x5Dd70df24364DC05D46C8F40611BFDd107927263"; + // const smartWalletAddress = "0xE708Cb725D6F2aDeEab2258262Aa9129D2A28312"; + // const walletFactoryAddress = "0x5Dd70df24364DC05D46C8F40611BFDd107927263"; + + // walletFactory and smartWallet contract on Arbitrum One: + const smartWalletAddress = "0xc53Ec1cc77Be1793AfE12A7FA6fE0575960F0c36"; + const walletFactoryAddress = "0xE23c3fD23fd58C0FEE42455A17d15A24637750f6"; const ownerAccount = (await ethers.getSigners())[0]; const ownerAddr = await ownerAccount.getAddress(); - const fakeGuardian1 = "0x" + "12".repeat(20); const salt = 1; const signature = signCreateWallet( walletFactoryAddress, ownerAddr, - [fakeGuardian1], + [], new BN(0), ethers.constants.AddressZero, ethers.constants.AddressZero, @@ -30,7 +33,7 @@ async function newWallet() { ); const walletConfig: any = { owner: ownerAddr, - guardians: [fakeGuardian1], + guardians: [], quota: 0, inheritor: ethers.constants.AddressZero, feeRecipient: ethers.constants.AddressZero, diff --git a/packages/hebao_v2/test/helper/Constants.ts b/packages/hebao_v2/test/helper/Constants.ts index cf57d9338..872341877 100644 --- a/packages/hebao_v2/test/helper/Constants.ts +++ b/packages/hebao_v2/test/helper/Constants.ts @@ -2,7 +2,9 @@ export class Constants { static readonly emptyBytes: any = []; static readonly zeroAddress = "0x" + "00".repeat(20); static readonly emptyBytes32 = "0x" + "00".repeat(32); - static readonly chainId = 31337; // hardhat & ganache default chainId + // static readonly chainId = 31337; // hardhat & ganache default chainId + + static readonly chainId = 42161; // Arbitrum One // static readonly chainId = 144545313136048; // arbitrum testnet v5 chainId // static readonly chainId = 97; // binance bsc testnet chainId