Skip to content

Commit 1f00332

Browse files
committed
🏭deploy factory script adjustments
1 parent dc5e36f commit 1f00332

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

deploy-factory.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ const web3 = new Web3('http://localhost:9545');
44
const UniswapV2FactoryBytecode = require('@uniswap/v2-core/build/UniswapV2Factory.json').bytecode
55
const UniswapV2FactoryAbi = require('@uniswap/v2-core/build/UniswapV2Factory.json').abi
66

7-
const Z = "0x0000000000000000000000000000000000000000";
7+
const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
88

9-
async function a() {
9+
async function deployFactory() {
1010

11-
const ganacheAccounts = await web3.eth.getAccounts();
11+
const accounts = await web3.eth.getAccounts();
1212
const contract = new web3.eth.Contract(UniswapV2FactoryAbi);
1313

1414
contract.deploy({
15-
arguments: [Z],
15+
arguments: [ZERO_ADDRESS],
1616
data: UniswapV2FactoryBytecode
1717
}).send({
18-
from: ganacheAccounts[0],
18+
from: accounts[0],
1919
gas: 4712388,
2020
gasPrice: 100000000000
2121
}).then((deployment) => {
@@ -26,4 +26,4 @@ async function a() {
2626
});
2727
}
2828

29-
a();
29+
deployFactory();

0 commit comments

Comments
 (0)