four-flap-meme-sdk 1.7.69 → 1.7.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dex/direct-router.js +8 -3
- package/dist/eip7702/xlayer/bundle-approve.d.ts +35 -0
- package/dist/eip7702/xlayer/bundle-approve.js +64 -0
- package/dist/eip7702/xlayer/index.d.ts +1 -1
- package/dist/eip7702/xlayer/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -853,7 +853,10 @@ export async function directV3BatchBuy(params) {
|
|
|
853
853
|
const refundData = routerIface.encodeFunctionData('refundETH', []);
|
|
854
854
|
return { txData: routerIface.encodeFunctionData('multicall(uint256,bytes[])', [deadline, [swapData, refundData]]), txValue: amountWei };
|
|
855
855
|
}
|
|
856
|
-
|
|
856
|
+
// ✅ 修复:ERC20 买入也需要使用 multicall 包装以传递 deadline
|
|
857
|
+
// SwapRouter02 的 exactInputSingle 不包含 deadline 参数,必须通过 multicall 传递
|
|
858
|
+
const swapData = routerIface.encodeFunctionData('exactInputSingle', [swapParams]);
|
|
859
|
+
return { txData: routerIface.encodeFunctionData('multicall(uint256,bytes[])', [deadline, [swapData]]), txValue: 0n };
|
|
857
860
|
}
|
|
858
861
|
};
|
|
859
862
|
const maxFlowIndex = findMaxFlowIndex(flowAmounts);
|
|
@@ -981,14 +984,16 @@ export async function directV3BatchSell(params) {
|
|
|
981
984
|
if (useNativeOutput) {
|
|
982
985
|
return routerIface.encodeFunctionData('multicall(bytes[])', [[routerIface.encodeFunctionData('exactInputSingle', [swapParams]), routerIface.encodeFunctionData('unwrapWETH9', [0n, wallet.address])]]);
|
|
983
986
|
}
|
|
984
|
-
|
|
987
|
+
// ✅ 修复:ERC20 输出也需要使用 multicall 包装以传递 deadline
|
|
988
|
+
return routerIface.encodeFunctionData('multicall(bytes[])', [[routerIface.encodeFunctionData('exactInputSingle', [swapParams])]]);
|
|
985
989
|
}
|
|
986
990
|
else {
|
|
987
991
|
const swapParams = { tokenIn: tokenAddress, tokenOut: outputToken, fee, recipient: useNativeOutput ? routerAddress : wallet.address, amountIn: sellAmount, amountOutMinimum: 0n, sqrtPriceLimitX96: 0n };
|
|
988
992
|
if (useNativeOutput) {
|
|
989
993
|
return routerIface.encodeFunctionData('multicall(uint256,bytes[])', [deadline, [routerIface.encodeFunctionData('exactInputSingle', [swapParams]), routerIface.encodeFunctionData('unwrapWETH9', [0n, wallet.address])]]);
|
|
990
994
|
}
|
|
991
|
-
|
|
995
|
+
// ✅ 修复:ERC20 输出也需要使用 multicall 包装以传递 deadline
|
|
996
|
+
return routerIface.encodeFunctionData('multicall(uint256,bytes[])', [deadline, [routerIface.encodeFunctionData('exactInputSingle', [swapParams])]]);
|
|
992
997
|
}
|
|
993
998
|
};
|
|
994
999
|
const maxOutputIndex = findMaxFlowIndex(sellAmountsWei);
|
|
@@ -15,6 +15,41 @@ import type { BundleApproveParams, BundleApproveResult, EIP7702Config } from './
|
|
|
15
15
|
* @returns 签名后的交易和元数据
|
|
16
16
|
*/
|
|
17
17
|
export declare function bundleApprove(params: BundleApproveParams): Promise<BundleApproveResult>;
|
|
18
|
+
export interface BundleApproveMultiSpendersParams {
|
|
19
|
+
/** 主钱包(发起交易,支付 gas) */
|
|
20
|
+
mainPrivateKey: string;
|
|
21
|
+
/** 需要授权的钱包私钥列表 */
|
|
22
|
+
privateKeys: string[];
|
|
23
|
+
/** 代币地址 */
|
|
24
|
+
tokenAddress: string;
|
|
25
|
+
/** 授权给的地址列表(多个 spender) */
|
|
26
|
+
spenderAddresses: string[];
|
|
27
|
+
/** 授权金额(可选,默认 MaxUint256) */
|
|
28
|
+
amount?: bigint;
|
|
29
|
+
/** 配置 */
|
|
30
|
+
config?: EIP7702Config;
|
|
31
|
+
}
|
|
32
|
+
export interface BundleApproveMultiSpendersResult {
|
|
33
|
+
/** 签名后的交易 */
|
|
34
|
+
signedTransaction: string;
|
|
35
|
+
/** 元数据 */
|
|
36
|
+
metadata: {
|
|
37
|
+
walletCount: number;
|
|
38
|
+
tokenAddress: string;
|
|
39
|
+
spenderAddresses: string[];
|
|
40
|
+
totalApproveCalls: number;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 多 spender 批量授权 - 生成签名后的交易
|
|
45
|
+
*
|
|
46
|
+
* ✅ 将所有钱包对所有 spender 的授权合并到一笔交易中
|
|
47
|
+
* 避免多笔交易导致的 nonce 冲突问题
|
|
48
|
+
*
|
|
49
|
+
* @param params 授权参数
|
|
50
|
+
* @returns 签名后的交易和元数据
|
|
51
|
+
*/
|
|
52
|
+
export declare function bundleApproveMultiSpenders(params: BundleApproveMultiSpendersParams): Promise<BundleApproveMultiSpendersResult>;
|
|
18
53
|
/**
|
|
19
54
|
* 检查授权状态
|
|
20
55
|
*
|
|
@@ -68,6 +68,70 @@ export async function bundleApprove(params) {
|
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* 构建多 spender 批量授权调用
|
|
73
|
+
* 每个钱包对每个 spender 生成一个 approve 调用
|
|
74
|
+
*/
|
|
75
|
+
function buildApproveCallsMultiSpenders(wallets, tokenAddress, spenderAddresses, amount) {
|
|
76
|
+
const delegateInterface = new ethers.Interface(EXTENDED_DELEGATE_ABI);
|
|
77
|
+
const calls = [];
|
|
78
|
+
// 对每个钱包,授权所有 spender
|
|
79
|
+
for (const wallet of wallets) {
|
|
80
|
+
for (const spender of spenderAddresses) {
|
|
81
|
+
const callData = delegateInterface.encodeFunctionData('executeApprove', [
|
|
82
|
+
tokenAddress,
|
|
83
|
+
spender,
|
|
84
|
+
amount,
|
|
85
|
+
]);
|
|
86
|
+
calls.push({
|
|
87
|
+
target: wallet.address,
|
|
88
|
+
allowFailure: false,
|
|
89
|
+
value: 0n,
|
|
90
|
+
callData,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return calls;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 多 spender 批量授权 - 生成签名后的交易
|
|
98
|
+
*
|
|
99
|
+
* ✅ 将所有钱包对所有 spender 的授权合并到一笔交易中
|
|
100
|
+
* 避免多笔交易导致的 nonce 冲突问题
|
|
101
|
+
*
|
|
102
|
+
* @param params 授权参数
|
|
103
|
+
* @returns 签名后的交易和元数据
|
|
104
|
+
*/
|
|
105
|
+
export async function bundleApproveMultiSpenders(params) {
|
|
106
|
+
const { mainPrivateKey, privateKeys, tokenAddress, spenderAddresses, amount = ethers.MaxUint256, config, } = params;
|
|
107
|
+
if (privateKeys.length === 0) {
|
|
108
|
+
throw new Error('privateKeys 不能为空');
|
|
109
|
+
}
|
|
110
|
+
if (spenderAddresses.length === 0) {
|
|
111
|
+
throw new Error('spenderAddresses 不能为空');
|
|
112
|
+
}
|
|
113
|
+
const provider = getCachedProvider(config?.rpcUrl);
|
|
114
|
+
const delegateAddress = (config?.delegateAddress && config.delegateAddress.trim()) || UNIFIED_DELEGATE_ADDRESS;
|
|
115
|
+
const mainWallet = createWallet(mainPrivateKey, provider);
|
|
116
|
+
const wallets = privateKeys.map(pk => createWallet(pk, provider));
|
|
117
|
+
// 检查 mainWallet 是否在 wallets 中
|
|
118
|
+
const mainWalletIndex = wallets.findIndex(w => w.address.toLowerCase() === mainWallet.address.toLowerCase());
|
|
119
|
+
// 只为需要执行授权操作的钱包生成 authorization
|
|
120
|
+
const authorizations = await signAuthorizationsBatch(wallets, delegateAddress, provider, mainWalletIndex);
|
|
121
|
+
// ✅ 关键:一次性构建所有 approve 调用
|
|
122
|
+
const calls = buildApproveCallsMultiSpenders(wallets, tokenAddress, spenderAddresses, amount);
|
|
123
|
+
console.log(`[bundleApproveMultiSpenders] 钱包数: ${wallets.length}, spender数: ${spenderAddresses.length}, 总调用数: ${calls.length}`);
|
|
124
|
+
const signedTransaction = await buildEIP7702Transaction(mainWallet, authorizations, calls, 0n, config);
|
|
125
|
+
return {
|
|
126
|
+
signedTransaction,
|
|
127
|
+
metadata: {
|
|
128
|
+
walletCount: wallets.length,
|
|
129
|
+
tokenAddress,
|
|
130
|
+
spenderAddresses,
|
|
131
|
+
totalApproveCalls: calls.length,
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
71
135
|
/**
|
|
72
136
|
* 检查授权状态
|
|
73
137
|
*
|
|
@@ -20,7 +20,7 @@ export { bundleBuy, } from './bundle-buy.js';
|
|
|
20
20
|
export { bundleSell, } from './bundle-sell.js';
|
|
21
21
|
export { bundleSwap, bundleBatchSwap, bundleMultiSwap, type BundleMultiSwapParams, type BundleMultiSwapResult, } from './bundle-swap.js';
|
|
22
22
|
export { disperse, sweep, pairwiseTransfer, disperseWithHops, sweepWithHops, type DisperseParams, type SweepParams, type PairwiseTransferParams, type PairwiseTransferResult, type TransferResult, } from './multi-hop-transfer.js';
|
|
23
|
-
export { bundleApprove, checkApprovalStatus, } from './bundle-approve.js';
|
|
23
|
+
export { bundleApprove, bundleApproveMultiSpenders, checkApprovalStatus, type BundleApproveMultiSpendersParams, type BundleApproveMultiSpendersResult, } from './bundle-approve.js';
|
|
24
24
|
export { bundleCreateBuy, bundleCreateToDex, bundleGraduateBuy, } from './bundle-create.js';
|
|
25
25
|
export type { TokenInfo, CreateTokenParams, AmountMode, BundleCreateBuyParams, BundleCreateBuyResult, BundleCreateToDexParams, BundleCreateToDexResult, BundleGraduateBuyParams, BundleGraduateBuyResult, } from './types.js';
|
|
26
26
|
export { washVolume, bundleVolume, singleRoundVolume, makeVolume, makeVolumeWithSwap, type VolumeMode, type PoolType, type VolumeProgress, type WashVolumeParams, type WashVolumeResult, type BundleVolumeParams, type BundleVolumeResult, type SingleRoundVolumeResult, type MakeVolumeParams, type MakeVolumeSignResult, type SwapVolumeSignResult, } from './volume.js';
|
|
@@ -52,7 +52,7 @@ disperseWithHops, sweepWithHops, } from './multi-hop-transfer.js';
|
|
|
52
52
|
// ============================================================================
|
|
53
53
|
// 批量授权
|
|
54
54
|
// ============================================================================
|
|
55
|
-
export { bundleApprove, checkApprovalStatus, } from './bundle-approve.js';
|
|
55
|
+
export { bundleApprove, bundleApproveMultiSpenders, checkApprovalStatus, } from './bundle-approve.js';
|
|
56
56
|
// ============================================================================
|
|
57
57
|
// 代币创建与发射
|
|
58
58
|
// ============================================================================
|
package/dist/index.d.ts
CHANGED
|
@@ -59,4 +59,4 @@ type XLayerEoaSwapConfig, type XLayerQuickBatchSwapParams, type XLayerQuickBatch
|
|
|
59
59
|
type XLayerPureCrossSwapResult, // ✅ 真正的交叉换手结果
|
|
60
60
|
type BuyFirstParams as XLayerBuyFirstParams, type BuyFirstResult as XLayerBuyFirstResult, type BuyFirstVolumeParams as XLayerBuyFirstVolumeParams, type BuyFirstVolumeResult as XLayerBuyFirstVolumeResult, type HandleOpsResult as XLayerHandleOpsResult, type AAAccount as XLayerAAAccount, type UserOperation as XLayerUserOperation, type GeneratedAAWallet as XLayerGeneratedAAWallet, type GenerateAAWalletsParams as XLayerGenerateAAWalletsParams, type GenerateAAWalletsResult as XLayerGenerateAAWalletsResult, } from './xlayer/index.js';
|
|
61
61
|
export * as XLayerEIP7702 from './eip7702/xlayer/index.js';
|
|
62
|
-
export { bundleBuy as xlayerEip7702BundleBuy, bundleSell as xlayerEip7702BundleSell, bundleApprove as xlayerEip7702BundleApprove, bundleSwap as xlayerEip7702BundleSwap, bundleBatchSwap as xlayerEip7702BundleBatchSwap, bundleMultiSwap as xlayerEip7702BundleMultiSwap, disperse as xlayerEip7702Disperse, sweep as xlayerEip7702Sweep, pairwiseTransfer as xlayerEip7702PairwiseTransfer, disperseWithHops as xlayerEip7702DisperseWithHops, sweepWithHops as xlayerEip7702SweepWithHops, washVolume as xlayerEip7702WashVolume, bundleVolume as xlayerEip7702BundleVolume, singleRoundVolume as xlayerEip7702SingleRoundVolume, makeVolume as xlayerEip7702MakeVolume, makeVolumeWithSwap as xlayerEip7702MakeVolumeWithSwap, checkApprovalStatus as xlayerEip7702CheckApprovalStatus, getProfitRecipient as xlayerEip7702GetProfitRecipient, calculateProfitAmount as xlayerEip7702CalculateProfitAmount, calculateProfitAmountByUserType as xlayerEip7702CalculateProfitAmountByUserType, calculateProfitAmountByTxCount as xlayerEip7702CalculateProfitAmountByTxCount, getProfitRateBps as xlayerEip7702GetProfitRateBps, getProfitRateBpsDouble as xlayerEip7702GetProfitRateBpsDouble, buildEIP7702Transaction as xlayerEip7702BuildTransaction, signAuthorization as xlayerEip7702SignAuthorization, signAuthorizationsBatch as xlayerEip7702SignAuthorizationsBatch, UNIFIED_DELEGATE_ADDRESS as XLAYER_EIP7702_DELEGATE_ADDRESS, MULTICALL3_ADDRESS as XLAYER_EIP7702_MULTICALL3, PROFIT_CONFIG as XLAYER_EIP7702_PROFIT_CONFIG, WOKB_ADDRESS as XLAYER_EIP7702_WOKB_ADDRESS, POTATOSWAP_V2_ROUTER as XLAYER_EIP7702_V2_ROUTER, POTATOSWAP_V3_ROUTER as XLAYER_EIP7702_V3_ROUTER, DYORSWAP_ROUTER as XLAYER_EIP7702_DYORSWAP_ROUTER, FLAP_PORTAL_ADDRESS as XLAYER_EIP7702_FLAP_PORTAL, type BundleBuyParams as XLayerEip7702BundleBuyParams, type BundleBuyResult as XLayerEip7702BundleBuyResult, type BundleSellParams as XLayerEip7702BundleSellParams, type BundleSellResult as XLayerEip7702BundleSellResult, type BundleApproveParams as XLayerEip7702BundleApproveParams, type BundleApproveResult as XLayerEip7702BundleApproveResult, type BundleSwapParams as XLayerEip7702BundleSwapParams, type BundleSwapResult as XLayerEip7702BundleSwapResult, type BundleMultiSwapParams as XLayerEip7702BundleMultiSwapParams, type BundleMultiSwapResult as XLayerEip7702BundleMultiSwapResult, type UserType as XLayerEip7702UserType, type DisperseParams as XLayerEip7702DisperseParams, type SweepParams as XLayerEip7702SweepParams, type PairwiseTransferParams as XLayerEip7702PairwiseTransferParams, type PairwiseTransferResult as XLayerEip7702PairwiseTransferResult, type TransferResult as XLayerEip7702TransferResult, type WashVolumeParams as XLayerEip7702WashVolumeParams, type WashVolumeResult as XLayerEip7702WashVolumeResult, type BundleVolumeParams as XLayerEip7702BundleVolumeParams, type BundleVolumeResult as XLayerEip7702BundleVolumeResult, type MakeVolumeParams as XLayerEip7702MakeVolumeParams, type MakeVolumeSignResult as XLayerEip7702MakeVolumeResult, type VolumeMode as XLayerEip7702VolumeMode, type PoolType as XLayerEip7702PoolType, type VolumeProgress as XLayerEip7702VolumeProgress, type EIP7702Config as XLayerEip7702Config, type Authorization as XLayerEip7702Authorization, type Call3Value as XLayerEip7702Call, type GeneratedWallet as XLayerEip7702GeneratedWallet, type TradeType as XLayerEip7702TradeType, type RouterType as XLayerEip7702RouterType, bundleCreateBuy as xlayerEip7702BundleCreateBuy, bundleCreateToDex as xlayerEip7702BundleCreateToDex, bundleGraduateBuy as xlayerEip7702BundleGraduateBuy, type TokenInfo as XLayerEip7702TokenInfo, type CreateTokenParams as XLayerEip7702CreateTokenParams, type AmountMode as XLayerEip7702AmountMode, type BundleCreateBuyParams as XLayerEip7702BundleCreateBuyParams, type BundleCreateBuyResult as XLayerEip7702BundleCreateBuyResult, type BundleCreateToDexParams as XLayerEip7702BundleCreateToDexParams, type BundleCreateToDexResult as XLayerEip7702BundleCreateToDexResult, type BundleGraduateBuyParams as XLayerEip7702BundleGraduateBuyParams, type BundleGraduateBuyResult as XLayerEip7702BundleGraduateBuyResult, } from './eip7702/xlayer/index.js';
|
|
62
|
+
export { bundleBuy as xlayerEip7702BundleBuy, bundleSell as xlayerEip7702BundleSell, bundleApprove as xlayerEip7702BundleApprove, bundleApproveMultiSpenders as xlayerEip7702BundleApproveMultiSpenders, bundleSwap as xlayerEip7702BundleSwap, bundleBatchSwap as xlayerEip7702BundleBatchSwap, bundleMultiSwap as xlayerEip7702BundleMultiSwap, disperse as xlayerEip7702Disperse, sweep as xlayerEip7702Sweep, pairwiseTransfer as xlayerEip7702PairwiseTransfer, disperseWithHops as xlayerEip7702DisperseWithHops, sweepWithHops as xlayerEip7702SweepWithHops, washVolume as xlayerEip7702WashVolume, bundleVolume as xlayerEip7702BundleVolume, singleRoundVolume as xlayerEip7702SingleRoundVolume, makeVolume as xlayerEip7702MakeVolume, makeVolumeWithSwap as xlayerEip7702MakeVolumeWithSwap, checkApprovalStatus as xlayerEip7702CheckApprovalStatus, getProfitRecipient as xlayerEip7702GetProfitRecipient, calculateProfitAmount as xlayerEip7702CalculateProfitAmount, calculateProfitAmountByUserType as xlayerEip7702CalculateProfitAmountByUserType, calculateProfitAmountByTxCount as xlayerEip7702CalculateProfitAmountByTxCount, getProfitRateBps as xlayerEip7702GetProfitRateBps, getProfitRateBpsDouble as xlayerEip7702GetProfitRateBpsDouble, buildEIP7702Transaction as xlayerEip7702BuildTransaction, signAuthorization as xlayerEip7702SignAuthorization, signAuthorizationsBatch as xlayerEip7702SignAuthorizationsBatch, UNIFIED_DELEGATE_ADDRESS as XLAYER_EIP7702_DELEGATE_ADDRESS, MULTICALL3_ADDRESS as XLAYER_EIP7702_MULTICALL3, PROFIT_CONFIG as XLAYER_EIP7702_PROFIT_CONFIG, WOKB_ADDRESS as XLAYER_EIP7702_WOKB_ADDRESS, POTATOSWAP_V2_ROUTER as XLAYER_EIP7702_V2_ROUTER, POTATOSWAP_V3_ROUTER as XLAYER_EIP7702_V3_ROUTER, DYORSWAP_ROUTER as XLAYER_EIP7702_DYORSWAP_ROUTER, FLAP_PORTAL_ADDRESS as XLAYER_EIP7702_FLAP_PORTAL, type BundleBuyParams as XLayerEip7702BundleBuyParams, type BundleBuyResult as XLayerEip7702BundleBuyResult, type BundleSellParams as XLayerEip7702BundleSellParams, type BundleSellResult as XLayerEip7702BundleSellResult, type BundleApproveParams as XLayerEip7702BundleApproveParams, type BundleApproveResult as XLayerEip7702BundleApproveResult, type BundleApproveMultiSpendersParams as XLayerEip7702BundleApproveMultiSpendersParams, type BundleApproveMultiSpendersResult as XLayerEip7702BundleApproveMultiSpendersResult, type BundleSwapParams as XLayerEip7702BundleSwapParams, type BundleSwapResult as XLayerEip7702BundleSwapResult, type BundleMultiSwapParams as XLayerEip7702BundleMultiSwapParams, type BundleMultiSwapResult as XLayerEip7702BundleMultiSwapResult, type UserType as XLayerEip7702UserType, type DisperseParams as XLayerEip7702DisperseParams, type SweepParams as XLayerEip7702SweepParams, type PairwiseTransferParams as XLayerEip7702PairwiseTransferParams, type PairwiseTransferResult as XLayerEip7702PairwiseTransferResult, type TransferResult as XLayerEip7702TransferResult, type WashVolumeParams as XLayerEip7702WashVolumeParams, type WashVolumeResult as XLayerEip7702WashVolumeResult, type BundleVolumeParams as XLayerEip7702BundleVolumeParams, type BundleVolumeResult as XLayerEip7702BundleVolumeResult, type MakeVolumeParams as XLayerEip7702MakeVolumeParams, type MakeVolumeSignResult as XLayerEip7702MakeVolumeResult, type VolumeMode as XLayerEip7702VolumeMode, type PoolType as XLayerEip7702PoolType, type VolumeProgress as XLayerEip7702VolumeProgress, type EIP7702Config as XLayerEip7702Config, type Authorization as XLayerEip7702Authorization, type Call3Value as XLayerEip7702Call, type GeneratedWallet as XLayerEip7702GeneratedWallet, type TradeType as XLayerEip7702TradeType, type RouterType as XLayerEip7702RouterType, bundleCreateBuy as xlayerEip7702BundleCreateBuy, bundleCreateToDex as xlayerEip7702BundleCreateToDex, bundleGraduateBuy as xlayerEip7702BundleGraduateBuy, type TokenInfo as XLayerEip7702TokenInfo, type CreateTokenParams as XLayerEip7702CreateTokenParams, type AmountMode as XLayerEip7702AmountMode, type BundleCreateBuyParams as XLayerEip7702BundleCreateBuyParams, type BundleCreateBuyResult as XLayerEip7702BundleCreateBuyResult, type BundleCreateToDexParams as XLayerEip7702BundleCreateToDexParams, type BundleCreateToDexResult as XLayerEip7702BundleCreateToDexResult, type BundleGraduateBuyParams as XLayerEip7702BundleGraduateBuyParams, type BundleGraduateBuyResult as XLayerEip7702BundleGraduateBuyResult, } from './eip7702/xlayer/index.js';
|
package/dist/index.js
CHANGED
|
@@ -142,7 +142,7 @@ xlayerQuickBatchSwapMerkle, xlayerCrossSwapMerkle, xlayerPureCrossSwapMerkle, //
|
|
|
142
142
|
// ============================================================
|
|
143
143
|
export * as XLayerEIP7702 from './eip7702/xlayer/index.js';
|
|
144
144
|
// EIP-7702 批量操作(注意使用 eip7702 前缀避免与 AA 模式冲突)
|
|
145
|
-
export { bundleBuy as xlayerEip7702BundleBuy, bundleSell as xlayerEip7702BundleSell, bundleApprove as xlayerEip7702BundleApprove, bundleSwap as xlayerEip7702BundleSwap, bundleBatchSwap as xlayerEip7702BundleBatchSwap, bundleMultiSwap as xlayerEip7702BundleMultiSwap,
|
|
145
|
+
export { bundleBuy as xlayerEip7702BundleBuy, bundleSell as xlayerEip7702BundleSell, bundleApprove as xlayerEip7702BundleApprove, bundleApproveMultiSpenders as xlayerEip7702BundleApproveMultiSpenders, bundleSwap as xlayerEip7702BundleSwap, bundleBatchSwap as xlayerEip7702BundleBatchSwap, bundleMultiSwap as xlayerEip7702BundleMultiSwap,
|
|
146
146
|
// 转账功能
|
|
147
147
|
disperse as xlayerEip7702Disperse, sweep as xlayerEip7702Sweep, pairwiseTransfer as xlayerEip7702PairwiseTransfer,
|
|
148
148
|
// 向后兼容
|