Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding detailed deploy instructions to end of README #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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 <br/>
add *const infura_address = "YOUR_INFURA_ADDRESS"* before module.exports <br/>
concatenate infura_address to rinkeby hdWallet provider url <br/>
```
provider: () => new HDWalletProvider(mnemonic, 'https://rinkeby.infura.io/'+infura_address)
```
set rinkeby gas to 6000000 <br/>

edit tcr/conf/config.json according to instructions above <br/>

navigate to https://github.com/skmgoldin/tcr/blob/develop/package.json <br/>
copy deploy-proxies:rinkeby script and add to your package.json scripts <br/>
navigate to https://github.com/skmgoldin/tcr/tree/develop/scripts <br/>
copy deploy_proxies.js and add to your tcr/scripts directory <br/>

```
$ 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 !!! <br/>


test Registry was succesfully deployed: <br/>

run a node terminal - using your infura_address and the Registry address we saved above <br/>
```
> 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 <br/>
var MyContractInstance = MyContract.at(addr) <br/>
```
Contract {
_eth:
Eth {
_requestManager:

etc.....
```

if everything is working, console will output the following when you run <br/>
MyContractInstance.name() <br/>
```
'your registry name'
```


### Helpful Resources
- https://medium.com/@tokencuratedregistry/the-token-curated-registry-whitepaper-bd2fb29299d6 <br/>
- https://gitter.im/Curation-Markets/Lobby <br/>