The OO Dispute CLI is a command-line tool designed to facilitate the efficient dispute of multiple UMA Optimistic Oracle proposals in the Optimistic Oracle V2 on the supported chains.
- Node.js (version 16 or higher)
- yarn (version 1.22.19 or higher)
- Install dependencies:
yarn install
- Build the project:
yarn build
To start the CLI, use the following command:
yarn dispute
The CLI accepts the following arguments:
-h
or--help
: Display help information.-m
or--multiplier
: Specify the gas fee multiplier (default is 4).-t
or--sort-remaining-time
: Specify if disputes should be sorted by remaining time to dispute (ascending) (default is false).-b
or--sort-bond-size
: Specify if disputes should be sorted by bond size (descending) (default is false).-r
or--sort-random
: Specify if disputes should be sorted randomly (default is false).-p
or--only-polymarket
: Specify if only Polymarket proposals should be considered (default is false). It will only dispute proposals requested from the addresses inPOLYMARKET_REQUESTER_ADDRESSES
inconstants.ts
.
Note: Only one sort option can be applied. If no sort options are selected, the disputes will be sorted by age, from oldest to newest.
The CLI uses the following environment variables:
CHAIN_ID
: The chain ID. Required.MAX_BLOCK_LOOK_BACK
: The maximum block look-back (default is 3499). Optional.NODE_URL_{CHAIN_ID}
: The node URL for the chain ID. Required.PRIVATE_KEY
: The private key for the wallet. Required.BLOCK_LOOKBACK_PERIOD
: The block lookback period (default is POLYGON_BLOCKS_PER_HOUR * 24). This is how many blocks to look back to find proposals to dispute. Optional.
To dispute proposals on Polygon Mainnet (chain ID 137) with only Polymarket proposals sorted by remaining time to dispute (ascending), you can run:
CHAIN_ID=137 NODE_URL_137=<YOUR_NODE_URL> PRIVATE_KEY=<YOUR_PRIVATE_KEY> yarn dispute -p -t