four-flap-meme-sdk 2.2.2 → 2.2.3
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/README.en.md +41 -6
- package/README.md +31 -0
- package/README.zh-CN.md +41 -6
- package/dist/__tests__/subpath-exports.test.d.ts +1 -0
- package/dist/__tests__/subpath-exports.test.js +64 -0
- package/dist/abis/common.d.ts +85 -0
- package/dist/abis/common.js +264 -0
- package/dist/abis/contracts/TaxToken.json +969 -0
- package/dist/abis/contracts/TokenManager2.json +136 -0
- package/dist/abis/contracts/index.d.ts +5 -0
- package/dist/abis/contracts/index.js +5 -0
- package/dist/abis/flap/index.d.ts +3 -0
- package/dist/abis/flap/index.js +3 -0
- package/dist/abis/flap/portal-events.d.ts +6 -0
- package/dist/abis/flap/portal-events.js +17 -0
- package/dist/abis/flap/portal.d.ts +6 -0
- package/dist/abis/flap/portal.js +37 -0
- package/dist/abis/flap/vault.d.ts +171 -0
- package/dist/abis/flap/vault.js +91 -0
- package/dist/abis/index.d.ts +8 -0
- package/dist/abis/index.js +11 -0
- package/dist/bundle-core/__tests__/config-helpers.test.d.ts +1 -0
- package/dist/bundle-core/__tests__/config-helpers.test.js +28 -0
- package/dist/bundle-core/__tests__/facade-parity.test.d.ts +1 -0
- package/dist/bundle-core/__tests__/facade-parity.test.js +33 -0
- package/dist/bundle-core/__tests__/sign-context-helpers.test.d.ts +1 -0
- package/dist/bundle-core/__tests__/sign-context-helpers.test.js +60 -0
- package/dist/bundle-core/__tests__/sign-fixture.test.d.ts +1 -0
- package/dist/bundle-core/__tests__/sign-fixture.test.js +220 -0
- package/dist/bundle-core/__tests__/sign-fixtures.d.ts +10 -0
- package/dist/bundle-core/__tests__/sign-fixtures.js +16 -0
- package/dist/bundle-core/config-helpers.d.ts +36 -0
- package/dist/bundle-core/config-helpers.js +57 -0
- package/dist/bundle-core/errors.d.ts +50 -0
- package/dist/bundle-core/errors.js +35 -0
- package/dist/bundle-core/four-meme/approve-tokenmanager.d.ts +7 -0
- package/dist/bundle-core/four-meme/approve-tokenmanager.js +99 -0
- package/dist/bundle-core/four-meme/core-helpers.d.ts +8 -0
- package/dist/bundle-core/four-meme/core-helpers.js +40 -0
- package/dist/bundle-core/four-meme/core.d.ts +4 -0
- package/dist/bundle-core/four-meme/core.js +515 -0
- package/dist/bundle-core/four-meme/pancake-proxy.d.ts +28 -0
- package/dist/bundle-core/four-meme/pancake-proxy.js +679 -0
- package/dist/bundle-core/four-meme/private.d.ts +27 -0
- package/dist/bundle-core/four-meme/private.js +465 -0
- package/dist/bundle-core/four-meme/sign-context-helpers.d.ts +2 -0
- package/dist/bundle-core/four-meme/sign-context-helpers.js +2 -0
- package/dist/bundle-core/four-meme/swap-buy-first.d.ts +8 -0
- package/dist/bundle-core/four-meme/swap-buy-first.js +493 -0
- package/dist/bundle-core/four-meme/swap-hop-helpers.d.ts +6 -0
- package/dist/bundle-core/four-meme/swap-hop-helpers.js +63 -0
- package/dist/bundle-core/four-meme/swap-internal.d.ts +3 -0
- package/dist/bundle-core/four-meme/swap-internal.js +18 -0
- package/dist/bundle-core/four-meme/swap-sign-helpers.d.ts +27 -0
- package/dist/bundle-core/four-meme/swap-sign-helpers.js +105 -0
- package/dist/bundle-core/four-meme/swap.d.ts +17 -0
- package/dist/bundle-core/four-meme/swap.js +505 -0
- package/dist/bundle-core/four-meme/types/buy-first.d.ts +50 -0
- package/dist/bundle-core/four-meme/types/buy-first.js +1 -0
- package/dist/bundle-core/four-meme/types/core-flow.d.ts +63 -0
- package/dist/bundle-core/four-meme/types/core-flow.js +1 -0
- package/dist/bundle-core/four-meme/types/index.d.ts +600 -0
- package/dist/bundle-core/four-meme/types/index.js +1 -0
- package/dist/bundle-core/four-meme/types/swap-internal.d.ts +19 -0
- package/dist/bundle-core/four-meme/types/swap-internal.js +1 -0
- package/dist/bundle-core/four-meme/types.d.ts +1 -0
- package/dist/bundle-core/four-meme/types.js +1 -0
- package/dist/bundle-core/four-meme/utils-disperse.d.ts +7 -0
- package/dist/bundle-core/four-meme/utils-disperse.js +396 -0
- package/dist/bundle-core/four-meme/utils-pairwise.d.ts +8 -0
- package/dist/bundle-core/four-meme/utils-pairwise.js +328 -0
- package/dist/bundle-core/four-meme/utils-sweep.d.ts +8 -0
- package/dist/bundle-core/four-meme/utils-sweep.js +744 -0
- package/dist/bundle-core/index.d.ts +8 -0
- package/dist/bundle-core/index.js +8 -0
- package/dist/bundle-core/internal.d.ts +21 -0
- package/dist/bundle-core/internal.js +182 -0
- package/dist/bundle-core/sign-context-helpers.d.ts +25 -0
- package/dist/bundle-core/sign-context-helpers.js +67 -0
- package/dist/bundle-core/submit.d.ts +293 -0
- package/dist/bundle-core/submit.js +727 -0
- package/dist/bundle-core/types/index.d.ts +8 -0
- package/dist/bundle-core/types/index.js +1 -0
- package/dist/bundle-core/types.d.ts +1 -0
- package/dist/bundle-core/types.js +1 -0
- package/dist/chains/bsc/four/approve-tokenmanager.d.ts +1 -26
- package/dist/chains/bsc/four/approve-tokenmanager.js +1 -113
- package/dist/chains/bsc/four/config.d.ts +5 -67
- package/dist/chains/bsc/four/config.js +2 -114
- package/dist/chains/bsc/four/core.d.ts +1 -4
- package/dist/chains/bsc/four/core.js +1 -592
- package/dist/chains/bsc/four/index.d.ts +6 -6
- package/dist/chains/bsc/four/index.js +6 -6
- package/dist/chains/bsc/four/internal.d.ts +2 -46
- package/dist/chains/bsc/four/internal.js +2 -239
- package/dist/chains/bsc/four/pancake-proxy.d.ts +1 -28
- package/dist/chains/bsc/four/pancake-proxy.js +1 -687
- package/dist/chains/bsc/four/private.d.ts +1 -27
- package/dist/chains/bsc/four/private.js +1 -477
- package/dist/chains/bsc/four/submit.d.ts +2 -315
- package/dist/chains/bsc/four/submit.js +2 -752
- package/dist/chains/bsc/four/swap-buy-first.d.ts +2 -55
- package/dist/chains/bsc/four/swap-buy-first.js +2 -507
- package/dist/chains/bsc/four/swap-internal.d.ts +1 -3
- package/dist/chains/bsc/four/swap-internal.js +1 -18
- package/dist/chains/bsc/four/swap.d.ts +2 -144
- package/dist/chains/bsc/four/swap.js +2 -766
- package/dist/chains/bsc/four/types.d.ts +1 -476
- package/dist/chains/bsc/four/utils-disperse.d.ts +1 -0
- package/dist/chains/bsc/four/utils-disperse.js +1 -0
- package/dist/chains/bsc/four/utils-pairwise.d.ts +1 -0
- package/dist/chains/bsc/four/utils-pairwise.js +1 -0
- package/dist/chains/bsc/four/utils-sweep.d.ts +1 -0
- package/dist/chains/bsc/four/utils-sweep.js +1 -0
- package/dist/chains/bsc/four/utils.d.ts +5 -18
- package/dist/chains/bsc/four/utils.js +5 -1552
- package/dist/chains/bsc/iro.d.ts +5 -0
- package/dist/chains/bsc/iro.js +4 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.d.ts +159 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +117 -0
- package/dist/chains/bsc/pancake/bundle-buy-first.d.ts +1 -91
- package/dist/chains/bsc/pancake/bundle-buy-first.js +97 -212
- package/dist/chains/bsc/pancake/bundle-swap-helpers.d.ts +241 -0
- package/dist/chains/bsc/pancake/bundle-swap-helpers.js +565 -0
- package/dist/chains/bsc/pancake/bundle-swap.d.ts +1 -79
- package/dist/chains/bsc/pancake/bundle-swap.js +114 -726
- package/dist/chains/bsc/pancake/index.d.ts +4 -2
- package/dist/chains/bsc/pancake/index.js +1 -3
- package/dist/chains/bsc/platforms/iro/factory.d.ts +2 -2
- package/dist/chains/bsc/platforms/iro/factory.js +3 -1
- package/dist/chains/bsc/platforms/iro/index.d.ts +5 -5
- package/dist/chains/bsc/platforms/iro/index.js +3 -3
- package/dist/chains/bsc/platforms/iro/pool.js +31 -10
- package/dist/chains/bsc/platforms/iro/token.js +4 -1
- package/dist/chains/eni/batch-router/bundle-approve.js +4 -3
- package/dist/chains/eni/batch-router/transfer.js +55 -25
- package/dist/chains/eni/batch-router/utils.js +32 -6
- package/dist/chains/eni/bundler/sign.js +5 -6
- package/dist/chains/eni/bundler/submit.js +1 -4
- package/dist/chains/eni/constants.js +1 -1
- package/dist/chains/eni/flat-aliases.d.ts +10 -0
- package/dist/chains/eni/flat-aliases.js +8 -0
- package/dist/chains/eni/index.d.ts +2 -1
- package/dist/chains/eni/index.js +1 -0
- package/dist/chains/eni/platforms/daoaas/create.js +2 -2
- package/dist/chains/eni/platforms/daoaas/index.d.ts +3 -3
- package/dist/chains/eni/platforms/daoaas/index.js +3 -3
- package/dist/chains/eni/platforms/daoaas/meta.js +9 -6
- package/dist/chains/eni/platforms/daoaas/portal-direct.js +28 -44
- package/dist/chains/eni/platforms/daoaas/portal.js +10 -6
- package/dist/chains/eni/platforms/dswap/liquidity.js +58 -26
- package/dist/chains/eni/platforms/fair-launch/index.d.ts +2 -2
- package/dist/chains/eni/platforms/fair-launch/index.js +1 -1
- package/dist/chains/eni/platforms/fair-launch/launcher.js +87 -46
- package/dist/chains/eni/platforms/fair-launch/pool.js +4 -1
- package/dist/chains/eni/platforms/fair-launch/presets.js +2 -2
- package/dist/chains/eni/platforms/iro/factory.d.ts +2 -2
- package/dist/chains/eni/platforms/iro/factory.js +3 -1
- package/dist/chains/eni/platforms/iro/index.d.ts +6 -6
- package/dist/chains/eni/platforms/iro/index.js +4 -4
- package/dist/chains/eni/platforms/iro/pool.js +90 -26
- package/dist/chains/eni/platforms/iro/token.js +107 -31
- package/dist/chains/eni/platforms/iro/whitelist.js +6 -18
- package/dist/chains/eni/submit.d.ts +43 -0
- package/dist/chains/eni/submit.js +286 -0
- package/dist/chains/index.d.ts +13 -0
- package/dist/chains/index.js +13 -0
- package/dist/chains/xlayer/eip7702/bundle-approve.d.ts +2 -26
- package/dist/chains/xlayer/eip7702/bundle-approve.js +11 -21
- package/dist/chains/xlayer/eip7702/bundle-buy.d.ts +2 -6
- package/dist/chains/xlayer/eip7702/bundle-buy.js +13 -51
- package/dist/chains/xlayer/eip7702/bundle-create.js +93 -59
- package/dist/chains/xlayer/eip7702/bundle-sell.d.ts +2 -6
- package/dist/chains/xlayer/eip7702/bundle-sell.js +29 -111
- package/dist/chains/xlayer/eip7702/bundle-swap.d.ts +3 -65
- package/dist/chains/xlayer/eip7702/bundle-swap.js +51 -245
- package/dist/chains/xlayer/eip7702/constants.d.ts +1 -16
- package/dist/chains/xlayer/eip7702/constants.js +3 -21
- package/dist/chains/xlayer/eip7702/flat-aliases.d.ts +13 -0
- package/dist/chains/xlayer/eip7702/flat-aliases.js +10 -0
- package/dist/chains/xlayer/eip7702/index.d.ts +28 -46
- package/dist/chains/xlayer/eip7702/index.js +28 -81
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-helpers.d.ts +79 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-helpers.js +1 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.d.ts +2 -203
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.js +63 -307
- package/dist/chains/xlayer/eip7702/transfer-context-helpers.d.ts +26 -0
- package/dist/chains/xlayer/eip7702/transfer-context-helpers.js +57 -0
- package/dist/chains/xlayer/eip7702/types.d.ts +88 -0
- package/dist/chains/xlayer/eip7702/utils.d.ts +0 -3
- package/dist/chains/xlayer/eip7702/utils.js +23 -28
- package/dist/chains/xlayer/eip7702/volume-helpers.d.ts +148 -0
- package/dist/chains/xlayer/eip7702/volume-helpers.js +48 -0
- package/dist/chains/xlayer/eip7702/volume.d.ts +6 -184
- package/dist/chains/xlayer/eip7702/volume.js +89 -164
- package/dist/chains/xlayer/eoa/constants.js +1 -1
- package/dist/chains/xlayer/eoa/dex-helpers.js +5 -5
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.d.ts +126 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.js +228 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.d.ts +1 -95
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.js +66 -299
- package/dist/chains/xlayer/eoa/eoa-wash-volume.d.ts +1 -1
- package/dist/chains/xlayer/eoa/eoa-wash-volume.js +18 -23
- package/dist/chains/xlayer/eoa/index.d.ts +10 -6
- package/dist/chains/xlayer/eoa/index.js +8 -23
- package/dist/chains/xlayer/eoa/portal-ops.js +7 -2
- package/dist/chains/xlayer/eoa/router-manager.js +3 -3
- package/dist/chains/xlayer/eoa/types.d.ts +2 -2
- package/dist/chains/xlayer/eoa/types.js +1 -3
- package/dist/chains/xlayer/index.d.ts +3 -2
- package/dist/chains/xlayer/index.js +4 -7
- package/dist/contracts/helper3.d.ts +20 -5
- package/dist/contracts/helper3.js +56 -20
- package/dist/contracts/tm-bundle-helpers.d.ts +88 -0
- package/dist/contracts/tm-bundle-helpers.js +72 -0
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.d.ts +1 -26
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.js +1 -113
- package/dist/contracts/tm-bundle-merkle/config.d.ts +5 -67
- package/dist/contracts/tm-bundle-merkle/config.js +2 -114
- package/dist/contracts/tm-bundle-merkle/core.d.ts +1 -4
- package/dist/contracts/tm-bundle-merkle/core.js +1 -591
- package/dist/contracts/tm-bundle-merkle/index.d.ts +5 -5
- package/dist/contracts/tm-bundle-merkle/index.js +5 -5
- package/dist/contracts/tm-bundle-merkle/internal.d.ts +2 -46
- package/dist/contracts/tm-bundle-merkle/internal.js +2 -238
- package/dist/contracts/tm-bundle-merkle/pancake-proxy.d.ts +1 -28
- package/dist/contracts/tm-bundle-merkle/pancake-proxy.js +1 -686
- package/dist/contracts/tm-bundle-merkle/private.d.ts +1 -27
- package/dist/contracts/tm-bundle-merkle/private.js +1 -476
- package/dist/contracts/tm-bundle-merkle/submit.d.ts +3 -314
- package/dist/contracts/tm-bundle-merkle/submit.js +3 -928
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.d.ts +2 -55
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.js +2 -506
- package/dist/contracts/tm-bundle-merkle/swap-internal.d.ts +1 -3
- package/dist/contracts/tm-bundle-merkle/swap-internal.js +1 -18
- package/dist/contracts/tm-bundle-merkle/swap.d.ts +2 -144
- package/dist/contracts/tm-bundle-merkle/swap.js +2 -764
- package/dist/contracts/tm-bundle-merkle/types.d.ts +1 -476
- package/dist/contracts/tm-bundle-merkle/utils-disperse.d.ts +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-disperse.js +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-pairwise.d.ts +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-pairwise.js +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-sweep.d.ts +1 -0
- package/dist/contracts/tm-bundle-merkle/utils-sweep.js +1 -0
- package/dist/contracts/tm-bundle-merkle/utils.d.ts +6 -18
- package/dist/contracts/tm-bundle-merkle/utils.js +6 -1501
- package/dist/contracts/tm-bundle.d.ts +3 -51
- package/dist/contracts/tm-bundle.js +108 -177
- package/dist/contracts/tm.d.ts +3 -2
- package/dist/contracts/tm.js +37 -32
- package/dist/contracts/tm1.js +9 -4
- package/dist/contracts/tm2.js +9 -4
- package/dist/dex/direct-router-helpers.d.ts +264 -0
- package/dist/dex/direct-router-helpers.js +539 -0
- package/dist/dex/direct-router.d.ts +3 -125
- package/dist/dex/direct-router.js +237 -666
- package/dist/dex/types.d.ts +81 -0
- package/dist/dex/types.js +1 -0
- package/dist/exports/root-bundle-and-tooling.d.ts +27 -0
- package/dist/exports/root-bundle-and-tooling.js +30 -0
- package/dist/exports/root-eni-and-bsc-iro.d.ts +26 -0
- package/dist/exports/root-eni-and-bsc-iro.js +66 -0
- package/dist/exports/root-foundations.d.ts +35 -0
- package/dist/exports/root-foundations.js +70 -0
- package/dist/exports/root-swap-dex-and-xlayer.d.ts +30 -0
- package/dist/exports/root-swap-dex-and-xlayer.js +78 -0
- package/dist/flap/index.d.ts +10 -0
- package/dist/flap/index.js +8 -0
- package/dist/flows/create.d.ts +2 -1
- package/dist/flows/create.js +6 -6
- package/dist/flows/index.d.ts +1 -0
- package/dist/flows/index.js +1 -0
- package/dist/index.d.ts +20 -85
- package/dist/index.js +20 -215
- package/dist/merkle/index.d.ts +12 -0
- package/dist/merkle/index.js +11 -0
- package/dist/shared/abis/common.d.ts +2 -83
- package/dist/shared/abis/common.js +2 -252
- package/dist/shared/abis/index.d.ts +5 -6
- package/dist/shared/abis/index.js +5 -7
- package/dist/shared/clients/blockrazor.js +39 -25
- package/dist/shared/clients/club48.d.ts +2 -2
- package/dist/shared/clients/club48.js +34 -29
- package/dist/shared/clients/emitservice.js +2 -0
- package/dist/shared/clients/four.d.ts +21 -6
- package/dist/shared/clients/four.js +29 -24
- package/dist/shared/clients/index.d.ts +8 -0
- package/dist/shared/clients/index.js +8 -0
- package/dist/shared/clients/merkle.js +27 -34
- package/dist/shared/constants/addresses.d.ts +1 -1
- package/dist/shared/constants/addresses.js +11 -2
- package/dist/shared/constants/chains.d.ts +1 -1
- package/dist/shared/constants/chains.js +1 -1
- package/dist/shared/constants/gas.d.ts +1 -1
- package/dist/shared/constants/gas.js +2 -6
- package/dist/shared/constants/index.d.ts +3 -0
- package/dist/shared/constants/index.js +1 -0
- package/dist/shared/constants/quote.d.ts +30 -0
- package/dist/shared/constants/quote.js +37 -0
- package/dist/shared/flap/abi.js +1 -1
- package/dist/shared/flap/constants.d.ts +1 -2
- package/dist/shared/flap/constants.js +2 -3
- package/dist/shared/flap/curve.js +3 -0
- package/dist/shared/flap/errors.d.ts +1 -4
- package/dist/shared/flap/errors.js +20 -1
- package/dist/shared/flap/index.d.ts +5 -4
- package/dist/shared/flap/index.js +5 -4
- package/dist/shared/flap/meta.d.ts +22 -18
- package/dist/shared/flap/meta.js +12 -17
- package/dist/shared/flap/permit.js +5 -2
- package/dist/shared/flap/pinata.d.ts +22 -6
- package/dist/shared/flap/pinata.js +21 -26
- package/dist/shared/flap/portal-bundle-merkle/config.d.ts +3 -72
- package/dist/shared/flap/portal-bundle-merkle/config.js +4 -124
- package/dist/shared/flap/portal-bundle-merkle/core-helpers.d.ts +32 -0
- package/dist/shared/flap/portal-bundle-merkle/core-helpers.js +83 -0
- package/dist/shared/flap/portal-bundle-merkle/core.d.ts +0 -4
- package/dist/shared/flap/portal-bundle-merkle/core.js +86 -278
- package/dist/shared/flap/portal-bundle-merkle/create-to-dex.d.ts +7 -2
- package/dist/shared/flap/portal-bundle-merkle/create-to-dex.js +101 -206
- package/dist/shared/flap/portal-bundle-merkle/curve-to-dex.js +100 -92
- package/dist/shared/flap/portal-bundle-merkle/index.d.ts +11 -7
- package/dist/shared/flap/portal-bundle-merkle/index.js +4 -7
- package/dist/shared/flap/portal-bundle-merkle/pancake-proxy.js +71 -68
- package/dist/shared/flap/portal-bundle-merkle/private.js +61 -114
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +125 -0
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first-helpers.js +113 -0
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first.d.ts +1 -64
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first.js +66 -247
- package/dist/shared/flap/portal-bundle-merkle/swap-helpers.d.ts +149 -0
- package/dist/shared/flap/portal-bundle-merkle/swap-helpers.js +259 -0
- package/dist/shared/flap/portal-bundle-merkle/swap.d.ts +2 -71
- package/dist/shared/flap/portal-bundle-merkle/swap.js +103 -410
- package/dist/shared/flap/portal-bundle-merkle/types.d.ts +83 -9
- package/dist/shared/flap/portal-bundle-merkle/utils.d.ts +1 -80
- package/dist/shared/flap/portal-bundle-merkle/utils.js +145 -265
- package/dist/shared/flap/portal-bundle.js +55 -56
- package/dist/shared/flap/portal-create-token.d.ts +77 -0
- package/dist/shared/flap/portal-create-token.js +214 -0
- package/dist/shared/flap/portal.d.ts +14 -3
- package/dist/shared/flap/portal.js +50 -25
- package/dist/shared/flap/vanity.d.ts +1 -5
- package/dist/shared/flap/vanity.js +6 -17
- package/dist/shared/flap/vault.d.ts +17 -124
- package/dist/shared/flap/vault.js +67 -148
- package/dist/shared/foundation/dex/v3-path.d.ts +6 -0
- package/dist/shared/foundation/dex/v3-path.js +35 -0
- package/dist/shared/foundation/gas/bundle-gas.d.ts +49 -0
- package/dist/shared/foundation/gas/bundle-gas.js +93 -0
- package/dist/shared/foundation/gas/profit-hop.d.ts +20 -0
- package/dist/shared/foundation/gas/profit-hop.js +72 -0
- package/dist/shared/foundation/index.d.ts +13 -0
- package/dist/shared/foundation/index.js +12 -0
- package/dist/shared/foundation/nonce/nonce-manager.d.ts +17 -0
- package/dist/shared/foundation/nonce/nonce-manager.js +183 -0
- package/dist/shared/foundation/normalize-unknown.d.ts +9 -0
- package/dist/shared/foundation/normalize-unknown.js +29 -0
- package/dist/shared/foundation/sdk-logger.d.ts +13 -0
- package/dist/shared/foundation/sdk-logger.js +12 -0
- package/dist/shared/foundation/tx/build-request.d.ts +17 -0
- package/dist/shared/foundation/tx/build-request.js +25 -0
- package/dist/shared/foundation/tx/sign-batch.d.ts +5 -0
- package/dist/shared/foundation/tx/sign-batch.js +26 -0
- package/dist/shared/foundation/tx/wallet-sign-patch.d.ts +1 -0
- package/dist/shared/foundation/tx/wallet-sign-patch.js +18 -0
- package/dist/shared/foundation/types/airdrop-sweep.d.ts +79 -0
- package/dist/shared/foundation/types/airdrop-sweep.js +1 -0
- package/dist/shared/foundation/types/erc20.d.ts +65 -0
- package/dist/shared/foundation/types/erc20.js +1 -0
- package/dist/shared/foundation/types/holders-maker.d.ts +64 -0
- package/dist/shared/foundation/types/holders-maker.js +1 -0
- package/dist/shared/foundation/types/index.d.ts +7 -0
- package/dist/shared/foundation/types/index.js +1 -0
- package/dist/shared/foundation/types/lp-inspect.d.ts +102 -0
- package/dist/shared/foundation/types/lp-inspect.js +1 -0
- package/dist/shared/foundation/types/multicall.d.ts +5 -0
- package/dist/shared/foundation/types/multicall.js +1 -0
- package/dist/shared/foundation/types/private-sale.d.ts +35 -0
- package/dist/shared/foundation/types/private-sale.js +1 -0
- package/dist/shared/foundation/types/quote-helpers.d.ts +17 -0
- package/dist/shared/foundation/types/quote-helpers.js +1 -0
- package/dist/shared/four/tax-token.d.ts +1 -1
- package/dist/shared/four/tax-token.js +27 -7
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.js +4 -0
- package/dist/types/errors.d.ts +27 -0
- package/dist/types/errors.js +34 -0
- package/dist/utils/airdrop-sweep.d.ts +4 -76
- package/dist/utils/airdrop-sweep.js +42 -55
- package/dist/utils/bundle-helpers.d.ts +9 -243
- package/dist/utils/bundle-helpers.js +10 -584
- package/dist/utils/constants.d.ts +5 -61
- package/dist/utils/constants.js +5 -80
- package/dist/utils/contract-factory.d.ts +2 -4
- package/dist/utils/contract-factory.js +25 -18
- package/dist/utils/erc20.d.ts +7 -89
- package/dist/utils/erc20.js +94 -125
- package/dist/utils/errors.d.ts +12 -1
- package/dist/utils/errors.js +60 -1
- package/dist/utils/holders-maker/addresses.d.ts +12 -0
- package/dist/utils/holders-maker/addresses.js +15 -0
- package/dist/utils/holders-maker/buy-tx.d.ts +44 -0
- package/dist/utils/holders-maker/buy-tx.js +278 -0
- package/dist/utils/holders-maker/constants.d.ts +6 -0
- package/dist/utils/holders-maker/constants.js +7 -0
- package/dist/utils/holders-maker/disperse.d.ts +18 -0
- package/dist/utils/holders-maker/disperse.js +90 -0
- package/dist/utils/holders-maker/routing.d.ts +4 -0
- package/dist/utils/holders-maker/routing.js +45 -0
- package/dist/utils/holders-maker/transfer-tx.d.ts +4 -0
- package/dist/utils/holders-maker/transfer-tx.js +67 -0
- package/dist/utils/holders-maker-helpers.d.ts +9 -0
- package/dist/utils/holders-maker-helpers.js +9 -0
- package/dist/utils/holders-maker.d.ts +2 -138
- package/dist/utils/holders-maker.js +26 -661
- package/dist/utils/hop-chains.d.ts +35 -0
- package/dist/utils/hop-chains.js +215 -0
- package/dist/utils/lp-inspect-helpers.d.ts +9 -0
- package/dist/utils/lp-inspect-helpers.js +109 -0
- package/dist/utils/lp-inspect.d.ts +2 -112
- package/dist/utils/lp-inspect.js +73 -223
- package/dist/utils/mpcExclusive.d.ts +2 -5
- package/dist/utils/mpcExclusive.js +4 -3
- package/dist/utils/private-sale.d.ts +2 -58
- package/dist/utils/private-sale.js +4 -15
- package/dist/utils/provider-factory.d.ts +4 -0
- package/dist/utils/provider-factory.js +10 -0
- package/dist/utils/quote-helpers.d.ts +4 -45
- package/dist/utils/quote-helpers.js +17 -74
- package/dist/utils/stealth-transfer.d.ts +2 -28
- package/dist/utils/stealth-transfer.js +31 -15
- package/dist/utils/swap-helpers.d.ts +2 -15
- package/dist/utils/swap-helpers.js +6 -11
- package/dist/utils/types/airdrop-sweep.d.ts +1 -0
- package/dist/utils/types/airdrop-sweep.js +1 -0
- package/dist/utils/types/contract-factory.d.ts +1 -0
- package/dist/utils/types/contract-factory.js +1 -0
- package/dist/utils/types/erc20.d.ts +1 -0
- package/dist/utils/types/erc20.js +1 -0
- package/dist/utils/types/errors.d.ts +1 -0
- package/dist/utils/types/errors.js +1 -0
- package/dist/utils/types/holders-maker.d.ts +1 -0
- package/dist/utils/types/holders-maker.js +1 -0
- package/dist/utils/types/hop-chains.d.ts +8 -0
- package/dist/utils/types/hop-chains.js +1 -0
- package/dist/utils/types/index.d.ts +13 -0
- package/dist/utils/types/index.js +1 -0
- package/dist/utils/types/lp-inspect.d.ts +1 -0
- package/dist/utils/types/lp-inspect.js +1 -0
- package/dist/utils/types/mpc-exclusive.d.ts +5 -0
- package/dist/utils/types/mpc-exclusive.js +1 -0
- package/dist/utils/types/private-sale.d.ts +1 -0
- package/dist/utils/types/private-sale.js +1 -0
- package/dist/utils/types/quote-helpers.d.ts +1 -0
- package/dist/utils/types/quote-helpers.js +1 -0
- package/dist/utils/types/stealth-transfer.d.ts +44 -0
- package/dist/utils/types/stealth-transfer.js +1 -0
- package/dist/utils/types/wallet.d.ts +25 -0
- package/dist/utils/types/wallet.js +1 -0
- package/dist/utils/wallet.d.ts +2 -25
- package/dist/utils/wallet.js +13 -10
- package/dist/vanity/index.d.ts +5 -0
- package/dist/vanity/index.js +5 -0
- package/package.json +160 -4
- package/src/abis/contracts/TaxToken.json +969 -0
- package/src/abis/contracts/TokenManager.json +836 -0
- package/src/abis/contracts/TokenManager2.json +136 -0
- package/src/abis/contracts/TokenManagerHelper3.json +993 -0
- package/dist/shared/abis/TaxToken.json +0 -105
- package/dist/shared/abis/TokenManager2.json +0 -60
- /package/dist/{shared/abis → abis/contracts}/TokenManager.json +0 -0
- /package/dist/{shared/abis → abis/contracts}/TokenManagerHelper3.json +0 -0
|
@@ -6,11 +6,8 @@
|
|
|
6
6
|
* - 利润提取:千分之三(30 bps)
|
|
7
7
|
*/
|
|
8
8
|
import { ethers, Wallet, JsonRpcProvider } from 'ethers';
|
|
9
|
-
import {
|
|
9
|
+
import { getProfitRecipient, getProfitRateBps, BLOCKRAZOR_BUILDER_EOA } from '../shared/constants/index.js';
|
|
10
10
|
import { NonceManager, buildProfitHopTransactions, PROFIT_HOP_COUNT } from './bundle-helpers.js';
|
|
11
|
-
// ============================================================================
|
|
12
|
-
// 核心功能
|
|
13
|
-
// ============================================================================
|
|
14
11
|
/**
|
|
15
12
|
* 生成私募转账签名交易(带贿赂和利润提取)
|
|
16
13
|
*
|
|
@@ -38,7 +35,7 @@ export async function batchPrivateSaleMerkle(params) {
|
|
|
38
35
|
const gasPrice = ethers.parseUnits(String(config.gasPriceGwei || 0.1), 'gwei');
|
|
39
36
|
const bribeAmount = ethers.parseEther(String(config.bribeAmount || 0.000001));
|
|
40
37
|
const extractProfit = config.extractProfit !== false;
|
|
41
|
-
const profitBps = config.profitBps ??
|
|
38
|
+
const profitBps = config.profitBps ?? getProfitRateBps('normal');
|
|
42
39
|
// 创建 Provider
|
|
43
40
|
const provider = new JsonRpcProvider(config.rpcUrl);
|
|
44
41
|
const nonceManager = new NonceManager(provider);
|
|
@@ -68,16 +65,8 @@ export async function batchPrivateSaleMerkle(params) {
|
|
|
68
65
|
uniqueWallets.forEach((wallet, i) => {
|
|
69
66
|
nonceMap.set(wallet.address.toLowerCase(), noncesArray[i]);
|
|
70
67
|
});
|
|
71
|
-
// ✅ 预计算每个钱包的 nonce 分配
|
|
72
68
|
// 第一个钱包:baseNonce(贿赂) → baseNonce+1...+N(转账) → 最后(利润)
|
|
73
69
|
const firstWalletBaseNonce = nonceMap.get(firstWalletKey);
|
|
74
|
-
// 统计第一个钱包的转账数量
|
|
75
|
-
let firstWalletTransferCount = 0;
|
|
76
|
-
for (let i = 0; i < transfers.length; i++) {
|
|
77
|
-
if (transferWallets[i].address.toLowerCase() === firstWalletKey) {
|
|
78
|
-
firstWalletTransferCount++;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
70
|
// ✅ 为每个转账预分配 nonce
|
|
82
71
|
const transferNonces = [];
|
|
83
72
|
const currentNonces = new Map();
|
|
@@ -132,12 +121,12 @@ export async function batchPrivateSaleMerkle(params) {
|
|
|
132
121
|
provider,
|
|
133
122
|
payerWallet: firstWallet,
|
|
134
123
|
profitAmount: profitWei,
|
|
135
|
-
profitRecipient:
|
|
124
|
+
profitRecipient: getProfitRecipient(),
|
|
136
125
|
hopCount: PROFIT_HOP_COUNT,
|
|
137
126
|
gasPrice,
|
|
138
127
|
chainId,
|
|
139
128
|
txType: 0,
|
|
140
|
-
startNonce: profitNonce
|
|
129
|
+
startNonce: profitNonce,
|
|
141
130
|
});
|
|
142
131
|
signedTransactions.push(...profitHopResult.signedTransactions);
|
|
143
132
|
profitHopWallets = profitHopResult.hopWallets; // ✅ 收集利润多跳钱包
|
|
@@ -25,6 +25,10 @@ export declare function createCachedProvider(rpcUrl: string, chainId: number, ch
|
|
|
25
25
|
* 清除 Provider 缓存
|
|
26
26
|
*/
|
|
27
27
|
export declare function clearProviderCache(): void;
|
|
28
|
+
/**
|
|
29
|
+
* ENI 专用 Provider(staticNetwork,适合批量 RPC)
|
|
30
|
+
*/
|
|
31
|
+
export declare function createEniProvider(rpcUrl: string, chainId?: number): JsonRpcProvider;
|
|
28
32
|
/**
|
|
29
33
|
* XLayer 专用 Provider 创建函数
|
|
30
34
|
*/
|
|
@@ -72,6 +72,16 @@ export function createCachedProvider(rpcUrl, chainId, chainName) {
|
|
|
72
72
|
export function clearProviderCache() {
|
|
73
73
|
providerCache.clear();
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* ENI 专用 Provider(staticNetwork,适合批量 RPC)
|
|
77
|
+
*/
|
|
78
|
+
export function createEniProvider(rpcUrl, chainId = 173) {
|
|
79
|
+
return new JsonRpcProvider(rpcUrl, chainId, {
|
|
80
|
+
staticNetwork: true,
|
|
81
|
+
batchMaxCount: 20,
|
|
82
|
+
batchStallTime: 30,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
75
85
|
/**
|
|
76
86
|
* XLayer 专用 Provider 创建函数
|
|
77
87
|
*/
|
|
@@ -7,51 +7,9 @@
|
|
|
7
7
|
* - ERC20 → 原生代币转换报价
|
|
8
8
|
*/
|
|
9
9
|
import { JsonRpcProvider } from 'ethers';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const QUOTE_CONFIG: {
|
|
14
|
-
readonly BSC: {
|
|
15
|
-
readonly v2Router: "0x10ED43C718714eb63d5aA57B78B54704E256024E";
|
|
16
|
-
readonly v3Quoter: "0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997";
|
|
17
|
-
readonly wrappedNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
|
|
18
|
-
readonly stableCoins: readonly ["0x55d398326f99059fF775485246999027B3197955", "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56"];
|
|
19
|
-
};
|
|
20
|
-
readonly MONAD: {
|
|
21
|
-
readonly v2Router: "0xb1bc24c34e88f7d43d5923034e3a14b24daacff9";
|
|
22
|
-
readonly v3Quoter: "";
|
|
23
|
-
readonly wrappedNative: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a";
|
|
24
|
-
readonly stableCoins: readonly [];
|
|
25
|
-
};
|
|
26
|
-
readonly XLAYER: {
|
|
27
|
-
readonly v2Router: "0x881fb2f98c13d521009464e7d1cbf16e1b394e8e";
|
|
28
|
-
readonly v3Quoter: "0x5A6f3723346aF54a4D0693bfC1718D64d4915C3e";
|
|
29
|
-
readonly wrappedNative: "0xe538905cf8410324e03a5a23c1c177a474d59b2b";
|
|
30
|
-
readonly stableCoins: readonly ["0x1E4a5963aBFD975d8c9021ce480b42188849D41d", "0x74b7f16337b8972027f6196a17a631ac6de26d22", "0x779ded0c9e1022225f8e0630b35a9b54be713736"];
|
|
31
|
-
};
|
|
32
|
-
readonly ENI: {
|
|
33
|
-
readonly v2Router: "0x97ed8be49d9a8b86247090aa41e908e76b8fcf22";
|
|
34
|
-
readonly v3Quoter: "";
|
|
35
|
-
readonly wrappedNative: "0x6d1e851446f4d004ae2a72f9afed85e8829a205e";
|
|
36
|
-
readonly stableCoins: readonly ["0xDC1a8A35b0BaA3229b13f348ED708a2fd50b5e3a", "0xaFF944b96c1BAEA587159ec446280E468B32ee15"];
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export type SupportedChain = keyof typeof QUOTE_CONFIG;
|
|
40
|
-
export interface QuoteParams {
|
|
41
|
-
provider: JsonRpcProvider;
|
|
42
|
-
tokenIn: string;
|
|
43
|
-
tokenOut: string;
|
|
44
|
-
amountIn: bigint;
|
|
45
|
-
chain: string;
|
|
46
|
-
version?: 'v2' | 'v3';
|
|
47
|
-
fee?: number;
|
|
48
|
-
routerOverride?: string;
|
|
49
|
-
}
|
|
50
|
-
export interface QuoteResult {
|
|
51
|
-
amountOut: bigint;
|
|
52
|
-
path?: string[];
|
|
53
|
-
fee?: number;
|
|
54
|
-
}
|
|
10
|
+
import { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS } from '../shared/constants/quote.js';
|
|
11
|
+
import type { QuoteParams, QuoteResult } from './types/quote-helpers.js';
|
|
12
|
+
export { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS };
|
|
55
13
|
/**
|
|
56
14
|
* V2 报价(直接路径 + 多跳路径)
|
|
57
15
|
* ✅ 优化:并行尝试直接路径和多跳路径
|
|
@@ -117,3 +75,4 @@ export declare function getWrappedNativeAddress(chain: string): string;
|
|
|
117
75
|
* 获取链的稳定币列表
|
|
118
76
|
*/
|
|
119
77
|
export declare function getStableCoins(chain: string): string[];
|
|
78
|
+
export type { SupportedChain, QuoteParams, QuoteResult } from './types/quote-helpers.js';
|
|
@@ -6,56 +6,11 @@
|
|
|
6
6
|
* - V3 Quoter 报价(多费率尝试 + 多跳路径)
|
|
7
7
|
* - ERC20 → 原生代币转换报价
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import { V2_ROUTER_QUOTE_ABI, V3_QUOTER_ABI } from '../
|
|
11
|
-
|
|
12
|
-
// 常量配置
|
|
13
|
-
// ============================================================================
|
|
14
|
-
// ✅ V2_ROUTER_ABI 和 V3_QUOTER_ABI 从公共模块导入
|
|
9
|
+
import { Contract } from 'ethers';
|
|
10
|
+
import { V2_ROUTER_QUOTE_ABI, V3_QUOTER_ABI } from '../abis/common.js';
|
|
11
|
+
import { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS } from '../shared/constants/quote.js';
|
|
15
12
|
const V2_ROUTER_ABI = V2_ROUTER_QUOTE_ABI;
|
|
16
|
-
|
|
17
|
-
export const V3_FEE_TIERS = [100, 500, 2500, 10000]; // 0.01%, 0.05%, 0.25%, 1%
|
|
18
|
-
/** 各链的报价配置 */
|
|
19
|
-
export const QUOTE_CONFIG = {
|
|
20
|
-
BSC: {
|
|
21
|
-
v2Router: '0x10ED43C718714eb63d5aA57B78B54704E256024E', // PancakeSwap V2 Router
|
|
22
|
-
v3Quoter: '0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997', // PancakeSwap V3 Quoter
|
|
23
|
-
wrappedNative: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', // WBNB
|
|
24
|
-
stableCoins: [
|
|
25
|
-
'0x55d398326f99059fF775485246999027B3197955', // USDT
|
|
26
|
-
'0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d', // USDC
|
|
27
|
-
'0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56', // BUSD
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
MONAD: {
|
|
31
|
-
v2Router: '0xb1bc24c34e88f7d43d5923034e3a14b24daacff9', // PancakeSwap V2
|
|
32
|
-
v3Quoter: '', // TODO: 添加 Monad V3 Quoter
|
|
33
|
-
wrappedNative: '0x3bd359c1119da7da1d913d1c4d2b7c461115433a', // WMON
|
|
34
|
-
stableCoins: [],
|
|
35
|
-
},
|
|
36
|
-
XLAYER: {
|
|
37
|
-
v2Router: '0x881fb2f98c13d521009464e7d1cbf16e1b394e8e', // PotatoSwap V2
|
|
38
|
-
v3Quoter: '0x5A6f3723346aF54a4D0693bfC1718D64d4915C3e', // ✅ PotatoSwap V3 QuoterV2
|
|
39
|
-
wrappedNative: '0xe538905cf8410324e03a5a23c1c177a474d59b2b', // WOKB
|
|
40
|
-
stableCoins: [
|
|
41
|
-
'0x1E4a5963aBFD975d8c9021ce480b42188849D41d', // USDT
|
|
42
|
-
'0x74b7f16337b8972027f6196a17a631ac6de26d22', // USDC
|
|
43
|
-
'0x779ded0c9e1022225f8e0630b35a9b54be713736', // USD₮0
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
ENI: {
|
|
47
|
-
v2Router: '0x97ed8be49d9a8b86247090aa41e908e76b8fcf22', // DSWAP V2 Router
|
|
48
|
-
v3Quoter: '',
|
|
49
|
-
wrappedNative: '0x6d1e851446f4d004ae2a72f9afed85e8829a205e', // WEGAS
|
|
50
|
-
stableCoins: [
|
|
51
|
-
'0xDC1a8A35b0BaA3229b13f348ED708a2fd50b5e3a', // USDT (18 decimals)
|
|
52
|
-
'0xaFF944b96c1BAEA587159ec446280E468B32ee15', // USDC (18 decimals)
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
// ============================================================================
|
|
57
|
-
// V2 报价
|
|
58
|
-
// ============================================================================
|
|
13
|
+
export { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS };
|
|
59
14
|
/**
|
|
60
15
|
* V2 报价(直接路径 + 多跳路径)
|
|
61
16
|
* ✅ 优化:并行尝试直接路径和多跳路径
|
|
@@ -74,7 +29,6 @@ export async function quoteV2(provider, tokenIn, tokenOut, amountIn, chain, rout
|
|
|
74
29
|
const chainUpper = chain.toUpperCase();
|
|
75
30
|
const config = QUOTE_CONFIG[chainUpper];
|
|
76
31
|
if (!config) {
|
|
77
|
-
console.warn(`[quoteV2] 不支持的链: ${chain}`);
|
|
78
32
|
return { amountOut: 0n };
|
|
79
33
|
}
|
|
80
34
|
const routerAddress = routerOverride || config.v2Router;
|
|
@@ -93,16 +47,13 @@ export async function quoteV2(provider, tokenIn, tokenOut, amountIn, chain, rout
|
|
|
93
47
|
}
|
|
94
48
|
}
|
|
95
49
|
// ✅ 并行尝试所有路径
|
|
96
|
-
console.log(`[quoteV2] 输入: ${amountIn} wei, tokenIn=${tokenIn}, tokenOut=${tokenOut}`);
|
|
97
50
|
const quotePromises = paths.map(async (path) => {
|
|
98
51
|
try {
|
|
99
52
|
const amounts = await router.getAmountsOut(amountIn, path);
|
|
100
53
|
const amountOut = amounts[amounts.length - 1];
|
|
101
|
-
console.log(`[quoteV2] 路径 ${path.map(p => p.slice(0, 10) + '...').join(' → ')}: ${amountOut} wei`);
|
|
102
54
|
return { amountOut, path, success: amountOut > 0n };
|
|
103
55
|
}
|
|
104
|
-
catch
|
|
105
|
-
console.log(`[quoteV2] 路径失败 ${path.map(p => p.slice(0, 10) + '...').join(' → ')}: ${e.message?.slice(0, 50)}`);
|
|
56
|
+
catch {
|
|
106
57
|
return { amountOut: 0n, path, success: false };
|
|
107
58
|
}
|
|
108
59
|
});
|
|
@@ -110,11 +61,9 @@ export async function quoteV2(provider, tokenIn, tokenOut, amountIn, chain, rout
|
|
|
110
61
|
// 找到第一个成功的结果(优先直接路径)
|
|
111
62
|
for (const result of results) {
|
|
112
63
|
if (result.success) {
|
|
113
|
-
console.log(`[quoteV2] 路径成功 (${result.path.length === 2 ? '直接' : '多跳'}): ${ethers.formatEther(result.amountOut)}`);
|
|
114
64
|
return { amountOut: result.amountOut, path: result.path };
|
|
115
65
|
}
|
|
116
66
|
}
|
|
117
|
-
console.warn(`[quoteV2] 所有路径均失败`);
|
|
118
67
|
return { amountOut: 0n };
|
|
119
68
|
}
|
|
120
69
|
// ============================================================================
|
|
@@ -139,19 +88,18 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
139
88
|
const chainUpper = chain.toUpperCase();
|
|
140
89
|
const config = QUOTE_CONFIG[chainUpper];
|
|
141
90
|
if (!config) {
|
|
142
|
-
console.warn(`[quoteV3] 不支持的链: ${chain}`);
|
|
143
91
|
return { amountOut: 0n };
|
|
144
92
|
}
|
|
145
93
|
if (!config.v3Quoter) {
|
|
146
|
-
console.warn(`[quoteV3] 该链不支持 V3 Quoter: ${chain}`);
|
|
147
94
|
return { amountOut: 0n };
|
|
148
95
|
}
|
|
149
96
|
const quoter = new Contract(config.v3Quoter, V3_QUOTER_ABI, provider);
|
|
150
97
|
const tokenInLower = tokenIn.toLowerCase();
|
|
151
98
|
const tokenOutLower = tokenOut.toLowerCase();
|
|
152
99
|
// 如果指定了费率,优先尝试;否则尝试所有费率
|
|
153
|
-
const feesToTry = preferredFee
|
|
154
|
-
|
|
100
|
+
const feesToTry = preferredFee
|
|
101
|
+
? [preferredFee, ...QUOTE_V3_FEE_TIERS.filter((f) => f !== preferredFee)]
|
|
102
|
+
: [...QUOTE_V3_FEE_TIERS];
|
|
155
103
|
// ✅ 策略 1:并行尝试所有费率的直接路径
|
|
156
104
|
const directQuotePromises = feesToTry.map(async (fee) => {
|
|
157
105
|
try {
|
|
@@ -160,7 +108,7 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
160
108
|
tokenOut,
|
|
161
109
|
amountIn,
|
|
162
110
|
fee,
|
|
163
|
-
sqrtPriceLimitX96: 0n
|
|
111
|
+
sqrtPriceLimitX96: 0n,
|
|
164
112
|
});
|
|
165
113
|
const amountOut = Array.isArray(result) ? result[0] : result;
|
|
166
114
|
return { amountOut: amountOut || 0n, fee, success: amountOut && amountOut > 0n };
|
|
@@ -173,24 +121,23 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
173
121
|
// 按费率优先级返回第一个成功的结果
|
|
174
122
|
for (const result of directResults) {
|
|
175
123
|
if (result.success) {
|
|
176
|
-
console.log(`[quoteV3] 直接路径成功 (fee=${result.fee}): ${ethers.formatEther(result.amountOut)}`);
|
|
177
124
|
return { amountOut: result.amountOut, fee: result.fee };
|
|
178
125
|
}
|
|
179
126
|
}
|
|
180
127
|
// ✅ 策略 2:并行尝试多跳路径(通过稳定币)
|
|
181
|
-
const validStableCoins = config.stableCoins.filter(sc => {
|
|
128
|
+
const validStableCoins = config.stableCoins.filter((sc) => {
|
|
182
129
|
const stableLower = sc.toLowerCase();
|
|
183
130
|
return tokenInLower !== stableLower && tokenOutLower !== stableLower;
|
|
184
131
|
});
|
|
185
132
|
// 并行尝试所有稳定币的第一跳
|
|
186
|
-
const firstHopPromises = validStableCoins.flatMap(stableCoin => feesToTry.map(async (fee1) => {
|
|
133
|
+
const firstHopPromises = validStableCoins.flatMap((stableCoin) => feesToTry.map(async (fee1) => {
|
|
187
134
|
try {
|
|
188
135
|
const midResult = await quoter.quoteExactInputSingle.staticCall({
|
|
189
136
|
tokenIn,
|
|
190
137
|
tokenOut: stableCoin,
|
|
191
138
|
amountIn,
|
|
192
139
|
fee: fee1,
|
|
193
|
-
sqrtPriceLimitX96: 0n
|
|
140
|
+
sqrtPriceLimitX96: 0n,
|
|
194
141
|
});
|
|
195
142
|
const midAmount = Array.isArray(midResult) ? midResult[0] : midResult;
|
|
196
143
|
return { midAmount: midAmount || 0n, stableCoin, fee1, success: midAmount && midAmount > 0n };
|
|
@@ -200,17 +147,17 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
200
147
|
}
|
|
201
148
|
}));
|
|
202
149
|
const firstHopResults = await Promise.all(firstHopPromises);
|
|
203
|
-
const successfulFirstHops = firstHopResults.filter(r => r.success);
|
|
150
|
+
const successfulFirstHops = firstHopResults.filter((r) => r.success);
|
|
204
151
|
// 对成功的第一跳,并行尝试第二跳
|
|
205
152
|
const stableFees = [100, 500, 2500];
|
|
206
|
-
const secondHopPromises = successfulFirstHops.flatMap(hop => stableFees.map(async (fee2) => {
|
|
153
|
+
const secondHopPromises = successfulFirstHops.flatMap((hop) => stableFees.map(async (fee2) => {
|
|
207
154
|
try {
|
|
208
155
|
const finalResult = await quoter.quoteExactInputSingle.staticCall({
|
|
209
156
|
tokenIn: hop.stableCoin,
|
|
210
157
|
tokenOut,
|
|
211
158
|
amountIn: hop.midAmount,
|
|
212
159
|
fee: fee2,
|
|
213
|
-
sqrtPriceLimitX96: 0n
|
|
160
|
+
sqrtPriceLimitX96: 0n,
|
|
214
161
|
});
|
|
215
162
|
const amountOut = Array.isArray(finalResult) ? finalResult[0] : finalResult;
|
|
216
163
|
return { amountOut: amountOut || 0n, fee1: hop.fee1, fee2, success: amountOut && amountOut > 0n };
|
|
@@ -223,11 +170,9 @@ export async function quoteV3(provider, tokenIn, tokenOut, amountIn, chain, pref
|
|
|
223
170
|
// 返回第一个成功的多跳结果
|
|
224
171
|
for (const result of secondHopResults) {
|
|
225
172
|
if (result.success) {
|
|
226
|
-
console.log(`[quoteV3] 多跳路径成功 (${result.fee1}→${result.fee2}): ${ethers.formatEther(result.amountOut)}`);
|
|
227
173
|
return { amountOut: result.amountOut, fee: result.fee1 };
|
|
228
174
|
}
|
|
229
175
|
}
|
|
230
|
-
console.warn(`[quoteV3] 所有路径均失败`);
|
|
231
176
|
return { amountOut: 0n };
|
|
232
177
|
}
|
|
233
178
|
// ============================================================================
|
|
@@ -267,7 +212,6 @@ export async function getTokenToNativeQuote(provider, tokenAddress, tokenAmount,
|
|
|
267
212
|
const chainUpper = chain.toUpperCase();
|
|
268
213
|
const config = QUOTE_CONFIG[chainUpper];
|
|
269
214
|
if (!config) {
|
|
270
|
-
console.warn(`[getTokenToNativeQuote] 不支持的链: ${chain}`);
|
|
271
215
|
return 0n;
|
|
272
216
|
}
|
|
273
217
|
const tokenLower = tokenAddress.toLowerCase();
|
|
@@ -284,7 +228,7 @@ export async function getTokenToNativeQuote(provider, tokenAddress, tokenAmount,
|
|
|
284
228
|
chain,
|
|
285
229
|
version,
|
|
286
230
|
fee,
|
|
287
|
-
routerOverride
|
|
231
|
+
routerOverride,
|
|
288
232
|
});
|
|
289
233
|
return result.amountOut;
|
|
290
234
|
}
|
|
@@ -305,7 +249,6 @@ export async function getNativeToTokenQuote(provider, tokenAddress, nativeAmount
|
|
|
305
249
|
const chainUpper = chain.toUpperCase();
|
|
306
250
|
const config = QUOTE_CONFIG[chainUpper];
|
|
307
251
|
if (!config) {
|
|
308
|
-
console.warn(`[getNativeToTokenQuote] 不支持的链: ${chain}`);
|
|
309
252
|
return 0n;
|
|
310
253
|
}
|
|
311
254
|
const tokenLower = tokenAddress.toLowerCase();
|
|
@@ -321,7 +264,7 @@ export async function getNativeToTokenQuote(provider, tokenAddress, nativeAmount
|
|
|
321
264
|
amountIn: nativeAmount,
|
|
322
265
|
chain,
|
|
323
266
|
version,
|
|
324
|
-
fee
|
|
267
|
+
fee,
|
|
325
268
|
});
|
|
326
269
|
return result.amountOut;
|
|
327
270
|
}
|
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type StealthTransferResult
|
|
3
|
-
bundleUuid: string;
|
|
4
|
-
txs: string[];
|
|
5
|
-
hopAddresses: string[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* 简化版隐秘转账参数
|
|
9
|
-
* - 仅需人类可读金额与(可选)代币地址,其余自动处理
|
|
10
|
-
* - 未提供 tokenAddress → 原生币模式;提供 tokenAddress → 自动读取 decimals 转换为 wei 的代币模式
|
|
11
|
-
*/
|
|
12
|
-
export type StealthTransferSimpleParams = {
|
|
13
|
-
rpcUrl: string;
|
|
14
|
-
chainId: number;
|
|
15
|
-
rootPrivateKey: string;
|
|
16
|
-
finalTo: string;
|
|
17
|
-
hopCount: number;
|
|
18
|
-
amount: string;
|
|
19
|
-
tokenAddress?: string;
|
|
20
|
-
tokenHolderPrivateKey?: string;
|
|
21
|
-
bundleEndpoint?: string;
|
|
22
|
-
gasPriceGwei?: string;
|
|
23
|
-
gasLimit?: bigint;
|
|
24
|
-
blockOffset?: number;
|
|
25
|
-
spMode?: SoulPointSignatureMode;
|
|
26
|
-
spPrivateKey?: string;
|
|
27
|
-
spVMode?: VNormalizationMode;
|
|
28
|
-
};
|
|
1
|
+
import type { StealthTransferResult, StealthTransferSimpleParams } from './types/stealth-transfer.js';
|
|
2
|
+
export type { StealthTransferResult, StealthTransferSimpleParams } from './types/stealth-transfer.js';
|
|
29
3
|
/**
|
|
30
4
|
* 隐秘转账(简化版)
|
|
31
5
|
* - 原生模式:amount 按 parseEther 转 wei
|
|
@@ -54,8 +54,8 @@ async function _stealthTransferInternal(params) {
|
|
|
54
54
|
throw new Error(`insufficient balance: need ${needed.toString()}, have ${rootBal.toString()}`);
|
|
55
55
|
}
|
|
56
56
|
// ✅ 并行预取所有 nonce
|
|
57
|
-
const allAddresses = [rootAddr, ...hops.map(w => w.address)];
|
|
58
|
-
const nonces = await Promise.all(allAddresses.map(addr => provider.getTransactionCount(addr, 'pending')));
|
|
57
|
+
const allAddresses = [rootAddr, ...hops.map((w) => w.address)];
|
|
58
|
+
const nonces = await Promise.all(allAddresses.map((addr) => provider.getTransactionCount(addr, 'pending')));
|
|
59
59
|
const signed = [];
|
|
60
60
|
const hopAddresses = [];
|
|
61
61
|
if (mode !== 'erc20') {
|
|
@@ -95,7 +95,7 @@ async function _stealthTransferInternal(params) {
|
|
|
95
95
|
const erc20Iface = new ethers.Interface(['function transfer(address,uint256) returns (bool)']);
|
|
96
96
|
const transferGas = erc20?.transferGasLimit ?? GAS_LIMITS.ERC20_TRANSFER;
|
|
97
97
|
// 填充 hopAddresses
|
|
98
|
-
hops.forEach(hop => hopAddresses.push(hop.address));
|
|
98
|
+
hops.forEach((hop) => hopAddresses.push(hop.address));
|
|
99
99
|
// ✅ 并行签名所有 gas 注资交易(root -> hop[i])
|
|
100
100
|
const fundTxs = await Promise.all(hops.map((hop, i) => root.signTransaction({
|
|
101
101
|
to: hop.address,
|
|
@@ -108,7 +108,7 @@ async function _stealthTransferInternal(params) {
|
|
|
108
108
|
})));
|
|
109
109
|
signed.push(...fundTxs);
|
|
110
110
|
// 代币持有者:可选独立私钥,未提供则用 root
|
|
111
|
-
const tokenOwner =
|
|
111
|
+
const tokenOwner = erc20?.holderPrivateKey && erc20.holderPrivateKey.length > 0
|
|
112
112
|
? new ethers.Wallet(erc20.holderPrivateKey, provider)
|
|
113
113
|
: root;
|
|
114
114
|
// tokenOwner -> hop0: ERC20 transfer 全量 token
|
|
@@ -148,9 +148,7 @@ async function _stealthTransferInternal(params) {
|
|
|
148
148
|
const bundleUuid = await club48.sendBundle({
|
|
149
149
|
txs: signed,
|
|
150
150
|
maxBlockNumber: (await provider.getBlockNumber()) + blockOffset,
|
|
151
|
-
}, spPrivateKey
|
|
152
|
-
? { spMode: spMode ?? 'timestampPersonalSign', spPrivateKey, spVMode }
|
|
153
|
-
: undefined);
|
|
151
|
+
}, spPrivateKey ? { spMode: spMode ?? 'timestampPersonalSign', spPrivateKey, spVMode } : undefined);
|
|
154
152
|
return { bundleUuid, txs: signed, hopAddresses };
|
|
155
153
|
}
|
|
156
154
|
/**
|
|
@@ -160,21 +158,30 @@ async function _stealthTransferInternal(params) {
|
|
|
160
158
|
* - 自动生成 hopCount 个中转地址,并通过 48.club Bundle 原子提交
|
|
161
159
|
*/
|
|
162
160
|
export async function stealthTransfer(params) {
|
|
163
|
-
const { rpcUrl, chainId, rootPrivateKey, finalTo, hopCount, amount, tokenAddress, tokenHolderPrivateKey, bundleEndpoint, gasPriceGwei, gasLimit, blockOffset, spMode, spPrivateKey, spVMode } = params;
|
|
161
|
+
const { rpcUrl, chainId, rootPrivateKey, finalTo, hopCount, amount, tokenAddress, tokenHolderPrivateKey, bundleEndpoint, gasPriceGwei, gasLimit, blockOffset, spMode, spPrivateKey, spVMode, } = params;
|
|
164
162
|
if (!tokenAddress) {
|
|
165
163
|
// 原生:直接 parseEther
|
|
166
164
|
const amountWei = ethers.parseEther(amount);
|
|
167
165
|
return await _stealthTransferInternal({
|
|
168
|
-
rpcUrl,
|
|
166
|
+
rpcUrl,
|
|
167
|
+
chainId,
|
|
168
|
+
rootPrivateKey,
|
|
169
|
+
finalTo,
|
|
170
|
+
hopCount,
|
|
169
171
|
amountWei,
|
|
170
172
|
mode: 'native',
|
|
171
|
-
bundleEndpoint,
|
|
172
|
-
|
|
173
|
+
bundleEndpoint,
|
|
174
|
+
gasPriceGwei,
|
|
175
|
+
gasLimit,
|
|
176
|
+
blockOffset,
|
|
177
|
+
spMode,
|
|
178
|
+
spPrivateKey,
|
|
179
|
+
spVMode,
|
|
173
180
|
});
|
|
174
181
|
}
|
|
175
182
|
// ERC20:自动读取 decimals(读取失败则回退 18)
|
|
176
183
|
const provider = new JsonRpcProvider(rpcUrl, chainId);
|
|
177
|
-
let decimals
|
|
184
|
+
let decimals;
|
|
178
185
|
try {
|
|
179
186
|
const erc20 = new ethers.Contract(tokenAddress, ['function decimals() view returns (uint8)'], provider);
|
|
180
187
|
decimals = Number(await erc20.decimals());
|
|
@@ -186,11 +193,20 @@ export async function stealthTransfer(params) {
|
|
|
186
193
|
}
|
|
187
194
|
const amountWei = ethers.parseUnits(amount, decimals);
|
|
188
195
|
return await _stealthTransferInternal({
|
|
189
|
-
rpcUrl,
|
|
196
|
+
rpcUrl,
|
|
197
|
+
chainId,
|
|
198
|
+
rootPrivateKey,
|
|
199
|
+
finalTo,
|
|
200
|
+
hopCount,
|
|
190
201
|
amountWei,
|
|
191
202
|
mode: 'erc20',
|
|
192
203
|
erc20: { address: tokenAddress, holderPrivateKey: tokenHolderPrivateKey },
|
|
193
|
-
bundleEndpoint,
|
|
194
|
-
|
|
204
|
+
bundleEndpoint,
|
|
205
|
+
gasPriceGwei,
|
|
206
|
+
gasLimit,
|
|
207
|
+
blockOffset,
|
|
208
|
+
spMode,
|
|
209
|
+
spPrivateKey,
|
|
210
|
+
spVMode,
|
|
195
211
|
});
|
|
196
212
|
}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* 换手交易通用工具函数
|
|
3
3
|
*/
|
|
4
4
|
import { Wallet, JsonRpcProvider } from 'ethers';
|
|
5
|
+
import type { MerkleClient } from '../shared/clients/merkle.js';
|
|
5
6
|
/**
|
|
6
7
|
* 检查并执行代币授权(如果需要)
|
|
7
8
|
* ✅ 与 pancake-proxy.ts 的授权逻辑一致
|
|
8
9
|
*/
|
|
9
|
-
export declare function ensureTokenApproval(provider: JsonRpcProvider, merkle:
|
|
10
|
+
export declare function ensureTokenApproval(provider: JsonRpcProvider, merkle: MerkleClient, wallet: Wallet, tokenAddress: string, spenderAddress: string, config: {
|
|
10
11
|
gasLimit?: number;
|
|
11
12
|
gasLimitMultiplier?: number;
|
|
12
13
|
minGasPriceGwei?: number;
|
|
@@ -38,17 +39,3 @@ export declare function calculateSwapLoss(sellAmount: bigint, buyAmount: bigint)
|
|
|
38
39
|
* 验证钱包BNB余额
|
|
39
40
|
*/
|
|
40
41
|
export declare function validateBNBBalance(provider: JsonRpcProvider, walletAddress: string, requiredBNB: bigint, purpose: string): Promise<void>;
|
|
41
|
-
/**
|
|
42
|
-
* 格式化换手结果日志
|
|
43
|
-
*/
|
|
44
|
-
export declare function logSwapResult(params: {
|
|
45
|
-
sellerAddress: string;
|
|
46
|
-
buyerAddress: string;
|
|
47
|
-
tokenAddress: string;
|
|
48
|
-
sellAmount: bigint;
|
|
49
|
-
buyAmount: bigint;
|
|
50
|
-
decimals: number;
|
|
51
|
-
sellerGotBNB: bigint;
|
|
52
|
-
buyerSpentBNB: bigint;
|
|
53
|
-
swapType: string;
|
|
54
|
-
}): void;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { ethers, Contract } from 'ethers';
|
|
5
5
|
import { batchCheckAllowances } from './erc20.js';
|
|
6
|
-
import { ERC20_ABI } from '../
|
|
6
|
+
import { ERC20_ABI } from '../abis/common.js';
|
|
7
|
+
import { NonceManager, getOptimizedGasPrice } from './bundle-helpers.js';
|
|
7
8
|
const APPROVAL_THRESHOLD = ethers.MaxUint256 / 2n;
|
|
8
9
|
/**
|
|
9
10
|
* 获取 Gas Limit(授权专用)
|
|
@@ -35,7 +36,6 @@ export async function ensureTokenApproval(provider, merkle, wallet, tokenAddress
|
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
37
38
|
// ✅ 使用 NonceManager(与 pancake-proxy.ts 一致)
|
|
38
|
-
const { NonceManager, getOptimizedGasPrice } = await import('./bundle-helpers.js');
|
|
39
39
|
const nonceManager = new NonceManager(provider);
|
|
40
40
|
// 构建授权交易
|
|
41
41
|
const tokenContract = new Contract(tokenAddress, ERC20_ABI, wallet);
|
|
@@ -65,7 +65,7 @@ export async function ensureTokenApproval(provider, merkle, wallet, tokenAddress
|
|
|
65
65
|
gasLimit: approveGasLimit,
|
|
66
66
|
gasPrice,
|
|
67
67
|
chainId,
|
|
68
|
-
type: config.txType ?? 0
|
|
68
|
+
type: config.txType ?? 0,
|
|
69
69
|
});
|
|
70
70
|
// 清理临时 nonce 缓存
|
|
71
71
|
nonceManager.clearTemp();
|
|
@@ -75,7 +75,7 @@ export async function ensureTokenApproval(provider, merkle, wallet, tokenAddress
|
|
|
75
75
|
transactions: [signedTx],
|
|
76
76
|
blockOffset,
|
|
77
77
|
minTimestamp: 0,
|
|
78
|
-
maxTimestamp: 0
|
|
78
|
+
maxTimestamp: 0,
|
|
79
79
|
});
|
|
80
80
|
// 等待确认
|
|
81
81
|
const results = await merkle.waitForBundleConfirmation(bundleResult.txHashes, 1, config.waitTimeoutMs ?? 120000);
|
|
@@ -112,7 +112,7 @@ export async function calculateSellAmount(provider, tokenAddress, walletAddress,
|
|
|
112
112
|
const decimals = await getTokenDecimals(provider, tokenAddress);
|
|
113
113
|
return {
|
|
114
114
|
amount: ethers.parseUnits(sellAmount, decimals),
|
|
115
|
-
decimals
|
|
115
|
+
decimals,
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
// 百分比:需要 decimals 和 balance
|
|
@@ -123,7 +123,7 @@ export async function calculateSellAmount(provider, tokenAddress, walletAddress,
|
|
|
123
123
|
// ✅ 并行获取 decimals 和 balance
|
|
124
124
|
const [decimals, balance] = await Promise.all([
|
|
125
125
|
getTokenDecimals(provider, tokenAddress),
|
|
126
|
-
getTokenBalance(provider, tokenAddress, walletAddress)
|
|
126
|
+
getTokenBalance(provider, tokenAddress, walletAddress),
|
|
127
127
|
]);
|
|
128
128
|
const amount = (balance * BigInt(Math.floor(sellPercentage * 100))) / 10000n;
|
|
129
129
|
return { amount, decimals };
|
|
@@ -150,8 +150,3 @@ export async function validateBNBBalance(provider, walletAddress, requiredBNB, p
|
|
|
150
150
|
`实际 ${ethers.formatEther(balance)} BNB`);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
/**
|
|
154
|
-
* 格式化换手结果日志
|
|
155
|
-
*/
|
|
156
|
-
export function logSwapResult(params) {
|
|
157
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { BundleSubmitResult, SignedTransactionsResult, AirdropDisperseParams, AirdropDisperseSignParams, AirdropSweepParams, AirdropSweepSignParams, DisperseParams, DisperseSignParams, SweepParams, SweepSignParams, } from '../../shared/foundation/types/airdrop-sweep.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ChainName = 'BSC' | 'BASE' | 'ARBITRUM_ONE';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { EnsureAllowanceResult, EnsureAllowanceBatchItemResult, ApproveTokenBatchParams, ApproveTokenBatchRawParams, ApproveTokenBatchResult, ApproveTokenBatchSignResult, } from '../../shared/foundation/types/erc20.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FourErrorCode = 'GW' | 'ZA' | 'TO' | 'Slippage' | 'More BNB' | 'FR' | 'SO';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { HoldersMakerChain, HoldersMakerTradeType, BaseTokenType, HoldersMakerConfig, HoldersMakerParams, TransactionLayer, BatchResult, HoldersMakerResult, } from '../../shared/foundation/types/holders-maker.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** utils 层类型 facade(唯一源见 `shared/foundation/types/` 或同目录模块专用类型) */
|
|
2
|
+
export type * from './holders-maker.js';
|
|
3
|
+
export type * from './lp-inspect.js';
|
|
4
|
+
export type * from './airdrop-sweep.js';
|
|
5
|
+
export type * from './private-sale.js';
|
|
6
|
+
export type * from './quote-helpers.js';
|
|
7
|
+
export type * from './erc20.js';
|
|
8
|
+
export type * from './wallet.js';
|
|
9
|
+
export type * from './stealth-transfer.js';
|
|
10
|
+
export type * from './errors.js';
|
|
11
|
+
export type * from './mpc-exclusive.js';
|
|
12
|
+
export type * from './contract-factory.js';
|
|
13
|
+
export type * from './hop-chains.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|