UNPKG

equation-sdk

Version:

🛠 An SDK for building applications on top of Equation.

16 lines (15 loc) • 1.01 kB
import { ethers, Wallet } from 'ethers'; import { Provider } from '@ethersproject/providers'; /** * Creates a contract instance using the provided contract address, ABI, and provider. * * @param {string} contract - The contract address. * @param {any[]} abi - The contract ABI. * @param {ethers.providers.Provider} provider - The provider used to interact with the blockchain. * @returns {ethers.Contract | null} - The contract instance or null if either the contract or ABI is missing. */ export declare const getContract: (contract: string, abi: any[], provider: Provider | Wallet) => ethers.Contract; export declare const getTokenContract: (tokenAddress: string, provider: Wallet) => ethers.Contract; export declare const getOrderBookContract: (provider: Provider | Wallet) => ethers.Contract; export declare const getPositionRouterContract: (provider: Provider | Wallet) => ethers.Contract; export declare const getRouterContract: (provider: Provider | Wallet) => ethers.Contract;