From 93c323255f09b9540883f46ad32b30df1f843bb1 Mon Sep 17 00:00:00 2001 From: sf <> Date: Thu, 19 Jul 2018 15:30:25 -0700 Subject: [PATCH] updating README with detailed deploy instructions --- README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/README.md b/README.md index e97d8007..a27ef32d 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ EPM: [tcr](https://www.ethpm.com/registry/packages/44) The only environmental dependency you need is Node. Presently we can guarantee this all works with Node 8. ``` npm install +npm run install npm run compile ``` @@ -45,3 +46,76 @@ You can use [https://iancoleman.io/bip39/](https://iancoleman.io/bip39/) to gene ## Packages The repo consumes several EPM packages. `dll` and `attrstore` are libraries used in PLCRVoting's doubly-linked list abstraction. `tokens` provides an ERC20-comaptible token implementation. All packages are installed automatically when running `npm install`. + +## Detailed Deployment Instructions +*step by step for current master branch* +*note: we set our mnemoic as an environment variable* +*note: we created our token ahead of time using myCrypto* + +``` +$ git clone https://github.com/skmgoldin/tcr.git +``` + +open truffle.js
+add *const infura_address = "YOUR_INFURA_ADDRESS"* before module.exports
+concatenate infura_address to rinkeby hdWallet provider url
+``` +provider: () => new HDWalletProvider(mnemonic, 'https://rinkeby.infura.io/'+infura_address) +``` +set rinkeby gas to 6000000
+ +edit tcr/conf/config.json according to instructions above
+ +navigate to https://github.com/skmgoldin/tcr/blob/develop/package.json
+copy deploy-proxies:rinkeby script and add to your package.json scripts
+navigate to https://github.com/skmgoldin/tcr/tree/develop/scripts
+copy deploy_proxies.js and add to your tcr/scripts directory
+ +``` +$ export MNEMONIC="YOUR_INFURA_MNEMONIC" +$ npm install +$ npm run install +$ npm run compile +$ npm run deploy-rinkeby +$ npm run deploy-proxies:rinkeby +``` + +!!! Save the console.log of contract addresses !!!
+ + +test Registry was succesfully deployed:
+ +run a node terminal - using your infura_address and the Registry address we saved above
+``` +> Web3 = require('web3') +> web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/YOUR_INFURA_ADDRESS")); +> const fs = require('fs'); +> const reg = JSON.parse(fs.readFileSync('./build/contracts/Registry.json', 'utf8')); +> const abi = reg.abi +> const addr='YOUR_REGISTRY_ADDRESS' +> var MyContract = web3.eth.contract(abi) +> var MyContractInstance = MyContract.at(addr) +> MyContractInstance.name() +``` + +if MyContract was created correctly, console will output the following when you run
+var MyContractInstance = MyContract.at(addr)
+``` +Contract { + _eth: + Eth { + _requestManager: + + etc..... +``` + +if everything is working, console will output the following when you run
+MyContractInstance.name()
+``` +'your registry name' +``` + + +### Helpful Resources +- https://medium.com/@tokencuratedregistry/the-token-curated-registry-whitepaper-bd2fb29299d6
+- https://gitter.im/Curation-Markets/Lobby