-
Notifications
You must be signed in to change notification settings - Fork 4
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
CLI: Update protocol to v1.0.0-beta.3 #19
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ const logger = Logger('setup') | |
const { network, guardians: guardiansNumber, disputes } = yargs | ||
.help() | ||
.option('network', { alias: 'n', describe: 'Network name', type: 'string', demand: true }) | ||
.option('guardians', { alias: 'j', describe: 'Number of guardians to activate', type: 'string', default: 5 }) | ||
.option('guardians', { alias: 'g', describe: 'Number of guardians to activate', type: 'string', default: 5 }) | ||
.option('disputes', { alias: 'd', describe: 'Number of disputes to create', type: 'string', default: 5 }) | ||
.strict() | ||
.argv | ||
|
@@ -31,8 +31,8 @@ async function setup() { | |
for (let i = 0; i < guardians.length; i++) { | ||
const guardian = guardians[i] | ||
const amount = (i + 1) * 10000 | ||
execSync(`node ./bin/index.js stake -a ${amount} -j ${guardian} -n ${network}`) | ||
execSync(`node ./bin/index.js activate -a ${amount} -f ${guardian} -n ${network}`) | ||
execSync(`node ./bin/index.js stake -a ${amount} -g ${guardian} -n ${network}`) | ||
execSync(`node ./bin/index.js activate -a ${amount} -g ${guardian} -f ${guardian} -n ${network}`) | ||
} | ||
|
||
// check protocol has started | ||
|
@@ -41,9 +41,12 @@ async function setup() { | |
if (currentTermId.eq(bn(0)) && neededTransitions.eq(bn(0))) { | ||
logger.warn('Protocol has not started yet, please make sure Protocol is at term 1 to create disputes and run the script again.') | ||
} else { | ||
|
||
// create disputes | ||
for (let i = 0; i < disputes; i++) { | ||
const arbitrable = arbitrables[i] | ||
const output = execSync(`node ./bin/index.js arbitrable -n ${network}`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wasn't sure, but does this deploy a new Looking at the old code, was this just broken code? |
||
const arbitrable = output.toString().match(/0x[a-fA-F0-9]{40}/g) | ||
console.log(arbitrable) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it's worth logging a bit more info here :) |
||
execSync(`node ./bin/index.js mint -t fee -a 5000 -r ${arbitrable} -n ${network}`) | ||
execSync(`node ./bin/index.js dispute -a ${arbitrable} -m 'Testing dispute #${i}' -e 'http://github.com/aragon/aragon-protocol' -c -n ${network}`) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,10 @@ | |
web3-eth-abi "1.2.5" | ||
web3-utils "1.2.5" | ||
|
||
"@aragon/[email protected].2": | ||
version "1.0.0-beta.2" | ||
resolved "https://registry.yarnpkg.com/@aragon/protocol-evm/-/protocol-evm-1.0.0-beta.2.tgz#3cfdcfcbbaebc2b651fb3f1b9d200f17533ca95f" | ||
integrity sha512-2EyoiAUDOZV8zZPqAZpVP9ih/H+AhYRQde7sapMJJv124yd7QdfAVxDuthq92bf5Jpppty1uuWKw9Ne2MBSQQA== | ||
"@aragon/[email protected].3": | ||
version "1.0.0-beta.3" | ||
resolved "https://registry.yarnpkg.com/@aragon/protocol-evm/-/protocol-evm-1.0.0-beta.3.tgz#674443d03160917a63bd969dab87790e4f7478ac" | ||
integrity sha512-WH/w6oqgNhJOwmfpVlPaLjEfnKEjnWO5PXZ7gWa9lsPZp7Qm4U03miLmJ4UcbExV2clrBXX/ikU9VM05ehQqUw== | ||
|
||
"@aragon/truffle-config-v5@^1.0.1": | ||
version "1.0.1" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find documentation on this script in the package's README, so wasn't sure when this was meant to be used. This is just for setting up an environment on the local chain?