Skip to content

Commit

Permalink
chore: deploy scripts fixes and redeployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybuidl committed Jun 12, 2023
1 parent c9f12f0 commit 203a4cc
Show file tree
Hide file tree
Showing 28 changed files with 1,700 additions and 5,068 deletions.
2 changes: 1 addition & 1 deletion bot-pinner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Pinning of the court data to decentralized storage.",
"author": "Kleros",
"license": "MIT",
"packageManager": "yarn@3.1.0",
"packageManager": "yarn@3.3.1",
"volta": {
"node": "16.13.0"
},
Expand Down
24 changes: 11 additions & 13 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ Smart contracts for Kleros v2

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

### v2-prealpha-3
### v2-alpha-1

#### Chiado

- [ArbitrableExample](https://blockscout.com/gnosis/chiado/address/0xc0fcc96BFd78e36550FCaB434A9EE1210B57225b)
- [ForeignGatewayOnGnosis](https://blockscout.com/gnosis/chiado/address/0x87142b7E9C7D026776499120D902AF8896C07894)
- [ForeignGatewayOnGnosis](https://blockscout.com/gnosis/chiado/address/0x604E209B0f77aa85F30739987cA576B2f5d5ad5D)
- [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)
- [WETH](https://blockscout.com/gnosis/chiado/address/0x96f7C31EF5bac6710ADF201176298d61943Dde63)
- [WETHFaucet](https://blockscout.com/gnosis/chiado/address/0x73caC888997367Be196C978f20555e8F9DFF306c)
- [WPNKFaucet](https://blockscout.com/gnosis/chiado/address/0x5898aeE045A25B276369914c3448B72a41758B2c)
- [WrappedPinakionV2](https://blockscout.com/gnosis/chiado/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd)
- [xKlerosLiquidV2](https://blockscout.com/gnosis/chiado/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879)
Expand All @@ -24,21 +24,19 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments

- [PNK](https://goerli.etherscan.io/token/0xA3B02bA6E10F55fb177637917B1b472da0110CcC)
- [ArbitrableExample](https://goerli.etherscan.io/address/0xd78dcdde2c5a2bd4bb246bc7db6994b95f7c442c)
- [ForeignGatewayOnEthereum](https://goerli.etherscan.io/address/0x4401a368dea8d5761aeeffd3c4a674086dea0666)

#### Arbitrum Goerli

- [PNK](https://goerli.arbiscan.io/token/0x4DEeeFD054434bf6721eF39Aa18EfB3fd0D12610/token-transfers)
- [ArbitrableExampleEthFee](https://goerli.arbiscan.io/address/0x1fF31be1924f55804350ADe4945f3B3a6a2e15d2)
- [BlockHashRNG](https://goerli.arbiscan.io/address/0x68eE49dfD9d76f3386257a3D0e0A85c0A5519bBD)
- [DisputeKitClassic](https://goerli.arbiscan.io/address/0x0b24767Ae86Da2F5B442B2A524d3D9809CD0B5B2)
- [DisputeResolver](https://goerli.arbiscan.io/address/0x311eB7f0fcA3037DF4F02f2F3470d295228F474D)
- [HomeGatewayToEthereum](https://goerli.arbiscan.io/address/0xed12799915180a257985631fbD2ead261eD838cf)
- [HomeGatewayToGnosis](https://goerli.arbiscan.io/address/0x12613A66F1E5A2086374e103F66BF0eddA5d1478)
- [KlerosCore](https://goerli.arbiscan.io/address/0xD08Ab99480d02bf9C092828043f611BcDFEA917b)
- [PolicyRegistry](https://goerli.arbiscan.io/address/0xC5655728387Ce5E2aAA22138114E5777370aBDae)
- [RandomizerRNG](https://goerli.arbiscan.io/address/0x5145bde18F44513CfBa4906F07105b47674b0c94)
- [SortitionSumTreeFactoryV2](https://goerli.arbiscan.io/address/0x678E676fd0048da8c35d5B03fabB53a7beBf73A6)
- [DisputeKitClassic](https://goerli.arbiscan.io/address/0xE28206c91Cbb71652001AeB23c6763D4E4220466)
- [DisputeResolver](https://goerli.arbiscan.io/address/0xf6356Ff189C0fBDa4A1e8dB6BF24Dc66CfBa003B)
- [HomeGatewayToGnosis](https://goerli.arbiscan.io/address/0xD2655d9768DB42F4C98A9F51653a3f77Ec4493a3)
- [KlerosCore](https://goerli.arbiscan.io/address/0x720d566572aFA2D66abD2007e5aBa95a98E9f160)
- [PolicyRegistry](https://goerli.arbiscan.io/address/0xED503aBA65B28D81444294D1eAa5d84CeFdC2C58)
- [RandomizerRNG](https://goerli.arbiscan.io/address/0xa90f7D2e35718FDE9AD96c8B6667AFcAa4BEfd4d)
- [SortitionModule](https://goerli.arbiscan.io/address/0x13f368aEfdde142E3B3C7AE9271Ab0C5A0DdFe94)

## Getting Started

Expand Down
7 changes: 3 additions & 4 deletions contracts/deploy/00-rng.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { BigNumber } from "ethers";
import { DisputeKitClassic, RandomizerRNG } from "../typechain-types";
import { SortitionModule, RandomizerRNG } from "../typechain-types";

enum HomeChains {
ARBITRUM_ONE = 42161,
Expand Down Expand Up @@ -59,8 +58,8 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
log: true,
});

const disputeKit = (await hre.ethers.getContract("DisputeKitClassic")) as DisputeKitClassic;
await disputeKit.changeRandomNumberGenerator(rng.address, RNG_LOOKAHEAD);
const sortitionModule = (await hre.ethers.getContract("SortitionModule")) as SortitionModule;
await sortitionModule.changeRandomNumberGenerator(rng.address, RNG_LOOKAHEAD);
};

deployArbitration.tags = ["RNG"];
Expand Down
6 changes: 3 additions & 3 deletions contracts/deploy/01-foreign-gateway-on-ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ const deployForeignGateway: DeployFunction = async (hre: HardhatRuntimeEnvironme
const homeGatewayAddress = getContractAddress(deployer, nonce);
console.log("Calculated future HomeGatewayToEthereum address for nonce %d: %s", nonce, homeGatewayAddress);

const veaReceiver = await deployments.get("VeaInboxArbToEthDevnet");
console.log("Using VeaInboxArbToEthDevnet at %s", veaReceiver.address);
const veaOutbox = await deployments.get("VeaOutboxArbToEthDevnet");
console.log("Using VeaOutboxArbToEthDevnet at %s", veaOutbox.address);

const foreignGateway = await deploy("ForeignGatewayOnEthereum", {
from: deployer,
contract: "ForeignGateway",
args: [deployer, veaReceiver.address, homeGatewayAddress, homeChainIdAsBytes32],
args: [deployer, veaOutbox.address, homeGatewayAddress, homeChainIdAsBytes32],
gasLimit: 4000000,
log: true,
});
Expand Down
6 changes: 3 additions & 3 deletions contracts/deploy/01-foreign-gateway-on-gnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const deployForeignGateway: DeployFunction = async (hre: HardhatRuntimeEnvironme
const homeGatewayAddress = getContractAddress(deployer, nonce); // HomeGateway deploy tx will be the next tx home network
console.log("Calculated future HomeGatewayToEthereum address for nonce %d: %s", nonce, homeGatewayAddress);

const veaReceiver = await deployments.get("VeaInboxArbToGnosisDevnet");
console.log("Using VeaInboxArbToGnosisDevnet at %s", veaReceiver.address);
const veaOutbox = await deployments.get("VeaOutboxArbToGnosisDevnet");
console.log("Using VeaOutboxArbToGnosisDevnet at %s", veaOutbox.address);

if (!wethByChain.get(chainId)) {
const weth = await deploy("WETH", {
Expand Down Expand Up @@ -68,7 +68,7 @@ const deployForeignGateway: DeployFunction = async (hre: HardhatRuntimeEnvironme
await deploy("ForeignGatewayOnGnosis", {
from: deployer,
contract: "ForeignGatewayOnGnosis",
args: [deployer, veaReceiver.address, homeGatewayAddress, homeChainIdAsBytes32, wethAddress],
args: [deployer, veaOutbox.address, homeGatewayAddress, homeChainIdAsBytes32, wethAddress],
log: true,
maxFeePerGas: ONE_GWEI,
maxPriorityFeePerGas: ONE_GWEI,
Expand Down
4 changes: 2 additions & 2 deletions contracts/deploy/02-home-gateway-to-ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment)
const chainId = Number(await getChainId());
console.log("Deploying to chainId %s with deployer %s", chainId, deployer);

const veaSender = await deployments.get("VeaOutboxArbToEthDevnet");
const veaInbox = await deployments.get("VeaInboxArbToEthDevnet");
const klerosCore = await deployments.get("KlerosCore");

const foreignGateway = await hre.companionNetworks.foreignGoerli.deployments.get("ForeignGatewayOnEthereum");
Expand All @@ -29,7 +29,7 @@ const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment)
await deploy("HomeGatewayToEthereum", {
from: deployer,
contract: "HomeGateway",
args: [deployer, klerosCore.address, veaSender.address, foreignGateway.address, foreignChainId],
args: [deployer, klerosCore.address, veaInbox.address, foreignGateway.address, foreignChainId],
log: true,
}); // nonce+0
};
Expand Down
4 changes: 2 additions & 2 deletions contracts/deploy/02-home-gateway-to-gnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment)
const chainId = Number(await getChainId());
console.log("Deploying to chainId %s with deployer %s", chainId, deployer);

const veaSender = await deployments.get("VeaOutboxArbToGnosisDevnet");
const veaInbox = await deployments.get("VeaInboxArbToGnosisDevnet");
const klerosCore = await deployments.get("KlerosCore");

const foreignGateway = await hre.companionNetworks.foreignChiado.deployments.get("ForeignGatewayOnGnosis");
Expand All @@ -28,7 +28,7 @@ const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment)
await deploy("HomeGatewayToGnosis", {
from: deployer,
contract: "HomeGateway",
args: [deployer, klerosCore.address, veaSender.address, foreignGateway.address, foreignChainId],
args: [deployer, klerosCore.address, veaInbox.address, foreignGateway.address, foreignChainId],
log: true,
}); // nonce+0
};
Expand Down
369 changes: 81 additions & 288 deletions contracts/deployments/arbitrumGoerli/DisputeKitClassic.json

Large diffs are not rendered by default.

76 changes: 51 additions & 25 deletions contracts/deployments/arbitrumGoerli/DisputeResolver.json

Large diffs are not rendered by default.

Loading

0 comments on commit 203a4cc

Please sign in to comment.