@oakagentkit/core 0.2.1 → 0.2.2
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 +93 -0
- package/build/dist/api/addresses.js +1 -1
- package/build/dist/api/chain.js +1 -1
- 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/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/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/validation.js +1 -1
- package/build/dist/api/modules/grove/index.js +1 -1
- package/build/dist/api/modules/heyresearch/backoff.d.ts +6 -0
- package/build/dist/api/modules/heyresearch/backoff.js +1 -0
- package/build/dist/api/modules/heyresearch/builder-feed.d.ts +62 -0
- package/build/dist/api/modules/heyresearch/builder-feed.js +1 -0
- package/build/dist/api/modules/heyresearch/index.d.ts +3 -0
- package/build/dist/api/modules/heyresearch/index.js +1 -1
- package/build/dist/api/modules/heyresearch/proof-reads.d.ts +7 -0
- package/build/dist/api/modules/heyresearch/proof-reads.js +1 -0
- package/build/dist/api/modules/heyresearch/public-reads.d.ts +1 -0
- package/build/dist/api/modules/heyresearch/public-reads.js +1 -1
- package/build/dist/api/modules/heyresearch/scan.d.ts +31 -0
- package/build/dist/api/modules/heyresearch/scan.js +1 -0
- package/build/dist/api/modules/heyresearch/status-labels.d.ts +5 -0
- package/build/dist/api/modules/heyresearch/status-labels.js +1 -0
- package/build/dist/api/modules/heyresearch/token-facts.d.ts +123 -0
- package/build/dist/api/modules/heyresearch/token-facts.js +1 -0
- 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 +1 -1
- 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 +63 -0
- package/build/dist/api/modules/hookr/agent-gate.js +1 -0
- 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.js +1 -1
- package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
- package/build/dist/api/modules/hookr/index.d.ts +1 -0
- package/build/dist/api/modules/hookr/index.js +1 -1
- package/build/dist/api/modules/hookr/launch-options.d.ts +119 -0
- package/build/dist/api/modules/hookr/launch-options.js +1 -0
- package/build/dist/api/modules/hookr/launch-profile.d.ts +5 -0
- package/build/dist/api/modules/hookr/launch-profile.js +1 -0
- package/build/dist/api/modules/hookr/launch-receipt.d.ts +144 -0
- package/build/dist/api/modules/hookr/launch-receipt.js +1 -0
- package/build/dist/api/modules/hookr/launch.d.ts +58 -0
- package/build/dist/api/modules/hookr/launch.js +1 -0
- package/build/dist/api/modules/hookr/liquidity.d.ts +48 -0
- package/build/dist/api/modules/hookr/liquidity.js +1 -0
- package/build/dist/api/modules/hookr/lp-positions.d.ts +2 -0
- package/build/dist/api/modules/hookr/lp-positions.js +1 -0
- package/build/dist/api/modules/hookr/lp-reads.d.ts +52 -0
- package/build/dist/api/modules/hookr/lp-reads.js +1 -0
- package/build/dist/api/modules/hookr/lp-receipt.d.ts +136 -0
- package/build/dist/api/modules/hookr/lp-receipt.js +1 -0
- package/build/dist/api/modules/hookr/lp-state.d.ts +33 -0
- package/build/dist/api/modules/hookr/lp-state.js +1 -0
- package/build/dist/api/modules/hookr/pins.d.ts +43 -0
- package/build/dist/api/modules/hookr/pins.js +1 -0
- package/build/dist/api/modules/hookr/public-reads.js +1 -1
- package/build/dist/api/modules/hookr/read-utils.d.ts +59 -0
- package/build/dist/api/modules/hookr/read-utils.js +1 -0
- package/build/dist/api/modules/hookr/relay.js +1 -1
- package/build/dist/api/modules/hookr/revenue.js +1 -1
- 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/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/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/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/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/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.d.ts +5 -0
- package/build/dist/api/modules/wormhole/index.js +1 -0
- package/build/dist/api/modules/wormhole/license.d.ts +2 -0
- package/build/dist/api/modules/wormhole/license.js +1 -0
- package/build/dist/api/modules/wormhole/quotetext.d.ts +36 -0
- package/build/dist/api/modules/wormhole/quotetext.js +1 -0
- package/build/dist/api/modules/wormhole/scan-text.d.ts +40 -0
- package/build/dist/api/modules/wormhole/scan-text.js +1 -0
- package/build/dist/api/modules/wormhole/token-check.d.ts +54 -0
- package/build/dist/api/modules/wormhole/token-check.js +1 -0
- package/build/dist/api/positions.js +1 -1
- package/build/dist/api/pricenote.js +1 -1
- package/build/dist/api/prices.js +1 -1
- package/build/dist/api/pricing.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.js +1 -1
- package/build/dist/api/tokens.js +1 -1
- package/build/dist/api/tool-policy.js +1 -1
- package/build/dist/api/types.d.ts +7 -0
- package/build/dist/chunks/{QHHZDXRG.js → 2FSX7MMR.js} +1 -1
- package/build/dist/chunks/{RTBOMWCB.js → 2LM7U4S7.js} +1 -1
- package/build/dist/chunks/{BBVKWG65.js → 2MSQ6JII.js} +1 -1
- package/build/dist/chunks/{T6MTTMLQ.js → 2UU5TBBB.js} +1 -1
- package/build/dist/chunks/{OW7GOYKA.js → 2W46IRX6.js} +1 -1
- package/build/dist/chunks/{6LLOTPH2.js → 3EFV4FQF.js} +1 -1
- package/build/dist/chunks/{IAXKPME3.js → 3NDVXEBR.js} +1 -1
- package/build/dist/chunks/3SC5UI35.js +1 -0
- package/build/dist/chunks/{TCS3ICNE.js → 3WBDHUV2.js} +1 -1
- package/build/dist/chunks/{UPPYXY74.js → 4AKIXLXH.js} +1 -1
- package/build/dist/chunks/{RRSODRGT.js → 4GAWMCQC.js} +1 -1
- package/build/dist/chunks/{ZGXNTWYG.js → 4GHVIBL5.js} +1 -1
- package/build/dist/chunks/{NHCRJC5X.js → 4KQZTPMS.js} +1 -1
- package/build/dist/chunks/{N77ANGBT.js → 4X2JOQ2L.js} +1 -1
- package/build/dist/chunks/{ZPM2MFXZ.js → 52DHGSG4.js} +1 -1
- package/build/dist/chunks/{2CS3M32D.js → 57HAXNQV.js} +1 -1
- package/build/dist/chunks/5IIR3GIN.js +1 -0
- package/build/dist/chunks/{CAU44UWP.js → 5O5ZE3ZV.js} +1 -1
- package/build/dist/chunks/5OEHZJ6X.js +1 -0
- package/build/dist/chunks/{CBA776XQ.js → 5VHH5PW3.js} +1 -1
- package/build/dist/chunks/{NCEJZWGX.js → 66VBACC2.js} +1 -1
- package/build/dist/chunks/{6HV5BR7P.js → 6AWTAE4Q.js} +1 -1
- package/build/dist/chunks/{JRVTSGAT.js → 6UPPUHCL.js} +1 -1
- package/build/dist/chunks/{MEMVFR7Z.js → 6ZYLNB2B.js} +1 -1
- package/build/dist/chunks/7XLEYOZH.js +1 -0
- package/build/dist/chunks/{Q4RZQCDS.js → AAGDMH54.js} +1 -1
- package/build/dist/chunks/ACN2BFMA.js +1 -0
- package/build/dist/chunks/{L24EOVLT.js → AJP5LDM2.js} +1 -1
- package/build/dist/chunks/{F2YH72GF.js → ALK6NKFP.js} +1 -1
- package/build/dist/chunks/{EC5W3UZD.js → AMICUXS6.js} +1 -1
- package/build/dist/chunks/{5LQBHXFA.js → BX7XQANB.js} +1 -1
- package/build/dist/chunks/{QNPEKNWM.js → CEIPDEXZ.js} +1 -1
- package/build/dist/chunks/{HFQS5344.js → CQCVFRQ5.js} +1 -1
- package/build/dist/chunks/{OJLMF5AR.js → CUNQ5RG5.js} +1 -1
- package/build/dist/chunks/{IWALIX7Q.js → CXLEQCP3.js} +1 -1
- package/build/dist/chunks/{VJ3W2V3B.js → CY75R4FK.js} +1 -1
- package/build/dist/chunks/{65QFM4JU.js → DCTUYDWF.js} +1 -1
- package/build/dist/chunks/DHOBTJRD.js +1 -0
- package/build/dist/chunks/{N37ZLNCT.js → DRWWPBOQ.js} +1 -1
- package/build/dist/chunks/{7B5UH2VS.js → DZGEQBO7.js} +1 -1
- package/build/dist/chunks/{RFJCG4NA.js → E7R3J4H7.js} +1 -1
- package/build/dist/chunks/{7T4BYFD4.js → EGUMOD3A.js} +1 -1
- package/build/dist/chunks/ELZNT5Q3.js +1 -0
- package/build/dist/chunks/EPZ7SWKM.js +1 -0
- package/build/dist/chunks/{IUETZH6I.js → EXRKBBX2.js} +1 -1
- package/build/dist/chunks/{K7HIKXNT.js → FBSUTF3B.js} +1 -1
- package/build/dist/chunks/{LFN3OODW.js → FUXT7GRK.js} +1 -1
- package/build/dist/chunks/G6HCV67X.js +1 -0
- package/build/dist/chunks/{HNMOB76J.js → GGUEKSR4.js} +1 -1
- package/build/dist/chunks/{GZ5TW3WB.js → GIV5JMTE.js} +1 -1
- package/build/dist/chunks/{OMTCWXQR.js → GJY3P6OG.js} +1 -1
- package/build/dist/chunks/HOEQVPY7.js +1 -0
- package/build/dist/chunks/{3R3C3CU5.js → IBXYIN7Q.js} +1 -1
- package/build/dist/chunks/{SXX52Y27.js → IUE6RASI.js} +1 -1
- package/build/dist/chunks/J2XAEVKC.js +1 -0
- package/build/dist/chunks/{AYM5L6L7.js → J3GFCBZZ.js} +1 -1
- package/build/dist/chunks/JNZZLA2A.js +1 -0
- package/build/dist/chunks/{T3MGNKA6.js → JPOYTTTW.js} +1 -1
- package/build/dist/chunks/{AZGMF26W.js → JST5JGAP.js} +1 -1
- package/build/dist/chunks/{BG4S6MSN.js → JVI26KQO.js} +1 -1
- package/build/dist/chunks/{FBQWTWPT.js → JWCOXLYA.js} +1 -1
- package/build/dist/chunks/{G7UKNO2I.js → KHJFXJBU.js} +1 -1
- package/build/dist/chunks/{HQVC6X3T.js → KSZMMNXK.js} +1 -1
- package/build/dist/chunks/{O7PQDUVT.js → L3ZM77SJ.js} +1 -1
- package/build/dist/chunks/{QRUC7EFE.js → L62M7LOB.js} +1 -1
- package/build/dist/chunks/{22S4SFD5.js → L7YBCMZU.js} +1 -1
- package/build/dist/chunks/{H6ED3RHF.js → LMVB3B6T.js} +1 -1
- package/build/dist/chunks/{UIIJWIR6.js → LQGPMOD2.js} +1 -1
- package/build/dist/chunks/{WLACEU2Y.js → LQUDJCAR.js} +1 -1
- package/build/dist/chunks/LT5P6PZW.js +1 -0
- package/build/dist/chunks/M7U3A4EH.js +3 -0
- package/build/dist/chunks/MFNP4KOK.js +1 -0
- package/build/dist/chunks/MKQVS3IO.js +1 -0
- package/build/dist/chunks/{7US6PD56.js → MLPWQTBS.js} +1 -1
- package/build/dist/chunks/{5XFXH2JT.js → NATG6YA6.js} +1 -1
- package/build/dist/chunks/{O47JXRXN.js → NAYRD43N.js} +1 -1
- package/build/dist/chunks/{6L6DSMCU.js → NMYGNJIJ.js} +1 -1
- package/build/dist/chunks/NRBIXV7V.js +1 -0
- package/build/dist/chunks/{D6VP3N27.js → NSOEDRBU.js} +1 -1
- package/build/dist/chunks/{HL2MLC3O.js → NU4K3TEZ.js} +1 -1
- package/build/dist/chunks/NWSPC3NH.js +1 -0
- package/build/dist/chunks/{I7NUTSSX.js → OE3CLZHR.js} +1 -1
- package/build/dist/chunks/{2NA6JLEC.js → OQVZVR2S.js} +1 -1
- package/build/dist/chunks/{D3OWLDVB.js → OVK4EEOD.js} +1 -1
- package/build/dist/chunks/{Q2VMH2LB.js → PARWLWXW.js} +1 -1
- package/build/dist/chunks/{DHXVYHT4.js → PTAWEHKB.js} +1 -1
- package/build/dist/chunks/{DVKDWXEJ.js → PWBL4WKB.js} +1 -1
- package/build/dist/chunks/{PR2QED25.js → PZHR4ITH.js} +1 -1
- package/build/dist/chunks/{JG24LNUI.js → Q356HHCL.js} +1 -1
- package/build/dist/chunks/{OG5HRQU4.js → QRDDKA4I.js} +1 -1
- package/build/dist/chunks/{YR3QJVJQ.js → QXNPPCOU.js} +1 -1
- package/build/dist/chunks/{6NR7SVRO.js → QYYFRAWY.js} +1 -1
- package/build/dist/chunks/{QR7ALOR4.js → R53P2K3C.js} +1 -1
- package/build/dist/chunks/{5RKWSFD2.js → R7FXNZRM.js} +1 -1
- package/build/dist/chunks/{CCEWSOBT.js → R7QPJQP6.js} +1 -1
- package/build/dist/chunks/{SLSPWXR6.js → R7SXC74O.js} +1 -1
- package/build/dist/chunks/{IHGVCPVA.js → RAKUK5VR.js} +1 -1
- package/build/dist/chunks/{7LDAJ6BM.js → S3HNPTXA.js} +1 -1
- package/build/dist/chunks/SI6GCOAS.js +1 -0
- package/build/dist/chunks/{WIDTTGSH.js → SJPM5ST4.js} +1 -1
- package/build/dist/chunks/{QYHJWU5T.js → SJPYXNOK.js} +1 -1
- package/build/dist/chunks/{VY3P34PY.js → SKQGLGES.js} +1 -1
- package/build/dist/chunks/{ZT67OMLW.js → SOYQOE5P.js} +1 -1
- package/build/dist/chunks/{GUBB5P6V.js → SQZRVIVF.js} +1 -1
- package/build/dist/chunks/{E24S22BZ.js → SSTROLQM.js} +1 -1
- package/build/dist/chunks/{DGGOO4RN.js → SXAIXD56.js} +1 -1
- package/build/dist/chunks/{D4WURN33.js → SXX3VTBP.js} +1 -1
- package/build/dist/chunks/{UXG67LH3.js → TCPPYBGQ.js} +1 -1
- package/build/dist/chunks/TFVWAYHY.js +1 -0
- package/build/dist/chunks/{67TJOOBI.js → TLJPVYRJ.js} +1 -1
- package/build/dist/chunks/{ULJ6E4HP.js → TMGWXDCZ.js} +1 -1
- package/build/dist/chunks/{NMFVXBTL.js → TNSKEHPC.js} +1 -1
- package/build/dist/chunks/{C2FEXLMA.js → TQL7UDFL.js} +1 -1
- package/build/dist/chunks/{QXFJZGVB.js → TWCSCRFS.js} +1 -1
- package/build/dist/chunks/{2EDXKJ3B.js → TWSTOFN3.js} +1 -1
- package/build/dist/chunks/{X6G4BD35.js → U3F6DDML.js} +1 -1
- package/build/dist/chunks/{XGUKLFBU.js → UFS2RVEZ.js} +1 -1
- package/build/dist/chunks/{RM5W63LO.js → UNZRE3YU.js} +1 -1
- package/build/dist/chunks/{GECX5U3F.js → USSOVTD5.js} +1 -1
- package/build/dist/chunks/V2OOOV6B.js +1 -0
- package/build/dist/chunks/{IRWEY7TQ.js → V5LTA42G.js} +1 -1
- package/build/dist/chunks/{TAI63P6E.js → VC2RCYQE.js} +1 -1
- package/build/dist/chunks/{3ZVGHC6S.js → VFSRRDLY.js} +1 -1
- package/build/dist/chunks/{XW7RH7YY.js → VVEUJ36E.js} +1 -1
- package/build/dist/chunks/{5EHQM6DM.js → WQ6H62DM.js} +1 -1
- package/build/dist/chunks/{TDN3C4IG.js → WQQJ7UPJ.js} +1 -1
- package/build/dist/chunks/{F3TJCOVV.js → WTSMPDT5.js} +1 -1
- package/build/dist/chunks/{BYXBS45D.js → WVXW6VL3.js} +1 -1
- package/build/dist/chunks/WWFOYZT2.js +1 -0
- package/build/dist/chunks/WWNAGOCD.js +1 -0
- package/build/dist/chunks/X2NJSQUY.js +203 -0
- package/build/dist/chunks/{FKAA7VUR.js → XMA25DXR.js} +1 -1
- package/build/dist/chunks/{C3ZZSGSP.js → XQUPZ3GU.js} +1 -1
- package/build/dist/chunks/XQXLFF7Y.js +1 -0
- package/build/dist/chunks/XV2HQKND.js +1 -0
- package/build/dist/chunks/{QZM7CWZW.js → XVFLT275.js} +1 -1
- package/build/dist/chunks/{BV3AHLH5.js → XWEFKXKA.js} +1 -1
- package/build/dist/chunks/{BEPSWFJX.js → Y2KH6DCE.js} +1 -1
- package/build/dist/chunks/{NKY3DT34.js → YA5WWDEW.js} +1 -1
- package/build/dist/chunks/YHB55C5T.js +1 -0
- package/build/dist/chunks/YQUKU2LS.js +1 -0
- package/build/dist/chunks/{72AWP4BM.js → YZSTP2E6.js} +1 -1
- package/build/dist/chunks/{T3NPRRTY.js → Z7RL4NGX.js} +1 -1
- package/build/dist/chunks/{YMB553OJ.js → ZT47KN7A.js} +1 -1
- package/build/dist/chunks/{NUTHT4FE.js → ZUG6MG46.js} +1 -1
- package/package.json +1 -1
- package/build/dist/chunks/6SCCW74G.js +0 -1
- package/build/dist/chunks/DD7755AW.js +0 -1
- package/build/dist/chunks/EYYUWFUR.js +0 -1
- package/build/dist/chunks/JRO6WTK4.js +0 -1
- package/build/dist/chunks/MNFU7PO3.js +0 -1
- package/build/dist/chunks/N3GWFLG6.js +0 -1
- package/build/dist/chunks/UMK564HS.js +0 -1
- package/build/dist/chunks/XPFVT2EA.js +0 -1
- package/build/dist/chunks/XUJSQV52.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as pe,c as me}from"./2NA6JLEC.js";import{a as ue}from"./AXYOJBX6.js";import{a as be}from"./6IM6A5VA.js";import{c as le}from"./MYBDO5SA.js";import{a as O}from"./UWOFA6GV.js";import{c as Y,d as oe,g as I,i as fe,m as re,n as se}from"./73N3TOJL.js";import{a as S,i as de,j as ie}from"./XPFVT2EA.js";import{a as o}from"./5YS5V2LK.js";import{decodeFunctionData as J,encodeFunctionData as T,erc20Abi as te,getAddress as he,keccak256 as Ce,parseAbi as P}from"viem";var q={chainId:4663,observedAt:"2026-10-31",block:"102927065",routeBlock:"102928782",sources:["https://rpc.mainnet.chain.robinhood.com","https://raw.githubusercontent.com/beefyfinance/cowcentrated-subgraph/main/abis/beefy/clm/ClmManager.json","https://raw.githubusercontent.com/beefyfinance/beefy-v2/main/src/features/data/apis/beefy/beefy-clm-pool.ts"],markets:{v3:{router:"0xCaf681a66D020601342297493863E78C959E5cb2",quoter:"0x33e885eD0Ec9bF04EcfB19341582aADCb4c8A9E7",factory:"0x1f7d7550B1b028f7571E69A784071F0205FD2EfA"},cl:{router:"0xC062b870E813fcA720f1e002c234369Ab3aB9415",quoter:"0x03983AB2C057a2eac211ff01738a1e49ff325B49",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3"}},vaults:[{id:"up33-cow-robinhood-cashcat-weth-vault",vault:"0x25012D654bF9107B6E0Af0248656fEf0b718dBd3",manager:"0x137731B8B2D7Cd24aB4A4A9061f2D7b4Fd1aBFEE",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x020bfC650A365f8BB26819deAAbF3E21291018b4","0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"],strategy:"0xd7F3bCDAfCFf0018953BB6944Db2683Ff2e42b07",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x4E8649Be40aE67EBbcff99C291B92eE03015917b",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-usdg-net-vault",vault:"0x25B418FcFe8543c25AD9d78246839E5Cf3a3b50D",manager:"0x5A725556514222d0cc81501A9294a3135b7C41C4",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168","0xCA9c78Dd337A67F6e0077F65F5E9218719d30eDf"],strategy:"0x89207bED2935C64d6cb105E9C85E0E2ED99DD8f2",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"},{id:"up33-cow-robinhood-weth-stonkbroker-vault",vault:"0x544c7Ef9265dc08d93B5394116E68aE7D9e60730",manager:"0x5794bB61E83397049c40D87BbF3d44AF583A27Ce",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0xe934e36A439C94017B64a3FecE66AF12099aBF50"],strategy:"0x54Bd0805f549708144C811c14DdEeC0714CA5e0c",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-weth-up-vault",vault:"0x56EA4b4AFAFbb87CFD8Fd8a0266a2F86561677b8",manager:"0x36759534741E28Eb052238738963D684bFe719E4",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x57C0E45cB534413D1C20A4240955d6bB250BB4F1"],strategy:"0x8337c691C3afA52ccE418178e52ed472F034Cb8b",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x23D641FeCcD207E8794c593e8240444A0674C4Ba",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-weth-frong-vault",vault:"0x75588e48f7b4Ed9365d78C6cD509f3C7B804Ca47",manager:"0x9818f01EDCcc3d8EB86B859931C3B877cf44A108",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x6245e67affA44a23077f0Ea7f981a8DC743a0c47"],strategy:"0xdB739d906CD5101b65E089a284ec13a3ab21F603",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x9334BbCBE77C0883d704f71Db35CCF636639334c",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-usdg-intc-vault",vault:"0x8353c496114CF66D10545fdc2B4e6dFBafd37e3b",manager:"0x599ac767099bB6f01712867BfA1Fc1Aa27DEFD37",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168","0xc72b96e0E48ecd4DC75E1e45396e26300BC39681"],strategy:"0xbaEE86C9D7dE9dc192f17dFA62833B601Dc64D23",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:60,bridge:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"},{id:"up33-cow-robinhood-weth-tendies-vault",vault:"0x97DCDc29a3B3e2F556564279f7D09eE40eB74E45",manager:"0x9619bFB1f2D97E2B23F23310205e4c2089c1A45d",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x45242320DBB855EeA8Fd36804C6487E10E97FCF9"],strategy:"0x9a02CaA8a2e63659f8A419a29a3B48baD86d3c7a",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0xD53a623c17A5853838FA140cE5706eA008565dA8",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"}],routes:[{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x020bfC650A365f8BB26819deAAbF3E21291018b4",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c8020bfc650a365f8bb26819deaabf3e21291018b4",pools:["0x4E8649Be40aE67EBbcff99C291B92eE03015917b"]},{from:"0x020bfC650A365f8BB26819deAAbF3E21291018b4",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x020bfc650a365f8bb26819deaabf3e21291018b40000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x4E8649Be40aE67EBbcff99C291B92eE03015917b"]},{from:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",to:"0xCA9c78Dd337A67F6e0077F65F5E9218719d30eDf",kind:"cl",path:"0x5fc5360d0400a0fd4f2af552add042d716f1d1680000c8ca9c78dd337a67f6e0077f65f5e9218719d30edf",pools:["0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673"]},{from:"0xCA9c78Dd337A67F6e0077F65F5E9218719d30eDf",to:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",kind:"cl",path:"0xca9c78dd337a67f6e0077f65f5e9218719d30edf0000c85fc5360d0400a0fd4f2af552add042d716f1d168",pools:["0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0xe934e36A439C94017B64a3FecE66AF12099aBF50",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c8e934e36a439c94017b64a3fece66af12099abf50",pools:["0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c"]},{from:"0xe934e36A439C94017B64a3FecE66AF12099aBF50",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0xe934e36a439c94017b64a3fece66af12099abf500000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x57C0E45cB534413D1C20A4240955d6bB250BB4F1",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c857c0e45cb534413d1c20a4240955d6bb250bb4f1",pools:["0x23D641FeCcD207E8794c593e8240444A0674C4Ba"]},{from:"0x57C0E45cB534413D1C20A4240955d6bB250BB4F1",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x57c0e45cb534413d1c20a4240955d6bb250bb4f10000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x23D641FeCcD207E8794c593e8240444A0674C4Ba"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x6245e67affA44a23077f0Ea7f981a8DC743a0c47",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c86245e67affa44a23077f0ea7f981a8dc743a0c47",pools:["0x9334BbCBE77C0883d704f71Db35CCF636639334c"]},{from:"0x6245e67affA44a23077f0Ea7f981a8DC743a0c47",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x6245e67affa44a23077f0ea7f981a8dc743a0c470000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x9334BbCBE77C0883d704f71Db35CCF636639334c"]},{from:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",to:"0xc72b96e0E48ecd4DC75E1e45396e26300BC39681",kind:"cl",path:"0x5fc5360d0400a0fd4f2af552add042d716f1d16800003cc72b96e0e48ecd4dc75e1e45396e26300bc39681",pools:["0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67"]},{from:"0xc72b96e0E48ecd4DC75E1e45396e26300BC39681",to:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",kind:"cl",path:"0xc72b96e0e48ecd4dc75e1e45396e26300bc3968100003c5fc5360d0400a0fd4f2af552add042d716f1d168",pools:["0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x45242320DBB855EeA8Fd36804C6487E10E97FCF9",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c845242320dbb855eea8fd36804c6487e10e97fcf9",pools:["0xD53a623c17A5853838FA140cE5706eA008565dA8"]},{from:"0x45242320DBB855EeA8Fd36804C6487E10E97FCF9",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x45242320dbb855eea8fd36804c6487e10e97fcf90000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0xD53a623c17A5853838FA140cE5706eA008565dA8"]},{from:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"v3",path:"0x5fc5360d0400a0fd4f2af552add042d716f1d1680000640bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",kind:"v3",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000645fc5360d0400a0fd4f2af552add042d716f1d168",pools:["0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca"]}],codeHashes:{"0x137731B8B2D7Cd24aB4A4A9061f2D7b4Fd1aBFEE":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C":"0x6f2a1713cbceba31cc630dddda1ef99cd35086c96005f3c9ea015f9a8e53e613","0xd7F3bCDAfCFf0018953BB6944Db2683Ff2e42b07":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0xfD7EE9D17BD6941bF8e612281ec23E857134BB92":"0x9cc155dd143657bba37e6a51fa28e78158e3f47454acdcebedc0512e3803d0fc","0xF5331Dc29A1FDe4b22d7F168661584B057228683":"0x9f1e0f8e488165740c5ab91a3da1bea1a75eeef607ea37b32296ad465971344c","0x4E8649Be40aE67EBbcff99C291B92eE03015917b":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3":"0x4350c8fcdf90361969542249d76c25d6afbd31f10bebf0134bfe21beba1e8f4c","0x5A725556514222d0cc81501A9294a3135b7C41C4":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x89207bED2935C64d6cb105E9C85E0E2ED99DD8f2":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x5794bB61E83397049c40D87BbF3d44AF583A27Ce":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x54Bd0805f549708144C811c14DdEeC0714CA5e0c":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x36759534741E28Eb052238738963D684bFe719E4":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x8337c691C3afA52ccE418178e52ed472F034Cb8b":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x23D641FeCcD207E8794c593e8240444A0674C4Ba":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x9818f01EDCcc3d8EB86B859931C3B877cf44A108":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0xdB739d906CD5101b65E089a284ec13a3ab21F603":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x9334BbCBE77C0883d704f71Db35CCF636639334c":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x599ac767099bB6f01712867BfA1Fc1Aa27DEFD37":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0xbaEE86C9D7dE9dc192f17dFA62833B601Dc64D23":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x9619bFB1f2D97E2B23F23310205e4c2089c1A45d":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x9a02CaA8a2e63659f8A419a29a3B48baD86d3c7a":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0xD53a623c17A5853838FA140cE5706eA008565dA8":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0xCaf681a66D020601342297493863E78C959E5cb2":"0x6f36c378e272c6324c48f045182bcb54bd8ad654cf9ebd42e8893d52c4cb25dc","0x33e885eD0Ec9bF04EcfB19341582aADCb4c8A9E7":"0x3db0868d945e9304c9bc6a8b2181948109ea617647142f3c4083e14393496a28","0x1f7d7550B1b028f7571E69A784071F0205FD2EfA":"0xec72b1abd1f2faee020cfea9c646bd8994f9fb389054f6e574f103a895091739","0xC062b870E813fcA720f1e002c234369Ab3aB9415":"0x11ea7d3599ef56eda32c0ce7ca26e9aae71bec13bfcbd3ad0e83826c1a2defe4","0x03983AB2C057a2eac211ff01738a1e49ff325B49":"0x1ed81396c831d69a6c59384019850c21ac672d24ae83b4b26304a7384e1e4096","0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca":"0x3298b5dd4e6f115074c526a55ad05a36fd73a0034ac22ec6cbaab32cc9c1e8d2","0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73":"0x5706be52f64875fee65a2cec0d80e47a23d8793cbe85d214b48445e2d05f5353","0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3":"0xa2cf7f366f3d8d11e611acecf7916a27308ba041bf1e161bddbd4ecbb9402b6a"},delegates:{"0x137731B8B2D7Cd24aB4A4A9061f2D7b4Fd1aBFEE":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x4E8649Be40aE67EBbcff99C291B92eE03015917b":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x5A725556514222d0cc81501A9294a3135b7C41C4":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x5794bB61E83397049c40D87BbF3d44AF583A27Ce":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x36759534741E28Eb052238738963D684bFe719E4":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x23D641FeCcD207E8794c593e8240444A0674C4Ba":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x9818f01EDCcc3d8EB86B859931C3B877cf44A108":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x9334BbCBE77C0883d704f71Db35CCF636639334c":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x599ac767099bB6f01712867BfA1Fc1Aa27DEFD37":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x9619bFB1f2D97E2B23F23310205e4c2089c1A45d":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0xD53a623c17A5853838FA140cE5706eA008565dA8":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3"}};var De=q.vaults,we=["beefy_clm_swap","beefy_clm_deposit","beefy_clm_withdraw"],Z=P(["function wants() view returns(address,address)","function strategy() view returns(address)","function want() view returns(address)","function implementation() view returns(address)","function pool() view returns(address)","function vault() view returns(address)","function price() view returns(uint256)","function paused() view returns(bool)","function isCalm() view returns(bool)","function actionableAt() view returns(uint256)","function token0() view returns(address)","function token1() view returns(address)","function factory() view returns(address)","function tickSpacing() view returns(int24)","function balances() view returns(uint256,uint256)","function previewDeposit(uint256,uint256) view returns(uint256 shares,uint256 amount0,uint256 amount1,uint256 fee0,uint256 fee1)","function previewWithdraw(uint256) view returns(uint256,uint256)","function deposit(uint256 amount0,uint256 amount1,uint256 minShares)","function withdraw(uint256 shares,uint256 minAmount0,uint256 minAmount1)"]),ce=P(["function exactInput((bytes path,address recipient,uint256 deadline,uint256 amountIn,uint256 amountOutMinimum)) payable returns(uint256)"]),W=P(["function exactInput((bytes path,address recipient,uint256 amountIn,uint256 amountOutMinimum)) payable returns(uint256)","function multicall(uint256 deadline,bytes[] data) payable returns(bytes[])"]),Fe=P(["function quoteExactInput(bytes path,uint256 amountIn) returns(uint256,uint160[],uint32[],uint256)"]),ge={cl:P(["function getPool(address,address,int24) view returns(address)"]),v3:P(["function getPool(address,address,uint24) view returns(address)"])},ye=P(["function deposit() payable"]),z={vault:Y,chainId:{const:S},slippageBps:{type:"integer",minimum:0,maximum:500}},Be=10n**36n,K=he(de[S].uniswap.WETH.address),ve="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",ke=Object.fromEntries(Object.entries(q.codeHashes).map(([d,s])=>[d.toLowerCase(),s])),Ae=Object.fromEntries(Object.entries(q.delegates).map(([d,s])=>[d.toLowerCase(),s]));function f(d){return fe(d,"Provide a token or vault address.",oe)}function F(d){return re(d,"Invalid Beefy CLM integer.")}function G(d,s=!1){return se(d,"Provide a positive amount that fits uint256.",{notString:"Provide a decimal base-unit integer string.",positive:!s})}function Q(d){let s=d??50;if(typeof s!="number"||!Number.isInteger(s)||s<0||s>500)throw new o("Use integer slippageBps from 0 to 500.");return BigInt(s)}function X(d,s){let m=d*(10000n-s)/10000n;if(m<=0n)throw new o("This CLM amount is too small for a positive output minimum.");return m}function ne(d,s){if(!Array.isArray(d)||d.length!==s)throw new o("Invalid Beefy CLM quote.");return d.map(F)}function Se(d){let s=f(d),m=De.find(b=>I(b.vault,s));if(!m)throw new o("This vault has no qualified Beefy CLM route. Use beefy_withdraw to return existing vault shares to their want; redeem that want through the project app if Oak has no qualified redemption route.");return m}function Me(d,s,m,b,h){if(d<=0n||m<=0n||b<0n||h<0n)throw new o("The CLM price or budget is invalid.");let x=s?d*m/Be:d;if(x===0n)throw new o("The CLM budget is too small at the current pool price.");let e=b*m/Be,t=h>e?h-e:e-h,a=x<t?x:t,r=(x-a)/2n,c=d*(h>e?a+r:r)/x;return[c,d-c]}var xe=d=>{async function s(e){try{return await e()}catch(t){throw new o(d.plainError(t))}}function m(e,t){if(e.chainId!==void 0&&e.chainId!==S)throw new o("Beefy CLM requires chain 4663.");for(let a of Object.keys(e))if(!["vault","chainId",...t].includes(a))throw new o(`Unsupported Beefy CLM input: ${a}.`);return Se(e.vault)}async function b(e,t){be(t);let a=d.clientFor(S);if(await a.getChainId()!==S)throw new o("The Beefy CLM endpoint must report chain 4663.");let r=F(await a.getBlockNumber()),c=await a.getBlock({blockNumber:r}),n=(B,p,A=[])=>a.readContract({address:f(B),abi:Z,functionName:p,args:A,blockNumber:r}),i=new Set;async function l(B){let p=B.toLowerCase();if(i.has(p))return;let A=ke[p];if(!A)throw new o("Unqualified Beefy CLM dependency; no transaction was built.");let D=await a.getCode({address:f(B),blockNumber:r});if(!D||Ce(D)!==A)throw new o("A Beefy CLM contract or delegated implementation no longer matches its pinned code.");i.add(p),Ae[p]&&await l(Ae[p])}await me(a,f(e.vault),r);for(let B of[e.manager,e.strategy,e.beacon,e.implementation,e.pool,e.factory])await l(B);let[g,u,y,E,C,k,w,M,R,ee]=await Promise.all([n(e.vault,"want"),n(e.manager,"wants"),n(e.manager,"strategy"),n(e.beacon,"implementation"),n(e.strategy,"pool"),n(e.strategy,"vault"),n(e.pool,"token0"),n(e.pool,"token1"),n(e.pool,"factory"),n(e.pool,"tickSpacing")]);if(f(g)!==e.manager||!Array.isArray(u)||u.length!==2||u.some((B,p)=>f(B)!==e.wants[p])||f(y)!==e.strategy||f(E)!==e.implementation||f(C)!==e.pool||f(k)!==e.manager||f(w)!==e.wants[0]||f(M)!==e.wants[1]||f(R)!==e.factory||ee!==e.tickSpacing)throw new o("The Beefy CLM want, tokens, strategy, beacon or pool differs from its qualified deployment.");let V=async B=>F(await a.readContract({address:f(B),abi:te,functionName:"balanceOf",args:[t],blockNumber:r}));async function ae(B){let p=f(B),[A,D]=await Promise.all([a.readContract({address:p,abi:te,functionName:"symbol",blockNumber:r}),a.readContract({address:p,abi:te,functionName:"decimals",blockNumber:r})]);if(typeof A!="string"||!A.trim()||!Number.isInteger(D)||D<0||D>255)throw new o("Invalid CLM token metadata.");return{address:p,symbol:A,decimals:D,chainId:S}}async function U(){let p=(await le(d.http,"https://api.beefy.finance/vaults",{},v=>Array.isArray(v)&&v.every($=>$!==null&&typeof $=="object"))).filter(v=>v.chain==="robinhood"&&typeof v.earnContractAddress=="string"&&I(v.earnContractAddress,e.vault)),A=p[0],D=pe(f(e.vault));if(p.length!==1||!A||A.id!==D.id||A.type!=="standard"||f(A.tokenAddress)!==e.manager||A.tokenDecimals!==18)throw new o("The Beefy API and qualified CLM vault disagree.");if(A.status!=="active")throw new o(`Beefy marks this vault ${String(A.status)}; deposits are unavailable. Exit with beefy_withdraw, redeem the returned CLM shares with beefy_clm_withdraw, then swap the received tokens to USDG with beefy_clm_swap.`);let L=f(await n(e.vault,"strategy")),_=await Promise.all([n(L,"paused"),n(e.strategy,"paused")]);if(_.some(v=>typeof v!="boolean"))throw new o("Invalid Beefy strategy pause flag.");if(_.some(Boolean))throw new o("The Beefy strategy is paused; deposits are unavailable. Exit with beefy_withdraw, redeem CLM shares with beefy_clm_withdraw, then convert the tokens to USDG with beefy_clm_swap.");if(await n(e.manager,"isCalm")!==!0)throw new o("The CLM pool is not calm; wait and request a fresh deposit preview.")}async function N(B,p){let A=new Set([...e.wants,f(ie),K]);if(!A.has(B)||!A.has(p)||B===p)throw new o("Use this CLM pair or the USDG/WETH conversion route, with different input and output tokens.");let D=q.routes.find(H=>H.from===B&&H.to===p&&(H.pools[0]===e.pool||H.kind==="v3"));if(!D)throw new o("No qualified direct CLM route for this token pair. Convert through the CLM bridge token in separately mined steps.");let L=q.markets[D.kind];for(let H of[L.router,L.quoter,L.factory,...D.pools])await l(H);let _=D.path;if(_.length!==88||f(_.slice(0,42))!==B||f(`0x${_.slice(-40)}`)!==p)throw new o("Invalid qualified CLM swap path.");let v=Number.parseInt(_.slice(42,48),16),$=await a.readContract({address:f(L.factory),abi:ge[D.kind],functionName:"getPool",args:[B,p,v],blockNumber:r});if(f($)!==D.pools[0])throw new o("The swap factory no longer selects the qualified CLM pool.");if(f(await n(L.quoter,"factory"))!==L.factory)throw new o("The CLM quoter factory differs from its pin.");return D}async function j(B,p,A){let D=await N(B,p),L=q.markets[D.kind],_=await a.simulateContract({address:f(L.quoter),abi:Fe,functionName:"quoteExactInput",args:[D.path,A],account:t,blockNumber:r}),v=F(_.result[0]);if(v===0n)throw new o("No positive quote for this CLM swap.");return{selected:D,market:L,out:v}}return{client:a,blockNumber:r,deadline:c.timestamp+600n,read:n,balance:V,token:ae,code:l,entryAvailable:U,quote:j}}function h(e,t,a,r="0"){return d.unsignedTx({to:f(e),data:t,description:a,value:r,chainId:S})}async function x(e,t,a){let r=await d.preview(e,t);return{txs:e,preview:r,summary:`${a} Re-read actual balances after every mined step. Calls are separate transactions; earlier steps can remain mined if a later step fails. Confirm the local preview. Gas is additional.`}}return{tools:[{name:"beefy_lp",inputSchema:{type:"object",properties:{...z,amount:{...O(),description:"Optional entry budget in the CLM bridge token base units (USDG or WETH)."}},required:["vault"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["amount","slippageBps"]),r=Q(e.slippageBps),c=await b(a,t),[n,i,l,g,u,y,E,C]=await Promise.all([c.token(a.wants[0]),c.token(a.wants[1]),c.token(a.manager),c.balance(a.wants[0]),c.balance(a.wants[1]),c.balance(a.manager),c.read(a.manager,"balances"),c.read(a.strategy,"price")]),k;if(e.amount!==void 0){await c.entryAvailable();let w=G(e.amount),[M,R]=ne(E,2),ee=Me(w,a.bridge===n.address,F(C),M,R),V=[];for(let[ae,U]of[n,i].entries()){let N=ee[ae],j=N===0n||U.address===a.bridge?N:(await c.quote(f(a.bridge),U.address,N)).out;V.push({token:U,bridgeAmount:N.toString(),expectedAmount:j.toString(),minimumAmount:j===0n?"0":X(j,r).toString(),swapRequired:N>0n&&U.address!==a.bridge})}k={bridge:await c.token(a.bridge),budget:w.toString(),inputs:V,source:"strategy.price() and CLM balances(); imbalance first, then split remaining value equally. Re-quote after mining swaps."}}return{chainId:S,vault:a.vault,manager:a.manager,bridge:await c.token(a.bridge),constituents:[{token:n,balance:g.toString()},{token:i,balance:u.toString()}],shares:{token:l,amount:y.toString()},entryPlan:k,block:c.blockNumber.toString(),summary:"Convert USDG or ETH to the bridge token with beefy_clm_swap. Use entryPlan to acquire the current deposit ratio, including a one-sided ratio when appropriate. Deposit actual balances with beefy_clm_deposit, then deposit mined CLM shares with beefy_deposit. Exit with beefy_withdraw, beefy_clm_withdraw, then beefy_clm_swap through the bridge token to USDG."}})},{name:"beefy_clm_swap",inputSchema:{type:"object",properties:{...z,from:Y,to:Y,amount:O()},required:["vault","from","to","amount"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["from","to","amount","slippageBps"]),r=Q(e.slippageBps),c=f(e.from),n=f(e.to),i=G(e.amount),l=c.toLowerCase()===ve,g=l?K:c,u=await b(a,t);if((l?await u.client.getBalance({address:t,blockNumber:u.blockNumber}):await u.balance(c))<i)throw new o("Insufficient CLM swap balance; keep ETH for gas.");let y=[];l&&(await u.code(K),y.push(h(K,T({abi:ye,functionName:"deposit"}),"Wrap exactly the requested ETH for the CLM workflow.",i.toString())));let E=i,C=i;if(g!==n){let w=await u.quote(g,n,i);E=w.out,C=X(E,r),y.push(d.approval(g,f(w.market.router),i.toString(),S));let M={path:w.selected.path,recipient:t,amountIn:i,amountOutMinimum:C},R=w.selected.kind==="cl"?T({abi:ce,functionName:"exactInput",args:[{...M,deadline:u.deadline}]}):T({abi:W,functionName:"multicall",args:[u.deadline,[T({abi:W,functionName:"exactInput",args:[M]})]]});y.push(h(w.market.router,R,`Swap exact input with at least ${C} output base units to the calling wallet.`))}else if(!l)throw new o("The CLM swap requires different input and output tokens.");let k=await u.token(n);return{...await x(y,t,"Swap qualified CLM constituents. Venue fees are included in the quote."),output:{token:k,amount:E.toString()},minimumOutput:{token:k,amount:C.toString()},deadline:u.deadline.toString()}})},{name:"beefy_clm_deposit",inputSchema:{type:"object",properties:{...z,amount0:O(),amount1:O()},required:["vault","amount0","amount1"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["amount0","amount1","slippageBps"]),r=Q(e.slippageBps),c=G(e.amount0,!0),n=G(e.amount1,!0);if(c===0n&&n===0n)throw new o("At least one CLM deposit amount must be positive.");let i=await b(a,t);if(await i.entryAvailable(),await i.balance(a.wants[0])<c||await i.balance(a.wants[1])<n)throw new o("Acquire the CLM constituents first and retry with their mined balances.");let[l,g,u,y,E]=ne(await i.read(a.manager,"previewDeposit",[c,n]),5);if(g>c||u>n||g+u===0n||y>g||E>u)throw new o("The CLM returned invalid deposit amounts or fees.");let C=X(l,r),k=[];for(let[w,M]of[c,n].entries())M>0n&&k.push(d.approval(f(a.wants[w]),f(a.manager),M.toString(),S));k.push(h(a.manager,T({abi:Z,functionName:"deposit",args:[c,n,C]}),`Mint at least ${C} CLM share base units to the calling wallet.`));for(let[w,M]of[c,n].entries())M>0n&&k.push(d.approval(f(a.wants[w]),f(a.manager),"0",S));return{...await x(k,t,"Mint CLM want shares with a positive share minimum and exact input approvals. Final revocations clear any unused allowance. Deposit the actual shares received into beefy_deposit separately."),output:{token:await i.token(a.manager),amount:l.toString()},minimumShares:C.toString(),usedAmounts:[g.toString(),u.toString()],fees:[y.toString(),E.toString()]}})},{name:"beefy_clm_withdraw",inputSchema:{type:"object",properties:{...z,shares:{anyOf:[O(),{const:"all"}]}},required:["vault","shares"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["shares","slippageBps"]),r=Q(e.slippageBps),c=e.shares==="all"?void 0:G(e.shares),n=await b(a,t),i=await n.balance(a.manager),l=c??i;if(l===0n||l>i)throw new o("Withdraw vault shares first, then provide a positive CLM share amount no greater than your mined balance.");let u=ne(await n.read(a.manager,"previewWithdraw",[l]),2).map(E=>E===0n?0n:X(E,r));if(u.every(E=>E===0n))throw new o("No positive CLM withdrawal output is available.");let y=[h(a.manager,T({abi:Z,functionName:"withdraw",args:[l,u[0],u[1]]}),"Redeem CLM shares and return the pair tokens to the calling wallet.")];return{...await x(y,t,"Redeem CLM shares. Convert actual returned tokens, including leftover deposit dust, through the bridge token to USDG with beefy_clm_swap after mining. Strategy pause or API status does not prevent requesting this preview."),minimumOutputs:await Promise.all(u.map(async(E,C)=>({token:await n.token(a.wants[C]),amount:E.toString()})))}})}]}};async function je(d,s,m,b){if(!we.includes(d))throw new o("Unknown Beefy CLM action.");let h=async()=>{throw new o("Beefy CLM reconstruction uses only qualified on-chain routes.")},x=ue({clientFor:()=>b,http:fetch,quoteSwap:h,buildSwap:h,preview:async t=>({txs:t,changes:[],summary:"Locally reconstructed CLM intent; local preview still required."})});return(await xe(x).tools.find(t=>t.name===d).execute(s,m)).txs}function Ge(d,s,m){let b=()=>{throw new o("Beefy CLM calldata differs from locally reconstructed intent; nothing was signed.")};function h(x,e,t){if(x===e)return;let a=J({abi:t,data:x}),r=J({abi:t,data:e});(a.functionName!==r.functionName||!a.args||!r.args)&&b();let c=[...a.args],n=[...r.args];if(I(T({abi:t,functionName:a.functionName,args:c}),x)||b(),a.functionName==="deposit"||a.functionName==="withdraw")for(let i of a.functionName==="deposit"?[2]:[1,2])F(c[i])<F(n[i])&&b(),c[i]=n[i];else if(a.functionName==="multicall"){let i=F(c[0]);(i<=m||i>F(n[0]))&&b(),(!Array.isArray(c[1])||!Array.isArray(n[1])||c[1].length!==1||n[1].length!==1)&&b(),h(c[1][0],n[1][0],W),c[0]=n[0],c[1]=n[1]}else if(a.functionName==="exactInput"){let i={...c[0]},l=n[0];F(i.amountOutMinimum)<F(l.amountOutMinimum)&&b(),i.amountOutMinimum=l.amountOutMinimum,"deadline"in i&&((F(i.deadline)<=m||F(i.deadline)>F(l.deadline))&&b(),i.deadline=l.deadline),c[0]=i}else b();I(T({abi:t,functionName:a.functionName,args:c}),e)||b()}(!s.length||d.length!==s.length)&&b();for(let[x,e]of d.entries()){let t=s[x];(e.chainId!==t.chainId||!I(e.to,t.to)||e.value!==t.value)&&b();try{if(I(t.to,q.markets.cl.router))J({abi:ce,data:t.data}).args[0].deadline<=m&&b();else if(I(t.to,q.markets.v3.router)){let a=J({abi:W,data:t.data});(a.functionName!=="multicall"||a.args[0]<=m)&&b()}}catch{b()}if(!I(e.data,t.data))try{let a=De.find(r=>I(r.manager,t.to));h(e.data,t.data,a?Z:I(t.to,q.markets.cl.router)?ce:W)}catch{b()}}}var We=d=>({tools:xe(d).tools.slice(1)});export{De as a,we as b,Z as c,ce as d,W as e,Se as f,Me as g,xe as h,je as i,Ge as j,We as k};
|
|
1
|
+
import{b as pe,c as me}from"./OQVZVR2S.js";import{a as ue}from"./AXYOJBX6.js";import{a as be}from"./6IM6A5VA.js";import{c as le}from"./MYBDO5SA.js";import{a as O}from"./UWOFA6GV.js";import{c as Y,d as oe,g as I,i as fe,m as re,n as se}from"./73N3TOJL.js";import{a as S,i as de,j as ie}from"./G6HCV67X.js";import{a as o}from"./5YS5V2LK.js";import{decodeFunctionData as J,encodeFunctionData as T,erc20Abi as te,getAddress as he,keccak256 as Ce,parseAbi as P}from"viem";var q={chainId:4663,observedAt:"2026-10-31",block:"102927065",routeBlock:"102928782",sources:["https://rpc.mainnet.chain.robinhood.com","https://raw.githubusercontent.com/beefyfinance/cowcentrated-subgraph/main/abis/beefy/clm/ClmManager.json","https://raw.githubusercontent.com/beefyfinance/beefy-v2/main/src/features/data/apis/beefy/beefy-clm-pool.ts"],markets:{v3:{router:"0xCaf681a66D020601342297493863E78C959E5cb2",quoter:"0x33e885eD0Ec9bF04EcfB19341582aADCb4c8A9E7",factory:"0x1f7d7550B1b028f7571E69A784071F0205FD2EfA"},cl:{router:"0xC062b870E813fcA720f1e002c234369Ab3aB9415",quoter:"0x03983AB2C057a2eac211ff01738a1e49ff325B49",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3"}},vaults:[{id:"up33-cow-robinhood-cashcat-weth-vault",vault:"0x25012D654bF9107B6E0Af0248656fEf0b718dBd3",manager:"0x137731B8B2D7Cd24aB4A4A9061f2D7b4Fd1aBFEE",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x020bfC650A365f8BB26819deAAbF3E21291018b4","0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"],strategy:"0xd7F3bCDAfCFf0018953BB6944Db2683Ff2e42b07",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x4E8649Be40aE67EBbcff99C291B92eE03015917b",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-usdg-net-vault",vault:"0x25B418FcFe8543c25AD9d78246839E5Cf3a3b50D",manager:"0x5A725556514222d0cc81501A9294a3135b7C41C4",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168","0xCA9c78Dd337A67F6e0077F65F5E9218719d30eDf"],strategy:"0x89207bED2935C64d6cb105E9C85E0E2ED99DD8f2",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"},{id:"up33-cow-robinhood-weth-stonkbroker-vault",vault:"0x544c7Ef9265dc08d93B5394116E68aE7D9e60730",manager:"0x5794bB61E83397049c40D87BbF3d44AF583A27Ce",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0xe934e36A439C94017B64a3FecE66AF12099aBF50"],strategy:"0x54Bd0805f549708144C811c14DdEeC0714CA5e0c",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-weth-up-vault",vault:"0x56EA4b4AFAFbb87CFD8Fd8a0266a2F86561677b8",manager:"0x36759534741E28Eb052238738963D684bFe719E4",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x57C0E45cB534413D1C20A4240955d6bB250BB4F1"],strategy:"0x8337c691C3afA52ccE418178e52ed472F034Cb8b",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x23D641FeCcD207E8794c593e8240444A0674C4Ba",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-weth-frong-vault",vault:"0x75588e48f7b4Ed9365d78C6cD509f3C7B804Ca47",manager:"0x9818f01EDCcc3d8EB86B859931C3B877cf44A108",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x6245e67affA44a23077f0Ea7f981a8DC743a0c47"],strategy:"0xdB739d906CD5101b65E089a284ec13a3ab21F603",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x9334BbCBE77C0883d704f71Db35CCF636639334c",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"},{id:"up33-cow-robinhood-usdg-intc-vault",vault:"0x8353c496114CF66D10545fdc2B4e6dFBafd37e3b",manager:"0x599ac767099bB6f01712867BfA1Fc1Aa27DEFD37",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168","0xc72b96e0E48ecd4DC75E1e45396e26300BC39681"],strategy:"0xbaEE86C9D7dE9dc192f17dFA62833B601Dc64D23",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:60,bridge:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"},{id:"up33-cow-robinhood-weth-tendies-vault",vault:"0x97DCDc29a3B3e2F556564279f7D09eE40eB74E45",manager:"0x9619bFB1f2D97E2B23F23310205e4c2089c1A45d",managerImpl:"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C",wants:["0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73","0x45242320DBB855EeA8Fd36804C6487E10E97FCF9"],strategy:"0x9a02CaA8a2e63659f8A419a29a3B48baD86d3c7a",beacon:"0xfD7EE9D17BD6941bF8e612281ec23E857134BB92",implementation:"0xF5331Dc29A1FDe4b22d7F168661584B057228683",pool:"0xD53a623c17A5853838FA140cE5706eA008565dA8",factory:"0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3",tickSpacing:200,bridge:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"}],routes:[{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x020bfC650A365f8BB26819deAAbF3E21291018b4",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c8020bfc650a365f8bb26819deaabf3e21291018b4",pools:["0x4E8649Be40aE67EBbcff99C291B92eE03015917b"]},{from:"0x020bfC650A365f8BB26819deAAbF3E21291018b4",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x020bfc650a365f8bb26819deaabf3e21291018b40000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x4E8649Be40aE67EBbcff99C291B92eE03015917b"]},{from:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",to:"0xCA9c78Dd337A67F6e0077F65F5E9218719d30eDf",kind:"cl",path:"0x5fc5360d0400a0fd4f2af552add042d716f1d1680000c8ca9c78dd337a67f6e0077f65f5e9218719d30edf",pools:["0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673"]},{from:"0xCA9c78Dd337A67F6e0077F65F5E9218719d30eDf",to:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",kind:"cl",path:"0xca9c78dd337a67f6e0077f65f5e9218719d30edf0000c85fc5360d0400a0fd4f2af552add042d716f1d168",pools:["0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0xe934e36A439C94017B64a3FecE66AF12099aBF50",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c8e934e36a439c94017b64a3fece66af12099abf50",pools:["0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c"]},{from:"0xe934e36A439C94017B64a3FecE66AF12099aBF50",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0xe934e36a439c94017b64a3fece66af12099abf500000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x57C0E45cB534413D1C20A4240955d6bB250BB4F1",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c857c0e45cb534413d1c20a4240955d6bb250bb4f1",pools:["0x23D641FeCcD207E8794c593e8240444A0674C4Ba"]},{from:"0x57C0E45cB534413D1C20A4240955d6bB250BB4F1",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x57c0e45cb534413d1c20a4240955d6bb250bb4f10000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x23D641FeCcD207E8794c593e8240444A0674C4Ba"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x6245e67affA44a23077f0Ea7f981a8DC743a0c47",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c86245e67affa44a23077f0ea7f981a8dc743a0c47",pools:["0x9334BbCBE77C0883d704f71Db35CCF636639334c"]},{from:"0x6245e67affA44a23077f0Ea7f981a8DC743a0c47",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x6245e67affa44a23077f0ea7f981a8dc743a0c470000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x9334BbCBE77C0883d704f71Db35CCF636639334c"]},{from:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",to:"0xc72b96e0E48ecd4DC75E1e45396e26300BC39681",kind:"cl",path:"0x5fc5360d0400a0fd4f2af552add042d716f1d16800003cc72b96e0e48ecd4dc75e1e45396e26300bc39681",pools:["0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67"]},{from:"0xc72b96e0E48ecd4DC75E1e45396e26300BC39681",to:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",kind:"cl",path:"0xc72b96e0e48ecd4dc75e1e45396e26300bc3968100003c5fc5360d0400a0fd4f2af552add042d716f1d168",pools:["0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x45242320DBB855EeA8Fd36804C6487E10E97FCF9",kind:"cl",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000c845242320dbb855eea8fd36804c6487e10e97fcf9",pools:["0xD53a623c17A5853838FA140cE5706eA008565dA8"]},{from:"0x45242320DBB855EeA8Fd36804C6487E10E97FCF9",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"cl",path:"0x45242320dbb855eea8fd36804c6487e10e97fcf90000c80bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0xD53a623c17A5853838FA140cE5706eA008565dA8"]},{from:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",to:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",kind:"v3",path:"0x5fc5360d0400a0fd4f2af552add042d716f1d1680000640bd7d308f8e1639fab988df18a8011f41eacad73",pools:["0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca"]},{from:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",to:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",kind:"v3",path:"0x0bd7d308f8e1639fab988df18a8011f41eacad730000645fc5360d0400a0fd4f2af552add042d716f1d168",pools:["0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca"]}],codeHashes:{"0x137731B8B2D7Cd24aB4A4A9061f2D7b4Fd1aBFEE":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C":"0x6f2a1713cbceba31cc630dddda1ef99cd35086c96005f3c9ea015f9a8e53e613","0xd7F3bCDAfCFf0018953BB6944Db2683Ff2e42b07":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0xfD7EE9D17BD6941bF8e612281ec23E857134BB92":"0x9cc155dd143657bba37e6a51fa28e78158e3f47454acdcebedc0512e3803d0fc","0xF5331Dc29A1FDe4b22d7F168661584B057228683":"0x9f1e0f8e488165740c5ab91a3da1bea1a75eeef607ea37b32296ad465971344c","0x4E8649Be40aE67EBbcff99C291B92eE03015917b":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x1ac9dB4a2608ba45D6127B1737949b51Bb54B7F3":"0x4350c8fcdf90361969542249d76c25d6afbd31f10bebf0134bfe21beba1e8f4c","0x5A725556514222d0cc81501A9294a3135b7C41C4":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x89207bED2935C64d6cb105E9C85E0E2ED99DD8f2":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x5794bB61E83397049c40D87BbF3d44AF583A27Ce":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x54Bd0805f549708144C811c14DdEeC0714CA5e0c":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x36759534741E28Eb052238738963D684bFe719E4":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x8337c691C3afA52ccE418178e52ed472F034Cb8b":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x23D641FeCcD207E8794c593e8240444A0674C4Ba":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x9818f01EDCcc3d8EB86B859931C3B877cf44A108":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0xdB739d906CD5101b65E089a284ec13a3ab21F603":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x9334BbCBE77C0883d704f71Db35CCF636639334c":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x599ac767099bB6f01712867BfA1Fc1Aa27DEFD37":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0xbaEE86C9D7dE9dc192f17dFA62833B601Dc64D23":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0x9619bFB1f2D97E2B23F23310205e4c2089c1A45d":"0xa5fcbfc6347a83acdfbc561e9c0a59b1bbb321da361c3463b73b5c173a68291b","0x9a02CaA8a2e63659f8A419a29a3B48baD86d3c7a":"0x48fed026ddb394d366df6328a1bb802687a479cd28e30ee41d38b8567fb90202","0xD53a623c17A5853838FA140cE5706eA008565dA8":"0xda57657ec68ddfb0987ba1352a44cefe40433e55585f3e4555b8ced4bbeb540d","0xCaf681a66D020601342297493863E78C959E5cb2":"0x6f36c378e272c6324c48f045182bcb54bd8ad654cf9ebd42e8893d52c4cb25dc","0x33e885eD0Ec9bF04EcfB19341582aADCb4c8A9E7":"0x3db0868d945e9304c9bc6a8b2181948109ea617647142f3c4083e14393496a28","0x1f7d7550B1b028f7571E69A784071F0205FD2EfA":"0xec72b1abd1f2faee020cfea9c646bd8994f9fb389054f6e574f103a895091739","0xC062b870E813fcA720f1e002c234369Ab3aB9415":"0x11ea7d3599ef56eda32c0ce7ca26e9aae71bec13bfcbd3ad0e83826c1a2defe4","0x03983AB2C057a2eac211ff01738a1e49ff325B49":"0x1ed81396c831d69a6c59384019850c21ac672d24ae83b4b26304a7384e1e4096","0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca":"0x3298b5dd4e6f115074c526a55ad05a36fd73a0034ac22ec6cbaab32cc9c1e8d2","0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73":"0x5706be52f64875fee65a2cec0d80e47a23d8793cbe85d214b48445e2d05f5353","0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3":"0xa2cf7f366f3d8d11e611acecf7916a27308ba041bf1e161bddbd4ecbb9402b6a"},delegates:{"0x137731B8B2D7Cd24aB4A4A9061f2D7b4Fd1aBFEE":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x4E8649Be40aE67EBbcff99C291B92eE03015917b":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x5A725556514222d0cc81501A9294a3135b7C41C4":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x99e70A5b06215e5D2F3BeC773b4f59c008fc1673":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x5794bB61E83397049c40D87BbF3d44AF583A27Ce":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0xB11ba9a4d345434c25d625C076f23Ad14abC6B3c":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x36759534741E28Eb052238738963D684bFe719E4":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x23D641FeCcD207E8794c593e8240444A0674C4Ba":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x9818f01EDCcc3d8EB86B859931C3B877cf44A108":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x9334BbCBE77C0883d704f71Db35CCF636639334c":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x599ac767099bB6f01712867BfA1Fc1Aa27DEFD37":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0x6290Be6e6913708866E6f17eaf3F4FCC7d3fdF67":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3","0x9619bFB1f2D97E2B23F23310205e4c2089c1A45d":"0xfD4017Ad7c1092aaFEbC82621B4DeE59f178D74C","0xD53a623c17A5853838FA140cE5706eA008565dA8":"0x11725976BF1F38c4aB78d1F480bc5883d70D9dc3"}};var De=q.vaults,we=["beefy_clm_swap","beefy_clm_deposit","beefy_clm_withdraw"],Z=P(["function wants() view returns(address,address)","function strategy() view returns(address)","function want() view returns(address)","function implementation() view returns(address)","function pool() view returns(address)","function vault() view returns(address)","function price() view returns(uint256)","function paused() view returns(bool)","function isCalm() view returns(bool)","function actionableAt() view returns(uint256)","function token0() view returns(address)","function token1() view returns(address)","function factory() view returns(address)","function tickSpacing() view returns(int24)","function balances() view returns(uint256,uint256)","function previewDeposit(uint256,uint256) view returns(uint256 shares,uint256 amount0,uint256 amount1,uint256 fee0,uint256 fee1)","function previewWithdraw(uint256) view returns(uint256,uint256)","function deposit(uint256 amount0,uint256 amount1,uint256 minShares)","function withdraw(uint256 shares,uint256 minAmount0,uint256 minAmount1)"]),ce=P(["function exactInput((bytes path,address recipient,uint256 deadline,uint256 amountIn,uint256 amountOutMinimum)) payable returns(uint256)"]),W=P(["function exactInput((bytes path,address recipient,uint256 amountIn,uint256 amountOutMinimum)) payable returns(uint256)","function multicall(uint256 deadline,bytes[] data) payable returns(bytes[])"]),Fe=P(["function quoteExactInput(bytes path,uint256 amountIn) returns(uint256,uint160[],uint32[],uint256)"]),ge={cl:P(["function getPool(address,address,int24) view returns(address)"]),v3:P(["function getPool(address,address,uint24) view returns(address)"])},ye=P(["function deposit() payable"]),z={vault:Y,chainId:{const:S},slippageBps:{type:"integer",minimum:0,maximum:500}},Be=10n**36n,K=he(de[S].uniswap.WETH.address),ve="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",ke=Object.fromEntries(Object.entries(q.codeHashes).map(([d,s])=>[d.toLowerCase(),s])),Ae=Object.fromEntries(Object.entries(q.delegates).map(([d,s])=>[d.toLowerCase(),s]));function f(d){return fe(d,"Provide a token or vault address.",oe)}function F(d){return re(d,"Invalid Beefy CLM integer.")}function G(d,s=!1){return se(d,"Provide a positive amount that fits uint256.",{notString:"Provide a decimal base-unit integer string.",positive:!s})}function Q(d){let s=d??50;if(typeof s!="number"||!Number.isInteger(s)||s<0||s>500)throw new o("Use integer slippageBps from 0 to 500.");return BigInt(s)}function X(d,s){let m=d*(10000n-s)/10000n;if(m<=0n)throw new o("This CLM amount is too small for a positive output minimum.");return m}function ne(d,s){if(!Array.isArray(d)||d.length!==s)throw new o("Invalid Beefy CLM quote.");return d.map(F)}function Se(d){let s=f(d),m=De.find(b=>I(b.vault,s));if(!m)throw new o("This vault has no qualified Beefy CLM route. Use beefy_withdraw to return existing vault shares to their want; redeem that want through the project app if Oak has no qualified redemption route.");return m}function Me(d,s,m,b,h){if(d<=0n||m<=0n||b<0n||h<0n)throw new o("The CLM price or budget is invalid.");let x=s?d*m/Be:d;if(x===0n)throw new o("The CLM budget is too small at the current pool price.");let e=b*m/Be,t=h>e?h-e:e-h,a=x<t?x:t,r=(x-a)/2n,c=d*(h>e?a+r:r)/x;return[c,d-c]}var xe=d=>{async function s(e){try{return await e()}catch(t){throw new o(d.plainError(t))}}function m(e,t){if(e.chainId!==void 0&&e.chainId!==S)throw new o("Beefy CLM requires chain 4663.");for(let a of Object.keys(e))if(!["vault","chainId",...t].includes(a))throw new o(`Unsupported Beefy CLM input: ${a}.`);return Se(e.vault)}async function b(e,t){be(t);let a=d.clientFor(S);if(await a.getChainId()!==S)throw new o("The Beefy CLM endpoint must report chain 4663.");let r=F(await a.getBlockNumber()),c=await a.getBlock({blockNumber:r}),n=(B,p,A=[])=>a.readContract({address:f(B),abi:Z,functionName:p,args:A,blockNumber:r}),i=new Set;async function l(B){let p=B.toLowerCase();if(i.has(p))return;let A=ke[p];if(!A)throw new o("Unqualified Beefy CLM dependency; no transaction was built.");let D=await a.getCode({address:f(B),blockNumber:r});if(!D||Ce(D)!==A)throw new o("A Beefy CLM contract or delegated implementation no longer matches its pinned code.");i.add(p),Ae[p]&&await l(Ae[p])}await me(a,f(e.vault),r);for(let B of[e.manager,e.strategy,e.beacon,e.implementation,e.pool,e.factory])await l(B);let[g,u,y,E,C,k,w,M,R,ee]=await Promise.all([n(e.vault,"want"),n(e.manager,"wants"),n(e.manager,"strategy"),n(e.beacon,"implementation"),n(e.strategy,"pool"),n(e.strategy,"vault"),n(e.pool,"token0"),n(e.pool,"token1"),n(e.pool,"factory"),n(e.pool,"tickSpacing")]);if(f(g)!==e.manager||!Array.isArray(u)||u.length!==2||u.some((B,p)=>f(B)!==e.wants[p])||f(y)!==e.strategy||f(E)!==e.implementation||f(C)!==e.pool||f(k)!==e.manager||f(w)!==e.wants[0]||f(M)!==e.wants[1]||f(R)!==e.factory||ee!==e.tickSpacing)throw new o("The Beefy CLM want, tokens, strategy, beacon or pool differs from its qualified deployment.");let V=async B=>F(await a.readContract({address:f(B),abi:te,functionName:"balanceOf",args:[t],blockNumber:r}));async function ae(B){let p=f(B),[A,D]=await Promise.all([a.readContract({address:p,abi:te,functionName:"symbol",blockNumber:r}),a.readContract({address:p,abi:te,functionName:"decimals",blockNumber:r})]);if(typeof A!="string"||!A.trim()||!Number.isInteger(D)||D<0||D>255)throw new o("Invalid CLM token metadata.");return{address:p,symbol:A,decimals:D,chainId:S}}async function U(){let p=(await le(d.http,"https://api.beefy.finance/vaults",{},v=>Array.isArray(v)&&v.every($=>$!==null&&typeof $=="object"))).filter(v=>v.chain==="robinhood"&&typeof v.earnContractAddress=="string"&&I(v.earnContractAddress,e.vault)),A=p[0],D=pe(f(e.vault));if(p.length!==1||!A||A.id!==D.id||A.type!=="standard"||f(A.tokenAddress)!==e.manager||A.tokenDecimals!==18)throw new o("The Beefy API and qualified CLM vault disagree.");if(A.status!=="active")throw new o(`Beefy marks this vault ${String(A.status)}; deposits are unavailable. Exit with beefy_withdraw, redeem the returned CLM shares with beefy_clm_withdraw, then swap the received tokens to USDG with beefy_clm_swap.`);let L=f(await n(e.vault,"strategy")),_=await Promise.all([n(L,"paused"),n(e.strategy,"paused")]);if(_.some(v=>typeof v!="boolean"))throw new o("Invalid Beefy strategy pause flag.");if(_.some(Boolean))throw new o("The Beefy strategy is paused; deposits are unavailable. Exit with beefy_withdraw, redeem CLM shares with beefy_clm_withdraw, then convert the tokens to USDG with beefy_clm_swap.");if(await n(e.manager,"isCalm")!==!0)throw new o("The CLM pool is not calm; wait and request a fresh deposit preview.")}async function N(B,p){let A=new Set([...e.wants,f(ie),K]);if(!A.has(B)||!A.has(p)||B===p)throw new o("Use this CLM pair or the USDG/WETH conversion route, with different input and output tokens.");let D=q.routes.find(H=>H.from===B&&H.to===p&&(H.pools[0]===e.pool||H.kind==="v3"));if(!D)throw new o("No qualified direct CLM route for this token pair. Convert through the CLM bridge token in separately mined steps.");let L=q.markets[D.kind];for(let H of[L.router,L.quoter,L.factory,...D.pools])await l(H);let _=D.path;if(_.length!==88||f(_.slice(0,42))!==B||f(`0x${_.slice(-40)}`)!==p)throw new o("Invalid qualified CLM swap path.");let v=Number.parseInt(_.slice(42,48),16),$=await a.readContract({address:f(L.factory),abi:ge[D.kind],functionName:"getPool",args:[B,p,v],blockNumber:r});if(f($)!==D.pools[0])throw new o("The swap factory no longer selects the qualified CLM pool.");if(f(await n(L.quoter,"factory"))!==L.factory)throw new o("The CLM quoter factory differs from its pin.");return D}async function j(B,p,A){let D=await N(B,p),L=q.markets[D.kind],_=await a.simulateContract({address:f(L.quoter),abi:Fe,functionName:"quoteExactInput",args:[D.path,A],account:t,blockNumber:r}),v=F(_.result[0]);if(v===0n)throw new o("No positive quote for this CLM swap.");return{selected:D,market:L,out:v}}return{client:a,blockNumber:r,deadline:c.timestamp+600n,read:n,balance:V,token:ae,code:l,entryAvailable:U,quote:j}}function h(e,t,a,r="0"){return d.unsignedTx({to:f(e),data:t,description:a,value:r,chainId:S})}async function x(e,t,a){let r=await d.preview(e,t);return{txs:e,preview:r,summary:`${a} Re-read actual balances after every mined step. Calls are separate transactions; earlier steps can remain mined if a later step fails. Confirm the local preview. Gas is additional.`}}return{tools:[{name:"beefy_lp",inputSchema:{type:"object",properties:{...z,amount:{...O(),description:"Optional entry budget in the CLM bridge token base units (USDG or WETH)."}},required:["vault"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["amount","slippageBps"]),r=Q(e.slippageBps),c=await b(a,t),[n,i,l,g,u,y,E,C]=await Promise.all([c.token(a.wants[0]),c.token(a.wants[1]),c.token(a.manager),c.balance(a.wants[0]),c.balance(a.wants[1]),c.balance(a.manager),c.read(a.manager,"balances"),c.read(a.strategy,"price")]),k;if(e.amount!==void 0){await c.entryAvailable();let w=G(e.amount),[M,R]=ne(E,2),ee=Me(w,a.bridge===n.address,F(C),M,R),V=[];for(let[ae,U]of[n,i].entries()){let N=ee[ae],j=N===0n||U.address===a.bridge?N:(await c.quote(f(a.bridge),U.address,N)).out;V.push({token:U,bridgeAmount:N.toString(),expectedAmount:j.toString(),minimumAmount:j===0n?"0":X(j,r).toString(),swapRequired:N>0n&&U.address!==a.bridge})}k={bridge:await c.token(a.bridge),budget:w.toString(),inputs:V,source:"strategy.price() and CLM balances(); imbalance first, then split remaining value equally. Re-quote after mining swaps."}}return{chainId:S,vault:a.vault,manager:a.manager,bridge:await c.token(a.bridge),constituents:[{token:n,balance:g.toString()},{token:i,balance:u.toString()}],shares:{token:l,amount:y.toString()},entryPlan:k,block:c.blockNumber.toString(),summary:"Convert USDG or ETH to the bridge token with beefy_clm_swap. Use entryPlan to acquire the current deposit ratio, including a one-sided ratio when appropriate. Deposit actual balances with beefy_clm_deposit, then deposit mined CLM shares with beefy_deposit. Exit with beefy_withdraw, beefy_clm_withdraw, then beefy_clm_swap through the bridge token to USDG."}})},{name:"beefy_clm_swap",inputSchema:{type:"object",properties:{...z,from:Y,to:Y,amount:O()},required:["vault","from","to","amount"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["from","to","amount","slippageBps"]),r=Q(e.slippageBps),c=f(e.from),n=f(e.to),i=G(e.amount),l=c.toLowerCase()===ve,g=l?K:c,u=await b(a,t);if((l?await u.client.getBalance({address:t,blockNumber:u.blockNumber}):await u.balance(c))<i)throw new o("Insufficient CLM swap balance; keep ETH for gas.");let y=[];l&&(await u.code(K),y.push(h(K,T({abi:ye,functionName:"deposit"}),"Wrap exactly the requested ETH for the CLM workflow.",i.toString())));let E=i,C=i;if(g!==n){let w=await u.quote(g,n,i);E=w.out,C=X(E,r),y.push(d.approval(g,f(w.market.router),i.toString(),S));let M={path:w.selected.path,recipient:t,amountIn:i,amountOutMinimum:C},R=w.selected.kind==="cl"?T({abi:ce,functionName:"exactInput",args:[{...M,deadline:u.deadline}]}):T({abi:W,functionName:"multicall",args:[u.deadline,[T({abi:W,functionName:"exactInput",args:[M]})]]});y.push(h(w.market.router,R,`Swap exact input with at least ${C} output base units to the calling wallet.`))}else if(!l)throw new o("The CLM swap requires different input and output tokens.");let k=await u.token(n);return{...await x(y,t,"Swap qualified CLM constituents. Venue fees are included in the quote."),output:{token:k,amount:E.toString()},minimumOutput:{token:k,amount:C.toString()},deadline:u.deadline.toString()}})},{name:"beefy_clm_deposit",inputSchema:{type:"object",properties:{...z,amount0:O(),amount1:O()},required:["vault","amount0","amount1"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["amount0","amount1","slippageBps"]),r=Q(e.slippageBps),c=G(e.amount0,!0),n=G(e.amount1,!0);if(c===0n&&n===0n)throw new o("At least one CLM deposit amount must be positive.");let i=await b(a,t);if(await i.entryAvailable(),await i.balance(a.wants[0])<c||await i.balance(a.wants[1])<n)throw new o("Acquire the CLM constituents first and retry with their mined balances.");let[l,g,u,y,E]=ne(await i.read(a.manager,"previewDeposit",[c,n]),5);if(g>c||u>n||g+u===0n||y>g||E>u)throw new o("The CLM returned invalid deposit amounts or fees.");let C=X(l,r),k=[];for(let[w,M]of[c,n].entries())M>0n&&k.push(d.approval(f(a.wants[w]),f(a.manager),M.toString(),S));k.push(h(a.manager,T({abi:Z,functionName:"deposit",args:[c,n,C]}),`Mint at least ${C} CLM share base units to the calling wallet.`));for(let[w,M]of[c,n].entries())M>0n&&k.push(d.approval(f(a.wants[w]),f(a.manager),"0",S));return{...await x(k,t,"Mint CLM want shares with a positive share minimum and exact input approvals. Final revocations clear any unused allowance. Deposit the actual shares received into beefy_deposit separately."),output:{token:await i.token(a.manager),amount:l.toString()},minimumShares:C.toString(),usedAmounts:[g.toString(),u.toString()],fees:[y.toString(),E.toString()]}})},{name:"beefy_clm_withdraw",inputSchema:{type:"object",properties:{...z,shares:{anyOf:[O(),{const:"all"}]}},required:["vault","shares"],additionalProperties:!1},execute:(e,t)=>s(async()=>{let a=m(e,["shares","slippageBps"]),r=Q(e.slippageBps),c=e.shares==="all"?void 0:G(e.shares),n=await b(a,t),i=await n.balance(a.manager),l=c??i;if(l===0n||l>i)throw new o("Withdraw vault shares first, then provide a positive CLM share amount no greater than your mined balance.");let u=ne(await n.read(a.manager,"previewWithdraw",[l]),2).map(E=>E===0n?0n:X(E,r));if(u.every(E=>E===0n))throw new o("No positive CLM withdrawal output is available.");let y=[h(a.manager,T({abi:Z,functionName:"withdraw",args:[l,u[0],u[1]]}),"Redeem CLM shares and return the pair tokens to the calling wallet.")];return{...await x(y,t,"Redeem CLM shares. Convert actual returned tokens, including leftover deposit dust, through the bridge token to USDG with beefy_clm_swap after mining. Strategy pause or API status does not prevent requesting this preview."),minimumOutputs:await Promise.all(u.map(async(E,C)=>({token:await n.token(a.wants[C]),amount:E.toString()})))}})}]}};async function je(d,s,m,b){if(!we.includes(d))throw new o("Unknown Beefy CLM action.");let h=async()=>{throw new o("Beefy CLM reconstruction uses only qualified on-chain routes.")},x=ue({clientFor:()=>b,http:fetch,quoteSwap:h,buildSwap:h,preview:async t=>({txs:t,changes:[],summary:"Locally reconstructed CLM intent; local preview still required."})});return(await xe(x).tools.find(t=>t.name===d).execute(s,m)).txs}function Ge(d,s,m){let b=()=>{throw new o("Beefy CLM calldata differs from locally reconstructed intent; nothing was signed.")};function h(x,e,t){if(x===e)return;let a=J({abi:t,data:x}),r=J({abi:t,data:e});(a.functionName!==r.functionName||!a.args||!r.args)&&b();let c=[...a.args],n=[...r.args];if(I(T({abi:t,functionName:a.functionName,args:c}),x)||b(),a.functionName==="deposit"||a.functionName==="withdraw")for(let i of a.functionName==="deposit"?[2]:[1,2])F(c[i])<F(n[i])&&b(),c[i]=n[i];else if(a.functionName==="multicall"){let i=F(c[0]);(i<=m||i>F(n[0]))&&b(),(!Array.isArray(c[1])||!Array.isArray(n[1])||c[1].length!==1||n[1].length!==1)&&b(),h(c[1][0],n[1][0],W),c[0]=n[0],c[1]=n[1]}else if(a.functionName==="exactInput"){let i={...c[0]},l=n[0];F(i.amountOutMinimum)<F(l.amountOutMinimum)&&b(),i.amountOutMinimum=l.amountOutMinimum,"deadline"in i&&((F(i.deadline)<=m||F(i.deadline)>F(l.deadline))&&b(),i.deadline=l.deadline),c[0]=i}else b();I(T({abi:t,functionName:a.functionName,args:c}),e)||b()}(!s.length||d.length!==s.length)&&b();for(let[x,e]of d.entries()){let t=s[x];(e.chainId!==t.chainId||!I(e.to,t.to)||e.value!==t.value)&&b();try{if(I(t.to,q.markets.cl.router))J({abi:ce,data:t.data}).args[0].deadline<=m&&b();else if(I(t.to,q.markets.v3.router)){let a=J({abi:W,data:t.data});(a.functionName!=="multicall"||a.args[0]<=m)&&b()}}catch{b()}if(!I(e.data,t.data))try{let a=De.find(r=>I(r.manager,t.to));h(e.data,t.data,a?Z:I(t.to,q.markets.cl.router)?ce:W)}catch{b()}}}var We=d=>({tools:xe(d).tools.slice(1)});export{De as a,we as b,Z as c,ce as d,W as e,Se as f,Me as g,xe as h,je as i,Ge as j,We as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as P,g as A,m as S}from"./
|
|
1
|
+
import{d as P,g as A,m as S}from"./IBXYIN7Q.js";import{a as N,b as h,f as y,g as v}from"./3NDVXEBR.js";import{N as k,b as I}from"./Q356HHCL.js";import{a as b}from"./UWOFA6GV.js";import{c as w,g}from"./73N3TOJL.js";import{a as m}from"./G6HCV67X.js";import{a as r}from"./5YS5V2LK.js";import{encodeFunctionData as f,parseAbi as T,zeroAddress as _}from"viem";var i=T(["function ownerOf(uint256) view returns (address)","function getApproved(uint256) view returns (address)","function getPositionLiquidity(uint256) view returns (uint128)","function safeTransferFrom(address from,address to,uint256 tokenId)","function approve(address spender,uint256 tokenId)","function burn(uint256 tokenId)"]),q={version:{type:"string",enum:["v3","v4"]},tokenId:b(),operation:{type:"string",enum:["transfer","approve","revoke","burn"]},target:w};function D(s){return{tools:[!1,!0].map(c=>({name:c?"uniswap_position_manage":"uniswap_position_status",inputSchema:{type:"object",additionalProperties:!1,required:c?["version","tokenId","operation"]:["version","tokenId"],properties:q},async execute(e,p){if(e.version!=="v3"&&e.version!=="v4")throw new r("Specify position version v3 or v4.");let o=N(e.tokenId,"tokenId"),a=e.version==="v3"?P.positionManager:I,d=s.clientFor(m),l=await d.readContract({address:a,abi:i,functionName:"ownerOf",args:[o]});if(!c){v(e,["version","tokenId"]);let n=await d.readContract({address:a,abi:i,functionName:"getApproved",args:[o]});return{version:e.version,tokenId:o.toString(),manager:a,owner:l,approved:n}}if(!g(l,p))throw new r("Only manage a Uniswap NFT owned by the signing wallet.");let t=e.operation;v(e,["version","tokenId","operation",...["transfer","approve"].includes(String(t))?["target"]:[]]);let u;if(t==="transfer"||t==="approve"){let n=h(e.target);if(n===_)throw new r("Choose a nonzero target, or operation revoke to clear approval.");u=t==="transfer"?f({abi:i,functionName:"safeTransferFrom",args:[p,n,o]}):f({abi:i,functionName:"approve",args:[n,o]})}else if(t==="revoke")u=f({abi:i,functionName:"approve",args:[_,o]});else if(t==="burn"){if(e.version==="v4"){if(await d.readContract({address:a,abi:i,functionName:"getPositionLiquidity",args:[o]})!==0n)throw new r("Remove all liquidity before burning an empty position.");return k(s).tools.find(O=>O.name==="uniswap_remove").execute({version:"v4",tokenId:o.toString(),liquidity:"all",amount0Min:"0",amount1Min:"0"},p)}let n=S(await d.readContract({address:a,abi:A,functionName:"positions",args:[o]}));if(n.liquidity!==0n||n.tokensOwed0!==0n||n.tokensOwed1!==0n)throw new r("Remove liquidity and collect all owed tokens before burning a v3 NFT.");u=f({abi:i,functionName:"burn",args:[o]})}else throw new r("Choose transfer, approve, revoke or burn. Operator-wide approvals are not exact approvals.");return y(s,[s.unsignedTx({to:a,data:u,value:"0",chainId:m,description:`${t} Uniswap ${e.version} NFT #${o}${e.target?` with target ${e.target}`:""}.`})],p,"Position ownership or exact per-NFT approval changes. A transferred position includes its liquidity and accrued rights; burn requires an empty NFT.")}}))}}export{i as a,D as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./6IM6A5VA.js";import{a as C}from"./UWOFA6GV.js";import{g as k,m as I,n as _}from"./73N3TOJL.js";import{a as u,i as G,j as N}from"./
|
|
1
|
+
import{a as T}from"./6IM6A5VA.js";import{a as C}from"./UWOFA6GV.js";import{g as k,m as I,n as _}from"./73N3TOJL.js";import{a as u,i as G,j as N}from"./G6HCV67X.js";import{a as n}from"./5YS5V2LK.js";import{encodeFunctionData as w,erc20Abi as R,getAddress as D,parseAbi as z}from"viem";var d=D(G[u].vaults.spark.address),l={address:D(N),symbol:"USDG",decimals:6,chainId:u},E={address:d,symbol:"spUSDG",decimals:6,chainId:u},m=z(["function asset() view returns (address)","function decimals() view returns (uint8)","function maxMint(address) view returns (uint256)","function maxRedeem(address) view returns (uint256)","function maxDeposit(address) view returns (uint256)","function previewMint(uint256) view returns (uint256)","function previewRedeem(uint256) view returns (uint256)","function previewDeposit(uint256) view returns (uint256)","function mint(uint256 shares,address receiver) returns (uint256)","function mint(uint256 shares,address receiver,uint16 referral) returns (uint256)","function deposit(uint256 assets,address receiver,uint16 referral) returns (uint256)","function redeem(uint256 shares,address receiver,address owner) returns (uint256)"]),Q=C("Positive decimal base-unit integer; USDG and spUSDG both have 6 decimals."),J={type:"integer",minimum:0,maximum:65535};function M(s){return _(s,"Amount must be positive and fit uint256.",{notString:"Amount must be a positive base-unit integer string.",positive:!0})}function j(s){return I(s,"Invalid Spark integer read.")}function Z(s){return["mint","redeem","deposit_referral","return_liquidity"].map(r=>{let t=r==="mint",a=r==="redeem",h=r==="deposit_referral",x=t?["shares","maxAssets","referral"]:a?["shares"]:h?["amount","referral"]:["amount"],O=t?["shares","maxAssets"]:a?["shares"]:h?["amount","referral"]:["amount"];return{name:`spark_${r}`,inputSchema:{type:"object",additionalProperties:!1,required:O,properties:Object.fromEntries(x.map(c=>[c,c==="referral"?J:Q]))},execute:async(c,o)=>{try{if(T(o),Object.keys(c).some(p=>!x.includes(p)))throw new n("Unexpected Spark action argument.");let e=M(c[t||a?"shares":"amount"]),P=t?M(c.maxAssets):void 0,i=c.referral;if((h||i!==void 0)&&(typeof i!="number"||!Number.isInteger(i)||i<0||i>65535))throw new n("Referral must be a uint16 integer.");let f=s.clientFor(u);if(await f.getChainId()!==u)throw new n("Spark requires chain 4663.");let[q,B,F]=await Promise.all([f.readContract({address:d,abi:m,functionName:"asset"}),f.readContract({address:d,abi:m,functionName:"decimals"}),f.readContract({address:l.address,abi:R,functionName:"decimals"})]);if(typeof q!="string"||D(q)!==l.address||B!==6||F!==6)throw new n("Spark requires the pinned USDG/share metadata.");let v=r==="return_liquidity"?e:j(await f.readContract({address:d,abi:m,functionName:t?"previewMint":a?"previewRedeem":"previewDeposit",args:[e]}));if(v===0n)throw new n("Spark returned a zero action quote.");if(r!=="return_liquidity"){let p=j(await f.readContract({address:d,abi:m,functionName:t?"maxMint":a?"maxRedeem":"maxDeposit",args:[o]}));if(e>p)throw new n("The amount exceeds Spark\u2019s current action capacity.")}if(t&&v>P)throw new n("The mint quote exceeds maxAssets.");let U=t?v:e,H=t?i===void 0?w({abi:m,functionName:"mint",args:[e,o]}):w({abi:m,functionName:"mint",args:[e,o,i]}):a?w({abi:m,functionName:"redeem",args:[e,o,o]}):h?w({abi:m,functionName:"deposit",args:[e,o,i]}):w({abi:R,functionName:"transfer",args:[d,e]}),A=`${r} ${e} ${t||a?"spUSDG share":"USDG asset"} base units; ${r==="return_liquidity"?`USDG goes to ${d}, with no shares minted`:`beneficiary ${o}`}${i===void 0?"":`; event-only referral ${i}`}.`,$=[...t||h?[s.approval(l.address,d,U.toString(),u)]:[],s.unsignedTx({to:r==="return_liquidity"?l.address:d,data:H,value:"0",chainId:u,description:A})],g=await s.preview($,o),S=p=>g.changes.filter(b=>b.token.chainId===u&&k(b.token.address,p.address)).reduce((b,y)=>{if(y.token.decimals!==p.decimals||!/^-?\d+$/.test(y.amount))throw new n("Invalid Spark preview metadata.");return b+BigInt(y.amount)},0n);if(a?S(E)!==-e||S(l)<=0n:S(l)!==-U||r!=="return_liquidity"&&S(E)<(t?e:1n))throw new n("Spark preview does not match the requested outflow and receipt.");return{txs:$,preview:g,summary:`${A} Quoted ${v} ${a?"USDG asset":t||r==="return_liquidity"?"USDG input":"spUSDG share"} base units. ${g.summary} Standard ERC-4626 encodes no output minimum; the exact mint approval can become insufficient as interest accrues. Re-preview before signing.`}}catch(e){throw new n(s.plainError(e))}}}})}export{Z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"./6IM6A5VA.js";import{a as c,j as x}from"./
|
|
1
|
+
import{a as P}from"./6IM6A5VA.js";import{a as c,j as x}from"./G6HCV67X.js";import{a as n}from"./5YS5V2LK.js";import{getAddress as d}from"viem";var M=["one_hour","six_hours","one_day","seven_days","thirty_days","ninety_days","one_year","inception"],g={apy:["v1","apy-averages"],allocations:["v0","allocations"],history:["v0","state/history"],pending_governance:["v0","pending-governance-actions"]};function y(t){if(!t||typeof t!="object"||Array.isArray(t))throw new n("Morpho analytics returned an invalid object.");return t}function A(t){if(typeof t!="string"||!/^\d+$/.test(t)||BigInt(t)>=1n<<256n)throw new n("Morpho analytics returned an invalid decimal base-unit amount.");return t}function Y(t,s){let o=y(t);if(![c,String(c)].includes(o.chain_id)||typeof o.vault_address!="string"||d(o.vault_address)!==d(s))throw new n("Morpho analytics returned another chain or vault.")}function b(t,s=0){if(s>12)throw new n("Morpho analytics response is too deeply nested.");if(Array.isArray(t))return t.map(o=>b(o,s+1));if(t&&typeof t=="object")return Object.fromEntries(Object.entries(t).map(([o,e])=>{if(e!==null&&/(?:_assets|_shares|_supply|_cap|_wad|_ray)$/.test(o)&&typeof e!="object")return[o,A(e)];if(e!==null&&/_address$/.test(o)){if(typeof e!="string")throw new n("Morpho analytics returned an invalid address.");return[o,d(e)]}return[o,b(e,s+1)]}));if(typeof t=="number"&&!Number.isFinite(t))throw new n("Morpho analytics returned a non-finite value.");return t}function T(t,s,o){return{name:s,inputSchema:{type:"object",additionalProperties:!1,required:["view"],properties:{view:{type:"string",enum:Object.keys(g)},lookback:{type:"string",enum:M,description:"APY/history window; defaults to six_hours for APY or seven_days for history."},cursor:{type:"string",maxLength:4096,description:"Opaque cursor from pending_governance only."},limit:{type:"integer",minimum:1,maximum:100}}},execute:async(e,I)=>{try{if(P(I),Object.keys(e).some(r=>!["view","lookback","cursor","limit"].includes(r))||typeof e.view!="string"||!Object.hasOwn(g,e.view))throw new n("Choose a documented Morpho analytics view.");let a=e.view,h=a==="history",f=a==="apy",k=a==="pending_governance";if(e.lookback!==void 0&&(!h&&!f||typeof e.lookback!="string"||!M.includes(e.lookback)))throw new n("lookback is available only for APY/history with a documented window.");if(!k&&(e.cursor!==void 0||e.limit!==void 0))throw new n("Pagination applies only to pending_governance.");if(e.cursor!==void 0&&(typeof e.cursor!="string"||e.cursor.length>4096))throw new n("Provide the opaque pending-governance cursor string.");let l=e.limit??100;if(typeof l!="number"||!Number.isInteger(l)||l<1||l>100)throw new n("Pagination limit must be an integer from 1 to 100.");let[j,S]=g[a],p=new URL(`https://api.morpho.org/${j}/vaults-v2/${c}:${d(o)}/${S}`);(h||f)&&p.searchParams.set("lookback",String(e.lookback??(h?"seven_days":"six_hours"))),k&&(p.searchParams.set("limit",String(l)),e.cursor!==void 0&&p.searchParams.set("cursor",e.cursor));let _=await t.http(p.toString(),{headers:{accept:"application/json"},signal:AbortSignal.timeout(15e3)});if(!_.ok)throw new n(`Morpho analytics HTTP ${_.status}. Retry when the service is reachable; no zero APY or empty book was inferred.`);let i=y(await _.json());Y(f||a==="allocations"?i.data:i.params,o);let w,u=i.last_indexed_block,v=null;if(f){let r=y(i.data);if(typeof r.apy!="number"||!Number.isFinite(r.apy)||r.apy<-1||r.lookback!==(e.lookback??"six_hours"))throw new n("Morpho analytics returned an invalid APY or lookback.");w={annualYieldFraction:String(r.apy),lookback:r.lookback,basis:"Realized post-fee share-price APY, excluding rewards; historical observation, not a promised return."},u=r.last_indexed_block}else if(a==="allocations"){let r=y(i.data);if(!Array.isArray(r.allocations))throw new n("Morpho analytics omitted adapter allocations.");w=b(r.allocations),u=r.last_indexed_block}else{if(!Array.isArray(i.data))throw new n("Morpho analytics omitted its record array.");if(h)for(let r of i.data){let m=y(r);if(typeof m.timestamp!="number"||!Number.isSafeInteger(m.timestamp)||m.timestamp<0)throw new n("Morpho history returned an invalid timestamp.");for(let O of["total_assets","total_supply","withdrawable_assets","allocated_assets","idle_assets","share_price_ray"])A(m[O])}if(k){if(i.cursor!==null&&typeof i.cursor!="string")throw new n("Morpho analytics returned an invalid pagination cursor.");v=i.cursor}w=b(i.data)}return u!==void 0&&A(u),{vault:d(o),chainId:c,sourceUrl:p.toString(),view:a,lastIndexedBlock:u??null,cursor:v,data:w,asset:{address:d(x),symbol:"USDG",decimals:6,chainId:c},shareToken:{address:d(o),symbol:"vault shares",decimals:18,chainId:c},scales:{sharePriceRay:"1000000000000000000000000000",capWad:"1000000000000000000"},caveat:"Indexer data may lag the chain. APY excludes rewards; empty records describe only this API window/page. Re-read onchain state and preview before any action. API book data is never executed as calldata automatically."}}catch(a){throw new n(t.plainError(a))}}}}export{T as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as l}from"./
|
|
1
|
+
import{i as l}from"./FUXT7GRK.js";import{a}from"./5YS5V2LK.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as C}from"./YQUKU2LS.js";import{a as O,c as P,e as B}from"./V2OOOV6B.js";import{b as h,e as r,g as F}from"./73N3TOJL.js";import{a as g}from"./G6HCV67X.js";import{a as y}from"./5YS5V2LK.js";import{a as E,b as x}from"./JXOEJPJ4.js";import{getAddress as T}from"viem";var q=["pons_status","pons_holders","pons_launch_info"],v=["getPartnerScanCard","getProjectSnapshot"],V=/^[a-z0-9][a-z0-9-]{0,79}$/,$=/^[0-9]{1,78}$/,K=/\b(?:unsafe|safe|safety|risks?|risky|recommend\w*|buy\w*|sell\w*)\b/i,z="https://heyresearch.xyz",D=["curve","pending pool creation","graduated","rescued"],G="This describes the project, not this token. HEY Research Lab does not tie this token to that activity.",X="Buyback-vault vesting only. It is not proof of vesting for any other address and not a liquidity lock. Unread figures say not read.",Z="An empty or missing source proves nothing; unread figures say not read, never zero. Address counts are Pons index figures, not on-chain counts; addresses are not people.",M=/rank|scor|trend|market|lock|sell|rating|price|signal|verdict|safe/i,c=(n,e)=>typeof n=="string"&&n.length>0&&n.length<=e&&!x(n)?n:null,k=n=>typeof n=="string"&&$.test(n)?n:null,Q=n=>typeof n=="number"&&Number.isSafeInteger(n)&&n>=0?n:null,L=n=>typeof n=="number"&&Number.isSafeInteger(n)?n:null,m=n=>typeof n=="string"&&h.test(n)?T(n):null,w=n=>(r(n)?k(n.amount):null)??"not read",d=n=>k(n)??"not read",R=n=>Q(n)??"not read",J=n=>L(n)??"not read";function W(n){if(typeof n!="string"||!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?Z$/.test(n))return null;let e=Date.parse(n);return Number.isFinite(e)&&new Date(e).toISOString().slice(0,19)===n.slice(0,19)&&e<=Date.now()+3e5?n:null}function nn(n,e){if(typeof n!="string"||n.length>2048||/[\s<>\\]/.test(n)||x(n))return null;try{let t=new URL(n);return t.origin===z&&!t.username&&!t.password&&t.pathname===`/project/${e}`?n:null}catch{return null}}function tn(n){return typeof n!="string"?null:/^untrusted "(?:[^"\\]|\\.)*"$/.test(n)?n:E(n)}function en(n){return n instanceof Error&&/supported Pons factory/i.test(n.message)}function N(n,e){if(!r(n)||n.chainId!==g||typeof n.address!="string"||!h.test(n.address)||!F(n.address,e))return null;let t=n.decimals,s=tn(n.symbol);return typeof t!="number"||!Number.isInteger(t)||t<0||t>255||!s?null:{address:T(e),chainId:g,symbol:s,decimals:t}}function _(n){if(!r(n)||!r(n.token))return null;let e=m(n.token.address);return e?N(n.token,e):null}function sn(n,e){if(!r(n))return;let t=N(n.token,e),s=k(n.blockNumber),o=L(n.phase);if(!t||!s||o===null||o<0||o>3||n.phaseName!==D[o])return;let a=n.pool,l=r(a)&&typeof a.id=="string"&&/^0x[0-9a-fA-F]{1,64}$/.test(a.id)?a.id:null,i=r(a)?k(a.liquidity):null,p=r(a)&&l&&i?{id:l,liquidity:i,sqrtPriceX96:d(a.sqrtPriceX96),tick:J(a.tick),lpFee:R(a.lpFee),protocolFee:R(a.protocolFee)}:null;return{token:t,block:s,launch:{phase:o,phaseName:D[o],curve:m(n.curve),creatorFeeRecipient:m(n.creatorFeeRecipient),progressPpm:d(n.progressPpm),graduationThreshold:w(n.graduationThreshold),raised:w(n.raised),totalSupply:w(n.totalSupply),amountUnits:{graduationThreshold:_(n.graduationThreshold),raised:_(n.raised),totalSupply:_(n.totalSupply)},pool:p}}}function on(n,e){if(!r(n))return;let t=N(n.token,e),s=k(n.statusBlock);if(!t||!s)return;let o=r(n.sources)?n.sources:{},a=(Array.isArray(n.exclusions)?n.exclusions.slice(0,10):[]).flatMap(i=>{let p=r(i)?c(i.reason,120):null;return r(i)&&p?[{reason:p,indexedBalance:d(i.indexedBalance),countedInIndex:typeof i.countedInIndex=="boolean"?i.countedInIndex:null}]:[]}),l=r(n.indexAsOf)?n.indexAsOf:null;return{token:t,addresses:{statusBlock:s,addressCountKind:"indexed",addressCount:R(n.holderCount),indexAddressCount:R(n.indexHolderCount),totalSupply:d(n.totalSupply),indexSupply:d(n.indexSupply),burned:d(n.burned),circulating:d(n.circulating),amountUnits:{totalSupply:t,indexSupply:t,burned:t,circulating:t,indexedBalance:t},exclusions:a,indexAsOf:l?{rollupBucket:c(l.rollupBucket,40),tailFromBlock:d(l.tailFromBlock)}:null,sources:{addressCount:c(o.holderCount,300)??"Pons balances index (an indexed figure, not an on-chain count)",totalSupply:c(o.totalSupply,300),burned:c(o.burned,300),circulating:c(o.circulating,300)}}}}function rn(n,e){if(!r(n)||!r(n.buybackVest))return;let t=N(n.token,e),s=k(n.statusBlock);if(!t||!s)return;let o=n.buybackVest,a={locked:d(o.locked),released:d(o.released),vested:d(o.vested),releasable:d(o.releasable),vestingStart:d(o.vestingStart),vestingDurationSeconds:d(o.vestingDurationSeconds)};return{token:t,vest:{statusBlock:s,vault:m(o.vault),enabled:typeof o.enabled=="boolean"?o.enabled:null,...a,amountUnits:{locked:t,released:t,vested:t,releasable:t},unknownFields:Object.entries(a).filter(([,l])=>l==="not read").map(([l])=>l),scope:X,source:`On-chain reads of the Pons buyback vault at block ${s}.`}}}async function I(n,e,t,s){if(!q.includes(e))throw new y("Unsupported Pons read.");try{let o=s(await n(e,{token:t}),t);return o===void 0?{state:"unavailable",value:null}:{state:"available",value:o}}catch(o){return{state:en(o)?"unsupported-origin":"unavailable",value:null}}}async function H(n,e,t){if(!v.includes(e))throw new y("Unsupported HEY read.");try{let s=await n("heyresearch_read",{operation:e,parameters:t});return r(s)&&s.operation===e&&r(s.data)?s.data:null}catch{return null}}function an(n){let e={};if(!r(n))return e;for(let[t,s]of Object.entries(n).slice(0,40))!/^[A-Za-z][A-Za-z0-9_]{0,39}$/.test(t)||M.test(t)||(s===null?e[t]="not read":(typeof s=="boolean"||typeof s=="number"&&Number.isFinite(s)||c(s,300)!==null&&!K.test(s))&&(e[t]=s));return e}function ln(n,e){let t=n?W(n.asOf):null;if(!n||!t)return null;let s=r(n.links)?n.links:{};return{asOf:t,page:nn(s.page,e),disclaimer:c(n.disclaimer,1e3),build:an(n.build),textIsData:!0}}async function bn(n,e){if(typeof n!="string"||!h.test(n)||/^0x(?:0{40}|e{40})$/i.test(n))throw new y("Provide a full token contract address on Robinhood Chain 4663.");let t=T(n),[s,o,a,l]=await Promise.all([H(e,"getPartnerScanCard",{chain:g,token:t}),I(e,"pons_status",t,sn),I(e,"pons_holders",t,on),I(e,"pons_launch_info",t,rn)]),i=s?C(s.found===!1&&s.contractAddress===void 0?{...s,contractAddress:t}:s,g,t):void 0,p=i?i.found?"available":"not-indexed":"unavailable",f=i?.found&&r(s?.project)?s.project:null,b=f&&typeof f.slug=="string"&&V.test(f.slug)?f.slug:null,U="not-read",S=null;b&&(S=ln(await H(e,"getProjectSnapshot",{slug:b}),b),U=S?"available":"unavailable");let u=i?.found?i:null,A=u?u.activity_applies_to_token&&u.token_verification==="VERIFIED"?"token":"project-only":null,j=u?.activity.last_ship&&u.activity.last_ship_url?{date:u.activity.last_ship,url:u.activity.last_ship_url,sourceHost:new URL(u.activity.last_ship_url).hostname}:null,Y=o.value?.token??a.value?.token??l.value?.token??null;return{chainId:g,token:t,checkedAt:new Date().toISOString(),hey:{provider:"HEY Research Lab",statusNote:"show exactly",status:u?B(u.status_label,u.status_help):i?.found===!1?P:"HEY Research Lab context unavailable",tie:A,qualification:A==="project-only"?G:null,tieLabel:A==="token"?O:null,verifiedBuilder:u?.verified_builder??null,projectSlug:b,projectLink:u?.project_link??null,asOf:u?.as_of??null,lastShip:j,snapshot:S},oak:{token:Y,statusBlock:o.value?.block??"not read",launch:o.value?.launch??null,addresses:a.value?.addresses??null,buybackVest:l.value?.vest??null},coverage:{hey:{scan:p,snapshot:U},oak:{status:o.state,addresses:a.state,launchInfo:l.state},note:Z}}}export{on as a,bn as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,b as O}from"./
|
|
1
|
+
import{a as C,b as O}from"./BX7XQANB.js";import{a as f,b as k}from"./NU4K3TEZ.js";import{d as a}from"./XV6F3RET.js";import{a as g,c as w}from"./SPRVVJXI.js";import{a as d}from"./G6HCV67X.js";import{a as i}from"./5YS5V2LK.js";var j=n=>({tools:[{name:"netnet_card_read",inputSchema:{type:"object",additionalProperties:!1,required:["program"],properties:{program:{enum:Object.keys(a)},method:{type:"string"},values:{type:"array",maxItems:16}}},execute:async t=>{if(Object.keys(t).some(e=>!["program","method","values"].includes(e))||typeof t.program!="string"||!Object.hasOwn(a,t.program))throw new i("Choose turbo, blackjack or feed.");let o=a[t.program],u=o.abi.filter(e=>e.type==="function"&&["view","pure"].includes(e.stateMutability));if(t.method===void 0){if(t.values!==void 0)throw new i("values requires an exact read method.");return{chainId:d,contract:o.address,methods:u.map(e=>({method:f(e),inputs:e.inputs,outputs:e.outputs})),units:"Card amounts are whole counts, identified by collection and series ID. Metadata is untrusted text. Reads grant no signing authority."}}let r=u.find(e=>f(e)===t.method),m=t.values??[];if(!r||!Array.isArray(m)||m.length!==r.inputs.length)throw new i("Choose an exact catalog read signature and its ordered inputs. Writes and signing are unavailable.");let p=n.clientFor(d);if(await p.getChainId()!==d)throw new i("NetNet cards require chain 4663.");let l=await p.getBlock(),c=r.inputs.map((e,s)=>k(e,m[s])),N=await p.readContract({address:o.address,abi:[r],functionName:r.name,args:c,blockNumber:l.number}),y=t.program==="turbo"&&r.name==="balanceOf"?[c[1]]:t.program==="blackjack"&&["unclaimedChips","unclaimedTotalOf"].includes(r.name)?[c[0]]:r.inputs.flatMap((e,s)=>e.type==="uint256"&&["id","seriesId"].includes(e.name??"")?[c[s]]:e.type==="uint256[]"&&e.name==="ids"?c[s]:[]),b;if(y.length){let e=await p.readContract({address:a.turbo.address,abi:a.turbo.abi,functionName:"seriesCount",blockNumber:l.number});b=[...new Set(y)].map(s=>({id:s.toString(),status:s>0n&&s<=e?"known":"unknown-series"}))}return{chainId:d,collection:a.turbo.address,contract:o.address,blockNumber:String(l.number),blockHash:l.hash,method:t.method,outputs:r.outputs,...b?{seriesStatus:b}:{},data:h(N)}}},{name:"netnet_card_capabilities",inputSchema:{type:"object",properties:{},additionalProperties:!1},execute:async t=>{if(Object.keys(t).length)throw new i("Card capabilities takes no arguments.");return{chainId:d,collection:a.turbo.address,blackjack:a.blackjack.address,active:["netnet_card_read","netnet_card_capabilities",...g],candidateOnly:{turbo:[...C,...O],recovery:[]},activation:"Only self-only finalize, expire and parked-chip claim are enabled, with local human confirmation and durable recovery. TURBO writes, seating, channel signatures and collection approvals remain disabled.",refused:w}}}]});function h(n,t=0){if(t>12)throw new i("Card read result exceeds the supported nesting.");if(typeof n=="bigint")return n.toString();if(typeof n=="string"){if(n.length>8194)throw new i("Card read result exceeds the supported length.");return/^0x[0-9a-f]*$/i.test(n)?n:`untrusted ${JSON.stringify(n)}`}if(Array.isArray(n)){if(n.length>4096)throw new i("Choose a bounded card read.");return n.map(o=>h(o,t+1))}return n&&typeof n=="object"?Object.fromEntries(Object.entries(n).map(([o,u])=>[o,h(u,t+1)])):n}export{j as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./5YS5V2LK.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 +1 @@
|
|
|
1
|
-
import{d as U}from"./
|
|
1
|
+
import{d as U}from"./AMICUXS6.js";import{a as _}from"./6IM6A5VA.js";import{a as I}from"./UWOFA6GV.js";import{g as $}from"./73N3TOJL.js";import{a as w,i as V}from"./G6HCV67X.js";import{a as s}from"./5YS5V2LK.js";import{decodeAbiParameters as N,encodeAbiParameters as K,encodeFunctionData as h,getAddress as P,keccak256 as Y,parseAbi as H,parseAbiParameters as B}from"viem";var y=P("0xCe5c1aFa115fF8b1D6913509bfc79D9AE08CC857"),q=P("0x0FBad98595b0186dA120E41f77C102beb49f803c"),D=B("(address loanToken,address collateralToken,address oracle,address irm,uint256 lltv)"),A="(address loanToken,address collateralToken,address oracle,address irm,uint256 lltv)",m=H(["function vaultV2Factory() view returns (address)","function vaultData(address) view returns (bool canPullFromIdle,uint64 penalty)","function absoluteCap(address,bytes32) view returns (uint256)","function canPullFromMarket(address,bytes32) view returns (bool)","function isActiveAdapter(address,address) view returns (bool)",`function reallocate(address vault,address deallocateAdapter,${A} deallocateMarketParams,address allocateAdapter,${A} allocateMarketParams,uint128 assets,uint64 penalty)`,`function allocateFromIdle(address vault,address adapter,${A} marketParams,uint128 assets,uint64 penalty)`,`function setAbsoluteCap(address vault,address adapter,${A} marketParams,uint256 newAbsoluteCap)`,`function setCanPullFromMarket(address vault,address adapter,${A} marketParams,bool newCanPullFromMarket)`,"function setCanPullFromIdle(address vault,bool newCanPullFromIdle)","function setIsActiveAdapter(address vault,address adapter,bool newIsActiveAdapter)","function setPenalty(address vault,uint64 newPenalty)"]),E=H(["function isAllocator(address) view returns (bool)","function allocation(bytes32) view returns (uint256)"]),z=H(["function isVaultV2(address) view returns (bool)"]),v=V[w],L=[{vault:v.vaults.netnet.address,underlying:v.tokens.USDG.address,symbol:"USDG",decimals:6},{vault:v.vaults.longbowCore.address,underlying:v.tokens.USDG.address,symbol:"USDG",decimals:6},{vault:v.vaults.longbowFrontier.address,underlying:v.tokens.USDG.address,symbol:"USDG",decimals:6},{vault:v.vaults.longbowEth.address,underlying:v.tokens.WETH.address,symbol:"WETH",decimals:18}];function x(n,c=256){if(typeof n!="string"||!/^\d+$/.test(n)||n.length>78||BigInt(n)>=1n<<BigInt(c))throw new s("Provide uint decimal base-unit strings.");return BigInt(n)}function R(n){if(typeof n!="string"||!/^0x[0-9a-f]{64}$/i.test(n))throw new s("Provide the exact bytes32 marketId.");return n.toLowerCase()}var M=(n,c)=>n<c?n:c;async function Q(n,c){let l=L.find(u=>typeof c.vault=="string"&&$(u.vault,c.vault));if(!l)throw new s("Choose a pinned NetNet or Longbow V2 vault.");let a={address:P(l.underlying),chainId:w,symbol:l.symbol,decimals:l.decimals},o=n.clientFor(w),e=await U(o,l.vault,a),i=(u,F,W,J=[])=>o.readContract({address:u,abi:F,functionName:W,args:J,blockNumber:e.blockNumber}),t=R(c.marketId),r=e.markets.find(u=>u.id.toLowerCase()===t);if(!r)throw new s("Target market is not in this verified vault adapter inventory.");let[p,b,k,f,O]=await Promise.all([i(y,m,"vaultV2Factory"),i(q,z,"isVaultV2",[l.vault]),i(l.vault,E,"isAllocator",[y]),i(y,m,"vaultData",[l.vault]),i(y,m,"isActiveAdapter",[l.vault,r.adapter])]);if(typeof p!="string"||P(p)!==q||b!==!0||!Array.isArray(f)||f.length!==2||typeof f[0]!="boolean"||typeof f[1]!="bigint")throw new s("Invalid Public Allocator deployment or vault configuration.");let[d]=N(D,r.data);if(P(d.irm)!==P(v.morpho.adaptive_curve_irm.address))throw new s("Public allocation requires the pinned Adaptive Curve IRM.");let g=(u,F)=>Y(K(B(`string,address,${A}`),["this/marketParams",F,N(D,u)[0]])),C=g(r.data,r.adapter),[S,T]=await Promise.all([i(y,m,"absoluteCap",[l.vault,C]),i(l.vault,E,"allocation",[C])]);if(typeof S!="bigint"||typeof T!="bigint")throw new s("Invalid allocator cap read.");let G=S>T?S-T:0n,j=await Promise.all(e.markets.filter(u=>u.id.toLowerCase()!==t).map(async u=>({...u,canPull:await i(y,m,"canPullFromMarket",[l.vault,g(u.data,u.adapter)])===!0})));return{client:o,read:i,asset:a,definition:l,data:e,target:r,params:d,permission:k===!0&&O===!0,canIdle:f[0],penalty:f[1],headroom:G,sources:j}}var rt=n=>{let c=a=>Q(n,a),l=(a,o,e,i)=>{let t={vault:{type:"string",enum:L.map(r=>r.vault)},marketId:{type:"string"},...o};return{name:a,inputSchema:{type:"object",properties:t,required:["vault","marketId",...e],additionalProperties:!1},execute:async(r,p)=>{try{if(_(p),Object.keys(r).some(b=>!Object.hasOwn(t,b)))throw new s("Unsupported Public Allocator argument.");return await i(r,p)}catch(b){throw new s(n.plainError(b))}}}};return{tools:[l("morpho_allocator",{},[],async a=>{let o=await c(a);return{chainId:w,allocator:y,vault:o.definition.vault,targetMarketId:o.target.id,asset:o.asset,blockNumber:o.data.blockNumber.toString(),enabled:o.permission,penaltyWad:o.penalty.toString(),absoluteCapHeadroom:o.headroom.toString(),idleUpperBound:(o.permission&&o.canIdle?M(o.data.idle,o.headroom):0n).toString(),sources:o.sources.map(e=>({marketId:e.id,canPull:e.canPull,assetsUpperBound:(o.permission&&e.canPull?M(M(e.capacity,o.data.blueCash),o.headroom):0n).toString()})),caveat:"Upper bounds only; vault relative/absolute caps, accrual and liquidity still constrain execution. Preview an explicit source and amount with morpho_reallocate. This standalone allocation charges its disclosed penalty; a later borrow is a separate transaction and can fail or lose the added liquidity to another borrower."}}),l("morpho_reallocate",{sourceMarketId:{type:"string",description:"A returned source market ID, or omit to allocate idle assets."},assets:I(),maxPenaltyAssets:I()},["assets","maxPenaltyAssets"],async(a,o)=>{let e=x(a.assets,128),i=x(a.maxPenaltyAssets),t=await c(a);if(!t.permission||e===0n||e>t.headroom||t.penalty>10n**18n)throw new s("Public allocation is disabled or the requested amount exceeds target headroom.");let r=(e*t.penalty+10n**18n-1n)/10n**18n;if(r>i)throw new s("Allocator penalty exceeds maxPenaltyAssets.");let p;if(a.sourceMarketId===void 0){if(!t.canIdle||e>t.data.idle)throw new s("Public idle allocation is disabled or idle funds are insufficient.");p=h({abi:m,functionName:"allocateFromIdle",args:[t.definition.vault,t.target.adapter,t.params,e,t.penalty]})}else{let d=t.sources.find(C=>C.id.toLowerCase()===R(a.sourceMarketId));if(!d||!d.canPull||e>M(d.capacity,t.data.blueCash))throw new s("The source cannot publicly supply the requested liquidity.");let[g]=N(D,d.data);p=h({abi:m,functionName:"reallocate",args:[t.definition.vault,d.adapter,g,t.target.adapter,t.params,e,t.penalty]})}let b=`Move ${e} ${t.asset.symbol} base units inside ${t.definition.vault} to market ${t.target.id}; pay ${r} ${t.asset.symbol} base units as a donation penalty. This is a standalone reallocation; a subsequent borrow is separate and not guaranteed.`,k=[...r?[n.approval(t.asset.address,y,r.toString(),w)]:[],n.unsignedTx({to:y,data:p,value:"0",chainId:w,description:b})],f=await n.preview(k,o);if(f.changes.filter(d=>d.token.chainId===w&&$(d.token.address,t.asset.address)&&d.token.decimals===t.asset.decimals).reduce((d,g)=>d+BigInt(g.amount),0n)!==-r)throw new s("Allocator preview does not match the exact donation penalty.");return{txs:k,preview:f,penaltyAmount:r.toString(),summary:`${b} The calldata binds the current penalty rate. ${f.summary}`}}),l("morpho_manage_allocator",{operation:{enum:["setIsActiveAdapter","setCanPullFromMarket","setCanPullFromIdle","setAbsoluteCap","setPenalty"]},enabled:{type:"boolean"},amount:I()},["operation"],async(a,o)=>{let e=await c(a);if(await e.read(e.definition.vault,E,"isAllocator",[o])!==!0)throw new s("This wallet is not an allocator of this vault.");let i=a.enabled,t;if(a.operation==="setAbsoluteCap")t=h({abi:m,functionName:"setAbsoluteCap",args:[e.definition.vault,e.target.adapter,e.params,x(a.amount)]});else if(a.operation==="setPenalty"){let b=x(a.amount,64);if(b>10n**18n)throw new s("Public Allocator penalty must not exceed 1e18.");t=h({abi:m,functionName:"setPenalty",args:[e.definition.vault,b]})}else{if(typeof i!="boolean")throw new s("Provide enabled as a boolean.");if(a.operation==="setIsActiveAdapter")t=h({abi:m,functionName:"setIsActiveAdapter",args:[e.definition.vault,e.target.adapter,i]});else if(a.operation==="setCanPullFromMarket")t=h({abi:m,functionName:"setCanPullFromMarket",args:[e.definition.vault,e.target.adapter,e.params,i]});else if(a.operation==="setCanPullFromIdle")t=h({abi:m,functionName:"setCanPullFromIdle",args:[e.definition.vault,i]});else throw new s("Choose a supported allocator configuration operation.")}let r=`Configure Morpho Public Allocator ${String(a.operation)}: ${JSON.stringify(a)}.`,p=[n.unsignedTx({to:y,data:t,value:"0",chainId:w,description:r})];return{txs:p,preview:await n.preview(p,o),summary:r}})]}};export{y as a,q as b,m as c,Q as d,rt as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as p}from"./
|
|
1
|
+
import{q as p}from"./TWSTOFN3.js";import{b as c,e as d}from"./73N3TOJL.js";import{a as n}from"./5YS5V2LK.js";import{b as a}from"./JXOEJPJ4.js";var f=/^(?:[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?\.)+[\p{L}]{2,}$/u,m=/^did:[a-z0-9]+:[A-Za-z0-9._%:;=@/?#-]{1,512}$/,u=/^[^\s@<>()[\]\\,;:"]{1,64}@[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?\.[A-Za-z]{2,}$/,w=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}:[-.%a-zA-Z0-9]{1,128}$/,l=["web","a2a","mcp","oasf"],P=["web","A2A","MCP","OASF","ENS","DID","email","agentWallet"];function s(e,r){if(typeof e!="string"||!e.trim()||e.length>2048||a(e))throw new n(`Provide a valid profile ${r}.`);return e}function h(e){return/^[a-z][a-z0-9+.-]*:\/\//i.test(e)}function z(e){if(!d(e))throw new n("Provide valid profile services.");let r=s(e.name,"service name"),t=s(e.endpoint,"service endpoint");e.version!==void 0&&s(e.version,"service version");let i=r.toLowerCase(),o=()=>{try{p(t,"Profile service endpoint")}catch{throw new n("Profile service endpoint must be an HTTPS or IPFS URI without credentials.")}};if(l.includes(i))return o();if(i==="ens"){if(!f.test(t))throw new n("An ENS service endpoint must be an ENS name such as agent.eth.");return}if(i==="did"){if(!m.test(t))throw new n("A DID service endpoint must be a DID such as did:web:agent.example.");return}if(i==="email"){if(!u.test(t))throw new n("An email service endpoint must be an email address.");return}if(i==="agentwallet"||i==="wallet"){if(!w.test(t)&&!c.test(t))throw new n("A wallet service endpoint must be a CAIP-10 account such as eip155:4663:0x\u2026 or an 0x address.");return}if(h(t)||/^(?:ipfs|https):/.test(t))return o();if(!(f.test(t)||m.test(t)||u.test(t)||w.test(t)))throw new n("Profile service endpoint must be an HTTPS or IPFS URI, an ENS name, a DID, an email address or a CAIP-10 account.")}export{P as a,z as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L}from"./6IM6A5VA.js";import{a as Q}from"./RETS2ZEK.js";import{a as x,i as J}from"./
|
|
1
|
+
import{a as L}from"./6IM6A5VA.js";import{a as Q}from"./RETS2ZEK.js";import{a as x,i as J}from"./G6HCV67X.js";import{a as r}from"./5YS5V2LK.js";import{decodeAbiParameters as se,encodeAbiParameters as Z,encodeFunctionData as F,erc20Abi as $,getAddress as g,keccak256 as ee,parseAbi as D,parseAbiParameters as oe,zeroAddress as te}from"viem";var N=10n**18n,B=(1n<<256n)-1n,q=g(J[x].morpho.morpho_blue.address),_=oe("(address loanToken,address collateralToken,address oracle,address irm,uint256 lltv)"),w=D(["function adaptersLength() view returns (uint256)","function adapters(uint256) view returns (address)","function liquidityAdapter() view returns (address)","function liquidityData() view returns (bytes)","function forceDeallocatePenalty(address) view returns (uint256)","function performanceFee() view returns (uint256)","function managementFee() view returns (uint256)","function owner() view returns (address)","function curator() view returns (address)","function previewRedeem(uint256) view returns (uint256)","function previewWithdraw(uint256) view returns (uint256)","function forceDeallocate(address adapter,bytes data,uint256 assets,address onBehalf) returns (uint256)","function redeem(uint256 shares,address receiver,address owner) returns (uint256)","function multicall(bytes[] data)"]),I=D(["function parentVault() view returns (address)","function asset() view returns (address)","function morpho() view returns (address)","function marketIdsLength() view returns (uint256)","function marketIds(uint256) view returns (bytes32)","function expectedSupplyAssets(bytes32) view returns (uint256)"]),ne=D(["function idToMarketParams(bytes32) view returns (address loanToken,address collateralToken,address oracle,address irm,uint256 lltv)","function market(bytes32) view returns (uint128 totalSupplyAssets,uint128 totalSupplyShares,uint128 totalBorrowAssets,uint128 totalBorrowShares,uint128 lastUpdate,uint128 fee)"]),M=(e,t)=>e<t?e:t,T=(e,t)=>(e+t-1n)/t;function f(e){if(typeof e!="bigint"||e<0n||e>B)throw new r("Invalid Morpho V2 integer read.");return e}function ye(e){if(typeof e!="string")throw new r("Provide maxPenaltyAssets as a USDG base-unit integer string, including 0 for no penalty.");let t=Q(e);if(t>B)throw new r("Penalty limit exceeds uint256.");return t}function h(e){if(typeof e!="string")throw new r("Invalid Morpho V2 address read.");return L(e),g(e)}async function ae(e,t,a){if(await e.getChainId()!==x||a.chainId!==x)throw new r("Vault exit requires chain 4663.");let c=await e.getBlockNumber({cacheTime:0}),n=(p,y,k,P=[])=>e.readContract({address:p,abi:y,functionName:k,args:P,blockNumber:c}),[l,o,i,d,u]=await Promise.all([n(t,w,"adaptersLength"),n(t,w,"liquidityAdapter"),n(t,w,"liquidityData"),n(g(a.address),$,"balanceOf",[t]),n(g(a.address),$,"balanceOf",[q])]);if(f(l)!==1n)throw new r("Force exit requires exactly one verified MorphoMarketV1AdapterV2. This vault needs a separately qualified adapter plan.");let s=h(await n(t,w,"adapters",[0n])),v=h(o);if(v!==te&&v!==s)throw new r("The liquidity adapter is not the supported market adapter.");let[A,C,S,m,O]=await Promise.all([n(s,I,"parentVault"),n(s,I,"asset"),n(s,I,"morpho"),n(s,I,"marketIdsLength"),n(t,w,"forceDeallocatePenalty",[s])]);if(h(A)!==g(t)||h(C)!==g(a.address)||h(S)!==q)throw new r("The adapter does not match this vault and pinned Morpho Blue deployment.");let b=f(m);if(b>64n)throw new r("The adapter market inventory exceeds this reader\u2019s supported size.");let E=f(O);if(E>N/50n)throw new r("The force-deallocation penalty exceeds the documented 2% maximum.");let H;if(v!==te){if(typeof i!="string")throw new r("Invalid liquidity-market data.");let[p]=se(_,i);H=ee(Z(_,[p])).toLowerCase()}let V=await Promise.all(Array.from({length:Number(b)},(p,y)=>n(s,I,"marketIds",[BigInt(y)])));if(V.some(p=>typeof p!="string"||!/^0x[0-9a-f]{64}$/i.test(p))||new Set(V.map(p=>String(p).toLowerCase())).size!==V.length)throw new r("The adapter returned an invalid or duplicate market ID.");let R=await Promise.all(V.map(async p=>{let y=p,[k,P,ie]=await Promise.all([n(q,ne,"idToMarketParams",[y]),n(q,ne,"market",[y]),n(s,I,"expectedSupplyAssets",[y])]);if(!Array.isArray(k)||k.length!==5||!Array.isArray(P)||P.length!==6)throw new r("Invalid Morpho market state.");let z={loanToken:h(k[0]),collateralToken:h(k[1]),oracle:h(k[2]),irm:h(k[3]),lltv:f(k[4])},j=Z(_,[z]);if(ee(j).toLowerCase()!==y.toLowerCase()||z.loanToken!==g(a.address))throw new r("Morpho market identity or loan asset does not match the vault.");let X=f(P[0]),Y=f(P[2]);if(Y>X)throw new r("Invalid Morpho market liquidity.");let G=f(ie),K=X-Y;return{id:y,adapter:s,data:j,supplied:G,liquidity:K,capacity:M(G,K),penalty:E,normal:y.toLowerCase()===H}})),U=f(d),W=f(u),re=U+M(W,R.filter(p=>p.normal).reduce((p,y)=>p+y.capacity,0n));return{vault:t,blockNumber:c,idle:U,blueCash:W,normalCapacity:re,markets:R}}function de(e,t){if(t<=0n||t>B)throw new r("Force exit needs a positive position value.");let a=t>e.normalCapacity?t-e.normalCapacity:0n,c=[],n=e.blueCash-(e.normalCapacity-e.idle);for(let l of e.markets.filter(o=>!o.normal).sort((o,i)=>o.capacity===i.capacity?o.id.localeCompare(i.id):o.capacity>i.capacity?-1:1)){if(a===0n)break;let o=M(l.capacity,n);if(o===0n)continue;let i=s=>s+T(s*l.penalty,N),d=o;i(o)>=a&&(d=T(a*N,N+l.penalty),d>0n&&i(d-1n)>=a&&(d-=1n),d=M(o,d+(T(t,10000n)||1n)));let u=T(d*l.penalty,N);c.push({...l,amount:d,penaltyAssets:u}),n-=d,a=i(d)>=a?0n:a-i(d)}if(a>0n)throw new r("Underlying market liquidity cannot cover this force exit. Request a partial withdrawal or use a separately supported in-kind exit; force deallocation cannot create liquidity.");return{requestedAssets:t,normalCapacity:e.normalCapacity,legs:c,penaltyAssets:c.reduce((l,o)=>l+o.penaltyAssets,0n)}}async function he(e,t,a,c,n,l,o){let i=await ae(t,a,o),d=f(await t.readContract({address:a,abi:$,functionName:"balanceOf",args:[c],blockNumber:i.blockNumber}));if(n<=0n||n>d)throw new r("The fresh share balance cannot cover this exit.");let u=f(await t.readContract({address:a,abi:w,functionName:"previewRedeem",args:[n],blockNumber:i.blockNumber})),s=de(i,u);if(s.penaltyAssets>l)throw new r("The force-exit penalty exceeds maxPenaltyAssets. Inspect a fresh plan before authorizing a larger penalty.");let A=(await Promise.all(s.legs.map(b=>t.readContract({address:a,abi:w,functionName:"previewWithdraw",args:[b.penaltyAssets],blockNumber:i.blockNumber})))).reduce((b,E)=>b+f(E),0n);if(A>=n)throw new r("The penalty would consume the share balance.");let C=n-A,S=s.legs.map(b=>F({abi:w,functionName:"forceDeallocate",args:[b.adapter,b.data,b.amount,c]})),m=F({abi:w,functionName:"redeem",args:[C,c,c]});return S.push(m),{tx:e.unsignedTx({to:a,chainId:x,value:"0",data:s.legs.length?F({abi:w,functionName:"multicall",args:[S]}):m,description:`Exit this wallet\u2019s Morpho V2 shares; estimated penalty ${s.penaltyAssets} ${o.symbol} base units. No approvals.`}),plan:s,penaltyShares:A,redeemShares:C,blockNumber:i.blockNumber}}var ce="In-kind exits transfer supported market positions rather than cash; use the project in_kind_exit tool.";function we(e,t,a,c,n=ce){return{name:t,inputSchema:{type:"object",properties:{},additionalProperties:!1},execute:async(l,o)=>{try{if(L(o),Object.keys(l).length)throw new r("Vault details takes no arguments.");let i=e.clientFor(x);if(await i.getChainId()!==x)throw new r("Vault details requires chain 4663.");let d=await i.readContract({address:a,abi:D(["function asset() view returns (address)"]),functionName:"asset"});if(h(d)!==g(c.address))throw new r("The vault does not use the pinned underlying asset.");let u=await ae(i,a,c),[s,v,A,C]=await Promise.all(["performanceFee","managementFee","owner","curator"].map(m=>i.readContract({address:a,abi:w,functionName:m,blockNumber:u.blockNumber}))),S={...c,address:g(c.address)};return{vault:a,chainId:x,blockNumber:u.blockNumber.toString(),asset:S,owner:h(A),curator:h(C),idleAssets:u.idle.toString(),normalCapacityAssets:u.normalCapacity.toString(),markets:u.markets.map(m=>({marketId:m.id,adapter:m.adapter,suppliedAssets:m.supplied.toString(),marketLiquidityAssets:m.liquidity.toString(),capacityAssets:m.capacity.toString(),liquidityMarket:m.normal,penaltyWad:m.penalty.toString()})),fees:{performanceFeeWad:f(s).toString(),managementFeePerSecondWad:f(v).toString(),scale:N.toString()},apy:null,apyStatus:"This onchain snapshot does not include APY. Use the module analytics tool for indexed historical APY; maxRate is an accrual ceiling.",capacityCaveat:`Snapshot estimates; gates, price accrual, liquidity and penalties can change. Preview the exact action. Force exits may leave share rounding dust. ${n}`}}catch(i){throw new r(e.plainError(i))}}}}function be(e,t){return`Force-exit estimate: position ${e.requestedAssets} ${t} base units; penalty ${e.penaltyAssets}; net estimate ${e.requestedAssets-e.penaltyAssets}; effective penalty ${T(e.penaltyAssets*10000n,e.requestedAssets)} bps (rounded up). Penalty limit is a local preview check, not a calldata bound. Re-preview before signing and recheck positions for rounding dust.`}function ge(e,t,a,c,n){let l=(i,d)=>e.filter(u=>u.token.chainId===x&&u.token.address.toLowerCase()===i.toLowerCase()).reduce((u,s)=>{if(s.token.decimals!==d||!/^-?\d+$/.test(s.amount))throw new r("Invalid force-exit preview metadata.");return u+BigInt(s.amount)},0n),o=-l(t,18);if(o<=0n||o>a||l(g(n.address),n.decimals)<c)throw new r("The force-exit preview exceeds the share balance or returns less than minAmountOut.")}export{w as a,f as b,ye as c,ae as d,de as e,he as f,we as g,be as h,ge as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as W}from"./HL2MLC3O.js";import{d as R,e as _}from"./XV6F3RET.js";import{b as z,c as I}from"./SPRVVJXI.js";import{K as E}from"./O7PQDUVT.js";import{a as F}from"./6IM6A5VA.js";import{d as H,g as A,i as j}from"./73N3TOJL.js";import{a as C,s as S}from"./XPFVT2EA.js";import{a as s}from"./5YS5V2LK.js";import{encodeFunctionData as M,erc20Abi as V,getAddress as Z,keccak256 as K,zeroAddress as x}from"viem";var r=R.turbo,h=R.blackjack,g=m=>j(m,"Provide an explicit card address.",H);function G(m,d){if(/^uint\d*\[\]$/.test(m.type)&&Array.isArray(d))return d.map(c=>G({...m,type:m.type.slice(0,-2)},c));if(/^uint\d*$/.test(m.type)&&(typeof d!="string"||!/^(0|[1-9]\d*)$/.test(d)))throw new s("Card integers must be canonical decimal strings, without leading zeros.");return W(m,d)}var J=["buy","cashOut","claimExpiry","refund","safeTransferFrom","safeBatchTransferFrom"],X=["liquidate","recordKnock","liquidateKnock","clearKnock","recordDrift","settle","markVoid","depositHouse","depositPutPot","withdrawHouse","withdrawPutPot","createSeries","haltSales","resumeSales","sweepFees","skim"],Q=m=>m==="netnet_turbo_action"||m.startsWith("netnet_blackjack_")&&["netnet_blackjack_finalize","netnet_blackjack_expire","netnet_blackjack_claim"].includes(m);async function de(m,d,c,k){if(F(c),!Q(m))throw new s("No local NetNet card action builder exists.");let v=m!=="netnet_turbo_action";if(Object.keys(d).some(e=>!(v?["sessionId","seriesId"]:["operation","values","minimum","allowZeroPayout"]).includes(e)))throw new s("Unexpected card action argument.");if(v&&!z(m,d))throw new s("Recovery accepts exactly one positive decimal session or series ID.");if(await k.getChainId()!==C)throw new s("NetNet cards require chain 4663.");let w=await k.getBlock();if(w.number===null||!w.hash)throw new s("Card action block is unavailable.");let p=(e,t,i=[])=>k.readContract({address:e.address,abi:e.abi,functionName:t,args:i,blockNumber:w.number});for(let e of v?[r,h]:[r]){let t=await k.getCode({address:e.address,blockNumber:w.number});if(!t||K(t)!==e.codeHash)throw new s("NetNet card runtime changed or is unavailable. Requalify this deployment before signing.")}for(let e of v?Object.values(_):[_.turbo]){let t=await k.getCode({address:Z(e.address),blockNumber:w.number});if(!t||K(t)!==e.codeHash)throw new s("NetNet linked card library changed or is unavailable. Requalify before signing.")}let l={txs:[],inputs:[],cards:[],decision:"",blockNumber:w.number,blockHash:w.hash},$=(e,t,i,a,o)=>({chainId:4663,collection:r.address,operator:e,from:t,to:i,id:a,amount:o,operation:t===x?"mint":i===x?"burn":"transfer"}),T=(e,t,i,a,o=[])=>{l.txs.push({to:e,chainId:C,value:"0",data:M({abi:t,functionName:i,args:a}),description:l.decision}),l.cards.push(o)},D=(e,t)=>{if(t<=0n||t>=1n<<128n)throw new s("Card payment must be positive and below the exact-approval ceiling.");l.inputs.push({token:e,amount:t,to:r.address}),T(e,V,"approve",[r.address,t])};if(v){if(g(await p(h,"cards"))!==r.address||g(await p(h,"turbo"))!==r.address)throw new s("Blackjack card wiring changed.");let e=m==="netnet_blackjack_claim";if(Object.keys(d).some(b=>b!==(e?"seriesId":"sessionId")))throw new s("Recovery accepts only its one exact session or series ID.");let t=E(e?d.seriesId:d.sessionId),i,a,o,u="Original-series parked payout; self-claim only.";if(e){if(i=t,a=await p(h,"unclaimedChips",[t,c]),o="claimUnclaimedChips",a===0n)throw new s("This wallet has no parked chips for that series.")}else{let b=await p(h,"sessionOf",[t]);if(!b||!A(b.player,c))throw new s("Recovery is limited to this wallet\u2019s recorded blackjack session.");let y=m==="netnet_blackjack_finalize";if(o=y?"finalize":"expireSession",b.state!==(y?2:1))throw new s(y?"Session is not Closing. Use its current on-chain state to choose recovery.":"Session is not Open. A Closing session uses finalize after its challenge window.");let N=y?b.closeAt:b.deadline;if(u=y?`Challenge ends ${new Date(Number(N)*1e3).toISOString()}.`:`Session deadline ${new Date(Number(N)*1e3).toISOString()}; player-only expiry until ${new Date(Number(N+3600n)*1e3).toISOString()}.`,w.timestamp<N)throw new s(`Recovery is not due until ${N} Unix seconds.`);i=await p(h,"tableSeries"),a=b.chips}if(i<=0n||a<0n)throw new s("Blackjack recovery accounting is unavailable.");return l.decision=`${o} ${e?"series":"session"} ${t} at ${h.address}: return ${a} whole cards of collection ${r.address}, series ${i}, to ${Z(c)}. ${u} Last on-chain chips may omit off-chain winnings; cards may be worthless. A failed receiver parks the payout at ${h.address}; self-claim only. ETH gas extra.`,T(h.address,h.abi,o,[t],a===0n?[]:[$(h.address,h.address,c,i,a)]),l.recovery={...e?{}:{sessionId:t.toString()},seriesId:i.toString(),count:a.toString(),player:c,operation:o},l}let n=String(d.operation);if(n==="setApprovalForAll")throw new s(I.setApprovalForAll);if(["convertPremiums","convertSleeveFees"].includes(n))throw new s(I.conversion);if(![...J,...X].includes(n))throw new s("Choose a qualified finite TURBO operation.");if(!Array.isArray(d.values))throw new s("Provide ordered TURBO values using decimal integer strings.");let U=n==="safeTransferFrom"||n==="safeBatchTransferFrom",B=r.abi.find(e=>e.name===n),q=U?B.inputs.slice(1,-1):B.inputs;if(d.values.length!==q.length)throw new s("TURBO values do not match the exact operation inputs.");let f=q.map((e,t)=>G(e,d.values[t])),O=g(await p(r,"manager")),L=g(await p(r,"sleeve")),P=[];if(U){if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("Transfer has no payout floor.");let e=g(f[0]);if(e===x||A(e,c))throw new s("Name a nonzero, non-self card recipient.");let t=await k.getCode({address:e,blockNumber:w.number});if(t&&t!=="0x")throw new s("Card transfer to a contract requires qualified credit and recovery. New blackjack seating remains disabled.");let i=n==="safeTransferFrom"?[f[1]]:f[1],a=n==="safeTransferFrom"?[f[2]]:f[2];if(!i.length||i.length>8||i.length!==a.length||new Set(i.map(String)).size!==i.length||i.some((o,u)=>o<=0n||a[u]<=0n||u>0&&o<=i[u-1]))throw new s("Use at most eight unique positive series IDs in increasing order and exact positive counts.");for(let o=0;o<i.length;o++){if(await p(r,"balanceOf",[c,i[o]])<a[o])throw new s("Card transfer exceeds this wallet\u2019s balance.");P.push($(c,c,e,i[o],a[o])),l.inputs.push({token:r.address,id:i[o],amount:a[o],to:e,exact:!0})}l.decision=`Transfer whole cards of collection ${r.address}: ${i.map((o,u)=>`series ${o} count ${a[u]}`).join(", ")} to ${e}. Basis does not travel with cards; no operator approval. No payout; transfer is irreversible. ETH gas extra.`,f=[c,...f,"0x"]}else if(["buy","cashOut","claimExpiry","refund"].includes(n)){let e=f[0],t=f[1],i=await p(r,"seriesOf",[e]);if(!i||i.asset===x||t<=0n)throw new s("Choose a known series and positive whole-card count.");let a=i.side===0?g(i.asset):S.mainnet.usdg,o=await k.readContract({address:a,abi:V,functionName:"decimals",blockNumber:w.number});if((n==="buy"||n==="cashOut")&&(i.state!==1||w.timestamp>=i.expiry))throw new s("This TURBO series is not OPEN and unexpired.");if(n==="buy"){let[u]=await p(r,"quoteBuy",[e,t]);if(!u||u>f[2])throw new s("Current card quote exceeds the explicit maximum USDG payment.");if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("Buy uses its exact count and maximum USDG price.");l.decision=`Spend at most ${f[2]} USDG base units (${S.mainnet.usdg}, decimals 6) at ${r.address}; receive ${t} whole cards, collection ${r.address}, series ${e}, into this wallet. Exact quoted approval ${u}; fees included. Strike ${i.strikeWad} WAD; expiry ${new Date(Number(i.expiry)*1e3).toISOString()}; cards can lose all value. Any residual USDG allowance requires zero cleanup. ETH gas extra.`,D(S.mainnet.usdg,u),P=[$(c,x,c,e,t)]}else{if(n==="cashOut"&&d.minimum!==void 0)throw new s("cashOut takes its one encoded minimum in values, not a second local minimum.");if(await p(r,"balanceOf",[c,e])<t)throw new s("Card burn exceeds this wallet\u2019s balance.");let u=n==="cashOut"?f[2]:E(d.minimum,!0);if(u===0n&&d.allowZeroPayout!==!0)throw new s("A zero payout floor requires allowZeroPayout:true and explicit human confirmation.");let b=0n;if(n==="cashOut"){let y=await p(r,"quoteCashOut",[e,t,c]);if(y[0]<u)throw new s("The current cash-out quote misses the payout minimum.");b=y[1]}else if(i.state!==(n==="claimExpiry"?3:4))throw new s("Expiry claims require EXPIRED; pro-rata refunds require VOID.");l.decision=`Burn ${t} whole cards of ${r.address}, series ${e}; ${n==="refund"?"series pro-rata VOID refund, not personal purchase-price repayment":n}; receive >=${u} base units of ${a} (decimals ${o}) into this wallet. ${n==="cashOut"?`Minimum encoded in calldata; current performance fee ${b}.`:"Floor is local simulation only; no on-chain minimum. Settled payout includes applicable fees."} Burned cards cannot be returned; ETH gas extra.`,P=[$(c,c,x,e,t)],l.inputs.push({token:r.address,id:e,amount:t,to:x,exact:!0}),l.receipt={token:a,minimum:u,recipient:c,enforcement:n==="cashOut"?"calldata":"simulation"}}}else{if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("This TURBO operation has no caller payout floor.");if(["withdrawHouse","withdrawPutPot","createSeries","resumeSales"].includes(n)&&!A(O,c))throw new s(`This TURBO operation requires manager ${O}.`);if(n==="haltSales"&&!A(c,O)&&!A(c,g(await p(r,"halter"))))throw new s("TURBO haltSales requires the current manager or halter.");if(["depositHouse","depositPutPot","withdrawHouse","withdrawPutPot","createSeries"].includes(n)){let t=g(f[0]);if(!(await Promise.all(["asset0","asset1","asset2"].map(a=>p(r,a)))).some(a=>typeof a=="string"&&A(a,t)))throw new s("This is not a pinned TURBO reserve asset.")}l.decision=`${n} at ${r.address}; values ${JSON.stringify(f,(t,i)=>typeof i=="bigint"?String(i):i)}. Protocol capital/accounting action; manager ${O}; sleeve ${L}; no caller reward. ${n.startsWith("deposit")?"Irreversible house funding; no personal withdrawable balance.":n.startsWith("withdraw")?"Pays the current manager; operating and reservation floors still apply.":"Series state, risk or protocol fee allocation may change."} No card approval; ETH gas extra.`,(n==="depositHouse"||n==="depositPutPot")&&D(n==="depositHouse"?g(f[0]):S.mainnet.usdg,f[1])}if(l.decision.length>1024)throw new s("Card decision terms exceed the complete confirmation label capacity. Use fewer card IDs.");T(r.address,r.abi,n,f,P);for(let e of l.txs)e.description=l.decision;return l}export{J as a,X as b,Q as c,de as d};
|
|
1
|
+
import{b as W}from"./NU4K3TEZ.js";import{d as R,e as _}from"./XV6F3RET.js";import{b as z,c as I}from"./SPRVVJXI.js";import{K as E}from"./L3ZM77SJ.js";import{a as F}from"./6IM6A5VA.js";import{d as H,g as A,i as j}from"./73N3TOJL.js";import{a as C,s as S}from"./G6HCV67X.js";import{a as s}from"./5YS5V2LK.js";import{encodeFunctionData as M,erc20Abi as V,getAddress as Z,keccak256 as K,zeroAddress as x}from"viem";var r=R.turbo,h=R.blackjack,g=m=>j(m,"Provide an explicit card address.",H);function G(m,d){if(/^uint\d*\[\]$/.test(m.type)&&Array.isArray(d))return d.map(c=>G({...m,type:m.type.slice(0,-2)},c));if(/^uint\d*$/.test(m.type)&&(typeof d!="string"||!/^(0|[1-9]\d*)$/.test(d)))throw new s("Card integers must be canonical decimal strings, without leading zeros.");return W(m,d)}var J=["buy","cashOut","claimExpiry","refund","safeTransferFrom","safeBatchTransferFrom"],X=["liquidate","recordKnock","liquidateKnock","clearKnock","recordDrift","settle","markVoid","depositHouse","depositPutPot","withdrawHouse","withdrawPutPot","createSeries","haltSales","resumeSales","sweepFees","skim"],Q=m=>m==="netnet_turbo_action"||m.startsWith("netnet_blackjack_")&&["netnet_blackjack_finalize","netnet_blackjack_expire","netnet_blackjack_claim"].includes(m);async function de(m,d,c,k){if(F(c),!Q(m))throw new s("No local NetNet card action builder exists.");let v=m!=="netnet_turbo_action";if(Object.keys(d).some(e=>!(v?["sessionId","seriesId"]:["operation","values","minimum","allowZeroPayout"]).includes(e)))throw new s("Unexpected card action argument.");if(v&&!z(m,d))throw new s("Recovery accepts exactly one positive decimal session or series ID.");if(await k.getChainId()!==C)throw new s("NetNet cards require chain 4663.");let w=await k.getBlock();if(w.number===null||!w.hash)throw new s("Card action block is unavailable.");let p=(e,t,i=[])=>k.readContract({address:e.address,abi:e.abi,functionName:t,args:i,blockNumber:w.number});for(let e of v?[r,h]:[r]){let t=await k.getCode({address:e.address,blockNumber:w.number});if(!t||K(t)!==e.codeHash)throw new s("NetNet card runtime changed or is unavailable. Requalify this deployment before signing.")}for(let e of v?Object.values(_):[_.turbo]){let t=await k.getCode({address:Z(e.address),blockNumber:w.number});if(!t||K(t)!==e.codeHash)throw new s("NetNet linked card library changed or is unavailable. Requalify before signing.")}let l={txs:[],inputs:[],cards:[],decision:"",blockNumber:w.number,blockHash:w.hash},$=(e,t,i,a,o)=>({chainId:4663,collection:r.address,operator:e,from:t,to:i,id:a,amount:o,operation:t===x?"mint":i===x?"burn":"transfer"}),T=(e,t,i,a,o=[])=>{l.txs.push({to:e,chainId:C,value:"0",data:M({abi:t,functionName:i,args:a}),description:l.decision}),l.cards.push(o)},D=(e,t)=>{if(t<=0n||t>=1n<<128n)throw new s("Card payment must be positive and below the exact-approval ceiling.");l.inputs.push({token:e,amount:t,to:r.address}),T(e,V,"approve",[r.address,t])};if(v){if(g(await p(h,"cards"))!==r.address||g(await p(h,"turbo"))!==r.address)throw new s("Blackjack card wiring changed.");let e=m==="netnet_blackjack_claim";if(Object.keys(d).some(b=>b!==(e?"seriesId":"sessionId")))throw new s("Recovery accepts only its one exact session or series ID.");let t=E(e?d.seriesId:d.sessionId),i,a,o,u="Original-series parked payout; self-claim only.";if(e){if(i=t,a=await p(h,"unclaimedChips",[t,c]),o="claimUnclaimedChips",a===0n)throw new s("This wallet has no parked chips for that series.")}else{let b=await p(h,"sessionOf",[t]);if(!b||!A(b.player,c))throw new s("Recovery is limited to this wallet\u2019s recorded blackjack session.");let y=m==="netnet_blackjack_finalize";if(o=y?"finalize":"expireSession",b.state!==(y?2:1))throw new s(y?"Session is not Closing. Use its current on-chain state to choose recovery.":"Session is not Open. A Closing session uses finalize after its challenge window.");let N=y?b.closeAt:b.deadline;if(u=y?`Challenge ends ${new Date(Number(N)*1e3).toISOString()}.`:`Session deadline ${new Date(Number(N)*1e3).toISOString()}; player-only expiry until ${new Date(Number(N+3600n)*1e3).toISOString()}.`,w.timestamp<N)throw new s(`Recovery is not due until ${N} Unix seconds.`);i=await p(h,"tableSeries"),a=b.chips}if(i<=0n||a<0n)throw new s("Blackjack recovery accounting is unavailable.");return l.decision=`${o} ${e?"series":"session"} ${t} at ${h.address}: return ${a} whole cards of collection ${r.address}, series ${i}, to ${Z(c)}. ${u} Last on-chain chips may omit off-chain winnings; cards may be worthless. A failed receiver parks the payout at ${h.address}; self-claim only. ETH gas extra.`,T(h.address,h.abi,o,[t],a===0n?[]:[$(h.address,h.address,c,i,a)]),l.recovery={...e?{}:{sessionId:t.toString()},seriesId:i.toString(),count:a.toString(),player:c,operation:o},l}let n=String(d.operation);if(n==="setApprovalForAll")throw new s(I.setApprovalForAll);if(["convertPremiums","convertSleeveFees"].includes(n))throw new s(I.conversion);if(![...J,...X].includes(n))throw new s("Choose a qualified finite TURBO operation.");if(!Array.isArray(d.values))throw new s("Provide ordered TURBO values using decimal integer strings.");let U=n==="safeTransferFrom"||n==="safeBatchTransferFrom",B=r.abi.find(e=>e.name===n),q=U?B.inputs.slice(1,-1):B.inputs;if(d.values.length!==q.length)throw new s("TURBO values do not match the exact operation inputs.");let f=q.map((e,t)=>G(e,d.values[t])),O=g(await p(r,"manager")),L=g(await p(r,"sleeve")),P=[];if(U){if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("Transfer has no payout floor.");let e=g(f[0]);if(e===x||A(e,c))throw new s("Name a nonzero, non-self card recipient.");let t=await k.getCode({address:e,blockNumber:w.number});if(t&&t!=="0x")throw new s("Card transfer to a contract requires qualified credit and recovery. New blackjack seating remains disabled.");let i=n==="safeTransferFrom"?[f[1]]:f[1],a=n==="safeTransferFrom"?[f[2]]:f[2];if(!i.length||i.length>8||i.length!==a.length||new Set(i.map(String)).size!==i.length||i.some((o,u)=>o<=0n||a[u]<=0n||u>0&&o<=i[u-1]))throw new s("Use at most eight unique positive series IDs in increasing order and exact positive counts.");for(let o=0;o<i.length;o++){if(await p(r,"balanceOf",[c,i[o]])<a[o])throw new s("Card transfer exceeds this wallet\u2019s balance.");P.push($(c,c,e,i[o],a[o])),l.inputs.push({token:r.address,id:i[o],amount:a[o],to:e,exact:!0})}l.decision=`Transfer whole cards of collection ${r.address}: ${i.map((o,u)=>`series ${o} count ${a[u]}`).join(", ")} to ${e}. Basis does not travel with cards; no operator approval. No payout; transfer is irreversible. ETH gas extra.`,f=[c,...f,"0x"]}else if(["buy","cashOut","claimExpiry","refund"].includes(n)){let e=f[0],t=f[1],i=await p(r,"seriesOf",[e]);if(!i||i.asset===x||t<=0n)throw new s("Choose a known series and positive whole-card count.");let a=i.side===0?g(i.asset):S.mainnet.usdg,o=await k.readContract({address:a,abi:V,functionName:"decimals",blockNumber:w.number});if((n==="buy"||n==="cashOut")&&(i.state!==1||w.timestamp>=i.expiry))throw new s("This TURBO series is not OPEN and unexpired.");if(n==="buy"){let[u]=await p(r,"quoteBuy",[e,t]);if(!u||u>f[2])throw new s("Current card quote exceeds the explicit maximum USDG payment.");if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("Buy uses its exact count and maximum USDG price.");l.decision=`Spend at most ${f[2]} USDG base units (${S.mainnet.usdg}, decimals 6) at ${r.address}; receive ${t} whole cards, collection ${r.address}, series ${e}, into this wallet. Exact quoted approval ${u}; fees included. Strike ${i.strikeWad} WAD; expiry ${new Date(Number(i.expiry)*1e3).toISOString()}; cards can lose all value. Any residual USDG allowance requires zero cleanup. ETH gas extra.`,D(S.mainnet.usdg,u),P=[$(c,x,c,e,t)]}else{if(n==="cashOut"&&d.minimum!==void 0)throw new s("cashOut takes its one encoded minimum in values, not a second local minimum.");if(await p(r,"balanceOf",[c,e])<t)throw new s("Card burn exceeds this wallet\u2019s balance.");let u=n==="cashOut"?f[2]:E(d.minimum,!0);if(u===0n&&d.allowZeroPayout!==!0)throw new s("A zero payout floor requires allowZeroPayout:true and explicit human confirmation.");let b=0n;if(n==="cashOut"){let y=await p(r,"quoteCashOut",[e,t,c]);if(y[0]<u)throw new s("The current cash-out quote misses the payout minimum.");b=y[1]}else if(i.state!==(n==="claimExpiry"?3:4))throw new s("Expiry claims require EXPIRED; pro-rata refunds require VOID.");l.decision=`Burn ${t} whole cards of ${r.address}, series ${e}; ${n==="refund"?"series pro-rata VOID refund, not personal purchase-price repayment":n}; receive >=${u} base units of ${a} (decimals ${o}) into this wallet. ${n==="cashOut"?`Minimum encoded in calldata; current performance fee ${b}.`:"Floor is local simulation only; no on-chain minimum. Settled payout includes applicable fees."} Burned cards cannot be returned; ETH gas extra.`,P=[$(c,c,x,e,t)],l.inputs.push({token:r.address,id:e,amount:t,to:x,exact:!0}),l.receipt={token:a,minimum:u,recipient:c,enforcement:n==="cashOut"?"calldata":"simulation"}}}else{if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("This TURBO operation has no caller payout floor.");if(["withdrawHouse","withdrawPutPot","createSeries","resumeSales"].includes(n)&&!A(O,c))throw new s(`This TURBO operation requires manager ${O}.`);if(n==="haltSales"&&!A(c,O)&&!A(c,g(await p(r,"halter"))))throw new s("TURBO haltSales requires the current manager or halter.");if(["depositHouse","depositPutPot","withdrawHouse","withdrawPutPot","createSeries"].includes(n)){let t=g(f[0]);if(!(await Promise.all(["asset0","asset1","asset2"].map(a=>p(r,a)))).some(a=>typeof a=="string"&&A(a,t)))throw new s("This is not a pinned TURBO reserve asset.")}l.decision=`${n} at ${r.address}; values ${JSON.stringify(f,(t,i)=>typeof i=="bigint"?String(i):i)}. Protocol capital/accounting action; manager ${O}; sleeve ${L}; no caller reward. ${n.startsWith("deposit")?"Irreversible house funding; no personal withdrawable balance.":n.startsWith("withdraw")?"Pays the current manager; operating and reservation floors still apply.":"Series state, risk or protocol fee allocation may change."} No card approval; ETH gas extra.`,(n==="depositHouse"||n==="depositPutPot")&&D(n==="depositHouse"?g(f[0]):S.mainnet.usdg,f[1])}if(l.decision.length>1024)throw new s("Card decision terms exceed the complete confirmation label capacity. Use fewer card IDs.");T(r.address,r.abi,n,f,P);for(let e of l.txs)e.description=l.decision;return l}export{J as a,X as b,Q as c,de as d};
|