-
Notifications
You must be signed in to change notification settings - Fork 51
Devnet redeployment #2046
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
Merged
Merged
Devnet redeployment #2046
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b8a2a15
chore: devnet contracts redeploy, tooling migration to etherscan v2 API
jaybuidl 5ef5f23
chore: artifacts refresh, contract getters to include the new dispute…
jaybuidl b5c639c
fix: implementation version
jaybuidl 1b9cc64
chore: devnet subgraphs redeployed to Alchemy
jaybuidl 222b832
chore: published @kleros/kleros-v2-contracts@0.10.0
jaybuidl 60a0a75
chore: rolling back shutter-sdk to v0.0.1 due to BLST issue in browser
jaybuidl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,109 @@ | ||
## Clean up of the old artifacts | ||
|
||
The following contracts have been preserved: | ||
|
||
- The University contracts (out-of-scope for now) | ||
- The ERC20 tokens and their faucets (unchanged): PinakionV2, PNK, PNKFaucet, DAI, DAIFaucet, WETH, WETHFaucet | ||
- The RNG contracts (unchanged): RandomizerOracle, BlockHashRNG, ChainlinkRNG, ChainlinkVRFCoordinator (mock) | ||
- KlerosV2NeoEarlyUser (unchanged, for Neo devnet) | ||
|
||
```shell | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitGated_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitGated.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeResolver.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/EvidenceModule.json | ||
rm deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/KlerosCore.json | ||
rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json | ||
rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json | ||
rm deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/PolicyRegistry.json | ||
rm deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json | ||
rm deployments/arbitrumSepoliaDevnet/SortitionModule.json | ||
rm deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json | ||
rm deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json | ||
``` | ||
|
||
## Contracts Deployment - DRY RUN | ||
|
||
Shell 1: fork node | ||
|
||
```shell | ||
anvil --fork-url https://sepolia-rollup.arbitrum.io/rpc | ||
``` | ||
|
||
Shell 2: deployer | ||
|
||
```shell | ||
export ARBITRUM_SEPOLIA_RPC=http://127.0.0.1:8545 | ||
|
||
yarn clean | ||
yarn deploy --network arbitrumSepoliaDevnet --tags Resolver | ||
yarn deploy --network arbitrumSepoliaDevnet --tags ArbitrationRuler | ||
|
||
unset ARBITRUM_SEPOLIA_RPC | ||
``` | ||
|
||
:warning: Remember to delete all the deployed artifacts after each dry run. | ||
|
||
## Contracts Deployment - LIVE | ||
|
||
```shell | ||
yarn clean | ||
yarn deploy --network arbitrumSepoliaDevnet --tags Resolver | ||
yarn deploy --network arbitrumSepoliaDevnet --tags ArbitrationRuler | ||
|
||
# Contracts verification, marking proxies | ||
yarn etherscan-verify --network arbitrumSepoliaDevnet | ||
yarn etherscan-verify-proxies | ||
|
||
# Docs update | ||
./scripts/populateReadme.sh | ||
``` | ||
|
||
## Courts structure and policies configuration | ||
|
||
```shell | ||
yarn hardhat populate:courts --from v2_devnet --network arbitrumSepoliaDevnet | ||
|
||
yarn hardhat populate:policy-registry --from v2_devnet --network arbitrumSepoliaDevnet | ||
``` | ||
|
||
## Contracts SDK | ||
|
||
### Refresh the artifacts | ||
|
||
```shell | ||
# Viem artifacts | ||
yarn viem:generate-devnet | ||
|
||
# Hardhat artifacts | ||
yarn export:devnet | ||
``` | ||
|
||
### Update the contract helpers | ||
|
||
If there are new or removed contracts, edit the contract helpers in: | ||
|
||
- `scripts/utils/contracts.ts` (Hardhat runtime) | ||
- `deployments/contractsEthers.ts` (pure EthersJS) | ||
- `deployments/contractsViem.ts` (pure Viem) |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Make the fork network id explicit to avoid Anvil/Arbitrum mismatch
Arbitrum Sepolia uses chain-id
421614
.Anvil occasionally defaults to
31337
, breaking signature replay & EIP-1559 gas math.and propagate the id in
hardhat.config.ts
’snetworks.arbitrumSepoliaDevnet
.🏁 Script executed:
Length of output: 171
To confirm whether the fork chain ID is already set in your Hardhat configuration, let’s locate and inspect your
hardhat.config.ts
:🏁 Script executed:
Length of output: 262
Let’s inspect the
contracts/hardhat.config.ts
to see ifchainId
is already specified for thearbitrumSepoliaDevnet
network:🏁 Script executed:
Length of output: 5268
Explicitly set the fork chain ID in DEVNET_REDEPLOY.md
The Hardhat config already defines
chainId: 421614
forarbitrumSepoliaDevnet
, so no updates are needed there.Please update
contracts/DEVNET_REDEPLOY.md
to pin the fork’s chain ID:📝 Committable suggestion
🤖 Prompt for AI Agents