Skip to content

Commit

Permalink
chore: contract npm release, transaction batcher deploy script refact…
Browse files Browse the repository at this point in the history
…ored
  • Loading branch information
jaybuidl committed Nov 7, 2024
1 parent 9d672a9 commit 9cd4a9a
Show file tree
Hide file tree
Showing 12 changed files with 2,723 additions and 668 deletions.
2 changes: 2 additions & 0 deletions contracts/deploy/00-home-chain-arbitration-neo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
const weth = await deployERC20AndFaucet(hre, deployer, "WETH");
const nft = await deployERC721(hre, deployer, "Kleros V2 Neo Early User", "KlerosV2NeoEarlyUser");

await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });

const randomizerOracle = await getContractOrDeploy(hre, "RandomizerOracle", {
from: deployer,
contract: "RandomizerMock",
Expand Down
6 changes: 4 additions & 2 deletions contracts/deploy/00-home-chain-arbitration-ruler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { DeployFunction } from "hardhat-deploy/types";
import { deployUpgradable } from "./utils/deployUpgradable";
import { HomeChains, isSkipped } from "./utils";
import { deployERC20AndFaucet } from "./utils/deployTokens";
import { KlerosCore, KlerosCoreRuler } from "../typechain-types";
import { getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
import { KlerosCoreRuler } from "../typechain-types";
import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
import { changeCurrencyRate } from "./utils/klerosCoreHelper";

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

await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });

const minStake = 0;
const alpha = 10000;
const feeForJuror = 10n ** 17n;
Expand Down
4 changes: 3 additions & 1 deletion contracts/deploy/00-home-chain-arbitration-university.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { changeCurrencyRate } from "./utils/klerosCoreHelper";
import { ETH, HomeChains, PNK, isSkipped } from "./utils";
import { deployERC20AndFaucet } from "./utils/deployTokens";
import { DisputeKitClassic, KlerosCore, KlerosCoreUniversity } from "../typechain-types";
import { getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";

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

await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });

const disputeKit = await deployUpgradable(deployments, "DisputeKitClassicUniversity", {
from: deployer,
contract: "DisputeKitClassic",
Expand Down
2 changes: 2 additions & 0 deletions contracts/deploy/00-home-chain-arbitration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
const dai = await deployERC20AndFaucet(hre, deployer, "DAI");
const weth = await deployERC20AndFaucet(hre, deployer, "WETH");

await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true });

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

await getContractOrDeployUpgradable(hre, "EvidenceModule", { from: deployer, args: [deployer], log: true });
Expand Down
26 changes: 0 additions & 26 deletions contracts/deploy/00-transaction-batcher.ts

This file was deleted.

1 change: 1 addition & 0 deletions contracts/deploy/utils/getContractOrDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DeployOptions } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { deployUpgradable } from "./deployUpgradable";
import { Contract } from "ethers";

export const getContractOrDeploy = async (
hre: HardhatRuntimeEnvironment,
contractName: string,
Expand Down
55 changes: 53 additions & 2 deletions contracts/deployments/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2412,7 +2412,7 @@ export default {
],
},
DisputeResolverNeo: {
address: "0x95eCE455bD817D6adB92F2383617d36eBE10D6EB",
address: "0x3645F9e08D80E47c82aD9E33fCB4EA703822C831",
abi: [
{
inputs: [
Expand Down Expand Up @@ -2442,7 +2442,7 @@ export default {
{
indexed: true,
internalType: "uint256",
name: "_arbitrableDisputeID",
name: "_arbitratorDisputeID",
type: "uint256",
},
{
Expand Down Expand Up @@ -12144,6 +12144,57 @@ export default {
},
],
},
TransactionBatcher: {
address: "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF",
abi: [
{
inputs: [
{
internalType: "address[]",
name: "targets",
type: "address[]",
},
{
internalType: "uint256[]",
name: "values",
type: "uint256[]",
},
{
internalType: "bytes[]",
name: "datas",
type: "bytes[]",
},
],
name: "batchSend",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "address[]",
name: "targets",
type: "address[]",
},
{
internalType: "uint256[]",
name: "values",
type: "uint256[]",
},
{
internalType: "bytes[]",
name: "datas",
type: "bytes[]",
},
],
name: "batchSendUnchecked",
outputs: [],
stateMutability: "payable",
type: "function",
},
],
},
WETH: {
address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
abi: [
Expand Down
Loading

0 comments on commit 9cd4a9a

Please sign in to comment.