@api3/contracts
Version:
Contracts through which API3 services are delivered
180 lines • 9.38 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";
export interface MockApi3ReaderProxyV1Interface extends Interface {
getFunction(nameOrSignature: "decimals" | "description" | "getAnswer" | "getRoundData" | "getTimestamp" | "latestAnswer" | "latestRound" | "latestRoundData" | "latestTimestamp" | "mock" | "read" | "version"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "AnswerUpdated" | "NewRound"): EventFragment;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(functionFragment: "description", values?: undefined): string;
encodeFunctionData(functionFragment: "getAnswer", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "getRoundData", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "getTimestamp", values: [BigNumberish]): string;
encodeFunctionData(functionFragment: "latestAnswer", values?: undefined): string;
encodeFunctionData(functionFragment: "latestRound", values?: undefined): string;
encodeFunctionData(functionFragment: "latestRoundData", values?: undefined): string;
encodeFunctionData(functionFragment: "latestTimestamp", values?: undefined): string;
encodeFunctionData(functionFragment: "mock", values: [BigNumberish, BigNumberish]): string;
encodeFunctionData(functionFragment: "read", values?: undefined): string;
encodeFunctionData(functionFragment: "version", values?: undefined): string;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "description", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getAnswer", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRoundData", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getTimestamp", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "latestAnswer", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "latestRound", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "latestRoundData", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "latestTimestamp", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "mock", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "read", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
}
export declare namespace AnswerUpdatedEvent {
type InputTuple = [
current: BigNumberish,
roundId: BigNumberish,
updatedAt: BigNumberish
];
type OutputTuple = [
current: bigint,
roundId: bigint,
updatedAt: bigint
];
interface OutputObject {
current: bigint;
roundId: bigint;
updatedAt: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace NewRoundEvent {
type InputTuple = [
roundId: BigNumberish,
startedBy: AddressLike,
startedAt: BigNumberish
];
type OutputTuple = [
roundId: bigint,
startedBy: string,
startedAt: bigint
];
interface OutputObject {
roundId: bigint;
startedBy: string;
startedAt: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface MockApi3ReaderProxyV1 extends BaseContract {
connect(runner?: ContractRunner | null): MockApi3ReaderProxyV1;
waitForDeployment(): Promise<this>;
interface: MockApi3ReaderProxyV1Interface;
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>;
decimals: TypedContractMethod<[], [bigint], "view">;
description: TypedContractMethod<[], [string], "view">;
getAnswer: TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
getRoundData: TypedContractMethod<[
arg0: BigNumberish
], [
[bigint, bigint, bigint, bigint, bigint]
], "view">;
getTimestamp: TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
latestAnswer: TypedContractMethod<[], [bigint], "view">;
latestRound: TypedContractMethod<[], [bigint], "view">;
latestRoundData: TypedContractMethod<[
], [
[
bigint,
bigint,
bigint,
bigint,
bigint
] & {
roundId: bigint;
answer: bigint;
startedAt: bigint;
updatedAt: bigint;
answeredInRound: bigint;
}
], "view">;
latestTimestamp: TypedContractMethod<[], [bigint], "view">;
mock: TypedContractMethod<[
value: BigNumberish,
timestamp: BigNumberish
], [
void
], "nonpayable">;
read: TypedContractMethod<[
], [
[bigint, bigint] & {
value: bigint;
timestamp: bigint;
}
], "view">;
version: TypedContractMethod<[], [bigint], "view">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "description"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "getAnswer"): TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
getFunction(nameOrSignature: "getRoundData"): TypedContractMethod<[
arg0: BigNumberish
], [
[bigint, bigint, bigint, bigint, bigint]
], "view">;
getFunction(nameOrSignature: "getTimestamp"): TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
getFunction(nameOrSignature: "latestAnswer"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "latestRound"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "latestRoundData"): TypedContractMethod<[
], [
[
bigint,
bigint,
bigint,
bigint,
bigint
] & {
roundId: bigint;
answer: bigint;
startedAt: bigint;
updatedAt: bigint;
answeredInRound: bigint;
}
], "view">;
getFunction(nameOrSignature: "latestTimestamp"): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "mock"): TypedContractMethod<[
value: BigNumberish,
timestamp: BigNumberish
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "read"): TypedContractMethod<[
], [
[bigint, bigint] & {
value: bigint;
timestamp: bigint;
}
], "view">;
getFunction(nameOrSignature: "version"): TypedContractMethod<[], [bigint], "view">;
getEvent(key: "AnswerUpdated"): TypedContractEvent<AnswerUpdatedEvent.InputTuple, AnswerUpdatedEvent.OutputTuple, AnswerUpdatedEvent.OutputObject>;
getEvent(key: "NewRound"): TypedContractEvent<NewRoundEvent.InputTuple, NewRoundEvent.OutputTuple, NewRoundEvent.OutputObject>;
filters: {
"AnswerUpdated(int256,uint256,uint256)": TypedContractEvent<AnswerUpdatedEvent.InputTuple, AnswerUpdatedEvent.OutputTuple, AnswerUpdatedEvent.OutputObject>;
AnswerUpdated: TypedContractEvent<AnswerUpdatedEvent.InputTuple, AnswerUpdatedEvent.OutputTuple, AnswerUpdatedEvent.OutputObject>;
"NewRound(uint256,address,uint256)": TypedContractEvent<NewRoundEvent.InputTuple, NewRoundEvent.OutputTuple, NewRoundEvent.OutputObject>;
NewRound: TypedContractEvent<NewRoundEvent.InputTuple, NewRoundEvent.OutputTuple, NewRoundEvent.OutputObject>;
};
}
//# sourceMappingURL=MockApi3ReaderProxyV1.d.ts.map