-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.js
47 lines (41 loc) · 1.38 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const { ethers } = require("ethers");
require('dotenv').config()
contracts = require('folia-contracts')
const network = "homestead";
const provider = ethers.getDefaultProvider(network, {
infura: process.env.INFURA_API_KEY,
});
async function run() {
wallet = new ethers.Wallet.fromMnemonic(process.env.MAINNET_MNEMONIC)
wallet = wallet.connect(provider)
auction = new ethers.Contract(contracts.ReserveAuction.networks['1'].address, contracts.ReserveAuction.abi, wallet)
overrides = {
gasLimit: 500000,
gasPrice: ethers.utils.parseUnits('150', 'gwei').toString(),
type: 1,
accessList: [
{
address: "0x397c2c9c2841bcc396ecaedbc00cd2cfd07de917", // admin gnosis safe proxy address
storageKeys: [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
},
{
address: "0xaF5c3455A72ecdfc316Bf00e356182B58585B40E", // proceedsRecipient gnosis safe proxy address
storageKeys: [
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
},
{
address: '0x34cfac646f301356faa8b21e94227e3583fe3f5f', // gnosis safe master address
storageKeys: []
}
]
}
work = 11000003
endAuctionTX = await auction.endAuction(work, overrides)
console.log({endAuctionTX})
resolved = await endAuctionTX.wait()
console.log({resolved})
}
run()