This repository was archived by the owner on May 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
CLI: Update protocol to v1.0.0-beta.3 #19
Open
facuspagnuolo
wants to merge
1
commit into
development
Choose a base branch
from
cli/update_protocol_version
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}`) | ||
|
Contributor
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) | ||
|
Contributor
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}`) | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?