@sherwoodagent/cli 0.87.0 → 0.87.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-A2JEYGQS.js → agent-FCGZL4GF.js} +4 -4
- package/dist/{chat-OZAAN5LT.js → chat-AKLYUJZV.js} +6 -6
- package/dist/{chunk-37GT3TJX.js → chunk-4ITTHKRX.js} +3 -3
- package/dist/{chunk-TTF5TDRV.js → chunk-6D3FNU75.js} +3 -3
- package/dist/{chunk-3UYGXGMF.js → chunk-6SAE2VDK.js} +2 -2
- package/dist/{chunk-R6F57QQF.js → chunk-BH3VTJ4F.js} +3 -3
- package/dist/{chunk-MIAMGVZ4.js → chunk-D4BSBW3Q.js} +215 -4
- package/dist/chunk-D4BSBW3Q.js.map +1 -0
- package/dist/{chunk-IINWI3LD.js → chunk-EEI6FRTE.js} +2 -2
- package/dist/{chunk-UOIAY6ZG.js → chunk-FWQESFFM.js} +13 -3
- package/dist/{chunk-UOIAY6ZG.js.map → chunk-FWQESFFM.js.map} +1 -1
- package/dist/{chunk-CU42ZD4K.js → chunk-G5MXVAFC.js} +16 -3
- package/dist/{chunk-CU42ZD4K.js.map → chunk-G5MXVAFC.js.map} +1 -1
- package/dist/{chunk-GR3GSU3I.js → chunk-N2E2Q5GL.js} +4 -4
- package/dist/{chunk-JGD6A2Q4.js → chunk-QFGZQYZA.js} +3 -3
- package/dist/{chunk-W3XWRWML.js → chunk-SI65QHTY.js} +3 -3
- package/dist/{chunk-V7TNYHIK.js → chunk-VYCLG5DE.js} +11 -7
- package/dist/{client-C6N2ASTH.js → client-PYFE6YQR.js} +2 -2
- package/dist/{eas-VFTWEI4K.js → eas-DV3Z7AT3.js} +4 -4
- package/dist/{governor-HVBSI6Z2.js → governor-QFBN6RYS.js} +6 -4
- package/dist/{identity-OLD25QEP.js → identity-M4TXM7EX.js} +5 -5
- package/dist/index.js +292 -81
- package/dist/index.js.map +1 -1
- package/dist/{price-O3THX2HL.js → price-EXZDYVDD.js} +4 -4
- package/dist/{providers-KZNCCUKT.js → providers-6UZKDFQD.js} +3 -3
- package/dist/{research-ARFBFXIT.js → research-44GHYE4H.js} +5 -5
- package/dist/{session-A7CYZSSA.js → session-45NQAHFI.js} +7 -7
- package/dist/{trade-ZCK332E4.js → trade-FO52SP62.js} +10 -10
- package/dist/{vault-CDI7BELZ.js → vault-WWGSRNRP.js} +6 -6
- package/dist/{xmtp-7LAWDKJT.js → xmtp-72IRK7JL.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-MIAMGVZ4.js.map +0 -1
- /package/dist/{agent-A2JEYGQS.js.map → agent-FCGZL4GF.js.map} +0 -0
- /package/dist/{chat-OZAAN5LT.js.map → chat-AKLYUJZV.js.map} +0 -0
- /package/dist/{chunk-37GT3TJX.js.map → chunk-4ITTHKRX.js.map} +0 -0
- /package/dist/{chunk-TTF5TDRV.js.map → chunk-6D3FNU75.js.map} +0 -0
- /package/dist/{chunk-3UYGXGMF.js.map → chunk-6SAE2VDK.js.map} +0 -0
- /package/dist/{chunk-R6F57QQF.js.map → chunk-BH3VTJ4F.js.map} +0 -0
- /package/dist/{chunk-IINWI3LD.js.map → chunk-EEI6FRTE.js.map} +0 -0
- /package/dist/{chunk-GR3GSU3I.js.map → chunk-N2E2Q5GL.js.map} +0 -0
- /package/dist/{chunk-JGD6A2Q4.js.map → chunk-QFGZQYZA.js.map} +0 -0
- /package/dist/{chunk-W3XWRWML.js.map → chunk-SI65QHTY.js.map} +0 -0
- /package/dist/{chunk-V7TNYHIK.js.map → chunk-VYCLG5DE.js.map} +0 -0
- /package/dist/{client-C6N2ASTH.js.map → client-PYFE6YQR.js.map} +0 -0
- /package/dist/{eas-VFTWEI4K.js.map → eas-DV3Z7AT3.js.map} +0 -0
- /package/dist/{governor-HVBSI6Z2.js.map → governor-QFBN6RYS.js.map} +0 -0
- /package/dist/{identity-OLD25QEP.js.map → identity-M4TXM7EX.js.map} +0 -0
- /package/dist/{price-O3THX2HL.js.map → price-EXZDYVDD.js.map} +0 -0
- /package/dist/{providers-KZNCCUKT.js.map → providers-6UZKDFQD.js.map} +0 -0
- /package/dist/{research-ARFBFXIT.js.map → research-44GHYE4H.js.map} +0 -0
- /package/dist/{session-A7CYZSSA.js.map → session-45NQAHFI.js.map} +0 -0
- /package/dist/{trade-ZCK332E4.js.map → trade-FO52SP62.js.map} +0 -0
- /package/dist/{vault-CDI7BELZ.js.map → vault-WWGSRNRP.js.map} +0 -0
- /package/dist/{xmtp-7LAWDKJT.js.map → xmtp-72IRK7JL.js.map} +0 -0
|
@@ -291,7 +291,10 @@ var ROBINHOOD_TESTNET_STRATEGY_TEMPLATES = {
|
|
|
291
291
|
HYPERLIQUID_PERP: ZERO,
|
|
292
292
|
HYPERLIQUID_GRID: ZERO,
|
|
293
293
|
// V2 redeploy PORTFOLIO_TEMPLATE (chain 46630).
|
|
294
|
-
PORTFOLIO: "0x67420Cc504d70a42Adfd8867d878afe0978C7d10"
|
|
294
|
+
PORTFOLIO: "0x67420Cc504d70a42Adfd8867d878afe0978C7d10",
|
|
295
|
+
// v1 templates — deployed on the fork only so far (no 46630 equivalent).
|
|
296
|
+
MORPHO_SUPPLY: ZERO,
|
|
297
|
+
CONCENTRATED_LIQUIDITY: ZERO
|
|
295
298
|
};
|
|
296
299
|
var ROBINHOOD_MAINNET_EAS = {
|
|
297
300
|
EAS: "0x7d70441Bb10AcE5d9771dc0b6205D89ddf63205B",
|
|
@@ -361,7 +364,14 @@ var ROBINHOOD_FORK_STRATEGY_TEMPLATES = {
|
|
|
361
364
|
MAMO_YIELD: ZERO,
|
|
362
365
|
HYPERLIQUID_PERP: ZERO,
|
|
363
366
|
HYPERLIQUID_GRID: ZERO,
|
|
364
|
-
PORTFOLIO: "0xAA5872009c527cCb80343E41C52840CEdb095eb0"
|
|
367
|
+
PORTFOLIO: "0xAA5872009c527cCb80343E41C52840CEdb095eb0",
|
|
368
|
+
// MORPHO_SUPPLY_TEMPLATE / CONCENTRATED_LIQUIDITY_TEMPLATE from
|
|
369
|
+
// sherwood-protocol/chains/9994663.json. Both are live and on the
|
|
370
|
+
// StrategyFactory allowlist; the CLI has no init encoder for their init
|
|
371
|
+
// tuples yet, so `strategy list` shows them and `clone`/`propose` say so
|
|
372
|
+
// explicitly instead of the address book pretending they don't exist.
|
|
373
|
+
MORPHO_SUPPLY: "0x5B55E1Da361573CB0788e750038567D2569BE41d",
|
|
374
|
+
CONCENTRATED_LIQUIDITY: "0xcba9C84F2d382729D1519c5F7f4a9AAaC075f8B5"
|
|
365
375
|
};
|
|
366
376
|
var TOKEN_REGISTRY = {
|
|
367
377
|
"robinhood-testnet": ROBINHOOD_TESTNET_TOKENS,
|
|
@@ -508,4 +518,4 @@ export {
|
|
|
508
518
|
SYNTHRA,
|
|
509
519
|
CHAINLINK
|
|
510
520
|
};
|
|
511
|
-
//# sourceMappingURL=chunk-
|
|
521
|
+
//# sourceMappingURL=chunk-FWQESFFM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/address-overrides.ts","../src/lib/fork-tokens.ts","../src/lib/addresses.ts"],"sourcesContent":["/**\n * SIM_ADDRESSES_FILE override layer (spec G1).\n *\n * Points the CLI at a vnet deployment: a chains/{chainId}.json-shaped file\n * (CAPS_SNAKE_CASE keys, written by contracts deploy scripts) is mapped onto\n * the CLI's per-registry key names and merged over the base network registry\n * at call time. Only 0x-string values are considered. Fail-closed: a set-but-\n * unreadable file throws rather than silently using mainnet addresses.\n */\nimport { readFileSync } from \"node:fs\";\nimport type { Address } from \"viem\";\n\ntype RegistryName = \"SHERWOOD\" | \"STRATEGY_TEMPLATES\" | \"ENS\" | \"UNISWAP\";\n\n// chains-json key → CLI registry key, grouped by target registry.\n// Extend when deploy scripts gain keys the CLI reads (Task 1 Step 2).\n//\n// STRATEGY_TEMPLATES note (Task 1 Step 2 finding): the deploy scripts\n// (DeployTemplates.s.sol / DeployStrategyFactory.s.sol) write chains.json\n// keys with a `_TEMPLATE` suffix (e.g. `MOONWELL_SUPPLY_TEMPLATE`), but the\n// CLI-side STRATEGY_TEMPLATES() registry (cli/src/lib/addresses.ts\n// `BASE_STRATEGY_TEMPLATES`) and its consumers (e.g.\n// cli/src/commands/strategy-template.ts `addressKey: \"MOONWELL_SUPPLY\"`) key\n// off the UNSUFFIXED name. The map below strips the suffix so overrides\n// actually reach the keys the CLI reads.\nconst CHAINS_TO_CLI: Record<RegistryName, Record<string, string>> = {\n SHERWOOD: {\n SYNDICATE_FACTORY: \"FACTORY\",\n SYNDICATE_GOVERNOR: \"GOVERNOR\",\n GUARDIAN_REGISTRY: \"GUARDIAN_REGISTRY\",\n STAKED_WOOD: \"STAKED_WOOD\",\n WOOD: \"WOOD_TOKEN\",\n WOOD_TOKEN: \"WOOD_TOKEN\",\n STRATEGY_FACTORY: \"STRATEGY_FACTORY\",\n },\n STRATEGY_TEMPLATES: {\n MOONWELL_SUPPLY_TEMPLATE: \"MOONWELL_SUPPLY\",\n AERODROME_LP_TEMPLATE: \"AERODROME_LP\",\n VENICE_INFERENCE_TEMPLATE: \"VENICE_INFERENCE\",\n WSTETH_MOONWELL_TEMPLATE: \"WSTETH_MOONWELL\",\n MAMO_YIELD_TEMPLATE: \"MAMO_YIELD\",\n PORTFOLIO_TEMPLATE: \"PORTFOLIO\",\n HYPERLIQUID_PERP_TEMPLATE: \"HYPERLIQUID_PERP\",\n HYPERLIQUID_GRID_TEMPLATE: \"HYPERLIQUID_GRID\",\n },\n ENS: {\n L2_REGISTRAR: \"L2_REGISTRAR\",\n L2_REGISTRY: \"L2_REGISTRY\",\n },\n UNISWAP: {\n UNISWAP_SWAP_ADAPTER: \"SWAP_ADAPTER\",\n },\n};\n\nlet cached: Record<string, Address> | null | undefined;\n\nfunction loadFile(): Record<string, Address> | null {\n if (cached !== undefined) return cached;\n const file = process.env.SIM_ADDRESSES_FILE;\n if (!file) {\n cached = null;\n return cached;\n }\n let raw: Record<string, unknown>;\n try {\n raw = JSON.parse(readFileSync(file, \"utf8\")) as Record<string, unknown>;\n } catch (err) {\n throw new Error(\n `SIM_ADDRESSES_FILE is set (${file}) but unreadable: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n const out: Record<string, Address> = {};\n for (const [k, v] of Object.entries(raw)) {\n if (typeof v === \"string\" && v.startsWith(\"0x\")) out[k] = v as Address;\n }\n cached = out;\n return cached;\n}\n\n/** Mapped overrides for one CLI registry; {} when SIM_ADDRESSES_FILE unset. */\nexport function overridesFor(registry: RegistryName): Record<string, Address> {\n const file = loadFile();\n if (!file) return {};\n const map = CHAINS_TO_CLI[registry];\n const out: Record<string, Address> = {};\n for (const [chainsKey, cliKey] of Object.entries(map)) {\n if (file[chainsKey]) out[cliKey] = file[chainsKey];\n }\n return out;\n}\n\nexport function __resetOverridesCacheForTests(): void {\n cached = undefined;\n}\n","/**\n * Robinhood mainnet fork (Tenderly vnet, chain 9994663) — tokenized-stock map.\n *\n * ONE table for every stock the fork address book carries\n * (sherwood-protocol/chains/9994663.json): token address, its Chainlink USD\n * push feed, and the swap route the fork's Uniswap deployment ACTUALLY quotes\n * for USDG -> stock. `addresses.ts` derives `ROBINHOOD_FORK_TOKENS` and the\n * fork's `<SYM>_USD_FEED` registry from here; the sim's basket builder\n * (`simulation/proposal-specs.ts`) reads feed + route from here.\n *\n * THE ROUTES ARE MEASURED, NOT GUESSED. Every entry below was quoted\n * read-only against the fork's V4Quoter (0x8dc178ef…) and, where v4 had no\n * pool, the v3 QuoterV2 (0x33e885ed…), at 100 USDG on 2026-09-05 (vnet block\n * 21,179,183), and cross-checked against the token's own Chainlink feed. The\n * per-entry `quotedOut` / `feedDeviationBps` fields are that measurement.\n * Tiers probed: v4 3000/60, 10000/200, 500/10, 100/1; v3 500, 3000, 10000.\n *\n * `eligible` is the sim's basket-generation gate, and it is stricter than\n * \"quotes\": PortfolioStrategy floors every buy at the ORACLE-implied amount\n * discounted by maxSlippageBps (`_buyFloor`, push-feed mode), so a pool whose\n * price sits further above the frozen feed than the sim's 5% tolerance\n * executes to a revert no matter how well it quotes. That is META today\n * (+8.3%). SLV is the other exclusion: it has NO v4 pool on any tier and only\n * quotes on v3, and this vnet's v3 position manager is known-corrupted\n * (state-injected token ids), so the v3 leg is unverified end to end. Both\n * stay in the map with their measured route so an explicit\n * `--tokens META --swap-routes v4:3000:60 --max-slippage 1000` still works;\n * they are just not handed to the sim by default.\n *\n * Re-quote before trusting any of this on a fresh fork — the vnet's pools are\n * traded by every sim run and the feeds are frozen at fork time.\n */\n\nimport type { Address } from \"viem\";\n\nexport interface ForkStock {\n /** Tokenized-stock ERC-20 on the fork (18-dec). */\n address: Address;\n /** Chainlink AggregatorV3 USD feed (8-dec) for the same stock. */\n feed: Address;\n /**\n * Swap-route spec in `--swap-routes` syntax (`v4:<fee>:<tickSpacing>` or\n * `v3:<fee>`), or null when no USDG pool quoted on any probed tier.\n */\n route: string | null;\n /** True when the only quoting pool is Uniswap v3 (no v4 pool on any tier). */\n v3Only?: boolean;\n /** Include in sim basket generation. False = keep out of default baskets. */\n eligible: boolean;\n /** Stock received for 100 USDG on the recorded route (human units). */\n quotedOut?: string;\n /** (pool-implied price / Chainlink feed − 1) in bps at the time of the quote. */\n feedDeviationBps?: number;\n /** Why a token is ineligible / unroutable, or anything the next re-quote should know. */\n note?: string;\n}\n\n/** Symbol order mirrors chains/9994663.json. */\nexport const ROBINHOOD_FORK_STOCKS = {\n AAPL: {\n address: \"0xaF3D76f1834A1d425780943C99Ea8A608f8a93f9\" as Address,\n feed: \"0x6B22A786bAa607d76728168703a39Ea9C99f2cD0\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.30994905\",\n feedDeviationBps: 252,\n },\n TSLA: {\n address: \"0x322F0929c4625eD5bAd873c95208D54E1c003b2d\" as Address,\n feed: \"0x4A1166a659A55625345e9515b32adECea5547C38\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.27501216\",\n feedDeviationBps: 265,\n },\n NVDA: {\n address: \"0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC\" as Address,\n feed: \"0x379EC4f7C378F34a1B47E4F3cbeBCbAC3E8E9F15\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.43142676\",\n feedDeviationBps: 199,\n },\n MSFT: {\n address: \"0xe93237C50D904957Cf27E7B1133b510C669c2e74\" as Address,\n feed: \"0x45C3C877C15E6BA2EBB19eA114Ea508d14C1Af2E\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.19882872\",\n feedDeviationBps: -18,\n },\n AMZN: {\n address: \"0x12f190a9F9d7D37a250758b26824B97CE941bF54\" as Address,\n feed: \"0xD5a1508ceD74c084eBf3cBe853e2C968fB2a651C\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.37998363\",\n feedDeviationBps: 264,\n },\n META: {\n address: \"0xc0D6457C16Cc70d6790Dd43521C899C87ce02f35\" as Address,\n feed: \"0x7C38C00C30BEe9378381E7B6135d7283356D71b1\" as Address,\n route: \"v4:3000:60\",\n eligible: false,\n quotedOut: \"0.16185932\",\n feedDeviationBps: 829,\n note:\n \"Quotes, but the pool sits 8.3% above the frozen META/USD feed (v3 agrees: +8.2%), \" +\n \"past the sim's 5% buy floor and near the contract's 10% ceiling. Excluded from \" +\n \"generated baskets until the pool or feed is re-based.\",\n },\n AMD: {\n address: \"0x86923f96303D656E4aa86D9d42D1e57ad2023fdC\" as Address,\n feed: \"0x943A29E7ae51A4798823ca9eEd2ed533B2A22C72\" as Address,\n // The fee-3000 pool does NOT exist — only the 10000/200 tier quotes. This\n // is the case that makes guessing a fee tier a bug.\n route: \"v4:10000:200\",\n eligible: true,\n quotedOut: \"0.20887416\",\n feedDeviationBps: 53,\n },\n SPY: {\n address: \"0x117cc2133c37B721F49dE2A7a74833232B3B4C0C\" as Address,\n feed: \"0x319724394D3A0e3669269846abE664Cd621f9f6A\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.12913164\",\n feedDeviationBps: 63,\n },\n QQQ: {\n address: \"0xD5f3879160bc7c32ebb4dC785F8a4F505888de68\" as Address,\n feed: \"0x80901d846d5D7B030F26B480776EE3b29374C2ae\" as Address,\n // A 10000/200 pool also exists but quoted +48.8% vs feed (near-empty) —\n // never route QQQ through it.\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.13873445\",\n feedDeviationBps: 23,\n },\n SLV: {\n address: \"0x411eFb0E7f985935DAec3D4C3ebaEa0d0AD7D89f\" as Address,\n feed: \"0x209b73908e92Ae021826eD79609845451Ecba2ce\" as Address,\n route: \"v3:500\",\n v3Only: true,\n eligible: false,\n quotedOut: \"1.66443692\",\n feedDeviationBps: -389,\n note:\n \"No v4 USDG pool on any probed tier; only Uniswap v3 quotes (500/3000/10000 all \" +\n \"do, 500 best). This vnet's v3 position manager is corrupted, so the v3 swap leg \" +\n \"is unverified end to end — excluded from generated baskets.\",\n },\n GOOGL: {\n address: \"0x2e0847E8910a9732eB3fb1bb4b70a580ADAD4FE3\" as Address,\n feed: \"0xF6f373a037c30F0e5010d854385cA89185AE638b\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.29346562\",\n feedDeviationBps: 11,\n },\n} as const satisfies Record<string, ForkStock>;\n\nexport type ForkStockSymbol = keyof typeof ROBINHOOD_FORK_STOCKS;\n\nexport const ROBINHOOD_FORK_STOCK_SYMBOLS = Object.keys(ROBINHOOD_FORK_STOCKS) as ForkStockSymbol[];\n\n/** Symbols the sim may put in a generated basket (routable AND inside the slippage floor). */\nexport function forkBasketSymbols(): ForkStockSymbol[] {\n return ROBINHOOD_FORK_STOCK_SYMBOLS.filter((s) => ROBINHOOD_FORK_STOCKS[s].eligible);\n}\n\n/**\n * Feed + route for a basket token, or undefined when the symbol is unknown,\n * unroutable, or gated out of basket generation. Callers own the error text.\n */\nexport function forkBasketMeta(symbol: string): { feed: Address; route: string } | undefined {\n const entry = (ROBINHOOD_FORK_STOCKS as Record<string, ForkStock>)[symbol.toUpperCase()];\n if (!entry || !entry.eligible || !entry.route) return undefined;\n return { feed: entry.feed, route: entry.route };\n}\n\n/** `{ SYM: address }` for the token registry. */\nexport function forkStockAddresses(): Record<ForkStockSymbol, Address> {\n return Object.fromEntries(\n ROBINHOOD_FORK_STOCK_SYMBOLS.map((s) => [s, ROBINHOOD_FORK_STOCKS[s].address]),\n ) as Record<ForkStockSymbol, Address>;\n}\n\n/** `{ SYM_USD_FEED: feed }` for the Chainlink registry (push-feed auto-resolve). */\nexport function forkStockFeeds(): Record<`${ForkStockSymbol}_USD_FEED`, Address> {\n return Object.fromEntries(\n ROBINHOOD_FORK_STOCK_SYMBOLS.map((s) => [`${s}_USD_FEED`, ROBINHOOD_FORK_STOCKS[s].feed]),\n ) as Record<`${ForkStockSymbol}_USD_FEED`, Address>;\n}\n","/**\n * Contract addresses by network.\n *\n * All exports are functions — they resolve at call time based on the\n * current network set via setNetwork(). This ensures --chain works\n * even when modules are imported before the flag is parsed.\n *\n * Current deployment target: Robinhood L2 testnet (chain 46630) only. Other\n * chains may be added back later; when they are, their address blocks + registry\n * entries re-enter here alongside the robinhood-testnet ones.\n *\n * Zero addresses = protocol not deployed on that chain. Strategies that\n * need them will fail at execution time with a clear allowlist error.\n */\n\nimport type { Address, Hex } from \"viem\";\nimport { type Network, getNetwork } from \"./network.js\";\nimport { overridesFor } from \"./address-overrides.js\";\nimport { forkStockAddresses, forkStockFeeds } from \"./fork-tokens.js\";\n\nconst ZERO: Address = \"0x0000000000000000000000000000000000000000\";\nconst ZERO_BYTES32 =\n \"0x0000000000000000000000000000000000000000000000000000000000000000\" as `0x${string}`;\n\n// ── Robinhood L2 Testnet (Arbitrum Orbit, chain 46630) ──\n// Synthra DEX for swaps. Stock tokens available.\n\nconst ROBINHOOD_TESTNET_TOKENS = {\n USDC: ZERO,\n // USDG (Robinhood-chain stablecoin, 6-dec). Zero on testnet (Synthra WETH-quoted);\n // real on the mainnet fork. Keyed so `--asset USDG` resolves + decimals=6.\n USDG: ZERO,\n // WETH resolves to Synthra's WETH9 (SYNTHRA_WETH): ALL stock DEX liquidity is\n // denominated in it (e.g. the TSLA fee-3000 pool holds ~37.8 WETH here vs\n // ~0.0003 in the canonical WETH pool). It is WETH9-style (payable deposit()),\n // so --use-eth wrapping works against it. Canonical WETH kept as WETH_CANONICAL\n // so the reference isn't lost.\n WETH: \"0x33e4191705c386532ba27cBF171Db86919200B94\" as Address,\n WETH_CANONICAL: \"0x7943e237c7F95DA44E0301572D358911207852Fa\" as Address,\n cbETH: ZERO,\n wstETH: ZERO,\n cbBTC: ZERO,\n DAI: ZERO,\n AERO: ZERO,\n TSLA: \"0xC9f9c86933092BbbfFF3CCb4b105A4A94bf3Bd4E\" as Address,\n AMZN: \"0x5884aD2f920c162CFBbACc88C9C51AA75eC09E02\" as Address,\n PLTR: \"0x1FBE1a0e43594b3455993B5dE5Fd0A7A266298d0\" as Address,\n NFLX: \"0x3b8262A63d25f0477c4DDE23F83cfe22Cb768C93\" as Address,\n AMD: \"0x71178BAc73cBeb415514eB542a8995b82669778d\" as Address,\n // Stocks the mainnet fork carries and the testnet does not (lib/fork-tokens.ts).\n // Keyed here as ZERO so the token-shape type covers both chains.\n AAPL: ZERO,\n NVDA: ZERO,\n MSFT: ZERO,\n META: ZERO,\n SPY: ZERO,\n QQQ: ZERO,\n SLV: ZERO,\n GOOGL: ZERO,\n} as const;\n\nconst ROBINHOOD_TESTNET_MOONWELL = {\n COMPTROLLER: ZERO,\n mUSDC: ZERO,\n mWETH: ZERO,\n mCbETH: ZERO,\n mWstETH: ZERO,\n mCbBTC: ZERO,\n mDAI: ZERO,\n mAERO: ZERO,\n} as const;\n\n// Synthra is Uniswap-V3-compatible; the deployed UniswapSwapAdapter is backed by\n// Synthra's router + a QuoterV2 shim (SYNTHRA_QUOTER_V2_SHIM). SWAP_ROUTER /\n// QUOTER_V2 mirror the Synthra addresses so a direct v3 quote path also resolves.\nconst ROBINHOOD_TESTNET_UNISWAP = {\n SWAP_ROUTER: \"0x3Ce954107b1A675826B33bF23060Dd655e3758fE\" as Address,\n QUOTER_V2: \"0xb06788F027268a9A06c3AD41a88559530D2E54b1\" as Address,\n SWAP_ADAPTER: \"0x4fc3492117cC3bbcE0b210D22a8DC244f9d86490\" as Address,\n} as const;\n\n// ── Synthra DEX (Robinhood L2 — Uniswap V3-compatible concentrated liquidity) ──\n\nconst ROBINHOOD_TESTNET_SYNTHRA = {\n ROUTER: \"0x3Ce954107b1A675826B33bF23060Dd655e3758fE\" as Address,\n QUOTER: \"0x231606c321A99DE81e28fE48B07a93F1ba49e713\" as Address,\n FACTORY: \"0x911b4000D3422F482F4062a913885f7b035382Df\" as Address,\n} as const;\n\n// ── Chainlink AggregatorV3 push feeds ──\n//\n// Data Streams is gone at v1: PortfolioStrategy binds an AggregatorV3 proxy\n// ADDRESS per allocation and there is no verifier proxy to configure.\n\nconst ROBINHOOD_TESTNET_CHAINLINK = {\n WSTETH_ETH_FEED: ZERO,\n // Tokenized-equity push feeds exist only on the mainnet fork. Keyed as ZERO\n // so the registry shape covers both chains and the fork's `<SYM>_USD_FEED`\n // auto-resolve (template-encoder.ts) has a slot.\n ...noneOf(forkStockFeeds()),\n} as const;\n\n// ── Robinhood portfolio-basket route + feed metadata ──\n//\n// Data-driven replacement for the hand-drifting \"known stock\" Set that used to\n// live in strategy-template.ts. Every entry is a VERIFIED-liquidity default\n// swap route for a basket token. Absence from this map means \"no verified\n// default route\" — the CLI fails fast and demands an explicit --swap-routes\n// rather than falling through to a v3 auto-detect that would be dead.\n//\n// `kind: \"v4-native\"` = a Uniswap v4 mode-3 multi-hop USDG → native ETH → stock,\n// consumed by portfolio-template.ts as\n// v4PathExtraData([{currency: ETH, ...native}, {currency: <token>, ...stock}]).\nexport interface RobinhoodStockRoute {\n kind: \"v4-native\";\n nativeFee: number;\n nativeTickSpacing: number;\n stockFee: number;\n stockTickSpacing: number;\n}\n\n// No verified default stock swap routes on the Robinhood testnet — the\n// machinery is retained (see portfolio-template.ts) but the map is empty, so\n// every basket token falls to the existing fail-fast route error until a\n// verified route is added.\n// LOCKSTEP: the app's quote-probe geometry (app/src/lib/price-quote.ts\n// V4_DIRECT_TIERS + via-native path) must stay consistent with any route added\n// here, or the dashboard displays a tier the strategy won't execute.\nexport const ROBINHOOD_STOCK_ROUTES: Record<string, RobinhoodStockRoute> = {};\n\nconst ROBINHOOD_TESTNET_INFRA = {\n MULTICALL3: \"0xcA11bde05977b3631167028862bE2a173976CA11\" as Address, // Deterministic, same everywhere\n} as const;\n\n// ── ENS / Durin ──\n\nconst ROBINHOOD_TESTNET_ENS = {\n L2_REGISTRAR: ZERO,\n L2_REGISTRY: ZERO,\n} as const;\n\n// ── ERC-8004 Agent Identity ──\n//\n// Zero on purpose, not \"pending a deploy\": no ERC-8004 registry exists on the\n// testnet or on the fork, and none should. Identity is a coordination-chain\n// concern — every identity op (mint / load / find / status) runs against 4663\n// via `withNetwork(COORDINATION_NETWORK, …)`, whatever chain the fund is on.\nconst ROBINHOOD_TESTNET_AGENT_REGISTRY = {\n IDENTITY_REGISTRY: ZERO,\n REPUTATION_REGISTRY: ZERO,\n} as const;\n\n// ── Sherwood Protocol (our deployed contracts) ──\n//\n// V2 redeploy (chain 46630): fresh factory/governor/vault-impl/executor plus a\n// full guardian layer (registry + sWOOD + WOOD fixture token) and the V2\n// live-NAV surface (PriceRouter, UniswapSwapAdapter via the Synthra QuoterV2\n// shim, Portfolio template, StrategyFactory). WOOD_TOKEN here is a testnet\n// fixture, not the mainnet OFT.\n//\n// GOVERNOR is the deploy-time bootstrap governor. Governors are per-vault since\n// PR #421 — resolve one at runtime via `factory.governorOf(vault)`\n// (lib/governor.ts `getGovernorOf`), never from this table.\n// Key parity with the SDK book (sdk/src/addresses.ts SherwoodDeployment) is\n// pinned by lib/address-parity.test.ts — add new keys to BOTH books.\nconst ROBINHOOD_TESTNET_SHERWOOD = {\n FACTORY: \"0xa91AA45AFF32f52b6357044B02a16EBA775feC0b\" as Address,\n GOVERNOR: ZERO, // zeroed since the post-#421 redeploy — always factory.governorOf(vault)\n GUARDIAN_REGISTRY: \"0xA400eFcfFc820C6f812203C58ee00423AeCC0903\" as Address,\n STAKED_WOOD: \"0x21A69A6c9814c0d339C57fDdafed3B283702a739\" as Address,\n WOOD_TOKEN: \"0xCCb4fB59cf40de1E23083037ee81Da1DD747D8d7\" as Address,\n STRATEGY_FACTORY: \"0xb683Bb8EEcBc2419BC3801df6FeA88f96657e670\" as Address,\n MERKL_DISTRIBUTOR: ZERO,\n // Guardian-era contracts from contracts/chains/46630.json (SHE-93).\n VAULT_IMPL: \"0xC57e12d6e2d8Ed49316F0b69c51893CcA44151F7\" as Address,\n BATCH_EXECUTOR_LIB: \"0xF3b8db5aa41c7Ce92478A0Fa9C55a6460533eb86\" as Address,\n GOVERNOR_BEACON: \"0x3D46Ec018cd5893b685b4dfdc3921A4Eb64E11d1\" as Address,\n PROTOCOL_CONFIG: \"0xC104Eb6a522d6718cA28F344B2373B29d57FF2E0\" as Address,\n PRICE_ROUTER: \"0xDd302ffcfA08071780eC1A2f12BccFB9ba6b6731\" as Address,\n TIER_REGISTRY: \"0x99b8068Dc0F6093466964D581f72d947e3e380DB\" as Address,\n // Not in chains/46630.json (econ-security stack not deployed there yet).\n EXPOSURE_LEDGER: ZERO,\n PROPOSER_BOND_ESCROW: ZERO,\n CHALLENGE_GAME: ZERO,\n TOKEN_COURT: ZERO,\n} as const;\n\n// ── Venice (VVV governance + sVVV staking + DIEM compute) ──\n\nconst ROBINHOOD_TESTNET_VENICE = {\n VVV: ZERO,\n STAKING: ZERO,\n DIEM: ZERO,\n} as const;\n\n// ── Aerodrome (Base ve(3,3) DEX) ──\n\nconst ROBINHOOD_TESTNET_AERODROME = {\n ROUTER: ZERO,\n FACTORY: ZERO,\n} as const;\n\n// ── Strategy Templates (ERC-1167 clonable singletons) ──\n// Populated after running script/DeployTemplates.s.sol\n\nconst ROBINHOOD_TESTNET_STRATEGY_TEMPLATES = {\n MOONWELL_SUPPLY: ZERO as Address,\n AERODROME_LP: ZERO as Address,\n VENICE_INFERENCE: ZERO as Address,\n WSTETH_MOONWELL: ZERO as Address,\n MAMO_YIELD: ZERO as Address,\n HYPERLIQUID_PERP: ZERO as Address,\n HYPERLIQUID_GRID: ZERO as Address,\n // V2 redeploy PORTFOLIO_TEMPLATE (chain 46630).\n PORTFOLIO: \"0x67420Cc504d70a42Adfd8867d878afe0978C7d10\" as Address,\n} as const;\n\n// ── EAS (Ethereum Attestation Service) ──\n\nconst ROBINHOOD_TESTNET_EAS = {\n EAS: ZERO,\n SCHEMA_REGISTRY: ZERO,\n} as const;\n\n// EAS on Robinhood Chain mainnet (4663). Deployed by Sherwood — EAS is not a\n// predeploy on an Arbitrum Orbit chain. sherwoodagent/sherwood-protocol#278.\nconst ROBINHOOD_MAINNET_EAS = {\n EAS: \"0x7d70441Bb10AcE5d9771dc0b6205D89ddf63205B\" as Address,\n SCHEMA_REGISTRY: \"0xdd7521Ba10773e556Defa6D6c133cB2F663b5c26\" as Address,\n} as const;\n\n/**\n * Schema UIDs are chain-INDEPENDENT: uid = keccak256(schema, resolver,\n * revocable) carries no chainId. With resolver = address(0) these are the same\n * UIDs already registered on Base, and re-registering the same definitions on\n * any chain reproduces them. Verified against Base's live SchemaRegistry.\n */\nconst SHERWOOD_EAS_SCHEMAS = {\n SYNDICATE_JOIN_REQUEST: \"0x1e7ce17b16233977ba913b156033e98f52029f4bee273a4abefe6c15ce11d5ef\" as Hex,\n AGENT_APPROVED: \"0x1013f7b38f433b2a93fc5ac162482813081c64edd67cea9b5a90698531ddb607\" as Hex,\n X402_RESEARCH: \"0x86c67f0a59acb3093ecbeb6c4d1d4352e4a48143672e92ef9dd2fdfc8a9ca708\" as Hex,\n VENICE_PROVISION: \"0x76d4d6baa72307826cd2fd4ce069bb42ee54cdda6ed6ab208c8d233c893fb7f1\" as Hex,\n VENICE_INFERENCE: \"0xf9b4e530f3016c19439b67372a1c213c9339857627fb817032614b97433a2a14\" as Hex,\n TRADE_EXECUTED: \"0x06bb488363a468f7f857ddc8cfffe918d048b8746a0d59eca9cd7f58dbdb4af6\" as Hex,\n} as const;\n\n/**\n * Every non-EAS address book, for the coordination chain. Sherwood core is not\n * deployed on 4663, so these are all zero BY CONSTRUCTION rather than by\n * omission — mapping them to the testnet book would silently hand out 46630\n * addresses during the brief `withNetwork` window an EAS write opens.\n */\nfunction noneOf<T extends Record<string, unknown>>(shape: T): T {\n return Object.fromEntries(Object.keys(shape).map((k) => [k, ZERO])) as T;\n}\n\n// ── EAS Schema UIDs (populated after running scripts/register-eas-schemas.ts) ──\n\nconst ROBINHOOD_TESTNET_EAS_SCHEMAS = {\n SYNDICATE_JOIN_REQUEST: ZERO_BYTES32,\n AGENT_APPROVED: ZERO_BYTES32,\n X402_RESEARCH: ZERO_BYTES32,\n VENICE_PROVISION: ZERO_BYTES32,\n VENICE_INFERENCE: ZERO_BYTES32,\n TRADE_EXECUTED: ZERO_BYTES32,\n} as const;\n\n// ── Robinhood Chain mainnet fork (Tenderly vnet, chain 9994663) ──\n//\n// Fork of Robinhood *mainnet*: USDG stablecoin (6-dec), official Uniswap v3+v4,\n// Chainlink PUSH feeds. Core addresses\n// come from sherwood-protocol/chains/9994663.json (fresh deploy). All 11\n// tokenized stocks + their feeds come from lib/fork-tokens.ts (one table, with\n// the measured swap route per token); the feeds are keyed here as\n// `<SYM>_USD_FEED` so a symbol basket auto-resolves its push feed on the fork.\n// Swap routes still need an explicit --swap-routes (ROBINHOOD_STOCK_ROUTES is\n// a different shape and lockstepped with the app's quote probe).\n\nconst ROBINHOOD_FORK_TOKENS: typeof ROBINHOOD_TESTNET_TOKENS = {\n USDC: ZERO,\n USDG: \"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168\" as Address,\n WETH: \"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73\" as Address,\n WETH_CANONICAL: \"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73\" as Address,\n cbETH: ZERO,\n wstETH: ZERO,\n cbBTC: ZERO,\n DAI: ZERO,\n AERO: ZERO,\n PLTR: ZERO,\n NFLX: ZERO,\n ...forkStockAddresses(),\n};\n\nconst ROBINHOOD_FORK_UNISWAP: typeof ROBINHOOD_TESTNET_UNISWAP = {\n SWAP_ROUTER: \"0xcaf681a66d020601342297493863e78c959e5cb2\" as Address,\n QUOTER_V2: \"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7\" as Address,\n SWAP_ADAPTER: \"0x54E6A7af53143556973493fDeC9d7837A77c67eF\" as Address,\n};\n\n// `<SYM>_USD_FEED` for all 11 stocks so `strategy propose portfolio --tokens\n// AAPL,…` resolves feeds without --feeds (template-encoder.ts auto-resolve).\nconst ROBINHOOD_FORK_CHAINLINK: typeof ROBINHOOD_TESTNET_CHAINLINK = {\n WSTETH_ETH_FEED: ZERO,\n ...forkStockFeeds(),\n};\n\nconst ROBINHOOD_FORK_SHERWOOD: typeof ROBINHOOD_TESTNET_SHERWOOD = {\n FACTORY: \"0x619af1488F32B4797f6faDa3C3a8De72a5B693E0\" as Address,\n GOVERNOR: ZERO, // per-vault — always factory.governorOf(vault)\n GUARDIAN_REGISTRY: \"0xD8F9E7446E6d6c02198AAaF674A0C5e3d5D1BF72\" as Address,\n STAKED_WOOD: \"0xdDf2B4C52B9575e0e6D03a3A57D75D06a4a9e203\" as Address,\n WOOD_TOKEN: \"0xF8BC08092C06dB6148114DCf82AF881F1085f92b\" as Address,\n STRATEGY_FACTORY: \"0xb06788F027268a9A06c3AD41a88559530D2E54b1\" as Address,\n MERKL_DISTRIBUTOR: ZERO,\n // Guardian-era contracts from sherwood-protocol/chains/9994663.json (SHE-93).\n VAULT_IMPL: \"0xdaB4707c9997a84e931FE98F4688adaFc70b6B95\" as Address,\n BATCH_EXECUTOR_LIB: \"0x899FC2Cac572F64A233344115b488E71E0044f34\" as Address,\n GOVERNOR_BEACON: \"0x3CF45eFE9fBDdd6cB749384Bf5c1bA5Ec96af05d\" as Address,\n PROTOCOL_CONFIG: \"0x8aDb5810B5bF8B9149BE3Ca45Cb441818a9679bB\" as Address,\n // Not in chains/9994663.json (no PriceRouter on the fork).\n PRICE_ROUTER: ZERO,\n TIER_REGISTRY: \"0x4614f058920941A0a9a852e62485fbDE692D75E1\" as Address,\n EXPOSURE_LEDGER: \"0x99D789E7C8E65dB5597dCa692F082B47BE30AB33\" as Address,\n PROPOSER_BOND_ESCROW: \"0x7d25058c891d3AC5C8bc8Da6aA937DFeE648B5cF\" as Address,\n CHALLENGE_GAME: \"0x7046FececcA6c0f5E66Cc998099593ae71A1bbee\" as Address,\n TOKEN_COURT: \"0xC30bA62727be65fd867385Ce27Ff7C78bd66A897\" as Address,\n};\n\nconst ROBINHOOD_FORK_STRATEGY_TEMPLATES: typeof ROBINHOOD_TESTNET_STRATEGY_TEMPLATES = {\n MOONWELL_SUPPLY: ZERO,\n AERODROME_LP: ZERO,\n VENICE_INFERENCE: ZERO,\n WSTETH_MOONWELL: ZERO,\n MAMO_YIELD: ZERO,\n HYPERLIQUID_PERP: ZERO,\n HYPERLIQUID_GRID: ZERO,\n PORTFOLIO: \"0xAA5872009c527cCb80343E41C52840CEdb095eb0\" as Address,\n};\n\n// ── Registries (map-based lookup) ──\n\nconst TOKEN_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_TOKENS> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_TOKENS,\n \"robinhood-fork\": ROBINHOOD_FORK_TOKENS,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_TOKENS), // coordination chain — no Sherwood contracts\n};\n\nconst MOONWELL_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_MOONWELL> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_MOONWELL,\n \"robinhood-fork\": ROBINHOOD_TESTNET_MOONWELL,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_MOONWELL), // coordination chain — no Sherwood contracts\n};\n\nconst UNISWAP_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_UNISWAP> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_UNISWAP,\n \"robinhood-fork\": ROBINHOOD_FORK_UNISWAP,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_UNISWAP), // coordination chain — no Sherwood contracts\n};\n\nconst INFRA_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_INFRA> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_INFRA,\n \"robinhood-fork\": ROBINHOOD_TESTNET_INFRA,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_INFRA), // coordination chain — no Sherwood contracts\n};\n\nconst ENS_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_ENS> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_ENS,\n \"robinhood-fork\": ROBINHOOD_TESTNET_ENS,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_ENS), // coordination chain — no Sherwood contracts\n};\n\n// Canonical ERC-8004 registries ARE live on 4663 (verified on-chain) — the\n// same 0x8004… addresses as Base. Like EAS, identity coordinates there:\n// mint/load/find/status all run against the coordination chain regardless of\n// the fund chain, which is why the testnet/fork entries above stay zero.\nconst ROBINHOOD_MAINNET_AGENT_REGISTRY = {\n IDENTITY_REGISTRY: \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\" as Address,\n REPUTATION_REGISTRY: \"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63\" as Address,\n} as const;\n\nconst AGENT_REGISTRY_MAP: Record<Network, typeof ROBINHOOD_TESTNET_AGENT_REGISTRY> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_AGENT_REGISTRY,\n \"robinhood-fork\": ROBINHOOD_TESTNET_AGENT_REGISTRY,\n \"robinhood-mainnet\": ROBINHOOD_MAINNET_AGENT_REGISTRY,\n};\n\nconst SHERWOOD_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_SHERWOOD> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_SHERWOOD,\n \"robinhood-fork\": ROBINHOOD_FORK_SHERWOOD,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_SHERWOOD), // coordination chain — no Sherwood contracts\n};\n\nconst VENICE_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_VENICE> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_VENICE,\n \"robinhood-fork\": ROBINHOOD_TESTNET_VENICE,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_VENICE), // coordination chain — no Sherwood contracts\n};\n\nconst AERODROME_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_AERODROME> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_AERODROME,\n \"robinhood-fork\": ROBINHOOD_TESTNET_AERODROME,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_AERODROME), // coordination chain — no Sherwood contracts\n};\n\nconst STRATEGY_TEMPLATE_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_STRATEGY_TEMPLATES> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_STRATEGY_TEMPLATES,\n \"robinhood-fork\": ROBINHOOD_FORK_STRATEGY_TEMPLATES,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_STRATEGY_TEMPLATES), // coordination chain — no Sherwood contracts\n};\n\nconst SYNTHRA_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_SYNTHRA> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_SYNTHRA,\n \"robinhood-fork\": ROBINHOOD_TESTNET_SYNTHRA, // unused on the fork (Uniswap, not Synthra)\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_SYNTHRA), // coordination chain — no Sherwood contracts\n};\n\nconst CHAINLINK_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_CHAINLINK> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_CHAINLINK,\n \"robinhood-fork\": ROBINHOOD_FORK_CHAINLINK,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_CHAINLINK), // coordination chain — no Sherwood contracts\n};\n\n// Attestations live on chain 4663 no matter which chain the fund is on,\n// so every network resolves to the same book (spec §5.1).\nconst EAS_CONTRACT_REGISTRY: Record<Network, typeof ROBINHOOD_MAINNET_EAS> = {\n \"robinhood-testnet\": ROBINHOOD_MAINNET_EAS,\n \"robinhood-fork\": ROBINHOOD_MAINNET_EAS,\n \"robinhood-mainnet\": ROBINHOOD_MAINNET_EAS,\n};\n\n// Attestations live on chain 4663 no matter which chain the fund is on,\n// so every network resolves to the same book (spec §5.1).\nconst EAS_SCHEMA_REGISTRY: Record<Network, typeof SHERWOOD_EAS_SCHEMAS> = {\n \"robinhood-testnet\": SHERWOOD_EAS_SCHEMAS,\n \"robinhood-fork\": SHERWOOD_EAS_SCHEMAS,\n \"robinhood-mainnet\": SHERWOOD_EAS_SCHEMAS,\n};\n\n// ── Exports (functions, resolved at call time) ──\n\nexport function TOKENS() {\n return TOKEN_REGISTRY[getNetwork()];\n}\n\nexport function MOONWELL() {\n return MOONWELL_REGISTRY[getNetwork()];\n}\n\nexport function UNISWAP() {\n return { ...UNISWAP_REGISTRY[getNetwork()], ...overridesFor(\"UNISWAP\") };\n}\n\nexport function INFRA() {\n return INFRA_REGISTRY[getNetwork()];\n}\n\nexport function ENS() {\n return { ...ENS_REGISTRY[getNetwork()], ...overridesFor(\"ENS\") };\n}\n\nexport function AGENT_REGISTRY() {\n return AGENT_REGISTRY_MAP[getNetwork()];\n}\n\nexport function VENICE() {\n return VENICE_REGISTRY[getNetwork()];\n}\n\nexport function SHERWOOD() {\n return { ...SHERWOOD_REGISTRY[getNetwork()], ...overridesFor(\"SHERWOOD\") };\n}\n\nexport function AERODROME() {\n return AERODROME_REGISTRY[getNetwork()];\n}\n\nexport function STRATEGY_TEMPLATES() {\n return {\n ...STRATEGY_TEMPLATE_REGISTRY[getNetwork()],\n ...overridesFor(\"STRATEGY_TEMPLATES\"),\n };\n}\n\nexport function EAS_CONTRACTS() {\n return EAS_CONTRACT_REGISTRY[getNetwork()];\n}\n\nexport function EAS_SCHEMAS() {\n return EAS_SCHEMA_REGISTRY[getNetwork()];\n}\n\nexport function SYNTHRA() {\n return SYNTHRA_REGISTRY[getNetwork()];\n}\n\nexport function CHAINLINK() {\n return CHAINLINK_REGISTRY[getNetwork()];\n}\n"],"mappings":";;;;;AASA,SAAS,oBAAoB;AAgB7B,IAAM,gBAA8D;AAAA,EAClE,UAAU;AAAA,IACR,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,mBAAmB;AAAA,IACnB,aAAa;AAAA,IACb,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,kBAAkB;AAAA,EACpB;AAAA,EACA,oBAAoB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,0BAA0B;AAAA,IAC1B,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,IACpB,2BAA2B;AAAA,IAC3B,2BAA2B;AAAA,EAC7B;AAAA,EACA,KAAK;AAAA,IACH,cAAc;AAAA,IACd,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,sBAAsB;AAAA,EACxB;AACF;AAEA,IAAI;AAEJ,SAAS,WAA2C;AAClD,MAAI,WAAW,OAAW,QAAO;AACjC,QAAM,OAAO,QAAQ,IAAI;AACzB,MAAI,CAAC,MAAM;AACT,aAAS;AACT,WAAO;AAAA,EACT;AACA,MAAI;AACJ,MAAI;AACF,UAAM,KAAK,MAAM,aAAa,MAAM,MAAM,CAAC;AAAA,EAC7C,SAAS,KAAK;AACZ,UAAM,IAAI;AAAA,MACR,8BAA8B,IAAI,qBAAqB,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,IACzG;AAAA,EACF;AACA,QAAM,MAA+B,CAAC;AACtC,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,GAAG,GAAG;AACxC,QAAI,OAAO,MAAM,Y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kB,WAAW,CAAC,GAAG,GAAG,aAAa,UAAU,EAAE;AAC3E;AAEO,SAAS,YAAY;AAC1B,SAAO,mBAAmB,WAAW,CAAC;AACxC;AAEO,SAAS,qBAAqB;AACnC,SAAO;AAAA,IACL,GAAG,2BAA2B,WAAW,CAAC;AAAA,IAC1C,GAAG,aAAa,oBAAoB;AAAA,EACtC;AACF;AAEO,SAAS,gBAAgB;AAC9B,SAAO,sBAAsB,WAAW,CAAC;AAC3C;AAEO,SAAS,cAAc;AAC5B,SAAO,oBAAoB,WAAW,CAAC;AACzC;AAEO,SAAS,UAAU;AACxB,SAAO,iBAAiB,WAAW,CAAC;AACtC;AAEO,SAAS,YAAY;AAC1B,SAAO,mBAAmB,WAAW,CAAC;AACxC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/address-overrides.ts","../src/lib/fork-tokens.ts","../src/lib/addresses.ts"],"sourcesContent":["/**\n * SIM_ADDRESSES_FILE override layer (spec G1).\n *\n * Points the CLI at a vnet deployment: a chains/{chainId}.json-shaped file\n * (CAPS_SNAKE_CASE keys, written by contracts deploy scripts) is mapped onto\n * the CLI's per-registry key names and merged over the base network registry\n * at call time. Only 0x-string values are considered. Fail-closed: a set-but-\n * unreadable file throws rather than silently using mainnet addresses.\n */\nimport { readFileSync } from \"node:fs\";\nimport type { Address } from \"viem\";\n\ntype RegistryName = \"SHERWOOD\" | \"STRATEGY_TEMPLATES\" | \"ENS\" | \"UNISWAP\";\n\n// chains-json key → CLI registry key, grouped by target registry.\n// Extend when deploy scripts gain keys the CLI reads (Task 1 Step 2).\n//\n// STRATEGY_TEMPLATES note (Task 1 Step 2 finding): the deploy scripts\n// (DeployTemplates.s.sol / DeployStrategyFactory.s.sol) write chains.json\n// keys with a `_TEMPLATE` suffix (e.g. `MOONWELL_SUPPLY_TEMPLATE`), but the\n// CLI-side STRATEGY_TEMPLATES() registry (cli/src/lib/addresses.ts\n// `BASE_STRATEGY_TEMPLATES`) and its consumers (e.g.\n// cli/src/commands/strategy-template.ts `addressKey: \"MOONWELL_SUPPLY\"`) key\n// off the UNSUFFIXED name. The map below strips the suffix so overrides\n// actually reach the keys the CLI reads.\nconst CHAINS_TO_CLI: Record<RegistryName, Record<string, string>> = {\n SHERWOOD: {\n SYNDICATE_FACTORY: \"FACTORY\",\n SYNDICATE_GOVERNOR: \"GOVERNOR\",\n GUARDIAN_REGISTRY: \"GUARDIAN_REGISTRY\",\n STAKED_WOOD: \"STAKED_WOOD\",\n WOOD: \"WOOD_TOKEN\",\n WOOD_TOKEN: \"WOOD_TOKEN\",\n STRATEGY_FACTORY: \"STRATEGY_FACTORY\",\n },\n STRATEGY_TEMPLATES: {\n MOONWELL_SUPPLY_TEMPLATE: \"MOONWELL_SUPPLY\",\n AERODROME_LP_TEMPLATE: \"AERODROME_LP\",\n VENICE_INFERENCE_TEMPLATE: \"VENICE_INFERENCE\",\n WSTETH_MOONWELL_TEMPLATE: \"WSTETH_MOONWELL\",\n MAMO_YIELD_TEMPLATE: \"MAMO_YIELD\",\n PORTFOLIO_TEMPLATE: \"PORTFOLIO\",\n HYPERLIQUID_PERP_TEMPLATE: \"HYPERLIQUID_PERP\",\n HYPERLIQUID_GRID_TEMPLATE: \"HYPERLIQUID_GRID\",\n },\n ENS: {\n L2_REGISTRAR: \"L2_REGISTRAR\",\n L2_REGISTRY: \"L2_REGISTRY\",\n },\n UNISWAP: {\n UNISWAP_SWAP_ADAPTER: \"SWAP_ADAPTER\",\n },\n};\n\nlet cached: Record<string, Address> | null | undefined;\n\nfunction loadFile(): Record<string, Address> | null {\n if (cached !== undefined) return cached;\n const file = process.env.SIM_ADDRESSES_FILE;\n if (!file) {\n cached = null;\n return cached;\n }\n let raw: Record<string, unknown>;\n try {\n raw = JSON.parse(readFileSync(file, \"utf8\")) as Record<string, unknown>;\n } catch (err) {\n throw new Error(\n `SIM_ADDRESSES_FILE is set (${file}) but unreadable: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n const out: Record<string, Address> = {};\n for (const [k, v] of Object.entries(raw)) {\n if (typeof v === \"string\" && v.startsWith(\"0x\")) out[k] = v as Address;\n }\n cached = out;\n return cached;\n}\n\n/** Mapped overrides for one CLI registry; {} when SIM_ADDRESSES_FILE unset. */\nexport function overridesFor(registry: RegistryName): Record<string, Address> {\n const file = loadFile();\n if (!file) return {};\n const map = CHAINS_TO_CLI[registry];\n const out: Record<string, Address> = {};\n for (const [chainsKey, cliKey] of Object.entries(map)) {\n if (file[chainsKey]) out[cliKey] = file[chainsKey];\n }\n return out;\n}\n\nexport function __resetOverridesCacheForTests(): void {\n cached = undefined;\n}\n","/**\n * Robinhood mainnet fork (Tenderly vnet, chain 9994663) — tokenized-stock map.\n *\n * ONE table for every stock the fork address book carries\n * (sherwood-protocol/chains/9994663.json): token address, its Chainlink USD\n * push feed, and the swap route the fork's Uniswap deployment ACTUALLY quotes\n * for USDG -> stock. `addresses.ts` derives `ROBINHOOD_FORK_TOKENS` and the\n * fork's `<SYM>_USD_FEED` registry from here; the sim's basket builder\n * (`simulation/proposal-specs.ts`) reads feed + route from here.\n *\n * THE ROUTES ARE MEASURED, NOT GUESSED. Every entry below was quoted\n * read-only against the fork's V4Quoter (0x8dc178ef…) and, where v4 had no\n * pool, the v3 QuoterV2 (0x33e885ed…), at 100 USDG on 2026-09-05 (vnet block\n * 21,179,183), and cross-checked against the token's own Chainlink feed. The\n * per-entry `quotedOut` / `feedDeviationBps` fields are that measurement.\n * Tiers probed: v4 3000/60, 10000/200, 500/10, 100/1; v3 500, 3000, 10000.\n *\n * `eligible` is the sim's basket-generation gate, and it is stricter than\n * \"quotes\": PortfolioStrategy floors every buy at the ORACLE-implied amount\n * discounted by maxSlippageBps (`_buyFloor`, push-feed mode), so a pool whose\n * price sits further above the frozen feed than the sim's 5% tolerance\n * executes to a revert no matter how well it quotes. That is META today\n * (+8.3%). SLV is the other exclusion: it has NO v4 pool on any tier and only\n * quotes on v3, and this vnet's v3 position manager is known-corrupted\n * (state-injected token ids), so the v3 leg is unverified end to end. Both\n * stay in the map with their measured route so an explicit\n * `--tokens META --swap-routes v4:3000:60 --max-slippage 1000` still works;\n * they are just not handed to the sim by default.\n *\n * Re-quote before trusting any of this on a fresh fork — the vnet's pools are\n * traded by every sim run and the feeds are frozen at fork time.\n */\n\nimport type { Address } from \"viem\";\n\nexport interface ForkStock {\n /** Tokenized-stock ERC-20 on the fork (18-dec). */\n address: Address;\n /** Chainlink AggregatorV3 USD feed (8-dec) for the same stock. */\n feed: Address;\n /**\n * Swap-route spec in `--swap-routes` syntax (`v4:<fee>:<tickSpacing>` or\n * `v3:<fee>`), or null when no USDG pool quoted on any probed tier.\n */\n route: string | null;\n /** True when the only quoting pool is Uniswap v3 (no v4 pool on any tier). */\n v3Only?: boolean;\n /** Include in sim basket generation. False = keep out of default baskets. */\n eligible: boolean;\n /** Stock received for 100 USDG on the recorded route (human units). */\n quotedOut?: string;\n /** (pool-implied price / Chainlink feed − 1) in bps at the time of the quote. */\n feedDeviationBps?: number;\n /** Why a token is ineligible / unroutable, or anything the next re-quote should know. */\n note?: string;\n}\n\n/** Symbol order mirrors chains/9994663.json. */\nexport const ROBINHOOD_FORK_STOCKS = {\n AAPL: {\n address: \"0xaF3D76f1834A1d425780943C99Ea8A608f8a93f9\" as Address,\n feed: \"0x6B22A786bAa607d76728168703a39Ea9C99f2cD0\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.30994905\",\n feedDeviationBps: 252,\n },\n TSLA: {\n address: \"0x322F0929c4625eD5bAd873c95208D54E1c003b2d\" as Address,\n feed: \"0x4A1166a659A55625345e9515b32adECea5547C38\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.27501216\",\n feedDeviationBps: 265,\n },\n NVDA: {\n address: \"0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC\" as Address,\n feed: \"0x379EC4f7C378F34a1B47E4F3cbeBCbAC3E8E9F15\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.43142676\",\n feedDeviationBps: 199,\n },\n MSFT: {\n address: \"0xe93237C50D904957Cf27E7B1133b510C669c2e74\" as Address,\n feed: \"0x45C3C877C15E6BA2EBB19eA114Ea508d14C1Af2E\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.19882872\",\n feedDeviationBps: -18,\n },\n AMZN: {\n address: \"0x12f190a9F9d7D37a250758b26824B97CE941bF54\" as Address,\n feed: \"0xD5a1508ceD74c084eBf3cBe853e2C968fB2a651C\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.37998363\",\n feedDeviationBps: 264,\n },\n META: {\n address: \"0xc0D6457C16Cc70d6790Dd43521C899C87ce02f35\" as Address,\n feed: \"0x7C38C00C30BEe9378381E7B6135d7283356D71b1\" as Address,\n route: \"v4:3000:60\",\n eligible: false,\n quotedOut: \"0.16185932\",\n feedDeviationBps: 829,\n note:\n \"Quotes, but the pool sits 8.3% above the frozen META/USD feed (v3 agrees: +8.2%), \" +\n \"past the sim's 5% buy floor and near the contract's 10% ceiling. Excluded from \" +\n \"generated baskets until the pool or feed is re-based.\",\n },\n AMD: {\n address: \"0x86923f96303D656E4aa86D9d42D1e57ad2023fdC\" as Address,\n feed: \"0x943A29E7ae51A4798823ca9eEd2ed533B2A22C72\" as Address,\n // The fee-3000 pool does NOT exist — only the 10000/200 tier quotes. This\n // is the case that makes guessing a fee tier a bug.\n route: \"v4:10000:200\",\n eligible: true,\n quotedOut: \"0.20887416\",\n feedDeviationBps: 53,\n },\n SPY: {\n address: \"0x117cc2133c37B721F49dE2A7a74833232B3B4C0C\" as Address,\n feed: \"0x319724394D3A0e3669269846abE664Cd621f9f6A\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.12913164\",\n feedDeviationBps: 63,\n },\n QQQ: {\n address: \"0xD5f3879160bc7c32ebb4dC785F8a4F505888de68\" as Address,\n feed: \"0x80901d846d5D7B030F26B480776EE3b29374C2ae\" as Address,\n // A 10000/200 pool also exists but quoted +48.8% vs feed (near-empty) —\n // never route QQQ through it.\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.13873445\",\n feedDeviationBps: 23,\n },\n SLV: {\n address: \"0x411eFb0E7f985935DAec3D4C3ebaEa0d0AD7D89f\" as Address,\n feed: \"0x209b73908e92Ae021826eD79609845451Ecba2ce\" as Address,\n route: \"v3:500\",\n v3Only: true,\n eligible: false,\n quotedOut: \"1.66443692\",\n feedDeviationBps: -389,\n note:\n \"No v4 USDG pool on any probed tier; only Uniswap v3 quotes (500/3000/10000 all \" +\n \"do, 500 best). This vnet's v3 position manager is corrupted, so the v3 swap leg \" +\n \"is unverified end to end — excluded from generated baskets.\",\n },\n GOOGL: {\n address: \"0x2e0847E8910a9732eB3fb1bb4b70a580ADAD4FE3\" as Address,\n feed: \"0xF6f373a037c30F0e5010d854385cA89185AE638b\" as Address,\n route: \"v4:3000:60\",\n eligible: true,\n quotedOut: \"0.29346562\",\n feedDeviationBps: 11,\n },\n} as const satisfies Record<string, ForkStock>;\n\nexport type ForkStockSymbol = keyof typeof ROBINHOOD_FORK_STOCKS;\n\nexport const ROBINHOOD_FORK_STOCK_SYMBOLS = Object.keys(ROBINHOOD_FORK_STOCKS) as ForkStockSymbol[];\n\n/** Symbols the sim may put in a generated basket (routable AND inside the slippage floor). */\nexport function forkBasketSymbols(): ForkStockSymbol[] {\n return ROBINHOOD_FORK_STOCK_SYMBOLS.filter((s) => ROBINHOOD_FORK_STOCKS[s].eligible);\n}\n\n/**\n * Feed + route for a basket token, or undefined when the symbol is unknown,\n * unroutable, or gated out of basket generation. Callers own the error text.\n */\nexport function forkBasketMeta(symbol: string): { feed: Address; route: string } | undefined {\n const entry = (ROBINHOOD_FORK_STOCKS as Record<string, ForkStock>)[symbol.toUpperCase()];\n if (!entry || !entry.eligible || !entry.route) return undefined;\n return { feed: entry.feed, route: entry.route };\n}\n\n/** `{ SYM: address }` for the token registry. */\nexport function forkStockAddresses(): Record<ForkStockSymbol, Address> {\n return Object.fromEntries(\n ROBINHOOD_FORK_STOCK_SYMBOLS.map((s) => [s, ROBINHOOD_FORK_STOCKS[s].address]),\n ) as Record<ForkStockSymbol, Address>;\n}\n\n/** `{ SYM_USD_FEED: feed }` for the Chainlink registry (push-feed auto-resolve). */\nexport function forkStockFeeds(): Record<`${ForkStockSymbol}_USD_FEED`, Address> {\n return Object.fromEntries(\n ROBINHOOD_FORK_STOCK_SYMBOLS.map((s) => [`${s}_USD_FEED`, ROBINHOOD_FORK_STOCKS[s].feed]),\n ) as Record<`${ForkStockSymbol}_USD_FEED`, Address>;\n}\n","/**\n * Contract addresses by network.\n *\n * All exports are functions — they resolve at call time based on the\n * current network set via setNetwork(). This ensures --chain works\n * even when modules are imported before the flag is parsed.\n *\n * Current deployment target: Robinhood L2 testnet (chain 46630) only. Other\n * chains may be added back later; when they are, their address blocks + registry\n * entries re-enter here alongside the robinhood-testnet ones.\n *\n * Zero addresses = protocol not deployed on that chain. Strategies that\n * need them will fail at execution time with a clear allowlist error.\n */\n\nimport type { Address, Hex } from \"viem\";\nimport { type Network, getNetwork } from \"./network.js\";\nimport { overridesFor } from \"./address-overrides.js\";\nimport { forkStockAddresses, forkStockFeeds } from \"./fork-tokens.js\";\n\nconst ZERO: Address = \"0x0000000000000000000000000000000000000000\";\nconst ZERO_BYTES32 =\n \"0x0000000000000000000000000000000000000000000000000000000000000000\" as `0x${string}`;\n\n// ── Robinhood L2 Testnet (Arbitrum Orbit, chain 46630) ──\n// Synthra DEX for swaps. Stock tokens available.\n\nconst ROBINHOOD_TESTNET_TOKENS = {\n USDC: ZERO,\n // USDG (Robinhood-chain stablecoin, 6-dec). Zero on testnet (Synthra WETH-quoted);\n // real on the mainnet fork. Keyed so `--asset USDG` resolves + decimals=6.\n USDG: ZERO,\n // WETH resolves to Synthra's WETH9 (SYNTHRA_WETH): ALL stock DEX liquidity is\n // denominated in it (e.g. the TSLA fee-3000 pool holds ~37.8 WETH here vs\n // ~0.0003 in the canonical WETH pool). It is WETH9-style (payable deposit()),\n // so --use-eth wrapping works against it. Canonical WETH kept as WETH_CANONICAL\n // so the reference isn't lost.\n WETH: \"0x33e4191705c386532ba27cBF171Db86919200B94\" as Address,\n WETH_CANONICAL: \"0x7943e237c7F95DA44E0301572D358911207852Fa\" as Address,\n cbETH: ZERO,\n wstETH: ZERO,\n cbBTC: ZERO,\n DAI: ZERO,\n AERO: ZERO,\n TSLA: \"0xC9f9c86933092BbbfFF3CCb4b105A4A94bf3Bd4E\" as Address,\n AMZN: \"0x5884aD2f920c162CFBbACc88C9C51AA75eC09E02\" as Address,\n PLTR: \"0x1FBE1a0e43594b3455993B5dE5Fd0A7A266298d0\" as Address,\n NFLX: \"0x3b8262A63d25f0477c4DDE23F83cfe22Cb768C93\" as Address,\n AMD: \"0x71178BAc73cBeb415514eB542a8995b82669778d\" as Address,\n // Stocks the mainnet fork carries and the testnet does not (lib/fork-tokens.ts).\n // Keyed here as ZERO so the token-shape type covers both chains.\n AAPL: ZERO,\n NVDA: ZERO,\n MSFT: ZERO,\n META: ZERO,\n SPY: ZERO,\n QQQ: ZERO,\n SLV: ZERO,\n GOOGL: ZERO,\n} as const;\n\nconst ROBINHOOD_TESTNET_MOONWELL = {\n COMPTROLLER: ZERO,\n mUSDC: ZERO,\n mWETH: ZERO,\n mCbETH: ZERO,\n mWstETH: ZERO,\n mCbBTC: ZERO,\n mDAI: ZERO,\n mAERO: ZERO,\n} as const;\n\n// Synthra is Uniswap-V3-compatible; the deployed UniswapSwapAdapter is backed by\n// Synthra's router + a QuoterV2 shim (SYNTHRA_QUOTER_V2_SHIM). SWAP_ROUTER /\n// QUOTER_V2 mirror the Synthra addresses so a direct v3 quote path also resolves.\nconst ROBINHOOD_TESTNET_UNISWAP = {\n SWAP_ROUTER: \"0x3Ce954107b1A675826B33bF23060Dd655e3758fE\" as Address,\n QUOTER_V2: \"0xb06788F027268a9A06c3AD41a88559530D2E54b1\" as Address,\n SWAP_ADAPTER: \"0x4fc3492117cC3bbcE0b210D22a8DC244f9d86490\" as Address,\n} as const;\n\n// ── Synthra DEX (Robinhood L2 — Uniswap V3-compatible concentrated liquidity) ──\n\nconst ROBINHOOD_TESTNET_SYNTHRA = {\n ROUTER: \"0x3Ce954107b1A675826B33bF23060Dd655e3758fE\" as Address,\n QUOTER: \"0x231606c321A99DE81e28fE48B07a93F1ba49e713\" as Address,\n FACTORY: \"0x911b4000D3422F482F4062a913885f7b035382Df\" as Address,\n} as const;\n\n// ── Chainlink AggregatorV3 push feeds ──\n//\n// Data Streams is gone at v1: PortfolioStrategy binds an AggregatorV3 proxy\n// ADDRESS per allocation and there is no verifier proxy to configure.\n\nconst ROBINHOOD_TESTNET_CHAINLINK = {\n WSTETH_ETH_FEED: ZERO,\n // Tokenized-equity push feeds exist only on the mainnet fork. Keyed as ZERO\n // so the registry shape covers both chains and the fork's `<SYM>_USD_FEED`\n // auto-resolve (template-encoder.ts) has a slot.\n ...noneOf(forkStockFeeds()),\n} as const;\n\n// ── Robinhood portfolio-basket route + feed metadata ──\n//\n// Data-driven replacement for the hand-drifting \"known stock\" Set that used to\n// live in strategy-template.ts. Every entry is a VERIFIED-liquidity default\n// swap route for a basket token. Absence from this map means \"no verified\n// default route\" — the CLI fails fast and demands an explicit --swap-routes\n// rather than falling through to a v3 auto-detect that would be dead.\n//\n// `kind: \"v4-native\"` = a Uniswap v4 mode-3 multi-hop USDG → native ETH → stock,\n// consumed by portfolio-template.ts as\n// v4PathExtraData([{currency: ETH, ...native}, {currency: <token>, ...stock}]).\nexport interface RobinhoodStockRoute {\n kind: \"v4-native\";\n nativeFee: number;\n nativeTickSpacing: number;\n stockFee: number;\n stockTickSpacing: number;\n}\n\n// No verified default stock swap routes on the Robinhood testnet — the\n// machinery is retained (see portfolio-template.ts) but the map is empty, so\n// every basket token falls to the existing fail-fast route error until a\n// verified route is added.\n// LOCKSTEP: the app's quote-probe geometry (app/src/lib/price-quote.ts\n// V4_DIRECT_TIERS + via-native path) must stay consistent with any route added\n// here, or the dashboard displays a tier the strategy won't execute.\nexport const ROBINHOOD_STOCK_ROUTES: Record<string, RobinhoodStockRoute> = {};\n\nconst ROBINHOOD_TESTNET_INFRA = {\n MULTICALL3: \"0xcA11bde05977b3631167028862bE2a173976CA11\" as Address, // Deterministic, same everywhere\n} as const;\n\n// ── ENS / Durin ──\n\nconst ROBINHOOD_TESTNET_ENS = {\n L2_REGISTRAR: ZERO,\n L2_REGISTRY: ZERO,\n} as const;\n\n// ── ERC-8004 Agent Identity ──\n//\n// Zero on purpose, not \"pending a deploy\": no ERC-8004 registry exists on the\n// testnet or on the fork, and none should. Identity is a coordination-chain\n// concern — every identity op (mint / load / find / status) runs against 4663\n// via `withNetwork(COORDINATION_NETWORK, …)`, whatever chain the fund is on.\nconst ROBINHOOD_TESTNET_AGENT_REGISTRY = {\n IDENTITY_REGISTRY: ZERO,\n REPUTATION_REGISTRY: ZERO,\n} as const;\n\n// ── Sherwood Protocol (our deployed contracts) ──\n//\n// V2 redeploy (chain 46630): fresh factory/governor/vault-impl/executor plus a\n// full guardian layer (registry + sWOOD + WOOD fixture token) and the V2\n// live-NAV surface (PriceRouter, UniswapSwapAdapter via the Synthra QuoterV2\n// shim, Portfolio template, StrategyFactory). WOOD_TOKEN here is a testnet\n// fixture, not the mainnet OFT.\n//\n// GOVERNOR is the deploy-time bootstrap governor. Governors are per-vault since\n// PR #421 — resolve one at runtime via `factory.governorOf(vault)`\n// (lib/governor.ts `getGovernorOf`), never from this table.\n// Key parity with the SDK book (sdk/src/addresses.ts SherwoodDeployment) is\n// pinned by lib/address-parity.test.ts — add new keys to BOTH books.\nconst ROBINHOOD_TESTNET_SHERWOOD = {\n FACTORY: \"0xa91AA45AFF32f52b6357044B02a16EBA775feC0b\" as Address,\n GOVERNOR: ZERO, // zeroed since the post-#421 redeploy — always factory.governorOf(vault)\n GUARDIAN_REGISTRY: \"0xA400eFcfFc820C6f812203C58ee00423AeCC0903\" as Address,\n STAKED_WOOD: \"0x21A69A6c9814c0d339C57fDdafed3B283702a739\" as Address,\n WOOD_TOKEN: \"0xCCb4fB59cf40de1E23083037ee81Da1DD747D8d7\" as Address,\n STRATEGY_FACTORY: \"0xb683Bb8EEcBc2419BC3801df6FeA88f96657e670\" as Address,\n MERKL_DISTRIBUTOR: ZERO,\n // Guardian-era contracts from contracts/chains/46630.json (SHE-93).\n VAULT_IMPL: \"0xC57e12d6e2d8Ed49316F0b69c51893CcA44151F7\" as Address,\n BATCH_EXECUTOR_LIB: \"0xF3b8db5aa41c7Ce92478A0Fa9C55a6460533eb86\" as Address,\n GOVERNOR_BEACON: \"0x3D46Ec018cd5893b685b4dfdc3921A4Eb64E11d1\" as Address,\n PROTOCOL_CONFIG: \"0xC104Eb6a522d6718cA28F344B2373B29d57FF2E0\" as Address,\n PRICE_ROUTER: \"0xDd302ffcfA08071780eC1A2f12BccFB9ba6b6731\" as Address,\n TIER_REGISTRY: \"0x99b8068Dc0F6093466964D581f72d947e3e380DB\" as Address,\n // Not in chains/46630.json (econ-security stack not deployed there yet).\n EXPOSURE_LEDGER: ZERO,\n PROPOSER_BOND_ESCROW: ZERO,\n CHALLENGE_GAME: ZERO,\n TOKEN_COURT: ZERO,\n} as const;\n\n// ── Venice (VVV governance + sVVV staking + DIEM compute) ──\n\nconst ROBINHOOD_TESTNET_VENICE = {\n VVV: ZERO,\n STAKING: ZERO,\n DIEM: ZERO,\n} as const;\n\n// ── Aerodrome (Base ve(3,3) DEX) ──\n\nconst ROBINHOOD_TESTNET_AERODROME = {\n ROUTER: ZERO,\n FACTORY: ZERO,\n} as const;\n\n// ── Strategy Templates (ERC-1167 clonable singletons) ──\n// Populated after running script/DeployTemplates.s.sol\n\nconst ROBINHOOD_TESTNET_STRATEGY_TEMPLATES = {\n MOONWELL_SUPPLY: ZERO as Address,\n AERODROME_LP: ZERO as Address,\n VENICE_INFERENCE: ZERO as Address,\n WSTETH_MOONWELL: ZERO as Address,\n MAMO_YIELD: ZERO as Address,\n HYPERLIQUID_PERP: ZERO as Address,\n HYPERLIQUID_GRID: ZERO as Address,\n // V2 redeploy PORTFOLIO_TEMPLATE (chain 46630).\n PORTFOLIO: \"0x67420Cc504d70a42Adfd8867d878afe0978C7d10\" as Address,\n // v1 templates — deployed on the fork only so far (no 46630 equivalent).\n MORPHO_SUPPLY: ZERO as Address,\n CONCENTRATED_LIQUIDITY: ZERO as Address,\n} as const;\n\n// ── EAS (Ethereum Attestation Service) ──\n\nconst ROBINHOOD_TESTNET_EAS = {\n EAS: ZERO,\n SCHEMA_REGISTRY: ZERO,\n} as const;\n\n// EAS on Robinhood Chain mainnet (4663). Deployed by Sherwood — EAS is not a\n// predeploy on an Arbitrum Orbit chain. sherwoodagent/sherwood-protocol#278.\nconst ROBINHOOD_MAINNET_EAS = {\n EAS: \"0x7d70441Bb10AcE5d9771dc0b6205D89ddf63205B\" as Address,\n SCHEMA_REGISTRY: \"0xdd7521Ba10773e556Defa6D6c133cB2F663b5c26\" as Address,\n} as const;\n\n/**\n * Schema UIDs are chain-INDEPENDENT: uid = keccak256(schema, resolver,\n * revocable) carries no chainId. With resolver = address(0) these are the same\n * UIDs already registered on Base, and re-registering the same definitions on\n * any chain reproduces them. Verified against Base's live SchemaRegistry.\n */\nconst SHERWOOD_EAS_SCHEMAS = {\n SYNDICATE_JOIN_REQUEST: \"0x1e7ce17b16233977ba913b156033e98f52029f4bee273a4abefe6c15ce11d5ef\" as Hex,\n AGENT_APPROVED: \"0x1013f7b38f433b2a93fc5ac162482813081c64edd67cea9b5a90698531ddb607\" as Hex,\n X402_RESEARCH: \"0x86c67f0a59acb3093ecbeb6c4d1d4352e4a48143672e92ef9dd2fdfc8a9ca708\" as Hex,\n VENICE_PROVISION: \"0x76d4d6baa72307826cd2fd4ce069bb42ee54cdda6ed6ab208c8d233c893fb7f1\" as Hex,\n VENICE_INFERENCE: \"0xf9b4e530f3016c19439b67372a1c213c9339857627fb817032614b97433a2a14\" as Hex,\n TRADE_EXECUTED: \"0x06bb488363a468f7f857ddc8cfffe918d048b8746a0d59eca9cd7f58dbdb4af6\" as Hex,\n} as const;\n\n/**\n * Every non-EAS address book, for the coordination chain. Sherwood core is not\n * deployed on 4663, so these are all zero BY CONSTRUCTION rather than by\n * omission — mapping them to the testnet book would silently hand out 46630\n * addresses during the brief `withNetwork` window an EAS write opens.\n */\nfunction noneOf<T extends Record<string, unknown>>(shape: T): T {\n return Object.fromEntries(Object.keys(shape).map((k) => [k, ZERO])) as T;\n}\n\n// ── EAS Schema UIDs (populated after running scripts/register-eas-schemas.ts) ──\n\nconst ROBINHOOD_TESTNET_EAS_SCHEMAS = {\n SYNDICATE_JOIN_REQUEST: ZERO_BYTES32,\n AGENT_APPROVED: ZERO_BYTES32,\n X402_RESEARCH: ZERO_BYTES32,\n VENICE_PROVISION: ZERO_BYTES32,\n VENICE_INFERENCE: ZERO_BYTES32,\n TRADE_EXECUTED: ZERO_BYTES32,\n} as const;\n\n// ── Robinhood Chain mainnet fork (Tenderly vnet, chain 9994663) ──\n//\n// Fork of Robinhood *mainnet*: USDG stablecoin (6-dec), official Uniswap v3+v4,\n// Chainlink PUSH feeds. Core addresses\n// come from sherwood-protocol/chains/9994663.json (fresh deploy). All 11\n// tokenized stocks + their feeds come from lib/fork-tokens.ts (one table, with\n// the measured swap route per token); the feeds are keyed here as\n// `<SYM>_USD_FEED` so a symbol basket auto-resolves its push feed on the fork.\n// Swap routes still need an explicit --swap-routes (ROBINHOOD_STOCK_ROUTES is\n// a different shape and lockstepped with the app's quote probe).\n\nconst ROBINHOOD_FORK_TOKENS: typeof ROBINHOOD_TESTNET_TOKENS = {\n USDC: ZERO,\n USDG: \"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168\" as Address,\n WETH: \"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73\" as Address,\n WETH_CANONICAL: \"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73\" as Address,\n cbETH: ZERO,\n wstETH: ZERO,\n cbBTC: ZERO,\n DAI: ZERO,\n AERO: ZERO,\n PLTR: ZERO,\n NFLX: ZERO,\n ...forkStockAddresses(),\n};\n\nconst ROBINHOOD_FORK_UNISWAP: typeof ROBINHOOD_TESTNET_UNISWAP = {\n SWAP_ROUTER: \"0xcaf681a66d020601342297493863e78c959e5cb2\" as Address,\n QUOTER_V2: \"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7\" as Address,\n SWAP_ADAPTER: \"0x54E6A7af53143556973493fDeC9d7837A77c67eF\" as Address,\n};\n\n// `<SYM>_USD_FEED` for all 11 stocks so `strategy propose portfolio --tokens\n// AAPL,…` resolves feeds without --feeds (template-encoder.ts auto-resolve).\nconst ROBINHOOD_FORK_CHAINLINK: typeof ROBINHOOD_TESTNET_CHAINLINK = {\n WSTETH_ETH_FEED: ZERO,\n ...forkStockFeeds(),\n};\n\nconst ROBINHOOD_FORK_SHERWOOD: typeof ROBINHOOD_TESTNET_SHERWOOD = {\n FACTORY: \"0x619af1488F32B4797f6faDa3C3a8De72a5B693E0\" as Address,\n GOVERNOR: ZERO, // per-vault — always factory.governorOf(vault)\n GUARDIAN_REGISTRY: \"0xD8F9E7446E6d6c02198AAaF674A0C5e3d5D1BF72\" as Address,\n STAKED_WOOD: \"0xdDf2B4C52B9575e0e6D03a3A57D75D06a4a9e203\" as Address,\n WOOD_TOKEN: \"0xF8BC08092C06dB6148114DCf82AF881F1085f92b\" as Address,\n STRATEGY_FACTORY: \"0xb06788F027268a9A06c3AD41a88559530D2E54b1\" as Address,\n MERKL_DISTRIBUTOR: ZERO,\n // Guardian-era contracts from sherwood-protocol/chains/9994663.json (SHE-93).\n VAULT_IMPL: \"0xdaB4707c9997a84e931FE98F4688adaFc70b6B95\" as Address,\n BATCH_EXECUTOR_LIB: \"0x899FC2Cac572F64A233344115b488E71E0044f34\" as Address,\n GOVERNOR_BEACON: \"0x3CF45eFE9fBDdd6cB749384Bf5c1bA5Ec96af05d\" as Address,\n PROTOCOL_CONFIG: \"0x8aDb5810B5bF8B9149BE3Ca45Cb441818a9679bB\" as Address,\n // Not in chains/9994663.json (no PriceRouter on the fork).\n PRICE_ROUTER: ZERO,\n TIER_REGISTRY: \"0x4614f058920941A0a9a852e62485fbDE692D75E1\" as Address,\n EXPOSURE_LEDGER: \"0x99D789E7C8E65dB5597dCa692F082B47BE30AB33\" as Address,\n PROPOSER_BOND_ESCROW: \"0x7d25058c891d3AC5C8bc8Da6aA937DFeE648B5cF\" as Address,\n CHALLENGE_GAME: \"0x7046FececcA6c0f5E66Cc998099593ae71A1bbee\" as Address,\n TOKEN_COURT: \"0xC30bA62727be65fd867385Ce27Ff7C78bd66A897\" as Address,\n};\n\nconst ROBINHOOD_FORK_STRATEGY_TEMPLATES: typeof ROBINHOOD_TESTNET_STRATEGY_TEMPLATES = {\n MOONWELL_SUPPLY: ZERO,\n AERODROME_LP: ZERO,\n VENICE_INFERENCE: ZERO,\n WSTETH_MOONWELL: ZERO,\n MAMO_YIELD: ZERO,\n HYPERLIQUID_PERP: ZERO,\n HYPERLIQUID_GRID: ZERO,\n PORTFOLIO: \"0xAA5872009c527cCb80343E41C52840CEdb095eb0\" as Address,\n // MORPHO_SUPPLY_TEMPLATE / CONCENTRATED_LIQUIDITY_TEMPLATE from\n // sherwood-protocol/chains/9994663.json. Both are live and on the\n // StrategyFactory allowlist; the CLI has no init encoder for their init\n // tuples yet, so `strategy list` shows them and `clone`/`propose` say so\n // explicitly instead of the address book pretending they don't exist.\n MORPHO_SUPPLY: \"0x5B55E1Da361573CB0788e750038567D2569BE41d\" as Address,\n CONCENTRATED_LIQUIDITY: \"0xcba9C84F2d382729D1519c5F7f4a9AAaC075f8B5\" as Address,\n};\n\n// ── Registries (map-based lookup) ──\n\nconst TOKEN_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_TOKENS> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_TOKENS,\n \"robinhood-fork\": ROBINHOOD_FORK_TOKENS,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_TOKENS), // coordination chain — no Sherwood contracts\n};\n\nconst MOONWELL_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_MOONWELL> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_MOONWELL,\n \"robinhood-fork\": ROBINHOOD_TESTNET_MOONWELL,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_MOONWELL), // coordination chain — no Sherwood contracts\n};\n\nconst UNISWAP_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_UNISWAP> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_UNISWAP,\n \"robinhood-fork\": ROBINHOOD_FORK_UNISWAP,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_UNISWAP), // coordination chain — no Sherwood contracts\n};\n\nconst INFRA_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_INFRA> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_INFRA,\n \"robinhood-fork\": ROBINHOOD_TESTNET_INFRA,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_INFRA), // coordination chain — no Sherwood contracts\n};\n\nconst ENS_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_ENS> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_ENS,\n \"robinhood-fork\": ROBINHOOD_TESTNET_ENS,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_ENS), // coordination chain — no Sherwood contracts\n};\n\n// Canonical ERC-8004 registries ARE live on 4663 (verified on-chain) — the\n// same 0x8004… addresses as Base. Like EAS, identity coordinates there:\n// mint/load/find/status all run against the coordination chain regardless of\n// the fund chain, which is why the testnet/fork entries above stay zero.\nconst ROBINHOOD_MAINNET_AGENT_REGISTRY = {\n IDENTITY_REGISTRY: \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\" as Address,\n REPUTATION_REGISTRY: \"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63\" as Address,\n} as const;\n\nconst AGENT_REGISTRY_MAP: Record<Network, typeof ROBINHOOD_TESTNET_AGENT_REGISTRY> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_AGENT_REGISTRY,\n \"robinhood-fork\": ROBINHOOD_TESTNET_AGENT_REGISTRY,\n \"robinhood-mainnet\": ROBINHOOD_MAINNET_AGENT_REGISTRY,\n};\n\nconst SHERWOOD_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_SHERWOOD> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_SHERWOOD,\n \"robinhood-fork\": ROBINHOOD_FORK_SHERWOOD,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_SHERWOOD), // coordination chain — no Sherwood contracts\n};\n\nconst VENICE_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_VENICE> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_VENICE,\n \"robinhood-fork\": ROBINHOOD_TESTNET_VENICE,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_VENICE), // coordination chain — no Sherwood contracts\n};\n\nconst AERODROME_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_AERODROME> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_AERODROME,\n \"robinhood-fork\": ROBINHOOD_TESTNET_AERODROME,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_AERODROME), // coordination chain — no Sherwood contracts\n};\n\nconst STRATEGY_TEMPLATE_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_STRATEGY_TEMPLATES> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_STRATEGY_TEMPLATES,\n \"robinhood-fork\": ROBINHOOD_FORK_STRATEGY_TEMPLATES,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_STRATEGY_TEMPLATES), // coordination chain — no Sherwood contracts\n};\n\nconst SYNTHRA_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_SYNTHRA> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_SYNTHRA,\n \"robinhood-fork\": ROBINHOOD_TESTNET_SYNTHRA, // unused on the fork (Uniswap, not Synthra)\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_SYNTHRA), // coordination chain — no Sherwood contracts\n};\n\nconst CHAINLINK_REGISTRY: Record<Network, typeof ROBINHOOD_TESTNET_CHAINLINK> = {\n \"robinhood-testnet\": ROBINHOOD_TESTNET_CHAINLINK,\n \"robinhood-fork\": ROBINHOOD_FORK_CHAINLINK,\n \"robinhood-mainnet\": noneOf(ROBINHOOD_TESTNET_CHAINLINK), // coordination chain — no Sherwood contracts\n};\n\n// Attestations live on chain 4663 no matter which chain the fund is on,\n// so every network resolves to the same book (spec §5.1).\nconst EAS_CONTRACT_REGISTRY: Record<Network, typeof ROBINHOOD_MAINNET_EAS> = {\n \"robinhood-testnet\": ROBINHOOD_MAINNET_EAS,\n \"robinhood-fork\": ROBINHOOD_MAINNET_EAS,\n \"robinhood-mainnet\": ROBINHOOD_MAINNET_EAS,\n};\n\n// Attestations live on chain 4663 no matter which chain the fund is on,\n// so every network resolves to the same book (spec §5.1).\nconst EAS_SCHEMA_REGISTRY: Record<Network, typeof SHERWOOD_EAS_SCHEMAS> = {\n \"robinhood-testnet\": SHERWOOD_EAS_SCHEMAS,\n \"robinhood-fork\": SHERWOOD_EAS_SCHEMAS,\n \"robinhood-mainnet\": SHERWOOD_EAS_SCHEMAS,\n};\n\n// ── Exports (functions, resolved at call time) ──\n\nexport function TOKENS() {\n return TOKEN_REGISTRY[getNetwork()];\n}\n\nexport function MOONWELL() {\n return MOONWELL_REGISTRY[getNetwork()];\n}\n\nexport function UNISWAP() {\n return { ...UNISWAP_REGISTRY[getNetwork()], ...overridesFor(\"UNISWAP\") };\n}\n\nexport function INFRA() {\n return INFRA_REGISTRY[getNetwork()];\n}\n\nexport function ENS() {\n return { ...ENS_REGISTRY[getNetwork()], ...overridesFor(\"ENS\") };\n}\n\nexport function AGENT_REGISTRY() {\n return AGENT_REGISTRY_MAP[getNetwork()];\n}\n\nexport function VENICE() {\n return VENICE_REGISTRY[getNetwork()];\n}\n\nexport function SHERWOOD() {\n return { ...SHERWOOD_REGISTRY[getNetwork()], ...overridesFor(\"SHERWOOD\") };\n}\n\nexport function AERODROME() {\n return AERODROME_REGISTRY[getNetwork()];\n}\n\nexport function STRATEGY_TEMPLATES() {\n return {\n ...STRATEGY_TEMPLATE_REGISTRY[getNetwork()],\n ...overridesFor(\"STRATEGY_TEMPLATES\"),\n };\n}\n\nexport function EAS_CONTRACTS() {\n return EAS_CONTRACT_REGISTRY[getNetwork()];\n}\n\nexport function EAS_SCHEMAS() {\n return EAS_SCHEMA_REGISTRY[getNetwork()];\n}\n\nexport function SYNTHRA() {\n return SYNTHRA_REGISTRY[getNetwork()];\n}\n\nexport function CHAINLINK() {\n return CHAINLINK_REGISTRY[getNetwork()];\n}\n"],"mappings":";;;;;AASA,SAAS,oBAAoB;AAgB7B,IAAM,gBAA8D;AAAA,EAClE,UAAU;AAAA,IACR,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,mBAAmB;AAAA,IACnB,aAAa;AAAA,IACb,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,kBAAkB;AAAA,EACpB;AAAA,EACA,oBAAoB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,0BAA0B;AAAA,IAC1B,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,IACpB,2BAA2B;AAAA,IAC3B,2BAA2B;AAAA,EAC7B;AAAA,EACA,KAAK;AAAA,IACH,cAAc;AAAA,IACd,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,sBAAsB;AAAA,EACxB;AACF;AAEA,IAAI;AAEJ,SAAS,WAA2C;AAClD,MAAI,WAAW,OAAW,QAAO;AACjC,QAAM,OAAO,QAAQ,IAAI;AACzB,MAAI,CAAC,MAAM;AACT,aAAS;AACT,WAAO;AAAA,EACT;AACA,MAAI;AACJ,MAAI;AACF,UAAM,KAAK,MAAM,aA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SAAO,kBAAkB,WAAW,CAAC;AACvC;AAEO,SAAS,UAAU;AACxB,SAAO,EAAE,GAAG,iBAAiB,WAAW,CAAC,GAAG,GAAG,aAAa,SAAS,EAAE;AACzE;AAMO,SAAS,MAAM;AACpB,SAAO,EAAE,GAAG,aAAa,WAAW,CAAC,GAAG,GAAG,aAAa,KAAK,EAAE;AACjE;AAEO,SAAS,iBAAiB;AAC/B,SAAO,mBAAmB,WAAW,CAAC;AACxC;AAEO,SAAS,SAAS;AACvB,SAAO,gBAAgB,WAAW,CAAC;AACrC;AAEO,SAAS,WAAW;AACzB,SAAO,EAAE,GAAG,kBAAkB,WAAW,CAAC,GAAG,GAAG,aAAa,UAAU,EAAE;AAC3E;AAEO,SAAS,YAAY;AAC1B,SAAO,mBAAmB,WAAW,CAAC;AACxC;AAEO,SAAS,qBAAqB;AACnC,SAAO;AAAA,IACL,GAAG,2BAA2B,WAAW,CAAC;AAAA,IAC1C,GAAG,aAAa,oBAAoB;AAAA,EACtC;AACF;AAEO,SAAS,gBAAgB;AAC9B,SAAO,sBAAsB,WAAW,CAAC;AAC3C;AAEO,SAAS,cAAc;AAC5B,SAAO,oBAAoB,WAAW,CAAC;AACzC;AAEO,SAAS,UAAU;AACxB,SAAO,iBAAiB,WAAW,CAAC;AACtC;AAEO,SAAS,YAAY;AAC1B,SAAO,mBAAmB,WAAW,CAAC;AACxC;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SHERWOOD
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FWQESFFM.js";
|
|
4
4
|
import {
|
|
5
5
|
getAccount,
|
|
6
6
|
getPublicClient,
|
|
7
7
|
waitForReceipt,
|
|
8
8
|
writeContractWithRetry
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
10
10
|
import {
|
|
11
11
|
getChain
|
|
12
12
|
} from "./chunk-G3FUEM5N.js";
|
|
@@ -372,6 +372,18 @@ async function cancelProposal(vault, proposalId) {
|
|
|
372
372
|
const receipt = await waitForReceipt(hash);
|
|
373
373
|
return receipt.transactionHash;
|
|
374
374
|
}
|
|
375
|
+
async function reclaimProposerBond(vault, proposalId) {
|
|
376
|
+
const hash = await writeContractWithRetry({
|
|
377
|
+
account: getAccount(),
|
|
378
|
+
chain: getChain(),
|
|
379
|
+
address: await getGovernorOf(vault),
|
|
380
|
+
abi: SYNDICATE_GOVERNOR_ABI,
|
|
381
|
+
functionName: "reclaimProposerBond",
|
|
382
|
+
args: [proposalId]
|
|
383
|
+
});
|
|
384
|
+
const receipt = await waitForReceipt(hash);
|
|
385
|
+
return receipt.transactionHash;
|
|
386
|
+
}
|
|
375
387
|
async function emergencyCancel(vault, proposalId) {
|
|
376
388
|
const hash = await writeContractWithRetry({
|
|
377
389
|
account: getAccount(),
|
|
@@ -483,6 +495,7 @@ export {
|
|
|
483
495
|
settleProposal,
|
|
484
496
|
emergencySettle,
|
|
485
497
|
cancelProposal,
|
|
498
|
+
reclaimProposerBond,
|
|
486
499
|
emergencyCancel,
|
|
487
500
|
setVotingPeriod,
|
|
488
501
|
setExecutionWindow,
|
|
@@ -494,4 +507,4 @@ export {
|
|
|
494
507
|
setMgmtSplit,
|
|
495
508
|
setPerfSplit
|
|
496
509
|
};
|
|
497
|
-
//# sourceMappingURL=chunk-
|
|
510
|
+
//# sourceMappingURL=chunk-G5MXVAFC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/governor.ts","../src/lib/generated/proposal-state.ts"],"sourcesContent":["/**\n * Governor contract wrapper — reads/writes to SyndicateGovernor.\n *\n * Per-vault governor design: the factory deploys ONE governor per vault\n * (BeaconProxy). Every helper takes the vault address and resolves its\n * governor via `factory.governorOf(vault)` (memoized per chain+vault —\n * the binding is set once at createSyndicate and never changes).\n *\n * Protocol-wide fee parameters (protocol/guardian fee bps + recipients)\n * live on the separate ProtocolConfig contract, resolved via\n * `factory.protocolConfig()`.\n */\n\nimport type { Address, Hex, Log } from \"viem\";\nimport { parseEventLogs } from \"viem\";\nimport { getPublicClient, getAccount, writeContractWithRetry, waitForReceipt } from \"./client.js\";\nimport { getChain } from \"./network.js\";\nimport { SHERWOOD } from \"./addresses.js\";\nimport { SYNDICATE_GOVERNOR_ABI, SYNDICATE_FACTORY_ABI, PROTOCOL_CONFIG_ABI } from \"./abis.js\";\nimport { PROPOSAL_STATE, PROPOSAL_STATES } from \"./generated/proposal-state.js\";\n\n// ── Types ──\n\nexport interface GovernorParams {\n votingPeriod: bigint;\n executionWindow: bigint;\n vetoThresholdBps: bigint;\n maxPerformanceFeeBps: bigint;\n cooldownPeriod: bigint;\n collaborationWindow: bigint;\n maxCoProposers: bigint;\n minStrategyDuration: bigint;\n maxStrategyDuration: bigint;\n}\n\nexport interface StrategyProposal {\n id: bigint;\n proposer: Address;\n vault: Address;\n /** Strategy contract address whose `positionValue()` the vault polls\n * for live NAV. Set at propose time, immutable thereafter. address(0)\n * for queue-only proposals (no live NAV). */\n strategy: Address;\n metadataURI: string;\n /** Agent fee (bps) snapshotted from the vault's `agentFeeBps` at propose. */\n performanceFeeBps: bigint;\n strategyDuration: bigint;\n /** AGAINST weight only. The FOR/ABSTAIN tallies are gone: optimistic\n * governance never needed them, so the turnout denominator is the\n * `votableSupply` snapshot at the bottom of this tuple. */\n votesAgainst: bigint;\n snapshotTimestamp: bigint;\n voteEnd: bigint;\n reviewEnd: bigint;\n executeBy: bigint;\n executedAt: bigint;\n state: number;\n vetoThresholdBps: bigint;\n /** Fee-recipient snapshot taken from ProtocolConfig at propose time.\n *\n * THE FLAT `snapshot*FeeBps` SCALARS AND `selfManagesFees` ARE GONE: the\n * splits became structs (`snapshotMgmtSplit`/`snapshotPerfSplit` below) and\n * self-managed fees were removed outright. Every field below is positional\n * in the on-chain tuple — omitting or reordering one corrupts the decode of\n * everything after it. */\n snapshotProtocolFeeRecipient: Address;\n snapshotGuardiansFeeRecipient: Address;\n /** Risk envelope declared at propose: the net-outflow ceiling the execute\n * batch is metered against. */\n maxCapital: bigint;\n /** Declared drawdown bound, bps of `effectiveMaxCapital`. */\n maxDrawdownBps: number;\n /** Tier the envelope resolved to; drives how much coverage is required. */\n envelopeTier: number;\n requiredCoverage: bigint;\n /** WOOD bond pulled from the proposer at propose, held by the escrow. */\n proposerBondWood: bigint;\n proposerBondEscrow: Address;\n /** Management-fee split snapshotted from ProtocolConfig at propose. */\n snapshotMgmtSplit: { agentBps: number; protocolBps: number; guardianBps: number };\n /** Performance-fee split snapshotted from ProtocolConfig at propose. */\n snapshotPerfSplit: { agentBps: number; protocolBps: number; guardianBps: number; ownerBps: number };\n /** The ledger the bond's reclaim gates read — bound alongside the escrow so\n * re-pointing either slot later cannot strand the bond. */\n proposerBondLedger: Address;\n /** `maxCapital` after any scaling applied at execute. */\n effectiveMaxCapital: bigint;\n /** Total vote weight eligible at `snapshotTimestamp` — the denominator the\n * veto threshold is measured against. */\n votableSupply: bigint;\n}\n\nexport interface CoProposer {\n agent: Address;\n splitBps: bigint;\n}\n\nexport interface BatchCall {\n target: Address;\n data: Hex;\n value: bigint;\n}\n\n// ProposalState ordering is code-generated from the Solidity enum\n// (contracts/src/interfaces/ISyndicateGovernor.sol) — `npm run codegen`.\n// History: PR #229 inserted GuardianReview at index 2 and this hand-kept\n// mirror drifted for ~2 months, mislabeling Approved (3) as Rejected and\n// making `proposal execute` reject valid approved proposals. The generated\n// module (checked by codegen-drift.test.ts + CI) makes that impossible.\nexport { PROPOSAL_STATE, PROPOSAL_STATES };\n\nexport const VOTE_TYPE = {\n For: 0,\n Against: 1,\n Abstain: 2,\n} as const;\n\n// ── Client-side action gates (mirror SyndicateGovernor) ──\n//\n// The governor's mutating entrypoints resolve state INLINE and can act on a\n// state the read-only `getProposalState` view is still reporting as\n// GuardianReview. The client gates below reproduce that divergence so the CLI\n// stops refusing txs the contract would accept (issue #452).\n\n/** Result of the `proposal execute` client gate. */\nexport type ExecuteGate =\n | { kind: \"send\" } // state == Approved — straightforward execute.\n | { kind: \"send-self-resolve\" } // GuardianReview, window elapsed, still within\n // the execution window — executeProposal\n // self-resolves the (cold-start) review inline.\n | { kind: \"refuse-review-open\" } // GuardianReview, review window still open — the\n // tx WOULD revert (ProposalNotApproved).\n | { kind: \"refuse-expired\" } // GuardianReview past executeBy — the inline\n // self-resolve maps to Expired, tx WOULD revert.\n | { kind: \"refuse-state\" }; // any other non-executable state.\n\n/**\n * Decide whether `executeProposal(id)` should be broadcast.\n *\n * Mirrors `SyndicateGovernor.executeProposal` (contracts/src/SyndicateGovernor.sol:342)\n * vs. the `getProposalState` view:\n * - The view (`_resolveStateView` @824 / `_resolveAfterVote` @865) keeps\n * reporting `GuardianReview` once the review window elapses but the registry\n * has not cached a resolution — a zero-guardian / never-opened cold-start\n * review NEVER auto-opens, so the view is stuck there indefinitely.\n * - `executeProposal` runs the MUTATING `_resolveState` (@789) which, when the\n * window elapsed (`now > reviewEnd`), calls `registry.resolveReview` inline\n * (cold-start ⇒ blocked=false) and maps to Approved when `now <= executeBy`\n * (else Expired) — then executes in the same tx.\n * Invariant `voteEnd < reviewEnd < executeBy` (@528-530) holds for any past-vote\n * proposal, so `reviewEnd`/`executeBy` are always populated in the GuardianReview\n * branch.\n *\n * `now` MUST be chain time (latest block timestamp), not wall-clock — on a\n * time-warped vnet the two diverge and the contract compares against chain time.\n */\nexport function evaluateExecuteGate(args: {\n state: number;\n reviewEnd: bigint;\n executeBy: bigint;\n now: bigint;\n}): ExecuteGate {\n const { state, reviewEnd, executeBy, now } = args;\n if (state === PROPOSAL_STATE.Approved) return { kind: \"send\" };\n if (state === PROPOSAL_STATE.GuardianReview) {\n if (now <= reviewEnd) return { kind: \"refuse-review-open\" };\n if (now > executeBy) return { kind: \"refuse-expired\" };\n return { kind: \"send-self-resolve\" };\n }\n return { kind: \"refuse-state\" };\n}\n\n/**\n * Classification for the `resolve-reviews` keeper.\n * - `resolvable`: an OPENED, unresolved review past its window — needs a real\n * `resolveReview` tx (computes block quorum, may slash approvers).\n * - `cold-start`: an UNOPENED, unresolved review past its window — the\n * zero-guardian case. `resolveReview` would only mark it resolved/not-blocked\n * (GuardianRegistry.resolveReview @639-643), which `executeProposal`\n * already does inline, so the keeper should report it (pointing at\n * `proposal execute`) rather than spend a redundant tx.\n * - `none`: not past window yet, or already resolved.\n */\nexport type ReviewResolveClass = \"resolvable\" | \"cold-start\" | \"none\";\n\nexport function classifyReview(args: {\n opened: boolean;\n resolved: boolean;\n reviewEnd: bigint;\n now: bigint;\n}): ReviewResolveClass {\n const { opened, resolved, reviewEnd, now } = args;\n const pastWindow = reviewEnd > 0n && now >= reviewEnd;\n if (!pastWindow || resolved) return \"none\";\n return opened ? \"resolvable\" : \"cold-start\";\n}\n\n/**\n * Classification for the `open-reviews` keeper (SHE-162), the other leg of\n * `classifyReview`: `GuardianRegistry.openReview(governor, proposalId)` is\n * permissionless, and an unopened review clears by default (`outcomeOf`:\n * `if (!r.opened) return ReviewOutcome.Cleared;`) — nobody opening it means\n * proposals execute unreviewed.\n * - `openable`: a registered, unopened, unresolved review inside the open\n * window `[voteEnd, reviewEnd)` — needs an `openReview` keeper tx.\n * - `none`: never registered (collapsed window, `reviewEnd <= voteEnd`),\n * already opened or resolved, or outside the window. Past `reviewEnd`\n * opening is pointless — that is `classifyReview`'s territory.\n */\nexport type ReviewOpenClass = \"openable\" | \"none\";\n\nexport function classifyReviewOpen(args: {\n opened: boolean;\n resolved: boolean;\n voteEnd: bigint;\n reviewEnd: bigint;\n now: bigint;\n}): ReviewOpenClass {\n const { opened, resolved, voteEnd, reviewEnd, now } = args;\n // Collapsed window ⇒ the review was never registered with the registry;\n // openReview would revert ReviewNotOpen (r.voteEnd == 0).\n const registered = voteEnd > 0n && reviewEnd > voteEnd;\n // Contract gate is `now >= voteEnd` (inclusive); past reviewEnd the open\n // is moot — the review resolves/clears without it.\n const inWindow = now >= voteEnd && now < reviewEnd;\n if (!registered || !inWindow || opened || resolved) return \"none\";\n return \"openable\";\n}\n\n/**\n * Per-proposal scan step shared by the `open-reviews` / `resolve-reviews`\n * keepers. Runs `load` for every id concurrently; an id whose load throws is\n * RECORDED in `failures` (id + error), never silently swallowed — a systemic\n * failure (e.g. an ABI mismatch, the SHE-88/SHE-49 class) must surface as\n * \"N of M failed to load\", not as a clean \"nothing to do\". The loadable ids\n * are still returned so the keeper can process every candidate it CAN see.\n */\nexport interface ReviewScanFailure {\n id: bigint;\n error: unknown;\n}\n\nexport async function scanReviewCandidates<T>(\n ids: readonly bigint[],\n load: (id: bigint) => Promise<T>,\n): Promise<{ candidates: T[]; failures: ReviewScanFailure[] }> {\n const failures: ReviewScanFailure[] = [];\n const settled = await Promise.all(\n ids.map(async (id): Promise<{ ok: true; value: T } | { ok: false }> => {\n try {\n return { ok: true, value: await load(id) };\n } catch (error) {\n failures.push({ id, error });\n return { ok: false };\n }\n }),\n );\n const candidates: T[] = [];\n for (const s of settled) if (s.ok) candidates.push(s.value);\n return { candidates, failures };\n}\n\n/**\n * A mined-but-REVERTED tx still yields a receipt — `waitForReceipt` resolves\n * with `status: \"reverted\"` and does not throw. A keeper counting that as a\n * success would report \"opened/resolved\" for a tx that changed nothing. Call\n * this on every keeper receipt: it throws (like a send failure) unless the\n * tx actually succeeded, so the caller's catch path drives the exit code.\n */\nexport function assertReceiptSuccess(receipt: { status: string }): void {\n if (receipt.status !== \"success\") {\n throw new Error(`transaction mined but reverted on-chain (status=${receipt.status})`);\n }\n}\n\n// ── Duration parser ──\n\nexport function parseDuration(input: string): bigint {\n const match = input.match(/^(\\d+)(d|h|m|s)?$/);\n if (!match) throw new Error(`Invalid duration: ${input}`);\n const value = BigInt(match[1]);\n switch (match[2]) {\n case \"d\":\n return value * 86400n;\n case \"h\":\n return value * 3600n;\n case \"m\":\n return value * 60n;\n case \"s\":\n case undefined:\n return value;\n default:\n throw new Error(`Unknown duration unit: ${match[2]}`);\n }\n}\n\n// ── Address helpers ──\n\n// governorOf(vault) is set once at createSyndicate and never rebinds, so\n// it is safe to memoize per chain+vault for the lifetime of the process.\nconst governorCache = new Map<string, Address>();\n\n/** Resolve the per-vault governor via `factory.governorOf(vault)`. */\nexport async function getGovernorOf(vault: Address): Promise<Address> {\n const key = `${getChain().id}:${vault.toLowerCase()}`;\n const cached = governorCache.get(key);\n if (cached) return cached;\n\n const client = getPublicClient();\n const governor = await client.readContract({\n address: SHERWOOD().FACTORY,\n abi: SYNDICATE_FACTORY_ABI,\n functionName: \"governorOf\",\n args: [vault],\n }) as Address;\n\n if (governor === \"0x0000000000000000000000000000000000000000\") {\n throw new Error(`No governor registered for vault ${vault} — is it a factory-created vault?`);\n }\n\n governorCache.set(key, governor);\n return governor;\n}\n\n// ProtocolConfig is a protocol-wide singleton behind the factory — same\n// set-once semantics as governorOf, memoized per chain.\nconst protocolConfigCache = new Map<number, Address>();\n\n/** Resolve the ProtocolConfig address via `factory.protocolConfig()`. */\nexport async function getProtocolConfigAddress(): Promise<Address> {\n const chainId = getChain().id;\n const cached = protocolConfigCache.get(chainId);\n if (cached) return cached;\n\n const client = getPublicClient();\n const config = await client.readContract({\n address: SHERWOOD().FACTORY,\n abi: SYNDICATE_FACTORY_ABI,\n functionName: \"protocolConfig\",\n }) as Address;\n\n protocolConfigCache.set(chainId, config);\n return config;\n}\n\n// ── Read helpers ──\n\nexport async function getGovernorParams(vault: Address): Promise<GovernorParams> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getGovernorParams\",\n }) as {\n votingPeriod: bigint;\n executionWindow: bigint;\n vetoThresholdBps: bigint;\n maxPerformanceFeeBps: bigint;\n cooldownPeriod: bigint;\n collaborationWindow: bigint;\n maxCoProposers: bigint;\n minStrategyDuration: bigint;\n maxStrategyDuration: bigint;\n };\n return result;\n}\n\nexport async function getProposal(vault: Address, id: bigint): Promise<StrategyProposal> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getProposal\",\n args: [id],\n }) as StrategyProposal;\n return result;\n}\n\nexport async function getProposalState(vault: Address, id: bigint): Promise<number> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getProposalState\",\n args: [id],\n }) as Promise<number>;\n}\n\nexport async function proposalCount(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"proposalCount\",\n }) as Promise<bigint>;\n}\n\nexport async function getVoteWeight(vault: Address, proposalId: bigint, voter: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getVoteWeight\",\n args: [proposalId, voter],\n }) as Promise<bigint>;\n}\n\nexport async function hasVoted(vault: Address, proposalId: bigint, voter: Address): Promise<boolean> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"hasVoted\",\n args: [proposalId, voter],\n }) as Promise<boolean>;\n}\n\n// `getProposalCalls` (concat of execute + settle) was dropped in V1.5\n// to reclaim governor bytecode under EIP-170. Use `getExecuteCalls`\n// + `getSettlementCalls` instead — same data, no on-chain copy loop.\n\nexport async function getExecuteCalls(vault: Address, proposalId: bigint): Promise<BatchCall[]> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getExecuteCalls\",\n args: [proposalId],\n }) as { target: Address; data: Hex; value: bigint }[];\n return result.map((c) => ({ target: c.target, data: c.data, value: c.value }));\n}\n\nexport async function getSettlementCalls(vault: Address, proposalId: bigint): Promise<BatchCall[]> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getSettlementCalls\",\n args: [proposalId],\n }) as { target: Address; data: Hex; value: bigint }[];\n return result.map((c) => ({ target: c.target, data: c.data, value: c.value }));\n}\n\n// Per-vault governor: `getRegisteredVaults` / `isRegisteredVault` were\n// removed on-chain — a governor serves exactly one vault (`governor.vault()`).\n// Enumerate vaults via the factory (`getAllActiveSyndicates`) instead.\n\nexport async function getActiveProposal(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getActiveProposal\",\n }) as Promise<bigint>;\n}\n\nexport async function getCooldownEnd(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getCooldownEnd\",\n }) as Promise<bigint>;\n}\n\nexport async function openProposalCount(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"openProposalCount\",\n }) as Promise<bigint>;\n}\n\nexport async function getCapitalSnapshot(vault: Address, proposalId: bigint): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getCapitalSnapshot\",\n args: [proposalId],\n }) as Promise<bigint>;\n}\n\n/**\n * Extract proposalId from ProposalCreated event logs.\n * Returns undefined if the event is not found or parsing fails.\n */\nexport function parseProposalIdFromLogs(logs: Log[]): bigint | undefined {\n try {\n const parsed = parseEventLogs({\n abi: SYNDICATE_GOVERNOR_ABI,\n logs,\n eventName: \"ProposalCreated\",\n });\n return parsed[0]?.args.proposalId;\n } catch {\n return undefined;\n }\n}\n\n// ── Write helpers ──\n\n/**\n * The risk envelope a proposal commits to.\n *\n * `maxCapital` is in ASSET UNITS (the vault's own asset, at its decimals), not\n * a share. `maxDrawdownBps` is the declared loss allowance in basis points,\n * 0..10_000, and is what the settle-price guard sizes its tolerance from — so\n * it is a real declaration to voters and guardians, not a formality.\n */\nexport interface RiskEnvelope {\n maxCapital: bigint;\n maxDrawdownBps: number;\n}\n\n/**\n * @param executeCallCaps one entry per execute call, in ASSET UNITS: the\n * maximum GROSS OUTFLOW of the vault asset measured around that call. A call\n * that moves nothing out (an `approve`, or a settlement that only returns\n * assets) takes 0. Summed per batch and required to be <= `maxCapital`;\n * the execute and settlement batches are bounded independently because they\n * run in separate transactions.\n */\nexport async function propose(\n vault: Address,\n strategy: Address,\n metadataURI: string,\n strategyDuration: bigint,\n envelope: RiskEnvelope,\n executeCalls: BatchCall[],\n executeCallCaps: bigint[],\n settlementCalls: BatchCall[],\n settlementCallCaps: bigint[],\n coProposers: CoProposer[] = [],\n): Promise<{ hash: Hex; proposalId: bigint }> {\n // Fail here rather than as an on-chain `CallCapsLengthMismatch` — the\n // governor's revert names the mismatch but not which batch, and a caller that\n // built the arrays in different places will not know.\n if (executeCallCaps.length !== executeCalls.length) {\n throw new Error(\n `executeCallCaps has ${executeCallCaps.length} entries for ${executeCalls.length} execute calls — every call must declare exactly one cap`,\n );\n }\n if (settlementCallCaps.length !== settlementCalls.length) {\n throw new Error(\n `settlementCallCaps has ${settlementCallCaps.length} entries for ${settlementCalls.length} settlement calls — every call must declare exactly one cap`,\n );\n }\n\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"propose\",\n args: [\n vault,\n strategy,\n metadataURI,\n strategyDuration,\n { maxCapital: envelope.maxCapital, maxDrawdownBps: envelope.maxDrawdownBps },\n executeCalls,\n executeCallCaps,\n settlementCalls,\n settlementCallCaps,\n coProposers,\n ],\n });\n\n const receipt = await waitForReceipt(hash);\n\n // Parse proposalId from the ProposalCreated event in the receipt logs.\n // Falls back to proposalCount() if event parsing fails.\n let proposalId = parseProposalIdFromLogs(receipt.logs);\n if (proposalId === undefined) {\n try {\n proposalId = await proposalCount(vault);\n } catch {\n proposalId = 0n;\n }\n }\n\n return { hash: receipt.transactionHash, proposalId };\n}\n\nexport async function vote(vault: Address, proposalId: bigint, support: number): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"vote\",\n args: [proposalId, support],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function executeProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"executeProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\n/**\n * Walk a proposal's executeCalls and pick the strategy clone — the\n * target of the call whose selector matches `BaseStrategy.execute()`\n * (0x61461954). This is the canonical entry point that every Sherwood\n * strategy template inherits from BaseStrategy, so it's a reliable\n * marker even across template families (Moonwell / Aerodrome /\n * Hyperliquid / Mamo / Venice / Portfolio).\n *\n * Returns null when no execute() call is present (e.g. proposals that\n * only do approves and direct ERC-20 transfers without a strategy).\n */\nexport function detectStrategyAdapter(\n calls: { target: Address; data: Hex; value: bigint }[],\n): Address | null {\n const STRATEGY_EXECUTE_SELECTOR = \"0x61461954\";\n for (const call of calls) {\n if (call.data.slice(0, 10).toLowerCase() === STRATEGY_EXECUTE_SELECTOR) {\n return call.target;\n }\n }\n return null;\n}\n\nexport async function settleProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"settleProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function emergencySettle(vault: Address, proposalId: bigint, calls: BatchCall[]): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"emergencySettleWithCalls\",\n args: [proposalId, calls],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function cancelProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"cancelProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function emergencyCancel(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"emergencyCancel\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\n// ── Parameter setters ──\n//\n// Per-vault governor: governance parameters are per-vault now, set by the\n// VAULT OWNER on that vault's governor. Setters revert with\n// `ParamsFrozenDuringProposal` while any proposal is open on the vault.\n\ntype GovernorParamSetter =\n | \"setVotingPeriod\"\n | \"setExecutionWindow\"\n | \"setVetoThresholdBps\"\n | \"setMaxPerformanceFeeBps\"\n | \"setMaxStrategyDuration\"\n | \"setCooldownPeriod\";\n\nasync function setGovernorParam(\n vault: Address,\n functionName: GovernorParamSetter,\n value: bigint,\n): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName,\n args: [value],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function setVotingPeriod(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setVotingPeriod\", seconds);\n}\n\nexport async function setExecutionWindow(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setExecutionWindow\", seconds);\n}\n\nexport async function setVetoThresholdBps(vault: Address, bps: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setVetoThresholdBps\", bps);\n}\n\nexport async function setMaxPerformanceFeeBps(vault: Address, bps: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setMaxPerformanceFeeBps\", bps);\n}\n\nexport async function setMaxStrategyDuration(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setMaxStrategyDuration\", seconds);\n}\n\nexport async function setCooldownPeriod(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setCooldownPeriod\", seconds);\n}\n\nexport async function vetoProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"vetoProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\n// ── ProtocolConfig fee-split setters (protocol-owner only) ──\n//\n// Post-audit ProtocolConfig holds no per-rate protocol fee — the two-number\n// model exposes the SPLITS of the management and performance fees instead,\n// on the protocol-wide config (resolved via `factory.protocolConfig()`).\n\nexport interface MgmtSplit {\n agentBps: number;\n protocolBps: number;\n guardianBps: number;\n}\n\nexport interface PerfSplit extends MgmtSplit {\n ownerBps: number;\n}\n\nexport async function setMgmtSplit(s: MgmtSplit): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getProtocolConfigAddress(),\n abi: PROTOCOL_CONFIG_ABI,\n functionName: \"setMgmtSplit\",\n args: [s],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function setPerfSplit(s: PerfSplit): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getProtocolConfigAddress(),\n abi: PROTOCOL_CONFIG_ABI,\n functionName: \"setPerfSplit\",\n args: [s],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n","/**\n * AUTO-GENERATED by cli/scripts/codegen-contracts.ts — do not edit.\n * Regenerate: npm run codegen (in cli/)\n *\n * Source of truth: sherwood-protocol src/interfaces/ISyndicateGovernor.sol (enum ProposalState)\n */\n\n/** On-chain `ProposalState` member names, index === Solidity enum value. */\nexport const PROPOSAL_STATES = [\n \"Draft\",\n \"Pending\",\n \"GuardianReview\",\n \"Approved\",\n \"Rejected\",\n \"Expired\",\n \"Executed\",\n \"Settled\",\n \"Cancelled\",\n] as const;\n\nexport type ProposalStateName = (typeof PROPOSAL_STATES)[number];\n\n/** Name → Solidity enum value. */\nexport const PROPOSAL_STATE = {\n Draft: 0,\n Pending: 1,\n GuardianReview: 2,\n Approved: 3,\n Rejected: 4,\n Expired: 5,\n Executed: 6,\n Settled: 7,\n Cancelled: 8,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,SAAS,sBAAsB;;;ACNxB,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKO,IAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,WAAW;AACb;;;AD8EO,IAAM,YAAY;AAAA,EACvB,KAAK;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AACX;AAyCO,SAAS,oBAAoB,MAKpB;AACd,QAAM,EAAE,OAAO,WAAW,WAAW,IAAI,IAAI;AAC7C,MAAI,UAAU,eAAe,SAAU,QAAO,EAAE,MAAM,OAAO;AAC7D,MAAI,UAAU,eAAe,gBAAgB;AAC3C,QAAI,OAAO,UAAW,QAAO,EA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AAe,IAAI;AACzC,SAAO,QAAQ;AACjB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/governor.ts","../src/lib/generated/proposal-state.ts"],"sourcesContent":["/**\n * Governor contract wrapper — reads/writes to SyndicateGovernor.\n *\n * Per-vault governor design: the factory deploys ONE governor per vault\n * (BeaconProxy). Every helper takes the vault address and resolves its\n * governor via `factory.governorOf(vault)` (memoized per chain+vault —\n * the binding is set once at createSyndicate and never changes).\n *\n * Protocol-wide fee parameters (protocol/guardian fee bps + recipients)\n * live on the separate ProtocolConfig contract, resolved via\n * `factory.protocolConfig()`.\n */\n\nimport type { Address, Hex, Log } from \"viem\";\nimport { parseEventLogs } from \"viem\";\nimport { getPublicClient, getAccount, writeContractWithRetry, waitForReceipt } from \"./client.js\";\nimport { getChain } from \"./network.js\";\nimport { SHERWOOD } from \"./addresses.js\";\nimport { SYNDICATE_GOVERNOR_ABI, SYNDICATE_FACTORY_ABI, PROTOCOL_CONFIG_ABI } from \"./abis.js\";\nimport { PROPOSAL_STATE, PROPOSAL_STATES } from \"./generated/proposal-state.js\";\n\n// ── Types ──\n\nexport interface GovernorParams {\n votingPeriod: bigint;\n executionWindow: bigint;\n vetoThresholdBps: bigint;\n maxPerformanceFeeBps: bigint;\n cooldownPeriod: bigint;\n collaborationWindow: bigint;\n maxCoProposers: bigint;\n minStrategyDuration: bigint;\n maxStrategyDuration: bigint;\n}\n\nexport interface StrategyProposal {\n id: bigint;\n proposer: Address;\n vault: Address;\n /** Strategy contract address whose `positionValue()` the vault polls\n * for live NAV. Set at propose time, immutable thereafter. address(0)\n * for queue-only proposals (no live NAV). */\n strategy: Address;\n metadataURI: string;\n /** Agent fee (bps) snapshotted from the vault's `agentFeeBps` at propose. */\n performanceFeeBps: bigint;\n strategyDuration: bigint;\n /** AGAINST weight only. The FOR/ABSTAIN tallies are gone: optimistic\n * governance never needed them, so the turnout denominator is the\n * `votableSupply` snapshot at the bottom of this tuple. */\n votesAgainst: bigint;\n snapshotTimestamp: bigint;\n voteEnd: bigint;\n reviewEnd: bigint;\n executeBy: bigint;\n executedAt: bigint;\n state: number;\n vetoThresholdBps: bigint;\n /** Fee-recipient snapshot taken from ProtocolConfig at propose time.\n *\n * THE FLAT `snapshot*FeeBps` SCALARS AND `selfManagesFees` ARE GONE: the\n * splits became structs (`snapshotMgmtSplit`/`snapshotPerfSplit` below) and\n * self-managed fees were removed outright. Every field below is positional\n * in the on-chain tuple — omitting or reordering one corrupts the decode of\n * everything after it. */\n snapshotProtocolFeeRecipient: Address;\n snapshotGuardiansFeeRecipient: Address;\n /** Risk envelope declared at propose: the net-outflow ceiling the execute\n * batch is metered against. */\n maxCapital: bigint;\n /** Declared drawdown bound, bps of `effectiveMaxCapital`. */\n maxDrawdownBps: number;\n /** Tier the envelope resolved to; drives how much coverage is required. */\n envelopeTier: number;\n requiredCoverage: bigint;\n /** WOOD bond pulled from the proposer at propose, held by the escrow. */\n proposerBondWood: bigint;\n proposerBondEscrow: Address;\n /** Management-fee split snapshotted from ProtocolConfig at propose. */\n snapshotMgmtSplit: { agentBps: number; protocolBps: number; guardianBps: number };\n /** Performance-fee split snapshotted from ProtocolConfig at propose. */\n snapshotPerfSplit: { agentBps: number; protocolBps: number; guardianBps: number; ownerBps: number };\n /** The ledger the bond's reclaim gates read — bound alongside the escrow so\n * re-pointing either slot later cannot strand the bond. */\n proposerBondLedger: Address;\n /** `maxCapital` after any scaling applied at execute. */\n effectiveMaxCapital: bigint;\n /** Total vote weight eligible at `snapshotTimestamp` — the denominator the\n * veto threshold is measured against. */\n votableSupply: bigint;\n}\n\nexport interface CoProposer {\n agent: Address;\n splitBps: bigint;\n}\n\nexport interface BatchCall {\n target: Address;\n data: Hex;\n value: bigint;\n}\n\n// ProposalState ordering is code-generated from the Solidity enum\n// (contracts/src/interfaces/ISyndicateGovernor.sol) — `npm run codegen`.\n// History: PR #229 inserted GuardianReview at index 2 and this hand-kept\n// mirror drifted for ~2 months, mislabeling Approved (3) as Rejected and\n// making `proposal execute` reject valid approved proposals. The generated\n// module (checked by codegen-drift.test.ts + CI) makes that impossible.\nexport { PROPOSAL_STATE, PROPOSAL_STATES };\n\nexport const VOTE_TYPE = {\n For: 0,\n Against: 1,\n Abstain: 2,\n} as const;\n\n// ── Client-side action gates (mirror SyndicateGovernor) ──\n//\n// The governor's mutating entrypoints resolve state INLINE and can act on a\n// state the read-only `getProposalState` view is still reporting as\n// GuardianReview. The client gates below reproduce that divergence so the CLI\n// stops refusing txs the contract would accept (issue #452).\n\n/** Result of the `proposal execute` client gate. */\nexport type ExecuteGate =\n | { kind: \"send\" } // state == Approved — straightforward execute.\n | { kind: \"send-self-resolve\" } // GuardianReview, window elapsed, still within\n // the execution window — executeProposal\n // self-resolves the (cold-start) review inline.\n | { kind: \"refuse-review-open\" } // GuardianReview, review window still open — the\n // tx WOULD revert (ProposalNotApproved).\n | { kind: \"refuse-expired\" } // GuardianReview past executeBy — the inline\n // self-resolve maps to Expired, tx WOULD revert.\n | { kind: \"refuse-state\" }; // any other non-executable state.\n\n/**\n * Decide whether `executeProposal(id)` should be broadcast.\n *\n * Mirrors `SyndicateGovernor.executeProposal` (contracts/src/SyndicateGovernor.sol:342)\n * vs. the `getProposalState` view:\n * - The view (`_resolveStateView` @824 / `_resolveAfterVote` @865) keeps\n * reporting `GuardianReview` once the review window elapses but the registry\n * has not cached a resolution — a zero-guardian / never-opened cold-start\n * review NEVER auto-opens, so the view is stuck there indefinitely.\n * - `executeProposal` runs the MUTATING `_resolveState` (@789) which, when the\n * window elapsed (`now > reviewEnd`), calls `registry.resolveReview` inline\n * (cold-start ⇒ blocked=false) and maps to Approved when `now <= executeBy`\n * (else Expired) — then executes in the same tx.\n * Invariant `voteEnd < reviewEnd < executeBy` (@528-530) holds for any past-vote\n * proposal, so `reviewEnd`/`executeBy` are always populated in the GuardianReview\n * branch.\n *\n * `now` MUST be chain time (latest block timestamp), not wall-clock — on a\n * time-warped vnet the two diverge and the contract compares against chain time.\n */\nexport function evaluateExecuteGate(args: {\n state: number;\n reviewEnd: bigint;\n executeBy: bigint;\n now: bigint;\n}): ExecuteGate {\n const { state, reviewEnd, executeBy, now } = args;\n if (state === PROPOSAL_STATE.Approved) return { kind: \"send\" };\n if (state === PROPOSAL_STATE.GuardianReview) {\n if (now <= reviewEnd) return { kind: \"refuse-review-open\" };\n if (now > executeBy) return { kind: \"refuse-expired\" };\n return { kind: \"send-self-resolve\" };\n }\n return { kind: \"refuse-state\" };\n}\n\n/**\n * Classification for the `resolve-reviews` keeper.\n * - `resolvable`: an OPENED, unresolved review past its window — needs a real\n * `resolveReview` tx (computes block quorum, may slash approvers).\n * - `cold-start`: an UNOPENED, unresolved review past its window — the\n * zero-guardian case. `resolveReview` would only mark it resolved/not-blocked\n * (GuardianRegistry.resolveReview @639-643), which `executeProposal`\n * already does inline, so the keeper should report it (pointing at\n * `proposal execute`) rather than spend a redundant tx.\n * - `none`: not past window yet, or already resolved.\n */\nexport type ReviewResolveClass = \"resolvable\" | \"cold-start\" | \"none\";\n\nexport function classifyReview(args: {\n opened: boolean;\n resolved: boolean;\n reviewEnd: bigint;\n now: bigint;\n}): ReviewResolveClass {\n const { opened, resolved, reviewEnd, now } = args;\n const pastWindow = reviewEnd > 0n && now >= reviewEnd;\n if (!pastWindow || resolved) return \"none\";\n return opened ? \"resolvable\" : \"cold-start\";\n}\n\n/**\n * Classification for the `open-reviews` keeper (SHE-162), the other leg of\n * `classifyReview`: `GuardianRegistry.openReview(governor, proposalId)` is\n * permissionless, and an unopened review clears by default (`outcomeOf`:\n * `if (!r.opened) return ReviewOutcome.Cleared;`) — nobody opening it means\n * proposals execute unreviewed.\n * - `openable`: a registered, unopened, unresolved review inside the open\n * window `[voteEnd, reviewEnd)` — needs an `openReview` keeper tx.\n * - `none`: never registered (collapsed window, `reviewEnd <= voteEnd`),\n * already opened or resolved, or outside the window. Past `reviewEnd`\n * opening is pointless — that is `classifyReview`'s territory.\n */\nexport type ReviewOpenClass = \"openable\" | \"none\";\n\nexport function classifyReviewOpen(args: {\n opened: boolean;\n resolved: boolean;\n voteEnd: bigint;\n reviewEnd: bigint;\n now: bigint;\n}): ReviewOpenClass {\n const { opened, resolved, voteEnd, reviewEnd, now } = args;\n // Collapsed window ⇒ the review was never registered with the registry;\n // openReview would revert ReviewNotOpen (r.voteEnd == 0).\n const registered = voteEnd > 0n && reviewEnd > voteEnd;\n // Contract gate is `now >= voteEnd` (inclusive); past reviewEnd the open\n // is moot — the review resolves/clears without it.\n const inWindow = now >= voteEnd && now < reviewEnd;\n if (!registered || !inWindow || opened || resolved) return \"none\";\n return \"openable\";\n}\n\n/**\n * Per-proposal scan step shared by the `open-reviews` / `resolve-reviews`\n * keepers. Runs `load` for every id concurrently; an id whose load throws is\n * RECORDED in `failures` (id + error), never silently swallowed — a systemic\n * failure (e.g. an ABI mismatch, the SHE-88/SHE-49 class) must surface as\n * \"N of M failed to load\", not as a clean \"nothing to do\". The loadable ids\n * are still returned so the keeper can process every candidate it CAN see.\n */\nexport interface ReviewScanFailure {\n id: bigint;\n error: unknown;\n}\n\nexport async function scanReviewCandidates<T>(\n ids: readonly bigint[],\n load: (id: bigint) => Promise<T>,\n): Promise<{ candidates: T[]; failures: ReviewScanFailure[] }> {\n const failures: ReviewScanFailure[] = [];\n const settled = await Promise.all(\n ids.map(async (id): Promise<{ ok: true; value: T } | { ok: false }> => {\n try {\n return { ok: true, value: await load(id) };\n } catch (error) {\n failures.push({ id, error });\n return { ok: false };\n }\n }),\n );\n const candidates: T[] = [];\n for (const s of settled) if (s.ok) candidates.push(s.value);\n return { candidates, failures };\n}\n\n/**\n * A mined-but-REVERTED tx still yields a receipt — `waitForReceipt` resolves\n * with `status: \"reverted\"` and does not throw. A keeper counting that as a\n * success would report \"opened/resolved\" for a tx that changed nothing. Call\n * this on every keeper receipt: it throws (like a send failure) unless the\n * tx actually succeeded, so the caller's catch path drives the exit code.\n */\nexport function assertReceiptSuccess(receipt: { status: string }): void {\n if (receipt.status !== \"success\") {\n throw new Error(`transaction mined but reverted on-chain (status=${receipt.status})`);\n }\n}\n\n// ── Duration parser ──\n\nexport function parseDuration(input: string): bigint {\n const match = input.match(/^(\\d+)(d|h|m|s)?$/);\n if (!match) throw new Error(`Invalid duration: ${input}`);\n const value = BigInt(match[1]);\n switch (match[2]) {\n case \"d\":\n return value * 86400n;\n case \"h\":\n return value * 3600n;\n case \"m\":\n return value * 60n;\n case \"s\":\n case undefined:\n return value;\n default:\n throw new Error(`Unknown duration unit: ${match[2]}`);\n }\n}\n\n// ── Address helpers ──\n\n// governorOf(vault) is set once at createSyndicate and never rebinds, so\n// it is safe to memoize per chain+vault for the lifetime of the process.\nconst governorCache = new Map<string, Address>();\n\n/** Resolve the per-vault governor via `factory.governorOf(vault)`. */\nexport async function getGovernorOf(vault: Address): Promise<Address> {\n const key = `${getChain().id}:${vault.toLowerCase()}`;\n const cached = governorCache.get(key);\n if (cached) return cached;\n\n const client = getPublicClient();\n const governor = await client.readContract({\n address: SHERWOOD().FACTORY,\n abi: SYNDICATE_FACTORY_ABI,\n functionName: \"governorOf\",\n args: [vault],\n }) as Address;\n\n if (governor === \"0x0000000000000000000000000000000000000000\") {\n throw new Error(`No governor registered for vault ${vault} — is it a factory-created vault?`);\n }\n\n governorCache.set(key, governor);\n return governor;\n}\n\n// ProtocolConfig is a protocol-wide singleton behind the factory — same\n// set-once semantics as governorOf, memoized per chain.\nconst protocolConfigCache = new Map<number, Address>();\n\n/** Resolve the ProtocolConfig address via `factory.protocolConfig()`. */\nexport async function getProtocolConfigAddress(): Promise<Address> {\n const chainId = getChain().id;\n const cached = protocolConfigCache.get(chainId);\n if (cached) return cached;\n\n const client = getPublicClient();\n const config = await client.readContract({\n address: SHERWOOD().FACTORY,\n abi: SYNDICATE_FACTORY_ABI,\n functionName: \"protocolConfig\",\n }) as Address;\n\n protocolConfigCache.set(chainId, config);\n return config;\n}\n\n// ── Read helpers ──\n\nexport async function getGovernorParams(vault: Address): Promise<GovernorParams> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getGovernorParams\",\n }) as {\n votingPeriod: bigint;\n executionWindow: bigint;\n vetoThresholdBps: bigint;\n maxPerformanceFeeBps: bigint;\n cooldownPeriod: bigint;\n collaborationWindow: bigint;\n maxCoProposers: bigint;\n minStrategyDuration: bigint;\n maxStrategyDuration: bigint;\n };\n return result;\n}\n\nexport async function getProposal(vault: Address, id: bigint): Promise<StrategyProposal> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getProposal\",\n args: [id],\n }) as StrategyProposal;\n return result;\n}\n\nexport async function getProposalState(vault: Address, id: bigint): Promise<number> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getProposalState\",\n args: [id],\n }) as Promise<number>;\n}\n\nexport async function proposalCount(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"proposalCount\",\n }) as Promise<bigint>;\n}\n\nexport async function getVoteWeight(vault: Address, proposalId: bigint, voter: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getVoteWeight\",\n args: [proposalId, voter],\n }) as Promise<bigint>;\n}\n\nexport async function hasVoted(vault: Address, proposalId: bigint, voter: Address): Promise<boolean> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"hasVoted\",\n args: [proposalId, voter],\n }) as Promise<boolean>;\n}\n\n// `getProposalCalls` (concat of execute + settle) was dropped in V1.5\n// to reclaim governor bytecode under EIP-170. Use `getExecuteCalls`\n// + `getSettlementCalls` instead — same data, no on-chain copy loop.\n\nexport async function getExecuteCalls(vault: Address, proposalId: bigint): Promise<BatchCall[]> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getExecuteCalls\",\n args: [proposalId],\n }) as { target: Address; data: Hex; value: bigint }[];\n return result.map((c) => ({ target: c.target, data: c.data, value: c.value }));\n}\n\nexport async function getSettlementCalls(vault: Address, proposalId: bigint): Promise<BatchCall[]> {\n const client = getPublicClient();\n const result = await client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getSettlementCalls\",\n args: [proposalId],\n }) as { target: Address; data: Hex; value: bigint }[];\n return result.map((c) => ({ target: c.target, data: c.data, value: c.value }));\n}\n\n// Per-vault governor: `getRegisteredVaults` / `isRegisteredVault` were\n// removed on-chain — a governor serves exactly one vault (`governor.vault()`).\n// Enumerate vaults via the factory (`getAllActiveSyndicates`) instead.\n\nexport async function getActiveProposal(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getActiveProposal\",\n }) as Promise<bigint>;\n}\n\nexport async function getCooldownEnd(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getCooldownEnd\",\n }) as Promise<bigint>;\n}\n\nexport async function openProposalCount(vault: Address): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"openProposalCount\",\n }) as Promise<bigint>;\n}\n\nexport async function getCapitalSnapshot(vault: Address, proposalId: bigint): Promise<bigint> {\n const client = getPublicClient();\n return client.readContract({\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"getCapitalSnapshot\",\n args: [proposalId],\n }) as Promise<bigint>;\n}\n\n/**\n * Extract proposalId from ProposalCreated event logs.\n * Returns undefined if the event is not found or parsing fails.\n */\nexport function parseProposalIdFromLogs(logs: Log[]): bigint | undefined {\n try {\n const parsed = parseEventLogs({\n abi: SYNDICATE_GOVERNOR_ABI,\n logs,\n eventName: \"ProposalCreated\",\n });\n return parsed[0]?.args.proposalId;\n } catch {\n return undefined;\n }\n}\n\n// ── Write helpers ──\n\n/**\n * The risk envelope a proposal commits to.\n *\n * `maxCapital` is in ASSET UNITS (the vault's own asset, at its decimals), not\n * a share. `maxDrawdownBps` is the declared loss allowance in basis points,\n * 0..10_000, and is what the settle-price guard sizes its tolerance from — so\n * it is a real declaration to voters and guardians, not a formality.\n */\nexport interface RiskEnvelope {\n maxCapital: bigint;\n maxDrawdownBps: number;\n}\n\n/**\n * @param executeCallCaps one entry per execute call, in ASSET UNITS: the\n * maximum GROSS OUTFLOW of the vault asset measured around that call. A call\n * that moves nothing out (an `approve`, or a settlement that only returns\n * assets) takes 0. Summed per batch and required to be <= `maxCapital`;\n * the execute and settlement batches are bounded independently because they\n * run in separate transactions.\n */\nexport async function propose(\n vault: Address,\n strategy: Address,\n metadataURI: string,\n strategyDuration: bigint,\n envelope: RiskEnvelope,\n executeCalls: BatchCall[],\n executeCallCaps: bigint[],\n settlementCalls: BatchCall[],\n settlementCallCaps: bigint[],\n coProposers: CoProposer[] = [],\n): Promise<{ hash: Hex; proposalId: bigint }> {\n // Fail here rather than as an on-chain `CallCapsLengthMismatch` — the\n // governor's revert names the mismatch but not which batch, and a caller that\n // built the arrays in different places will not know.\n if (executeCallCaps.length !== executeCalls.length) {\n throw new Error(\n `executeCallCaps has ${executeCallCaps.length} entries for ${executeCalls.length} execute calls — every call must declare exactly one cap`,\n );\n }\n if (settlementCallCaps.length !== settlementCalls.length) {\n throw new Error(\n `settlementCallCaps has ${settlementCallCaps.length} entries for ${settlementCalls.length} settlement calls — every call must declare exactly one cap`,\n );\n }\n\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"propose\",\n args: [\n vault,\n strategy,\n metadataURI,\n strategyDuration,\n { maxCapital: envelope.maxCapital, maxDrawdownBps: envelope.maxDrawdownBps },\n executeCalls,\n executeCallCaps,\n settlementCalls,\n settlementCallCaps,\n coProposers,\n ],\n });\n\n const receipt = await waitForReceipt(hash);\n\n // Parse proposalId from the ProposalCreated event in the receipt logs.\n // Falls back to proposalCount() if event parsing fails.\n let proposalId = parseProposalIdFromLogs(receipt.logs);\n if (proposalId === undefined) {\n try {\n proposalId = await proposalCount(vault);\n } catch {\n proposalId = 0n;\n }\n }\n\n return { hash: receipt.transactionHash, proposalId };\n}\n\nexport async function vote(vault: Address, proposalId: bigint, support: number): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"vote\",\n args: [proposalId, support],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function executeProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"executeProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\n/**\n * Walk a proposal's executeCalls and pick the strategy clone — the\n * target of the call whose selector matches `BaseStrategy.execute()`\n * (0x61461954). This is the canonical entry point that every Sherwood\n * strategy template inherits from BaseStrategy, so it's a reliable\n * marker even across template families (Moonwell / Aerodrome /\n * Hyperliquid / Mamo / Venice / Portfolio).\n *\n * Returns null when no execute() call is present (e.g. proposals that\n * only do approves and direct ERC-20 transfers without a strategy).\n */\nexport function detectStrategyAdapter(\n calls: { target: Address; data: Hex; value: bigint }[],\n): Address | null {\n const STRATEGY_EXECUTE_SELECTOR = \"0x61461954\";\n for (const call of calls) {\n if (call.data.slice(0, 10).toLowerCase() === STRATEGY_EXECUTE_SELECTOR) {\n return call.target;\n }\n }\n return null;\n}\n\nexport async function settleProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"settleProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function emergencySettle(vault: Address, proposalId: bigint, calls: BatchCall[]): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"emergencySettleWithCalls\",\n args: [proposalId, calls],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function cancelProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"cancelProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\n/**\n * Reclaim the proposer bond a proposal locked in `ProposerBondEscrow`.\n *\n * Permissionless on-chain (`SyndicateGovernor.reclaimProposerBond`): the escrow\n * pays back whoever posted the bond, so a keeper can unstick it for the\n * proposer. Accepts Rejected / Expired / Cancelled / Settled; a proposal that\n * never executed skips the challenge-window gates and releases immediately.\n */\nexport async function reclaimProposerBond(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"reclaimProposerBond\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function emergencyCancel(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"emergencyCancel\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\n// ── Parameter setters ──\n//\n// Per-vault governor: governance parameters are per-vault now, set by the\n// VAULT OWNER on that vault's governor. Setters revert with\n// `ParamsFrozenDuringProposal` while any proposal is open on the vault.\n\ntype GovernorParamSetter =\n | \"setVotingPeriod\"\n | \"setExecutionWindow\"\n | \"setVetoThresholdBps\"\n | \"setMaxPerformanceFeeBps\"\n | \"setMaxStrategyDuration\"\n | \"setCooldownPeriod\";\n\nasync function setGovernorParam(\n vault: Address,\n functionName: GovernorParamSetter,\n value: bigint,\n): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName,\n args: [value],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function setVotingPeriod(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setVotingPeriod\", seconds);\n}\n\nexport async function setExecutionWindow(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setExecutionWindow\", seconds);\n}\n\nexport async function setVetoThresholdBps(vault: Address, bps: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setVetoThresholdBps\", bps);\n}\n\nexport async function setMaxPerformanceFeeBps(vault: Address, bps: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setMaxPerformanceFeeBps\", bps);\n}\n\nexport async function setMaxStrategyDuration(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setMaxStrategyDuration\", seconds);\n}\n\nexport async function setCooldownPeriod(vault: Address, seconds: bigint): Promise<Hex> {\n return setGovernorParam(vault, \"setCooldownPeriod\", seconds);\n}\n\nexport async function vetoProposal(vault: Address, proposalId: bigint): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getGovernorOf(vault),\n abi: SYNDICATE_GOVERNOR_ABI,\n functionName: \"vetoProposal\",\n args: [proposalId],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\n// ── ProtocolConfig fee-split setters (protocol-owner only) ──\n//\n// Post-audit ProtocolConfig holds no per-rate protocol fee — the two-number\n// model exposes the SPLITS of the management and performance fees instead,\n// on the protocol-wide config (resolved via `factory.protocolConfig()`).\n\nexport interface MgmtSplit {\n agentBps: number;\n protocolBps: number;\n guardianBps: number;\n}\n\nexport interface PerfSplit extends MgmtSplit {\n ownerBps: number;\n}\n\nexport async function setMgmtSplit(s: MgmtSplit): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getProtocolConfigAddress(),\n abi: PROTOCOL_CONFIG_ABI,\n functionName: \"setMgmtSplit\",\n args: [s],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n\nexport async function setPerfSplit(s: PerfSplit): Promise<Hex> {\n const hash = await writeContractWithRetry({\n account: getAccount(),\n chain: getChain(),\n address: await getProtocolConfigAddress(),\n abi: PROTOCOL_CONFIG_ABI,\n functionName: \"setPerfSplit\",\n args: [s],\n });\n const receipt = await waitForReceipt(hash);\n return receipt.transactionHash;\n}\n","/**\n * AUTO-GENERATED by cli/scripts/codegen-contracts.ts — do not edit.\n * Regenerate: npm run codegen (in cli/)\n *\n * Source of truth: sherwood-protocol src/interfaces/ISyndicateGovernor.sol (enum ProposalState)\n */\n\n/** On-chain `ProposalState` member names, index === Solidity enum value. */\nexport const PROPOSAL_STATES = [\n \"Draft\",\n \"Pending\",\n \"GuardianReview\",\n \"Approved\",\n \"Rejected\",\n \"Expired\",\n \"Executed\",\n \"Settled\",\n \"Cancelled\",\n] as const;\n\nexport type ProposalStateName = (typeof PROPOSAL_STATES)[number];\n\n/** Name → Solidity enum value. */\nexport const PROPOSAL_STATE = {\n Draft: 0,\n Pending: 1,\n GuardianReview: 2,\n Approved: 3,\n Rejected: 4,\n Expired: 5,\n Executed: 6,\n Settled: 7,\n Cancelled: 8,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,SAAS,sBAAsB;;;ACNxB,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKO,IAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,WAAW;AACb;;;AD8EO,IAAM,YAAY;AAAA,EACvB,KAAK;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AACX;AAyCO,SAAS,oBAAoB,MAKpB;AACd,QAAM,EAAE,OAAO,WAAW,WAAW,IAAI,IAAI;AAC7C,MAAI,UAAU,eAAe,SAAU,QAAO,EAAE,MAAM,OAAO;AAC7D,MAAI,UAAU,eAAe,gBAAgB;AAC3C,QAAI,OAAO,UAAW,QAAO,EAAE,MAAM,qBAAqB;AAC1D,QAAI,MAAM,UAAW,QAAO,EAAE,MAAM,iBAAiB;AACrD,WAAO,EAAE,MAAM,oBAAoB;AAAA,EACrC;AACA,SAAO,EAAE,MAAM,eAAe;AAChC;AAeO,SAAS,eAAe,MAKR;AACrB,QAAM,EAAE,QAAQ,UAAU,WAAW,IAAI,IAAI;AAC7C,QAAM,aAAa,YAAY,MAAM,OAAO;AAC5C,MAAI,CAAC,cAAc,SAAU,QAAO;AACpC,SAAO,SAAS,eAAe;AACjC;AAgBO,SAAS,mBAAmB,MAMf;AAClB,QAAM,EAAE,QAAQ,UAAU,SAAS,WAAW,IAAI,IAAI;AAGtD,QAAM,aAAa,UAAU,M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+
} from "./chunk-BH3VTJ4F.js";
|
|
4
4
|
import {
|
|
5
5
|
TOKENS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWQESFFM.js";
|
|
7
7
|
import {
|
|
8
8
|
GAS_UNITS,
|
|
9
9
|
estimateGasCushion,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getWalletClient,
|
|
13
13
|
waitForReceipt,
|
|
14
14
|
writeContractWithRetry
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
16
16
|
import {
|
|
17
17
|
getChain
|
|
18
18
|
} from "./chunk-G3FUEM5N.js";
|
|
@@ -557,4 +557,4 @@ export {
|
|
|
557
557
|
registerAgent,
|
|
558
558
|
getVaultInfo
|
|
559
559
|
};
|
|
560
|
-
//# sourceMappingURL=chunk-
|
|
560
|
+
//# sourceMappingURL=chunk-N2E2Q5GL.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
TOKENS,
|
|
8
8
|
UNISWAP,
|
|
9
9
|
VENICE
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FWQESFFM.js";
|
|
11
11
|
import {
|
|
12
12
|
getPublicClient
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
14
14
|
import {
|
|
15
15
|
getNetwork
|
|
16
16
|
} from "./chunk-G3FUEM5N.js";
|
|
@@ -1614,4 +1614,4 @@ export {
|
|
|
1614
1614
|
applySlippage,
|
|
1615
1615
|
encodeSwapPath
|
|
1616
1616
|
};
|
|
1617
|
-
//# sourceMappingURL=chunk-
|
|
1617
|
+
//# sourceMappingURL=chunk-QFGZQYZA.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EAS_CONTRACTS,
|
|
3
3
|
EAS_SCHEMAS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FWQESFFM.js";
|
|
5
5
|
import {
|
|
6
6
|
getAccount,
|
|
7
7
|
getPublicClient,
|
|
8
8
|
waitForReceipt,
|
|
9
9
|
writeContractWithRetry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
11
11
|
import {
|
|
12
12
|
CHAIN_REGISTRY,
|
|
13
13
|
getChain,
|
|
@@ -488,4 +488,4 @@ export {
|
|
|
488
488
|
queryApprovals,
|
|
489
489
|
queryJoinRequests
|
|
490
490
|
};
|
|
491
|
-
//# sourceMappingURL=chunk-
|
|
491
|
+
//# sourceMappingURL=chunk-SI65QHTY.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COORDINATION_NETWORK
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SI65QHTY.js";
|
|
4
4
|
import {
|
|
5
5
|
AGENT_REGISTRY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWQESFFM.js";
|
|
7
7
|
import {
|
|
8
8
|
formatContractError,
|
|
9
9
|
getAccount,
|
|
10
10
|
getPublicClient,
|
|
11
11
|
sendTxWithRetry,
|
|
12
12
|
waitForReceipt
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
14
14
|
import {
|
|
15
15
|
getChain,
|
|
16
16
|
withNetwork
|
|
@@ -2913,9 +2913,7 @@ function registerIdentityCommands(program) {
|
|
|
2913
2913
|
}
|
|
2914
2914
|
|
|
2915
2915
|
export {
|
|
2916
|
-
|
|
2917
|
-
isCalldataOnly,
|
|
2918
|
-
emitCalldata,
|
|
2916
|
+
STRATEGY_FACTORY_ABI,
|
|
2919
2917
|
encodeDeposit,
|
|
2920
2918
|
encodeRedeem,
|
|
2921
2919
|
encodeApproveDepositor,
|
|
@@ -2931,12 +2929,18 @@ export {
|
|
|
2931
2929
|
encodeMgmtSplit,
|
|
2932
2930
|
encodePerfSplit,
|
|
2933
2931
|
encodeCreateFund,
|
|
2932
|
+
predictStrategyCloneAddress,
|
|
2933
|
+
deriveStrategySalt,
|
|
2934
|
+
effectiveStrategySalt,
|
|
2934
2935
|
encodeStrategyDeploy,
|
|
2935
2936
|
encodeJoinRequest,
|
|
2936
2937
|
encodeApproveAgent,
|
|
2937
2938
|
encodeGuardianStake,
|
|
2938
2939
|
encodeGuardianUnstake,
|
|
2939
2940
|
encodeVoteOnProposal,
|
|
2941
|
+
setCalldataOnly,
|
|
2942
|
+
isCalldataOnly,
|
|
2943
|
+
emitCalldata,
|
|
2940
2944
|
DEFAULT_ISSUING_CHAIN_ID,
|
|
2941
2945
|
appendVidTag,
|
|
2942
2946
|
parseVidTag,
|
|
@@ -2947,4 +2951,4 @@ export {
|
|
|
2947
2951
|
lookupAgentIdByWallet,
|
|
2948
2952
|
registerIdentityCommands
|
|
2949
2953
|
};
|
|
2950
|
-
//# sourceMappingURL=chunk-
|
|
2954
|
+
//# sourceMappingURL=chunk-VYCLG5DE.js.map
|