second-state / how_to_deploy_uniswap

Detailed instructions on how to deploy Uniswap on an Ethereum compatible blockchain
Apache License 2.0
143 stars 94 forks source link

Error: invalid address #12

Open MHG1990 opened 3 years ago

MHG1990 commented 3 years ago

Hi. When I tried to run the js file to deploy the V2 contracts, I got the following error:

(node:8924) Error: invalid address (argument="address", value="", code=INVALID_ARGUMENT, version=address/5.3.0) (argument="_factoryV1", value="", code=INVALID_ARGUMENT, version=abi/5.0.7) at Logger.makeError (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\logger\lib\index.js:187:21) at Logger.throwError (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\logger\lib\index.js:196:20) at Logger.throwArgumentError (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\logger\lib\index.js:199:21) at AddressCoder.Coder._throwError (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\abi\lib\coders\abstract-coder.js:40:16) at AddressCoder.encode (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\abi\lib\coders\address.js:29:18) at D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\abi\lib\coders\array.js:71:19 at Array.forEach () at Object.pack (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\abi\lib\coders\array.js:57:12) at TupleCoder.encode (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\abi\lib\coders\tuple.js:36:24) at AbiCoder.encode (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\@ethersproject\abi\lib\abi-coder.js:86:15) at ABICoder.encodeParameters (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\web3-eth-abi\lib\index.js:121:27) at D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\web3-eth-contract\lib\index.js:439:20 at Array.map () at Object._encodeMethodABI (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\web3-eth-contract\lib\index.js:438:8) at Object._processExecuteArguments (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\web3-eth-contract\lib\index.js:701:39) at Object._executeMethod (D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\node_modules\web3-eth-contract\lib\index.js:720:68) at D:\Uniswap Implementation\how_to_deploy_uniswap-master\uniswap_v2\deploy_uniswap_v2.js:251:10 at processTicksAndRejections (internal/process/task_queues.js:95:5) (node:8924) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. at emitDeprecationWarning (internal/process/promises.js:180:11) at processPromiseRejections (internal/process/promises.js:249:13) at processTicksAndRejections (internal/process/task_queues.js:96:32)

Could you please advise what is the cause of this error ?

vsmelov commented 3 years ago

I have the same issue

v@vpc:~/PycharmProjects/deploy-dex/uniswap-interface/how_to_deploy_uniswap/uniswap_v2$ node deploy_uniswap_v2.js 
Adding Alice, Bob and Charlie keys ...
Web3 is connected.
accounts: ["0x754d88525100E08d044e3d5146CaE96C4384E9Ae","0xcbff263F7333092CD29102A6D58c1AA8C4dAF804","0x8D9E3Dd39239c0290a5d011E316CdBEa531Fc3A6"]
Deploying Uniswap V2 now, please wait ...
Deploying WETH now, please wait ...
0xeabed7d25a0e86575aab8dc32100bf1ba3547e878960caf6e822ae1f4b6ed41f
Transaction hash: 0xeabed7d25a0e86575aab8dc32100bf1ba3547e878960caf6e822ae1f4b6ed41f
Contract address: 0x9e65a5e263EdCCCA1b8e70f5cdDFeCf14157605A
0x9e65a5e263EdCCCA1b8e70f5cdDFeCf14157605A
Data written to file
feeToSetter is currently set to: 0xc0a4272bb5df52134178Df25d77561CfB17ce407
feeTo is currently set to: 0x0000000000000000000000000000000000000000
Deploying ROUTER2 now, please wait ...
0x87b3ad9d9a2a4be1a44c8d6ea2c0d4dec6719e1b3aa1dc6194257e805ce3d2b0
Transaction hash: 0x87b3ad9d9a2a4be1a44c8d6ea2c0d4dec6719e1b3aa1dc6194257e805ce3d2b0
Contract address: 0xE1FEc750Be1357143e7b5f3F69dC150709aFA047
0xE1FEc750Be1357143e7b5f3F69dC150709aFA047
Data written to file
Symbol set to: WETH
Total Supply set to: 0
Name set to: Wrapped Ether
Deploying Multicall now, please wait ...
0x3973e542d7db14c94e1a42b6e65728188241dcbbd3ccc3eacba53480eadc8ba1
Transaction hash: 0x3973e542d7db14c94e1a42b6e65728188241dcbbd3ccc3eacba53480eadc8ba1
Deploying Migrator now, please wait ...
Contract address: 0x6a4280F69a5F9A7b6FdbdBf64da4876F96ABA385
0x6a4280F69a5F9A7b6FdbdBf64da4876F96ABA385
Data written to file
0x6811e33b69b3dfe404787bcebad38724a2d735b9930671629ec58ed2aad6478d
Transaction hash: 0x6811e33b69b3dfe404787bcebad38724a2d735b9930671629ec58ed2aad6478d
Router2's WETH set to: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Router2's factory set to: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
(node:113013) UnhandledPromiseRejectionWarning: Error: invalid address (arg="_factoryV1", coderType="address", value="")
    at Object.throwError (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-abi/node_modules/ethers/utils/errors.js:68:17)
    at CoderAddress.encode (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-abi/node_modules/ethers/utils/abi-coder.js:467:20)
    at /home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-abi/node_modules/ethers/utils/abi-coder.js:605:59
    at Array.forEach (<anonymous>)
    at pack (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-abi/node_modules/ethers/utils/abi-coder.js:604:12)
    at CoderTuple.encode (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-abi/node_modules/ethers/utils/abi-coder.js:764:16)
    at AbiCoder.encode (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-abi/node_modules/ethers/utils/abi-coder.js:897:77)
    at ABICoder.encodeParameters (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-abi/src/index.js:96:27)
    at /home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-contract/src/index.js:426:24
    at Array.map (<anonymous>)
    at Object._encodeMethodABI (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-contract/src/index.js:425:12)
    at Object._processExecuteArguments (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-contract/src/index.js:741:39)
    at Object._executeMethod (/home/v/PycharmProjects/deploy-dex/uniswap-interface/node_modules/web3-eth-contract/src/index.js:766:54)
    at /home/v/PycharmProjects/deploy-dex/uniswap-interface/how_to_deploy_uniswap/uniswap_v2/deploy_uniswap_v2.js:251:10
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:113013) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:113013) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Contract address: 0x9Dc9599D68e3Bc2AB6FeeAA3C77b6331490b1627
0x9Dc9599D68e3Bc2AB6FeeAA3C77b6331490b1627
Data written to file