UNPKG

@d8x/perpetuals-sdk

Version:

Node TypeScript SDK for D8X Perpetual Futures

846 lines (787 loc) 23.6 kB
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ 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 CompositeTokenInterface extends Interface { getFunction( nameOrSignature: | "CMP_DECIMALS" | "UPGRADE_INTERFACE_VERSION" | "addTokens" | "allowance" | "approve" | "balanceOf" | "controller" | "decimals" | "effectiveBalanceOf" | "getSupportedTokens" | "initialize" | "latestRoundData" | "name" | "owner" | "proxiableUUID" | "registerAccount" | "registeredToken" | "removeTokens" | "renounceOwnership" | "setController" | "supportedToken" | "symbol" | "totalInvested" | "totalSupply" | "totalValue" | "transfer" | "transferFrom" | "transferOwnership" | "upgradeToAndCall" ): FunctionFragment; getEvent( nameOrSignatureOrTopic: | "AccountRegistered" | "Approval" | "ControllerSet" | "Initialized" | "OwnershipTransferred" | "TokenSupported" | "Transfer" | "Upgraded" ): EventFragment; encodeFunctionData( functionFragment: "CMP_DECIMALS", values?: undefined ): string; encodeFunctionData( functionFragment: "UPGRADE_INTERFACE_VERSION", values?: undefined ): string; encodeFunctionData( functionFragment: "addTokens", values: [AddressLike[], AddressLike[], BytesLike[]] ): string; encodeFunctionData( functionFragment: "allowance", values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "controller", values?: undefined ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "effectiveBalanceOf", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getSupportedTokens", values?: undefined ): string; encodeFunctionData( functionFragment: "initialize", values: [AddressLike, AddressLike[], AddressLike[], BytesLike[]] ): string; encodeFunctionData( functionFragment: "latestRoundData", values?: undefined ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "proxiableUUID", values?: undefined ): string; encodeFunctionData( functionFragment: "registerAccount", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "registeredToken", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "removeTokens", values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "setController", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "supportedToken", values: [AddressLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( functionFragment: "totalInvested", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "totalSupply", values?: undefined ): string; encodeFunctionData( functionFragment: "totalValue", values?: undefined ): string; encodeFunctionData( functionFragment: "transfer", values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferOwnership", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "upgradeToAndCall", values: [AddressLike, BytesLike] ): string; decodeFunctionResult( functionFragment: "CMP_DECIMALS", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "UPGRADE_INTERFACE_VERSION", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "addTokens", data: BytesLike): Result; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; decodeFunctionResult(functionFragment: "controller", data: BytesLike): Result; decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; decodeFunctionResult( functionFragment: "effectiveBalanceOf", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getSupportedTokens", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; decodeFunctionResult( functionFragment: "latestRoundData", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; decodeFunctionResult( functionFragment: "proxiableUUID", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "registerAccount", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "registeredToken", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "removeTokens", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "renounceOwnership", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "setController", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "supportedToken", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; decodeFunctionResult( functionFragment: "totalInvested", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "totalSupply", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "totalValue", data: BytesLike): Result; decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; decodeFunctionResult( functionFragment: "transferFrom", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "transferOwnership", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "upgradeToAndCall", data: BytesLike ): Result; } export namespace AccountRegisteredEvent { export type InputTuple = [token: AddressLike, account: AddressLike]; export type OutputTuple = [token: string, account: string]; export interface OutputObject { token: string; account: string; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export namespace ApprovalEvent { export type InputTuple = [ owner: AddressLike, spender: AddressLike, value: BigNumberish ]; export type OutputTuple = [owner: string, spender: string, value: bigint]; export interface OutputObject { owner: string; spender: string; value: bigint; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export namespace ControllerSetEvent { export type InputTuple = [ oldController: AddressLike, newController: AddressLike ]; export type OutputTuple = [oldController: string, newController: string]; export interface OutputObject { oldController: string; newController: string; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export namespace InitializedEvent { export type InputTuple = [version: BigNumberish]; export type OutputTuple = [version: bigint]; export interface OutputObject { version: bigint; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export namespace OwnershipTransferredEvent { export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; export type OutputTuple = [previousOwner: string, newOwner: string]; export interface OutputObject { previousOwner: string; newOwner: string; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export namespace TokenSupportedEvent { export type InputTuple = [token: AddressLike, supported: boolean]; export type OutputTuple = [token: string, supported: boolean]; export interface OutputObject { token: string; supported: boolean; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export namespace TransferEvent { export type InputTuple = [ from: AddressLike, to: AddressLike, value: BigNumberish ]; export type OutputTuple = [from: string, to: string, value: bigint]; export interface OutputObject { from: string; to: string; value: bigint; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export namespace UpgradedEvent { export type InputTuple = [implementation: AddressLike]; export type OutputTuple = [implementation: string]; export interface OutputObject { implementation: string; } export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; export type Filter = TypedDeferredTopicFilter<Event>; export type Log = TypedEventLog<Event>; export type LogDescription = TypedLogDescription<Event>; } export interface CompositeToken extends BaseContract { connect(runner?: ContractRunner | null): CompositeToken; waitForDeployment(): Promise<this>; interface: CompositeTokenInterface; 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>; CMP_DECIMALS: TypedContractMethod<[], [bigint], "view">; UPGRADE_INTERFACE_VERSION: TypedContractMethod<[], [string], "view">; addTokens: TypedContractMethod< [_tokens: AddressLike[], _feeds: AddressLike[], _ids: BytesLike[]], [void], "nonpayable" >; allowance: TypedContractMethod< [_owner: AddressLike, _spender: AddressLike], [bigint], "view" >; approve: TypedContractMethod< [spender: AddressLike, value: BigNumberish], [boolean], "nonpayable" >; balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; controller: TypedContractMethod<[], [string], "view">; decimals: TypedContractMethod<[], [bigint], "view">; effectiveBalanceOf: TypedContractMethod< [_account: AddressLike], [bigint], "view" >; getSupportedTokens: TypedContractMethod<[], [string[]], "view">; initialize: TypedContractMethod< [ _owner: AddressLike, _tokens: AddressLike[], _feeds: AddressLike[], _ids: BytesLike[] ], [void], "nonpayable" >; latestRoundData: TypedContractMethod< [], [ [bigint, bigint, bigint, bigint, bigint] & { roundId: bigint; answer: bigint; startedAt: bigint; updatedAt: bigint; answeredInRound: bigint; } ], "view" >; name: TypedContractMethod<[], [string], "view">; owner: TypedContractMethod<[], [string], "view">; proxiableUUID: TypedContractMethod<[], [string], "view">; registerAccount: TypedContractMethod< [_token: AddressLike], [void], "nonpayable" >; registeredToken: TypedContractMethod<[arg0: AddressLike], [string], "view">; removeTokens: TypedContractMethod< [_tokens: AddressLike[]], [void], "nonpayable" >; renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; setController: TypedContractMethod< [_newController: AddressLike], [void], "nonpayable" >; supportedToken: TypedContractMethod< [arg0: AddressLike], [ [string, string, bigint, bigint] & { id: string; feed: string; tokenDecimals: bigint; feedDecimals: bigint; } ], "view" >; symbol: TypedContractMethod<[], [string], "view">; totalInvested: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; totalSupply: TypedContractMethod<[], [bigint], "view">; totalValue: TypedContractMethod<[], [bigint], "view">; transfer: TypedContractMethod< [to: AddressLike, value: BigNumberish], [boolean], "nonpayable" >; transferFrom: TypedContractMethod< [from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable" >; transferOwnership: TypedContractMethod< [newOwner: AddressLike], [void], "nonpayable" >; upgradeToAndCall: TypedContractMethod< [newImplementation: AddressLike, data: BytesLike], [void], "payable" >; getFunction<T extends ContractMethod = ContractMethod>( key: string | FunctionFragment ): T; getFunction( nameOrSignature: "CMP_DECIMALS" ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "UPGRADE_INTERFACE_VERSION" ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "addTokens" ): TypedContractMethod< [_tokens: AddressLike[], _feeds: AddressLike[], _ids: BytesLike[]], [void], "nonpayable" >; getFunction( nameOrSignature: "allowance" ): TypedContractMethod< [_owner: AddressLike, _spender: AddressLike], [bigint], "view" >; getFunction( nameOrSignature: "approve" ): TypedContractMethod< [spender: AddressLike, value: BigNumberish], [boolean], "nonpayable" >; getFunction( nameOrSignature: "balanceOf" ): TypedContractMethod<[account: AddressLike], [bigint], "view">; getFunction( nameOrSignature: "controller" ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "decimals" ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "effectiveBalanceOf" ): TypedContractMethod<[_account: AddressLike], [bigint], "view">; getFunction( nameOrSignature: "getSupportedTokens" ): TypedContractMethod<[], [string[]], "view">; getFunction( nameOrSignature: "initialize" ): TypedContractMethod< [ _owner: AddressLike, _tokens: AddressLike[], _feeds: AddressLike[], _ids: BytesLike[] ], [void], "nonpayable" >; getFunction( nameOrSignature: "latestRoundData" ): TypedContractMethod< [], [ [bigint, bigint, bigint, bigint, bigint] & { roundId: bigint; answer: bigint; startedAt: bigint; updatedAt: bigint; answeredInRound: bigint; } ], "view" >; getFunction( nameOrSignature: "name" ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "owner" ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "proxiableUUID" ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "registerAccount" ): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; getFunction( nameOrSignature: "registeredToken" ): TypedContractMethod<[arg0: AddressLike], [string], "view">; getFunction( nameOrSignature: "removeTokens" ): TypedContractMethod<[_tokens: AddressLike[]], [void], "nonpayable">; getFunction( nameOrSignature: "renounceOwnership" ): TypedContractMethod<[], [void], "nonpayable">; getFunction( nameOrSignature: "setController" ): TypedContractMethod<[_newController: AddressLike], [void], "nonpayable">; getFunction( nameOrSignature: "supportedToken" ): TypedContractMethod< [arg0: AddressLike], [ [string, string, bigint, bigint] & { id: string; feed: string; tokenDecimals: bigint; feedDecimals: bigint; } ], "view" >; getFunction( nameOrSignature: "symbol" ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "totalInvested" ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; getFunction( nameOrSignature: "totalSupply" ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "totalValue" ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "transfer" ): TypedContractMethod< [to: AddressLike, value: BigNumberish], [boolean], "nonpayable" >; getFunction( nameOrSignature: "transferFrom" ): TypedContractMethod< [from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable" >; getFunction( nameOrSignature: "transferOwnership" ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; getFunction( nameOrSignature: "upgradeToAndCall" ): TypedContractMethod< [newImplementation: AddressLike, data: BytesLike], [void], "payable" >; getEvent( key: "AccountRegistered" ): TypedContractEvent< AccountRegisteredEvent.InputTuple, AccountRegisteredEvent.OutputTuple, AccountRegisteredEvent.OutputObject >; getEvent( key: "Approval" ): TypedContractEvent< ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject >; getEvent( key: "ControllerSet" ): TypedContractEvent< ControllerSetEvent.InputTuple, ControllerSetEvent.OutputTuple, ControllerSetEvent.OutputObject >; getEvent( key: "Initialized" ): TypedContractEvent< InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject >; getEvent( key: "OwnershipTransferred" ): TypedContractEvent< OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject >; getEvent( key: "TokenSupported" ): TypedContractEvent< TokenSupportedEvent.InputTuple, TokenSupportedEvent.OutputTuple, TokenSupportedEvent.OutputObject >; getEvent( key: "Transfer" ): TypedContractEvent< TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject >; getEvent( key: "Upgraded" ): TypedContractEvent< UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject >; filters: { "AccountRegistered(address,address)": TypedContractEvent< AccountRegisteredEvent.InputTuple, AccountRegisteredEvent.OutputTuple, AccountRegisteredEvent.OutputObject >; AccountRegistered: TypedContractEvent< AccountRegisteredEvent.InputTuple, AccountRegisteredEvent.OutputTuple, AccountRegisteredEvent.OutputObject >; "Approval(address,address,uint256)": TypedContractEvent< ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject >; Approval: TypedContractEvent< ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject >; "ControllerSet(address,address)": TypedContractEvent< ControllerSetEvent.InputTuple, ControllerSetEvent.OutputTuple, ControllerSetEvent.OutputObject >; ControllerSet: TypedContractEvent< ControllerSetEvent.InputTuple, ControllerSetEvent.OutputTuple, ControllerSetEvent.OutputObject >; "Initialized(uint64)": TypedContractEvent< InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject >; Initialized: TypedContractEvent< InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject >; "OwnershipTransferred(address,address)": TypedContractEvent< OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject >; OwnershipTransferred: TypedContractEvent< OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject >; "TokenSupported(address,bool)": TypedContractEvent< TokenSupportedEvent.InputTuple, TokenSupportedEvent.OutputTuple, TokenSupportedEvent.OutputObject >; TokenSupported: TypedContractEvent< TokenSupportedEvent.InputTuple, TokenSupportedEvent.OutputTuple, TokenSupportedEvent.OutputObject >; "Transfer(address,address,uint256)": TypedContractEvent< TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject >; Transfer: TypedContractEvent< TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject >; "Upgraded(address)": TypedContractEvent< UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject >; Upgraded: TypedContractEvent< UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject >; }; }