@q-dev/qdex-js-sdk
Version:
Typescript Library to interact with Q DEX Contracts
29 lines (28 loc) • 1.23 kB
TypeScript
import Web3 from 'web3';
import { DEXFactory } from '../../web3-contracts/DEX_Factory';
import { DEXContractInstance } from '../DEXContractInstance';
/**
* Factory instance to interact with UniswapV2Factory contract.
* See [onchain documentation]((@q-dex-repo/@network/UniswapV2Factory) for more details.
* An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.dexFactory}
*/
export declare class DEXFactoryInstance extends DEXContractInstance<DEXFactory> {
static readonly registryKey = "governance.intApp.QDEX.factory";
constructor(web3: Web3, address: string);
/**
* [External documentation](@q-dex-repo/@network/UniswapV2Factory/#allpairslength)
*/
allPairsLength(): Promise<string>;
/**
* [External documentation](@q-dex-repo/@network/UniswapV2Factory/#inithash)
*/
initHash(): Promise<string>;
/**
* [External documentation](@q-dex-repo/@network/UniswapV2Factory/#checkforflatfee)
*/
checkForFlatFee(pair: string): Promise<boolean>;
/**
* [External documentation](@q-dex-repo/@network/UniswapV2Factory/#createpair)
*/
createPair(tokenA: string, tokenB: string): Promise<string>;
}