import { ethers } from "ethers"; import { CallOptions, RevertOptions, TxOptions } from "../../../types/contracts.types"; import { ParseAbiValuesReturnType } from "../../../types/parseAbiValues.types"; import { ZetaChainClient } from "./client"; /** * @function zetachainWithdrawAndCall * @description Withdraws a specified amount of ZRC20 tokens and makes a function call on the target contract on a connected chain. * * @param {ZetaChainClient} this - The instance of the ZetaChain client that contains the signer information. * @param {object} args - The function arguments. * @param {string} args.amount - The amount of ZRC20 tokens to withdraw. * @param {string} args.function - The name of the function to be called on the target contract. * @param {string} args.gatewayZetaChain - The address of the ZetaChain gateway contract. * @param {string} args.receiver - The address that will receive the withdrawn ZRC20 tokens or the contract to interact with. * @param {string} args.types - JSON string representing the types of the function parameters (e.g., ["uint256", "address"]). * @param {Array} args.values - The values to be passed to the function (should match the types). * @param {string} args.zrc20 - The address of the ZRC20 token contract used for the withdrawal and fee payment. * @param {any} args.callOptions - Call options. * @param {txOptions} args.txOptions - Transaction options such as gasPrice, nonce, etc. * @param {revertOptions} args.revertOptions - Options to handle call reversion, including revert address and message. * @param {string} args.data - Optional raw data for non-EVM chains like Solana. * * @returns {object} - Returns an object containing the transaction, gas token, and gas fee. * @property {object} tx - The transaction object for the withdrawal and contract call. * @property {string} gasZRC20 - The address of the ZRC20 gas token. * @property {ethers.BigNumber} gasFee - The amount of gas fee paid for the transaction. */ export declare const zetachainWithdrawAndCall: (this: ZetaChainClient, args: { amount: string; callOptions: CallOptions; data?: string; function?: string; gatewayZetaChain?: string; receiver: string; revertOptions: RevertOptions; txOptions: TxOptions; types?: string[]; values?: ParseAbiValuesReturnType; zrc20: string; }) => Promise<{ gasFee: bigint; gasZRC20: string; tx: ethers.ContractTransactionResponse; }>;