UNPKG

@excubiae/contracts

Version:
135 lines 8.9 kB
import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../../common"; export interface BasePolicyInterface extends Interface { getFunction(nameOrSignature: "BASE_CHECKER" | "enforce" | "getAppendedBytes" | "guarded" | "initialize" | "initialized" | "owner" | "renounceOwnership" | "setTarget" | "trait" | "transferOwnership"): FunctionFragment; getEvent(nameOrSignatureOrTopic: "Enforced" | "OwnershipTransferred" | "TargetSet"): EventFragment; encodeFunctionData(functionFragment: "BASE_CHECKER", values?: undefined): string; encodeFunctionData(functionFragment: "enforce", values: [AddressLike, BytesLike]): string; encodeFunctionData(functionFragment: "getAppendedBytes", values?: undefined): string; encodeFunctionData(functionFragment: "guarded", values?: undefined): string; encodeFunctionData(functionFragment: "initialize", values?: undefined): string; encodeFunctionData(functionFragment: "initialized", values?: undefined): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; encodeFunctionData(functionFragment: "setTarget", values: [AddressLike]): string; encodeFunctionData(functionFragment: "trait", values?: undefined): string; encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string; decodeFunctionResult(functionFragment: "BASE_CHECKER", data: BytesLike): Result; decodeFunctionResult(functionFragment: "enforce", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getAppendedBytes", data: BytesLike): Result; decodeFunctionResult(functionFragment: "guarded", data: BytesLike): Result; decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; decodeFunctionResult(functionFragment: "initialized", data: BytesLike): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setTarget", data: BytesLike): Result; decodeFunctionResult(functionFragment: "trait", data: BytesLike): Result; decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; } export declare namespace EnforcedEvent { type InputTuple = [ subject: AddressLike, guarded: AddressLike, evidence: BytesLike ]; type OutputTuple = [ subject: string, guarded: string, evidence: string ]; interface OutputObject { subject: string; guarded: string; evidence: 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 TargetSetEvent { type InputTuple = [guarded: AddressLike]; type OutputTuple = [guarded: string]; interface OutputObject { guarded: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export interface BasePolicy extends BaseContract { connect(runner?: ContractRunner | null): BasePolicy; waitForDeployment(): Promise<this>; interface: BasePolicyInterface; 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>; BASE_CHECKER: TypedContractMethod<[], [string], "view">; enforce: TypedContractMethod<[ subject: AddressLike, evidence: BytesLike ], [ void ], "nonpayable">; getAppendedBytes: TypedContractMethod<[], [string], "view">; guarded: TypedContractMethod<[], [string], "view">; initialize: TypedContractMethod<[], [void], "nonpayable">; initialized: TypedContractMethod<[], [boolean], "view">; owner: TypedContractMethod<[], [string], "view">; renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; setTarget: TypedContractMethod<[_guarded: AddressLike], [void], "nonpayable">; trait: TypedContractMethod<[], [string], "view">; transferOwnership: TypedContractMethod<[ newOwner: AddressLike ], [ void ], "nonpayable">; getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T; getFunction(nameOrSignature: "BASE_CHECKER"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "enforce"): TypedContractMethod<[ subject: AddressLike, evidence: BytesLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "getAppendedBytes"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "guarded"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "initialize"): TypedContractMethod<[], [void], "nonpayable">; getFunction(nameOrSignature: "initialized"): TypedContractMethod<[], [boolean], "view">; getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">; getFunction(nameOrSignature: "setTarget"): TypedContractMethod<[_guarded: AddressLike], [void], "nonpayable">; getFunction(nameOrSignature: "trait"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; getEvent(key: "Enforced"): TypedContractEvent<EnforcedEvent.InputTuple, EnforcedEvent.OutputTuple, EnforcedEvent.OutputObject>; getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; getEvent(key: "TargetSet"): TypedContractEvent<TargetSetEvent.InputTuple, TargetSetEvent.OutputTuple, TargetSetEvent.OutputObject>; filters: { "Enforced(address,address,bytes)": TypedContractEvent<EnforcedEvent.InputTuple, EnforcedEvent.OutputTuple, EnforcedEvent.OutputObject>; Enforced: TypedContractEvent<EnforcedEvent.InputTuple, EnforcedEvent.OutputTuple, EnforcedEvent.OutputObject>; "OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>; "TargetSet(address)": TypedContractEvent<TargetSetEvent.InputTuple, TargetSetEvent.OutputTuple, TargetSetEvent.OutputObject>; TargetSet: TypedContractEvent<TargetSetEvent.InputTuple, TargetSetEvent.OutputTuple, TargetSetEvent.OutputObject>; }; } //# sourceMappingURL=BasePolicy.d.ts.map