import { Address } from '../../../../../node_modules/@btc-vision/transaction/build/index.js'; import { CallResult } from '../../../../contracts/CallResult.js'; import { OPNetEvent } from '../../../../contracts/OPNetEvent.js'; import { IOP20SContract } from '../opnet/IOP20SContract.js'; export type OracleAddedEvent = { readonly oracle: Address; readonly addedBy: Address; }; export type OracleRemovedEvent = { readonly oracle: Address; readonly removedBy: Address; }; export type PriceSubmittedEvent = { readonly oracle: Address; readonly price: bigint; readonly blockNumber: bigint; }; export type PriceAggregatedEvent = { readonly medianPrice: bigint; readonly oracleCount: number; readonly blockNumber: bigint; }; export type MintedEventOracle = { readonly to: Address; readonly amount: bigint; }; export type AddOracle = CallResult<{}, [OPNetEvent]>; export type RemoveOracle = CallResult<{}, [OPNetEvent]>; export type SubmitPrice = CallResult<{}, [OPNetEvent]>; export type AggregatePrice = CallResult<{}, [OPNetEvent]>; export type MintOracle = CallResult<{}, [OPNetEvent]>; export type OracleCount = CallResult<{ count: bigint; }, []>; export type MinOracles = CallResult<{ min: bigint; }, []>; export type IsOracleActive = CallResult<{ active: boolean; }, []>; export type OracleSubmission = CallResult<{ price: bigint; }, []>; export type AdminMultiOracleStable = CallResult<{ admin: Address; }, []>; export interface IMultiOracleStablecoinContract extends IOP20SContract { addOracle(oracle: Address): Promise; removeOracle(oracle: Address): Promise; submitPrice(price: bigint): Promise; aggregatePrice(oracles: Address[]): Promise; mint(to: Address, amount: bigint): Promise; oracleCount(): Promise; minOracles(): Promise; isOracleActive(oracle: Address): Promise; oracleSubmission(oracle: Address): Promise; admin(): Promise; }