UNPKG

@parifi/synthetix-sdk-ts

Version:

A Typescript SDK for interactions with the Synthetix protocol

39 lines (36 loc) 1.05 kB
import { Address, StateMapping, Hash } from 'viem'; import { Call3Value } from './contractTypes.mjs'; type TransactionData = { to: Address; data: string; value: string; }; type OverrideParamsWrite = { shouldRevertOnTxFailure?: boolean; useMultiCall?: boolean; useOracleCalls?: boolean; submit?: boolean; account?: Address; prepend?: TransactionData[]; stateOverride?: { address: Address; stateDiff: StateMapping; }[]; }; type OverrideParamsRead = { account?: Address; }; type WriteCallParams = { calls: Call3Value[]; }; type WriteContractParams = { contractAddress: Address; abi: unknown; functionName: string; args: unknown[]; calls?: Call3Value[]; }; type WriteErc7412 = WriteCallParams | WriteContractParams; type WriteReturnType = TransactionData[] | Hash; type MarketIdOrName = number | string; export type { MarketIdOrName, OverrideParamsRead, OverrideParamsWrite, TransactionData, WriteCallParams, WriteContractParams, WriteErc7412, WriteReturnType };