@orochi-network/contracts
Version:
Orochi smart contracts for on-chain verification
283 lines • 17.3 kB
TypeScript
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 ONProver {
type ConfigurationStruct = {
maxDailyLimit: BigNumberish;
timeStart: BigNumberish;
timeEnd: BigNumberish;
tokenContract: AddressLike;
};
type ConfigurationStructOutput = [
maxDailyLimit: bigint,
timeStart: bigint,
timeEnd: bigint,
tokenContract: string
] & {
maxDailyLimit: bigint;
timeStart: bigint;
timeEnd: bigint;
tokenContract: string;
};
type DailyClaimStruct = {
claimed: BigNumberish;
userCount: BigNumberish;
};
type DailyClaimStructOutput = [claimed: bigint, userCount: bigint] & {
claimed: bigint;
userCount: bigint;
};
}
export interface ONProverInterface extends Interface {
getFunction(nameOrSignature: "addOperator" | "claim" | "getConfig" | "getCurrentDay" | "getMetricByDate" | "getMetricToday" | "getTotalClaim" | "getUserNonce" | "isOperator" | "owner" | "removeOperator" | "renounceOwnership" | "setConfiguration" | "transferOwnership"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "AddOperator" | "OwnershipTransferred" | "RemoveOperator" | "TokenClaim" | "TokenClaimDaily" | "UpdateConfigMaxDailyLimit" | "UpdateConfigTimeEnd" | "UpdateConfigTimeStart" | "UpdateConfigTokenContract"): EventFragment;
encodeFunctionData(functionFragment: "addOperator", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "claim", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "getConfig", values?: undefined): string;
encodeFunctionData(functionFragment: "getCurrentDay", values?: undefined): string;
encodeFunctionData(functionFragment: "getMetricByDate", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "getMetricToday", values?: undefined): string;
encodeFunctionData(functionFragment: "getTotalClaim", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "getUserNonce", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "isOperator", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(functionFragment: "removeOperator", values: [AddressLike]): string;
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
encodeFunctionData(functionFragment: "setConfiguration", values: [ONProver.ConfigurationStruct]): string;
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
decodeFunctionResult(functionFragment: "addOperator", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getConfig", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getCurrentDay", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getMetricByDate", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getMetricToday", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getTotalClaim", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getUserNonce", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "isOperator", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "removeOperator", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setConfiguration", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
}
export declare namespace AddOperatorEvent {
type InputTuple = [newOperator: AddressLike];
type OutputTuple = [newOperator: string];
interface OutputObject {
newOperator: string;
}
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 RemoveOperatorEvent {
type InputTuple = [OldOperator: AddressLike];
type OutputTuple = [OldOperator: string];
interface OutputObject {
OldOperator: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace TokenClaimEvent {
type InputTuple = [to: AddressLike, amount: BigNumberish];
type OutputTuple = [to: string, amount: bigint];
interface OutputObject {
to: string;
amount: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace TokenClaimDailyEvent {
type InputTuple = [
to: AddressLike,
amount: BigNumberish,
day: BigNumberish
];
type OutputTuple = [to: string, amount: bigint, day: bigint];
interface OutputObject {
to: string;
amount: bigint;
day: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace UpdateConfigMaxDailyLimitEvent {
type InputTuple = [maxDailyLimit: BigNumberish];
type OutputTuple = [maxDailyLimit: bigint];
interface OutputObject {
maxDailyLimit: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace UpdateConfigTimeEndEvent {
type InputTuple = [timeEnd: BigNumberish];
type OutputTuple = [timeEnd: bigint];
interface OutputObject {
timeEnd: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace UpdateConfigTimeStartEvent {
type InputTuple = [timeStart: BigNumberish];
type OutputTuple = [timeStart: bigint];
interface OutputObject {
timeStart: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace UpdateConfigTokenContractEvent {
type InputTuple = [tokenContract: AddressLike];
type OutputTuple = [tokenContract: string];
interface OutputObject {
tokenContract: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface ONProver extends BaseContract {
connect(runner?: ContractRunner | null): ONProver;
waitForDeployment(): Promise<this>;
interface: ONProverInterface;
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>;
addOperator: TypedContractMethod<[
operatorNew: AddressLike
], [
boolean
], "nonpayable">;
claim: TypedContractMethod<[proof: BytesLike], [void], "nonpayable">;
getConfig: TypedContractMethod<[
], [
ONProver.ConfigurationStructOutput
], "view">;
getCurrentDay: TypedContractMethod<[], [bigint], "view">;
getMetricByDate: TypedContractMethod<[
day: BigNumberish
], [
ONProver.DailyClaimStructOutput
], "view">;
getMetricToday: TypedContractMethod<[
], [
ONProver.DailyClaimStructOutput
], "view">;
getTotalClaim: TypedContractMethod<[
userAddress: AddressLike
], [
bigint
], "view">;
getUserNonce: TypedContractMethod<[user: AddressLike], [bigint], "view">;
isOperator: TypedContractMethod<[
checkAddress: AddressLike
], [
boolean
], "view">;
owner: TypedContractMethod<[], [string], "view">;
removeOperator: TypedContractMethod<[
operatorOld: AddressLike
], [
boolean
], "nonpayable">;
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
setConfiguration: TypedContractMethod<[
cfg: ONProver.ConfigurationStruct
], [
boolean
], "nonpayable">;
transferOwnership: TypedContractMethod<[
newOwner: AddressLike
], [
void
], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "addOperator"): TypedContractMethod<[operatorNew: AddressLike], [boolean], "nonpayable">;
getFunction(nameOrSignature: "claim"): TypedContractMethod<[proof: BytesLike], [void], "nonpayable">;
getFunction(nameOrSignature: "getConfig"): TypedContractMethod<[], [ONProver.ConfigurationStructOutput], "view">;
getFunction(nameOrSignature: "getCurrentDay"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "getMetricByDate"): TypedContractMethod<[
day: BigNumberish
], [
ONProver.DailyClaimStructOutput
], "view">;
getFunction(nameOrSignature: "getMetricToday"): TypedContractMethod<[], [ONProver.DailyClaimStructOutput], "view">;
getFunction(nameOrSignature: "getTotalClaim"): TypedContractMethod<[userAddress: AddressLike], [bigint], "view">;
getFunction(nameOrSignature: "getUserNonce"): TypedContractMethod<[user: AddressLike], [bigint], "view">;
getFunction(nameOrSignature: "isOperator"): TypedContractMethod<[checkAddress: AddressLike], [boolean], "view">;
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "removeOperator"): TypedContractMethod<[operatorOld: AddressLike], [boolean], "nonpayable">;
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
getFunction(nameOrSignature: "setConfiguration"): TypedContractMethod<[
cfg: ONProver.ConfigurationStruct
], [
boolean
], "nonpayable">;
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
getEvent(key: "AddOperator"): TypedContractEvent<AddOperatorEvent.InputTuple, AddOperatorEvent.OutputTuple, AddOperatorEvent.OutputObject>;
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
getEvent(key: "RemoveOperator"): TypedContractEvent<RemoveOperatorEvent.InputTuple, RemoveOperatorEvent.OutputTuple, RemoveOperatorEvent.OutputObject>;
getEvent(key: "TokenClaim"): TypedContractEvent<TokenClaimEvent.InputTuple, TokenClaimEvent.OutputTuple, TokenClaimEvent.OutputObject>;
getEvent(key: "TokenClaimDaily"): TypedContractEvent<TokenClaimDailyEvent.InputTuple, TokenClaimDailyEvent.OutputTuple, TokenClaimDailyEvent.OutputObject>;
getEvent(key: "UpdateConfigMaxDailyLimit"): TypedContractEvent<UpdateConfigMaxDailyLimitEvent.InputTuple, UpdateConfigMaxDailyLimitEvent.OutputTuple, UpdateConfigMaxDailyLimitEvent.OutputObject>;
getEvent(key: "UpdateConfigTimeEnd"): TypedContractEvent<UpdateConfigTimeEndEvent.InputTuple, UpdateConfigTimeEndEvent.OutputTuple, UpdateConfigTimeEndEvent.OutputObject>;
getEvent(key: "UpdateConfigTimeStart"): TypedContractEvent<UpdateConfigTimeStartEvent.InputTuple, UpdateConfigTimeStartEvent.OutputTuple, UpdateConfigTimeStartEvent.OutputObject>;
getEvent(key: "UpdateConfigTokenContract"): TypedContractEvent<UpdateConfigTokenContractEvent.InputTuple, UpdateConfigTokenContractEvent.OutputTuple, UpdateConfigTokenContractEvent.OutputObject>;
filters: {
"AddOperator(address)": TypedContractEvent<AddOperatorEvent.InputTuple, AddOperatorEvent.OutputTuple, AddOperatorEvent.OutputObject>;
AddOperator: TypedContractEvent<AddOperatorEvent.InputTuple, AddOperatorEvent.OutputTuple, AddOperatorEvent.OutputObject>;
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
"RemoveOperator(address)": TypedContractEvent<RemoveOperatorEvent.InputTuple, RemoveOperatorEvent.OutputTuple, RemoveOperatorEvent.OutputObject>;
RemoveOperator: TypedContractEvent<RemoveOperatorEvent.InputTuple, RemoveOperatorEvent.OutputTuple, RemoveOperatorEvent.OutputObject>;
"TokenClaim(address,uint256)": TypedContractEvent<TokenClaimEvent.InputTuple, TokenClaimEvent.OutputTuple, TokenClaimEvent.OutputObject>;
TokenClaim: TypedContractEvent<TokenClaimEvent.InputTuple, TokenClaimEvent.OutputTuple, TokenClaimEvent.OutputObject>;
"TokenClaimDaily(address,uint256,uint256)": TypedContractEvent<TokenClaimDailyEvent.InputTuple, TokenClaimDailyEvent.OutputTuple, TokenClaimDailyEvent.OutputObject>;
TokenClaimDaily: TypedContractEvent<TokenClaimDailyEvent.InputTuple, TokenClaimDailyEvent.OutputTuple, TokenClaimDailyEvent.OutputObject>;
"UpdateConfigMaxDailyLimit(uint128)": TypedContractEvent<UpdateConfigMaxDailyLimitEvent.InputTuple, UpdateConfigMaxDailyLimitEvent.OutputTuple, UpdateConfigMaxDailyLimitEvent.OutputObject>;
UpdateConfigMaxDailyLimit: TypedContractEvent<UpdateConfigMaxDailyLimitEvent.InputTuple, UpdateConfigMaxDailyLimitEvent.OutputTuple, UpdateConfigMaxDailyLimitEvent.OutputObject>;
"UpdateConfigTimeEnd(uint64)": TypedContractEvent<UpdateConfigTimeEndEvent.InputTuple, UpdateConfigTimeEndEvent.OutputTuple, UpdateConfigTimeEndEvent.OutputObject>;
UpdateConfigTimeEnd: TypedContractEvent<UpdateConfigTimeEndEvent.InputTuple, UpdateConfigTimeEndEvent.OutputTuple, UpdateConfigTimeEndEvent.OutputObject>;
"UpdateConfigTimeStart(uint64)": TypedContractEvent<UpdateConfigTimeStartEvent.InputTuple, UpdateConfigTimeStartEvent.OutputTuple, UpdateConfigTimeStartEvent.OutputObject>;
UpdateConfigTimeStart: TypedContractEvent<UpdateConfigTimeStartEvent.InputTuple, UpdateConfigTimeStartEvent.OutputTuple, UpdateConfigTimeStartEvent.OutputObject>;
"UpdateConfigTokenContract(address)": TypedContractEvent<UpdateConfigTokenContractEvent.InputTuple, UpdateConfigTokenContractEvent.OutputTuple, UpdateConfigTokenContractEvent.OutputObject>;
UpdateConfigTokenContract: TypedContractEvent<UpdateConfigTokenContractEvent.InputTuple, UpdateConfigTokenContractEvent.OutputTuple, UpdateConfigTokenContractEvent.OutputObject>;
};
}
//# sourceMappingURL=ONProver.d.ts.map