import { Contract } from 'web3-eth-contract'; import Web3 from 'web3'; import { TransactionReceipt } from 'web3-core'; import { AbiItem } from 'web3-utils'; import { Operation } from '../@types/Router'; import { Config } from '../models/index.js'; /** * Provides an interface for FactoryRouter contract */ export declare class Router { routerAddress: string; RouterAbi: AbiItem | AbiItem[]; web3: Web3; config: Config; router: Contract; /** * Instantiate Router. * @param {String} routerAddress * @param {AbiItem | AbiItem[]} Router * @param {Web3} web3 */ constructor(routerAddress: string, web3: Web3, network?: string | number, RouterAbi?: AbiItem | AbiItem[], config?: Config); /** * Estimate gas cost for buyDTBatch method * @param {String} address * @param {Operation} operations Operations objects array * @return {Promise} Transaction receipt */ estGasBuyDTBatch(address: string, operations: Operation[]): Promise; /** * BuyDTBatch * @param {String} address * @param {Operation} operations Operations objects array * @return {Promise} Transaction receipt */ buyDTBatch(address: string, operations: Operation[]): Promise; /** Check if a token is on approved tokens list, if true opfFee is lower in pools with that token/DT * @return {Promise} true if is on the list. */ isApprovedToken(address: string): Promise; /** Check if an address is a side staking contract. * @return {Promise} true if is a SS contract */ isSideStaking(address: string): Promise; /** Check if an address is a Fixed Rate contract. * @return {Promise} true if is a Fixed Rate contract */ isFixedPrice(address: string): Promise; /** Get Router Owner * @return {Promise} Router Owner address */ getOwner(): Promise; /** Get NFT Factory address * @return {Promise} NFT Factory address */ getNFTFactory(): Promise; /** Check if an address is a pool template contract. * @return {Promise} true if is a Template */ isPoolTemplate(address: string): Promise; /** * Estimate gas cost for addApprovedToken * @param {String} address * @param {String} tokenAddress token address we want to add * @param {Contract} routerContract optional contract instance * @return {Promise} */ estGasAddApprovedToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise; /** * Add a new token to oceanTokens list, pools with baseToken in this list have NO opf Fee * @param {String} address caller address * @param {String} tokenAddress token address to add * @return {Promise} */ addApprovedToken(address: string, tokenAddress: string): Promise; /** * Estimate gas cost for removeApprovedToken * @param {String} address caller address * @param {String} tokenAddress token address we want to add * @param {Contract} routerContract optional contract instance * @return {Promise} */ estGasRemoveApprovedToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise; /** * Remove a token from oceanTokens list, pools without baseToken in this list have a opf Fee * @param {String} address * @param {String} tokenAddress address to remove * @return {Promise} */ removeApprovedToken(address: string, tokenAddress: string): Promise; /** * Estimate gas cost for addSSContract method * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ estGasAddSSContract(address: string, tokenAddress: string): Promise; /** * Add a new contract to ssContract list, after is added, can be used when deploying a new pool * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ addSSContract(address: string, tokenAddress: string): Promise; /** * Estimate gas cost for removeSSContract method * @param {String} address caller address * @param {String} tokenAddress contract address to add * @return {Promise} */ estGasRemoveSSContract(address: string, tokenAddress: string): Promise; /** * Removes a new contract from ssContract list * @param {String} address caller address * @param {String} tokenAddress contract address to removed * @return {Promise} */ removeSSContract(address: string, tokenAddress: string): Promise; /** * Estimate gas cost for addFixedRateContract method * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ estGasAddFixedRateContract(address: string, tokenAddress: string): Promise; /** * Add a new contract to fixedRate list, after is added, can be used when deploying a new pool * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ addFixedRateContract(address: string, tokenAddress: string): Promise; /** * Estimate gas cost for addFixedRateContract method * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ estGasRemoveFixedRateContract(address: string, tokenAddress: string): Promise; /** * Removes a contract from fixedRate list * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ removeFixedRateContract(address: string, tokenAddress: string): Promise; /** * Estimate gas cost for addDispenserContract method * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ estGasAddDispenserContract(address: string, tokenAddress: string): Promise; /** * Add a new contract to dispenser list, after is added, can be used when deploying a new pool * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ addDispenserContract(address: string, tokenAddress: string): Promise; /** * Estimate gas cost for addDispenserContract method * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ estGasRemoveDispenserContract(address: string, tokenAddress: string): Promise; /** * Add a new contract to dispenser list, after is added, can be used when deploying a new pool * @param {String} address * @param {String} tokenAddress contract address to add * @return {Promise} */ removeDispenserContract(address: string, tokenAddress: string): Promise; /** Get OPF Fee per token * @return {Promise} OPC fee for a specific baseToken */ getOPCFee(baseToken: string): Promise; /** Get Current OPF Fee * @return {Promise} OPF fee */ getCurrentOPCFee(): Promise; /** * Estimate gas cost for updateOPFFee method * @param {String} address * @param {String} newFee new OPF Fee * @return {Promise} */ estGasUpdateOPCFee(address: string, newSwapOceanFee: number, newSwapNonOceanFee: number, newConsumeFee: number, newProviderFee: number): Promise; /** * Add a new contract to fixedRate list, after is added, can be used when deploying a new pool * @param {String} address * @param {number} newSwapOceanFee Amount charged for swapping with ocean approved tokens * @param {number} newSwapNonOceanFee Amount charged for swapping with non ocean approved tokens * @param {number} newConsumeFee Amount charged from consumeFees * @param {number} newProviderFee Amount charged for providerFees * @return {Promise} */ updateOPCFee(address: string, newSwapOceanFee: number, newSwapNonOceanFee: number, newConsumeFee: number, newProviderFee: number): Promise; /** * Estimate gas cost for addPoolTemplate method * @param {String} address * @param {String} templateAddress template address to add * @return {Promise} */ estGasAddPoolTemplate(address: string, templateAddress: string): Promise; /** * Add a new template to poolTemplates mapping, after template is added,it can be used * @param {String} address * @param {String} templateAddress template address to add * @return {Promise} */ addPoolTemplate(address: string, templateAddress: string): Promise; /** * Estimate gas cost for removePoolTemplate method * @param {String} address * @param {String} templateAddress template address to remove * @return {Promise} */ estGasRemovePoolTemplate(address: string, templateAddress: string): Promise; /** * Remove template from poolTemplates mapping, after template is removed,it can be used anymore * @param {String} address * @param {String} templateAddress template address to remove * @return {Promise} */ removePoolTemplate(address: string, templateAddress: string): Promise; }