four-flap-meme-sdk 3.0.0 → 4.0.0
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/bundle/four-meme/approve-tokenmanager.d.ts +2 -2
- package/dist/bundle/four-meme/approve-tokenmanager.js +3 -3
- package/dist/bundle/four-meme/core/buy-flow.d.ts +5 -0
- package/dist/bundle/four-meme/core/buy-flow.js +147 -0
- package/dist/bundle/four-meme/core/constants.d.ts +6 -0
- package/dist/bundle/four-meme/core/constants.js +15 -0
- package/dist/bundle/four-meme/core/create-token.d.ts +5 -0
- package/dist/bundle/four-meme/core/create-token.js +137 -0
- package/dist/bundle/four-meme/core/index.d.ts +14 -0
- package/dist/bundle/four-meme/core/index.js +14 -0
- package/dist/bundle/four-meme/core/sell-flow.d.ts +5 -0
- package/dist/bundle/four-meme/core/sell-flow.js +240 -0
- package/dist/bundle/four-meme/core-helpers.js +1 -1
- package/dist/bundle/four-meme/core.d.ts +7 -4
- package/dist/bundle/four-meme/core.js +5 -513
- package/dist/bundle/four-meme/pancake-proxy/approve.d.ts +15 -0
- package/dist/bundle/four-meme/pancake-proxy/approve.js +113 -0
- package/dist/bundle/four-meme/pancake-proxy/buy.d.ts +8 -0
- package/dist/bundle/four-meme/pancake-proxy/buy.js +143 -0
- package/dist/bundle/four-meme/pancake-proxy/constants.d.ts +25 -0
- package/dist/bundle/four-meme/pancake-proxy/constants.js +14 -0
- package/dist/bundle/four-meme/pancake-proxy/helpers.d.ts +45 -0
- package/dist/bundle/four-meme/pancake-proxy/helpers.js +232 -0
- package/dist/bundle/four-meme/pancake-proxy/index.d.ts +15 -0
- package/dist/bundle/four-meme/pancake-proxy/index.js +15 -0
- package/dist/bundle/four-meme/pancake-proxy/sell.d.ts +8 -0
- package/dist/bundle/four-meme/pancake-proxy/sell.js +194 -0
- package/dist/bundle/four-meme/pancake-proxy.d.ts +4 -20
- package/dist/bundle/four-meme/pancake-proxy.js +3 -670
- package/dist/bundle/four-meme/private/buy.d.ts +16 -0
- package/dist/bundle/four-meme/private/buy.js +225 -0
- package/dist/bundle/four-meme/private/index.d.ts +11 -0
- package/dist/bundle/four-meme/private/index.js +11 -0
- package/dist/bundle/four-meme/private/sell.d.ts +18 -0
- package/dist/bundle/four-meme/private/sell.js +245 -0
- package/dist/bundle/four-meme/private.d.ts +5 -25
- package/dist/bundle/four-meme/private.js +5 -463
- package/dist/bundle/four-meme/swap/batch.d.ts +8 -0
- package/dist/bundle/four-meme/swap/batch.js +170 -0
- package/dist/bundle/four-meme/swap/bundle.d.ts +8 -0
- package/dist/bundle/four-meme/swap/bundle.js +147 -0
- package/dist/bundle/four-meme/swap/index.d.ts +14 -0
- package/dist/bundle/four-meme/swap/index.js +13 -0
- package/dist/bundle/four-meme/swap/quick-batch.d.ts +8 -0
- package/dist/bundle/four-meme/swap/quick-batch.js +206 -0
- package/dist/bundle/four-meme/swap-buy-first/helpers.d.ts +20 -0
- package/dist/bundle/four-meme/swap-buy-first/helpers.js +39 -0
- package/dist/bundle/four-meme/swap-buy-first/index.d.ts +12 -0
- package/dist/bundle/four-meme/swap-buy-first/index.js +11 -0
- package/dist/bundle/four-meme/swap-buy-first/multi-wallet.d.ts +20 -0
- package/dist/bundle/four-meme/swap-buy-first/multi-wallet.js +198 -0
- package/dist/bundle/four-meme/swap-buy-first/single.d.ts +7 -0
- package/dist/bundle/four-meme/swap-buy-first/single.js +232 -0
- package/dist/bundle/four-meme/swap-buy-first.d.ts +4 -3
- package/dist/bundle/four-meme/swap-buy-first.js +4 -451
- package/dist/bundle/four-meme/swap-hop-helpers.d.ts +2 -2
- package/dist/bundle/four-meme/swap-sign-helpers.d.ts +2 -2
- package/dist/bundle/four-meme/swap-sign-helpers.js +1 -1
- package/dist/bundle/four-meme/swap.d.ts +4 -14
- package/dist/bundle/four-meme/swap.js +4 -502
- package/dist/bundle/four-meme/types/index.d.ts +1 -1
- package/dist/bundle/four-meme/utils-disperse.d.ts +1 -1
- package/dist/bundle/four-meme/utils-disperse.js +1 -1
- package/dist/bundle/four-meme/utils-pairwise.d.ts +1 -1
- package/dist/bundle/four-meme/utils-pairwise.js +1 -1
- package/dist/bundle/four-meme/utils-sweep/context.d.ts +39 -0
- package/dist/bundle/four-meme/utils-sweep/context.js +7 -0
- package/dist/bundle/four-meme/utils-sweep/erc20-no-hop.d.ts +5 -0
- package/dist/bundle/four-meme/utils-sweep/erc20-no-hop.js +162 -0
- package/dist/bundle/four-meme/utils-sweep/index.d.ts +13 -0
- package/dist/bundle/four-meme/utils-sweep/index.js +13 -0
- package/dist/bundle/four-meme/utils-sweep/main.d.ts +8 -0
- package/dist/bundle/four-meme/utils-sweep/main.js +114 -0
- package/dist/bundle/four-meme/utils-sweep/native-no-hop.d.ts +5 -0
- package/dist/bundle/four-meme/utils-sweep/native-no-hop.js +156 -0
- package/dist/bundle/four-meme/utils-sweep/with-hops.d.ts +6 -0
- package/dist/bundle/four-meme/utils-sweep/with-hops.js +382 -0
- package/dist/bundle/four-meme/utils-sweep.d.ts +3 -4
- package/dist/bundle/four-meme/utils-sweep.js +3 -740
- package/dist/bundle/internal.d.ts +2 -2
- package/dist/bundle/sign-context-helpers.d.ts +1 -26
- package/dist/bundle/sign-context-helpers.js +1 -63
- package/dist/bundle/submit/blockrazor.d.ts +94 -0
- package/dist/bundle/submit/blockrazor.js +122 -0
- package/dist/bundle/submit/direct.d.ts +118 -0
- package/dist/bundle/submit/direct.js +484 -0
- package/dist/bundle/submit/helpers.d.ts +7 -0
- package/dist/bundle/submit/helpers.js +15 -0
- package/dist/bundle/submit/index.d.ts +14 -0
- package/dist/bundle/submit/index.js +14 -0
- package/dist/bundle/submit/merkle.d.ts +84 -0
- package/dist/bundle/submit/merkle.js +121 -0
- package/dist/bundle/submit.d.ts +3 -286
- package/dist/bundle/submit.js +3 -724
- package/dist/chains/bsc/four/types.d.ts +1 -1
- package/dist/chains/bsc/index.d.ts +1 -1
- package/dist/chains/bsc/index.js +2 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-build.d.ts +25 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-build.js +177 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-constants.d.ts +30 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-constants.js +24 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.d.ts +11 -149
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +12 -74
- package/dist/chains/bsc/pancake/bundle-buy-first-multi-wallet.d.ts +9 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-multi-wallet.js +225 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-plan.d.ts +14 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-plan.js +64 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-profit.d.ts +12 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-profit.js +22 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-quote.d.ts +15 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-quote.js +122 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-types.d.ts +179 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-types.js +1 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-validate.d.ts +2 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-validate.js +41 -0
- package/dist/chains/bsc/pancake/bundle-buy-first.d.ts +1 -1
- package/dist/chains/bsc/pancake/bundle-buy-first.js +8 -578
- package/dist/chains/bsc/pancake/bundle-swap-helpers.d.ts +11 -239
- package/dist/chains/bsc/pancake/bundle-swap-helpers.js +12 -564
- package/dist/chains/bsc/pancake/bundle-swap-types.d.ts +183 -0
- package/dist/chains/bsc/pancake/bundle-swap-types.js +17 -0
- package/dist/chains/bsc/pancake/bundle-swap.d.ts +10 -132
- package/dist/chains/bsc/pancake/bundle-swap.js +12 -1003
- package/dist/chains/bsc/pancake/hop-chain.d.ts +18 -0
- package/dist/chains/bsc/pancake/hop-chain.js +227 -0
- package/dist/chains/bsc/pancake/quote.d.ts +14 -0
- package/dist/chains/bsc/pancake/quote.js +84 -0
- package/dist/chains/bsc/pancake/swap-batch.d.ts +42 -0
- package/dist/chains/bsc/pancake/swap-batch.js +283 -0
- package/dist/chains/bsc/pancake/swap-build.d.ts +19 -0
- package/dist/chains/bsc/pancake/swap-build.js +226 -0
- package/dist/chains/bsc/pancake/swap-cross.d.ts +42 -0
- package/dist/chains/bsc/pancake/swap-cross.js +140 -0
- package/dist/chains/bsc/pancake/swap-quick.d.ts +54 -0
- package/dist/chains/bsc/pancake/swap-quick.js +424 -0
- package/dist/chains/bsc/pancake/swap-single.d.ts +2 -0
- package/dist/chains/bsc/pancake/swap-single.js +182 -0
- package/dist/chains/bsc/platforms/four/index.d.ts +21 -3
- package/dist/chains/bsc/platforms/four/index.js +28 -3
- package/dist/chains/eni/batch-router/transfer-disperse.d.ts +37 -0
- package/dist/chains/eni/batch-router/transfer-disperse.js +302 -0
- package/dist/chains/eni/batch-router/transfer-shared.d.ts +9 -0
- package/dist/chains/eni/batch-router/transfer-shared.js +10 -0
- package/dist/chains/eni/batch-router/transfer-sweep.d.ts +51 -0
- package/dist/chains/eni/batch-router/transfer-sweep.js +364 -0
- package/dist/chains/eni/batch-router/transfer.d.ts +4 -74
- package/dist/chains/eni/batch-router/transfer.js +2 -647
- package/dist/chains/eni/index.d.ts +2 -0
- package/dist/chains/eni/index.js +4 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-profit.d.ts +17 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-profit.js +30 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-submit.d.ts +12 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-submit.js +396 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-tx.d.ts +20 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-tx.js +165 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct.d.ts +3 -32
- package/dist/chains/eni/platforms/daoaas/portal-direct.js +3 -571
- package/dist/chains/eni/submit.js +1 -1
- package/dist/chains/xlayer/constants.d.ts +0 -2
- package/dist/chains/xlayer/constants.js +0 -2
- package/dist/chains/xlayer/eip7702/auth.d.ts +16 -0
- package/dist/chains/xlayer/eip7702/auth.js +81 -0
- package/dist/chains/xlayer/eip7702/bundle-create-buy.d.ts +22 -0
- package/dist/chains/xlayer/eip7702/bundle-create-buy.js +201 -0
- package/dist/chains/xlayer/eip7702/bundle-create-helpers.d.ts +114 -0
- package/dist/chains/xlayer/eip7702/bundle-create-helpers.js +139 -0
- package/dist/chains/xlayer/eip7702/bundle-create-to-dex.d.ts +24 -0
- package/dist/chains/xlayer/eip7702/bundle-create-to-dex.js +233 -0
- package/dist/chains/xlayer/eip7702/bundle-create.d.ts +3 -35
- package/dist/chains/xlayer/eip7702/bundle-create.js +3 -746
- package/dist/chains/xlayer/eip7702/bundle-graduate-buy.d.ts +22 -0
- package/dist/chains/xlayer/eip7702/bundle-graduate-buy.js +214 -0
- package/dist/chains/xlayer/eip7702/bundle-sell.js +1 -1
- package/dist/chains/xlayer/eip7702/bundle-swap-batch.d.ts +31 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-batch.js +216 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-helpers.d.ts +21 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-helpers.js +206 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-multi.d.ts +33 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-multi.js +146 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-single.d.ts +31 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-single.js +177 -0
- package/dist/chains/xlayer/eip7702/bundle-swap.d.ts +6 -61
- package/dist/chains/xlayer/eip7702/bundle-swap.js +3 -712
- package/dist/chains/xlayer/eip7702/bytes.d.ts +4 -0
- package/dist/chains/xlayer/eip7702/bytes.js +31 -0
- package/dist/chains/xlayer/eip7702/gas.d.ts +19 -0
- package/dist/chains/xlayer/eip7702/gas.js +152 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-disperse.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-disperse.js +196 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-pairwise.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-pairwise.js +188 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-sweep.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-sweep.js +220 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.d.ts +8 -4
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.js +5 -591
- package/dist/chains/xlayer/eip7702/profit.d.ts +32 -0
- package/dist/chains/xlayer/eip7702/profit.js +59 -0
- package/dist/chains/xlayer/eip7702/provider.d.ts +3 -0
- package/dist/chains/xlayer/eip7702/provider.js +17 -0
- package/dist/chains/xlayer/eip7702/time.d.ts +2 -0
- package/dist/chains/xlayer/eip7702/time.js +10 -0
- package/dist/chains/xlayer/eip7702/tx-build.d.ts +10 -0
- package/dist/chains/xlayer/eip7702/tx-build.js +128 -0
- package/dist/chains/xlayer/eip7702/utils.d.ts +19 -85
- package/dist/chains/xlayer/eip7702/utils.js +19 -484
- package/dist/chains/xlayer/eip7702/volume-bundle.d.ts +13 -0
- package/dist/chains/xlayer/eip7702/volume-bundle.js +250 -0
- package/dist/chains/xlayer/eip7702/volume-internal.d.ts +13 -0
- package/dist/chains/xlayer/eip7702/volume-internal.js +169 -0
- package/dist/chains/xlayer/eip7702/volume-make.d.ts +8 -0
- package/dist/chains/xlayer/eip7702/volume-make.js +38 -0
- package/dist/chains/xlayer/eip7702/volume-single-round.d.ts +17 -0
- package/dist/chains/xlayer/eip7702/volume-single-round.js +44 -0
- package/dist/chains/xlayer/eip7702/volume-swap.d.ts +18 -0
- package/dist/chains/xlayer/eip7702/volume-swap.js +30 -0
- package/dist/chains/xlayer/eip7702/volume-wash.d.ts +8 -0
- package/dist/chains/xlayer/eip7702/volume-wash.js +191 -0
- package/dist/chains/xlayer/eip7702/volume.d.ts +7 -35
- package/dist/chains/xlayer/eip7702/volume.js +5 -697
- package/dist/chains/xlayer/eip7702/wallet.d.ts +6 -0
- package/dist/chains/xlayer/eip7702/wallet.js +17 -0
- package/dist/chains/xlayer/eoa/aa-types.d.ts +176 -0
- package/dist/chains/xlayer/eoa/aa-types.js +6 -0
- package/dist/chains/xlayer/eoa/constants.d.ts +0 -2
- package/dist/chains/xlayer/eoa/constants.js +0 -2
- package/dist/chains/xlayer/eoa/context.d.ts +8 -0
- package/dist/chains/xlayer/eoa/context.js +23 -0
- package/dist/chains/xlayer/eoa/encoders.d.ts +147 -0
- package/dist/chains/xlayer/eoa/encoders.js +147 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-cross.d.ts +5 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-cross.js +113 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.d.ts +10 -123
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.js +10 -225
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-pure.d.ts +50 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-pure.js +170 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-quick.d.ts +5 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-quick.js +257 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-types.d.ts +99 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-types.js +11 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.d.ts +5 -47
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.js +3 -522
- package/dist/chains/xlayer/eoa/eoa-types.d.ts +776 -0
- package/dist/chains/xlayer/eoa/eoa-types.js +6 -0
- package/dist/chains/xlayer/eoa/eoa-wash-volume.d.ts +8 -0
- package/dist/chains/xlayer/eoa/eoa-wash-volume.js +8 -0
- package/dist/chains/xlayer/eoa/format.d.ts +34 -0
- package/dist/chains/xlayer/eoa/format.js +56 -0
- package/dist/chains/xlayer/eoa/hop-chain.d.ts +4 -0
- package/dist/chains/xlayer/eoa/hop-chain.js +87 -0
- package/dist/chains/xlayer/eoa/nonce-map.d.ts +20 -0
- package/dist/chains/xlayer/eoa/nonce-map.js +51 -0
- package/dist/chains/xlayer/eoa/portal-ops.d.ts +9 -292
- package/dist/chains/xlayer/eoa/portal-ops.js +9 -486
- package/dist/chains/xlayer/eoa/query.d.ts +117 -0
- package/dist/chains/xlayer/eoa/query.js +285 -0
- package/dist/chains/xlayer/eoa/quote.d.ts +6 -0
- package/dist/chains/xlayer/eoa/quote.js +90 -0
- package/dist/chains/xlayer/eoa/types.d.ts +9 -959
- package/dist/chains/xlayer/eoa/types.js +9 -49
- package/dist/core/clients/blockrazor.js +1 -1
- package/dist/core/clients/merkle.js +1 -1
- package/dist/core/erc20/allowances.d.ts +104 -0
- package/dist/core/erc20/allowances.js +205 -0
- package/dist/core/erc20/approve.d.ts +141 -0
- package/dist/core/erc20/approve.js +325 -0
- package/dist/core/erc20/helpers.d.ts +20 -0
- package/dist/core/erc20/helpers.js +109 -0
- package/dist/core/erc20/index.d.ts +13 -0
- package/dist/core/erc20/index.js +12 -0
- package/dist/core/gas/bundle-gas.d.ts +6 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/quote/index.d.ts +1 -0
- package/dist/core/quote/index.js +1 -0
- package/dist/core/quote/quote-helpers.d.ts +78 -0
- package/dist/core/quote/quote-helpers.js +289 -0
- package/dist/core/quote/types.d.ts +1 -0
- package/dist/core/quote/types.js +1 -0
- package/dist/core/sign-context-helpers.d.ts +29 -0
- package/dist/core/sign-context-helpers.js +63 -0
- package/dist/domains/dex/direct-router-helpers.d.ts +16 -268
- package/dist/domains/dex/direct-router-helpers.js +16 -535
- package/dist/domains/dex/direct-router-types.d.ts +104 -0
- package/dist/domains/dex/direct-router-types.js +81 -0
- package/dist/domains/dex/direct-router-v2-buy.d.ts +2 -0
- package/dist/domains/dex/direct-router-v2-buy.js +249 -0
- package/dist/domains/dex/direct-router-v2-sell.d.ts +5 -0
- package/dist/domains/dex/direct-router-v2-sell.js +270 -0
- package/dist/domains/dex/direct-router-v2.d.ts +9 -0
- package/dist/domains/dex/direct-router-v2.js +9 -0
- package/dist/domains/dex/direct-router-v3.d.ts +17 -0
- package/dist/domains/dex/direct-router-v3.js +432 -0
- package/dist/domains/dex/direct-router.d.ts +11 -26
- package/dist/domains/dex/direct-router.js +10 -977
- package/dist/domains/dex/dyo-encode.d.ts +62 -0
- package/dist/domains/dex/dyo-encode.js +124 -0
- package/dist/domains/dex/profit.d.ts +24 -0
- package/dist/domains/dex/profit.js +86 -0
- package/dist/domains/dex/provider.d.ts +10 -0
- package/dist/domains/dex/provider.js +27 -0
- package/dist/domains/dex/quote.d.ts +7 -0
- package/dist/domains/dex/quote.js +52 -0
- package/dist/domains/dex/router.d.ts +56 -0
- package/dist/domains/dex/router.js +193 -0
- package/dist/domains/flap/portal-bundle/batch.d.ts +9 -0
- package/dist/domains/flap/portal-bundle/batch.js +193 -0
- package/dist/domains/flap/portal-bundle/create.d.ts +5 -0
- package/dist/domains/flap/portal-bundle/create.js +153 -0
- package/dist/domains/flap/portal-bundle/helpers.d.ts +32 -0
- package/dist/domains/flap/portal-bundle/helpers.js +50 -0
- package/dist/domains/flap/portal-bundle/index.d.ts +16 -0
- package/dist/domains/flap/portal-bundle/index.js +15 -0
- package/dist/domains/flap/portal-bundle/private.d.ts +5 -0
- package/dist/domains/flap/portal-bundle/private.js +198 -0
- package/dist/domains/flap/portal-bundle/types.d.ts +102 -0
- package/dist/domains/flap/portal-bundle/types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/core-batch.d.ts +13 -0
- package/dist/domains/flap/portal-bundle-merkle/core-batch.js +376 -0
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.d.ts +75 -7
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.js +259 -20
- package/dist/domains/flap/portal-bundle-merkle/core.d.ts +2 -13
- package/dist/domains/flap/portal-bundle-merkle/core.js +12 -629
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/constants.d.ts +70 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/constants.js +90 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/main.d.ts +15 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/main.js +432 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/types.d.ts +113 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/types.js +4 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex.d.ts +4 -127
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex.js +4 -527
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/constants.d.ts +42 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/constants.js +81 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/main.d.ts +15 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/main.js +339 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/types.d.ts +72 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/types.js +4 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex.d.ts +4 -85
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex.js +4 -425
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/approve.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/approve.js +102 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/buy.d.ts +5 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/buy.js +135 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/helpers.d.ts +52 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/helpers.js +267 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/index.d.ts +14 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/index.js +14 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/sell.d.ts +5 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/sell.js +195 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy.d.ts +3 -24
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy.js +3 -700
- package/dist/domains/flap/portal-bundle-merkle/private/buy.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/private/buy.js +188 -0
- package/dist/domains/flap/portal-bundle-merkle/private/helpers.d.ts +36 -0
- package/dist/domains/flap/portal-bundle-merkle/private/helpers.js +127 -0
- package/dist/domains/flap/portal-bundle-merkle/private/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/private/index.js +12 -0
- package/dist/domains/flap/portal-bundle-merkle/private/sell.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/private/sell.js +191 -0
- package/dist/domains/flap/portal-bundle-merkle/private.d.ts +5 -15
- package/dist/domains/flap/portal-bundle-merkle/private.js +5 -494
- package/dist/domains/flap/portal-bundle-merkle/swap-batch.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-chain.d.ts +4 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-chain.js +43 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-constants.d.ts +13 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-constants.js +21 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +11 -121
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.js +11 -109
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-multi-wallet.d.ts +20 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-multi-wallet.js +223 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-plan.d.ts +32 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-plan.js +66 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-profit.d.ts +22 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-profit.js +22 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-quote.d.ts +51 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-quote.js +149 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-types.d.ts +87 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first.js +5 -404
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.d.ts +0 -1
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.js +0 -7
- package/dist/domains/flap/portal-bundle-merkle/swap-planning.js +1 -1
- package/dist/domains/flap/portal-bundle-merkle/swap-quick-batch.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/swap-single.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/utils/disperse.d.ts +2 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/disperse.js +275 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/index.d.ts +11 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/sweep.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/sweep.js +570 -0
- package/dist/domains/flap/portal-bundle-merkle/utils.d.ts +5 -8
- package/dist/domains/flap/portal-bundle-merkle/utils.js +5 -841
- package/dist/domains/flap/portal-bundle.d.ts +5 -117
- package/dist/domains/flap/portal-bundle.js +5 -587
- package/dist/domains/flap/portal.d.ts +13 -404
- package/dist/domains/flap/portal.js +12 -619
- package/dist/domains/flap/reader.d.ts +51 -0
- package/dist/domains/flap/reader.js +275 -0
- package/dist/domains/flap/types.d.ts +246 -0
- package/dist/domains/flap/types.js +104 -0
- package/dist/domains/flap/vault/constants.d.ts +220 -0
- package/dist/domains/flap/vault/constants.js +173 -0
- package/dist/domains/flap/vault/encode.d.ts +39 -0
- package/dist/domains/flap/vault/encode.js +135 -0
- package/dist/domains/flap/vault/index.d.ts +15 -0
- package/dist/domains/flap/vault/index.js +14 -0
- package/dist/domains/flap/vault/query.d.ts +40 -0
- package/dist/domains/flap/vault/query.js +104 -0
- package/dist/domains/flap/vault/types.d.ts +147 -0
- package/dist/domains/flap/vault/types.js +29 -0
- package/dist/domains/flap/vault.d.ts +3 -413
- package/dist/domains/flap/vault.js +3 -467
- package/dist/domains/flap/writer.d.ts +124 -0
- package/dist/domains/flap/writer.js +255 -0
- package/dist/domains/four/contracts/tm-bundle-batch.d.ts +35 -0
- package/dist/domains/four/contracts/tm-bundle-batch.js +286 -0
- package/dist/domains/four/contracts/tm-bundle-create.d.ts +2 -0
- package/dist/domains/four/contracts/tm-bundle-create.js +304 -0
- package/dist/domains/four/contracts/tm-bundle-helpers.d.ts +2 -1
- package/dist/domains/four/contracts/tm-bundle-helpers.js +3 -0
- package/dist/domains/four/contracts/tm-bundle-private.d.ts +36 -0
- package/dist/domains/four/contracts/tm-bundle-private.js +164 -0
- package/dist/domains/four/contracts/tm-bundle.d.ts +10 -71
- package/dist/domains/four/contracts/tm-bundle.js +9 -738
- package/dist/domains/lp-inspect/inspect-helpers.d.ts +25 -0
- package/dist/domains/lp-inspect/inspect-helpers.js +343 -0
- package/dist/domains/lp-inspect/inspect.d.ts +8 -0
- package/dist/domains/lp-inspect/inspect.js +332 -0
- package/dist/domains/lp-inspect/lp-inspect.d.ts +9 -37
- package/dist/domains/lp-inspect/lp-inspect.js +9 -775
- package/dist/domains/lp-inspect/registry.d.ts +43 -0
- package/dist/domains/lp-inspect/registry.js +127 -0
- package/dist/domains/merkle/index.d.ts +1 -1
- package/dist/exports/root-bundle-and-tooling.d.ts +9 -1
- package/dist/exports/root-bundle-and-tooling.js +8 -1
- package/dist/exports/root-foundations.d.ts +1 -1
- package/dist/exports/root-foundations.js +1 -1
- package/dist/exports/root-swap-dex-and-xlayer.d.ts +4 -4
- package/dist/exports/root-swap-dex-and-xlayer.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/swap-helpers.js +1 -1
- package/package.json +1 -81
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 捆绑刷量 (Bundle Mode)
|
|
3
|
+
*
|
|
4
|
+
* 多钱包批量买入 + 批量卖出
|
|
5
|
+
* 只生成签名,由调用方决定如何提交
|
|
6
|
+
*/
|
|
7
|
+
import { ethers } from 'ethers';
|
|
8
|
+
import { truncateDecimals } from './volume-helpers.js';
|
|
9
|
+
import { getCachedProvider, createWallet, signAuthorizationsWithNonces, batchGetNonces, buildEIP7702TransactionSync, calculateProfitAmountByTxCount, getProfitRecipient, } from './utils.js';
|
|
10
|
+
import { UNIFIED_DELEGATE_ADDRESS, UNIFIED_DELEGATE_ABI, FLAP_PORTAL_ABI, FLAP_PORTAL_ADDRESS, POTATOSWAP_V2_ROUTER, WOKB_ADDRESS, V3_FEE_TIERS, ERC20_ABI, V2_ROUTER_ABI, } from './constants.js';
|
|
11
|
+
import { getDefaultRouter, buildBuyCall, buildSellCall, buildSellCallWithAmount } from './volume-internal.js';
|
|
12
|
+
/**
|
|
13
|
+
* 捆绑刷量 - 多钱包批量买入 + 批量卖出
|
|
14
|
+
*
|
|
15
|
+
* 核心逻辑:[利润刮取] + [买入Ops...] + [卖出Ops...]
|
|
16
|
+
*/
|
|
17
|
+
export async function bundleVolume(params) {
|
|
18
|
+
const { mainPrivateKey, buyerPrivateKeys, buyAmounts, sellerPrivateKeys, sellAmounts, sellPercent = 100, tokenAddress, tokenDecimals = 18, poolType = 'V3', routerAddress, fee = V3_FEE_TIERS.MEDIUM, userType = 'v0', // ✅ 用户类型(影响利润率)
|
|
19
|
+
config, } = params;
|
|
20
|
+
// ✅ 验证私钥格式的辅助函数
|
|
21
|
+
const isValidPrivateKey = (pk) => {
|
|
22
|
+
const trimmed = (pk || '').trim();
|
|
23
|
+
return trimmed.length >= 64 && (trimmed.startsWith('0x') || /^[0-9a-fA-F]{64}$/.test(trimmed));
|
|
24
|
+
};
|
|
25
|
+
if (!mainPrivateKey || !isValidPrivateKey(mainPrivateKey)) {
|
|
26
|
+
throw new Error('必须提供有效的 mainPrivateKey(Payer 钱包私钥)');
|
|
27
|
+
}
|
|
28
|
+
// ✅ 验证买家私钥
|
|
29
|
+
const validBuyerIndices = [];
|
|
30
|
+
const validBuyerPrivateKeys = [];
|
|
31
|
+
const validBuyAmounts = [];
|
|
32
|
+
buyerPrivateKeys.forEach((pk, i) => {
|
|
33
|
+
if (isValidPrivateKey(pk)) {
|
|
34
|
+
validBuyerIndices.push(i);
|
|
35
|
+
validBuyerPrivateKeys.push(pk);
|
|
36
|
+
validBuyAmounts.push(buyAmounts[i] || '0');
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
if (validBuyerPrivateKeys.length === 0) {
|
|
40
|
+
throw new Error('没有有效的买家私钥');
|
|
41
|
+
}
|
|
42
|
+
// ✅ 验证卖家私钥
|
|
43
|
+
const validSellerPrivateKeys = sellerPrivateKeys.filter((pk) => isValidPrivateKey(pk));
|
|
44
|
+
if (validSellerPrivateKeys.length === 0) {
|
|
45
|
+
throw new Error('没有有效的卖家私钥');
|
|
46
|
+
}
|
|
47
|
+
const provider = getCachedProvider(config?.rpcUrl);
|
|
48
|
+
// ✅ 空字符串也使用默认值
|
|
49
|
+
const delegateAddress = (config?.delegateAddress && config.delegateAddress.trim()) || UNIFIED_DELEGATE_ADDRESS;
|
|
50
|
+
const delegateInterface = new ethers.Interface(UNIFIED_DELEGATE_ABI);
|
|
51
|
+
const portalInterface = new ethers.Interface(FLAP_PORTAL_ABI);
|
|
52
|
+
const actualRouter = routerAddress ?? getDefaultRouter(poolType);
|
|
53
|
+
// ✅ 创建 Payer 钱包(支付 Gas 费)
|
|
54
|
+
const mainWallet = createWallet(mainPrivateKey, provider);
|
|
55
|
+
// 创建钱包(使用验证后的私钥)
|
|
56
|
+
const buyerWallets = validBuyerPrivateKeys.map((pk) => createWallet(pk, provider));
|
|
57
|
+
const sellerWallets = validSellerPrivateKeys.map((pk) => createWallet(pk, provider));
|
|
58
|
+
// 合并所有钱包(去重,包括 mainWallet)
|
|
59
|
+
const allWalletsMap = new Map();
|
|
60
|
+
allWalletsMap.set(mainWallet.address.toLowerCase(), mainWallet);
|
|
61
|
+
buyerWallets.forEach((w) => allWalletsMap.set(w.address.toLowerCase(), w));
|
|
62
|
+
sellerWallets.forEach((w) => allWalletsMap.set(w.address.toLowerCase(), w));
|
|
63
|
+
const allWallets = Array.from(allWalletsMap.values());
|
|
64
|
+
// 找出 mainWallet 在 allWallets 中的索引
|
|
65
|
+
const mainWalletIndex = allWallets.findIndex((w) => w.address.toLowerCase() === mainWallet.address.toLowerCase());
|
|
66
|
+
// 计算买入金额(使用验证后的金额数组)
|
|
67
|
+
const buyAmountsWei = validBuyAmounts.map((amt) => ethers.parseEther(truncateDecimals(amt)));
|
|
68
|
+
const totalBuyAmount = buyAmountsWei.reduce((sum, amt) => sum + amt, 0n);
|
|
69
|
+
// ✅ 计算利润(捆绑刷量:买家数 + 卖家数 = 总交易数)
|
|
70
|
+
const totalTxCount = buyerWallets.length + sellerWallets.length;
|
|
71
|
+
const profitAmount = calculateProfitAmountByTxCount(totalBuyAmount, totalTxCount, userType);
|
|
72
|
+
const profitRecipient = getProfitRecipient(config);
|
|
73
|
+
// ========================================
|
|
74
|
+
// 并行获取数据
|
|
75
|
+
// ========================================
|
|
76
|
+
const allAddresses = allWallets.map((w) => w.address);
|
|
77
|
+
// 获取卖出钱包的代币余额(如果需要)
|
|
78
|
+
const needBalanceQuery = !sellAmounts || sellAmounts.length !== sellerWallets.length;
|
|
79
|
+
const tokenContract = needBalanceQuery && sellerWallets.length > 0 ? new ethers.Contract(tokenAddress, ERC20_ABI, provider) : null;
|
|
80
|
+
const [nonces, feeData, sellerBalancesRaw] = await Promise.all([
|
|
81
|
+
batchGetNonces(allAddresses, provider),
|
|
82
|
+
provider.getFeeData(),
|
|
83
|
+
needBalanceQuery && sellerWallets.length > 0 && tokenContract
|
|
84
|
+
? Promise.all(sellerWallets.map((w) => tokenContract.balanceOf(w.address)))
|
|
85
|
+
: Promise.resolve(null),
|
|
86
|
+
]);
|
|
87
|
+
// 计算卖出金额
|
|
88
|
+
let sellAmountsWei;
|
|
89
|
+
if (sellAmounts && sellAmounts.length === sellerWallets.length) {
|
|
90
|
+
// ✅ 如果有指定卖出金额,直接使用
|
|
91
|
+
sellAmountsWei = sellAmounts.map((amt) => ethers.parseUnits(truncateDecimals(amt, tokenDecimals), tokenDecimals));
|
|
92
|
+
}
|
|
93
|
+
else if (needBalanceQuery && sellerBalancesRaw) {
|
|
94
|
+
// ✅ 根据 poolType 预估买入能获得的代币数量
|
|
95
|
+
let estimatedTokenAmount = 0n;
|
|
96
|
+
try {
|
|
97
|
+
if (poolType === 'FLAP') {
|
|
98
|
+
// FLAP 内盘:使用 previewBuy,降级到 quoteExactInput
|
|
99
|
+
const portalContract = new ethers.Contract(FLAP_PORTAL_ADDRESS, FLAP_PORTAL_ABI, provider);
|
|
100
|
+
try {
|
|
101
|
+
estimatedTokenAmount = await portalContract.previewBuy(tokenAddress, totalBuyAmount);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
try {
|
|
105
|
+
estimatedTokenAmount = await portalContract.quoteBuy(tokenAddress, totalBuyAmount);
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
try {
|
|
109
|
+
estimatedTokenAmount = await portalContract.quoteExactInput.staticCall({
|
|
110
|
+
inputToken: ethers.ZeroAddress,
|
|
111
|
+
outputToken: tokenAddress,
|
|
112
|
+
inputAmount: totalBuyAmount,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
try {
|
|
117
|
+
const v2Router = new ethers.Contract(POTATOSWAP_V2_ROUTER, V2_ROUTER_ABI, provider);
|
|
118
|
+
const path = [WOKB_ADDRESS, tokenAddress];
|
|
119
|
+
const amounts = await v2Router.getAmountsOut(totalBuyAmount, path);
|
|
120
|
+
estimatedTokenAmount = amounts[amounts.length - 1];
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
// all quote paths failed
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else if (poolType === 'V2' || poolType === 'V3') {
|
|
130
|
+
// V2/V3 外盘:使用 Router 报价
|
|
131
|
+
const v2Router = new ethers.Contract(POTATOSWAP_V2_ROUTER, V2_ROUTER_ABI, provider);
|
|
132
|
+
const path = [WOKB_ADDRESS, tokenAddress];
|
|
133
|
+
try {
|
|
134
|
+
if (poolType === 'V2') {
|
|
135
|
+
const amounts = await v2Router.getAmountsOut(totalBuyAmount, path);
|
|
136
|
+
estimatedTokenAmount = amounts[amounts.length - 1];
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
// V3: 使用 V3 Quoter
|
|
140
|
+
const v3Quoter = new ethers.Contract('0x27d52F6D9Ed2eBb3E6a4c0Af6b1f5dc85A4d5b2C', [
|
|
141
|
+
'function quoteExactInputSingle((address tokenIn, address tokenOut, uint256 amountIn, uint24 fee, uint160 sqrtPriceLimitX96)) external returns (uint256 amountOut)',
|
|
142
|
+
], provider);
|
|
143
|
+
estimatedTokenAmount = await v3Quoter.quoteExactInputSingle.staticCall({
|
|
144
|
+
tokenIn: WOKB_ADDRESS,
|
|
145
|
+
tokenOut: tokenAddress,
|
|
146
|
+
amountIn: totalBuyAmount,
|
|
147
|
+
fee: fee,
|
|
148
|
+
sqrtPriceLimitX96: 0n,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
// pool quote failed
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
// quote estimate failed
|
|
159
|
+
}
|
|
160
|
+
// ✅ 修正卖出数量计算逻辑:卖出数额仅基于本次交易买入的代币预估值,忽略原有余额
|
|
161
|
+
const percentBigInt = BigInt(Math.min(100, Math.max(0, sellPercent)));
|
|
162
|
+
// 1. 初始化每个钱包的预期卖出数量为 0n
|
|
163
|
+
const walletSellAmounts = sellerWallets.map(() => 0n);
|
|
164
|
+
// 2. 将本次预估买入的代币分配给卖家
|
|
165
|
+
if (estimatedTokenAmount > 0n && totalBuyAmount > 0n && sellerWallets.length > 0) {
|
|
166
|
+
// ✅ 修正逻辑:将本次买入预估产生的总代币量随机分配给所有指定的卖家
|
|
167
|
+
const totalToSell = (estimatedTokenAmount * percentBigInt) / 100n;
|
|
168
|
+
if (sellerWallets.length === 1) {
|
|
169
|
+
walletSellAmounts[0] = totalToSell;
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
// ✅ 多卖家场景:随机权重分配 (50% - 150%),差异更明显
|
|
173
|
+
const weights = sellerWallets.map(() => 50 + Math.random() * 100);
|
|
174
|
+
const totalWeight = weights.reduce((sum, w) => sum + w, 0);
|
|
175
|
+
let allocated = 0n;
|
|
176
|
+
sellerWallets.forEach((_, i) => {
|
|
177
|
+
if (i === sellerWallets.length - 1) {
|
|
178
|
+
// 最后一个钱包分配剩余的全部(避免精度损失)
|
|
179
|
+
walletSellAmounts[i] = totalToSell - allocated;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const share = (totalToSell * BigInt(Math.round(weights[i] * 1000))) / BigInt(Math.round(totalWeight * 1000));
|
|
183
|
+
walletSellAmounts[i] = share;
|
|
184
|
+
allocated += share;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
// ✅ 修复:不再重复应用 sellPercent,因为 totalToSell 已经按 sellPercent 计算过了
|
|
190
|
+
sellAmountsWei = walletSellAmounts;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
// ✅ 即使没有余额查询结果,也初始化数组
|
|
194
|
+
sellAmountsWei = sellerWallets.map(() => 0n);
|
|
195
|
+
}
|
|
196
|
+
const totalSellAmount = sellAmountsWei.reduce((sum, amt) => sum + amt, 0n);
|
|
197
|
+
// ========================================
|
|
198
|
+
// 同步签署授权
|
|
199
|
+
// ========================================
|
|
200
|
+
const authorizations = signAuthorizationsWithNonces(allWallets, nonces, delegateAddress, mainWalletIndex);
|
|
201
|
+
// ========================================
|
|
202
|
+
// 构建调用
|
|
203
|
+
// ========================================
|
|
204
|
+
const calls = [];
|
|
205
|
+
// ✅ 修复:先执行买卖,最后执行利润转账(与 bundleBuy 调用顺序一致)
|
|
206
|
+
// 买入调用
|
|
207
|
+
for (let i = 0; i < buyerWallets.length; i++) {
|
|
208
|
+
const buyCall = buildBuyCall(buyerWallets[i], buyAmountsWei[i], tokenAddress, poolType, actualRouter, fee, delegateInterface, portalInterface);
|
|
209
|
+
calls.push(buyCall);
|
|
210
|
+
}
|
|
211
|
+
// 卖出调用
|
|
212
|
+
for (let i = 0; i < sellerWallets.length; i++) {
|
|
213
|
+
const amount = sellAmountsWei[i];
|
|
214
|
+
// ✅ 修复:即使 amount 为 0,只要 sellPercent 为 100,也应该尝试卖出全部,防止刷量缺失 Sell
|
|
215
|
+
if (amount <= 0n && sellPercent !== 100)
|
|
216
|
+
continue;
|
|
217
|
+
const sellCall = amount > 0n
|
|
218
|
+
? buildSellCallWithAmount(sellerWallets[i], amount, tokenAddress, poolType, actualRouter, fee, delegateInterface, portalInterface)
|
|
219
|
+
: buildSellCall(sellerWallets[i], 0n, // amount = 0n 配合 sellPercent = 100 会执行卖出全部
|
|
220
|
+
tokenAddress, sellPercent, tokenDecimals, poolType, actualRouter, fee, delegateInterface, portalInterface);
|
|
221
|
+
calls.push(sellCall);
|
|
222
|
+
}
|
|
223
|
+
// ✅ 修复:利润刮取从第一个卖方钱包扣取(卖出后有OKB)
|
|
224
|
+
// 使用 transferAmount 从钱包余额转账,不需要通过 msg.value
|
|
225
|
+
if (profitAmount > 0n && sellerWallets.length > 0) {
|
|
226
|
+
calls.push({
|
|
227
|
+
target: sellerWallets[0].address, // 从第一个卖方钱包扣利润
|
|
228
|
+
allowFailure: false,
|
|
229
|
+
value: 0n,
|
|
230
|
+
callData: delegateInterface.encodeFunctionData('transferAmount', [profitRecipient, profitAmount]),
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
// ========================================
|
|
234
|
+
// 构建交易
|
|
235
|
+
// ========================================
|
|
236
|
+
// ✅ 修复:利润使用 transferAmount 从钱包余额转账,不需要通过 msg.value
|
|
237
|
+
const totalValue = 0n;
|
|
238
|
+
const signedTransaction = buildEIP7702TransactionSync(mainWallet, authorizations, calls, totalValue, nonces[mainWalletIndex], feeData, config);
|
|
239
|
+
return {
|
|
240
|
+
signedTransaction,
|
|
241
|
+
metadata: {
|
|
242
|
+
buyerCount: buyerWallets.length,
|
|
243
|
+
sellerCount: sellerWallets.filter((_, i) => sellAmountsWei[i] > 0n).length,
|
|
244
|
+
totalBuyAmount: ethers.formatEther(totalBuyAmount),
|
|
245
|
+
totalSellAmount: ethers.formatUnits(totalSellAmount, tokenDecimals),
|
|
246
|
+
poolType,
|
|
247
|
+
profitAmount: ethers.formatEther(profitAmount),
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* volume 内部工具函数
|
|
3
|
+
*
|
|
4
|
+
* 供 volume-wash / volume-bundle 共享使用,不作为公共 API 导出。
|
|
5
|
+
*/
|
|
6
|
+
import { ethers, Wallet } from 'ethers';
|
|
7
|
+
import type { Call3Value } from './types.js';
|
|
8
|
+
import type { PoolType } from './volume-helpers.js';
|
|
9
|
+
export declare function getDefaultRouter(poolType: PoolType): string;
|
|
10
|
+
export declare function buildBuyCall(wallet: Wallet, amount: bigint, tokenAddress: string, poolType: PoolType, routerAddress: string, fee: number, delegateInterface: ethers.Interface, portalInterface: ethers.Interface): Call3Value;
|
|
11
|
+
export declare function buildSellCall(wallet: Wallet, amount: bigint, // ✅ 传入具体数量,用于非 100% 卖出时的占位或精确值
|
|
12
|
+
tokenAddress: string, sellPercent: number, tokenDecimals: number, poolType: PoolType, routerAddress: string, fee: number, delegateInterface: ethers.Interface, portalInterface: ethers.Interface): Call3Value;
|
|
13
|
+
export declare function buildSellCallWithAmount(wallet: Wallet, amount: bigint, tokenAddress: string, poolType: PoolType, routerAddress: string, fee: number, delegateInterface: ethers.Interface, portalInterface: ethers.Interface): Call3Value;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* volume 内部工具函数
|
|
3
|
+
*
|
|
4
|
+
* 供 volume-wash / volume-bundle 共享使用,不作为公共 API 导出。
|
|
5
|
+
*/
|
|
6
|
+
import { ethers } from 'ethers';
|
|
7
|
+
import { FLAP_PORTAL_ADDRESS, POTATOSWAP_V2_ROUTER, POTATOSWAP_V3_ROUTER, WOKB_ADDRESS, } from './constants.js';
|
|
8
|
+
export function getDefaultRouter(poolType) {
|
|
9
|
+
switch (poolType) {
|
|
10
|
+
case 'FLAP':
|
|
11
|
+
return FLAP_PORTAL_ADDRESS;
|
|
12
|
+
case 'V2':
|
|
13
|
+
return POTATOSWAP_V2_ROUTER;
|
|
14
|
+
case 'V3':
|
|
15
|
+
return POTATOSWAP_V3_ROUTER;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function buildBuyCall(wallet, amount, tokenAddress, poolType, routerAddress, fee, delegateInterface, portalInterface) {
|
|
19
|
+
switch (poolType) {
|
|
20
|
+
case 'FLAP': {
|
|
21
|
+
// ✅ 修复:使用 swapExactInput 代替 buy 函数,明确指定 inputAmount
|
|
22
|
+
// buy(token) 依赖 msg.value,当 value=0n 时会失败
|
|
23
|
+
const portalCallData = portalInterface.encodeFunctionData('swapExactInput', [
|
|
24
|
+
{
|
|
25
|
+
inputToken: ethers.ZeroAddress, // 0x0 = OKB (原生代币)
|
|
26
|
+
outputToken: tokenAddress,
|
|
27
|
+
inputAmount: amount,
|
|
28
|
+
minOutputAmount: 0n,
|
|
29
|
+
permitData: '0x',
|
|
30
|
+
},
|
|
31
|
+
]);
|
|
32
|
+
const batchCalls = [{ target: FLAP_PORTAL_ADDRESS, value: amount, data: portalCallData }];
|
|
33
|
+
return {
|
|
34
|
+
target: wallet.address,
|
|
35
|
+
allowFailure: false,
|
|
36
|
+
value: 0n,
|
|
37
|
+
callData: delegateInterface.encodeFunctionData('executeBatch', [batchCalls]),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
case 'V2': {
|
|
41
|
+
const path = [WOKB_ADDRESS, tokenAddress];
|
|
42
|
+
// ✅ 修复:value 设为 0n,让钱包使用自己余额买入;传入正确的 amount
|
|
43
|
+
return {
|
|
44
|
+
target: wallet.address,
|
|
45
|
+
allowFailure: false,
|
|
46
|
+
value: 0n,
|
|
47
|
+
callData: delegateInterface.encodeFunctionData('executeBuyV2', [routerAddress, path, amount]),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
case 'V3': {
|
|
51
|
+
// ✅ 修复:value 设为 0n,让钱包使用自己余额买入;传入正确的 amount
|
|
52
|
+
return {
|
|
53
|
+
target: wallet.address,
|
|
54
|
+
allowFailure: false,
|
|
55
|
+
value: 0n,
|
|
56
|
+
callData: delegateInterface.encodeFunctionData('executeBuy', [
|
|
57
|
+
routerAddress,
|
|
58
|
+
WOKB_ADDRESS,
|
|
59
|
+
tokenAddress,
|
|
60
|
+
fee,
|
|
61
|
+
amount,
|
|
62
|
+
]),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export function buildSellCall(wallet, amount, // ✅ 传入具体数量,用于非 100% 卖出时的占位或精确值
|
|
68
|
+
tokenAddress, sellPercent, tokenDecimals, poolType, routerAddress, fee, delegateInterface, portalInterface) {
|
|
69
|
+
// 使用 executeTransferAll 卖出全部(sellPercent=100)
|
|
70
|
+
// 或者使用 executeSell 指定百分比
|
|
71
|
+
switch (poolType) {
|
|
72
|
+
case 'FLAP': {
|
|
73
|
+
// ✅ 使用 swapExactInput 卖出(与 AA 模式保持一致)
|
|
74
|
+
// 注意:inputAmount=0 会失败,FLAP 需要先获取余额再调用
|
|
75
|
+
// 这里需要传入实际的代币余额,外层调用者应该提前查询
|
|
76
|
+
const portalCallData = portalInterface.encodeFunctionData('swapExactInput', [
|
|
77
|
+
{
|
|
78
|
+
inputToken: tokenAddress,
|
|
79
|
+
outputToken: ethers.ZeroAddress, // 0x0 = OKB
|
|
80
|
+
inputAmount: 1n, // 占位符,如果调用 buildSellCall 时不指定 amount,通常意味逻辑上有问题
|
|
81
|
+
minOutputAmount: 0n,
|
|
82
|
+
permitData: '0x',
|
|
83
|
+
},
|
|
84
|
+
]);
|
|
85
|
+
const batchCalls = [{ target: FLAP_PORTAL_ADDRESS, value: 0n, data: portalCallData }];
|
|
86
|
+
return {
|
|
87
|
+
target: wallet.address,
|
|
88
|
+
allowFailure: false,
|
|
89
|
+
value: 0n,
|
|
90
|
+
callData: delegateInterface.encodeFunctionData('executeBatch', [batchCalls]),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
case 'V2': {
|
|
94
|
+
const path = [tokenAddress, WOKB_ADDRESS];
|
|
95
|
+
// ✅ 修复:传入实际数量,避免卖出全部
|
|
96
|
+
return {
|
|
97
|
+
target: wallet.address,
|
|
98
|
+
allowFailure: false,
|
|
99
|
+
value: 0n,
|
|
100
|
+
callData: delegateInterface.encodeFunctionData('executeSellV2', [
|
|
101
|
+
routerAddress,
|
|
102
|
+
path,
|
|
103
|
+
sellPercent === 100 ? 0 : amount,
|
|
104
|
+
]),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
case 'V3': {
|
|
108
|
+
// ✅ 修复:传入实际数量,避免卖出全部
|
|
109
|
+
return {
|
|
110
|
+
target: wallet.address,
|
|
111
|
+
allowFailure: false,
|
|
112
|
+
value: 0n,
|
|
113
|
+
callData: delegateInterface.encodeFunctionData('executeSell', [
|
|
114
|
+
routerAddress,
|
|
115
|
+
tokenAddress,
|
|
116
|
+
WOKB_ADDRESS,
|
|
117
|
+
fee,
|
|
118
|
+
sellPercent === 100 ? 0 : amount,
|
|
119
|
+
]),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export function buildSellCallWithAmount(wallet, amount, tokenAddress, poolType, routerAddress, fee, delegateInterface, portalInterface) {
|
|
125
|
+
switch (poolType) {
|
|
126
|
+
case 'FLAP': {
|
|
127
|
+
// ✅ 使用 swapExactInput 卖出(与 AA 模式保持一致)
|
|
128
|
+
const portalCallData = portalInterface.encodeFunctionData('swapExactInput', [
|
|
129
|
+
{
|
|
130
|
+
inputToken: tokenAddress,
|
|
131
|
+
outputToken: ethers.ZeroAddress, // 0x0 = OKB
|
|
132
|
+
inputAmount: amount,
|
|
133
|
+
minOutputAmount: 0n,
|
|
134
|
+
permitData: '0x',
|
|
135
|
+
},
|
|
136
|
+
]);
|
|
137
|
+
const batchCalls = [{ target: FLAP_PORTAL_ADDRESS, value: 0n, data: portalCallData }];
|
|
138
|
+
return {
|
|
139
|
+
target: wallet.address,
|
|
140
|
+
allowFailure: false,
|
|
141
|
+
value: 0n,
|
|
142
|
+
callData: delegateInterface.encodeFunctionData('executeBatch', [batchCalls]),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
case 'V2': {
|
|
146
|
+
const path = [tokenAddress, WOKB_ADDRESS];
|
|
147
|
+
return {
|
|
148
|
+
target: wallet.address,
|
|
149
|
+
allowFailure: false,
|
|
150
|
+
value: 0n,
|
|
151
|
+
callData: delegateInterface.encodeFunctionData('executeSellV2', [routerAddress, path, amount]),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
case 'V3': {
|
|
155
|
+
return {
|
|
156
|
+
target: wallet.address,
|
|
157
|
+
allowFailure: false,
|
|
158
|
+
value: 0n,
|
|
159
|
+
callData: delegateInterface.encodeFunctionData('executeSell', [
|
|
160
|
+
routerAddress,
|
|
161
|
+
tokenAddress,
|
|
162
|
+
WOKB_ADDRESS,
|
|
163
|
+
fee,
|
|
164
|
+
amount,
|
|
165
|
+
]),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 多轮刷量
|
|
3
|
+
*
|
|
4
|
+
* 由于 nonce 限制,仅预生成第一轮
|
|
5
|
+
*/
|
|
6
|
+
import type { MakeVolumeParams, MakeVolumeSignResult } from './volume-helpers.js';
|
|
7
|
+
/** 生成多轮刷量签名(由于 nonce 限制,仅预生成第一轮) */
|
|
8
|
+
export declare function makeVolume(params: MakeVolumeParams): Promise<MakeVolumeSignResult>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 多轮刷量
|
|
3
|
+
*
|
|
4
|
+
* 由于 nonce 限制,仅预生成第一轮
|
|
5
|
+
*/
|
|
6
|
+
import { singleRoundVolume } from './volume-single-round.js';
|
|
7
|
+
import { V3_FEE_TIERS } from './constants.js';
|
|
8
|
+
/** 生成多轮刷量签名(由于 nonce 限制,仅预生成第一轮) */
|
|
9
|
+
export async function makeVolume(params) {
|
|
10
|
+
const { privateKeys, tokenAddress, tokenDecimals = 18, buyAmountPerRound, rounds, tradeType = 'V3', routerAddress, fee = V3_FEE_TIERS.MEDIUM, onProgress, config, } = params;
|
|
11
|
+
const buyAmountPerWallet = (parseFloat(buyAmountPerRound) / privateKeys.length).toString();
|
|
12
|
+
const roundResults = [];
|
|
13
|
+
// 只生成第一轮签名
|
|
14
|
+
const firstRound = await singleRoundVolume({
|
|
15
|
+
privateKeys,
|
|
16
|
+
tokenAddress,
|
|
17
|
+
tokenDecimals,
|
|
18
|
+
buyAmountPerWallet,
|
|
19
|
+
tradeType,
|
|
20
|
+
routerAddress,
|
|
21
|
+
fee,
|
|
22
|
+
config,
|
|
23
|
+
});
|
|
24
|
+
roundResults.push(firstRound);
|
|
25
|
+
onProgress?.({
|
|
26
|
+
currentRound: 1,
|
|
27
|
+
totalRounds: rounds,
|
|
28
|
+
status: 'completed',
|
|
29
|
+
});
|
|
30
|
+
return {
|
|
31
|
+
rounds: roundResults,
|
|
32
|
+
metadata: {
|
|
33
|
+
totalRounds: rounds,
|
|
34
|
+
totalBuyAmount: (parseFloat(buyAmountPerRound) * rounds).toString(),
|
|
35
|
+
walletCount: privateKeys.length,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 单轮刷量(买入+卖出分开签名)
|
|
3
|
+
*/
|
|
4
|
+
import type { TradeType, EIP7702Config } from './types.js';
|
|
5
|
+
import type { SingleRoundVolumeResult } from './volume-helpers.js';
|
|
6
|
+
/** 生成单轮刷量签名(买入 + 卖出分开,两笔独立交易) */
|
|
7
|
+
export declare function singleRoundVolume(params: {
|
|
8
|
+
privateKeys: string[];
|
|
9
|
+
tokenAddress: string;
|
|
10
|
+
tokenDecimals?: number;
|
|
11
|
+
buyAmountPerWallet: string;
|
|
12
|
+
sellPercent?: number;
|
|
13
|
+
tradeType?: TradeType;
|
|
14
|
+
routerAddress?: string;
|
|
15
|
+
fee?: number;
|
|
16
|
+
config?: EIP7702Config;
|
|
17
|
+
}): Promise<SingleRoundVolumeResult>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 单轮刷量(买入+卖出分开签名)
|
|
3
|
+
*/
|
|
4
|
+
import { bundleBuy } from './bundle-buy.js';
|
|
5
|
+
import { bundleSell } from './bundle-sell.js';
|
|
6
|
+
import { V3_FEE_TIERS } from './constants.js';
|
|
7
|
+
/** 生成单轮刷量签名(买入 + 卖出分开,两笔独立交易) */
|
|
8
|
+
export async function singleRoundVolume(params) {
|
|
9
|
+
const { privateKeys, tokenAddress, tokenDecimals = 18, buyAmountPerWallet, sellPercent = 100, tradeType = 'V3', routerAddress, fee = V3_FEE_TIERS.MEDIUM, config, } = params;
|
|
10
|
+
const mainPrivateKey = privateKeys[0];
|
|
11
|
+
// 并行生成买入和卖出签名
|
|
12
|
+
const [buyResult, sellResult] = await Promise.all([
|
|
13
|
+
bundleBuy({
|
|
14
|
+
mainPrivateKey,
|
|
15
|
+
privateKeys,
|
|
16
|
+
buyAmounts: privateKeys.map(() => buyAmountPerWallet),
|
|
17
|
+
tokenAddress,
|
|
18
|
+
tradeType,
|
|
19
|
+
routerAddress,
|
|
20
|
+
fee,
|
|
21
|
+
config,
|
|
22
|
+
}),
|
|
23
|
+
bundleSell({
|
|
24
|
+
mainPrivateKey,
|
|
25
|
+
privateKeys,
|
|
26
|
+
sellPercent,
|
|
27
|
+
tokenAddress,
|
|
28
|
+
tokenDecimals,
|
|
29
|
+
tradeType,
|
|
30
|
+
routerAddress,
|
|
31
|
+
fee,
|
|
32
|
+
config,
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
35
|
+
return {
|
|
36
|
+
buySignedTransaction: buyResult.signedTransaction,
|
|
37
|
+
sellSignedTransaction: sellResult.signedTransaction,
|
|
38
|
+
metadata: {
|
|
39
|
+
buyAmount: buyAmountPerWallet,
|
|
40
|
+
sellPercent,
|
|
41
|
+
walletCount: privateKeys.length,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 换手刷量
|
|
3
|
+
*/
|
|
4
|
+
import type { TradeType, EIP7702Config } from './types.js';
|
|
5
|
+
import type { SwapVolumeSignResult } from './volume-helpers.js';
|
|
6
|
+
/** 生成换手刷量签名 */
|
|
7
|
+
export declare function makeVolumeWithSwap(params: {
|
|
8
|
+
sellerPrivateKey: string;
|
|
9
|
+
buyerPrivateKey: string;
|
|
10
|
+
tokenAddress: string;
|
|
11
|
+
tokenDecimals?: number;
|
|
12
|
+
sellAmount: string;
|
|
13
|
+
hopCount?: number;
|
|
14
|
+
tradeType?: TradeType;
|
|
15
|
+
routerAddress?: string;
|
|
16
|
+
fee?: number;
|
|
17
|
+
config?: EIP7702Config;
|
|
18
|
+
}): Promise<SwapVolumeSignResult>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 换手刷量
|
|
3
|
+
*/
|
|
4
|
+
import { bundleSwap } from './bundle-swap.js';
|
|
5
|
+
import { V3_FEE_TIERS } from './constants.js';
|
|
6
|
+
/** 生成换手刷量签名 */
|
|
7
|
+
export async function makeVolumeWithSwap(params) {
|
|
8
|
+
const { sellerPrivateKey, buyerPrivateKey, tokenAddress, tokenDecimals = 18, sellAmount, hopCount = 2, tradeType = 'V3', routerAddress, fee = V3_FEE_TIERS.MEDIUM, config, } = params;
|
|
9
|
+
const result = await bundleSwap({
|
|
10
|
+
sellerPrivateKey,
|
|
11
|
+
buyerPrivateKey,
|
|
12
|
+
tokenAddress,
|
|
13
|
+
tokenDecimals,
|
|
14
|
+
sellAmount,
|
|
15
|
+
hopCount,
|
|
16
|
+
tradeType,
|
|
17
|
+
routerAddress,
|
|
18
|
+
fee,
|
|
19
|
+
config,
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
signedTransaction: result.signedTransaction,
|
|
23
|
+
hopWallets: result.hopWallets || [],
|
|
24
|
+
metadata: {
|
|
25
|
+
sellerAddress: result.metadata.sellerAddress,
|
|
26
|
+
buyerAddress: result.metadata.buyerAddresses[0],
|
|
27
|
+
sellAmount: result.metadata.sellAmount,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EIP-7702 无币刷量 (Wash Mode)
|
|
3
|
+
*
|
|
4
|
+
* 每个钱包执行买入 + 卖出,不需要预先持有代币
|
|
5
|
+
* 只生成签名,由调用方决定如何提交
|
|
6
|
+
*/
|
|
7
|
+
import { type WashVolumeParams, type WashVolumeResult } from './volume-helpers.js';
|
|
8
|
+
export declare function washVolume(params: WashVolumeParams): Promise<WashVolumeResult>;
|