UNPKG

@orochi-network/contracts

Version:

Orochi smart contracts for on-chain verification

403 lines 21.3 kB
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common.js"; export declare namespace IOrandECDSAV2 { type OrandECDSAProofStruct = { signer: AddressLike; receiverAddress: AddressLike; receiverEpoch: BigNumberish; ecvrfProofDigest: BigNumberish; }; type OrandECDSAProofStructOutput = [ signer: string, receiverAddress: string, receiverEpoch: bigint, ecvrfProofDigest: bigint ] & { signer: string; receiverAddress: string; receiverEpoch: bigint; ecvrfProofDigest: bigint; }; } export declare namespace IOrandProviderV2 { type ECVRFProofStruct = { gamma: [BigNumberish, BigNumberish]; c: BigNumberish; s: BigNumberish; alpha: BigNumberish; uWitness: AddressLike; cGammaWitness: [BigNumberish, BigNumberish]; sHashWitness: [BigNumberish, BigNumberish]; zInv: BigNumberish; }; type ECVRFProofStructOutput = [ gamma: [bigint, bigint], c: bigint, s: bigint, alpha: bigint, uWitness: string, cGammaWitness: [bigint, bigint], sHashWitness: [bigint, bigint], zInv: bigint ] & { gamma: [bigint, bigint]; c: bigint; s: bigint; alpha: bigint; uWitness: string; cGammaWitness: [bigint, bigint]; sHashWitness: [bigint, bigint]; zInv: bigint; }; } export interface OrandProviderV2Interface extends Interface { getFunction(nameOrSignature: "decomposeProof" | "genesis" | "getCurrentEpoch" | "getCurrentEpochResult" | "getECVRFVerifier" | "getEpochResult" | "getMaximumBatching" | "getOperator" | "getOracle" | "getPublicKey" | "getPublicKeyDigest" | "getTotalEpoch" | "owner" | "publish" | "publishFraudProof" | "renounceOwnership" | "setMaxBatching" | "setNewECVRFVerifier" | "setNewOracle" | "setPublicKey" | "transferOwnership" | "verifyEpoch"): FunctionFragment; getEvent(nameOrSignatureOrTopic: "NewEpoch" | "OwnershipTransferred" | "SetBatchingLimit" | "SetNewECVRFVerifier" | "SetNewOperator" | "SetNewOracle" | "SetNewPublicKey"): EventFragment; encodeFunctionData(functionFragment: "decomposeProof", values: [BytesLike]): string; encodeFunctionData(functionFragment: "genesis", values: [BytesLike, IOrandProviderV2.ECVRFProofStruct]): string; encodeFunctionData(functionFragment: "getCurrentEpoch", values: [AddressLike]): string; encodeFunctionData(functionFragment: "getCurrentEpochResult", values: [AddressLike]): string; encodeFunctionData(functionFragment: "getECVRFVerifier", values?: undefined): string; encodeFunctionData(functionFragment: "getEpochResult", values: [AddressLike, BigNumberish]): string; encodeFunctionData(functionFragment: "getMaximumBatching", values?: undefined): string; encodeFunctionData(functionFragment: "getOperator", values?: undefined): string; encodeFunctionData(functionFragment: "getOracle", values?: undefined): string; encodeFunctionData(functionFragment: "getPublicKey", values?: undefined): string; encodeFunctionData(functionFragment: "getPublicKeyDigest", values?: undefined): string; encodeFunctionData(functionFragment: "getTotalEpoch", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData(functionFragment: "publish", values: [AddressLike, IOrandProviderV2.ECVRFProofStruct]): string; encodeFunctionData(functionFragment: "publishFraudProof", values: [BytesLike, IOrandProviderV2.ECVRFProofStruct]): string; encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; encodeFunctionData(functionFragment: "setMaxBatching", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "setNewECVRFVerifier", values: [AddressLike]): string; encodeFunctionData(functionFragment: "setNewOracle", values: [AddressLike]): string; encodeFunctionData(functionFragment: "setPublicKey", values: [[BigNumberish, BigNumberish]]): string; encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string; encodeFunctionData(functionFragment: "verifyEpoch", values: [BytesLike, IOrandProviderV2.ECVRFProofStruct]): string; decodeFunctionResult(functionFragment: "decomposeProof", data: BytesLike): Result; decodeFunctionResult(functionFragment: "genesis", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getCurrentEpoch", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getCurrentEpochResult", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getECVRFVerifier", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getEpochResult", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getMaximumBatching", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getOperator", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getOracle", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getPublicKey", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getPublicKeyDigest", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getTotalEpoch", data: BytesLike): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; decodeFunctionResult(functionFragment: "publish", data: BytesLike): Result; decodeFunctionResult(functionFragment: "publishFraudProof", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setMaxBatching", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setNewECVRFVerifier", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setNewOracle", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setPublicKey", data: BytesLike): Result; decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; decodeFunctionResult(functionFragment: "verifyEpoch", data: BytesLike): Result; } export declare namespace NewEpochEvent { type InputTuple = [ receiverAddress: AddressLike, receiverEpoch: BigNumberish, randomness: BigNumberish ]; type OutputTuple = [ receiverAddress: string, receiverEpoch: bigint, randomness: bigint ]; interface OutputObject { receiverAddress: string; receiverEpoch: bigint; randomness: bigint; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace OwnershipTransferredEvent { type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; type OutputTuple = [previousOwner: string, newOwner: string]; interface OutputObject { previousOwner: string; newOwner: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace SetBatchingLimitEvent { type InputTuple = [actor: AddressLike, maxBatching: BigNumberish]; type OutputTuple = [actor: string, maxBatching: bigint]; interface OutputObject { actor: string; maxBatching: bigint; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace SetNewECVRFVerifierEvent { type InputTuple = [actor: AddressLike, ecvrfAddress: AddressLike]; type OutputTuple = [actor: string, ecvrfAddress: string]; interface OutputObject { actor: string; ecvrfAddress: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace SetNewOperatorEvent { type InputTuple = [oldOperator: AddressLike, newOperator: AddressLike]; type OutputTuple = [oldOperator: string, newOperator: string]; interface OutputObject { oldOperator: string; newOperator: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace SetNewOracleEvent { type InputTuple = [actor: AddressLike, newOracle: AddressLike]; type OutputTuple = [actor: string, newOracle: string]; interface OutputObject { actor: string; newOracle: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace SetNewPublicKeyEvent { type InputTuple = [ actor: AddressLike, pkx: BigNumberish, pky: BigNumberish ]; type OutputTuple = [actor: string, pkx: bigint, pky: bigint]; interface OutputObject { actor: string; pkx: bigint; pky: bigint; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export interface OrandProviderV2 extends BaseContract { connect(runner?: ContractRunner | null): OrandProviderV2; waitForDeployment(): Promise<this>; interface: OrandProviderV2Interface; queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>; queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>; on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>; on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>; once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>; once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>; listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>; listeners(eventName?: string): Promise<Array<Listener>>; removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>; decomposeProof: TypedContractMethod<[ proof: BytesLike ], [ IOrandECDSAV2.OrandECDSAProofStructOutput ], "view">; genesis: TypedContractMethod<[ fraudProof: BytesLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ boolean ], "nonpayable">; getCurrentEpoch: TypedContractMethod<[ receiver: AddressLike ], [ bigint ], "view">; getCurrentEpochResult: TypedContractMethod<[ receiver: AddressLike ], [ bigint ], "view">; getECVRFVerifier: TypedContractMethod<[], [string], "view">; getEpochResult: TypedContractMethod<[ receiver: AddressLike, epoch: BigNumberish ], [ bigint ], "view">; getMaximumBatching: TypedContractMethod<[], [bigint], "view">; getOperator: TypedContractMethod<[], [string], "view">; getOracle: TypedContractMethod<[], [string], "view">; getPublicKey: TypedContractMethod<[], [[bigint, bigint]], "view">; getPublicKeyDigest: TypedContractMethod<[], [string], "view">; getTotalEpoch: TypedContractMethod<[receiver: AddressLike], [bigint], "view">; owner: TypedContractMethod<[], [string], "view">; publish: TypedContractMethod<[ receiverAddress: AddressLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ boolean ], "nonpayable">; publishFraudProof: TypedContractMethod<[ fraudProof: BytesLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ boolean ], "nonpayable">; renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; setMaxBatching: TypedContractMethod<[ maxBatchingLimit: BigNumberish ], [ boolean ], "nonpayable">; setNewECVRFVerifier: TypedContractMethod<[ ecvrfAddress: AddressLike ], [ boolean ], "nonpayable">; setNewOracle: TypedContractMethod<[ oracleAddress: AddressLike ], [ boolean ], "nonpayable">; setPublicKey: TypedContractMethod<[ pk: [BigNumberish, BigNumberish] ], [ boolean ], "nonpayable">; transferOwnership: TypedContractMethod<[ newOwner: AddressLike ], [ void ], "nonpayable">; verifyEpoch: TypedContractMethod<[ fraudProof: BytesLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ [ IOrandECDSAV2.OrandECDSAProofStructOutput, bigint, boolean, boolean, bigint, bigint ] & { ecdsaProof: IOrandECDSAV2.OrandECDSAProofStructOutput; currentEpochNumber: bigint; isEpochLinked: boolean; isValidDualProof: boolean; currentEpochResult: bigint; verifiedEpochResult: bigint; } ], "view">; getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T; getFunction(nameOrSignature: "decomposeProof"): TypedContractMethod<[ proof: BytesLike ], [ IOrandECDSAV2.OrandECDSAProofStructOutput ], "view">; getFunction(nameOrSignature: "genesis"): TypedContractMethod<[ fraudProof: BytesLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ boolean ], "nonpayable">; getFunction(nameOrSignature: "getCurrentEpoch"): TypedContractMethod<[receiver: AddressLike], [bigint], "view">; getFunction(nameOrSignature: "getCurrentEpochResult"): TypedContractMethod<[receiver: AddressLike], [bigint], "view">; getFunction(nameOrSignature: "getECVRFVerifier"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "getEpochResult"): TypedContractMethod<[ receiver: AddressLike, epoch: BigNumberish ], [ bigint ], "view">; getFunction(nameOrSignature: "getMaximumBatching"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getOperator"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "getOracle"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "getPublicKey"): TypedContractMethod<[], [[bigint, bigint]], "view">; getFunction(nameOrSignature: "getPublicKeyDigest"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "getTotalEpoch"): TypedContractMethod<[receiver: AddressLike], [bigint], "view">; getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "publish"): TypedContractMethod<[ receiverAddress: AddressLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ boolean ], "nonpayable">; getFunction(nameOrSignature: "publishFraudProof"): TypedContractMethod<[ fraudProof: BytesLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ boolean ], "nonpayable">; getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">; getFunction(nameOrSignature: "setMaxBatching"): TypedContractMethod<[ maxBatchingLimit: BigNumberish ], [ boolean ], "nonpayable">; getFunction(nameOrSignature: "setNewECVRFVerifier"): TypedContractMethod<[ecvrfAddress: AddressLike], [boolean], "nonpayable">; getFunction(nameOrSignature: "setNewOracle"): TypedContractMethod<[oracleAddress: AddressLike], [boolean], "nonpayable">; getFunction(nameOrSignature: "setPublicKey"): TypedContractMethod<[ pk: [BigNumberish, BigNumberish] ], [ boolean ], "nonpayable">; getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; getFunction(nameOrSignature: "verifyEpoch"): TypedContractMethod<[ fraudProof: BytesLike, ecvrfProof: IOrandProviderV2.ECVRFProofStruct ], [ [ IOrandECDSAV2.OrandECDSAProofStructOutput, bigint, boolean, boolean, bigint, bigint ] & { ecdsaProof: IOrandECDSAV2.OrandECDSAProofStructOutput; currentEpochNumber: bigint; isEpochLinked: boolean; isValidDualProof: boolean; currentEpochResult: bigint; verifiedEpochResult: bigint; } ], "view">; getEvent(key: "NewEpoch"): TypedContractEvent<NewEpochEvent.InputTuple, NewEpochEvent.OutputTuple, NewEpochEvent.OutputObject>; getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; getEvent(key: "SetBatchingLimit"): TypedContractEvent<SetBatchingLimitEvent.InputTuple, SetBatchingLimitEvent.OutputTuple, SetBatchingLimitEvent.OutputObject>; getEvent(key: "SetNewECVRFVerifier"): TypedContractEvent<SetNewECVRFVerifierEvent.InputTuple, SetNewECVRFVerifierEvent.OutputTuple, SetNewECVRFVerifierEvent.OutputObject>; getEvent(key: "SetNewOperator"): TypedContractEvent<SetNewOperatorEvent.InputTuple, SetNewOperatorEvent.OutputTuple, SetNewOperatorEvent.OutputObject>; getEvent(key: "SetNewOracle"): TypedContractEvent<SetNewOracleEvent.InputTuple, SetNewOracleEvent.OutputTuple, SetNewOracleEvent.OutputObject>; getEvent(key: "SetNewPublicKey"): TypedContractEvent<SetNewPublicKeyEvent.InputTuple, SetNewPublicKeyEvent.OutputTuple, SetNewPublicKeyEvent.OutputObject>; filters: { "NewEpoch(address,uint96,uint256)": TypedContractEvent<NewEpochEvent.InputTuple, NewEpochEvent.OutputTuple, NewEpochEvent.OutputObject>; NewEpoch: TypedContractEvent<NewEpochEvent.InputTuple, NewEpochEvent.OutputTuple, NewEpochEvent.OutputObject>; "OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; "SetBatchingLimit(address,uint256)": TypedContractEvent<SetBatchingLimitEvent.InputTuple, SetBatchingLimitEvent.OutputTuple, SetBatchingLimitEvent.OutputObject>; SetBatchingLimit: TypedContractEvent<SetBatchingLimitEvent.InputTuple, SetBatchingLimitEvent.OutputTuple, SetBatchingLimitEvent.OutputObject>; "SetNewECVRFVerifier(address,address)": TypedContractEvent<SetNewECVRFVerifierEvent.InputTuple, SetNewECVRFVerifierEvent.OutputTuple, SetNewECVRFVerifierEvent.OutputObject>; SetNewECVRFVerifier: TypedContractEvent<SetNewECVRFVerifierEvent.InputTuple, SetNewECVRFVerifierEvent.OutputTuple, SetNewECVRFVerifierEvent.OutputObject>; "SetNewOperator(address,address)": TypedContractEvent<SetNewOperatorEvent.InputTuple, SetNewOperatorEvent.OutputTuple, SetNewOperatorEvent.OutputObject>; SetNewOperator: TypedContractEvent<SetNewOperatorEvent.InputTuple, SetNewOperatorEvent.OutputTuple, SetNewOperatorEvent.OutputObject>; "SetNewOracle(address,address)": TypedContractEvent<SetNewOracleEvent.InputTuple, SetNewOracleEvent.OutputTuple, SetNewOracleEvent.OutputObject>; SetNewOracle: TypedContractEvent<SetNewOracleEvent.InputTuple, SetNewOracleEvent.OutputTuple, SetNewOracleEvent.OutputObject>; "SetNewPublicKey(address,uint256,uint256)": TypedContractEvent<SetNewPublicKeyEvent.InputTuple, SetNewPublicKeyEvent.OutputTuple, SetNewPublicKeyEvent.OutputObject>; SetNewPublicKey: TypedContractEvent<SetNewPublicKeyEvent.InputTuple, SetNewPublicKeyEvent.OutputTuple, SetNewPublicKeyEvent.OutputObject>; }; } //# sourceMappingURL=OrandProviderV2.d.ts.map