From 1f549c799c2ef88696e0c97caf33b65a7381fffa Mon Sep 17 00:00:00 2001 From: Theo Date: Mon, 10 Jul 2023 06:26:27 -0700 Subject: [PATCH] Update ABI generation and add missing Optimism L1 gas oracle contract ABI --- abis/OvmGasPriceOracle.abi.json | 145 ++++ ...proxyLightABI.json => ProxyLight.abi.json} | 0 ...rnadoABI.json => TornadoInstance.abi.json} | 0 ...adoProxyABI.json => TornadoProxy.abi.json} | 0 package.json | 7 +- src/contracts/AggregatorAbi.ts | 527 ++++++++----- src/contracts/ERC20Abi.ts | 429 ++++++----- src/contracts/MulticallAbi.ts | 71 +- src/contracts/OffchainOracleAbi.ts | 527 ++++++++----- src/contracts/OvmGasPriceOracleABI.ts | 452 +++++++----- src/contracts/ProxyLightABI.ts | 251 ++++--- src/contracts/TornadoABI.ts | 521 ------------- src/contracts/TornadoInstanceAbi.ts | 691 ++++++++++++++++++ src/contracts/TornadoProxyABI.ts | 292 ++++---- src/contracts/common.ts | 30 +- .../factories/AggregatorAbi__factory.ts | 323 ++++---- src/contracts/factories/ERC20Abi__factory.ts | 249 +++---- .../factories/MulticallAbi__factory.ts | 49 +- .../factories/OffchainOracleAbi__factory.ts | 326 +++++---- .../OvmGasPriceOracleABI__factory.ts | 290 ++++---- .../factories/ProxyLightABI__factory.ts | 127 ++-- .../factories/TornadoABI__factory.ts | 516 ------------- .../factories/TornadoInstanceAbi__factory.ts | 522 +++++++++++++ .../factories/TornadoProxyABI__factory.ts | 196 ++--- src/contracts/factories/index.ts | 16 +- src/contracts/index.ts | 34 +- src/modules/contracts.ts | 12 +- src/services/config.service.ts | 8 +- src/services/tx.service.ts | 4 +- yarn.lock | 145 +++- 30 files changed, 3894 insertions(+), 2866 deletions(-) create mode 100644 abis/OvmGasPriceOracle.abi.json rename abis/{proxyLightABI.json => ProxyLight.abi.json} (100%) rename abis/{tornadoABI.json => TornadoInstance.abi.json} (100%) rename abis/{tornadoProxyABI.json => TornadoProxy.abi.json} (100%) delete mode 100644 src/contracts/TornadoABI.ts create mode 100644 src/contracts/TornadoInstanceAbi.ts delete mode 100644 src/contracts/factories/TornadoABI__factory.ts create mode 100644 src/contracts/factories/TornadoInstanceAbi__factory.ts diff --git a/abis/OvmGasPriceOracle.abi.json b/abis/OvmGasPriceOracle.abi.json new file mode 100644 index 0000000..59854d8 --- /dev/null +++ b/abis/OvmGasPriceOracle.abi.json @@ -0,0 +1,145 @@ +[ + { + "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "DecimalsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "GasPriceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "L1BaseFeeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "OverheadUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "ScalarUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gasPrice", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes", "name": "_data", "type": "bytes" }], + "name": "getL1Fee", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes", "name": "_data", "type": "bytes" }], + "name": "getL1GasUsed", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l1BaseFee", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "overhead", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "scalar", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_decimals", "type": "uint256" }], + "name": "setDecimals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_gasPrice", "type": "uint256" }], + "name": "setGasPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_baseFee", "type": "uint256" }], + "name": "setL1BaseFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_overhead", "type": "uint256" }], + "name": "setOverhead", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_scalar", "type": "uint256" }], + "name": "setScalar", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abis/proxyLightABI.json b/abis/ProxyLight.abi.json similarity index 100% rename from abis/proxyLightABI.json rename to abis/ProxyLight.abi.json diff --git a/abis/tornadoABI.json b/abis/TornadoInstance.abi.json similarity index 100% rename from abis/tornadoABI.json rename to abis/TornadoInstance.abi.json diff --git a/abis/tornadoProxyABI.json b/abis/TornadoProxy.abi.json similarity index 100% rename from abis/tornadoProxyABI.json rename to abis/TornadoProxy.abi.json diff --git a/package.json b/package.json index 3cf64e7..81610a1 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "dev:server": "nodemon --watch './src/**/*.ts' --exec ts-node src/app/index.ts", "dev:healthWorker": "nodemon --watch './src/**/*.ts' --exec ts-node src/healthWorker.ts", "dev:txWorker": "nodemon --watch './src/**/*.ts' --exec ts-node src/txWorker.ts", - "build": "tsc", + "build": "yarn build:abi && tsc", + "build:abi": "yarn typechain --target ethers-v5 --out-dir src/contracts ./abis/*.abi.json", "test": "tap --node-arg=--require=ts-node/register --no-check-coverage", "eslint": "eslint --ext .ts --ignore-path .gitignore .", "prettier:check": "npx prettier --check . --config .prettierrc --ignore-path .gitignore", @@ -43,7 +44,7 @@ "uuid": "^8.3.0" }, "devDependencies": { - "@typechain/ethers-v5": "^10.0.0", + "@typechain/ethers-v5": "^11.0.0", "@types/ioredis": "^4.28.10", "@types/node": "^20.4.1", "@types/tap": "^15.0.7", @@ -59,7 +60,7 @@ "prettier": "^2.7.1", "tap": "^16.3.0", "ts-node": "^10.7.0", - "typechain": "^8.0.0", + "typechain": "^8.2.0", "typescript": "^4.7.4" } } diff --git a/src/contracts/AggregatorAbi.ts b/src/contracts/AggregatorAbi.ts index 0aa17d0..630d76e 100644 --- a/src/contracts/AggregatorAbi.ts +++ b/src/contracts/AggregatorAbi.ts @@ -12,119 +12,196 @@ import type { PopulatedTransaction, Signer, utils, -} from 'ethers'; -import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; export interface AggregatorAbiInterface extends utils.Interface { functions: { - 'addConnector(address)': FunctionFragment; - 'addOracle(address,uint8)': FunctionFragment; - 'connectors()': FunctionFragment; - 'getRate(address,address,bool)': FunctionFragment; - 'getRateToEth(address,bool)': FunctionFragment; - 'multiWrapper()': FunctionFragment; - 'oracles()': FunctionFragment; - 'owner()': FunctionFragment; - 'removeConnector(address)': FunctionFragment; - 'removeOracle(address,uint8)': FunctionFragment; - 'renounceOwnership()': FunctionFragment; - 'setMultiWrapper(address)': FunctionFragment; - 'transferOwnership(address)': FunctionFragment; + "addConnector(address)": FunctionFragment; + "addOracle(address,uint8)": FunctionFragment; + "connectors()": FunctionFragment; + "getRate(address,address,bool)": FunctionFragment; + "getRateToEth(address,bool)": FunctionFragment; + "multiWrapper()": FunctionFragment; + "oracles()": FunctionFragment; + "owner()": FunctionFragment; + "removeConnector(address)": FunctionFragment; + "removeOracle(address,uint8)": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setMultiWrapper(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; }; getFunction( nameOrSignatureOrTopic: - | 'addConnector' - | 'addOracle' - | 'connectors' - | 'getRate' - | 'getRateToEth' - | 'multiWrapper' - | 'oracles' - | 'owner' - | 'removeConnector' - | 'removeOracle' - | 'renounceOwnership' - | 'setMultiWrapper' - | 'transferOwnership', + | "addConnector" + | "addOracle" + | "connectors" + | "getRate" + | "getRateToEth" + | "multiWrapper" + | "oracles" + | "owner" + | "removeConnector" + | "removeOracle" + | "renounceOwnership" + | "setMultiWrapper" + | "transferOwnership" ): FunctionFragment; - encodeFunctionData(functionFragment: 'addConnector', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'addOracle', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'connectors', values?: undefined): string; encodeFunctionData( - functionFragment: 'getRate', - values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + functionFragment: "addConnector", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "addOracle", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "connectors", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRate", + values: [string, string, boolean] + ): string; + encodeFunctionData( + functionFragment: "getRateToEth", + values: [string, boolean] + ): string; + encodeFunctionData( + functionFragment: "multiWrapper", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "oracles", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "removeConnector", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "removeOracle", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setMultiWrapper", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] ): string; - encodeFunctionData(functionFragment: 'getRateToEth', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'multiWrapper', values?: undefined): string; - encodeFunctionData(functionFragment: 'oracles', values?: undefined): string; - encodeFunctionData(functionFragment: 'owner', values?: undefined): string; - encodeFunctionData(functionFragment: 'removeConnector', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'removeOracle', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; - encodeFunctionData(functionFragment: 'setMultiWrapper', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; - decodeFunctionResult(functionFragment: 'addConnector', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'addOracle', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'connectors', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'getRate', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'getRateToEth', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'multiWrapper', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'oracles', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'removeConnector', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'removeOracle', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setMultiWrapper', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addConnector", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addOracle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "connectors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRateToEth", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "multiWrapper", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "oracles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeConnector", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeOracle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setMultiWrapper", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; events: { - 'ConnectorAdded(address)': EventFragment; - 'ConnectorRemoved(address)': EventFragment; - 'MultiWrapperUpdated(address)': EventFragment; - 'OracleAdded(address,uint8)': EventFragment; - 'OracleRemoved(address,uint8)': EventFragment; - 'OwnershipTransferred(address,address)': EventFragment; + "ConnectorAdded(address)": EventFragment; + "ConnectorRemoved(address)": EventFragment; + "MultiWrapperUpdated(address)": EventFragment; + "OracleAdded(address,uint8)": EventFragment; + "OracleRemoved(address,uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; }; - getEvent(nameOrSignatureOrTopic: 'ConnectorAdded'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'ConnectorRemoved'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'MultiWrapperUpdated'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OracleAdded'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OracleRemoved'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConnectorAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConnectorRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MultiWrapperUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OracleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OracleRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; } export interface ConnectorAddedEventObject { connector: string; } -export type ConnectorAddedEvent = TypedEvent<[string], ConnectorAddedEventObject>; +export type ConnectorAddedEvent = TypedEvent< + [string], + ConnectorAddedEventObject +>; export type ConnectorAddedEventFilter = TypedEventFilter; export interface ConnectorRemovedEventObject { connector: string; } -export type ConnectorRemovedEvent = TypedEvent<[string], ConnectorRemovedEventObject>; +export type ConnectorRemovedEvent = TypedEvent< + [string], + ConnectorRemovedEventObject +>; -export type ConnectorRemovedEventFilter = TypedEventFilter; +export type ConnectorRemovedEventFilter = + TypedEventFilter; export interface MultiWrapperUpdatedEventObject { multiWrapper: string; } -export type MultiWrapperUpdatedEvent = TypedEvent<[string], MultiWrapperUpdatedEventObject>; +export type MultiWrapperUpdatedEvent = TypedEvent< + [string], + MultiWrapperUpdatedEventObject +>; -export type MultiWrapperUpdatedEventFilter = TypedEventFilter; +export type MultiWrapperUpdatedEventFilter = + TypedEventFilter; export interface OracleAddedEventObject { oracle: string; oracleType: number; } -export type OracleAddedEvent = TypedEvent<[string, number], OracleAddedEventObject>; +export type OracleAddedEvent = TypedEvent< + [string, number], + OracleAddedEventObject +>; export type OracleAddedEventFilter = TypedEventFilter; @@ -132,7 +209,10 @@ export interface OracleRemovedEventObject { oracle: string; oracleType: number; } -export type OracleRemovedEvent = TypedEvent<[string, number], OracleRemovedEventObject>; +export type OracleRemovedEvent = TypedEvent< + [string, number], + OracleRemovedEventObject +>; export type OracleRemovedEventFilter = TypedEventFilter; @@ -140,9 +220,13 @@ export interface OwnershipTransferredEventObject { previousOwner: string; newOwner: string; } -export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; -export type OwnershipTransferredEventFilter = TypedEventFilter; +export type OwnershipTransferredEventFilter = + TypedEventFilter; export interface AggregatorAbi extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; @@ -154,12 +238,16 @@ export interface AggregatorAbi extends BaseContract { queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, + toBlock?: string | number | undefined ): Promise>; - listeners(eventFilter?: TypedEventFilter): Array>; + listeners( + eventFilter?: TypedEventFilter + ): Array>; listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; @@ -168,208 +256,247 @@ export interface AggregatorAbi extends BaseContract { functions: { addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - connectors(overrides?: CallOverrides): Promise<[string[]] & { allConnectors: string[] }>; + connectors( + overrides?: CallOverrides + ): Promise<[string[]] & { allConnectors: string[] }>; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise<[BigNumber] & { weightedRate: BigNumber }>; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise<[BigNumber] & { weightedRate: BigNumber }>; multiWrapper(overrides?: CallOverrides): Promise<[string]>; - oracles(overrides?: CallOverrides): Promise<[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }>; + oracles( + overrides?: CallOverrides + ): Promise< + [string[], number[]] & { allOracles: string[]; oracleTypes: number[] } + >; owner(overrides?: CallOverrides): Promise<[string]>; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; - oracles(overrides?: CallOverrides): Promise<[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }>; + oracles( + overrides?: CallOverrides + ): Promise< + [string[], number[]] & { allOracles: string[]; oracleTypes: number[] } + >; owner(overrides?: CallOverrides): Promise; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; callStatic: { - addConnector(connector: PromiseOrValue, overrides?: CallOverrides): Promise; + addConnector(connector: string, overrides?: CallOverrides): Promise; - addOracle(oracle: PromiseOrValue, oracleKind: PromiseOrValue, overrides?: CallOverrides): Promise; + addOracle( + oracle: string, + oracleKind: BigNumberish, + overrides?: CallOverrides + ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; - oracles(overrides?: CallOverrides): Promise<[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }>; + oracles( + overrides?: CallOverrides + ): Promise< + [string[], number[]] & { allOracles: string[]; oracleTypes: number[] } + >; owner(overrides?: CallOverrides): Promise; - removeConnector(connector: PromiseOrValue, overrides?: CallOverrides): Promise; + removeConnector( + connector: string, + overrides?: CallOverrides + ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: CallOverrides, + oracle: string, + oracleKind: BigNumberish, + overrides?: CallOverrides ): Promise; renounceOwnership(overrides?: CallOverrides): Promise; - setMultiWrapper(_multiWrapper: PromiseOrValue, overrides?: CallOverrides): Promise; + setMultiWrapper( + _multiWrapper: string, + overrides?: CallOverrides + ): Promise; - transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; }; filters: { - 'ConnectorAdded(address)'(connector?: null): ConnectorAddedEventFilter; + "ConnectorAdded(address)"(connector?: null): ConnectorAddedEventFilter; ConnectorAdded(connector?: null): ConnectorAddedEventFilter; - 'ConnectorRemoved(address)'(connector?: null): ConnectorRemovedEventFilter; + "ConnectorRemoved(address)"(connector?: null): ConnectorRemovedEventFilter; ConnectorRemoved(connector?: null): ConnectorRemovedEventFilter; - 'MultiWrapperUpdated(address)'(multiWrapper?: null): MultiWrapperUpdatedEventFilter; + "MultiWrapperUpdated(address)"( + multiWrapper?: null + ): MultiWrapperUpdatedEventFilter; MultiWrapperUpdated(multiWrapper?: null): MultiWrapperUpdatedEventFilter; - 'OracleAdded(address,uint8)'(oracle?: null, oracleType?: null): OracleAddedEventFilter; + "OracleAdded(address,uint8)"( + oracle?: null, + oracleType?: null + ): OracleAddedEventFilter; OracleAdded(oracle?: null, oracleType?: null): OracleAddedEventFilter; - 'OracleRemoved(address,uint8)'(oracle?: null, oracleType?: null): OracleRemovedEventFilter; + "OracleRemoved(address,uint8)"( + oracle?: null, + oracleType?: null + ): OracleRemovedEventFilter; OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter; - 'OwnershipTransferred(address,address)'( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null ): OwnershipTransferredEventFilter; OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, + previousOwner?: string | null, + newOwner?: string | null ): OwnershipTransferredEventFilter; }; estimateGas: { addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; @@ -379,54 +506,56 @@ export interface AggregatorAbi extends BaseContract { owner(overrides?: CallOverrides): Promise; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; populateTransaction: { addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; @@ -436,26 +565,28 @@ export interface AggregatorAbi extends BaseContract { owner(overrides?: CallOverrides): Promise; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; } diff --git a/src/contracts/ERC20Abi.ts b/src/contracts/ERC20Abi.ts index 7f89f6a..bd1f21e 100644 --- a/src/contracts/ERC20Abi.ts +++ b/src/contracts/ERC20Abi.ts @@ -12,78 +12,111 @@ import type { PopulatedTransaction, Signer, utils, -} from 'ethers'; -import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; export interface ERC20AbiInterface extends utils.Interface { functions: { - 'totalSupply()': FunctionFragment; - '_totalSupply()': FunctionFragment; - 'balanceOf(address)': FunctionFragment; - 'transfer(address,uint256)': FunctionFragment; - 'allowance(address,address)': FunctionFragment; - 'transferFrom(address,address,uint256)': FunctionFragment; - 'approve(address,uint256)': FunctionFragment; - 'nonces(address)': FunctionFragment; - 'permit(address,address,uint256,uint256,uint8,bytes32,bytes32)': FunctionFragment; + "totalSupply()": FunctionFragment; + "_totalSupply()": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; }; getFunction( nameOrSignatureOrTopic: - | 'totalSupply' - | '_totalSupply' - | 'balanceOf' - | 'transfer' - | 'allowance' - | 'transferFrom' - | 'approve' - | 'nonces' - | 'permit', + | "totalSupply" + | "_totalSupply" + | "balanceOf" + | "transfer" + | "allowance" + | "transferFrom" + | "approve" + | "nonces" + | "permit" ): FunctionFragment; - encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; - encodeFunctionData(functionFragment: '_totalSupply', values?: undefined): string; - encodeFunctionData(functionFragment: 'balanceOf', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'transfer', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'allowance', values: [PromiseOrValue, PromiseOrValue]): string; encodeFunctionData( - functionFragment: 'transferFrom', - values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + functionFragment: "totalSupply", + values?: undefined ): string; - encodeFunctionData(functionFragment: 'approve', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'nonces', values: [PromiseOrValue]): string; encodeFunctionData( - functionFragment: 'permit', + functionFragment: "_totalSupply", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - ], + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] ): string; - decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; - decodeFunctionResult(functionFragment: '_totalSupply', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'nonces', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'permit', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; events: { - 'Approval(address,address,uint256)': EventFragment; - 'Transfer(address,address,uint256)': EventFragment; + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; }; - getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } export interface ApprovalEventObject { @@ -91,7 +124,10 @@ export interface ApprovalEventObject { spender: string; value: BigNumber; } -export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>; +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; export type ApprovalEventFilter = TypedEventFilter; @@ -100,7 +136,10 @@ export interface TransferEventObject { to: string; value: BigNumber; } -export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject>; +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; export type TransferEventFilter = TypedEventFilter; @@ -114,12 +153,16 @@ export interface ERC20Abi extends BaseContract { queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, + toBlock?: string | number | undefined ): Promise>; - listeners(eventFilter?: TypedEventFilter): Array>; + listeners( + eventFilter?: TypedEventFilter + ): Array>; listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; @@ -131,40 +174,44 @@ export interface ERC20Abi extends BaseContract { _totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - balanceOf(who: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + balanceOf(who: string, overrides?: CallOverrides): Promise<[BigNumber]>; transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string } ): Promise; }; @@ -172,40 +219,44 @@ export interface ERC20Abi extends BaseContract { _totalSupply(overrides?: CallOverrides): Promise; - balanceOf(who: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(who: string, overrides?: CallOverrides): Promise; transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + nonces(owner: string, overrides?: CallOverrides): Promise; permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string } ): Promise; callStatic: { @@ -213,49 +264,69 @@ export interface ERC20Abi extends BaseContract { _totalSupply(overrides?: CallOverrides): Promise; - balanceOf(who: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(who: string, overrides?: CallOverrides): Promise; - transfer(to: PromiseOrValue, value: PromiseOrValue, overrides?: CallOverrides): Promise; - - allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides, + transfer( + to: string, + value: BigNumberish, + overrides?: CallOverrides ): Promise; - approve(spender: PromiseOrValue, value: PromiseOrValue, overrides?: CallOverrides): Promise; + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; - nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides, + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides ): Promise; }; filters: { - 'Approval(address,address,uint256)'( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null, + "Approval(address,address,uint256)"( + owner?: string | null, + spender?: string | null, + value?: null + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null ): ApprovalEventFilter; - Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter; - 'Transfer(address,address,uint256)'( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null, + "Transfer(address,address,uint256)"( + from?: string | null, + to?: string | null, + value?: null + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null ): TransferEventFilter; - Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter; }; estimateGas: { @@ -263,40 +334,44 @@ export interface ERC20Abi extends BaseContract { _totalSupply(overrides?: CallOverrides): Promise; - balanceOf(who: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(who: string, overrides?: CallOverrides): Promise; transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + nonces(owner: string, overrides?: CallOverrides): Promise; permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string } ): Promise; }; @@ -305,44 +380,50 @@ export interface ERC20Abi extends BaseContract { _totalSupply(overrides?: CallOverrides): Promise; - balanceOf(who: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf( + who: string, + overrides?: CallOverrides + ): Promise; transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides, + owner: string, + spender: string, + overrides?: CallOverrides ): Promise; transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - amount: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + owner: string, + spender: string, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string } ): Promise; }; } diff --git a/src/contracts/MulticallAbi.ts b/src/contracts/MulticallAbi.ts index a50de79..6d6267c 100644 --- a/src/contracts/MulticallAbi.ts +++ b/src/contracts/MulticallAbi.ts @@ -1,16 +1,26 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from 'ethers'; -import type { FunctionFragment, Result } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; export declare namespace MultiCall { - export type CallStruct = { - to: PromiseOrValue; - data: PromiseOrValue; - }; + export type CallStruct = { to: string; data: BytesLike }; export type CallStructOutput = [string, string] & { to: string; @@ -20,14 +30,17 @@ export declare namespace MultiCall { export interface MulticallAbiInterface extends utils.Interface { functions: { - 'multicall((address,bytes)[])': FunctionFragment; + "multicall((address,bytes)[])": FunctionFragment; }; - getFunction(nameOrSignatureOrTopic: 'multicall'): FunctionFragment; + getFunction(nameOrSignatureOrTopic: "multicall"): FunctionFragment; - encodeFunctionData(functionFragment: 'multicall', values: [MultiCall.CallStruct[]]): string; + encodeFunctionData( + functionFragment: "multicall", + values: [MultiCall.CallStruct[]] + ): string; - decodeFunctionResult(functionFragment: 'multicall', data: BytesLike): Result; + decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; events: {}; } @@ -42,12 +55,16 @@ export interface MulticallAbi extends BaseContract { queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, + toBlock?: string | number | undefined ): Promise>; - listeners(eventFilter?: TypedEventFilter): Array>; + listeners( + eventFilter?: TypedEventFilter + ): Array>; listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; @@ -57,29 +74,39 @@ export interface MulticallAbi extends BaseContract { functions: { multicall( calls: MultiCall.CallStruct[], - overrides?: CallOverrides, - ): Promise<[string[], boolean[]] & { results: string[]; success: boolean[] }>; + overrides?: CallOverrides + ): Promise< + [string[], boolean[]] & { results: string[]; success: boolean[] } + >; }; multicall( calls: MultiCall.CallStruct[], - overrides?: CallOverrides, + overrides?: CallOverrides ): Promise<[string[], boolean[]] & { results: string[]; success: boolean[] }>; callStatic: { multicall( calls: MultiCall.CallStruct[], - overrides?: CallOverrides, - ): Promise<[string[], boolean[]] & { results: string[]; success: boolean[] }>; + overrides?: CallOverrides + ): Promise< + [string[], boolean[]] & { results: string[]; success: boolean[] } + >; }; filters: {}; estimateGas: { - multicall(calls: MultiCall.CallStruct[], overrides?: CallOverrides): Promise; + multicall( + calls: MultiCall.CallStruct[], + overrides?: CallOverrides + ): Promise; }; populateTransaction: { - multicall(calls: MultiCall.CallStruct[], overrides?: CallOverrides): Promise; + multicall( + calls: MultiCall.CallStruct[], + overrides?: CallOverrides + ): Promise; }; } diff --git a/src/contracts/OffchainOracleAbi.ts b/src/contracts/OffchainOracleAbi.ts index 6b37065..dabc0ec 100644 --- a/src/contracts/OffchainOracleAbi.ts +++ b/src/contracts/OffchainOracleAbi.ts @@ -12,119 +12,196 @@ import type { PopulatedTransaction, Signer, utils, -} from 'ethers'; -import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; export interface OffchainOracleAbiInterface extends utils.Interface { functions: { - 'addConnector(address)': FunctionFragment; - 'addOracle(address,uint8)': FunctionFragment; - 'connectors()': FunctionFragment; - 'getRate(address,address,bool)': FunctionFragment; - 'getRateToEth(address,bool)': FunctionFragment; - 'multiWrapper()': FunctionFragment; - 'oracles()': FunctionFragment; - 'owner()': FunctionFragment; - 'removeConnector(address)': FunctionFragment; - 'removeOracle(address,uint8)': FunctionFragment; - 'renounceOwnership()': FunctionFragment; - 'setMultiWrapper(address)': FunctionFragment; - 'transferOwnership(address)': FunctionFragment; + "addConnector(address)": FunctionFragment; + "addOracle(address,uint8)": FunctionFragment; + "connectors()": FunctionFragment; + "getRate(address,address,bool)": FunctionFragment; + "getRateToEth(address,bool)": FunctionFragment; + "multiWrapper()": FunctionFragment; + "oracles()": FunctionFragment; + "owner()": FunctionFragment; + "removeConnector(address)": FunctionFragment; + "removeOracle(address,uint8)": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setMultiWrapper(address)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; }; getFunction( nameOrSignatureOrTopic: - | 'addConnector' - | 'addOracle' - | 'connectors' - | 'getRate' - | 'getRateToEth' - | 'multiWrapper' - | 'oracles' - | 'owner' - | 'removeConnector' - | 'removeOracle' - | 'renounceOwnership' - | 'setMultiWrapper' - | 'transferOwnership', + | "addConnector" + | "addOracle" + | "connectors" + | "getRate" + | "getRateToEth" + | "multiWrapper" + | "oracles" + | "owner" + | "removeConnector" + | "removeOracle" + | "renounceOwnership" + | "setMultiWrapper" + | "transferOwnership" ): FunctionFragment; - encodeFunctionData(functionFragment: 'addConnector', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'addOracle', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'connectors', values?: undefined): string; encodeFunctionData( - functionFragment: 'getRate', - values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + functionFragment: "addConnector", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "addOracle", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "connectors", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRate", + values: [string, string, boolean] + ): string; + encodeFunctionData( + functionFragment: "getRateToEth", + values: [string, boolean] + ): string; + encodeFunctionData( + functionFragment: "multiWrapper", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "oracles", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "removeConnector", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "removeOracle", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setMultiWrapper", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] ): string; - encodeFunctionData(functionFragment: 'getRateToEth', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'multiWrapper', values?: undefined): string; - encodeFunctionData(functionFragment: 'oracles', values?: undefined): string; - encodeFunctionData(functionFragment: 'owner', values?: undefined): string; - encodeFunctionData(functionFragment: 'removeConnector', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'removeOracle', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; - encodeFunctionData(functionFragment: 'setMultiWrapper', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; - decodeFunctionResult(functionFragment: 'addConnector', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'addOracle', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'connectors', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'getRate', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'getRateToEth', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'multiWrapper', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'oracles', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'removeConnector', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'removeOracle', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setMultiWrapper', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addConnector", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addOracle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "connectors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getRateToEth", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "multiWrapper", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "oracles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeConnector", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeOracle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setMultiWrapper", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; events: { - 'ConnectorAdded(address)': EventFragment; - 'ConnectorRemoved(address)': EventFragment; - 'MultiWrapperUpdated(address)': EventFragment; - 'OracleAdded(address,uint8)': EventFragment; - 'OracleRemoved(address,uint8)': EventFragment; - 'OwnershipTransferred(address,address)': EventFragment; + "ConnectorAdded(address)": EventFragment; + "ConnectorRemoved(address)": EventFragment; + "MultiWrapperUpdated(address)": EventFragment; + "OracleAdded(address,uint8)": EventFragment; + "OracleRemoved(address,uint8)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; }; - getEvent(nameOrSignatureOrTopic: 'ConnectorAdded'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'ConnectorRemoved'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'MultiWrapperUpdated'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OracleAdded'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OracleRemoved'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConnectorAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConnectorRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MultiWrapperUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OracleAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OracleRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; } export interface ConnectorAddedEventObject { connector: string; } -export type ConnectorAddedEvent = TypedEvent<[string], ConnectorAddedEventObject>; +export type ConnectorAddedEvent = TypedEvent< + [string], + ConnectorAddedEventObject +>; export type ConnectorAddedEventFilter = TypedEventFilter; export interface ConnectorRemovedEventObject { connector: string; } -export type ConnectorRemovedEvent = TypedEvent<[string], ConnectorRemovedEventObject>; +export type ConnectorRemovedEvent = TypedEvent< + [string], + ConnectorRemovedEventObject +>; -export type ConnectorRemovedEventFilter = TypedEventFilter; +export type ConnectorRemovedEventFilter = + TypedEventFilter; export interface MultiWrapperUpdatedEventObject { multiWrapper: string; } -export type MultiWrapperUpdatedEvent = TypedEvent<[string], MultiWrapperUpdatedEventObject>; +export type MultiWrapperUpdatedEvent = TypedEvent< + [string], + MultiWrapperUpdatedEventObject +>; -export type MultiWrapperUpdatedEventFilter = TypedEventFilter; +export type MultiWrapperUpdatedEventFilter = + TypedEventFilter; export interface OracleAddedEventObject { oracle: string; oracleType: number; } -export type OracleAddedEvent = TypedEvent<[string, number], OracleAddedEventObject>; +export type OracleAddedEvent = TypedEvent< + [string, number], + OracleAddedEventObject +>; export type OracleAddedEventFilter = TypedEventFilter; @@ -132,7 +209,10 @@ export interface OracleRemovedEventObject { oracle: string; oracleType: number; } -export type OracleRemovedEvent = TypedEvent<[string, number], OracleRemovedEventObject>; +export type OracleRemovedEvent = TypedEvent< + [string, number], + OracleRemovedEventObject +>; export type OracleRemovedEventFilter = TypedEventFilter; @@ -140,9 +220,13 @@ export interface OwnershipTransferredEventObject { previousOwner: string; newOwner: string; } -export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; -export type OwnershipTransferredEventFilter = TypedEventFilter; +export type OwnershipTransferredEventFilter = + TypedEventFilter; export interface OffchainOracleAbi extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; @@ -154,12 +238,16 @@ export interface OffchainOracleAbi extends BaseContract { queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, + toBlock?: string | number | undefined ): Promise>; - listeners(eventFilter?: TypedEventFilter): Array>; + listeners( + eventFilter?: TypedEventFilter + ): Array>; listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; @@ -168,208 +256,247 @@ export interface OffchainOracleAbi extends BaseContract { functions: { addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - connectors(overrides?: CallOverrides): Promise<[string[]] & { allConnectors: string[] }>; + connectors( + overrides?: CallOverrides + ): Promise<[string[]] & { allConnectors: string[] }>; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise<[BigNumber] & { weightedRate: BigNumber }>; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise<[BigNumber] & { weightedRate: BigNumber }>; multiWrapper(overrides?: CallOverrides): Promise<[string]>; - oracles(overrides?: CallOverrides): Promise<[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }>; + oracles( + overrides?: CallOverrides + ): Promise< + [string[], number[]] & { allOracles: string[]; oracleTypes: number[] } + >; owner(overrides?: CallOverrides): Promise<[string]>; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; - oracles(overrides?: CallOverrides): Promise<[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }>; + oracles( + overrides?: CallOverrides + ): Promise< + [string[], number[]] & { allOracles: string[]; oracleTypes: number[] } + >; owner(overrides?: CallOverrides): Promise; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; callStatic: { - addConnector(connector: PromiseOrValue, overrides?: CallOverrides): Promise; + addConnector(connector: string, overrides?: CallOverrides): Promise; - addOracle(oracle: PromiseOrValue, oracleKind: PromiseOrValue, overrides?: CallOverrides): Promise; + addOracle( + oracle: string, + oracleKind: BigNumberish, + overrides?: CallOverrides + ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; - oracles(overrides?: CallOverrides): Promise<[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }>; + oracles( + overrides?: CallOverrides + ): Promise< + [string[], number[]] & { allOracles: string[]; oracleTypes: number[] } + >; owner(overrides?: CallOverrides): Promise; - removeConnector(connector: PromiseOrValue, overrides?: CallOverrides): Promise; + removeConnector( + connector: string, + overrides?: CallOverrides + ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: CallOverrides, + oracle: string, + oracleKind: BigNumberish, + overrides?: CallOverrides ): Promise; renounceOwnership(overrides?: CallOverrides): Promise; - setMultiWrapper(_multiWrapper: PromiseOrValue, overrides?: CallOverrides): Promise; + setMultiWrapper( + _multiWrapper: string, + overrides?: CallOverrides + ): Promise; - transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; }; filters: { - 'ConnectorAdded(address)'(connector?: null): ConnectorAddedEventFilter; + "ConnectorAdded(address)"(connector?: null): ConnectorAddedEventFilter; ConnectorAdded(connector?: null): ConnectorAddedEventFilter; - 'ConnectorRemoved(address)'(connector?: null): ConnectorRemovedEventFilter; + "ConnectorRemoved(address)"(connector?: null): ConnectorRemovedEventFilter; ConnectorRemoved(connector?: null): ConnectorRemovedEventFilter; - 'MultiWrapperUpdated(address)'(multiWrapper?: null): MultiWrapperUpdatedEventFilter; + "MultiWrapperUpdated(address)"( + multiWrapper?: null + ): MultiWrapperUpdatedEventFilter; MultiWrapperUpdated(multiWrapper?: null): MultiWrapperUpdatedEventFilter; - 'OracleAdded(address,uint8)'(oracle?: null, oracleType?: null): OracleAddedEventFilter; + "OracleAdded(address,uint8)"( + oracle?: null, + oracleType?: null + ): OracleAddedEventFilter; OracleAdded(oracle?: null, oracleType?: null): OracleAddedEventFilter; - 'OracleRemoved(address,uint8)'(oracle?: null, oracleType?: null): OracleRemovedEventFilter; + "OracleRemoved(address,uint8)"( + oracle?: null, + oracleType?: null + ): OracleRemovedEventFilter; OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter; - 'OwnershipTransferred(address,address)'( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null ): OwnershipTransferredEventFilter; OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, + previousOwner?: string | null, + newOwner?: string | null ): OwnershipTransferredEventFilter; }; estimateGas: { addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; @@ -379,54 +506,56 @@ export interface OffchainOracleAbi extends BaseContract { owner(overrides?: CallOverrides): Promise; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; populateTransaction: { addConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; addOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; connectors(overrides?: CallOverrides): Promise; getRate( - srcToken: PromiseOrValue, - dstToken: PromiseOrValue, - useWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + dstToken: string, + useWrappers: boolean, + overrides?: CallOverrides ): Promise; getRateToEth( - srcToken: PromiseOrValue, - useSrcWrappers: PromiseOrValue, - overrides?: CallOverrides, + srcToken: string, + useSrcWrappers: boolean, + overrides?: CallOverrides ): Promise; multiWrapper(overrides?: CallOverrides): Promise; @@ -436,26 +565,28 @@ export interface OffchainOracleAbi extends BaseContract { owner(overrides?: CallOverrides): Promise; removeConnector( - connector: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + connector: string, + overrides?: Overrides & { from?: string } ): Promise; removeOracle( - oracle: PromiseOrValue, - oracleKind: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + oracle: string, + oracleKind: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; setMultiWrapper( - _multiWrapper: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _multiWrapper: string, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; } diff --git a/src/contracts/OvmGasPriceOracleABI.ts b/src/contracts/OvmGasPriceOracleABI.ts index c50e2df..fff081b 100644 --- a/src/contracts/OvmGasPriceOracleABI.ts +++ b/src/contracts/OvmGasPriceOracleABI.ts @@ -12,123 +12,190 @@ import type { PopulatedTransaction, Signer, utils, -} from 'ethers'; -import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; -export interface OvmGasPriceOracleABIInterface extends utils.Interface { +export interface OvmGasPriceOracleAbiInterface extends utils.Interface { functions: { - 'decimals()': FunctionFragment; - 'gasPrice()': FunctionFragment; - 'getL1Fee(bytes)': FunctionFragment; - 'getL1GasUsed(bytes)': FunctionFragment; - 'l1BaseFee()': FunctionFragment; - 'overhead()': FunctionFragment; - 'owner()': FunctionFragment; - 'renounceOwnership()': FunctionFragment; - 'scalar()': FunctionFragment; - 'setDecimals(uint256)': FunctionFragment; - 'setGasPrice(uint256)': FunctionFragment; - 'setL1BaseFee(uint256)': FunctionFragment; - 'setOverhead(uint256)': FunctionFragment; - 'setScalar(uint256)': FunctionFragment; - 'transferOwnership(address)': FunctionFragment; + "decimals()": FunctionFragment; + "gasPrice()": FunctionFragment; + "getL1Fee(bytes)": FunctionFragment; + "getL1GasUsed(bytes)": FunctionFragment; + "l1BaseFee()": FunctionFragment; + "overhead()": FunctionFragment; + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "scalar()": FunctionFragment; + "setDecimals(uint256)": FunctionFragment; + "setGasPrice(uint256)": FunctionFragment; + "setL1BaseFee(uint256)": FunctionFragment; + "setOverhead(uint256)": FunctionFragment; + "setScalar(uint256)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; }; getFunction( nameOrSignatureOrTopic: - | 'decimals' - | 'gasPrice' - | 'getL1Fee' - | 'getL1GasUsed' - | 'l1BaseFee' - | 'overhead' - | 'owner' - | 'renounceOwnership' - | 'scalar' - | 'setDecimals' - | 'setGasPrice' - | 'setL1BaseFee' - | 'setOverhead' - | 'setScalar' - | 'transferOwnership', + | "decimals" + | "gasPrice" + | "getL1Fee" + | "getL1GasUsed" + | "l1BaseFee" + | "overhead" + | "owner" + | "renounceOwnership" + | "scalar" + | "setDecimals" + | "setGasPrice" + | "setL1BaseFee" + | "setOverhead" + | "setScalar" + | "transferOwnership" ): FunctionFragment; - encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; - encodeFunctionData(functionFragment: 'gasPrice', values?: undefined): string; - encodeFunctionData(functionFragment: 'getL1Fee', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'getL1GasUsed', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'l1BaseFee', values?: undefined): string; - encodeFunctionData(functionFragment: 'overhead', values?: undefined): string; - encodeFunctionData(functionFragment: 'owner', values?: undefined): string; - encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; - encodeFunctionData(functionFragment: 'scalar', values?: undefined): string; - encodeFunctionData(functionFragment: 'setDecimals', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'setGasPrice', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'setL1BaseFee', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'setOverhead', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'setScalar', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "gasPrice", values?: undefined): string; + encodeFunctionData(functionFragment: "getL1Fee", values: [BytesLike]): string; + encodeFunctionData( + functionFragment: "getL1GasUsed", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "l1BaseFee", values?: undefined): string; + encodeFunctionData(functionFragment: "overhead", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "scalar", values?: undefined): string; + encodeFunctionData( + functionFragment: "setDecimals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setGasPrice", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setL1BaseFee", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setOverhead", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setScalar", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; - decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'gasPrice', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'getL1Fee', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'getL1GasUsed', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'l1BaseFee', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'overhead', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'scalar', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setDecimals', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setGasPrice', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setL1BaseFee', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setOverhead', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'setScalar', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gasPrice", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getL1Fee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getL1GasUsed", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "l1BaseFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "overhead", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "scalar", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setDecimals", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setGasPrice", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setL1BaseFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setOverhead", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setScalar", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; events: { - 'DecimalsUpdated(uint256)': EventFragment; - 'GasPriceUpdated(uint256)': EventFragment; - 'L1BaseFeeUpdated(uint256)': EventFragment; - 'OverheadUpdated(uint256)': EventFragment; - 'OwnershipTransferred(address,address)': EventFragment; - 'ScalarUpdated(uint256)': EventFragment; + "DecimalsUpdated(uint256)": EventFragment; + "GasPriceUpdated(uint256)": EventFragment; + "L1BaseFeeUpdated(uint256)": EventFragment; + "OverheadUpdated(uint256)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "ScalarUpdated(uint256)": EventFragment; }; - getEvent(nameOrSignatureOrTopic: 'DecimalsUpdated'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'GasPriceUpdated'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'L1BaseFeeUpdated'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OverheadUpdated'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'ScalarUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: "DecimalsUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GasPriceUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "L1BaseFeeUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OverheadUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ScalarUpdated"): EventFragment; } export interface DecimalsUpdatedEventObject { arg0: BigNumber; } -export type DecimalsUpdatedEvent = TypedEvent<[BigNumber], DecimalsUpdatedEventObject>; +export type DecimalsUpdatedEvent = TypedEvent< + [BigNumber], + DecimalsUpdatedEventObject +>; export type DecimalsUpdatedEventFilter = TypedEventFilter; export interface GasPriceUpdatedEventObject { arg0: BigNumber; } -export type GasPriceUpdatedEvent = TypedEvent<[BigNumber], GasPriceUpdatedEventObject>; +export type GasPriceUpdatedEvent = TypedEvent< + [BigNumber], + GasPriceUpdatedEventObject +>; export type GasPriceUpdatedEventFilter = TypedEventFilter; export interface L1BaseFeeUpdatedEventObject { arg0: BigNumber; } -export type L1BaseFeeUpdatedEvent = TypedEvent<[BigNumber], L1BaseFeeUpdatedEventObject>; +export type L1BaseFeeUpdatedEvent = TypedEvent< + [BigNumber], + L1BaseFeeUpdatedEventObject +>; -export type L1BaseFeeUpdatedEventFilter = TypedEventFilter; +export type L1BaseFeeUpdatedEventFilter = + TypedEventFilter; export interface OverheadUpdatedEventObject { arg0: BigNumber; } -export type OverheadUpdatedEvent = TypedEvent<[BigNumber], OverheadUpdatedEventObject>; +export type OverheadUpdatedEvent = TypedEvent< + [BigNumber], + OverheadUpdatedEventObject +>; export type OverheadUpdatedEventFilter = TypedEventFilter; @@ -136,33 +203,44 @@ export interface OwnershipTransferredEventObject { previousOwner: string; newOwner: string; } -export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; -export type OwnershipTransferredEventFilter = TypedEventFilter; +export type OwnershipTransferredEventFilter = + TypedEventFilter; export interface ScalarUpdatedEventObject { arg0: BigNumber; } -export type ScalarUpdatedEvent = TypedEvent<[BigNumber], ScalarUpdatedEventObject>; +export type ScalarUpdatedEvent = TypedEvent< + [BigNumber], + ScalarUpdatedEventObject +>; export type ScalarUpdatedEventFilter = TypedEventFilter; -export interface OvmGasPriceOracleABI extends BaseContract { +export interface OvmGasPriceOracleAbi extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; - interface: OvmGasPriceOracleABIInterface; + interface: OvmGasPriceOracleAbiInterface; queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, + toBlock?: string | number | undefined ): Promise>; - listeners(eventFilter?: TypedEventFilter): Array>; + listeners( + eventFilter?: TypedEventFilter + ): Array>; listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; @@ -174,9 +252,12 @@ export interface OvmGasPriceOracleABI extends BaseContract { gasPrice(overrides?: CallOverrides): Promise<[BigNumber]>; - getL1Fee(_data: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + getL1Fee(_data: BytesLike, overrides?: CallOverrides): Promise<[BigNumber]>; - getL1GasUsed(_data: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + getL1GasUsed( + _data: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; l1BaseFee(overrides?: CallOverrides): Promise<[BigNumber]>; @@ -184,38 +265,40 @@ export interface OvmGasPriceOracleABI extends BaseContract { owner(overrides?: CallOverrides): Promise<[string]>; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; scalar(overrides?: CallOverrides): Promise<[BigNumber]>; setDecimals( - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _decimals: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setGasPrice( - _gasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _gasPrice: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setL1BaseFee( - _baseFee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _baseFee: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setOverhead( - _overhead: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _overhead: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setScalar( - _scalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _scalar: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; @@ -223,9 +306,9 @@ export interface OvmGasPriceOracleABI extends BaseContract { gasPrice(overrides?: CallOverrides): Promise; - getL1Fee(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1Fee(_data: BytesLike, overrides?: CallOverrides): Promise; - getL1GasUsed(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1GasUsed(_data: BytesLike, overrides?: CallOverrides): Promise; l1BaseFee(overrides?: CallOverrides): Promise; @@ -233,38 +316,40 @@ export interface OvmGasPriceOracleABI extends BaseContract { owner(overrides?: CallOverrides): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; scalar(overrides?: CallOverrides): Promise; setDecimals( - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _decimals: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setGasPrice( - _gasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _gasPrice: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setL1BaseFee( - _baseFee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _baseFee: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setOverhead( - _overhead: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _overhead: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setScalar( - _scalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _scalar: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; callStatic: { @@ -272,9 +357,12 @@ export interface OvmGasPriceOracleABI extends BaseContract { gasPrice(overrides?: CallOverrides): Promise; - getL1Fee(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1Fee(_data: BytesLike, overrides?: CallOverrides): Promise; - getL1GasUsed(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1GasUsed( + _data: BytesLike, + overrides?: CallOverrides + ): Promise; l1BaseFee(overrides?: CallOverrides): Promise; @@ -286,42 +374,57 @@ export interface OvmGasPriceOracleABI extends BaseContract { scalar(overrides?: CallOverrides): Promise; - setDecimals(_decimals: PromiseOrValue, overrides?: CallOverrides): Promise; + setDecimals( + _decimals: BigNumberish, + overrides?: CallOverrides + ): Promise; - setGasPrice(_gasPrice: PromiseOrValue, overrides?: CallOverrides): Promise; + setGasPrice( + _gasPrice: BigNumberish, + overrides?: CallOverrides + ): Promise; - setL1BaseFee(_baseFee: PromiseOrValue, overrides?: CallOverrides): Promise; + setL1BaseFee( + _baseFee: BigNumberish, + overrides?: CallOverrides + ): Promise; - setOverhead(_overhead: PromiseOrValue, overrides?: CallOverrides): Promise; + setOverhead( + _overhead: BigNumberish, + overrides?: CallOverrides + ): Promise; - setScalar(_scalar: PromiseOrValue, overrides?: CallOverrides): Promise; + setScalar(_scalar: BigNumberish, overrides?: CallOverrides): Promise; - transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; }; filters: { - 'DecimalsUpdated(uint256)'(arg0?: null): DecimalsUpdatedEventFilter; + "DecimalsUpdated(uint256)"(arg0?: null): DecimalsUpdatedEventFilter; DecimalsUpdated(arg0?: null): DecimalsUpdatedEventFilter; - 'GasPriceUpdated(uint256)'(arg0?: null): GasPriceUpdatedEventFilter; + "GasPriceUpdated(uint256)"(arg0?: null): GasPriceUpdatedEventFilter; GasPriceUpdated(arg0?: null): GasPriceUpdatedEventFilter; - 'L1BaseFeeUpdated(uint256)'(arg0?: null): L1BaseFeeUpdatedEventFilter; + "L1BaseFeeUpdated(uint256)"(arg0?: null): L1BaseFeeUpdatedEventFilter; L1BaseFeeUpdated(arg0?: null): L1BaseFeeUpdatedEventFilter; - 'OverheadUpdated(uint256)'(arg0?: null): OverheadUpdatedEventFilter; + "OverheadUpdated(uint256)"(arg0?: null): OverheadUpdatedEventFilter; OverheadUpdated(arg0?: null): OverheadUpdatedEventFilter; - 'OwnershipTransferred(address,address)'( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null ): OwnershipTransferredEventFilter; OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null, + previousOwner?: string | null, + newOwner?: string | null ): OwnershipTransferredEventFilter; - 'ScalarUpdated(uint256)'(arg0?: null): ScalarUpdatedEventFilter; + "ScalarUpdated(uint256)"(arg0?: null): ScalarUpdatedEventFilter; ScalarUpdated(arg0?: null): ScalarUpdatedEventFilter; }; @@ -330,9 +433,12 @@ export interface OvmGasPriceOracleABI extends BaseContract { gasPrice(overrides?: CallOverrides): Promise; - getL1Fee(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1Fee(_data: BytesLike, overrides?: CallOverrides): Promise; - getL1GasUsed(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1GasUsed( + _data: BytesLike, + overrides?: CallOverrides + ): Promise; l1BaseFee(overrides?: CallOverrides): Promise; @@ -340,38 +446,40 @@ export interface OvmGasPriceOracleABI extends BaseContract { owner(overrides?: CallOverrides): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; scalar(overrides?: CallOverrides): Promise; setDecimals( - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _decimals: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setGasPrice( - _gasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _gasPrice: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setL1BaseFee( - _baseFee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _baseFee: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setOverhead( - _overhead: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _overhead: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setScalar( - _scalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _scalar: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; @@ -380,9 +488,15 @@ export interface OvmGasPriceOracleABI extends BaseContract { gasPrice(overrides?: CallOverrides): Promise; - getL1Fee(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1Fee( + _data: BytesLike, + overrides?: CallOverrides + ): Promise; - getL1GasUsed(_data: PromiseOrValue, overrides?: CallOverrides): Promise; + getL1GasUsed( + _data: BytesLike, + overrides?: CallOverrides + ): Promise; l1BaseFee(overrides?: CallOverrides): Promise; @@ -390,38 +504,40 @@ export interface OvmGasPriceOracleABI extends BaseContract { owner(overrides?: CallOverrides): Promise; - renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + renounceOwnership( + overrides?: Overrides & { from?: string } + ): Promise; scalar(overrides?: CallOverrides): Promise; setDecimals( - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _decimals: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setGasPrice( - _gasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _gasPrice: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setL1BaseFee( - _baseFee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _baseFee: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setOverhead( - _overhead: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _overhead: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; setScalar( - _scalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + _scalar: BigNumberish, + overrides?: Overrides & { from?: string } ): Promise; transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + newOwner: string, + overrides?: Overrides & { from?: string } ): Promise; }; } diff --git a/src/contracts/ProxyLightABI.ts b/src/contracts/ProxyLightABI.ts index a7195df..dd686ed 100644 --- a/src/contracts/ProxyLightABI.ts +++ b/src/contracts/ProxyLightABI.ts @@ -13,74 +13,98 @@ import type { PopulatedTransaction, Signer, utils, -} from 'ethers'; -import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; -export interface ProxyLightABIInterface extends utils.Interface { +export interface ProxyLightAbiInterface extends utils.Interface { functions: { - 'backupNotes(bytes[])': FunctionFragment; - 'deposit(address,bytes32,bytes)': FunctionFragment; - 'withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)': FunctionFragment; + "backupNotes(bytes[])": FunctionFragment; + "deposit(address,bytes32,bytes)": FunctionFragment; + "withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment; }; - getFunction(nameOrSignatureOrTopic: 'backupNotes' | 'deposit' | 'withdraw'): FunctionFragment; + getFunction( + nameOrSignatureOrTopic: "backupNotes" | "deposit" | "withdraw" + ): FunctionFragment; - encodeFunctionData(functionFragment: 'backupNotes', values: [PromiseOrValue[]]): string; encodeFunctionData( - functionFragment: 'deposit', - values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + functionFragment: "backupNotes", + values: [BytesLike[]] ): string; encodeFunctionData( - functionFragment: 'withdraw', + functionFragment: "deposit", + values: [string, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "withdraw", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - ], + string, + BytesLike, + BytesLike, + BytesLike, + string, + string, + BigNumberish, + BigNumberish + ] ): string; - decodeFunctionResult(functionFragment: 'backupNotes', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "backupNotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; events: { - 'EncryptedNote(address,bytes)': EventFragment; + "EncryptedNote(address,bytes)": EventFragment; }; - getEvent(nameOrSignatureOrTopic: 'EncryptedNote'): EventFragment; + getEvent(nameOrSignatureOrTopic: "EncryptedNote"): EventFragment; } export interface EncryptedNoteEventObject { sender: string; encryptedNote: string; } -export type EncryptedNoteEvent = TypedEvent<[string, string], EncryptedNoteEventObject>; +export type EncryptedNoteEvent = TypedEvent< + [string, string], + EncryptedNoteEventObject +>; export type EncryptedNoteEventFilter = TypedEventFilter; -export interface ProxyLightABI extends BaseContract { +export interface ProxyLightAbi extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; - interface: ProxyLightABIInterface; + interface: ProxyLightAbiInterface; queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, + toBlock?: string | number | undefined ): Promise>; - listeners(eventFilter?: TypedEventFilter): Array>; + listeners( + eventFilter?: TypedEventFilter + ): Array>; listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; @@ -89,131 +113,140 @@ export interface ProxyLightABI extends BaseContract { functions: { backupNotes( - _encryptedNotes: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, + _encryptedNotes: BytesLike[], + overrides?: Overrides & { from?: string } ): Promise; deposit( - _tornado: PromiseOrValue, - _commitment: PromiseOrValue, - _encryptedNote: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _commitment: BytesLike, + _encryptedNote: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; withdraw( - _tornado: PromiseOrValue, - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; }; backupNotes( - _encryptedNotes: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, + _encryptedNotes: BytesLike[], + overrides?: Overrides & { from?: string } ): Promise; deposit( - _tornado: PromiseOrValue, - _commitment: PromiseOrValue, - _encryptedNote: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _commitment: BytesLike, + _encryptedNote: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; withdraw( - _tornado: PromiseOrValue, - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; callStatic: { - backupNotes(_encryptedNotes: PromiseOrValue[], overrides?: CallOverrides): Promise; + backupNotes( + _encryptedNotes: BytesLike[], + overrides?: CallOverrides + ): Promise; deposit( - _tornado: PromiseOrValue, - _commitment: PromiseOrValue, - _encryptedNote: PromiseOrValue, - overrides?: CallOverrides, + _tornado: string, + _commitment: BytesLike, + _encryptedNote: BytesLike, + overrides?: CallOverrides ): Promise; withdraw( - _tornado: PromiseOrValue, - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: CallOverrides, + _tornado: string, + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: CallOverrides ): Promise; }; filters: { - 'EncryptedNote(address,bytes)'(sender?: PromiseOrValue | null, encryptedNote?: null): EncryptedNoteEventFilter; - EncryptedNote(sender?: PromiseOrValue | null, encryptedNote?: null): EncryptedNoteEventFilter; + "EncryptedNote(address,bytes)"( + sender?: string | null, + encryptedNote?: null + ): EncryptedNoteEventFilter; + EncryptedNote( + sender?: string | null, + encryptedNote?: null + ): EncryptedNoteEventFilter; }; estimateGas: { backupNotes( - _encryptedNotes: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, + _encryptedNotes: BytesLike[], + overrides?: Overrides & { from?: string } ): Promise; deposit( - _tornado: PromiseOrValue, - _commitment: PromiseOrValue, - _encryptedNote: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _commitment: BytesLike, + _encryptedNote: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; withdraw( - _tornado: PromiseOrValue, - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; }; populateTransaction: { backupNotes( - _encryptedNotes: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue }, + _encryptedNotes: BytesLike[], + overrides?: Overrides & { from?: string } ): Promise; deposit( - _tornado: PromiseOrValue, - _commitment: PromiseOrValue, - _encryptedNote: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _commitment: BytesLike, + _encryptedNote: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; withdraw( - _tornado: PromiseOrValue, - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + _tornado: string, + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; }; } diff --git a/src/contracts/TornadoABI.ts b/src/contracts/TornadoABI.ts deleted file mode 100644 index 0f106a2..0000000 --- a/src/contracts/TornadoABI.ts +++ /dev/null @@ -1,521 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from 'ethers'; -import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; - -export interface TornadoABIInterface extends utils.Interface { - functions: { - 'changeOperator(address)': FunctionFragment; - 'nullifierHashes(bytes32)': FunctionFragment; - 'withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)': FunctionFragment; - 'verifier()': FunctionFragment; - 'hashLeftRight(bytes32,bytes32)': FunctionFragment; - 'FIELD_SIZE()': FunctionFragment; - 'levels()': FunctionFragment; - 'operator()': FunctionFragment; - 'isKnownRoot(bytes32)': FunctionFragment; - 'commitments(bytes32)': FunctionFragment; - 'denomination()': FunctionFragment; - 'currentRootIndex()': FunctionFragment; - 'updateVerifier(address)': FunctionFragment; - 'deposit(bytes32)': FunctionFragment; - 'getLastRoot()': FunctionFragment; - 'roots(uint256)': FunctionFragment; - 'ROOT_HISTORY_SIZE()': FunctionFragment; - 'isSpent(bytes32)': FunctionFragment; - 'zeros(uint256)': FunctionFragment; - 'ZERO_VALUE()': FunctionFragment; - 'filledSubtrees(uint256)': FunctionFragment; - 'nextIndex()': FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | 'changeOperator' - | 'nullifierHashes' - | 'withdraw' - | 'verifier' - | 'hashLeftRight' - | 'FIELD_SIZE' - | 'levels' - | 'operator' - | 'isKnownRoot' - | 'commitments' - | 'denomination' - | 'currentRootIndex' - | 'updateVerifier' - | 'deposit' - | 'getLastRoot' - | 'roots' - | 'ROOT_HISTORY_SIZE' - | 'isSpent' - | 'zeros' - | 'ZERO_VALUE' - | 'filledSubtrees' - | 'nextIndex', - ): FunctionFragment; - - encodeFunctionData(functionFragment: 'changeOperator', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'nullifierHashes', values: [PromiseOrValue]): string; - encodeFunctionData( - functionFragment: 'withdraw', - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - ], - ): string; - encodeFunctionData(functionFragment: 'verifier', values?: undefined): string; - encodeFunctionData(functionFragment: 'hashLeftRight', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'FIELD_SIZE', values?: undefined): string; - encodeFunctionData(functionFragment: 'levels', values?: undefined): string; - encodeFunctionData(functionFragment: 'operator', values?: undefined): string; - encodeFunctionData(functionFragment: 'isKnownRoot', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'commitments', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'denomination', values?: undefined): string; - encodeFunctionData(functionFragment: 'currentRootIndex', values?: undefined): string; - encodeFunctionData(functionFragment: 'updateVerifier', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'deposit', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'getLastRoot', values?: undefined): string; - encodeFunctionData(functionFragment: 'roots', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'ROOT_HISTORY_SIZE', values?: undefined): string; - encodeFunctionData(functionFragment: 'isSpent', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'zeros', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'ZERO_VALUE', values?: undefined): string; - encodeFunctionData(functionFragment: 'filledSubtrees', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'nextIndex', values?: undefined): string; - - decodeFunctionResult(functionFragment: 'changeOperator', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'nullifierHashes', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'verifier', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'hashLeftRight', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'FIELD_SIZE', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'levels', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'operator', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'isKnownRoot', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'commitments', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'denomination', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'currentRootIndex', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'updateVerifier', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'getLastRoot', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'roots', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'ROOT_HISTORY_SIZE', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'isSpent', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'zeros', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'ZERO_VALUE', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'filledSubtrees', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'nextIndex', data: BytesLike): Result; - - events: { - 'Deposit(bytes32,uint32,uint256)': EventFragment; - 'Withdrawal(address,bytes32,address,uint256)': EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: 'Deposit'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'Withdrawal'): EventFragment; -} - -export interface DepositEventObject { - commitment: string; - leafIndex: number; - timestamp: BigNumber; -} -export type DepositEvent = TypedEvent<[string, number, BigNumber], DepositEventObject>; - -export type DepositEventFilter = TypedEventFilter; - -export interface WithdrawalEventObject { - to: string; - nullifierHash: string; - relayer: string; - fee: BigNumber; -} -export type WithdrawalEvent = TypedEvent<[string, string, string, BigNumber], WithdrawalEventObject>; - -export type WithdrawalEventFilter = TypedEventFilter; - -export interface TornadoABI extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: TornadoABIInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, - ): Promise>; - - listeners(eventFilter?: TypedEventFilter): Array>; - listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - changeOperator( - _newOperator: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - nullifierHashes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; - - withdraw( - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - verifier(overrides?: CallOverrides): Promise<[string]>; - - hashLeftRight( - _left: PromiseOrValue, - _right: PromiseOrValue, - overrides?: CallOverrides, - ): Promise<[string]>; - - FIELD_SIZE(overrides?: CallOverrides): Promise<[BigNumber]>; - - levels(overrides?: CallOverrides): Promise<[number]>; - - operator(overrides?: CallOverrides): Promise<[string]>; - - isKnownRoot(_root: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; - - commitments(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; - - denomination(overrides?: CallOverrides): Promise<[BigNumber]>; - - currentRootIndex(overrides?: CallOverrides): Promise<[number]>; - - updateVerifier( - _newVerifier: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - deposit( - _commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - getLastRoot(overrides?: CallOverrides): Promise<[string]>; - - roots(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; - - ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>; - - isSpent(_nullifierHash: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; - - zeros(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; - - ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>; - - filledSubtrees(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; - - nextIndex(overrides?: CallOverrides): Promise<[number]>; - }; - - changeOperator( - _newOperator: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - nullifierHashes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - withdraw( - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - verifier(overrides?: CallOverrides): Promise; - - hashLeftRight(_left: PromiseOrValue, _right: PromiseOrValue, overrides?: CallOverrides): Promise; - - FIELD_SIZE(overrides?: CallOverrides): Promise; - - levels(overrides?: CallOverrides): Promise; - - operator(overrides?: CallOverrides): Promise; - - isKnownRoot(_root: PromiseOrValue, overrides?: CallOverrides): Promise; - - commitments(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - denomination(overrides?: CallOverrides): Promise; - - currentRootIndex(overrides?: CallOverrides): Promise; - - updateVerifier( - _newVerifier: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - deposit( - _commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - getLastRoot(overrides?: CallOverrides): Promise; - - roots(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; - - isSpent(_nullifierHash: PromiseOrValue, overrides?: CallOverrides): Promise; - - zeros(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ZERO_VALUE(overrides?: CallOverrides): Promise; - - filledSubtrees(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - nextIndex(overrides?: CallOverrides): Promise; - - callStatic: { - changeOperator(_newOperator: PromiseOrValue, overrides?: CallOverrides): Promise; - - nullifierHashes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - withdraw( - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: CallOverrides, - ): Promise; - - verifier(overrides?: CallOverrides): Promise; - - hashLeftRight( - _left: PromiseOrValue, - _right: PromiseOrValue, - overrides?: CallOverrides, - ): Promise; - - FIELD_SIZE(overrides?: CallOverrides): Promise; - - levels(overrides?: CallOverrides): Promise; - - operator(overrides?: CallOverrides): Promise; - - isKnownRoot(_root: PromiseOrValue, overrides?: CallOverrides): Promise; - - commitments(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - denomination(overrides?: CallOverrides): Promise; - - currentRootIndex(overrides?: CallOverrides): Promise; - - updateVerifier(_newVerifier: PromiseOrValue, overrides?: CallOverrides): Promise; - - deposit(_commitment: PromiseOrValue, overrides?: CallOverrides): Promise; - - getLastRoot(overrides?: CallOverrides): Promise; - - roots(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; - - isSpent(_nullifierHash: PromiseOrValue, overrides?: CallOverrides): Promise; - - zeros(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ZERO_VALUE(overrides?: CallOverrides): Promise; - - filledSubtrees(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - nextIndex(overrides?: CallOverrides): Promise; - }; - - filters: { - 'Deposit(bytes32,uint32,uint256)'( - commitment?: PromiseOrValue | null, - leafIndex?: null, - timestamp?: null, - ): DepositEventFilter; - Deposit(commitment?: PromiseOrValue | null, leafIndex?: null, timestamp?: null): DepositEventFilter; - - 'Withdrawal(address,bytes32,address,uint256)'( - to?: null, - nullifierHash?: null, - relayer?: PromiseOrValue | null, - fee?: null, - ): WithdrawalEventFilter; - Withdrawal(to?: null, nullifierHash?: null, relayer?: PromiseOrValue | null, fee?: null): WithdrawalEventFilter; - }; - - estimateGas: { - changeOperator( - _newOperator: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - nullifierHashes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - withdraw( - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - verifier(overrides?: CallOverrides): Promise; - - hashLeftRight( - _left: PromiseOrValue, - _right: PromiseOrValue, - overrides?: CallOverrides, - ): Promise; - - FIELD_SIZE(overrides?: CallOverrides): Promise; - - levels(overrides?: CallOverrides): Promise; - - operator(overrides?: CallOverrides): Promise; - - isKnownRoot(_root: PromiseOrValue, overrides?: CallOverrides): Promise; - - commitments(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - denomination(overrides?: CallOverrides): Promise; - - currentRootIndex(overrides?: CallOverrides): Promise; - - updateVerifier( - _newVerifier: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - deposit( - _commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - getLastRoot(overrides?: CallOverrides): Promise; - - roots(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; - - isSpent(_nullifierHash: PromiseOrValue, overrides?: CallOverrides): Promise; - - zeros(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ZERO_VALUE(overrides?: CallOverrides): Promise; - - filledSubtrees(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - nextIndex(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - changeOperator( - _newOperator: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - nullifierHashes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - withdraw( - _proof: PromiseOrValue, - _root: PromiseOrValue, - _nullifierHash: PromiseOrValue, - _recipient: PromiseOrValue, - _relayer: PromiseOrValue, - _fee: PromiseOrValue, - _refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - verifier(overrides?: CallOverrides): Promise; - - hashLeftRight( - _left: PromiseOrValue, - _right: PromiseOrValue, - overrides?: CallOverrides, - ): Promise; - - FIELD_SIZE(overrides?: CallOverrides): Promise; - - levels(overrides?: CallOverrides): Promise; - - operator(overrides?: CallOverrides): Promise; - - isKnownRoot(_root: PromiseOrValue, overrides?: CallOverrides): Promise; - - commitments(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - denomination(overrides?: CallOverrides): Promise; - - currentRootIndex(overrides?: CallOverrides): Promise; - - updateVerifier( - _newVerifier: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise; - - deposit( - _commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, - ): Promise; - - getLastRoot(overrides?: CallOverrides): Promise; - - roots(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; - - isSpent(_nullifierHash: PromiseOrValue, overrides?: CallOverrides): Promise; - - zeros(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - ZERO_VALUE(overrides?: CallOverrides): Promise; - - filledSubtrees(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - - nextIndex(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/contracts/TornadoInstanceAbi.ts b/src/contracts/TornadoInstanceAbi.ts new file mode 100644 index 0000000..9592456 --- /dev/null +++ b/src/contracts/TornadoInstanceAbi.ts @@ -0,0 +1,691 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; + +export interface TornadoInstanceAbiInterface extends utils.Interface { + functions: { + "changeOperator(address)": FunctionFragment; + "nullifierHashes(bytes32)": FunctionFragment; + "withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment; + "verifier()": FunctionFragment; + "hashLeftRight(bytes32,bytes32)": FunctionFragment; + "FIELD_SIZE()": FunctionFragment; + "levels()": FunctionFragment; + "operator()": FunctionFragment; + "isKnownRoot(bytes32)": FunctionFragment; + "commitments(bytes32)": FunctionFragment; + "denomination()": FunctionFragment; + "currentRootIndex()": FunctionFragment; + "updateVerifier(address)": FunctionFragment; + "deposit(bytes32)": FunctionFragment; + "getLastRoot()": FunctionFragment; + "roots(uint256)": FunctionFragment; + "ROOT_HISTORY_SIZE()": FunctionFragment; + "isSpent(bytes32)": FunctionFragment; + "zeros(uint256)": FunctionFragment; + "ZERO_VALUE()": FunctionFragment; + "filledSubtrees(uint256)": FunctionFragment; + "nextIndex()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "changeOperator" + | "nullifierHashes" + | "withdraw" + | "verifier" + | "hashLeftRight" + | "FIELD_SIZE" + | "levels" + | "operator" + | "isKnownRoot" + | "commitments" + | "denomination" + | "currentRootIndex" + | "updateVerifier" + | "deposit" + | "getLastRoot" + | "roots" + | "ROOT_HISTORY_SIZE" + | "isSpent" + | "zeros" + | "ZERO_VALUE" + | "filledSubtrees" + | "nextIndex" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "changeOperator", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "nullifierHashes", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [ + BytesLike, + BytesLike, + BytesLike, + string, + string, + BigNumberish, + BigNumberish + ] + ): string; + encodeFunctionData(functionFragment: "verifier", values?: undefined): string; + encodeFunctionData( + functionFragment: "hashLeftRight", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "FIELD_SIZE", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "levels", values?: undefined): string; + encodeFunctionData(functionFragment: "operator", values?: undefined): string; + encodeFunctionData( + functionFragment: "isKnownRoot", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "commitments", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "denomination", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "currentRootIndex", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "updateVerifier", + values: [string] + ): string; + encodeFunctionData(functionFragment: "deposit", values: [BytesLike]): string; + encodeFunctionData( + functionFragment: "getLastRoot", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "roots", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "ROOT_HISTORY_SIZE", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "isSpent", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "zeros", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "ZERO_VALUE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "filledSubtrees", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "nextIndex", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "changeOperator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "nullifierHashes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifier", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashLeftRight", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "FIELD_SIZE", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "levels", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "operator", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isKnownRoot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "commitments", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "denomination", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "currentRootIndex", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateVerifier", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getLastRoot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "roots", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ROOT_HISTORY_SIZE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isSpent", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "zeros", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ZERO_VALUE", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "filledSubtrees", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "nextIndex", data: BytesLike): Result; + + events: { + "Deposit(bytes32,uint32,uint256)": EventFragment; + "Withdrawal(address,bytes32,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; +} + +export interface DepositEventObject { + commitment: string; + leafIndex: number; + timestamp: BigNumber; +} +export type DepositEvent = TypedEvent< + [string, number, BigNumber], + DepositEventObject +>; + +export type DepositEventFilter = TypedEventFilter; + +export interface WithdrawalEventObject { + to: string; + nullifierHash: string; + relayer: string; + fee: BigNumber; +} +export type WithdrawalEvent = TypedEvent< + [string, string, string, BigNumber], + WithdrawalEventObject +>; + +export type WithdrawalEventFilter = TypedEventFilter; + +export interface TornadoInstanceAbi extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: TornadoInstanceAbiInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + changeOperator( + _newOperator: string, + overrides?: Overrides & { from?: string } + ): Promise; + + nullifierHashes( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + withdraw( + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + verifier(overrides?: CallOverrides): Promise<[string]>; + + hashLeftRight( + _left: BytesLike, + _right: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + FIELD_SIZE(overrides?: CallOverrides): Promise<[BigNumber]>; + + levels(overrides?: CallOverrides): Promise<[number]>; + + operator(overrides?: CallOverrides): Promise<[string]>; + + isKnownRoot( + _root: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + + denomination(overrides?: CallOverrides): Promise<[BigNumber]>; + + currentRootIndex(overrides?: CallOverrides): Promise<[number]>; + + updateVerifier( + _newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + deposit( + _commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + getLastRoot(overrides?: CallOverrides): Promise<[string]>; + + roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>; + + isSpent( + _nullifierHash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + + ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>; + + filledSubtrees( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + nextIndex(overrides?: CallOverrides): Promise<[number]>; + }; + + changeOperator( + _newOperator: string, + overrides?: Overrides & { from?: string } + ): Promise; + + nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise; + + withdraw( + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + verifier(overrides?: CallOverrides): Promise; + + hashLeftRight( + _left: BytesLike, + _right: BytesLike, + overrides?: CallOverrides + ): Promise; + + FIELD_SIZE(overrides?: CallOverrides): Promise; + + levels(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise; + + commitments(arg0: BytesLike, overrides?: CallOverrides): Promise; + + denomination(overrides?: CallOverrides): Promise; + + currentRootIndex(overrides?: CallOverrides): Promise; + + updateVerifier( + _newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + deposit( + _commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + getLastRoot(overrides?: CallOverrides): Promise; + + roots(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; + + isSpent( + _nullifierHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + ZERO_VALUE(overrides?: CallOverrides): Promise; + + filledSubtrees( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + nextIndex(overrides?: CallOverrides): Promise; + + callStatic: { + changeOperator( + _newOperator: string, + overrides?: CallOverrides + ): Promise; + + nullifierHashes( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + withdraw( + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: CallOverrides + ): Promise; + + verifier(overrides?: CallOverrides): Promise; + + hashLeftRight( + _left: BytesLike, + _right: BytesLike, + overrides?: CallOverrides + ): Promise; + + FIELD_SIZE(overrides?: CallOverrides): Promise; + + levels(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise; + + commitments(arg0: BytesLike, overrides?: CallOverrides): Promise; + + denomination(overrides?: CallOverrides): Promise; + + currentRootIndex(overrides?: CallOverrides): Promise; + + updateVerifier( + _newVerifier: string, + overrides?: CallOverrides + ): Promise; + + deposit(_commitment: BytesLike, overrides?: CallOverrides): Promise; + + getLastRoot(overrides?: CallOverrides): Promise; + + roots(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; + + isSpent( + _nullifierHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + ZERO_VALUE(overrides?: CallOverrides): Promise; + + filledSubtrees( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + nextIndex(overrides?: CallOverrides): Promise; + }; + + filters: { + "Deposit(bytes32,uint32,uint256)"( + commitment?: BytesLike | null, + leafIndex?: null, + timestamp?: null + ): DepositEventFilter; + Deposit( + commitment?: BytesLike | null, + leafIndex?: null, + timestamp?: null + ): DepositEventFilter; + + "Withdrawal(address,bytes32,address,uint256)"( + to?: null, + nullifierHash?: null, + relayer?: string | null, + fee?: null + ): WithdrawalEventFilter; + Withdrawal( + to?: null, + nullifierHash?: null, + relayer?: string | null, + fee?: null + ): WithdrawalEventFilter; + }; + + estimateGas: { + changeOperator( + _newOperator: string, + overrides?: Overrides & { from?: string } + ): Promise; + + nullifierHashes( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + withdraw( + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + verifier(overrides?: CallOverrides): Promise; + + hashLeftRight( + _left: BytesLike, + _right: BytesLike, + overrides?: CallOverrides + ): Promise; + + FIELD_SIZE(overrides?: CallOverrides): Promise; + + levels(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + isKnownRoot( + _root: BytesLike, + overrides?: CallOverrides + ): Promise; + + commitments(arg0: BytesLike, overrides?: CallOverrides): Promise; + + denomination(overrides?: CallOverrides): Promise; + + currentRootIndex(overrides?: CallOverrides): Promise; + + updateVerifier( + _newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + deposit( + _commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + getLastRoot(overrides?: CallOverrides): Promise; + + roots(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; + + isSpent( + _nullifierHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + ZERO_VALUE(overrides?: CallOverrides): Promise; + + filledSubtrees( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + nextIndex(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + changeOperator( + _newOperator: string, + overrides?: Overrides & { from?: string } + ): Promise; + + nullifierHashes( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + withdraw( + _proof: BytesLike, + _root: BytesLike, + _nullifierHash: BytesLike, + _recipient: string, + _relayer: string, + _fee: BigNumberish, + _refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + verifier(overrides?: CallOverrides): Promise; + + hashLeftRight( + _left: BytesLike, + _right: BytesLike, + overrides?: CallOverrides + ): Promise; + + FIELD_SIZE(overrides?: CallOverrides): Promise; + + levels(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + isKnownRoot( + _root: BytesLike, + overrides?: CallOverrides + ): Promise; + + commitments( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + denomination(overrides?: CallOverrides): Promise; + + currentRootIndex(overrides?: CallOverrides): Promise; + + updateVerifier( + _newVerifier: string, + overrides?: Overrides & { from?: string } + ): Promise; + + deposit( + _commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } + ): Promise; + + getLastRoot(overrides?: CallOverrides): Promise; + + roots( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise; + + isSpent( + _nullifierHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + zeros( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + ZERO_VALUE(overrides?: CallOverrides): Promise; + + filledSubtrees( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + nextIndex(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/contracts/TornadoProxyABI.ts b/src/contracts/TornadoProxyABI.ts index 391e744..9b70751 100644 --- a/src/contracts/TornadoProxyABI.ts +++ b/src/contracts/TornadoProxyABI.ts @@ -13,73 +13,107 @@ import type { PopulatedTransaction, Signer, utils, -} from 'ethers'; -import type { FunctionFragment, Result } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; -import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "./common"; -export interface TornadoProxyABIInterface extends utils.Interface { +export interface TornadoProxyAbiInterface extends utils.Interface { functions: { - 'governance()': FunctionFragment; - 'instances(address)': FunctionFragment; - 'resolve(bytes32)': FunctionFragment; - 'tornadoTrees()': FunctionFragment; - 'deposit(address,bytes32)': FunctionFragment; - 'updateInstances(address,bool)': FunctionFragment; - 'withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)': FunctionFragment; + "governance()": FunctionFragment; + "instances(address)": FunctionFragment; + "resolve(bytes32)": FunctionFragment; + "tornadoTrees()": FunctionFragment; + "deposit(address,bytes32)": FunctionFragment; + "updateInstances(address,bool)": FunctionFragment; + "withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment; }; getFunction( - nameOrSignatureOrTopic: 'governance' | 'instances' | 'resolve' | 'tornadoTrees' | 'deposit' | 'updateInstances' | 'withdraw', + nameOrSignatureOrTopic: + | "governance" + | "instances" + | "resolve" + | "tornadoTrees" + | "deposit" + | "updateInstances" + | "withdraw" ): FunctionFragment; - encodeFunctionData(functionFragment: 'governance', values?: undefined): string; - encodeFunctionData(functionFragment: 'instances', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'resolve', values: [PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'tornadoTrees', values?: undefined): string; - encodeFunctionData(functionFragment: 'deposit', values: [PromiseOrValue, PromiseOrValue]): string; - encodeFunctionData(functionFragment: 'updateInstances', values: [PromiseOrValue, PromiseOrValue]): string; encodeFunctionData( - functionFragment: 'withdraw', + functionFragment: "governance", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "instances", values: [string]): string; + encodeFunctionData(functionFragment: "resolve", values: [BytesLike]): string; + encodeFunctionData( + functionFragment: "tornadoTrees", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "deposit", + values: [string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "updateInstances", + values: [string, boolean] + ): string; + encodeFunctionData( + functionFragment: "withdraw", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - ], + string, + BytesLike, + BytesLike, + BytesLike, + string, + string, + BigNumberish, + BigNumberish + ] ): string; - decodeFunctionResult(functionFragment: 'governance', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'instances', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'resolve', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'tornadoTrees', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'updateInstances', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result; + decodeFunctionResult(functionFragment: "governance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "instances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "resolve", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tornadoTrees", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateInstances", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; events: {}; } -export interface TornadoProxyABI extends BaseContract { +export interface TornadoProxyAbi extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; - interface: TornadoProxyABIInterface; + interface: TornadoProxyAbiInterface; queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined, + toBlock?: string | number | undefined ): Promise>; - listeners(eventFilter?: TypedEventFilter): Array>; + listeners( + eventFilter?: TypedEventFilter + ): Array>; listeners(eventName?: string): Array; - removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; @@ -89,92 +123,100 @@ export interface TornadoProxyABI extends BaseContract { functions: { governance(overrides?: CallOverrides): Promise<[string]>; - instances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + instances(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; - resolve(node: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + resolve(node: BytesLike, overrides?: CallOverrides): Promise<[string]>; tornadoTrees(overrides?: CallOverrides): Promise<[string]>; deposit( - tornado: PromiseOrValue, - commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; updateInstances( - instance: PromiseOrValue, - update: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + instance: string, + update: boolean, + overrides?: Overrides & { from?: string } ): Promise; withdraw( - tornado: PromiseOrValue, - proof: PromiseOrValue, - root: PromiseOrValue, - nullifierHash: PromiseOrValue, - recipient: PromiseOrValue, - relayer: PromiseOrValue, - fee: PromiseOrValue, - refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + proof: BytesLike, + root: BytesLike, + nullifierHash: BytesLike, + recipient: string, + relayer: string, + fee: BigNumberish, + refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; }; governance(overrides?: CallOverrides): Promise; - instances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + instances(arg0: string, overrides?: CallOverrides): Promise; - resolve(node: PromiseOrValue, overrides?: CallOverrides): Promise; + resolve(node: BytesLike, overrides?: CallOverrides): Promise; tornadoTrees(overrides?: CallOverrides): Promise; deposit( - tornado: PromiseOrValue, - commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; updateInstances( - instance: PromiseOrValue, - update: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + instance: string, + update: boolean, + overrides?: Overrides & { from?: string } ): Promise; withdraw( - tornado: PromiseOrValue, - proof: PromiseOrValue, - root: PromiseOrValue, - nullifierHash: PromiseOrValue, - recipient: PromiseOrValue, - relayer: PromiseOrValue, - fee: PromiseOrValue, - refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + proof: BytesLike, + root: BytesLike, + nullifierHash: BytesLike, + recipient: string, + relayer: string, + fee: BigNumberish, + refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; callStatic: { governance(overrides?: CallOverrides): Promise; - instances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + instances(arg0: string, overrides?: CallOverrides): Promise; - resolve(node: PromiseOrValue, overrides?: CallOverrides): Promise; + resolve(node: BytesLike, overrides?: CallOverrides): Promise; tornadoTrees(overrides?: CallOverrides): Promise; - deposit(tornado: PromiseOrValue, commitment: PromiseOrValue, overrides?: CallOverrides): Promise; + deposit( + tornado: string, + commitment: BytesLike, + overrides?: CallOverrides + ): Promise; - updateInstances(instance: PromiseOrValue, update: PromiseOrValue, overrides?: CallOverrides): Promise; + updateInstances( + instance: string, + update: boolean, + overrides?: CallOverrides + ): Promise; withdraw( - tornado: PromiseOrValue, - proof: PromiseOrValue, - root: PromiseOrValue, - nullifierHash: PromiseOrValue, - recipient: PromiseOrValue, - relayer: PromiseOrValue, - fee: PromiseOrValue, - refund: PromiseOrValue, - overrides?: CallOverrides, + tornado: string, + proof: BytesLike, + root: BytesLike, + nullifierHash: BytesLike, + recipient: string, + relayer: string, + fee: BigNumberish, + refund: BigNumberish, + overrides?: CallOverrides ): Promise; }; @@ -183,68 +225,74 @@ export interface TornadoProxyABI extends BaseContract { estimateGas: { governance(overrides?: CallOverrides): Promise; - instances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + instances(arg0: string, overrides?: CallOverrides): Promise; - resolve(node: PromiseOrValue, overrides?: CallOverrides): Promise; + resolve(node: BytesLike, overrides?: CallOverrides): Promise; tornadoTrees(overrides?: CallOverrides): Promise; deposit( - tornado: PromiseOrValue, - commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; updateInstances( - instance: PromiseOrValue, - update: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + instance: string, + update: boolean, + overrides?: Overrides & { from?: string } ): Promise; withdraw( - tornado: PromiseOrValue, - proof: PromiseOrValue, - root: PromiseOrValue, - nullifierHash: PromiseOrValue, - recipient: PromiseOrValue, - relayer: PromiseOrValue, - fee: PromiseOrValue, - refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + proof: BytesLike, + root: BytesLike, + nullifierHash: BytesLike, + recipient: string, + relayer: string, + fee: BigNumberish, + refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; }; populateTransaction: { governance(overrides?: CallOverrides): Promise; - instances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + instances( + arg0: string, + overrides?: CallOverrides + ): Promise; - resolve(node: PromiseOrValue, overrides?: CallOverrides): Promise; + resolve( + node: BytesLike, + overrides?: CallOverrides + ): Promise; tornadoTrees(overrides?: CallOverrides): Promise; deposit( - tornado: PromiseOrValue, - commitment: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + commitment: BytesLike, + overrides?: PayableOverrides & { from?: string } ): Promise; updateInstances( - instance: PromiseOrValue, - update: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, + instance: string, + update: boolean, + overrides?: Overrides & { from?: string } ): Promise; withdraw( - tornado: PromiseOrValue, - proof: PromiseOrValue, - root: PromiseOrValue, - nullifierHash: PromiseOrValue, - recipient: PromiseOrValue, - relayer: PromiseOrValue, - fee: PromiseOrValue, - refund: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue }, + tornado: string, + proof: BytesLike, + root: BytesLike, + nullifierHash: BytesLike, + recipient: string, + relayer: string, + fee: BigNumberish, + refund: BigNumberish, + overrides?: PayableOverrides & { from?: string } ): Promise; }; } diff --git a/src/contracts/common.ts b/src/contracts/common.ts index 35f31be..2fc40c7 100644 --- a/src/contracts/common.ts +++ b/src/contracts/common.ts @@ -1,14 +1,18 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { Listener } from '@ethersproject/providers'; -import type { Event, EventFilter } from 'ethers'; +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; -export interface TypedEvent = any, TArgsObject = any> extends Event { +export interface TypedEvent< + TArgsArray extends Array = any, + TArgsObject = any +> extends Event { args: TArgsArray & TArgsObject; } -export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter {} +export interface TypedEventFilter<_TEvent extends TypedEvent> + extends EventFilter {} export interface TypedListener { (...listenerArg: [...__TypechainArgsArray, TEvent]): void; @@ -17,7 +21,10 @@ export interface TypedListener { type __TypechainArgsArray = T extends TypedEvent ? U : never; export interface OnEvent { - (eventFilter: TypedEventFilter, listener: TypedListener): TRes; + ( + eventFilter: TypedEventFilter, + listener: TypedListener + ): TRes; (eventName: string, listener: Listener): TRes; } @@ -25,8 +32,13 @@ export type MinEthersFactory = { deploy(...a: ARGS[]): Promise; }; -export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; -export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; - -export type PromiseOrValue = T | Promise; +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; diff --git a/src/contracts/factories/AggregatorAbi__factory.ts b/src/contracts/factories/AggregatorAbi__factory.ts index 9b37297..33b66b9 100644 --- a/src/contracts/factories/AggregatorAbi__factory.ts +++ b/src/contracts/factories/AggregatorAbi__factory.ts @@ -2,351 +2,354 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { AggregatorAbi, AggregatorAbiInterface } from '../AggregatorAbi'; +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { AggregatorAbi, AggregatorAbiInterface } from "../AggregatorAbi"; const _abi = [ { inputs: [ { - internalType: 'contract MultiWrapper', - name: '_multiWrapper', - type: 'address', + internalType: "contract MultiWrapper", + name: "_multiWrapper", + type: "address", }, { - internalType: 'contract IOracle[]', - name: 'existingOracles', - type: 'address[]', + internalType: "contract IOracle[]", + name: "existingOracles", + type: "address[]", }, { - internalType: 'enum OffchainOracle.OracleType[]', - name: 'oracleTypes', - type: 'uint8[]', + internalType: "enum OffchainOracle.OracleType[]", + name: "oracleTypes", + type: "uint8[]", }, { - internalType: 'contract IERC20[]', - name: 'existingConnectors', - type: 'address[]', + internalType: "contract IERC20[]", + name: "existingConnectors", + type: "address[]", }, { - internalType: 'contract IERC20', - name: 'wBase', - type: 'address', + internalType: "contract IERC20", + name: "wBase", + type: "address", }, ], - stateMutability: 'nonpayable', - type: 'constructor', + stateMutability: "nonpayable", + type: "constructor", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'ConnectorAdded', - type: 'event', + name: "ConnectorAdded", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'ConnectorRemoved', - type: 'event', + name: "ConnectorRemoved", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract MultiWrapper', - name: 'multiWrapper', - type: 'address', + internalType: "contract MultiWrapper", + name: "multiWrapper", + type: "address", }, ], - name: 'MultiWrapperUpdated', - type: 'event', + name: "MultiWrapperUpdated", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { indexed: false, - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleType', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleType", + type: "uint8", }, ], - name: 'OracleAdded', - type: 'event', + name: "OracleAdded", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { indexed: false, - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleType', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleType", + type: "uint8", }, ], - name: 'OracleRemoved', - type: 'event', + name: "OracleRemoved", + type: "event", }, { anonymous: false, inputs: [ { indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', + internalType: "address", + name: "previousOwner", + type: "address", }, { indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', + internalType: "address", + name: "newOwner", + type: "address", }, ], - name: 'OwnershipTransferred', - type: 'event', + name: "OwnershipTransferred", + type: "event", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'addConnector', + name: "addConnector", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleKind', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleKind", + type: "uint8", }, ], - name: 'addOracle', + name: "addOracle", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: 'connectors', + name: "connectors", outputs: [ { - internalType: 'contract IERC20[]', - name: 'allConnectors', - type: 'address[]', + internalType: "contract IERC20[]", + name: "allConnectors", + type: "address[]", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'srcToken', - type: 'address', + internalType: "contract IERC20", + name: "srcToken", + type: "address", }, { - internalType: 'contract IERC20', - name: 'dstToken', - type: 'address', + internalType: "contract IERC20", + name: "dstToken", + type: "address", }, { - internalType: 'bool', - name: 'useWrappers', - type: 'bool', + internalType: "bool", + name: "useWrappers", + type: "bool", }, ], - name: 'getRate', + name: "getRate", outputs: [ { - internalType: 'uint256', - name: 'weightedRate', - type: 'uint256', + internalType: "uint256", + name: "weightedRate", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'srcToken', - type: 'address', + internalType: "contract IERC20", + name: "srcToken", + type: "address", }, { - internalType: 'bool', - name: 'useSrcWrappers', - type: 'bool', + internalType: "bool", + name: "useSrcWrappers", + type: "bool", }, ], - name: 'getRateToEth', + name: "getRateToEth", outputs: [ { - internalType: 'uint256', - name: 'weightedRate', - type: 'uint256', + internalType: "uint256", + name: "weightedRate", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'multiWrapper', + name: "multiWrapper", outputs: [ { - internalType: 'contract MultiWrapper', - name: '', - type: 'address', + internalType: "contract MultiWrapper", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'oracles', + name: "oracles", outputs: [ { - internalType: 'contract IOracle[]', - name: 'allOracles', - type: 'address[]', + internalType: "contract IOracle[]", + name: "allOracles", + type: "address[]", }, { - internalType: 'enum OffchainOracle.OracleType[]', - name: 'oracleTypes', - type: 'uint8[]', + internalType: "enum OffchainOracle.OracleType[]", + name: "oracleTypes", + type: "uint8[]", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'owner', + name: "owner", outputs: [ { - internalType: 'address', - name: '', - type: 'address', + internalType: "address", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'removeConnector', + name: "removeConnector", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleKind', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleKind", + type: "uint8", }, ], - name: 'removeOracle', + name: "removeOracle", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: 'renounceOwnership', + name: "renounceOwnership", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract MultiWrapper', - name: '_multiWrapper', - type: 'address', + internalType: "contract MultiWrapper", + name: "_multiWrapper", + type: "address", }, ], - name: 'setMultiWrapper', + name: "setMultiWrapper", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'address', - name: 'newOwner', - type: 'address', + internalType: "address", + name: "newOwner", + type: "address", }, ], - name: 'transferOwnership', + name: "transferOwnership", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, -]; +] as const; export class AggregatorAbi__factory { static readonly abi = _abi; static createInterface(): AggregatorAbiInterface { return new utils.Interface(_abi) as AggregatorAbiInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): AggregatorAbi { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AggregatorAbi { return new Contract(address, _abi, signerOrProvider) as AggregatorAbi; } } diff --git a/src/contracts/factories/ERC20Abi__factory.ts b/src/contracts/factories/ERC20Abi__factory.ts index 2d27531..4b1b73b 100644 --- a/src/contracts/factories/ERC20Abi__factory.ts +++ b/src/contracts/factories/ERC20Abi__factory.ts @@ -2,273 +2,276 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { ERC20Abi, ERC20AbiInterface } from '../ERC20Abi'; +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { ERC20Abi, ERC20AbiInterface } from "../ERC20Abi"; const _abi = [ { constant: true, inputs: [], - name: 'totalSupply', + name: "totalSupply", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], payable: false, - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { constant: true, inputs: [], - name: '_totalSupply', + name: "_totalSupply", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], payable: false, - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { constant: true, inputs: [ { - internalType: 'address', - name: 'who', - type: 'address', + internalType: "address", + name: "who", + type: "address", }, ], - name: 'balanceOf', + name: "balanceOf", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], payable: false, - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { constant: false, inputs: [ { - internalType: 'address', - name: 'to', - type: 'address', + internalType: "address", + name: "to", + type: "address", }, { - internalType: 'uint256', - name: 'value', - type: 'uint256', + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: 'transfer', + name: "transfer", outputs: [], payable: false, - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { anonymous: false, inputs: [ { indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', + internalType: "address", + name: "owner", + type: "address", }, { indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', + internalType: "address", + name: "spender", + type: "address", }, { indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: 'Approval', - type: 'event', + name: "Approval", + type: "event", }, { anonymous: false, inputs: [ { indexed: true, - internalType: 'address', - name: 'from', - type: 'address', + internalType: "address", + name: "from", + type: "address", }, { indexed: true, - internalType: 'address', - name: 'to', - type: 'address', + internalType: "address", + name: "to", + type: "address", }, { indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: 'Transfer', - type: 'event', + name: "Transfer", + type: "event", }, { constant: true, inputs: [ { - internalType: 'address', - name: 'owner', - type: 'address', + internalType: "address", + name: "owner", + type: "address", }, { - internalType: 'address', - name: 'spender', - type: 'address', + internalType: "address", + name: "spender", + type: "address", }, ], - name: 'allowance', + name: "allowance", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], payable: false, - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { constant: false, inputs: [ { - internalType: 'address', - name: 'from', - type: 'address', + internalType: "address", + name: "from", + type: "address", }, { - internalType: 'address', - name: 'to', - type: 'address', + internalType: "address", + name: "to", + type: "address", }, { - internalType: 'uint256', - name: 'value', - type: 'uint256', + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: 'transferFrom', + name: "transferFrom", outputs: [], payable: false, - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { constant: false, inputs: [ { - internalType: 'address', - name: 'spender', - type: 'address', + internalType: "address", + name: "spender", + type: "address", }, { - internalType: 'uint256', - name: 'value', - type: 'uint256', + internalType: "uint256", + name: "value", + type: "uint256", }, ], - name: 'approve', + name: "approve", outputs: [], payable: false, - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'address', - name: 'owner', - type: 'address', + internalType: "address", + name: "owner", + type: "address", }, ], - name: 'nonces', + name: "nonces", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'address', - name: 'owner', - type: 'address', + internalType: "address", + name: "owner", + type: "address", }, { - internalType: 'address', - name: 'spender', - type: 'address', + internalType: "address", + name: "spender", + type: "address", }, { - internalType: 'uint256', - name: 'amount', - type: 'uint256', + internalType: "uint256", + name: "amount", + type: "uint256", }, { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', + internalType: "uint256", + name: "deadline", + type: "uint256", }, { - internalType: 'uint8', - name: 'v', - type: 'uint8', + internalType: "uint8", + name: "v", + type: "uint8", }, { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', + internalType: "bytes32", + name: "r", + type: "bytes32", }, { - internalType: 'bytes32', - name: 's', - type: 'bytes32', + internalType: "bytes32", + name: "s", + type: "bytes32", }, ], - name: 'permit', + name: "permit", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, -]; +] as const; export class ERC20Abi__factory { static readonly abi = _abi; static createInterface(): ERC20AbiInterface { return new utils.Interface(_abi) as ERC20AbiInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): ERC20Abi { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20Abi { return new Contract(address, _abi, signerOrProvider) as ERC20Abi; } } diff --git a/src/contracts/factories/MulticallAbi__factory.ts b/src/contracts/factories/MulticallAbi__factory.ts index 042c343..7fda4e1 100644 --- a/src/contracts/factories/MulticallAbi__factory.ts +++ b/src/contracts/factories/MulticallAbi__factory.ts @@ -2,9 +2,9 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { MulticallAbi, MulticallAbiInterface } from '../MulticallAbi'; +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { MulticallAbi, MulticallAbiInterface } from "../MulticallAbi"; const _abi = [ { @@ -12,45 +12,48 @@ const _abi = [ { components: [ { - internalType: 'address', - name: 'to', - type: 'address', + internalType: "address", + name: "to", + type: "address", }, { - internalType: 'bytes', - name: 'data', - type: 'bytes', + internalType: "bytes", + name: "data", + type: "bytes", }, ], - internalType: 'struct MultiCall.Call[]', - name: 'calls', - type: 'tuple[]', + internalType: "struct MultiCall.Call[]", + name: "calls", + type: "tuple[]", }, ], - name: 'multicall', + name: "multicall", outputs: [ { - internalType: 'bytes[]', - name: 'results', - type: 'bytes[]', + internalType: "bytes[]", + name: "results", + type: "bytes[]", }, { - internalType: 'bool[]', - name: 'success', - type: 'bool[]', + internalType: "bool[]", + name: "success", + type: "bool[]", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, -]; +] as const; export class MulticallAbi__factory { static readonly abi = _abi; static createInterface(): MulticallAbiInterface { return new utils.Interface(_abi) as MulticallAbiInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): MulticallAbi { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): MulticallAbi { return new Contract(address, _abi, signerOrProvider) as MulticallAbi; } } diff --git a/src/contracts/factories/OffchainOracleAbi__factory.ts b/src/contracts/factories/OffchainOracleAbi__factory.ts index 33c10fb..45fc139 100644 --- a/src/contracts/factories/OffchainOracleAbi__factory.ts +++ b/src/contracts/factories/OffchainOracleAbi__factory.ts @@ -2,351 +2,357 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { OffchainOracleAbi, OffchainOracleAbiInterface } from '../OffchainOracleAbi'; +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + OffchainOracleAbi, + OffchainOracleAbiInterface, +} from "../OffchainOracleAbi"; const _abi = [ { inputs: [ { - internalType: 'contract MultiWrapper', - name: '_multiWrapper', - type: 'address', + internalType: "contract MultiWrapper", + name: "_multiWrapper", + type: "address", }, { - internalType: 'contract IOracle[]', - name: 'existingOracles', - type: 'address[]', + internalType: "contract IOracle[]", + name: "existingOracles", + type: "address[]", }, { - internalType: 'enum OffchainOracle.OracleType[]', - name: 'oracleTypes', - type: 'uint8[]', + internalType: "enum OffchainOracle.OracleType[]", + name: "oracleTypes", + type: "uint8[]", }, { - internalType: 'contract IERC20[]', - name: 'existingConnectors', - type: 'address[]', + internalType: "contract IERC20[]", + name: "existingConnectors", + type: "address[]", }, { - internalType: 'contract IERC20', - name: 'wBase', - type: 'address', + internalType: "contract IERC20", + name: "wBase", + type: "address", }, ], - stateMutability: 'nonpayable', - type: 'constructor', + stateMutability: "nonpayable", + type: "constructor", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'ConnectorAdded', - type: 'event', + name: "ConnectorAdded", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'ConnectorRemoved', - type: 'event', + name: "ConnectorRemoved", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract MultiWrapper', - name: 'multiWrapper', - type: 'address', + internalType: "contract MultiWrapper", + name: "multiWrapper", + type: "address", }, ], - name: 'MultiWrapperUpdated', - type: 'event', + name: "MultiWrapperUpdated", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { indexed: false, - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleType', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleType", + type: "uint8", }, ], - name: 'OracleAdded', - type: 'event', + name: "OracleAdded", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { indexed: false, - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleType', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleType", + type: "uint8", }, ], - name: 'OracleRemoved', - type: 'event', + name: "OracleRemoved", + type: "event", }, { anonymous: false, inputs: [ { indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', + internalType: "address", + name: "previousOwner", + type: "address", }, { indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', + internalType: "address", + name: "newOwner", + type: "address", }, ], - name: 'OwnershipTransferred', - type: 'event', + name: "OwnershipTransferred", + type: "event", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'addConnector', + name: "addConnector", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleKind', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleKind", + type: "uint8", }, ], - name: 'addOracle', + name: "addOracle", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: 'connectors', + name: "connectors", outputs: [ { - internalType: 'contract IERC20[]', - name: 'allConnectors', - type: 'address[]', + internalType: "contract IERC20[]", + name: "allConnectors", + type: "address[]", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'srcToken', - type: 'address', + internalType: "contract IERC20", + name: "srcToken", + type: "address", }, { - internalType: 'contract IERC20', - name: 'dstToken', - type: 'address', + internalType: "contract IERC20", + name: "dstToken", + type: "address", }, { - internalType: 'bool', - name: 'useWrappers', - type: 'bool', + internalType: "bool", + name: "useWrappers", + type: "bool", }, ], - name: 'getRate', + name: "getRate", outputs: [ { - internalType: 'uint256', - name: 'weightedRate', - type: 'uint256', + internalType: "uint256", + name: "weightedRate", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'srcToken', - type: 'address', + internalType: "contract IERC20", + name: "srcToken", + type: "address", }, { - internalType: 'bool', - name: 'useSrcWrappers', - type: 'bool', + internalType: "bool", + name: "useSrcWrappers", + type: "bool", }, ], - name: 'getRateToEth', + name: "getRateToEth", outputs: [ { - internalType: 'uint256', - name: 'weightedRate', - type: 'uint256', + internalType: "uint256", + name: "weightedRate", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'multiWrapper', + name: "multiWrapper", outputs: [ { - internalType: 'contract MultiWrapper', - name: '', - type: 'address', + internalType: "contract MultiWrapper", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'oracles', + name: "oracles", outputs: [ { - internalType: 'contract IOracle[]', - name: 'allOracles', - type: 'address[]', + internalType: "contract IOracle[]", + name: "allOracles", + type: "address[]", }, { - internalType: 'enum OffchainOracle.OracleType[]', - name: 'oracleTypes', - type: 'uint8[]', + internalType: "enum OffchainOracle.OracleType[]", + name: "oracleTypes", + type: "uint8[]", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'owner', + name: "owner", outputs: [ { - internalType: 'address', - name: '', - type: 'address', + internalType: "address", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract IERC20', - name: 'connector', - type: 'address', + internalType: "contract IERC20", + name: "connector", + type: "address", }, ], - name: 'removeConnector', + name: "removeConnector", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract IOracle', - name: 'oracle', - type: 'address', + internalType: "contract IOracle", + name: "oracle", + type: "address", }, { - internalType: 'enum OffchainOracle.OracleType', - name: 'oracleKind', - type: 'uint8', + internalType: "enum OffchainOracle.OracleType", + name: "oracleKind", + type: "uint8", }, ], - name: 'removeOracle', + name: "removeOracle", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: 'renounceOwnership', + name: "renounceOwnership", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract MultiWrapper', - name: '_multiWrapper', - type: 'address', + internalType: "contract MultiWrapper", + name: "_multiWrapper", + type: "address", }, ], - name: 'setMultiWrapper', + name: "setMultiWrapper", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'address', - name: 'newOwner', - type: 'address', + internalType: "address", + name: "newOwner", + type: "address", }, ], - name: 'transferOwnership', + name: "transferOwnership", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, -]; +] as const; export class OffchainOracleAbi__factory { static readonly abi = _abi; static createInterface(): OffchainOracleAbiInterface { return new utils.Interface(_abi) as OffchainOracleAbiInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): OffchainOracleAbi { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OffchainOracleAbi { return new Contract(address, _abi, signerOrProvider) as OffchainOracleAbi; } } diff --git a/src/contracts/factories/OvmGasPriceOracleABI__factory.ts b/src/contracts/factories/OvmGasPriceOracleABI__factory.ts index 183a7e6..ce139df 100644 --- a/src/contracts/factories/OvmGasPriceOracleABI__factory.ts +++ b/src/contracts/factories/OvmGasPriceOracleABI__factory.ts @@ -2,315 +2,325 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { OvmGasPriceOracleABI, OvmGasPriceOracleABIInterface } from '../OvmGasPriceOracleABI'; +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + OvmGasPriceOracleAbi, + OvmGasPriceOracleAbiInterface, +} from "../OvmGasPriceOracleAbi"; const _abi = [ { inputs: [ { - internalType: 'address', - name: '_owner', - type: 'address', + internalType: "address", + name: "_owner", + type: "address", }, ], - stateMutability: 'nonpayable', - type: 'constructor', + stateMutability: "nonpayable", + type: "constructor", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: 'DecimalsUpdated', - type: 'event', + name: "DecimalsUpdated", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: 'GasPriceUpdated', - type: 'event', + name: "GasPriceUpdated", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: 'L1BaseFeeUpdated', - type: 'event', + name: "L1BaseFeeUpdated", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: 'OverheadUpdated', - type: 'event', + name: "OverheadUpdated", + type: "event", }, { anonymous: false, inputs: [ { indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', + internalType: "address", + name: "previousOwner", + type: "address", }, { indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', + internalType: "address", + name: "newOwner", + type: "address", }, ], - name: 'OwnershipTransferred', - type: 'event', + name: "OwnershipTransferred", + type: "event", }, { anonymous: false, inputs: [ { indexed: false, - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: 'ScalarUpdated', - type: 'event', + name: "ScalarUpdated", + type: "event", }, { inputs: [], - name: 'decimals', + name: "decimals", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'gasPrice', + name: "gasPrice", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'bytes', - name: '_data', - type: 'bytes', + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: 'getL1Fee', + name: "getL1Fee", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'bytes', - name: '_data', - type: 'bytes', + internalType: "bytes", + name: "_data", + type: "bytes", }, ], - name: 'getL1GasUsed', + name: "getL1GasUsed", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'l1BaseFee', + name: "l1BaseFee", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'overhead', + name: "overhead", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'owner', + name: "owner", outputs: [ { - internalType: 'address', - name: '', - type: 'address', + internalType: "address", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'renounceOwnership', + name: "renounceOwnership", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [], - name: 'scalar', + name: "scalar", outputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: "uint256", + name: "", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'uint256', - name: '_decimals', - type: 'uint256', + internalType: "uint256", + name: "_decimals", + type: "uint256", }, ], - name: 'setDecimals', + name: "setDecimals", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'uint256', - name: '_gasPrice', - type: 'uint256', + internalType: "uint256", + name: "_gasPrice", + type: "uint256", }, ], - name: 'setGasPrice', + name: "setGasPrice", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'uint256', - name: '_baseFee', - type: 'uint256', + internalType: "uint256", + name: "_baseFee", + type: "uint256", }, ], - name: 'setL1BaseFee', + name: "setL1BaseFee", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'uint256', - name: '_overhead', - type: 'uint256', + internalType: "uint256", + name: "_overhead", + type: "uint256", }, ], - name: 'setOverhead', + name: "setOverhead", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'uint256', - name: '_scalar', - type: 'uint256', + internalType: "uint256", + name: "_scalar", + type: "uint256", }, ], - name: 'setScalar', + name: "setScalar", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'address', - name: 'newOwner', - type: 'address', + internalType: "address", + name: "newOwner", + type: "address", }, ], - name: 'transferOwnership', + name: "transferOwnership", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, -]; +] as const; -export class OvmGasPriceOracleABI__factory { +export class OvmGasPriceOracleAbi__factory { static readonly abi = _abi; - static createInterface(): OvmGasPriceOracleABIInterface { - return new utils.Interface(_abi) as OvmGasPriceOracleABIInterface; + static createInterface(): OvmGasPriceOracleAbiInterface { + return new utils.Interface(_abi) as OvmGasPriceOracleAbiInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): OvmGasPriceOracleABI { - return new Contract(address, _abi, signerOrProvider) as OvmGasPriceOracleABI; + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OvmGasPriceOracleAbi { + return new Contract( + address, + _abi, + signerOrProvider + ) as OvmGasPriceOracleAbi; } } diff --git a/src/contracts/factories/ProxyLightABI__factory.ts b/src/contracts/factories/ProxyLightABI__factory.ts index f121cd4..1192b6a 100644 --- a/src/contracts/factories/ProxyLightABI__factory.ts +++ b/src/contracts/factories/ProxyLightABI__factory.ts @@ -2,9 +2,9 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { ProxyLightABI, ProxyLightABIInterface } from '../ProxyLightABI'; +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { ProxyLightAbi, ProxyLightAbiInterface } from "../ProxyLightAbi"; const _abi = [ { @@ -12,112 +12,115 @@ const _abi = [ inputs: [ { indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', + internalType: "address", + name: "sender", + type: "address", }, { indexed: false, - internalType: 'bytes', - name: 'encryptedNote', - type: 'bytes', + internalType: "bytes", + name: "encryptedNote", + type: "bytes", }, ], - name: 'EncryptedNote', - type: 'event', + name: "EncryptedNote", + type: "event", }, { inputs: [ { - internalType: 'bytes[]', - name: '_encryptedNotes', - type: 'bytes[]', + internalType: "bytes[]", + name: "_encryptedNotes", + type: "bytes[]", }, ], - name: 'backupNotes', + name: "backupNotes", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract ITornadoInstance', - name: '_tornado', - type: 'address', + internalType: "contract ITornadoInstance", + name: "_tornado", + type: "address", }, { - internalType: 'bytes32', - name: '_commitment', - type: 'bytes32', + internalType: "bytes32", + name: "_commitment", + type: "bytes32", }, { - internalType: 'bytes', - name: '_encryptedNote', - type: 'bytes', + internalType: "bytes", + name: "_encryptedNote", + type: "bytes", }, ], - name: 'deposit', + name: "deposit", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, { inputs: [ { - internalType: 'contract ITornadoInstance', - name: '_tornado', - type: 'address', + internalType: "contract ITornadoInstance", + name: "_tornado", + type: "address", }, { - internalType: 'bytes', - name: '_proof', - type: 'bytes', + internalType: "bytes", + name: "_proof", + type: "bytes", }, { - internalType: 'bytes32', - name: '_root', - type: 'bytes32', + internalType: "bytes32", + name: "_root", + type: "bytes32", }, { - internalType: 'bytes32', - name: '_nullifierHash', - type: 'bytes32', + internalType: "bytes32", + name: "_nullifierHash", + type: "bytes32", }, { - internalType: 'address payable', - name: '_recipient', - type: 'address', + internalType: "address payable", + name: "_recipient", + type: "address", }, { - internalType: 'address payable', - name: '_relayer', - type: 'address', + internalType: "address payable", + name: "_relayer", + type: "address", }, { - internalType: 'uint256', - name: '_fee', - type: 'uint256', + internalType: "uint256", + name: "_fee", + type: "uint256", }, { - internalType: 'uint256', - name: '_refund', - type: 'uint256', + internalType: "uint256", + name: "_refund", + type: "uint256", }, ], - name: 'withdraw', + name: "withdraw", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, -]; +] as const; -export class ProxyLightABI__factory { +export class ProxyLightAbi__factory { static readonly abi = _abi; - static createInterface(): ProxyLightABIInterface { - return new utils.Interface(_abi) as ProxyLightABIInterface; + static createInterface(): ProxyLightAbiInterface { + return new utils.Interface(_abi) as ProxyLightAbiInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): ProxyLightABI { - return new Contract(address, _abi, signerOrProvider) as ProxyLightABI; + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ProxyLightAbi { + return new Contract(address, _abi, signerOrProvider) as ProxyLightAbi; } } diff --git a/src/contracts/factories/TornadoABI__factory.ts b/src/contracts/factories/TornadoABI__factory.ts deleted file mode 100644 index aa7f4b3..0000000 --- a/src/contracts/factories/TornadoABI__factory.ts +++ /dev/null @@ -1,516 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { TornadoABI, TornadoABIInterface } from '../TornadoABI'; - -const _abi = [ - { - constant: false, - inputs: [ - { - internalType: 'address', - name: '_newOperator', - type: 'address', - }, - ], - name: 'changeOperator', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'nullifierHashes', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'bytes', - name: '_proof', - type: 'bytes', - }, - { - internalType: 'bytes32', - name: '_root', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: '_nullifierHash', - type: 'bytes32', - }, - { - internalType: 'address payable', - name: '_recipient', - type: 'address', - }, - { - internalType: 'address payable', - name: '_relayer', - type: 'address', - }, - { - internalType: 'uint256', - name: '_fee', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_refund', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'verifier', - outputs: [ - { - internalType: 'contract IVerifier', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'bytes32', - name: '_left', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: '_right', - type: 'bytes32', - }, - ], - name: 'hashLeftRight', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'FIELD_SIZE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'levels', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'operator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'bytes32', - name: '_root', - type: 'bytes32', - }, - ], - name: 'isKnownRoot', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'commitments', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'denomination', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'currentRootIndex', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: '_newVerifier', - type: 'address', - }, - ], - name: 'updateVerifier', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'bytes32', - name: '_commitment', - type: 'bytes32', - }, - ], - name: 'deposit', - outputs: [], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getLastRoot', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'roots', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'ROOT_HISTORY_SIZE', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'bytes32', - name: '_nullifierHash', - type: 'bytes32', - }, - ], - name: 'isSpent', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'zeros', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'ZERO_VALUE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'filledSubtrees', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'nextIndex', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IVerifier', - name: '_verifier', - type: 'address', - }, - { - internalType: 'uint256', - name: '_denomination', - type: 'uint256', - }, - { - internalType: 'uint32', - name: '_merkleTreeHeight', - type: 'uint32', - }, - { - internalType: 'address', - name: '_operator', - type: 'address', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'commitment', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'uint32', - name: 'leafIndex', - type: 'uint32', - }, - { - indexed: false, - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'nullifierHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'relayer', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'Withdrawal', - type: 'event', - }, -]; - -export class TornadoABI__factory { - static readonly abi = _abi; - static createInterface(): TornadoABIInterface { - return new utils.Interface(_abi) as TornadoABIInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): TornadoABI { - return new Contract(address, _abi, signerOrProvider) as TornadoABI; - } -} diff --git a/src/contracts/factories/TornadoInstanceAbi__factory.ts b/src/contracts/factories/TornadoInstanceAbi__factory.ts new file mode 100644 index 0000000..d32574f --- /dev/null +++ b/src/contracts/factories/TornadoInstanceAbi__factory.ts @@ -0,0 +1,522 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + TornadoInstanceAbi, + TornadoInstanceAbiInterface, +} from "../TornadoInstanceAbi"; + +const _abi = [ + { + constant: false, + inputs: [ + { + internalType: "address", + name: "_newOperator", + type: "address", + }, + ], + name: "changeOperator", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "nullifierHashes", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "bytes", + name: "_proof", + type: "bytes", + }, + { + internalType: "bytes32", + name: "_root", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_nullifierHash", + type: "bytes32", + }, + { + internalType: "address payable", + name: "_recipient", + type: "address", + }, + { + internalType: "address payable", + name: "_relayer", + type: "address", + }, + { + internalType: "uint256", + name: "_fee", + type: "uint256", + }, + { + internalType: "uint256", + name: "_refund", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "verifier", + outputs: [ + { + internalType: "contract IVerifier", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "_left", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_right", + type: "bytes32", + }, + ], + name: "hashLeftRight", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "pure", + type: "function", + }, + { + constant: true, + inputs: [], + name: "FIELD_SIZE", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "levels", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "operator", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "_root", + type: "bytes32", + }, + ], + name: "isKnownRoot", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "commitments", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "denomination", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "currentRootIndex", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "_newVerifier", + type: "address", + }, + ], + name: "updateVerifier", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "bytes32", + name: "_commitment", + type: "bytes32", + }, + ], + name: "deposit", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getLastRoot", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "roots", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "ROOT_HISTORY_SIZE", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "_nullifierHash", + type: "bytes32", + }, + ], + name: "isSpent", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "zeros", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "ZERO_VALUE", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "filledSubtrees", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "nextIndex", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IVerifier", + name: "_verifier", + type: "address", + }, + { + internalType: "uint256", + name: "_denomination", + type: "uint256", + }, + { + internalType: "uint32", + name: "_merkleTreeHeight", + type: "uint32", + }, + { + internalType: "address", + name: "_operator", + type: "address", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint32", + name: "leafIndex", + type: "uint32", + }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "nullifierHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "relayer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, +] as const; + +export class TornadoInstanceAbi__factory { + static readonly abi = _abi; + static createInterface(): TornadoInstanceAbiInterface { + return new utils.Interface(_abi) as TornadoInstanceAbiInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TornadoInstanceAbi { + return new Contract(address, _abi, signerOrProvider) as TornadoInstanceAbi; + } +} diff --git a/src/contracts/factories/TornadoProxyABI__factory.ts b/src/contracts/factories/TornadoProxyABI__factory.ts index dffc888..07e3293 100644 --- a/src/contracts/factories/TornadoProxyABI__factory.ts +++ b/src/contracts/factories/TornadoProxyABI__factory.ts @@ -2,188 +2,194 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from 'ethers'; -import type { Provider } from '@ethersproject/providers'; -import type { TornadoProxyABI, TornadoProxyABIInterface } from '../TornadoProxyABI'; +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + TornadoProxyAbi, + TornadoProxyAbiInterface, +} from "../TornadoProxyAbi"; const _abi = [ { inputs: [ { - internalType: 'bytes32', - name: '_tornadoTrees', - type: 'bytes32', + internalType: "bytes32", + name: "_tornadoTrees", + type: "bytes32", }, { - internalType: 'bytes32', - name: '_governance', - type: 'bytes32', + internalType: "bytes32", + name: "_governance", + type: "bytes32", }, { - internalType: 'contract ITornado[]', - name: '_instances', - type: 'address[]', + internalType: "contract ITornado[]", + name: "_instances", + type: "address[]", }, ], - stateMutability: 'nonpayable', - type: 'constructor', + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], - name: 'governance', + name: "governance", outputs: [ { - internalType: 'address', - name: '', - type: 'address', + internalType: "address", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract ITornado', - name: '', - type: 'address', + internalType: "contract ITornado", + name: "", + type: "address", }, ], - name: 'instances', + name: "instances", outputs: [ { - internalType: 'bool', - name: '', - type: 'bool', + internalType: "bool", + name: "", + type: "bool", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'bytes32', - name: 'node', - type: 'bytes32', + internalType: "bytes32", + name: "node", + type: "bytes32", }, ], - name: 'resolve', + name: "resolve", outputs: [ { - internalType: 'address', - name: '', - type: 'address', + internalType: "address", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [], - name: 'tornadoTrees', + name: "tornadoTrees", outputs: [ { - internalType: 'contract ITornadoTrees', - name: '', - type: 'address', + internalType: "contract ITornadoTrees", + name: "", + type: "address", }, ], - stateMutability: 'view', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { - internalType: 'contract ITornado', - name: 'tornado', - type: 'address', + internalType: "contract ITornado", + name: "tornado", + type: "address", }, { - internalType: 'bytes32', - name: 'commitment', - type: 'bytes32', + internalType: "bytes32", + name: "commitment", + type: "bytes32", }, ], - name: 'deposit', + name: "deposit", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, { inputs: [ { - internalType: 'contract ITornado', - name: 'instance', - type: 'address', + internalType: "contract ITornado", + name: "instance", + type: "address", }, { - internalType: 'bool', - name: 'update', - type: 'bool', + internalType: "bool", + name: "update", + type: "bool", }, ], - name: 'updateInstances', + name: "updateInstances", outputs: [], - stateMutability: 'nonpayable', - type: 'function', + stateMutability: "nonpayable", + type: "function", }, { inputs: [ { - internalType: 'contract ITornado', - name: 'tornado', - type: 'address', + internalType: "contract ITornado", + name: "tornado", + type: "address", }, { - internalType: 'bytes', - name: 'proof', - type: 'bytes', + internalType: "bytes", + name: "proof", + type: "bytes", }, { - internalType: 'bytes32', - name: 'root', - type: 'bytes32', + internalType: "bytes32", + name: "root", + type: "bytes32", }, { - internalType: 'bytes32', - name: 'nullifierHash', - type: 'bytes32', + internalType: "bytes32", + name: "nullifierHash", + type: "bytes32", }, { - internalType: 'address payable', - name: 'recipient', - type: 'address', + internalType: "address payable", + name: "recipient", + type: "address", }, { - internalType: 'address payable', - name: 'relayer', - type: 'address', + internalType: "address payable", + name: "relayer", + type: "address", }, { - internalType: 'uint256', - name: 'fee', - type: 'uint256', + internalType: "uint256", + name: "fee", + type: "uint256", }, { - internalType: 'uint256', - name: 'refund', - type: 'uint256', + internalType: "uint256", + name: "refund", + type: "uint256", }, ], - name: 'withdraw', + name: "withdraw", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, -]; +] as const; -export class TornadoProxyABI__factory { +export class TornadoProxyAbi__factory { static readonly abi = _abi; - static createInterface(): TornadoProxyABIInterface { - return new utils.Interface(_abi) as TornadoProxyABIInterface; + static createInterface(): TornadoProxyAbiInterface { + return new utils.Interface(_abi) as TornadoProxyAbiInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): TornadoProxyABI { - return new Contract(address, _abi, signerOrProvider) as TornadoProxyABI; + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TornadoProxyAbi { + return new Contract(address, _abi, signerOrProvider) as TornadoProxyAbi; } } diff --git a/src/contracts/factories/index.ts b/src/contracts/factories/index.ts index cce8806..9f71a6a 100644 --- a/src/contracts/factories/index.ts +++ b/src/contracts/factories/index.ts @@ -1,11 +1,11 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -export { AggregatorAbi__factory } from './AggregatorAbi__factory'; -export { ERC20Abi__factory } from './ERC20Abi__factory'; -export { MulticallAbi__factory } from './MulticallAbi__factory'; -export { OffchainOracleAbi__factory } from './OffchainOracleAbi__factory'; -export { OvmGasPriceOracleABI__factory } from './OvmGasPriceOracleABI__factory'; -export { ProxyLightABI__factory } from './ProxyLightABI__factory'; -export { TornadoABI__factory } from './TornadoABI__factory'; -export { TornadoProxyABI__factory } from './TornadoProxyABI__factory'; +export { AggregatorAbi__factory } from "./AggregatorAbi__factory"; +export { ERC20Abi__factory } from "./ERC20Abi__factory"; +export { MulticallAbi__factory } from "./MulticallAbi__factory"; +export { OffchainOracleAbi__factory } from "./OffchainOracleAbi__factory"; +export { OvmGasPriceOracleAbi__factory } from "./OvmGasPriceOracleAbi__factory"; +export { ProxyLightAbi__factory } from "./ProxyLightAbi__factory"; +export { TornadoInstanceAbi__factory } from "./TornadoInstanceAbi__factory"; +export { TornadoProxyAbi__factory } from "./TornadoProxyAbi__factory"; diff --git a/src/contracts/index.ts b/src/contracts/index.ts index 518ebed..6fece1b 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -1,20 +1,20 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -export type { AggregatorAbi } from './AggregatorAbi'; -export type { ERC20Abi } from './ERC20Abi'; -export type { MulticallAbi } from './MulticallAbi'; -export type { OffchainOracleAbi } from './OffchainOracleAbi'; -export type { OvmGasPriceOracleABI } from './OvmGasPriceOracleABI'; -export type { ProxyLightABI } from './ProxyLightABI'; -export type { TornadoABI } from './TornadoABI'; -export type { TornadoProxyABI } from './TornadoProxyABI'; -export * as factories from './factories'; -export { AggregatorAbi__factory } from './factories/AggregatorAbi__factory'; -export { ERC20Abi__factory } from './factories/ERC20Abi__factory'; -export { MulticallAbi__factory } from './factories/MulticallAbi__factory'; -export { OffchainOracleAbi__factory } from './factories/OffchainOracleAbi__factory'; -export { OvmGasPriceOracleABI__factory } from './factories/OvmGasPriceOracleABI__factory'; -export { ProxyLightABI__factory } from './factories/ProxyLightABI__factory'; -export { TornadoABI__factory } from './factories/TornadoABI__factory'; -export { TornadoProxyABI__factory } from './factories/TornadoProxyABI__factory'; +export type { AggregatorAbi } from "./AggregatorAbi"; +export type { ERC20Abi } from "./ERC20Abi"; +export type { MulticallAbi } from "./MulticallAbi"; +export type { OffchainOracleAbi } from "./OffchainOracleAbi"; +export type { OvmGasPriceOracleAbi } from "./OvmGasPriceOracleAbi"; +export type { ProxyLightAbi } from "./ProxyLightAbi"; +export type { TornadoInstanceAbi } from "./TornadoInstanceAbi"; +export type { TornadoProxyAbi } from "./TornadoProxyAbi"; +export * as factories from "./factories"; +export { AggregatorAbi__factory } from "./factories/AggregatorAbi__factory"; +export { ERC20Abi__factory } from "./factories/ERC20Abi__factory"; +export { MulticallAbi__factory } from "./factories/MulticallAbi__factory"; +export { OffchainOracleAbi__factory } from "./factories/OffchainOracleAbi__factory"; +export { OvmGasPriceOracleAbi__factory } from "./factories/OvmGasPriceOracleAbi__factory"; +export { ProxyLightAbi__factory } from "./factories/ProxyLightAbi__factory"; +export { TornadoInstanceAbi__factory } from "./factories/TornadoInstanceAbi__factory"; +export { TornadoProxyAbi__factory } from "./factories/TornadoProxyAbi__factory"; diff --git a/src/modules/contracts.ts b/src/modules/contracts.ts index e4d3225..f30cef8 100644 --- a/src/modules/contracts.ts +++ b/src/modules/contracts.ts @@ -2,9 +2,9 @@ import { ERC20Abi__factory, MulticallAbi__factory, OffchainOracleAbi__factory, - OvmGasPriceOracleABI__factory, - ProxyLightABI__factory, - TornadoProxyABI__factory, + OvmGasPriceOracleAbi__factory, + ProxyLightAbi__factory, + TornadoProxyAbi__factory, } from '../contracts'; import { providers } from 'ethers'; import { @@ -24,10 +24,10 @@ export function getProvider(isStatic = true, customRpcUrl?: string, chainId = ne } export const getTornadoProxyContract = (proxyAddress: string) => { - return TornadoProxyABI__factory.connect(proxyAddress, getProvider()); + return TornadoProxyAbi__factory.connect(proxyAddress, getProvider()); }; export const getTornadoProxyLightContract = (proxyAddress: string) => { - return ProxyLightABI__factory.connect(proxyAddress, getProvider()); + return ProxyLightAbi__factory.connect(proxyAddress, getProvider()); }; export const getOffchainOracleContract = () => { @@ -42,5 +42,5 @@ export const getTornTokenContract = (tokenAddress: string) => { return ERC20Abi__factory.connect(tokenAddress, getProvider(true, mainnetRpcUrl)); }; export const getOvmGasPriceOracle = () => { - return OvmGasPriceOracleABI__factory.connect(ovmGasPriceOracleContract, getProvider()); + return OvmGasPriceOracleAbi__factory.connect(ovmGasPriceOracleContract, getProvider()); }; diff --git a/src/services/config.service.ts b/src/services/config.service.ts index 9735c20..232386a 100644 --- a/src/services/config.service.ts +++ b/src/services/config.service.ts @@ -16,7 +16,7 @@ import { import { ChainIds, Token } from '../types'; import { getProvider, getTornadoProxyContract, getTornadoProxyLightContract, getTornTokenContract } from '../modules/contracts'; import { resolve } from '../modules'; -import { ERC20Abi, ProxyLightABI, TornadoProxyABI } from '../contracts'; +import { ERC20Abi, ProxyLightAbi, TornadoProxyAbi } from '../contracts'; import { availableIds, netIds, NetInstances } from 'torn-token'; import { getAddress } from 'ethers/lib/utils'; import { BigNumber, providers, Wallet } from 'ethers'; @@ -32,7 +32,7 @@ export class ConfigService { queueName: relayerQueueName; tokens: Token[]; private _proxyAddress: string; - private _proxyContract: TornadoProxyABI | ProxyLightABI; + private _proxyContract: TornadoProxyAbi | ProxyLightAbi; addressMap = new Map(); isLightMode: boolean; instances: NetInstances; @@ -77,7 +77,7 @@ export class ConfigService { this._fillInstanceMap(); } - get proxyContract(): TornadoProxyABI | ProxyLightABI { + get proxyContract(): TornadoProxyAbi | ProxyLightAbi { return this._proxyContract; } @@ -114,7 +114,7 @@ export class ConfigService { await this.checkNetwork(); console.log('Initializing...'); this._tokenAddress = await resolve(torn.torn.address); - this._tokenContract = await getTornTokenContract(this._tokenAddress); + this._tokenContract = getTornTokenContract(this._tokenAddress); if (this.isLightMode) { this._proxyAddress = torn.tornadoProxyLight.address; this._proxyContract = getTornadoProxyLightContract(this._proxyAddress); diff --git a/src/services/tx.service.ts b/src/services/tx.service.ts index 696c338..6fa92bd 100644 --- a/src/services/tx.service.ts +++ b/src/services/tx.service.ts @@ -4,7 +4,7 @@ import { Provider } from '@ethersproject/providers'; import { serialize } from '@ethersproject/transactions'; import { formatEther, parseUnits } from 'ethers/lib/utils'; import { BigNumber, BigNumberish, BytesLike } from 'ethers'; -import { ProxyLightABI, TornadoProxyABI } from '../contracts'; +import { ProxyLightAbi, TornadoProxyAbi } from '../contracts'; import { BASE_FEE_RESERVE_PERCENTAGE, CONFIRMATIONS, gasLimits, MAX_GAS_PRICE, netId, tornadoServiceFee } from '../config'; import { ChainIds, JobStatus, RelayerJobType } from '../types'; import { PriceService } from './price.service'; @@ -38,7 +38,7 @@ export class TxService { gasLimit: number; txManager: TxManager; - tornadoProxy: TornadoProxyABI | ProxyLightABI; + tornadoProxy: TornadoProxyAbi | ProxyLightAbi; oracle: GasPriceOracle; provider: Provider; private _currentJob: Job; diff --git a/yarn.lock b/yarn.lock index 445266b..05a160c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -212,6 +212,13 @@ "@babel/plugin-syntax-jsx" "^7.18.6" "@babel/types" "^7.18.6" +"@babel/runtime@^7.21.0": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" + integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ== + dependencies: + regenerator-runtime "^0.13.11" + "@babel/template@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" @@ -870,10 +877,10 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== -"@typechain/ethers-v5@^10.0.0": - version "10.1.0" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.1.0.tgz#068d7dc7014502354696dab59590a7841091e951" - integrity sha512-3LIb+eUpV3mNCrjUKT5oqp8PBsZYSnVrkfk6pY/ZM0boRs2mKxjFZ7bktx42vfDye8PPz3NxtW4DL5NsNsFqlg== +"@typechain/ethers-v5@^11.0.0": + version "11.0.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-11.0.0.tgz#8a11b34a386a30eed34375d05a09f893f7df838f" + integrity sha512-JDAvOjtzGuEQukgArIEseHznS2+v+vG3TpfODjNj4tu1kgmVu66G9gk7THOO04HJ5q+OJSLx9b46lc3GRGPIVA== dependencies: lodash "^4.17.15" ts-essentials "^7.0.1" @@ -914,10 +921,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/node@^18.0.1": - version "18.6.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" - integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== +"@types/node@^20.4.1": + version "20.4.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.1.tgz#a6033a8718653c50ac4962977e14d0f984d9527d" + integrity sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg== "@types/pbkdf2@^3.0.0": version "3.1.0" @@ -927,9 +934,9 @@ "@types/node" "*" "@types/prettier@^2.1.1": - version "2.6.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.3.tgz#68ada76827b0010d0db071f739314fa429943d0a" - integrity sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg== + version "2.7.3" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" + integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== "@types/prop-types@*": version "15.7.5" @@ -1707,7 +1714,7 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1812,6 +1819,15 @@ cliui@^7.0.2, cliui@^7.0.4: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -1907,6 +1923,21 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concurrently@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-8.2.0.tgz#cdc9f621a4d913366600355d68254df2c5e782f3" + integrity sha512-nnLMxO2LU492mTUj9qX/az/lESonSZu81UznYDoXtz1IQf996ixVqPAgHXwvHiHCAef/7S8HIK+fTFK7Ifk8YA== + dependencies: + chalk "^4.1.2" + date-fns "^2.30.0" + lodash "^4.17.21" + rxjs "^7.8.1" + shell-quote "^1.8.1" + spawn-command "0.0.2" + supports-color "^8.1.1" + tree-kill "^1.2.2" + yargs "^17.7.2" + content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" @@ -2062,6 +2093,13 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +date-fns@^2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + dateformat@^4.6.3: version "4.6.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" @@ -4832,7 +4870,12 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA== -prettier@^2.3.1, prettier@^2.7.1: +prettier@^2.3.1: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +prettier@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -5055,6 +5098,11 @@ reflect-metadata@^0.1.13: resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" @@ -5191,6 +5239,13 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +rxjs@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -5371,6 +5426,11 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== +shell-quote@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -5440,6 +5500,11 @@ source-map@^0.6.0, source-map@^0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +spawn-command@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e" + integrity sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ== + spawn-wrap@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" @@ -5504,7 +5569,7 @@ string-format@^2.0.0: resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5569,7 +5634,7 @@ strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@8.1.1: +supports-color@8.1.1, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -5798,6 +5863,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + treport@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/treport/-/treport-3.0.4.tgz#05247fa7820ad3afe92355e4cf08fe41a933084b" @@ -5825,9 +5895,9 @@ ts-algebra@^1.1.1: ts-toolbelt "^9.6.0" ts-command-line-args@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.3.1.tgz#b6188e42efc6cf7a8898e438a873fbb15505ddd6" - integrity sha512-FR3y7pLl/fuUNSmnPhfLArGqRrpojQgIEEOVzYx9DhTmfIN7C9RWSfpkJEF4J+Gk7aVx5pak8I7vWZsaN4N84g== + version "2.5.1" + resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz#e64456b580d1d4f6d948824c274cf6fa5f45f7f0" + integrity sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw== dependencies: chalk "^4.1.0" command-line-args "^5.1.1" @@ -5873,6 +5943,11 @@ tslib@^2.0.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== +tslib@^2.1.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" + integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -5880,10 +5955,10 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tsyringe@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/tsyringe/-/tsyringe-4.7.0.tgz#aea0a9d565385deebb6def60cda342b15016f283" - integrity sha512-ncFDM1jTLsok4ejMvSW5jN1VGPQD48y2tfAR0pdptWRKYX4bkbqPt92k7KJ5RFJ1KV36JEs/+TMh7I6OUgj74g== +tsyringe@^4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/tsyringe/-/tsyringe-4.8.0.tgz#d599651b36793ba872870fee4f845bd484a5cac1" + integrity sha512-YB1FG+axdxADa3ncEtRnQCFq/M0lALGLxSZeVNbTU8NqhOVc51nnv2CISTcvc1kyv6EGPtXVr0v6lWeDxiijOA== dependencies: tslib "^1.9.3" @@ -5969,10 +6044,10 @@ type@^2.5.0: resolved "https://registry.yarnpkg.com/type/-/type-2.6.0.tgz#3ca6099af5981d36ca86b78442973694278a219f" integrity sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ== -typechain@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.0.tgz#fc4902ce596519cb2ccfd012e4ddf92a9945b569" - integrity sha512-5jToLgKTjHdI1VKqs/K8BLYy42Sr3o8bV5ojh4MnR9ExHO83cyyUdw+7+vMJCpKXUiVUvARM4qmHTFuyaCMAZQ== +typechain@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.2.0.tgz#bd4fc8f111d4405e36858bae6f744604617b60f3" + integrity sha512-tZqhqjxJ9xAS/Lh32jccTjMkpx7sTdUVVHAy5Bf0TIer5QFNYXotiX74oCvoVYjyxUKDK3MXHtMFzMyD3kE+jg== dependencies: "@types/prettier" "^2.1.1" debug "^4.3.1" @@ -6622,6 +6697,11 @@ yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" @@ -6662,6 +6742,19 @@ yargs@^15.0.2: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"