UNPKG

@api3/contracts

Version:

Contracts through which API3 services are delivered

208 lines 13 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"; export interface DapiServerInterface extends Interface { getFunction(nameOrSignature: "DAPI_NAME_SETTER_ROLE_DESCRIPTION" | "accessControlRegistry" | "adminRole" | "adminRoleDescription" | "containsBytecode" | "dapiNameHashToDataFeedId" | "dapiNameSetterRole" | "dapiNameToDataFeedId" | "getBalance" | "getBlockBasefee" | "getBlockNumber" | "getBlockTimestamp" | "getChainId" | "manager" | "multicall" | "setDapiName" | "tryMulticall" | "updateBeaconSetWithBeacons"): FunctionFragment; getEvent(nameOrSignatureOrTopic: "SetDapiName" | "UpdatedBeaconSetWithBeacons" | "UpdatedBeaconWithSignedData"): EventFragment; encodeFunctionData(functionFragment: "DAPI_NAME_SETTER_ROLE_DESCRIPTION", values?: undefined): string; encodeFunctionData(functionFragment: "accessControlRegistry", values?: undefined): string; encodeFunctionData(functionFragment: "adminRole", values?: undefined): string; encodeFunctionData(functionFragment: "adminRoleDescription", values?: undefined): string; encodeFunctionData(functionFragment: "containsBytecode", values: [AddressLike]): string; encodeFunctionData(functionFragment: "dapiNameHashToDataFeedId", values: [BytesLike]): string; encodeFunctionData(functionFragment: "dapiNameSetterRole", values?: undefined): string; encodeFunctionData(functionFragment: "dapiNameToDataFeedId", values: [BytesLike]): string; encodeFunctionData(functionFragment: "getBalance", values: [AddressLike]): string; encodeFunctionData(functionFragment: "getBlockBasefee", values?: undefined): string; encodeFunctionData(functionFragment: "getBlockNumber", values?: undefined): string; encodeFunctionData(functionFragment: "getBlockTimestamp", values?: undefined): string; encodeFunctionData(functionFragment: "getChainId", values?: undefined): string; encodeFunctionData(functionFragment: "manager", values?: undefined): string; encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string; encodeFunctionData(functionFragment: "setDapiName", values: [BytesLike, BytesLike]): string; encodeFunctionData(functionFragment: "tryMulticall", values: [BytesLike[]]): string; encodeFunctionData(functionFragment: "updateBeaconSetWithBeacons", values: [BytesLike[]]): string; decodeFunctionResult(functionFragment: "DAPI_NAME_SETTER_ROLE_DESCRIPTION", data: BytesLike): Result; decodeFunctionResult(functionFragment: "accessControlRegistry", data: BytesLike): Result; decodeFunctionResult(functionFragment: "adminRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "adminRoleDescription", data: BytesLike): Result; decodeFunctionResult(functionFragment: "containsBytecode", data: BytesLike): Result; decodeFunctionResult(functionFragment: "dapiNameHashToDataFeedId", data: BytesLike): Result; decodeFunctionResult(functionFragment: "dapiNameSetterRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "dapiNameToDataFeedId", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBalance", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBlockBasefee", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBlockNumber", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getBlockTimestamp", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result; decodeFunctionResult(functionFragment: "manager", data: BytesLike): Result; decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setDapiName", data: BytesLike): Result; decodeFunctionResult(functionFragment: "tryMulticall", data: BytesLike): Result; decodeFunctionResult(functionFragment: "updateBeaconSetWithBeacons", data: BytesLike): Result; } export declare namespace SetDapiNameEvent { type InputTuple = [ dataFeedId: BytesLike, dapiName: BytesLike, sender: AddressLike ]; type OutputTuple = [ dataFeedId: string, dapiName: string, sender: string ]; interface OutputObject { dataFeedId: string; dapiName: string; sender: string; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace UpdatedBeaconSetWithBeaconsEvent { type InputTuple = [ beaconSetId: BytesLike, value: BigNumberish, timestamp: BigNumberish ]; type OutputTuple = [ beaconSetId: string, value: bigint, timestamp: bigint ]; interface OutputObject { beaconSetId: string; value: bigint; timestamp: bigint; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export declare namespace UpdatedBeaconWithSignedDataEvent { type InputTuple = [ beaconId: BytesLike, value: BigNumberish, timestamp: BigNumberish ]; type OutputTuple = [ beaconId: string, value: bigint, timestamp: bigint ]; interface OutputObject { beaconId: string; value: bigint; timestamp: bigint; } type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; type Filter = TypedDeferredTopicFilter<Event>; type Log = TypedEventLog<Event>; type LogDescription = TypedLogDescription<Event>; } export interface DapiServer extends BaseContract { connect(runner?: ContractRunner | null): DapiServer; waitForDeployment(): Promise<this>; interface: DapiServerInterface; 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>; DAPI_NAME_SETTER_ROLE_DESCRIPTION: TypedContractMethod<[], [string], "view">; accessControlRegistry: TypedContractMethod<[], [string], "view">; adminRole: TypedContractMethod<[], [string], "view">; adminRoleDescription: TypedContractMethod<[], [string], "view">; containsBytecode: TypedContractMethod<[ account: AddressLike ], [ boolean ], "view">; dapiNameHashToDataFeedId: TypedContractMethod<[ arg0: BytesLike ], [ string ], "view">; dapiNameSetterRole: TypedContractMethod<[], [string], "view">; dapiNameToDataFeedId: TypedContractMethod<[ dapiName: BytesLike ], [ string ], "view">; getBalance: TypedContractMethod<[account: AddressLike], [bigint], "view">; getBlockBasefee: TypedContractMethod<[], [bigint], "view">; getBlockNumber: TypedContractMethod<[], [bigint], "view">; getBlockTimestamp: TypedContractMethod<[], [bigint], "view">; getChainId: TypedContractMethod<[], [bigint], "view">; manager: TypedContractMethod<[], [string], "view">; multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">; setDapiName: TypedContractMethod<[ dapiName: BytesLike, dataFeedId: BytesLike ], [ void ], "nonpayable">; tryMulticall: TypedContractMethod<[ data: BytesLike[] ], [ [boolean[], string[]] & { successes: boolean[]; returndata: string[]; } ], "nonpayable">; updateBeaconSetWithBeacons: TypedContractMethod<[ beaconIds: BytesLike[] ], [ string ], "nonpayable">; getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T; getFunction(nameOrSignature: "DAPI_NAME_SETTER_ROLE_DESCRIPTION"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "accessControlRegistry"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "adminRole"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "adminRoleDescription"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "containsBytecode"): TypedContractMethod<[account: AddressLike], [boolean], "view">; getFunction(nameOrSignature: "dapiNameHashToDataFeedId"): TypedContractMethod<[arg0: BytesLike], [string], "view">; getFunction(nameOrSignature: "dapiNameSetterRole"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "dapiNameToDataFeedId"): TypedContractMethod<[dapiName: BytesLike], [string], "view">; getFunction(nameOrSignature: "getBalance"): TypedContractMethod<[account: AddressLike], [bigint], "view">; getFunction(nameOrSignature: "getBlockBasefee"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getBlockNumber"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getBlockTimestamp"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "getChainId"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "manager"): TypedContractMethod<[], [string], "view">; getFunction(nameOrSignature: "multicall"): TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">; getFunction(nameOrSignature: "setDapiName"): TypedContractMethod<[ dapiName: BytesLike, dataFeedId: BytesLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "tryMulticall"): TypedContractMethod<[ data: BytesLike[] ], [ [boolean[], string[]] & { successes: boolean[]; returndata: string[]; } ], "nonpayable">; getFunction(nameOrSignature: "updateBeaconSetWithBeacons"): TypedContractMethod<[beaconIds: BytesLike[]], [string], "nonpayable">; getEvent(key: "SetDapiName"): TypedContractEvent<SetDapiNameEvent.InputTuple, SetDapiNameEvent.OutputTuple, SetDapiNameEvent.OutputObject>; getEvent(key: "UpdatedBeaconSetWithBeacons"): TypedContractEvent<UpdatedBeaconSetWithBeaconsEvent.InputTuple, UpdatedBeaconSetWithBeaconsEvent.OutputTuple, UpdatedBeaconSetWithBeaconsEvent.OutputObject>; getEvent(key: "UpdatedBeaconWithSignedData"): TypedContractEvent<UpdatedBeaconWithSignedDataEvent.InputTuple, UpdatedBeaconWithSignedDataEvent.OutputTuple, UpdatedBeaconWithSignedDataEvent.OutputObject>; filters: { "SetDapiName(bytes32,bytes32,address)": TypedContractEvent<SetDapiNameEvent.InputTuple, SetDapiNameEvent.OutputTuple, SetDapiNameEvent.OutputObject>; SetDapiName: TypedContractEvent<SetDapiNameEvent.InputTuple, SetDapiNameEvent.OutputTuple, SetDapiNameEvent.OutputObject>; "UpdatedBeaconSetWithBeacons(bytes32,int224,uint32)": TypedContractEvent<UpdatedBeaconSetWithBeaconsEvent.InputTuple, UpdatedBeaconSetWithBeaconsEvent.OutputTuple, UpdatedBeaconSetWithBeaconsEvent.OutputObject>; UpdatedBeaconSetWithBeacons: TypedContractEvent<UpdatedBeaconSetWithBeaconsEvent.InputTuple, UpdatedBeaconSetWithBeaconsEvent.OutputTuple, UpdatedBeaconSetWithBeaconsEvent.OutputObject>; "UpdatedBeaconWithSignedData(bytes32,int224,uint32)": TypedContractEvent<UpdatedBeaconWithSignedDataEvent.InputTuple, UpdatedBeaconWithSignedDataEvent.OutputTuple, UpdatedBeaconWithSignedDataEvent.OutputObject>; UpdatedBeaconWithSignedData: TypedContractEvent<UpdatedBeaconWithSignedDataEvent.InputTuple, UpdatedBeaconWithSignedDataEvent.OutputTuple, UpdatedBeaconWithSignedDataEvent.OutputObject>; }; } //# sourceMappingURL=DapiServer.d.ts.map