import { FeeOption, Fees, Network } from '@d11k-ts/client' import { Address, BaseAmount } from '@d11k-ts/utils' import { BigNumber, Signer, ethers } from 'ethers' export enum EthNetwork { Test = 'goerli', Main = 'homestead', } export type ClientUrl = Record export type ExplorerUrl = Record export type TxOverrides = { nonce?: ethers.BigNumberish // mandatory: https://github.com/ethers-io/ethers.js/issues/469#issuecomment-475926538 gasLimit: ethers.BigNumberish gasPrice?: ethers.BigNumberish data?: ethers.BytesLike value?: ethers.BigNumberish } export type InfuraCreds = { projectId: string projectSecret?: string } export type GasPrices = Record export type FeesWithGasPricesAndLimits = { fees: Fees; gasPrices: GasPrices; gasLimit: BigNumber } export type ApproveParams = { walletIndex?: number signer?: Signer contractAddress: Address spenderAddress: Address feeOption?: FeeOption amount?: BaseAmount // Optional fallback in case estimation for gas limit fails gasLimitFallback?: ethers.BigNumberish } export type EstimateApproveParams = { contractAddress: Address spenderAddress: Address fromAddress: Address amount?: BaseAmount } export type IsApprovedParams = { walletIndex?: number contractAddress: Address spenderAddress: Address amount?: BaseAmount } export type CallParams = { signer?: Signer walletIndex?: number contractAddress: Address abi: ethers.ContractInterface funcName: string funcParams?: unknown[] } export type EstimateCallParams = Pick