Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kleros/vea-contracts

Package Overview
Dependencies
Maintainers
6
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kleros/vea-contracts

Smart contracts for Vea

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
517
increased by33.25%
Maintainers
6
Weekly downloads
 
Created
Source

@kleros/kleros-v2-contracts

Smart contracts for Kleros v2

Deployed Addresses

Refresh the list of deployed contracts by running ./scripts/generateDeploymentsMarkdown.sh.

v2-prealpha-3

Goerli
  • PNK
  • ArbitrableExample
  • FastBridgeReceiverOnEthereum
  • ForeignGatewayOnEthereum
Arbitrum Goerli (Nitro)
Rinkeby
Arbitrum Rinkeby

Getting Started

Install the Dependencies

yarn install

Run Tests

yarn test

Compile the Contracts

yarn build

Run Linter on Files

yarn lint

Fix Linter Issues on Files

yarn fix

Deploy Instructions

NOTICE: the commands below work only if you are inside the contracts/ directory.

0. Set the Environment Variables

Copy .env.example file as .env and edit it accordingly.

cp .env.example .env

The following env vars are required:

  • PRIVATE_KEY: the private key of the deployer account used for the testnets.
  • MAINNET_PRIVATE_KEY: the private key of the deployer account used for Mainnet.
  • INFURA_API_KEY: the API key for infura.

The ones below are optional:

  • ETHERSCAN_API_KEY: to verify the source of the newly deployed contracts on Etherscan.
  • ARBISCAN_API_KEY: to verify the source of the newly deployed contracts on Arbitrum.
1. Update the Constructor Parameters (optional)

If some of the constructor parameters (such as the Meta Evidence) needs to change, you need to update the files in the deploy/ directory.

2. Deploy to a Local Network

The complete deployment is multi-chain, so a deployment to the local network can only simulate either the Home chain or the Foreign chain.

Shell 1: the node

yarn hardhat node --tags nothing

Shell 2: the deploy script

yarn hardhat deploy --network localhost --tags HomeChain
3. Deploy to Public Testnets
# Goerli
yarn hardhat deploy --network arbitrumGoerli --tags Arbitration
yarn hardhat deploy --network goerli --tags ForeignChain
yarn hardhat deploy --network arbitrumGoerli --tags HomeChain

# Rinkeby
yarn hardhat deploy --network arbitrumRinkeby --tags Arbitration
yarn hardhat deploy --network rinkeby --tags ForeignChain
yarn hardhat deploy --network arbitrumRinkeby --tags HomeChain

The deployed addresses should be output to the screen after the deployment is complete. If you miss that, you can always go to the deployments/<network> directory and look for the respective file.

Running Test Fixtures

Shell 1: the node

yarn hardhat node --tags Arbitration,ForeignGateway,HomeGateway

Shell 2: the test script

yarn hardhat test --network localhost test/pre-alpha1/index.ts
4. Verify the Source Code for Contracts

This must be done for each network separately.

yarn hardhat --network <arbitrumGoerli|arbitrumRinkeby|arbitrum|goerli|rinkeby|mainnet> etherscan-verify

Ad-hoc procedures

Populating the policy registry and courts

1/ Export the registry data from V1
yarn hardhat run scripts/getPoliciesV1.ts  --network mainnet | tee policies.v1.json
yarn hardhat run scripts/getCourtsV1.ts --network mainnet | tee courts.v1.json
2/ Import the data to V2 - Local Network

Shell 1:

yarn hardhat node --tags Arbitration

Shell 2:

yarn hardhat run scripts/populatePolicyRegistry.ts --network localhost
yarn hardhat run scripts/populateCourts.ts --network localhost
3/ Import the data to V2 - Public Testnet
yarn hardhat run scripts/populatePolicyRegistry.ts --network arbitrumRinkeby
yarn hardhat run scripts/populateCourts.ts --network arbitrumRinkeby

Keywords

FAQs

Package last updated on 16 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc