four-flap-meme-sdk 2.2.20 → 3.0.1
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/index.d.ts +1 -1
- package/dist/chains/bsc/index.js +2 -0
- 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/index.d.ts +2 -0
- package/dist/chains/eni/index.js +4 -0
- 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 +56 -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,11 @@
|
|
|
1
1
|
import { ethers, Wallet, Contract } from 'ethers';
|
|
2
2
|
import { generateWallets } from '../../../utils/wallet.js';
|
|
3
3
|
import { V2_ROUTER_ABI, V3_ROUTER02_ABI, ERC20_BALANCE_ABI, ERC20_ABI } from '../../../abis/common.js';
|
|
4
|
-
import { createSignProvider } from '../../../bundle
|
|
5
|
-
import { quoteV2, quoteV3 } from '../../../
|
|
6
|
-
import { GAS_LIMITS, CHAINS } from '../../../
|
|
4
|
+
import { createSignProvider } from '../../../bundle/sign-context-helpers.js';
|
|
5
|
+
import { quoteV2, quoteV3 } from '../../../domains/quote/quote-helpers.js';
|
|
6
|
+
import { GAS_LIMITS, CHAINS } from '../../../core/constants/index.js';
|
|
7
7
|
import { getDeadline } from '../../../utils/bundle-helpers.js';
|
|
8
|
-
import { ADDRESSES } from '../../../
|
|
8
|
+
import { ADDRESSES } from '../../../core/constants/index.js';
|
|
9
9
|
// ==================== 多跳转账常量(使用统一常量) ====================
|
|
10
10
|
export const NATIVE_TRANSFER_GAS_LIMIT = GAS_LIMITS.NATIVE_TRANSFER;
|
|
11
11
|
export const ERC20_TRANSFER_GAS_LIMIT_HOP = GAS_LIMITS.ERC20_TRANSFER;
|
|
@@ -557,7 +557,7 @@ export const PANCAKE_V3_ROUTER_ADDRESS = ADDRESSES.BSC.PancakeV3Router;
|
|
|
557
557
|
// 常量
|
|
558
558
|
export const FLAT_FEE = 0n;
|
|
559
559
|
export const WBNB_ADDRESS = ADDRESSES.BSC.WBNB;
|
|
560
|
-
export { ZERO_ADDRESS } from '../../../
|
|
560
|
+
export { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
561
561
|
// ✅ ERC20_BALANCE_OF_ABI 已在文件开头定义
|
|
562
562
|
/**
|
|
563
563
|
* PancakeSwap捆绑换手(V2/V3通用)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* bundle-swap - 主函数
|
|
3
3
|
*/
|
|
4
|
-
import { GAS_LIMITS, CHAINS, getProfitRecipient } from '../../../
|
|
4
|
+
import { GAS_LIMITS, CHAINS, getProfitRecipient } from '../../../core/constants/index.js';
|
|
5
5
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
6
6
|
import { calculateSellAmount } from '../../../utils/swap-helpers.js';
|
|
7
7
|
import { NonceManager, getDeadline, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
8
|
-
import { ADDRESSES, BLOCKRAZOR_BUILDER_EOA } from '../../../
|
|
8
|
+
import { ADDRESSES, BLOCKRAZOR_BUILDER_EOA } from '../../../core/constants/index.js';
|
|
9
9
|
import { ERC20_ABI } from '../../../abis/common.js';
|
|
10
10
|
import { BRIBE_GAS_LIMIT, ERC20_BALANCE_OF_ABI, FLAT_FEE, NATIVE_TRANSFER_GAS_LIMIT, PANCAKE_V2_ROUTER_ABI, PANCAKE_V2_ROUTER_ADDRESS, PANCAKE_V3_ROUTER_ABI, PANCAKE_V3_ROUTER_ADDRESS, ZERO_ADDRESS, buildBNBHopChainForERC20, buildERC20HopChain, buildNativeHopChain, buildNoncePlanFromNonces, buildSwapTransactions, calculateBuyerBudget, calculateProfitAmount, createPancakeContext, generateDisperseHopPaths, getERC20ToNativeQuote, getGasLimit, getGasPrice, planNonces, quoteSellOutput, validateFinalBalances, } from './bundle-swap-helpers.js';
|
|
11
11
|
export async function pancakeBundleSwapMerkle(params) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IRO 平台常量 — 合约地址 + ABI
|
|
3
3
|
*/
|
|
4
|
-
import { ADDRESSES } from '../../../../
|
|
4
|
+
import { ADDRESSES } from '../../../../core/constants/index.js';
|
|
5
5
|
// ============================================================================
|
|
6
6
|
// 合约地址
|
|
7
7
|
// ============================================================================
|
|
@@ -10,7 +10,7 @@ import { Contract, Interface, Wallet, JsonRpcProvider } from 'ethers';
|
|
|
10
10
|
import { BSC_CHAIN_ID, BSC_RPC_URL } from '../../constants.js';
|
|
11
11
|
import { IRO_TOKEN_ABI, SUBSCRIBE_GAS_LIMIT } from './constants.js';
|
|
12
12
|
import { buildProfitHopTransactions, PROFIT_HOP_COUNT } from '../../../../utils/bundle-helpers.js';
|
|
13
|
-
import { getProfitRecipient } from '../../../../
|
|
13
|
+
import { getProfitRecipient } from '../../../../core/constants/profit.js';
|
|
14
14
|
const tokenIface = new Interface(IRO_TOKEN_ABI);
|
|
15
15
|
// ============================================================================
|
|
16
16
|
// 查询
|
|
@@ -14,8 +14,8 @@ import { createEniProvider } from '../../../utils/provider-factory.js';
|
|
|
14
14
|
import { BATCH_ROUTER_ADDRESS, estimateGas } from './constants.js';
|
|
15
15
|
import { validateBatchParams, encodeBatchTransfer, encodeBatchTransferToken, buildBatchRouterTx } from './utils.js';
|
|
16
16
|
import { ERC20_ABI } from '../../../abis/common.js';
|
|
17
|
-
import { getProfitRecipient, calculateTransferFee } from '../../../
|
|
18
|
-
import { GAS_LIMITS } from '../../../
|
|
17
|
+
import { getProfitRecipient, calculateTransferFee } from '../../../core/constants/profit.js';
|
|
18
|
+
import { GAS_LIMITS } from '../../../core/constants/gas.js';
|
|
19
19
|
const erc20Iface = new Interface(ERC20_ABI);
|
|
20
20
|
const DEFAULT_GAS_PER_SWEEP = 200000n;
|
|
21
21
|
const GAS_NATIVE_TRANSFER = 21000n;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 通用常量请使用 shared/constants
|
|
5
5
|
*/
|
|
6
|
-
import { CHAINS, ADDRESSES, GAS_LIMITS } from '../../
|
|
6
|
+
import { CHAINS, ADDRESSES, GAS_LIMITS } from '../../core/constants/index.js';
|
|
7
7
|
// ============================================================================
|
|
8
8
|
// 链配置(从 shared 导出)
|
|
9
9
|
// ============================================================================
|
|
@@ -21,3 +21,5 @@ export type { LPPairInfo, GetLPInfoParams, BatchGetLPInfoParams, AddLiquidityETH
|
|
|
21
21
|
export { IroFactoryQuery as EniIroFactoryQuery, encodeCreateProjectCall as eniIroEncodeCreateProjectCall, createProject as eniIroCreateProject, parseCreateProjectEvent as eniIroParseCreateProjectEvent, IroTokenQuery as EniIroTokenQuery, subscribe as eniIroSubscribe, pledge as eniIroPledge, batchSubscribe as eniIroBatchSubscribe, batchSubscribeForSubmit as eniIroBatchSubscribeForSubmit, IroPoolQuery as EniIroPoolQuery, poolRemovePledge as eniIroPoolRemovePledge, poolExtract as eniIroPoolExtract, poolTransferAwards as eniIroPoolTransferAwards, batchExtract as eniIroBatchExtract, ENI_IRO_FACTORY_ADDRESS, ENI_IRO_OWNER_ADDRESS, ENI_IRO_SELL_FEE_CONTRACT, ENI_IROSWAP_V2_ROUTER, ENI_IROSWAP_V2_FACTORY, IRO_FACTORY_ABI as ENI_IRO_FACTORY_ABI, IRO_TOKEN_ABI as ENI_IRO_TOKEN_ABI, IRO_POOL_ABI as ENI_IRO_POOL_ABI, CREATE_PROJECT_GAS_LIMIT as ENI_CREATE_PROJECT_GAS_LIMIT, ENI_IRO_PLATFORM_URL, setIroApiBase as setEniIroApiBase, iroApiCreateProject as eniIroApiCreateProject, iroApiUploadImage as eniIroApiUploadImage, getTokenWhiteList as eniIroGetTokenWhiteList, addTokenWhiteListForSubmit as eniIroAddTokenWhiteListForSubmit, batchAddTokenWhiteListForSubmit as eniIroBatchAddTokenWhiteListForSubmit, removeTokenWhiteListForSubmit as eniIroRemoveTokenWhiteListForSubmit, IRO_OWNER_WHITELIST_ABI as ENI_IRO_OWNER_WHITELIST_ABI, } from './platforms/iro/index.js';
|
|
22
22
|
export type { WhiteListQuota as EniWhiteListQuota, IroCreateProjectParams as EniIroCreateProjectParams, IroSubscribeParams as EniIroSubscribeParams, IroPledgeParams as EniIroPledgeParams, IroTokenInfo as EniIroTokenInfo, IroTxResult as EniIroTxResult, IroCreateProjectResult as EniIroCreateProjectResult, IroQueryConfig as EniIroQueryConfig, IroCreateParams as EniIroCreateParams, IroBatchSubscribeForSubmitParams as EniIroBatchSubscribeForSubmitParams, IroBatchSubscribeForSubmitResult as EniIroBatchSubscribeForSubmitResult, WhitelistManageConfig as EniWhitelistManageConfig, AddWhitelistParams as EniAddWhitelistParams, BatchAddWhitelistParams as EniBatchAddWhitelistParams, RemoveWhitelistParams as EniRemoveWhitelistParams, GetWhitelistParams as EniGetWhitelistParams, } from './platforms/iro/index.js';
|
|
23
23
|
export * from './flat-aliases.js';
|
|
24
|
+
export { submitBundleToEni, submitEniParallelThenProfit, } from './submit.js';
|
|
25
|
+
export type { EniBundleSubmitConfig, EniBundleSubmitResult, EniTxResult, } from './submit.js';
|
package/dist/chains/eni/index.js
CHANGED
|
@@ -32,3 +32,7 @@ export { getLPPairInfo, batchGetLPPairInfo, getPairAddress, addLiquidityETHForSu
|
|
|
32
32
|
// ============================================================================
|
|
33
33
|
export { IroFactoryQuery as EniIroFactoryQuery, encodeCreateProjectCall as eniIroEncodeCreateProjectCall, createProject as eniIroCreateProject, parseCreateProjectEvent as eniIroParseCreateProjectEvent, IroTokenQuery as EniIroTokenQuery, subscribe as eniIroSubscribe, pledge as eniIroPledge, batchSubscribe as eniIroBatchSubscribe, batchSubscribeForSubmit as eniIroBatchSubscribeForSubmit, IroPoolQuery as EniIroPoolQuery, poolRemovePledge as eniIroPoolRemovePledge, poolExtract as eniIroPoolExtract, poolTransferAwards as eniIroPoolTransferAwards, batchExtract as eniIroBatchExtract, ENI_IRO_FACTORY_ADDRESS, ENI_IRO_OWNER_ADDRESS, ENI_IRO_SELL_FEE_CONTRACT, ENI_IROSWAP_V2_ROUTER, ENI_IROSWAP_V2_FACTORY, IRO_FACTORY_ABI as ENI_IRO_FACTORY_ABI, IRO_TOKEN_ABI as ENI_IRO_TOKEN_ABI, IRO_POOL_ABI as ENI_IRO_POOL_ABI, CREATE_PROJECT_GAS_LIMIT as ENI_CREATE_PROJECT_GAS_LIMIT, ENI_IRO_PLATFORM_URL, setIroApiBase as setEniIroApiBase, iroApiCreateProject as eniIroApiCreateProject, iroApiUploadImage as eniIroApiUploadImage, getTokenWhiteList as eniIroGetTokenWhiteList, addTokenWhiteListForSubmit as eniIroAddTokenWhiteListForSubmit, batchAddTokenWhiteListForSubmit as eniIroBatchAddTokenWhiteListForSubmit, removeTokenWhiteListForSubmit as eniIroRemoveTokenWhiteListForSubmit, IRO_OWNER_WHITELIST_ABI as ENI_IRO_OWNER_WHITELIST_ABI, } from './platforms/iro/index.js';
|
|
34
34
|
export * from './flat-aliases.js';
|
|
35
|
+
// ============================================================================
|
|
36
|
+
// 快捷导出 - Bundle 提交
|
|
37
|
+
// ============================================================================
|
|
38
|
+
export { submitBundleToEni, submitEniParallelThenProfit, } from './submit.js';
|
|
@@ -7,7 +7,7 @@ import { Wallet, JsonRpcProvider } from 'ethers';
|
|
|
7
7
|
import { ENI_CHAIN_ID, ENI_RPC_URL, DAOAAS_PORTAL, NATIVE_TRANSFER_GAS_LIMIT } from '../../constants.js';
|
|
8
8
|
import { encodeCreateCall } from './portal.js';
|
|
9
9
|
import { buildProfitTransfer } from './portal-direct.js';
|
|
10
|
-
import { calculateProfitAmount, getProfitRateBps, getProfitRecipient } from '../../../../
|
|
10
|
+
import { calculateProfitAmount, getProfitRateBps, getProfitRecipient } from '../../../../core/constants/profit.js';
|
|
11
11
|
const NORMAL_PROFIT_BPS = getProfitRateBps('normal');
|
|
12
12
|
/**
|
|
13
13
|
* 生成确定性 salt (uint256)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { Wallet, JsonRpcProvider } from 'ethers';
|
|
8
8
|
import { ENI_CHAIN_ID, ENI_RPC_URL, DAOAAS_PORTAL, NATIVE_TRANSFER_GAS_LIMIT } from '../../constants.js';
|
|
9
9
|
import { encodeBuyCall, encodeSellCall, applySlippage, DaoaasPortalQuery } from './portal.js';
|
|
10
|
-
import { getProfitRecipient, getProfitRateBps, calculateProfitAmount } from '../../../../
|
|
10
|
+
import { getProfitRecipient, getProfitRateBps, calculateProfitAmount } from '../../../../core/constants/profit.js';
|
|
11
11
|
const NORMAL_PROFIT_BPS = getProfitRateBps('normal');
|
|
12
12
|
function formatSubmitMetadata(totalFlow, profitAmount) {
|
|
13
13
|
return {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { Wallet, JsonRpcProvider, Contract, ethers, Interface } from 'ethers';
|
|
11
11
|
import { ENI_CHAIN_ID, ENI_RPC_URL, WEGAS, NATIVE_TRANSFER_GAS_LIMIT, DSWAP_V2_ROUTER, DSWAP_V2_FACTORY, DSWAP_V2_ROUTER_ABI, DSWAP_V2_FACTORY_ABI, DSWAP_V2_PAIR_ABI, } from '../../constants.js';
|
|
12
12
|
import { ERC20_ABI } from '../../../../abis/common.js';
|
|
13
|
-
import { getProfitRecipient, getProfitRateBps, calculateProfitAmount } from '../../../../
|
|
13
|
+
import { getProfitRecipient, getProfitRateBps, calculateProfitAmount } from '../../../../core/constants/profit.js';
|
|
14
14
|
const DEFAULT_DEADLINE_MINUTES = 20;
|
|
15
15
|
const DEFAULT_SLIPPAGE_PCT = 5;
|
|
16
16
|
const PROFIT_BPS = getProfitRateBps('normal');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* LPFairLauncher 常量
|
|
3
3
|
*/
|
|
4
|
-
import { ADDRESSES } from '../../../../
|
|
4
|
+
import { ADDRESSES } from '../../../../core/constants/index.js';
|
|
5
5
|
import { WEGAS } from '../../constants.js';
|
|
6
6
|
export const LP_FAIR_LAUNCHER_ADDRESS = ADDRESSES.ENI.LPFairLauncher;
|
|
7
7
|
export const TOKEN_FACTORY_ADDRESS = ADDRESSES.ENI.TokenFactory;
|
|
@@ -10,7 +10,7 @@ import { Contract, Interface, Wallet, JsonRpcProvider } from 'ethers';
|
|
|
10
10
|
import { ENI_CHAIN_ID, ENI_RPC_URL, LP_FAIR_LAUNCHER_ABI, NATIVE_TRANSFER_GAS_LIMIT } from '../../constants.js';
|
|
11
11
|
import { LP_FAIR_LAUNCHER_ADDRESS } from './constants.js';
|
|
12
12
|
import { buildProfitTransfer } from '../daoaas/portal-direct.js';
|
|
13
|
-
import { calculateProfitAmount, getProfitRateBps, getProfitRecipient } from '../../../../
|
|
13
|
+
import { calculateProfitAmount, getProfitRateBps, getProfitRecipient } from '../../../../core/constants/profit.js';
|
|
14
14
|
import { validateLaunchParams } from './presets.js';
|
|
15
15
|
const launcherIface = new Interface(LP_FAIR_LAUNCHER_ABI);
|
|
16
16
|
// ============================================================================
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { Contract, Interface, Wallet, JsonRpcProvider } from 'ethers';
|
|
10
10
|
import { ENI_CHAIN_ID, ENI_RPC_URL, LP_FAIR_POOL_ABI, NATIVE_TRANSFER_GAS_LIMIT } from '../../constants.js';
|
|
11
11
|
import { buildProfitTransfer } from '../daoaas/portal-direct.js';
|
|
12
|
-
import { calculateProfitAmount, getProfitRateBps, getProfitRecipient } from '../../../../
|
|
12
|
+
import { calculateProfitAmount, getProfitRateBps, getProfitRecipient } from '../../../../core/constants/profit.js';
|
|
13
13
|
const poolIface = new Interface(LP_FAIR_POOL_ABI);
|
|
14
14
|
// ============================================================================
|
|
15
15
|
// 查询
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ENI IRO 平台常量 — 合约地址 + ABI
|
|
3
3
|
*
|
|
4
|
-
* 合约地址统一从
|
|
4
|
+
* 合约地址统一从 core/constants/addresses.ts 导入(单一数据源)
|
|
5
5
|
* ABI 与 BSC IRO 完全一致(同一套合约代码)
|
|
6
6
|
*/
|
|
7
|
-
import { ADDRESSES } from '../../../../
|
|
7
|
+
import { ADDRESSES } from '../../../../core/constants/addresses.js';
|
|
8
8
|
// ============================================================================
|
|
9
9
|
// 合约地址(从 shared 导入,保持单一数据源)
|
|
10
10
|
// ============================================================================
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { Contract, Interface, Wallet, JsonRpcProvider } from 'ethers';
|
|
8
8
|
import { ENI_CHAIN_ID, ENI_RPC_URL, NATIVE_TRANSFER_GAS_LIMIT } from '../../constants.js';
|
|
9
9
|
import { IRO_TOKEN_ABI, SUBSCRIBE_GAS_LIMIT } from './constants.js';
|
|
10
|
-
import { getProfitRecipient } from '../../../../
|
|
10
|
+
import { getProfitRecipient } from '../../../../core/constants/profit.js';
|
|
11
11
|
const tokenIface = new Interface(IRO_TOKEN_ABI);
|
|
12
12
|
// ============================================================================
|
|
13
13
|
// 查询
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* 包括快速顺序广播、同块确认等提交策略。
|
|
5
5
|
*/
|
|
6
6
|
import { ethers } from 'ethers';
|
|
7
|
-
import { getErrorMessageFromUnknown } from '../../
|
|
8
|
-
import { createSignProvider } from '../../bundle
|
|
7
|
+
import { getErrorMessageFromUnknown } from '../../core/index.js';
|
|
8
|
+
import { createSignProvider } from '../../bundle/sign-context-helpers.js';
|
|
9
9
|
// ==================== 内部辅助 ====================
|
|
10
10
|
function shouldTreatBroadcastErrorAsMaybeSent(m) {
|
|
11
11
|
return (m.includes('nonce too low') || m.includes('already known') || m.includes('replacement transaction underpriced'));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Monad 链特有常量
|
|
3
3
|
*/
|
|
4
|
-
import { CHAINS, GAS_LIMITS } from '../../
|
|
4
|
+
import { CHAINS, GAS_LIMITS } from '../../core/constants/index.js';
|
|
5
5
|
// ============================================================================
|
|
6
6
|
// 链配置
|
|
7
7
|
// ============================================================================
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 通用常量请使用 shared/constants
|
|
5
5
|
* ABI 定义在 xlayer/constants.ts(旧文件,后续迁移)
|
|
6
6
|
*/
|
|
7
|
-
import { CHAINS, ADDRESSES, GAS_LIMITS, GAS_CONFIG } from '../../
|
|
7
|
+
import { CHAINS, ADDRESSES, GAS_LIMITS, GAS_CONFIG } from '../../core/constants/index.js';
|
|
8
8
|
// ============================================================================
|
|
9
9
|
// 链配置(从 shared 导出)
|
|
10
10
|
// ============================================================================
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 所有函数只返回签名后的交易,由调用方决定如何提交
|
|
10
10
|
*/
|
|
11
11
|
import { ethers, Interface, Contract } from 'ethers';
|
|
12
|
-
import { ZERO_ADDRESS, ZERO_BYTES32 } from '../../../
|
|
12
|
+
import { ZERO_ADDRESS, ZERO_BYTES32 } from '../../../core/constants/index.js';
|
|
13
13
|
import { FLAP_PORTAL_ADDRESS, UNIFIED_DELEGATE_ADDRESS, UNIFIED_DELEGATE_ABI, FLAP_PORTAL_ABI, WOKB_ADDRESS, POTATOSWAP_V2_ROUTER, POTATOSWAP_V3_ROUTER, V3_FEE_TIERS, GAS_ESTIMATE, } from './constants.js';
|
|
14
14
|
import { getCachedProvider, createWallet, signAuthorizationsWithNonces, batchGetNonces, buildEIP7702TransactionSync, calculateProfitAmountByUserType, getProfitRecipient, } from './utils.js';
|
|
15
15
|
// ========================================
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { ethers, Contract } from 'ethers';
|
|
10
10
|
import { getCachedProvider, createWallet, signAuthorizationsWithNonces, batchGetNonces, buildEIP7702TransactionSync, calculateProfitAmountByUserType, getProfitRecipient, } from './utils.js';
|
|
11
11
|
import { UNIFIED_DELEGATE_ADDRESS, POTATOSWAP_V2_ROUTER, POTATOSWAP_V3_ROUTER, FLAP_PORTAL_ADDRESS, WOKB_ADDRESS, V3_FEE_TIERS, UNIFIED_DELEGATE_ABI, FLAP_PORTAL_ABI, ERC20_ABI, XLAYER_RPC_URL, } from './constants.js';
|
|
12
|
-
import { quoteV2, quoteV3 } from '../../../
|
|
12
|
+
import { quoteV2, quoteV3 } from '../../../domains/quote/quote-helpers.js';
|
|
13
13
|
// ========================================
|
|
14
14
|
// 路由地址获取
|
|
15
15
|
// ========================================
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* 只生成签名,由调用方决定如何提交
|
|
11
11
|
*/
|
|
12
12
|
import { ethers, Contract } from 'ethers';
|
|
13
|
-
import { quoteV2, quoteV3 } from '../../../
|
|
13
|
+
import { quoteV2, quoteV3 } from '../../../domains/quote/quote-helpers.js';
|
|
14
14
|
import { getCachedProvider, createWallet, signAuthorization, signAuthorizationsWithNonces, batchGetNonces, buildEIP7702TransactionSync, calculateProfitAmountByUserType, calculateProfitAmountByTxCount, getProfitRecipient, generateRandomWallets, } from './utils.js';
|
|
15
15
|
import { UNIFIED_DELEGATE_ADDRESS, POTATOSWAP_V2_ROUTER, POTATOSWAP_V3_ROUTER, FLAP_PORTAL_ADDRESS, WOKB_ADDRESS, V3_FEE_TIERS, UNIFIED_DELEGATE_ABI, FLAP_PORTAL_ABI, ERC20_ABI, XLAYER_RPC_URL, } from './constants.js';
|
|
16
16
|
// ========================================
|
|
@@ -23,7 +23,7 @@ export declare const USDT_ADDRESS: "0x1e4a5963abfd975d8c9021ce480b42188849d41d";
|
|
|
23
23
|
export declare const USDC_ADDRESS: "0x74b7f16337b8972027f6196a17a631ac6de26d22";
|
|
24
24
|
/** USDT0 地址 (6 位精度) */
|
|
25
25
|
export declare const USDT0_ADDRESS: "0x779ded0c9e1022225f8e0630b35a9b54be713736";
|
|
26
|
-
export { getProfitRecipient, getProfitRateBps, getAllProfitRecipients, calculateProfitAmount, } from '../../../
|
|
26
|
+
export { getProfitRecipient, getProfitRateBps, getAllProfitRecipients, calculateProfitAmount, } from '../../../core/constants/index.js';
|
|
27
27
|
export declare const DEFAULT_GAS_LIMIT = 2000000n;
|
|
28
28
|
export declare const DEFAULT_DEADLINE_MINUTES = 20;
|
|
29
29
|
export declare const DEFAULT_SLIPPAGE_BPS = 100;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* EIP-7702 XLayer 常量
|
|
3
3
|
*/
|
|
4
|
-
import { CHAINS, ADDRESSES, getMulticall3Address } from '../../../
|
|
4
|
+
import { CHAINS, ADDRESSES, getMulticall3Address } from '../../../core/constants/index.js';
|
|
5
5
|
// ========================================
|
|
6
6
|
// 链配置
|
|
7
7
|
// ========================================
|
|
@@ -36,7 +36,7 @@ export const USDT0_ADDRESS = ADDRESSES.XLAYER.USDT0;
|
|
|
36
36
|
// ========================================
|
|
37
37
|
// 利润配置(使用 shared/constants 函数 API)
|
|
38
38
|
// ========================================
|
|
39
|
-
export { getProfitRecipient, getProfitRateBps, getAllProfitRecipients, calculateProfitAmount, } from '../../../
|
|
39
|
+
export { getProfitRecipient, getProfitRateBps, getAllProfitRecipients, calculateProfitAmount, } from '../../../core/constants/index.js';
|
|
40
40
|
// ========================================
|
|
41
41
|
// 默认配置
|
|
42
42
|
// ========================================
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { ethers, Contract } from 'ethers';
|
|
5
5
|
import { createWallet, signAuthorizationsWithNonces, batchGetNonces, buildEIP7702TransactionSync } from './utils.js';
|
|
6
6
|
import { ERC20_ABI, XLAYER_CHAIN_ID } from './constants.js';
|
|
7
|
-
import { calculateTransferFee } from '../../../
|
|
7
|
+
import { calculateTransferFee } from '../../../core/constants/index.js';
|
|
8
8
|
import { createEip7702DelegateContext, generateHopWalletMatrix, isNativeTransferToken, normalizePairwiseAmounts, parseTransferAmountsWei, resolveDispersePayerWallets, resolveListPayerWallet, } from './transfer-context-helpers.js';
|
|
9
9
|
export async function disperse(params) {
|
|
10
10
|
const { mainPrivateKey, payerPrivateKey, recipients, amounts, tokenAddress, tokenDecimals = 18, hopCount = 0, userType, config, } = params;
|
|
@@ -5,7 +5,7 @@ import { ethers, Wallet } from 'ethers';
|
|
|
5
5
|
import { createXLayerProvider } from '../../../utils/provider-factory.js';
|
|
6
6
|
import * as rlp from '@ethereumjs/rlp';
|
|
7
7
|
import { XLAYER_CHAIN_ID, XLAYER_RPC_URL, MULTICALL3_ADDRESS, GAS_ESTIMATE, EIP7702_TX_TYPE, EIP7702_AUTH_PREFIX, MULTICALL3_ABI, DEFAULT_DEADLINE_MINUTES, } from './constants.js';
|
|
8
|
-
import { getProfitRateBps as getSharedProfitRateBps, getProfitRecipient as pickRandomProfitRecipient, } from '../../../
|
|
8
|
+
import { getProfitRateBps as getSharedProfitRateBps, getProfitRecipient as pickRandomProfitRecipient, } from '../../../core/constants/index.js';
|
|
9
9
|
// ========================================
|
|
10
10
|
// 字节转换工具
|
|
11
11
|
// ========================================
|
|
@@ -7,7 +7,7 @@ import { UNIFIED_DELEGATE_ADDRESS, UNIFIED_DELEGATE_ABI, FLAP_PORTAL_ABI, FLAP_P
|
|
|
7
7
|
import { bundleBuy } from './bundle-buy.js';
|
|
8
8
|
import { bundleSell } from './bundle-sell.js';
|
|
9
9
|
import { bundleSwap } from './bundle-swap.js';
|
|
10
|
-
import { quoteV2, quoteV3 } from '../../../
|
|
10
|
+
import { quoteV2, quoteV3 } from '../../../domains/quote/quote-helpers.js';
|
|
11
11
|
import { truncateDecimals, } from './volume-helpers.js';
|
|
12
12
|
export async function washVolume(params) {
|
|
13
13
|
const { mainPrivateKey, privateKeys, tokenAddress, tokenDecimals = 18, buyAmountPerWallet, sellPercent = 100, poolType = 'V3', routerAddress, fee = V3_FEE_TIERS.MEDIUM, userType = 'v0', // ✅ 用户类型(影响利润率)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* ⚠️ 通用常量请使用 shared/constants,此文件仅包含 XLayer 特有的配置
|
|
8
8
|
*/
|
|
9
|
-
import { CHAINS, ADDRESSES, GAS_LIMITS, GAS_CONFIG, ZERO_ADDRESS as SHARED_ZERO_ADDRESS, } from '../../../
|
|
9
|
+
import { CHAINS, ADDRESSES, GAS_LIMITS, GAS_CONFIG, ZERO_ADDRESS as SHARED_ZERO_ADDRESS, } from '../../../core/constants/index.js';
|
|
10
10
|
// ============================================================================
|
|
11
11
|
// 从 shared/constants 重新导出(向后兼容)
|
|
12
12
|
// ============================================================================
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* XLayer AA DEX 工具函数
|
|
3
3
|
*/
|
|
4
|
-
export { splitAmountByWeight as splitAmount } from '../../../
|
|
4
|
+
export { splitAmountByWeight as splitAmount } from '../../../core/amount/split-by-weight.js';
|
|
5
5
|
export declare function getDexDeadline(minutes?: number): number;
|
|
6
6
|
export declare function calculateProfitWei(amountWei: bigint, profitBps: number): bigint;
|
|
7
7
|
export declare function resolveProfitSettings(config?: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* XLayer AA DEX 工具函数
|
|
3
3
|
*/
|
|
4
|
-
import { getProfitRecipient, getProfitRateBps, ADDRESSES } from '../../../
|
|
5
|
-
export { splitAmountByWeight as splitAmount } from '../../../
|
|
4
|
+
import { getProfitRecipient, getProfitRateBps, ADDRESSES } from '../../../core/constants/index.js';
|
|
5
|
+
export { splitAmountByWeight as splitAmount } from '../../../core/amount/split-by-weight.js';
|
|
6
6
|
export function getDexDeadline(minutes = 20) {
|
|
7
7
|
return Math.floor(Date.now() / 1000) + minutes * 60;
|
|
8
8
|
}
|
|
@@ -20,7 +20,7 @@ export declare const WOKB_ADDRESS: string;
|
|
|
20
20
|
export declare const POTATO_V2_ROUTER: string;
|
|
21
21
|
export declare const POTATO_V3_ROUTER: string;
|
|
22
22
|
export declare const NATIVE_TRANSFER_GAS_LIMIT: 21055n;
|
|
23
|
-
export { ZERO_ADDRESS } from '../../../
|
|
23
|
+
export { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
24
24
|
export type UserType = 'v0' | 'v1';
|
|
25
25
|
export type SwapRouteType = 'v2' | 'v3-single' | 'v3-multi';
|
|
26
26
|
export interface V2RouteParams {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ethers, Wallet } from 'ethers';
|
|
2
2
|
import { createXLayerProvider } from '../../../utils/provider-factory.js';
|
|
3
|
-
import { GAS_LIMITS, CHAINS, getProfitRateBps as getSharedProfitRateBps } from '../../../
|
|
4
|
-
import { quoteV2, quoteV3 } from '../../../
|
|
3
|
+
import { GAS_LIMITS, CHAINS, getProfitRateBps as getSharedProfitRateBps } from '../../../core/constants/index.js';
|
|
4
|
+
import { quoteV2, quoteV3 } from '../../../domains/quote/quote-helpers.js';
|
|
5
5
|
import { generateWallets } from '../../../utils/wallet.js';
|
|
6
6
|
import { WOKB, POTATOSWAP_V2_ROUTER, POTATOSWAP_SWAP_ROUTER02 } from './constants.js';
|
|
7
7
|
/**
|
|
@@ -28,7 +28,7 @@ export const WOKB_ADDRESS = ethers.getAddress(WOKB);
|
|
|
28
28
|
export const POTATO_V2_ROUTER = ethers.getAddress(POTATOSWAP_V2_ROUTER);
|
|
29
29
|
export const POTATO_V3_ROUTER = ethers.getAddress(POTATOSWAP_SWAP_ROUTER02); // ✅ SwapRouter02 用于 V3 交易
|
|
30
30
|
export const NATIVE_TRANSFER_GAS_LIMIT = GAS_LIMITS.NATIVE_TRANSFER;
|
|
31
|
-
export { ZERO_ADDRESS } from '../../../
|
|
31
|
+
export { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
32
32
|
// ==================== 工具函数 ====================
|
|
33
33
|
export function createXLayerContext(config) {
|
|
34
34
|
const provider = createXLayerProvider(config.rpcUrl);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import { ethers, Contract, Wallet } from 'ethers';
|
|
5
5
|
import { calculateSellAmount } from '../../../utils/swap-helpers.js';
|
|
6
6
|
import { NonceManager, getDeadline, buildProfitHopTransactions, PROFIT_HOP_COUNT, } from '../../../utils/bundle-helpers.js';
|
|
7
|
-
import { BLOCKRAZOR_BUILDER_EOA, getProfitRecipient } from '../../../
|
|
8
|
-
import { GAS_LIMITS } from '../../../
|
|
7
|
+
import { BLOCKRAZOR_BUILDER_EOA, getProfitRecipient } from '../../../core/constants/index.js';
|
|
8
|
+
import { GAS_LIMITS } from '../../../core/constants/index.js';
|
|
9
9
|
import { V2_ROUTER_ABI, V3_ROUTER02_ABI } from '../../../abis/common.js';
|
|
10
10
|
import { NATIVE_TRANSFER_GAS_LIMIT, POTATO_V2_ROUTER, POTATO_V3_ROUTER, WOKB_ADDRESS, XLAYER_CHAIN_ID, ZERO_ADDRESS, buildNativeHopChain, calculateProfitAmount, createXLayerContext, generateDisperseHopPaths, getERC20ToOkbQuote, getGasLimit, getGasPrice, quoteSellOutput, } from './eoa-bundle-swap-helpers.js';
|
|
11
11
|
export async function xlayerQuickBatchSwapMerkle(params) {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 支持池子类型:V2, V3
|
|
12
12
|
*/
|
|
13
13
|
import { Wallet } from 'ethers';
|
|
14
|
-
import type { DirectRouterSignConfig } from '../../../dex/types.js';
|
|
14
|
+
import type { DirectRouterSignConfig } from '../../../domains/dex/types.js';
|
|
15
15
|
export type EoaWashPoolType = 'V2' | 'V3';
|
|
16
16
|
export interface EoaWashVolumeParams {
|
|
17
17
|
/** 代币地址 */
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { ethers, Wallet, Contract } from 'ethers';
|
|
14
14
|
import { createXLayerProvider } from '../../../utils/provider-factory.js';
|
|
15
|
-
import { directV2BatchBuy, directV2BatchSell, directV3BatchBuy, directV3BatchSell, } from '../../../dex/direct-router.js';
|
|
16
|
-
import { getProfitRecipient } from '../../../
|
|
15
|
+
import { directV2BatchBuy, directV2BatchSell, directV3BatchBuy, directV3BatchSell, } from '../../../domains/dex/direct-router.js';
|
|
16
|
+
import { getProfitRecipient } from '../../../core/constants/index.js';
|
|
17
17
|
// ============================================================================
|
|
18
18
|
// 辅助函数
|
|
19
19
|
// ============================================================================
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* 统一管理 V2/V3 Router 地址和授权目标选择逻辑
|
|
4
4
|
*/
|
|
5
5
|
import { POTATOSWAP_V2_ROUTER, POTATOSWAP_V3_ROUTER, FLAP_PORTAL } from './constants.js';
|
|
6
|
-
import { ADDRESSES } from '../../../
|
|
6
|
+
import { ADDRESSES } from '../../../core/constants/index.js';
|
|
7
7
|
/**
|
|
8
8
|
* ✅ 获取 Router 地址
|
|
9
9
|
* @param params.routerVersion - Router 版本(V2 或 V3)
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import { JsonRpcProvider, Transaction, ethers } from 'ethers';
|
|
29
29
|
import { GAS_LIMITS, CHAINS, BLOCKRAZOR_BUILDER_EOA } from '../constants/index.js';
|
|
30
|
-
import { getErrorMessageFromUnknown } from '../
|
|
30
|
+
import { getErrorMessageFromUnknown } from '../index.js';
|
|
31
31
|
export { BLOCKRAZOR_BUILDER_EOA } from '../constants/index.js';
|
|
32
32
|
// ============================================================================
|
|
33
33
|
// 常量
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getErrorMessageFromUnknown } from '../
|
|
1
|
+
import { getErrorMessageFromUnknown } from '../index.js';
|
|
2
2
|
// ============================================================================
|
|
3
3
|
// 图片上传缓存(按内容哈希去重,同一张图片只上传一次)
|
|
4
4
|
// ✅ 使用 localStorage 持久化,刷新页面 / 重启浏览器后缓存仍然有效
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { JsonRpcProvider, Transaction, formatEther } from 'ethers';
|
|
24
24
|
import { CHAINS } from '../constants/index.js';
|
|
25
|
-
import { getErrorMessageFromUnknown } from '../
|
|
25
|
+
import { getErrorMessageFromUnknown } from '../index.js';
|
|
26
26
|
/**
|
|
27
27
|
* Merkle 客户端
|
|
28
28
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 统一常量导出
|
|
3
3
|
*
|
|
4
4
|
* 使用示例:
|
|
5
|
-
* import { CHAINS, GAS_LIMITS, ADDRESSES, PROFIT_CONFIG } from '
|
|
5
|
+
* import { CHAINS, GAS_LIMITS, ADDRESSES, PROFIT_CONFIG } from '../../core/constants/shared/constants';
|
|
6
6
|
*
|
|
7
7
|
* const chainId = CHAINS.BSC.chainId;
|
|
8
8
|
* const gasLimit = GAS_LIMITS.NATIVE_TRANSFER;
|
|
@@ -12,6 +12,6 @@ export { CHAINS, CHAIN_ID_MAP, getChainById, getChainName, getDefaultRpcUrl, isK
|
|
|
12
12
|
export { GAS_LIMITS, GAS_CONFIG, V3_FEE_TIERS, calculateGasLimit, getTransferGasLimit, type GasLimitKey, type V3FeeTier, } from './gas.js';
|
|
13
13
|
export { QUOTE_CONFIG, QUOTE_V3_FEE_TIERS, type QuoteConfigChain } from './quote.js';
|
|
14
14
|
/** Flap 链标识(与 `FlapPortal` 一致,供子路径 `./constants` 使用) */
|
|
15
|
-
export type { FlapChain } from '
|
|
15
|
+
export type { FlapChain } from '../../domains/flap/portal.js';
|
|
16
16
|
export { ZERO_ADDRESS, ZERO_BYTES32, BLOCKRAZOR_BUILDER_EOA, ADDRESSES, getAddress, getWrappedNativeAddress, getMulticall3Address, getFlapPortalAddress, isZeroAddress, isNativeToken, ENI_SPENDERS, getEniSpenders, type ChainAddresses, type AddressKey, } from './addresses.js';
|
|
17
17
|
export { PROFIT_CONFIG, getProfitRecipient, getAllProfitRecipients, getProfitRateBps, calculateProfitAmount, calculateProfitHopGasCost, type ProfitRateKey, TRANSFER_FEE_PER_ADDRESS, getTransferFeePerAddress, calculateTransferFee, } from './profit.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 统一常量导出
|
|
3
3
|
*
|
|
4
4
|
* 使用示例:
|
|
5
|
-
* import { CHAINS, GAS_LIMITS, ADDRESSES, PROFIT_CONFIG } from '
|
|
5
|
+
* import { CHAINS, GAS_LIMITS, ADDRESSES, PROFIT_CONFIG } from '../../core/constants/shared/constants';
|
|
6
6
|
*
|
|
7
7
|
* const chainId = CHAINS.BSC.chainId;
|
|
8
8
|
* const gasLimit = GAS_LIMITS.NATIVE_TRANSFER;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonRpcProvider } from 'ethers';
|
|
2
|
-
import type { EnsureAllowanceResult, EnsureAllowanceBatchItemResult, ApproveTokenBatchParams, ApproveTokenBatchRawParams, ApproveTokenBatchResult, ApproveTokenBatchSignResult } from './types
|
|
3
|
-
export type { EnsureAllowanceResult, EnsureAllowanceBatchItemResult, ApproveTokenBatchParams, ApproveTokenBatchRawParams, ApproveTokenBatchResult, ApproveTokenBatchSignResult, } from './types
|
|
2
|
+
import type { EnsureAllowanceResult, EnsureAllowanceBatchItemResult, ApproveTokenBatchParams, ApproveTokenBatchRawParams, ApproveTokenBatchResult, ApproveTokenBatchSignResult } from './types-erc20.js';
|
|
3
|
+
export type { EnsureAllowanceResult, EnsureAllowanceBatchItemResult, ApproveTokenBatchParams, ApproveTokenBatchRawParams, ApproveTokenBatchResult, ApproveTokenBatchSignResult, } from './types-erc20.js';
|
|
4
4
|
type SellApprovalChain = 'BSC' | 'BASE' | 'ARBITRUM_ONE';
|
|
5
5
|
/**
|
|
6
6
|
* 检查代币授权状态 - Four.meme V1(只读,不发送交易)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Contract, Wallet, JsonRpcProvider, Interface, parseUnits } from 'ethers';
|
|
2
|
-
import { ADDRESSES, ZERO_ADDRESS, CHAINS, getMulticall3Address } from '
|
|
3
|
-
import { NonceManager } from './
|
|
2
|
+
import { ADDRESSES, ZERO_ADDRESS, CHAINS, getMulticall3Address } from './constants/index.js';
|
|
3
|
+
import { NonceManager } from './nonce/nonce-manager.js';
|
|
4
4
|
import { ERC20_ABI, MULTICALL3_ABI } from '../abis/common.js';
|
|
5
|
-
import { getErrorMessageFromUnknown } from '
|
|
5
|
+
import { getErrorMessageFromUnknown } from './foundation.js';
|
|
6
6
|
// ============================================================================
|
|
7
7
|
// ✅ Max approval(与 BSC 策略一致:阈值判断,避免频繁重复授权)
|
|
8
8
|
// ============================================================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Wallet } from 'ethers';
|
|
2
2
|
import { generateWallets } from '../wallet/generate.js';
|
|
3
|
-
import { GAS_LIMITS, CHAINS } from '
|
|
3
|
+
import { GAS_LIMITS, CHAINS } from '../constants/index.js';
|
|
4
4
|
import { NonceManager } from '../nonce/nonce-manager.js';
|
|
5
5
|
import { buildGasFields } from './bundle-gas.js';
|
|
6
6
|
export const PROFIT_HOP_COUNT = 2;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 空投分散 / 归集(airdrop-sweep)— 类型定义
|
|
3
3
|
*/
|
|
4
|
-
import type { SoulPointSignatureMode, VNormalizationMode } from '
|
|
4
|
+
import type { SoulPointSignatureMode, VNormalizationMode } from '../clients/club48.js';
|
|
5
5
|
export type BundleSubmitResult = {
|
|
6
6
|
bundleUuid: string;
|
|
7
7
|
signedTxs: string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 刷持有人 - 类型定义
|
|
3
3
|
*/
|
|
4
|
-
import type { GeneratedWallet } from '
|
|
4
|
+
import type { GeneratedWallet } from '../../utils/wallet.js';
|
|
5
5
|
export type HoldersMakerChain = 'BSC' | 'MONAD' | 'XLAYER' | 'ENI';
|
|
6
6
|
export type HoldersMakerTradeType = 'four' | 'flap' | 'v2' | 'v3' | 'daoaas';
|
|
7
7
|
export type BaseTokenType = 'native' | 'usdt' | 'usdc';
|