File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,18 @@ const web3 = new Web3('http://localhost:9545');
4
4
const UniswapV2FactoryBytecode = require ( '@uniswap/v2-core/build/UniswapV2Factory.json' ) . bytecode
5
5
const UniswapV2FactoryAbi = require ( '@uniswap/v2-core/build/UniswapV2Factory.json' ) . abi
6
6
7
- const Z = "0x0000000000000000000000000000000000000000" ;
7
+ const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" ;
8
8
9
- async function a ( ) {
9
+ async function deployFactory ( ) {
10
10
11
- const ganacheAccounts = await web3 . eth . getAccounts ( ) ;
11
+ const accounts = await web3 . eth . getAccounts ( ) ;
12
12
const contract = new web3 . eth . Contract ( UniswapV2FactoryAbi ) ;
13
13
14
14
contract . deploy ( {
15
- arguments : [ Z ] ,
15
+ arguments : [ ZERO_ADDRESS ] ,
16
16
data : UniswapV2FactoryBytecode
17
17
} ) . send ( {
18
- from : ganacheAccounts [ 0 ] ,
18
+ from : accounts [ 0 ] ,
19
19
gas : 4712388 ,
20
20
gasPrice : 100000000000
21
21
} ) . then ( ( deployment ) => {
@@ -26,4 +26,4 @@ async function a() {
26
26
} ) ;
27
27
}
28
28
29
- a ( ) ;
29
+ deployFactory ( ) ;
You can’t perform that action at this time.
0 commit comments