Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feb demo - Integration #510

Merged
merged 168 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
33a9c93
feat(wip/web): add court details and staking flow
alcercu Dec 1, 2022
68c8979
fix(web): update supported chains and wrong chain error boundary
alcercu Dec 1, 2022
daa853a
chore(web): add react-use
alcercu Dec 1, 2022
3ac743f
feat(web): add Option Card component
alcercu Dec 1, 2022
acd19b6
fix(web, subgraph): adapt UI to subgraph changes and fix case details…
alcercu Dec 5, 2022
ba58c22
feat(wip/web): implement appeal flow
alcercu Dec 16, 2022
ec59cf5
Merge branch 'master' into feat(web)/appeal-flow
alcercu Jan 6, 2023
e482b3c
Merge branch 'master' into feat(web)/appeal-flow
alcercu Jan 6, 2023
66a0f1d
fix(web): related to subgraph change
alcercu Jan 10, 2023
da850f8
feat(web/WIP): add appeal flow
alcercu Jan 10, 2023
74c0eec
Merge branch 'master' into feat(web)/appeal-flow
alcercu Jan 13, 2023
986f21e
chore(web): update graphql generated file
alcercu Jan 17, 2023
98f1619
feat(web/WIP): add appeal flow
alcercu Jan 17, 2023
cc2e25c
feat(web/WIP): adapt for paidFees in the subgraph
alcercu Jan 17, 2023
82414e9
feat(web): add hourglass icon and improve explainer
alcercu Jan 19, 2023
d1a9291
Merge branch 'feat(web)/staking-flow' into feat(web)/demo-staging
alcercu Jan 19, 2023
db0e769
Merge branch 'feat(web)/appeal-flow' into feat(web)/demo-staging
alcercu Jan 19, 2023
898c225
feat(web): merge staking and appealing flow for demo
alcercu Jan 19, 2023
63bbd5c
chore(web): update parcel
alcercu Jan 20, 2023
9ea3247
fix(web): code changes now reflect in browser
alcercu Jan 20, 2023
8ffc8d2
feat(web): pnk allowance and stake
alcercu Jan 20, 2023
c7eeeb3
Merge branch 'master' into feat(web)/demo-staging
alcercu Jan 23, 2023
32d0548
feat(web): add courts dropdown
alcercu Jan 23, 2023
dce2024
fix: moved to the new Randomizer contract, the callback takes now a u…
jaybuidl Jan 26, 2023
43a35c0
fix(web): make pages occupy 100% of screen
alcercu Jan 26, 2023
3c65a7d
fix(web): court stats
alcercu Jan 26, 2023
dcaa92d
refactor(web): extract parse amount
alcercu Jan 26, 2023
5744965
fix(web): timeline fix
alcercu Jan 26, 2023
b1d2f07
feat(web): add fund logic
alcercu Jan 26, 2023
35ce937
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
alcercu Jan 26, 2023
8c935a1
refactor(web): add link to the court name in Field component
gratestas Jan 26, 2023
eeee1bf
chore(contracts): add cach_hardhat to .gitignore
gratestas Jan 26, 2023
0d52e9a
refactor(web): add space b/w Juror Rewards and Court Policy area
gratestas Jan 26, 2023
48dd0fb
feat: added gnosischain support to extract the court policies and par…
jaybuidl Jan 27, 2023
b41805c
refactor(web): hide the Skills tab if empty content
gratestas Jan 27, 2023
d41bb39
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
gratestas Jan 27, 2023
dd8f927
fix(web): countdown fix
alcercu Jan 27, 2023
70f4d95
feat(web/WIP): use netlify function to upload to IPFS
alcercu Jan 27, 2023
2992042
fix(web): add headers to estuary query
alcercu Jan 27, 2023
316f1f8
feat(subgraph): use numberOfChoices to model the length of arrays
alcercu Jan 17, 2023
47bb658
chore(subgraph): update subgraph.yaml and clean schema
alcercu Jan 17, 2023
beedffa
fix(subgraph): set non-nullable field totalStake when creating user
alcercu Jan 23, 2023
e1a6d1d
fix(subgraph): improve datapoint updates
alcercu Jan 23, 2023
146d46b
fix(subgraph): bad argument order
alcercu Jan 23, 2023
d3f1cbb
refactor(subgraph): fix code smells
alcercu Jan 23, 2023
a29a255
fix(subgraph): wrong court PNK redistribution
alcercu Jan 27, 2023
dd61932
fix(subgraph): correctly update counts and winningchoice
alcercu Jan 27, 2023
2eb12e3
fix(web): incorrect appeal countdown
alcercu Jan 27, 2023
c381b0d
fix(web): fund button ask to connect
alcercu Jan 27, 2023
922d87d
feat(web): add refuse to arbitrate funding option
alcercu Jan 27, 2023
e584b03
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
alcercu Jan 27, 2023
c5877c2
fix(web): voting history
alcercu Jan 27, 2023
1a3bbea
chore(web): add favicon and browser tab name, metadata
gratestas Jan 27, 2023
02941a7
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
gratestas Jan 27, 2023
17696d8
refactor(web): hide any tab that has empty content (court description)
gratestas Jan 27, 2023
13ef142
fix(IMetaevidence): remove evidence
unknownunknown1 Jan 22, 2023
60004e5
chore(web): change stake modal title
gratestas Jan 30, 2023
70e5bff
fix(web): add support for decoding base64-encoded payload into its bi…
gratestas Jan 30, 2023
f7f5936
feat(web): add toast notifications for user actions
alcercu Jan 30, 2023
ea7294f
chore(web): delete .netlify folder
alcercu Jan 30, 2023
3df3dae
refactor(web): ready to merge
alcercu Jan 30, 2023
f73878f
refactor(web): remove unnecessary async
alcercu Jan 30, 2023
e92eaa0
Merge branch 'feat(web)/demo-staging' into feat(web)/estuary-netlify-…
alcercu Jan 30, 2023
3c0dc2e
refactor(web): extract IPFS upload code
alcercu Jan 30, 2023
02c7ee8
feat: scripts improved to support court and policy registry populatio…
jaybuidl Jan 30, 2023
b966dd3
fix(web): reject upload promise if failed
alcercu Jan 30, 2023
bae4b5c
Merge branch 'feat(web)/demo-staging' into feat(web)/estuary-netlify-…
alcercu Jan 30, 2023
3c73f4e
refactor(web): fix sonarclound smells
alcercu Jan 30, 2023
247ff22
Merge branch 'feat(web)/estuary-netlify-function' of github.com:klero…
alcercu Jan 30, 2023
b97dfe1
fix(web): correct promise typing
alcercu Jan 30, 2023
de756fd
fix(web): change test value
alcercu Jan 30, 2023
652761f
Merge pull request #539 from kleros/feat(web)/estuary-netlify-function
alcercu Jan 30, 2023
4e90b12
fix(web): update netlify.toml
alcercu Jan 30, 2023
18834af
feat(xKlerosLiquid): upgrade for v2
unknownunknown1 Jan 30, 2023
91846bd
fix(web/temporary): use cloudflare gateway for evidences
alcercu Jan 30, 2023
4318e56
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
alcercu Jan 30, 2023
5e6af7f
fix(web): remove attachment icon if there is no attachment
alcercu Jan 30, 2023
cffd71e
fix: issue #537 Policies: use better markdown formatting
Params10 Jan 30, 2023
49bb4bf
feat: added chiado network
jaybuidl Jan 31, 2023
dffe8bf
fix(subgraph): correctly derive votes field in classic round
alcercu Jan 27, 2023
e25a08d
feat: added ruling event on the arbitrator side to help with subgraph…
jaybuidl Jan 27, 2023
03c9aba
test: expecting a ruling event emitted by KlerosCore
jaybuidl Jan 27, 2023
4df5ae8
chore: explicit vea-contracts version
jaybuidl Jan 31, 2023
d9ee8a8
refactor: better separation between v2, v1 ethereum and v1 xdai inter…
jaybuidl Jan 31, 2023
f9d70b3
fix(web): update header kleros icon
alcercu Jan 31, 2023
6fbf7d3
Merge pull request #554 from kleros/fix(web)/update-header-icon
alcercu Jan 31, 2023
da60490
fix(xLiquid): small fixes
unknownunknown1 Feb 1, 2023
b7f4190
fix(xLiquid): simplification
unknownunknown1 Feb 1, 2023
2bbf87e
fix(xLiquid): jb's feedback
unknownunknown1 Feb 1, 2023
450a2cb
chore: arbitrator redeployment, initialized the general court from Gn…
jaybuidl Feb 1, 2023
cf0e915
refactor(web/WIP): simplify classic appeal code
alcercu Feb 2, 2023
08ccf6b
Merge branch 'feat(web)/demo-staging' into refactor(web/WIP)/simplify…
alcercu Feb 3, 2023
8da2248
feat(subgraph): handle new Ruling event
alcercu Jan 31, 2023
43b803e
fix(subgraph): correctly stringify evidence group id
alcercu Jan 31, 2023
994083a
fix(subgraph): event definition subgraph config
alcercu Feb 3, 2023
080273a
fix(subgraph): update contract addresses
alcercu Feb 3, 2023
8d2845b
chore(subgraph): update start blocks
alcercu Feb 3, 2023
c23dde6
fix(web): use only cloudflare's gateway
alcercu Feb 3, 2023
180bfbd
fix(web): add placeholder when there are no cases
alcercu Feb 3, 2023
37fd1da
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
alcercu Feb 3, 2023
e2055b4
feat(web): add useJurorBalance hook
gratestas Feb 3, 2023
3bd4a89
feat(web): add stake panel in Court page
gratestas Feb 3, 2023
e4fb2fd
feat: chiado deployment scripts (WIP)
jaybuidl Feb 1, 2023
e70f3c1
chore: generated artifacts for existing contracts
jaybuidl Feb 1, 2023
3b3c3f0
chore: extra env variable
jaybuidl Feb 1, 2023
42b9e2b
chore: added goerli network
jaybuidl Feb 1, 2023
421141c
chore: vea-contracts bumped
jaybuidl Feb 3, 2023
9875d89
refactor: moved token folder
jaybuidl Feb 3, 2023
f14971b
chore: gateways deployment to ArbitrumGoerli and Chiado
jaybuidl Feb 3, 2023
c87ee68
docs: added contract addresses
jaybuidl Feb 3, 2023
f39a909
chore: deployment of xKlerosLiquidV2 and wrapped pnk
jaybuidl Feb 3, 2023
c42250e
style(web): add grid layout to court stats
gratestas Feb 4, 2023
12b6ca9
refactor(web): extract reusable Field component
gratestas Feb 4, 2023
ebe4b3e
feat(web): add Tag component
gratestas Feb 4, 2023
30ce832
style(web): add more space b/w tabs and text container (court details)
gratestas Feb 4, 2023
b0303ff
Merged 'master' branch into 'feat(web)/demo-staging'
gratestas Feb 4, 2023
0100874
refactor(web): refactor useJurorBalance hook
gratestas Feb 4, 2023
df8fbf5
refactor(web): refactor JurorStakeDispaly component
gratestas Feb 4, 2023
091300f
style(web): add pointer cursor to 'Stake/Withdraw all' label
gratestas Feb 4, 2023
d6ae64e
fix(web): change input args of swr mutate function to trigger validat…
gratestas Feb 4, 2023
a013f2a
fix(web): add theme styling to text in stake panel
gratestas Feb 4, 2023
76c97b4
refactor(web): remove junk className prop from hr tag
gratestas Feb 4, 2023
a67a7db
feat(web): improve winning option card style
alcercu Feb 6, 2023
239373f
Merge branch 'feat(web)/demo-staging' into refactor(web/WIP)/simplify…
alcercu Feb 6, 2023
475fde1
fix(web): useMemo to avoid rerenders
alcercu Feb 6, 2023
781db89
Merge branch 'refactor(web/WIP)/simplify-classic-appeal' of github.co…
alcercu Feb 6, 2023
95b1df0
Merge pull request #562 from kleros/refactor(web/WIP)/simplify-classi…
alcercu Feb 6, 2023
a112c7c
style(web): make court page mobile friendly
alcercu Feb 6, 2023
34a2e88
chore: improved handling of WETH by the arbitrable, randomizer fixed …
jaybuidl Feb 7, 2023
d62b362
fix(web): remove meaningless $ amount under cases and active jurors
alcercu Feb 7, 2023
a20aab8
fix(web): use cloudflare gateway for the links too
alcercu Feb 7, 2023
e062fe4
fix(web): use cloudflare gateway to fetch metaevidence
alcercu Feb 7, 2023
ab2d7d7
fix(subgraph): rule update not being saved
alcercu Feb 7, 2023
faa6f14
fix(web): remove Done under period timeline
alcercu Feb 7, 2023
1ef14ca
fix(web): avoid Loading text when dispute is ruled
alcercu Feb 7, 2023
3d2b24d
fix(web): correct basis point value
alcercu Feb 7, 2023
4504fec
fix(web): stake amount is the sum of what was staked + input
alcercu Feb 7, 2023
6ad72d2
fix(web): style ul and li
alcercu Feb 7, 2023
e7cabea
feat: arbitrable metaevidence on chiado
jaybuidl Feb 7, 2023
47dd60d
fix: broken test fixture due to contract name conflict
jaybuidl Feb 7, 2023
800e447
feat: moved the estuary url in the Netlify function to an env variable
jaybuidl Feb 7, 2023
44ace65
fix: actions firewall for codeql analysis
jaybuidl Feb 7, 2023
637bb6c
chore(web): update ui-component package
alcercu Feb 7, 2023
208580c
fix(web): stake info message
alcercu Feb 7, 2023
707236d
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
alcercu Feb 7, 2023
60b0556
fix(web): temporary chiado hardcode
alcercu Feb 7, 2023
8db56c6
fix(web): remove meaningless $ amount under cases and active jurors
alcercu Feb 7, 2023
7d50ae8
fix(web): make sure home page doesn't wrap
alcercu Feb 7, 2023
fefe52d
fix: evidence id and arbitrable redeploy on chiado, upkeep scripts
jaybuidl Feb 7, 2023
2b632d7
fix(subgraph): correctly update counts and paidFees
alcercu Feb 7, 2023
b5bd615
fix(web): conditionally render fund menu
alcercu Feb 7, 2023
7a7aed2
Merge branch 'feat(web)/demo-staging' of github.com:kleros/kleros-v2 …
alcercu Feb 7, 2023
c8653b8
chore(web): update arbitrable address
alcercu Feb 7, 2023
5919577
fix(web): fix appeal costs
alcercu Feb 8, 2023
e89c629
fix(web): temporary fix chiado offset
alcercu Feb 8, 2023
163b0e4
fix(web): temporary fix chiado offset
alcercu Feb 8, 2023
338bb62
fix(web): temporary hardcode chiado arbitrable address
alcercu Feb 8, 2023
d40a8c2
fix(web): temporary hardcode pnk and eth value
alcercu Feb 8, 2023
87a07b5
fix(web): new chiado offset
alcercu Feb 8, 2023
6161219
chore(web): revert last commit
alcercu Feb 8, 2023
15c0aa8
fix(web): don't show voting menu if not on vote period
alcercu Feb 8, 2023
edcce59
chore: convenience console scripts
jaybuidl Feb 8, 2023
1d6081f
feat: sentry
jaybuidl Feb 15, 2023
4fe6ec1
chore: sentry release workflow
jaybuidl Feb 15, 2023
e24be9b
chore: script for sentry release
jaybuidl Feb 15, 2023
e1c0144
chore: tweak sentry version number
jaybuidl Feb 16, 2023
c07f3b2
chore: improved Sentry workflow
jaybuidl Feb 16, 2023
ecb6a12
chore: added rpc to foundry config
jaybuidl Feb 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
objects.githubusercontent.com:443
uploads.github.com:443
api.github.com:443
github.com:443
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/sentry-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Sentry Release

on:
workflow_dispatch:
push:
branches:
- master

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
release:
runs-on: ubuntu-latest
environment: Master
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
run: yarn workspace @kleros/kleros-v2-web install

- name: Build and deploy subgraph
run: yarn @kleros/kleros-v2-web build

- name: Set version
id: set-version
run: echo "version=v$(cat package.json | jq -r .version)-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
working-directory: web

- name: Create Sentry release
uses: getsentry/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
version: ${{ steps.set-version.outputs.version }}
sourcemaps: ./web/dist

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,6 @@ tags
# subgraph
subgraph/generated/*
subgraph/build/*

# Local Netlify folder
.netlify
1 change: 1 addition & 0 deletions contracts/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ INFURA_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
# If ETHERSCAN_API_KEY is set, it overrides any hardhat configuration.
ETHERSCAN_API_KEY_FIX=ABC123ABC123ABC123ABC123ABC123ABC1
ARBISCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
GNOSISSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1

# Optionally for debugging
# TENDERLY_USERNAME=your_username
Expand Down
1 change: 1 addition & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Hardhat files
cache
cache_hardhat
artifacts
coverage.json

Expand Down
68 changes: 54 additions & 14 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments

### v2-prealpha-3

#### Chiado

- [ArbitrableExample](https://blockscout.com/gnosis/chiado/address/0xc0fcc96BFd78e36550FCaB434A9EE1210B57225b)
- [ForeignGatewayOnGnosis](https://blockscout.com/gnosis/chiado/address/0x87142b7E9C7D026776499120D902AF8896C07894)
- [SortitionSumTreeFactory](https://blockscout.com/gnosis/chiado/address/0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636)
- [TokenBridge](https://blockscout.com/gnosis/chiado/address/0xbb3c86f9918C3C1d83668fA84e79E876d147fFf2)
- [WETH](https://blockscout.com/gnosis/chiado/address/0x014A442480DbAD767b7615E55E271799889FA1a7)
- [WETHFaucet](https://blockscout.com/gnosis/chiado/address/0x395014fddc3b12F9a78ED8E57DA162Fd77E12bE3)
- [WPNKFaucet](https://blockscout.com/gnosis/chiado/address/0x5898aeE045A25B276369914c3448B72a41758B2c)
- [WrappedPinakionV2](https://blockscout.com/gnosis/chiado/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd)
- [xKlerosLiquidV2](https://blockscout.com/gnosis/chiado/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879)

#### Goerli

- [PNK](https://goerli.etherscan.io/token/0xA3B02bA6E10F55fb177637917B1b472da0110CcC)
Expand All @@ -19,14 +31,15 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments

- [PNK](https://goerli.arbiscan.io/token/0x4DEeeFD054434bf6721eF39Aa18EfB3fd0D12610/token-transfers)
- [BlockHashRNG](https://goerli.arbiscan.io/address/0x68eE49dfD9d76f3386257a3D0e0A85c0A5519bBD)
- [DisputeKitClassic](https://goerli.arbiscan.io/address/0xde31F2245d164620d08f5b0f8D43dCe8B9708373)
- [DisputeResolver](https://goerli.arbiscan.io/address/0xa1f52474CFa1ee78758a4bBa35DE547133Bda62f)
- [DisputeKitClassic](https://goerli.arbiscan.io/address/0x86734488ABF0E1AD40bc4DE4F820e808f39Bea09)
- [DisputeResolver](https://goerli.arbiscan.io/address/0xDe3eCeB73C453E56F5661ad029a41341CF592b9A)
- [FastBridgeSender](https://goerli.arbiscan.io/address/0x4d18b9792e0D8F5aF696E71dBEDff8fcBEed6e8C)
- [HomeGatewayToEthereum](https://goerli.arbiscan.io/address/0xed12799915180a257985631fbD2ead261eD838cf)
- [KlerosCore](https://goerli.arbiscan.io/address/0x4d7858e73a8842b5e6422D08a3349924dD062AbB)
- [PolicyRegistry](https://goerli.arbiscan.io/address/0xAF0F49Fe110b48bd512F00d51D141F023c9a9106)
- [RandomizerRNG](https://goerli.arbiscan.io/address/0xb82D1eAD813C3a2E729F288276cc402343423Bad)
- [SortitionSumTreeFactory](https://goerli.arbiscan.io/address/0x40a78989317B953e427B3BD87C59eA003fcC2296)
- [HomeGatewayToGnosis](https://goerli.arbiscan.io/address/0x12613A66F1E5A2086374e103F66BF0eddA5d1478)
- [KlerosCore](https://goerli.arbiscan.io/address/0x3eED6aaCa43f4Bb98C591e4A0d2C4a124efF9C24)
- [PolicyRegistry](https://goerli.arbiscan.io/address/0xC5655728387Ce5E2aAA22138114E5777370aBDae)
- [RandomizerRNG](https://goerli.arbiscan.io/address/0xa2d1A3CDF0becEdb724e5A34De7022B6FF5e4787)
- [SortitionSumTreeFactoryV2](https://goerli.arbiscan.io/address/0x678E676fd0048da8c35d5B03fabB53a7beBf73A6)

## Getting Started

Expand Down Expand Up @@ -82,6 +95,7 @@ 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**.
- `GNOSISSCAN_API_KEY`: to verify the source of the newly deployed contracts on **Gnosis chain**.

#### 1. Update the Constructor Parameters (optional)

Expand All @@ -100,20 +114,25 @@ yarn hardhat node --tags nothing
**Shell 2: the deploy script**

```bash
yarn deploy --network localhost --tags <Arbitration|VeaMock>
yarn deploy --network localhost --tags <Arbitration|VeaMock|ForeignGatewayOnEthereum|HomeGateway>
```

#### 3. Deploy to Public Testnets

```bash
# ArbitrumGoerli to Chiado
yarn deploy --network arbitrumGoerli --tags Arbitration
yarn deploy --network chiado --tags ForeignGatewayOnGnosis
yarn deploy --network chiado --tags KlerosLiquidOnGnosis
yarn deploy --network arbitrumGoerli --tags HomeGatewayToGnosis

# Goerli
yarn deploy --network arbitrumGoerli --tags Arbitration
yarn deploy --network goerli --tags ForeignGateway
yarn deploy --network arbitrumGoerli --tags HomeGateway
yarn deploy --network goerli --tags ForeignGatewayOnEthereum
yarn deploy --network arbitrumGoerli --tags HomeGatewayToEthereum
```

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.
The deployed addresses should be displayed to the screen after the deployment is complete. If you missed them, you can always go to the `deployments/<network>` directory and look for the respective file.

#### Running Test Fixtures

Expand All @@ -134,7 +153,7 @@ yarn test --network localhost
This must be done for each network separately.

```bash
yarn etherscan-verify --network <arbitrumGoerli|arbitrumRinkeby|arbitrum|goerli|rinkeby|mainnet>
yarn etherscan-verify --network <arbitrumGoerli|arbitrum|chiado|gnosischain|goerli|mainnet>
```

## Ad-hoc procedures
Expand All @@ -144,12 +163,19 @@ yarn etherscan-verify --network <arbitrumGoerli|arbitrumRinkeby|arbitrum|goerli|
#### 1/ Export the registry data from V1

```bash
yarn hardhat run scripts/getPoliciesV1.ts --network mainnet | tee policies.v1.json
yarn hardhat run scripts/getCourtsV1.ts --network mainnet | tee courts.v1.json
for network in mainnet gnosischain
do
yarn hardhat run scripts/getPoliciesV1.ts --network $network | tee config/policies.v1.$network.json
yarn hardhat run scripts/getCourtsV1.ts --network $network | tee config/courts.v1.$network.json
done
```

#### 2/ Import the data to V2 - Local Network

:warning: By default this script populates from `*.mainnet.json`. To populate from `*.gnosischain.json`, set the variable `USE_GNOSIS` to true inside [scripts/populateCourts.ts](scripts/populateCourts.ts).

:warning: It is possible to switch to testnet-friendly court parameters by setting the variable `TESTING_PARAMETERS` to true inside [scripts/populateCourts.ts](scripts/populateCourts.ts).

Shell 1:

```bash
Expand All @@ -170,6 +196,20 @@ yarn hardhat run scripts/populatePolicyRegistry.ts --network arbitrumGoerli
yarn hardhat run scripts/populateCourts.ts --network arbitrumGoerli
```

### Generate deployment artifacts for existing contracts

#### Usage

```bash
scripts/generateDeploymentArtifact.sh <network> <address>
```

#### Example: WETH on Gnosis chain

```bash
scripts/generateDeploymentArtifact.sh gnosischain 0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9 > deployments/gnosischain/WETH.json
```

### Push the contracts to a Tenderly project

Ensure that your `$TENDERLY_PROJECT` and `$TENDERLY_USERNAME` is set correctly in `.env`.
Expand Down
Loading