four-flap-meme-sdk 2.2.19 → 3.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/{shared/abis → abis}/common.d.ts +1 -1
- package/dist/{shared/abis → abis}/common.js +75 -91
- package/dist/abis/contracts/TaxToken.json +969 -0
- package/dist/abis/contracts/TokenManager2.json +136 -0
- package/dist/{shared/abis → abis/contracts}/index.d.ts +0 -1
- package/dist/{shared/abis → abis/contracts}/index.js +0 -2
- package/dist/abis/flap/index.d.ts +5 -0
- package/dist/abis/flap/index.js +5 -0
- package/dist/abis/flap/portal-eip7702.d.ts +4 -0
- package/dist/abis/flap/portal-eip7702.js +39 -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-merkle.d.ts +4 -0
- package/dist/abis/flap/portal-merkle.js +25 -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 +6 -0
- package/dist/abis/index.js +9 -0
- package/dist/bundle/config-helpers.d.ts +37 -0
- package/dist/bundle/config-helpers.js +58 -0
- package/dist/bundle/errors.d.ts +50 -0
- package/dist/bundle/errors.js +38 -0
- package/dist/bundle/four-meme/approve-tokenmanager.d.ts +7 -0
- package/dist/bundle/four-meme/approve-tokenmanager.js +99 -0
- package/dist/bundle/four-meme/core-helpers.d.ts +8 -0
- package/dist/bundle/four-meme/core-helpers.js +41 -0
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/core.d.ts +1 -1
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/core.js +74 -150
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/pancake-proxy.d.ts +1 -1
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/pancake-proxy.js +85 -92
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/private.d.ts +1 -1
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/private.js +48 -59
- package/dist/bundle/four-meme/sign-context-helpers.d.ts +2 -0
- package/dist/bundle/four-meme/sign-context-helpers.js +2 -0
- package/dist/bundle/four-meme/swap-buy-first.d.ts +8 -0
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/swap-buy-first.js +56 -108
- package/dist/bundle/four-meme/swap-hop-helpers.d.ts +6 -0
- package/dist/bundle/four-meme/swap-hop-helpers.js +63 -0
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/swap-internal.js +4 -4
- package/dist/bundle/four-meme/swap-sign-helpers.d.ts +28 -0
- package/dist/bundle/four-meme/swap-sign-helpers.js +105 -0
- package/dist/bundle/four-meme/swap.d.ts +17 -0
- package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/swap.js +84 -345
- package/dist/{contracts/tm-bundle-merkle/swap-buy-first.d.ts → bundle/four-meme/types/buy-first.d.ts} +11 -18
- package/dist/bundle/four-meme/types/core-flow.d.ts +63 -0
- package/dist/bundle/four-meme/types/core-flow.js +1 -0
- package/dist/{contracts/tm-bundle-merkle/types.d.ts → bundle/four-meme/types/index.d.ts} +130 -6
- package/dist/bundle/four-meme/types/index.js +1 -0
- package/dist/bundle/four-meme/types/swap-internal.d.ts +19 -0
- package/dist/bundle/four-meme/types/swap-internal.js +1 -0
- package/dist/bundle/four-meme/types.d.ts +1 -0
- package/dist/bundle/four-meme/utils-disperse.d.ts +7 -0
- package/dist/bundle/four-meme/utils-disperse.js +396 -0
- package/dist/bundle/four-meme/utils-pairwise.d.ts +8 -0
- package/dist/bundle/four-meme/utils-pairwise.js +328 -0
- package/dist/bundle/four-meme/utils-sweep.d.ts +8 -0
- package/dist/bundle/four-meme/utils-sweep.js +744 -0
- package/dist/bundle/index.d.ts +8 -0
- package/dist/bundle/index.js +8 -0
- package/dist/bundle/internal.d.ts +16 -0
- package/dist/bundle/internal.js +160 -0
- package/dist/bundle/sign-context-helpers.d.ts +26 -0
- package/dist/bundle/sign-context-helpers.js +63 -0
- package/dist/{contracts/tm-bundle-merkle → bundle}/submit.d.ts +6 -27
- package/dist/{contracts/tm-bundle-merkle → bundle}/submit.js +116 -313
- package/dist/bundle/types/index.d.ts +8 -0
- package/dist/bundle/types/index.js +1 -0
- package/dist/bundle/types.d.ts +1 -0
- package/dist/bundle/types.js +1 -0
- package/dist/chains/bsc/constants.js +1 -1
- 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 +155 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +80 -0
- package/dist/chains/bsc/pancake/bundle-buy-first.d.ts +1 -91
- package/dist/chains/bsc/pancake/bundle-buy-first.js +99 -214
- 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/constants.js +1 -1
- 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 +5 -2
- package/dist/chains/eni/batch-router/bundle-approve.js +4 -3
- package/dist/chains/eni/batch-router/transfer.js +57 -27
- 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 +2 -2
- 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 +3 -3
- 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 +29 -45
- package/dist/chains/eni/platforms/daoaas/portal.js +10 -6
- package/dist/chains/eni/platforms/dswap/liquidity.js +59 -27
- package/dist/chains/eni/platforms/fair-launch/constants.js +1 -1
- 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 +88 -47
- package/dist/chains/eni/platforms/fair-launch/pool.js +5 -2
- package/dist/chains/eni/platforms/fair-launch/presets.js +2 -2
- package/dist/chains/eni/platforms/iro/constants.d.ts +1 -1
- package/dist/chains/eni/platforms/iro/constants.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 +108 -32
- 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 +287 -0
- package/dist/chains/index.d.ts +13 -0
- package/dist/chains/index.js +13 -0
- package/dist/chains/monad/constants.js +1 -1
- package/dist/chains/xlayer/constants.d.ts +5 -0
- package/dist/chains/xlayer/constants.js +1 -1
- 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 +104 -74
- package/dist/chains/xlayer/eip7702/bundle-sell.d.ts +2 -6
- package/dist/chains/xlayer/eip7702/bundle-sell.js +30 -112
- package/dist/chains/xlayer/eip7702/bundle-swap.d.ts +3 -65
- package/dist/chains/xlayer/eip7702/bundle-swap.js +52 -246
- package/dist/chains/xlayer/eip7702/constants.d.ts +11 -26
- package/dist/chains/xlayer/eip7702/constants.js +15 -68
- 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 +64 -308
- package/dist/chains/xlayer/eip7702/transfer-context-helpers.d.ts +26 -0
- package/dist/chains/xlayer/eip7702/transfer-context-helpers.js +58 -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.d.ts +1 -1
- package/dist/chains/xlayer/eoa/constants.js +2 -16
- package/dist/chains/xlayer/eoa/dex-helpers.d.ts +1 -1
- package/dist/chains/xlayer/eoa/dex-helpers.js +7 -37
- 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 +5 -4
- 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/core/amount/split-by-weight.d.ts +5 -0
- package/dist/core/amount/split-by-weight.js +35 -0
- package/dist/{shared → core}/clients/blockrazor.d.ts +4 -8
- package/dist/{shared → core}/clients/blockrazor.js +43 -35
- package/dist/{shared → core}/clients/club48.d.ts +2 -2
- package/dist/{shared → core}/clients/club48.js +36 -30
- package/dist/{shared → core}/clients/emitservice.js +2 -0
- package/dist/{shared → core}/clients/four.d.ts +21 -6
- package/dist/{shared → core}/clients/four.js +29 -24
- package/dist/core/clients/index.d.ts +8 -0
- package/dist/core/clients/index.js +8 -0
- package/dist/{shared → core}/clients/merkle.d.ts +4 -3
- package/dist/{shared → core}/clients/merkle.js +30 -47
- package/dist/{shared → core}/constants/addresses.d.ts +27 -1
- package/dist/{shared → core}/constants/addresses.js +39 -2
- package/dist/{shared → core}/constants/chains.d.ts +1 -1
- package/dist/{shared → core}/constants/chains.js +1 -1
- package/dist/{shared → core}/constants/gas.d.ts +1 -1
- package/dist/{shared → core}/constants/gas.js +2 -6
- package/dist/{shared → core}/constants/index.d.ts +5 -2
- package/dist/{shared → core}/constants/index.js +3 -2
- package/dist/core/constants/quote.d.ts +30 -0
- package/dist/core/constants/quote.js +37 -0
- package/dist/core/dex/v3-path.d.ts +6 -0
- package/dist/core/dex/v3-path.js +35 -0
- package/dist/core/erc20/decimals.d.ts +7 -0
- package/dist/core/erc20/decimals.js +24 -0
- package/dist/{utils → core}/erc20.d.ts +7 -89
- package/dist/{utils → core}/erc20.js +99 -130
- package/dist/core/foundation.d.ts +15 -0
- package/dist/core/foundation.js +14 -0
- package/dist/core/gas/bundle-gas.d.ts +49 -0
- package/dist/core/gas/bundle-gas.js +93 -0
- package/dist/core/gas/profit-hop.d.ts +20 -0
- package/dist/core/gas/profit-hop.js +72 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +5 -0
- package/dist/core/legacy-types/errors.d.ts +27 -0
- package/dist/core/legacy-types/errors.js +34 -0
- package/dist/core/nonce/nonce-manager.d.ts +19 -0
- package/dist/core/nonce/nonce-manager.js +217 -0
- package/dist/core/normalize-unknown.d.ts +9 -0
- package/dist/core/normalize-unknown.js +29 -0
- package/dist/core/sdk-logger.d.ts +13 -0
- package/dist/core/sdk-logger.js +12 -0
- package/dist/core/shared-abis/common.d.ts +4 -0
- package/dist/core/shared-abis/common.js +4 -0
- package/dist/core/shared-abis/index.d.ts +5 -0
- package/dist/core/shared-abis/index.js +5 -0
- package/dist/core/tx/build-request.d.ts +17 -0
- package/dist/core/tx/build-request.js +25 -0
- package/dist/core/tx/sign-batch.d.ts +5 -0
- package/dist/core/tx/sign-batch.js +26 -0
- package/dist/core/tx/wallet-sign-patch.d.ts +1 -0
- package/dist/core/tx/wallet-sign-patch.js +18 -0
- package/dist/core/types/airdrop-sweep.d.ts +79 -0
- package/dist/core/types/airdrop-sweep.js +1 -0
- package/dist/core/types/erc20.d.ts +65 -0
- package/dist/core/types/erc20.js +1 -0
- package/dist/core/types/holders-maker.d.ts +64 -0
- package/dist/core/types/holders-maker.js +1 -0
- package/dist/core/types/index.d.ts +7 -0
- package/dist/core/types/index.js +1 -0
- package/dist/{utils → core/types}/lp-inspect.d.ts +4 -52
- package/dist/core/types/lp-inspect.js +1 -0
- package/dist/core/types/multicall.d.ts +5 -0
- package/dist/core/types/multicall.js +1 -0
- package/dist/core/types/private-sale.d.ts +35 -0
- package/dist/core/types/private-sale.js +1 -0
- package/dist/core/types/quote-helpers.d.ts +17 -0
- package/dist/core/types/quote-helpers.js +1 -0
- package/dist/core/types-erc20.d.ts +1 -0
- package/dist/core/types-erc20.js +1 -0
- package/dist/core/wallet/generate.d.ts +5 -0
- package/dist/core/wallet/generate.js +8 -0
- package/dist/domains/dex/direct-router-helpers.d.ts +269 -0
- package/dist/domains/dex/direct-router-helpers.js +536 -0
- package/dist/domains/dex/direct-router.d.ts +28 -0
- package/dist/{dex → domains/dex}/direct-router.js +246 -674
- package/dist/domains/dex/types.d.ts +81 -0
- package/dist/domains/dex/types.js +1 -0
- package/dist/{shared → domains}/flap/abi.js +1 -1
- package/dist/{shared → domains}/flap/constants.d.ts +1 -2
- package/dist/{shared → domains}/flap/constants.js +3 -4
- package/dist/{shared → domains}/flap/curve.js +3 -0
- package/dist/{shared → domains}/flap/errors.d.ts +1 -4
- package/dist/{shared → domains}/flap/errors.js +20 -1
- package/dist/domains/flap/index.d.ts +7 -0
- package/dist/domains/flap/index.js +5 -0
- package/dist/{shared → domains}/flap/meta.d.ts +22 -18
- package/dist/{shared → domains}/flap/meta.js +32 -24
- package/dist/{shared/flap/index.d.ts → domains/flap/module.d.ts} +4 -5
- package/dist/{shared/flap/index.js → domains/flap/module.js} +4 -5
- package/dist/{shared → domains}/flap/permit.js +10 -3
- package/dist/{shared → domains}/flap/pinata.d.ts +22 -6
- package/dist/{shared → domains}/flap/pinata.js +21 -26
- package/dist/domains/flap/portal-bundle-merkle/config.d.ts +10 -0
- package/dist/domains/flap/portal-bundle-merkle/config.js +13 -0
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.d.ts +32 -0
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.js +83 -0
- package/dist/{shared → domains}/flap/portal-bundle-merkle/core.d.ts +0 -4
- package/dist/{shared → domains}/flap/portal-bundle-merkle/core.js +168 -175
- package/dist/{shared → domains}/flap/portal-bundle-merkle/create-to-dex.d.ts +17 -4
- package/dist/{shared → domains}/flap/portal-bundle-merkle/create-to-dex.js +97 -118
- package/dist/{shared → domains}/flap/portal-bundle-merkle/curve-to-dex.js +105 -123
- package/dist/domains/flap/portal-bundle-merkle/index.d.ts +18 -0
- package/dist/{shared → domains}/flap/portal-bundle-merkle/index.js +4 -7
- package/dist/{shared → domains}/flap/portal-bundle-merkle/pancake-proxy.js +73 -70
- package/dist/{shared → domains}/flap/portal-bundle-merkle/private.js +63 -116
- package/dist/domains/flap/portal-bundle-merkle/swap-batch.d.ts +8 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-batch.js +227 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +125 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.js +113 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first.d.ts +2 -0
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-buy-first.js +69 -288
- package/dist/domains/flap/portal-bundle-merkle/swap-cross.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-cross.js +139 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.d.ts +149 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.js +259 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-planning.d.ts +70 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-planning.js +182 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-quick-batch.d.ts +16 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-quick-batch.js +327 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-single.d.ts +2 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-single.js +184 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-types.d.ts +101 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/swap.d.ts +8 -0
- package/dist/domains/flap/portal-bundle-merkle/swap.js +7 -0
- package/dist/{shared → domains}/flap/portal-bundle-merkle/types.d.ts +88 -12
- package/dist/domains/flap/portal-bundle-merkle/types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/utils.d.ts +10 -0
- package/dist/{shared → domains}/flap/portal-bundle-merkle/utils.js +145 -265
- package/dist/{shared → domains}/flap/portal-bundle.d.ts +2 -2
- package/dist/{shared → domains}/flap/portal-bundle.js +84 -79
- package/dist/domains/flap/portal-create-token.d.ts +81 -0
- package/dist/domains/flap/portal-create-token.js +255 -0
- package/dist/{shared → domains}/flap/portal.d.ts +1 -2
- package/dist/{shared → domains}/flap/portal.js +36 -28
- package/dist/{shared → domains}/flap/vanity.d.ts +6 -6
- package/dist/{shared → domains}/flap/vanity.js +15 -21
- package/dist/{shared → domains}/flap/vault.d.ts +25 -93
- package/dist/{shared → domains}/flap/vault.js +77 -127
- package/dist/{flows → domains/flows}/create.d.ts +2 -1
- package/dist/{flows → domains/flows}/create.js +8 -8
- package/dist/domains/flows/index.d.ts +9 -0
- package/dist/domains/flows/index.js +9 -0
- package/dist/{contracts → domains/four/contracts}/helper3.d.ts +20 -5
- package/dist/{contracts → domains/four/contracts}/helper3.js +56 -20
- package/dist/domains/four/contracts/tm-bundle-helpers.d.ts +88 -0
- package/dist/domains/four/contracts/tm-bundle-helpers.js +73 -0
- package/dist/{contracts → domains/four/contracts}/tm-bundle.d.ts +4 -52
- package/dist/{contracts → domains/four/contracts}/tm-bundle.js +122 -189
- package/dist/{contracts → domains/four/contracts}/tm.d.ts +10 -8
- package/dist/{contracts → domains/four/contracts}/tm.js +39 -35
- package/dist/{contracts → domains/four/contracts}/tm1.js +9 -4
- package/dist/{contracts → domains/four/contracts}/tm2.js +10 -5
- package/dist/domains/four/index.d.ts +7 -0
- package/dist/domains/four/index.js +7 -0
- package/dist/{shared → domains}/four/tax-token.d.ts +1 -1
- package/dist/{shared → domains}/four/tax-token.js +31 -10
- package/dist/domains/holders/holders-maker-helpers.d.ts +9 -0
- package/dist/domains/holders/holders-maker-helpers.js +9 -0
- package/dist/domains/holders/holders-maker.d.ts +18 -0
- package/dist/domains/holders/holders-maker.js +324 -0
- package/dist/domains/holders/index.d.ts +1 -0
- package/dist/domains/holders/index.js +1 -0
- package/dist/domains/holders/internal/addresses.d.ts +12 -0
- package/dist/domains/holders/internal/addresses.js +15 -0
- package/dist/domains/holders/internal/buy-tx.d.ts +44 -0
- package/dist/domains/holders/internal/buy-tx.js +278 -0
- package/dist/domains/holders/internal/constants.d.ts +6 -0
- package/dist/domains/holders/internal/constants.js +7 -0
- package/dist/domains/holders/internal/disperse.d.ts +18 -0
- package/dist/domains/holders/internal/disperse.js +90 -0
- package/dist/domains/holders/internal/routing.d.ts +4 -0
- package/dist/domains/holders/internal/routing.js +45 -0
- package/dist/domains/holders/internal/transfer-tx.d.ts +4 -0
- package/dist/domains/holders/internal/transfer-tx.js +67 -0
- package/dist/domains/holders/types.d.ts +1 -0
- package/dist/domains/holders/types.js +1 -0
- package/dist/domains/lp-inspect/index.d.ts +1 -0
- package/dist/domains/lp-inspect/index.js +1 -0
- package/dist/domains/lp-inspect/lp-inspect-helpers.d.ts +9 -0
- package/dist/domains/lp-inspect/lp-inspect-helpers.js +109 -0
- package/dist/domains/lp-inspect/lp-inspect.d.ts +40 -0
- package/dist/{utils → domains/lp-inspect}/lp-inspect.js +78 -293
- package/dist/domains/lp-inspect/types.d.ts +1 -0
- package/dist/domains/lp-inspect/types.js +1 -0
- package/dist/domains/merkle/index.d.ts +12 -0
- package/dist/domains/merkle/index.js +11 -0
- package/dist/domains/private-sale/index.d.ts +1 -0
- package/dist/domains/private-sale/index.js +1 -0
- package/dist/domains/private-sale/private-sale.d.ts +34 -0
- package/dist/{utils → domains/private-sale}/private-sale.js +5 -16
- package/dist/domains/private-sale/types.d.ts +1 -0
- package/dist/domains/private-sale/types.js +1 -0
- package/dist/domains/quote/index.d.ts +1 -0
- package/dist/domains/quote/index.js +1 -0
- package/dist/{utils → domains/quote}/quote-helpers.d.ts +4 -45
- package/dist/{utils → domains/quote}/quote-helpers.js +17 -74
- package/dist/domains/quote/types.d.ts +1 -0
- package/dist/domains/quote/types.js +1 -0
- package/dist/domains/vanity/index.d.ts +5 -0
- package/dist/domains/vanity/index.js +5 -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/index.d.ts +17 -88
- package/dist/index.js +17 -218
- 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/errors.d.ts +12 -1
- package/dist/utils/errors.js +60 -1
- package/dist/utils/hop-chains.d.ts +35 -0
- package/dist/utils/hop-chains.js +215 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/mpcExclusive.d.ts +2 -5
- package/dist/utils/mpcExclusive.js +4 -3
- package/dist/utils/provider-factory.d.ts +4 -0
- package/dist/utils/provider-factory.js +10 -0
- package/dist/utils/stealth-transfer.d.ts +2 -28
- package/dist/utils/stealth-transfer.js +41 -21
- package/dist/utils/swap-helpers.d.ts +2 -15
- package/dist/utils/swap-helpers.js +7 -12
- 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/errors.d.ts +1 -0
- package/dist/utils/types/errors.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/mpc-exclusive.d.ts +5 -0
- package/dist/utils/types/mpc-exclusive.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 +4 -25
- package/dist/utils/wallet.js +27 -22
- package/package.json +96 -2
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.d.ts +0 -26
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.js +0 -113
- package/dist/contracts/tm-bundle-merkle/config.d.ts +0 -70
- package/dist/contracts/tm-bundle-merkle/config.js +0 -114
- package/dist/contracts/tm-bundle-merkle/index.d.ts +0 -15
- package/dist/contracts/tm-bundle-merkle/index.js +0 -29
- package/dist/contracts/tm-bundle-merkle/internal.d.ts +0 -48
- package/dist/contracts/tm-bundle-merkle/internal.js +0 -240
- package/dist/contracts/tm-bundle-merkle/swap.d.ts +0 -146
- package/dist/contracts/tm-bundle-merkle/utils.d.ts +0 -20
- package/dist/contracts/tm-bundle-merkle/utils.js +0 -1503
- package/dist/dex/direct-router.d.ts +0 -150
- package/dist/shared/abis/TaxToken.json +0 -105
- package/dist/shared/abis/TokenManager2.json +0 -60
- package/dist/shared/flap/graduated-dex.d.ts +0 -1
- package/dist/shared/flap/graduated-dex.js +0 -1
- package/dist/shared/flap/launch-v6.d.ts +0 -132
- package/dist/shared/flap/launch-v6.js +0 -137
- package/dist/shared/flap/portal-bundle-merkle/config.d.ts +0 -79
- package/dist/shared/flap/portal-bundle-merkle/config.js +0 -133
- package/dist/shared/flap/portal-bundle-merkle/index.d.ts +0 -14
- package/dist/shared/flap/portal-bundle-merkle/swap-buy-first.d.ts +0 -65
- package/dist/shared/flap/portal-bundle-merkle/swap.d.ts +0 -201
- package/dist/shared/flap/portal-bundle-merkle/swap.js +0 -1359
- package/dist/shared/flap/portal-bundle-merkle/utils.d.ts +0 -89
- package/dist/shared/flap/portal-create-token.d.ts +0 -63
- package/dist/shared/flap/portal-create-token.js +0 -258
- package/dist/shared/four/index.d.ts +0 -7
- package/dist/shared/four/index.js +0 -22
- package/dist/shared/index.d.ts +0 -10
- package/dist/shared/index.js +0 -10
- package/dist/utils/holders-maker.d.ts +0 -154
- package/dist/utils/holders-maker.js +0 -945
- package/dist/utils/pcs-infinity-cl.d.ts +0 -65
- package/dist/utils/pcs-infinity-cl.js +0 -426
- package/dist/utils/private-sale.d.ts +0 -90
- /package/dist/{shared/abis → abis/contracts}/TokenManager.json +0 -0
- /package/dist/{shared/abis → abis/contracts}/TokenManagerHelper3.json +0 -0
- /package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/swap-internal.d.ts +0 -0
- /package/dist/{shared/flap/portal-bundle-merkle/types.js → bundle/four-meme/types/buy-first.js} +0 -0
- /package/dist/{contracts/tm-bundle-merkle → bundle/four-meme}/types.js +0 -0
- /package/dist/{shared → core}/clients/emitservice.d.ts +0 -0
- /package/dist/{shared → core}/constants/profit.d.ts +0 -0
- /package/dist/{shared → core}/constants/profit.js +0 -0
- /package/dist/{dex → domains/dex}/index.d.ts +0 -0
- /package/dist/{dex → domains/dex}/index.js +0 -0
- /package/dist/{shared → domains}/flap/abi.d.ts +0 -0
- /package/dist/{shared → domains}/flap/curve.d.ts +0 -0
- /package/dist/{shared → domains}/flap/ipfs.d.ts +0 -0
- /package/dist/{shared → domains}/flap/ipfs.js +0 -0
- /package/dist/{shared → domains}/flap/permit.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/curve-to-dex.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/pancake-proxy.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/private.d.ts +0 -0
- /package/dist/{contracts → domains/four/contracts}/tm1.d.ts +0 -0
- /package/dist/{contracts → domains/four/contracts}/tm2.d.ts +0 -0
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 直接 Router 交易(不走代理合约)
|
|
3
|
-
*
|
|
4
|
-
* 支持:
|
|
5
|
-
* - BSC: PancakeSwap V2/V3
|
|
6
|
-
* - Monad: PancakeSwap V2, Uniswap V2/V3
|
|
7
|
-
*
|
|
8
|
-
* 收费方式:交易末尾附加利润提取交易(和内盘一致)
|
|
9
|
-
*/
|
|
10
|
-
/** Router 地址配置 - ✅ 使用公共模块中的地址 */
|
|
11
|
-
export declare const DIRECT_ROUTERS: {
|
|
12
|
-
readonly BSC: {
|
|
13
|
-
readonly PANCAKESWAP_V2: "0x10ED43C718714eb63d5aA57B78B54704E256024E";
|
|
14
|
-
readonly PANCAKESWAP_V3: "0x13f4EA83D0bd40E75C8222255bc855a974568Dd4";
|
|
15
|
-
readonly IROSWAP_V2: "0xe90fb729E458092592a79EdaFefB3404ecb3C463";
|
|
16
|
-
readonly WBNB: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
|
|
17
|
-
};
|
|
18
|
-
readonly MONAD: {
|
|
19
|
-
readonly PANCAKESWAP_V2: "0xB1Bc24c34e88f7D43D5923034E3a14B24DaACfF9";
|
|
20
|
-
readonly PANCAKESWAP_V3: "0x1b81D678ffb9C0263b24A97847620C99d213eB14";
|
|
21
|
-
readonly UNISWAP_V2: "0x4b2ab38dbf28d31d467aa8993f6c2585981d6804";
|
|
22
|
-
readonly UNISWAP_V3: "0xd6145b2d3f379919e8cdeda7b97e37c4b2ca9c40";
|
|
23
|
-
readonly WMON: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a";
|
|
24
|
-
};
|
|
25
|
-
readonly XLAYER: {
|
|
26
|
-
readonly POTATOSWAP_V2: "0x881fb2f98c13d521009464e7d1cbf16e1b394e8e";
|
|
27
|
-
readonly POTATOSWAP_V3: "0xB45D0149249488333E3F3f9F359807F4b810C1FC";
|
|
28
|
-
readonly DYORSWAP_ROUTER: "0xfb001fbbace32f09cb6d3c449b935183de53ee96";
|
|
29
|
-
readonly DYORSWAP_FACTORY: "0x2CcaDb1e437AA9cDc741574bDa154686B1F04C09";
|
|
30
|
-
readonly V3_ROUTER: "0xBB069e9465BcabC4F488d21e793BDEf0F2d41D41";
|
|
31
|
-
readonly V3_FACTORY: "0xa1415fAe79c4B196d087F02b8aD5a622B8A827E5";
|
|
32
|
-
readonly WOKB: "0xe538905cf8410324e03a5a23c1c177a474d59b2b";
|
|
33
|
-
};
|
|
34
|
-
readonly ENI: {
|
|
35
|
-
readonly DSWAP_V2: "0x97ed8be49d9a8b86247090aa41e908e76b8fcf22";
|
|
36
|
-
readonly DSWAP_V3: "0xcdE487F5B460a516f31FaC520D4e18BA1C8cda49";
|
|
37
|
-
readonly IROSWAP_V2: "0x93b1199fA96f6b9b1f993AA0226eB6076968a9BF";
|
|
38
|
-
readonly WEGAS: "0x6d1e851446f4d004ae2a72f9afed85e8829a205e";
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
/** ERC20 ABI - ✅ 从公共模块导入 */
|
|
42
|
-
export interface DirectRouterSignConfig {
|
|
43
|
-
rpcUrl: string;
|
|
44
|
-
chainId?: number;
|
|
45
|
-
gasLimit?: number | bigint;
|
|
46
|
-
gasLimitMultiplier?: number;
|
|
47
|
-
gasPrice?: bigint;
|
|
48
|
-
minGasPriceGwei?: number;
|
|
49
|
-
maxGasPriceGwei?: number;
|
|
50
|
-
txType?: 0 | 2;
|
|
51
|
-
/** 是否跳过授权检查 */
|
|
52
|
-
skipApprovalCheck?: boolean;
|
|
53
|
-
/** 滑点(基点),默认 100 = 1% */
|
|
54
|
-
slippageBps?: number;
|
|
55
|
-
/** BlockRazor 贿赂金额(BNB),仅 BSC 链有效,用于提高 bundle 打包优先级 */
|
|
56
|
-
bribeAmount?: number;
|
|
57
|
-
/** ✅ 利润模式:'single'(默认,从最大钱包统一扣)或 'distributed'(每个钱包独立扣) */
|
|
58
|
-
profitMode?: 'single' | 'distributed';
|
|
59
|
-
/** ✅ 是否跳过利润扣除(EOA 普通模式使用) */
|
|
60
|
-
skipProfit?: boolean;
|
|
61
|
-
}
|
|
62
|
-
export interface DirectV2BuyParams {
|
|
63
|
-
chain: 'BSC' | 'MONAD' | 'XLAYER' | 'ENI';
|
|
64
|
-
privateKeys: string[];
|
|
65
|
-
buyAmounts: string[];
|
|
66
|
-
tokenAddress: string;
|
|
67
|
-
routerAddress: string;
|
|
68
|
-
quoteToken?: string;
|
|
69
|
-
quoteTokenDecimals?: number;
|
|
70
|
-
startNonces?: number[];
|
|
71
|
-
config: DirectRouterSignConfig;
|
|
72
|
-
}
|
|
73
|
-
export interface DirectV2SellParams {
|
|
74
|
-
chain: 'BSC' | 'MONAD' | 'XLAYER' | 'ENI';
|
|
75
|
-
privateKeys: string[];
|
|
76
|
-
sellPercentages?: number[];
|
|
77
|
-
sellAmounts?: string[];
|
|
78
|
-
startNonces?: number[];
|
|
79
|
-
tokenAddress: string;
|
|
80
|
-
tokenDecimals?: number;
|
|
81
|
-
routerAddress: string;
|
|
82
|
-
quoteToken?: string;
|
|
83
|
-
config: DirectRouterSignConfig;
|
|
84
|
-
}
|
|
85
|
-
export interface DirectV3BuyParams {
|
|
86
|
-
chain: 'BSC' | 'MONAD' | 'XLAYER' | 'ENI';
|
|
87
|
-
privateKeys: string[];
|
|
88
|
-
buyAmounts: string[];
|
|
89
|
-
tokenAddress: string;
|
|
90
|
-
routerAddress: string;
|
|
91
|
-
fee: number;
|
|
92
|
-
quoteToken?: string;
|
|
93
|
-
quoteTokenDecimals?: number;
|
|
94
|
-
startNonces?: number[];
|
|
95
|
-
config: DirectRouterSignConfig;
|
|
96
|
-
}
|
|
97
|
-
export interface DirectV3SellParams {
|
|
98
|
-
chain: 'BSC' | 'MONAD' | 'XLAYER' | 'ENI';
|
|
99
|
-
privateKeys: string[];
|
|
100
|
-
sellPercentages?: number[];
|
|
101
|
-
sellAmounts?: string[];
|
|
102
|
-
tokenAddress: string;
|
|
103
|
-
tokenDecimals?: number;
|
|
104
|
-
routerAddress: string;
|
|
105
|
-
fee: number;
|
|
106
|
-
quoteToken?: string;
|
|
107
|
-
startNonces?: number[];
|
|
108
|
-
config: DirectRouterSignConfig;
|
|
109
|
-
}
|
|
110
|
-
import type { GeneratedWallet } from '../utils/wallet.js';
|
|
111
|
-
export interface DirectRouterResult {
|
|
112
|
-
signedTransactions: string[];
|
|
113
|
-
profitHopWallets?: GeneratedWallet[];
|
|
114
|
-
metadata?: {
|
|
115
|
-
profitMode?: 'single' | 'distributed';
|
|
116
|
-
profitAmount: string;
|
|
117
|
-
profitRecipient: string;
|
|
118
|
-
totalFlow: string;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* V2 批量买入(直接调用 Router)
|
|
123
|
-
*/
|
|
124
|
-
export declare function directV2BatchBuy(params: DirectV2BuyParams): Promise<DirectRouterResult>;
|
|
125
|
-
/**
|
|
126
|
-
* V2 批量卖出(直接调用 Router)
|
|
127
|
-
*/
|
|
128
|
-
export declare function directV2BatchSell(params: DirectV2SellParams): Promise<DirectRouterResult>;
|
|
129
|
-
/**
|
|
130
|
-
* V3 批量买入(直接调用 Router)
|
|
131
|
-
*
|
|
132
|
-
* 自动识别 SwapRouter 版本:
|
|
133
|
-
* - SwapRouter02 (PancakeSwap V3): exactInputSingle 不含 deadline,multicall 含 deadline
|
|
134
|
-
* - SwapRouter (旧版 Uniswap V3): exactInputSingle 含 deadline,multicall 不含 deadline
|
|
135
|
-
*/
|
|
136
|
-
export declare function directV3BatchBuy(params: DirectV3BuyParams): Promise<DirectRouterResult>;
|
|
137
|
-
/**
|
|
138
|
-
* V3 批量卖出(直接调用 Router)
|
|
139
|
-
*
|
|
140
|
-
* 自动识别 SwapRouter 版本:
|
|
141
|
-
* - SwapRouter02 (PancakeSwap V3): exactInputSingle 不含 deadline,multicall 含 deadline
|
|
142
|
-
* - SwapRouter (旧版 Uniswap V3): exactInputSingle 含 deadline,multicall 不含 deadline
|
|
143
|
-
*/
|
|
144
|
-
export declare function directV3BatchSell(params: DirectV3SellParams): Promise<DirectRouterResult>;
|
|
145
|
-
export type DexKey = 'PANCAKESWAP' | 'UNISWAP' | 'POTATOSWAP' | 'DYORSWAP' | 'IROSWAP';
|
|
146
|
-
export type RouterVersion = 'v2' | 'v3';
|
|
147
|
-
/**
|
|
148
|
-
* 根据链和 DEX 获取 Router 地址
|
|
149
|
-
*/
|
|
150
|
-
export declare function getRouterAddress(chain: 'BSC' | 'MONAD' | 'XLAYER' | 'ENI', dexKey: DexKey, version: RouterVersion): string;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"anonymous": false,
|
|
4
|
-
"inputs": [
|
|
5
|
-
{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" },
|
|
6
|
-
{ "indexed": true, "internalType": "address", "name": "spender", "type": "address" },
|
|
7
|
-
{ "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }
|
|
8
|
-
],
|
|
9
|
-
"name": "Approval",
|
|
10
|
-
"type": "event"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"anonymous": false,
|
|
14
|
-
"inputs": [
|
|
15
|
-
{ "indexed": false, "internalType": "address", "name": "account", "type": "address" },
|
|
16
|
-
{ "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }
|
|
17
|
-
],
|
|
18
|
-
"name": "FeeClaimed",
|
|
19
|
-
"type": "event"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"anonymous": false,
|
|
23
|
-
"inputs": [
|
|
24
|
-
{ "indexed": false, "internalType": "uint256", "name": "amountFounder", "type": "uint256" },
|
|
25
|
-
{ "indexed": false, "internalType": "uint256", "name": "amountHolder", "type": "uint256" },
|
|
26
|
-
{ "indexed": false, "internalType": "uint256", "name": "amountBurn", "type": "uint256" },
|
|
27
|
-
{ "indexed": false, "internalType": "uint256", "name": "amountLiquidity", "type": "uint256" },
|
|
28
|
-
{ "indexed": false, "internalType": "uint256", "name": "quoteFounder", "type": "uint256" },
|
|
29
|
-
{ "indexed": false, "internalType": "uint256", "name": "quoteHolder", "type": "uint256" }
|
|
30
|
-
],
|
|
31
|
-
"name": "FeeDispatched",
|
|
32
|
-
"type": "event"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"anonymous": false,
|
|
36
|
-
"inputs": [
|
|
37
|
-
{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
|
|
38
|
-
{ "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
|
|
39
|
-
],
|
|
40
|
-
"name": "OwnershipTransferred",
|
|
41
|
-
"type": "event"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"anonymous": false,
|
|
45
|
-
"inputs": [
|
|
46
|
-
{ "indexed": true, "internalType": "address", "name": "from", "type": "address" },
|
|
47
|
-
{ "indexed": true, "internalType": "address", "name": "to", "type": "address" },
|
|
48
|
-
{ "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }
|
|
49
|
-
],
|
|
50
|
-
"name": "Transfer",
|
|
51
|
-
"type": "event"
|
|
52
|
-
},
|
|
53
|
-
{ "inputs": [], "name": "DEAD", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
54
|
-
{ "inputs": [], "name": "MODE_NORMAL", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
55
|
-
{ "inputs": [], "name": "MODE_TRANSFER_CONTROLLED", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
56
|
-
{ "inputs": [], "name": "MODE_TRANSFER_RESTRICTED", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
57
|
-
{ "inputs": [], "name": "PANCAKE_FACTORY", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
58
|
-
{ "inputs": [], "name": "PANCAKE_ROUTER", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
59
|
-
{ "inputs": [], "name": "SHARE_HOLDER_MANAGER", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
60
|
-
{ "inputs": [], "name": "TOKEN_HELPER_5", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
61
|
-
{ "inputs": [], "name": "TOKEN_MANAGER_2", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
62
|
-
{ "inputs": [], "name": "WETH", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
63
|
-
{ "inputs": [], "name": "_mode", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
64
|
-
{ "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" }], "name": "allowance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
65
|
-
{ "inputs": [{ "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "approve", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" },
|
|
66
|
-
{ "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "balanceOf", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
67
|
-
{ "inputs": [], "name": "claimFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
|
|
68
|
-
{ "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "claimableFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
69
|
-
{ "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "claimedFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
70
|
-
{ "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" },
|
|
71
|
-
{ "inputs": [{ "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" }], "name": "decreaseAllowance", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" },
|
|
72
|
-
{ "inputs": [], "name": "feeAccumulated", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
73
|
-
{ "inputs": [], "name": "feeBurn", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
74
|
-
{ "inputs": [], "name": "feeDispatched", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
75
|
-
{ "inputs": [], "name": "feeFounder", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
76
|
-
{ "inputs": [], "name": "feeHolder", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
77
|
-
{ "inputs": [], "name": "feeLiquidity", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
78
|
-
{ "inputs": [], "name": "feePerShare", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
79
|
-
{ "inputs": [], "name": "feeRate", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
80
|
-
{ "inputs": [], "name": "founder", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
81
|
-
{ "inputs": [{ "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" }], "name": "increaseAllowance", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" },
|
|
82
|
-
{ "inputs": [{ "components": [{ "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "address", "name": "founder", "type": "address" }, { "internalType": "uint256", "name": "feeRate", "type": "uint256" }, { "internalType": "uint256", "name": "rateFounder", "type": "uint256" }, { "internalType": "uint256", "name": "rateHolder", "type": "uint256" }, { "internalType": "uint256", "name": "rateBurn", "type": "uint256" }, { "internalType": "uint256", "name": "rateLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "minDispatch", "type": "uint256" }, { "internalType": "uint256", "name": "minShare", "type": "uint256" }], "internalType": "struct ITokenCreator5.InitParams", "name": "a", "type": "tuple" }], "name": "init", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
|
|
83
|
-
{ "inputs": [], "name": "minDispatch", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
84
|
-
{ "inputs": [], "name": "minShare", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
85
|
-
{ "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" },
|
|
86
|
-
{ "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
87
|
-
{ "inputs": [], "name": "pair", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
88
|
-
{ "inputs": [], "name": "quote", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
|
|
89
|
-
{ "inputs": [], "name": "quoteClaimed", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
90
|
-
{ "inputs": [], "name": "quoteFounder", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
91
|
-
{ "inputs": [], "name": "quoteHolder", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
92
|
-
{ "inputs": [], "name": "rateBurn", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
93
|
-
{ "inputs": [], "name": "rateFounder", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
94
|
-
{ "inputs": [], "name": "rateHolder", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
95
|
-
{ "inputs": [], "name": "rateLiquidity", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
96
|
-
{ "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
|
|
97
|
-
{ "inputs": [{ "internalType": "uint256", "name": "v", "type": "uint256" }], "name": "setMode", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
|
|
98
|
-
{ "inputs": [], "name": "symbol", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" },
|
|
99
|
-
{ "inputs": [], "name": "totalShares", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
100
|
-
{ "inputs": [], "name": "totalSupply", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
|
|
101
|
-
{ "inputs": [{ "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "transfer", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" },
|
|
102
|
-
{ "inputs": [{ "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "transferFrom", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" },
|
|
103
|
-
{ "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
|
|
104
|
-
{ "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "userInfo", "outputs": [{ "internalType": "uint256", "name": "share", "type": "uint256" }, { "internalType": "uint256", "name": "rewardDebt", "type": "uint256" }, { "internalType": "uint256", "name": "claimable", "type": "uint256" }, { "internalType": "uint256", "name": "claimed", "type": "uint256" }], "stateMutability": "view", "type": "function" }
|
|
105
|
-
]
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [
|
|
4
|
-
{ "internalType": "address", "name": "token", "type": "address" },
|
|
5
|
-
{ "internalType": "address", "name": "to", "type": "address" },
|
|
6
|
-
{ "internalType": "uint256", "name": "funds", "type": "uint256" },
|
|
7
|
-
{ "internalType": "uint256", "name": "minAmount", "type": "uint256" }
|
|
8
|
-
],
|
|
9
|
-
"name": "buyToken",
|
|
10
|
-
"outputs": [],
|
|
11
|
-
"stateMutability": "payable",
|
|
12
|
-
"type": "function"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"inputs": [
|
|
16
|
-
{ "internalType": "address", "name": "token", "type": "address" },
|
|
17
|
-
{ "internalType": "uint256", "name": "amount", "type": "uint256" },
|
|
18
|
-
{ "internalType": "uint256", "name": "minFunds", "type": "uint256" }
|
|
19
|
-
],
|
|
20
|
-
"name": "sellToken",
|
|
21
|
-
"outputs": [],
|
|
22
|
-
"stateMutability": "nonpayable",
|
|
23
|
-
"type": "function"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"inputs": [{ "internalType": "address", "name": "to", "type": "address" }],
|
|
27
|
-
"name": "buyQuota",
|
|
28
|
-
"outputs": [{ "internalType": "uint256", "name": "quotaAdded", "type": "uint256" }],
|
|
29
|
-
"stateMutability": "payable",
|
|
30
|
-
"type": "function"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"inputs": [],
|
|
34
|
-
"name": "buyFeeRate",
|
|
35
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
36
|
-
"stateMutability": "view",
|
|
37
|
-
"type": "function"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"inputs": [],
|
|
41
|
-
"name": "sellFeeRate",
|
|
42
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
43
|
-
"stateMutability": "view",
|
|
44
|
-
"type": "function"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"inputs": [{ "internalType": "address", "name": "account", "type": "address" }],
|
|
48
|
-
"name": "isFeeExempt",
|
|
49
|
-
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
50
|
-
"stateMutability": "view",
|
|
51
|
-
"type": "function"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"inputs": [{ "internalType": "address", "name": "user", "type": "address" }],
|
|
55
|
-
"name": "getUserFreeQuota",
|
|
56
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
57
|
-
"stateMutability": "view",
|
|
58
|
-
"type": "function"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getFlapGraduatedDexMetrics, buildFlapInfinityPoolKey, computeInfinityPoolId, isInfinityCLPoolManagerAddress, isFlapInfinityCLGraduated, resolvePortalQuoteInputToken, PCS_INFINITY_CL_POOL_MANAGER_BSC, PCS_INFINITY_VAULT_BSC, FLAP_INFINITY_HOOKS_BSC, type GraduatedDexMetrics, type InfinityPoolKey, } from '../../utils/pcs-infinity-cl.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getFlapGraduatedDexMetrics, buildFlapInfinityPoolKey, computeInfinityPoolId, isInfinityCLPoolManagerAddress, isFlapInfinityCLGraduated, resolvePortalQuoteInputToken, PCS_INFINITY_CL_POOL_MANAGER_BSC, PCS_INFINITY_VAULT_BSC, FLAP_INFINITY_HOOKS_BSC, } from '../../utils/pcs-infinity-cl.js';
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Flap Portal newTokenV6 参数构建(对齐官方文档)
|
|
3
|
-
* @see https://docs.flap.sh/flap/developers/token-launcher-developers/launch-token-through-portal
|
|
4
|
-
*/
|
|
5
|
-
import { TokenVersion } from './portal.js';
|
|
6
|
-
import type { TaxV2Config } from './portal-bundle-merkle/types.js';
|
|
7
|
-
export type NewTokenV6LaunchFields = {
|
|
8
|
-
name: string;
|
|
9
|
-
symbol: string;
|
|
10
|
-
meta: string;
|
|
11
|
-
dexThresh?: number;
|
|
12
|
-
salt?: string;
|
|
13
|
-
migratorType?: number;
|
|
14
|
-
quoteToken?: string;
|
|
15
|
-
quoteAmt?: bigint;
|
|
16
|
-
beneficiary: string;
|
|
17
|
-
permitData?: string;
|
|
18
|
-
extensionID?: string;
|
|
19
|
-
extensionData?: string;
|
|
20
|
-
dexId?: number;
|
|
21
|
-
lpFeeProfile?: number;
|
|
22
|
-
buyTaxRate?: number;
|
|
23
|
-
sellTaxRate?: number;
|
|
24
|
-
taxRate?: number;
|
|
25
|
-
taxDuration?: bigint | number;
|
|
26
|
-
antiFarmerDuration?: bigint | number;
|
|
27
|
-
mktBps?: number;
|
|
28
|
-
deflationBps?: number;
|
|
29
|
-
dividendBps?: number;
|
|
30
|
-
lpBps?: number;
|
|
31
|
-
minimumShareBalance?: bigint;
|
|
32
|
-
dividendToken?: string;
|
|
33
|
-
commissionReceiver?: string;
|
|
34
|
-
tokenVersion?: TokenVersion;
|
|
35
|
-
};
|
|
36
|
-
export type BuildNewTokenV6FromTaxV2Input = {
|
|
37
|
-
tokenInfo: {
|
|
38
|
-
name: string;
|
|
39
|
-
symbol: string;
|
|
40
|
-
meta: string;
|
|
41
|
-
};
|
|
42
|
-
taxV2: TaxV2Config;
|
|
43
|
-
beneficiary: string;
|
|
44
|
-
salt?: string;
|
|
45
|
-
taxRate?: number;
|
|
46
|
-
buyTaxRate?: number;
|
|
47
|
-
sellTaxRate?: number;
|
|
48
|
-
dexThresh?: number;
|
|
49
|
-
migratorType?: number;
|
|
50
|
-
quoteToken?: string;
|
|
51
|
-
quoteAmt?: bigint;
|
|
52
|
-
dexId?: number;
|
|
53
|
-
lpFeeProfile?: number;
|
|
54
|
-
extensionID?: string;
|
|
55
|
-
extensionData?: string;
|
|
56
|
-
commissionReceiver?: string;
|
|
57
|
-
dividendToken?: string;
|
|
58
|
-
};
|
|
59
|
-
/** Portal.newTokenV6 ABI(ethers 简写格式,供 Contract 使用) */
|
|
60
|
-
export declare const NEW_TOKEN_V6_ABI = "function newTokenV6((string name,string symbol,string meta,uint8 dexThresh,bytes32 salt,uint8 migratorType,address quoteToken,uint256 quoteAmt,address beneficiary,bytes permitData,bytes32 extensionID,bytes extensionData,uint8 dexId,uint8 lpFeeProfile,uint16 buyTaxRate,uint16 sellTaxRate,uint64 taxDuration,uint64 antiFarmerDuration,uint16 mktBps,uint16 deflationBps,uint16 dividendBps,uint16 lpBps,uint256 minimumShareBalance,address dividendToken,address commissionReceiver,uint8 tokenVersion)) external payable returns (address)";
|
|
61
|
-
/**
|
|
62
|
-
* Portal 要求:quoteToken 为 ERC20 时 dividendToken 不能为 0。
|
|
63
|
-
* 未显式传入时默认与 quoteToken 相同(分红币种 = 报价币)。
|
|
64
|
-
*/
|
|
65
|
-
export declare function resolveDividendTokenForQuote(quoteToken?: string, dividendToken?: string): string;
|
|
66
|
-
export declare function normalizeTaxV2Fields(taxV2: TaxV2Config): (TaxV2Config & {
|
|
67
|
-
mktBps: number;
|
|
68
|
-
deflationBps: number;
|
|
69
|
-
dividendBps: number;
|
|
70
|
-
lpBps: number;
|
|
71
|
-
minimumShareBalance?: number;
|
|
72
|
-
}) | {
|
|
73
|
-
taxDuration: number;
|
|
74
|
-
antiFarmerDuration: number;
|
|
75
|
-
mktBps: number;
|
|
76
|
-
deflationBps: number;
|
|
77
|
-
dividendBps: number;
|
|
78
|
-
lpBps: number;
|
|
79
|
-
minimumShareBalance: number | undefined;
|
|
80
|
-
vaultConfig: import("./vault.js").TaxVaultConfig | undefined;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* 构建 Portal.newTokenV6 参数
|
|
84
|
-
* - 无税:tokenVersion = TOKEN_V2_PERMIT,税字段为 0
|
|
85
|
-
* - 高级税(无金库):tokenVersion = TOKEN_TAXED_V3
|
|
86
|
-
*/
|
|
87
|
-
export declare function buildNewTokenV6Params(input: BuildNewTokenV6FromTaxV2Input | NewTokenV6LaunchFields): {
|
|
88
|
-
name: string;
|
|
89
|
-
symbol: string;
|
|
90
|
-
meta: string;
|
|
91
|
-
dexThresh: number;
|
|
92
|
-
salt: string;
|
|
93
|
-
migratorType: number;
|
|
94
|
-
quoteToken: string;
|
|
95
|
-
quoteAmt: bigint;
|
|
96
|
-
beneficiary: string;
|
|
97
|
-
permitData: string;
|
|
98
|
-
extensionID: string;
|
|
99
|
-
extensionData: string;
|
|
100
|
-
dexId: number;
|
|
101
|
-
lpFeeProfile: number;
|
|
102
|
-
buyTaxRate: number;
|
|
103
|
-
sellTaxRate: number;
|
|
104
|
-
taxDuration: bigint;
|
|
105
|
-
antiFarmerDuration: bigint;
|
|
106
|
-
mktBps: number;
|
|
107
|
-
deflationBps: number;
|
|
108
|
-
dividendBps: number;
|
|
109
|
-
lpBps: number;
|
|
110
|
-
minimumShareBalance: bigint;
|
|
111
|
-
dividendToken: string;
|
|
112
|
-
commissionReceiver: string;
|
|
113
|
-
tokenVersion: TokenVersion;
|
|
114
|
-
};
|
|
115
|
-
/** 高级税(无金库)Vanity:TOKEN_TAXED_V3 + 后缀 7777 */
|
|
116
|
-
export declare function getTaxV3LaunchVanityOptions(chain: string): {
|
|
117
|
-
taxed: boolean;
|
|
118
|
-
taxedV3: boolean;
|
|
119
|
-
taxedV5: boolean;
|
|
120
|
-
useV3Permit: boolean;
|
|
121
|
-
suffix: string | undefined;
|
|
122
|
-
chain: "BSC" | "BASE" | "XLAYER" | "MORPH" | "MONAD";
|
|
123
|
-
};
|
|
124
|
-
/** 标准 V3 池 Vanity:TOKEN_V3_PERMIT / newTokenV7 + BSC_V3_PERMIT impl */
|
|
125
|
-
export declare function getV3PermitLaunchVanityOptions(chain: string): {
|
|
126
|
-
taxed: boolean;
|
|
127
|
-
taxedV3: boolean;
|
|
128
|
-
taxedV5: boolean;
|
|
129
|
-
useV3Permit: boolean;
|
|
130
|
-
suffix: string | undefined;
|
|
131
|
-
chain: "BSC" | "BASE" | "XLAYER" | "MORPH" | "MONAD";
|
|
132
|
-
};
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Flap Portal newTokenV6 参数构建(对齐官方文档)
|
|
3
|
-
* @see https://docs.flap.sh/flap/developers/token-launcher-developers/launch-token-through-portal
|
|
4
|
-
*/
|
|
5
|
-
import { ZeroAddress } from 'ethers';
|
|
6
|
-
import { TokenVersion } from './portal.js';
|
|
7
|
-
const NONE_EXTENSION_ID = '0x' + '00'.repeat(32);
|
|
8
|
-
/** Portal.newTokenV6 ABI(ethers 简写格式,供 Contract 使用) */
|
|
9
|
-
export const NEW_TOKEN_V6_ABI = 'function newTokenV6((string name,string symbol,string meta,uint8 dexThresh,bytes32 salt,uint8 migratorType,address quoteToken,uint256 quoteAmt,address beneficiary,bytes permitData,bytes32 extensionID,bytes extensionData,uint8 dexId,uint8 lpFeeProfile,uint16 buyTaxRate,uint16 sellTaxRate,uint64 taxDuration,uint64 antiFarmerDuration,uint16 mktBps,uint16 deflationBps,uint16 dividendBps,uint16 lpBps,uint256 minimumShareBalance,address dividendToken,address commissionReceiver,uint8 tokenVersion)) external payable returns (address)';
|
|
10
|
-
/**
|
|
11
|
-
* Portal 要求:quoteToken 为 ERC20 时 dividendToken 不能为 0。
|
|
12
|
-
* 未显式传入时默认与 quoteToken 相同(分红币种 = 报价币)。
|
|
13
|
-
*/
|
|
14
|
-
export function resolveDividendTokenForQuote(quoteToken, dividendToken) {
|
|
15
|
-
if (dividendToken && dividendToken !== ZeroAddress) {
|
|
16
|
-
return dividendToken;
|
|
17
|
-
}
|
|
18
|
-
const qt = quoteToken || ZeroAddress;
|
|
19
|
-
if (qt === ZeroAddress) {
|
|
20
|
-
return ZeroAddress;
|
|
21
|
-
}
|
|
22
|
-
return qt;
|
|
23
|
-
}
|
|
24
|
-
export function normalizeTaxV2Fields(taxV2) {
|
|
25
|
-
if ('distribution' in taxV2) {
|
|
26
|
-
return {
|
|
27
|
-
taxDuration: taxV2.taxDuration,
|
|
28
|
-
antiFarmerDuration: taxV2.antiFarmerDuration,
|
|
29
|
-
mktBps: taxV2.distribution.mktBps,
|
|
30
|
-
deflationBps: taxV2.distribution.deflationBps,
|
|
31
|
-
dividendBps: taxV2.distribution.dividendBps,
|
|
32
|
-
lpBps: taxV2.distribution.lpBps,
|
|
33
|
-
minimumShareBalance: taxV2.distribution.minimumShareBalance,
|
|
34
|
-
vaultConfig: taxV2.vaultConfig,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
return taxV2;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* 构建 Portal.newTokenV6 参数
|
|
41
|
-
* - 无税:tokenVersion = TOKEN_V2_PERMIT,税字段为 0
|
|
42
|
-
* - 高级税(无金库):tokenVersion = TOKEN_TAXED_V3
|
|
43
|
-
*/
|
|
44
|
-
export function buildNewTokenV6Params(input) {
|
|
45
|
-
if ('taxV2' in input && input.taxV2) {
|
|
46
|
-
const tv2 = normalizeTaxV2Fields(input.taxV2);
|
|
47
|
-
const total = tv2.mktBps + tv2.deflationBps + tv2.dividendBps + tv2.lpBps;
|
|
48
|
-
if (total !== 10000) {
|
|
49
|
-
throw new Error(`Tax distribution must sum to 10000 (100%), got ${total}`);
|
|
50
|
-
}
|
|
51
|
-
const buyTaxRate = (input.buyTaxRate ?? input.taxRate ?? 0) & 0xffff;
|
|
52
|
-
const sellTaxRate = (input.sellTaxRate ?? input.taxRate ?? 0) & 0xffff;
|
|
53
|
-
if (buyTaxRate <= 0 || sellTaxRate <= 0) {
|
|
54
|
-
throw new Error('Tax launch requires buyTaxRate and sellTaxRate > 0');
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
name: input.tokenInfo.name,
|
|
58
|
-
symbol: input.tokenInfo.symbol,
|
|
59
|
-
meta: input.tokenInfo.meta,
|
|
60
|
-
dexThresh: (input.dexThresh ?? 1) & 0xff,
|
|
61
|
-
salt: input.salt ?? ('0x' + '00'.repeat(32)),
|
|
62
|
-
migratorType: (input.migratorType ?? 0) & 0xff,
|
|
63
|
-
quoteToken: input.quoteToken || ZeroAddress,
|
|
64
|
-
quoteAmt: input.quoteAmt ?? 0n,
|
|
65
|
-
beneficiary: input.beneficiary,
|
|
66
|
-
permitData: '0x',
|
|
67
|
-
extensionID: input.extensionID ?? NONE_EXTENSION_ID,
|
|
68
|
-
extensionData: input.extensionData ?? '0x',
|
|
69
|
-
dexId: (input.dexId ?? 0) & 0xff,
|
|
70
|
-
lpFeeProfile: (input.lpFeeProfile ?? 0) & 0xff,
|
|
71
|
-
buyTaxRate,
|
|
72
|
-
sellTaxRate,
|
|
73
|
-
taxDuration: BigInt(tv2.taxDuration),
|
|
74
|
-
antiFarmerDuration: BigInt(tv2.antiFarmerDuration),
|
|
75
|
-
mktBps: tv2.mktBps & 0xffff,
|
|
76
|
-
deflationBps: tv2.deflationBps & 0xffff,
|
|
77
|
-
dividendBps: tv2.dividendBps & 0xffff,
|
|
78
|
-
lpBps: tv2.lpBps & 0xffff,
|
|
79
|
-
minimumShareBalance: BigInt(tv2.minimumShareBalance ?? 10000) * (10n ** 18n),
|
|
80
|
-
dividendToken: resolveDividendTokenForQuote(input.quoteToken, input.dividendToken),
|
|
81
|
-
commissionReceiver: input.commissionReceiver ?? ZeroAddress,
|
|
82
|
-
tokenVersion: TokenVersion.TOKEN_TAXED_V3,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
const p = input;
|
|
86
|
-
const isStandard = (p.tokenVersion ?? TokenVersion.TOKEN_V2_PERMIT) === TokenVersion.TOKEN_V2_PERMIT;
|
|
87
|
-
return {
|
|
88
|
-
name: p.name,
|
|
89
|
-
symbol: p.symbol,
|
|
90
|
-
meta: p.meta,
|
|
91
|
-
dexThresh: (p.dexThresh ?? 1) & 0xff,
|
|
92
|
-
salt: p.salt ?? ('0x' + '00'.repeat(32)),
|
|
93
|
-
migratorType: (p.migratorType ?? 0) & 0xff,
|
|
94
|
-
quoteToken: p.quoteToken || ZeroAddress,
|
|
95
|
-
quoteAmt: p.quoteAmt ?? 0n,
|
|
96
|
-
beneficiary: p.beneficiary,
|
|
97
|
-
permitData: p.permitData ?? '0x',
|
|
98
|
-
extensionID: p.extensionID ?? NONE_EXTENSION_ID,
|
|
99
|
-
extensionData: p.extensionData ?? '0x',
|
|
100
|
-
dexId: (p.dexId ?? 0) & 0xff,
|
|
101
|
-
lpFeeProfile: (p.lpFeeProfile ?? 0) & 0xff,
|
|
102
|
-
buyTaxRate: isStandard ? 0 : ((p.buyTaxRate ?? p.taxRate ?? 0) & 0xffff),
|
|
103
|
-
sellTaxRate: isStandard ? 0 : ((p.sellTaxRate ?? p.taxRate ?? 0) & 0xffff),
|
|
104
|
-
taxDuration: BigInt(p.taxDuration ?? 0),
|
|
105
|
-
antiFarmerDuration: BigInt(p.antiFarmerDuration ?? 0),
|
|
106
|
-
mktBps: (p.mktBps ?? 0) & 0xffff,
|
|
107
|
-
deflationBps: (p.deflationBps ?? 0) & 0xffff,
|
|
108
|
-
dividendBps: (p.dividendBps ?? 0) & 0xffff,
|
|
109
|
-
lpBps: (p.lpBps ?? 0) & 0xffff,
|
|
110
|
-
minimumShareBalance: p.minimumShareBalance ?? 0n,
|
|
111
|
-
dividendToken: resolveDividendTokenForQuote(p.quoteToken, p.dividendToken),
|
|
112
|
-
commissionReceiver: isStandard ? ZeroAddress : (p.commissionReceiver ?? ZeroAddress),
|
|
113
|
-
tokenVersion: p.tokenVersion ?? TokenVersion.TOKEN_V2_PERMIT,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
/** 高级税(无金库)Vanity:TOKEN_TAXED_V3 + 后缀 7777 */
|
|
117
|
-
export function getTaxV3LaunchVanityOptions(chain) {
|
|
118
|
-
return {
|
|
119
|
-
taxed: true,
|
|
120
|
-
taxedV3: true,
|
|
121
|
-
taxedV5: false,
|
|
122
|
-
useV3Permit: false,
|
|
123
|
-
suffix: undefined,
|
|
124
|
-
chain: chain.toUpperCase(),
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
/** 标准 V3 池 Vanity:TOKEN_V3_PERMIT / newTokenV7 + BSC_V3_PERMIT impl */
|
|
128
|
-
export function getV3PermitLaunchVanityOptions(chain) {
|
|
129
|
-
return {
|
|
130
|
-
taxed: false,
|
|
131
|
-
taxedV3: false,
|
|
132
|
-
taxedV5: false,
|
|
133
|
-
useV3Permit: true,
|
|
134
|
-
suffix: undefined,
|
|
135
|
-
chain: chain.toUpperCase(),
|
|
136
|
-
};
|
|
137
|
-
}
|