sdk-monorepo/test/deth/TornadoRouter.ts
AlienTornadosaurusHex 19c687c9d2 0.0.13-alpha
Signed-off-by: AlienTornadosaurusHex <>
2023-06-10 20:27:32 +00:00

606 lines
19 KiB
TypeScript

/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PayableOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
PromiseOrValue,
} from "./common";
export interface TornadoRouterInterface extends utils.Interface {
functions: {
"approveTokenForInstance(address,address,uint256)": FunctionFragment;
"backupNotes(bytes[])": FunctionFragment;
"deposit(address,bytes32,bytes)": FunctionFragment;
"governanceProxyAddress()": FunctionFragment;
"initialize(address,address)": FunctionFragment;
"instanceRegistry()": FunctionFragment;
"relayerRegistry()": FunctionFragment;
"rescueTokens(address,address,uint256)": FunctionFragment;
"setInstanceRegistry(address)": FunctionFragment;
"setRelayerRegistry(address)": FunctionFragment;
"version()": FunctionFragment;
"withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "approveTokenForInstance"
| "backupNotes"
| "deposit"
| "governanceProxyAddress"
| "initialize"
| "instanceRegistry"
| "relayerRegistry"
| "rescueTokens"
| "setInstanceRegistry"
| "setRelayerRegistry"
| "version"
| "withdraw"
): FunctionFragment;
encodeFunctionData(
functionFragment: "approveTokenForInstance",
values: [
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>
]
): string;
encodeFunctionData(
functionFragment: "backupNotes",
values: [PromiseOrValue<BytesLike>[]]
): string;
encodeFunctionData(
functionFragment: "deposit",
values: [
PromiseOrValue<string>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>
]
): string;
encodeFunctionData(
functionFragment: "governanceProxyAddress",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "initialize",
values: [PromiseOrValue<string>, PromiseOrValue<string>]
): string;
encodeFunctionData(
functionFragment: "instanceRegistry",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "relayerRegistry",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "rescueTokens",
values: [
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>
]
): string;
encodeFunctionData(
functionFragment: "setInstanceRegistry",
values: [PromiseOrValue<string>]
): string;
encodeFunctionData(
functionFragment: "setRelayerRegistry",
values: [PromiseOrValue<string>]
): string;
encodeFunctionData(functionFragment: "version", values?: undefined): string;
encodeFunctionData(
functionFragment: "withdraw",
values: [
PromiseOrValue<string>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>
]
): string;
decodeFunctionResult(
functionFragment: "approveTokenForInstance",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "backupNotes",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "governanceProxyAddress",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "instanceRegistry",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "relayerRegistry",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "rescueTokens",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setInstanceRegistry",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setRelayerRegistry",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
events: {
"EncryptedNote(address,bytes)": EventFragment;
"InstanceRegistryUpdated(address)": EventFragment;
"RelayerRegistryUpdated(address)": EventFragment;
"TokenApproved(address,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "EncryptedNote"): EventFragment;
getEvent(nameOrSignatureOrTopic: "InstanceRegistryUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "RelayerRegistryUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "TokenApproved"): EventFragment;
}
export interface EncryptedNoteEventObject {
sender: string;
encryptedNote: string;
}
export type EncryptedNoteEvent = TypedEvent<
[string, string],
EncryptedNoteEventObject
>;
export type EncryptedNoteEventFilter = TypedEventFilter<EncryptedNoteEvent>;
export interface InstanceRegistryUpdatedEventObject {
newInstanceRegistryProxyAddress: string;
}
export type InstanceRegistryUpdatedEvent = TypedEvent<
[string],
InstanceRegistryUpdatedEventObject
>;
export type InstanceRegistryUpdatedEventFilter =
TypedEventFilter<InstanceRegistryUpdatedEvent>;
export interface RelayerRegistryUpdatedEventObject {
newRelayerRegistryProxyAddress: string;
}
export type RelayerRegistryUpdatedEvent = TypedEvent<
[string],
RelayerRegistryUpdatedEventObject
>;
export type RelayerRegistryUpdatedEventFilter =
TypedEventFilter<RelayerRegistryUpdatedEvent>;
export interface TokenApprovedEventObject {
spender: string;
amount: BigNumber;
}
export type TokenApprovedEvent = TypedEvent<
[string, BigNumber],
TokenApprovedEventObject
>;
export type TokenApprovedEventFilter = TypedEventFilter<TokenApprovedEvent>;
export interface TornadoRouter extends BaseContract {
contractName: "TornadoRouter";
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: TornadoRouterInterface;
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: {
approveTokenForInstance(
_token: PromiseOrValue<string>,
_spender: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
backupNotes(
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
deposit(
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
governanceProxyAddress(overrides?: CallOverrides): Promise<[string]>;
initialize(
_instanceRegistryAddress: PromiseOrValue<string>,
_relayerRegistryAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
instanceRegistry(overrides?: CallOverrides): Promise<[string]>;
relayerRegistry(overrides?: CallOverrides): Promise<[string]>;
rescueTokens(
_token: PromiseOrValue<string>,
_to: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
setInstanceRegistry(
_newInstanceRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
setRelayerRegistry(
_newRelayerRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
version(overrides?: CallOverrides): Promise<[string]>;
withdraw(
_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>;
};
approveTokenForInstance(
_token: PromiseOrValue<string>,
_spender: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
backupNotes(
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
deposit(
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
governanceProxyAddress(overrides?: CallOverrides): Promise<string>;
initialize(
_instanceRegistryAddress: PromiseOrValue<string>,
_relayerRegistryAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
instanceRegistry(overrides?: CallOverrides): Promise<string>;
relayerRegistry(overrides?: CallOverrides): Promise<string>;
rescueTokens(
_token: PromiseOrValue<string>,
_to: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
setInstanceRegistry(
_newInstanceRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
setRelayerRegistry(
_newRelayerRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
version(overrides?: CallOverrides): Promise<string>;
withdraw(
_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: {
approveTokenForInstance(
_token: PromiseOrValue<string>,
_spender: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<void>;
backupNotes(
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: CallOverrides
): Promise<void>;
deposit(
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<void>;
governanceProxyAddress(overrides?: CallOverrides): Promise<string>;
initialize(
_instanceRegistryAddress: PromiseOrValue<string>,
_relayerRegistryAddress: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<void>;
instanceRegistry(overrides?: CallOverrides): Promise<string>;
relayerRegistry(overrides?: CallOverrides): Promise<string>;
rescueTokens(
_token: PromiseOrValue<string>,
_to: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<void>;
setInstanceRegistry(
_newInstanceRegistryProxyAddress: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<void>;
setRelayerRegistry(
_newRelayerRegistryProxyAddress: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<void>;
version(overrides?: CallOverrides): Promise<string>;
withdraw(
_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?: PromiseOrValue<string> | null,
encryptedNote?: null
): EncryptedNoteEventFilter;
EncryptedNote(
sender?: PromiseOrValue<string> | null,
encryptedNote?: null
): EncryptedNoteEventFilter;
"InstanceRegistryUpdated(address)"(
newInstanceRegistryProxyAddress?: null
): InstanceRegistryUpdatedEventFilter;
InstanceRegistryUpdated(
newInstanceRegistryProxyAddress?: null
): InstanceRegistryUpdatedEventFilter;
"RelayerRegistryUpdated(address)"(
newRelayerRegistryProxyAddress?: null
): RelayerRegistryUpdatedEventFilter;
RelayerRegistryUpdated(
newRelayerRegistryProxyAddress?: null
): RelayerRegistryUpdatedEventFilter;
"TokenApproved(address,uint256)"(
spender?: PromiseOrValue<string> | null,
amount?: null
): TokenApprovedEventFilter;
TokenApproved(
spender?: PromiseOrValue<string> | null,
amount?: null
): TokenApprovedEventFilter;
};
estimateGas: {
approveTokenForInstance(
_token: PromiseOrValue<string>,
_spender: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
backupNotes(
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
deposit(
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
governanceProxyAddress(overrides?: CallOverrides): Promise<BigNumber>;
initialize(
_instanceRegistryAddress: PromiseOrValue<string>,
_relayerRegistryAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
instanceRegistry(overrides?: CallOverrides): Promise<BigNumber>;
relayerRegistry(overrides?: CallOverrides): Promise<BigNumber>;
rescueTokens(
_token: PromiseOrValue<string>,
_to: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
setInstanceRegistry(
_newInstanceRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
setRelayerRegistry(
_newRelayerRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
version(overrides?: CallOverrides): Promise<BigNumber>;
withdraw(
_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: {
approveTokenForInstance(
_token: PromiseOrValue<string>,
_spender: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
backupNotes(
_encryptedNotes: PromiseOrValue<BytesLike>[],
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
deposit(
_tornado: PromiseOrValue<string>,
_commitment: PromiseOrValue<BytesLike>,
_encryptedNote: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
governanceProxyAddress(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
initialize(
_instanceRegistryAddress: PromiseOrValue<string>,
_relayerRegistryAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
instanceRegistry(overrides?: CallOverrides): Promise<PopulatedTransaction>;
relayerRegistry(overrides?: CallOverrides): Promise<PopulatedTransaction>;
rescueTokens(
_token: PromiseOrValue<string>,
_to: PromiseOrValue<string>,
_amount: PromiseOrValue<BigNumberish>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
setInstanceRegistry(
_newInstanceRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
setRelayerRegistry(
_newRelayerRegistryProxyAddress: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
withdraw(
_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>;
};
}