Skip to content

Instantly share code, notes, and snippets.

@facuspagnuolo
Last active March 17, 2020 19:53
Show Gist options
  • Save facuspagnuolo/776cdb309642fb7e3e7e5ddd553b9c0e to your computer and use it in GitHub Desktop.
Save facuspagnuolo/776cdb309642fb7e3e7e5ddd553b9c0e to your computer and use it in GitHub Desktop.
Precedence campaign disputes

Precedence campaign disputes

In order to create disputes for the precedence campaign, we will use the court-backend CLI tool.

So first, make sure you clone it and install its dependencies as follows:

git clone https://github.com/aragonone/court-backend/
cd court-backend
npm i
npx lerna bootstrap
cd packages/cli

Make sure you replace the following [NETWORK] variables with mainnet, rinkeby, ropsten, usability, or staging

Create a new Arbitrable instance

The first thing we will need to do is to deploy a new Arbitrable instance, if you already have one you can reuse it and skip this step:

node ./bin/index.js arbitrable -n [NETWORK] --verbose

Subscribe your Arbitrable instance

Before creating disputes you will need to subscribe your Arbitrable instance to Aragon Court. Make sure you have some DAI, if you don't and you're working on a testnet you can use the faucets of the backoffice app to claim some DAI:

Once you have enough DAI, you subscribe your Arbitrable instance by running the following command:

node ./bin/index.js subscribe -a [ARBITRABLE_ADDRESS] -n [NETWORK] --verbose

Once you have your Arbitrable instance subscribed to Aragon Court, you're good to start submitting disputes. Remember the Arbitrable instance will be paying the fees, so make sure you transfer some DAI to your Arbitrable instance first.

Create a new dispute

Once you have your Arbitrable instance subscribed to Aragon Court, you can run the following command to create a dispute and submit evidence:

node ./bin/index.js dispute \
  -a [ARBITRABLE_ADDRESS] \
  -m [METADATA] \
  -e [EVIDENCE_1] [EVIDENCE_2] ... [EVIDENCE_N] \
  -s [SUBMITTER_1] [SUBMITTER_1] ... [SUBMITTER_N] \
  -c \
  -n [NETWORK] \
  --verbose

The -c option will close the evidence period after creating the dispute and submitting its evidence. You can avoid it, but the CLI tool does not provide a custom command to close it, you will probably need to work it out using Etherscan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment