import { TransactionRequest } from 'ethers'; import { Operation, ReceiptOrEstimate, AbiItem } from '../@types/index.js'; import { SmartContractWithAddress } from './SmartContractWithAddress.js'; /** * Provides an interface for FactoryRouter contract */ export declare class Router extends SmartContractWithAddress { getDefaultAbi(): AbiItem[]; /** * * Buys a batch of datatokens. * one single call to buy multiple DT for multiple assets. * require tokenIn approvals for router from user. (except for dispenser operations) * @param {Operation[]} operations - The operations to execute. * @param {boolean} [estimateGas=false] - Whether to return only the estimate gas or not. * @return {Promise} Transaction receipt */ buyDatatokenBatch(operations: Operation[], estimateGas?: G): Promise>; buyDatatokenBatchTx(operations: Operation[]): Promise; /** * Checks if a token is on approved tokens list, * if true opfFee is lower in pools with that token/DT * @param {string} address - The address of the token to check. * @return {Promise} true if is on the list. */ isApprovedToken(address: string): Promise; /** * Check if an address is a Fixed Rate contract. * @param {string} address - The address of the fixed rate exchange to check. * @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; /** * Adds a token to the list of tokens with reduced fees * @param {String} address caller address * @param {String} tokenAddress token address to add * @param {Boolean} [estimateGas] if True, return gas estimate * @return {Promise} */ addApprovedToken(address: string, tokenAddress: string, estimateGas?: G): Promise>; addApprovedTokenTx(address: string, tokenAddress: string): Promise; /** * Removes a token if exists from the list of tokens with reduced fees * @param {String} address caller address * @param {String} tokenAddress token address to remove * @param {Boolean} [estimateGas] if True, return gas estimate * @return {Promise} */ removeApprovedToken(address: string, tokenAddress: string, estimateGas?: G): Promise>; removeApprovedTokenTx(address: string, tokenAddress: string): Promise; /** * Adds an address to the list of fixed rate contracts * @param {String} address caller address * @param {String} tokenAddress contract address to add * @param {Boolean} [estimateGas] if True, return gas estimate * @return {Promise} */ addFixedRateContract(address: string, tokenAddress: string, estimateGas?: G): Promise>; addFixedRateContractTx(address: string, tokenAddress: string): Promise; /** * Removes an address from the list of fixed rate contracts * @param {String} address caller address * @param {String} tokenAddress contract address to add * @param {Boolean} [estimateGas] if True, return gas estimate * @return {Promise} */ removeFixedRateContract(address: string, tokenAddress: string, estimateGas?: G): Promise>; removeFixedRateContractTx(address: string, tokenAddress: string): Promise; /** * Adds an address to the list of dispensers * @param {String} address caller address * @param {String} tokenAddress contract address to add * @param {Boolean} estimateGas if True, return gas estimate * @return {Promise} */ addDispenserContract(address: string, tokenAddress: string, estimateGas?: G): Promise>; addDispenserContractTx(address: string, tokenAddress: string): Promise; /** * Removes an address from the list of dispensers * @param {String} address caller address * @param {String} tokenAddress address Contract to be removed * @param {Boolean} estimateGas if True, return gas estimate * @return {Promise} */ removeDispenserContract(address: string, tokenAddress: string, estimateGas?: G): Promise>; removeDispenserContractTx(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; /** * Updates OP Community Fees * @param {String} address caller 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 * @param {Boolean} estimateGas if True, return gas estimate * @return {Promise} */ updateOPCFee(address: string, newSwapOceanFee: number, newSwapNonOceanFee: number, newConsumeFee: number, newProviderFee: number, estimateGas?: G): Promise>; updateOPCFeeTx(address: string, newSwapOceanFee: number, newSwapNonOceanFee: number, newConsumeFee: number, newProviderFee: number): Promise; }