add OVM gas oracle, typechain

This commit is contained in:
smart_ex 2022-07-07 16:41:39 +10:00
parent 4f63a335ae
commit de279a9e18
13 changed files with 1578 additions and 587 deletions

@ -15,11 +15,9 @@ import type {
} 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';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common';
export interface AggregatorAbiInterface extends utils.Interface {
contractName: 'AggregatorAbi';
functions: {
'addConnector(address)': FunctionFragment;
'addOracle(address,uint8)': FunctionFragment;
@ -53,19 +51,22 @@ export interface AggregatorAbiInterface extends utils.Interface {
| 'transferOwnership',
): FunctionFragment;
encodeFunctionData(functionFragment: 'addConnector', values: [string]): string;
encodeFunctionData(functionFragment: 'addOracle', values: [string, BigNumberish]): string;
encodeFunctionData(functionFragment: 'addConnector', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'addOracle', values: [PromiseOrValue<string>, PromiseOrValue<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: 'getRate',
values: [PromiseOrValue<string>, PromiseOrValue<string>, PromiseOrValue<boolean>],
): string;
encodeFunctionData(functionFragment: 'getRateToEth', values: [PromiseOrValue<string>, PromiseOrValue<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: 'removeConnector', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'removeOracle', values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string;
encodeFunctionData(functionFragment: 'setMultiWrapper', values: [string]): string;
encodeFunctionData(functionFragment: 'transferOwnership', values: [string]): string;
encodeFunctionData(functionFragment: 'setMultiWrapper', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue<string>]): string;
decodeFunctionResult(functionFragment: 'addConnector', data: BytesLike): Result;
decodeFunctionResult(functionFragment: 'addOracle', data: BytesLike): Result;
@ -144,8 +145,6 @@ export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTr
export type OwnershipTransferredEventFilter = TypedEventFilter<OwnershipTransferredEvent>;
export interface AggregatorAbi extends BaseContract {
contractName: 'AggregatorAbi';
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
@ -168,26 +167,29 @@ export interface AggregatorAbi extends BaseContract {
removeListener: OnEvent<this>;
functions: {
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
connectors(overrides?: CallOverrides): Promise<[string[]] & { allConnectors: string[] }>;
getRate(
srcToken: string,
dstToken: string,
useWrappers: boolean,
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<[BigNumber] & { weightedRate: BigNumber }>;
getRateToEth(
srcToken: string,
useSrcWrappers: boolean,
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<[BigNumber] & { weightedRate: BigNumber }>;
@ -197,40 +199,55 @@ export interface AggregatorAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<[string]>;
removeConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
removeConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
removeOracle(
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<ContractTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> },
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> },
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
};
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
connectors(overrides?: CallOverrides): Promise<string[]>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<string>;
@ -238,33 +255,48 @@ export interface AggregatorAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<string>;
removeConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
removeConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<ContractTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> },
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
transferOwnership(newOwner: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
callStatic: {
addConnector(connector: string, overrides?: CallOverrides): Promise<void>;
addConnector(connector: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
addOracle(oracle: string, oracleKind: BigNumberish, overrides?: CallOverrides): Promise<void>;
addOracle(oracle: PromiseOrValue<string>, oracleKind: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
connectors(overrides?: CallOverrides): Promise<string[]>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<string>;
@ -272,15 +304,19 @@ export interface AggregatorAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<string>;
removeConnector(connector: string, overrides?: CallOverrides): Promise<void>;
removeConnector(connector: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
removeOracle(oracle: string, oracleKind: BigNumberish, overrides?: CallOverrides): Promise<void>;
removeOracle(
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides,
): Promise<void>;
renounceOwnership(overrides?: CallOverrides): Promise<void>;
setMultiWrapper(_multiWrapper: string, overrides?: CallOverrides): Promise<void>;
setMultiWrapper(_multiWrapper: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
transferOwnership(newOwner: string, overrides?: CallOverrides): Promise<void>;
transferOwnership(newOwner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
};
filters: {
@ -300,26 +336,41 @@ export interface AggregatorAbi extends BaseContract {
OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
'OwnershipTransferred(address,address)'(
previousOwner?: string | null,
newOwner?: string | null,
previousOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null,
): OwnershipTransferredEventFilter;
OwnershipTransferred(
previousOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null,
): OwnershipTransferredEventFilter;
OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
};
estimateGas: {
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
connectors(overrides?: CallOverrides): Promise<BigNumber>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<BigNumber>;
@ -327,35 +378,56 @@ export interface AggregatorAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<BigNumber>;
removeConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
removeConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
removeOracle(
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
setMultiWrapper(_multiWrapper: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<BigNumber>;
transferOwnership(newOwner: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
setMultiWrapper(
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
};
populateTransaction: {
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<PopulatedTransaction>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
connectors(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;
multiWrapper(overrides?: CallOverrides): Promise<PopulatedTransaction>;
@ -364,26 +436,26 @@ export interface AggregatorAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
removeConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> },
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<PopulatedTransaction>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<PopulatedTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> },
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> },
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
};
}

@ -15,11 +15,9 @@ import type {
} 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';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common';
export interface ERC20AbiInterface extends utils.Interface {
contractName: 'ERC20Abi';
functions: {
'totalSupply()': FunctionFragment;
'_totalSupply()': FunctionFragment;
@ -47,15 +45,26 @@ export interface ERC20AbiInterface extends utils.Interface {
encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string;
encodeFunctionData(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: 'balanceOf', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'transfer', values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'allowance', values: [PromiseOrValue<string>, PromiseOrValue<string>]): string;
encodeFunctionData(
functionFragment: 'transferFrom',
values: [PromiseOrValue<string>, PromiseOrValue<string>, PromiseOrValue<BigNumberish>],
): string;
encodeFunctionData(functionFragment: 'approve', values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'nonces', values: [PromiseOrValue<string>]): string;
encodeFunctionData(
functionFragment: 'permit',
values: [string, string, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike],
values: [
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
],
): string;
decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result;
@ -96,8 +105,6 @@ export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEven
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
export interface ERC20Abi extends BaseContract {
contractName: 'ERC20Abi';
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
@ -124,40 +131,40 @@ export interface ERC20Abi extends BaseContract {
_totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
balanceOf(who: string, overrides?: CallOverrides): Promise<[BigNumber]>;
balanceOf(who: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber]>;
transfer(
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>;
allowance(owner: PromiseOrValue<string>, spender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber]>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
from: PromiseOrValue<string>,
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
spender: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
nonces(owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber]>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> },
owner: PromiseOrValue<string>,
spender: PromiseOrValue<string>,
amount: PromiseOrValue<BigNumberish>,
deadline: PromiseOrValue<BigNumberish>,
v: PromiseOrValue<BigNumberish>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
};
@ -165,40 +172,40 @@ export interface ERC20Abi extends BaseContract {
_totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<BigNumber>;
allowance(owner: PromiseOrValue<string>, spender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
from: PromiseOrValue<string>,
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
spender: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
nonces(owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> },
owner: PromiseOrValue<string>,
spender: PromiseOrValue<string>,
amount: PromiseOrValue<BigNumberish>,
deadline: PromiseOrValue<BigNumberish>,
v: PromiseOrValue<BigNumberish>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
callStatic: {
@ -206,36 +213,49 @@ export interface ERC20Abi extends BaseContract {
_totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
transfer(to: string, value: BigNumberish, overrides?: CallOverrides): Promise<void>;
transfer(to: PromiseOrValue<string>, value: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<BigNumber>;
allowance(owner: PromiseOrValue<string>, spender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
transferFrom(from: string, to: string, value: BigNumberish, overrides?: CallOverrides): Promise<void>;
transferFrom(
from: PromiseOrValue<string>,
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides,
): Promise<void>;
approve(spender: string, value: BigNumberish, overrides?: CallOverrides): Promise<void>;
approve(spender: PromiseOrValue<string>, value: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
nonces(owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
owner: PromiseOrValue<string>,
spender: PromiseOrValue<string>,
amount: PromiseOrValue<BigNumberish>,
deadline: PromiseOrValue<BigNumberish>,
v: PromiseOrValue<BigNumberish>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
overrides?: CallOverrides,
): Promise<void>;
};
filters: {
'Approval(address,address,uint256)'(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter;
Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter;
'Approval(address,address,uint256)'(
owner?: PromiseOrValue<string> | null,
spender?: PromiseOrValue<string> | null,
value?: null,
): ApprovalEventFilter;
Approval(owner?: PromiseOrValue<string> | null, spender?: PromiseOrValue<string> | null, value?: null): ApprovalEventFilter;
'Transfer(address,address,uint256)'(from?: string | null, to?: string | null, value?: null): TransferEventFilter;
Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter;
'Transfer(address,address,uint256)'(
from?: PromiseOrValue<string> | null,
to?: PromiseOrValue<string> | null,
value?: null,
): TransferEventFilter;
Transfer(from?: PromiseOrValue<string> | null, to?: PromiseOrValue<string> | null, value?: null): TransferEventFilter;
};
estimateGas: {
@ -243,36 +263,40 @@ export interface ERC20Abi extends BaseContract {
_totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
balanceOf(who: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
transfer(to: string, value: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
transfer(
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<BigNumber>;
allowance(owner: PromiseOrValue<string>, spender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
from: PromiseOrValue<string>,
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
spender: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
nonces(owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> },
owner: PromiseOrValue<string>,
spender: PromiseOrValue<string>,
amount: PromiseOrValue<BigNumberish>,
deadline: PromiseOrValue<BigNumberish>,
v: PromiseOrValue<BigNumberish>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
};
@ -281,40 +305,44 @@ export interface ERC20Abi extends BaseContract {
_totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
balanceOf(who: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
balanceOf(who: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
transfer(
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
allowance(
owner: PromiseOrValue<string>,
spender: PromiseOrValue<string>,
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;
transferFrom(
from: string,
to: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
from: PromiseOrValue<string>,
to: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
approve(
spender: string,
value: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
spender: PromiseOrValue<string>,
value: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
nonces(owner: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
nonces(owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
permit(
owner: string,
spender: string,
amount: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> },
owner: PromiseOrValue<string>,
spender: PromiseOrValue<string>,
amount: PromiseOrValue<BigNumberish>,
deadline: PromiseOrValue<BigNumberish>,
v: PromiseOrValue<BigNumberish>,
r: PromiseOrValue<BytesLike>,
s: PromiseOrValue<BytesLike>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
};
}

@ -4,10 +4,13 @@
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';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common';
export declare namespace MultiCall {
export type CallStruct = { to: string; data: BytesLike };
export type CallStruct = {
to: PromiseOrValue<string>;
data: PromiseOrValue<BytesLike>;
};
export type CallStructOutput = [string, string] & {
to: string;
@ -16,8 +19,6 @@ export declare namespace MultiCall {
}
export interface MulticallAbiInterface extends utils.Interface {
contractName: 'MulticallAbi';
functions: {
'multicall((address,bytes)[])': FunctionFragment;
};
@ -32,8 +33,6 @@ export interface MulticallAbiInterface extends utils.Interface {
}
export interface MulticallAbi extends BaseContract {
contractName: 'MulticallAbi';
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;

@ -15,11 +15,9 @@ import type {
} 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';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common';
export interface OffchainOracleAbiInterface extends utils.Interface {
contractName: 'OffchainOracleAbi';
functions: {
'addConnector(address)': FunctionFragment;
'addOracle(address,uint8)': FunctionFragment;
@ -53,19 +51,22 @@ export interface OffchainOracleAbiInterface extends utils.Interface {
| 'transferOwnership',
): FunctionFragment;
encodeFunctionData(functionFragment: 'addConnector', values: [string]): string;
encodeFunctionData(functionFragment: 'addOracle', values: [string, BigNumberish]): string;
encodeFunctionData(functionFragment: 'addConnector', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'addOracle', values: [PromiseOrValue<string>, PromiseOrValue<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: 'getRate',
values: [PromiseOrValue<string>, PromiseOrValue<string>, PromiseOrValue<boolean>],
): string;
encodeFunctionData(functionFragment: 'getRateToEth', values: [PromiseOrValue<string>, PromiseOrValue<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: 'removeConnector', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'removeOracle', values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string;
encodeFunctionData(functionFragment: 'setMultiWrapper', values: [string]): string;
encodeFunctionData(functionFragment: 'transferOwnership', values: [string]): string;
encodeFunctionData(functionFragment: 'setMultiWrapper', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue<string>]): string;
decodeFunctionResult(functionFragment: 'addConnector', data: BytesLike): Result;
decodeFunctionResult(functionFragment: 'addOracle', data: BytesLike): Result;
@ -144,8 +145,6 @@ export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTr
export type OwnershipTransferredEventFilter = TypedEventFilter<OwnershipTransferredEvent>;
export interface OffchainOracleAbi extends BaseContract {
contractName: 'OffchainOracleAbi';
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
@ -168,26 +167,29 @@ export interface OffchainOracleAbi extends BaseContract {
removeListener: OnEvent<this>;
functions: {
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
connectors(overrides?: CallOverrides): Promise<[string[]] & { allConnectors: string[] }>;
getRate(
srcToken: string,
dstToken: string,
useWrappers: boolean,
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<[BigNumber] & { weightedRate: BigNumber }>;
getRateToEth(
srcToken: string,
useSrcWrappers: boolean,
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<[BigNumber] & { weightedRate: BigNumber }>;
@ -197,40 +199,55 @@ export interface OffchainOracleAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<[string]>;
removeConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
removeConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
removeOracle(
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<ContractTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> },
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> },
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
};
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
connectors(overrides?: CallOverrides): Promise<string[]>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<string>;
@ -238,33 +255,48 @@ export interface OffchainOracleAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<string>;
removeConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
removeConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<ContractTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> },
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
transferOwnership(newOwner: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
callStatic: {
addConnector(connector: string, overrides?: CallOverrides): Promise<void>;
addConnector(connector: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
addOracle(oracle: string, oracleKind: BigNumberish, overrides?: CallOverrides): Promise<void>;
addOracle(oracle: PromiseOrValue<string>, oracleKind: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
connectors(overrides?: CallOverrides): Promise<string[]>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<string>;
@ -272,15 +304,19 @@ export interface OffchainOracleAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<string>;
removeConnector(connector: string, overrides?: CallOverrides): Promise<void>;
removeConnector(connector: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
removeOracle(oracle: string, oracleKind: BigNumberish, overrides?: CallOverrides): Promise<void>;
removeOracle(
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides,
): Promise<void>;
renounceOwnership(overrides?: CallOverrides): Promise<void>;
setMultiWrapper(_multiWrapper: string, overrides?: CallOverrides): Promise<void>;
setMultiWrapper(_multiWrapper: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
transferOwnership(newOwner: string, overrides?: CallOverrides): Promise<void>;
transferOwnership(newOwner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
};
filters: {
@ -300,26 +336,41 @@ export interface OffchainOracleAbi extends BaseContract {
OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
'OwnershipTransferred(address,address)'(
previousOwner?: string | null,
newOwner?: string | null,
previousOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null,
): OwnershipTransferredEventFilter;
OwnershipTransferred(
previousOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null,
): OwnershipTransferredEventFilter;
OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
};
estimateGas: {
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
connectors(overrides?: CallOverrides): Promise<BigNumber>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<BigNumber>;
@ -327,35 +378,56 @@ export interface OffchainOracleAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<BigNumber>;
removeConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
removeConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
removeOracle(
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
setMultiWrapper(_multiWrapper: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<BigNumber>;
transferOwnership(newOwner: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
setMultiWrapper(
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
};
populateTransaction: {
addConnector(connector: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<PopulatedTransaction>;
addConnector(
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
connectors(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRate(
srcToken: PromiseOrValue<string>,
dstToken: PromiseOrValue<string>,
useWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRateToEth(
srcToken: PromiseOrValue<string>,
useSrcWrappers: PromiseOrValue<boolean>,
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;
multiWrapper(overrides?: CallOverrides): Promise<PopulatedTransaction>;
@ -364,26 +436,26 @@ export interface OffchainOracleAbi extends BaseContract {
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
removeConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> },
connector: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> },
oracle: PromiseOrValue<string>,
oracleKind: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
renounceOwnership(overrides?: Overrides & { from?: string | Promise<string> }): Promise<PopulatedTransaction>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<PopulatedTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> },
_multiWrapper: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> },
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
};
}

@ -0,0 +1,427 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
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 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;
};
getFunction(
nameOrSignatureOrTopic:
| '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<BytesLike>]): string;
encodeFunctionData(functionFragment: 'getL1GasUsed', values: [PromiseOrValue<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: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'setGasPrice', values: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'setL1BaseFee', values: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'setOverhead', values: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'setScalar', values: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue<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;
events: {
'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;
}
export interface DecimalsUpdatedEventObject {
arg0: BigNumber;
}
export type DecimalsUpdatedEvent = TypedEvent<[BigNumber], DecimalsUpdatedEventObject>;
export type DecimalsUpdatedEventFilter = TypedEventFilter<DecimalsUpdatedEvent>;
export interface GasPriceUpdatedEventObject {
arg0: BigNumber;
}
export type GasPriceUpdatedEvent = TypedEvent<[BigNumber], GasPriceUpdatedEventObject>;
export type GasPriceUpdatedEventFilter = TypedEventFilter<GasPriceUpdatedEvent>;
export interface L1BaseFeeUpdatedEventObject {
arg0: BigNumber;
}
export type L1BaseFeeUpdatedEvent = TypedEvent<[BigNumber], L1BaseFeeUpdatedEventObject>;
export type L1BaseFeeUpdatedEventFilter = TypedEventFilter<L1BaseFeeUpdatedEvent>;
export interface OverheadUpdatedEventObject {
arg0: BigNumber;
}
export type OverheadUpdatedEvent = TypedEvent<[BigNumber], OverheadUpdatedEventObject>;
export type OverheadUpdatedEventFilter = TypedEventFilter<OverheadUpdatedEvent>;
export interface OwnershipTransferredEventObject {
previousOwner: string;
newOwner: string;
}
export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>;
export type OwnershipTransferredEventFilter = TypedEventFilter<OwnershipTransferredEvent>;
export interface ScalarUpdatedEventObject {
arg0: BigNumber;
}
export type ScalarUpdatedEvent = TypedEvent<[BigNumber], ScalarUpdatedEventObject>;
export type ScalarUpdatedEventFilter = TypedEventFilter<ScalarUpdatedEvent>;
export interface OvmGasPriceOracleABI extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: OvmGasPriceOracleABIInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined,
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
decimals(overrides?: CallOverrides): Promise<[BigNumber]>;
gasPrice(overrides?: CallOverrides): Promise<[BigNumber]>;
getL1Fee(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[BigNumber]>;
getL1GasUsed(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[BigNumber]>;
l1BaseFee(overrides?: CallOverrides): Promise<[BigNumber]>;
overhead(overrides?: CallOverrides): Promise<[BigNumber]>;
owner(overrides?: CallOverrides): Promise<[string]>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<ContractTransaction>;
scalar(overrides?: CallOverrides): Promise<[BigNumber]>;
setDecimals(
_decimals: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setGasPrice(
_gasPrice: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setL1BaseFee(
_baseFee: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setOverhead(
_overhead: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setScalar(
_scalar: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
};
decimals(overrides?: CallOverrides): Promise<BigNumber>;
gasPrice(overrides?: CallOverrides): Promise<BigNumber>;
getL1Fee(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
getL1GasUsed(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
l1BaseFee(overrides?: CallOverrides): Promise<BigNumber>;
overhead(overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<string>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<ContractTransaction>;
scalar(overrides?: CallOverrides): Promise<BigNumber>;
setDecimals(
_decimals: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setGasPrice(
_gasPrice: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setL1BaseFee(
_baseFee: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setOverhead(
_overhead: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
setScalar(
_scalar: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
callStatic: {
decimals(overrides?: CallOverrides): Promise<BigNumber>;
gasPrice(overrides?: CallOverrides): Promise<BigNumber>;
getL1Fee(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
getL1GasUsed(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
l1BaseFee(overrides?: CallOverrides): Promise<BigNumber>;
overhead(overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<string>;
renounceOwnership(overrides?: CallOverrides): Promise<void>;
scalar(overrides?: CallOverrides): Promise<BigNumber>;
setDecimals(_decimals: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
setGasPrice(_gasPrice: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
setL1BaseFee(_baseFee: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
setOverhead(_overhead: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
setScalar(_scalar: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
transferOwnership(newOwner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
};
filters: {
'DecimalsUpdated(uint256)'(arg0?: null): DecimalsUpdatedEventFilter;
DecimalsUpdated(arg0?: null): DecimalsUpdatedEventFilter;
'GasPriceUpdated(uint256)'(arg0?: null): GasPriceUpdatedEventFilter;
GasPriceUpdated(arg0?: null): GasPriceUpdatedEventFilter;
'L1BaseFeeUpdated(uint256)'(arg0?: null): L1BaseFeeUpdatedEventFilter;
L1BaseFeeUpdated(arg0?: null): L1BaseFeeUpdatedEventFilter;
'OverheadUpdated(uint256)'(arg0?: null): OverheadUpdatedEventFilter;
OverheadUpdated(arg0?: null): OverheadUpdatedEventFilter;
'OwnershipTransferred(address,address)'(
previousOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null,
): OwnershipTransferredEventFilter;
OwnershipTransferred(
previousOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null,
): OwnershipTransferredEventFilter;
'ScalarUpdated(uint256)'(arg0?: null): ScalarUpdatedEventFilter;
ScalarUpdated(arg0?: null): ScalarUpdatedEventFilter;
};
estimateGas: {
decimals(overrides?: CallOverrides): Promise<BigNumber>;
gasPrice(overrides?: CallOverrides): Promise<BigNumber>;
getL1Fee(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
getL1GasUsed(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
l1BaseFee(overrides?: CallOverrides): Promise<BigNumber>;
overhead(overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<BigNumber>;
scalar(overrides?: CallOverrides): Promise<BigNumber>;
setDecimals(
_decimals: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
setGasPrice(
_gasPrice: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
setL1BaseFee(
_baseFee: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
setOverhead(
_overhead: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
setScalar(
_scalar: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
};
populateTransaction: {
decimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;
gasPrice(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getL1Fee(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getL1GasUsed(_data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
l1BaseFee(overrides?: CallOverrides): Promise<PopulatedTransaction>;
overhead(overrides?: CallOverrides): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue<string> }): Promise<PopulatedTransaction>;
scalar(overrides?: CallOverrides): Promise<PopulatedTransaction>;
setDecimals(
_decimals: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
setGasPrice(
_gasPrice: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
setL1BaseFee(
_baseFee: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
setOverhead(
_overhead: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
setScalar(
_scalar: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
};
}

@ -16,11 +16,9 @@ import type {
} 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';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common';
export interface ProxyLightABIInterface extends utils.Interface {
contractName: 'ProxyLightABI';
functions: {
'backupNotes(bytes[])': FunctionFragment;
'deposit(address,bytes32,bytes)': FunctionFragment;
@ -29,11 +27,23 @@ export interface ProxyLightABIInterface extends utils.Interface {
getFunction(nameOrSignatureOrTopic: 'backupNotes' | 'deposit' | 'withdraw'): FunctionFragment;
encodeFunctionData(functionFragment: 'backupNotes', values: [BytesLike[]]): string;
encodeFunctionData(functionFragment: 'deposit', values: [string, BytesLike, BytesLike]): string;
encodeFunctionData(functionFragment: 'backupNotes', values: [PromiseOrValue<BytesLike>[]]): string;
encodeFunctionData(
functionFragment: 'deposit',
values: [PromiseOrValue<string>, PromiseOrValue<BytesLike>, PromiseOrValue<BytesLike>],
): string;
encodeFunctionData(
functionFragment: 'withdraw',
values: [string, BytesLike, BytesLike, BytesLike, string, string, BigNumberish, BigNumberish],
values: [
PromiseOrValue<string>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>,
],
): string;
decodeFunctionResult(functionFragment: 'backupNotes', data: BytesLike): Result;
@ -56,8 +66,6 @@ export type EncryptedNoteEvent = TypedEvent<[string, string], EncryptedNoteEvent
export type EncryptedNoteEventFilter = TypedEventFilter<EncryptedNoteEvent>;
export interface ProxyLightABI extends BaseContract {
contractName: 'ProxyLightABI';
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
@ -81,123 +89,131 @@ export interface ProxyLightABI extends BaseContract {
functions: {
backupNotes(
_encryptedNotes: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> },
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
deposit(
_tornado: string,
_commitment: BytesLike,
_encryptedNote: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
withdraw(
_tornado: string,
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
};
backupNotes(
_encryptedNotes: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> },
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
deposit(
_tornado: string,
_commitment: BytesLike,
_encryptedNote: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
withdraw(
_tornado: string,
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
callStatic: {
backupNotes(_encryptedNotes: BytesLike[], overrides?: CallOverrides): Promise<void>;
backupNotes(_encryptedNotes: PromiseOrValue<BytesLike>[], overrides?: CallOverrides): Promise<void>;
deposit(_tornado: string, _commitment: BytesLike, _encryptedNote: BytesLike, overrides?: CallOverrides): Promise<void>;
deposit(
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: CallOverrides,
): Promise<void>;
withdraw(
_tornado: string,
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
_tornado: PromiseOrValue<string>,
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides,
): Promise<void>;
};
filters: {
'EncryptedNote(address,bytes)'(sender?: string | null, encryptedNote?: null): EncryptedNoteEventFilter;
EncryptedNote(sender?: string | null, encryptedNote?: null): EncryptedNoteEventFilter;
'EncryptedNote(address,bytes)'(sender?: PromiseOrValue<string> | null, encryptedNote?: null): EncryptedNoteEventFilter;
EncryptedNote(sender?: PromiseOrValue<string> | null, encryptedNote?: null): EncryptedNoteEventFilter;
};
estimateGas: {
backupNotes(_encryptedNotes: BytesLike[], overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
backupNotes(
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
deposit(
_tornado: string,
_commitment: BytesLike,
_encryptedNote: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
withdraw(
_tornado: string,
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
};
populateTransaction: {
backupNotes(
_encryptedNotes: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> },
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
deposit(
_tornado: string,
_commitment: BytesLike,
_encryptedNote: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
withdraw(
_tornado: string,
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_tornado: PromiseOrValue<string>,
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
};
}

@ -16,11 +16,9 @@ import type {
} 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';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common';
export interface TornadoABIInterface extends utils.Interface {
contractName: 'TornadoABI';
functions: {
'changeOperator(address)': FunctionFragment;
'nullifierHashes(bytes32)': FunctionFragment;
@ -72,30 +70,38 @@ export interface TornadoABIInterface extends utils.Interface {
| 'nextIndex',
): FunctionFragment;
encodeFunctionData(functionFragment: 'changeOperator', values: [string]): string;
encodeFunctionData(functionFragment: 'nullifierHashes', values: [BytesLike]): string;
encodeFunctionData(functionFragment: 'changeOperator', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'nullifierHashes', values: [PromiseOrValue<BytesLike>]): string;
encodeFunctionData(
functionFragment: 'withdraw',
values: [BytesLike, BytesLike, BytesLike, string, string, BigNumberish, BigNumberish],
values: [
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>,
],
): string;
encodeFunctionData(functionFragment: 'verifier', values?: undefined): string;
encodeFunctionData(functionFragment: 'hashLeftRight', values: [BytesLike, BytesLike]): string;
encodeFunctionData(functionFragment: 'hashLeftRight', values: [PromiseOrValue<BytesLike>, PromiseOrValue<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: 'isKnownRoot', values: [PromiseOrValue<BytesLike>]): string;
encodeFunctionData(functionFragment: 'commitments', values: [PromiseOrValue<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: 'updateVerifier', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'deposit', values: [PromiseOrValue<BytesLike>]): string;
encodeFunctionData(functionFragment: 'getLastRoot', values?: undefined): string;
encodeFunctionData(functionFragment: 'roots', values: [BigNumberish]): string;
encodeFunctionData(functionFragment: 'roots', values: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'ROOT_HISTORY_SIZE', values?: undefined): string;
encodeFunctionData(functionFragment: 'isSpent', values: [BytesLike]): string;
encodeFunctionData(functionFragment: 'zeros', values: [BigNumberish]): string;
encodeFunctionData(functionFragment: 'isSpent', values: [PromiseOrValue<BytesLike>]): string;
encodeFunctionData(functionFragment: 'zeros', values: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'ZERO_VALUE', values?: undefined): string;
encodeFunctionData(functionFragment: 'filledSubtrees', values: [BigNumberish]): string;
encodeFunctionData(functionFragment: 'filledSubtrees', values: [PromiseOrValue<BigNumberish>]): string;
encodeFunctionData(functionFragment: 'nextIndex', values?: undefined): string;
decodeFunctionResult(functionFragment: 'changeOperator', data: BytesLike): Result;
@ -150,8 +156,6 @@ export type WithdrawalEvent = TypedEvent<[string, string, string, BigNumber], Wi
export type WithdrawalEventFilter = TypedEventFilter<WithdrawalEvent>;
export interface TornadoABI extends BaseContract {
contractName: 'TornadoABI';
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
@ -175,26 +179,30 @@ export interface TornadoABI extends BaseContract {
functions: {
changeOperator(
_newOperator: string,
overrides?: Overrides & { from?: string | Promise<string> },
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
nullifierHashes(arg0: PromiseOrValue<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<string> },
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
verifier(overrides?: CallOverrides): Promise<[string]>;
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<[string]>;
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides,
): Promise<[string]>;
FIELD_SIZE(overrides?: CallOverrides): Promise<[BigNumber]>;
@ -202,59 +210,62 @@ export interface TornadoABI extends BaseContract {
operator(overrides?: CallOverrides): Promise<[string]>;
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
isKnownRoot(_root: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[boolean]>;
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
commitments(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[boolean]>;
denomination(overrides?: CallOverrides): Promise<[BigNumber]>;
currentRootIndex(overrides?: CallOverrides): Promise<[number]>;
updateVerifier(
_newVerifier: string,
overrides?: Overrides & { from?: string | Promise<string> },
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
deposit(
_commitment: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
getLastRoot(overrides?: CallOverrides): Promise<[string]>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
roots(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[string]>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>;
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
isSpent(_nullifierHash: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[boolean]>;
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
zeros(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[string]>;
ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>;
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
filledSubtrees(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[string]>;
nextIndex(overrides?: CallOverrides): Promise<[number]>;
};
changeOperator(_newOperator: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
changeOperator(
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
nullifierHashes(arg0: PromiseOrValue<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<string> },
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
verifier(overrides?: CallOverrides): Promise<string>;
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<string>;
hashLeftRight(_left: PromiseOrValue<BytesLike>, _right: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
@ -262,56 +273,63 @@ export interface TornadoABI extends BaseContract {
operator(overrides?: CallOverrides): Promise<string>;
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
isKnownRoot(_root: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>;
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
commitments(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>;
denomination(overrides?: CallOverrides): Promise<BigNumber>;
currentRootIndex(overrides?: CallOverrides): Promise<number>;
updateVerifier(_newVerifier: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
updateVerifier(
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
deposit(
_commitment: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
getLastRoot(overrides?: CallOverrides): Promise<string>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
roots(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<boolean>;
isSpent(_nullifierHash: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>;
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
zeros(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
filledSubtrees(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
nextIndex(overrides?: CallOverrides): Promise<number>;
callStatic: {
changeOperator(_newOperator: string, overrides?: CallOverrides): Promise<void>;
changeOperator(_newOperator: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
nullifierHashes(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>;
withdraw(
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides,
): Promise<void>;
verifier(overrides?: CallOverrides): Promise<string>;
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<string>;
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides,
): Promise<string>;
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
@ -319,67 +337,78 @@ export interface TornadoABI extends BaseContract {
operator(overrides?: CallOverrides): Promise<string>;
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
isKnownRoot(_root: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>;
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
commitments(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>;
denomination(overrides?: CallOverrides): Promise<BigNumber>;
currentRootIndex(overrides?: CallOverrides): Promise<number>;
updateVerifier(_newVerifier: string, overrides?: CallOverrides): Promise<void>;
updateVerifier(_newVerifier: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
deposit(_commitment: BytesLike, overrides?: CallOverrides): Promise<void>;
deposit(_commitment: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
getLastRoot(overrides?: CallOverrides): Promise<string>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
roots(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<boolean>;
isSpent(_nullifierHash: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>;
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
zeros(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
filledSubtrees(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
nextIndex(overrides?: CallOverrides): Promise<number>;
};
filters: {
'Deposit(bytes32,uint32,uint256)'(commitment?: BytesLike | null, leafIndex?: null, timestamp?: null): DepositEventFilter;
Deposit(commitment?: BytesLike | null, leafIndex?: null, timestamp?: null): DepositEventFilter;
'Deposit(bytes32,uint32,uint256)'(
commitment?: PromiseOrValue<BytesLike> | null,
leafIndex?: null,
timestamp?: null,
): DepositEventFilter;
Deposit(commitment?: PromiseOrValue<BytesLike> | null, leafIndex?: null, timestamp?: null): DepositEventFilter;
'Withdrawal(address,bytes32,address,uint256)'(
to?: null,
nullifierHash?: null,
relayer?: string | null,
relayer?: PromiseOrValue<string> | null,
fee?: null,
): WithdrawalEventFilter;
Withdrawal(to?: null, nullifierHash?: null, relayer?: string | null, fee?: null): WithdrawalEventFilter;
Withdrawal(to?: null, nullifierHash?: null, relayer?: PromiseOrValue<string> | null, fee?: null): WithdrawalEventFilter;
};
estimateGas: {
changeOperator(_newOperator: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
changeOperator(
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
nullifierHashes(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
withdraw(
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
verifier(overrides?: CallOverrides): Promise<BigNumber>;
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides,
): Promise<BigNumber>;
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
@ -387,57 +416,67 @@ export interface TornadoABI extends BaseContract {
operator(overrides?: CallOverrides): Promise<BigNumber>;
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
isKnownRoot(_root: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
commitments(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
denomination(overrides?: CallOverrides): Promise<BigNumber>;
currentRootIndex(overrides?: CallOverrides): Promise<BigNumber>;
updateVerifier(_newVerifier: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
updateVerifier(
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
deposit(_commitment: BytesLike, overrides?: PayableOverrides & { from?: string | Promise<string> }): Promise<BigNumber>;
deposit(
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
roots(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
isSpent(_nullifierHash: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
zeros(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
filledSubtrees(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
nextIndex(overrides?: CallOverrides): Promise<BigNumber>;
};
populateTransaction: {
changeOperator(
_newOperator: string,
overrides?: Overrides & { from?: string | Promise<string> },
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
nullifierHashes(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
withdraw(
_proof: BytesLike,
_root: BytesLike,
_nullifierHash: BytesLike,
_recipient: string,
_relayer: string,
_fee: BigNumberish,
_refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_proof: PromiseOrValue<BytesLike>,
_root: PromiseOrValue<BytesLike>,
_nullifierHash: PromiseOrValue<BytesLike>,
_recipient: PromiseOrValue<string>,
_relayer: PromiseOrValue<string>,
_fee: PromiseOrValue<BigNumberish>,
_refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
verifier(overrides?: CallOverrides): Promise<PopulatedTransaction>;
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides,
): Promise<PopulatedTransaction>;
FIELD_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
@ -445,37 +484,37 @@ export interface TornadoABI extends BaseContract {
operator(overrides?: CallOverrides): Promise<PopulatedTransaction>;
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
isKnownRoot(_root: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
commitments(arg0: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
denomination(overrides?: CallOverrides): Promise<PopulatedTransaction>;
currentRootIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
updateVerifier(
_newVerifier: string,
overrides?: Overrides & { from?: string | Promise<string> },
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
deposit(
_commitment: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
getLastRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
roots(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
isSpent(_nullifierHash: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
zeros(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
ZERO_VALUE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
filledSubtrees(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
nextIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
};

@ -16,11 +16,9 @@ import type {
} from 'ethers';
import type { FunctionFragment, Result } from '@ethersproject/abi';
import type { Listener, Provider } from '@ethersproject/providers';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common';
export interface TornadoProxyABIInterface extends utils.Interface {
contractName: 'TornadoProxyABI';
functions: {
'governance()': FunctionFragment;
'instances(address)': FunctionFragment;
@ -36,14 +34,23 @@ export interface TornadoProxyABIInterface extends utils.Interface {
): FunctionFragment;
encodeFunctionData(functionFragment: 'governance', values?: undefined): string;
encodeFunctionData(functionFragment: 'instances', values: [string]): string;
encodeFunctionData(functionFragment: 'resolve', values: [BytesLike]): string;
encodeFunctionData(functionFragment: 'instances', values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: 'resolve', values: [PromiseOrValue<BytesLike>]): string;
encodeFunctionData(functionFragment: 'tornadoTrees', values?: undefined): string;
encodeFunctionData(functionFragment: 'deposit', values: [string, BytesLike]): string;
encodeFunctionData(functionFragment: 'updateInstances', values: [string, boolean]): string;
encodeFunctionData(functionFragment: 'deposit', values: [PromiseOrValue<string>, PromiseOrValue<BytesLike>]): string;
encodeFunctionData(functionFragment: 'updateInstances', values: [PromiseOrValue<string>, PromiseOrValue<boolean>]): string;
encodeFunctionData(
functionFragment: 'withdraw',
values: [string, BytesLike, BytesLike, BytesLike, string, string, BigNumberish, BigNumberish],
values: [
PromiseOrValue<string>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>,
],
): string;
decodeFunctionResult(functionFragment: 'governance', data: BytesLike): Result;
@ -58,8 +65,6 @@ export interface TornadoProxyABIInterface extends utils.Interface {
}
export interface TornadoProxyABI extends BaseContract {
contractName: 'TornadoProxyABI';
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
@ -84,91 +89,91 @@ export interface TornadoProxyABI extends BaseContract {
functions: {
governance(overrides?: CallOverrides): Promise<[string]>;
instances(arg0: string, overrides?: CallOverrides): Promise<[boolean]>;
instances(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[boolean]>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<[string]>;
resolve(node: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[string]>;
tornadoTrees(overrides?: CallOverrides): Promise<[string]>;
deposit(
tornado: string,
commitment: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
updateInstances(
instance: string,
update: boolean,
overrides?: Overrides & { from?: string | Promise<string> },
instance: PromiseOrValue<string>,
update: PromiseOrValue<boolean>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
withdraw(
tornado: string,
proof: BytesLike,
root: BytesLike,
nullifierHash: BytesLike,
recipient: string,
relayer: string,
fee: BigNumberish,
refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
proof: PromiseOrValue<BytesLike>,
root: PromiseOrValue<BytesLike>,
nullifierHash: PromiseOrValue<BytesLike>,
recipient: PromiseOrValue<string>,
relayer: PromiseOrValue<string>,
fee: PromiseOrValue<BigNumberish>,
refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
};
governance(overrides?: CallOverrides): Promise<string>;
instances(arg0: string, overrides?: CallOverrides): Promise<boolean>;
instances(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<string>;
resolve(node: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
tornadoTrees(overrides?: CallOverrides): Promise<string>;
deposit(
tornado: string,
commitment: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
updateInstances(
instance: string,
update: boolean,
overrides?: Overrides & { from?: string | Promise<string> },
instance: PromiseOrValue<string>,
update: PromiseOrValue<boolean>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
withdraw(
tornado: string,
proof: BytesLike,
root: BytesLike,
nullifierHash: BytesLike,
recipient: string,
relayer: string,
fee: BigNumberish,
refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
proof: PromiseOrValue<BytesLike>,
root: PromiseOrValue<BytesLike>,
nullifierHash: PromiseOrValue<BytesLike>,
recipient: PromiseOrValue<string>,
relayer: PromiseOrValue<string>,
fee: PromiseOrValue<BigNumberish>,
refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<ContractTransaction>;
callStatic: {
governance(overrides?: CallOverrides): Promise<string>;
instances(arg0: string, overrides?: CallOverrides): Promise<boolean>;
instances(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<string>;
resolve(node: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
tornadoTrees(overrides?: CallOverrides): Promise<string>;
deposit(tornado: string, commitment: BytesLike, overrides?: CallOverrides): Promise<void>;
deposit(tornado: PromiseOrValue<string>, commitment: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
updateInstances(instance: string, update: boolean, overrides?: CallOverrides): Promise<void>;
updateInstances(instance: PromiseOrValue<string>, update: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<void>;
withdraw(
tornado: string,
proof: BytesLike,
root: BytesLike,
nullifierHash: BytesLike,
recipient: string,
relayer: string,
fee: BigNumberish,
refund: BigNumberish,
tornado: PromiseOrValue<string>,
proof: PromiseOrValue<BytesLike>,
root: PromiseOrValue<BytesLike>,
nullifierHash: PromiseOrValue<BytesLike>,
recipient: PromiseOrValue<string>,
relayer: PromiseOrValue<string>,
fee: PromiseOrValue<BigNumberish>,
refund: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides,
): Promise<void>;
};
@ -178,68 +183,68 @@ export interface TornadoProxyABI extends BaseContract {
estimateGas: {
governance(overrides?: CallOverrides): Promise<BigNumber>;
instances(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
instances(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
resolve(node: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
tornadoTrees(overrides?: CallOverrides): Promise<BigNumber>;
deposit(
tornado: string,
commitment: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
updateInstances(
instance: string,
update: boolean,
overrides?: Overrides & { from?: string | Promise<string> },
instance: PromiseOrValue<string>,
update: PromiseOrValue<boolean>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
withdraw(
tornado: string,
proof: BytesLike,
root: BytesLike,
nullifierHash: BytesLike,
recipient: string,
relayer: string,
fee: BigNumberish,
refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
proof: PromiseOrValue<BytesLike>,
root: PromiseOrValue<BytesLike>,
nullifierHash: PromiseOrValue<BytesLike>,
recipient: PromiseOrValue<string>,
relayer: PromiseOrValue<string>,
fee: PromiseOrValue<BigNumberish>,
refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<BigNumber>;
};
populateTransaction: {
governance(overrides?: CallOverrides): Promise<PopulatedTransaction>;
instances(arg0: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
instances(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
resolve(node: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
resolve(node: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
tornadoTrees(overrides?: CallOverrides): Promise<PopulatedTransaction>;
deposit(
tornado: string,
commitment: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
updateInstances(
instance: string,
update: boolean,
overrides?: Overrides & { from?: string | Promise<string> },
instance: PromiseOrValue<string>,
update: PromiseOrValue<boolean>,
overrides?: Overrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
withdraw(
tornado: string,
proof: BytesLike,
root: BytesLike,
nullifierHash: BytesLike,
recipient: string,
relayer: string,
fee: BigNumberish,
refund: BigNumberish,
overrides?: PayableOverrides & { from?: string | Promise<string> },
tornado: PromiseOrValue<string>,
proof: PromiseOrValue<BytesLike>,
root: PromiseOrValue<BytesLike>,
nullifierHash: PromiseOrValue<BytesLike>,
recipient: PromiseOrValue<string>,
relayer: PromiseOrValue<string>,
fee: PromiseOrValue<BigNumberish>,
refund: PromiseOrValue<BigNumberish>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
): Promise<PopulatedTransaction>;
};
}

@ -28,3 +28,5 @@ export type MinEthersFactory<C, ARGS> = {
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F['deploy']> : never;
export type PromiseOrValue<T> = T | Promise<T>;

@ -0,0 +1,316 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
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',
},
],
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',
},
];
export class OvmGasPriceOracleABI__factory {
static readonly abi = _abi;
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;
}
}

@ -5,6 +5,7 @@ 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';

@ -5,6 +5,7 @@ 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';
@ -13,6 +14,7 @@ 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';

@ -2,11 +2,20 @@ import {
ERC20Abi__factory,
MulticallAbi__factory,
OffchainOracleAbi__factory,
OvmGasPriceOracleABI__factory,
ProxyLightABI__factory,
TornadoProxyABI__factory,
} from '../contracts';
import { providers } from 'ethers';
import { mainnetRpcUrl, multiCallAddress, netId, offchainOracleAddress, oracleRpcUrl, rpcUrl } from '../config';
import {
mainnetRpcUrl,
multiCallAddress,
netId,
offchainOracleAddress,
oracleRpcUrl,
ovmGasPriceOracleContract,
rpcUrl,
} from '../config';
export function getProvider(isStatic = true, customRpcUrl?: string, chainId = netId) {
const url = customRpcUrl || rpcUrl;
@ -32,3 +41,6 @@ export const getMultiCallContract = () => {
export const getTornTokenContract = (tokenAddress: string) => {
return ERC20Abi__factory.connect(tokenAddress, getProvider(true, mainnetRpcUrl));
};
export const getOvmGasPriceOracle = () => {
return OvmGasPriceOracleABI__factory.connect(ovmGasPriceOracleContract, getProvider());
};