four-flap-meme-sdk 2.2.20 → 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/abis/flap/portal-events.d.ts +1 -1
- package/dist/abis/flap/portal-events.js +1 -1
- package/dist/abis/flap/portal.d.ts +1 -1
- package/dist/abis/flap/portal.js +1 -1
- package/dist/abis/flap/vault.d.ts +1 -1
- package/dist/abis/flap/vault.js +1 -1
- package/dist/abis/index.d.ts +0 -2
- package/dist/abis/index.js +0 -2
- package/dist/{bundle-core → bundle}/config-helpers.d.ts +1 -1
- package/dist/{bundle-core → bundle}/config-helpers.js +1 -1
- package/dist/{bundle-core → bundle}/four-meme/approve-tokenmanager.js +3 -3
- package/dist/{bundle-core → bundle}/four-meme/core-helpers.d.ts +1 -1
- package/dist/{bundle-core → bundle}/four-meme/core-helpers.js +2 -2
- package/dist/{bundle-core → bundle}/four-meme/core.js +3 -3
- package/dist/{bundle-core → bundle}/four-meme/pancake-proxy.js +2 -2
- package/dist/{bundle-core → bundle}/four-meme/private.js +2 -2
- package/dist/{bundle-core → bundle}/four-meme/sign-context-helpers.d.ts +1 -1
- package/dist/{bundle-core → bundle}/four-meme/sign-context-helpers.js +1 -1
- package/dist/{bundle-core → bundle}/four-meme/swap-buy-first.js +3 -3
- package/dist/{bundle-core → bundle}/four-meme/swap-internal.js +1 -1
- package/dist/{bundle-core → bundle}/four-meme/swap-sign-helpers.js +2 -2
- package/dist/{bundle-core → bundle}/four-meme/types/index.d.ts +1 -1
- package/dist/{bundle-core → bundle}/four-meme/utils-disperse.js +1 -1
- package/dist/{bundle-core → bundle}/four-meme/utils-pairwise.js +1 -1
- package/dist/{bundle-core → bundle}/four-meme/utils-sweep.js +1 -1
- package/dist/{bundle-core → bundle}/internal.d.ts +1 -1
- package/dist/{bundle-core → bundle}/internal.js +2 -2
- package/dist/{bundle-core → bundle}/sign-context-helpers.js +1 -1
- package/dist/{bundle-core → bundle}/submit.js +4 -4
- package/dist/chains/bsc/constants.js +1 -1
- package/dist/chains/bsc/four/approve-tokenmanager.d.ts +1 -1
- package/dist/chains/bsc/four/approve-tokenmanager.js +1 -1
- package/dist/chains/bsc/four/config.d.ts +3 -3
- package/dist/chains/bsc/four/config.js +2 -2
- package/dist/chains/bsc/four/core.d.ts +1 -1
- package/dist/chains/bsc/four/core.js +1 -1
- package/dist/chains/bsc/four/internal.d.ts +2 -2
- package/dist/chains/bsc/four/internal.js +2 -2
- package/dist/chains/bsc/four/pancake-proxy.d.ts +1 -1
- package/dist/chains/bsc/four/pancake-proxy.js +1 -1
- package/dist/chains/bsc/four/private.d.ts +1 -1
- package/dist/chains/bsc/four/private.js +1 -1
- package/dist/chains/bsc/four/submit.d.ts +2 -2
- package/dist/chains/bsc/four/submit.js +2 -2
- package/dist/chains/bsc/four/swap-buy-first.d.ts +2 -2
- package/dist/chains/bsc/four/swap-buy-first.js +2 -2
- package/dist/chains/bsc/four/swap-internal.d.ts +1 -1
- package/dist/chains/bsc/four/swap-internal.js +1 -1
- package/dist/chains/bsc/four/swap.d.ts +2 -2
- package/dist/chains/bsc/four/swap.js +2 -2
- package/dist/chains/bsc/four/types.d.ts +1 -1
- package/dist/chains/bsc/four/utils-disperse.d.ts +1 -1
- package/dist/chains/bsc/four/utils-disperse.js +1 -1
- package/dist/chains/bsc/four/utils-pairwise.d.ts +1 -1
- package/dist/chains/bsc/four/utils-pairwise.js +1 -1
- package/dist/chains/bsc/four/utils-sweep.d.ts +1 -1
- package/dist/chains/bsc/four/utils-sweep.js +1 -1
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.d.ts +1 -1
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +3 -3
- package/dist/chains/bsc/pancake/bundle-buy-first.js +4 -4
- package/dist/chains/bsc/pancake/bundle-swap-helpers.d.ts +1 -1
- package/dist/chains/bsc/pancake/bundle-swap-helpers.js +5 -5
- package/dist/chains/bsc/pancake/bundle-swap.js +2 -2
- package/dist/chains/bsc/platforms/iro/constants.js +1 -1
- package/dist/chains/bsc/platforms/iro/token.js +1 -1
- package/dist/chains/eni/batch-router/transfer.js +2 -2
- package/dist/chains/eni/constants.js +1 -1
- package/dist/chains/eni/platforms/daoaas/create.js +1 -1
- package/dist/chains/eni/platforms/daoaas/portal-direct.js +1 -1
- package/dist/chains/eni/platforms/dswap/liquidity.js +1 -1
- package/dist/chains/eni/platforms/fair-launch/constants.js +1 -1
- package/dist/chains/eni/platforms/fair-launch/launcher.js +1 -1
- package/dist/chains/eni/platforms/fair-launch/pool.js +1 -1
- 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/token.js +1 -1
- package/dist/chains/eni/submit.js +2 -2
- package/dist/chains/monad/constants.js +1 -1
- package/dist/chains/xlayer/constants.js +1 -1
- package/dist/chains/xlayer/eip7702/bundle-create.js +1 -1
- package/dist/chains/xlayer/eip7702/bundle-sell.js +1 -1
- package/dist/chains/xlayer/eip7702/bundle-swap.js +1 -1
- package/dist/chains/xlayer/eip7702/constants.d.ts +1 -1
- package/dist/chains/xlayer/eip7702/constants.js +2 -2
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.js +1 -1
- package/dist/chains/xlayer/eip7702/utils.js +1 -1
- package/dist/chains/xlayer/eip7702/volume.js +1 -1
- package/dist/chains/xlayer/eoa/constants.js +1 -1
- package/dist/chains/xlayer/eoa/dex-helpers.d.ts +1 -1
- package/dist/chains/xlayer/eoa/dex-helpers.js +2 -2
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.d.ts +1 -1
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.js +3 -3
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.js +2 -2
- package/dist/chains/xlayer/eoa/eoa-wash-volume.d.ts +1 -1
- package/dist/chains/xlayer/eoa/eoa-wash-volume.js +2 -2
- package/dist/chains/xlayer/eoa/router-manager.js +1 -1
- package/dist/{shared → core}/clients/blockrazor.js +1 -1
- package/dist/{shared → core}/clients/four.js +1 -1
- package/dist/{shared → core}/clients/merkle.js +1 -1
- package/dist/{shared → core}/constants/index.d.ts +2 -2
- package/dist/{shared → core}/constants/index.js +1 -1
- package/dist/{shared/foundation → core}/dex/v3-path.js +1 -1
- package/dist/{utils → core}/erc20.d.ts +2 -2
- package/dist/{utils → core}/erc20.js +3 -3
- package/dist/{shared/foundation → core}/gas/profit-hop.js +1 -1
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +5 -0
- package/dist/{shared/foundation → core}/nonce/nonce-manager.js +1 -1
- package/dist/{shared/foundation → core}/types/airdrop-sweep.d.ts +1 -1
- package/dist/{shared/foundation → core}/types/holders-maker.d.ts +1 -1
- package/dist/{shared/foundation → core}/types/lp-inspect.d.ts +1 -1
- package/dist/{shared/foundation → core}/types/private-sale.d.ts +1 -1
- package/dist/{utils/types/erc20.d.ts → core/types-erc20.d.ts} +1 -1
- package/dist/{dex → domains/dex}/direct-router-helpers.d.ts +1 -1
- package/dist/{dex → domains/dex}/direct-router-helpers.js +4 -4
- package/dist/{dex → domains/dex}/direct-router.js +6 -6
- package/dist/{dex → domains/dex}/types.d.ts +1 -1
- package/dist/{shared → domains}/flap/constants.d.ts +1 -1
- package/dist/{shared → domains}/flap/constants.js +1 -1
- package/dist/{shared → domains}/flap/errors.js +1 -1
- package/dist/{flap → domains/flap}/index.d.ts +5 -9
- package/dist/domains/flap/index.js +5 -0
- package/dist/{shared → domains}/flap/meta.js +2 -2
- package/dist/{shared → domains}/flap/permit.js +2 -2
- package/dist/{shared → domains}/flap/portal-bundle-merkle/config.d.ts +2 -2
- package/dist/{shared → domains}/flap/portal-bundle-merkle/config.js +4 -4
- package/dist/{shared → domains}/flap/portal-bundle-merkle/core-helpers.js +3 -3
- package/dist/{shared → domains}/flap/portal-bundle-merkle/core.js +4 -4
- package/dist/{shared → domains}/flap/portal-bundle-merkle/create-to-dex.js +3 -3
- package/dist/{shared → domains}/flap/portal-bundle-merkle/curve-to-dex.js +4 -4
- package/dist/{shared → domains}/flap/portal-bundle-merkle/pancake-proxy.js +4 -4
- package/dist/{shared → domains}/flap/portal-bundle-merkle/private.js +3 -3
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-batch.js +2 -2
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-buy-first-helpers.js +3 -3
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-buy-first.js +7 -7
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-cross.js +1 -1
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-helpers.js +3 -3
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-planning.js +5 -5
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-quick-batch.js +4 -4
- package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-single.js +2 -2
- package/dist/{shared → domains}/flap/portal-bundle-merkle/utils.js +3 -3
- package/dist/{shared → domains}/flap/portal-bundle.d.ts +2 -2
- package/dist/{shared → domains}/flap/portal-bundle.js +3 -3
- package/dist/{shared → domains}/flap/portal-create-token.js +1 -1
- package/dist/{shared → domains}/flap/vault.js +1 -1
- package/dist/{flows → domains/flows}/create.js +2 -2
- package/dist/{contracts → domains/four/contracts}/helper3.js +2 -2
- package/dist/{contracts → domains/four/contracts}/tm-bundle-helpers.d.ts +4 -4
- package/dist/{contracts → domains/four/contracts}/tm-bundle-helpers.js +3 -3
- package/dist/{contracts → domains/four/contracts}/tm-bundle.d.ts +2 -2
- package/dist/{contracts → domains/four/contracts}/tm-bundle.js +7 -7
- package/dist/{contracts → domains/four/contracts}/tm.d.ts +1 -1
- package/dist/{contracts → domains/four/contracts}/tm.js +4 -4
- package/dist/{contracts → domains/four/contracts}/tm1.js +2 -2
- package/dist/{contracts → domains/four/contracts}/tm2.js +2 -2
- package/dist/domains/four/index.d.ts +7 -0
- package/dist/domains/four/index.js +7 -0
- package/dist/{shared → domains}/four/tax-token.js +1 -1
- package/dist/{utils → domains/holders}/holders-maker-helpers.d.ts +7 -7
- package/dist/{utils → domains/holders}/holders-maker-helpers.js +7 -7
- package/dist/{utils → domains/holders}/holders-maker.d.ts +2 -2
- package/dist/{utils → domains/holders}/holders-maker.js +4 -4
- package/dist/domains/holders/index.d.ts +1 -0
- package/dist/domains/holders/index.js +1 -0
- package/dist/{utils/holders-maker → domains/holders/internal}/addresses.js +1 -1
- package/dist/{utils/holders-maker → domains/holders/internal}/buy-tx.d.ts +1 -1
- package/dist/{utils/holders-maker → domains/holders/internal}/buy-tx.js +4 -4
- package/dist/{utils/holders-maker → domains/holders/internal}/constants.js +1 -1
- package/dist/{utils/holders-maker → domains/holders/internal}/disperse.d.ts +4 -4
- package/dist/{utils/holders-maker → domains/holders/internal}/disperse.js +2 -2
- package/dist/{utils/holders-maker → domains/holders/internal}/routing.d.ts +1 -1
- package/dist/{utils/holders-maker → domains/holders/internal}/routing.js +1 -1
- package/dist/{utils/holders-maker → domains/holders/internal}/transfer-tx.js +2 -2
- package/dist/{utils/types/holders-maker.d.ts → domains/holders/types.d.ts} +1 -1
- package/dist/domains/lp-inspect/index.d.ts +1 -0
- package/dist/domains/lp-inspect/index.js +1 -0
- package/dist/{utils → domains/lp-inspect}/lp-inspect-helpers.d.ts +1 -1
- package/dist/{utils → domains/lp-inspect}/lp-inspect-helpers.js +1 -1
- package/dist/{utils → domains/lp-inspect}/lp-inspect.d.ts +2 -2
- package/dist/{utils → domains/lp-inspect}/lp-inspect.js +6 -6
- package/dist/{utils/types/lp-inspect.d.ts → domains/lp-inspect/types.d.ts} +1 -1
- package/dist/{merkle → domains/merkle}/index.d.ts +7 -7
- 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/{utils → domains/private-sale}/private-sale.d.ts +2 -2
- package/dist/{utils → domains/private-sale}/private-sale.js +2 -2
- package/dist/domains/private-sale/types.d.ts +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 +3 -3
- package/dist/{utils → domains/quote}/quote-helpers.js +2 -2
- package/dist/{utils/types/quote-helpers.d.ts → domains/quote/types.d.ts} +1 -1
- 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 +11 -11
- package/dist/exports/root-bundle-and-tooling.js +11 -11
- package/dist/exports/root-foundations.d.ts +21 -21
- package/dist/exports/root-foundations.js +21 -21
- package/dist/exports/root-swap-dex-and-xlayer.d.ts +10 -10
- package/dist/exports/root-swap-dex-and-xlayer.js +8 -8
- package/dist/index.d.ts +7 -10
- package/dist/index.js +7 -10
- package/dist/utils/airdrop-sweep.js +3 -3
- package/dist/utils/bundle-helpers.d.ts +7 -7
- package/dist/utils/bundle-helpers.js +7 -7
- package/dist/utils/constants.d.ts +2 -2
- package/dist/utils/constants.js +2 -2
- package/dist/utils/contract-factory.js +1 -1
- package/dist/utils/errors.d.ts +2 -2
- package/dist/utils/errors.js +3 -3
- package/dist/utils/hop-chains.d.ts +1 -1
- package/dist/utils/hop-chains.js +2 -2
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/mpcExclusive.js +1 -1
- package/dist/utils/stealth-transfer.js +2 -2
- package/dist/utils/swap-helpers.d.ts +1 -1
- package/dist/utils/swap-helpers.js +1 -1
- package/dist/utils/types/airdrop-sweep.d.ts +1 -1
- package/dist/utils/types/index.d.ts +6 -6
- package/dist/utils/types/stealth-transfer.d.ts +1 -1
- package/dist/utils/wallet.d.ts +2 -2
- package/dist/utils/wallet.js +3 -3
- package/package.json +52 -56
- package/dist/__tests__/subpath-exports.test.js +0 -64
- package/dist/bundle-core/__tests__/config-helpers.test.js +0 -28
- package/dist/bundle-core/__tests__/facade-parity.test.js +0 -33
- package/dist/bundle-core/__tests__/sign-context-helpers.test.js +0 -60
- package/dist/bundle-core/__tests__/sign-fixture.test.d.ts +0 -1
- package/dist/bundle-core/__tests__/sign-fixture.test.js +0 -220
- package/dist/bundle-core/__tests__/sign-fixtures.d.ts +0 -10
- package/dist/bundle-core/__tests__/sign-fixtures.js +0 -16
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/approve-tokenmanager.js +0 -1
- package/dist/contracts/tm-bundle-merkle/config.d.ts +0 -8
- package/dist/contracts/tm-bundle-merkle/config.js +0 -2
- package/dist/contracts/tm-bundle-merkle/core.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/core.js +0 -1
- 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 -4
- package/dist/contracts/tm-bundle-merkle/internal.js +0 -4
- package/dist/contracts/tm-bundle-merkle/pancake-proxy.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/pancake-proxy.js +0 -1
- package/dist/contracts/tm-bundle-merkle/private.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/private.js +0 -1
- package/dist/contracts/tm-bundle-merkle/submit.d.ts +0 -3
- package/dist/contracts/tm-bundle-merkle/submit.js +0 -3
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.d.ts +0 -4
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.js +0 -4
- package/dist/contracts/tm-bundle-merkle/swap-internal.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/swap-internal.js +0 -1
- package/dist/contracts/tm-bundle-merkle/swap.d.ts +0 -4
- package/dist/contracts/tm-bundle-merkle/swap.js +0 -4
- package/dist/contracts/tm-bundle-merkle/types.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/utils-disperse.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/utils-disperse.js +0 -1
- package/dist/contracts/tm-bundle-merkle/utils-pairwise.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/utils-pairwise.js +0 -1
- package/dist/contracts/tm-bundle-merkle/utils-sweep.d.ts +0 -1
- package/dist/contracts/tm-bundle-merkle/utils-sweep.js +0 -1
- package/dist/contracts/tm-bundle-merkle/utils.d.ts +0 -8
- package/dist/contracts/tm-bundle-merkle/utils.js +0 -8
- package/dist/flap/index.js +0 -9
- package/dist/merkle/index.js +0 -11
- package/dist/shared/abis/TaxToken.json +0 -105
- package/dist/shared/abis/TokenManager.json +0 -836
- package/dist/shared/abis/TokenManager2.json +0 -60
- package/dist/shared/abis/TokenManagerHelper3.json +0 -993
- 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 -127
- package/dist/shared/flap/launch-v6.js +0 -123
- package/dist/shared/four/index.d.ts +0 -7
- package/dist/shared/four/index.js +0 -22
- package/dist/shared/index.d.ts +0 -16
- package/dist/shared/index.js +0 -14
- package/dist/utils/pcs-infinity-cl.d.ts +0 -65
- package/dist/utils/pcs-infinity-cl.js +0 -390
- package/dist/utils/types/erc20.js +0 -1
- package/dist/utils/types/holders-maker.js +0 -1
- package/dist/utils/types/lp-inspect.js +0 -1
- package/dist/utils/types/private-sale.d.ts +0 -1
- package/dist/utils/types/private-sale.js +0 -1
- package/dist/utils/types/quote-helpers.js +0 -1
- package/dist/vanity/index.d.ts +0 -5
- package/dist/vanity/index.js +0 -5
- /package/dist/{bundle-core → bundle}/errors.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/errors.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/approve-tokenmanager.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/core.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/pancake-proxy.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/private.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/swap-buy-first.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/swap-hop-helpers.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/swap-hop-helpers.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/swap-internal.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/swap-sign-helpers.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/swap.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/swap.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types/buy-first.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types/buy-first.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types/core-flow.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types/core-flow.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types/index.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types/swap-internal.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types/swap-internal.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/types.js +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/utils-disperse.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/utils-pairwise.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/four-meme/utils-sweep.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/index.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/index.js +0 -0
- /package/dist/{bundle-core → bundle}/sign-context-helpers.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/submit.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/types/index.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/types/index.js +0 -0
- /package/dist/{bundle-core → bundle}/types.d.ts +0 -0
- /package/dist/{bundle-core → bundle}/types.js +0 -0
- /package/dist/{shared/foundation → core}/amount/split-by-weight.d.ts +0 -0
- /package/dist/{shared/foundation → core}/amount/split-by-weight.js +0 -0
- /package/dist/{shared → core}/clients/blockrazor.d.ts +0 -0
- /package/dist/{shared → core}/clients/club48.d.ts +0 -0
- /package/dist/{shared → core}/clients/club48.js +0 -0
- /package/dist/{shared → core}/clients/emitservice.d.ts +0 -0
- /package/dist/{shared → core}/clients/emitservice.js +0 -0
- /package/dist/{shared → core}/clients/four.d.ts +0 -0
- /package/dist/{shared → core}/clients/index.d.ts +0 -0
- /package/dist/{shared → core}/clients/index.js +0 -0
- /package/dist/{shared → core}/clients/merkle.d.ts +0 -0
- /package/dist/{shared → core}/constants/addresses.d.ts +0 -0
- /package/dist/{shared → core}/constants/addresses.js +0 -0
- /package/dist/{shared → core}/constants/chains.d.ts +0 -0
- /package/dist/{shared → core}/constants/chains.js +0 -0
- /package/dist/{shared → core}/constants/gas.d.ts +0 -0
- /package/dist/{shared → core}/constants/gas.js +0 -0
- /package/dist/{shared → core}/constants/profit.d.ts +0 -0
- /package/dist/{shared → core}/constants/profit.js +0 -0
- /package/dist/{shared → core}/constants/quote.d.ts +0 -0
- /package/dist/{shared → core}/constants/quote.js +0 -0
- /package/dist/{shared/foundation → core}/dex/v3-path.d.ts +0 -0
- /package/dist/{shared/foundation → core}/erc20/decimals.d.ts +0 -0
- /package/dist/{shared/foundation → core}/erc20/decimals.js +0 -0
- /package/dist/{shared/foundation/index.d.ts → core/foundation.d.ts} +0 -0
- /package/dist/{shared/foundation/index.js → core/foundation.js} +0 -0
- /package/dist/{shared/foundation → core}/gas/bundle-gas.d.ts +0 -0
- /package/dist/{shared/foundation → core}/gas/bundle-gas.js +0 -0
- /package/dist/{shared/foundation → core}/gas/profit-hop.d.ts +0 -0
- /package/dist/{types → core/legacy-types}/errors.d.ts +0 -0
- /package/dist/{types → core/legacy-types}/errors.js +0 -0
- /package/dist/{shared/foundation → core}/nonce/nonce-manager.d.ts +0 -0
- /package/dist/{shared/foundation → core}/normalize-unknown.d.ts +0 -0
- /package/dist/{shared/foundation → core}/normalize-unknown.js +0 -0
- /package/dist/{shared/foundation → core}/sdk-logger.d.ts +0 -0
- /package/dist/{shared/foundation → core}/sdk-logger.js +0 -0
- /package/dist/{shared/abis → core/shared-abis}/common.d.ts +0 -0
- /package/dist/{shared/abis → core/shared-abis}/common.js +0 -0
- /package/dist/{shared/abis → core/shared-abis}/index.d.ts +0 -0
- /package/dist/{shared/abis → core/shared-abis}/index.js +0 -0
- /package/dist/{shared/foundation → core}/tx/build-request.d.ts +0 -0
- /package/dist/{shared/foundation → core}/tx/build-request.js +0 -0
- /package/dist/{shared/foundation → core}/tx/sign-batch.d.ts +0 -0
- /package/dist/{shared/foundation → core}/tx/sign-batch.js +0 -0
- /package/dist/{shared/foundation → core}/tx/wallet-sign-patch.d.ts +0 -0
- /package/dist/{shared/foundation → core}/tx/wallet-sign-patch.js +0 -0
- /package/dist/{shared/foundation → core}/types/airdrop-sweep.js +0 -0
- /package/dist/{shared/foundation → core}/types/erc20.d.ts +0 -0
- /package/dist/{shared/foundation → core}/types/erc20.js +0 -0
- /package/dist/{shared/foundation → core}/types/holders-maker.js +0 -0
- /package/dist/{shared/foundation → core}/types/index.d.ts +0 -0
- /package/dist/{shared/foundation → core}/types/index.js +0 -0
- /package/dist/{shared/foundation → core}/types/lp-inspect.js +0 -0
- /package/dist/{shared/foundation → core}/types/multicall.d.ts +0 -0
- /package/dist/{shared/foundation → core}/types/multicall.js +0 -0
- /package/dist/{shared/foundation → core}/types/private-sale.js +0 -0
- /package/dist/{shared/foundation → core}/types/quote-helpers.d.ts +0 -0
- /package/dist/{shared/foundation → core}/types/quote-helpers.js +0 -0
- /package/dist/{__tests__/subpath-exports.test.d.ts → core/types-erc20.js} +0 -0
- /package/dist/{shared/foundation → core}/wallet/generate.d.ts +0 -0
- /package/dist/{shared/foundation → core}/wallet/generate.js +0 -0
- /package/dist/{dex → domains/dex}/direct-router.d.ts +0 -0
- /package/dist/{dex → domains/dex}/index.d.ts +0 -0
- /package/dist/{dex → domains/dex}/index.js +0 -0
- /package/dist/{contracts/tm-bundle-merkle → domains/dex}/types.js +0 -0
- /package/dist/{shared → domains}/flap/abi.d.ts +0 -0
- /package/dist/{shared → domains}/flap/abi.js +0 -0
- /package/dist/{shared → domains}/flap/curve.d.ts +0 -0
- /package/dist/{shared → domains}/flap/curve.js +0 -0
- /package/dist/{shared → domains}/flap/errors.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/meta.d.ts +0 -0
- /package/dist/{shared/flap/index.d.ts → domains/flap/module.d.ts} +0 -0
- /package/dist/{shared/flap/index.js → domains/flap/module.js} +0 -0
- /package/dist/{shared → domains}/flap/permit.d.ts +0 -0
- /package/dist/{shared → domains}/flap/pinata.d.ts +0 -0
- /package/dist/{shared → domains}/flap/pinata.js +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/core-helpers.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/core.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/create-to-dex.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/index.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/index.js +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/{shared → domains}/flap/portal-bundle-merkle/swap-batch.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-buy-first.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-cross.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-helpers.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-planning.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-quick-batch.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-single.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-types.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap-types.js +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/swap.js +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/types.d.ts +0 -0
- /package/dist/{dex → domains/flap/portal-bundle-merkle}/types.js +0 -0
- /package/dist/{shared → domains}/flap/portal-bundle-merkle/utils.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal-create-token.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal.d.ts +0 -0
- /package/dist/{shared → domains}/flap/portal.js +0 -0
- /package/dist/{shared → domains}/flap/vanity.d.ts +0 -0
- /package/dist/{shared → domains}/flap/vanity.js +0 -0
- /package/dist/{shared → domains}/flap/vault.d.ts +0 -0
- /package/dist/{flows → domains/flows}/create.d.ts +0 -0
- /package/dist/{flows → domains/flows}/index.d.ts +0 -0
- /package/dist/{flows → domains/flows}/index.js +0 -0
- /package/dist/{contracts → domains/four/contracts}/helper3.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
- /package/dist/{shared → domains}/four/tax-token.d.ts +0 -0
- /package/dist/{utils/holders-maker → domains/holders/internal}/addresses.d.ts +0 -0
- /package/dist/{utils/holders-maker → domains/holders/internal}/constants.d.ts +0 -0
- /package/dist/{utils/holders-maker → domains/holders/internal}/transfer-tx.d.ts +0 -0
- /package/dist/{shared/flap/portal-bundle-merkle → domains/holders}/types.js +0 -0
- /package/dist/{bundle-core/__tests__/config-helpers.test.d.ts → domains/lp-inspect/types.js} +0 -0
- /package/dist/{bundle-core/__tests__/facade-parity.test.d.ts → domains/private-sale/types.js} +0 -0
- /package/dist/{bundle-core/__tests__/sign-context-helpers.test.d.ts → domains/quote/types.js} +0 -0
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flap
|
|
3
|
-
*
|
|
4
|
-
* memeweb 等消费者请使用 `four-flap-meme-sdk/flap` 或 `four-flap-meme-sdk/shared/flap`(同入口)。
|
|
5
|
-
*
|
|
6
|
-
* @see README.zh-CN.md
|
|
2
|
+
* Flap domain public facade
|
|
7
3
|
*/
|
|
8
|
-
export { FlapPortal, FlapPortalWriter, type TokenStateV7, V3LPFeeProfile, lpFeeProfileToV3Fee, FLAP_TOTAL_SUPPLY, } from '
|
|
9
|
-
export { flapBundleSwapMerkle, flapBatchSwapMerkle, flapQuickBatchSwapMerkle, flapCrossSwapMerkle, flapBundleBuyFirstMerkle, flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle, createTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle, batchSellWithBundleMerkle, flapBundleCreateToDex, } from '
|
|
10
|
-
export type { FlapSwapSignConfig, FlapSwapConfig, FlapBundleSwapSignParams, FlapBundleSwapParams, FlapSwapResult, FlapBatchSwapSignParams, FlapBatchSwapResult, FlapQuickBatchSwapSignParams, FlapQuickBatchSwapResult, FlapCrossSwapParams, FlapCrossSwapResult, UserType as FlapSwapUserType, FlapBuyFirstSignConfig, FlapBuyFirstConfig, FlapBundleBuyFirstSignParams, FlapBundleBuyFirstParams, FlapBuyFirstResult, FlapDisperseSignParams, FlapDisperseMerkleResult, FlapSweepSignParams, FlapSweepMerkleResult, } from '
|
|
11
|
-
export type { FlapChain } from '
|
|
4
|
+
export { FlapPortal, FlapPortalWriter, type TokenStateV7, V3LPFeeProfile, lpFeeProfileToV3Fee, FLAP_TOTAL_SUPPLY, } from './module.js';
|
|
5
|
+
export { flapBundleSwapMerkle, flapBatchSwapMerkle, flapQuickBatchSwapMerkle, flapCrossSwapMerkle, flapBundleBuyFirstMerkle, flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle, createTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle, batchSellWithBundleMerkle, flapBundleCreateToDex, } from './portal-bundle-merkle/index.js';
|
|
6
|
+
export type { FlapSwapSignConfig, FlapSwapConfig, FlapBundleSwapSignParams, FlapBundleSwapParams, FlapSwapResult, FlapBatchSwapSignParams, FlapBatchSwapResult, FlapQuickBatchSwapSignParams, FlapQuickBatchSwapResult, FlapCrossSwapParams, FlapCrossSwapResult, UserType as FlapSwapUserType, FlapBuyFirstSignConfig, FlapBuyFirstConfig, FlapBundleBuyFirstSignParams, FlapBundleBuyFirstParams, FlapBuyFirstResult, FlapDisperseSignParams, FlapDisperseMerkleResult, FlapSweepSignParams, FlapSweepMerkleResult, } from './portal-bundle-merkle/index.js';
|
|
7
|
+
export type { FlapChain } from './portal.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap domain public facade
|
|
3
|
+
*/
|
|
4
|
+
export { FlapPortal, FlapPortalWriter, V3LPFeeProfile, lpFeeProfileToV3Fee, FLAP_TOTAL_SUPPLY, } from './module.js';
|
|
5
|
+
export { flapBundleSwapMerkle, flapBatchSwapMerkle, flapQuickBatchSwapMerkle, flapCrossSwapMerkle, flapBundleBuyFirstMerkle, flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle, createTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle, batchSellWithBundleMerkle, flapBundleCreateToDex, } from './portal-bundle-merkle/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonRpcProvider, Contract, Interface } from 'ethers';
|
|
2
|
-
import { ADDRESSES } from '
|
|
3
|
-
import { getErrorMessageFromUnknown, consoleSdkLogger } from '
|
|
2
|
+
import { ADDRESSES } from '../../core/constants/index.js';
|
|
3
|
+
import { getErrorMessageFromUnknown, consoleSdkLogger } from '../../core/index.js';
|
|
4
4
|
const sdkLogger = consoleSdkLogger;
|
|
5
5
|
const DEFAULT_GATEWAYS = {
|
|
6
6
|
BSC: 'https://ipfs.io/ipfs/',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Wallet, AbiCoder, Contract, JsonRpcProvider } from 'ethers';
|
|
2
2
|
import { FLAP_PORTAL_ADDRESSES } from './constants.js';
|
|
3
|
-
import { CHAIN_ID_MAP } from '
|
|
4
|
-
import { consoleSdkLogger } from '
|
|
3
|
+
import { CHAIN_ID_MAP } from '../../core/constants/index.js';
|
|
4
|
+
import { consoleSdkLogger } from '../../core/index.js';
|
|
5
5
|
const sdkLogger = consoleSdkLogger;
|
|
6
6
|
/**
|
|
7
7
|
* 构建 Permit Piggyback 数据
|
|
@@ -6,5 +6,5 @@ export declare const CHAIN_ID_MAP: Record<FlapChainForMerkleBundle, number>;
|
|
|
6
6
|
export declare const MERKLE_SUPPORTED_CHAIN_IDS: readonly [56, 1];
|
|
7
7
|
export type MerkleSupportedChainId = (typeof MERKLE_SUPPORTED_CHAIN_IDS)[number];
|
|
8
8
|
export declare const PORTAL_ABI: string[];
|
|
9
|
-
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '../../../bundle
|
|
10
|
-
export { getTxType, getGasPriceMultiplier, getBundleOptions, getGasPriceConfig, shouldExtractProfit, getProfitRateBps, getProfitRecipient, calculateProfit, calculateBatchProfit, getBribeAmount, } from '../../../bundle
|
|
9
|
+
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '../../../bundle/errors.js';
|
|
10
|
+
export { getTxType, getGasPriceMultiplier, getBundleOptions, getGasPriceConfig, shouldExtractProfit, getProfitRateBps, getProfitRecipient, calculateProfit, calculateBatchProfit, getBribeAmount, } from '../../../bundle/config-helpers.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FLAP_PORTAL_ABI } from '
|
|
2
|
-
import { BLOCKRAZOR_BUILDER_EOA as _BLOCKRAZOR_BUILDER_EOA } from '../../../
|
|
1
|
+
import { FLAP_PORTAL_ABI } from '../../../core/shared-abis/common.js';
|
|
2
|
+
import { BLOCKRAZOR_BUILDER_EOA as _BLOCKRAZOR_BUILDER_EOA } from '../../../core/constants/index.js';
|
|
3
3
|
export const BLOCKRAZOR_BUILDER_EOA = _BLOCKRAZOR_BUILDER_EOA;
|
|
4
4
|
export const CHAIN_ID_MAP = {
|
|
5
5
|
BSC: 56,
|
|
@@ -9,5 +9,5 @@ export const CHAIN_ID_MAP = {
|
|
|
9
9
|
};
|
|
10
10
|
export const MERKLE_SUPPORTED_CHAIN_IDS = [56, 1];
|
|
11
11
|
export const PORTAL_ABI = FLAP_PORTAL_ABI;
|
|
12
|
-
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '../../../bundle
|
|
13
|
-
export { getTxType, getGasPriceMultiplier, getBundleOptions, getGasPriceConfig, shouldExtractProfit, getProfitRateBps, getProfitRecipient, calculateProfit, calculateBatchProfit, getBribeAmount, } from '../../../bundle
|
|
12
|
+
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '../../../bundle/errors.js';
|
|
13
|
+
export { getTxType, getGasPriceMultiplier, getBundleOptions, getGasPriceConfig, shouldExtractProfit, getProfitRateBps, getProfitRecipient, calculateProfit, calculateBatchProfit, getBribeAmount, } from '../../../bundle/config-helpers.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Contract } from 'ethers';
|
|
2
|
-
import { ADDRESSES } from '../../../
|
|
3
|
-
import { CHAINS } from '
|
|
4
|
-
import { V2_ROUTER_QUOTE_ABI } from '
|
|
2
|
+
import { ADDRESSES } from '../../../core/constants/index.js';
|
|
3
|
+
import { CHAINS } from '../../../core/constants/index.js';
|
|
4
|
+
import { V2_ROUTER_QUOTE_ABI } from '../../../core/shared-abis/common.js';
|
|
5
5
|
// ✅ 常量
|
|
6
6
|
export const MULTICALL3_ADDRESS = ADDRESSES.BSC.Multicall3;
|
|
7
7
|
// ==================== ERC20 → 原生代币报价 ====================
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { ethers, Wallet, Contract, Interface } from 'ethers';
|
|
5
5
|
import { NonceManager, getOptimizedGasPrice, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
6
|
-
import { ZERO_ADDRESS } from '../../../
|
|
7
|
-
import { GAS_LIMITS } from '
|
|
8
|
-
import { MULTICALL3_ABI } from '
|
|
6
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
7
|
+
import { GAS_LIMITS } from '../../../core/constants/index.js';
|
|
8
|
+
import { MULTICALL3_ABI } from '../../../core/shared-abis/common.js';
|
|
9
9
|
import { FLAP_PORTAL_ADDRESSES, FLAP_ORIGINAL_PORTAL_ADDRESSES } from '../constants.js';
|
|
10
10
|
import { normalizeTaxLaunchConfig, populateCreateTokenTransaction, } from '../portal-create-token.js';
|
|
11
11
|
import { CHAIN_ID_MAP, PORTAL_ABI, getErrorMessage, getTxType, getGasPriceConfig, shouldExtractProfit, calculateProfit, getProfitRecipient, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, } from './config.js';
|
|
12
12
|
import { MigratorType } from '../portal.js';
|
|
13
13
|
import { MULTICALL3_ADDRESS, getGasLimit, getTokenToNativeQuote } from './core-helpers.js';
|
|
14
14
|
import { SdkError } from '../../../utils/errors.js';
|
|
15
|
-
import { SdkErrorCode } from '../../../types/errors.js';
|
|
15
|
+
import { SdkErrorCode } from '../../../core/legacy-types/errors.js';
|
|
16
16
|
function validateQuoteTokenDecimals(decimals, source) {
|
|
17
17
|
if (decimals === undefined)
|
|
18
18
|
return undefined;
|
|
@@ -12,10 +12,10 @@ import { NonceManager, getOptimizedGasPrice, buildProfitHopTransactions, PROFIT_
|
|
|
12
12
|
import { FLAP_PORTAL_ADDRESSES, FLAP_ORIGINAL_PORTAL_ADDRESSES } from '../constants.js';
|
|
13
13
|
import { normalizeTaxLaunchConfig, populateCreateTokenTransaction, } from '../portal-create-token.js';
|
|
14
14
|
import { MigratorType } from '../portal.js';
|
|
15
|
-
import { ADDRESSES, ZERO_ADDRESS, CHAINS } from '../../../
|
|
16
|
-
import { GAS_LIMITS } from '
|
|
15
|
+
import { ADDRESSES, ZERO_ADDRESS, CHAINS } from '../../../core/constants/index.js';
|
|
16
|
+
import { GAS_LIMITS } from '../../../core/constants/index.js';
|
|
17
17
|
import { getGasPriceConfig, getTxType, getProfitRecipient, getProfitRateBps, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, PORTAL_ABI, } from './config.js';
|
|
18
|
-
import { splitAmountByWeight as splitAmount } from '
|
|
18
|
+
import { splitAmountByWeight as splitAmount } from '../../../core/amount/split-by-weight.js';
|
|
19
19
|
// ==================== ERC20 ABI ====================
|
|
20
20
|
const ERC20_ABI = [
|
|
21
21
|
{
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
10
10
|
import { NonceManager, getOptimizedGasPrice, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
11
11
|
import { FLAP_PORTAL_ADDRESSES } from '../constants.js';
|
|
12
|
-
import { ADDRESSES, ZERO_ADDRESS, CHAINS } from '../../../
|
|
13
|
-
import { GAS_LIMITS } from '
|
|
12
|
+
import { ADDRESSES, ZERO_ADDRESS, CHAINS } from '../../../core/constants/index.js';
|
|
13
|
+
import { GAS_LIMITS } from '../../../core/constants/index.js';
|
|
14
14
|
import { getGasPriceConfig, getTxType, getProfitRecipient, getProfitRateBps, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, PORTAL_ABI, } from './config.js';
|
|
15
|
-
import { createSignProvider } from '../../../bundle
|
|
16
|
-
import { splitAmountByWeight as splitAmount } from '
|
|
15
|
+
import { createSignProvider } from '../../../bundle/sign-context-helpers.js';
|
|
16
|
+
import { splitAmountByWeight as splitAmount } from '../../../core/amount/split-by-weight.js';
|
|
17
17
|
// ==================== 链常量 ====================
|
|
18
18
|
// ✅ V2/V3 统一使用 PancakeSwap SmartRouter(支持 multicall + V2 swapExactTokensForTokens + V3 exactInputSingle)
|
|
19
19
|
// 参考: flap-bundle-release 官方示例统一使用 smartRouter(0x13f4EA83D0bd40E75C8222255bc855a974568Dd4)
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { ethers, Wallet, JsonRpcProvider, Contract, Interface } from 'ethers';
|
|
10
10
|
import { NonceManager, getOptimizedGasPrice, getDeadline, encodeV3Path, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
11
|
-
import { ADDRESSES, ZERO_ADDRESS } from '../../../
|
|
12
|
-
import { GAS_LIMITS } from '
|
|
13
|
-
import { MULTICALL3_ABI, V2_ROUTER_ABI, V3_ROUTER02_ABI, V3_QUOTER_ABI, ERC20_ABI } from '
|
|
14
|
-
import { getErrorMessageFromUnknown } from '
|
|
11
|
+
import { ADDRESSES, ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
12
|
+
import { GAS_LIMITS } from '../../../core/constants/index.js';
|
|
13
|
+
import { MULTICALL3_ABI, V2_ROUTER_ABI, V3_ROUTER02_ABI, V3_QUOTER_ABI, ERC20_ABI } from '../../../core/shared-abis/common.js';
|
|
14
|
+
import { getErrorMessageFromUnknown } from '../../../core/index.js';
|
|
15
15
|
import { CHAIN_ID_MAP, getTxType, getGasPriceConfig, shouldExtractProfit, calculateProfit, calculateBatchProfit, getProfitRecipient, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, } from './config.js';
|
|
16
16
|
// ==================== 常量 ====================
|
|
17
17
|
const MULTICALL3_ADDRESS = ADDRESSES.BSC.Multicall3;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ethers, Wallet, JsonRpcProvider } from 'ethers';
|
|
2
|
-
import { MerkleClient } from '
|
|
2
|
+
import { MerkleClient } from '../../../core/clients/merkle.js';
|
|
3
3
|
import { getOptimizedGasPrice, buildProfitHopTransactions, PROFIT_HOP_COUNT } from '../../../utils/bundle-helpers.js';
|
|
4
4
|
import { FLAP_PORTAL_ADDRESSES } from '../constants.js';
|
|
5
|
-
import { ZERO_ADDRESS } from '../../../
|
|
6
|
-
import { GAS_LIMITS, CHAINS } from '
|
|
5
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
6
|
+
import { GAS_LIMITS, CHAINS } from '../../../core/constants/index.js';
|
|
7
7
|
import { CHAIN_ID_MAP, PORTAL_ABI, getTxType, getGasPriceConfig, shouldExtractProfit, calculateProfit, calculateBatchProfit, getProfitRecipient, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, } from './config.js';
|
|
8
8
|
const DEFAULT_GAS_LIMIT = 800000;
|
|
9
9
|
/**
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
5
5
|
import { calculateSellAmount } from '../../../utils/swap-helpers.js';
|
|
6
6
|
import { NonceManager, getOptimizedGasPrice } from '../../../utils/bundle-helpers.js';
|
|
7
|
-
import { ZERO_ADDRESS } from '../../../
|
|
7
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
8
8
|
import { getGasPriceConfig, getTxType, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, PORTAL_ABI, } from './config.js';
|
|
9
|
-
import { buildTransactionRequest } from '
|
|
9
|
+
import { buildTransactionRequest } from '../../../core/tx/build-request.js';
|
|
10
10
|
import { BRIBE_GAS_LIMIT, ERC20_BALANCE_OF_ABI, getGasLimit, getTokenToNativeQuote, } from './swap-helpers.js';
|
|
11
11
|
import { buildApprovalTransaction, buildProfitTransaction, calculateProfitAmount, createChainContext, quoteSellOutput, } from './swap-planning.js';
|
|
12
12
|
/**
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Contract } from 'ethers';
|
|
7
7
|
import { PROFIT_HOP_COUNT } from '../../../utils/bundle-helpers.js';
|
|
8
|
-
import { ADDRESSES } from '../../../
|
|
9
|
-
import { CHAINS, getProfitRateBps } from '
|
|
10
|
-
import { V2_ROUTER_QUOTE_ABI } from '
|
|
8
|
+
import { ADDRESSES } from '../../../core/constants/index.js';
|
|
9
|
+
import { CHAINS, getProfitRateBps } from '../../../core/constants/index.js';
|
|
10
|
+
import { V2_ROUTER_QUOTE_ABI } from '../../../core/shared-abis/common.js';
|
|
11
11
|
// ==================== 链常量 ====================
|
|
12
12
|
export const BSC_PANCAKE_V2_ROUTER = ADDRESSES.BSC.PancakeV2Router;
|
|
13
13
|
export const BSC_WBNB = ADDRESSES.BSC.WBNB;
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
5
5
|
import { NonceManager, getOptimizedGasPrice, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
6
6
|
import { FLAP_PORTAL_ADDRESSES } from '../constants.js';
|
|
7
|
-
import { ZERO_ADDRESS } from '../../../
|
|
8
|
-
import { GAS_LIMITS } from '
|
|
9
|
-
import { ERC20_BALANCE_ABI } from '
|
|
7
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
8
|
+
import { GAS_LIMITS } from '../../../core/constants/index.js';
|
|
9
|
+
import { ERC20_BALANCE_ABI } from '../../../core/shared-abis/common.js';
|
|
10
10
|
import { getGasPriceConfig, getTxType, getProfitRecipient, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, PORTAL_ABI, } from './config.js';
|
|
11
|
-
import { createSignProvider } from '../../../bundle
|
|
12
|
-
import { buildTransactionRequest } from '
|
|
13
|
-
import { getErrorMessageFromUnknown } from '
|
|
14
|
-
import { splitAmountByWeight as splitAmount } from '
|
|
11
|
+
import { createSignProvider } from '../../../bundle/sign-context-helpers.js';
|
|
12
|
+
import { buildTransactionRequest } from '../../../core/tx/build-request.js';
|
|
13
|
+
import { getErrorMessageFromUnknown } from '../../../core/index.js';
|
|
14
|
+
import { splitAmountByWeight as splitAmount } from '../../../core/amount/split-by-weight.js';
|
|
15
15
|
import { getChainId, getGasLimit, getNativeTokenName, getProfitRatePerTxBps, getTokenToNativeQuote, validateSwapCounts, } from './swap-buy-first-helpers.js';
|
|
16
16
|
export async function flapBundleBuyFirstMerkle(params) {
|
|
17
17
|
const { chain, buyerPrivateKey, buyerPrivateKeys, sellerPrivateKey, sellerPrivateKeys, tokenAddress, buyerFunds, buyerFundsPercentage, config, quoteToken, quoteTokenDecimals, buyCount: _buyCount, sellCount: _sellCount, } = params;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Wallet } from 'ethers';
|
|
5
5
|
import { NonceManager } from '../../../utils/bundle-helpers.js';
|
|
6
|
-
import { ZERO_ADDRESS } from '../../../
|
|
6
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
7
7
|
import { getBribeAmount } from './config.js';
|
|
8
8
|
import { createChainContext } from './swap-planning.js';
|
|
9
9
|
import { flapQuickBatchSwapMerkle } from './swap-quick-batch.js';
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* 功能:钱包A卖出代币 → 钱包B买入相同数量 → 原子执行
|
|
5
5
|
*/
|
|
6
6
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
7
|
-
import { ADDRESSES } from '../../../
|
|
8
|
-
import { V2_ROUTER_QUOTE_ABI, ERC20_BALANCE_ABI, ERC20_ABI } from '
|
|
7
|
+
import { ADDRESSES } from '../../../core/constants/index.js';
|
|
8
|
+
import { V2_ROUTER_QUOTE_ABI, ERC20_BALANCE_ABI, ERC20_ABI } from '../../../core/shared-abis/common.js';
|
|
9
9
|
import { generateWallets } from '../../../utils/wallet.js';
|
|
10
|
-
import { GAS_LIMITS, CHAINS } from '
|
|
10
|
+
import { GAS_LIMITS, CHAINS } from '../../../core/constants/index.js';
|
|
11
11
|
// ==================== 多跳转账常量(使用统一常量) ====================
|
|
12
12
|
export const NATIVE_TRANSFER_GAS_LIMIT = GAS_LIMITS.NATIVE_TRANSFER;
|
|
13
13
|
export const ERC20_TRANSFER_GAS_LIMIT_HOP = GAS_LIMITS.ERC20_TRANSFER;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ethers, Contract } from 'ethers';
|
|
2
2
|
import { NonceManager, getOptimizedGasPrice, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
3
3
|
import { FLAP_PORTAL_ADDRESSES } from '../constants.js';
|
|
4
|
-
import { ZERO_ADDRESS } from '../../../
|
|
5
|
-
import { ERC20_ALLOWANCE_ABI } from '
|
|
4
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
5
|
+
import { ERC20_ALLOWANCE_ABI } from '../../../core/shared-abis/common.js';
|
|
6
6
|
import { getGasPriceConfig, getTxType, getProfitRecipient, PORTAL_ABI } from './config.js';
|
|
7
|
-
import { getProfitRateBps as getSharedProfitRateBps } from '
|
|
8
|
-
import { getErrorMessageFromUnknown } from '
|
|
9
|
-
import { createSignProvider } from '../../../bundle
|
|
7
|
+
import { getProfitRateBps as getSharedProfitRateBps } from '../../../core/constants/index.js';
|
|
8
|
+
import { getErrorMessageFromUnknown } from '../../../core/index.js';
|
|
9
|
+
import { createSignProvider } from '../../../bundle/sign-context-helpers.js';
|
|
10
10
|
import { APPROVE_INTERFACE, ERC20_BALANCE_OF_ABI, getChainId, getNativeTokenName, } from './swap-helpers.js';
|
|
11
11
|
const providerCache = new Map();
|
|
12
12
|
const PROVIDER_CACHE_TTL_MS = 60 * 1000;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
5
5
|
import { calculateSellAmount } from '../../../utils/swap-helpers.js';
|
|
6
6
|
import { NonceManager, getOptimizedGasPrice, PROFIT_HOP_COUNT } from '../../../utils/bundle-helpers.js';
|
|
7
|
-
import { ZERO_ADDRESS } from '../../../
|
|
8
|
-
import { ERC20_ABI } from '
|
|
7
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
8
|
+
import { ERC20_ABI } from '../../../core/shared-abis/common.js';
|
|
9
9
|
import { getGasPriceConfig, getTxType, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, PORTAL_ABI, } from './config.js';
|
|
10
|
-
import { buildTransactionRequest } from '
|
|
11
|
-
import { GAS_LIMITS } from '
|
|
10
|
+
import { buildTransactionRequest } from '../../../core/tx/build-request.js';
|
|
11
|
+
import { GAS_LIMITS } from '../../../core/constants/index.js';
|
|
12
12
|
import { BRIBE_GAS_LIMIT, NATIVE_TRANSFER_GAS_LIMIT, buildBNBHopChainForERC20, buildERC20HopChain, buildNativeHopChain, generateDisperseHopPaths, getGasLimit, getTokenToNativeQuote, } from './swap-helpers.js';
|
|
13
13
|
import { buildProfitTransaction, calculateProfitAmount, createChainContext, quoteSellOutput, } from './swap-planning.js';
|
|
14
14
|
/**
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
5
5
|
import { calculateSellAmount } from '../../../utils/swap-helpers.js';
|
|
6
6
|
import { NonceManager, getOptimizedGasPrice } from '../../../utils/bundle-helpers.js';
|
|
7
|
-
import { ZERO_ADDRESS } from '../../../
|
|
7
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
8
8
|
import { getGasPriceConfig, getTxType, getBribeAmount, BLOCKRAZOR_BUILDER_EOA, PORTAL_ABI, } from './config.js';
|
|
9
|
-
import { buildTransactionRequest } from '
|
|
9
|
+
import { buildTransactionRequest } from '../../../core/tx/build-request.js';
|
|
10
10
|
import { BRIBE_GAS_LIMIT, getGasLimit, getTokenToNativeQuote, } from './swap-helpers.js';
|
|
11
11
|
import { buildApprovalTransaction, buildNoncePlan, buildProfitTransaction, calculateBuyerNeed, calculateProfitAmount, createChainContext, planNonces, quoteSellOutput, validateBalances, } from './swap-planning.js';
|
|
12
12
|
export async function flapBundleSwapMerkle(params) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { ethers, Wallet } from 'ethers';
|
|
5
5
|
import { getOptimizedGasPrice, NonceManager, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
6
|
-
import { GAS_LIMITS, calculateTransferFee } from '
|
|
6
|
+
import { GAS_LIMITS, calculateTransferFee } from '../../../core/constants/index.js';
|
|
7
7
|
import { CHAIN_ID_MAP, getTxType, getGasPriceConfig, shouldExtractProfit, getProfitRecipient } from './config.js';
|
|
8
|
-
import { batchGetBalances, calculateGasLimit, generateHopWallets, getErc20Decimals, isNativeTokenAddress, normalizeAmounts, } from '../../../bundle
|
|
9
|
-
import { createSignProvider, createSignWallet, normalizeItemsOrRecipientsAmounts, resolveHopCountInput, resolveProvidedHops, } from '../../../bundle
|
|
8
|
+
import { batchGetBalances, calculateGasLimit, generateHopWallets, getErc20Decimals, isNativeTokenAddress, normalizeAmounts, } from '../../../bundle/internal.js';
|
|
9
|
+
import { createSignProvider, createSignWallet, normalizeItemsOrRecipientsAmounts, resolveHopCountInput, resolveProvidedHops, } from '../../../bundle/sign-context-helpers.js';
|
|
10
10
|
export async function flapDisperseWithBundleMerkle(params) {
|
|
11
11
|
const { chain, fromPrivateKey, recipients, amount, amounts, tokenAddress, tokenDecimals, hopCount = 0, hopPrivateKeys, items, config, startNonce, } = params;
|
|
12
12
|
if (!recipients || recipients.length === 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BundleStatus } from '
|
|
2
|
-
import type { SoulPointSignatureMode, VNormalizationMode } from '
|
|
1
|
+
import { BundleStatus } from '../../core/clients/club48.js';
|
|
2
|
+
import type { SoulPointSignatureMode, VNormalizationMode } from '../../core/clients/club48.js';
|
|
3
3
|
export type FlapBundleConfig = {
|
|
4
4
|
rpcUrl: string;
|
|
5
5
|
club48Endpoint?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ethers, Wallet, JsonRpcProvider } from 'ethers';
|
|
2
|
-
import { Club48Client, sendBatchPrivateTransactions, BUILDER_CONTROL_EOA } from '
|
|
2
|
+
import { Club48Client, sendBatchPrivateTransactions, BUILDER_CONTROL_EOA } from '../../core/clients/club48.js';
|
|
3
3
|
import { FLAP_PORTAL_ADDRESSES, FLAP_ORIGINAL_PORTAL_ADDRESSES } from './constants.js';
|
|
4
|
-
import { GAS_LIMITS, CHAINS, ZERO_ADDRESS } from '
|
|
5
|
-
import { consoleSdkLogger } from '
|
|
4
|
+
import { GAS_LIMITS, CHAINS, ZERO_ADDRESS } from '../../core/constants/index.js';
|
|
5
|
+
import { consoleSdkLogger } from '../../core/index.js';
|
|
6
6
|
const sdkLogger = consoleSdkLogger;
|
|
7
7
|
// Portal ABI (简化版,仅包含需要的方法)
|
|
8
8
|
const PORTAL_ABI = [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - VaultPortal.newTaxTokenWithVault:带金库的税币(legacy 参数结构)
|
|
9
9
|
*/
|
|
10
10
|
import { Contract, ZeroAddress } from 'ethers';
|
|
11
|
-
import { ZERO_ADDRESS } from '
|
|
11
|
+
import { ZERO_ADDRESS } from '../../core/constants/index.js';
|
|
12
12
|
import { buildVaultParams, VAULT_PORTAL_ADDRESSES, VAULT_PORTAL_ABI } from './vault.js';
|
|
13
13
|
import { TokenVersion, MigratorType, FeeType } from './portal.js';
|
|
14
14
|
/** 分红代币:将 launching token 本身作为分红代币 */
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* @module vault
|
|
29
29
|
*/
|
|
30
30
|
import { Contract, AbiCoder, ZeroAddress } from 'ethers';
|
|
31
|
-
import { getErrorMessageFromUnknown } from '
|
|
31
|
+
import { getErrorMessageFromUnknown } from '../../core/index.js';
|
|
32
32
|
function mapFieldDescriptor(f) {
|
|
33
33
|
return {
|
|
34
34
|
name: f.name,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FourClient, buildLoginMessage } from '
|
|
2
|
-
import { createTokenOnChain } from '../contracts/tm.js';
|
|
1
|
+
import { FourClient, buildLoginMessage } from '../../core/clients/four.js';
|
|
2
|
+
import { createTokenOnChain } from '../four/contracts/tm.js';
|
|
3
3
|
import { Wallet, parseEther } from 'ethers';
|
|
4
4
|
import { readFileSync } from 'fs';
|
|
5
5
|
import { basename } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Contract, JsonRpcProvider, Wallet } from 'ethers';
|
|
2
|
-
import Helper3Abi from '
|
|
3
|
-
import { ADDRESSES } from '
|
|
2
|
+
import Helper3Abi from '../../../abis/contracts/TokenManagerHelper3.json' with { type: 'json' };
|
|
3
|
+
import { ADDRESSES } from '../../../core/constants/index.js';
|
|
4
4
|
const HELPER3_ABI = Helper3Abi;
|
|
5
5
|
export class Helper3 {
|
|
6
6
|
address;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JsonRpcProvider } from 'ethers';
|
|
2
2
|
import type { TransactionRequest } from 'ethers';
|
|
3
|
-
import type { SoulPointSignatureMode, VNormalizationMode } from '
|
|
4
|
-
import { BundleStatus } from '
|
|
5
|
-
import type { GeneratedWallet } from '
|
|
3
|
+
import type { SoulPointSignatureMode, VNormalizationMode } from '../../../core/clients/club48.js';
|
|
4
|
+
import { BundleStatus } from '../../../core/clients/club48.js';
|
|
5
|
+
import type { GeneratedWallet } from '../../../utils/wallet.js';
|
|
6
6
|
/**
|
|
7
7
|
* four.meme Bundle 交易方法
|
|
8
8
|
* 使用 48.club Bundle 服务实现原子化交易
|
|
9
9
|
*/
|
|
10
|
-
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '
|
|
10
|
+
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '../../../bundle/errors.js';
|
|
11
11
|
export type FourBundleConfig = {
|
|
12
12
|
rpcUrl: string;
|
|
13
13
|
fourApiUrl?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import { CHAINS } from '
|
|
2
|
+
import { CHAINS } from '../../../core/constants/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* four.meme Bundle 交易方法
|
|
5
5
|
* 使用 48.club Bundle 服务实现原子化交易
|
|
6
6
|
*/
|
|
7
|
-
// 错误信息国际化(实现见 bundle
|
|
8
|
-
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '
|
|
7
|
+
// 错误信息国际化(实现见 bundle/errors)
|
|
8
|
+
export { BUNDLE_ERRORS as ERRORS, getBundleErrorMessage as getErrorMessage } from '../../../bundle/errors.js';
|
|
9
9
|
export async function waitForBundleWithProvider(provider, firstTxSigned, _bundleUuid) {
|
|
10
10
|
const maxAttempts = 60; // 最多等待 60 秒
|
|
11
11
|
for (let i = 0; i < maxAttempts; i++) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BundleStatus } from '
|
|
2
|
-
import type { GeneratedWallet } from '
|
|
1
|
+
import { BundleStatus } from '../../../core/clients/club48.js';
|
|
2
|
+
import type { GeneratedWallet } from '../../../utils/wallet.js';
|
|
3
3
|
import { FourBundleConfig, FourCreateWithBundleBuyParams, FourCreateWithBundleBuyResult } from './tm-bundle-helpers.js';
|
|
4
4
|
export type { FourBundleConfig, FourCreateWithBundleBuyParams, FourCreateWithBundleBuyResult, FourProviderBundleWaitStatus, } from './tm-bundle-helpers.js';
|
|
5
5
|
export declare function createTokenWithBundleBuy(params: FourCreateWithBundleBuyParams): Promise<FourCreateWithBundleBuyResult>;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* tm-bundle - 主函数
|
|
3
3
|
*/
|
|
4
4
|
import { ethers, Wallet, JsonRpcProvider } from 'ethers';
|
|
5
|
-
import { Club48Client, sendBatchPrivateTransactions, BUILDER_CONTROL_EOA, } from '
|
|
6
|
-
import { ADDRESSES, CHAINS, ZERO_ADDRESS } from '
|
|
7
|
-
import { GAS_LIMITS, getProfitRateBps, getProfitRecipient } from '
|
|
8
|
-
import { buildProfitHopTransactions, PROFIT_HOP_COUNT } from '
|
|
9
|
-
import TM2Abi from '
|
|
10
|
-
import { FourClient, buildLoginMessage } from '
|
|
5
|
+
import { Club48Client, sendBatchPrivateTransactions, BUILDER_CONTROL_EOA, } from '../../../core/clients/club48.js';
|
|
6
|
+
import { ADDRESSES, CHAINS, ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
7
|
+
import { GAS_LIMITS, getProfitRateBps, getProfitRecipient } from '../../../core/constants/index.js';
|
|
8
|
+
import { buildProfitHopTransactions, PROFIT_HOP_COUNT } from '../../../utils/bundle-helpers.js';
|
|
9
|
+
import TM2Abi from '../../../abis/contracts/TokenManager2.json' with { type: 'json' };
|
|
10
|
+
import { FourClient, buildLoginMessage } from '../../../core/clients/four.js';
|
|
11
11
|
import { trySell } from './tm.js';
|
|
12
|
-
import { consoleSdkLogger, getErrorMessageFromUnknown } from '
|
|
12
|
+
import { consoleSdkLogger, getErrorMessageFromUnknown } from '../../../core/index.js';
|
|
13
13
|
import { getErrorMessage, waitForBundleWithProvider, } from './tm-bundle-helpers.js';
|
|
14
14
|
const TM2_ABI = TM2Abi;
|
|
15
15
|
const sdkLogger = consoleSdkLogger;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BytesLike, Wallet } from 'ethers';
|
|
2
2
|
import type { ContractTransactionReceipt } from 'ethers';
|
|
3
|
-
import { createBscProvider } from '
|
|
3
|
+
import { createBscProvider } from '../../../utils/provider-factory.js';
|
|
4
4
|
export type Providerish = ReturnType<typeof createBscProvider>;
|
|
5
5
|
export type Signerish = Wallet;
|
|
6
6
|
export type CreateOnChainParams = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Contract, Wallet } from 'ethers';
|
|
2
|
-
import TM2Abi from '
|
|
3
|
-
import Helper3Abi from '
|
|
4
|
-
import { ADDRESSES, ZERO_ADDRESS } from '
|
|
5
|
-
import { createBscProvider } from '
|
|
2
|
+
import TM2Abi from '../../../abis/contracts/TokenManager2.json' with { type: 'json' };
|
|
3
|
+
import Helper3Abi from '../../../abis/contracts/TokenManagerHelper3.json' with { type: 'json' };
|
|
4
|
+
import { ADDRESSES, ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
5
|
+
import { createBscProvider } from '../../../utils/provider-factory.js';
|
|
6
6
|
import { TM1 } from './tm1.js';
|
|
7
7
|
import { TM2 } from './tm2.js';
|
|
8
8
|
const TM2_ABI = TM2Abi;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Contract, JsonRpcProvider } from 'ethers';
|
|
2
|
-
import TM1Abi from '
|
|
3
|
-
import { ADDRESSES } from '
|
|
2
|
+
import TM1Abi from '../../../abis/contracts/TokenManager.json' with { type: 'json' };
|
|
3
|
+
import { ADDRESSES } from '../../../core/constants/index.js';
|
|
4
4
|
const TM1_ABI = TM1Abi;
|
|
5
5
|
export class TM1 {
|
|
6
6
|
address;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Contract, JsonRpcProvider, Wallet } from 'ethers';
|
|
2
|
-
import TM2Abi from '
|
|
3
|
-
import { ADDRESSES, ZERO_ADDRESS } from '
|
|
2
|
+
import TM2Abi from '../../../abis/contracts/TokenManager2.json' with { type: 'json' };
|
|
3
|
+
import { ADDRESSES, ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
4
4
|
const TM2_ABI = TM2Abi;
|
|
5
5
|
export class TM2 {
|
|
6
6
|
address;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ethers, Contract, Wallet, JsonRpcProvider } from 'ethers';
|
|
8
8
|
import TaxTokenAbi from '../../abis/contracts/TaxToken.json' with { type: 'json' };
|
|
9
|
-
import { ADDRESSES, CHAINS } from '
|
|
9
|
+
import { ADDRESSES, CHAINS } from '../../core/constants/index.js';
|
|
10
10
|
// ============================================================================
|
|
11
11
|
// 常量
|
|
12
12
|
// ============================================================================
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 刷持有人 helpers — facade re-export(实现见
|
|
2
|
+
* 刷持有人 helpers — facade re-export(实现见 internal/)
|
|
3
3
|
*/
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export { generateDisperseHopPaths, buildDisperseHopChainNative, buildDisperseHopChainERC20, calculateMaxWalletsPerBatch, DEFAULT_MAX_WALLETS_PER_BATCH_NATIVE, DEFAULT_MAX_WALLETS_PER_BATCH_ERC20, chunkArray, } from './
|
|
7
|
-
export { buildERC20TransferTx, buildERC20ApproveTx, buildNativeTransferTx } from './
|
|
8
|
-
export { getBaseTokenAddress, getRouterAddress, getWrappedNativeAddress } from './
|
|
9
|
-
export { buildFlapBuyTx, buildFourBuyTx, buildDaoaasBuyTx, buildV2BuyTx, buildV3BuyTx, buildV2BuyTxWithERC20, buildV3BuyTxWithERC20, } from './
|
|
4
|
+
export * from './internal/addresses.js';
|
|
5
|
+
export * from './internal/constants.js';
|
|
6
|
+
export { generateDisperseHopPaths, buildDisperseHopChainNative, buildDisperseHopChainERC20, calculateMaxWalletsPerBatch, DEFAULT_MAX_WALLETS_PER_BATCH_NATIVE, DEFAULT_MAX_WALLETS_PER_BATCH_ERC20, chunkArray, } from './internal/disperse.js';
|
|
7
|
+
export { buildERC20TransferTx, buildERC20ApproveTx, buildNativeTransferTx } from './internal/transfer-tx.js';
|
|
8
|
+
export { getBaseTokenAddress, getRouterAddress, getWrappedNativeAddress } from './internal/routing.js';
|
|
9
|
+
export { buildFlapBuyTx, buildFourBuyTx, buildDaoaasBuyTx, buildV2BuyTx, buildV3BuyTx, buildV2BuyTxWithERC20, buildV3BuyTxWithERC20, } from './internal/buy-tx.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 刷持有人 helpers — facade re-export(实现见
|
|
2
|
+
* 刷持有人 helpers — facade re-export(实现见 internal/)
|
|
3
3
|
*/
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export { generateDisperseHopPaths, buildDisperseHopChainNative, buildDisperseHopChainERC20, calculateMaxWalletsPerBatch, DEFAULT_MAX_WALLETS_PER_BATCH_NATIVE, DEFAULT_MAX_WALLETS_PER_BATCH_ERC20, chunkArray, } from './
|
|
7
|
-
export { buildERC20TransferTx, buildERC20ApproveTx, buildNativeTransferTx } from './
|
|
8
|
-
export { getBaseTokenAddress, getRouterAddress, getWrappedNativeAddress } from './
|
|
9
|
-
export { buildFlapBuyTx, buildFourBuyTx, buildDaoaasBuyTx, buildV2BuyTx, buildV3BuyTx, buildV2BuyTxWithERC20, buildV3BuyTxWithERC20, } from './
|
|
4
|
+
export * from './internal/addresses.js';
|
|
5
|
+
export * from './internal/constants.js';
|
|
6
|
+
export { generateDisperseHopPaths, buildDisperseHopChainNative, buildDisperseHopChainERC20, calculateMaxWalletsPerBatch, DEFAULT_MAX_WALLETS_PER_BATCH_NATIVE, DEFAULT_MAX_WALLETS_PER_BATCH_ERC20, chunkArray, } from './internal/disperse.js';
|
|
7
|
+
export { buildERC20TransferTx, buildERC20ApproveTx, buildNativeTransferTx } from './internal/transfer-tx.js';
|
|
8
|
+
export { getBaseTokenAddress, getRouterAddress, getWrappedNativeAddress } from './internal/routing.js';
|
|
9
|
+
export { buildFlapBuyTx, buildFourBuyTx, buildDaoaasBuyTx, buildV2BuyTx, buildV3BuyTx, buildV2BuyTxWithERC20, buildV3BuyTxWithERC20, } from './internal/buy-tx.js';
|