Documentation
Hei Folks!
First of all, thanks a lot for this great project and all the work you have put into it!
I am looking forward to work on/with this project and started yesterday to check out this repo. So far i was not able to make a test-deployment and also coverage gave me some errors.
So in general it would be very nice, to have a documentation of everything around this protocol.
The README.md is perfect for the first step, but if ones want to dig deeper, it get's difficult for now.
I started some thoughts about a documentation-structure in our fork, https://github.com/Midas-Technologies-AG/erasure-protocol/tree/docs/docs.
First great step would be, to start with an installation guide.
Cheers!
You can run this project locally with the scripts in package.json.
$ yarn install
$ yarn compile
$ yarn ganache
$ yarn deploy
That aside, I'd also love to have some documentation on how to use the contracts correctly.
You can run this project locally with the scripts in
package.json.
Thats what i have checked and got errors during compile...
$ yarn etherlime deploy ./deployment/deploy.js --compile=false $ .../erasure-protocol/node_modules/.bin/etherlime deploy ./deployment/deploy.js --compile=false { Error: cannot convert null value to array (arg="value", value=undefined, version=4.0.37) at Object.throwError (.../erasure-protocol/node_modules/ethers/errors.js:76:17) at Object.arrayify (.../erasure-protocol/node_modules/ethers/utils/bytes.js:45:16) at new SigningKey (.../erasure-protocol/node_modules/ethers/utils/signing-key.js:35:39) at new Wallet (.../erasure-protocol/node_modules/ethers/wallet.js:44:62) at deploy (.../erasure-protocol/deployment/deploy.js:28:16) at Object.run (.../erasure-protocol/node_modules/etherlime/cli-commands/deployer/deployer.js:34:9) at Object.commandProcessor [as handler] (.../erasure-protocol/node_modules/etherlime/cli-commands/commands.js:158:20) at Object.runCommand (.../erasure-protocol/node_modules/etherlime/node_modules/yargs/lib/command.js:235:44) at Object.parseArgs [as _parseArgs] (.../erasure-protocol/node_modules/etherlime/node_modules/yargs/yargs.js:1014:30) at Function.get [as argv] (.../erasure-protocol/node_modules/etherlime/node_modules/yargs/yargs.js:957:21) at run (.../erasure-protocol/node_modules/etherlime/cli.js:36:7) at Object.<anonymous> (.../erasure-protocol/node_modules/etherlime/cli.js:49: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) reason: 'cannot convert null value to array', code: 'INVALID_ARGUMENT', arg: 'value', value: undefined } Your deployment script finished with failure!
Ah, right. I remember this error.
Basically, you need to set
export DEPLOYMENT_PRIV_KEY=<priv key from ganache>
and change the yarn deploy to
yarn etherlime deploy ./deployment/deploy.js --compile=false ganache
The yarn deploy needs a network arg.
Thanks for the feedback!
You can pass the network to the yarn script:
yarn deploy ganache
We use the .env package to store secrets locally, you can creat your own .env file and add your private key.
We are working on a npm package to wrap the deployed contract with JavaScript methods. This ought to make connecting to the contracts a little easier.
Coverage tool does not correctly instrument contracts deployed from an other contract, we are still working on a fix.
You are right that our documentation is lacking, this is a wip.
Please continue to share any suggestions or requests for additional tooling. We are eager to build it.
Thanks for your help!
Something like a deploy.json file would be nice, to set all configs for the deployment.
We use the .env package to store secrets locally, you can creat your own .env file and add your private key.
Does it need to be anywhere specific and how do i add the private_key in there? (JSON format?)
Please continue to share any suggestions or requests for additional tooling. We are eager to build it.
Very happy to see you that open for new feedback! Will definitely post it here :)
Does it need to be anywhere specific and how do i add the private_key in there? (JSON format?)
Tried it like described here https://www.npmjs.com/package/dotenv
I just added to root directory deploy.env with one line, DEPLOYMENT_PRIV_KEY=0x.....
yarn deploy ganache didnt worked :(
you need to name the file .env without deploy keyword and add quotes: DEPLOYMENT_PRIV_KEY="0x...abc"
@iemwill
in https://github.com/erasureprotocol/erasure-protocol/pull/196 I cleaned up the deployment script to avoid the need for a .env when deploying to ganache.
It works with latest version of contracts on master. You may need to make similar changes to get the script to work with https://github.com/erasureprotocol/erasure-protocol/releases/tag/v1.0.0
First question, do you guys still work on this repo and if so do you still use the deployments? Got some time for coding :)