From e060df18f7d217fb8b6d8ae8e4818691520f2196 Mon Sep 17 00:00:00 2001 From: Danil Kovtonyuk Date: Tue, 8 Feb 2022 21:45:56 +1000 Subject: [PATCH] update contract --- package.json | 2 +- src/abi/TornadoPool.json | 28 +++++++++++++ src/artifacts/TornadoPool.d.ts | 39 +++++++++++++++++++ .../factories/TornadoPool__factory.ts | 28 +++++++++++++ src/modules/api/api.validator.ts | 1 + 5 files changed, 97 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 418dffb..8b8a2c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pool-relayer", - "version": "0.0.3", + "version": "0.0.4", "description": "Relayer for Tornado.cash Nova privacy solution. https://tornado.cash", "author": "tornado.cash", "license": "MIT", diff --git a/src/abi/TornadoPool.json b/src/abi/TornadoPool.json index 1c70139..a917ad9 100644 --- a/src/abi/TornadoPool.json +++ b/src/abi/TornadoPool.json @@ -151,6 +151,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "MIN_EXT_AMOUNT_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "ROOT_HISTORY_SIZE", @@ -604,6 +617,11 @@ "internalType": "bool", "name": "isL1Withdrawal", "type": "bool" + }, + { + "internalType": "uint256", + "name": "l1Fee", + "type": "uint256" } ], "internalType": "struct TornadoPool.ExtData", @@ -759,6 +777,11 @@ "internalType": "bool", "name": "isL1Withdrawal", "type": "bool" + }, + { + "internalType": "uint256", + "name": "l1Fee", + "type": "uint256" } ], "internalType": "struct TornadoPool.ExtData", @@ -901,6 +924,11 @@ "internalType": "bool", "name": "isL1Withdrawal", "type": "bool" + }, + { + "internalType": "uint256", + "name": "l1Fee", + "type": "uint256" } ], "internalType": "struct TornadoPool.ExtData", diff --git a/src/artifacts/TornadoPool.d.ts b/src/artifacts/TornadoPool.d.ts index 1f9c59b..fbde483 100644 --- a/src/artifacts/TornadoPool.d.ts +++ b/src/artifacts/TornadoPool.d.ts @@ -24,6 +24,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface { "FIELD_SIZE()": FunctionFragment; "MAX_EXT_AMOUNT()": FunctionFragment; "MAX_FEE()": FunctionFragment; + "MIN_EXT_AMOUNT_LIMIT()": FunctionFragment; "ROOT_HISTORY_SIZE()": FunctionFragment; "ZERO_VALUE()": FunctionFragment; "ambBridge()": FunctionFragment; @@ -72,6 +73,10 @@ interface TornadoPoolInterface extends ethers.utils.Interface { values?: undefined ): string; encodeFunctionData(functionFragment: "MAX_FEE", values?: undefined): string; + encodeFunctionData( + functionFragment: "MIN_EXT_AMOUNT_LIMIT", + values?: undefined + ): string; encodeFunctionData( functionFragment: "ROOT_HISTORY_SIZE", values?: undefined @@ -169,6 +174,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; } ] ): string; @@ -201,6 +207,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; } ] ): string; @@ -229,6 +236,7 @@ interface TornadoPoolInterface extends ethers.utils.Interface { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; } ] ): string; @@ -258,6 +266,10 @@ interface TornadoPoolInterface extends ethers.utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "MAX_FEE", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "MIN_EXT_AMOUNT_LIMIT", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "ROOT_HISTORY_SIZE", data: BytesLike @@ -414,6 +426,8 @@ export class TornadoPool extends BaseContract { MAX_FEE(overrides?: CallOverrides): Promise<[BigNumber]>; + MIN_EXT_AMOUNT_LIMIT(overrides?: CallOverrides): Promise<[BigNumber]>; + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>; ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>; @@ -514,6 +528,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -545,6 +560,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -577,6 +593,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -606,6 +623,8 @@ export class TornadoPool extends BaseContract { MAX_FEE(overrides?: CallOverrides): Promise; + MIN_EXT_AMOUNT_LIMIT(overrides?: CallOverrides): Promise; + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; ZERO_VALUE(overrides?: CallOverrides): Promise; @@ -700,6 +719,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -731,6 +751,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -763,6 +784,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -792,6 +814,8 @@ export class TornadoPool extends BaseContract { MAX_FEE(overrides?: CallOverrides): Promise; + MIN_EXT_AMOUNT_LIMIT(overrides?: CallOverrides): Promise; + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; ZERO_VALUE(overrides?: CallOverrides): Promise; @@ -887,6 +911,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: CallOverrides ): Promise; @@ -918,6 +943,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: CallOverrides ): Promise; @@ -950,6 +976,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: CallOverrides ): Promise; @@ -1000,6 +1027,8 @@ export class TornadoPool extends BaseContract { MAX_FEE(overrides?: CallOverrides): Promise; + MIN_EXT_AMOUNT_LIMIT(overrides?: CallOverrides): Promise; + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; ZERO_VALUE(overrides?: CallOverrides): Promise; @@ -1100,6 +1129,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -1131,6 +1161,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -1163,6 +1194,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -1193,6 +1225,10 @@ export class TornadoPool extends BaseContract { MAX_FEE(overrides?: CallOverrides): Promise; + MIN_EXT_AMOUNT_LIMIT( + overrides?: CallOverrides + ): Promise; + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; ZERO_VALUE(overrides?: CallOverrides): Promise; @@ -1297,6 +1333,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -1328,6 +1365,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; @@ -1363,6 +1401,7 @@ export class TornadoPool extends BaseContract { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike; isL1Withdrawal: boolean; + l1Fee: BigNumberish; }, overrides?: Overrides & { from?: string | Promise } ): Promise; diff --git a/src/artifacts/factories/TornadoPool__factory.ts b/src/artifacts/factories/TornadoPool__factory.ts index 7076df5..89c481d 100644 --- a/src/artifacts/factories/TornadoPool__factory.ts +++ b/src/artifacts/factories/TornadoPool__factory.ts @@ -159,6 +159,19 @@ const _abi = [ stateMutability: "view", type: "function", }, + { + inputs: [], + name: "MIN_EXT_AMOUNT_LIMIT", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [], name: "ROOT_HISTORY_SIZE", @@ -613,6 +626,11 @@ const _abi = [ name: "isL1Withdrawal", type: "bool", }, + { + internalType: "uint256", + name: "l1Fee", + type: "uint256", + }, ], internalType: "struct TornadoPool.ExtData", name: "_extData", @@ -768,6 +786,11 @@ const _abi = [ name: "isL1Withdrawal", type: "bool", }, + { + internalType: "uint256", + name: "l1Fee", + type: "uint256", + }, ], internalType: "struct TornadoPool.ExtData", name: "_extData", @@ -910,6 +933,11 @@ const _abi = [ name: "isL1Withdrawal", type: "bool", }, + { + internalType: "uint256", + name: "l1Fee", + type: "uint256", + }, ], internalType: "struct TornadoPool.ExtData", name: "_extData", diff --git a/src/modules/api/api.validator.ts b/src/modules/api/api.validator.ts index e056d62..388c95b 100644 --- a/src/modules/api/api.validator.ts +++ b/src/modules/api/api.validator.ts @@ -37,6 +37,7 @@ const transactionSchema = { recipient: addressType, relayer: addressType, isL1Withdrawal: booleanType, + l1Fee: bytes32Type, }, }, args: {