Skip to content

Latest commit

 

History

History
69 lines (57 loc) · 2.59 KB

README.md

File metadata and controls

69 lines (57 loc) · 2.59 KB

Aragon Enigma Voting app

Instructions to run it

  • Download the app:
git clone https://github.com/aragonlabs/enigma-voting
  • Install dependencies and compile contracts
cd enigma-voting
npm i
./node_modules/.bin/truffle compile

(You can prefix compile command with node --stack-size=2048 if you run into "Maximum call stack size exceeded" error)

  • Spin up an IPFS node, with aragon ipfs

  • Spin up a devchain, using aragon devchain --reset

  • Deploy the kit:

./node_modules/.bin/truffle exec --network rpc scripts/enigma-democracy-deploy-kit.js

If you want to deploy the kit in another local network (instead of the one provided by aragon devchain), run the following script to deploy the kit along with its dependencies:

OWNER=0x46e153748d644fdacb29045006a0b5759fe56cd4 ./node_modules/.bin/truffle exec --network rpc scripts/enigma-democracy-deploy-kit-with-deps.js

replacing the value of the owner by the appropriate, and then, in order to publish apps UI to IPFS, run

./scripts/publish_apps.sh 0x32ebfa5ece35ec4a2080b1dd2548c2da020a22d8

You also need to update the ENS address generated by the "deploy kit with deps" script in arapp.json file, where it says registry, which you can do with:

sed -i 's/"registry": "0x[a-zA-Z0-9]*"/"registry": "0x32ebfa5ece35ec4a2080b1dd2548c2da020a22d8"/g' arapp.json

(In both cases replacing 0x32ebfa5ece35ec4a2080b1dd2548c2da020a22d8 by the ENS address generated in the previous deployment script)

  • Publish dApp:
aragon apm publish minor --files app/build

You can check published versions with:

aragon apm versions
  • Create a new instance. Make a copy of instance params file:
cp new_instance_params.json.template new_instance_params.json

and tweak the values as you like. Make sure name in params file is unique. Then create your new instance with:

./node_modules/.bin/truffle exec --network rpc scripts/enigma-democracy-new-instance.js
  • Start the app. Download it from here and run:
npm install
npm run start:local

If you deployed on your own local network, add a prefix with your ENS address to the app start script, like: REACT_APP_ENS_REGISTRY_ADDRESS=0x32ebfa5ece35ec4a2080b1dd2548c2da020a22d8 npm run start:local

Then you can navigate to your DAO adding its address to the URL, something like: http://localhost:3000/#/0xdf5159290adbf0b5b00d9b104b437caa953a33f9, getting the DAO address from the output of the new instance script.

  • For other networks you can define an environment variable ENS, either manually in command line or adding to .env file.