@oakagentkit/core 0.3.4 → 0.3.6
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/build/dist/api/addresses.d.ts +14 -0
- package/build/dist/api/addresses.js +1 -1
- package/build/dist/api/chain.js +1 -1
- package/build/dist/api/history.d.ts +2 -0
- package/build/dist/api/history.js +1 -1
- package/build/dist/api/identity-link.js +1 -1
- package/build/dist/api/metadata.js +1 -1
- package/build/dist/api/modules/beefy/boosts.js +1 -1
- package/build/dist/api/modules/beefy/clm.js +1 -1
- package/build/dist/api/modules/beefy/guard.js +1 -1
- package/build/dist/api/modules/beefy/index.js +1 -1
- package/build/dist/api/modules/beefy/liquidity.js +1 -1
- package/build/dist/api/modules/beefy/management.js +1 -1
- package/build/dist/api/modules/beefy/vaults.js +1 -1
- package/build/dist/api/modules/borro/actions.js +1 -1
- package/build/dist/api/modules/borro/index.js +1 -1
- package/build/dist/api/modules/borro/liquidity.js +1 -1
- package/build/dist/api/modules/borro/positions.js +1 -1
- package/build/dist/api/modules/borro/reader.js +1 -1
- package/build/dist/api/modules/chop/actions.d.ts +13 -1
- package/build/dist/api/modules/chop/actions.js +1 -1
- package/build/dist/api/modules/chop/checks.js +1 -1
- package/build/dist/api/modules/chop/copy.d.ts +1 -0
- package/build/dist/api/modules/chop/copy.js +1 -1
- package/build/dist/api/modules/chop/display.d.ts +36 -0
- package/build/dist/api/modules/chop/display.js +1 -0
- package/build/dist/api/modules/chop/guard.js +1 -1
- package/build/dist/api/modules/chop/index.js +1 -1
- package/build/dist/api/modules/chop/pins.d.ts +1 -0
- package/build/dist/api/modules/chop/pins.js +1 -1
- package/build/dist/api/modules/chop/positions.js +1 -1
- package/build/dist/api/modules/chop/reader.d.ts +6 -1
- package/build/dist/api/modules/chop/reader.js +1 -1
- package/build/dist/api/modules/chop/types.d.ts +7 -0
- package/build/dist/api/modules/chop/unfarm.d.ts +16 -0
- package/build/dist/api/modules/chop/unfarm.js +1 -0
- package/build/dist/api/modules/clanker/extensions.js +1 -1
- package/build/dist/api/modules/clanker/index.js +1 -1
- package/build/dist/api/modules/clanker/manage.js +1 -1
- package/build/dist/api/modules/clanker/pool-config.js +1 -1
- package/build/dist/api/modules/clanker/protocol.js +1 -1
- package/build/dist/api/modules/clanker/state.js +1 -1
- package/build/dist/api/modules/earn/index.js +1 -1
- package/build/dist/api/modules/erc8004/common.js +1 -1
- package/build/dist/api/modules/erc8004/domain.js +1 -1
- package/build/dist/api/modules/erc8004/index.js +1 -1
- package/build/dist/api/modules/erc8004/management.js +1 -1
- package/build/dist/api/modules/erc8004/reputation.js +1 -1
- package/build/dist/api/modules/erc8004/services.js +1 -1
- package/build/dist/api/modules/erc8004/thesis.js +1 -1
- package/build/dist/api/modules/erc8004/validation.js +1 -1
- package/build/dist/api/modules/factor/actions.js +1 -1
- package/build/dist/api/modules/factor/api.js +1 -1
- package/build/dist/api/modules/factor/checks.js +1 -1
- package/build/dist/api/modules/factor/copy.d.ts +11 -11
- package/build/dist/api/modules/factor/copy.js +1 -1
- package/build/dist/api/modules/factor/guard.js +1 -1
- package/build/dist/api/modules/factor/index.js +1 -1
- package/build/dist/api/modules/factor/reader.js +1 -1
- package/build/dist/api/modules/fobo/client.js +1 -1
- package/build/dist/api/modules/fobo/index.js +1 -1
- package/build/dist/api/modules/fobo/intent.js +1 -1
- package/build/dist/api/modules/fobo/steps.js +1 -1
- package/build/dist/api/modules/fobo/verify.js +1 -1
- package/build/dist/api/modules/gloam/index.js +1 -1
- package/build/dist/api/modules/grove/index.js +1 -1
- package/build/dist/api/modules/heyresearch/builder-feed.js +1 -1
- package/build/dist/api/modules/heyresearch/index.js +1 -1
- package/build/dist/api/modules/heyresearch/public-reads.js +1 -1
- package/build/dist/api/modules/heyresearch/scan.js +1 -1
- package/build/dist/api/modules/heyresearch/token-facts.js +1 -1
- package/build/dist/api/modules/hoodag/chain-reads.js +1 -1
- package/build/dist/api/modules/hoodag/index.js +1 -1
- package/build/dist/api/modules/hoodag/management.js +1 -1
- package/build/dist/api/modules/hoodag/public-reads.js +1 -1
- package/build/dist/api/modules/hoodag/reconstruct.js +1 -1
- package/build/dist/api/modules/hoodlock/airdrop.js +1 -1
- package/build/dist/api/modules/hoodlock/buyback.js +1 -1
- package/build/dist/api/modules/hoodlock/commerce.js +1 -1
- package/build/dist/api/modules/hoodlock/fee.js +1 -1
- package/build/dist/api/modules/hoodlock/guard.js +1 -1
- package/build/dist/api/modules/hoodlock/index.js +1 -1
- package/build/dist/api/modules/hoodlock/lifecycle.js +1 -1
- package/build/dist/api/modules/hoodlock/locks-burn.js +1 -1
- package/build/dist/api/modules/hoodlock/public.js +1 -1
- package/build/dist/api/modules/hookr/actions.d.ts +39 -2
- package/build/dist/api/modules/hookr/actions.js +1 -1
- package/build/dist/api/modules/hookr/addons.js +1 -1
- package/build/dist/api/modules/hookr/agent-gate.d.ts +14 -2
- package/build/dist/api/modules/hookr/agent-gate.js +1 -1
- package/build/dist/api/modules/hookr/agent-link.d.ts +17 -0
- package/build/dist/api/modules/hookr/agent-link.js +1 -0
- package/build/dist/api/modules/hookr/api-client.d.ts +9 -0
- package/build/dist/api/modules/hookr/api-client.js +1 -0
- package/build/dist/api/modules/hookr/blocks/advisory.d.ts +41 -0
- package/build/dist/api/modules/hookr/blocks/advisory.js +1 -0
- package/build/dist/api/modules/hookr/blocks/buy-sell-block.d.ts +7 -0
- package/build/dist/api/modules/hookr/blocks/buy-sell-block.js +1 -0
- package/build/dist/api/modules/hookr/blocks/core-settings.d.ts +6 -0
- package/build/dist/api/modules/hookr/blocks/core-settings.js +1 -0
- package/build/dist/api/modules/hookr/blocks/exit-clock.d.ts +14 -0
- package/build/dist/api/modules/hookr/blocks/exit-clock.js +1 -0
- package/build/dist/api/modules/hookr/blocks/holder-pot.d.ts +30 -0
- package/build/dist/api/modules/hookr/blocks/holder-pot.js +1 -0
- package/build/dist/api/modules/hookr/blocks/managed-fee.d.ts +96 -0
- package/build/dist/api/modules/hookr/blocks/managed-fee.js +1 -0
- package/build/dist/api/modules/hookr/blocks/market-guard.d.ts +116 -0
- package/build/dist/api/modules/hookr/blocks/market-guard.js +1 -0
- package/build/dist/api/modules/hookr/blocks/market-hours-fee.d.ts +87 -0
- package/build/dist/api/modules/hookr/blocks/market-hours-fee.js +1 -0
- package/build/dist/api/modules/hookr/blocks/pay-later.d.ts +199 -0
- package/build/dist/api/modules/hookr/blocks/pay-later.js +1 -0
- package/build/dist/api/modules/hookr/blocks/sandwich-guard.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/sandwich-guard.js +1 -0
- package/build/dist/api/modules/hookr/blocks/storm-fee.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/storm-fee.js +1 -0
- package/build/dist/api/modules/hookr/blocks/swap-cut.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/swap-cut.js +1 -0
- package/build/dist/api/modules/hookr/blocks/swap-reward-mint.d.ts +125 -0
- package/build/dist/api/modules/hookr/blocks/swap-reward-mint.js +1 -0
- package/build/dist/api/modules/hookr/blocks/wallet-cap.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/wallet-cap.js +1 -0
- package/build/dist/api/modules/hookr/blocks/zap-source.d.ts +161 -0
- package/build/dist/api/modules/hookr/blocks/zap-source.js +1 -0
- package/build/dist/api/modules/hookr/blocks/zap-target.d.ts +51 -0
- package/build/dist/api/modules/hookr/blocks/zap-target.js +1 -0
- package/build/dist/api/modules/hookr/claims.d.ts +53 -0
- package/build/dist/api/modules/hookr/claims.js +1 -0
- package/build/dist/api/modules/hookr/contracts.d.ts +3 -1
- package/build/dist/api/modules/hookr/contracts.js +1 -1
- package/build/dist/api/modules/hookr/create-cancel.js +1 -1
- package/build/dist/api/modules/hookr/discovery.d.ts +2 -2
- package/build/dist/api/modules/hookr/discovery.js +1 -1
- package/build/dist/api/modules/hookr/fill-bounty.d.ts +2 -0
- package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
- package/build/dist/api/modules/hookr/gas.d.ts +48 -0
- package/build/dist/api/modules/hookr/gas.js +1 -0
- package/build/dist/api/modules/hookr/gates.d.ts +51 -0
- package/build/dist/api/modules/hookr/gates.js +1 -0
- package/build/dist/api/modules/hookr/hook-blocks.d.ts +304 -0
- package/build/dist/api/modules/hookr/hook-blocks.js +1 -0
- package/build/dist/api/modules/hookr/index.d.ts +4 -2
- package/build/dist/api/modules/hookr/index.js +1 -1
- package/build/dist/api/modules/hookr/jobs.d.ts +7 -0
- package/build/dist/api/modules/hookr/jobs.js +1 -0
- package/build/dist/api/modules/hookr/launch-options.d.ts +52 -3
- package/build/dist/api/modules/hookr/launch-options.js +1 -1
- package/build/dist/api/modules/hookr/launch-profile.d.ts +8 -0
- package/build/dist/api/modules/hookr/launch-profile.js +1 -1
- package/build/dist/api/modules/hookr/launch-receipt.js +1 -1
- package/build/dist/api/modules/hookr/launch.d.ts +24 -0
- package/build/dist/api/modules/hookr/launch.js +1 -1
- package/build/dist/api/modules/hookr/liquidity.js +1 -1
- package/build/dist/api/modules/hookr/lp-positions.js +1 -1
- package/build/dist/api/modules/hookr/lp-reads.js +1 -1
- package/build/dist/api/modules/hookr/lp-receipt.js +1 -1
- package/build/dist/api/modules/hookr/lp-state.d.ts +90 -2
- package/build/dist/api/modules/hookr/lp-state.js +1 -1
- package/build/dist/api/modules/hookr/pay-later-actions.d.ts +52 -0
- package/build/dist/api/modules/hookr/pay-later-actions.js +1 -0
- package/build/dist/api/modules/hookr/pins.d.ts +5 -0
- package/build/dist/api/modules/hookr/pins.js +1 -1
- package/build/dist/api/modules/hookr/pm-liquidity.d.ts +215 -0
- package/build/dist/api/modules/hookr/pm-liquidity.js +1 -0
- package/build/dist/api/modules/hookr/public-reads.d.ts +1 -1
- package/build/dist/api/modules/hookr/public-reads.js +1 -1
- package/build/dist/api/modules/hookr/read-utils.js +1 -1
- package/build/dist/api/modules/hookr/relay.js +1 -1
- package/build/dist/api/modules/hookr/revenue.d.ts +4 -1
- package/build/dist/api/modules/hookr/revenue.js +1 -1
- package/build/dist/api/modules/hookr/scan.d.ts +25 -0
- package/build/dist/api/modules/hookr/scan.js +1 -0
- package/build/dist/api/modules/hookr/swap.d.ts +161 -0
- package/build/dist/api/modules/hookr/swap.js +1 -0
- package/build/dist/api/modules/kyberswap/index.js +1 -1
- package/build/dist/api/modules/kyberswap/source-pools.js +1 -1
- package/build/dist/api/modules/layerbank/abi.js +1 -1
- package/build/dist/api/modules/layerbank/actions.js +1 -1
- package/build/dist/api/modules/layerbank/checks.js +1 -1
- package/build/dist/api/modules/layerbank/index.js +1 -1
- package/build/dist/api/modules/layerbank/merkl.js +1 -1
- package/build/dist/api/modules/layerbank/reader.js +1 -1
- package/build/dist/api/modules/layerbank/reserve.js +1 -1
- package/build/dist/api/modules/lighter/index.js +1 -1
- package/build/dist/api/modules/longbow/administration.js +1 -1
- package/build/dist/api/modules/longbow/analytics.js +1 -1
- package/build/dist/api/modules/longbow/fixed.js +1 -1
- package/build/dist/api/modules/longbow/index.js +1 -1
- package/build/dist/api/modules/longbow/nft.js +1 -1
- package/build/dist/api/modules/longbow/rebates.js +1 -1
- package/build/dist/api/modules/longbow/staking.js +1 -1
- package/build/dist/api/modules/meridian/index.js +1 -1
- package/build/dist/api/modules/meridian/markets.js +1 -1
- package/build/dist/api/modules/meridian/rfq.js +1 -1
- package/build/dist/api/modules/merkl/discovery.js +1 -1
- package/build/dist/api/modules/merkl/index.js +1 -1
- package/build/dist/api/modules/merkl/manage.js +1 -1
- package/build/dist/api/modules/merkl/protocol.js +1 -1
- package/build/dist/api/modules/morpho/allocator.js +1 -1
- package/build/dist/api/modules/morpho/bundles.js +1 -1
- package/build/dist/api/modules/morpho/in-kind.js +1 -1
- package/build/dist/api/modules/morpho/index.js +1 -1
- package/build/dist/api/modules/morpho/local-guard.js +1 -1
- package/build/dist/api/modules/morpho/midnight.js +1 -1
- package/build/dist/api/modules/morpho/protocol.js +1 -1
- package/build/dist/api/modules/morpho/vault-management.js +1 -1
- package/build/dist/api/modules/morpho/vault-tools.js +1 -1
- package/build/dist/api/modules/morpho/vault-v2.js +1 -1
- package/build/dist/api/modules/netnet/card-plan.js +1 -1
- package/build/dist/api/modules/netnet/card-read.js +1 -1
- package/build/dist/api/modules/netnet/card-recovery.js +1 -1
- package/build/dist/api/modules/netnet/desk-action.js +1 -1
- package/build/dist/api/modules/netnet/desk-read.js +1 -1
- package/build/dist/api/modules/netnet/financial.js +1 -1
- package/build/dist/api/modules/netnet/index.js +1 -1
- package/build/dist/api/modules/netnet/staking.js +1 -1
- package/build/dist/api/modules/orbio/index.js +1 -1
- package/build/dist/api/modules/orbio/positions.js +1 -1
- package/build/dist/api/modules/pendle/costs.js +1 -1
- package/build/dist/api/modules/pendle/index.js +1 -1
- package/build/dist/api/modules/pendle/markets.js +1 -1
- package/build/dist/api/modules/pendle/positions.js +1 -1
- package/build/dist/api/modules/pendle/pricecheck.js +1 -1
- package/build/dist/api/modules/pendle/reader.js +1 -1
- package/build/dist/api/modules/pendle/redeem.js +1 -1
- package/build/dist/api/modules/pendle/trade.js +1 -1
- package/build/dist/api/modules/pendle/validate.js +1 -1
- package/build/dist/api/modules/pendle/verify.js +1 -1
- package/build/dist/api/modules/pons/claim.js +1 -1
- package/build/dist/api/modules/pons/index.js +1 -1
- package/build/dist/api/modules/pons/launch-status.js +1 -1
- package/build/dist/api/modules/pons/prices.js +1 -1
- package/build/dist/api/modules/pons/reads.js +1 -1
- package/build/dist/api/modules/pons/swap-terms.js +1 -1
- package/build/dist/api/modules/pons/trade.js +1 -1
- package/build/dist/api/modules/poolstrade/index.js +1 -1
- package/build/dist/api/modules/priors/coverage.js +1 -1
- package/build/dist/api/modules/priors/discovery.js +1 -1
- package/build/dist/api/modules/priors/features.js +1 -1
- package/build/dist/api/modules/priors/holdings.js +1 -1
- package/build/dist/api/modules/priors/index.js +1 -1
- package/build/dist/api/modules/priors/integration.js +1 -1
- package/build/dist/api/modules/priors/market.js +1 -1
- package/build/dist/api/modules/priors/pt.js +1 -1
- package/build/dist/api/modules/priors/savings-exit.js +1 -1
- package/build/dist/api/modules/priors/starter-line.js +1 -1
- package/build/dist/api/modules/priors/stock-swap.js +1 -1
- package/build/dist/api/modules/raeto/index.js +1 -1
- package/build/dist/api/modules/relay/bootstrap.js +1 -1
- package/build/dist/api/modules/relay/discovery.js +1 -1
- package/build/dist/api/modules/relay/inbound.js +1 -1
- package/build/dist/api/modules/relay/index.js +1 -1
- package/build/dist/api/modules/relay/outbound-status.js +1 -1
- package/build/dist/api/modules/relay/reads.js +1 -1
- package/build/dist/api/modules/spark/actions.js +1 -1
- package/build/dist/api/modules/spark/details.js +1 -1
- package/build/dist/api/modules/spark/index.js +1 -1
- package/build/dist/api/modules/spark/management.js +1 -1
- package/build/dist/api/modules/steakhouse/analytics.js +1 -1
- package/build/dist/api/modules/steakhouse/erc4626.js +1 -1
- package/build/dist/api/modules/steakhouse/index.js +1 -1
- package/build/dist/api/modules/steakhouse/local-guard.js +1 -1
- package/build/dist/api/modules/steakhouse/management.js +1 -1
- package/build/dist/api/modules/steakhouse/v2-exit.js +1 -1
- package/build/dist/api/modules/tickerspring/basket-routes.js +1 -1
- package/build/dist/api/modules/tickerspring/contract-reads.js +1 -1
- package/build/dist/api/modules/tickerspring/discovery.js +1 -1
- package/build/dist/api/modules/tickerspring/exit-preview.js +1 -1
- package/build/dist/api/modules/tickerspring/guards.js +1 -1
- package/build/dist/api/modules/tickerspring/index.js +1 -1
- package/build/dist/api/modules/tickerspring/journeys.js +1 -1
- package/build/dist/api/modules/tickerspring/ladder.js +1 -1
- package/build/dist/api/modules/tickerspring/maker.js +1 -1
- package/build/dist/api/modules/tickerspring/order-accounting.js +1 -1
- package/build/dist/api/modules/tickerspring/research.js +1 -1
- package/build/dist/api/modules/tickerspring/strategies.js +1 -1
- package/build/dist/api/modules/uniswap/auction-create.js +1 -1
- package/build/dist/api/modules/uniswap/auction.js +1 -1
- package/build/dist/api/modules/uniswap/batch.js +1 -1
- package/build/dist/api/modules/uniswap/common.js +1 -1
- package/build/dist/api/modules/uniswap/fees.js +1 -1
- package/build/dist/api/modules/uniswap/index.js +1 -1
- package/build/dist/api/modules/uniswap/local-guard.js +1 -1
- package/build/dist/api/modules/uniswap/oracle.js +1 -1
- package/build/dist/api/modules/uniswap/pool-math.js +1 -1
- package/build/dist/api/modules/uniswap/pools.js +1 -1
- package/build/dist/api/modules/uniswap/position.js +1 -1
- package/build/dist/api/modules/uniswap/protocol.js +1 -1
- package/build/dist/api/modules/uniswap/quote-guard.js +1 -1
- package/build/dist/api/modules/uniswap/stock-prices.d.ts +25 -0
- package/build/dist/api/modules/uniswap/stock-prices.js +1 -1
- package/build/dist/api/modules/uniswap/stocks.js +1 -1
- package/build/dist/api/modules/uniswap/token-jar.js +1 -1
- package/build/dist/api/modules/uniswap/trade-batch.js +1 -1
- package/build/dist/api/modules/uniswap/trade.js +1 -1
- package/build/dist/api/modules/uniswap/v2.js +1 -1
- package/build/dist/api/modules/uniswap/v3.js +1 -1
- package/build/dist/api/modules/uniswap/v4.js +1 -1
- package/build/dist/api/modules/uniswap/wrap.js +1 -1
- package/build/dist/api/modules/velora/claims.js +1 -1
- package/build/dist/api/modules/velora/delta-reads.js +1 -1
- package/build/dist/api/modules/velora/index.js +1 -1
- package/build/dist/api/modules/wormhole/index.js +1 -1
- package/build/dist/api/modules/wormhole/scan-text.d.ts +1 -1
- package/build/dist/api/positions.js +1 -1
- package/build/dist/api/pricenote.js +1 -1
- package/build/dist/api/prices.d.ts +5 -0
- package/build/dist/api/prices.js +1 -1
- package/build/dist/api/rpc.js +1 -1
- package/build/dist/api/send.js +1 -1
- package/build/dist/api/signing-registry.js +1 -1
- package/build/dist/api/signing.js +1 -1
- package/build/dist/api/simulate.js +1 -1
- package/build/dist/api/swap.d.ts +2 -0
- package/build/dist/api/swap.js +1 -1
- package/build/dist/api/tokens.d.ts +10 -1
- package/build/dist/api/tokens.js +1 -1
- package/build/dist/api/tool-policy.js +1 -1
- package/build/dist/api/universal-router.js +1 -1
- package/build/dist/api/usd-estimate.d.ts +2 -0
- package/build/dist/api/usd-estimate.js +1 -1
- package/build/dist/chunks/{DMDOSHV7.js → 266VIESP.js} +1 -1
- package/build/dist/chunks/{KNBNKG7P.js → 2BKZLF5A.js} +1 -1
- package/build/dist/chunks/{HFVXNKA5.js → 2BM2WX2G.js} +1 -1
- package/build/dist/chunks/{OY5W7ZSL.js → 2H2OZE6X.js} +1 -1
- package/build/dist/chunks/{E76Z2TT4.js → 2QQ5CGQI.js} +1 -1
- package/build/dist/chunks/{4PLLS6CT.js → 2VYA6WIN.js} +1 -1
- package/build/dist/chunks/{LCH6F5HT.js → 342OZP53.js} +1 -1
- package/build/dist/chunks/{FQTO7VJG.js → 3HF6WE4L.js} +1 -1
- package/build/dist/chunks/3M7RMROZ.js +1 -0
- package/build/dist/chunks/3RGED2KO.js +1 -0
- package/build/dist/chunks/{RUSXMQSJ.js → 3XIJCHT7.js} +1 -1
- package/build/dist/chunks/3XY44BP5.js +1 -0
- package/build/dist/chunks/3YNXQ3EZ.js +1 -0
- package/build/dist/chunks/45QP74CE.js +1 -0
- package/build/dist/chunks/{NYHKIXJR.js → 4GAU3JLN.js} +1 -1
- package/build/dist/chunks/{Y2QADJOB.js → 4P6DRKY3.js} +1 -1
- package/build/dist/chunks/{W3DGFMQE.js → 4RTXP2YP.js} +1 -1
- package/build/dist/chunks/{7FYM7FJA.js → 4SXRXNHG.js} +1 -1
- package/build/dist/chunks/{ZTKT3ZQK.js → 53VBLEYS.js} +1 -1
- package/build/dist/chunks/5677LZOV.js +1 -0
- package/build/dist/chunks/{ADIPEGNN.js → 5AO2QPWE.js} +1 -1
- package/build/dist/chunks/{GQITAJVF.js → 5BPFF7NX.js} +1 -1
- package/build/dist/chunks/{PXUML7HJ.js → 5DWQUEBA.js} +1 -1
- package/build/dist/chunks/{WAKZWSHB.js → 5KKAN7XQ.js} +1 -1
- package/build/dist/chunks/{VVAM3EAK.js → 5N6YJFFA.js} +1 -1
- package/build/dist/chunks/{QIB6OMQV.js → 5O67QQIY.js} +1 -1
- package/build/dist/chunks/5PNFV7HH.js +1 -0
- package/build/dist/chunks/5RAZFRO4.js +1 -0
- package/build/dist/chunks/{FAH7FKUT.js → 5UWVXEPD.js} +1 -1
- package/build/dist/chunks/5VKVAUFQ.js +1 -0
- package/build/dist/chunks/5Y457HYC.js +1 -0
- package/build/dist/chunks/64LAWFBE.js +1 -0
- package/build/dist/chunks/{JJGZ7W3V.js → 6AS3TGOX.js} +1 -1
- package/build/dist/chunks/6EWSLHXL.js +1 -0
- package/build/dist/chunks/{6F527FLN.js → 6HNQAYBM.js} +1 -1
- package/build/dist/chunks/{FUP53K6G.js → 6LDC5D2S.js} +1 -1
- package/build/dist/chunks/{YR44GQG4.js → 6QXTL65K.js} +1 -1
- package/build/dist/chunks/6RVAV6BB.js +1 -0
- package/build/dist/chunks/{WSILNJS2.js → 6STUQOFL.js} +1 -1
- package/build/dist/chunks/{OKXKDDBX.js → 6Y2546JA.js} +1 -1
- package/build/dist/chunks/{4Z3IGMU6.js → 7AYP4ATZ.js} +1 -1
- package/build/dist/chunks/{YGW4ODAP.js → 7EPU3XGY.js} +1 -1
- package/build/dist/chunks/7GL547YZ.js +1 -0
- package/build/dist/chunks/7JTXYMNP.js +1 -0
- package/build/dist/chunks/{A3BJSQ23.js → 7VU5VCTL.js} +1 -1
- package/build/dist/chunks/{Z7FGEWO2.js → 7WXAS54T.js} +1 -1
- package/build/dist/chunks/{3D7FXI6G.js → 7X5JVF3F.js} +1 -1
- package/build/dist/chunks/{DRLBTB4E.js → A72ADVYF.js} +1 -1
- package/build/dist/chunks/{ANIF3JMV.js → AG66NM3J.js} +1 -1
- package/build/dist/chunks/{AOX6DKYU.js → AL6UXNGH.js} +1 -1
- package/build/dist/chunks/AODUTN65.js +1 -0
- package/build/dist/chunks/{PQG3ULRT.js → AONO47JX.js} +1 -1
- package/build/dist/chunks/{JTPHZCO3.js → AQJLEG6B.js} +1 -1
- package/build/dist/chunks/AZBTNUXF.js +1 -0
- package/build/dist/chunks/{O56EZB5Y.js → B5BU645H.js} +1 -1
- package/build/dist/chunks/{LQSPWRHN.js → B75SS7H6.js} +1 -1
- package/build/dist/chunks/{GBIBRYOV.js → B7HVPHSS.js} +1 -1
- package/build/dist/chunks/{LT5P6PZW.js → B7WZJHIJ.js} +1 -1
- package/build/dist/chunks/{3A2IKFTV.js → BIFANUTV.js} +1 -1
- package/build/dist/chunks/BM4KHOFB.js +1 -0
- package/build/dist/chunks/{X3YEDVRN.js → BSV65PCA.js} +1 -1
- package/build/dist/chunks/{HDBDBKEA.js → BW755PNH.js} +1 -1
- package/build/dist/chunks/{VXCGMALF.js → BWE5PXRE.js} +1 -1
- package/build/dist/chunks/{7U62MMUQ.js → BY2OWKZB.js} +1 -1
- package/build/dist/chunks/{SRHVSNPX.js → C2H3BWN5.js} +1 -1
- package/build/dist/chunks/{F7MGYRPU.js → CCPG6PRL.js} +1 -1
- package/build/dist/chunks/{ZTX4WT62.js → CFPJDLTZ.js} +1 -1
- package/build/dist/chunks/{OI3N4EW4.js → CG7ABZXH.js} +1 -1
- package/build/dist/chunks/CJMVRV34.js +1 -0
- package/build/dist/chunks/CQPIR6ER.js +1 -0
- package/build/dist/chunks/{FP7DHVK2.js → CR7DPGI6.js} +1 -1
- package/build/dist/chunks/{W5FM2OVB.js → CVVNAFUE.js} +1 -1
- package/build/dist/chunks/{LEHBRAZX.js → CW37EGPL.js} +1 -1
- package/build/dist/chunks/{MI5HZDMH.js → D6JOXK7Q.js} +1 -1
- package/build/dist/chunks/{SGHSCK22.js → DJRS3TR5.js} +1 -1
- package/build/dist/chunks/{IZFED3R2.js → DLNDJZR4.js} +1 -1
- package/build/dist/chunks/{SYERFEJ4.js → DPSFR3ZS.js} +1 -1
- package/build/dist/chunks/{2T6O77QZ.js → DV2HVFTM.js} +1 -1
- package/build/dist/chunks/{NMJVQX5M.js → DWRRIFXS.js} +1 -1
- package/build/dist/chunks/{3ZH5SOC2.js → EFOC337C.js} +1 -1
- package/build/dist/chunks/EHQRAA3R.js +1 -0
- package/build/dist/chunks/{WX7OYCNS.js → EJIP7RBG.js} +1 -1
- package/build/dist/chunks/EPOIAXCV.js +3 -0
- package/build/dist/chunks/EWZFZUVF.js +1 -0
- package/build/dist/chunks/{OB7BFDOV.js → EYE3ZAJB.js} +1 -1
- package/build/dist/chunks/{MQ5F2VOK.js → EZUQMTLE.js} +1 -1
- package/build/dist/chunks/F36IA5RI.js +1 -0
- package/build/dist/chunks/{DD47RZFU.js → F74ARK4H.js} +1 -1
- package/build/dist/chunks/{Q4HSQL65.js → FGGDAAHW.js} +1 -1
- package/build/dist/chunks/FMEO7RX7.js +1 -0
- package/build/dist/chunks/{V6EVQWAL.js → FN6XY6ET.js} +1 -1
- package/build/dist/chunks/G4IX4CYN.js +1 -0
- package/build/dist/chunks/G53U6Y4L.js +1 -0
- package/build/dist/chunks/{XHFAF5PZ.js → GBIL2I2K.js} +1 -1
- package/build/dist/chunks/{RKM62HC5.js → GCFHKJIO.js} +1 -1
- package/build/dist/chunks/{K7HTDKAT.js → GMMTHTCP.js} +1 -1
- package/build/dist/chunks/{O5QTITN6.js → GRHBE4MQ.js} +1 -1
- package/build/dist/chunks/GTJ6LBGB.js +1 -0
- package/build/dist/chunks/GV6Z3MET.js +1 -0
- package/build/dist/chunks/{GK3D7OKG.js → GVCNTGLC.js} +1 -1
- package/build/dist/chunks/GX2RCAHG.js +1 -0
- package/build/dist/chunks/{O3XWE4FO.js → H5KU4DUU.js} +1 -1
- package/build/dist/chunks/H7ZJ7LAB.js +1 -0
- package/build/dist/chunks/{DCGNVMKG.js → HC3QFA5I.js} +1 -1
- package/build/dist/chunks/{RK3PPFRX.js → HEQBTHFS.js} +1 -1
- package/build/dist/chunks/{C76D54YG.js → HGSFRN57.js} +1 -1
- package/build/dist/chunks/HJI7KO6F.js +1 -0
- package/build/dist/chunks/{L6CVMDWQ.js → HNBYPHTA.js} +1 -1
- package/build/dist/chunks/{MSRCJ2BS.js → HPBTSJW7.js} +1 -1
- package/build/dist/chunks/HPO673QQ.js +1 -0
- package/build/dist/chunks/{ZFRTBBIW.js → HRGLFGFL.js} +1 -1
- package/build/dist/chunks/{DGDMRATN.js → ICHT3H3W.js} +1 -1
- package/build/dist/chunks/IJVBCEA2.js +1 -0
- package/build/dist/chunks/{2TX7HP6M.js → IKVRFAUP.js} +1 -1
- package/build/dist/chunks/IM7ZF7XZ.js +1 -0
- package/build/dist/chunks/{I4473OC6.js → IMD33NQS.js} +1 -1
- package/build/dist/chunks/IR7KDBFU.js +1 -0
- package/build/dist/chunks/{X24YTJST.js → IY7FWTAL.js} +1 -1
- package/build/dist/chunks/IYOWMW5B.js +1 -0
- package/build/dist/chunks/J2J73XYU.js +1 -0
- package/build/dist/chunks/JCS24YBB.js +1 -0
- package/build/dist/chunks/JQVTHPUO.js +1 -0
- package/build/dist/chunks/{USZCTSPI.js → JTWJT2O3.js} +1 -1
- package/build/dist/chunks/{2YYKQGJZ.js → K4CYAWNL.js} +1 -1
- package/build/dist/chunks/{7VH6JQ2H.js → K5C6QBOO.js} +1 -1
- package/build/dist/chunks/K5OXLIPK.js +1 -0
- package/build/dist/chunks/{4PB6MSGZ.js → K6GECT3F.js} +1 -1
- package/build/dist/chunks/{HU2JXDLH.js → KB2JWQZ4.js} +1 -1
- package/build/dist/chunks/{EFESPGA2.js → KCZUJ57H.js} +1 -1
- package/build/dist/chunks/{YW4W3LPQ.js → KHLM6NIZ.js} +1 -1
- package/build/dist/chunks/{OIQTZOBN.js → KKGHXNM4.js} +1 -1
- package/build/dist/chunks/{SUNTJ6IU.js → KYANIEPX.js} +1 -1
- package/build/dist/chunks/{MOZBDCVV.js → L3IAEXQR.js} +1 -1
- package/build/dist/chunks/{ZZ6FZGHF.js → L4UFGM7M.js} +1 -1
- package/build/dist/chunks/{DMB64UIN.js → L76P6WIH.js} +1 -1
- package/build/dist/chunks/{QMNUB2GM.js → LBT6WR4U.js} +1 -1
- package/build/dist/chunks/LD3A2KLN.js +1 -0
- package/build/dist/chunks/{WRUTW6CG.js → LFSNAQ7V.js} +1 -1
- package/build/dist/chunks/{5ZVIAGLX.js → LKRAUTYI.js} +1 -1
- package/build/dist/chunks/{23HNDJ76.js → M2SWILNG.js} +1 -1
- package/build/dist/chunks/{IT2JLILU.js → MFKDNAHB.js} +1 -1
- package/build/dist/chunks/MFQTBUSD.js +1 -0
- package/build/dist/chunks/{V4UJMUIB.js → MLN5KTG7.js} +1 -1
- package/build/dist/chunks/{S4JUFCT4.js → MSQNOK3I.js} +1 -1
- package/build/dist/chunks/{FA3GBXQP.js → MXI7LX2F.js} +1 -1
- package/build/dist/chunks/N6YNJGEF.js +1 -0
- package/build/dist/chunks/{DXAPKN7H.js → NLC36QHL.js} +1 -1
- package/build/dist/chunks/NUTTPUYJ.js +1 -0
- package/build/dist/chunks/{O4S6XAYV.js → O7L55XM3.js} +1 -1
- package/build/dist/chunks/{NAO7VWZF.js → OCIEVYPR.js} +1 -1
- package/build/dist/chunks/{4NBXBKOX.js → OD7CY6BY.js} +1 -1
- package/build/dist/chunks/{RUTSEGGD.js → OHZHQSCA.js} +1 -1
- package/build/dist/chunks/{T3QEN3S6.js → OIGTTRN5.js} +1 -1
- package/build/dist/chunks/{5OTQCE2E.js → P6JE2NRA.js} +1 -1
- package/build/dist/chunks/PD5NXIRT.js +1 -0
- package/build/dist/chunks/{TXGZ6NWN.js → PG7HZIZL.js} +1 -1
- package/build/dist/chunks/{WXZ4LAKO.js → PXVF2SHU.js} +1 -1
- package/build/dist/chunks/{UBVE2U6X.js → Q43WPRYU.js} +1 -1
- package/build/dist/chunks/QA6Z2CYP.js +2 -0
- package/build/dist/chunks/QAAKUIWE.js +1 -0
- package/build/dist/chunks/{PQOWIRKQ.js → QAVP3CWL.js} +1 -1
- package/build/dist/chunks/{YXXK6EPI.js → QBHY2QRC.js} +1 -1
- package/build/dist/chunks/{ELHRXA5U.js → QFK335LC.js} +1 -1
- package/build/dist/chunks/{3PHJUFU2.js → QFUSCK5C.js} +1 -1
- package/build/dist/chunks/{IPU656WB.js → QKH7ED6B.js} +1 -1
- package/build/dist/chunks/{AHUCYDBC.js → QKIQ7ZKD.js} +1 -1
- package/build/dist/chunks/{XW3VGWXK.js → QMWHQRYC.js} +1 -1
- package/build/dist/chunks/{N6PHSHBE.js → QP2B7AYX.js} +1 -1
- package/build/dist/chunks/{VHK5AYC2.js → QZ6V6J6W.js} +1 -1
- package/build/dist/chunks/{MDLJFCT4.js → R5Z4HPCA.js} +1 -1
- package/build/dist/chunks/RKJFSDGV.js +1 -0
- package/build/dist/chunks/RKS3M7L5.js +1 -0
- package/build/dist/chunks/{GDOHHXNH.js → RLX6YTNT.js} +1 -1
- package/build/dist/chunks/RYEQIZ2H.js +1 -0
- package/build/dist/chunks/{USEF3QKG.js → S432S6NA.js} +1 -1
- package/build/dist/chunks/S47M3IPR.js +1 -0
- package/build/dist/chunks/S65KXMZ7.js +3 -0
- package/build/dist/chunks/{2OVJ2BTJ.js → SEXKWYUM.js} +1 -1
- package/build/dist/chunks/{2ILYVUFA.js → SRYX65GZ.js} +1 -1
- package/build/dist/chunks/{GNOHIL4Q.js → TMENUIBC.js} +1 -1
- package/build/dist/chunks/{BSX4LFYI.js → TNHU5UBQ.js} +1 -1
- package/build/dist/chunks/{PDPTJMTJ.js → TT2ST3Q3.js} +1 -1
- package/build/dist/chunks/TTBB6EFN.js +1 -0
- package/build/dist/chunks/{Z5YI6KLN.js → TWVDWNTG.js} +1 -1
- package/build/dist/chunks/TZG7HTVM.js +1 -0
- package/build/dist/chunks/{OVM4QIET.js → U4MSIH4G.js} +1 -1
- package/build/dist/chunks/UEOS6SHR.js +1 -0
- package/build/dist/chunks/{EIE2U4OX.js → UGFRBJDQ.js} +1 -1
- package/build/dist/chunks/{HUKDISRE.js → UIVOYAO2.js} +1 -1
- package/build/dist/chunks/{XRDLMTBJ.js → UMY6SP7C.js} +1 -1
- package/build/dist/chunks/UNBRUWSV.js +1 -0
- package/build/dist/chunks/{LGLWEGPY.js → UPX3OWKA.js} +1 -1
- package/build/dist/chunks/{MHONMLF6.js → URTQNYWU.js} +1 -1
- package/build/dist/chunks/{4RCYYN6O.js → V7HTGO23.js} +1 -1
- package/build/dist/chunks/{HZSYMGJ2.js → VS7ZA4OF.js} +1 -1
- package/build/dist/chunks/{BJ2U2VXJ.js → VTWAVH74.js} +1 -1
- package/build/dist/chunks/{5GQJVKVY.js → W5GWK72I.js} +1 -1
- package/build/dist/chunks/{65OITTDL.js → W73SLWBT.js} +1 -1
- package/build/dist/chunks/WRA3ZC6W.js +1 -0
- package/build/dist/chunks/{PRBIC3UK.js → WUONMIA2.js} +1 -1
- package/build/dist/chunks/{XL3W7DAQ.js → X3BB6WME.js} +1 -1
- package/build/dist/chunks/{K3TZYPSV.js → X53QVHBC.js} +1 -1
- package/build/dist/chunks/{LVFI74ST.js → XNJ6NDQQ.js} +1 -1
- package/build/dist/chunks/{GBPB7JIB.js → XSQJOOEY.js} +1 -1
- package/build/dist/chunks/XUDQYSPU.js +1 -0
- package/build/dist/chunks/{VKNKVUAA.js → XWZ5SL5Q.js} +1 -1
- package/build/dist/chunks/{365B4YEV.js → XXLQDQEX.js} +1 -1
- package/build/dist/chunks/{BDLV42SD.js → Y5T36EEU.js} +1 -1
- package/build/dist/chunks/{R73R4KN3.js → YBLJ2MCR.js} +1 -1
- package/build/dist/chunks/{WNWRF4HE.js → YZHJ4BAP.js} +1 -1
- package/build/dist/chunks/ZSGW2ZSO.js +1 -0
- package/build/dist/chunks/{HRAHGYNK.js → ZTNBX4VH.js} +1 -1
- package/package.json +1 -1
- package/build/dist/chunks/2QP6WGKZ.js +0 -1
- package/build/dist/chunks/3AOTYJPX.js +0 -1
- package/build/dist/chunks/4E7FJQLL.js +0 -1
- package/build/dist/chunks/4J245N3F.js +0 -1
- package/build/dist/chunks/4M6XBG6X.js +0 -1
- package/build/dist/chunks/BA66J5YQ.js +0 -1
- package/build/dist/chunks/BIY2F6MO.js +0 -1
- package/build/dist/chunks/CZ66MYKR.js +0 -1
- package/build/dist/chunks/DFM4T6ZE.js +0 -1
- package/build/dist/chunks/DGCJZ3HO.js +0 -1
- package/build/dist/chunks/DHX3Q5RV.js +0 -2
- package/build/dist/chunks/DWQJ7NSX.js +0 -1
- package/build/dist/chunks/EFUACKDK.js +0 -1
- package/build/dist/chunks/EQEMI54U.js +0 -1
- package/build/dist/chunks/GYPMUYB5.js +0 -1
- package/build/dist/chunks/JFC2QCMW.js +0 -1
- package/build/dist/chunks/JW7GLNLB.js +0 -3
- package/build/dist/chunks/MEB727X5.js +0 -1
- package/build/dist/chunks/MIKQWF6Q.js +0 -3
- package/build/dist/chunks/MQK6OP7S.js +0 -1
- package/build/dist/chunks/OSMOBKRQ.js +0 -1
- package/build/dist/chunks/P6MPKIU2.js +0 -1
- package/build/dist/chunks/P7C3TYI4.js +0 -1
- package/build/dist/chunks/RN3WUJIO.js +0 -1
- package/build/dist/chunks/TI727O2H.js +0 -1
- package/build/dist/chunks/UHIJMDD2.js +0 -1
- package/build/dist/chunks/VQJXQLFW.js +0 -1
- package/build/dist/chunks/W32UECOL.js +0 -1
- package/build/dist/chunks/WWNAGOCD.js +0 -1
- package/build/dist/chunks/ZNX3YVF2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as se,t as W,y as G}from"./4E7FJQLL.js";import{d as ke}from"./OSMOBKRQ.js";import{a as de,b as oe,c as pe,e as ne,f as ye,g as fe,h as K,i as b,j as g,l as _,m as U,o as N,p as B,q,s as V,u as $,v as D}from"./XRDLMTBJ.js";import{b as X,g as O,h as E,i as ue,j as me}from"./MQK6OP7S.js";import{a as j}from"./G2LAO23N.js";import{c as ee}from"./NWNYJ26T.js";import{a as i}from"./XSD5NL7J.js";import{encodeAbiParameters as Oe,getAddress as we,keccak256 as Ke,parseAbi as je,toHex as ce,zeroAddress as ze}from"viem";import{encodeAbiParameters as he,encodePacked as Ce,getAddress as Fe,keccak256 as re,parseAbi as Le,toHex as Re,zeroAddress as be}from"viem";var ve=1n<<256n,Ne=1n<<128n,Te=Le(["function extsload(bytes32[] slots) view returns (bytes32[])"]),Q=(o,n,e)=>({type:"object",additionalProperties:!1,properties:o,required:n,...e===void 0?{}:{description:e}}),Ue={description:"Hookr LP position, chosen by kind: a launcher family member, a position NFT, or an agent-account position.",oneOf:[Q({kind:{const:"family",description:j.enumValues({family:"one member position of a Hookr launcher family"})},launcher:{...ee,description:"Address of the Hookr launcher contract that created the family."},familyId:{...oe,description:"Bytes32 hex id of the launcher family (0x plus 64 hex digits)."},member:{type:"string",enum:["0","1","2","3","4","5","6","7"],description:'Member index within the family, a decimal string from "0" to "7".'}},["kind","launcher","familyId","member"],"Hookr family LP position: one member of a launcher family, identified by launcher, familyId and member."),Q({kind:{const:"nft",description:j.enumValues({nft:"a position held as an NFT"})},tokenId:{...de,description:j.id("position NFT")}},["kind","tokenId"]),Q({kind:{const:"agent-account",description:j.enumValues({"agent-account":"a position held by an agent account"})},account:{...ee,description:j.address("agent account that holds the position")},positionId:{...oe,description:"Bytes32 hex id of the position within the agent account (0x plus 64 hex digits)."}},["kind","account","positionId"])]};function qe(o){let n=U(o);if(n.kind!=="family")throw new i("This step supports Launcher family positions only. NFT and agent-account position reads are reserved for a later integration.");ne(n,["kind","launcher","familyId","member"],["kind","launcher","familyId","member"]);let e=ye(n.member,8);if(e>7n)throw new i("Hookr family member must be a decimal string from 0 to 7.");return{kind:"family",launcher:me(n.launcher),familyId:K(n.familyId),member:e.toString()}}var A=o=>Re(BigInt.asUintN(256,o),{size:32}),te=(o,n)=>re(he([{type:"bytes32"},{type:"bytes32"}],[o,n]));function ie(o,n,e,a,r,H){let h=te(o,A(6n)),P=m=>te(A(BigInt(m)),A(BigInt(h)+4n)),p=re(he([{type:"bytes32"},{type:"uint8"}],[e,a])),c=re(Ce(["address","int24","int24","bytes32"],[n,r,H,p])),u=te(c,A(BigInt(h)+6n));return[h,A(BigInt(h)+1n),A(BigInt(h)+2n),A(BigInt(P(r))+1n),A(BigInt(P(r))+2n),A(BigInt(P(H))+1n),A(BigInt(P(H))+2n),u,A(BigInt(u)+1n),A(BigInt(u)+2n)]}function J(o,n,e,a,r,H){return BigInt.asUintN(256,a<r?n-e:a>=H?e-n:o-n-e)}function Y(o,n,e){if(o<0n||o>=1n<<128n||[n,e].some(a=>a<0n||a>=ve))throw new i("Hookr fee inputs are outside the verified v4 layout.");return o*BigInt.asUintN(256,n-e)/Ne}function ae(o){let n=U(o),e={currency0:b(n.currency0),currency1:b(n.currency1),fee:Number(g(n.fee,24)),tickSpacing:Number(g(n.tickSpacing,24)),hooks:b(n.hooks)};if(BigInt(e.currency0)>=BigInt(e.currency1)||e.fee!==8388608||e.hooks!==q||e.tickSpacing<1||e.tickSpacing>32767)throw new i("Hookr family PoolKey is not a supported Root dynamic-fee pool.");return e}async function Ve(o,n,e,a){let r=await E(o,a),H={},h=new Set,P=(t,k=[])=>B(o,e.launcher,N(e.launcher===Fe(X.launcherV1)?"launcherV1":"launcher"),t,k,r.number),p=async(t,k)=>{try{return await k()}catch(x){return H[t]=x instanceof i?x.message:`Hookr ${t} read failed at block ${r.number}. Retry the named-block read; no zero or empty result is implied.`,null}},c={chainId:4663,blockNumber:r.number.toString(),blockHash:r.hash,position:e,owner:null,ownedByWallet:null,poolId:null,poolKey:null,range:null,liquidity:null,tokens:null,principal:null,uncollectedLpFees:null,collectedLpFees:null,claimableCoreCredits:null,poolPendingRecapture:null,inRange:null,gateStatus:null,locks:null},u=async()=>(await ue(o,r),{...c,readStatus:{status:Object.keys(H).length?"partial":"complete",reasons:H},warnings:["collectedLpFees is null: no complete collection-history reconstruction is available in this step.","LP fees can include donations already released into v4 fee growth. Pending recapture is pool-level, unallocated and excluded from LP fees.","Principal is current withdrawable token inventory before fees, gas or price changes; it is not the original deposit value."]});if(await p("pins",async()=>(await O(o,r.number,[e.launcher,q,V],h),!0))===null)return u();let m=await p("owner",async()=>{let t=b(await P("familyOwner",[e.familyId]));if(t===be)throw new i("Hookr family does not exist at this block. Check its Launcher and family ID.");return t});if(m===null)return u();c.owner=m,c.ownedByWallet=m===n;let R=await p("position",async()=>{let[t,k,x]=await Promise.all([P("memberCount",[e.familyId]),P("position",[e.familyId,Number(e.member)]),P("poolManager")]);if(x!==V||g(t,8)>8n||BigInt(e.member)>=g(t,8))throw new i("Hookr family member or PoolManager is invalid.");let w=U(k),d=ae(w.key);if(typeof w.tickLower!="number"||typeof w.tickUpper!="number")throw new i("Hookr position range is incomplete.");G(w.tickLower,w.tickUpper,d.tickSpacing);let s=g(w.liquidity,128),L=W(d);if(await P("poolFamily",[L])!==e.familyId)throw new i("Hookr pool does not belong to this family.");return{key:d,id:L,tickLower:w.tickLower,tickUpper:w.tickUpper,liquidity:s}});if(R===null)return u();let{key:l,id:y,tickLower:C,tickUpper:I,liquidity:v}=R;c.poolKey=l,c.poolId=y,c.range={tickLower:C,tickUpper:I},c.liquidity=v.toString();let[f,T,F]=await Promise.all([p("tokens",()=>Promise.all([D(o,l.currency0,r.number),D(o,l.currency1,r.number)])),p("feeGrowth",async()=>{let t=ie(y,e.launcher,e.familyId,Number(e.member),C,I),k=await B(o,V,Te,"extsload",[t],r.number),x=_(k,10).map(Ae=>BigInt(K(Ae))),[w,d,s,L,Z,S,z,Ie,xe,He]=x,le=w&(1n<<160n)-1n,M=Number(BigInt.asIntN(24,w>>160n));if(le===0n||M<-887272||M>887272||Ie!==v)throw new i("Hookr PoolManager position is uninitialized or differs from the Launcher liquidity. No principal or fee amount is inferred.");let Se=J(d,L,S,M,C,I),Be=J(s,Z,z,M,C,I);return{sqrtPriceX96:le,tick:M,fee0:Y(v,Se,xe),fee1:Y(v,Be,He)}}),p("poolConfig",async()=>{let t=U(await B(o,q,N("rootV1"),"poolConfig",[y],r.number));if(b(t.liquidityOwner)!==e.launcher||![l.currency0,l.currency1].includes(b(t.subject))||![l.currency0,l.currency1].includes(b(t.quote))||t.subject===t.quote)throw new i("Hookr pool configuration differs from this family position.");let k=b(t.rules),x=$(k);return await O(o,r.number,[k],h),{pc:t,core:k,role:x}})]);if(c.tokens=f,T&&(c.inRange=T.tick>=C&&T.tick<I,f)){let t=se({liquidity:v,tickLower:C,tickUpper:I,sqrtPriceX96:T.sqrtPriceX96});c.principal=[{token:f[0],amount:t.amount0.toString()},{token:f[1],amount:t.amount1.toString()}],c.uncollectedLpFees=[{token:f[0],amount:T.fee0.toString()},{token:f[1],amount:T.fee1.toString()}]}if(F){let t=(s,L=[])=>B(o,F.core,N("rulesV1"),s,L,r.number),[k,x,w,d]=await Promise.all([p("gateStatus",async()=>{let s=b(F.pc.advisory);return s!==be&&await O(o,r.number,[s],h),ke(o,r.number,y,e.launcher,s)}),p("locks",async()=>ge(o,{position:e,block:r,poolId:y,core:F.core,role:F.role})),p("claimableCoreCredits",async()=>{if(!f)throw new i("Read token metadata before displaying core credits.");let s=await t("poolAccruedCurrencies",[y]);if(!Array.isArray(s)||s.length>32||s.some(S=>S!==l.currency0&&S!==l.currency1))throw new i("Core accrual includes unmeasured currencies; read the core directly before collecting.");let[L,Z]=await Promise.all([Promise.all([l.currency0,l.currency1].map(S=>t("poolAccrued",[y,S]))),Promise.all([l.currency0,l.currency1].map(S=>B(o,F.core,N(F.role),"claimable",[S,n],r.number)))]);return{core:F.core,familyOwnerAccrual:L.map((S,z)=>({token:f[z],amount:g(S).toString()})),walletCredits:Z.map((S,z)=>({token:f[z],amount:g(S).toString()})),walletCreditsScope:"Core-wide wallet credits, not attributed to this position. Do not add them to LP fees."}}),p("poolPendingRecapture",async()=>{if(!f)throw new i("Read token metadata before displaying pending recapture.");let s=_(await t("pendingDonation",[y]),5).map(L=>g(L));return{due:[{token:f[0],amount:s[0].toString()},{token:f[1],amount:s[1].toString()}],fresh:[{token:f[0],amount:s[2].toString()},{token:f[1],amount:s[3].toString()}],freshChildBlock:s[4].toString(),scope:"pool",allocatedToPosition:!1}})]);c.gateStatus=k,c.locks=x,c.claimableCoreCredits=w,c.poolPendingRecapture=d}return u()}function Ze(o){return[{name:"hookr_lp_position",inputSchema:Q({position:Ue,...pe},["position"]),execute:async(n,e)=>{ne(n,["position","blockNumber"],["position"]);let a=qe(n.position);if(o.network==="testnet")throw new i("Hookr LP reads are configured only on mainnet, chain 4663.");try{return await Ve(o.clientFor(4663),e,a,fe(n))}catch(r){throw r instanceof i?r:new i("Hookr position block is unavailable. Retry the complete named-block read; no zero position or fee is implied.")}}}]}var Pe=o=>N(o.launcher===we(X.launcherV1)?"launcherV1":"launcher");function Me(o){let n=Ke(Oe([{type:"bytes32"},{type:"bytes32"}],[o,"0x3c0d3d8cba92527b3a48aa783c8734a4e170057eb16401c9df8a7c8a6588b900"]));return ce(BigInt(n)+5n,{size:32})}async function _e(o,n){try{let e="0x0000000000000000000000000000000000000a11",a=await o.request({method:"eth_call",params:[{to:e,data:"0x"},ce(n.number),{[e]:{code:"0x4360005260206000f3"}}]});return BigInt(K(a))}catch{throw new i("Hookr parent-block clock is unavailable. Retry with an RPC supporting named-block eth_call state overrides; child-chain height cannot establish lock expiry.")}}async function co(o,n,e){let a=await E(o);await O(o,a.number,[e.launcher,q,V]);let r=(d,s=[])=>B(o,e.launcher,Pe(e),d,s,a.number),[H,h,P,p]=await Promise.all([r("familyOwner",[e.familyId]),r("memberCount",[e.familyId]),r("position",[e.familyId,Number(e.member)]),r("poolManager")]),c=b(H);if(c===ze||c!==n)throw new i("Only the current Hookr family owner can add, collect or remove this position. Use its signing wallet.");if(p!==V||g(h,8)<1n||g(h,8)>8n||BigInt(e.member)>=g(h,8))throw new i("Hookr family member or PoolManager differs from the reviewed deployment.");let u=U(P),m=ae(u.key),R=g(u.liquidity,128);if(typeof u.tickLower!="number"||typeof u.tickUpper!="number")throw new i("Hookr family range is unavailable.");let l=u.tickLower,y=u.tickUpper;G(l,y,m.tickSpacing);let C=W(m);if(await r("poolFamily",[C])!==e.familyId)throw new i("Hookr pool does not belong to this Launcher family.");let I=U(await B(o,q,N("rootV1"),"poolConfig",[C],a.number)),v=b(I.rules),f=$(v);if(b(I.liquidityOwner)!==e.launcher||![m.currency0,m.currency1].includes(b(I.subject))||![m.currency0,m.currency1].includes(b(I.quote))||I.subject===I.quote)throw new i("Hookr pool configuration differs from this family key.");await O(o,a.number,[v]);let[T,F]=await Promise.all([Promise.all([m.currency0,m.currency1].map(d=>D(o,d,a.number))),B(o,V,je(["function extsload(bytes32[] slots) view returns (bytes32[])"]),"extsload",[ie(C,e.launcher,e.familyId,Number(e.member),l,y)],a.number)]),t=_(F,10).map(d=>BigInt(K(d))),k=t[0]&(1n<<160n)-1n,x=Number(BigInt.asIntN(24,t[0]>>160n));if(!k||x<-887272||x>887272||t[7]!==R)throw new i("Hookr PoolManager state differs from the family position. Retry the full read.");let w=[0,1].map(d=>Y(R,J(t[1+d],t[3+d],t[5+d],x,l,y),t[8+d]));return{position:e,block:a,owner:c,key:m,poolId:C,liquidity:R,tickLower:l,tickUpper:y,sqrtPriceX96:k,fees:w,tokens:T,pc:I,core:v,role:f}}async function ge(o,n){let{position:e,block:a,poolId:r,core:H,role:h}=n,[P,p,c,u]=await Promise.all([B(o,e.launcher,Pe(e),"principalLockedUntil",[e.familyId],a.number),B(o,H,N(h),"removalLockedUntil",[r],a.number),o.getStorageAt({address:q,slot:Me(r),blockNumber:a.number}),_e(o,a)]),m=BigInt(K(c));if(we(ce(m&(1n<<160n)-1n,{size:20}))!==e.launcher)throw new i("Hookr frozen Root lock storage does not match the family owner contract.");let R=m>>160n&(1n<<40n)-1n,l=g(P),y=g(p);return{clock:"parent-block",parentBlock:u.toString(),familyUntilParentBlock:l.toString(),poolRulesUntilParentBlock:y.toString(),rootUntilParentBlock:R.toString(),currentlyLocked:u<l||u<y||u<R,feesCollectableDuringPrincipalLocks:!0}}export{Pe as a,Me as b,_e as c,co as d,ge as e,Ue as f,qe as g,ie as h,J as i,Y as j,ae as k,Ve as l,Ze as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as N}from"./CQ5WRWV4.js";import{a as O,b as R,c as Z,d as ue}from"./IV4K7FMD.js";import{a as Ae,e as ge}from"./GK3D7OKG.js";import{d as he}from"./OIQTZOBN.js";import{b as x}from"./Z7FGEWO2.js";import{a as de,b as ce,d as le,f as V,g as J,h as M,j as me,k as pe,l as fe,m as we}from"./BSX4LFYI.js";import{a as f,b as X,c as ie}from"./43LI5NKJ.js";import{c as Y}from"./5TUXSOMI.js";import{g as G}from"./NWNYJ26T.js";import{b as r,e as ae}from"./IX3GZMTM.js";import{A as se,b as F,j as W,x as j,y as Q}from"./TI727O2H.js";import{a as o}from"./XSD5NL7J.js";import{decodeFunctionData as C,encodeFunctionData as U,parseAbi as Oe}from"viem";var Be=60,te=50,tt=200;var De="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",ne="0x0000000000000000000000000000000000000000",D=W[4663].routes.kyberswap.address,y=W[4663].routes.velora.address,oe=j[4663].kyberswap.toLowerCase(),Se=j[4663].velora.toLowerCase(),Te="0x0000000000000000000000000000000000000000000000000000000000000000",Re=[le.pons,...V],$=Oe(["function swap((address callTarget, address approveTarget, bytes targetData, (address srcToken, address dstToken, address[] srcReceivers, uint256[] srcAmounts, address[] feeReceivers, uint256[] feeAmounts, address dstReceiver, uint256 amount, uint256 minReturnAmount, uint256 flags, bytes permit) desc, bytes clientData) execution) payable returns (uint256 returnAmount, uint256 gasUsed)"]),H=Oe(["function swapExactAmountIn(address executor, (address srcToken, address destToken, uint256 fromAmount, uint256 toAmount, uint256 quotedAmount, bytes32 metadata, address beneficiary) swapData, uint256 partnerAndFee, bytes permit, bytes executorData) payable returns (uint256 receivedAmount, uint256 submittedAmount, uint256 augustusFeeAmount)"]),E=class extends o{name="NoRouteError";constructor(t="No swap route is available for this token pair and amount."){super(t)}},L=class extends o{name="ExpiredQuoteError";constructor(t="Quote has expired. Request a fresh quote."){super(t)}},Ce=1e3,I=new Map;function be(e){for(let[t,n]of I)BigInt(e)>=r(n.expiresAt)&&I.delete(t)}function ee(e){return{...e,...e.sourcePoolRoute!==void 0?{sourcePoolRoute:structuredClone(e.sourcePoolRoute)}:{},...e.txs?{txs:e.txs.map(t=>({...t}))}:{}}}function ve(e){let t=ee(e);return t.txs&&(t.txs.forEach(Object.freeze),Object.freeze(t.txs)),Object.freeze(t)}var ye=["router","from","to","wallet","amountIn","amountOut","minAmountOut","expiresAt","chainId","spender","value","ponsCurveToken","ponsPoolToken","blockNumber","calldataMinAmountOut","expectedSpend","expectedRefund","oakFee","oakFeeBps","oakFeeToken","grossAmountOut","venueFee","venueFeeBps"];function K(e,t,n=!1){for(let s of ye)if(!(s==="expiresAt"&&n&&r(e.expiresAt)<=r(t.expiresAt))&&e[s]!==void 0&&String(e[s]).toLowerCase()!==String(t[s]).toLowerCase())throw new o(`Quote ${s} does not match the accepted quote.`)}function z(e=Date.now){let t=e();if(!Number.isFinite(t)||t<0)throw new o("Clock must return a non-negative timestamp.");return t>1e11?Math.floor(t/1e3):Math.floor(t)}function _(e){let t=e.toLowerCase();return t===De.toLowerCase()||t===ne.toLowerCase()}function Le(e,t=te){if(!Number.isInteger(t)||t<0||t>=1e4)throw new o("Slippage must be an integer from 0 to 9999 bps.");return ae(e,String(1e4-t),"10000","floor")}var _e=200;function nt(e){if(typeof e!="number"||!Number.isFinite(e)||!/^\d+(?:\.\d{1,2})?$/.test(String(e)))throw new o("Velora returned an unsupported venue fee. Request a fresh quote.");let[t,n=""]=String(e).split("."),s=Number(t)*100+Number(n.padEnd(2,"0"));return re(s),s}function re(e){if(!Number.isInteger(e)||e<0||e>_e)throw new o("Velora returned an unsupported venue fee. Request a fresh quote.")}function ke(e,t=O.bps){return re(t),r(e)*10000n/BigInt(1e4-t)+1n}function Pe(e,t){if(re(t),t!==O.bps||e!==Z)throw new o("Velora partnerAndFee must match the pinned Oak fee, recipient and flags.")}function Ie(e){if(e.oakFeeBps===O.bps)return`${ue()} ${e.provider==="velora"?"Oak\u2019s share is paid to the Oak treasury.":"Paid to the Oak treasury."} Venue fee: ${e.venueFee} base units (${e.venueFeeBps} bps) retained by ${e.provider??"venue"}. Output and minimum are net.${e.provider==="velora"?" Velora retains 15% of the partner fee; Oak receives 85% (about 21.25 bps).":""}`;if(e.oakFee!==void 0&&r(e.oakFee)!==0n)throw new o("Oak fee requires the pinned rate and token; venue fees must never be counted as Oak income.");let t=e.provider??"venue";return`Venue fee: ${e.venueFee} base units (${e.venueFeeBps} bps) retained by ${t}; Oak swap fee: 0 (venue fee is never Oak income).`}function Qe(e){f(e.from),f(e.to),f(e.wallet);let t=e.callTarget??Q[F].kyberswap.address,n=e.approveTarget??ne;f(t),f(n);let s=r(e.amountIn),a=r(e.minAmountOut);return U({abi:$,functionName:"swap",args:[{callTarget:t,approveTarget:n,targetData:e.targetData??"0x",desc:{srcToken:e.from,dstToken:e.to,srcReceivers:_(e.from)?[]:[t],srcAmounts:_(e.from)?[]:[s-BigInt(R(e.amountIn))],feeReceivers:[O.recipient],feeAmounts:[BigInt(O.bps)],dstReceiver:e.wallet,amount:s,minReturnAmount:a,flags:640n,permit:"0x"},clientData:e.clientData??"0x"}]})}function Ne(e){f(e.from),f(e.to),f(e.wallet);let t=e.executor??Q[F].velora.address;return f(t),U({abi:H,functionName:"swapExactAmountIn",args:[t,{srcToken:e.from,destToken:e.to,fromAmount:r(e.amountIn),toAmount:r(e.minAmountOut),quotedAmount:r(e.amountOut),metadata:e.metadata??Te,beneficiary:e.wallet},e.partnerAndFee??Z,"0x",e.executorData??"0x"]})}function Ve(e){if(typeof e!="string"||!/^0x([0-9a-fA-F]{2})+$/.test(e)||e.length<10)throw new o("Swap calldata must contain a 4-byte function selector.");let t=e.slice(0,10).toLowerCase();if(t===oe)return C({abi:$,data:e}).args[0].desc.minReturnAmount;if(t===Se)return C({abi:H,data:e}).args[1].toAmount;if(t==="0x3593564c")return M(e,Re).amountOutMinimum;let n=C({abi:Ae,data:e});if(n.functionName==="buy"||n.functionName==="sell")return n.args[1];throw new o(`Unsupported swap router selector ${t}.`)}function Fe(e,t,n=!1){let s=r(t),a=Ve(e);if(a<=0n||s<=0n||a!==s&&!(n&&(a>s||e.slice(0,10).toLowerCase()===oe&&a+1n===s)))throw new o(`Built swap calldata minimum output (${a}) does not match the accepted quote minimum (${s}).`);return a}function xe(e,t){let{from:n,to:s,wallet:a,amountIn:d}=t;if(!n||!s||!a||d===void 0)throw new o("Accepted quote must include input, output, amount and wallet.");for(let u of[n,s,a,t.router,e.to])f(u);let m=(u,l,w)=>{if(u.toLowerCase()!==l.toLowerCase())throw new o(`Built swap ${w} does not match the accepted quote.`)};if(m(e.to,t.router,"router"),e.chainId!==(t.chainId??F))throw new o("Built swap chain does not match the accepted quote.");let A=_(n)?r(d):0n;if(r(e.value)!==A||t.value!==void 0&&r(t.value)!==A)throw new o("Built swap value does not match the accepted quote input.");let g=e.data.slice(0,10).toLowerCase(),i=t.router.toLowerCase();if(i===D.toLowerCase()||i===y.toLowerCase()){let u=i===D.toLowerCase(),l=u?d:t.grossAmountOut,w=u?n:s;if(t.oakFeeBps!==O.bps||l===void 0||t.oakFee!==R(l)||t.oakFeeToken?.toLowerCase()!==x(w).toLowerCase())throw new o("Oak fee must match the pinned rate, token and amount.")}let c;if(i===D.toLowerCase()&&g===oe){m(t.spender??t.router,D,"spender");let u=C({abi:$,data:e.data});if(U({abi:$,...u}).toLowerCase()!==e.data.toLowerCase())throw new o("KyberSwap calldata must be canonically decodable.");let{callTarget:l,approveTarget:w,desc:p}=u.args[0];m(l,Q[F].kyberswap.address,"executor"),m(w,ne,"executor approval target");let S=_(n);if(p.srcReceivers.length!==p.srcAmounts.length||(S?p.srcReceivers.length!==0:p.srcReceivers.length===0||p.srcAmounts.some(h=>h<=0n)||p.srcAmounts.reduce((h,b)=>h+b,0n)!==r(d)-BigInt(R(d))))throw new o("KyberSwap source transfers must send the exact input less the pinned fee to the pinned executor or verified input pool.");for(let h of p.srcReceivers)if(h.toLowerCase()!==l.toLowerCase()&&!he(n,h,e.data))throw new o(`KyberSwap source transfers: receiver ${h} is not a verified input pool or the pinned executor.`);if(p.feeReceivers.length!==1||p.feeAmounts.length!==1||p.feeReceivers[0].toLowerCase()!==O.recipient.toLowerCase()||p.feeAmounts[0]!==BigInt(O.bps)||p.flags!==640n||p.permit!=="0x")throw new o("KyberSwap fee recipients, fee amounts, flags and permit must match the pinned Oak input-fee policy.");c={from:p.srcToken,to:p.dstToken,wallet:p.dstReceiver,amount:p.amount}}else if(i===y.toLowerCase()&&g===Se){m(t.spender??t.router,y,"spender");let u=C({abi:H,data:e.data});if(U({abi:H,...u}).toLowerCase()!==e.data.toLowerCase())throw new o("Velora calldata must be canonically decodable.");let[l,w,p,S]=u.args;if(!se.some(h=>h.toLowerCase()===l.toLowerCase()))throw new o("Built swap executor does not match the accepted quote.");if(S!=="0x")throw new o("Velora permit must match the pinned empty-permit policy.");if(Pe(p,t.oakFeeBps??O.bps),t.calldataMinAmountOut!==void 0&&r(t.calldataMinAmountOut)!==ke(t.minAmountOut,O.bps))throw new o("Velora calldata minimum must cover the accepted net output, venue fee and router dust.");if(t.calldataMinAmountOut!==void 0&&(w.quotedAmount!==r(t.grossAmountOut??"0")||w.quotedAmount<r(t.calldataMinAmountOut)))throw new o("Velora quoted gross output must match the accepted quote and cover its calldata minimum.");if(p!==0n&&t.calldataMinAmountOut===void 0)throw new o("Velora venue fee requires a fee-adjusted calldata minimum.");c={from:w.srcToken,to:w.destToken,wallet:w.beneficiary,amount:w.fromAmount}}else if(t.provider==="pons"&&(t.ponsPoolToken||t.ponsCurveToken))c=ge(e,{...t,from:n,to:s,wallet:a});else if(t.provider==="fobo")c=Ue(e,{...t,from:n,to:s,wallet:a});else throw new o("Built swap selector does not match the accepted router.");if(m(c.from,n,"input token"),m(c.to,s,"output token"),m(c.wallet,a,"recipient"),c.amount!==r(d))throw new o("Built swap input amount does not match the accepted quote.");Fe(e.data,t.calldataMinAmountOut??t.minAmountOut,i===D.toLowerCase())}var Me="FOBO route: the quoted output is already net of FOBO's pool taxes (2.5% per pool after a coin's first minute, higher during it). Oak swap fee: 0 on FOBO's route.";function Ue(e,t){let n=(d,m,A)=>{if(!G(d,m))throw new o(`Built swap ${A} does not match the accepted quote.`)};if(n(t.router,de,"FOBO router"),n(t.spender??t.router,ce,"FOBO spender"),t.oakFeeBps!==void 0||t.oakFee!==void 0&&r(t.oakFee)!==0n)throw new o("FOBO route trades carry no Oak fee.");let s=M(e.data,V);we(s),n(s.currencyIn,J(t.from),"input token"),n(s.currencyOut,J(t.to),"output token");let a=r(t.expiresAt);if(s.deadline>a+BigInt(pe))throw new o("FOBO swap deadline is more than 20 minutes past the accepted quote. Request a fresh quote.");if(s.permit&&(s.permit.amount!==s.amountIn||BigInt(s.permit.expiration)>s.permit.sigDeadline||s.permit.sigDeadline>a+BigInt(fe)))throw new o("FOBO permit must be for the exact swap input, expire no later than its signature deadline, and end within 30 minutes of the quote.");if(t.data!==void 0&&!G(t.data,e.data)&&!me(M(t.data,V).legs,s.legs))throw new o("Built swap FOBO pools or direction differ from the accepted quote.");return{from:t.from,to:t.to,wallet:t.wallet,amount:s.amountIn}}function q(e,t={}){if(!e||typeof e.quoteId!="string"||!e.quoteId.trim())throw new o("Quote must include a non-empty quoteId.");if(f(e.router),e.oakFeeBps!==void 0){let v=t.provider??e.provider,k=v==="kyberswap"?t.amountIn??e.amountIn:e.grossAmountOut,P=v==="kyberswap"?t.from??e.from:t.to??e.to;if(!["kyberswap","velora"].includes(v??"")||e.oakFeeBps!==O.bps||k===void 0||e.oakFee!==R(k)||!P||e.oakFeeToken?.toLowerCase()!==x(P).toLowerCase())throw new o("Oak fee must match the pinned rate, token and amount.")}else if(e.oakFee!==void 0&&r(e.oakFee)!==0n)throw new o("Oak fee requires the pinned rate and token; venue fees must never be counted as Oak income.");let n=r(e.amountOut),s=e.destAmountAfterFee??e.netAmountOut,a,d,m;if(s!==void 0){if(d=r(s),a=e.grossAmountOut!==void 0?r(e.grossAmountOut):n>=d?n:d,a<d)throw new o("Gross output cannot be less than net output.");m=e.venueFee!==void 0?r(e.venueFee):a-d}else if(e.grossAmountOut!==void 0){if(a=r(e.grossAmountOut),d=n,a<d)throw new o("Gross output cannot be less than net output.");m=e.venueFee!==void 0?r(e.venueFee):a-d}else e.venueFee!==void 0?(m=r(e.venueFee),d=n,a=d+m):(d=n,a=n,m=0n);if(d<=0n)throw new E("Quote output amount must be positive.");let A=t.slippageBps??e.slippageBps??te,g=e.minAmountOut!==void 0?r(e.minAmountOut):r(Le(d.toString(),A));if(g<=0n||g>a)throw new o("Quote minAmountOut must be positive and not exceed gross output.");if((t.provider??e.provider)==="velora"&&e.calldataMinAmountOut!==void 0){if(r(e.calldataMinAmountOut)!==ke(g.toString(),O.bps)||r(e.calldataMinAmountOut)>a)throw new o("Velora calldata minimum must cover the accepted net output, venue fee and router dust.")}else if(e.calldataMinAmountOut!==void 0||e.ponsCurveToken!==void 0){if((t.provider??e.provider)!=="pons"||!e.ponsCurveToken)throw new o("Curve minimum requires a Pons curve quote.");f(e.ponsCurveToken);let v=r(t.amountIn??e.amountIn??"0"),k=r(e.expectedSpend??"0"),P=r(e.expectedRefund??"0"),Ee=r(e.calldataMinAmountOut??"0");if(v<=0n||k<=0n||k+P!==v||Ee*k/v!==g)throw new o("Pons actual minimum and refund do not match the encoded minimum.")}let i=z(t.now),c=BigInt(i+Be),u=e.expiresAt!==void 0?r(e.expiresAt):c,l=(u>c?c:u).toString(),w=m.toString(),p=e.venueFeeBps??(a>0n&&m>0n?Number((m*10000n+a/2n)/a):0),S=t.provider??e.provider??(e.router.toLowerCase()===y.toLowerCase()?"velora":"kyberswap"),h=S==="fobo"?Me:S==="pons"&&e.feeDisclosure?e.feeDisclosure:Ie({provider:S,venueFee:w,venueFeeBps:p,oakFee:e.oakFee??"0",oakFeeBps:e.oakFeeBps}),b={...e,quoteId:e.quoteId,amountOut:d.toString(),minAmountOut:g.toString(),router:e.router,expiresAt:l,provider:S,grossAmountOut:a.toString(),destAmountAfterFee:d.toString(),netAmountOut:d.toString(),venueFee:w,venueFeeBps:p,oakFee:e.oakFee??"0",feeDisclosure:h,...t.from??e.from?{from:x(t.from??e.from)}:{},...t.to??e.to?{to:x(t.to??e.to)}:{},...t.amountIn??e.amountIn?{amountIn:t.amountIn??e.amountIn}:{},...t.wallet??e.wallet?{wallet:t.wallet??e.wallet}:{},slippageBps:A,chainId:t.chainId??e.chainId??F,spender:e.spender??e.router,...t.allowance??e.allowance?{allowance:t.allowance??e.allowance}:{}};if(BigInt(i)>=r(l))throw new L;if(t.cache===!1)return b;if(be(i),BigInt(i)>=r(l))throw new L;let T=I.get(b.quoteId);if(T){K(b,T,!0);let v=ve({...T,expiresAt:b.expiresAt});return I.set(v.quoteId,v),ee(v)}for(;I.size>=Ce;)I.delete(I.keys().next().value);let B=ve(b);return I.set(B.quoteId,B),ee(B)}async function ot(e,t,n={}){e={...e},f(e.from),f(e.to),f(e.wallet),e.from=x(e.from),e.to=x(e.to);let s=r(e.amountIn);if(s<=0n)throw new o("Swap amountIn must be greater than zero.");let a=e.slippageBps??te;if(!Number.isInteger(a)||a<0||a>=1e4)throw new o("Slippage must be an integer from 0 to 9999 bps.");if(!Array.isArray(t)||t.length===0)throw new E;let d={from:e.from,to:e.to,amountIn:s.toString(),slippageBps:a},m=await Promise.allSettled(t.map(async i=>{let c=await(i.quotePrices??i.quote).call(i,{...d},e.wallet);return{quote:q(c,{provider:i.name,from:e.from,to:e.to,amountIn:s.toString(),wallet:e.wallet,slippageBps:a,chainId:e.chainId??F,allowance:e.allowance,now:e.now,cache:!1}),provider:i}})),A,g=[];for(let i of m)i.status==="rejected"&&(A??=Y(i.reason)),i.status==="fulfilled"&&r(i.value.quote.expiresAt)>BigInt(z(e.now))&&g.push(i.value);if(g.length===0){let i=m.some(c=>c.status==="rejected"&&c.reason instanceof Error&&c.reason.message===N)&&m.every(c=>c.status==="rejected"&&(c.reason instanceof E||c.reason instanceof Error&&c.reason.message===N));throw A??new E(i?N:void 0)}g.sort((i,c)=>{let l=r(c.quote.amountOut)-r(i.quote.amountOut)||r(c.quote.minAmountOut)-r(i.quote.minAmountOut);return l>0n?1:l<0n?-1:0});for(let{quote:i,provider:c}of g)try{if(BigInt(z(e.now))>=r(i.expiresAt))continue;if(n.deferBuild||!c.prepareQuote)return q(i,{now:e.now});let u=await c.prepareQuote(i.quoteId,e.wallet);if(u.quoteId!==i.quoteId)throw new o("Prepared quote ID does not match the selected route.");if(K(u,i,!0),!u.data)throw new o("Selected route did not return swap calldata.");let l={...i,expiresAt:u.expiresAt,data:u.data,value:u.value,allowance:u.allowance??i.allowance};return xe(X({to:l.router,data:u.data,value:u.value??"0",chainId:l.chainId??F,description:"Selected swap route"}),l),q(l,{now:e.now})}catch(u){A??=Y(u);continue}throw A??new E}function rt(e,t={}){if(!e||typeof e.quoteId!="string"||!e.quoteId.trim())throw new o("Provide a valid quote to build a swap.");f(e.router);let n=I.get(e.quoteId),s=z(t.now);if(be(s),!n||BigInt(s)>=r(n.expiresAt))throw I.delete(e.quoteId),new L;if(e.oakFeeBps===void 0&&e.oakFee!==void 0&&r(e.oakFee)!==0n)throw new o("Oak fee requires the pinned rate and token; venue fees must never be counted as Oak income.");K(e,n),K({...n,...t},n);let a=n.from,d=n.to,m=n.amountIn,A=n.wallet;if(!a||!d||!A||m===void 0)throw new o("Accepted quote must include input, output, amount and wallet.");let g=n.chainId??F,i=n.spender??n.router,c=t.allowance??e.allowance??n?.allowance??"0";f(a),f(d),f(A),f(i);let u=r(m);if(u<=0n)throw new o("Swap amountIn must be greater than zero.");let l=r(n.minAmountOut);if(l<=0n)throw new o("Swap minAmountOut must be greater than zero.");let w=e.router.toLowerCase()===y.toLowerCase(),p=t.data??e.data??n?.data??(w?Ne({from:a,to:d,amountIn:u.toString(),amountOut:n.grossAmountOut??n.amountOut,minAmountOut:n.calldataMinAmountOut??l.toString(),wallet:A}):Qe({from:a,to:d,amountIn:u.toString(),minAmountOut:l.toString(),wallet:A}));Fe(p,n.calldataMinAmountOut??l.toString(),n.router.toLowerCase()===D.toLowerCase());let S=n.venueFee??"0",h=n.venueFeeBps??0,b=n.provider??(w?"velora":"kyberswap"),T=n.feeDisclosure??Ie({provider:b,venueFee:S,venueFeeBps:h,oakFee:n.oakFee??"0",oakFeeBps:n.oakFeeBps}),B=_(a),v=t.value??e.value??n?.value??(B?u.toString():"0"),k=X({to:e.router,data:p,value:v,chainId:g,description:`Swap ${u} base units of ${a} for at least ${l} base units of ${d} via ${b} (${e.router}). ${T}`});return xe(k,n),B||r(c)>=u?[k]:[ie(a,i,u.toString(),g),k]}export{Be as a,te as b,tt as c,De as d,ne as e,$ as f,E as g,L as h,Ce as i,ee as j,ve as k,K as l,z as m,_ as n,Le as o,_e as p,nt as q,ke as r,Pe as s,Ie as t,Qe as u,Ne as v,Ve as w,Fe as x,xe as y,Me as z,q as A,ot as B,rt as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./XSD5NL7J.js";import{getAddress as F,parseAbi as k}from"viem";var f={chainId:4663,usdg:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",v4:{poolManager:"0x8366a39CC670B4001A1121B8F6A443A643e40951",swapper:"0x7Cd4E04E433E69e588728c86A3832753B5F846d4",quoter:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",stateView:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b"},v3:{router:"0xCaf681a66D020601342297493863E78C959E5cb2",quoter:"0x33e885eD0Ec9bF04EcfB19341582aADCb4c8A9E7",factory:"0x1f7d7550B1b028f7571E69A784071F0205FD2EfA"},tokens:[{symbol:"AAPL",token:"0xaF3D76f1834A1d425780943C99Ea8A608f8a93f9",pools:[{v:3,fee:500,pool:"0xAae0d815EE56e4092a5E5C2911E676Fea50B2d6D"},{v:4,fee:3e3,tickSpacing:60,id:"0xc748f4671a867db48b552f6b7650bf3255e05f80f00e3f7aad1b17ccb7898fdb"},{v:3,fee:3e3,pool:"0x783C9bbB765047CFdD2b84b92b2Ca9F11D34b7Ed"}]},{symbol:"AMD",token:"0x86923f96303D656E4aa86D9d42D1e57ad2023fdC",pools:[{v:3,fee:3e3,pool:"0x48D284A2A4d3DC1b3Da08231Fe44317e7e7Aa51f"}]},{symbol:"AMZN",token:"0x12f190a9F9d7D37a250758b26824B97CE941bF54",pools:[{v:3,fee:3e3,pool:"0x8AC92DA74AB5F3b1d024Dc1943Ad7e15Dc4179Ef"},{v:4,fee:2400,tickSpacing:24,id:"0xefc94885c96b02696b9b45de43eeeb8ac53c0199cab42b4daae4911b96fb8825"}]},{symbol:"ASML",token:"0x47F93d52cBeC7C6D2CfC080e154002370a60dAEA",pools:[{v:3,fee:1e4,pool:"0xedb22516B14Eb2d1C86927Db373B0E8bF70F5cD1"}]},{symbol:"BABA",token:"0xad25Ac6C84D497db898fa1E8387bf6Af3532a1c4",pools:[{v:4,fee:1e3,tickSpacing:10,id:"0x1791fc651cc794a282e5dbcb56d0b2b38eff8754b677c8876e86901521ecc439"},{v:3,fee:3e3,pool:"0xa57ab582b310dd6f9e934EA1EEEa152741545E6A"}]},{symbol:"COIN",token:"0x6330D8C3178a418788dF01a47479c0ce7CCF450b",pools:[{v:4,fee:2500,tickSpacing:25,id:"0xe2e1a0e32205e854525e0fb1d3667a53bd3b4919f032b9bcd2a038b6b6dac314"},{v:4,fee:1e4,tickSpacing:200,id:"0x007a13fa152f6dc383cad20a8eaab4e1e2538b606936eae2a424f8aa47d6db31"}]},{symbol:"CRCL",token:"0xdF0992E440dD0be65BD8439b609d6D4366bf1CB5",pools:[{v:3,fee:3e3,pool:"0x654E4143e82a5824445Ade0824351C2A9ACD95a8"},{v:4,fee:3e3,tickSpacing:30,id:"0x628c98ab436ee34a6a7decd606242890582591bdf7c9a35d90e0d08021c31ea0"},{v:4,fee:1500,tickSpacing:15,id:"0x5177eac8c2176468bbf15e44081e151d35c2e7d068e96d3db94f496a4dc944b2"}]},{symbol:"CRWV",token:"0x5f10A1C971B69e47e059e1dC91901B59b3fB49C3",pools:[{v:4,fee:9e3,tickSpacing:90,id:"0x237014478f7ef98afbe7412ac35b6a3f96b8fb111de48b7c4dbf49dba4bd9c4b"}]},{symbol:"DELL",token:"0x941AE714EC6D8130c7B75d67160Ca08f1e7d11Dd",pools:[{v:3,fee:1e4,pool:"0xc30c89cB7815A1488b7998D15eEC73961707Fc5a"}]},{symbol:"GME",token:"0x1b0E319c6A659F002271B69dB8A7df2F911c153E",pools:[{v:3,fee:500,pool:"0xE2b46c905E12Ab8E2f864e4821a4325884C1B126"}]},{symbol:"GOOGL",token:"0x2e0847E8910a9732eB3fb1bb4b70a580ADAD4FE3",pools:[{v:3,fee:500,pool:"0x34D0dC122CF9A8Eb296fC5e0D3A233625D7d19b7"},{v:4,fee:300,tickSpacing:3,id:"0x43fe16b75cabbf38f5b185d16142b02d1d9200d8f1ba17cb6cf899f562c6197f"},{v:4,fee:3e3,tickSpacing:60,id:"0xd4ecb79fdc521d7725d22b33ed43cb4e47aa96bfad76aa29577e3151f723ac5e"}]},{symbol:"INTC",token:"0xc72b96e0E48ecd4DC75E1e45396e26300BC39681",pools:[{v:3,fee:3e3,pool:"0x2e5a92f5013a64661A49312111be2e8aBd33F56a"}]},{symbol:"META",token:"0xc0D6457C16Cc70d6790Dd43521C899C87ce02f35",pools:[{v:4,fee:310,tickSpacing:3,id:"0xc58bb68060bcb7b3ea0f6d4a4afef1e57f628722e808db12afb6d1733552872f"},{v:3,fee:3e3,pool:"0x107a7Cb40d8665360ba10E59471Af06150A50922"},{v:4,fee:3e3,tickSpacing:60,id:"0x5875d407a42965b0e768c8925cea290e06fa50603ef34fc99eb92a1050e6ae36"}]},{symbol:"MSFT",token:"0xe93237C50D904957Cf27E7B1133b510C669c2e74",pools:[{v:3,fee:3e3,pool:"0xeb60bCD1D920ad6E102690CCFC6fB488899E1510"},{v:4,fee:3e3,tickSpacing:60,id:"0x9194a557b6a6bb2236b49ea7e2bbccec5d3eeb705aef00903be4b3de1d949579"}]},{symbol:"MSTR",token:"0xec262a75e413fAfD0dF80480274532C79D42da09",pools:[{v:4,fee:2500,tickSpacing:25,id:"0x319bac87e616a89e241c10aeb8afd4892a852cdd8b373cd9765ecddc40b87cfe"},{v:4,fee:2400,tickSpacing:24,id:"0xc105b8300ff65d750a0e4e63c7a879e20504069b770713464a5315e797735326"}]},{symbol:"MU",token:"0xfF080c8ce2E5feadaCa0Da81314Ae59D232d4afD",pools:[{v:3,fee:3e3,pool:"0xd057B1Bc54917855BBee58eAd58647f47caB35E5"}]},{symbol:"NBIS",token:"0x9D9c6684F596F66a64C030B93A886D51Fd4D7931",pools:[{v:4,fee:9900,tickSpacing:99,id:"0x7c2f9ce1214ba9baf56d1b6a1fc640c1b63e9a711172c0c7d10e5a9c4a3d4f0c"}]},{symbol:"NVDA",token:"0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC",pools:[{v:3,fee:500,pool:"0xd4EB21209C4D6093f80B5b84f5C45cc093EA14a3"},{v:4,fee:100,tickSpacing:1,id:"0x6444a8e0b267406a15db74ca00c4a24bdfa81ed3180f5b6d0851f8ed6f4f29c5"},{v:4,fee:3e3,tickSpacing:60,id:"0x3bb34a44f1b2b5f32c034c38a53065a521a47b199700fa9bd19d60985ff24bf1"}]},{symbol:"ORCL",token:"0xb0992820E760d836549ba69BC7598b4af75dEE03",pools:[{v:4,fee:1e4,tickSpacing:200,id:"0xc2ce4784e1e72cf0221b51b30c8aaadf6c0b12863cf03ab3687854fb7b1d850a"}]},{symbol:"PLTR",token:"0x894E1EC2D74FFE5AEF8Dc8A9e84686acCB964F2A",pools:[{v:4,fee:1500,tickSpacing:15,id:"0xc59eaeda6d1a6f031bc7e1d039772f2d675e7b4de2c8668610f4471bd60b3802"},{v:3,fee:3e3,pool:"0x851680416A4f4E1c463d45171d61ACDdBc8554c0"}]},{symbol:"QQQ",token:"0xD5f3879160bc7c32ebb4dC785F8a4F505888de68",pools:[{v:3,fee:500,pool:"0xD60A5d14dB690B7Afad71F76B108071D7175597d"}]},{symbol:"SGOV",token:"0x92FD66527192E3e61d4DDd13322Aa222DE86F9B5",pools:[{v:3,fee:500,pool:"0x6Ba50150B17Ffd0972915Aaf04fFd5E8f4Fa49b4"},{v:3,fee:3e3,pool:"0xfAb520051f96F4D2a32c22B6a3dD7fFfdf231bFe"}]},{symbol:"SLV",token:"0x411eFb0E7f985935DAec3D4C3ebaEa0d0AD7D89f",pools:[{v:3,fee:3e3,pool:"0x8cB787e6c315D464775289BaD00FDD67d53Ecb3D"},{v:3,fee:1e4,pool:"0x0Fa7BC480885DCf58Ad2ef63eC7289cF2481D51c"}]},{symbol:"SNDK",token:"0xB90A19fF0Af67f7779afF50A882A9CfF42446400",pools:[{v:4,fee:1e4,tickSpacing:200,id:"0x2707cb88a6a40fa0f948f58958051ba097d6f6a3cf7f87929bd68ccc5becea24"}]},{symbol:"SPCX",token:"0x4a0E65A3EcceC6dBe60AE065F2e7bb85Fae35eEa",pools:[{v:3,fee:500,pool:"0xc61284332117c3FB23A2A56cceFFD07F7aF60029"},{v:3,fee:3e3,pool:"0xEb07d9587eFD1778dFb9c385Ec43EF6d5F9fE401"}]},{symbol:"SPY",token:"0x117cc2133c37B721F49dE2A7a74833232B3B4C0C",pools:[{v:4,fee:100,tickSpacing:1,id:"0xe1ae6a4c6ccc9f037389a8d50a4f577bde1a9fe01d85d88ecbbd39955ce53288"},{v:3,fee:500,pool:"0xa7Bb1AC63BBaB0C44316E6c8C455213441689167"},{v:4,fee:500,tickSpacing:5,id:"0xe5923c8a8be481ec89a2ca784a2bbfa4235de6d88f92260fd66b660c4babf907"}]},{symbol:"TSLA",token:"0x322F0929c4625eD5bAd873c95208D54E1c003b2d",pools:[{v:3,fee:3e3,pool:"0xf4ACdAEEB7022862A763C9B1B885e11191c889E3"},{v:4,fee:3e3,tickSpacing:60,id:"0x8517f8071ae5b831b738052f12125e8e3d6c158b78728aa44ce3b25e5104d32e"}]},{symbol:"TSM",token:"0x58FfE4a942d3885bAa22D7520691F611EF09e7AA",pools:[{v:4,fee:7500,tickSpacing:75,id:"0x0ba5d53d2f6255f334b7c8ead4f56b6aef5af3402c5e4d11180afd38c6b85fb1"},{v:3,fee:1e4,pool:"0x07e8Ea83D4C1340774c8965125e26e12bf943bf1"}]},{symbol:"USAR",token:"0xd917B029C761D264c6A312BBbcDA868658eF86a6",pools:[{v:3,fee:3e3,pool:"0x04391780F519B7d3ba59c9590459D76e23d225C4"}]},{symbol:"USO",token:"0xa30FA36Db767ad9eD3f7a60fC79526fB4d56D344",pools:[{v:4,fee:1200,tickSpacing:15,id:"0x1f2ad5a274a776d8e1408292bde1d92d8fa7b6444acf14ad60b9c3e4e5b66420"},{v:3,fee:3e3,pool:"0x02175608F1b5E6b5ed221cCFdC7Be197D111D915"}]}],notOffered:{CLSK:"thin",EWY:"thin",IONQ:"thin",RGTI:"thin",RKLB:"thin"},sourceCommit:"02230282d8888e00794207ed271ee01b4ce30309"};var E=k(["function slot0() view returns (uint160,int24,uint16,uint16,uint16,uint8,bool)","function liquidity() view returns (uint128)","function getSlot0(bytes32) view returns (uint160,int24,uint24,uint24)","function getLiquidity(bytes32) view returns (uint128)"]),s=1n<<96n,A=s*s,v=10000n*10n**6n,h="current price in the Uniswap USDG pool; on-chain trading can differ from the stock market";async function u(d,o,b){if(d.chainId!==f.chainId)return;let c=f.tokens.find(e=>e.token.toLowerCase()===d.address.toLowerCase());if(!c)return;let t=BigInt(d.address)<BigInt(f.usdg),n=(await Promise.all(c.pools.map(async e=>{let a=e.v===3,D=F(a?e.pool:f.v4.stateView),[r,l]=await Promise.all([o.readContract({address:D,abi:E,functionName:a?"slot0":"getSlot0",args:a?[]:[e.id],blockNumber:b}),o.readContract({address:D,abi:E,functionName:a?"liquidity":"getLiquidity",args:a?[]:[e.id],blockNumber:b})]),i=r[0];if(i<=0n||l<=0n)return;let C=t?l*i/s:l*s/i;return C>=v?{sqrt:i,usdgDepth:C}:void 0}))).reduce((e,a)=>a&&(!e||a.usdgDepth>e.usdgDepth)?a:e,void 0);if(!n)throw new x("Pinned stock pools have insufficient in-range USDG depth for a display estimate.");return n}async function L(d,o,b){let c=await u(d,o,b);if(!c)return;let t=BigInt(d.address)<BigInt(f.usdg),p=t?c.sqrt**2n:A,n=t?A:c.sqrt**2n;return p*10n**BigInt(d.decimals)*10n**18n/(n*10n**6n)}export{f as a,v as b,h as c,u as d,L as e};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{d as F,e as M}from"./MIKQWF6Q.js";import{a as y,b as x,c,f as $,j as L,l as S,m as O,n as U}from"./LEHBRAZX.js";import{a as N}from"./K6D6SDIG.js";import{g as H,j as R}from"./DHX3Q5RV.js";import{a as r}from"./ZTX4WT62.js";import{c as q}from"./43LI5NKJ.js";import{g as _}from"./NWNYJ26T.js";import{a as h}from"./XSD5NL7J.js";import{encodeFunctionData as W}from"viem";var j={chop_wrap:["log","underlying","amount","minLogOut"],chop_unwrap:["log","amount","quotedNet"],chop_farm:["log","amount","pairedAmount","minPaired","minStakedLp","slippageBps","deadline"],chop_unfarm:["log","amount","minLogOut","minPairedOut","deadline"],chop_harvest:["log"]};function z(l,o){if(Object.keys(l).some(n=>!o.includes(n)))throw new h("Unexpected Chop argument.");if(o.some(n=>l[n]===void 0))throw new h("Provide every required Chop input.")}async function V(l,o,n){let d=c(o),p=await l.getBlock({blockNumber:BigInt(n.measuredAtBlock)});if(p.number!==BigInt(n.measuredAtBlock)||d<=x(p.timestamp)||d>p.timestamp+1200n)throw new h("Chop deadline must be in the next 20 minutes.");return d}async function D(l,o,n,d){if(z(n,j[o]),y(d),l.network==="testnet")throw new h("Chop requires chain 4663.");let p=y(n.log),u=l.clientFor(4663),i=await S(u,p,o==="chop_wrap"||o==="chop_farm"?"enter":"exit"),s=BigInt(i.measuredAtBlock),f=[],g=[],C=(e,t,a)=>{f.push(q(e.address,t,a.toString(),4663)),g.push(l.approval(e.address,t,a.toString(),4663))},P=(e,t,a)=>{let m={to:e,data:W({abi:N,functionName:t,args:a}),value:"0",chainId:4663,description:`${o} on verified log ${p}.`,...o==="chop_harvest"?{gasLimit:"1000000"}:{}};f.push(m),g.push({...l.unsignedTx(m),...m.gasLimit===void 0?{}:{gasLimit:m.gasLimit}})},A=[],v=(e,t,a=!0)=>A.push({token:e,min:-t,max:a?-t:-1n}),w=(e,t)=>A.push({token:e,min:t}),T=async(e,t)=>{if(x(await $(u,e.address,"balanceOf",[d],s))<t)throw new h("This wallet does not hold enough tokens for the Chop action.")},k;if(o==="chop_wrap"){let e=c(n.amount),t=c(n.minLogOut);if(!_(y(n.underlying),i.underlying.address))throw new h("The underlying token does not match the verified Chop log.");await T(i.underlying,e),C(i.underlying,p,e),P(p,"bond",[i.underlying.address,e,t]),v(i.underlying,e,!1),w(i.log,t),k=`Wrap at most ${e} underlying base units; on-chain minimum ${t} log base units.`}else if(o==="chop_unwrap"){let e=c(n.amount),t=c(n.quotedNet);await T(i.log,e);let a=await M(u,i,d,e);if(BigInt(a.net.amount)<t)throw new h("Chop unwrap no longer meets the quoted net amount. Request a fresh quote.");let m=F(i,e);f.push(m),g.push(l.unsignedTx(m)),v(i.log,e),w(i.underlying,t),k=`Unwrap ${e} log base units; preview must return at least quoted ${t} underlying base units.`}else if(o==="chop_farm"){await L(u,r.helper,s);let e=c(n.amount),t=c(n.pairedAmount),a=c(n.minPaired),m=c(n.minStakedLp),I=await V(u,n.deadline,i),b=n.slippageBps;if(typeof b!="number"||!Number.isInteger(b)||b<0||b>1e3||b%10!==0||a>t)throw new h("Chop LP slippage must be 0\u20131000 basis points in multiples of 10; the paired minimum cannot exceed its input.");await Promise.all([T(i.log,e),T(i.paired,t)]),C(i.log,r.helper.address,e),C(i.paired,r.helper.address,t),P(r.helper.address,"addLPAndStake",[p,e,i.paired.address,t,a,BigInt(b/10),I]),v(i.log,e,!1),A.push({token:i.paired,min:-t,max:-a}),w(i.staking,m),k=`Farm up to ${e} log + ${t} paired base units; slippage ${b} bps; deadline ${I}. Staked LP minimum ${m} is checked in simulation; two-sided token minimums from slippage are enforced on chain. Paired consumption must also meet ${a} base units in the preview. This tool does not zap; the helper's paired minimum alone has no on-chain effect for a direct pair.`}else if(o==="chop_unfarm"){await L(u,r.helper,s);let e=c(n.amount),t=c(n.minLogOut),a=c(n.minPairedOut),m=await V(u,n.deadline,i);if(x(await $(u,i.staking.address,"withdrawableStake",[d],s))<e)throw new h("Chop stake is still locked or too small. Wait at least 10 minutes after staking.");C(i.staking,r.helper.address,e),P(r.helper.address,"unstakeAndRemoveLP",[p,e,t,a,m]),v(i.staking,e),w(i.log,t),w(i.paired,a),k=`Unfarm ${e} staked LP base units; on-chain minimums ${t} log and ${a} paired base units; deadline ${m}.`}else{if(await L(u,r.whitelist,s),await $(u,r.whitelist.address,"paused",[r.chop],s)!==!1)throw new h("Chop rewards are paused or their pause state is unavailable.");let e=x(await $(u,i.rewards,"getClaimable",[r.chop,d],s));if(e===0n)throw new h("No CHOP is claimable now. Rewards may still be inside the 10-minute maturity lock.");P(i.rewards,"claimReward",[d]),w({address:y(r.chop),symbol:"CHOP",decimals:18,chainId:4663},e),k=`Harvest at least ${e} CHOP base units to ${d} in the preview. ${H} Allow at least 1,000,000 gas for this call.`}return(o==="chop_farm"||o==="chop_unfarm")&&!A.some(e=>_(e.token.address,r.chop))&&w({address:y(r.chop),symbol:"CHOP",decimals:18,chainId:4663},0n),O(g,f),{built:g,expected:f,rules:A,details:k,facts:i,log:p}}async function ie(l,o,n,d){let{built:p,expected:u,rules:B,details:i,facts:s,log:f}=await D(l,o,n,d),g=await l.preview(p,d);return O(g.txs,u,!0),U(g,B),{txs:p,preview:g,log:f,measuredAtBlock:s.measuredAtBlock,summary:`${R(s)}
|
|
2
|
-
${i}
|
|
3
|
-
Underlying ${s.underlying.address} (decimals ${s.underlying.decimals}); log ${f} (decimals ${s.log.decimals}); paired ${s.paired.address} (decimals ${s.paired.decimals}).`}}export{j as a,z as b,D as c,ie as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as Pe,t as re,y as qe}from"./4E7FJQLL.js";import{a as Re}from"./UHIJMDD2.js";import{a as y}from"./WWNAGOCD.js";import{a as k,b as ie,d as He,e as R,f as p,h as C,i as q,j as f,k as $,l as H,m as A,n as se,o as w,p as c,q as F,r as j,s as Se,t as Be}from"./XRDLMTBJ.js";import{b as K,f as ve,g as V,h as Te,i as Le}from"./MQK6OP7S.js";import{a as z}from"./G2LAO23N.js";import{l as oe}from"./BA66J5YQ.js";import{a as xe}from"./Z7FGEWO2.js";import{t as be}from"./TI727O2H.js";import{a as o}from"./XSD5NL7J.js";import{encodeAbiParameters as Qe,encodeFunctionData as We,erc20Abi as Ge,formatUnits as Ae,getAddress as ce,parseAbi as Q,zeroAddress as b,zeroHash as ae}from"viem";var Je="hookr_launch",g=ce(K.launcherV1),X=ce(K.rulesV1),Ye=[{type:"tuple",components:[{name:"flags",type:"uint16"},{name:"minScore",type:"uint32"},{name:"tierScore",type:"uint32"},{name:"tierPips",type:"uint24"},{name:"reviewers",type:"bytes32"}]}],_=(a,n=Object.keys(a))=>({type:"object",properties:a,required:n,additionalProperties:!1}),Fe={type:"string",pattern:"^0x[0-9a-fA-F]{40}$"},ue=_({token:{description:'Token to launch: kind "new" creates a fresh token; kind "existing" is reserved and currently refused.',oneOf:[_({kind:{const:"new",type:"string",description:z.enumValues({new:"create and launch a fresh token"})},name:{type:"string",minLength:1,maxLength:48,description:"Public token name, 1 to 48 UTF-8 bytes, no control characters."},symbol:{type:"string",minLength:1,maxLength:12,description:"Public token ticker symbol, 1 to 12 UTF-8 bytes, no control characters."},supply:{...k,description:'Total supply of the new token in base units (18 decimals: "1000000000000000000" = 1 token); positive, below 2^108.'},salt:{...ie,description:"Bytes32 hex salt (0x plus 64 hex digits) that fixes the new token address."}}),_({kind:{const:"existing",type:"string",description:z.enumValues({existing:"reserved for an already deployed token; launching it is not supported yet"})},address:{...Fe,description:z.address("existing token contract")}})]},quote:{...Fe,description:"Qualified ETH (zero address) or pinned USDG quote. Other quote funding routes await qualification."},sqrtPriceX96:{...k,description:"Integer sqrt(currency1/currency0) times 2^96 for the sorted PoolKey."},tickLower:{type:"integer",minimum:-887272,maximum:887272,description:"Lower tick of the launch range, a signed integer and a multiple of the tick spacing 200; below tickUpper."},tickUpper:{type:"integer",minimum:-887272,maximum:887272,description:"Upper tick of the launch range, a signed integer and a multiple of the tick spacing 200; above tickLower."},liquidity:{...k,description:"Initial liquidity in v4 liquidity base units (not a token amount), positive and below 2^127; its rounded-up token debts must fit amount0Max and amount1Max."},amount0Max:{...k,description:`Maximum of the pool's currency0 to fund, in base units of that token (18 decimals: "1000000000000000000" = 1 token).`},amount1Max:{...k,description:`Maximum of the pool's currency1 to fund, in base units of that token (18 decimals: "1000000000000000000" = 1 token).`},agentGate:{description:"Who may buy: all zeros means identity-only; nonzero minScore or tier values add a reputation gate checked by the reviewer set.",..._({minScore:{...k,description:"Minimum agent reputation score required to buy; 0 means no minimum."},tierScore:{...k,description:"Agent score at or above which the reduced tier fee applies; 0 only when tierPips is 0."},tierPips:{...k,description:"Reduced pool fee in pips for agents at tierScore (3000 = 0.3%); at most 50000, and 0 only when tierScore is 0."},reviewerSetId:{...ie,description:"Bytes32 id of a registered reviewer set that scores agents; all zeros unless the gate uses a score."}})},lpRewardsBps:{...k,description:"LP Rewards rate in basis points (50 = 0.5%); at most 1000. This launch profile has zero burn."},arbRecapture:{type:"boolean",description:"True turns on Hookr arb recapture, with recaptured value to LPs; refused while the recapture lane is unavailable. False leaves it off."},deadline:{...k,description:"Latest time this launch may execute, as Unix seconds; must be within the next 300 seconds of chain time."}});function Ze(a){let n=R(a,Object.keys(ue.properties),ue.required),r=A(n.token);if(r.kind==="existing")throw R(r,["kind","address"],["kind","address"]),q(r.address),new o("Existing-token Hookr launches await a qualified funding route. Use token.kind new.");if(R(r,["kind","name","symbol","supply","salt"],["kind","name","symbol","supply","salt"]),r.kind!=="new")throw new o("Choose token.kind new; existing tokens are not supported yet.");let e=(P,O)=>{if(typeof P!="string"||!P.trim()||new TextEncoder().encode(P).length>O||[...P].some(W=>W.codePointAt(0)<32)||/[\u007f-\u009f\u2028-\u202e\u2066-\u2069\ud800-\udfff]/u.test(P))throw new o(`Use nonempty public token text within ${O} UTF-8 bytes without control characters.`);return P},i=p(r.supply,108);if(!i)throw new o("Hookr new-token supply must be positive and at most 2^108-1 base units.");let t=q(n.quote);if(![b,ce(be.mainnet.usdg)].includes(t))throw new o("Use native ETH (zero address) or the pinned USDG quote; other quote funding routes await qualification.");let l=n.tickLower,u=n.tickUpper;if(typeof l!="number"||typeof u!="number")throw new o("Provide integer aligned Hookr ticks.");qe(l,u,y.tickSpacing);let s=p(n.sqrtPriceX96,160);if(s<=oe(l)||s>=oe(u))throw new o("Hookr opening price must be strictly inside the aligned tick range.");let d=p(n.liquidity,127);if(!d)throw new o("Hookr liquidity must be positive and at most int128 max.");let m=p(n.amount0Max,128),T=p(n.amount1Max,128),x=Pe({liquidity:d,tickLower:l,tickUpper:u,sqrtPriceX96:s,roundUp:!0});if(x.amount0>=1n<<127n||x.amount1>=1n<<127n||!x.amount0||!x.amount1||x.amount0>m||x.amount1>T)throw new o("Hookr exact rounded-up debts must be positive and fit both approved funding caps. Reduce liquidity or increase the caps.");let h=R(n.agentGate,["minScore","tierScore","tierPips","reviewerSetId"],["minScore","tierScore","tierPips","reviewerSetId"]),I=Number(p(h.minScore,32)),S=Number(p(h.tierScore,32)),B=Number(p(h.tierPips,24)),M=C(h.reviewerSetId);if(B>5e4||S===0!=(B===0)||(I!==0||S!==0)!=(M!==ae))throw new o("Use tierPips at most 50000, paired nonzero tier score/pips, and a registered reviewer set only for scored gates. Identity-only uses all zero values.");let N=Number(p(n.lpRewardsBps,16));if(N>1e3)throw new o("Hookr LP Rewards plus burn must not exceed 1000 bps; this profile has zero burn.");if(typeof n.arbRecapture!="boolean")throw new o("Choose arbRecapture true or false explicitly.");return{token:{existing:b,name:e(r.name,48),symbol:e(r.symbol,12),supply:i,salt:C(r.salt)},quote:t,sqrtPriceX96:s,tickLower:l,tickUpper:u,liquidity:d,amount0Max:m,amount1Max:T,debts:x,gateTerms:{flags:1,minScore:I,tierScore:S,tierPips:B,reviewers:M},lpRewardsBps:N,arbRecapture:n.arbRecapture,deadline:p(n.deadline,64)}}async function et(a,n,r,e){return q(await c(a,g,w("launcherV1"),"predictToken",[n,r],e))}async function tt(a,n,r,e,i){let t=r.gate;if(!t.walletAgent||!(e?t.healthyForScores:t.healthyIdentityOnly))throw new o("Hookr needs a healthy on-chain agent identity. Own an ERC-8004 identity or link its current agent wallet on the Hookr gate; Oak setup linking alone is insufficient.");let l=(d,m)=>c(a,t.identity,Q(["function balanceOf(address) view returns (uint256)","function ownerOf(uint256) view returns (address)","function getAgentWallet(uint256) view returns (address)"]),d,m,i),u=f(await l("balanceOf",[n])),s=!1;if(t.link.linked){let d=BigInt(t.link.agentId);s=q(await l("getAgentWallet",[d]))===n,!s&&u>0n&&(s=q(await l("ownerOf",[d]))===n)}if(!u&&!s||e&&!s)throw new o("Hookr on-chain identity ownership or gate link is missing or stale. Link a current ERC-8004 agent ID on the Hookr gate before launching; scored gates require that link even for an NFT owner.")}async function nt(a,n,r){let e=Ze(n);if(a.network==="testnet")throw new o("Hookr launch requires Robinhood Chain 4663.");let i=a.clientFor(4663),t=await Te(i);if(e.deadline<=t.timestamp||e.deadline>t.timestamp+y.deadlineSeconds)throw new o("Set a fresh Hookr deadline within the next 300 seconds of chain time.");let l=e.gateTerms.reviewers!==ae,u=await Re(i,r,t.number,l?[e.gateTerms.reviewers]:[]);if(!u.rootOpenForWallet||u.newMarketsPaused||!u.launcherAdmitted)throw new o("Hookr new markets or the reviewed Launcher are closed. Retry only after registry admission is restored.");await tt(i,r,u,l,t.number);let s=await et(i,r,e.token,t.number);if(s===b||s===e.quote)throw new o("Hookr predicted token collides with its quote. Choose a fresh salt.");let d={currency0:BigInt(s)<BigInt(e.quote)?s:e.quote,currency1:BigInt(s)<BigInt(e.quote)?e.quote:s,fee:8388608,tickSpacing:y.tickSpacing,hooks:F},m=re(d),T=d.currency0===s,x=T?e.amount0Max:e.amount1Max,h=T?e.amount1Max:e.amount0Max,I=T?e.debts.amount0:e.debts.amount1,S=T?e.debts.amount1:e.debts.amount0;if(x>e.token.supply)throw new o("Hookr new-token deposit cap exceeds its fixed supply.");let[B,M,N,P,O,W,Ie,Ue]=await Promise.all([i.getCode({address:s,blockNumber:t.number}),i.getTransactionCount({address:s,blockNumber:t.number}),c(i,g,w("launcherV1"),"memberKey",[s,e.quote,y.tickSpacing,F],t.number),c(i,F,w("rootV1"),"knownPool",[m],t.number),c(i,g,w("launcherV1"),"SKIP_TAKEN",[],t.number),c(i,j,w("registry"),"isQuote",[e.quote],t.number),c(i,j,w("registry"),"quoteIsBraked",[e.quote],t.number),c(i,X,w("rulesV1"),"minProtocolShareBps",[],t.number)]),[Ce,$e]=H(N,2);if(e.token.salt===C(O))throw new o("SKIP_TAKEN is unsupported. Choose an ordinary new-token salt.");if(B&&B!=="0x"||M!==0||$(P)||!$($e)||re(A(Ce))!==m)throw new o("Hookr token address or pool is already taken or its predicted key differs. Choose a fresh salt and rebuild.");if(!$(W)||$(H(Ie,2)[0]))throw new o("The Hookr quote is not currently qualified or is braked. Choose an admitted quote.");let de=A(u.gate.admission),Me=A(de.caps),pe=p(Me.maxLpFeePips,24),Ne=BigInt(u.coreAdmission.caps.maxLpFeePips),G=BigInt(y.baseLpFeePips)+pe;if(BigInt(e.gateTerms.tierPips)>pe||G>Ne||G>600000n)throw new o("Hookr gate tier or total LP fee exceeds the live admission cap. Lower the tier or wait for compatible admission.");let le=q(await c(i,X,w("rulesV1"),"protocolRecipient",[],t.number));await V(i,t.number,[le]);let[Oe,Ee,De]=H(await c(i,le,Q(["function feeTerms(address,bool,bytes32) view returns (uint16,uint16,uint16)"]),"feeTerms",[b,e.arbRecapture,m],t.number),3),me=f(Oe,16),J=f(De,16);if(f(Ee,16)!==0n||J>10000n)throw new o("Hookr treasury minimum or integrator terms exceed the reviewed profile.");let he=f(Ue,16),E=me>he?me:he;if(E<2000n||E>5000n)throw new o("Hookr protocol share is outside the reviewed 2000\u20135000 bps profile.");let Y=BigInt(e.lpRewardsBps)*100n+(!e.arbRecapture&&e.lpRewardsBps===0?J:0n);if(Y>BigInt(u.coreAdmission.caps.maxQuoteTakePips))throw new o("Hookr LP Rewards and minimum quote charge exceed the live quote-take cap. Lower LP Rewards.");let Z={on:e.arbRecapture,traderBps:0,lpBps:e.arbRecapture?1e4:0,period:0,maxPrizeBps:0,potReleaseBps:0,minBuyQuote:0n,releaseBlocks:0},ke=null;if(e.arbRecapture){let[D,ge]=await Promise.all([c(i,X,Q(["function recaptureDefaults() view returns ((bool on,uint16 traderBps,uint16 lpBps,uint32 period,uint16 maxPrizeBps,uint16 potReleaseBps,uint128 minBuyQuote,uint32 releaseBlocks) rc,uint16 potBps)"]),"recaptureDefaults",[],t.number),c(i,j,w("registry"),"activeLaneOf",[F],t.number)]);Z.releaseBlocks=Number(f(A(H(D,2)[0]).releaseBlocks,32));let[Ve,je,Xe,_e]=H(ge,4),ne=q(Ve);if(await V(i,t.number,[ne]),ne===b||C(je)!==ve(ne).codeHash||f(Xe,32)===0n||f(_e,16)>10000n||!Z.releaseBlocks)throw new o("Hookr recapture lane is unavailable. Use arbRecapture false until its executor and gas floor are reviewed.");ke=se(ge)}let fe={quote:e.quote,tickSpacing:y.tickSpacing,sqrtPriceX96:e.sqrtPriceX96,tickLower:e.tickLower,tickUpper:e.tickUpper,liquidity:e.liquidity,amount0Max:e.amount0Max,amount1Max:e.amount1Max,config:{subject:s,quote:e.quote,rules:X,advisory:Be,liquidityOwner:g,baseLpFeePips:y.baseLpFeePips,caps:{maxLpFeePips:Number(G),maxQuoteTakePips:Number(Y),maxSubjectTakeBps:0},rulesGasLimit:Number(u.coreAdmission.gasLimit),advisoryGasLimit:Number(p(de.gasLimit,32)),advisoryPhases:1,advisoryFailOpen:!1,policyId:ae},rules:{guardEndBlock:0,maxFeePips:y.baseLpFeePips,snipeTaxPips:0,snipeFloorPips:0,snipeDecaySeconds:0,dynamicFeeSens:0,burnBps:0,lpBps:e.lpRewardsBps,potBps:0,royaltyBps:0,protocolShareBps:Number(E),potEveryNBuys:0,maxBuyQuoteAmount:0n,potMinBuyQuote:0n,royaltyTo:b,integrator:b},recapture:Z},L=BigInt(u.launchFee.amount);if(L>10000000000000000n)throw new o("Hookr launch fee exceeds the reviewed 0.01 ETH maximum.");let v=b;if(L&&(await V(i,t.number,[u.launchFee.treasury]),v=q(await c(i,u.launchFee.treasury,Q(["function target() view returns (address)"]),"target",[],t.number)),v===b||v===g||v===r||v===Se))throw new o("Hookr launch fee recipient is outside the reviewed payment profile.");let ee=L+(e.quote===b?h:0n),te=[],U=[];if(e.quote!==b){let D=f(await c(i,e.quote,Ge,"allowance",[r,g],t.number));D!==0n&&D!==h&&U.push(a.approval(e.quote,g,"0",4663)),U.push(a.approval(e.quote,g,h.toString(),4663)),te.push({token:e.quote,amount:h})}ee&&te.push({token:xe,amount:ee,to:g});let we=`Launch public, permanent token ${JSON.stringify(e.token.name)} (${JSON.stringify(e.token.symbol)}), fixed supply ${Ae(e.token.supply,18)} (18 decimals). Create one agents-only pool (identity check on every buy). Price currency1/currency0 = ${e.sqrtPriceX96*e.sqrtPriceX96}/${1n<<192n}; sqrtPriceX96 ${e.sqrtPriceX96}, ticks ${e.tickLower} to ${e.tickUpper}, spacing ${y.tickSpacing}. Deposit at most ${e.amount0Max} currency0 and ${e.amount1Max} currency1 base units; exact launch debts ${e.debts.amount0} and ${e.debts.amount1}. Currency0 ${d.currency0}; currency1 ${d.currency1}. Launch fee ${L} wei to ${v} (${Ae(L,18)} ETH). Unused quote funding (${h-S} base units) and retained token supply (${e.token.supply-I} base units) return to ${r} in this transaction. Family owner ${r}; token ${s}; pool ${m}. LP base fee 3000 pips; gate flags 1, scores ${e.gateTerms.minScore}/${e.gateTerms.tierScore}, tier ${e.gateTerms.tierPips} pips; LP Rewards ${e.lpRewardsBps} bps; burn 0; quote-take cap ${Y} pips (includes Hookr minimum); protocol share ${E} bps. Arb recapture ${e.arbRecapture}; deadline ${e.deadline}. No lock.`;U.push(a.unsignedTx({to:g,data:We({abi:w("launcherV1"),functionName:"launchAdvised",args:[e.token,F,[fe],[Qe(Ye,[e.gateTerms])],e.deadline]}),value:ee.toString(),chainId:4663,description:we}));let[ye,ze,Ke]=await Promise.all([i.getCode({address:s}),i.getTransactionCount({address:s}),i.readContract({address:g,abi:He,functionName:"launchFee"})]);if(ye&&ye!=="0x"||ze!==0||f(H(Ke,5)[0])!==L)throw new o("Hookr collision state or launch fee changed. Request a fresh launch preview.");return await Le(i,t),{txs:U,inputs:te,summary:we,tokenAddress:s,poolId:m,feeTarget:v,feeTreasury:u.launchFee.treasury,terms:se({request:n,blockNumber:t.number,blockHash:t.hash,owner:r,tokenAddress:s,poolId:m,poolKey:d,member:fe,gateTerms:e.gateTerms,launchFee:L,feeTarget:v,feeTreasury:u.launchFee.treasury,hookrMinimumPips:J,exactApprovals:U.slice(0,-1),refunds:{quote:h-S,retainedSupply:e.token.supply-I},gasEstimate:null,gasEstimateReason:"The local sender estimates the ordered exact calls after funding approvals and confirms the gas limit and maximum fee.",lane:ke,pins:K})}}function ot(a){if(!Array.isArray(a)||a.length<1||a.length>3)throw new o("Hookr launch requires only the locally reconstructed finite approvals and one launch transaction.");for(let n of a)R(n,["to","data","value","chainId","description"],["to","data","value","chainId","description"])}function kt(a,n){if(ot(a),a.length!==n.length||a.some((r,e)=>r.to.toLowerCase()!==n[e].to.toLowerCase()||r.data.toLowerCase()!==n[e].data.toLowerCase()||r.value!==n[e].value||r.chainId!==4663))throw new o("Hookr launch differs from the locally reconstructed exact parameters, approvals and funding.")}function ft(a){return[{name:Je,inputSchema:ue,execute:async(n,r)=>{let e=await nt(a,n,r);return{txs:e.txs,preview:await a.preview(e.txs,r),terms:e.terms,summary:e.summary}}}]}export{Je as a,g as b,X as c,ue as d,Ze as e,nt as f,ot as g,kt as h,ft as i};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as b,b as h,c as R,e as f,f as A,g as k,h as P,i as I,j as v,l as S,m as B,n as $}from"./LEHBRAZX.js";import{a as E}from"./K6D6SDIG.js";import{c as O,e as T,i as M,j as x,k as V,m as D,n as N}from"./DHX3Q5RV.js";import{a as y}from"./ZTX4WT62.js";import{a as c}from"./XSD5NL7J.js";import{encodeFunctionData as j,formatUnits as z}from"viem";var m=(o,e)=>({token:o,amount:e.toString()}),J=6e4;function ie(){let o=new WeakMap;return{entry(e){let r=o.get(e);return(!r||Date.now()>=r.expiresAt)&&(r={logs:new Map,expiresAt:Date.now()+J},o.set(e,r)),r}}}function K(o,e){return{to:o.log.address,data:j({abi:E,functionName:"debond",args:[e,[],[]]}),value:"0",chainId:4663,description:`Unwrap ${e} log base units from ${o.log.address}.`}}async function _(o,e,r,a,t=BigInt(e.measuredAtBlock),s){if(a>BigInt(e.totalSupply))throw new c("Unwrap amount exceeds the issued Chop log supply.");let i=h(await A(o,e.log.address,"convertToAssets",[a],t,r,s)),p=1n<<96n,d=BigInt(e.managedUnderlying)*(a*p/BigInt(e.totalSupply))/p;if(i>d)throw new c("Chop redemption exceeds the measured backing.");return{gross:m(e.underlying,d),fee:m(e.underlying,d-i),net:m(e.underlying,i)}}async function F(o,e){if(f(e),o.network==="testnet")throw new c("Chop requires chain 4663.");let r=o.clientFor(4663),a=await P(r,e),t=I();await v(r,y.registry,a,e,t);let s=await A(r,y.registry.address,"allIndexes",[],a,void 0,e);if(!Array.isArray(s)||s.length>1e3)throw new c("Chop registry inventory is unreadable or too large.");let i=s.filter(n=>n&&n.verified===!0).map(n=>b(n.index));if(new Set(i).size!==i.length)throw new c("Chop registry returned duplicate logs.");let p=[];for(let n=0;n<i.length;n+=4)f(e),p.push(...await Promise.all(i.slice(n,n+4).map(l=>S(r,l,"read",a,e,t))));f(e);let d=p.map(n=>`${n.log.symbol} (${n.log.address}): ${M(n)}`),u=p.flatMap(n=>n.drift.length?[`Code changed for ${n.log.address}: ${n.drift.join(", ")}.`]:[]);return{logs:p.map(n=>({...n,plainSummary:V(n)})),measuredAtBlock:a.toString(),warnings:[...T,...d,...u]}}async function se(o,e,r){if(f(r),!e)return F(o,r);let a=o.clientFor(4663),t=e.entry(a);if(t.inventory)return structuredClone(t.inventory);let s=t.pending;if(!s){let n=new AbortController,l={controller:n,waiters:0,promise:F(o,n.signal)};l.promise=l.promise.then(g=>{f(n.signal),t.inventory=structuredClone(g);for(let w of g.logs)t.logs.set(w.log.address.toLowerCase(),structuredClone(w));return g}).finally(()=>{n.abort(),t.pending===l&&(t.pending=void 0)}),t.pending=s=l}let i=s;i.waiters++;let p,d=!1,u=()=>{d||(d=!0,--i.waiters===0&&t.pending===i&&(i.controller.abort(),t.pending=void 0))};try{let n=await new Promise((l,g)=>{p=()=>{u(),g(new c("Chop read was cancelled."))},r?.addEventListener("abort",p,{once:!0}),i.promise.then(l,g)});return f(r),structuredClone(n)}finally{p&&r?.removeEventListener("abort",p),u()}}async function ae(o,e,r){let{limit:a,offset:t}=r,s=new Set(e.logs.map(l=>`${l.log.symbol} (${l.log.address}): ${M(l)}`)),i=e.warnings.filter(l=>!s.has(l)),p=Object.entries(e).map(([l,g])=>({name:l,chars:JSON.stringify(g).length,...Array.isArray(g)?{items:g.length}:{}})),d=o.clientFor(4663),u=e.logs.slice(t,t+a),n=[];for(let l=0;l<u.length;l+=4)n.push(...await Promise.all(u.slice(l,l+4).map(async g=>{let w=await k(d,[{target:g.pool,fn:"balanceOf",args:[g.staking.address]},{target:g.pool,fn:"totalSupply"}],BigInt(g.measuredAtBlock)),L=h(w[0]),C=h(w[1]);if(L>C)throw new c("Chop staked LP balance exceeds the pool supply.");return{log:g.log.address,symbol:g.log.symbol,backingPerLog:g.backingPerLog,fees:g.fees,pool:g.pool,stakedShare:{stakedLp:L.toString(),totalLp:C.toString(),bps:C===0n?null:Number(L*10000n/C)},riskLines:x(g).split(`
|
|
2
|
-
`).filter(W=>!T.includes(W)).join(`
|
|
3
|
-
`)}})));for(;;){let l=t+n.length,g=`Use detail: "full" for every complete row, or fields: ["logs"] or ["warnings"] for whole sections. ${l<e.logs.length?`Continue with offset: ${l}, limit: ${a}.`:"End of this list; use offset: 0 to start again."} Summary rows omit financial measurements and full contract metadata.`,w={warnings:i,summary:{logs:n,offset:t,total:e.logs.length,omitted:e.logs.length-n.length,measuredAtBlock:e.measuredAtBlock},sections:p,more:g};if(JSON.stringify(w).length<=8e3)return w;if(n.length<=1)throw new c('Chop risk lines exceed the summary budget. Request fields or detail: "full" to read them whole.');n.pop()}}async function de(o,e){let r=o.clientFor(4663),a=[];for(let t=0;t<e.length;t+=4)a.push(...await Promise.all(e.slice(t,t+4).map(async s=>{let[i,p,d,u]=await k(r,[{target:b(y.chop),fn:"balanceOf",args:[s.rewards]},{target:s.pool,fn:"token0"},{target:s.pool,fn:"token1"},{target:s.pool,fn:"getReserves"}],BigInt(s.measuredAtBlock)),n=[b(p),b(d)].map(g=>[s.log,s.paired].find(w=>w.address.toLowerCase()===g.toLowerCase()));if(!n[0]||!n[1]||n[0]===n[1])throw new c("Chop pool tokens disagree with the verified log.");if(!Array.isArray(u)||u.length!==3)throw new c("Chop pool reserves are unavailable.");let l=m(s.underlying,BigInt(s.managedUnderlying));return{...s,backingNow:{...l,humanAmount:z(BigInt(l.amount),s.underlying.decimals)},rewardPot:m({address:b(y.chop),symbol:"CHOP",decimals:18,chainId:4663},h(i)),reserves:[m(n[0],h(u[0])),m(n[1],h(u[1]))]}})));return a}var U=o=>BigInt(o.replace(".","")),H=o=>`${o/100n}.${(o%100n).toString().padStart(2,"0")}`;function le(o){return o.some(e=>e.usdEstimate===null)?{reserves:o,usdEstimate:null,estimateLabel:"price unavailable",estimateReason:"A pool reserve has no USD estimate"}:{reserves:o,usdEstimate:H(o.reduce((e,r)=>e+U(r.usdEstimate),0n)),estimateLabel:"estimate, not a quote",estimateSource:"sum of the two reserve estimates"}}function pe(o,e){let r={label:"rough",pct:null,inputToken:e,assumptions:"Constant-product marginal price move for buying the log with $100 of the paired token; excludes pool and token fees, gas and other trades."};if(o.some(d=>BigInt(d.amount)===0n))return{...r,reason:"The pool is empty on at least one side"};let a=o.find(d=>d.token.address.toLowerCase()===e.address.toLowerCase());if(!a?.usdEstimate||U(a.usdEstimate)===0n)return{...r,reason:"Paired reserve price unavailable or below one cent"};let t=U(a.usdEstimate),i=((t+10000n)**2n-t**2n)*10000n,p=t**2n;return{...r,pct:H((2n*i+p)/(2n*p))}}var q=new WeakMap,Y=10;async function Z(o,e,r,a,t,s){if(f(t),e.length>Y)throw new c("Chop holdings probes support at most ten logs per call.");if(e.length===0)return[];let i=t?q.get(t):void 0;t&&!i&&(i=I(),q.set(t,i)),await v(o,y.whitelist,a,t,i);let p=await k(o,e.flatMap(d=>[{target:d.log.address,fn:"balanceOf",args:[r]},{target:d.staking.address,fn:"balanceOf",args:[r]},{target:d.staking.address,fn:"withdrawableStake",args:[r]},{target:d.rewards,fn:"getUnpaid",args:[y.chop,r]},{target:d.rewards,fn:"getClaimable",args:[y.chop,r]},{target:y.whitelist.address,fn:"paused",args:[y.chop]},{target:d.log.address,fn:"totalSupply"},{target:d.log.address,fn:"totalAssets",args:[d.underlying.address]}]),a,t);return f(t),Promise.all(e.map(async(d,u)=>{let n=await Q(o,d,r,a,t,p.slice(u*8,(u+1)*8));return f(t),s?.(n,u),n}))}async function G(o,e,r,a=BigInt(e.measuredAtBlock),t){return(await Z(o,[e],r,a,t))[0]}async function Q(o,e,r,a,t,s){if(f(t),typeof s[5]!="boolean")throw new c("Chop reward pause state is unavailable.");let i=h(s[0]),p=h(s[6]),d=h(s[7]);if(p===0n)throw new c("This Chop log has no issued supply.");let u={...e,totalSupply:p.toString(),managedUnderlying:d.toString()},n=i===0n?{gross:m(e.underlying,0n),fee:m(e.underlying,0n),net:m(e.underlying,0n)}:await _(o,u,r,i,a,t),l={address:b(y.chop),symbol:"CHOP",decimals:18,chainId:4663};return{log:e.log.address,logTokens:m(e.log,i),...n,stakedLp:m(e.staking,h(s[1])),withdrawableLp:m(e.staking,h(s[2])),pendingChop:m(l,h(s[3])),claimableChop:m(l,h(s[4])),rewardsPaused:s[5],measuredAtBlock:a.toString(),warnings:x(e)}}async function ge(o,e,r,a){let t=o.clientFor(4663);b(r);let s=a?.entry(t),i=b(e).toLowerCase(),p=s?.logs.get(i)??await S(t,e,"read");return s&&!s.logs.has(i)&&s.logs.set(i,structuredClone(p)),G(t,p,r,await P(t))}async function ue(o,e,r,a){let t=R(a),s=o.clientFor(4663);b(r);let i=await S(s,e,"exit"),p=h(await A(s,i.log.address,"balanceOf",[r],BigInt(i.measuredAtBlock)));if(p===0n)throw new c(D(i.log.symbol));if(t>p)throw new c(N(i.log,t,p));let d=await _(s,i,r,t),u=BigInt(d.net.amount);if(u===0n)throw new c("This Chop unwrap would return no underlying.");let n=K(i,t),l=o.unsignedTx(n);B([l],[n]);let g=await o.preview([l],r);B(g.txs,[n]);let w=$(g,[{token:i.log,min:-t,max:-t},{token:i.underlying,min:u}]);return{log:i.log.address,amount:t.toString(),...d,simulatedNet:m(i.underlying,w.get(i.underlying.address.toLowerCase())),quotedNet:d.net.amount,preview:g,measuredAtBlock:i.measuredAtBlock,warning:O,summary:x(i)}}export{m as a,J as b,ie as c,K as d,_ as e,se as f,ae as g,de as h,le as i,pe as j,Y as k,Z as l,G as m,ge as n,ue as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./XSD5NL7J.js";import{getAddress as F,keccak256 as x}from"viem";var A={version:"hookr-launcher-v1",chainId:4663,blockNumber:"104346779",blockHash:"0x1bdaca726ac3f0b1dd0d861edf9fa3774dc1765fb51771632c7a7ef9751900bc",roles:{launcherV1:"0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C",rootV1:"0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc",rulesV1:"0x342bAA22e202954593b04B7eD1663621E0565d46",agentGateV1:"0x3b1aC66a6Fd9e9d8F063d145003cf29eac4Fb0C9",familyRouterV1:"0xbc56F48f873841d26a5a02575263d82f68e12864",familyLockV1:"0x5248AF9139DaDEf0C5296342b7BE441deDf0adC2",launcherLegacy:"0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4",rulesPrevious:"0x8AD0aC66DbeBcc047e8d216666C925E797e5e52e",rulesLegacy:"0x4a71c270b1520F94064268102AebD744b0DE7942",registry:"0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602",poolManager:"0x8366a39CC670B4001A1121B8F6A443A643e40951",familyLockLegacy:"0xfAFEcE64099C1E791C4B46189c277f00c0c7e00b",HookrLaunchChecks_856736:"0x8567369a70100828611BB6F44ec051B48F10fb59",HookrTokenDeployer_e703f2:"0xE703F2Cd21A8dEE05dbC81b693201D602772B2d8",HookrTokenDeployer_1b23d6:"0x1B23D6d7beBcB61E39317E9F0Bc02AEB91aFCcAe",HookrRegistryAdmin_675ac2:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1",HookrRegistryChecks_b9f5c5:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},contracts:{"0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C":{role:"launcherV1",address:"0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C",codeHash:"0xf1a77b5576a56082679dc590f1a02dc4e834e91cc984e4996b8b08d0f11c1714",dependencies:["0x8567369a70100828611BB6F44ec051B48F10fb59","0xE703F2Cd21A8dEE05dbC81b693201D602772B2d8","0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602"],links:[{start:80,length:20,address:"0x8567369a70100828611BB6F44ec051B48F10fb59"},{start:19566,length:20,address:"0x8567369a70100828611BB6F44ec051B48F10fb59"},{start:4906,length:20,address:"0xE703F2Cd21A8dEE05dbC81b693201D602772B2d8"},{start:14065,length:20,address:"0xE703F2Cd21A8dEE05dbC81b693201D602772B2d8"}],source:"https://sourcify.dev/server/v2/contract/4663/0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C",match:"exact_match"},"0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc":{role:"rootV1",address:"0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc",codeHash:"0xd336de325837e60a74cea11d87b5ebd1cc8961911f611f38de0508d23b6e779f",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602","0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9","0x445D7891381Aa7F91F5048EdBC6a611ccBDe7865","0x8876789976dEcBfCbBbe364623C63652db8C0904","0x9A8a1006469BA196f8FEfc017a53505C83A060BB"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc",match:"exact_match"},"0x342bAA22e202954593b04B7eD1663621E0565d46":{role:"rulesV1",address:"0x342bAA22e202954593b04B7eD1663621E0565d46",codeHash:"0xd9562958e6ecb3bfea31590b1d0201c281365b2becc1924ac4c5419e9cc1c32f",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602","0x2242F7FC75606500503075f29ea8cDA684EfB4a9","0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc","0x97D440593912234b78432A030fb5186BD2A3Bc86","0x8D0583b408e2959FA0450c54F749C1A4Dad3d335","0x0B0f08c381ed6902FAb74b470fe7f8A58E8EA269","0xc42E47679dd06DDcC07acc72ca710f6E60ACC3A9","0xdA360B744F8C816acbb97fF65cC4Cd81e27Df375"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x342bAA22e202954593b04B7eD1663621E0565d46",match:"exact_match"},"0x3b1aC66a6Fd9e9d8F063d145003cf29eac4Fb0C9":{role:"agentGateV1",address:"0x3b1aC66a6Fd9e9d8F063d145003cf29eac4Fb0C9",codeHash:"0x9aa76e84dabf5fbc568f620c5a0ea9817d55ea74a75cb43adfe58847a7db8d7c",dependencies:["0x8004A169FB4a3325136EB29fA0ceB6D2e539a432","0x8004BAa17C55a88189AE136b182e5fdA19dE9b63","0x8366a39CC670B4001A1121B8F6A443A643e40951","0x8Fdfaa25e2E4dDa297F301ea06458f22186D6bE9"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x3b1aC66a6Fd9e9d8F063d145003cf29eac4Fb0C9",match:"exact_match"},"0xbc56F48f873841d26a5a02575263d82f68e12864":{role:"familyRouterV1",address:"0xbc56F48f873841d26a5a02575263d82f68e12864",codeHash:"0x9e5741dabd7ac598ea5f5cc618272189a27b09cdec02b9a5eed77dc95acf0eec",dependencies:["0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9","0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C","0x8366a39CC670B4001A1121B8F6A443A643e40951","0x000000000022D473030F116dDEE9F6B43aC78BA3","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xbc56F48f873841d26a5a02575263d82f68e12864",match:"exact_match"},"0x5248AF9139DaDEf0C5296342b7BE441deDf0adC2":{role:"familyLockV1",address:"0x5248AF9139DaDEf0C5296342b7BE441deDf0adC2",codeHash:"0x488b7321770121eb0edc0f4b393f077d19eb6403416ab392713b0c29009a5dc1",dependencies:["0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C","0x8366a39CC670B4001A1121B8F6A443A643e40951"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x5248AF9139DaDEf0C5296342b7BE441deDf0adC2",match:"exact_match"},"0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4":{role:"launcherLegacy",address:"0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4",codeHash:"0x96b8c338c38a072ceef8b947ad93d3d7a46d2d7c70189d2b4ee92efb2a5e1d5d",dependencies:["0x8567369a70100828611BB6F44ec051B48F10fb59","0x1B23D6d7beBcB61E39317E9F0Bc02AEB91aFCcAe","0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602"],links:[{start:80,length:20,address:"0x8567369a70100828611BB6F44ec051B48F10fb59"},{start:19515,length:20,address:"0x8567369a70100828611BB6F44ec051B48F10fb59"},{start:4884,length:20,address:"0x1B23D6d7beBcB61E39317E9F0Bc02AEB91aFCcAe"},{start:14014,length:20,address:"0x1B23D6d7beBcB61E39317E9F0Bc02AEB91aFCcAe"}],source:"https://sourcify.dev/server/v2/contract/4663/0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4",match:"exact_match"},"0x8AD0aC66DbeBcc047e8d216666C925E797e5e52e":{role:"rulesPrevious",address:"0x8AD0aC66DbeBcc047e8d216666C925E797e5e52e",codeHash:"0x26dc86731245621bc765a95ebee7636c4eb726c4e9bc8e8946294d223404a677",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602","0x2242F7FC75606500503075f29ea8cDA684EfB4a9","0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc","0x1172a3cC44ce8E8E3F1f0e58a9A0E9678b7118f8","0x8D0583b408e2959FA0450c54F749C1A4Dad3d335","0xe5FCbB899C95B4c7cd3afFfd1f4EB093138870A2","0xc42E47679dd06DDcC07acc72ca710f6E60ACC3A9","0xFA66c713bb10298B47E0afC43389212F279E8245"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8AD0aC66DbeBcc047e8d216666C925E797e5e52e",match:"exact_match"},"0x4a71c270b1520F94064268102AebD744b0DE7942":{role:"rulesLegacy",address:"0x4a71c270b1520F94064268102AebD744b0DE7942",codeHash:"0x4b6d50b40981b8082f3ee5a7ebf57e48489f71c94c2a3b94032a1d1a382b515b",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602","0x2242F7FC75606500503075f29ea8cDA684EfB4a9","0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc","0xF83569E564d70daebc35950f66a73f2e2B915583"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x4a71c270b1520F94064268102AebD744b0DE7942",match:"exact_match"},"0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602":{role:"registry",address:"0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602",codeHash:"0xc16e7681583d8d9af8e8c54962f7e890b967687dee4cf32dbd676d4d547d2359",dependencies:["0x675ac2102E8c69E2467F64656E3c235AF3901Ac1","0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98","0x8366a39CC670B4001A1121B8F6A443A643e40951"],links:[{start:1195,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:1812,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:2770,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:3016,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:4424,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:6120,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:7306,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:9294,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:9970,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:10351,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:12268,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:12965,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:13521,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:15721,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:16994,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:17547,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:18245,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:19037,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:20001,length:20,address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1"},{start:2190,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:4233,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:5155,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:5922,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:13380,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:13963,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:16828,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:17833,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:18079,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:19893,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"}],source:"https://sourcify.dev/server/v2/contract/4663/0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602",match:"exact_match"},"0x8366a39CC670B4001A1121B8F6A443A643e40951":{role:"poolManager",address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",codeHash:"0xbd3881180b547f5fe817545743cfb4343e96b1bc6640dcd70c106b0066e95626",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8366a39CC670B4001A1121B8F6A443A643e40951",match:"match"},"0xfAFEcE64099C1E791C4B46189c277f00c0c7e00b":{role:"familyLockLegacy",address:"0xfAFEcE64099C1E791C4B46189c277f00c0c7e00b",codeHash:"0x4204916844297bc548ef02a5d081effd33e31fc4a4fab0b34ced52c17e53e535",dependencies:["0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4","0x8366a39CC670B4001A1121B8F6A443A643e40951"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xfAFEcE64099C1E791C4B46189c277f00c0c7e00b",match:"exact_match"},"0x8567369a70100828611BB6F44ec051B48F10fb59":{role:"HookrLaunchChecks_856736",address:"0x8567369a70100828611BB6F44ec051B48F10fb59",codeHash:"0xb9f17232100ac1ac05e9b662e916abad854f650156c67585bde7e99237d3cfca",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8567369a70100828611BB6F44ec051B48F10fb59",match:"exact_match"},"0xE703F2Cd21A8dEE05dbC81b693201D602772B2d8":{role:"HookrTokenDeployer_e703f2",address:"0xE703F2Cd21A8dEE05dbC81b693201D602772B2d8",codeHash:"0xb54e618fb33b3fb0591e482cb878ef5d7fcc3758576f6b9840eeb6557fc063f8",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xE703F2Cd21A8dEE05dbC81b693201D602772B2d8",match:"exact_match"},"0x1B23D6d7beBcB61E39317E9F0Bc02AEB91aFCcAe":{role:"HookrTokenDeployer_1b23d6",address:"0x1B23D6d7beBcB61E39317E9F0Bc02AEB91aFCcAe",codeHash:"0x724642470fbeef5a98a04b009376e10af722b96f932d992b256e412c4ea989b5",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x1B23D6d7beBcB61E39317E9F0Bc02AEB91aFCcAe",match:"exact_match"},"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1":{role:"HookrRegistryAdmin_675ac2",address:"0x675ac2102E8c69E2467F64656E3c235AF3901Ac1",codeHash:"0x070ba14bedd7b9c3c259998af44032ace80a49dc5d741d604fa1b82fd7737abc",dependencies:["0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"],links:[{start:215,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:1054,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:2745,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"},{start:3987,length:20,address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98"}],source:"https://sourcify.dev/server/v2/contract/4663/0x675ac2102E8c69E2467F64656E3c235AF3901Ac1",match:"exact_match"},"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98":{role:"HookrRegistryChecks_b9f5c5",address:"0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98",codeHash:"0xbf12974a6e59bc744e8d29bf9308c888e97e562693324dca7e8bdf20e0f81349",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xB9F5c54E5Cc7ac6c7a96335E5A334Cf4eA496E98",match:"exact_match"},"0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9":{role:"immutable_C2Bc9a3f",address:"0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9",codeHash:"0x855177b2017e7b73a79cb0c7b3027044beb5e726fbdc0fd2937229e32ecd7e0b",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602","0xe7863CC0E2Fb783b44c279aB159bcD812c2ceA1c"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9",match:"exact_match"},"0x445D7891381Aa7F91F5048EdBC6a611ccBDe7865":{role:"immutable_445D7891",address:"0x445D7891381Aa7F91F5048EdBC6a611ccBDe7865",codeHash:"0x1623e56a309a31e3626b854cd87623d62e39f743e2943d1f36ba13d677cef67a",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x445D7891381Aa7F91F5048EdBC6a611ccBDe7865",match:"exact_match"},"0x8876789976dEcBfCbBbe364623C63652db8C0904":{role:"immutable_88767899",address:"0x8876789976dEcBfCbBbe364623C63652db8C0904",codeHash:"0x2ce6aaaf9f4151f5e1cbf774668772f17f532ae11b15e9284fd0a072a8b0fbde",dependencies:["0x7332D11BD10d18A04B119Cd4671a96f3148002c4","0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3","0x58daec3116aae6D93017bAAea7749052E8a04fA7","0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x000000000022D473030F116dDEE9F6B43aC78BA3","0x8bcEaA40B9AcdfAedF85AdF4FF01F5Ad6517937f","0x1f7d7550B1b028f7571E69A784071F0205FD2EfA","0x8366a39CC670B4001A1121B8F6A443A643e40951"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8876789976dEcBfCbBbe364623C63652db8C0904",match:"match"},"0x9A8a1006469BA196f8FEfc017a53505C83A060BB":{role:"immutable_9A8a1006",address:"0x9A8a1006469BA196f8FEfc017a53505C83A060BB",codeHash:"0x0b71a0db955a7a000d3bd3cd721c74cbbf1870eaaf02c1274542c834f8591f1f",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x9A8a1006469BA196f8FEfc017a53505C83A060BB",match:"exact_match"},"0x2242F7FC75606500503075f29ea8cDA684EfB4a9":{role:"immutable_2242F7FC",address:"0x2242F7FC75606500503075f29ea8cDA684EfB4a9",codeHash:"0x95d1784c555685e9ccbc0ba9f6d1e6facea864fd1de77ebbc98862dcf2c13454",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x2242F7FC75606500503075f29ea8cDA684EfB4a9",match:"exact_match"},"0x97D440593912234b78432A030fb5186BD2A3Bc86":{role:"immutable_97D44059",address:"0x97D440593912234b78432A030fb5186BD2A3Bc86",codeHash:"0x1f622db841d81a460cced260dc6cc89810ea0b20d5ecaeaa12e170ba4d110823",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x2242F7FC75606500503075f29ea8cDA684EfB4a9"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x97D440593912234b78432A030fb5186BD2A3Bc86",match:"exact_match"},"0x8D0583b408e2959FA0450c54F749C1A4Dad3d335":{role:"immutable_8D0583b4",address:"0x8D0583b408e2959FA0450c54F749C1A4Dad3d335",codeHash:"0x1825f945ef04d5304707da468929c33dcf125db20d9c0292d98952455a393775",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x2242F7FC75606500503075f29ea8cDA684EfB4a9"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8D0583b408e2959FA0450c54F749C1A4Dad3d335",match:"exact_match"},"0x0B0f08c381ed6902FAb74b470fe7f8A58E8EA269":{role:"immutable_0B0f08c3",address:"0x0B0f08c381ed6902FAb74b470fe7f8A58E8EA269",codeHash:"0xd48b4c4fb93299f401452de225d70df49a903f4874bccb0b98f44f0951b1b5cb",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x0B0f08c381ed6902FAb74b470fe7f8A58E8EA269",match:"exact_match"},"0xc42E47679dd06DDcC07acc72ca710f6E60ACC3A9":{role:"immutable_c42E4767",address:"0xc42E47679dd06DDcC07acc72ca710f6E60ACC3A9",codeHash:"0x9f810ec150181c58ed3af00c5b1be7b5d974b5b34450c7d1918d0cf70c5ac2ae",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xc42E47679dd06DDcC07acc72ca710f6E60ACC3A9",match:"exact_match"},"0xdA360B744F8C816acbb97fF65cC4Cd81e27Df375":{role:"immutable_dA360B74",address:"0xdA360B744F8C816acbb97fF65cC4Cd81e27Df375",codeHash:"0xbc34e16733f65147eae2f6d5247847c19327ed4d2d40b84549b79ce17e40c450",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xdA360B744F8C816acbb97fF65cC4Cd81e27Df375",match:"exact_match"},"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432":{role:"immutable_8004A169",address:"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",codeHash:"0xd0e45b1d89fa9b6cc7e97c1f155d64180e5c232aaccf9900ef9d4fd738c02b41",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",match:"exact_match"},"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63":{role:"immutable_8004BAa1",address:"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",codeHash:"0xd0e45b1d89fa9b6cc7e97c1f155d64180e5c232aaccf9900ef9d4fd738c02b41",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",match:"exact_match"},"0x8Fdfaa25e2E4dDa297F301ea06458f22186D6bE9":{role:"immutable_8Fdfaa25",address:"0x8Fdfaa25e2E4dDa297F301ea06458f22186D6bE9",codeHash:"0x4e381985ca68b3e5d27b4425fa581c19cf33146d3f887a3cfca96f55528ea46f",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8Fdfaa25e2E4dDa297F301ea06458f22186D6bE9",match:null},"0x000000000022D473030F116dDEE9F6B43aC78BA3":{role:"immutable_00000000",address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",codeHash:"0x5208783f52488f7d3493e5e38311ab707c1d75457fe472a19b0b4d57d66a7fca",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x000000000022D473030F116dDEE9F6B43aC78BA3",match:"match"},"0x1172a3cC44ce8E8E3F1f0e58a9A0E9678b7118f8":{role:"immutable_1172a3cC",address:"0x1172a3cC44ce8E8E3F1f0e58a9A0E9678b7118f8",codeHash:"0xb1d8b1d6a6626ee859cc0c5a2725078fb62245d730015b3405974928fba6e5c1",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x2242F7FC75606500503075f29ea8cDA684EfB4a9"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x1172a3cC44ce8E8E3F1f0e58a9A0E9678b7118f8",match:"exact_match"},"0xe5FCbB899C95B4c7cd3afFfd1f4EB093138870A2":{role:"immutable_e5FCbB89",address:"0xe5FCbB899C95B4c7cd3afFfd1f4EB093138870A2",codeHash:"0x479a933df7325219942f75f36046f731ed7409f96e0c279e9912e2d0ed5ee0ed",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xe5FCbB899C95B4c7cd3afFfd1f4EB093138870A2",match:"exact_match"},"0xFA66c713bb10298B47E0afC43389212F279E8245":{role:"immutable_FA66c713",address:"0xFA66c713bb10298B47E0afC43389212F279E8245",codeHash:"0x6731ed800a1eb9d083f640ad8c00f94dc0cb3461c3f5124a21349ad30c8e6e28",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xFA66c713bb10298B47E0afC43389212F279E8245",match:"exact_match"},"0xF83569E564d70daebc35950f66a73f2e2B915583":{role:"immutable_F83569E5",address:"0xF83569E564d70daebc35950f66a73f2e2B915583",codeHash:"0xb78c68d64388c9c0c4d20faa3d429309a6a025024c3eefc579831bb10de145ed",dependencies:["0x8366a39CC670B4001A1121B8F6A443A643e40951","0x2242F7FC75606500503075f29ea8cDA684EfB4a9","0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xF83569E564d70daebc35950f66a73f2e2B915583",match:"exact_match"},"0xe7863CC0E2Fb783b44c279aB159bcD812c2ceA1c":{role:"immutable_e7863CC0",address:"0xe7863CC0E2Fb783b44c279aB159bcD812c2ceA1c",codeHash:"0x3242bd3dea1be9c1ffd17b23475f2d1d11fb5ee9cdbe8328b309b7adb8427043",dependencies:["0x000000000022D473030F116dDEE9F6B43aC78BA3","0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602","0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0xe7863CC0E2Fb783b44c279aB159bcD812c2ceA1c",match:"exact_match"},"0x7332D11BD10d18A04B119Cd4671a96f3148002c4":{role:"immutable_7332D11B",address:"0x7332D11BD10d18A04B119Cd4671a96f3148002c4",codeHash:"0xb16b4aa5c5f14b9d186d48bb074c2d02a96e9e2e3aef74d0815f6d4a9a9f7bdd",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x7332D11BD10d18A04B119Cd4671a96f3148002c4",match:null},"0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3":{role:"immutable_73991a25",address:"0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3",codeHash:"0x0a493d1af3d0f25fed8efa205244ebee14114267a08647fc38c515c7cd6ead4f",dependencies:["0x6F84dAE9c064ff453E5C8af51EfB819f8f610225","0x1f7d7550B1b028f7571E69A784071F0205FD2EfA","0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3",match:"match"},"0x58daec3116aae6D93017bAAea7749052E8a04fA7":{role:"immutable_58daec31",address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",codeHash:"0xc873e135dc9aaec88489cfbad146b4cb49d6a32e0d80326377784b7ba17670b2",dependencies:["0x9639443158E8C5efa35Bd45287bf2EFfd3D8dC06","0x8366a39CC670B4001A1121B8F6A443A643e40951","0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x000000000022D473030F116dDEE9F6B43aC78BA3"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x58daec3116aae6D93017bAAea7749052E8a04fA7",match:"match"},"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73":{role:"immutable_0Bd7D308",address:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",codeHash:"0x5706be52f64875fee65a2cec0d80e47a23d8793cbe85d214b48445e2d05f5353",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",match:"exact_match"},"0x8bcEaA40B9AcdfAedF85AdF4FF01F5Ad6517937f":{role:"immutable_8bcEaA40",address:"0x8bcEaA40B9AcdfAedF85AdF4FF01F5Ad6517937f",codeHash:"0xbab145d02e7005f0d84c6c1639d39b799b0ea16df99ebbdaf5a14d9da820b4e0",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x8bcEaA40B9AcdfAedF85AdF4FF01F5Ad6517937f",match:"exact_match"},"0x1f7d7550B1b028f7571E69A784071F0205FD2EfA":{role:"immutable_1f7d7550",address:"0x1f7d7550B1b028f7571E69A784071F0205FD2EfA",codeHash:"0xec72b1abd1f2faee020cfea9c646bd8994f9fb389054f6e574f103a895091739",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x1f7d7550B1b028f7571E69A784071F0205FD2EfA",match:"match"},"0x6F84dAE9c064ff453E5C8af51EfB819f8f610225":{role:"immutable_6F84dAE9",address:"0x6F84dAE9c064ff453E5C8af51EfB819f8f610225",codeHash:"0x6c57ccabb87f0ac1de9a2115c27e517cc87c3c1e3dd3ac407d1a42d19a327c86",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x6F84dAE9c064ff453E5C8af51EfB819f8f610225",match:null},"0x9639443158E8C5efa35Bd45287bf2EFfd3D8dC06":{role:"immutable_96394431",address:"0x9639443158E8C5efa35Bd45287bf2EFfd3D8dC06",codeHash:"0x09d3b199609b46e8921e47c5d0d98ae083e70d2d3b63a6099dc7e947b2f58b20",dependencies:["0x525b4bd46d3A33F16ac815B4A303b3110fB9d10b"],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x9639443158E8C5efa35Bd45287bf2EFfd3D8dC06",match:"match"},"0x525b4bd46d3A33F16ac815B4A303b3110fB9d10b":{role:"immutable_525b4bd4",address:"0x525b4bd46d3A33F16ac815B4A303b3110fB9d10b",codeHash:"0x7664c06c3ff64366b0c870eb585d9d80aa5730441eccca3025054e0366a20d0b",dependencies:[],links:[],source:"https://sourcify.dev/server/v2/contract/4663/0x525b4bd46d3A33F16ac815B4A303b3110fB9d10b",match:"match"}},gateVersions:{identity:"0x9da4ea57e56972d6b59b74df977e55a996eba90167c2c0c7bb2e46873c9acc31",reputation:"0x9da4ea57e56972d6b59b74df977e55a996eba90167c2c0c7bb2e46873c9acc31"},launcherDeployments:{"0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C":{transactionHash:"0xdf5b507c60f4941edbc4666c624a900701631cac3ef06ab3756c28e5e3f60580",blockNumber:"103300226",transactionIndex:"4",deployer:"0x0c0967485A25F18E70262a2Ee80c7595CC64a5fC"},"0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4":{transactionHash:"0xa48e4cf08e0020fbfb40067a041fcacd3bb0bb4c6dcd3358c10d16021d49a31f",blockNumber:"82270054",transactionIndex:"3",deployer:"0x0c0967485A25F18E70262a2Ee80c7595CC64a5fC"}}};var o=A.roles,C=0x2accn,i=A.contracts;async function h(c,e,a){let b=F(e.address),s=await c.getCode({address:b,blockNumber:a});if(!s||s==="0x"||x(s)!==e.codeHash)throw new d(`Hookr runtime code is unknown or drifted at ${b}. Refresh the reviewed deployment pins before using this route.`);for(let t of e.links)if(t.length!==20||`0x${s.slice(2+t.start*2,2+(t.start+t.length)*2)}`.toLowerCase()!==t.address.toLowerCase())throw new d("Hookr linked library differs from its reviewed pin.")}function l(c){let e=i[F(c)];if(!e)throw new d("Unknown Hookr deployment. Use a locally reviewed Launcher, Root, core and gate.");return e}async function p(c,e,a,b=new Set){if(e<0n)throw new d("Provide a nonnegative named Hookr block.");if((BigInt(o.rootV1)&0x3fffn)!==C)throw new d("HookrRoot permission mask differs from 0x2acc.");let s=new Map,t=r=>{let f=l(r);if(!s.has(f.address)){s.set(f.address,f);for(let E of f.dependencies)t(E)}};a.forEach(t);let n=[...s.values()].filter(r=>!b.has(r.address));for(let r=0;r<n.length;r+=2)await Promise.all(n.slice(r,r+2).map(async f=>{await h(c,f,e),b.add(f.address)}))}async function k(c,e){if(await c.getChainId()!==4663)throw new d("Hookr reads require Robinhood Chain 4663.");let a=await c.getBlock(e===void 0?{}:{blockNumber:e});if(a.number===null||!a.hash||typeof a.timestamp!="bigint"||e!==void 0&&a.number!==e)throw new d("Hookr named block is unavailable. Retry against an available block.");return{number:a.number,hash:a.hash,timestamp:a.timestamp}}async function g(c,e){if((await c.getBlock({blockNumber:e.number})).hash!==e.hash)throw new d("Hookr named block changed during the read. Retry the complete read.")}function y(c){if(typeof c!="string"||![o.launcherV1,o.launcherLegacy].includes(c))throw new d("Use the checksummed current or previous reviewed Hookr Launcher address.");return F(c)}export{A as a,o as b,C as c,i as d,h as e,l as f,p as g,k as h,g as i,y as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as L,j as i,k as d,l as w,m as y,n as D,o as f,p as l,q as h,r as _,s as q,t as r}from"./XRDLMTBJ.js";import{a as O,f as F}from"./MQK6OP7S.js";import{a as c}from"./XSD5NL7J.js";import{encodeAbiParameters as M,getAddress as B,keccak256 as j,parseAbi as $,zeroHash as N}from"viem";var Y="0x167ba3b15d65044b17c87154087d35fc5efde07538be66b804a54e63d6089136",z=$(["function getVersion() view returns (string)"]),E=B("0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"),R=B("0x8004BAa17C55a88189AE136b182e5fdA19dE9b63");function ee(n,s){let e=y(n),o=y(e.caps),t=i(e.gasLimit,32),m=i(o.maxLpFeePips,24);if(s!==Y||e.schemaHash!==Y||e.codeHash!==F(r).codeHash||e.implementation!==r||i(e.kind,8)!==1n||i(e.phaseMask,8)!==1n||d(e.failOpen)||t<400000n||t>2000000n||m>50000n||i(o.maxQuoteTakePips,24)!==0n||i(o.maxSubjectTakeBps,16)!==0n)throw new c("Hookr agent gate admission, schema or execution caps differ from the supported fail-closed BEFORE_SWAP profile. Review the deployment before entry.");return d(e.feeOnly),{...e,caps:o}}async function oe(n,s,e,o=[]){let t=(a,p=[])=>l(n,r,f("agentGateV1"),a,p,s),[m,A,S,g,x,v,k,H,Q,U,W,X]=await Promise.all([t("configSchemaHash"),l(n,_,f("registry"),"admission",[h,r],s),t("retired"),t("identity"),t("reputation"),t("poolManager"),t("isAgent",[e]),t("linkOf",[e]),t("MIN_ADVISORY_GAS"),t("MAX_ADVISORY_GAS"),l(n,E,z,"getVersion",[],s),l(n,R,z,"getVersion",[],s)]),J=ee(A,m);if(g!==E||x!==R||v!==q||i(Q)!==400000n||i(U)!==2000000n)throw new c("Hookr gate dependencies or gas limits differ from the reviewed profile.");let C=a=>{if(typeof a!="string"||new TextEncoder().encode(a).length>32)throw new c("Hookr registry version read is incomplete.");return j(M([{type:"string"}],[a]))},I=C(W)!==O.gateVersions.identity,K=C(X)!==O.gateVersions.reputation,P=I||K,u=d(S),T=w(H,2),Z=await Promise.all(o.map(async a=>{let[p,b]=w(await t("reviewerSet",[a]),2);if(!Array.isArray(p)||p.length===0||p.length>32||typeof b!="string")throw new c("Reviewer set is unregistered or unavailable. Supply an existing registered bytes32 set ID.");let V=p.map(G=>B(String(G)));if(V.some(G=>BigInt(G)===0n)||j(M([{type:"address[]"},{type:"string"}],[V,b]))!==a.toLowerCase())throw new c("Hookr reviewer set does not match its registered ID.");return{id:a,clients:V,tag:b}}));return{address:r,healthy:!u&&!P,healthyIdentityOnly:!u&&!I,healthyForScores:!u&&!P,retired:u,registryVersionDrift:P,schemaHash:m,admission:D(J),identity:E,reputation:R,walletAgent:d(k),link:{linked:d(T[0]),agentId:i(T[1]).toString()},reviewerSets:Z,reviewerSetsComplete:!1,reviewerSetsNotice:"Only explicitly requested registered set IDs are read. This is not an enumeration. No reviewed Priors alias is configured; provide a registered bytes32 set ID.",termsSchema:{flags:"uint16",minScore:"uint32",tierScore:"uint32",tierPips:"uint24",reviewers:"bytes32"},defaults:{flags:"1",minScore:"0",tierScore:"0",tierPips:"0",reviewers:N},maxTierPips:"50000",minGas:"400000",maxGas:"2000000"}}async function ae(n,s,e,o,t){if(BigInt(t)===0n)return{gated:!1,admissionRequiredForCollectOrRemove:!1};if(t!==r)throw new c("This position uses an unreviewed advisory. Gate status is unknown.");let[m,A,S]=await Promise.all([l(n,r,f("agentGateV1"),"terms",[h,e],s),l(n,r,f("agentGateV1"),"explainLiquidity",[h,e,o],s),l(n,r,f("agentGateV1"),"retired",[],s)]),g=y(m),[x,v]=w(A,2);if(!d(g.bound)||g.launcher!==o)throw new c("Hookr gate is not bound to this family Launcher.");for(let[k,H]of[["flags",16],["minScore",32],["tierScore",32],["tierPips",24]])i(g[k],H);return L(g.reviewers),{gated:!0,gate:r,terms:D(g),retired:d(S),liquidityEntryAllowed:d(x),entryReason:i(v,8).toString(),admissionRequiredForCollectOrRemove:!1}}export{Y as a,ee as b,oe as c,ae as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./G2LAO23N.js";import{c as O,d as z,e as g}from"./ZFRTBBIW.js";import{a as m}from"./66F5ZH34.js";import{c as u,f as B,g as p,i as D}from"./NWNYJ26T.js";import{b as H}from"./TI727O2H.js";import{a as i}from"./XSD5NL7J.js";import{decodeEventLog as W,encodeFunctionData as Q,getAddress as V,hashStruct as Y,isHex as J,parseAbi as Z,zeroAddress as k}from"viem";var ee="struct HookrSwapIntent { PoolKey key; bool zeroForOne; int128 amountSpecified; uint128 amountBound; uint160 sqrtPriceLimitX96; address recipient; address relayer; uint256 relayerFee; address engagement; uint256[] campaigns; uint256 nonce; uint256 deadline; }",I=Z(["struct PoolKey { address currency0; address currency1; uint24 fee; int24 tickSpacing; address hooks; }",ee,"function execute(HookrSwapIntent intent, address owner, bytes signature) returns (uint256 amountIn, uint256 amountOut)","function hashIntent(HookrSwapIntent intent) pure returns (bytes32)","function pullOf(HookrSwapIntent intent) view returns (address token, uint256 amount, bool feeFromInput)","function isNonceUsed(address owner, uint256 intentNonce) view returns (bool)","function router() view returns (address)","function registry() view returns (address)","function permit2() view returns (address)","event IntentExecuted(bytes32 indexed intentHash,address indexed owner,address indexed relayer,bytes32 poolId,uint256 amountIn,uint256 amountOut,uint256 relayerFee,bool feeFromInput)"]),te={PoolKey:[{name:"currency0",type:"address"},{name:"currency1",type:"address"},{name:"fee",type:"uint24"},{name:"tickSpacing",type:"int24"},{name:"hooks",type:"address"}],HookrSwapIntent:[{name:"key",type:"PoolKey"},{name:"zeroForOne",type:"bool"},{name:"amountSpecified",type:"int128"},{name:"amountBound",type:"uint128"},{name:"sqrtPriceLimitX96",type:"uint160"},{name:"recipient",type:"address"},{name:"relayer",type:"address"},{name:"relayerFee",type:"uint256"},{name:"engagement",type:"address"},{name:"campaigns",type:"uint256[]"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},ne=V("0x000000000022D473030F116dDEE9F6B43aC78BA3"),P={key:{type:"object",description:"Uniswap v4 PoolKey of the pool to swap in.",properties:{currency0:{...u,description:"Lower-sorted pool token address; the zero address is native ETH, which cannot be the relay input."},currency1:{...u,description:"Higher-sorted pool token address; must be greater than currency0."},fee:{type:"integer",description:x.pips()},tickSpacing:{type:"integer",description:"Pool tick spacing, a positive integer."},hooks:{...u,description:"Address of the pool hook contract."}},required:["currency0","currency1","fee","tickSpacing","hooks"],additionalProperties:!1},zeroForOne:{type:"boolean",description:"True swaps currency0 for currency1 (input is currency0); false swaps currency1 for currency0."},amountSpecified:{type:"string",pattern:"^-?[0-9]+$",description:'Signed amount in base units: negative = exact input of the input token, positive = exact output of the output token. Example: "-1000000" = 1 USDG in, if USDG (6 decimals) is the input.'},amountBound:{...m(),description:"Slippage bound in base units: minimum output token if amountSpecified is negative, maximum input token if positive. Must be nonzero; read that token's decimals."},sqrtPriceLimitX96:{...m(),description:"Swap price limit as a Q64.96 sqrt price, decimal string."},recipient:{...u,description:x.recipient("account that receives the swap output")},relayer:{...u,description:"Address of the relayer allowed to submit this intent (must be the submitting wallet), or the zero address for an open relay with no fee."},relayerFee:{...m(),description:"Fee paid to the relayer in base units of the fee token (the input token if charged on input, else the output token); read its decimals. Must be 0 for an open relay."},engagement:{...u,description:"Address of the Hookr engagement contract for campaign credit, or the zero address when campaigns is empty."},campaigns:{type:"array",items:m(),maxItems:8,description:"Up to eight campaign IDs (decimal strings) to credit; empty when engagement is the zero address."},nonce:{...m(),description:"Unique Permit2-style intent nonce of the trader, a decimal string; each nonce can execute once."},deadline:{...m(),description:"Intent expiry as a Unix seconds timestamp; the relay fails after this time."}},F={owner:{...u,description:x.recipient("trader who signed the intent and supplies the input funds")},signature:{type:"string",pattern:"^0x[0-9a-fA-F]+$",description:"The trader's Permit2 witness signature over the intent, as 0x-prefixed hex."},intent:{type:"object",description:"The complete trader-signed Hookr swap intent.",properties:P,required:Object.keys(P),additionalProperties:!1}};function N(n){return B(n,"Provide a complete trader-signed Hookr intent.")}function l(n,o=256,e=!1){if(typeof n!="string"||!/^-?\d+$/.test(n)||n.length>79)throw new i("Hookr intent amounts, nonce and deadline must be decimal base-unit strings.");let t=BigInt(n);if(e?t<=-(1n<<BigInt(o-1))||t>=1n<<BigInt(o-1):t<0n||t>=1n<<BigInt(o))throw new i("Hookr intent integer is outside its ABI range.");return t}function y(n){return D(n,"Provide valid Hookr intent addresses.")}function q(n,o){if(Object.keys(n).some(s=>!Object.hasOwn(F,s)))throw new i("Provide only owner, intent and the trader signature for Hookr relay.");let e=N(n.intent);if(Object.keys(e).some(s=>!Object.hasOwn(P,s)))throw new i("Hookr intent contains an undocumented field.");let t=N(e.key);if(Object.keys(t).some(s=>!["currency0","currency1","fee","tickSpacing","hooks"].includes(s))||typeof t.fee!="number"||!Number.isInteger(t.fee)||t.fee<0||t.fee>16777215||typeof t.tickSpacing!="number"||!Number.isInteger(t.tickSpacing)||t.tickSpacing<=0||t.tickSpacing>8388607||typeof e.zeroForOne!="boolean")throw new i("Provide a valid canonical v4 pool key and direction.");let a={currency0:y(t.currency0),currency1:y(t.currency1),fee:t.fee,tickSpacing:t.tickSpacing,hooks:y(t.hooks)};if(BigInt(a.currency0)>=BigInt(a.currency1))throw new i("Hookr pool currencies must sort strictly by address.");let r=y(n.owner);if(r===k||p(r,o))throw new i("Hookr relay requires another trader as owner; the relayer funds gas only.");if(!Array.isArray(e.campaigns)||e.campaigns.length>8)throw new i("Provide at most eight Hookr campaign IDs.");let c={key:a,zeroForOne:e.zeroForOne,amountSpecified:l(e.amountSpecified,128,!0),amountBound:l(e.amountBound,128),sqrtPriceLimitX96:l(e.sqrtPriceLimitX96,160),recipient:y(e.recipient),relayer:y(e.relayer),relayerFee:l(e.relayerFee),engagement:y(e.engagement),campaigns:e.campaigns.map(s=>l(s)),nonce:l(e.nonce),deadline:l(e.deadline)};if(c.amountSpecified===0n||c.amountBound===0n)throw new i("Hookr intent input/output amounts and bound must be nonzero.");if([k,g,O].some(s=>p(s,c.recipient)))throw new i("Hookr intent recipient is reserved.");if(c.relayer!==k&&!p(c.relayer,o)||c.relayer===k&&c.relayerFee!==0n)throw new i("Hookr intent names a different relayer or an open relay with a fee.");if(c.engagement===k!=(c.campaigns.length===0))throw new i("Hookr engagement and campaigns must be supplied together.");let f=c.zeroForOne?a.currency0:a.currency1;if(f===k)throw new i("Hookr Permit2 relay cannot pull native ETH input.");if(typeof n.signature!="string"||!J(n.signature,{strict:!0})||n.signature.length<4||n.signature.length%2!==0||n.signature.length>16386)throw new i("Provide the trader-signed Permit2 witness signature, never a private key.");let S=n.signature,w=Y({data:c,primaryType:"HookrSwapIntent",types:te});return{owner:r,intent:c,signature:S,input:f,intentHash:w}}function U(n,o){let{owner:e,intent:t,signature:a}=q(n,o);return{chainId:H,to:g,value:"0",data:Q({abi:I,functionName:"execute",args:[t,e,a]}),description:`Relay Hookr trader ${e} to recipient ${t.recipient}; relayer fee ${t.relayerFee} in pool quote currency. Relayer pays gas; owner supplies Permit2 funds.`}}function ue(n,o,e){let t=U(o,e);if(n.length!==1||n[0].chainId!==t.chainId||!p(n[0].to,t.to)||n[0].value!=="0"||!p(n[0].data,t.data))throw new i("Hookr relay calldata differs from the locally requested signed intent.")}function pe(n){return[{name:"hookr_relay",inputSchema:{type:"object",description:"Preview a trader-signed Permit2 swap for local human-confirmed submission. Relayer pays gas; the trader supplies input. No signature is created by this tool.",properties:F,required:Object.keys(F),additionalProperties:!1},execute:async(o,e)=>{let t=q(o,e),{owner:a,intent:r,signature:c,input:f,intentHash:S}=t,w=n.clientFor(H),s=await w.getBlock();if(typeof s.number!="bigint"||typeof s.timestamp!="bigint"||s.timestamp<=0n||s.timestamp>r.deadline)throw new i("Hookr signed intent expired or the chain timestamp is unavailable.");let h=(X,G=[])=>w.readContract({address:g,abi:I,functionName:X,args:G,blockNumber:s.number}),[j,d,_,K,$,L]=await Promise.all([h("hashIntent",[r]),h("pullOf",[r]),h("isNonceUsed",[a,r.nonce]),h("router"),h("registry"),h("permit2")]);if(j!==S||_!==!1||K!==O||$!==z||L!==ne)throw new i("Hookr intent hash, nonce or forwarder deployment is invalid. Ask the trader for a fresh signed intent.");if(!Array.isArray(d)||d.length!==3||typeof d[0]!="string"||!p(d[0],f)||typeof d[1]!="bigint"||typeof d[2]!="boolean")throw new i("Hookr Permit2 pull could not be verified.");let b=d[2],A=r.amountSpecified<0n?-r.amountSpecified:r.amountBound;if(d[1]!==A+(b?r.relayerFee:0n)||r.amountSpecified>0n&&!b&&r.relayerFee>r.amountSpecified)throw new i("Hookr Permit2 pull or output-side fee differs from the signed terms.");let C=await w.simulateContract({address:g,abi:I,functionName:"execute",args:[r,a,c],account:e,blockNumber:s.number}),[R,T]=C.result,E=r.amountSpecified<0n?r.amountBound:r.amountSpecified-(b?0n:r.relayerFee);if(R>A||T<E)throw new i("Hookr relay simulation did not satisfy the signed input/output bounds.");let v=[n.unsignedTx(U(o,e))],M=await n.preview(v,e);return{txs:v,preview:M,summary:v[0].description,intentHash:S,owner:a,recipient:r.recipient,relayer:e,inputToken:f,maximumPull:d[1].toString(),feeToken:b?f:r.zeroForOne?r.key.currency1:r.key.currency0,relayerFee:r.relayerFee.toString(),feeFromInput:b,minimumOutput:E.toString(),simulatedAmountIn:R.toString(),simulatedAmountOut:T.toString(),note:"Verify IntentExecuted in the receipt and your fee balance after submission."}}},{name:"hookr_relay_receipt",inputSchema:{type:"object",description:"Read the executed intent and fee from a mined Hookr relay receipt.",properties:{transactionHash:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:"Hash of the mined relay transaction: 32 bytes, 0x followed by 64 hex digits."}},required:["transactionHash"],additionalProperties:!1},execute:async o=>{if(Object.keys(o).some(a=>a!=="transactionHash")||typeof o.transactionHash!="string"||!/^0x[0-9a-fA-F]{64}$/.test(o.transactionHash))throw new i("Provide a Hookr relay transactionHash.");let e=await n.clientFor(H).getTransactionReceipt({hash:o.transactionHash});if(e.status!=="success")throw new i("Hookr relay reverted. No fee is proven paid.");let t=e.logs.filter(a=>p(a.address,g)).flatMap(a=>{try{let r=W({abi:I,eventName:"IntentExecuted",topics:a.topics,data:a.data});return[{...r.args,amountIn:r.args.amountIn.toString(),amountOut:r.args.amountOut.toString(),relayerFee:r.args.relayerFee.toString()}]}catch{return[]}});if(!t.length)throw new i("Receipt contains no verified Hookr IntentExecuted event.");return{chainId:H,transactionHash:e.transactionHash,blockNumber:e.blockNumber.toString(),intents:t,note:"Event evidence at this mined block; check balances and finality."}}}]}export{I as a,q as b,U as c,ue as d,pe as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l}from"./BA66J5YQ.js";import{a}from"./XSD5NL7J.js";var m=4295128739n,h=1461446703485210103287273052203988822378723970342n,d=-887272,$=887272;function I(t){if(t<2n)return t;let n=t,i=n+1n>>1n;for(;i<n;)n=i,i=n+t/n>>1n;return n}function w(t,n){if(typeof t!="string"||!/^\d+(?:\.\d+)?$/.test(t.trim()))throw new a(`${n} must be a positive decimal string such as "3000.5".`);let[i,e=""]=t.trim().split("."),r=BigInt(`${i}${e}`);if(r<=0n)throw new a(`${n} must be greater than zero.`);return{n:r,d:10n**BigInt(e.length)}}function _(t,n,i){let{n:e,d:r}=w(t,"initialPrice"),s=e*10n**BigInt(i),o=r*10n**BigInt(n),c=I((s<<192n)/o);return b(c)}function b(t){if(t<m||t>=h)throw new a("Initial price is outside the range Uniswap can represent.");return t}function S(t){b(t);let n=d,i=$;for(;n<i;){let e=Math.ceil((n+i)/2);l(e)<=t?n=e:i=e-1}return n}function f(t,n,i){let r=(t*t*10n**BigInt(n+18)/((1n<<192n)*10n**BigInt(i))).toString().padStart(19,"0"),s=r.slice(0,-18),o=r.slice(-18).replace(/0+$/,"");return o?`${s}.${o}`:s}function x(t,n){let i=t*t,e=n*n;return(i>e?i-e:e-i)*10000n/e}var P=500n;function R(t,n,i,e,r){if(n.length===0)return"No other pool for this pair was found, so the starting price could not be checked against a market. Anyone can trade against a wrong price immediately.";let s=[...n].sort((p,u)=>p.sqrtPriceX96<u.sqrtPriceX96?-1:p.sqrtPriceX96>u.sqrtPriceX96?1:0),o=s[Math.floor(s.length/2)],c=x(t,o.sqrtPriceX96),g=`${f(o.sqrtPriceX96,e,r)} (${o.label})`;if(c>P&&!i)throw new a(`Initial price ${f(t,e,r)} is ${c} bps from the existing market price ${g}. A mispriced new pool is arbitraged against your deposit. Fix the price, or pass acceptPriceDeviation:true if this is intentional.`);return`Existing market price ${g}; starting price deviates ${c} bps.`}function T(t,n){return typeof t=="string"&&/^[A-Za-z0-9][A-Za-z0-9.$_-]{0,15}$/.test(t)?t:`${n.slice(0,6)}\u2026${n.slice(-4)}`}export{m as a,h as b,_ as c,b as d,S as e,f,x as g,P as h,R as i,T as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./W32UECOL.js";import{a as v}from"./G2LAO23N.js";import{a as k}from"./66F5ZH34.js";import{c as l}from"./NWNYJ26T.js";import{b as p}from"./TI727O2H.js";import{a as s}from"./XSD5NL7J.js";import{encodeFunctionData as S,getAddress as m,parseAbi as f,zeroAddress as y}from"viem";var C=f(["function tokenizations(address token) view returns ((address creator,address forwarder,bytes32 marketFamilyId,uint64 createdAt))"]),I=f(["function tokenizations(address token) view returns ((address creator,uint8 way,address forwarder,address adapter,address door,bytes32 familyId,bytes32 marketFamilyId,uint64 unlockBlock,uint16 legBps))"]),A=f(["function name() view returns (string)","function symbol() view returns (string)","function decimals() view returns (uint8)","function balanceOf(address account) view returns (uint256)","function totalSupply() view returns (uint256)","function assetCount() view returns (uint256)","function claimable(address account,uint256 asset) view returns (uint256)","function streamSeconds() view returns (uint32)","function tipBps() view returns (uint16)","function doorCount() view returns (uint256)","function dropBox() view returns (address)","function bridge() view returns (address)","function claim(uint256 asset,address to) returns (uint256 amount)","function claimAll(address to) returns (uint256[] amounts)","function sync() returns (uint256 tip)","function syncRange(uint256 start,uint256 count) returns (uint256 tip)","function syncSome(uint256[] doorIds) returns (uint256 tip)"]),O=f(["function dropCount() view returns (uint256)","function claimable(uint256 dropId,address holder) view returns (uint256)","function claim(uint256[] dropIds,address to) returns (uint256[] amounts)"]),w=["0x522723A7a09684515881568Ab8247f3846D66F43","0xfb3c1501c727f30883cd7B36Ec380381af7412Ef"].map(m),P={token:A,drops:O};function R(t){let r=e=>{let o=b(e.type,e.name,`argument of ${t.name}`);return e.type==="address"?{...l,description:o}:e.type==="uint256[]"?{type:"array",items:k(),maxItems:128,description:o}:{...k(),description:o}};return{type:"object",properties:Object.fromEntries(t.inputs.map(e=>[e.name,r(e)])),required:t.inputs.map(e=>e.name),additionalProperties:!1}}function g(t){return Object.entries(P).flatMap(([r,e])=>e.filter(o=>o.stateMutability==="view"===t).map(o=>({target:r,fn:o})))}var j={token:"the revenue token itself",drops:"its derived drop box"};function h(t){return{type:"object",oneOf:g(t).map(({target:r,fn:e})=>({type:"object",properties:{token:{...l,description:v.address("registered Hookr revenue token")},target:{const:r,description:`Contract to call: "${r}", ${j[r]}.`},function:{const:e.name,description:`Function to call: ${e.name}.`},params:{...R(e),description:`Arguments of ${r}.${e.name}; integers are decimal strings.`}},required:["token","target","function","params"],additionalProperties:!1}))}}function H(t,r){if(Object.keys(t).length!==4||Object.keys(t).some(n=>!["token","target","function","params"].includes(n)))throw new s("Provide token, target, function and params for the Hookr revenue operation.");let e=g(r).find(n=>n.target===t.target&&n.fn.name===t.function);if(!e||!t.params||typeof t.params!="object"||Array.isArray(t.params))throw new s("Choose a documented Hookr revenue function and parameter object.");let o;try{o=m(String(t.token))}catch{throw new s("Provide a valid Hookr revenue token address.")}let i=t.params,a=e.fn;if(Object.keys(i).length!==a.inputs.length||Object.keys(i).some(n=>!a.inputs.some(u=>u.name===n)))throw new s("Provide exactly the documented Hookr revenue parameters.");let c=n=>{if(typeof n!="string"||!/^(0|[1-9][0-9]*)$/.test(n)||n.length>78||BigInt(n)>=1n<<256n)throw new s("Revenue token indices and amounts must be decimal base-unit strings.");return BigInt(n)},d=a.inputs.map(n=>{let u=i[n.name];if(n.type==="address")try{return m(String(u))}catch{throw new s("Provide a valid Hookr revenue address.")}if(n.type==="uint256[]"){if(!Array.isArray(u)||u.length>128)throw new s("Provide at most 128 Hookr revenue indices.");return u.map(c)}return c(u)});return{token:o,fn:a,values:d,operation:e}}async function x(t,r,e){let o=t.clientFor(p),i;for(let c of w){let d=c===w[0],n=await o.readContract({address:c,abi:d?C:I,functionName:"tokenizations",args:[r]});if(!n||typeof n.creator!="string"||d&&(!("createdAt"in n)||typeof n.createdAt!="bigint"||n.createdAt<0n||n.createdAt>=1n<<64n))throw new s("Hookr token provenance is unavailable.");if(m(n.creator)!==y&&(!d||"createdAt"in n&&n.createdAt>0n)){i=c;break}}if(!i)throw new s("This token has no record on a pinned Hookr tokenizer.");let a=e?m(await o.readContract({address:r,abi:A,functionName:"dropBox"})):r;if(a===y)throw new s("Hookr revenue drop box is unavailable.");return{to:a,tokenizer:i}}async function F(t,r,e){if(t.network==="testnet")throw new s("Hookr revenue actions require mainnet, chain 4663.");let{token:o,fn:i,values:a}=H(r,!1),{to:c}=await x(t,o,r.target==="drops"),d=i.inputs.findIndex(n=>n.name==="to");if(d>=0&&[y,o,c].includes(a[d]))throw new s("Choose a valid revenue claim recipient.");return{txs:[t.unsignedTx({chainId:p,to:c,value:"0",data:S({abi:[i],functionName:i.name,args:a}),description:`Hookr revenue ${r.target}.${i.name}: ${JSON.stringify(r.params)}. No token approval or principal deposit.`})],inputs:[]}}function D(t){return[{name:"hookr_revenue_read",inputSchema:{...h(!0),description:"Read a registered Hookr revenue token or its derived drop box: balance, claimable, terms and indices. Checks tokenizer provenance on chain."},execute:async r=>{let{token:e,fn:o,values:i}=H(r,!0),{to:a,tokenizer:c}=await x(t,e,r.target==="drops"),d=await t.clientFor(p).readContract({address:a,abi:[o],functionName:o.name,args:i});return{chainId:p,token:e,tokenizer:c,contract:a,function:o.name,result:JSON.parse(JSON.stringify(d,(n,u)=>typeof u=="bigint"?u.toString():u))}}},{name:"hookr_revenue_action",inputSchema:{...h(!1),description:"Preview holder income/drop claims or permissionless sync/syncRange/syncSome on a registered Hookr revenue token. No approvals; local human confirmation required. Claims and syncs are separate actions."},execute:async(r,e)=>{let{txs:o}=await F(t,r,e),i=await t.preview(o,e);return{txs:o,preview:i,summary:`Hookr revenue ${r.function}; verify receipt and holder balances after confirmation.`}}}]}export{w as a,F as b,D as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./XSD5NL7J.js";var p="0x856bb126188bDB5e425D3ac9D59E9ffBD12e6ECf",d=4663,r=46630,u=18,h=6,A=30,v="recipient",P="direct",x="totalSupply",o={4663:{layerbank:{pool:{address:"0x433e21dC2BF027910B1635653c2Eb630bC7dAD43",source:"https://docs.layerbank.finance/",pointer:"/robinhood/pool",block:null,blockKind:"read"},aToken:{address:"0xAd9b5C0ea95Cf998C1A31Aaa8aC7a24de94BeE69",source:"https://docs.layerbank.finance/",pointer:"/robinhood/USDG/aToken",block:null,blockKind:"read"}},pendle:{router:{address:"0x888888888889758F76e7103c6CbF23ABbF58F946",source:"https://docs.pendle.finance/",pointer:"/4663/router",block:null,blockKind:"read"},marketFactory:{address:"0x544BF81c855AE84c1e8b65d5E38770898D01EeE2",source:"https://docs.pendle.finance/",pointer:"/4663/marketFactory",block:null,blockKind:"read"}},pons:{factory:{address:"0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7e",source:"Recorded chain and API observations",pointer:"/pons/factory",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},launchAndBuyRouter:{address:"0xe33E9E479dF8802cb0866d5d05258bEc4cF62948",source:"Recorded chain and API observations",pointer:"/pons/launchAndBuyRouter",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},memeHook:{address:"0xE5e702641Ea86F4ae6cC3cDaeD2B886f976Be044",source:"Recorded chain and API observations",pointer:"/pons/memeHook",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},feeEscrow:{address:"0xd3AFEB2a57f70eF218Aa82451c51B2fb0416Ac9e",source:"Recorded chain and API observations",pointer:"/pons/feeEscrow",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},buybackVault:{address:"0x42df2a798f82289E177311362e8f5ccC45c1219c",source:"Recorded chain and API observations",pointer:"/pons/buybackVault",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},locker:{address:"0x267444D099b10fB5Ed7c3Cc7B7c767AdcA574952",source:"Recorded chain and API observations",pointer:"/pons/locker",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},launchDeployer:{address:"0x3711ceA4feaDE896C913C68F01Eda97Cb06D1A42",source:"Recorded chain and API observations",pointer:"/pons/launchDeployer",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},graduationExecutor:{address:"0xC7819B64A1dAECD7eC19856d026cb14EfBd89046",source:"Recorded chain and API observations",pointer:"/pons/graduationExecutor",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},graduationGuard:{address:"0xf5695117b99B6f6401e67d4195BD653628176C6C",source:"Recorded chain and API observations",pointer:"/pons/graduationGuard",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},poolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/pons/poolManager",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},positionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/pons/positionManager",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"}},oracle:{ethUsdgPool:{address:"0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca",source:"Recorded chain and API observations",pointer:"/ethUsdgPool/address",block:"100307735",blockKind:"read",blockPointer:"/ethUsdgPool/rawReading/block"}},tokens:{USDG:{address:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",source:"Recorded chain and API observations",pointer:"/usdg/address",block:null,blockKind:"latest",caveat:"Token reads around head 100305826; not individually pinned (Part B section 1.2)."},WETH:{address:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",source:"Recorded chain and API observations",pointer:"/routers/wrappedNative",block:null,blockKind:"latest"}},routes:{kyberswap:{address:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",source:"Recorded chain and API observations",pointer:"/routers/kyberswap/router",block:null,blockKind:"latest",caveat:"Historical API target; validate each fresh quote/build chain and target."},velora:{address:"0x6a000f20005980200259b80c5102003040001068",source:"Recorded chain and API observations",pointer:"/routers/velora/router",block:null,blockKind:"latest",caveat:"Historical API target; validate each fresh quote/build chain and target."}},ponsClaims:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",source:"Recorded chain and API observations",pointer:"/addresses/multicall3/address",block:null,blockKind:"unanchored",caveat:"Code present in the source snapshot; exact code-read block not recorded."}},ponsTrade:{universal_router:{address:"0x204faca1764b154221e35c0d20abb3c525710498",source:"Recorded chain and API observations",pointer:"/contracts/universal_router/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},pool_manager:{address:"0x8366a39cc670b4001a1121b8f6a443a643e40951",source:"Recorded chain and API observations",pointer:"/contracts/pool_manager/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},state_view:{address:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b",source:"Recorded chain and API observations",pointer:"/contracts/state_view/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},quoter:{address:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",source:"Recorded chain and API observations",pointer:"/contracts/quoter/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},permit2:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",source:"Recorded chain and API observations",pointer:"/contracts/permit2/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"}},uniswap:{v3_factory:{address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",source:"Recorded chain and API observations",pointer:"/addresses/v3_factory/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},v3_position_manager:{address:"0x73991a25c818bf1f1128deaab1492d45638de0d3",source:"Recorded chain and API observations",pointer:"/addresses/v3_position_manager/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},v4_pool_manager:{address:"0x8366a39cc670b4001a1121b8f6a443a643e40951",source:"Recorded chain and API observations",pointer:"/addresses/v4_pool_manager/address",block:"100363029",blockKind:"snapshot",blockPointer:"/snapshots/v4_block"},v4_position_manager:{address:"0x58daec3116aae6d93017baaea7749052e8a04fa7",source:"Recorded chain and API observations",pointer:"/addresses/v4_position_manager/address",block:"100363029",blockKind:"snapshot",blockPointer:"/snapshots/v4_block"},v4_state_view:{address:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b",source:"Recorded chain and API observations",pointer:"/addresses/v4_state_view/address",block:"100363029",blockKind:"snapshot",blockPointer:"/snapshots/v4_block"},swap_router02:{address:"0xcaf681a66d020601342297493863e78c959e5cb2",source:"Recorded chain and API observations",pointer:"/addresses/swap_router02/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},permit2:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",source:"Recorded chain and API observations",pointer:"/addresses/permit2/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},WETH:{address:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",source:"Recorded chain and API observations",pointer:"/addresses/WETH/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},USDG:{address:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",source:"Recorded chain and API observations",pointer:"/addresses/USDG/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"}},clanker:{factory:{address:"0xD3f2cC1731b7Fd17f28798835C2E02f0a1839A94",source:"Recorded chain and API observations",pointer:"/contracts/factory/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},locker:{address:"0xE4910b09709423aFafD995dD76D8A81CF9134A09",source:"Recorded chain and API observations",pointer:"/contracts/locker/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},legacy_locker_v1:{address:"0x290f735f63824bb5836cde24a35f5103a5b5bc99",source:"Recorded chain and API observations",pointer:"/contracts/legacy_locker_v1/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},fee_locker:{address:"0x88db2340bE5991B2b5Fca2Baee39B5CE048Cd70c",source:"Recorded chain and API observations",pointer:"/contracts/fee_locker/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},fee_static_hook_v2:{address:"0x48B8F6AD3A1b4aA477314c9a23035b8F84dDe8cc",source:"Recorded chain and API observations",pointer:"/contracts/fee_static_hook_v2/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},fee_dynamic_hook_v2:{address:"0x65efDF8Cce99b53C925DF878Df275Df21cB6E8Cc",source:"Recorded chain and API observations",pointer:"/contracts/fee_dynamic_hook_v2/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},mev_module:{address:"0xEA1Fe197dF140e5d88fC6B49f2d21Ea05092299e",source:"Recorded chain and API observations",pointer:"/contracts/mev_module/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},devbuy:{address:"0xa27b1986e5c7e5371Cb6507f87918fBD0302fF5a",source:"Recorded chain and API observations",pointer:"/contracts/devbuy/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},vault:{address:"0x99B2a80ed21c7af1F5cc1A97383DADeEC7DD1427",source:"Recorded chain and API observations",pointer:"/contracts/vault/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},airdrop:{address:"0x6f27372FF493A3855E6746b9a4fe6Ed2Cc3034B5",source:"Recorded chain and API observations",pointer:"/contracts/airdrop/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},paired_weth:{address:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",source:"Recorded chain and API observations",pointer:"/contracts/paired_weth/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"}},clankerDependencies:{pool_manager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/pool_manager/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},position_manager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/position_manager/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},universal_router:{address:"0x53BF6B0684Ec7eF91e1387Da3D1a1769bC5A6F77",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/universal_router/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/permit2/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"}},hoodag:{market:{address:"0xd37C9f7D1a59bceB2BDa47325f14f5789f1176a1",source:"packages/core/test/modules/hoodag/fixtures.json (U5a read-only SIM)",pointer:"/referralRateProbe/market/address",blockPointer:"/referralRateProbe/blockNumber",block:"108260235",blockKind:"read"},registry:{address:"0x3E717dc89AAF4605b607324329EEeB0a8B3C8A1c",source:"Recorded chain and API observations",pointer:"/contracts/registry/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},universalResolver:{address:"0xa9ed3C73F522875F18DAa631429125da893D8E53",source:"Recorded chain and API observations",pointer:"/contracts/universalResolver/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},registrar:{address:"0x9a122C54e15B6287c164b90833bcDA6E16520D50",source:"Recorded chain and API observations",pointer:"/contracts/registrar/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},publicResolver:{address:"0x072C7a66a6D52B23274470b86096AFCBF816CA0B",source:"Recorded chain and API observations",pointer:"/contracts/publicResolver/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},registrarController:{address:"0x7900b2B8Cc3f0616B18C68AdA7E115A9022Ca04a",source:"Recorded chain and API observations",pointer:"/contracts/registrarController/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},reverseRegistrar:{address:"0x4be6D0379f56404B563afAe17c6b095b1dfcf479",source:"Recorded chain and API observations",pointer:"/contracts/reverseRegistrar/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"}},hoodlock:{locker:{address:"0xd0f7d8c6e9f6d80c297bebe4f7fd1b9c8125c32f",source:"Recorded chain and API observations",pointer:"/contracts/locker/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"},burner:{address:"0x6bf43ca706faa8ea46803299c191484e82280652",source:"Recorded chain and API observations",pointer:"/contracts/burner/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"},airdrop:{address:"0x6B1fE7b821001144Ee74EEA258b0AafdE20102E8",source:"Recorded chain and API observations",pointer:"/contracts/airdrop/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"},liquidityLocker:{address:"0x91Aa2dA1956C77F8448E18DCaf53383bCc658e67",source:"Recorded chain and API observations",pointer:"/contracts/liquidityLocker/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"}},hookrLauncherV1:{launcherV1:{address:"0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/launcherV1",block:"104346779",blockKind:"read"},rootV1:{address:"0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/rootV1",block:"104346779",blockKind:"read"},rulesV1:{address:"0x342bAA22e202954593b04B7eD1663621E0565d46",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/rulesV1",block:"104346779",blockKind:"read"},agentGateV1:{address:"0x3b1aC66a6Fd9e9d8F063d145003cf29eac4Fb0C9",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/agentGateV1",block:"104346779",blockKind:"read"},familyRouterV1:{address:"0xbc56F48f873841d26a5a02575263d82f68e12864",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/familyRouterV1",block:"104346779",blockKind:"read"},familyLockV1:{address:"0x5248AF9139DaDEf0C5296342b7BE441deDf0adC2",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/familyLockV1",block:"104346779",blockKind:"read"},poolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/poolManager",block:"104346779",blockKind:"read"},positionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/positionManager",block:"104346779",blockKind:"read"},permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/permit2",block:"104346779",blockKind:"read"},registry:{address:"0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/registry",block:"104346779",blockKind:"read"},router:{address:"0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/router",block:"104346779",blockKind:"read"},identity:{address:"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/identity",block:"104346779",blockKind:"read"},reputation:{address:"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/reputation",block:"104346779",blockKind:"read"}},hookr:{HookrLimitOrders:{address:"0x0c376cc30b1AC98b8ef80a4F516212D3B99402fA",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrLimitOrders/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRoot:{address:"0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRoot/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRouter:{address:"0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRouter/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrQuoter:{address:"0x445D7891381Aa7F91F5048EdBC6a611ccBDe7865",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrQuoter/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrLauncher:{address:"0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrLauncher/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRules:{address:"0x4a71c270b1520F94064268102AebD744b0DE7942",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRules/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRegistry:{address:"0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRegistry/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrTreasury:{address:"0x2242F7FC75606500503075f29ea8cDA684EfB4a9",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrTreasury/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrForwarder:{address:"0xe7863CC0E2Fb783b44c279aB159bcD812c2ceA1c",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrForwarder/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrOwnedRootFactory:{address:"0xA6c2a401597301dFf57A59bC8F70a9622499f3ec",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrOwnedRootFactory/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRootFactory:{address:"0x21E438FaBE10770afb4407cF6b09d32369CBdCE4",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRootFactory/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrFamilyRouter:{address:"0x854f3Fa7AC342B244DF0d9A8c8F597b051aAE559",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrFamilyRouter/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrFamilyLock:{address:"0xfAFEcE64099C1E791C4B46189c277f00c0c7e00b",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrFamilyLock/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},PoolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/PoolManager/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HOOKR_Token:{address:"0x18E674231A58c239Dc7DaeDcffE15Ec3A24cff5c",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HOOKR_Token/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"}},merkl:{distributor:{address:"0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae",source:"Recorded chain and API observations",pointer:"/contracts/distributor/address",block:null,blockKind:"latest"},distributionCreator:{address:"0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd",source:"Recorded chain and API observations",pointer:"/contracts/distributionCreator/address",block:null,blockKind:"latest"},accessControlManager:{address:"0x5D36e13F076f34eE2Bf69fEAEa784887754465f8",source:"Recorded chain and API observations",pointer:"/contracts/accessControlManager/address",block:null,blockKind:"latest"}},poolsTrade:{liquidityLauncher:{address:"0x0000FffFBE8efE702c8703aE3477FF5dE3d319C0",source:"Recorded chain and API observations",pointer:"/contracts/liquidityLauncher/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},instantLaunchStrategyFeesOn:{address:"0x7c48DDe3B447381F4d986334679b3Afc7F2D35C2",source:"Recorded chain and API observations",pointer:"/contracts/instantLaunchStrategyFeesOn/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},instantLaunchStrategyFeesOff:{address:"0xC9566675b1Ea42861546f3c5B74Ace2c79c49572",source:"Recorded chain and API observations",pointer:"/contracts/instantLaunchStrategyFeesOff/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},feeSplitterFeesOn:{address:"0x9411fa7F956f64aa7981AA27cB3bC6eC0415449C",source:"Recorded chain and API observations",pointer:"/contracts/feeSplitterFeesOn/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},feeSplitterFeesOff:{address:"0x882Ae5e2095435A62Fd1BBDEfcb637f5CeAFc0ee",source:"Recorded chain and API observations",pointer:"/contracts/feeSplitterFeesOff/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},uerc20BeneficiaryVault:{address:"0x26d2F7AcB07707034406a0dC458351Bb63C02553",source:"Recorded chain and API observations",pointer:"/contracts/uerc20BeneficiaryVault/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},compoundingClaimRecipient:{address:"0xf585b5D728A8fdE743027307BF5F3556E3B9C58D",source:"Recorded chain and API observations",pointer:"/contracts/compoundingClaimRecipient/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},universalRouterStrategyApp:{address:"0x1242c9439d589cAE85E121B1f79f2aF51e91DCEE",source:"Recorded chain and API observations",pointer:"/contracts/universalRouterStrategyApp/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},uerc20Factory:{address:"0x000000e200088D55C39a11F609E5F667729ad49b",source:"Recorded chain and API observations",pointer:"/contracts/uerc20Factory/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},universalRouter:{address:"0x8876789976dEcBfCbBbe364623C63652db8C0904",source:"Recorded chain and API observations",pointer:"/contracts/universalRouter/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},v4PoolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/contracts/v4PoolManager/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},v4PositionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/contracts/v4PositionManager/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Recorded chain and API observations",pointer:"/contracts/permit2/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},v4Quoter:{address:"0x8Dc178eFB8111BB0973Dd9d722ebeFF267c98F94",source:"Recorded chain and API observations",pointer:"/contracts/v4Quoter/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},protocolFeeController:{address:"0x6d0009504D129CF5002Dba61D9Ae8575AA79314c",source:"Recorded chain and API observations",pointer:"/contracts/protocolFeeController/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"}},priors:{pool:{address:"0x281210097f0de7A8FB6F87310AF0f089c9C8DE21",source:"Recorded chain and API observations",pointer:"/contracts/pool/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},lens:{address:"0x9d7035722bd42C551f82FEB9FDDd17453AEF3D9B",source:"Recorded chain and API observations",pointer:"/contracts/lens/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},usdg:{address:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",source:"Recorded chain and API observations",pointer:"/contracts/usdg/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},registry:{address:"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",source:"Recorded chain and API observations",pointer:"/contracts/registry/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},stockVault:{address:"0xbEcd07EC689988e16b870C121756C4c2C8cb02B6",source:"Recorded chain and API observations",pointer:"/contracts/stockVault/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"}},morpho:{morpho_blue:{address:"0x9D53d5E3bd5E8d4Cbfa6DB1ca238AEA02E651010",source:"Recorded chain and API observations",pointer:"/addresses/morpho_blue/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"},adaptive_curve_irm:{address:"0x2BD3d5965B26B51814AC95127B2b80dD6CcC0fa1",source:"Recorded chain and API observations",pointer:"/addresses/adaptive_curve_irm/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"},USDG:{address:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",source:"Recorded chain and API observations",pointer:"/addresses/USDG/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"},WETH:{address:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",source:"Recorded chain and API observations",pointer:"/addresses/WETH/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"}},tickerSpring:{limitOrderHook:{address:"0xa31729621a2280C0Ff9Aaff5B3F357cFF1bEC040",source:"Recorded chain and API observations",pointer:"/liveness/contracts/limitOrderHook/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},gridStrategy:{address:"0xd597785134307B5324f469A9506066fAd4827730",source:"Recorded chain and API observations",pointer:"/liveness/contracts/gridStrategy/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},ladderStrategy:{address:"0x23c7906D8fa3ede698A00AbE66D28605A41b4177",source:"Recorded chain and API observations",pointer:"/liveness/contracts/ladderStrategy/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},basketZap:{address:"0xFca65c50325b83F8f1E07cD103c00De0cEa4Fb39",source:"Recorded chain and API observations",pointer:"/liveness/contracts/basketZap/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},usdg:{address:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",source:"Recorded chain and API observations",pointer:"/liveness/contracts/usdg/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"}},orbio:{credit:{address:"0xe33322da1380e61e5ae5dfb21e7f62924c73004c",source:"Recorded chain and API observations",pointer:"/orbio/credit/address",block:"100313751",blockKind:"fork",caveat:"Fork anchor block recorded from chain observations; individual code reads were latest."},exchange:{address:"0x6951ffd32630b05e06f50062aea801625a58ebc0",source:"Recorded chain and API observations",pointer:"/orbio/exchange/address",block:"100313751",blockKind:"fork",caveat:"Fork anchor block recorded from chain observations; individual code reads were latest."}},vaults:{steakhouse:{address:"0xBeEff033F34C046626B8D0A041844C5d1A5409dd",source:"Recorded chain and API observations",pointer:"/vaults/eligible/0/address",block:"100320900",blockKind:"read",blockPointer:"/vaults/verifiedAtBlock",caveat:"Historical eligibility only; recheck asset and >=1e12 USDG totalAssets on every listing."},spark:{address:"0xde770c84fe66e063336b31737cfe9790f18c4087",source:"Recorded chain and API observations",pointer:"/vaults/eligible/1/address",block:"100320900",blockKind:"read",blockPointer:"/vaults/verifiedAtBlock",caveat:"Historical eligibility only; recheck asset and >=1e12 USDG totalAssets on every listing."},netnet:{address:"0x99347d5F70D3838763f6Bddcf80304C8aa953B57",source:"Recorded chain and API observations",pointer:"/vaults/eligible/2/address",block:"100320900",blockKind:"read",blockPointer:"/vaults/verifiedAtBlock",caveat:"Historical eligibility only; recheck asset and >=1e12 USDG totalAssets on every listing."},morphoV2Factory:{address:"0x0fbad98595b0186da120e41f77c102beb49f803c",source:"Recorded chain and API observations",pointer:"/vaults/morphoVaultV2Factory",block:null,blockKind:"latest"},longbowCore:{address:"0x026df18fbd2A7639089D0a16293383ec687A5Ca1",source:"Recorded chain and API observations",pointer:"/projects/0/deployments/0/address",block:"100355967",blockKind:"read",blockPointer:"/projects/0/deployments/0/read_block",caveat:"Below USDG threshold or wrong asset at measurement; deployment context only."},longbowFrontier:{address:"0x65dC90cd3a0BCDE967c8AE6019d6790b616E78F7",source:"Recorded chain and API observations",pointer:"/projects/0/deployments/1/address",block:"100355967",blockKind:"read",blockPointer:"/projects/0/deployments/1/read_block",caveat:"Below USDG threshold or wrong asset at measurement; deployment context only."},longbowEth:{address:"0xe129D4Cb2d454C4ACFAc909d1576453A9b835f61",source:"Recorded chain and API observations",pointer:"/projects/0/deployments/2/address",block:"100355967",blockKind:"read",blockPointer:"/projects/0/deployments/2/read_block",caveat:"Below USDG threshold or wrong asset at measurement; deployment context only."},beefyTestedLpVault:{address:"0xC447184BF75a84Ace3087515CCFFb54937838FC8",source:"Recorded chain and API observations",pointer:"/projects/1/tested_lp_vault",block:"100357163",blockKind:"fork",blockPointer:"/fork_environment/fork_block",caveat:"LP adapter only; not an eligible USDG ERC-4626 vault. Other per-vault/strategy addresses remain dynamic."},groveAlm:{address:"0xBEEff039907422219Fb367e525954DDC092854d9",source:"Recorded chain and API observations",pointer:"/projects/2/address",block:"100355967",blockKind:"read",blockPointer:"/raw_reads/longbow_grove_control/4/block",caveat:"Public Grove x Steakhouse USDG ERC-4626 vault; below $1M USDG threshold at measurement."}},identity:{identityRegistry:{address:"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",source:"Recorded chain and API observations",pointer:"/erc8004/identityRegistry",block:null,blockKind:"latest"},reputationRegistry:{address:"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",source:"Recorded chain and API observations",pointer:"/erc8004/reputationRegistry",block:null,blockKind:"latest"},validationRegistry:{address:"0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58",source:"Recorded chain and API observations",pointer:"/erc8004/validationRegistry",block:null,blockKind:"latest"}},meridian:{PredictionMarketEscrow:{address:"0xE4cea507b19796362A5a28Fa7cb705A3F1866213",source:"Recorded chain and API observations",pointer:"/addresses/PredictionMarketEscrow/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."},SecondaryMarketEscrow:{address:"0x7E318ef37c3bC3d0cBA205Af2D1Fc9F9CeFEB5df",source:"Recorded chain and API observations",pointer:"/addresses/SecondaryMarketEscrow/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."},MeridianRobinhoodVault:{address:"0x79cB914f3F336426E89FaB55A9488AB25770552D",source:"Recorded chain and API observations",pointer:"/addresses/MeridianRobinhoodVault/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."},CollateralToken_USDe:{address:"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34",source:"Recorded chain and API observations",pointer:"/addresses/CollateralToken_USDe/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."}},relay:{depository:{address:"0x4cd00e387622c35bddb9b4c962c136462338bc31",source:"Recorded chain and API observations",pointer:"/addresses/depository_4663",block:"100355691",blockKind:"fork",blockPointer:"/fork/fork_block",caveat:"Only quoted depositNative path fork-tested; bridge settlement is external and unmeasured."}},lighter:{settlement:{address:"0x94bAB9693Ba2f6358507eFfcbd372b0660AFfF9d",source:"Recorded chain and API observations",pointer:"/contracts_on_4663/lighter_rh_settlement_proxy/address",block:"100355574",blockKind:"read",blockPointer:"/block_number",caveat:"Settlement/custody metadata only; funding tool uses HTTP, not this contract."}},heyResearch:{heyToken:{address:"0xB33eb16782776b4D738c0Fd643577cb0284Db610",source:"Recorded chain and API observations",pointer:"/addresses/heyToken/address",block:null,blockKind:"unanchored",caveat:"API-only tools; source has time range but no block anchor."}}},46630:{deployments:{test_USDG:{address:"0x7E955252E15c84f5768B83c41a71F9eba181802F",source:"Recorded chain and API observations",pointer:"/code_probes/0/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/0/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_WETH:{address:"0x7943e237c7F95DA44E0301572D358911207852Fa",source:"Recorded chain and API observations",pointer:"/code_probes/1/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/1/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_gateway:{address:"0x77bF00A6A90c600f214b34BAFBB7918c0cF113A8",source:"Recorded chain and API observations",pointer:"/code_probes/2/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/2/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_identity:{address:"0x8004A818BFB912233c491871b3d84c89A494BD9e",source:"Recorded chain and API observations",pointer:"/code_probes/3/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/3/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_USDG_implementation:{address:"0xf0863d7a29a55d0c4263c11bfac754312ff078df",source:"Recorded chain and API observations",pointer:"/code_probes/15/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/15/block",caveat:"Code presence alone does not establish a complete testnet integration."},facet_0xef55bec6:{address:"0x08f560a85db40a7d4ac49b4F44f1D38e5B8aB811",source:"Recorded chain and API observations",pointer:"/code_probes/17/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/17/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v4_production_poolmanager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/code_probes/22/address",block:"144389821",blockKind:"read",blockPointer:"/code_probes/22/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v3_community_test_candidate:{address:"0xFECCB63CD759d768538458Ea56F47eA8004323c1",source:"Recorded chain and API observations",pointer:"/code_probes/50/address",block:"144389821",blockKind:"read",blockPointer:"/code_probes/50/block",caveat:"Community v3 is not canonically endorsed; v4 native stack is incomplete."},Uniswap_v4_PositionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/code_probes/52/address",block:"144390120",blockKind:"read",blockPointer:"/code_probes/52/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v4_Quoter:{address:"0x8Dc178eFB8111BB0973Dd9d722ebeFF267c98F94",source:"Recorded chain and API observations",pointer:"/code_probes/54/address",block:"144390120",blockKind:"read",blockPointer:"/code_probes/54/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v4_StateView:{address:"0xF3334192D15450CdD385c8B70e03f9A6bD9E673b",source:"Recorded chain and API observations",pointer:"/code_probes/56/address",block:"144390120",blockKind:"read",blockPointer:"/code_probes/56/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_Permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Recorded chain and API observations",pointer:"/code_probes/77/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/77/block",caveat:"Code presence alone does not establish a complete testnet integration."},v3_test_WETH9:{address:"0x37E402B8081eFcE1D82A09a066512278006e4691",source:"Recorded chain and API observations",pointer:"/code_probes/78/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/78/block",caveat:"Community v3 is not canonically endorsed; v4 native stack is incomplete."}}}},t=o[4663].tokens.USDG.address,i=o[46630].deployments.test_USDG.address,m=o[4663].pons.factory.address,_=o[4663].pons.memeHook.address,R=o[4663].pons.poolManager.address,C=o[4663].pons.feeEscrow.address,E=o[4663].oracle.ethUsdgPool.address,b={name:"Global Dollar",version:"1",chainId:d,verifyingContract:t},l={name:"Global Dollar",version:"1",chainId:r,verifyingContract:i},c={mainnet:{chainId:d,usdg:t,usdgDomain:b,weth:o[d].tokens.WETH.address,identityRegistry:o[d].identity.identityRegistry.address},testnet:{chainId:r,usdg:i,usdgDomain:l,weth:o[r].deployments.test_WETH.address,identityRegistry:o[r].deployments.test_identity.address}};function F(e="mainnet"){if(e!=="mainnet"&&e!=="testnet")throw new a("Set OAK_NETWORK to mainnet or testnet.");return e}function B(e,s){if(s.toLowerCase()!==c[e].usdg.toLowerCase())throw new a(`USDG does not match the pinned ${e} deployment on chain ${c[e].chainId}.`)}async function D(e,s){let n=await s.getChainId();if(n!==c[e].chainId)throw new a(`RPC chain ${n} does not match OAK_NETWORK ${e} (chain ${c[e].chainId}).`)}var y={4663:{kyberswap:"0xe21fd0e9",velora:"0xe3ead59e"}},k={4663:{kyberswap:{address:"0x8F10B468b06c6FD214B65F87778827F7D113f996",source:"https://raw.githubusercontent.com/KyberNetwork/kyberswap-documentation/main/developer-guide/aggregator-api/contracts.md",pointer:"Robinhood / AggregationExecutorProxy",block:"100861304",blockKind:"read",caveat:"Corroborated by successful transaction 0x4a2474960f846f412d4d1cbdebb86727c81f92a0859ad743425fdc544d8973e8; approveTarget is zero."},velora:{address:"0x006d0e0d006109f0020f3050000a713780b7b000",source:"https://rpc.mainnet.chain.robinhood.com",pointer:"eth_getTransactionByHash / 0x70bc411f8427d622798ff82e6088d6cf3c011ae04b063c731664215f982ecfba / input / executor",block:"100861280",blockKind:"read",caveat:"Observed v6.2 executor, corroborated by six fresh Velora builds on 2026-10-29; no vendor executor list for 4663. Inner route targets vary; this pin does not authenticate them."}}},g=BigInt("0x45a6e007c874ffc6321d6fb90eac272dd6864bfa")<<96n|1n<<92n|1n,I=[k[4663].velora.address,"0x082738d007001080a00099a000004f3006152085"],K=[{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x1266261289d815650a6bcdb308766be36efa8149",codeHash:"0xa38c335d383c1ac060df1f3f4687917a6da673bbf6e37a3b5241b49760194d6d"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x3e2db9ed1693964d599dfeba87181a36fffc8ed8",codeHash:"0xbc971642d398135438c4d2cf9f2229ffe5f8c321584673c4a2535b6df47c01ef"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x664aafe2bd40e581aa4f8c5a594c9ee168b92d4f",codeHash:"0xda9b31df9b098e520e7f6a5b94356920d32a66c736c8788cf2af3035781babc9"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x9d215290f43366bbceff40a79fbac9dd23325379",codeHash:"0x8d15c4f2b99c6b24daa0f2383c0cfd998879b89b36e9359b18345fc9e7686333"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0xa685fc7cef9eb4c1e8337f11019aeba111e48c31",codeHash:"0xd5cb6ac468476cda0e4069cb53097412c45dc4fcc23d61db05426e8047aa7a9b"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0xf475964cb5235641f23e99c8d7828996c4289ac4",codeHash:"0x399cd0fb5f0a36db2d3221fab8d04c78c88239a128c9463f6c27aa2120a1f6ff"}],H=[{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x0a48ea27489881d84288776d1e0588d633945ad6",proxyCodeHash:"0xd460046af3bffad2aa81503173711d1b70a88a56155b8d0cd0ca53a3fee23078",implementation:"0xcf319d0021dfde8c676a54f8a36ead8fd2e48984",codeHash:"0x503caa96fd60bb34d6c4e290019d4f931bc36340b8e07b669f0e99059055d092"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxyCodeHash:"0xd460046af3bffad2aa81503173711d1b70a88a56155b8d0cd0ca53a3fee23078",implementation:"0x50fa4b08d75586603d678fadbeabf1f4d8d2113b",codeHash:"0xa157bf9c94b218a72d8ebe2c4321817d5d53a58e81553928c2a8cbfaf9edb628"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxyCodeHash:"0xd460046af3bffad2aa81503173711d1b70a88a56155b8d0cd0ca53a3fee23078",implementation:"0xb8ea4704fe518c5ccbf429fc6db1b2c4c4ca7193",codeHash:"0x5577c0b6a060fce1ceffb8ef0c80305bf8391d7af789742c8d1f2d00457aa955"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x5685f0b21126d87f60810780ce23c43ea45cb61e",proxyCodeHash:"0xd8500e5bf9af5e118e73c61f9c78ad630740b50d86cf38aaa26543a239cb1db2",implementation:"0xb20e7d58987b2b606d242f220cdb8cd9c676b526",codeHash:"0xbccc9c0d786a46f9d9810fb887905cc89ba453c5d2a1d9846e2267f71bfa877d"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0xad9b5c0ea95cf998c1a31aaa8ac7a24de94bee69",proxyCodeHash:"0xd8500e5bf9af5e118e73c61f9c78ad630740b50d86cf38aaa26543a239cb1db2",implementation:"0x0a75d1a1800e98fb0df13cdb4ecee3e4ea1685ca",codeHash:"0xaac5c7ab1c270883872ca5817bc80aca7cdce1ad8500acbe02e2943465fe9d36"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",proxyCodeHash:"0x864cc9ad53b338b82da1f7cab85ab0b3d5c8861acb422b6fec63cf36234f36a6",implementation:"0x68184c449e1a8f34fa18d289737129fd27b66f8f",codeHash:"0x3a551ac5c744af57e68a1d1431ac403c0f516ffd7d224a75746aee11fc4f3baf"}];export{p as a,d as b,r as c,u as d,h as e,A as f,v as g,P as h,x as i,o as j,t as k,i as l,m,_ as n,R as o,C as p,E as q,b as r,l as s,c as t,F as u,B as v,D as w,y as x,k as y,g as z,I as A,K as B,H as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./WWNAGOCD.js";import{c as U}from"./OSMOBKRQ.js";import{b as R,c as I,d as j,e as C,g as D,h as V,j as t,k as w,l as E,m as B,o as n,p as o,q as d,r as p,s as y,v as H}from"./XRDLMTBJ.js";import{b as a,f as F,g as L,h as O,i as q}from"./MQK6OP7S.js";import{a as s}from"./XSD5NL7J.js";import{getAddress as i}from"viem";async function re(r,m,x,u=[]){let e=await O(r,x);await L(r,e.number,[a.launcherV1,d,a.rulesV1,a.agentGateV1]);let l=i(a.launcherV1),[h,_,z,N,Q,K,G,W,$,J,X,A,b]=await Promise.all([U(r,e.number,m,u),o(r,l,j,"launchFee",[],e.number),o(r,p,n("registry"),"rootOpenFor",[d,m],e.number),o(r,p,n("registry"),"newMarketsPaused",[],e.number),o(r,p,n("registry"),"isLauncher",[l],e.number),o(r,d,n("rootV1"),"poolManager",[],e.number),o(r,l,n("launcherV1"),"poolManager",[],e.number),o(r,l,n("launcherV1"),"registry",[],e.number),o(r,i(a.rulesV1),n("rulesV1"),"trustedRoot",[],e.number),o(r,i(a.rulesV1),n("rulesV1"),"poolManager",[],e.number),o(r,p,n("registry"),"admission",[d,i(a.rulesV1)],e.number),o(r,i(a.rulesV1),n("rulesV1"),"configSchemaHash",[],e.number),o(r,p,n("registry"),"quoteAssets",[],e.number)]);if(K!==y||G!==y||W!==p||$!==d||J!==y)throw new s("Hookr launch dependency wiring differs from the reviewed deployment.");V(A);let c=B(X),g=B(c.caps);if(c.implementation!==i(a.rulesV1)||t(c.kind,8)!==0n||c.codeHash!==F(a.rulesV1).codeHash||c.schemaHash!==A||t(c.gasLimit,32)===0n||t(g.maxLpFeePips,24)>600000n||t(g.maxQuoteTakePips,24)>=1000000n||t(g.maxSubjectTakeBps,16)>1000n)throw new s("Hookr core admission, schema or caps differ from the supported launch profile.");if(!Array.isArray(b)||b.length>32)throw new s("Hookr qualified quote list is incomplete or exceeds the bounded read.");let T=[];for(let f=0;f<b.length;f+=2)T.push(...await Promise.all(b.slice(f,f+2).map(ee=>H(r,i(String(ee)),e.number))));let Y=await H(r,i("0x0000000000000000000000000000000000000000"),e.number),k=E(_,5),Z={token:Y,amount:t(k[0]).toString(),currency:"ETH",decimals:18,treasury:i(String(k[1])),pendingAmount:t(k[2]).toString(),pendingTreasury:i(String(k[3])),readyAt:t(k[4]).toString()},M=w(z),P=w(N),v=w(Q);return await q(r,e),{chainId:4663,blockNumber:e.number.toString(),blockHash:e.hash,timestamp:e.timestamp.toString(),version:"hookr-launcher-v1",launcher:l,root:d,core:i(a.rulesV1),poolManager:y,permissionMask:"0x2acc",launchFee:Z,qualifiedQuotes:T,coreAdmission:{schemaHash:A,gasLimit:t(c.gasLimit,32).toString(),caps:{maxLpFeePips:t(g.maxLpFeePips,24).toString(),maxQuoteTakePips:t(g.maxQuoteTakePips,24).toString(),maxSubjectTakeBps:t(g.maxSubjectTakeBps,16).toString()}},gate:h,rootOpenForWallet:M,newMarketsPaused:P,launcherAdmitted:v,launchAvailable:M&&!P&&v&&h.healthyIdentityOnly&&h.walletAgent,scoreLaunchAvailable:M&&!P&&v&&h.healthyForScores&&h.walletAgent,supportedSettings:{route:"launchAdvised",members:"1",tokenKinds:["new"],reservedTokenKinds:["existing"],tickSpacing:String(S.tickSpacing),baseLpFeePips:String(S.baseLpFeePips),deadlineSecondsMax:S.deadlineSeconds.toString(),guardEndBlock:"0",burnBps:"0",royaltyBps:"0",integrator:null,nameMaxUtf8Bytes:"48",symbolMaxUtf8Bytes:"12",supplyMaxBaseUnits:((1n<<108n)-1n).toString(),liquidityMax:((1n<<127n)-1n).toString(),fee:"8388608",tickSpacingMin:"1",tickSpacingMax:"32767",tickMin:"-887272",tickMax:"887272",requiresTickAlignment:!0,gateRequired:!0,gatePhases:"1",gateFailOpen:!1,arbitraryAdvisories:!1,devBuy:!1,locks:!1,ownedRoot:!1,lpRewardsBpsMax:"1000",lpRewardsPlusBurnBpsMax:"1000",totalLpFeePipsMax:"600000",protocolShareBpsMin:"2000",protocolShareBpsMax:"5000",existingTokenFunding:"requires a separately qualified token route"},readStatus:"complete",warnings:["Read-only admission snapshot. hookr_launch supports one new-token agents-only pool with the fixed profile; add/collect/remove require separate tools.","Oak identity linking alone does not establish on-chain Hookr gate eligibility.",h.reviewerSetsNotice]}}function le(r){return[{name:"hookr_launch_options",inputSchema:{type:"object",additionalProperties:!1,properties:{...I,reviewerSetIds:{type:"array",maxItems:8,uniqueItems:!0,items:R,description:"Existing registered reviewer set IDs to inspect; no alias or arbitrary reviewer address."}}},execute:async(m,x)=>{if(C(m,["blockNumber","reviewerSetIds"]),r.network==="testnet")throw new s("Hookr launch reads are configured only on mainnet, chain 4663.");let u=m.reviewerSetIds??[];if(!Array.isArray(u)||u.length>8||new Set(u).size!==u.length)throw new s("Provide at most eight distinct reviewer set IDs.");let e=u.map(V);if(new Set(e).size!==e.length)throw new s("Provide distinct reviewer set IDs.");try{return await re(r.clientFor(4663),x,D(m),e)}catch(l){throw l instanceof s?l:new s("Hookr launch settings are unavailable at the named block. Retry the complete read; no zero fee or healthy gate is implied.")}}}]}export{re as a,le as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as k,c as P,d as R}from"./4J245N3F.js";import{a as Z}from"./Z7FGEWO2.js";import{a as H}from"./43LI5NKJ.js";import{g as G,i as Q}from"./NWNYJ26T.js";import{b as W,c as V}from"./IX3GZMTM.js";import{b as c,e as X,j as O}from"./TI727O2H.js";import{a as u}from"./XSD5NL7J.js";import{a as T}from"./JXOEJPJ4.js";import{encodeFunctionData as nt,erc20Abi as J,getAddress as a,parseAbi as gt}from"viem";var At="hookr",y=a(O[4663].hookr.HookrLimitOrders.address),wt=a(O[4663].hookr.HookrRoot.address),Ot=a(O[4663].hookr.HookrRouter.address),Bt=a(O[4663].hookr.HookrForwarder.address),ht=a(O[4663].hookr.PoolManager.address),It=a(O[4663].hookr.HOOKR_Token.address),N="0x0000000000000000000000000000000000000000",St="0x000000000000000000000000000000000000dEaD",Y=(1n<<128n)-1n,Tt=new Set([N.toLowerCase(),St.toLowerCase(),y.toLowerCase(),Ot.toLowerCase(),Bt.toLowerCase(),ht.toLowerCase(),wt.toLowerCase()]),B=gt(["function getOrder(uint256 orderId) view returns (((address currency0, address currency1, uint24 fee, int24 tickSpacing, address hooks) key, address owner, uint40 createdAt, uint40 expiry, bool zeroForOne, uint8 status, address recipient, uint128 amountIn, uint128 minAmountOut, uint128 bounty, uint160 sqrtPriceLimitX96))","function quoteFill(uint256 orderId) view returns (bool fillable, uint256 amountOut)","function bountyBounds((address currency0, address currency1, uint24 fee, int24 tickSpacing, address hooks) key, bool zeroForOne, uint128 amountIn, uint128 minAmountOut) view returns (uint128 minBounty, uint128 defaultBounty, uint128 maxBounty)","function fill(uint256 orderId) returns (uint256 amountOut)","function claimBounty(address to) returns (uint256 amount)","function bountyOf(address keeper) view returns (uint256)","function lastOrderId() view returns (uint256)","function liabilities(address currency) view returns (uint256)"]);function Ht(t){let n=t.toLowerCase();return n===N.toLowerCase()||n===Z.toLowerCase()}function $t(t,n,i){let o=n.trim();if(o.startsWith("-")){let s=o.slice(1),r=t(s,i);return r==="0"?"0":`-${r}`}return t(o,i)}function Wt(t,n,i){return V(t,n,i)}function et(t,n){return!t.changes||t.changes.length===0?"no net ERC-20/native transfer delta on caller":t.changes.map(i=>`${$t(n,i.amount,i.token.decimals)} ${T(i.token.symbol)} (${i.token.address})`).join(", ")}function xt(t){if(typeof t=="bigint"){if(t<=0n)throw new u("Hookr orderId must be a positive integer.");return t}if(typeof t=="number"){if(!Number.isSafeInteger(t)||t<=0)throw new u("Hookr orderId must be a positive integer.");return BigInt(t)}if(typeof t=="string"&&/^\d+$/.test(t.trim())){let n=BigInt(t.trim());if(n<=0n)throw new u("Hookr orderId must be a positive integer.");return n}throw new u("Provide a positive integer Hookr orderId.")}function ot(t){if(t==null)return c;if(typeof t!="number"||!Number.isSafeInteger(t)||t!==c)throw new u(`Hookr limit orders are only supported on chain ${c}.`);return c}function Rt(t){switch(t){case 0:return"None";case 1:return"Open";case 2:return"Filled";case 3:return"Cancelled";default:return"Unknown"}}function Ct(t){if(Array.isArray(t)){let[n,i,o,s,r,d,g,m,b,e,l]=t;return{key:Array.isArray(n)?{currency0:n[0],currency1:n[1],fee:Number(n[2]),tickSpacing:Number(n[3]),hooks:n[4]}:n,owner:i,createdAt:o,expiry:s,zeroForOne:!!r,status:d,recipient:g,amountIn:BigInt(m),minAmountOut:BigInt(b),bounty:BigInt(e),sqrtPriceLimitX96:BigInt(l)}}if(t&&typeof t=="object"){let n=t;if(n.key&&typeof n.key=="object")return{key:{currency0:n.key.currency0,currency1:n.key.currency1,fee:Number(n.key.fee),tickSpacing:Number(n.key.tickSpacing),hooks:n.key.hooks},owner:n.owner,createdAt:n.createdAt,expiry:n.expiry,zeroForOne:!!n.zeroForOne,status:n.status,recipient:n.recipient,amountIn:BigInt(n.amountIn),minAmountOut:BigInt(n.minAmountOut),bounty:BigInt(n.bounty),sqrtPriceLimitX96:BigInt(n.sqrtPriceLimitX96)}}throw new u("HookrLimitOrders returned a malformed order tuple.")}function Dt(t){if(Array.isArray(t)&&t.length>=2)return{fillable:!!t[0],amountOut:BigInt(t[1])};if(t&&typeof t=="object"&&"fillable"in t&&"amountOut"in t){let n=t;return{fillable:!!n.fillable,amountOut:BigInt(n.amountOut)}}throw new u("HookrLimitOrders returned a malformed quoteFill response.")}function Pt(t){if(Array.isArray(t)&&t.length>=3)return{minBounty:BigInt(t[0]),defaultBounty:BigInt(t[1]),maxBounty:BigInt(t[2])};if(t&&typeof t=="object"&&"minBounty"in t&&"defaultBounty"in t&&"maxBounty"in t){let n=t;return{minBounty:BigInt(n.minBounty),defaultBounty:BigInt(n.defaultBounty),maxBounty:BigInt(n.maxBounty)}}throw new u("HookrLimitOrders returned a malformed bountyBounds response.")}async function tt(t,n,i=c){if(i!==c)throw new u(`Unsupported token chain ${i}; Hookr requires chain ${c}.`);if(Ht(n))return{...k,chainId:i};H(n);let o=a(n),s=o.toLowerCase();if(s===P.address.toLowerCase())return{address:o,symbol:P.symbol,decimals:X,chainId:i};if(s===R.address.toLowerCase())return{address:o,symbol:R.symbol,decimals:R.decimals,chainId:i};if(s===It.toLowerCase())return{address:o,symbol:"HOOKR",decimals:18,chainId:i};let[r,d]=await Promise.all([t.readContract({address:o,abi:J,functionName:"symbol"}),t.readContract({address:o,abi:J,functionName:"decimals"})]),g=typeof r=="string"&&r.trim()?r.trim():o,m=Number(d);if(!Number.isInteger(m)||m<0||m>255)throw new u(`Invalid token decimals for ${o} on chain ${i}.`);return{address:o,symbol:g,decimals:m,chainId:i}}async function Et(t){if(typeof t.getBlock!="function")throw new u("Cannot read the latest block timestamp for Hookr order expiry.");let n=await t.getBlock().catch(()=>{throw new u("Cannot read the latest block timestamp for Hookr order expiry.")});if(!n||typeof n.timestamp!="bigint"||n.timestamp<=0n)throw new u("Hookr requires a usable latest block timestamp to check order expiry.");return n.timestamp}function E(t,n=[]){let i=Q(t,"Provide a valid recipient wallet address."),o=i.toLowerCase();if(Tt.has(o)||n.some(s=>s.toLowerCase()===o))throw new u(`Recipient ${i} is a reserved protocol or zero address (invalid recipient).`);return i}function rt(t){if(t.minBountyEth!==void 0||t.minAmountOutDecimal!==void 0||t.rounding!==void 0)throw new u("Use minBounty and minAmountOut as base-unit integer strings.")}function L(t,n){if(t!==void 0){if(typeof t!="string"||!/^\d+$/.test(t))throw new u(`Provide ${n} as a base-unit integer string.`);return W(t)}}function Lt(t){return{name:"hookr_fill",inputSchema:{type:"object",properties:{orderId:{type:"string",description:"HookrLimitOrders orderId as a positive integer string."},minBounty:{type:"string",description:"Optional minimum keeper bounty in wei (decimal base-unit string)."},minAmountOut:{type:"string",description:"Optional quote pre-check only, in token base-unit integer strings. Not enforced on chain: fill(uint256) enforces only the order minAmountOut."},chainId:{type:"number",description:"Target chain ID (must be 4663)."}},required:["orderId"],additionalProperties:!1},async execute(n,i){try{rt(n),H(i);let o=a(i),s=ot(n.chainId),r=xt(n.orderId),d=t.clientFor(s),[g,m,b]=await Promise.all([d.readContract({address:y,abi:B,functionName:"getOrder",args:[r]}),d.readContract({address:y,abi:B,functionName:"quoteFill",args:[r]}),Et(d)]),e=Ct(g),l=Number(e.status),h=Rt(l);if(l===0||G(e.owner,N))throw new u(`Hookr order #${r} does not exist.`);if(l!==1)throw new u(`Hookr order #${r} is not open (current status: ${h}).`);let A=BigInt(e.expiry);if(A<b)throw new u(`Hookr order #${r} is expired (expiry ${A} < current timestamp ${b}).`);let f=Number(e.key.tickSpacing),$=Number(e.key.fee);if(!Number.isInteger(f)||f<=0)throw new u(`Hookr order #${r} has an invalid pool tickSpacing (${f}).`);if(e.amountIn<=0n||e.amountIn>Y)throw new u(`Hookr order #${r} has an invalid amountIn (${e.amountIn}).`);if(e.minAmountOut<=0n||e.minAmountOut>Y)throw new u(`Hookr order #${r} has an invalid minAmountOut (${e.minAmountOut}).`);let C=a(e.key.hooks);E(e.recipient,[C]);let it=await d.readContract({address:y,abi:B,functionName:"bountyBounds",args:[{currency0:a(e.key.currency0),currency1:a(e.key.currency1),fee:$,tickSpacing:f,hooks:C},e.zeroForOne,e.amountIn,e.minAmountOut]}),w=Pt(it),D=L(n.minBounty,"minBounty"),F=D!==void 0&&D>w.minBounty?D:w.minBounty;if(e.bounty<F)throw new u(`Hookr order #${r} is underbounty: order bounty (${e.bounty} wei) is below the required keeper bounty (${F} wei).`);if(e.bounty>w.maxBounty)throw new u(`Hookr order #${r} bounty (${e.bounty} wei) exceeds maximum bounty bound (${w.maxBounty} wei).`);let I=Dt(m),ut=e.zeroForOne?e.key.currency0:e.key.currency1,st=e.zeroForOne?e.key.currency1:e.key.currency0,[x,p]=await Promise.all([tt(d,ut,s),tt(d,st,s)]),S=L(n.minAmountOut,"minAmountOut"),v=S!==void 0&&S>e.minAmountOut?S:e.minAmountOut;if(!I.fillable||I.amountOut<=0n||I.amountOut<v)throw new u(`Hookr order #${r} is not executable: quoted output (${I.amountOut} base units of ${p.address}) does not meet minimum output (${v} base units).`);let at=nt({abi:B,functionName:"fill",args:[r]}),mt=t.formatAmount(e.amountIn.toString(),x.decimals),dt=t.formatAmount(I.amountOut.toString(),p.decimals),ct=t.formatAmount(e.minAmountOut.toString(),p.decimals),lt=t.formatAmount(e.bounty.toString(),18),yt=S===void 0?"":` Caller minAmountOut ${S} base units is a quote pre-check only, not enforced on chain; fill(uint256) enforces the order minimum of ${e.minAmountOut} base units.`,q=`Fill Hookr order #${r}: maker's escrow pays ${mt} ${T(x.symbol)} (${e.amountIn} base units of ${x.address}); net output goes to ${a(e.recipient)} (quoted ${dt} ${T(p.symbol)}, order minimum ${ct} ${T(p.symbol)}, ${e.minAmountOut} base units of ${p.address}). The filler sends no tokens or ETH (value 0), pays gas, and accrues ${lt} ETH (${e.bounty} wei) bounty to ${o}, payable only via claimBounty. Pool tickSpacing ${f}; expiry ${A} inclusive.${yt}`,M=t.unsignedTx({to:y,data:at,value:"0",chainId:s,description:q}),z=await t.preview([M],o),bt=et(z,t.formatAmount),K={token:x,amount:e.amountIn.toString()},U={token:p,amount:e.minAmountOut.toString()},ft={token:p,amount:I.amountOut.toString()},j={token:{...k,chainId:s},amount:e.bounty.toString()},pt={orderId:r.toString(),key:{currency0:a(e.key.currency0),currency1:a(e.key.currency1),fee:$,tickSpacing:f,hooks:C},owner:a(e.owner),recipient:a(e.recipient),createdAt:BigInt(e.createdAt).toString(),expiry:A.toString(),zeroForOne:e.zeroForOne,status:l,statusLabel:h,amountIn:K,minAmountOut:U,bounty:j,sqrtPriceLimitX96:e.sqrtPriceLimitX96.toString()},kt={minBounty:{token:{...k,chainId:s},amount:w.minBounty.toString()},defaultBounty:{token:{...k,chainId:s},amount:w.defaultBounty.toString()},maxBounty:{token:{...k,chainId:s},amount:w.maxBounty.toString()}};return{txs:[M],summary:`${q} Preview deltas: ${bt}.`,preview:z,orderId:r.toString(),fillable:!0,amountIn:K,minAmountOut:U,quotedAmountOut:ft,bounty:j,bountyBounds:kt,order:pt}}catch(o){throw new u(t.plainError(o))}}}}function Nt(t){return{name:"hookr_claim_bounty",inputSchema:{type:"object",properties:{to:{type:"string",description:"Optional recipient address for the claimed native ETH bounty (must be the signing wallet)."},minBounty:{type:"string",description:"Optional minimum claimable bounty in wei (decimal base-unit string)."},chainId:{type:"number",description:"Target chain ID (must be 4663)."}},additionalProperties:!1},async execute(n,i){try{rt(n),H(i);let o=a(i),s=ot(n.chainId),r=n.to!==void 0&&n.to!==null?E(String(n.to)):E(o);if(r!==o)throw new u("Hookr bounty recipient must be the signing wallet.");let g=await t.clientFor(s).readContract({address:y,abi:B,functionName:"bountyOf",args:[o]}),m=BigInt(g);if(m<=0n)throw new u(`No claimable Hookr keeper bounty for ${o}.`);let b=L(n.minBounty,"minBounty");if(b!==void 0&&m<b)throw new u(`Claimable Hookr bounty (${m} wei) is below the requested minimum (${b} wei).`);let e=nt({abi:B,functionName:"claimBounty",args:[r]}),l=t.formatAmount(m.toString(),18),h=t.unsignedTx({to:y,data:e,value:"0",chainId:s,description:`Claim ${l} ETH (${m} wei) of accrued Hookr keeper bounty from ${y} to ${r}.`}),A=await t.preview([h],o),f=et(A,t.formatAmount),$={token:{...k,chainId:s},amount:m.toString()};return{txs:[h],summary:`Claim ${l} ETH (${m} wei) Hookr keeper bounty to ${r}. Preview deltas: ${f}.`,preview:A,recipient:r,claimableBounty:$}}catch(o){throw new u(t.plainError(o))}}}}async function _t(t,n){H(n);let i=a(n),o=t.clientFor(c);try{let s=await o.readContract({address:y,abi:B,functionName:"bountyOf",args:[i]}),r=BigInt(s);if(r<=0n)return[];let d=t.formatAmount(r.toString(),18);return[{module:At,id:`hookr:bounty:${i.toLowerCase()}`,chainId:c,assets:[{token:{...k,chainId:c},amount:r.toString()}],description:`Hookr claimable keeper bounty (${d} ETH)`}]}catch(s){throw new u(t.plainError(s))}}var _=t=>({tools:[Lt(t),Nt(t)],positions:n=>_t(t,n)}),Vt=_,Gt=_,Qt=_;export{At as a,y as b,wt as c,Ot as d,Bt as e,ht as f,It as g,B as h,$t as i,Wt as j,Lt as k,Nt as l,_t as m,_ as n,Vt as o,Gt as p,Qt as q};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as q}from"./LT5P6PZW.js";import{a as R,b as K}from"./G2LAO23N.js";import{a as W}from"./Z7FGEWO2.js";import{c as U,f as z,g as T,i as L}from"./NWNYJ26T.js";import{b as k}from"./TI727O2H.js";import{a as d}from"./XSD5NL7J.js";import{encodeFunctionData as J,erc20Abi as re,erc721Abi as V,getAddress as ie,parseAbi as ae,zeroAddress as B}from"viem";var A=q,G=ae(["function launchFee() view returns (uint256 fee,address treasury,uint256 pendingFee,address pendingTreasury,uint256 readyAt)"]),g=(t,e)=>t.name==="seed"?"marketSeed":t.name||`arg${e}`,X=t=>"components"in t?t.components:[],se=t=>{if(typeof t!="string"||!/^(0|[1-9][0-9]*)$/.test(t)||t.length>78||BigInt(t)>=1n<<256n)throw new d("Provide Hookr amounts as decimal base-unit strings within uint256.");return BigInt(t)},p=t=>z(t,"Provide the documented Hookr parameter object."),b=t=>L(t,"Provide a valid Hookr address."),Y=t=>t.stateMutability==="view"||t.stateMutability==="pure";function _(t){return t.abi}var ce=`Base units of the token it counts; read that token's decimals (18 decimals: "1000000000000000000" = 1 token).`,de={type:"string",pattern:"^(0|[1-9][0-9]*)$"};function ue(t,e,i){let o=`${t} ${e} ${i}.`,r=t.replace(/\[[0-9]*\]$/,"");return/^u?int/.test(r)?/divisor|numerator|denominator/i.test(e)?`${o} Plain integer ${/divisor/i.test(e)?"divisor":"ratio component"}; do not scale by token decimals.`:/liquidity/i.test(e)?`${o} Uniswap v4 liquidity units, not a token amount; do not scale by token decimals.`:/gas/i.test(e)?`${o} Integer gas units; do not scale by token decimals.`:/point/i.test(e)&&!/decimals/i.test(e)?`${o} Integer points; do not scale by token decimals.`:/pips$/i.test(e)?`${o} ${R.pips()}`:K(e,de)||e==="walletFeeCap"?`${o} ${ce}`:/bps$/i.test(e)?`${o} ${R.bps()}`:/(deadline|expir|timestamp|time|At)$/.test(e)?`${o} Unix seconds, as a decimal string.`:`${o} Decimal string${r.startsWith("uint")?"":", may be negative"}.`:r==="address"?`${o} 0x followed by 40 hex digits${/^(to|recipient|receiver|owner|spender|wallet|beneficiary)$/i.test(e)?"; use the intended address, never an example address":""}.`:r==="bool"?`${o} true or false.`:r.startsWith("bytes")?`${o} 0x-prefixed hex bytes.`:r==="tuple"?`${o} Object with the listed fields.`:`${o} Plain text.`}function Z(t,e,i,o){let r=ue(t.type,o,e),c=/^(.*)\[([0-9]*)\]$/.exec(t.type);return c?{type:"array",description:r,items:Z({...t,type:c[1]},e,i,o),minItems:c[2]?Number(c[2]):0,maxItems:c[2]?Number(c[2]):128}:t.type==="tuple"?{...E(X(t),i,o),description:r}:t.type==="bool"?{type:"boolean",description:r}:t.type==="address"?{...U,description:r}:/^u?int/.test(t.type)?{type:"string",pattern:t.type.startsWith("uint")?"^(0|[1-9][0-9]*)$":"^(0|-?[1-9][0-9]*)$",description:r}:t.type.startsWith("bytes")?{type:"string",pattern:"^0x([0-9a-fA-F]{2})*$",maxLength:32770,description:r}:{type:"string",maxLength:4096,description:r}}function E(t,e,i){let o=i===void 0?`argument of ${e}`:`field of ${i} in ${e}`;return{type:"object",properties:Object.fromEntries(t.map((r,c)=>[g(r,c),Z(r,o,e,g(r,c))])),required:t.map(g),additionalProperties:!1}}function N(t,e){let i=/^(.*)\[([0-9]*)\]$/.exec(t.type);if(i){if(!Array.isArray(e)||e.length>128||i[2]&&e.length!==Number(i[2]))throw new d("Hookr parameter array has an invalid length.");return e.map(r=>N({...t,type:i[1]},r))}if(t.type==="tuple"){let r=p(e),c=X(t);return O(r,c.map(g)),Object.fromEntries(c.map((s,u)=>[s.name||`arg${u}`,N(s,r[g(s,u)])]))}if(t.type==="address")return b(e);if(t.type==="bool"){if(typeof e!="boolean")throw new d("Provide a Hookr boolean.");return e}let o=/^(u?)int([0-9]*)$/.exec(t.type);if(o){if(typeof e!="string"||!/^(0|-?[1-9][0-9]*)$/.test(e)||e.length>79)throw new d("Provide Hookr integers as decimal base-unit strings.");let r=BigInt(e),c=BigInt(o[2]||256),s=!o[1];if(r<(s?-(1n<<c-1n):0n)||r>=1n<<(s?c-1n:c))throw new d("Hookr integer exceeds its ABI range.");return c<=32n?Number(r):r}if(t.type.startsWith("bytes")){let r=Number(t.type.slice(5));if(typeof e!="string"||!/^0x([0-9a-fA-F]{2})*$/.test(e)||e.length>32770||r&&e.length!==2+r*2)throw new d("Provide a valid Hookr hex byte string of the ABI length.");return e}if(t.type!=="string"||typeof e!="string"||new TextEncoder().encode(e).length>4096)throw new d("Provide a valid Hookr string.");return e}function O(t,e){if(Object.keys(t).some(i=>!e.includes(i))||e.some(i=>!Object.hasOwn(t,i)))throw new d("Provide exactly the documented Hookr parameters.")}function ye(t,e){O(e,t.inputs.map(g));let i=t.inputs.map((o,r)=>N(o,e[g(o,r)]));return{values:i,params:Object.fromEntries(t.inputs.map((o,r)=>[g(o,r),i[r]]))}}function ee(t,e){if(O(t,["contract","function","params"]),typeof t.contract!="string"||!Object.hasOwn(A,t.contract))throw new d("Choose a contract from hookr_contracts.");let i=A[t.contract];if(!e&&i.address.toLowerCase()===q.launcherV1.address.toLowerCase())throw new d("Use hookr_launch for the reviewed new Launcher; generic actions cannot call it.");let o=_(i).find(u=>u.name===t.function&&(e?Y(u):i.actions.includes(u.name)));if(!o)throw new d("This Hookr function is not exposed in this read/action lane. Read hookr_contracts for coverage.");let r=p(t.params);O(r,o.inputs.map(g));let c=o.inputs.map((u,f)=>N(u,r[g(u,f)])),s=Object.fromEntries(o.inputs.map((u,f)=>[g(u,f),c[f]]));return{pin:i,fn:o,values:c,params:s,target:b(i.address)}}var te={type:"string",enum:Object.keys(A),description:'Pinned Hookr contract role, as listed by hookr_contracts (for example "launcherV1").'},Q={type:"object",properties:{contract:te,function:{type:"string",description:"Function name on that contract, exactly as hookr_contracts lists it."},params:{type:"object",description:"Exact typed parameters from hookr_contracts for this contract and function; validated recursively before any chain read."}},required:["contract","function","params"],additionalProperties:!1};function ne(t){return JSON.parse(JSON.stringify(t,(e,i)=>typeof i=="bigint"?i.toString():i))}async function me(t,e,i){if(t.network==="testnet")throw new d("Hookr actions are configured only on mainnet, chain 4663.");let{pin:o,fn:r,values:c,params:s,target:u}=ee(e,!1),f=e.contract,l=r.name,H=t.clientFor(k),v=[],P=[],w=0n,C=new Map,h=(n,a)=>{let m=b(n),x=typeof a=="bigint"?a:se(a);if(x<0n||x>=(1n<<256n)-1n)throw new d("Hookr funding must be an exact bounded amount.");x&&(m===B?w+=x:C.set(m,(C.get(m)??0n)+x))},$=(n,a,m=[])=>H.readContract({address:b(A[n].address),abi:A[n].abi,functionName:a,args:m});if(f==="router"&&["swap","swapGated"].includes(l)){let n=p(s.params),a=p(n.key),m=n.amountSpecified;if(m===0n||n.amountBound===0n)throw new d("Hookr swaps require a nonzero amount and bound.");h(n.zeroForOne?a.currency0:a.currency1,m<0n?-m:n.amountBound)}else if(f==="vault"&&l==="deposit"){let n=p(s.params),a=p(n.key);if(h(a.currency0,n.amount0Desired),h(a.currency1,n.amount1Desired),n.amount0Min>n.amount0Desired||n.amount1Min>n.amount1Desired)throw new d("Hookr deposit minimum exceeds its desired amount.")}else if(f==="vault"&&l==="transfer")P.push({token:u,id:s.id,amount:s.amount,to:b(s.receiver)});else if(f==="launcher"&&l.startsWith("launch")){let n=l==="launchFamily"?p(s.p):s,a=p(n.token),m=n.members;if(m.length<1||m.length>8)throw new d("Hookr launch needs one to eight members.");if(T(String(a.salt),String(await $("launcher","SKIP_TAKEN"))))throw new d("Hookr skip-taken launches need per-pool funding checks and are not exposed yet.");let x=a.existing===B?b(await $("launcher","predictToken",[i,a])):b(a.existing),M=0n;for(let y of m){let I=BigInt(x)<BigInt(String(y.quote)),D=I?y.amount0Max:y.amount1Max;a.existing===B?M+=D:h(x,D),h(y.quote,I?y.amount1Max:y.amount0Max)}if(M>a.supply)throw new d("Hookr launch seeds more new tokens than its supply.");let oe=l==="launchFamily"?n.buys:l==="launchWithBuy"?[p(s.buy)]:[];for(let y of oe){let I=m[Number(y.member)];if(!I)throw new d("Hookr dev buy references an unavailable member.");h(I.quote,y.quoteIn)}let F=await H.readContract({address:u,abi:G,functionName:"launchFee"});if(!Array.isArray(F)||typeof F[0]!="bigint"||F[0]<0n)throw new d("Hookr launch fee is unavailable.");w+=F[0]}else if(f==="launcher"&&l==="addLiquidity"){let n=p(await $("launcher","position",[s.familyId,s.member])),a=p(n.key);h(a.currency0,s.max0),h(a.currency1,s.max1)}else if(f==="ownedFactory"&&l==="deploy"){let n=await $("ownedFactory","deployFee");if(typeof n!="bigint"||n<0n)throw new d("Hookr own-hook deployment fee is unavailable.");w=n}else if(f==="programs"&&l==="createProgram"){let n=p(s.t);if(h(n.rewardToken,n.cashBudget),w)throw new d("Hookr program cash rewards require an ERC-20 token.")}else if(f==="commissions"&&l==="createCampaign"){let n=p(s.t),a=n.end-n.start;if(a<=0n||a%86400n!==0n||a/86400n>366n)throw new d("Hookr referral campaigns must cover one to 366 whole days.");h(n.currency,n.dailyBudget*(a/86400n))}else if(f==="reserve"&&l==="fundReserve")h(s.token,s.amount);else if(f==="tokenizer"){let n=p(s.arg1);if(n.launchParams!=="0x"||["feebs","positionIds","positionPermits","v3PositionIds","v3Permits"].some(a=>n[a].length>0))throw new d("Composite revenue launches and NFT streams need their exact child-spender and funding routes; this route accepts families, Rules, revenue-token shares and bound outside sources.");for(let a of n.revenueTokens)h(a.token,a.amount);if(l==="tokenize"&&p(s.arg2).open){let a=await H.readContract({address:b(A.launcher.address),abi:G,functionName:"launchFee"});if(!Array.isArray(a)||typeof a[0]!="bigint"||a[0]<0n)throw new d("Hookr revenue market launch fee is unavailable.");w+=a[0]}}else if(f==="boost"&&["fund","notify"].includes(l)){let n=p(await $("boost","gauge",[s.id]));if(h(p(n.terms).rewardToken,s.amount),w)throw new d("Hookr boost rewards require an ERC-20 token.")}else if(f==="boost"&&l==="stake"){let n=b(await $("boost","positionManager"));if(n!==ie("0x58daec3116aae6D93017bAAea7749052E8a04fA7"))throw new d("Hookr boost position manager disagrees with the published deployment.");let a=await H.readContract({address:n,abi:V,functionName:"ownerOf",args:[s.tokenId]});if(!T(a,i))throw new d("The signing wallet must own the position NFT it stakes.");v.push(t.unsignedTx({to:n,data:J({abi:V,functionName:"approve",args:[u,s.tokenId]}),value:"0",chainId:k,description:`Approve only Hookr position NFT #${s.tokenId} to ${u}.`})),P.push({token:n,id:s.tokenId,amount:1n,to:u})}let j=await H.getBlock();if(typeof j.timestamp!="bigint"||j.timestamp<=0n)throw new d("Hookr chain time is unavailable.");let S=n=>{if(Array.isArray(n)){n.forEach(S);return}if(!(!n||typeof n!="object"))for(let[a,m]of Object.entries(n)){if(a==="deadline"&&typeof m=="bigint"&&m<j.timestamp)throw new d("Hookr deadline expired. Refresh the action terms.");S(m)}};S(s);for(let[n,a]of C){if(a>=(1n<<256n)-1n)throw new d("Hookr aggregate funding exceeds its exact approval bound.");let m=await H.readContract({address:n,abi:re,functionName:"allowance",args:[i,u]});m>0n&&m!==a&&v.push(t.approval(n,u,"0",k)),v.push(t.approval(n,u,a.toString(),k)),P.push({token:n,amount:a})}return w&&P.push({token:W,amount:w,to:u}),v.push(t.unsignedTx({to:u,data:J({abi:[r],functionName:r.name,args:c}),value:w.toString(),chainId:k,description:`Hookr ${f}.${l}: ${JSON.stringify(ne(s))}. Review recipients, bounds, ownership and any delayed effects.`})),{txs:v,inputs:P}}function ke(t,e){if(t.length!==e.length||t.some((i,o)=>i.chainId!==e[o].chainId||!T(i.to,e[o].to)||i.value!==e[o].value||!T(i.data,e[o].data)))throw new d("Hookr transactions differ from the locally reconstructed parameters and exact funding.")}function xe(t){return[{name:"hookr_contracts",inputSchema:{type:"object",description:"Read Hookr contract coverage and typed function schemas: swaps, launches and dev buys, liquidity, saved hooks, own hooks, LP boost, programs, referrals, claims, registry and treasury administration. Filter contract/function to fetch only the needed schema. No network request.",properties:{contract:{...te,description:"Only this pinned contract role; omit for every contract."},function:{type:"string",description:"Only this function name; omit for every function of the selected contracts."}},additionalProperties:!1},execute:async e=>{if(Object.keys(e).some(o=>!["contract","function"].includes(o))||e.contract!==void 0&&(typeof e.contract!="string"||!Object.hasOwn(A,e.contract))||e.function!==void 0&&typeof e.function!="string")throw new d("Choose a documented Hookr contract and function filter.");let i=o=>e.function===void 0||o.name===e.function;return{chainId:k,contracts:Object.entries(A).filter(([o])=>e.contract===void 0||o===e.contract).map(([o,r])=>({role:o,address:b(r.address),source:r.source,match:r.match,reads:_(r).filter(c=>Y(c)&&i(c)).map(c=>({function:c.name,params:E(c.inputs,c.name)})),actions:r.actions.filter(c=>e.function===void 0||c===e.function).map(c=>({function:c,params:E(_(r).find(s=>s.name===c).inputs,c)}))})),note:"Contract parameters use decimal base-unit strings for every integer. Actions always require preview and local human confirmation. Unlisted/internal functions are unavailable."}}},{name:"hookr_read",inputSchema:{...Q,description:"Read a pinned Hookr contract function. Fetch its exact parameter schema with hookr_contracts {contract,function}; no signing, subscription or identity required."},execute:async e=>{let{pin:i,fn:o,values:r,target:c}=ee(e,!0),s=await t.clientFor(k).readContract({address:c,abi:[o],functionName:o.name,args:r});return{chainId:k,contract:c,function:o.name,result:ne(s),source:i.source}}},{name:"hookr_action",inputSchema:{...Q,description:"Build a pinned Hookr action with exact funding: swap, launch/dev buy, liquidity deposit/exit, boost stake/exit, profile/own-hook management, programs/referrals and owner/keeper administration. Fetch its exact parameter schema with hookr_contracts {contract,function}. Preview and human confirmation required."},execute:async(e,i)=>{let o=await me(t,e,i),r=await t.preview(o.txs,i);return{txs:o.txs,preview:r,summary:`Hookr ${e.contract}.${e.function}; review the preview and human confirmation.`}}}]}export{ue as a,E as b,ye as c,me as d,ke as e,xe as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={tickSpacing:200,baseLpFeePips:3e3,deadlineSeconds:300n};export{e as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as t}from"./LCH6F5HT.js";import{c as o}from"./4J245N3F.js";function s(e,n,a){return t(e,n,a,o)}export{s as a};
|