forked from kleros/kleros-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
## 0.1.0 (2021-11-10) | ||
|
||
- docs: initial commit ([23356e7](https://github.com/kleros/kleros-v2/commit/23356e7)) | ||
- docs: license file added ([cb62d2c](https://github.com/kleros/kleros-v2/commit/cb62d2c)) |
This file contains 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 |
---|---|---|
@@ -1,3 +1,17 @@ | ||
# kleros-v2 | ||
# Kleros version 2 | ||
|
||
Kleros version 2 | ||
## Deployed Addresses | ||
|
||
See [contracts/README.md](contracts/README.md#deployed-addresses). | ||
|
||
## Contributing | ||
|
||
### Repo Structure | ||
|
||
Each directory at the root of this repository contains code for each individual part that enables this integration: | ||
|
||
- **`bots/`**: service to automate some steps of the flow which otherwise would required manual intervention from users. | ||
- **Notice:** while this is a centralized service, it exists only for convenience. Users can fulfill the role of the bots if they wish to. | ||
- **`contracts/`**: Smart contracts to enable cross-chain arbitration for Realitio (Reality.eth). [Learn more](contracts/README.md). | ||
- **`dynamic-script/`**: allows fetching the dynamic content for the arbitration, as described by [ERC-1497: Evidence Standard](https://github.com/ethereum/EIPs/issues/1497). | ||
- **`evidence-display/`**: display interface that should be used to render the evidence for arbitrators, as described by [ERC-1497: Evidence Standard](https://github.com/ethereum/EIPs/issues/1497). |
This file contains 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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# @kleros/kleros-v2-contracts | ||
|
||
Smart contracts for Kleros v2 | ||
|
||
## Deployed Addresses | ||
|
||
### Contract 1 | ||
|
||
- Mainnet: ... | ||
- Testnet: ... | ||
|
||
### Contract 2 | ||
|
||
... | ||
|
||
## Contributing | ||
|
||
### Install Dependencies | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
### Run Tests | ||
|
||
```bash | ||
yarn test | ||
``` | ||
|
||
### Compile the Contracts | ||
|
||
```bash | ||
yarn build | ||
``` | ||
|
||
### Run Linter on Files | ||
|
||
```bash | ||
yarn lint | ||
``` | ||
|
||
### Fix Linter Issues on Files | ||
|
||
```bash | ||
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. | ||
|
||
```bash | ||
cp .env.example .env | ||
``` | ||
|
||
The following env vars are required: | ||
|
||
- `PRIVATE_KEY`: the private key of the deployer account used for xDAI, Sokol and Kovan. | ||
- `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`: used only if you wish to verify the source of the newly deployed contracts on Etherscan. | ||
|
||
#### 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 the Proxies | ||
|
||
```bash | ||
yarn deploy:staging # to deploy to L1/L2 testnet | ||
# yarn deploy:production # to deploy to L1/L2 mainnet | ||
``` | ||
|
||
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. | ||
|
||
#### 3. Verify the Source Code for Contracts | ||
|
||
This must be done for each network separately. | ||
|
||
For `Kovan` or `Mainnet` you can use the `etherscan-verify` command from `hardhat`: | ||
|
||
```bash | ||
yarn hardhat --network <kovan|mainnet> etherscan-verify | ||
``` | ||
|
||
For `Sokol` and `xDAI` the process currently must be done manually through [Blockscout](https://blockscout.com/). |