bancorprotocol / contracts-solidity

Bancor Protocol Contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross Chain Deployment and Deploy Script isn't Working

VoR0220 opened this issue · comments

Hi I'm looking to deploy bancor contracts on a separate chain that implements the EVM. I have a working web3 RPC and wanted to test to make sure everything can get deployed and working but you have a non standard way of handling deployments of your smart contracts. I've tried running npm run deploy but all I get is this:

 node scripts/deploy-one.js

(node:60468) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'slice' of undefined
    at Object.fromPrivate (/Users/vor0220/bancor_integration/contracts-solidity/node_modules/web3/node_modules/web3-eth-accounts/node_modules/eth-lib/lib/account.js:29:38)
    at Accounts.privateKeyToAccount (/Users/vor0220/bancor_integration/contracts-solidity/node_modules/web3/node_modules/web3-eth-accounts/src/index.js:129:46)
    at run (/Users/vor0220/bancor_integration/contracts-solidity/scripts/deploy-one.js:73:43)
    at Object.<anonymous> (/Users/vor0220/bancor_integration/contracts-solidity/scripts/deploy-one.js:92:1)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
(node:60468) 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:60468) [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.

What is the best way to go about deploying all contracts in a testnet and then running all tests to make sure everything is working?

alternatively, where can I hardcode network settings to test out via RPC whether this will work properly? I am using a non standard port and not ganache and would like to test these on...not Ganache :P

Found this: https://github.com/bancorprotocol/contracts-solidity/blob/master/solidity/utils/test_deployment.js

which I think is what I want, but the README mentions a config file as well as the deployment but its not clear to me what exactly the config file is or should look like.

Hey,

The test deployment script is indeed what you're looking for.
You can take the sample config file from that readme file, save it to your disk and run the script passing in the parameters described in the readme.

Let me know if you're having any issue with it.

Yudi

Got me headed in the right direction. More work to do on my end. I'll close this for now.