sdk-monorepo/@tornado/sdk-chain/src/deth/factories/TornadoInstance__factory.ts
T-Hax 9419f0673c Monorepository has been setup
Signed-off-by: T-Hax <>
2023-05-02 22:19:28 +00:00

538 lines
9.5 KiB
TypeScript

/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from 'ethers'
import type { Provider } from '@ethersproject/providers'
import type { TornadoInstance, TornadoInstanceInterface } from '../TornadoInstance'
const _abi = [
{
constant: false,
inputs: [
{
internalType: 'address',
name: '_newOperator',
type: 'address'
}
],
name: 'changeOperator',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32'
}
],
name: 'nullifierHashes',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
internalType: 'bytes',
name: '_proof',
type: 'bytes'
},
{
internalType: 'bytes32',
name: '_root',
type: 'bytes32'
},
{
internalType: 'bytes32',
name: '_nullifierHash',
type: 'bytes32'
},
{
internalType: 'address payable',
name: '_recipient',
type: 'address'
},
{
internalType: 'address payable',
name: '_relayer',
type: 'address'
},
{
internalType: 'uint256',
name: '_fee',
type: 'uint256'
},
{
internalType: 'uint256',
name: '_refund',
type: 'uint256'
}
],
name: 'withdraw',
outputs: [],
payable: true,
stateMutability: 'payable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'verifier',
outputs: [
{
internalType: 'contract IVerifier',
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'bytes32',
name: '_left',
type: 'bytes32'
},
{
internalType: 'bytes32',
name: '_right',
type: 'bytes32'
}
],
name: 'hashLeftRight',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'pure',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'FIELD_SIZE',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'levels',
outputs: [
{
internalType: 'uint32',
name: '',
type: 'uint32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'operator',
outputs: [
{
internalType: 'address',
name: '',
type: 'address'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'bytes32',
name: '_root',
type: 'bytes32'
}
],
name: 'isKnownRoot',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32'
}
],
name: 'commitments',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'denomination',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'currentRootIndex',
outputs: [
{
internalType: 'uint32',
name: '',
type: 'uint32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
internalType: 'address',
name: '_newVerifier',
type: 'address'
}
],
name: 'updateVerifier',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'bytes32[]',
name: '_nullifierHashes',
type: 'bytes32[]'
}
],
name: 'isSpentArray',
outputs: [
{
internalType: 'bool[]',
name: 'spent',
type: 'bool[]'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: false,
inputs: [
{
internalType: 'bytes32',
name: '_commitment',
type: 'bytes32'
}
],
name: 'deposit',
outputs: [],
payable: true,
stateMutability: 'payable',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'getLastRoot',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
name: 'roots',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'ROOT_HISTORY_SIZE',
outputs: [
{
internalType: 'uint32',
name: '',
type: 'uint32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'bytes32',
name: '_nullifierHash',
type: 'bytes32'
}
],
name: 'isSpent',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
name: 'zeros',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'ZERO_VALUE',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
name: 'filledSubtrees',
outputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
constant: true,
inputs: [],
name: 'nextIndex',
outputs: [
{
internalType: 'uint32',
name: '',
type: 'uint32'
}
],
payable: false,
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
internalType: 'contract IVerifier',
name: '_verifier',
type: 'address'
},
{
internalType: 'uint256',
name: '_denomination',
type: 'uint256'
},
{
internalType: 'uint32',
name: '_merkleTreeHeight',
type: 'uint32'
},
{
internalType: 'address',
name: '_operator',
type: 'address'
}
],
payable: false,
stateMutability: 'nonpayable',
type: 'constructor'
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'bytes32',
name: 'commitment',
type: 'bytes32'
},
{
indexed: false,
internalType: 'uint32',
name: 'leafIndex',
type: 'uint32'
},
{
indexed: false,
internalType: 'uint256',
name: 'timestamp',
type: 'uint256'
}
],
name: 'Deposit',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'to',
type: 'address'
},
{
indexed: false,
internalType: 'bytes32',
name: 'nullifierHash',
type: 'bytes32'
},
{
indexed: true,
internalType: 'address',
name: 'relayer',
type: 'address'
},
{
indexed: false,
internalType: 'uint256',
name: 'fee',
type: 'uint256'
}
],
name: 'Withdrawal',
type: 'event'
}
] as const
export class TornadoInstance__factory {
static readonly abi = _abi
static createInterface(): TornadoInstanceInterface {
return new utils.Interface(_abi) as TornadoInstanceInterface
}
static connect(address: string, signerOrProvider: Signer | Provider): TornadoInstance {
return new Contract(address, _abi, signerOrProvider) as TornadoInstance
}
}