Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/hebao_v2/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"]
}
},

Expand Down
13 changes: 8 additions & 5 deletions packages/hebao_v2/script/deploy-arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion packages/hebao_v2/test/helper/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down