sdk-monorepo/test/deth/ETHTornado.ts
T-Hax 9419f0673c Monorepository has been setup
Signed-off-by: T-Hax <>
2023-05-02 22:19:28 +00:00

930 lines
28 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 ETHTornadoInterface extends utils.Interface {
functions: {
"FIELD_SIZE()": FunctionFragment;
"ROOT_HISTORY_SIZE()": FunctionFragment;
"ZERO_VALUE()": FunctionFragment;
"changeOperator(address)": FunctionFragment;
"commitments(bytes32)": FunctionFragment;
"currentRootIndex()": FunctionFragment;
"denomination()": FunctionFragment;
"deposit(bytes32)": FunctionFragment;
"filledSubtrees(uint256)": FunctionFragment;
"getLastRoot()": FunctionFragment;
"hashLeftRight(bytes32,bytes32)": FunctionFragment;
"isKnownRoot(bytes32)": FunctionFragment;
"isSpent(bytes32)": FunctionFragment;
"isSpentArray(bytes32[])": FunctionFragment;
"levels()": FunctionFragment;
"nextIndex()": FunctionFragment;
"nullifierHashes(bytes32)": FunctionFragment;
"operator()": FunctionFragment;
"roots(uint256)": FunctionFragment;
"updateVerifier(address)": FunctionFragment;
"verifier()": FunctionFragment;
"withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment;
"zeros(uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "FIELD_SIZE"
| "ROOT_HISTORY_SIZE"
| "ZERO_VALUE"
| "changeOperator"
| "commitments"
| "currentRootIndex"
| "denomination"
| "deposit"
| "filledSubtrees"
| "getLastRoot"
| "hashLeftRight"
| "isKnownRoot"
| "isSpent"
| "isSpentArray"
| "levels"
| "nextIndex"
| "nullifierHashes"
| "operator"
| "roots"
| "updateVerifier"
| "verifier"
| "withdraw"
| "zeros"
): FunctionFragment;
encodeFunctionData(
functionFragment: "FIELD_SIZE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "ROOT_HISTORY_SIZE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "ZERO_VALUE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "changeOperator",
values: [PromiseOrValue<string>]
): string;
encodeFunctionData(
functionFragment: "commitments",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "currentRootIndex",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "denomination",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "deposit",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "filledSubtrees",
values: [PromiseOrValue<BigNumberish>]
): string;
encodeFunctionData(
functionFragment: "getLastRoot",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "hashLeftRight",
values: [PromiseOrValue<BytesLike>, PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "isKnownRoot",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "isSpent",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(
functionFragment: "isSpentArray",
values: [PromiseOrValue<BytesLike>[]]
): string;
encodeFunctionData(functionFragment: "levels", values?: undefined): string;
encodeFunctionData(functionFragment: "nextIndex", values?: undefined): string;
encodeFunctionData(
functionFragment: "nullifierHashes",
values: [PromiseOrValue<BytesLike>]
): string;
encodeFunctionData(functionFragment: "operator", values?: undefined): string;
encodeFunctionData(
functionFragment: "roots",
values: [PromiseOrValue<BigNumberish>]
): string;
encodeFunctionData(
functionFragment: "updateVerifier",
values: [PromiseOrValue<string>]
): string;
encodeFunctionData(functionFragment: "verifier", values?: undefined): string;
encodeFunctionData(
functionFragment: "withdraw",
values: [
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<BytesLike>,
PromiseOrValue<string>,
PromiseOrValue<string>,
PromiseOrValue<BigNumberish>,
PromiseOrValue<BigNumberish>
]
): string;
encodeFunctionData(
functionFragment: "zeros",
values: [PromiseOrValue<BigNumberish>]
): string;
decodeFunctionResult(functionFragment: "FIELD_SIZE", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "ROOT_HISTORY_SIZE",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "ZERO_VALUE", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "changeOperator",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "commitments",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "currentRootIndex",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "denomination",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "filledSubtrees",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getLastRoot",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "hashLeftRight",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "isKnownRoot",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "isSpent", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "isSpentArray",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "levels", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nextIndex", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "nullifierHashes",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "operator", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "roots", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "updateVerifier",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "verifier", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "zeros", data: BytesLike): Result;
events: {
"Deposit(bytes32,uint32,uint256)": EventFragment;
"Withdrawal(address,bytes32,address,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment;
getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment;
}
export interface DepositEventObject {
commitment: string;
leafIndex: number;
timestamp: BigNumber;
}
export type DepositEvent = TypedEvent<
[string, number, BigNumber],
DepositEventObject
>;
export type DepositEventFilter = TypedEventFilter<DepositEvent>;
export interface WithdrawalEventObject {
to: string;
nullifierHash: string;
relayer: string;
fee: BigNumber;
}
export type WithdrawalEvent = TypedEvent<
[string, string, string, BigNumber],
WithdrawalEventObject
>;
export type WithdrawalEventFilter = TypedEventFilter<WithdrawalEvent>;
export interface ETHTornado extends BaseContract {
contractName: "ETHTornado";
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ETHTornadoInterface;
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: {
FIELD_SIZE(overrides?: CallOverrides): Promise<[BigNumber]>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>;
ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>;
/**
* operator can change his address
*/
changeOperator(
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
commitments(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<[boolean]>;
currentRootIndex(overrides?: CallOverrides): Promise<[number]>;
denomination(overrides?: CallOverrides): Promise<[BigNumber]>;
/**
* Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.
* @param _commitment the note commitment, which is PedersenHash(nullifier + secret)
*/
deposit(
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
filledSubtrees(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<[string]>;
/**
* Returns the last root
*/
getLastRoot(overrides?: CallOverrides): Promise<[string]>;
/**
* Hash 2 tree leaves, returns MiMC(_left, _right)
*/
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<[string]>;
/**
* Whether the root is present in the root history
*/
isKnownRoot(
_root: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<[boolean]>;
/**
* whether a note is already spent
*/
isSpent(
_nullifierHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<[boolean]>;
/**
* whether an array of notes is already spent
*/
isSpentArray(
_nullifierHashes: PromiseOrValue<BytesLike>[],
overrides?: CallOverrides
): Promise<[boolean[]] & { spent: boolean[] }>;
levels(overrides?: CallOverrides): Promise<[number]>;
nextIndex(overrides?: CallOverrides): Promise<[number]>;
nullifierHashes(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<[boolean]>;
operator(overrides?: CallOverrides): Promise<[string]>;
roots(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<[string]>;
/**
* allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address
*/
updateVerifier(
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
verifier(overrides?: CallOverrides): Promise<[string]>;
/**
* Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)
*/
withdraw(
_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>;
zeros(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<[string]>;
};
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
/**
* operator can change his address
*/
changeOperator(
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
commitments(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
currentRootIndex(overrides?: CallOverrides): Promise<number>;
denomination(overrides?: CallOverrides): Promise<BigNumber>;
/**
* Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.
* @param _commitment the note commitment, which is PedersenHash(nullifier + secret)
*/
deposit(
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
filledSubtrees(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<string>;
/**
* Returns the last root
*/
getLastRoot(overrides?: CallOverrides): Promise<string>;
/**
* Hash 2 tree leaves, returns MiMC(_left, _right)
*/
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<string>;
/**
* Whether the root is present in the root history
*/
isKnownRoot(
_root: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
/**
* whether a note is already spent
*/
isSpent(
_nullifierHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
/**
* whether an array of notes is already spent
*/
isSpentArray(
_nullifierHashes: PromiseOrValue<BytesLike>[],
overrides?: CallOverrides
): Promise<boolean[]>;
levels(overrides?: CallOverrides): Promise<number>;
nextIndex(overrides?: CallOverrides): Promise<number>;
nullifierHashes(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
operator(overrides?: CallOverrides): Promise<string>;
roots(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<string>;
/**
* allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address
*/
updateVerifier(
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;
verifier(overrides?: CallOverrides): Promise<string>;
/**
* Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)
*/
withdraw(
_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>;
zeros(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<string>;
callStatic: {
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
/**
* operator can change his address
*/
changeOperator(
_newOperator: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<void>;
commitments(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
currentRootIndex(overrides?: CallOverrides): Promise<number>;
denomination(overrides?: CallOverrides): Promise<BigNumber>;
/**
* Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.
* @param _commitment the note commitment, which is PedersenHash(nullifier + secret)
*/
deposit(
_commitment: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<void>;
filledSubtrees(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<string>;
/**
* Returns the last root
*/
getLastRoot(overrides?: CallOverrides): Promise<string>;
/**
* Hash 2 tree leaves, returns MiMC(_left, _right)
*/
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<string>;
/**
* Whether the root is present in the root history
*/
isKnownRoot(
_root: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
/**
* whether a note is already spent
*/
isSpent(
_nullifierHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
/**
* whether an array of notes is already spent
*/
isSpentArray(
_nullifierHashes: PromiseOrValue<BytesLike>[],
overrides?: CallOverrides
): Promise<boolean[]>;
levels(overrides?: CallOverrides): Promise<number>;
nextIndex(overrides?: CallOverrides): Promise<number>;
nullifierHashes(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<boolean>;
operator(overrides?: CallOverrides): Promise<string>;
roots(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<string>;
/**
* allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address
*/
updateVerifier(
_newVerifier: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<void>;
verifier(overrides?: CallOverrides): Promise<string>;
/**
* Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)
*/
withdraw(
_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>;
zeros(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<string>;
};
filters: {
"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?: PromiseOrValue<string> | null,
fee?: null
): WithdrawalEventFilter;
Withdrawal(
to?: null,
nullifierHash?: null,
relayer?: PromiseOrValue<string> | null,
fee?: null
): WithdrawalEventFilter;
};
estimateGas: {
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
/**
* operator can change his address
*/
changeOperator(
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
commitments(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<BigNumber>;
currentRootIndex(overrides?: CallOverrides): Promise<BigNumber>;
denomination(overrides?: CallOverrides): Promise<BigNumber>;
/**
* Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.
* @param _commitment the note commitment, which is PedersenHash(nullifier + secret)
*/
deposit(
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
filledSubtrees(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<BigNumber>;
/**
* Returns the last root
*/
getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;
/**
* Hash 2 tree leaves, returns MiMC(_left, _right)
*/
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<BigNumber>;
/**
* Whether the root is present in the root history
*/
isKnownRoot(
_root: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<BigNumber>;
/**
* whether a note is already spent
*/
isSpent(
_nullifierHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<BigNumber>;
/**
* whether an array of notes is already spent
*/
isSpentArray(
_nullifierHashes: PromiseOrValue<BytesLike>[],
overrides?: CallOverrides
): Promise<BigNumber>;
levels(overrides?: CallOverrides): Promise<BigNumber>;
nextIndex(overrides?: CallOverrides): Promise<BigNumber>;
nullifierHashes(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<BigNumber>;
operator(overrides?: CallOverrides): Promise<BigNumber>;
roots(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<BigNumber>;
/**
* allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address
*/
updateVerifier(
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;
verifier(overrides?: CallOverrides): Promise<BigNumber>;
/**
* Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)
*/
withdraw(
_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>;
zeros(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
FIELD_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
ZERO_VALUE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
/**
* operator can change his address
*/
changeOperator(
_newOperator: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
commitments(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
currentRootIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
denomination(overrides?: CallOverrides): Promise<PopulatedTransaction>;
/**
* Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.
* @param _commitment the note commitment, which is PedersenHash(nullifier + secret)
*/
deposit(
_commitment: PromiseOrValue<BytesLike>,
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
filledSubtrees(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
/**
* Returns the last root
*/
getLastRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;
/**
* Hash 2 tree leaves, returns MiMC(_left, _right)
*/
hashLeftRight(
_left: PromiseOrValue<BytesLike>,
_right: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
/**
* Whether the root is present in the root history
*/
isKnownRoot(
_root: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
/**
* whether a note is already spent
*/
isSpent(
_nullifierHash: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
/**
* whether an array of notes is already spent
*/
isSpentArray(
_nullifierHashes: PromiseOrValue<BytesLike>[],
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
levels(overrides?: CallOverrides): Promise<PopulatedTransaction>;
nextIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
nullifierHashes(
arg0: PromiseOrValue<BytesLike>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
operator(overrides?: CallOverrides): Promise<PopulatedTransaction>;
roots(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
/**
* allow operator to update SNARK verification keys. This is needed to update keys after the final trusted setup ceremony is held. After that operator rights are supposed to be transferred to zero address
*/
updateVerifier(
_newVerifier: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;
verifier(overrides?: CallOverrides): Promise<PopulatedTransaction>;
/**
* Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay)
*/
withdraw(
_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>;
zeros(
arg0: PromiseOrValue<BigNumberish>,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}