/** * 手动编码 DYORSwap 的 swapExactTokensForTokens calldata * * 参数格式 (根据成功交易分析): * - amountIn: uint256 * - amountOutMin: uint256 * - path: address[] (动态) - offset from start * - pools: address[] (动态) - offset from start * - to: uint256 (address(2) = 2) * - flag: uint256 (1) * - factory: address * * 成功交易的布局: * [0] amountIn * [1] amountOutMin * [2] offset to path = 0xa0 = 160 = 5 * 32 (从参数区域开始) * [3] offset to pools = 0xe0 = 224 = 7 * 32 * [4] to = 2 * [5] flag = 1 * [6] factory * [7] path.length * [8+] path elements * [N] pools.length * [N+1+] pools elements */ export declare function encodeDYORSwapExactTokensForTokens(amountIn: bigint, amountOutMin: bigint, path: string[], pools: string[], to: string | bigint, // 可以是地址 (string) 或 address(2) 这样的特殊值 (bigint) flag: bigint, factory: string): string; /** * 手动编码 DYORSwap 的 unwrapWETH9 calldata * * 参数格式 (根据成功交易分析): * - amountMinimum: uint256 * - recipient: address * - pools: bytes (动态) - 包含特殊的 pool 数据 * * 成功交易的布局: * [0] amountMinimum * [1] recipient * [2] offset to pools = 0x60 = 96 = 3 * 32 * [3] pools 数据 (bytes) */ export declare function encodeDYORUnwrapWETH9(amountMinimum: bigint, recipient: string, poolsData?: string): string; /** * 手动编码 DYORSwap 的 refundETH calldata * * 根据成功交易分析,refundETH 的格式是: * refundETH(bytes pools) * * 成功交易的 refundETH (0x6d29fcf4): * [0] offset to pools = 0x20 = 32 * [1] pools 数组长度 = 1 * [2] fee = 30 (0x1e) * [3] ETHBack_Dividend 合约地址 */ export declare function encodeDYORRefundETH(fee?: number): string; /** * 手动编码 DYORSwap 的 multicall calldata * * multicall(uint256 deadline, bytes[] data) * 这个函数使用标准 ABI 编码 */ export declare function encodeDYORMulticall(deadline: bigint, data: string[]): string;