-
Install dependencies:
npm install -g truffle npm install -g @aragon/cli npm install (In /livepeer-aragon-app directory) npm install (In /livepeer-protocol directory)
-
Startup local chain and IPFS, in separate terminals run:
aragon devchain aragon ipfs
-
Prepare Livepeer contracts, execute in the
/livepeer-protocol
directory:truffle migrate truffle exec scripts/livepeerAragonApp/initialiseFirstRound.js
-
Compile with the local version of truffle, execute in the
/livepeer-aragon-app
directory (this is necessary as the Aragon CLI truffle config doesn't optimize Solidity compilation and the contract will not deploy unless optimized):truffle compile --all
-
Deploy the Aragon Dao and Livepeer app, execute in the
/livepeer-aragon-app
directory (find the Livepeer Controller address after thetruffle migrate
in thelivepeer-protocol
directory):aragon run --app-init-args <Livepeer Controller Address>
To test the bonded amount increases as expected after reward is executed, bond to the main account in your local chain (if using aragon devchain
it will likely be 0xb4124cEB3451635DAcedd11767f004d8a28c6eE7
) and execute this in the /livepeer-protocol
directory:
truffle exec scripts/livepeerAragonApp/rewardWithLpt.js
Finally, before unbonding or withdrawing, you must skip one or more Livepeer rounds and initialise the latest one. To do this, modify the constants as necessary and execute this in the /livepeer-protocol
directory:
truffle exec scripts/livepeerAragonApp/skipRoundAndInitialise.js