Giter Site home page Giter Site logo

second-state / how_to_deploy_uniswap Goto Github PK

View Code? Open in Web Editor NEW
136.0 6.0 93.0 668 KB

Detailed instructions on how to deploy Uniswap on an Ethereum compatible blockchain

License: Apache License 2.0

JavaScript 49.98% Solidity 25.57% Python 23.30% Shell 1.14%

how_to_deploy_uniswap's People

Contributors

tpmccallum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

how_to_deploy_uniswap's Issues

deploying using hard-hate locally?

Hello, nice guide, im trying to deploy uniswap locally, but i dont know how to change the chain-id since im not getting any info regarding it after running npx hardhat node

Error: The contract code couldn't be stored, please check your gas limit.

/root/node_modules/web3-core-helpers/lib/errors.js:87
var error = new Error(message);
^

Error: The contract code couldn't be stored, please check your gas limit.
at Object.TransactionError (/root/node_modules/web3-core-helpers/lib/errors.js:87:21)
at Object.ContractCodeNotStoredError (/root/node_modules/web3-core-helpers/lib/errors.js:95:21)
at /root/node_modules/web3-core-method/lib/index.js:337:49
at processTicksAndRejections (node:internal/process/task_queues:96:5) {

How to solve it?thanks

β€œThe contract code couldn't be stored, please check your gas limitβ€œ

Deploying Multicall now, please wait ... 0x4114c1e6fd314f7b35d546a53bbccc8e80000e6b842768505a858c2313ce3e06 Transaction hash: 0x4114c1e6fd314f7b35d546a53bbccc8e80000e6b842768505a858c2313ce3e06 Error: The contract code couldn't be stored, please check your gas limit. at Object.callback (/root/eth/uniswap-interface/node_modules/web3-core-method/src/index.js:333:46) at sendTxCallback (/root/eth/uniswap-interface/node_modules/web3-core-method/src/index.js:484:29) at /root/eth/uniswap-interface/node_modules/web3-core-requestmanager/src/index.js:147:9 at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:549917 at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:140344 at d (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:206203) at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:206256 at t.default (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:564796) at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:206574 at s (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:549761) at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:632708 at t.i.onreadystatechange (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:748948) at t.e.dispatchEvent (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:142373) at t._setReadyState (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:753708) at t._onHttpResponseEnd (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:756793) at IncomingMessage.<anonymous> (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:756051) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19) (node:17706) UnhandledPromiseRejectionWarning: Error: The contract code couldn't be stored, please check your gas limit. at Object.callback (/root/eth/uniswap-interface/node_modules/web3-core-method/src/index.js:333:46) at sendTxCallback (/root/eth/uniswap-interface/node_modules/web3-core-method/src/index.js:484:29) at /root/eth/uniswap-interface/node_modules/web3-core-requestmanager/src/index.js:147:9 at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:549917 at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:140344 at d (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:206203) at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:206256 at t.default (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:564796) at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:206574 at s (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:549761) at /root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:632708 at t.i.onreadystatechange (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:748948) at t.e.dispatchEvent (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:1:142373) at t._setReadyState (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:753708) at t._onHttpResponseEnd (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:756793) at IncomingMessage.<anonymous> (/root/eth/uniswap-interface/node_modules/truffle-hdwallet-provider/dist/index.js:15:756051) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19) (node:17706) 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(). (rejection id: 1) (node:17706) [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.

Deploy Multicall or Migrator contract always report this error, increase gas did not solve the problem,
any suggestions?

Dex Aggregator

How do we add in Liquidity Source for 0x, Aave, 1inch or Uniswap V2 etc for more liquidity sources provider rather than just depend on our own liquidity pool?

Something like a DEX Aggregator like 1inch.

Means the swap will always work as long there is token at Uniswap or 0x or Aave, Sushi etc

It should behave like 1inch.

Uniswap + Metamask + BSC (Binance smart chain)

When deploying

node deploy_uniswap_v2.js

got the error below but the transaction is successful, what is wrong?

here I see success
https://testnet.bscscan.com/tx/0x27125601163a7aeb1a34f06fdeac20606c2b1d53c1346507e9cbe49beb301e3f

but I get this error
...
Data written to file
feeTo is currently set to: 0x0000000000000000000000000000000000000000
feeToSetter is currently set to: 0xc0a4272bb5df52134178Df25d77561CfB17ce407
Deploying ROUTER2 now, please wait ...
0x27125601163a7aeb1a34f06fdeac20606c2b1d53c1346507e9cbe49beb301e3f
Transaction hash: 0x27125601163a7aeb1a34f06fdeac20606c2b1d53c1346507e9cbe49beb301e3f
(node:17063) UnhandledPromiseRejectionWarning: Error: transaction underpriced
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:15:632675
at t.i.onreadystatechange (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:748948)
at t.e.dispatchEvent (/root/node_modules/truffle-hdwallet-provider/dist/index.js:1:142373)
at t._setReadyState (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:753708)
at t._onHttpResponseEnd (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:756793)
at IncomingMessage. (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:756051)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:17063) 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:17063) [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: 0x49985360d54F5C850F04FD0D925ae2762E4ddbEb
0x49985360d54F5C850F04FD0D925ae2762E4ddbEb
Data written to file
Name set to: Wrapped Ether
Symbol set to: WETH
Total Supply set to: 0

Running uniswap with private blockchain

Hello, i can't seem to be able to get uniswap interface to work with my private Geth node, i dont quite understand the change_rpc.py file
Can anyone help me, just what i'll have to do?

Problem with deploying to Avalanche solved with upgrading truffle-hdwallet-provider

I got the issue when using the script on avalanche

I solved the problem with changing

const HDWalletProvider = require('truffle-hdwallet-provider');
to
const HDWalletProvider = require('@truffle/hdwallet-provider');

and

npm i "@truffle/hdwallet-provider"

I also provided manually chainId to every signed transaction.

Hopefully, my solution may save time for someone.

Getting invalid address

Data written to file (node:5761) UnhandledPromiseRejectionWarning: Error: invalid address (argument="address", value="", code=INVALID_ARGUMENT, version=address/5.0.10) (argument="_factoryV1", value="", code=INVALID_ARGUMENT, version=abi/5.0.7) at Logger.makeError (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/logger/lib/index.js:179:21) at Logger.throwError (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/logger/lib/index.js:188:20) at Logger.throwArgumentError (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/logger/lib/index.js:191:21) at AddressCoder.Coder._throwError (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:40:16) at AddressCoder.encode (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/abi/lib/coders/address.js:29:18) at /Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/abi/lib/coders/array.js:71:19 at Array.forEach (<anonymous>) at Object.pack (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/abi/lib/coders/array.js:57:12) at TupleCoder.encode (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/abi/lib/coders/tuple.js:36:24) at AbiCoder.encode (/Users/yudiz/Documents/Practise/uniswap/node_modules/@ethersproject/abi/lib/abi-coder.js:86:15) at ABICoder.encodeParameters (/Users/yudiz/Documents/Practise/uniswap/node_modules/web3-eth-abi/lib/index.js:121:27) at /Users/yudiz/Documents/Practise/uniswap/node_modules/web3-eth-contract/lib/index.js:439:20 at Array.map (<anonymous>) at Object._encodeMethodABI (/Users/yudiz/Documents/Practise/uniswap/node_modules/web3-eth-contract/lib/index.js:438:8) at Object._processExecuteArguments (/Users/yudiz/Documents/Practise/uniswap/node_modules/web3-eth-contract/lib/index.js:701:39) at Object._executeMethod (/Users/yudiz/Documents/Practise/uniswap/node_modules/web3-eth-contract/lib/index.js:720:68) at /Users/yudiz/Documents/Practise/uniswap/uniswap-interface/how_to_deploy_uniswap/uniswap_v2/deploy_uniswap_v2.js:251:10 at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:5761) 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(). (rejection id: 78) (node:5761) [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.

Any solution? Deploying v2
Screenshot 2021-02-26 at 5 53 42 PM

node deploy_uniswap_v2.js

"contract_address": {
"uniswap_factory": "0x2DF5e651be537bB564005340EA5D8f6fA763b530",
"weth": "0x043c7D26e381CB1bb025b4CE0A6E0C63D7767866",
"uniswap_exchange_template": "0x68Fc886B0ca3D65AE8Ad21Fde01d8C4E2AD9d86c",
"alice_exchange": "0x4A8f21726434951f5C1baA0F067d50fdA2a297e2",
"bob_exchange": "0x61d82A90455EC7cDEdF7cF7F5267c0aF6657c626",
"alice_erc20_token": "0x240Fc9370709bad1F4402186701C76e36a20848b",
"bob_erc20_token": "0x09cB0AE6dddF68Aaad81b8f6B83c30dfdaA65b48",
"uniswap_v2": "0x0fA47ae2b7Dee29571678580BBe9A8A88436E393",
"multicall": "0x50F0463B01119Aa954ce40a7f21ecf4573E7605a",
"migrator": "0x3cBe562Fd434aF61601937895000A91D014a49e7",
"router": "0x5c192a0155D504772F3bc2689aF69116E098ECAa",
"ens_registry": "0xA07e2676495eEDEdb5A50b9ba020Ba3A98f87D4E"
}

The above is not populated, mine just remain the same as it is

  "contract_address": {
            "uniswap_factory": "",
            "weth": "",
            "uniswap_exchange_template": "",
            "alice_exchange": "",
            "bob_exchange": "",
            "alice_erc20_token": "",
            "bob_erc20_token": "",
            "uniswap_v2": "",
            "multicall": "",
            "migrator": "",
            "router": "",
            "ens_registry": "",
            "gas_relay_hub_address": "",
            "unisocks": ""
    },

Uniswap + Metamask + Binance Smart Chain

Tried to deploy and got this errors, what prices should I increase?

Name set to: Wrapped Ether
Deploying Multicall now, please wait ...
0x4b545c9dbbec85c34631bfabf6d574628318efc0242f05a8ca204792d4c905a2
Transaction hash: 0x4b545c9dbbec85c34631bfabf6d574628318efc0242f05a8ca204792d4c905a2
Deploying Migrator now, please wait ...
(node:30869) UnhandledPromiseRejectionWarning: Error: The contract code couldn't be stored, please check your gas limit.
at Object.callback (/root/node_modules/web3-core-method/src/index.js:333:46)
at sendTxCallback (/root/node_modules/web3-core-method/src/index.js:484:29)
at /root/node_modules/web3-core-requestmanager/src/index.js:147:9
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:15:549917
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:1:140344
at d (/root/node_modules/truffle-hdwallet-provider/dist/index.js:1:206203)
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:1:206256
at t.default (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:564796)
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:1:206574
at s (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:549761)
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:15:632708
at t.i.onreadystatechange (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:748948)
at t.e.dispatchEvent (/root/node_modules/truffle-hdwallet-provider/dist/index.js:1:142373)
at t._setReadyState (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:753708)
at t._onHttpResponseEnd (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:756793)
at IncomingMessage. (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:756051)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:30869) 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:30869) [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.
Error: The contract code couldn't be stored, please check your gas limit.
at Object.callback (/root/node_modules/web3-core-method/src/index.js:333:46)
at sendTxCallback (/root/node_modules/web3-core-method/src/index.js:484:29)
at /root/node_modules/web3-core-requestmanager/src/index.js:147:9
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:15:549917
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:1:140344
at d (/root/node_modules/truffle-hdwallet-provider/dist/index.js:1:206203)
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:1:206256
at t.default (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:564796)
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:1:206574
at s (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:549761)
at /root/node_modules/truffle-hdwallet-provider/dist/index.js:15:632708
at t.i.onreadystatechange (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:748948)
at t.e.dispatchEvent (/root/node_modules/truffle-hdwallet-provider/dist/index.js:1:142373)
at t._setReadyState (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:753708)
at t._onHttpResponseEnd (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:756793)
at IncomingMessage. (/root/node_modules/truffle-hdwallet-provider/dist/index.js:15:756051)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
0xcabf4a9efd495c30006a7bab274edae212d75fde87d22aaf7430fce4b4baa33b
Transaction hash: 0xcabf4a9efd495c30006a7bab274edae212d75fde87d22aaf7430fce4b4baa33b
Contract address: 0x6c0EdD87dd4bb0b9f416A1bD6Fa90d4900255B71
0x6c0EdD87dd4bb0b9f416A1bD6Fa90d4900255B71
Data written to file
(node:30869) UnhandledPromiseRejectionWarning: Error: invalid address (arg="_router", coderType="address", value="")
at Object.throwError (/root/node_modules/ethers/utils/errors.js:68:17)
at CoderAddress.encode (/root/node_modules/ethers/utils/abi-coder.js:467:20)
at /root/node_modules/ethers/utils/abi-coder.js:605:59
at Array.forEach ()
at pack (/root/node_modules/ethers/utils/abi-coder.js:604:12)
at CoderTuple.encode (/root/node_modules/ethers/utils/abi-coder.js:764:16)
at AbiCoder.encode (/root/node_modules/ethers/utils/abi-coder.js:897:77)
at ABICoder.encodeParameters (/root/node_modules/web3-eth-abi/src/index.js:96:27)
at /root/node_modules/web3-eth-contract/src/index.js:426:24
at Array.map ()
at Object._encodeMethodABI (/root/node_modules/web3-eth-contract/src/index.js:425:12)
at Object._processExecuteArguments (/root/node_modules/web3-eth-contract/src/index.js:741:39)
at Object._executeMethod (/root/node_modules/web3-eth-contract/src/index.js:766:54)
at /root/uniswap-interface/how_to_deploy_uniswap/uniswap_v2/deploy_uniswap_v2.js:251:10
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:30869) 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: 2)

Error: invalid address

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 ?

deployed uniswap issue with metamask conneted

After initial metamask connection, balance is displayed on dApp, but after maybe 15-20 second all balances displayed in dApp ho to zero and stay like that stopping me to do any activity inside dApp

Just connected...

image

After 15 seconds...

image

gaz limit problem

Hi,
When try to deploy v2, their is an error.
I tryed to incread the gaz limit in deploy_uniswap_v2, as i saw a closed issue in the repo. (from 4700000 to 8000000) But doesn't change.
here is the error and new code

Maybe i didn't change the right place? Any idea how to make it work?

Thanks

Deploying Multicall now, please wait ...
0x481e3894ac8f062eaf4041d88664b6dc862780080b26565da9fc878598d2828d
Transaction hash: 0x481e3894ac8f062eaf4041d88664b6dc862780080b26565da9fc878598d2828d
(node:5155) UnhandledPromiseRejectionWarning: Error: The contract code couldn't be stored, please check your gas limit.
    at Object.TransactionError (/root/test/v2/uniswap-interface/node_modules/web3-core-helpers/lib/errors.js:87:21)
    at Object.ContractCodeNotStoredError (/root/test/v2/uniswap-interface/node_modules/web3-core-helpers/lib/errors.js:95:21)
    at /root/test/v2/uniswap-interface/node_modules/web3-core-method/lib/index.js:335:49
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5155) 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: 18)
(node:5155) [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.
Error: The contract code couldn't be stored, please check your gas limit.
    at Object.TransactionError (/root/test/v2/uniswap-interface/node_modules/web3-core-helpers/lib/errors.js:87:21)
    at Object.ContractCodeNotStoredError (/root/test/v2/uniswap-interface/node_modules/web3-core-helpers/lib/errors.js:95:21)
    at /root/test/v2/uniswap-interface/node_modules/web3-core-method/lib/index.js:335:49
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  receipt: {
    blockHash: '0x9b3d13e58ea23a1467bf0c07b8d21cb347febb086b87fd854b94f2de53b42592',
    blockNumber: 8627389,
    contractAddress: '0x5D0836E8721471C7329b2Ede2c385f1EF97E7E3a',
    cumulativeGasUsed: 4700000,
    from: '0x101447c86a76fc22330f332b0ed147eaa8edf597',
    gasUsed: 4700000,
    logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
    status: false,
    to: null,
    transactionHash: '0x481e3894ac8f062eaf4041d88664b6dc862780080b26565da9fc878598d2828d',
    transactionIndex: 0,
    type: '0x0',
    events: {}
  }
}

deploy_uniswap_v2.js

// Uniswap V2 Multicall
    // V2 Multicall Deployment
    console.log("Deploying Multicall now, please wait ...");
    let uniswapMulticall;
    uniswapMulticall = await web3.eth.sendTransaction({
        from: accounts[2],
        data: uniswapMulticallBytecode
    }); // Charlie accounts[2] is the owner
    let uniswapMulticallInstance = new web3.eth.Contract(uniswapMulticallAbi, uniswapMulticall.contractAddress);
    uniswapMulticallInstance.deploy({
            data: uniswapMulticallBytecode
        })
        .send({
            from: accounts[2],
            gas: 8000000,
            gasPrice: '30000000000'
        }, function(error, transactionHash) {
            console.log(transactionHash);
        })
        .on('error', function(error) {
            console.log(error);
        })
        .on('transactionHash', function(transactionHash) {
            console.log("Transaction hash: " + transactionHash);
        })
        .on('receipt', function(receipt) {
            console.log("Contract address: " + receipt.contractAddress) // contains the new contract address
            data_object.contract_address.multicall = receipt.contractAddress;
            let data_to_write = JSON.stringify(data_object, null, 2);
            write_data(data_to_write);
        })
        .then(function(newContractInstance) {
            console.log(newContractInstance.options.address) // instance with the new contract address
        });

yarn run build error

Hi,
During the yarn run build of the front end, i have an error

ts-gen: Writing file: src/types/v3/factories/ITickLens__factory.ts
ts-gen: Writing file: src/types/v3/factories/IV3Migrator__factory.ts
ts-gen: Writing file: src/types/v3/commons.ts
ts-gen: Writing file: src/types/v3/index.ts
ts-gen: πŸ’Ž All done! Generated files: 80
Creating an optimized production build...
Failed to compile.

/root/uniswap-interface/src/state/swap/hooks.ts
TypeScript error in /root/uniswap-interface/src/state/swap/hooks.ts(93,3):
Duplicate identifier ''''.  TS2300

    91 |   '': true, // v2 factory
    92 |   '0xf164fC0Ec4E93095b804a4795bBe1e041497b92a': true, // v2 router 01
  > 93 |   '': true, // v2 router 02
       |   ^
    94 | }
    95 |
    96 | /**


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any idea where it come from?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.