tornado-pool-relayer/src/artifacts/factories/TornadoPool__factory.ts

413 lines
7.7 KiB
TypeScript

/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { TornadoPool, TornadoPoolInterface } from "../TornadoPool";
const _abi = [
{
inputs: [
{
internalType: "contract IVerifier",
name: "_verifier2",
type: "address",
},
{
internalType: "contract IVerifier",
name: "_verifier16",
type: "address",
},
{
internalType: "bytes32",
name: "_currentRoot",
type: "bytes32",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: false,
internalType: "bytes",
name: "account",
type: "bytes",
},
],
name: "EncryptedAccount",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "bytes32",
name: "commitment",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
{
indexed: false,
internalType: "bytes",
name: "encryptedOutput",
type: "bytes",
},
],
name: "NewCommitment",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "bytes32",
name: "nullifier",
type: "bytes32",
},
],
name: "NewNullifier",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: false,
internalType: "bytes",
name: "key",
type: "bytes",
},
],
name: "PublicKey",
type: "event",
},
{
inputs: [],
name: "FIELD_SIZE",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "MAX_EXT_AMOUNT",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_extAmount",
type: "uint256",
},
],
name: "calculateExternalAmount",
outputs: [
{
internalType: "int256",
name: "",
type: "int256",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "currentCommitmentIndex",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "currentRoot",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "_nullifierHash",
type: "bytes32",
},
],
name: "isSpent",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
name: "nullifierHashes",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes",
name: "_pubKey",
type: "bytes",
},
{
internalType: "bytes",
name: "_account",
type: "bytes",
},
],
name: "register",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes",
name: "_proof",
type: "bytes",
},
{
internalType: "bytes32",
name: "_root",
type: "bytes32",
},
{
internalType: "bytes32",
name: "_newRoot",
type: "bytes32",
},
{
internalType: "bytes32[]",
name: "_inputNullifiers",
type: "bytes32[]",
},
{
internalType: "bytes32[2]",
name: "_outputCommitments",
type: "bytes32[2]",
},
{
internalType: "uint256",
name: "_outPathIndices",
type: "uint256",
},
{
internalType: "uint256",
name: "_extAmount",
type: "uint256",
},
{
internalType: "uint256",
name: "_fee",
type: "uint256",
},
{
components: [
{
internalType: "address payable",
name: "recipient",
type: "address",
},
{
internalType: "address payable",
name: "relayer",
type: "address",
},
{
internalType: "bytes",
name: "encryptedOutput1",
type: "bytes",
},
{
internalType: "bytes",
name: "encryptedOutput2",
type: "bytes",
},
],
internalType: "struct TornadoPool.ExtData",
name: "_extData",
type: "tuple",
},
{
internalType: "bytes32",
name: "_extDataHash",
type: "bytes32",
},
],
name: "transaction",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "verifier16",
outputs: [
{
internalType: "contract IVerifier",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "verifier2",
outputs: [
{
internalType: "contract IVerifier",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes",
name: "_proof",
type: "bytes",
},
{
internalType: "bytes32",
name: "_root",
type: "bytes32",
},
{
internalType: "bytes32",
name: "_newRoot",
type: "bytes32",
},
{
internalType: "bytes32[]",
name: "_inputNullifiers",
type: "bytes32[]",
},
{
internalType: "bytes32[2]",
name: "_outputCommitments",
type: "bytes32[2]",
},
{
internalType: "uint256",
name: "_outPathIndices",
type: "uint256",
},
{
internalType: "uint256",
name: "_extAmount",
type: "uint256",
},
{
internalType: "uint256",
name: "_fee",
type: "uint256",
},
{
internalType: "bytes32",
name: "_extDataHash",
type: "bytes32",
},
],
name: "verifyProof",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
];
export class TornadoPool__factory {
static readonly abi = _abi;
static createInterface(): TornadoPoolInterface {
return new utils.Interface(_abi) as TornadoPoolInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): TornadoPool {
return new Contract(address, _abi, signerOrProvider) as TornadoPool;
}
}