Skip to content

Commit 9cd4a9a

Browse files
committed
chore: contract npm release, transaction batcher deploy script refactored
1 parent 9d672a9 commit 9cd4a9a

12 files changed

+2723
-668
lines changed

contracts/deploy/00-home-chain-arbitration-neo.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
2323
const weth = await deployERC20AndFaucet(hre, deployer, "WETH");
2424
const nft = await deployERC721(hre, deployer, "Kleros V2 Neo Early User", "KlerosV2NeoEarlyUser");
2525

26+
await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });
27+
2628
const randomizerOracle = await getContractOrDeploy(hre, "RandomizerOracle", {
2729
from: deployer,
2830
contract: "RandomizerMock",

contracts/deploy/00-home-chain-arbitration-ruler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { DeployFunction } from "hardhat-deploy/types";
33
import { deployUpgradable } from "./utils/deployUpgradable";
44
import { HomeChains, isSkipped } from "./utils";
55
import { deployERC20AndFaucet } from "./utils/deployTokens";
6-
import { KlerosCore, KlerosCoreRuler } from "../typechain-types";
7-
import { getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
6+
import { KlerosCoreRuler } from "../typechain-types";
7+
import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
88
import { changeCurrencyRate } from "./utils/klerosCoreHelper";
99

1010
const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
@@ -20,6 +20,8 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
2020
const dai = await deployERC20AndFaucet(hre, deployer, "DAI");
2121
const weth = await deployERC20AndFaucet(hre, deployer, "WETH");
2222

23+
await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });
24+
2325
const minStake = 0;
2426
const alpha = 10000;
2527
const feeForJuror = 10n ** 17n;

contracts/deploy/00-home-chain-arbitration-university.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { changeCurrencyRate } from "./utils/klerosCoreHelper";
66
import { ETH, HomeChains, PNK, isSkipped } from "./utils";
77
import { deployERC20AndFaucet } from "./utils/deployTokens";
88
import { DisputeKitClassic, KlerosCore, KlerosCoreUniversity } from "../typechain-types";
9-
import { getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
9+
import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
1010

1111
const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
1212
const { ethers, deployments, getNamedAccounts, getChainId } = hre;
@@ -22,6 +22,8 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
2222
const dai = await deployERC20AndFaucet(hre, deployer, "DAI");
2323
const weth = await deployERC20AndFaucet(hre, deployer, "WETH");
2424

25+
await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });
26+
2527
const disputeKit = await deployUpgradable(deployments, "DisputeKitClassicUniversity", {
2628
from: deployer,
2729
contract: "DisputeKitClassic",

contracts/deploy/00-home-chain-arbitration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
2222
const dai = await deployERC20AndFaucet(hre, deployer, "DAI");
2323
const weth = await deployERC20AndFaucet(hre, deployer, "WETH");
2424

25+
await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });
26+
2527
await getContractOrDeployUpgradable(hre, "PolicyRegistry", { from: deployer, args: [deployer], log: true });
2628

2729
await getContractOrDeployUpgradable(hre, "EvidenceModule", { from: deployer, args: [deployer], log: true });

contracts/deploy/00-transaction-batcher.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

contracts/deploy/utils/getContractOrDeploy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { DeployOptions } from "hardhat-deploy/types";
22
import { HardhatRuntimeEnvironment } from "hardhat/types";
33
import { deployUpgradable } from "./deployUpgradable";
44
import { Contract } from "ethers";
5+
56
export const getContractOrDeploy = async (
67
hre: HardhatRuntimeEnvironment,
78
contractName: string,

contracts/deployments/arbitrum.ts

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ export default {
24122412
],
24132413
},
24142414
DisputeResolverNeo: {
2415-
address: "0x95eCE455bD817D6adB92F2383617d36eBE10D6EB",
2415+
address: "0x3645F9e08D80E47c82aD9E33fCB4EA703822C831",
24162416
abi: [
24172417
{
24182418
inputs: [
@@ -2442,7 +2442,7 @@ export default {
24422442
{
24432443
indexed: true,
24442444
internalType: "uint256",
2445-
name: "_arbitrableDisputeID",
2445+
name: "_arbitratorDisputeID",
24462446
type: "uint256",
24472447
},
24482448
{
@@ -12144,6 +12144,57 @@ export default {
1214412144
},
1214512145
],
1214612146
},
12147+
TransactionBatcher: {
12148+
address: "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF",
12149+
abi: [
12150+
{
12151+
inputs: [
12152+
{
12153+
internalType: "address[]",
12154+
name: "targets",
12155+
type: "address[]",
12156+
},
12157+
{
12158+
internalType: "uint256[]",
12159+
name: "values",
12160+
type: "uint256[]",
12161+
},
12162+
{
12163+
internalType: "bytes[]",
12164+
name: "datas",
12165+
type: "bytes[]",
12166+
},
12167+
],
12168+
name: "batchSend",
12169+
outputs: [],
12170+
stateMutability: "payable",
12171+
type: "function",
12172+
},
12173+
{
12174+
inputs: [
12175+
{
12176+
internalType: "address[]",
12177+
name: "targets",
12178+
type: "address[]",
12179+
},
12180+
{
12181+
internalType: "uint256[]",
12182+
name: "values",
12183+
type: "uint256[]",
12184+
},
12185+
{
12186+
internalType: "bytes[]",
12187+
name: "datas",
12188+
type: "bytes[]",
12189+
},
12190+
],
12191+
name: "batchSendUnchecked",
12192+
outputs: [],
12193+
stateMutability: "payable",
12194+
type: "function",
12195+
},
12196+
],
12197+
},
1214712198
WETH: {
1214812199
address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
1214912200
abi: [

0 commit comments

Comments
 (0)