four-flap-meme-sdk 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/four-meme/approve-tokenmanager.d.ts +2 -2
- package/dist/bundle/four-meme/approve-tokenmanager.js +3 -3
- package/dist/bundle/four-meme/core/buy-flow.d.ts +5 -0
- package/dist/bundle/four-meme/core/buy-flow.js +147 -0
- package/dist/bundle/four-meme/core/constants.d.ts +6 -0
- package/dist/bundle/four-meme/core/constants.js +15 -0
- package/dist/bundle/four-meme/core/create-token.d.ts +5 -0
- package/dist/bundle/four-meme/core/create-token.js +137 -0
- package/dist/bundle/four-meme/core/index.d.ts +14 -0
- package/dist/bundle/four-meme/core/index.js +14 -0
- package/dist/bundle/four-meme/core/sell-flow.d.ts +5 -0
- package/dist/bundle/four-meme/core/sell-flow.js +240 -0
- package/dist/bundle/four-meme/core-helpers.js +1 -1
- package/dist/bundle/four-meme/core.d.ts +7 -4
- package/dist/bundle/four-meme/core.js +5 -513
- package/dist/bundle/four-meme/pancake-proxy/approve.d.ts +15 -0
- package/dist/bundle/four-meme/pancake-proxy/approve.js +113 -0
- package/dist/bundle/four-meme/pancake-proxy/buy.d.ts +8 -0
- package/dist/bundle/four-meme/pancake-proxy/buy.js +143 -0
- package/dist/bundle/four-meme/pancake-proxy/constants.d.ts +25 -0
- package/dist/bundle/four-meme/pancake-proxy/constants.js +14 -0
- package/dist/bundle/four-meme/pancake-proxy/helpers.d.ts +45 -0
- package/dist/bundle/four-meme/pancake-proxy/helpers.js +232 -0
- package/dist/bundle/four-meme/pancake-proxy/index.d.ts +15 -0
- package/dist/bundle/four-meme/pancake-proxy/index.js +15 -0
- package/dist/bundle/four-meme/pancake-proxy/sell.d.ts +8 -0
- package/dist/bundle/four-meme/pancake-proxy/sell.js +194 -0
- package/dist/bundle/four-meme/pancake-proxy.d.ts +4 -20
- package/dist/bundle/four-meme/pancake-proxy.js +3 -670
- package/dist/bundle/four-meme/private/buy.d.ts +16 -0
- package/dist/bundle/four-meme/private/buy.js +225 -0
- package/dist/bundle/four-meme/private/index.d.ts +11 -0
- package/dist/bundle/four-meme/private/index.js +11 -0
- package/dist/bundle/four-meme/private/sell.d.ts +18 -0
- package/dist/bundle/four-meme/private/sell.js +245 -0
- package/dist/bundle/four-meme/private.d.ts +5 -25
- package/dist/bundle/four-meme/private.js +5 -463
- package/dist/bundle/four-meme/swap/batch.d.ts +8 -0
- package/dist/bundle/four-meme/swap/batch.js +170 -0
- package/dist/bundle/four-meme/swap/bundle.d.ts +8 -0
- package/dist/bundle/four-meme/swap/bundle.js +147 -0
- package/dist/bundle/four-meme/swap/index.d.ts +14 -0
- package/dist/bundle/four-meme/swap/index.js +13 -0
- package/dist/bundle/four-meme/swap/quick-batch.d.ts +8 -0
- package/dist/bundle/four-meme/swap/quick-batch.js +206 -0
- package/dist/bundle/four-meme/swap-buy-first/helpers.d.ts +20 -0
- package/dist/bundle/four-meme/swap-buy-first/helpers.js +39 -0
- package/dist/bundle/four-meme/swap-buy-first/index.d.ts +12 -0
- package/dist/bundle/four-meme/swap-buy-first/index.js +11 -0
- package/dist/bundle/four-meme/swap-buy-first/multi-wallet.d.ts +20 -0
- package/dist/bundle/four-meme/swap-buy-first/multi-wallet.js +198 -0
- package/dist/bundle/four-meme/swap-buy-first/single.d.ts +7 -0
- package/dist/bundle/four-meme/swap-buy-first/single.js +232 -0
- package/dist/bundle/four-meme/swap-buy-first.d.ts +4 -3
- package/dist/bundle/four-meme/swap-buy-first.js +4 -451
- package/dist/bundle/four-meme/swap-hop-helpers.d.ts +2 -2
- package/dist/bundle/four-meme/swap-sign-helpers.d.ts +2 -2
- package/dist/bundle/four-meme/swap-sign-helpers.js +1 -1
- package/dist/bundle/four-meme/swap.d.ts +4 -14
- package/dist/bundle/four-meme/swap.js +4 -502
- package/dist/bundle/four-meme/types/index.d.ts +1 -1
- package/dist/bundle/four-meme/utils-disperse.d.ts +1 -1
- package/dist/bundle/four-meme/utils-disperse.js +1 -1
- package/dist/bundle/four-meme/utils-pairwise.d.ts +1 -1
- package/dist/bundle/four-meme/utils-pairwise.js +1 -1
- package/dist/bundle/four-meme/utils-sweep/context.d.ts +39 -0
- package/dist/bundle/four-meme/utils-sweep/context.js +7 -0
- package/dist/bundle/four-meme/utils-sweep/erc20-no-hop.d.ts +5 -0
- package/dist/bundle/four-meme/utils-sweep/erc20-no-hop.js +162 -0
- package/dist/bundle/four-meme/utils-sweep/index.d.ts +13 -0
- package/dist/bundle/four-meme/utils-sweep/index.js +13 -0
- package/dist/bundle/four-meme/utils-sweep/main.d.ts +8 -0
- package/dist/bundle/four-meme/utils-sweep/main.js +114 -0
- package/dist/bundle/four-meme/utils-sweep/native-no-hop.d.ts +5 -0
- package/dist/bundle/four-meme/utils-sweep/native-no-hop.js +156 -0
- package/dist/bundle/four-meme/utils-sweep/with-hops.d.ts +6 -0
- package/dist/bundle/four-meme/utils-sweep/with-hops.js +382 -0
- package/dist/bundle/four-meme/utils-sweep.d.ts +3 -4
- package/dist/bundle/four-meme/utils-sweep.js +3 -740
- package/dist/bundle/internal.d.ts +2 -2
- package/dist/bundle/sign-context-helpers.d.ts +1 -26
- package/dist/bundle/sign-context-helpers.js +1 -63
- package/dist/bundle/submit/blockrazor.d.ts +94 -0
- package/dist/bundle/submit/blockrazor.js +122 -0
- package/dist/bundle/submit/direct.d.ts +118 -0
- package/dist/bundle/submit/direct.js +484 -0
- package/dist/bundle/submit/helpers.d.ts +7 -0
- package/dist/bundle/submit/helpers.js +15 -0
- package/dist/bundle/submit/index.d.ts +14 -0
- package/dist/bundle/submit/index.js +14 -0
- package/dist/bundle/submit/merkle.d.ts +84 -0
- package/dist/bundle/submit/merkle.js +121 -0
- package/dist/bundle/submit.d.ts +3 -286
- package/dist/bundle/submit.js +3 -724
- package/dist/chains/bsc/four/types.d.ts +1 -1
- package/dist/chains/bsc/index.d.ts +1 -1
- package/dist/chains/bsc/index.js +2 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-build.d.ts +25 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-build.js +177 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-constants.d.ts +30 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-constants.js +24 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.d.ts +11 -149
- package/dist/chains/bsc/pancake/bundle-buy-first-helpers.js +12 -74
- package/dist/chains/bsc/pancake/bundle-buy-first-multi-wallet.d.ts +9 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-multi-wallet.js +225 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-plan.d.ts +14 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-plan.js +64 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-profit.d.ts +12 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-profit.js +22 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-quote.d.ts +15 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-quote.js +122 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-types.d.ts +179 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-types.js +1 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-validate.d.ts +2 -0
- package/dist/chains/bsc/pancake/bundle-buy-first-validate.js +41 -0
- package/dist/chains/bsc/pancake/bundle-buy-first.d.ts +1 -1
- package/dist/chains/bsc/pancake/bundle-buy-first.js +8 -578
- package/dist/chains/bsc/pancake/bundle-swap-helpers.d.ts +11 -239
- package/dist/chains/bsc/pancake/bundle-swap-helpers.js +12 -564
- package/dist/chains/bsc/pancake/bundle-swap-types.d.ts +183 -0
- package/dist/chains/bsc/pancake/bundle-swap-types.js +17 -0
- package/dist/chains/bsc/pancake/bundle-swap.d.ts +10 -132
- package/dist/chains/bsc/pancake/bundle-swap.js +12 -1003
- package/dist/chains/bsc/pancake/hop-chain.d.ts +18 -0
- package/dist/chains/bsc/pancake/hop-chain.js +227 -0
- package/dist/chains/bsc/pancake/quote.d.ts +14 -0
- package/dist/chains/bsc/pancake/quote.js +84 -0
- package/dist/chains/bsc/pancake/swap-batch.d.ts +42 -0
- package/dist/chains/bsc/pancake/swap-batch.js +283 -0
- package/dist/chains/bsc/pancake/swap-build.d.ts +19 -0
- package/dist/chains/bsc/pancake/swap-build.js +226 -0
- package/dist/chains/bsc/pancake/swap-cross.d.ts +42 -0
- package/dist/chains/bsc/pancake/swap-cross.js +140 -0
- package/dist/chains/bsc/pancake/swap-quick.d.ts +54 -0
- package/dist/chains/bsc/pancake/swap-quick.js +424 -0
- package/dist/chains/bsc/pancake/swap-single.d.ts +2 -0
- package/dist/chains/bsc/pancake/swap-single.js +182 -0
- package/dist/chains/bsc/platforms/four/index.d.ts +21 -3
- package/dist/chains/bsc/platforms/four/index.js +28 -3
- package/dist/chains/eni/batch-router/transfer-disperse.d.ts +37 -0
- package/dist/chains/eni/batch-router/transfer-disperse.js +302 -0
- package/dist/chains/eni/batch-router/transfer-shared.d.ts +9 -0
- package/dist/chains/eni/batch-router/transfer-shared.js +10 -0
- package/dist/chains/eni/batch-router/transfer-sweep.d.ts +51 -0
- package/dist/chains/eni/batch-router/transfer-sweep.js +364 -0
- package/dist/chains/eni/batch-router/transfer.d.ts +4 -74
- package/dist/chains/eni/batch-router/transfer.js +2 -647
- package/dist/chains/eni/index.d.ts +2 -0
- package/dist/chains/eni/index.js +4 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-profit.d.ts +17 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-profit.js +30 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-submit.d.ts +12 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-submit.js +396 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-tx.d.ts +20 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct-tx.js +165 -0
- package/dist/chains/eni/platforms/daoaas/portal-direct.d.ts +3 -32
- package/dist/chains/eni/platforms/daoaas/portal-direct.js +3 -571
- package/dist/chains/eni/submit.js +1 -1
- package/dist/chains/xlayer/constants.d.ts +0 -2
- package/dist/chains/xlayer/constants.js +0 -2
- package/dist/chains/xlayer/eip7702/auth.d.ts +16 -0
- package/dist/chains/xlayer/eip7702/auth.js +81 -0
- package/dist/chains/xlayer/eip7702/bundle-create-buy.d.ts +22 -0
- package/dist/chains/xlayer/eip7702/bundle-create-buy.js +201 -0
- package/dist/chains/xlayer/eip7702/bundle-create-helpers.d.ts +114 -0
- package/dist/chains/xlayer/eip7702/bundle-create-helpers.js +139 -0
- package/dist/chains/xlayer/eip7702/bundle-create-to-dex.d.ts +24 -0
- package/dist/chains/xlayer/eip7702/bundle-create-to-dex.js +233 -0
- package/dist/chains/xlayer/eip7702/bundle-create.d.ts +3 -35
- package/dist/chains/xlayer/eip7702/bundle-create.js +3 -746
- package/dist/chains/xlayer/eip7702/bundle-graduate-buy.d.ts +22 -0
- package/dist/chains/xlayer/eip7702/bundle-graduate-buy.js +214 -0
- package/dist/chains/xlayer/eip7702/bundle-sell.js +1 -1
- package/dist/chains/xlayer/eip7702/bundle-swap-batch.d.ts +31 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-batch.js +216 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-helpers.d.ts +21 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-helpers.js +206 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-multi.d.ts +33 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-multi.js +146 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-single.d.ts +31 -0
- package/dist/chains/xlayer/eip7702/bundle-swap-single.js +177 -0
- package/dist/chains/xlayer/eip7702/bundle-swap.d.ts +6 -61
- package/dist/chains/xlayer/eip7702/bundle-swap.js +3 -712
- package/dist/chains/xlayer/eip7702/bytes.d.ts +4 -0
- package/dist/chains/xlayer/eip7702/bytes.js +31 -0
- package/dist/chains/xlayer/eip7702/gas.d.ts +19 -0
- package/dist/chains/xlayer/eip7702/gas.js +152 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-disperse.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-disperse.js +196 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-pairwise.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-pairwise.js +188 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-sweep.d.ts +5 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer-sweep.js +220 -0
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.d.ts +8 -4
- package/dist/chains/xlayer/eip7702/multi-hop-transfer.js +5 -591
- package/dist/chains/xlayer/eip7702/profit.d.ts +32 -0
- package/dist/chains/xlayer/eip7702/profit.js +59 -0
- package/dist/chains/xlayer/eip7702/provider.d.ts +3 -0
- package/dist/chains/xlayer/eip7702/provider.js +17 -0
- package/dist/chains/xlayer/eip7702/time.d.ts +2 -0
- package/dist/chains/xlayer/eip7702/time.js +10 -0
- package/dist/chains/xlayer/eip7702/tx-build.d.ts +10 -0
- package/dist/chains/xlayer/eip7702/tx-build.js +128 -0
- package/dist/chains/xlayer/eip7702/utils.d.ts +19 -85
- package/dist/chains/xlayer/eip7702/utils.js +19 -484
- package/dist/chains/xlayer/eip7702/volume-bundle.d.ts +13 -0
- package/dist/chains/xlayer/eip7702/volume-bundle.js +250 -0
- package/dist/chains/xlayer/eip7702/volume-internal.d.ts +13 -0
- package/dist/chains/xlayer/eip7702/volume-internal.js +169 -0
- package/dist/chains/xlayer/eip7702/volume-make.d.ts +8 -0
- package/dist/chains/xlayer/eip7702/volume-make.js +38 -0
- package/dist/chains/xlayer/eip7702/volume-single-round.d.ts +17 -0
- package/dist/chains/xlayer/eip7702/volume-single-round.js +44 -0
- package/dist/chains/xlayer/eip7702/volume-swap.d.ts +18 -0
- package/dist/chains/xlayer/eip7702/volume-swap.js +30 -0
- package/dist/chains/xlayer/eip7702/volume-wash.d.ts +8 -0
- package/dist/chains/xlayer/eip7702/volume-wash.js +191 -0
- package/dist/chains/xlayer/eip7702/volume.d.ts +7 -35
- package/dist/chains/xlayer/eip7702/volume.js +5 -697
- package/dist/chains/xlayer/eip7702/wallet.d.ts +6 -0
- package/dist/chains/xlayer/eip7702/wallet.js +17 -0
- package/dist/chains/xlayer/eoa/aa-types.d.ts +176 -0
- package/dist/chains/xlayer/eoa/aa-types.js +6 -0
- package/dist/chains/xlayer/eoa/constants.d.ts +0 -2
- package/dist/chains/xlayer/eoa/constants.js +0 -2
- package/dist/chains/xlayer/eoa/context.d.ts +8 -0
- package/dist/chains/xlayer/eoa/context.js +23 -0
- package/dist/chains/xlayer/eoa/encoders.d.ts +147 -0
- package/dist/chains/xlayer/eoa/encoders.js +147 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-cross.d.ts +5 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-cross.js +113 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.d.ts +10 -123
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-helpers.js +10 -225
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-pure.d.ts +50 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-pure.js +170 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-quick.d.ts +5 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-quick.js +257 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-types.d.ts +99 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap-types.js +11 -0
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.d.ts +5 -47
- package/dist/chains/xlayer/eoa/eoa-bundle-swap.js +3 -522
- package/dist/chains/xlayer/eoa/eoa-types.d.ts +776 -0
- package/dist/chains/xlayer/eoa/eoa-types.js +6 -0
- package/dist/chains/xlayer/eoa/eoa-wash-volume.d.ts +8 -0
- package/dist/chains/xlayer/eoa/eoa-wash-volume.js +8 -0
- package/dist/chains/xlayer/eoa/format.d.ts +34 -0
- package/dist/chains/xlayer/eoa/format.js +56 -0
- package/dist/chains/xlayer/eoa/hop-chain.d.ts +4 -0
- package/dist/chains/xlayer/eoa/hop-chain.js +87 -0
- package/dist/chains/xlayer/eoa/nonce-map.d.ts +20 -0
- package/dist/chains/xlayer/eoa/nonce-map.js +51 -0
- package/dist/chains/xlayer/eoa/portal-ops.d.ts +9 -292
- package/dist/chains/xlayer/eoa/portal-ops.js +9 -486
- package/dist/chains/xlayer/eoa/query.d.ts +117 -0
- package/dist/chains/xlayer/eoa/query.js +285 -0
- package/dist/chains/xlayer/eoa/quote.d.ts +6 -0
- package/dist/chains/xlayer/eoa/quote.js +90 -0
- package/dist/chains/xlayer/eoa/types.d.ts +9 -959
- package/dist/chains/xlayer/eoa/types.js +9 -49
- package/dist/core/clients/blockrazor.js +1 -1
- package/dist/core/clients/merkle.js +1 -1
- package/dist/core/erc20/allowances.d.ts +104 -0
- package/dist/core/erc20/allowances.js +205 -0
- package/dist/core/erc20/approve.d.ts +141 -0
- package/dist/core/erc20/approve.js +325 -0
- package/dist/core/erc20/helpers.d.ts +20 -0
- package/dist/core/erc20/helpers.js +109 -0
- package/dist/core/erc20/index.d.ts +13 -0
- package/dist/core/erc20/index.js +12 -0
- package/dist/core/gas/bundle-gas.d.ts +6 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/quote/index.d.ts +1 -0
- package/dist/core/quote/index.js +1 -0
- package/dist/core/quote/quote-helpers.d.ts +78 -0
- package/dist/core/quote/quote-helpers.js +289 -0
- package/dist/core/quote/types.d.ts +1 -0
- package/dist/core/quote/types.js +1 -0
- package/dist/core/sign-context-helpers.d.ts +29 -0
- package/dist/core/sign-context-helpers.js +63 -0
- package/dist/domains/dex/direct-router-helpers.d.ts +16 -268
- package/dist/domains/dex/direct-router-helpers.js +16 -535
- package/dist/domains/dex/direct-router-types.d.ts +104 -0
- package/dist/domains/dex/direct-router-types.js +81 -0
- package/dist/domains/dex/direct-router-v2-buy.d.ts +2 -0
- package/dist/domains/dex/direct-router-v2-buy.js +249 -0
- package/dist/domains/dex/direct-router-v2-sell.d.ts +5 -0
- package/dist/domains/dex/direct-router-v2-sell.js +270 -0
- package/dist/domains/dex/direct-router-v2.d.ts +9 -0
- package/dist/domains/dex/direct-router-v2.js +9 -0
- package/dist/domains/dex/direct-router-v3.d.ts +17 -0
- package/dist/domains/dex/direct-router-v3.js +432 -0
- package/dist/domains/dex/direct-router.d.ts +11 -26
- package/dist/domains/dex/direct-router.js +10 -977
- package/dist/domains/dex/dyo-encode.d.ts +62 -0
- package/dist/domains/dex/dyo-encode.js +124 -0
- package/dist/domains/dex/profit.d.ts +24 -0
- package/dist/domains/dex/profit.js +86 -0
- package/dist/domains/dex/provider.d.ts +10 -0
- package/dist/domains/dex/provider.js +27 -0
- package/dist/domains/dex/quote.d.ts +7 -0
- package/dist/domains/dex/quote.js +52 -0
- package/dist/domains/dex/router.d.ts +56 -0
- package/dist/domains/dex/router.js +193 -0
- package/dist/domains/flap/portal-bundle/batch.d.ts +9 -0
- package/dist/domains/flap/portal-bundle/batch.js +193 -0
- package/dist/domains/flap/portal-bundle/create.d.ts +5 -0
- package/dist/domains/flap/portal-bundle/create.js +153 -0
- package/dist/domains/flap/portal-bundle/helpers.d.ts +32 -0
- package/dist/domains/flap/portal-bundle/helpers.js +50 -0
- package/dist/domains/flap/portal-bundle/index.d.ts +16 -0
- package/dist/domains/flap/portal-bundle/index.js +15 -0
- package/dist/domains/flap/portal-bundle/private.d.ts +5 -0
- package/dist/domains/flap/portal-bundle/private.js +198 -0
- package/dist/domains/flap/portal-bundle/types.d.ts +102 -0
- package/dist/domains/flap/portal-bundle/types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/core-batch.d.ts +13 -0
- package/dist/domains/flap/portal-bundle-merkle/core-batch.js +376 -0
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.d.ts +75 -7
- package/dist/domains/flap/portal-bundle-merkle/core-helpers.js +259 -20
- package/dist/domains/flap/portal-bundle-merkle/core.d.ts +2 -13
- package/dist/domains/flap/portal-bundle-merkle/core.js +12 -629
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/constants.d.ts +70 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/constants.js +90 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/main.d.ts +15 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/main.js +432 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/types.d.ts +113 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex/types.js +4 -0
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex.d.ts +4 -127
- package/dist/domains/flap/portal-bundle-merkle/create-to-dex.js +4 -527
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/constants.d.ts +42 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/constants.js +81 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/main.d.ts +15 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/main.js +339 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/types.d.ts +72 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex/types.js +4 -0
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex.d.ts +4 -85
- package/dist/domains/flap/portal-bundle-merkle/curve-to-dex.js +4 -425
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/approve.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/approve.js +102 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/buy.d.ts +5 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/buy.js +135 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/helpers.d.ts +52 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/helpers.js +267 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/index.d.ts +14 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/index.js +14 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/sell.d.ts +5 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy/sell.js +195 -0
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy.d.ts +3 -24
- package/dist/domains/flap/portal-bundle-merkle/pancake-proxy.js +3 -700
- package/dist/domains/flap/portal-bundle-merkle/private/buy.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/private/buy.js +188 -0
- package/dist/domains/flap/portal-bundle-merkle/private/helpers.d.ts +36 -0
- package/dist/domains/flap/portal-bundle-merkle/private/helpers.js +127 -0
- package/dist/domains/flap/portal-bundle-merkle/private/index.d.ts +12 -0
- package/dist/domains/flap/portal-bundle-merkle/private/index.js +12 -0
- package/dist/domains/flap/portal-bundle-merkle/private/sell.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/private/sell.js +191 -0
- package/dist/domains/flap/portal-bundle-merkle/private.d.ts +5 -15
- package/dist/domains/flap/portal-bundle-merkle/private.js +5 -494
- package/dist/domains/flap/portal-bundle-merkle/swap-batch.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-chain.d.ts +4 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-chain.js +43 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-constants.d.ts +13 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-constants.js +21 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.d.ts +11 -121
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-helpers.js +11 -109
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-multi-wallet.d.ts +20 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-multi-wallet.js +223 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-plan.d.ts +32 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-plan.js +66 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-profit.d.ts +22 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-profit.js +22 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-quote.d.ts +51 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-quote.js +149 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-types.d.ts +87 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first-types.js +1 -0
- package/dist/domains/flap/portal-bundle-merkle/swap-buy-first.js +5 -404
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.d.ts +0 -1
- package/dist/domains/flap/portal-bundle-merkle/swap-helpers.js +0 -7
- package/dist/domains/flap/portal-bundle-merkle/swap-planning.js +1 -1
- package/dist/domains/flap/portal-bundle-merkle/swap-quick-batch.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/swap-single.js +3 -2
- package/dist/domains/flap/portal-bundle-merkle/utils/disperse.d.ts +2 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/disperse.js +275 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/index.d.ts +11 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/index.js +11 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/sweep.d.ts +9 -0
- package/dist/domains/flap/portal-bundle-merkle/utils/sweep.js +570 -0
- package/dist/domains/flap/portal-bundle-merkle/utils.d.ts +5 -8
- package/dist/domains/flap/portal-bundle-merkle/utils.js +5 -841
- package/dist/domains/flap/portal-bundle.d.ts +5 -117
- package/dist/domains/flap/portal-bundle.js +5 -587
- package/dist/domains/flap/portal.d.ts +13 -404
- package/dist/domains/flap/portal.js +12 -619
- package/dist/domains/flap/reader.d.ts +51 -0
- package/dist/domains/flap/reader.js +275 -0
- package/dist/domains/flap/types.d.ts +246 -0
- package/dist/domains/flap/types.js +104 -0
- package/dist/domains/flap/vault/constants.d.ts +220 -0
- package/dist/domains/flap/vault/constants.js +173 -0
- package/dist/domains/flap/vault/encode.d.ts +39 -0
- package/dist/domains/flap/vault/encode.js +135 -0
- package/dist/domains/flap/vault/index.d.ts +15 -0
- package/dist/domains/flap/vault/index.js +14 -0
- package/dist/domains/flap/vault/query.d.ts +40 -0
- package/dist/domains/flap/vault/query.js +104 -0
- package/dist/domains/flap/vault/types.d.ts +147 -0
- package/dist/domains/flap/vault/types.js +29 -0
- package/dist/domains/flap/vault.d.ts +3 -413
- package/dist/domains/flap/vault.js +3 -467
- package/dist/domains/flap/writer.d.ts +124 -0
- package/dist/domains/flap/writer.js +255 -0
- package/dist/domains/four/contracts/tm-bundle-batch.d.ts +35 -0
- package/dist/domains/four/contracts/tm-bundle-batch.js +286 -0
- package/dist/domains/four/contracts/tm-bundle-create.d.ts +2 -0
- package/dist/domains/four/contracts/tm-bundle-create.js +304 -0
- package/dist/domains/four/contracts/tm-bundle-helpers.d.ts +2 -1
- package/dist/domains/four/contracts/tm-bundle-helpers.js +3 -0
- package/dist/domains/four/contracts/tm-bundle-private.d.ts +36 -0
- package/dist/domains/four/contracts/tm-bundle-private.js +164 -0
- package/dist/domains/four/contracts/tm-bundle.d.ts +10 -71
- package/dist/domains/four/contracts/tm-bundle.js +9 -738
- package/dist/domains/lp-inspect/inspect-helpers.d.ts +25 -0
- package/dist/domains/lp-inspect/inspect-helpers.js +343 -0
- package/dist/domains/lp-inspect/inspect.d.ts +8 -0
- package/dist/domains/lp-inspect/inspect.js +332 -0
- package/dist/domains/lp-inspect/lp-inspect.d.ts +9 -37
- package/dist/domains/lp-inspect/lp-inspect.js +9 -775
- package/dist/domains/lp-inspect/registry.d.ts +43 -0
- package/dist/domains/lp-inspect/registry.js +127 -0
- package/dist/domains/merkle/index.d.ts +1 -1
- package/dist/exports/root-bundle-and-tooling.d.ts +9 -1
- package/dist/exports/root-bundle-and-tooling.js +8 -1
- package/dist/exports/root-foundations.d.ts +1 -1
- package/dist/exports/root-foundations.js +1 -1
- package/dist/exports/root-swap-dex-and-xlayer.d.ts +4 -4
- package/dist/exports/root-swap-dex-and-xlayer.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/swap-helpers.js +1 -1
- package/package.json +1 -81
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap Tax Vaults — 常量(地址 / 标签 / ABI)
|
|
3
|
+
*/
|
|
4
|
+
import type { VaultType } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* 金库类型显示标签
|
|
7
|
+
*/
|
|
8
|
+
export declare const VAULT_TYPE_LABELS: Record<VaultType, string>;
|
|
9
|
+
/**
|
|
10
|
+
* 金库类型分类(对齐 flap.sh 的 category 字段)
|
|
11
|
+
*/
|
|
12
|
+
export declare const VAULT_TYPE_CATEGORIES: {
|
|
13
|
+
official: VaultType[];
|
|
14
|
+
community: VaultType[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* VaultPortal 合约地址
|
|
18
|
+
*
|
|
19
|
+
* ⚠️ 金库代币通过 VaultPortal 创建,不是普通 Portal
|
|
20
|
+
* 来源:flap.sh/_next/static/chunks/2601-*.js
|
|
21
|
+
*/
|
|
22
|
+
export declare const VAULT_PORTAL_ADDRESSES: Record<string, string>;
|
|
23
|
+
/**
|
|
24
|
+
* VaultFactory 合约地址(每种金库类型 + 每条链)
|
|
25
|
+
*
|
|
26
|
+
* ⚠️ 直接从 flap.sh 前端 JS 源码中提取的真实地址
|
|
27
|
+
* 来源:flap.sh/_next/static/chunks/2601-*.js 中 taxVaults.vaultTypes[]
|
|
28
|
+
*/
|
|
29
|
+
export declare const VAULT_FACTORY_ADDRESSES: Record<string, Record<string, string>>;
|
|
30
|
+
/**
|
|
31
|
+
* 金库额外配置(如 XVault 的 relayer 端点)
|
|
32
|
+
*/
|
|
33
|
+
export declare const VAULT_EXTRA_CONFIG: Record<string, Record<string, Record<string, string>>>;
|
|
34
|
+
/**
|
|
35
|
+
* Flap Guardian 合约地址
|
|
36
|
+
*/
|
|
37
|
+
export declare const FLAP_GUARDIAN_ADDRESSES: {
|
|
38
|
+
readonly BSC: "0x9e27098dcD8844bcc6287a557E0b4D09C86B8a4b";
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* VaultPortal ABI — newTaxTokenWithVault
|
|
42
|
+
*
|
|
43
|
+
* ⚠️ 从 flap.sh 前端 JS 源码提取的真实 ABI
|
|
44
|
+
* 来源:flap.sh/_next/static/chunks/6288-*.js(VaultPortal 合约 ABI)
|
|
45
|
+
*/
|
|
46
|
+
export declare const VAULT_PORTAL_ABI: readonly [{
|
|
47
|
+
readonly type: "function";
|
|
48
|
+
readonly name: "newTaxTokenWithVault";
|
|
49
|
+
readonly inputs: readonly [{
|
|
50
|
+
readonly name: "params";
|
|
51
|
+
readonly type: "tuple";
|
|
52
|
+
readonly internalType: "struct IVaultPortalTypes.NewTaxTokenWithVaultParams";
|
|
53
|
+
readonly components: readonly [{
|
|
54
|
+
readonly name: "name";
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
readonly internalType: "string";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "symbol";
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly internalType: "string";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "meta";
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
readonly internalType: "string";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "dexThresh";
|
|
67
|
+
readonly type: "uint8";
|
|
68
|
+
readonly internalType: "enum IPortalCommonTypes.DexThreshType";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "salt";
|
|
71
|
+
readonly type: "bytes32";
|
|
72
|
+
readonly internalType: "bytes32";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "taxRate";
|
|
75
|
+
readonly type: "uint16";
|
|
76
|
+
readonly internalType: "uint16";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "migratorType";
|
|
79
|
+
readonly type: "uint8";
|
|
80
|
+
readonly internalType: "enum IPortalTypes.MigratorType";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "quoteToken";
|
|
83
|
+
readonly type: "address";
|
|
84
|
+
readonly internalType: "address";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "quoteAmt";
|
|
87
|
+
readonly type: "uint256";
|
|
88
|
+
readonly internalType: "uint256";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "permitData";
|
|
91
|
+
readonly type: "bytes";
|
|
92
|
+
readonly internalType: "bytes";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "extensionID";
|
|
95
|
+
readonly type: "bytes32";
|
|
96
|
+
readonly internalType: "bytes32";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "extensionData";
|
|
99
|
+
readonly type: "bytes";
|
|
100
|
+
readonly internalType: "bytes";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "dexId";
|
|
103
|
+
readonly type: "uint8";
|
|
104
|
+
readonly internalType: "enum IPortalTypes.DEXId";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "lpFeeProfile";
|
|
107
|
+
readonly type: "uint8";
|
|
108
|
+
readonly internalType: "enum IPortalTypes.V3LPFeeProfile";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "taxDuration";
|
|
111
|
+
readonly type: "uint64";
|
|
112
|
+
readonly internalType: "uint64";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "antiFarmerDuration";
|
|
115
|
+
readonly type: "uint64";
|
|
116
|
+
readonly internalType: "uint64";
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "mktBps";
|
|
119
|
+
readonly type: "uint16";
|
|
120
|
+
readonly internalType: "uint16";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "deflationBps";
|
|
123
|
+
readonly type: "uint16";
|
|
124
|
+
readonly internalType: "uint16";
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "dividendBps";
|
|
127
|
+
readonly type: "uint16";
|
|
128
|
+
readonly internalType: "uint16";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "lpBps";
|
|
131
|
+
readonly type: "uint16";
|
|
132
|
+
readonly internalType: "uint16";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "minimumShareBalance";
|
|
135
|
+
readonly type: "uint256";
|
|
136
|
+
readonly internalType: "uint256";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "vaultFactory";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
readonly internalType: "address";
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "vaultData";
|
|
143
|
+
readonly type: "bytes";
|
|
144
|
+
readonly internalType: "bytes";
|
|
145
|
+
}];
|
|
146
|
+
}];
|
|
147
|
+
readonly outputs: readonly [{
|
|
148
|
+
readonly name: "token";
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
readonly internalType: "address";
|
|
151
|
+
}];
|
|
152
|
+
readonly stateMutability: "payable";
|
|
153
|
+
}, {
|
|
154
|
+
readonly type: "function";
|
|
155
|
+
readonly name: "getVault";
|
|
156
|
+
readonly inputs: readonly [{
|
|
157
|
+
readonly name: "taxToken";
|
|
158
|
+
readonly type: "address";
|
|
159
|
+
readonly internalType: "address";
|
|
160
|
+
}];
|
|
161
|
+
readonly outputs: readonly [{
|
|
162
|
+
readonly name: "info";
|
|
163
|
+
readonly type: "tuple";
|
|
164
|
+
readonly internalType: "struct IVaultPortalTypes.VaultInfo";
|
|
165
|
+
readonly components: readonly [{
|
|
166
|
+
readonly name: "vault";
|
|
167
|
+
readonly type: "address";
|
|
168
|
+
readonly internalType: "address";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "vaultFactory";
|
|
171
|
+
readonly type: "address";
|
|
172
|
+
readonly internalType: "address";
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "description";
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly internalType: "string";
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "isOfficial";
|
|
179
|
+
readonly type: "bool";
|
|
180
|
+
readonly internalType: "bool";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "riskLevel";
|
|
183
|
+
readonly type: "uint8";
|
|
184
|
+
readonly internalType: "enum IVaultPortalTypes.RiskLevel";
|
|
185
|
+
}];
|
|
186
|
+
}];
|
|
187
|
+
readonly stateMutability: "view";
|
|
188
|
+
}, {
|
|
189
|
+
readonly type: "function";
|
|
190
|
+
readonly name: "predictTaxTokenV1Address";
|
|
191
|
+
readonly inputs: readonly [{
|
|
192
|
+
readonly name: "salt";
|
|
193
|
+
readonly type: "bytes32";
|
|
194
|
+
readonly internalType: "bytes32";
|
|
195
|
+
}];
|
|
196
|
+
readonly outputs: readonly [{
|
|
197
|
+
readonly name: "predictedAddress";
|
|
198
|
+
readonly type: "address";
|
|
199
|
+
readonly internalType: "address";
|
|
200
|
+
}];
|
|
201
|
+
readonly stateMutability: "view";
|
|
202
|
+
}];
|
|
203
|
+
/**
|
|
204
|
+
* IVaultFactory ABI(V1)
|
|
205
|
+
*/
|
|
206
|
+
export declare const VAULT_FACTORY_ABI: string[];
|
|
207
|
+
/**
|
|
208
|
+
* VaultFactoryBaseV2 ABI
|
|
209
|
+
*/
|
|
210
|
+
export declare const VAULT_FACTORY_V2_ABI: string[];
|
|
211
|
+
/**
|
|
212
|
+
* VaultBase ABI(V1)
|
|
213
|
+
*/
|
|
214
|
+
export declare const VAULT_BASE_ABI: string[];
|
|
215
|
+
/**
|
|
216
|
+
* VaultBaseV2 ABI
|
|
217
|
+
*/
|
|
218
|
+
export declare const VAULT_BASE_V2_ABI: string[];
|
|
219
|
+
/** extensionID/extensionData 在金库模式下始终为零值 */
|
|
220
|
+
export declare const NONE_EXTENSION_ID: string;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap Tax Vaults — 常量(地址 / 标签 / ABI)
|
|
3
|
+
*/
|
|
4
|
+
import { ZeroAddress } from 'ethers';
|
|
5
|
+
/**
|
|
6
|
+
* 金库类型显示标签
|
|
7
|
+
*/
|
|
8
|
+
export const VAULT_TYPE_LABELS = {
|
|
9
|
+
none: '无金库(标准税收)',
|
|
10
|
+
gift: 'FlapXVault — 禮物金庫',
|
|
11
|
+
split: 'SplitVault — 分配金庫',
|
|
12
|
+
buyback_burn: 'SnowBallVault — Buyback & Burn',
|
|
13
|
+
burnToEarn: 'BlackHoleVault — 燃燒分紅',
|
|
14
|
+
buildYourVault: 'Build Your Vault — 構建您的金庫',
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 金库类型分类(对齐 flap.sh 的 category 字段)
|
|
18
|
+
*/
|
|
19
|
+
export const VAULT_TYPE_CATEGORIES = {
|
|
20
|
+
official: ['gift', 'split', 'buyback_burn'],
|
|
21
|
+
community: ['burnToEarn', 'buildYourVault'],
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* VaultPortal 合约地址
|
|
25
|
+
*
|
|
26
|
+
* ⚠️ 金库代币通过 VaultPortal 创建,不是普通 Portal
|
|
27
|
+
* 来源:flap.sh/_next/static/chunks/2601-*.js
|
|
28
|
+
*/
|
|
29
|
+
export const VAULT_PORTAL_ADDRESSES = {
|
|
30
|
+
BSC: '0x90497450f2a706f1951b5bdda52B4E5d16f34C06',
|
|
31
|
+
BASE: '0x027e3704fC5C16522e9393d04C60A3ac5c0d775f',
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* VaultFactory 合约地址(每种金库类型 + 每条链)
|
|
35
|
+
*
|
|
36
|
+
* ⚠️ 直接从 flap.sh 前端 JS 源码中提取的真实地址
|
|
37
|
+
* 来源:flap.sh/_next/static/chunks/2601-*.js 中 taxVaults.vaultTypes[]
|
|
38
|
+
*/
|
|
39
|
+
export const VAULT_FACTORY_ADDRESSES = {
|
|
40
|
+
BSC: {
|
|
41
|
+
gift: '0x025549F52B03cF36f9e1a337c02d3AA7Af66ab32',
|
|
42
|
+
split: '0xfab75Dc774cB9B38b91749B8833360B46a52345F',
|
|
43
|
+
// bnbshare: '0x53AD93F2454cFA532656f80E30571159d7E726A7', // 已禁用 (enabled: false)
|
|
44
|
+
buyback_burn: '0xB64655dab7156c29B63C70fb3ED7f071e2658D19',
|
|
45
|
+
burnToEarn: '0x47A216040Dc9e0AfE2e6fc5dcC44f7bBD1B60d25',
|
|
46
|
+
buildYourVault: ZeroAddress, // 用户自定义地址
|
|
47
|
+
},
|
|
48
|
+
BASE: {
|
|
49
|
+
gift: '0xa02DA44D67DB6D692efa7f751b5952bd670d5326',
|
|
50
|
+
split: '0x1ae091F75D593eb7dC6539600a185C8A6076A424',
|
|
51
|
+
buyback_burn: '0x6F97fA674a6FE5EC37e309B63aB54E33c9e64d2E',
|
|
52
|
+
burnToEarn: '0x47A216040Dc9e0AfE2e6fc5dcC44f7bBD1B60d25',
|
|
53
|
+
buildYourVault: ZeroAddress,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 金库额外配置(如 XVault 的 relayer 端点)
|
|
58
|
+
*/
|
|
59
|
+
export const VAULT_EXTRA_CONFIG = {
|
|
60
|
+
BSC: {
|
|
61
|
+
gift: { XVaultRelayerEndpoint: 'https://xoracle.taxed.fun/' },
|
|
62
|
+
},
|
|
63
|
+
BASE: {
|
|
64
|
+
gift: { XVaultRelayerEndpoint: 'https://xrelayer.taxed.fun/' },
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Flap Guardian 合约地址
|
|
69
|
+
*/
|
|
70
|
+
export const FLAP_GUARDIAN_ADDRESSES = {
|
|
71
|
+
BSC: '0x9e27098dcD8844bcc6287a557E0b4D09C86B8a4b',
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* VaultPortal ABI — newTaxTokenWithVault
|
|
75
|
+
*
|
|
76
|
+
* ⚠️ 从 flap.sh 前端 JS 源码提取的真实 ABI
|
|
77
|
+
* 来源:flap.sh/_next/static/chunks/6288-*.js(VaultPortal 合约 ABI)
|
|
78
|
+
*/
|
|
79
|
+
export const VAULT_PORTAL_ABI = [
|
|
80
|
+
{
|
|
81
|
+
type: 'function',
|
|
82
|
+
name: 'newTaxTokenWithVault',
|
|
83
|
+
inputs: [
|
|
84
|
+
{
|
|
85
|
+
name: 'params',
|
|
86
|
+
type: 'tuple',
|
|
87
|
+
internalType: 'struct IVaultPortalTypes.NewTaxTokenWithVaultParams',
|
|
88
|
+
components: [
|
|
89
|
+
{ name: 'name', type: 'string', internalType: 'string' },
|
|
90
|
+
{ name: 'symbol', type: 'string', internalType: 'string' },
|
|
91
|
+
{ name: 'meta', type: 'string', internalType: 'string' },
|
|
92
|
+
{ name: 'dexThresh', type: 'uint8', internalType: 'enum IPortalCommonTypes.DexThreshType' },
|
|
93
|
+
{ name: 'salt', type: 'bytes32', internalType: 'bytes32' },
|
|
94
|
+
{ name: 'taxRate', type: 'uint16', internalType: 'uint16' },
|
|
95
|
+
{ name: 'migratorType', type: 'uint8', internalType: 'enum IPortalTypes.MigratorType' },
|
|
96
|
+
{ name: 'quoteToken', type: 'address', internalType: 'address' },
|
|
97
|
+
{ name: 'quoteAmt', type: 'uint256', internalType: 'uint256' },
|
|
98
|
+
{ name: 'permitData', type: 'bytes', internalType: 'bytes' },
|
|
99
|
+
{ name: 'extensionID', type: 'bytes32', internalType: 'bytes32' },
|
|
100
|
+
{ name: 'extensionData', type: 'bytes', internalType: 'bytes' },
|
|
101
|
+
{ name: 'dexId', type: 'uint8', internalType: 'enum IPortalTypes.DEXId' },
|
|
102
|
+
{ name: 'lpFeeProfile', type: 'uint8', internalType: 'enum IPortalTypes.V3LPFeeProfile' },
|
|
103
|
+
{ name: 'taxDuration', type: 'uint64', internalType: 'uint64' },
|
|
104
|
+
{ name: 'antiFarmerDuration', type: 'uint64', internalType: 'uint64' },
|
|
105
|
+
{ name: 'mktBps', type: 'uint16', internalType: 'uint16' },
|
|
106
|
+
{ name: 'deflationBps', type: 'uint16', internalType: 'uint16' },
|
|
107
|
+
{ name: 'dividendBps', type: 'uint16', internalType: 'uint16' },
|
|
108
|
+
{ name: 'lpBps', type: 'uint16', internalType: 'uint16' },
|
|
109
|
+
{ name: 'minimumShareBalance', type: 'uint256', internalType: 'uint256' },
|
|
110
|
+
{ name: 'vaultFactory', type: 'address', internalType: 'address' },
|
|
111
|
+
{ name: 'vaultData', type: 'bytes', internalType: 'bytes' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
outputs: [{ name: 'token', type: 'address', internalType: 'address' }],
|
|
116
|
+
stateMutability: 'payable',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'function',
|
|
120
|
+
name: 'getVault',
|
|
121
|
+
inputs: [{ name: 'taxToken', type: 'address', internalType: 'address' }],
|
|
122
|
+
outputs: [
|
|
123
|
+
{
|
|
124
|
+
name: 'info',
|
|
125
|
+
type: 'tuple',
|
|
126
|
+
internalType: 'struct IVaultPortalTypes.VaultInfo',
|
|
127
|
+
components: [
|
|
128
|
+
{ name: 'vault', type: 'address', internalType: 'address' },
|
|
129
|
+
{ name: 'vaultFactory', type: 'address', internalType: 'address' },
|
|
130
|
+
{ name: 'description', type: 'string', internalType: 'string' },
|
|
131
|
+
{ name: 'isOfficial', type: 'bool', internalType: 'bool' },
|
|
132
|
+
{ name: 'riskLevel', type: 'uint8', internalType: 'enum IVaultPortalTypes.RiskLevel' },
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
stateMutability: 'view',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: 'function',
|
|
140
|
+
name: 'predictTaxTokenV1Address',
|
|
141
|
+
inputs: [{ name: 'salt', type: 'bytes32', internalType: 'bytes32' }],
|
|
142
|
+
outputs: [{ name: 'predictedAddress', type: 'address', internalType: 'address' }],
|
|
143
|
+
stateMutability: 'view',
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
/**
|
|
147
|
+
* IVaultFactory ABI(V1)
|
|
148
|
+
*/
|
|
149
|
+
export const VAULT_FACTORY_ABI = [
|
|
150
|
+
'function newVault(address token, address beneficiary, bytes vaultData) external returns (address)',
|
|
151
|
+
];
|
|
152
|
+
/**
|
|
153
|
+
* VaultFactoryBaseV2 ABI
|
|
154
|
+
*/
|
|
155
|
+
export const VAULT_FACTORY_V2_ABI = [
|
|
156
|
+
...VAULT_FACTORY_ABI,
|
|
157
|
+
'function vaultDataSchema() public pure returns (tuple(string description, tuple(string name, string fieldType, string description, uint8 decimals)[] fields, bool isArray))',
|
|
158
|
+
];
|
|
159
|
+
/**
|
|
160
|
+
* VaultBase ABI(V1)
|
|
161
|
+
*/
|
|
162
|
+
export const VAULT_BASE_ABI = ['function description() public view returns (string)'];
|
|
163
|
+
/**
|
|
164
|
+
* VaultBaseV2 ABI
|
|
165
|
+
*/
|
|
166
|
+
export const VAULT_BASE_V2_ABI = [
|
|
167
|
+
...VAULT_BASE_ABI,
|
|
168
|
+
'function vaultUISchema() public pure returns (tuple(string vaultType, string description, tuple(string name, string description, tuple(string name, string fieldType, string description, uint8 decimals)[] inputs, tuple(string name, string fieldType, string description, uint8 decimals)[] outputs, tuple(string tokenType, string amountFieldName)[] approvals, bool isInputArray, bool isOutputArray, bool isWriteMethod)[] methods))',
|
|
169
|
+
'function taxToken() public view returns (address)',
|
|
170
|
+
'function lpToken() public view returns (address)',
|
|
171
|
+
];
|
|
172
|
+
/** extensionID/extensionData 在金库模式下始终为零值 */
|
|
173
|
+
export const NONE_EXTENSION_ID = '0x' + '00'.repeat(32);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap Tax Vaults — 编码与参数构建(encode)
|
|
3
|
+
*/
|
|
4
|
+
import type { TaxVaultConfig, VaultDataSchema, VaultType } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* 根据 VaultDataSchema 和用户输入编码 vaultData
|
|
7
|
+
*/
|
|
8
|
+
export declare function encodeVaultData(schema: VaultDataSchema, fieldValues: Record<string, string | number | boolean>): string;
|
|
9
|
+
/**
|
|
10
|
+
* 获取指定链和金库类型的 VaultFactory 合约地址
|
|
11
|
+
*/
|
|
12
|
+
export declare function getVaultFactoryAddress(chain: string, vaultType: VaultType): string | null;
|
|
13
|
+
/**
|
|
14
|
+
* 获取指定链的 VaultPortal 合约地址
|
|
15
|
+
*/
|
|
16
|
+
export declare function getVaultPortalAddress(chain: string): string | null;
|
|
17
|
+
/**
|
|
18
|
+
* 构建金库参数(用于 VaultPortal.newTaxTokenWithVault)
|
|
19
|
+
*
|
|
20
|
+
* ⚠️ 重要:返回的是 vaultFactory 和 vaultData,不是 extensionID/extensionData
|
|
21
|
+
* extensionID/extensionData 在金库模式下始终为零值
|
|
22
|
+
*
|
|
23
|
+
* @returns { vaultFactory, vaultData } 直接传给 VaultPortal
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildVaultParams(config?: TaxVaultConfig, chain?: string): {
|
|
26
|
+
vaultFactory: string;
|
|
27
|
+
vaultData: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 旧版兼容:将 TaxVaultConfig 转换为 extensionID 和 extensionData
|
|
31
|
+
*
|
|
32
|
+
* ⚠️ 注意:真实的 Flap 平台在金库模式下 extensionID/extensionData 始终为零值
|
|
33
|
+
* 金库参数通过 VaultPortal 的 vaultFactory/vaultData 传递
|
|
34
|
+
* 此函数仅用于向后兼容
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildVaultExtensionParams(): {
|
|
37
|
+
extensionID: string;
|
|
38
|
+
extensionData: string;
|
|
39
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap Tax Vaults — 编码与参数构建(encode)
|
|
3
|
+
*/
|
|
4
|
+
import { AbiCoder, ZeroAddress } from 'ethers';
|
|
5
|
+
import { NONE_EXTENSION_ID, VAULT_FACTORY_ADDRESSES, VAULT_PORTAL_ADDRESSES } from './constants.js';
|
|
6
|
+
const abiCoder = AbiCoder.defaultAbiCoder();
|
|
7
|
+
/**
|
|
8
|
+
* 根据 VaultDataSchema 和用户输入编码 vaultData
|
|
9
|
+
*/
|
|
10
|
+
export function encodeVaultData(schema, fieldValues) {
|
|
11
|
+
if (schema.fields.length === 0 && !schema.isArray) {
|
|
12
|
+
return '0x';
|
|
13
|
+
}
|
|
14
|
+
const types = [];
|
|
15
|
+
const values = [];
|
|
16
|
+
for (const field of schema.fields) {
|
|
17
|
+
const rawValue = fieldValues[field.name];
|
|
18
|
+
types.push(mapFieldTypeToAbiType(field.fieldType));
|
|
19
|
+
values.push(processFieldValue(field, rawValue));
|
|
20
|
+
}
|
|
21
|
+
if (schema.isArray) {
|
|
22
|
+
const tupleType = `tuple(${types.join(',')})`;
|
|
23
|
+
return abiCoder.encode([`${tupleType}[]`], [[values]]);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return abiCoder.encode(types, values);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function mapFieldTypeToAbiType(fieldType) {
|
|
30
|
+
if (fieldType === 'time')
|
|
31
|
+
return 'uint256';
|
|
32
|
+
return fieldType;
|
|
33
|
+
}
|
|
34
|
+
function processFieldValue(field, rawValue) {
|
|
35
|
+
if (rawValue === undefined || rawValue === null) {
|
|
36
|
+
switch (field.fieldType) {
|
|
37
|
+
case 'address':
|
|
38
|
+
return ZeroAddress;
|
|
39
|
+
case 'bool':
|
|
40
|
+
return false;
|
|
41
|
+
case 'string':
|
|
42
|
+
return '';
|
|
43
|
+
case 'bytes':
|
|
44
|
+
case 'bytes32':
|
|
45
|
+
return '0x' + '00'.repeat(32);
|
|
46
|
+
default:
|
|
47
|
+
return 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (field.decimals > 0 && typeof rawValue === 'number') {
|
|
51
|
+
return BigInt(Math.round(rawValue * 10 ** field.decimals));
|
|
52
|
+
}
|
|
53
|
+
if (field.fieldType === 'bool') {
|
|
54
|
+
return Boolean(rawValue);
|
|
55
|
+
}
|
|
56
|
+
return rawValue;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 获取指定链和金库类型的 VaultFactory 合约地址
|
|
60
|
+
*/
|
|
61
|
+
export function getVaultFactoryAddress(chain, vaultType) {
|
|
62
|
+
const chainKey = chain.toUpperCase();
|
|
63
|
+
const factories = VAULT_FACTORY_ADDRESSES[chainKey];
|
|
64
|
+
if (!factories)
|
|
65
|
+
return null;
|
|
66
|
+
return factories[vaultType] || null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 获取指定链的 VaultPortal 合约地址
|
|
70
|
+
*/
|
|
71
|
+
export function getVaultPortalAddress(chain) {
|
|
72
|
+
const chainKey = chain.toUpperCase();
|
|
73
|
+
return VAULT_PORTAL_ADDRESSES[chainKey] || null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 构建金库参数(用于 VaultPortal.newTaxTokenWithVault)
|
|
77
|
+
*
|
|
78
|
+
* ⚠️ 重要:返回的是 vaultFactory 和 vaultData,不是 extensionID/extensionData
|
|
79
|
+
* extensionID/extensionData 在金库模式下始终为零值
|
|
80
|
+
*
|
|
81
|
+
* @returns { vaultFactory, vaultData } 直接传给 VaultPortal
|
|
82
|
+
*/
|
|
83
|
+
export function buildVaultParams(config, chain) {
|
|
84
|
+
if (!config || config.vaultType === 'none') {
|
|
85
|
+
return {
|
|
86
|
+
vaultFactory: ZeroAddress,
|
|
87
|
+
vaultData: '0x',
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
// 1. 确定 vaultFactory 地址
|
|
91
|
+
let vaultFactory;
|
|
92
|
+
if (config.factoryAddress && config.factoryAddress !== ZeroAddress) {
|
|
93
|
+
vaultFactory = config.factoryAddress;
|
|
94
|
+
}
|
|
95
|
+
else if (chain) {
|
|
96
|
+
const addr = getVaultFactoryAddress(chain, config.vaultType);
|
|
97
|
+
if (!addr || addr === ZeroAddress) {
|
|
98
|
+
throw new Error(`链 "${chain}" 上没有 "${config.vaultType}" 类型的官方金库工厂`);
|
|
99
|
+
}
|
|
100
|
+
vaultFactory = addr;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
throw new Error(`金库类型 "${config.vaultType}" 必须提供 factoryAddress 或 chain`);
|
|
104
|
+
}
|
|
105
|
+
// 2. 确定 vaultData
|
|
106
|
+
let vaultData;
|
|
107
|
+
if (config.rawVaultData) {
|
|
108
|
+
vaultData = config.rawVaultData;
|
|
109
|
+
}
|
|
110
|
+
else if (config.vaultDataSchema && config.vaultDataFields) {
|
|
111
|
+
vaultData = encodeVaultData(config.vaultDataSchema, config.vaultDataFields);
|
|
112
|
+
}
|
|
113
|
+
else if (config.vaultDataSchema && config.vaultDataSchema.fields.length === 0 && !config.vaultDataSchema.isArray) {
|
|
114
|
+
vaultData = '0x';
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// 默认空数据(部分工厂不需要 vaultData)
|
|
118
|
+
vaultData = '0x';
|
|
119
|
+
}
|
|
120
|
+
return { vaultFactory, vaultData };
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* 旧版兼容:将 TaxVaultConfig 转换为 extensionID 和 extensionData
|
|
124
|
+
*
|
|
125
|
+
* ⚠️ 注意:真实的 Flap 平台在金库模式下 extensionID/extensionData 始终为零值
|
|
126
|
+
* 金库参数通过 VaultPortal 的 vaultFactory/vaultData 传递
|
|
127
|
+
* 此函数仅用于向后兼容
|
|
128
|
+
*/
|
|
129
|
+
export function buildVaultExtensionParams() {
|
|
130
|
+
// 金库模式下 extensionID/extensionData 始终为零值
|
|
131
|
+
return {
|
|
132
|
+
extensionID: NONE_EXTENSION_ID,
|
|
133
|
+
extensionData: '0x',
|
|
134
|
+
};
|
|
135
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap Tax Vaults barrel
|
|
3
|
+
*
|
|
4
|
+
* 原超长文件按职责拆分为:
|
|
5
|
+
* - types.ts:类型定义
|
|
6
|
+
* - constants.ts:地址 / 标签 / ABI 常量
|
|
7
|
+
* - encode.ts:编码与参数构建
|
|
8
|
+
* - query.ts:链上查询
|
|
9
|
+
*
|
|
10
|
+
* 对外 export 符号与路径保持不变。
|
|
11
|
+
*/
|
|
12
|
+
export { NONE_EXTENSION_ID, VAULT_TYPE_LABELS, VAULT_TYPE_CATEGORIES, VAULT_FACTORY_ADDRESSES, VAULT_PORTAL_ADDRESSES, VAULT_PORTAL_ABI, VAULT_EXTRA_CONFIG, FLAP_GUARDIAN_ADDRESSES, VAULT_FACTORY_ABI, VAULT_FACTORY_V2_ABI, VAULT_BASE_ABI, VAULT_BASE_V2_ABI, } from './constants.js';
|
|
13
|
+
export type { VaultType, TaxVaultConfig, VaultInfo, FieldDescriptor, VaultDataSchema, ApproveAction, VaultMethodSchema, VaultUISchema, } from './types.js';
|
|
14
|
+
export { encodeVaultData, buildVaultParams, buildVaultExtensionParams, getVaultFactoryAddress, getVaultPortalAddress, } from './encode.js';
|
|
15
|
+
export { queryVaultDataSchema, queryVaultUISchema, queryVaultDescription, validateVaultFactory, getVaultInfo, isValidContract, } from './query.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap Tax Vaults barrel
|
|
3
|
+
*
|
|
4
|
+
* 原超长文件按职责拆分为:
|
|
5
|
+
* - types.ts:类型定义
|
|
6
|
+
* - constants.ts:地址 / 标签 / ABI 常量
|
|
7
|
+
* - encode.ts:编码与参数构建
|
|
8
|
+
* - query.ts:链上查询
|
|
9
|
+
*
|
|
10
|
+
* 对外 export 符号与路径保持不变。
|
|
11
|
+
*/
|
|
12
|
+
export { NONE_EXTENSION_ID, VAULT_TYPE_LABELS, VAULT_TYPE_CATEGORIES, VAULT_FACTORY_ADDRESSES, VAULT_PORTAL_ADDRESSES, VAULT_PORTAL_ABI, VAULT_EXTRA_CONFIG, FLAP_GUARDIAN_ADDRESSES, VAULT_FACTORY_ABI, VAULT_FACTORY_V2_ABI, VAULT_BASE_ABI, VAULT_BASE_V2_ABI, } from './constants.js';
|
|
13
|
+
export { encodeVaultData, buildVaultParams, buildVaultExtensionParams, getVaultFactoryAddress, getVaultPortalAddress, } from './encode.js';
|
|
14
|
+
export { queryVaultDataSchema, queryVaultUISchema, queryVaultDescription, validateVaultFactory, getVaultInfo, isValidContract, } from './query.js';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flap Tax Vaults — 链上查询(query)
|
|
3
|
+
*/
|
|
4
|
+
import { type JsonRpcProvider } from 'ethers';
|
|
5
|
+
import { type VaultDataSchema, type VaultUISchema } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* 从 VaultFactory 合约读取 vaultDataSchema
|
|
8
|
+
*/
|
|
9
|
+
export declare function queryVaultDataSchema(provider: JsonRpcProvider, factoryAddress: string): Promise<VaultDataSchema | null>;
|
|
10
|
+
/**
|
|
11
|
+
* 从金库合约读取 vaultUISchema
|
|
12
|
+
*/
|
|
13
|
+
export declare function queryVaultUISchema(provider: JsonRpcProvider, vaultAddress: string): Promise<VaultUISchema | null>;
|
|
14
|
+
/**
|
|
15
|
+
* 读取金库合约的动态描述
|
|
16
|
+
*/
|
|
17
|
+
export declare function queryVaultDescription(provider: JsonRpcProvider, vaultAddress: string): Promise<string | null>;
|
|
18
|
+
/**
|
|
19
|
+
* 验证合约是否是有效的 VaultFactory
|
|
20
|
+
*/
|
|
21
|
+
export declare function validateVaultFactory(provider: JsonRpcProvider, factoryAddress: string): Promise<{
|
|
22
|
+
isValid: boolean;
|
|
23
|
+
isV2: boolean;
|
|
24
|
+
schema: VaultDataSchema | null;
|
|
25
|
+
error?: string;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* 从 VaultPortal 查询代币的金库信息
|
|
29
|
+
*/
|
|
30
|
+
export declare function getVaultInfo(provider: JsonRpcProvider, vaultPortalAddress: string, taxTokenAddress: string): Promise<{
|
|
31
|
+
vault: string;
|
|
32
|
+
vaultFactory: string;
|
|
33
|
+
description: string;
|
|
34
|
+
isOfficial: boolean;
|
|
35
|
+
riskLevel: number;
|
|
36
|
+
} | null>;
|
|
37
|
+
/**
|
|
38
|
+
* 验证合约是否有效(是否部署了代码)
|
|
39
|
+
*/
|
|
40
|
+
export declare function isValidContract(provider: JsonRpcProvider, address: string): Promise<boolean>;
|