fix: new contract

This commit is contained in:
Danil Kovtonyuk 2021-11-16 18:03:07 +10:00 committed by 0xZick
parent 19c7593da1
commit 82e942694a
4 changed files with 629 additions and 43 deletions

View File

@ -40,6 +40,16 @@
"internalType": "address",
"name": "_governance",
"type": "address"
},
{
"internalType": "uint256",
"name": "_l1ChainId",
"type": "uint256"
},
{
"internalType": "address",
"name": "_multisig",
"type": "address"
}
],
"stateMutability": "nonpayable",
@ -167,6 +177,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ambBridge",
"outputs": [
{
"internalType": "contract IAMB",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
@ -254,19 +277,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "governance",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
@ -322,6 +332,19 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "isCalledByOwner",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
@ -425,6 +448,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "multisig",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "nextIndex",
@ -493,6 +529,119 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes",
"name": "proof",
"type": "bytes"
},
{
"internalType": "bytes32",
"name": "root",
"type": "bytes32"
},
{
"internalType": "bytes32[]",
"name": "inputNullifiers",
"type": "bytes32[]"
},
{
"internalType": "bytes32[2]",
"name": "outputCommitments",
"type": "bytes32[2]"
},
{
"internalType": "uint256",
"name": "publicAmount",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "extDataHash",
"type": "bytes32"
}
],
"internalType": "struct TornadoPool.Proof",
"name": "_args",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "int256",
"name": "extAmount",
"type": "int256"
},
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "encryptedOutput1",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "encryptedOutput2",
"type": "bytes"
},
{
"internalType": "bool",
"name": "isL1Withdrawal",
"type": "bool"
}
],
"internalType": "struct TornadoPool.ExtData",
"name": "_extData",
"type": "tuple"
}
],
"name": "onTransact",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ownerChainId",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
@ -622,6 +771,29 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC6777",
"name": "_token",
"type": "address"
},
{
"internalType": "address payable",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_balance",
"type": "uint256"
}
],
"name": "rescueTokens",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{

View File

@ -26,15 +26,16 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
"MAX_FEE()": FunctionFragment;
"ROOT_HISTORY_SIZE()": FunctionFragment;
"ZERO_VALUE()": FunctionFragment;
"ambBridge()": FunctionFragment;
"calculatePublicAmount(int256,uint256)": FunctionFragment;
"configureLimits(uint256,uint256)": FunctionFragment;
"currentRootIndex()": FunctionFragment;
"filledSubtrees(uint256)": FunctionFragment;
"getLastRoot()": FunctionFragment;
"governance()": FunctionFragment;
"hashLeftRight(bytes32,bytes32)": FunctionFragment;
"hasher()": FunctionFragment;
"initialize(uint256,uint256)": FunctionFragment;
"isCalledByOwner()": FunctionFragment;
"isKnownRoot(bytes32)": FunctionFragment;
"isSpent(bytes32)": FunctionFragment;
"l1Unwrapper()": FunctionFragment;
@ -42,12 +43,17 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
"levels()": FunctionFragment;
"maximumDepositAmount()": FunctionFragment;
"minimalWithdrawalAmount()": FunctionFragment;
"multisig()": FunctionFragment;
"nextIndex()": FunctionFragment;
"nullifierHashes(bytes32)": FunctionFragment;
"omniBridge()": FunctionFragment;
"onTokenBridged(address,uint256,bytes)": FunctionFragment;
"onTransact(tuple,tuple)": FunctionFragment;
"owner()": FunctionFragment;
"ownerChainId()": FunctionFragment;
"register(tuple)": FunctionFragment;
"registerAndTransact(tuple,tuple,tuple)": FunctionFragment;
"rescueTokens(address,address,uint256)": FunctionFragment;
"roots(uint256)": FunctionFragment;
"token()": FunctionFragment;
"transact(tuple,tuple)": FunctionFragment;
@ -74,6 +80,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "ZERO_VALUE",
values?: undefined
): string;
encodeFunctionData(functionFragment: "ambBridge", values?: undefined): string;
encodeFunctionData(
functionFragment: "calculatePublicAmount",
values: [BigNumberish, BigNumberish]
@ -94,10 +101,6 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "getLastRoot",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "governance",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "hashLeftRight",
values: [BytesLike, BytesLike]
@ -107,6 +110,10 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "initialize",
values: [BigNumberish, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "isCalledByOwner",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "isKnownRoot",
values: [BytesLike]
@ -129,6 +136,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "minimalWithdrawalAmount",
values?: undefined
): string;
encodeFunctionData(functionFragment: "multisig", values?: undefined): string;
encodeFunctionData(functionFragment: "nextIndex", values?: undefined): string;
encodeFunctionData(
functionFragment: "nullifierHashes",
@ -142,6 +150,33 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "onTokenBridged",
values: [string, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "onTransact",
values: [
{
proof: BytesLike;
root: BytesLike;
inputNullifiers: BytesLike[];
outputCommitments: [BytesLike, BytesLike];
publicAmount: BigNumberish;
extDataHash: BytesLike;
},
{
recipient: string;
extAmount: BigNumberish;
relayer: string;
fee: BigNumberish;
encryptedOutput1: BytesLike;
encryptedOutput2: BytesLike;
isL1Withdrawal: boolean;
}
]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "ownerChainId",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "register",
values: [{ owner: string; publicKey: BytesLike }]
@ -169,6 +204,10 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
}
]
): string;
encodeFunctionData(
functionFragment: "rescueTokens",
values: [string, string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "roots", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "token", values?: undefined): string;
encodeFunctionData(
@ -224,6 +263,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "ZERO_VALUE", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "ambBridge", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "calculatePublicAmount",
data: BytesLike
@ -244,13 +284,16 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "getLastRoot",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "governance", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "hashLeftRight",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "hasher", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "isCalledByOwner",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "isKnownRoot",
data: BytesLike
@ -273,6 +316,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "minimalWithdrawalAmount",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "multisig", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nextIndex", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "nullifierHashes",
@ -283,11 +327,21 @@ interface TornadoPoolInterface extends ethers.utils.Interface {
functionFragment: "onTokenBridged",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "onTransact", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "ownerChainId",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "register", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "registerAndTransact",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "rescueTokens",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "roots", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "token", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transact", data: BytesLike): Result;
@ -364,6 +418,8 @@ export class TornadoPool extends BaseContract {
ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>;
ambBridge(overrides?: CallOverrides): Promise<[string]>;
calculatePublicAmount(
_extAmount: BigNumberish,
_fee: BigNumberish,
@ -385,8 +441,6 @@ export class TornadoPool extends BaseContract {
getLastRoot(overrides?: CallOverrides): Promise<[string]>;
governance(overrides?: CallOverrides): Promise<[string]>;
hashLeftRight(
_left: BytesLike,
_right: BytesLike,
@ -401,6 +455,10 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
isCalledByOwner(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
isKnownRoot(
_root: BytesLike,
overrides?: CallOverrides
@ -421,6 +479,8 @@ export class TornadoPool extends BaseContract {
minimalWithdrawalAmount(overrides?: CallOverrides): Promise<[BigNumber]>;
multisig(overrides?: CallOverrides): Promise<[string]>;
nextIndex(overrides?: CallOverrides): Promise<[number]>;
nullifierHashes(
@ -437,6 +497,31 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onTransact(
_args: {
proof: BytesLike;
root: BytesLike;
inputNullifiers: BytesLike[];
outputCommitments: [BytesLike, BytesLike];
publicAmount: BigNumberish;
extDataHash: BytesLike;
},
_extData: {
recipient: string;
extAmount: BigNumberish;
relayer: string;
fee: BigNumberish;
encryptedOutput1: BytesLike;
encryptedOutput2: BytesLike;
isL1Withdrawal: boolean;
},
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
owner(overrides?: CallOverrides): Promise<[string]>;
ownerChainId(overrides?: CallOverrides): Promise<[string]>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
@ -464,6 +549,13 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
rescueTokens(
_token: string,
_to: string,
_balance: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
token(overrides?: CallOverrides): Promise<[string]>;
@ -518,6 +610,8 @@ export class TornadoPool extends BaseContract {
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
ambBridge(overrides?: CallOverrides): Promise<string>;
calculatePublicAmount(
_extAmount: BigNumberish,
_fee: BigNumberish,
@ -539,8 +633,6 @@ export class TornadoPool extends BaseContract {
getLastRoot(overrides?: CallOverrides): Promise<string>;
governance(overrides?: CallOverrides): Promise<string>;
hashLeftRight(
_left: BytesLike,
_right: BytesLike,
@ -555,6 +647,10 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
isCalledByOwner(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
isSpent(
@ -572,6 +668,8 @@ export class TornadoPool extends BaseContract {
minimalWithdrawalAmount(overrides?: CallOverrides): Promise<BigNumber>;
multisig(overrides?: CallOverrides): Promise<string>;
nextIndex(overrides?: CallOverrides): Promise<number>;
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
@ -585,6 +683,31 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onTransact(
_args: {
proof: BytesLike;
root: BytesLike;
inputNullifiers: BytesLike[];
outputCommitments: [BytesLike, BytesLike];
publicAmount: BigNumberish;
extDataHash: BytesLike;
},
_extData: {
recipient: string;
extAmount: BigNumberish;
relayer: string;
fee: BigNumberish;
encryptedOutput1: BytesLike;
encryptedOutput2: BytesLike;
isL1Withdrawal: boolean;
},
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
owner(overrides?: CallOverrides): Promise<string>;
ownerChainId(overrides?: CallOverrides): Promise<string>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
@ -612,6 +735,13 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
rescueTokens(
_token: string,
_to: string,
_balance: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
token(overrides?: CallOverrides): Promise<string>;
@ -666,6 +796,8 @@ export class TornadoPool extends BaseContract {
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
ambBridge(overrides?: CallOverrides): Promise<string>;
calculatePublicAmount(
_extAmount: BigNumberish,
_fee: BigNumberish,
@ -687,8 +819,6 @@ export class TornadoPool extends BaseContract {
getLastRoot(overrides?: CallOverrides): Promise<string>;
governance(overrides?: CallOverrides): Promise<string>;
hashLeftRight(
_left: BytesLike,
_right: BytesLike,
@ -703,6 +833,8 @@ export class TornadoPool extends BaseContract {
overrides?: CallOverrides
): Promise<void>;
isCalledByOwner(overrides?: CallOverrides): Promise<boolean>;
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
isSpent(
@ -720,6 +852,8 @@ export class TornadoPool extends BaseContract {
minimalWithdrawalAmount(overrides?: CallOverrides): Promise<BigNumber>;
multisig(overrides?: CallOverrides): Promise<string>;
nextIndex(overrides?: CallOverrides): Promise<number>;
nullifierHashes(
@ -736,6 +870,31 @@ export class TornadoPool extends BaseContract {
overrides?: CallOverrides
): Promise<void>;
onTransact(
_args: {
proof: BytesLike;
root: BytesLike;
inputNullifiers: BytesLike[];
outputCommitments: [BytesLike, BytesLike];
publicAmount: BigNumberish;
extDataHash: BytesLike;
},
_extData: {
recipient: string;
extAmount: BigNumberish;
relayer: string;
fee: BigNumberish;
encryptedOutput1: BytesLike;
encryptedOutput2: BytesLike;
isL1Withdrawal: boolean;
},
overrides?: CallOverrides
): Promise<void>;
owner(overrides?: CallOverrides): Promise<string>;
ownerChainId(overrides?: CallOverrides): Promise<string>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: CallOverrides
@ -763,6 +922,13 @@ export class TornadoPool extends BaseContract {
overrides?: CallOverrides
): Promise<void>;
rescueTokens(
_token: string,
_to: string,
_balance: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
token(overrides?: CallOverrides): Promise<string>;
@ -838,6 +1004,8 @@ export class TornadoPool extends BaseContract {
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
ambBridge(overrides?: CallOverrides): Promise<BigNumber>;
calculatePublicAmount(
_extAmount: BigNumberish,
_fee: BigNumberish,
@ -859,8 +1027,6 @@ export class TornadoPool extends BaseContract {
getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;
governance(overrides?: CallOverrides): Promise<BigNumber>;
hashLeftRight(
_left: BytesLike,
_right: BytesLike,
@ -875,6 +1041,10 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
isCalledByOwner(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
isKnownRoot(
_root: BytesLike,
overrides?: CallOverrides
@ -895,6 +1065,8 @@ export class TornadoPool extends BaseContract {
minimalWithdrawalAmount(overrides?: CallOverrides): Promise<BigNumber>;
multisig(overrides?: CallOverrides): Promise<BigNumber>;
nextIndex(overrides?: CallOverrides): Promise<BigNumber>;
nullifierHashes(
@ -911,6 +1083,31 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
onTransact(
_args: {
proof: BytesLike;
root: BytesLike;
inputNullifiers: BytesLike[];
outputCommitments: [BytesLike, BytesLike];
publicAmount: BigNumberish;
extDataHash: BytesLike;
},
_extData: {
recipient: string;
extAmount: BigNumberish;
relayer: string;
fee: BigNumberish;
encryptedOutput1: BytesLike;
encryptedOutput2: BytesLike;
isL1Withdrawal: boolean;
},
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
ownerChainId(overrides?: CallOverrides): Promise<BigNumber>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
@ -938,6 +1135,13 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
rescueTokens(
_token: string,
_to: string,
_balance: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
token(overrides?: CallOverrides): Promise<BigNumber>;
@ -993,6 +1197,8 @@ export class TornadoPool extends BaseContract {
ZERO_VALUE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
ambBridge(overrides?: CallOverrides): Promise<PopulatedTransaction>;
calculatePublicAmount(
_extAmount: BigNumberish,
_fee: BigNumberish,
@ -1014,8 +1220,6 @@ export class TornadoPool extends BaseContract {
getLastRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;
governance(overrides?: CallOverrides): Promise<PopulatedTransaction>;
hashLeftRight(
_left: BytesLike,
_right: BytesLike,
@ -1030,6 +1234,10 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
isCalledByOwner(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
isKnownRoot(
_root: BytesLike,
overrides?: CallOverrides
@ -1054,6 +1262,8 @@ export class TornadoPool extends BaseContract {
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
multisig(overrides?: CallOverrides): Promise<PopulatedTransaction>;
nextIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
nullifierHashes(
@ -1070,6 +1280,31 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
onTransact(
_args: {
proof: BytesLike;
root: BytesLike;
inputNullifiers: BytesLike[];
outputCommitments: [BytesLike, BytesLike];
publicAmount: BigNumberish;
extDataHash: BytesLike;
},
_extData: {
recipient: string;
extAmount: BigNumberish;
relayer: string;
fee: BigNumberish;
encryptedOutput1: BytesLike;
encryptedOutput2: BytesLike;
isL1Withdrawal: boolean;
},
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
ownerChainId(overrides?: CallOverrides): Promise<PopulatedTransaction>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
@ -1097,6 +1332,13 @@ export class TornadoPool extends BaseContract {
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
rescueTokens(
_token: string,
_to: string,
_balance: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
roots(
arg0: BigNumberish,
overrides?: CallOverrides

View File

@ -49,6 +49,16 @@ const _abi = [
name: "_governance",
type: "address",
},
{
internalType: "uint256",
name: "_l1ChainId",
type: "uint256",
},
{
internalType: "address",
name: "_multisig",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
@ -175,6 +185,19 @@ const _abi = [
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "ambBridge",
outputs: [
{
internalType: "contract IAMB",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
@ -262,19 +285,6 @@ const _abi = [
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "governance",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
@ -330,6 +340,19 @@ const _abi = [
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "isCalledByOwner",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
@ -433,6 +456,19 @@ const _abi = [
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "multisig",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "nextIndex",
@ -501,6 +537,119 @@ const _abi = [
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "bytes",
name: "proof",
type: "bytes",
},
{
internalType: "bytes32",
name: "root",
type: "bytes32",
},
{
internalType: "bytes32[]",
name: "inputNullifiers",
type: "bytes32[]",
},
{
internalType: "bytes32[2]",
name: "outputCommitments",
type: "bytes32[2]",
},
{
internalType: "uint256",
name: "publicAmount",
type: "uint256",
},
{
internalType: "bytes32",
name: "extDataHash",
type: "bytes32",
},
],
internalType: "struct TornadoPool.Proof",
name: "_args",
type: "tuple",
},
{
components: [
{
internalType: "address",
name: "recipient",
type: "address",
},
{
internalType: "int256",
name: "extAmount",
type: "int256",
},
{
internalType: "address",
name: "relayer",
type: "address",
},
{
internalType: "uint256",
name: "fee",
type: "uint256",
},
{
internalType: "bytes",
name: "encryptedOutput1",
type: "bytes",
},
{
internalType: "bytes",
name: "encryptedOutput2",
type: "bytes",
},
{
internalType: "bool",
name: "isL1Withdrawal",
type: "bool",
},
],
internalType: "struct TornadoPool.ExtData",
name: "_extData",
type: "tuple",
},
],
name: "onTransact",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "ownerChainId",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
@ -630,6 +779,29 @@ const _abi = [
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract IERC6777",
name: "_token",
type: "address",
},
{
internalType: "address payable",
name: "_to",
type: "address",
},
{
internalType: "uint256",
name: "_balance",
type: "uint256",
},
],
name: "rescueTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{

View File

@ -5,7 +5,7 @@ export const CONTRACT_NETWORKS: { [chainId in ChainId]: string } = {
[ChainId.GOERLI]: '0xE2D9aF526edeB16a02FBC3B68B0eB9B534f9c114',
[ChainId.OPTIMISM]: '0xcd7318c299A82E887f5180EF865a4c350dFC9fe5',
// [ChainId.XDAI]: '0xdd85b1dbE3379AFA37F703822f9E328d4bAf8625', // BNB
[ChainId.XDAI]: '0xBCc3689369f18916FBEB4B547BAB1488CC46290B', // ETH
[ChainId.XDAI]: '0x9719570C85c93a74c72B5B2c08AA133fcBc35377', // ETH
};
export const RPC_LIST: { [chainId in ChainId]: string } = {