Skip to content

Instantly share code, notes, and snippets.

@snaketh4x0r
Created April 7, 2020 20:34
Show Gist options
  • Save snaketh4x0r/b80358f63d557499270a7ccf79825e9c to your computer and use it in GitHub Desktop.
Save snaketh4x0r/b80358f63d557499270a7ccf79825e9c to your computer and use it in GitHub Desktop.
C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts>truffle migrate --network matic
Compiling your contracts...
===========================
> Compiling .\contracts\ConversionRatesInterface.sol
> Compiling .\contracts\ERC20Interface.sol
> Compiling .\contracts\ExpectedRate.sol
> Compiling .\contracts\ExpectedRateInterface.sol
> Compiling .\contracts\FeeBurner.sol
> Compiling .\contracts\FeeBurnerInterface.sol
> Compiling .\contracts\KyberNetwork.sol
> Compiling .\contracts\KyberNetworkInterface.sol
> Compiling .\contracts\KyberNetworkProxy.sol
> Compiling .\contracts\KyberNetworkProxyInterface.sol
> Compiling .\contracts\KyberReserveInterface.sol
> Compiling .\contracts\Migrations.sol
> Compiling .\contracts\PermissionGroups.sol
> Compiling .\contracts\SanityRates.sol
> Compiling .\contracts\SanityRatesInterface.sol
> Compiling .\contracts\SimpleNetworkInterface.sol
> Compiling .\contracts\Utils.sol
> Compiling .\contracts\Utils2.sol
> Compiling .\contracts\Utils3.sol
> Compiling .\contracts\WhiteList.sol
> Compiling .\contracts\WhiteListInterface.sol
> Compiling .\contracts\Withdrawable.sol
> Compiling .\contracts\examples\SwapEtherToToken.sol
> Compiling .\contracts\examples\SwapTokenToEther.sol
> Compiling .\contracts\examples\SwapTokenToToken.sol
> Compiling .\contracts\examples\Trade.sol
> Compiling .\contracts\mockContracts\MockMedianizer.sol
> Compiling .\contracts\mockTokens\AirSwap.sol
> Compiling .\contracts\mockTokens\AppCoins.sol
> Compiling .\contracts\mockTokens\ArcBlock.sol
> Compiling .\contracts\mockTokens\BasicAttentionToken.sol
> Compiling .\contracts\mockTokens\Bluezelle.sol
> Compiling .\contracts\mockTokens\Chain Link.sol
> Compiling .\contracts\mockTokens\DaiStablecoin.sol
> Compiling .\contracts\mockTokens\Digix Gold Token.sol
> Compiling .\contracts\mockTokens\ELFToken.sol
> Compiling .\contracts\mockTokens\Enigma.sol
> Compiling .\contracts\mockTokens\EnjinCoin.sol
> Compiling .\contracts\mockTokens\Ethos.sol
> Compiling .\contracts\mockTokens\IOStoken.sol
> Compiling .\contracts\mockTokens\KyberGenesisToken.sol
> Compiling .\contracts\mockTokens\KyberNetworkCrystal.sol
> Compiling .\contracts\mockTokens\Mana.sol
> Compiling .\contracts\mockTokens\OmiseGo.sol
> Compiling .\contracts\mockTokens\Polymath.sol
> Compiling .\contracts\mockTokens\PowerLedger.sol
> Compiling .\contracts\mockTokens\Raiden.sol
> Compiling .\contracts\mockTokens\Request.sol
> Compiling .\contracts\mockTokens\Salt.sol
> Compiling .\contracts\mockTokens\Status.sol
> Compiling .\contracts\mockTokens\Storm.sol
> Compiling .\contracts\mockTokens\WrappedEther.sol
> Compiling .\contracts\mockTokens\Wrapper.sol
> Compiling .\contracts\mockTokens\Zilliqa.sol
> Compiling .\contracts\reserves\KyberAutomatedReserve.sol
> Compiling .\contracts\reserves\KyberOrderbookReserve.sol
> Compiling .\contracts\reserves\KyberReserve.sol
> Compiling .\contracts\reserves\VolumeImbalanceRecorder.sol
> Compiling .\contracts\reserves\aprConversionRate\LiquidityConversionRates.sol
> Compiling .\contracts\reserves\aprConversionRate\LiquidityFormula.sol
> Compiling .\contracts\reserves\bridgeReserves\dutchx\KyberDutchXReserve.sol
> Compiling .\contracts\reserves\bridgeReserves\oasis\KyberOasisReserve.sol
> Compiling .\contracts\reserves\bridgeReserves\uniswap\KyberUniswapReserve.sol
> Compiling .\contracts\reserves\fprConversionRate\ConversionRates.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\OrderIdManager.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\OrderList.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\OrderListFactory.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\OrderListFactoryInterface.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\OrderListInterface.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\OrderbookReserve.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\OrderbookReserveInterface.sol
> Compiling .\contracts\reserves\orderbookReserve\permissionless\PermissionlessOrderbookReserveLister.sol
> Compiling .\contracts\weth\KyberWethReserve.sol
> Artifacts written to C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\build\contracts
> Compiled successfully using:
- solc: 0.4.18+commit.9cf6e910.Emscripten.clang
Error: Invalid JSON RPC response: ""
at Object.InvalidResponse (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\web3\node_modules\web3-core-helpers\src\errors.js:42:1)
at t.InvalidResponse [as onreadystatechange] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\web3\node_modules\web3-providers-http\src\index.js:92:1)
at t._a [as dispatchEvent] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request-event-target.js:27:61)
at t.dispatchEvent [as _setReadyState] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request.js:208:1)
at t._setReadyState [as _onHttpRequestError] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request.js:349:1)
at ClientRequest._onHttpRequestError (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request.js:252:47)
at ClientRequest.emit (events.js:223:5)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:223:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
Error: Invalid JSON RPC response: ""
at Object.InvalidResponse (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\web3\node_modules\web3-core-helpers\src\errors.js:42:1)
at t.InvalidResponse [as onreadystatechange] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\web3\node_modules\web3-providers-http\src\index.js:92:1)
at t._a [as dispatchEvent] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request-event-target.js:27:61)
at t.dispatchEvent [as _setReadyState] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request.js:208:1)
at t._setReadyState [as _onHttpRequestError] (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request.js:349:1)
at ClientRequest._onHttpRequestError (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\node_modules\truffle-hdwallet-provider\dist\webpack:\truffle-hdwallet-provider\Users\gnidan\src\work\truffle\node_modules\xhr2-cookies\dist\xml-http-request.js:252:47)
at ClientRequest.emit (events.js:223:5)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:223:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
Starting migrations...
======================
> Network name: 'matic'
> Network id: 8995
> Block gas limit: 0x7a1200
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
> transaction hash: 0x071a015a4c8120bd5399c8e665d14a1c4103b96ea9b0edf0f1cf6afb589b4569
> Blocks: 3 Seconds: 6
> contract address: 0xE1cD161BF0472ea5dF69bB76AC7b64c8E2Eb6257
> block number: 16510650
> block timestamp: 1586290650
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 202027
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0 ETH
2_deploy_tokens.js
==================
Deploying 'KyberNetworkCrystal'
-------------------------------
> transaction hash: 0xed560659928a8db95c1e50c3dd931c9fb4756968b007f47786373ec1e7533a15
> Blocks: 2 Seconds: 5
> contract address: 0xBdeC7E0Cbc797E85e141E203a66f2Cf4803D91f7
> block number: 16510665
> block timestamp: 1586290680
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 736255
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'KyberGenesisToken'
-----------------------------
> transaction hash: 0x26eb52103f5e60c8adb35e9397354c4e26d5cb941cf55df7d9c6e09948bd55e1
> Blocks: 2 Seconds: 5
> contract address: 0x2Fed51Fb2AA816f395aC3262badDf3acdE2b0875
> block number: 16510672
> block timestamp: 1586290694
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 720497
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0 ETH
3_deploy_contracts.js
=====================
Deploying 'MockMedianizer'
--------------------------
> transaction hash: 0xf367543c853669ca77c9195d74c61c79862513cc890cbeb5bdc9f8b6756f6dd8
> Blocks: 2 Seconds: 6
> contract address: 0x35b018Ee3676d99506D93F1916Fe706b3ce8751D
> block number: 16510709
> block timestamp: 1586290768
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 140222
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'KyberNetwork'
------------------------
> transaction hash: 0x05eedcf9f204f94f3582d9dc589ae9061ccbe317f2823da66afeb91efbfe8195
> Blocks: 3 Seconds: 5
> contract address: 0xd6aCBa5676f13b09Df0A57c2f678Be4a3292976b
> block number: 16510718
> block timestamp: 1586290786
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 2722347
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'KyberNetworkProxy'
-----------------------------
> transaction hash: 0xb3174ca0357141bf6ef5e5eb5b0691b06f2f3bd55ff0aa33c7b8a2bc4b011120
> Blocks: 3 Seconds: 5
> contract address: 0x99Cb49Bb8d66F1F55dEC586f41110e2156Db3439
> block number: 16510726
> block timestamp: 1586290802
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 1827222
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'LiquidityConversionRates'
------------------------------------
> transaction hash: 0x2855332f851e5c2a16900ae9ba880285691876295f762e6d772d8d2114861e6c
> Blocks: 3 Seconds: 5
> contract address: 0x0Ee2d298500f1bc329be2B1d87493Baf3431e66e
> block number: 16510734
> block timestamp: 1586290818
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 2360496
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'FeeBurner'
---------------------
> transaction hash: 0xd19d0b4c1505f4e7fd84722047f26b0ca9b8976f35b68bd6069e860361f2b550
> Blocks: 2 Seconds: 5
> contract address: 0x2848155114Da120962ccEb4BD5b11F355D263fE8
> block number: 16510742
> block timestamp: 1586290834
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 2069915
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'KyberAutomatedReserve'
---------------------------------
> transaction hash: 0xed8ceeb5af2339de5655245d7b583916040ba1bd21464d2a15b51e6bb3302a79
> Blocks: 2 Seconds: 5
> contract address: 0xE80A3A43895718bC01aF666c53733D3AFEc2bB33
> block number: 16510749
> block timestamp: 1586290848
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 2348820
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'WhiteList'
---------------------
> transaction hash: 0xbaa6fcca429dcac2b6791fda5d01a5c8d7fe22c67f9dd8706395e149d17e8f54
> Blocks: 2 Seconds: 5
> contract address: 0xF34fC8772435c01B866F8e429A4e548af76E02bf
> block number: 16510757
> block timestamp: 1586290864
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 1217438
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'ExpectedRate'
------------------------
> transaction hash: 0x2be24d61485ba5ac33ac3e02efb28776d30db4d2dc35bfb8f7c935c36470a02f
> Blocks: 3 Seconds: 5
> contract address: 0x5AE132c05520F399D8816E79AB0fA8bc15814bCE
> block number: 16510765
> block timestamp: 1586290880
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 1751405
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'SwapEtherToToken'
----------------------------
> transaction hash: 0x011fefa9df5e577fc2f2be51bb28907f09ad703d277a9998006654d0b7f7e107
> Blocks: 2 Seconds: 5
> contract address: 0xCaD84147105dffe7643883f7AC663524814ce8Fb
> block number: 16510772
> block timestamp: 1586290894
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 265889
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'SwapTokenToEther'
----------------------------
> transaction hash: 0xbb8677e7deb52f1cf48385633e6d7576bfc44e9b322d3b373d24eee255af513f
> Blocks: 4 Seconds: 9
> contract address: 0x535BDa8D59841785B23c8DC58A2B6559e4B161a5
> block number: 16510780
> block timestamp: 1586290910
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 362759
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'SwapTokenToToken'
----------------------------
> transaction hash: 0xc1944ba1c6f29140716a53e24e7390ab1db6223f4ce677e93bd34ce622cdbae9
> Blocks: 2 Seconds: 5
> contract address: 0x419B45265a158c136eba5564C7a9Dd85cb42b7ab
> block number: 16510788
> block timestamp: 1586290926
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 394273
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
Deploying 'Trade'
-----------------
> transaction hash: 0x530093e892e3c2312f37961027dfac76c3ff39026cf52e9613bc2256b8b6b3c5
> Blocks: 2 Seconds: 5
> contract address: 0xdB187Ac52d11cE3773aaa0b205ad931f093D5D1D
> block number: 16510795
> block timestamp: 1586290940
> account: 0x65954DD6a54D64f8895855186E3f796F7bC6784e
> balance: 0
> gas used: 495267
> gas price: 0 gwei
> value sent: 0 ETH
> total cost: 0 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0 ETH
4_setup_permissions.js
======================
Calling addOperator()
------------------------
> transaction hash: 0xbd1e2676c9e471350091e304d14d5b621363b172310980cf3e95fc367f4688bb
> contract address: 0xd6aCBa5676f13b09Df0A57c2f678Be4a3292976b
> gas used: 87256
> event: OperatorAdded
Calling addOperator()
------------------------
> transaction hash: 0x0b26cb8c8bad930747214d03e493f4b465494e1e7e4e97744d78ee8ef6fc1395
> contract address: 0xE80A3A43895718bC01aF666c53733D3AFEc2bB33
> gas used: 87102
> event: OperatorAdded
Calling addAlerter()
------------------------
> transaction hash: 0x4642addfb3e6a55b400301e3ce711e049fbd2361f9a9bdc0c85c7bed89952af5
> contract address: 0xE80A3A43895718bC01aF666c53733D3AFEc2bB33
> gas used: 86860
> event: AlerterAdded
Calling addOperator()
------------------------
> transaction hash: 0x167439c1f41ceedc3332c2cdccb2819b36e435e48714cfd231f874ce59da3e87
> contract address: 0x2848155114Da120962ccEb4BD5b11F355D263fE8
> gas used: 87168
> event: OperatorAdded
Calling addOperator()
------------------------
> transaction hash: 0xe6c35bde2eac9fe8215534d4daece1355b6d734f3e2675960b37134867605c75
> contract address: 0xF34fC8772435c01B866F8e429A4e548af76E02bf
> gas used: 87080
> event: OperatorAdded
Calling addOperator()
------------------------
> transaction hash: 0xb4679c98d6a73042153defb9fff64aac69c4d78e8400611832af418f24d47cf5
> contract address: 0x5AE132c05520F399D8816E79AB0fA8bc15814bCE
> gas used: 86948
> event: OperatorAdded
> Saving migration to chain.
-------------------------------------
> Total cost: 0 ETH
5_setup_KyberNetworkProxy.js
============================
Calling setKyberNetworkContract()
------------------------
> transaction hash: 0x168c60d35d226132445980b13ea6ca987e6046f2cf07d7dde02890fe70400b03
> contract address: 0x99Cb49Bb8d66F1F55dEC586f41110e2156Db3439
> gas used: 45878
> event: KyberNetworkSet
> Saving migration to chain.
-------------------------------------
> Total cost: 0 ETH
6_setup_KyberAutomatedReserve.js
================================
0xd6aCBa5676f13b09Df0A57c2f678Be4a3292976b
0x0Ee2d298500f1bc329be2B1d87493Baf3431e66e
Error: Invalid number of parameters for "setContracts". Got 4 expected 3! at PromiEvent (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\contract\lib\promievent.js:9:1)
at TruffleContract.setContracts (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\contract\lib\execute.js:169:1)
at module.exports (C:\Users\lazypuppet\Matic-DEX-Aggregator\Kyber\SmartContracts\migrations\6_setup_KyberAutomatedReserve.js:36:36)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at Migration._deploy (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\migration.js:75:1)
at Migration._load (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\migration.js:57:1)
at Migration.run (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\migration.js:167:1)
at Object.runMigrations (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:148:1)
at Object.runFrom (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:110:1)
at Object.run (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:87:1)
at runMigrations (C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:253:1)
at C:\Users\lazypuppet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:218:1
Truffle v5.1.13 (core: 5.1.13)
Node v12.14.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment