@sherwoodagent/cli 0.86.1 → 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/{abis-WVW2EBI3.js → abis-WJQ6IVYV.js} +2 -2
- package/dist/{agent-TBLC3WNJ.js → agent-FCGZL4GF.js} +7 -7
- package/dist/{chat-ETZSKQDI.js → chat-AKLYUJZV.js} +8 -8
- package/dist/{chunk-ZN2MHIB7.js → chunk-4ITTHKRX.js} +5 -5
- package/dist/{chunk-EVUKJ7CJ.js → chunk-6D3FNU75.js} +5 -5
- package/dist/{chunk-45FELUWY.js → chunk-6SAE2VDK.js} +2 -2
- package/dist/{chunk-EA65CDQH.js → chunk-BH3VTJ4F.js} +14 -23
- package/dist/chunk-BH3VTJ4F.js.map +1 -0
- package/dist/{chunk-QRMZRAMG.js → chunk-D4BSBW3Q.js} +221 -10
- package/dist/chunk-D4BSBW3Q.js.map +1 -0
- package/dist/{chunk-KVB5P2OE.js → chunk-EEI6FRTE.js} +2 -2
- package/dist/{chunk-IAM4VIU2.js → chunk-FWQESFFM.js} +18 -41
- package/dist/chunk-FWQESFFM.js.map +1 -0
- package/dist/{chunk-PVTZMRC6.js → chunk-G3FUEM5N.js} +2 -2
- package/dist/chunk-G3FUEM5N.js.map +1 -0
- package/dist/{chunk-YAS52NEF.js → chunk-G5MXVAFC.js} +18 -5
- package/dist/chunk-G5MXVAFC.js.map +1 -0
- package/dist/{chunk-F3MDCUGO.js → chunk-J2IZWAEW.js} +75 -227
- package/dist/chunk-J2IZWAEW.js.map +1 -0
- package/dist/{chunk-XPVXNG2K.js → chunk-N2E2Q5GL.js} +6 -6
- package/dist/{chunk-3IAZQMAW.js → chunk-QFGZQYZA.js} +29 -82
- package/dist/chunk-QFGZQYZA.js.map +1 -0
- package/dist/{chunk-OUYMZ5ZC.js → chunk-SI65QHTY.js} +5 -5
- package/dist/{chunk-6QBGTX2Q.js → chunk-VYCLG5DE.js} +264 -487
- package/dist/chunk-VYCLG5DE.js.map +1 -0
- package/dist/{client-3SE632Q2.js → client-PYFE6YQR.js} +3 -3
- package/dist/{eas-KMDAMLXW.js → eas-DV3Z7AT3.js} +6 -6
- package/dist/{governor-JNSWPJVQ.js → governor-QFBN6RYS.js} +8 -6
- package/dist/identity-M4TXM7EX.js +18 -0
- package/dist/index.js +352 -355
- package/dist/index.js.map +1 -1
- package/dist/{network-FEHRFDPJ.js → network-7445KSCF.js} +2 -2
- package/dist/{price-YNPYE2EO.js → price-EXZDYVDD.js} +6 -6
- package/dist/{providers-BMOHHVUN.js → providers-6UZKDFQD.js} +4 -4
- package/dist/{research-W74PNYPO.js → research-44GHYE4H.js} +7 -7
- package/dist/{session-HVRZ6AJM.js → session-45NQAHFI.js} +14 -12
- package/dist/session-45NQAHFI.js.map +1 -0
- package/dist/{trade-EOQY72L7.js → trade-FO52SP62.js} +15 -15
- package/dist/{vault-HWJQJW5U.js → vault-WWGSRNRP.js} +8 -8
- package/dist/{xmtp-KW73BGVO.js → xmtp-72IRK7JL.js} +6 -6
- package/package.json +1 -1
- package/dist/chunk-3IAZQMAW.js.map +0 -1
- package/dist/chunk-6QBGTX2Q.js.map +0 -1
- package/dist/chunk-EA65CDQH.js.map +0 -1
- package/dist/chunk-F3MDCUGO.js.map +0 -1
- package/dist/chunk-IAM4VIU2.js.map +0 -1
- package/dist/chunk-PVTZMRC6.js.map +0 -1
- package/dist/chunk-QRMZRAMG.js.map +0 -1
- package/dist/chunk-YAS52NEF.js.map +0 -1
- package/dist/identity-ATWV2O7Y.js +0 -15
- package/dist/session-HVRZ6AJM.js.map +0 -1
- /package/dist/{abis-WVW2EBI3.js.map → abis-WJQ6IVYV.js.map} +0 -0
- /package/dist/{agent-TBLC3WNJ.js.map → agent-FCGZL4GF.js.map} +0 -0
- /package/dist/{chat-ETZSKQDI.js.map → chat-AKLYUJZV.js.map} +0 -0
- /package/dist/{chunk-ZN2MHIB7.js.map → chunk-4ITTHKRX.js.map} +0 -0
- /package/dist/{chunk-EVUKJ7CJ.js.map → chunk-6D3FNU75.js.map} +0 -0
- /package/dist/{chunk-45FELUWY.js.map → chunk-6SAE2VDK.js.map} +0 -0
- /package/dist/{chunk-KVB5P2OE.js.map → chunk-EEI6FRTE.js.map} +0 -0
- /package/dist/{chunk-XPVXNG2K.js.map → chunk-N2E2Q5GL.js.map} +0 -0
- /package/dist/{chunk-OUYMZ5ZC.js.map → chunk-SI65QHTY.js.map} +0 -0
- /package/dist/{client-3SE632Q2.js.map → client-PYFE6YQR.js.map} +0 -0
- /package/dist/{eas-KMDAMLXW.js.map → eas-DV3Z7AT3.js.map} +0 -0
- /package/dist/{governor-JNSWPJVQ.js.map → governor-QFBN6RYS.js.map} +0 -0
- /package/dist/{identity-ATWV2O7Y.js.map → identity-M4TXM7EX.js.map} +0 -0
- /package/dist/{network-FEHRFDPJ.js.map → network-7445KSCF.js.map} +0 -0
- /package/dist/{price-YNPYE2EO.js.map → price-EXZDYVDD.js.map} +0 -0
- /package/dist/{providers-BMOHHVUN.js.map → providers-6UZKDFQD.js.map} +0 -0
- /package/dist/{research-W74PNYPO.js.map → research-44GHYE4H.js.map} +0 -0
- /package/dist/{trade-EOQY72L7.js.map → trade-FO52SP62.js.map} +0 -0
- /package/dist/{vault-HWJQJW5U.js.map → vault-WWGSRNRP.js.map} +0 -0
- /package/dist/{xmtp-KW73BGVO.js.map → xmtp-72IRK7JL.js.map} +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
SYNTHRA_QUOTER_ABI,
|
|
16
16
|
UNISWAP_QUOTER_V2_ABI,
|
|
17
17
|
VENICE_STAKING_ABI
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-J2IZWAEW.js";
|
|
19
19
|
export {
|
|
20
20
|
BASE_STRATEGY_ABI,
|
|
21
21
|
EAS_ABI,
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
UNISWAP_QUOTER_V2_ABI,
|
|
35
35
|
VENICE_STAKING_ABI
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=abis-
|
|
37
|
+
//# sourceMappingURL=abis-WJQ6IVYV.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
getResearchProvider,
|
|
14
14
|
isX402WalletFunded
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6SAE2VDK.js";
|
|
16
16
|
import {
|
|
17
17
|
HyperliquidProvider,
|
|
18
18
|
calculateATR,
|
|
@@ -29,9 +29,9 @@ import {
|
|
|
29
29
|
} from "./chunk-DBOINZYU.js";
|
|
30
30
|
import {
|
|
31
31
|
chatCompletion
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-EEI6FRTE.js";
|
|
33
|
+
import "./chunk-D4BSBW3Q.js";
|
|
34
|
+
import "./chunk-G3FUEM5N.js";
|
|
35
35
|
import {
|
|
36
36
|
getVeniceApiKey
|
|
37
37
|
} from "./chunk-3TZIOAPH.js";
|
|
@@ -5573,8 +5573,8 @@ var PortfolioTracker = class {
|
|
|
5573
5573
|
}
|
|
5574
5574
|
try {
|
|
5575
5575
|
const { createPublicClient, http } = await import("viem");
|
|
5576
|
-
const { getChain } = await import("./network-
|
|
5577
|
-
const { BASE_STRATEGY_ABI, SYNDICATE_VAULT_ABI } = await import("./abis-
|
|
5576
|
+
const { getChain } = await import("./network-7445KSCF.js");
|
|
5577
|
+
const { BASE_STRATEGY_ABI, SYNDICATE_VAULT_ABI } = await import("./abis-WJQ6IVYV.js");
|
|
5578
5578
|
void chain;
|
|
5579
5579
|
const client = createPublicClient({
|
|
5580
5580
|
chain: getChain(),
|
|
@@ -9550,4 +9550,4 @@ function formatFearGreed(value) {
|
|
|
9550
9550
|
export {
|
|
9551
9551
|
registerAgentCommands
|
|
9552
9552
|
};
|
|
9553
|
-
//# sourceMappingURL=agent-
|
|
9553
|
+
//# sourceMappingURL=agent-FCGZL4GF.js.map
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFund,
|
|
3
3
|
updateMetadata
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6D3FNU75.js";
|
|
5
5
|
import {
|
|
6
6
|
getTextRecord,
|
|
7
7
|
resolveFund,
|
|
8
8
|
setTextRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4ITTHKRX.js";
|
|
10
10
|
import {
|
|
11
11
|
ENS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FWQESFFM.js";
|
|
13
13
|
import {
|
|
14
14
|
formatContractError,
|
|
15
15
|
getAccount
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
17
|
+
import "./chunk-G3FUEM5N.js";
|
|
18
18
|
import {
|
|
19
19
|
cacheGroupId,
|
|
20
20
|
getCachedGroupId
|
|
21
21
|
} from "./chunk-3TZIOAPH.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-J2IZWAEW.js";
|
|
23
23
|
import {
|
|
24
24
|
fetchMetadata,
|
|
25
25
|
uploadMetadata
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import chalk from "chalk";
|
|
30
30
|
import ora from "ora";
|
|
31
31
|
async function loadXmtp() {
|
|
32
|
-
return import("./xmtp-
|
|
32
|
+
return import("./xmtp-72IRK7JL.js");
|
|
33
33
|
}
|
|
34
34
|
function formatTimestamp(date) {
|
|
35
35
|
return `${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}`;
|
|
@@ -563,4 +563,4 @@ function registerChatCommands(program) {
|
|
|
563
563
|
export {
|
|
564
564
|
registerChatCommands
|
|
565
565
|
};
|
|
566
|
-
//# sourceMappingURL=chat-
|
|
566
|
+
//# sourceMappingURL=chat-AKLYUJZV.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ENS,
|
|
3
3
|
SHERWOOD
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FWQESFFM.js";
|
|
5
5
|
import {
|
|
6
6
|
getPublicClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
8
8
|
import {
|
|
9
9
|
VALID_NETWORKS,
|
|
10
10
|
withNetwork
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G3FUEM5N.js";
|
|
12
12
|
import {
|
|
13
13
|
L2_REGISTRY_ABI,
|
|
14
14
|
SYNDICATE_FACTORY_ABI
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-J2IZWAEW.js";
|
|
16
16
|
|
|
17
17
|
// src/lib/ens.ts
|
|
18
18
|
import { namehash } from "viem/ens";
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
setTextRecord,
|
|
112
112
|
getTextRecord
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-4ITTHKRX.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-G3FUEM5N.js";
|
|
13
13
|
import {
|
|
14
14
|
SYNDICATE_FACTORY_ABI
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-J2IZWAEW.js";
|
|
16
16
|
|
|
17
17
|
// src/lib/factory.ts
|
|
18
18
|
import { decodeEventLog } from "viem";
|
|
@@ -144,4 +144,4 @@ export {
|
|
|
144
144
|
getActiveFunds,
|
|
145
145
|
updateMetadata
|
|
146
146
|
};
|
|
147
|
-
//# sourceMappingURL=chunk-
|
|
147
|
+
//# sourceMappingURL=chunk-6D3FNU75.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAccount
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/x402.ts
|
|
6
6
|
var _x402Fetch = null;
|
|
@@ -635,4 +635,4 @@ export {
|
|
|
635
635
|
NansenProvider,
|
|
636
636
|
getResearchProvider
|
|
637
637
|
};
|
|
638
|
-
//# sourceMappingURL=chunk-
|
|
638
|
+
//# sourceMappingURL=chunk-6SAE2VDK.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PROPOSAL_STATES,
|
|
3
3
|
getProposal
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G5MXVAFC.js";
|
|
5
5
|
import {
|
|
6
6
|
getPublicClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D4BSBW3Q.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveMetadataSummary
|
|
10
10
|
} from "./chunk-YMB4RJOR.js";
|
|
@@ -16,32 +16,18 @@ var VAULT_EVENTS = [
|
|
|
16
16
|
parseAbiItem("event AgentRegistered(uint256 indexed agentId, address indexed agentAddress)"),
|
|
17
17
|
parseAbiItem("event AgentRemoved(address indexed agentAddress)"),
|
|
18
18
|
parseAbiItem("event DepositorApproved(address indexed depositor)"),
|
|
19
|
-
parseAbiItem("event DepositorRemoved(address indexed depositor)")
|
|
20
|
-
parseAbiItem("event RedemptionsLockedEvent()"),
|
|
21
|
-
parseAbiItem("event RedemptionsUnlockedEvent()"),
|
|
22
|
-
// ISyndicateVault.SandboxRun — a proposal's sandbox was minted, funded and run.
|
|
23
|
-
// NAME COLLISION WARNING: ICallSandbox also declares a `SandboxRun` event with a
|
|
24
|
-
// DIFFERENT shape (SandboxRun(address,uint256,uint256), topic0 0x2638b671…) than
|
|
25
|
-
// this vault-side one (topic0 0x6fbfaa03…). Downstream consumers (the
|
|
26
|
-
// sherwood-monitor Hermes plugin) route by the `type` string, so ONLY the vault
|
|
27
|
-
// event may be emitted as "SandboxRun". If the ICallSandbox event is ever wired
|
|
28
|
-
// here, it MUST get a distinct type string (e.g. "CallSandboxRun").
|
|
29
|
-
parseAbiItem("event SandboxRun(uint256 indexed pid, address indexed sandbox, uint256 funding)")
|
|
19
|
+
parseAbiItem("event DepositorRemoved(address indexed depositor)")
|
|
30
20
|
];
|
|
31
21
|
var GOVERNOR_EVENTS = [
|
|
32
22
|
parseAbiItem("event ProposalCreated(uint256 indexed proposalId, address indexed proposer, address indexed vault, uint256 performanceFeeBps, uint256 strategyDuration, uint256 executeCallCount, uint256 settlementCallCount, string metadataURI)"),
|
|
33
23
|
parseAbiItem("event VoteCast(uint256 indexed proposalId, address indexed voter, uint8 support, uint256 weight)"),
|
|
34
24
|
parseAbiItem("event ProposalExecuted(uint256 indexed proposalId, address indexed vault, uint256 capitalSnapshot)"),
|
|
35
25
|
parseAbiItem("event ProposalSettled(uint256 indexed proposalId, address indexed vault, int256 pnl, uint256 performanceFee, uint256 duration)"),
|
|
36
|
-
parseAbiItem("event ProposalCancelled(uint256 indexed proposalId, address indexed cancelledBy)")
|
|
37
|
-
// ISyndicateGovernor.SandboxPayloadStored — a proposeWithSandbox payload was
|
|
38
|
-
// stored for proposalId. The call set itself is not in the log (read it via
|
|
39
|
-
// `sandboxPayload`); the counts are the cheap off-chain signal.
|
|
40
|
-
parseAbiItem("event SandboxPayloadStored(uint256 indexed proposalId, uint256 funding, uint256 callCount, uint256 tokenCount)")
|
|
26
|
+
parseAbiItem("event ProposalCancelled(uint256 indexed proposalId, address indexed cancelledBy)")
|
|
41
27
|
];
|
|
42
28
|
var GUARDIAN_REGISTRY_EVENTS = [
|
|
43
|
-
parseAbiItem("event ReviewOpened(uint256 indexed proposalId, uint128 totalStakeAtOpen)"),
|
|
44
|
-
parseAbiItem("event ReviewResolved(uint256 indexed proposalId, bool blocked, uint256 slashedAmount)")
|
|
29
|
+
parseAbiItem("event ReviewOpened(address indexed governor, uint256 indexed proposalId, uint128 totalStakeAtOpen)"),
|
|
30
|
+
parseAbiItem("event ReviewResolved(address indexed governor, uint256 indexed proposalId, bool blocked, uint256 slashedAmount)")
|
|
45
31
|
];
|
|
46
32
|
var STAKED_WOOD_EVENTS = [
|
|
47
33
|
parseAbiItem("event GuardianSlashed(bytes32 indexed reviewKey, address indexed approver, uint256 ownSlash, uint256 delegatedSlash)")
|
|
@@ -114,7 +100,7 @@ async function getGovernorEvents(governorAddress, vaultAddress, fromBlock, toBlo
|
|
|
114
100
|
return logToChainEvent(log, eventName);
|
|
115
101
|
});
|
|
116
102
|
}
|
|
117
|
-
async function getGuardianRegistryEvents(registryAddress, fromBlock, toBlock) {
|
|
103
|
+
async function getGuardianRegistryEvents(registryAddress, fromBlock, toBlock, governor) {
|
|
118
104
|
if (registryAddress === "0x0000000000000000000000000000000000000000") {
|
|
119
105
|
return [];
|
|
120
106
|
}
|
|
@@ -124,7 +110,12 @@ async function getGuardianRegistryEvents(registryAddress, fromBlock, toBlock) {
|
|
|
124
110
|
fromBlock,
|
|
125
111
|
toBlock
|
|
126
112
|
});
|
|
127
|
-
|
|
113
|
+
const want = governor?.toLowerCase();
|
|
114
|
+
return logs.filter((log) => {
|
|
115
|
+
if (!want) return true;
|
|
116
|
+
const args = log.args;
|
|
117
|
+
return !args?.governor || args.governor.toLowerCase() === want;
|
|
118
|
+
}).map((log) => {
|
|
128
119
|
const eventName = log.eventName || "UnknownGuardianRegistryEvent";
|
|
129
120
|
return logToChainEvent(log, eventName);
|
|
130
121
|
});
|
|
@@ -221,4 +212,4 @@ export {
|
|
|
221
212
|
getCurrentBlock,
|
|
222
213
|
enrichProposalEvents
|
|
223
214
|
};
|
|
224
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-BH3VTJ4F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/events.ts"],"sourcesContent":["/**\n * On-chain event reader — fetches vault and governor events via viem getLogs.\n *\n * Uses HTTP RPC (no WebSocket needed). Block ranges are capped at 10,000\n * per call to avoid RPC timeouts (~83 minutes on Base at 2 blocks/sec).\n */\n\nimport type { Address, Log } from \"viem\";\nimport { parseAbiItem } from \"viem\";\nimport { getPublicClient } from \"./client.js\";\nimport { getProposal, PROPOSAL_STATES } from \"./governor.js\";\nimport { resolveMetadataSummary } from \"./ipfs.js\";\n\nconst MAX_BLOCK_RANGE = 10_000n;\n\n// ── Event signatures (parseAbiItem format for getLogs) ──\n\nexport const VAULT_EVENTS = [\n parseAbiItem(\"event AgentRegistered(uint256 indexed agentId, address indexed agentAddress)\"),\n parseAbiItem(\"event AgentRemoved(address indexed agentAddress)\"),\n parseAbiItem(\"event DepositorApproved(address indexed depositor)\"),\n parseAbiItem(\"event DepositorRemoved(address indexed depositor)\"),\n] as const;\n\nexport const GOVERNOR_EVENTS = [\n parseAbiItem(\"event ProposalCreated(uint256 indexed proposalId, address indexed proposer, address indexed vault, uint256 performanceFeeBps, uint256 strategyDuration, uint256 executeCallCount, uint256 settlementCallCount, string metadataURI)\"),\n parseAbiItem(\"event VoteCast(uint256 indexed proposalId, address indexed voter, uint8 support, uint256 weight)\"),\n parseAbiItem(\"event ProposalExecuted(uint256 indexed proposalId, address indexed vault, uint256 capitalSnapshot)\"),\n parseAbiItem(\"event ProposalSettled(uint256 indexed proposalId, address indexed vault, int256 pnl, uint256 performanceFee, uint256 duration)\"),\n parseAbiItem(\"event ProposalCancelled(uint256 indexed proposalId, address indexed cancelledBy)\"),\n] as const;\n\n// IGuardianRegistry — guardian review lifecycle for proposals.\n// Every proposal-keyed event leads with `address indexed governor`: the\n// registry serves every per-vault governor, so a proposalId alone is\n// ambiguous. Dropping the governor topic here silently mixes reviews from\n// unrelated vaults into one stream.\nexport const GUARDIAN_REGISTRY_EVENTS = [\n parseAbiItem(\"event ReviewOpened(address indexed governor, uint256 indexed proposalId, uint128 totalStakeAtOpen)\"),\n parseAbiItem(\"event ReviewResolved(address indexed governor, uint256 indexed proposalId, bool blocked, uint256 slashedAmount)\"),\n] as const;\n\n// StakedWood — approver slashes for blocked proposals.\nexport const STAKED_WOOD_EVENTS = [\n parseAbiItem(\"event GuardianSlashed(bytes32 indexed reviewKey, address indexed approver, uint256 ownSlash, uint256 delegatedSlash)\"),\n] as const;\n\n/** Normalized event returned by the session check. */\nexport interface ChainEvent {\n source: \"chain\";\n type: string;\n block: number;\n tx: string;\n args: Record<string, string>;\n}\n\nfunction logToChainEvent(log: Log, eventName: string): ChainEvent {\n const args: Record<string, string> = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const decoded = (log as any).args;\n if (decoded) {\n for (const [key, value] of Object.entries(decoded)) {\n args[key] = String(value);\n }\n }\n\n return {\n source: \"chain\",\n type: eventName,\n block: Number(log.blockNumber),\n tx: log.transactionHash || \"\",\n args,\n };\n}\n\n/**\n * Fetch events in chunks to stay within RPC limits.\n * Returns all logs from `fromBlock` to `toBlock` inclusive.\n * Exported for reuse (e.g. vault.ts getNetDeposited's 0→latest scan).\n */\nexport async function getLogsChunked(params: {\n address: Address;\n events: readonly ReturnType<typeof parseAbiItem>[];\n fromBlock: bigint;\n toBlock: bigint;\n}): Promise<Log[]> {\n const client = getPublicClient();\n const { address, events, fromBlock, toBlock } = params;\n\n const allLogs: Log[] = [];\n let cursor = fromBlock;\n\n while (cursor <= toBlock) {\n const end =\n cursor + MAX_BLOCK_RANGE - 1n > toBlock\n ? toBlock\n : cursor + MAX_BLOCK_RANGE - 1n;\n\n const logs = await client.getLogs({\n address,\n events: events as never,\n fromBlock: cursor,\n toBlock: end,\n });\n\n allLogs.push(...logs);\n cursor = end + 1n;\n }\n\n return allLogs;\n}\n\n/** Fetch vault events (AgentRegistered, Ragequit, etc.) */\nexport async function getVaultEvents(\n vaultAddress: Address,\n fromBlock: bigint,\n toBlock: bigint,\n): Promise<ChainEvent[]> {\n const logs = await getLogsChunked({\n address: vaultAddress,\n events: VAULT_EVENTS,\n fromBlock,\n toBlock,\n });\n\n return logs.map((log) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const eventName = (log as any).eventName || \"UnknownVaultEvent\";\n return logToChainEvent(log, eventName);\n });\n}\n\n/** Fetch governor events filtered to a specific vault. */\nexport async function getGovernorEvents(\n governorAddress: Address,\n vaultAddress: Address,\n fromBlock: bigint,\n toBlock: bigint,\n): Promise<ChainEvent[]> {\n if (governorAddress === \"0x0000000000000000000000000000000000000000\") {\n return []; // Governor not deployed yet\n }\n\n const logs = await getLogsChunked({\n address: governorAddress,\n events: GOVERNOR_EVENTS,\n fromBlock,\n toBlock,\n });\n\n // Filter governor events to only those involving our vault\n return logs\n .filter((log) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const args = (log as any).args;\n if (!args) return true;\n // ProposalCreated, ProposalExecuted, ProposalSettled have `vault` in args\n if (args.vault) {\n return (args.vault as string).toLowerCase() === vaultAddress.toLowerCase();\n }\n // VoteCast, ProposalCancelled don't have vault — include them\n // (agents care about all votes/cancellations on their governor)\n return true;\n })\n .map((log) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const eventName = (log as any).eventName || \"UnknownGovernorEvent\";\n return logToChainEvent(log, eventName);\n });\n}\n\n/**\n * Fetch guardian review events (ReviewOpened, ReviewResolved) from the\n * GuardianRegistry. Returns [] when the registry is not deployed (zero address).\n *\n * The registry serves every per-vault governor, and a proposalId is only\n * unique within one — so pass `governor` to keep another vault's reviews out\n * of the stream. Omitting it returns every review on the chain's registry.\n */\nexport async function getGuardianRegistryEvents(\n registryAddress: Address,\n fromBlock: bigint,\n toBlock: bigint,\n governor?: Address,\n): Promise<ChainEvent[]> {\n if (registryAddress === \"0x0000000000000000000000000000000000000000\") {\n return []; // GuardianRegistry not deployed on this chain\n }\n\n const logs = await getLogsChunked({\n address: registryAddress,\n events: GUARDIAN_REGISTRY_EVENTS,\n fromBlock,\n toBlock,\n });\n\n const want = governor?.toLowerCase();\n return logs\n .filter((log) => {\n if (!want) return true;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const args = (log as any).args;\n return !args?.governor || (args.governor as string).toLowerCase() === want;\n })\n .map((log) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const eventName = (log as any).eventName || \"UnknownGuardianRegistryEvent\";\n return logToChainEvent(log, eventName);\n });\n}\n\n/**\n * Fetch guardian slash events (GuardianSlashed) from StakedWood.\n * Returns [] when sWOOD is not deployed (zero address).\n */\nexport async function getStakedWoodEvents(\n stakedWoodAddress: Address,\n fromBlock: bigint,\n toBlock: bigint,\n): Promise<ChainEvent[]> {\n if (stakedWoodAddress === \"0x0000000000000000000000000000000000000000\") {\n return []; // StakedWood not deployed on this chain\n }\n\n const logs = await getLogsChunked({\n address: stakedWoodAddress,\n events: STAKED_WOOD_EVENTS,\n fromBlock,\n toBlock,\n });\n\n return logs.map((log) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const eventName = (log as any).eventName || \"UnknownStakedWoodEvent\";\n return logToChainEvent(log, eventName);\n });\n}\n\n/** Get current block number from the RPC. */\nexport async function getCurrentBlock(): Promise<bigint> {\n const client = getPublicClient();\n return client.getBlockNumber();\n}\n\n// ── Proposal event enrichment ──\n\nconst PROPOSAL_EVENT_TYPES = new Set([\n \"ProposalCreated\",\n \"VoteCast\",\n \"ProposalExecuted\",\n \"ProposalSettled\",\n \"ProposalCancelled\",\n]);\n\n/**\n * Enrich proposal-related events with IPFS metadata (name, description)\n * and current on-chain state. Best-effort — events are returned un-enriched\n * if RPC or IPFS calls fail.\n *\n * `vault` identifies which per-vault governor to read proposal state from\n * (proposal IDs are scoped to a vault's governor in the per-vault design).\n *\n * An optional metadataCache avoids redundant IPFS fetches across poll cycles\n * in streaming mode (proposal metadata is immutable once pinned).\n */\nexport async function enrichProposalEvents(\n vault: Address,\n events: ChainEvent[],\n metadataCache?: Map<string, { name: string; description: string }>,\n): Promise<ChainEvent[]> {\n const cache = metadataCache ?? new Map<string, { name: string; description: string }>();\n\n const proposalEvents = events.filter((e) => PROPOSAL_EVENT_TYPES.has(e.type));\n if (proposalEvents.length === 0) return events;\n\n // Collect unique proposalIds and their metadata sources\n const idsNeedingLookup = new Set<string>();\n const createdURIs = new Map<string, string>(); // proposalId → metadataURI from event args\n\n for (const event of proposalEvents) {\n const pid = event.args.proposalId;\n if (!pid) continue;\n\n if (event.type === \"ProposalCreated\" && event.args.metadataURI) {\n createdURIs.set(pid, event.args.metadataURI);\n } else if (!cache.has(pid)) {\n idsNeedingLookup.add(pid);\n }\n }\n\n // Fetch on-chain proposal data for non-Created events (parallel, deduplicated)\n const proposalData = new Map<string, { metadataURI: string; state: number }>();\n\n await Promise.all(\n Array.from(idsNeedingLookup).map(async (pid) => {\n try {\n const p = await getProposal(vault, BigInt(pid));\n proposalData.set(pid, { metadataURI: p.metadataURI, state: p.state });\n } catch {\n // RPC failure — skip enrichment for this proposalId\n }\n }),\n );\n\n // Resolve IPFS metadata (parallel, deduplicated, uses cache)\n const allURIs = new Map<string, string>();\n for (const [pid, uri] of createdURIs) allURIs.set(pid, uri);\n for (const [pid, data] of proposalData) {\n if (!allURIs.has(pid)) allURIs.set(pid, data.metadataURI);\n }\n\n await Promise.all(\n Array.from(allURIs.entries()).map(async ([pid, uri]) => {\n if (cache.has(pid) || !uri) return;\n const summary = await resolveMetadataSummary(uri);\n if (summary) cache.set(pid, summary);\n }),\n );\n\n // Inject enrichment fields into event args\n return events.map((event) => {\n if (!PROPOSAL_EVENT_TYPES.has(event.type)) return event;\n const pid = event.args.proposalId;\n if (!pid) return event;\n\n const meta = cache.get(pid);\n const pData = proposalData.get(pid);\n const enrichedArgs = { ...event.args };\n\n if (meta) {\n enrichedArgs.proposalName = meta.name;\n enrichedArgs.proposalDescription = meta.description;\n }\n\n if (event.type === \"ProposalCreated\") {\n enrichedArgs.proposalState = \"Pending\";\n } else if (pData) {\n enrichedArgs.proposalState = PROPOSAL_STATES[pData.state] || \"Unknown\";\n }\n\n return { ...event, args: enrichedArgs };\n });\n}\n"],"mappings":"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","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getChain,
|
|
3
3
|
getMinGasReserve,
|
|
4
4
|
getRpcUrls
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G3FUEM5N.js";
|
|
6
6
|
import {
|
|
7
7
|
requirePrivateKey
|
|
8
8
|
} from "./chunk-3TZIOAPH.js";
|
|
@@ -35,7 +35,6 @@ var CONTRACT_ERRORS_ABI = [
|
|
|
35
35
|
{ type: "error", name: "ZeroAddress", inputs: [] },
|
|
36
36
|
{ type: "error", name: "CannotRescueAsset", inputs: [] },
|
|
37
37
|
{ type: "error", name: "NotFactory", inputs: [] },
|
|
38
|
-
{ type: "error", name: "SandboxFundingExceedsCeiling", inputs: [{ name: "funding", type: "uint256" }, { name: "ceiling", type: "uint256" }] },
|
|
39
38
|
{ type: "error", name: "DisallowedBatchCallee", inputs: [{ name: "target", type: "address" }] },
|
|
40
39
|
// ── SyndicateGovernor ──
|
|
41
40
|
{ type: "error", name: "VaultNotRegistered", inputs: [] },
|
|
@@ -81,7 +80,6 @@ var CONTRACT_ERRORS_ABI = [
|
|
|
81
80
|
{ type: "error", name: "NotAuthorized", inputs: [] },
|
|
82
81
|
{ type: "error", name: "InvalidMaxCoProposers", inputs: [] },
|
|
83
82
|
{ type: "error", name: "Reentrancy", inputs: [] },
|
|
84
|
-
{ type: "error", name: "SandboxNotAvailable", inputs: [{ name: "vault", type: "address" }] },
|
|
85
83
|
{ type: "error", name: "Tier2CallCapExceedsCeiling", inputs: [{ name: "index", type: "uint256" }] },
|
|
86
84
|
// ── GovernorParameters (timelock) ──
|
|
87
85
|
{ type: "error", name: "ChangeAlreadyPending", inputs: [] },
|
|
@@ -130,9 +128,139 @@ var CONTRACT_ERRORS_ABI = [
|
|
|
130
128
|
// ── VeniceInferenceStrategy ──
|
|
131
129
|
{ type: "error", name: "NoAgent", inputs: [] },
|
|
132
130
|
// ── ExposureLedger ──
|
|
131
|
+
{ type: "error", name: "ApproveLockBelowFloor", inputs: [] },
|
|
132
|
+
{ type: "error", name: "CoverageInputsUnreadable", inputs: [] },
|
|
133
133
|
{ type: "error", name: "InsufficientApproveCoverage", inputs: [] },
|
|
134
134
|
// ── StakedWood ──
|
|
135
|
-
{ type: "error", name: "CoverageStillOpen", inputs: [] }
|
|
135
|
+
{ type: "error", name: "CoverageStillOpen", inputs: [] },
|
|
136
|
+
// ── SyndicateGovernor / GovernorEmergency — v1 additions
|
|
137
|
+
// (bond escrow, tier gates, strategy registration, settle-price floor) ──
|
|
138
|
+
{ type: "error", name: "CallCapsExceedMaxCapital", inputs: [] },
|
|
139
|
+
{ type: "error", name: "CallCapsLengthMismatch", inputs: [] },
|
|
140
|
+
{ type: "error", name: "CancelNotAllowedNearQuorum", inputs: [] },
|
|
141
|
+
{ type: "error", name: "ChallengeWindowOpen", inputs: [] },
|
|
142
|
+
{ type: "error", name: "CoProposerShareUnderflow", inputs: [] },
|
|
143
|
+
{ type: "error", name: "CoverageRegressed", inputs: [] },
|
|
144
|
+
{ type: "error", name: "EmergencyNotProposed", inputs: [] },
|
|
145
|
+
{ type: "error", name: "EmergencySettleBlocked", inputs: [] },
|
|
146
|
+
{ type: "error", name: "EmergencySettleNotReady", inputs: [] },
|
|
147
|
+
{ type: "error", name: "ExposureLedgerUnset", inputs: [] },
|
|
148
|
+
{ type: "error", name: "InvalidDrawdown", inputs: [] },
|
|
149
|
+
{ type: "error", name: "InvalidGuardianFeeBps", inputs: [] },
|
|
150
|
+
{ type: "error", name: "InvalidGuardiansFeeRecipient", inputs: [] },
|
|
151
|
+
{ type: "error", name: "InvalidInitialization", inputs: [] },
|
|
152
|
+
{ type: "error", name: "InvalidMaxCapitalBps", inputs: [] },
|
|
153
|
+
{ type: "error", name: "InvalidTier2CallCapBps", inputs: [] },
|
|
154
|
+
{ type: "error", name: "LedgerEscrowMismatch", inputs: [] },
|
|
155
|
+
{ type: "error", name: "MalformedAssetCall", inputs: [{ name: "selector", type: "bytes4" }] },
|
|
156
|
+
{ type: "error", name: "MaxCapitalCeilingRegressed", inputs: [] },
|
|
157
|
+
{ type: "error", name: "MaxCapitalExceedsCeiling", inputs: [] },
|
|
158
|
+
{ type: "error", name: "MetadataURITooLong", inputs: [] },
|
|
159
|
+
{ type: "error", name: "NoBondToReclaim", inputs: [] },
|
|
160
|
+
{ type: "error", name: "NotARegisteredStrategy", inputs: [{ name: "target", type: "address" }] },
|
|
161
|
+
{ type: "error", name: "NotInGuardianReview", inputs: [] },
|
|
162
|
+
{ type: "error", name: "NotInitializing", inputs: [] },
|
|
163
|
+
{ type: "error", name: "NotLeadProposer", inputs: [] },
|
|
164
|
+
{ type: "error", name: "OwnerBondInsufficient", inputs: [] },
|
|
165
|
+
{ type: "error", name: "OwnerBondNotLive", inputs: [] },
|
|
166
|
+
{ type: "error", name: "ParamsFrozenDuringProposal", inputs: [] },
|
|
167
|
+
{ type: "error", name: "ProposalInDraft", inputs: [] },
|
|
168
|
+
{ type: "error", name: "ProposalNotTerminal", inputs: [] },
|
|
169
|
+
{ type: "error", name: "RegistryNotSet", inputs: [] },
|
|
170
|
+
{ type: "error", name: "SettlePriceBelowFloor", inputs: [{ name: "ppsNow", type: "uint256" }, { name: "ppsFloor", type: "uint256" }] },
|
|
171
|
+
{ type: "error", name: "StrategyNotRegistered", inputs: [{ name: "strategy", type: "address" }] },
|
|
172
|
+
{ type: "error", name: "TierRegistryNotWired", inputs: [] },
|
|
173
|
+
{ type: "error", name: "TierRegressed", inputs: [] },
|
|
174
|
+
{ type: "error", name: "TooManyCalls", inputs: [] },
|
|
175
|
+
{ type: "error", name: "TransferFromNotVault", inputs: [{ name: "from", type: "address" }] },
|
|
176
|
+
{ type: "error", name: "VaultHasOpenProposal", inputs: [] },
|
|
177
|
+
{ type: "error", name: "VaultProposalActive", inputs: [] },
|
|
178
|
+
{ type: "error", name: "ZeroMaxCapital", inputs: [] },
|
|
179
|
+
// ── GuardianRegistry — review / emergency / pause lifecycle ──
|
|
180
|
+
{ type: "error", name: "AddressEmptyCode", inputs: [{ name: "target", type: "address" }] },
|
|
181
|
+
{ type: "error", name: "AlreadyPaused", inputs: [] },
|
|
182
|
+
{ type: "error", name: "CooldownBelowReviewPeriod", inputs: [] },
|
|
183
|
+
{ type: "error", name: "ERC1967InvalidImplementation", inputs: [{ name: "implementation", type: "address" }] },
|
|
184
|
+
{ type: "error", name: "ERC1967NonPayable", inputs: [] },
|
|
185
|
+
{ type: "error", name: "EmergencyAlreadyOpen", inputs: [] },
|
|
186
|
+
{ type: "error", name: "EmergencyHashMismatch", inputs: [] },
|
|
187
|
+
{ type: "error", name: "EmergencyTooManyCalls", inputs: [] },
|
|
188
|
+
{ type: "error", name: "FailedCall", inputs: [] },
|
|
189
|
+
{ type: "error", name: "InvalidParameter", inputs: [] },
|
|
190
|
+
{ type: "error", name: "InvalidReviewWindow", inputs: [] },
|
|
191
|
+
{ type: "error", name: "NewSideFull", inputs: [] },
|
|
192
|
+
{ type: "error", name: "NoVoteChange", inputs: [] },
|
|
193
|
+
{ type: "error", name: "NotActiveGuardian", inputs: [] },
|
|
194
|
+
{ type: "error", name: "NotPausedOrDeadmanNotElapsed", inputs: [] },
|
|
195
|
+
{ type: "error", name: "OwnableInvalidOwner", inputs: [{ name: "owner", type: "address" }] },
|
|
196
|
+
{ type: "error", name: "OwnableUnauthorizedAccount", inputs: [{ name: "account", type: "address" }] },
|
|
197
|
+
{ type: "error", name: "ProtocolPaused", inputs: [] },
|
|
198
|
+
{ type: "error", name: "ReentrancyGuardReentrantCall", inputs: [] },
|
|
199
|
+
{ type: "error", name: "RefundCapExceeded", inputs: [] },
|
|
200
|
+
{ type: "error", name: "ReviewAlreadyRegistered", inputs: [] },
|
|
201
|
+
{ type: "error", name: "ReviewNotOpen", inputs: [] },
|
|
202
|
+
{ type: "error", name: "ReviewNotReadyForResolve", inputs: [] },
|
|
203
|
+
{ type: "error", name: "SafeERC20FailedOperation", inputs: [{ name: "token", type: "address" }] },
|
|
204
|
+
{ type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] },
|
|
205
|
+
{ type: "error", name: "UUPSUnsupportedProxiableUUID", inputs: [{ name: "slot", type: "bytes32" }] },
|
|
206
|
+
{ type: "error", name: "UnauthorizedGovernor", inputs: [] },
|
|
207
|
+
{ type: "error", name: "VoteChangeLockedOut", inputs: [] },
|
|
208
|
+
// ── StakedWood (sWOOD) — staking, owner bonds, slashing ──
|
|
209
|
+
{ type: "error", name: "ApproverAlreadySlashed", inputs: [] },
|
|
210
|
+
{ type: "error", name: "BindingNotApproved", inputs: [] },
|
|
211
|
+
{ type: "error", name: "CheckpointUnorderedInsertion", inputs: [] },
|
|
212
|
+
{ type: "error", name: "DuplicateApprover", inputs: [] },
|
|
213
|
+
{ type: "error", name: "InsufficientStake", inputs: [] },
|
|
214
|
+
{ type: "error", name: "NoActiveStake", inputs: [] },
|
|
215
|
+
{ type: "error", name: "NotAuthorizedSlasher", inputs: [] },
|
|
216
|
+
{ type: "error", name: "NotRegistry", inputs: [] },
|
|
217
|
+
{ type: "error", name: "PreparedStakeAlreadyExists", inputs: [] },
|
|
218
|
+
{ type: "error", name: "PreparedStakeNotFound", inputs: [] },
|
|
219
|
+
{ type: "error", name: "PriorStakeNotCleared", inputs: [] },
|
|
220
|
+
{ type: "error", name: "RegistryAlreadySet", inputs: [] },
|
|
221
|
+
{ type: "error", name: "SlashBpsLengthMismatch", inputs: [] },
|
|
222
|
+
{ type: "error", name: "UnstakeAlreadyRequested", inputs: [] },
|
|
223
|
+
{ type: "error", name: "UnstakeNotRequested", inputs: [] },
|
|
224
|
+
{ type: "error", name: "VaultHasActiveProposal", inputs: [] },
|
|
225
|
+
{ type: "error", name: "VerdictNotPast", inputs: [] },
|
|
226
|
+
// ── StrategyFactory — clone + register ──
|
|
227
|
+
{ type: "error", name: "FailedDeployment", inputs: [] },
|
|
228
|
+
{ type: "error", name: "InsufficientBalance", inputs: [{ name: "balance", type: "uint256" }, { name: "needed", type: "uint256" }] },
|
|
229
|
+
{ type: "error", name: "InvalidSyndicateFactory", inputs: [] },
|
|
230
|
+
{ type: "error", name: "NotAStrategy", inputs: [{ name: "strategy", type: "address" }] },
|
|
231
|
+
{ type: "error", name: "ProposerMustBeSender", inputs: [] },
|
|
232
|
+
{ type: "error", name: "TemplateNotApproved", inputs: [{ name: "template", type: "address" }] },
|
|
233
|
+
// ── TierRegistry — strategy certification + submitter bonds ──
|
|
234
|
+
{ type: "error", name: "BondActive", inputs: [] },
|
|
235
|
+
{ type: "error", name: "BondConfigUnset", inputs: [] },
|
|
236
|
+
{ type: "error", name: "BondNotReleasable", inputs: [] },
|
|
237
|
+
{ type: "error", name: "BondPendingRelease", inputs: [] },
|
|
238
|
+
{ type: "error", name: "BondTooLarge", inputs: [] },
|
|
239
|
+
{ type: "error", name: "BondsOutstanding", inputs: [] },
|
|
240
|
+
{ type: "error", name: "BoundRequired", inputs: [] },
|
|
241
|
+
{ type: "error", name: "CertificationExpired", inputs: [] },
|
|
242
|
+
{ type: "error", name: "CertifyDelayNotElapsed", inputs: [] },
|
|
243
|
+
{ type: "error", name: "ClassNotCertified", inputs: [] },
|
|
244
|
+
{ type: "error", name: "CodehashChanged", inputs: [] },
|
|
245
|
+
{ type: "error", name: "CodehashMatches", inputs: [] },
|
|
246
|
+
{ type: "error", name: "InvalidDelay", inputs: [] },
|
|
247
|
+
{ type: "error", name: "InvalidStrategyFactory", inputs: [] },
|
|
248
|
+
{ type: "error", name: "InvalidTier", inputs: [] },
|
|
249
|
+
{ type: "error", name: "NoPendingCertification", inputs: [] },
|
|
250
|
+
{ type: "error", name: "NoPendingClassCertification", inputs: [] },
|
|
251
|
+
{ type: "error", name: "NotAContract", inputs: [] },
|
|
252
|
+
{ type: "error", name: "NotAuthorizedDemoter", inputs: [] },
|
|
253
|
+
{ type: "error", name: "NotCertified", inputs: [] },
|
|
254
|
+
{ type: "error", name: "NotSubmitter", inputs: [] },
|
|
255
|
+
{ type: "error", name: "TemplateCodehashChanged", inputs: [] },
|
|
256
|
+
{ type: "error", name: "ZeroAddressSubmitter", inputs: [] },
|
|
257
|
+
// ── ProposerBondEscrow — proposer bond custody ──
|
|
258
|
+
{ type: "error", name: "AmountTooLarge", inputs: [] },
|
|
259
|
+
{ type: "error", name: "BondAlreadyLocked", inputs: [] },
|
|
260
|
+
{ type: "error", name: "FeeBpsTooHigh", inputs: [] },
|
|
261
|
+
{ type: "error", name: "NoBond", inputs: [] },
|
|
262
|
+
{ type: "error", name: "NotAuthorizedConvictor", inputs: [] },
|
|
263
|
+
{ type: "error", name: "NotAuthorizedGovernor", inputs: [] }
|
|
136
264
|
];
|
|
137
265
|
var ERROR_MESSAGES = {
|
|
138
266
|
// Vault — permissions / state
|
|
@@ -156,7 +284,6 @@ var ERROR_MESSAGES = {
|
|
|
156
284
|
TransferFailed: "ERC-20 token transfer failed. Check token balance and approvals.",
|
|
157
285
|
ZeroAddress: "A required address parameter is the zero address.",
|
|
158
286
|
CannotRescueAsset: "Cannot rescue the vault's underlying asset \u2014 use redeem() instead.",
|
|
159
|
-
SandboxFundingExceedsCeiling: "Sandbox funding exceeds the live tier-2 per-call capital ceiling. Reduce funding to fit under the ceiling.",
|
|
160
287
|
DisallowedBatchCallee: "A governor-batch call targeted an address that is neither the vault's underlying asset nor a TierRegistry-allowlisted adapter.",
|
|
161
288
|
// Governor — proposal lifecycle
|
|
162
289
|
VaultNotRegistered: "This vault is not registered with the governor. The factory registers vaults automatically on creation.",
|
|
@@ -204,7 +331,6 @@ var ERROR_MESSAGES = {
|
|
|
204
331
|
NotAuthorized: "You are not authorized to perform this action.",
|
|
205
332
|
InvalidMaxCoProposers: "Max co-proposers value is outside allowed bounds.",
|
|
206
333
|
Reentrancy: "Reentrancy detected \u2014 this call cannot be made during another call.",
|
|
207
|
-
SandboxNotAvailable: "This vault has no CallSandbox implementation, so sandbox proposals cannot run. Use a vault created after sandbox wiring, or propose without a sandbox.",
|
|
208
334
|
Tier2CallCapExceedsCeiling: "A tier-2 call cap exceeds the vault's tier-2 per-call ceiling (totalAssets \xD7 tier2CallCapBps / 10_000). Lower that call's cap.",
|
|
209
335
|
// Governor — parameter timelock
|
|
210
336
|
ChangeAlreadyPending: "A parameter change is already pending for this parameter. Finalize or cancel it first.",
|
|
@@ -244,18 +370,103 @@ var ERROR_MESSAGES = {
|
|
|
244
370
|
QuoteUnavailable: "Uniswap quoter returned 0 or reverted for a portfolio allocation. Usually means: (a) no V3 pool exists at the requested fee tier for one of the tokens, (b) the strategy clone was initialized against an old/broken UniswapSwapAdapter (check the clone's swapAdapter() vs the current chains JSON), or (c) the adapter is calling Quoter with the wrong ABI (pre-PR #317 bug).",
|
|
245
371
|
UnsupportedMode: "UniswapSwapAdapter doesn't support that swap mode. Only V3 single-hop (mode 0) and multi-hop (mode 1) are supported.",
|
|
246
372
|
InvalidWeights: "Portfolio weights must sum to 10000 bps (100%).",
|
|
247
|
-
LengthMismatch: "Portfolio input arrays (tokens / weights / swapExtraData / priceDecimals) must have the same length.",
|
|
373
|
+
LengthMismatch: "Portfolio input arrays (tokens / weights / swapExtraData / priceDecimals / feeds) must have the same length.",
|
|
248
374
|
TooManyTokens: "Portfolio basket exceeds the maximum allocation count (20).",
|
|
249
375
|
RebalancingInProgress: "A rebalance is already in flight on this clone. Wait for it to finish.",
|
|
250
|
-
StalePrice: "Chainlink
|
|
376
|
+
StalePrice: "A Chainlink push feed read fail-closed because it is stale (or non-positive). Two sources share this selector: PortfolioStrategy on every execute/settle/rebalance price read (MAX_PUSH_PRICE_AGE = 26h), and ExposureLedger.coverageUsd on the vault asset at propose time (per-asset maxDelay). Wait for the feed to update, or drop that allocation.",
|
|
251
377
|
InvalidSlippage: "maxSlippageBps must be > 0 and < 10000.",
|
|
252
378
|
InvalidPriceDecimals: "priceDecimals entry exceeds 36. Use 8 for tokenized-stock feeds, 18 for crypto pairs.",
|
|
253
379
|
// Strategy — Venice
|
|
254
380
|
NoAgent: "No agent is registered on the vault. Register an agent first.",
|
|
255
381
|
// ExposureLedger
|
|
382
|
+
ApproveLockBelowFloor: "An approver slot costs min(ceil(need/100), your whole budget), valued in USD at vote time. Three ways to hit this: (1) the lock booked to zero \u2014 your free budget (k x stake minus open exposure) is used up, so close an open lock or wait for one to age out; (2) your budget values to zero \u2014 you have no slashable stake, or WOOD prices to zero right now; (3) what you declared is worth less than the floor \u2014 raise --lock-wood on `sherwood proposal review-vote`.",
|
|
383
|
+
CoverageInputsUnreadable: "The ledger could not read this proposal's coverage inputs (vault asset / required coverage). Usually there is no such proposal on that governor \u2014 an unknown id reads back a zero vault. Check the proposal id, and that the address really is this vault's governor.",
|
|
256
384
|
InsufficientApproveCoverage: "No bonded guardian coverage was raised for this proposal. Execution requires at least one identified, bonded approver with slashable coverage.",
|
|
257
385
|
// StakedWood
|
|
258
|
-
CoverageStillOpen: "Cannot release the unstake yet \u2014 this guardian still backs a proposal that could be challenged. The unstake request stays open; retry after coverage closes."
|
|
386
|
+
CoverageStillOpen: "Cannot release the unstake yet \u2014 this guardian still backs a proposal that could be challenged. The unstake request stays open; retry after coverage closes.",
|
|
387
|
+
// GuardianRegistry — review lifecycle
|
|
388
|
+
NotActiveGuardian: "Your wallet is not an active guardian at this review's snapshot. Vote weight is measured at `openedAt - 1`, so stake that landed in the same block the review opened counts as zero \u2014 and a guardian with a pending unstake request is not active at all. Check: sherwood guardian status",
|
|
389
|
+
ReviewNotOpen: "No guardian review is open for this proposal. It opens once the voting period ends (`openReview`), and closes at `reviewEnd`.",
|
|
390
|
+
ReviewNotReadyForResolve: "The review window has not closed yet \u2014 `resolveReview` only works after `reviewEnd`.",
|
|
391
|
+
ReviewAlreadyRegistered: "A guardian review is already registered for this (governor, proposal) pair.",
|
|
392
|
+
VoteChangeLockedOut: "Vote changes are locked out in the final 10% of the review window. Your earlier vote stands.",
|
|
393
|
+
NewSideFull: "The side you are switching to is full \u2014 approvers are capped at 100 per proposal (blockers are uncapped).",
|
|
394
|
+
NoVoteChange: "That is the vote you already cast \u2014 nothing to change.",
|
|
395
|
+
UnauthorizedGovernor: "This governor is not authorized on the GuardianRegistry. The factory authorizes a vault's governor at createSyndicate.",
|
|
396
|
+
InvalidReviewWindow: "Review window is outside the registry's allowed bounds.",
|
|
397
|
+
CooldownBelowReviewPeriod: "The unstake cooldown cannot be shorter than the review period \u2014 a guardian could otherwise exit before a slash lands.",
|
|
398
|
+
RefundCapExceeded: "The slash-appeal refund exceeds the per-epoch cap (20% of the Slash Appeal Reserve).",
|
|
399
|
+
EmergencyAlreadyOpen: "An emergency settle is already open for this proposal. Cancel it first (`cancelEmergencySettle`).",
|
|
400
|
+
EmergencyHashMismatch: "The calls passed to finalizeEmergencySettle do not match the calldata hash committed when the emergency was opened.",
|
|
401
|
+
EmergencyTooManyCalls: "The emergency settle carries more calls than the registry allows.",
|
|
402
|
+
NotPausedOrDeadmanNotElapsed: "The registry is not paused, or the 7-day deadman delay has not elapsed yet.",
|
|
403
|
+
ProtocolPaused: "The guardian registry is paused \u2014 review voting and claims are suspended.",
|
|
404
|
+
AlreadyPaused: "The registry is already paused.",
|
|
405
|
+
InvalidParameter: "A parameter is outside the contract's allowed bounds.",
|
|
406
|
+
// StakedWood (sWOOD)
|
|
407
|
+
UnstakeAlreadyRequested: "This stake already has a pending unstake request \u2014 top-ups are refused while one is open (it would grow the quorum denominator without adding votable weight). Cancel the request first.",
|
|
408
|
+
UnstakeNotRequested: "No unstake request is pending for this stake.",
|
|
409
|
+
NoActiveStake: "No active stake for this address. A slash clears the unstake request, so a slashed guardian cannot cancel back into the active set.",
|
|
410
|
+
InsufficientStake: "Stake is below the amount this operation needs.",
|
|
411
|
+
OwnerBondInsufficient: "The vault owner's WOOD bond is below `requiredOwnerBond(vault) = max(minOwnerStake, TVL * ownerStakeTvlBps / 10_000)`. Top it up: sherwood guardian prepare-owner-stake <amount>",
|
|
412
|
+
PreparedStakeAlreadyExists: "A prepared owner stake already exists for this address \u2014 bind or withdraw it before preparing another.",
|
|
413
|
+
PreparedStakeNotFound: "No prepared owner stake found. Run `sherwood guardian prepare-owner-stake <amount>` before creating the fund.",
|
|
414
|
+
PriorStakeNotCleared: "A prior stake for this slot has not been cleared yet.",
|
|
415
|
+
VaultHasActiveProposal: "The vault has an open proposal \u2014 the owner bond cannot be unstaked until it settles or is cancelled.",
|
|
416
|
+
NotRegistry: "Only the GuardianRegistry can call this sWOOD function.",
|
|
417
|
+
NotAuthorizedSlasher: "The caller is not an authorized slasher.",
|
|
418
|
+
VerdictNotPast: "The verdict is not final yet.",
|
|
419
|
+
ApproverAlreadySlashed: "This approver was already slashed for that review.",
|
|
420
|
+
DuplicateApprover: "Duplicate approver in the slash list.",
|
|
421
|
+
SlashBpsLengthMismatch: "The slash-bps array does not line up with the approver array.",
|
|
422
|
+
RegistryAlreadySet: "sWOOD's registry is set once at wiring time and cannot be re-pointed.",
|
|
423
|
+
BindingNotApproved: "The owner-stake binding was not approved by the factory.",
|
|
424
|
+
// StrategyFactory
|
|
425
|
+
TemplateNotApproved: "This strategy template is not on the StrategyFactory allowlist. The factory owner must call setTemplateApproval(template, true).",
|
|
426
|
+
NotAStrategy: "That address is not a strategy \u2014 it has no code, or does not answer vault() / proposer() / executed().",
|
|
427
|
+
ProposerMustBeSender: "cloneAndInit / cloneAndInitDeterministic require proposer == msg.sender. Deploy the clone from the proposer's own wallet.",
|
|
428
|
+
FailedDeployment: "CREATE2 deployment failed \u2014 a clone already occupies that deterministic address. Re-run with a different --salt.",
|
|
429
|
+
InvalidSyndicateFactory: "The StrategyFactory's SyndicateFactory address is invalid.",
|
|
430
|
+
// Governor — v1 bond / tier / strategy gates
|
|
431
|
+
StrategyNotRegistered: "The proposal's strategy is not registered on the StrategyFactory. Deploy it with `sherwood strategy propose` / `strategy clone` (both go through StrategyFactory.cloneAndInitDeterministic, which registers atomically) \u2014 a raw ERC-1167 clone deployed from an EOA is never registered.",
|
|
432
|
+
NotARegisteredStrategy: "A batch call targets an address that is not a registered strategy.",
|
|
433
|
+
ProposalNotTerminal: "The proposal is not in a terminal state. A bond is only reclaimable from Rejected / Expired / Cancelled / Settled.",
|
|
434
|
+
NoBondToReclaim: "This proposal has no proposer bond left to reclaim \u2014 it was never bonded, or the bond was already released or forfeited.",
|
|
435
|
+
ChallengeWindowOpen: "The challenge window on this executed proposal is still open. The bond unlocks at executedAt + strategyDuration + challengeWindow.",
|
|
436
|
+
ExposureLedgerUnset: "No ExposureLedger is wired, so the challenge-window gate cannot be evaluated \u2014 the reclaim fails closed.",
|
|
437
|
+
ParamsFrozenDuringProposal: "Governor parameters are frozen while a proposal is open. Settle or cancel it first.",
|
|
438
|
+
OwnerBondNotLive: "The vault owner's bond is not live on sWOOD.",
|
|
439
|
+
VaultHasOpenProposal: "This vault already has an open proposal. Settle or cancel it first.",
|
|
440
|
+
VaultProposalActive: "A proposal is already active on this vault.",
|
|
441
|
+
InvalidDrawdown: "maxDrawdownBps must be 0-10000.",
|
|
442
|
+
ZeroMaxCapital: "The proposal's maxCapital envelope is zero \u2014 declare what the batch may deploy.",
|
|
443
|
+
MaxCapitalExceedsCeiling: "maxCapital exceeds the vault's per-proposal ceiling (totalAssets * maxCapitalBps / 10_000).",
|
|
444
|
+
CallCapsLengthMismatch: "The per-call caps array does not line up with its calls array.",
|
|
445
|
+
CallCapsExceedMaxCapital: "The per-call caps sum to more than the proposal's maxCapital envelope.",
|
|
446
|
+
TooManyCalls: "The proposal carries more batch calls than the governor allows.",
|
|
447
|
+
MetadataURITooLong: "The metadata URI exceeds the governor's length cap. Pin the JSON and pass the short ipfs:// URI.",
|
|
448
|
+
SettlePriceBelowFloor: "Settlement would land below the price floor the proposal's declared drawdown allows. Widening it requires a new proposal.",
|
|
449
|
+
TierRegistryNotWired: "The governor has no TierRegistry wired \u2014 tier-gated proposals cannot be validated.",
|
|
450
|
+
TierRegressed: "The strategy's certified tier dropped after the proposal was created.",
|
|
451
|
+
CoverageRegressed: "Guardian coverage fell below what this proposal had when it was approved.",
|
|
452
|
+
LedgerEscrowMismatch: "The pinned ExposureLedger and ProposerBondEscrow disagree \u2014 the bond gates cannot be evaluated.",
|
|
453
|
+
NotInGuardianReview: "The proposal is not in GuardianReview.",
|
|
454
|
+
NotLeadProposer: "Only the lead proposer can perform this action.",
|
|
455
|
+
EmergencyNotProposed: "No emergency settle is pending for this proposal.",
|
|
456
|
+
EmergencySettleNotReady: "The emergency review window has not elapsed yet.",
|
|
457
|
+
EmergencySettleBlocked: "Guardians reached block quorum on this emergency settle \u2014 it cannot be finalized.",
|
|
458
|
+
CancelNotAllowedNearQuorum: "Cancel is blocked this close to a block quorum \u2014 the proposer must commit at this point.",
|
|
459
|
+
// ProposerBondEscrow
|
|
460
|
+
NoBond: "No bond is held in escrow for this (governor, proposal) pair.",
|
|
461
|
+
BondAlreadyLocked: "A bond is already locked for this (governor, proposal) pair.",
|
|
462
|
+
NotAuthorizedGovernor: "Only the governor that locked the bond can release or forfeit it.",
|
|
463
|
+
// OpenZeppelin — shared
|
|
464
|
+
OwnableUnauthorizedAccount: "Only the contract owner can call this. Your wallet is not the owner.",
|
|
465
|
+
ReentrancyGuardReentrantCall: "Reentrant call rejected by the contract's reentrancy guard.",
|
|
466
|
+
InvalidInitialization: "This proxy is already initialized (or initialization is not currently allowed).",
|
|
467
|
+
SafeERC20FailedOperation: "An ERC-20 transfer/approval failed. Check balance, allowance and that the token returns a bool.",
|
|
468
|
+
FailedCall: "A low-level call inside the contract failed without a reason.",
|
|
469
|
+
AddressEmptyCode: "The call targeted an address with no code."
|
|
259
470
|
};
|
|
260
471
|
function decodeContractError(data) {
|
|
261
472
|
try {
|
|
@@ -540,4 +751,4 @@ export {
|
|
|
540
751
|
writeContractWithRetry,
|
|
541
752
|
waitForReceipt
|
|
542
753
|
};
|
|
543
|
-
//# sourceMappingURL=chunk-
|
|
754
|
+
//# sourceMappingURL=chunk-D4BSBW3Q.js.map
|