@continuumdao/ctm-mpc-defi 0.2.46 → 0.2.48

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.
@@ -19,6 +19,34 @@ var __export = (target, all) => {
19
19
  for (var name in all)
20
20
  __defProp(target, name, { get: all[name], enumerable: true });
21
21
  };
22
+
23
+ // src/chains/evm/chainIdParse.ts
24
+ function parseEvmChainIdToNumber(chainId) {
25
+ if (chainId == null) return Number.NaN;
26
+ if (typeof chainId === "bigint") {
27
+ const n = Number(chainId);
28
+ return Number.isSafeInteger(n) && n >= 0 ? n : Number.NaN;
29
+ }
30
+ if (typeof chainId === "number") {
31
+ return Number.isInteger(chainId) && chainId >= 0 ? chainId : Number.NaN;
32
+ }
33
+ const t = String(chainId).trim();
34
+ if (!t) return Number.NaN;
35
+ const low = t.toLowerCase();
36
+ if (low.startsWith("eip155:")) {
37
+ const rest = t.slice("eip155:".length).trim();
38
+ const n = Number.parseInt(rest, 10);
39
+ return Number.isNaN(n) || n < 0 ? Number.NaN : n;
40
+ }
41
+ if (low.startsWith("0x")) {
42
+ return Number.parseInt(t, 16);
43
+ }
44
+ return Number.parseInt(t, 10);
45
+ }
46
+ var init_chainIdParse = __esm({
47
+ "src/chains/evm/chainIdParse.ts"() {
48
+ }
49
+ });
22
50
  function defiEvmTransport(rpcUrl, opts) {
23
51
  const url = rpcUrl.trim();
24
52
  return viem.http(url, opts);
@@ -484,6 +512,144 @@ var init_yields = __esm({
484
512
  );
485
513
  }
486
514
  });
515
+ function isConfiguredAddress(addr) {
516
+ if (!addr?.trim()) return false;
517
+ try {
518
+ return viem.getAddress(addr) !== viem.zeroAddress;
519
+ } catch {
520
+ return false;
521
+ }
522
+ }
523
+ function continuumDaoDeployment(chainId) {
524
+ return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
525
+ }
526
+ function isContinuumDaoLockChain(chainId) {
527
+ return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
528
+ }
529
+ function isContinuumDaoSupportedChainId(chainId) {
530
+ return continuumDaoDeployment(chainId) != null;
531
+ }
532
+ function ctmTokenAddressOnEvmChain(chainId) {
533
+ const ctm = continuumDaoDeployment(chainId)?.ctm;
534
+ return ctm && isConfiguredAddress(ctm) ? viem.getAddress(ctm) : null;
535
+ }
536
+ function votingEscrowAddressOnEvmChain(chainId) {
537
+ const ve = continuumDaoDeployment(chainId)?.votingEscrow;
538
+ return ve && isConfiguredAddress(ve) ? viem.getAddress(ve) : null;
539
+ }
540
+ function listContinuumDaoDefaultAssets() {
541
+ const out = [];
542
+ for (const chainId of [
543
+ CONTINUUM_DAO_LINEA_CHAIN_ID,
544
+ CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
545
+ CONTINUUM_DAO_ETHEREUM_CHAIN_ID
546
+ ]) {
547
+ const dep = continuumDaoDeployment(chainId);
548
+ if (!dep) continue;
549
+ if (isConfiguredAddress(dep.ctm)) {
550
+ out.push({
551
+ chainId,
552
+ tokenType: "CTMERC20",
553
+ contractAddress: viem.getAddress(dep.ctm),
554
+ name: CTM_TOKEN_NAME,
555
+ symbol: CTM_TOKEN_SYMBOL,
556
+ decimals: CTM_TOKEN_DECIMALS
557
+ });
558
+ }
559
+ if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
560
+ out.push({
561
+ chainId,
562
+ tokenType: "ERC721",
563
+ contractAddress: viem.getAddress(dep.votingEscrow),
564
+ name: VECTM_TOKEN_NAME,
565
+ symbol: VECTM_TOKEN_SYMBOL
566
+ });
567
+ }
568
+ }
569
+ return out;
570
+ }
571
+ var CONTINUUM_DAO_PROTOCOL_ID, CONTINUUM_DAO_ETHEREUM_CHAIN_ID, CONTINUUM_DAO_LINEA_CHAIN_ID, CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID, CTM_TOKEN_NAME, CTM_TOKEN_SYMBOL, VECTM_TOKEN_NAME, VECTM_TOKEN_SYMBOL, CTM_TOKEN_DECIMALS, UNSET, CTM_TOKEN_ADDRESS, VOTING_ESCROW_LINEA_ADDRESS, CONTINUUM_DAO_DEPLOYMENTS;
572
+ var init_constants2 = __esm({
573
+ "src/protocols/evm/continuum-dao/constants.ts"() {
574
+ CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
575
+ CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
576
+ CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
577
+ CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
578
+ CTM_TOKEN_NAME = "Continuum";
579
+ CTM_TOKEN_SYMBOL = "CTM";
580
+ VECTM_TOKEN_NAME = "Voting Escrow Continuum";
581
+ VECTM_TOKEN_SYMBOL = "veCTM";
582
+ CTM_TOKEN_DECIMALS = 18;
583
+ UNSET = {
584
+ ctm: viem.zeroAddress,
585
+ votingEscrow: viem.zeroAddress,
586
+ nodeProperties: viem.zeroAddress,
587
+ rewards: viem.zeroAddress,
588
+ governor: viem.zeroAddress
589
+ };
590
+ CTM_TOKEN_ADDRESS = viem.getAddress("0x2026027054F5beBCEB650aBD62dC623e327658e7");
591
+ VOTING_ESCROW_LINEA_ADDRESS = viem.getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
592
+ viem.getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
593
+ viem.getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
594
+ [
595
+ viem.getAddress("0xd23eecBe0362F36b254F774C274823Cbfc482a10"),
596
+ viem.getAddress("0x482cdCbdd72ef307997153Ee7eb627B7a2348d34"),
597
+ viem.getAddress("0x14C189354702b7f2aC7b19e61522A41632226BD8")
598
+ ];
599
+ CONTINUUM_DAO_DEPLOYMENTS = {
600
+ [CONTINUUM_DAO_LINEA_CHAIN_ID]: {
601
+ ...UNSET,
602
+ ctm: CTM_TOKEN_ADDRESS,
603
+ votingEscrow: VOTING_ESCROW_LINEA_ADDRESS
604
+ },
605
+ [CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
606
+ [CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
607
+ ...UNSET,
608
+ ctm: CTM_TOKEN_ADDRESS
609
+ }
610
+ };
611
+ }
612
+ });
613
+ var init_forum = __esm({
614
+ "src/protocols/evm/continuum-dao/forum.ts"() {
615
+ }
616
+ });
617
+ var init_governance = __esm({
618
+ "src/protocols/evm/continuum-dao/governance.ts"() {
619
+ viem.parseAbi([
620
+ "function propose(address[] targets, uint256[] values, bytes[] calldatas, string description) returns (uint256)",
621
+ "function castVote(uint256 proposalId, uint8 support) returns (uint256)",
622
+ "function castVoteWithReasonAndParams(uint256 proposalId, uint8 support, string reason, bytes params) returns (uint256)",
623
+ "function execute(uint256 proposalId) payable",
624
+ "function cancel(uint256 proposalId)"
625
+ ]);
626
+ viem.parseAbi([
627
+ "function hashProposal(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash) view returns (uint256)",
628
+ "function state(uint256 proposalId) view returns (uint8)",
629
+ "function getVotes(address account, uint256 timepoint) view returns (uint256)",
630
+ "function proposalThreshold() view returns (uint256)",
631
+ "function proposalCount() view returns (uint256)",
632
+ "function clock() view returns (uint48)",
633
+ "function proposalVotes(uint256 proposalId) view returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes)",
634
+ "function hasVoted(uint256 proposalId, address account) view returns (bool)",
635
+ "function proposalSnapshot(uint256 proposalId) view returns (uint256)"
636
+ ]);
637
+ }
638
+ });
639
+
640
+ // src/protocols/evm/continuum-dao/explainProposal.ts
641
+ var init_explainProposal = __esm({
642
+ "src/protocols/evm/continuum-dao/explainProposal.ts"() {
643
+ }
644
+ });
645
+ var init_foundryProposalScript = __esm({
646
+ "src/protocols/evm/continuum-dao/foundryProposalScript.ts"() {
647
+ }
648
+ });
649
+ var init_simulateProposal = __esm({
650
+ "src/protocols/evm/continuum-dao/simulateProposal.ts"() {
651
+ }
652
+ });
487
653
 
488
654
  // src/core/registry.ts
489
655
  var modules = [];
@@ -502,31 +668,8 @@ function getActionsByChainCategory(category) {
502
668
  return modules.filter((m) => m.chainCategory === category).flatMap((m) => m.actions);
503
669
  }
504
670
 
505
- // src/chains/evm/chainIdParse.ts
506
- function parseEvmChainIdToNumber(chainId) {
507
- if (chainId == null) return Number.NaN;
508
- if (typeof chainId === "bigint") {
509
- const n = Number(chainId);
510
- return Number.isSafeInteger(n) && n >= 0 ? n : Number.NaN;
511
- }
512
- if (typeof chainId === "number") {
513
- return Number.isInteger(chainId) && chainId >= 0 ? chainId : Number.NaN;
514
- }
515
- const t = String(chainId).trim();
516
- if (!t) return Number.NaN;
517
- const low = t.toLowerCase();
518
- if (low.startsWith("eip155:")) {
519
- const rest = t.slice("eip155:".length).trim();
520
- const n = Number.parseInt(rest, 10);
521
- return Number.isNaN(n) || n < 0 ? Number.NaN : n;
522
- }
523
- if (low.startsWith("0x")) {
524
- return Number.parseInt(t, 16);
525
- }
526
- return Number.parseInt(t, 10);
527
- }
528
-
529
671
  // src/protocols/evm/uniswap-v4/constants.ts
672
+ init_chainIdParse();
530
673
  var UNIVERSAL_ROUTER_SPENDER = {
531
674
  1: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
532
675
  5: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
@@ -677,6 +820,7 @@ var uniswapV4ProtocolModule = {
677
820
  registerProtocolModule(uniswapV4ProtocolModule);
678
821
 
679
822
  // src/protocols/evm/curve-dao/support.ts
823
+ init_chainIdParse();
680
824
  var CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS = /* @__PURE__ */ new Set([
681
825
  1,
682
826
  10,
@@ -3120,6 +3264,205 @@ var mcpContinuumDaoProposeDeltaInputSchema = mcpMultisignInput({
3120
3264
  forumKey: forumTopicKeyField,
3121
3265
  forumUrl: zod.z.string().optional()
3122
3266
  });
3267
+ var govConfigurationSchema = zod.z.union([
3268
+ zod.z.enum(["bravo", "delta"]),
3269
+ zod.z.literal(0),
3270
+ zod.z.literal(1),
3271
+ zod.z.literal("0"),
3272
+ zod.z.literal("1")
3273
+ ]).describe("bravo / 0 = For/Against/Abstain; delta / 1 = multi-option");
3274
+ var mcpContinuumDaoSimulateProposalInputSchema = zod.z.object({
3275
+ chainId: zod.z.union([zod.z.string(), zod.z.number()]),
3276
+ rpcUrl: zod.z.string().min(1).optional().describe("Server-filled from chain registry when omitted. Agents should not pass a public RPC URL."),
3277
+ keyGenId: zod.z.string().min(1).optional().describe(
3278
+ "Preferred KeyGen id. Used only when account is omitted \u2014 fills account from that KeyGen ETH address."
3279
+ ),
3280
+ account: evmAddressSchema.optional().describe(
3281
+ "Proposer address to simulate. Pass any EOA to draft a proposal that will be submitted from that address. When omitted, server uses the KeyGen ETH address from keyGenId."
3282
+ ),
3283
+ configuration: govConfigurationSchema,
3284
+ title: zod.z.string().min(1).max(128).optional().describe("On-chain description; defaults to draft"),
3285
+ actions: zod.z.array(govActionSchema).optional(),
3286
+ options: zod.z.array(govOptionSchema).optional(),
3287
+ nWinners: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
3288
+ governor: evmAddressSchema.optional(),
3289
+ noOpTarget: evmAddressSchema.optional()
3290
+ }).superRefine((val, ctx) => {
3291
+ if (!val.account?.trim() && !val.keyGenId?.trim()) {
3292
+ ctx.addIssue({
3293
+ code: zod.z.ZodIssueCode.custom,
3294
+ message: "Pass account (any EOA) or keyGenId (defaults account to that KeyGen).",
3295
+ path: ["account"]
3296
+ });
3297
+ }
3298
+ const cfg = String(val.configuration).toLowerCase();
3299
+ const delta = cfg === "delta" || cfg === "1";
3300
+ if (delta) {
3301
+ if (!val.options || val.options.length < 2) {
3302
+ ctx.addIssue({
3303
+ code: zod.z.ZodIssueCode.custom,
3304
+ message: "Delta simulation needs at least 2 options.",
3305
+ path: ["options"]
3306
+ });
3307
+ }
3308
+ if (val.nWinners == null || val.nWinners === "") {
3309
+ ctx.addIssue({
3310
+ code: zod.z.ZodIssueCode.custom,
3311
+ message: "Delta simulation needs nWinners.",
3312
+ path: ["nWinners"]
3313
+ });
3314
+ }
3315
+ }
3316
+ });
3317
+ var mcpContinuumDaoComposeProposalActionInputSchema = zod.z.object({
3318
+ chainId: zod.z.union([zod.z.string(), zod.z.number()]),
3319
+ rpcUrl: zod.z.string().min(1).optional().describe("Server-filled from chain registry when omitted. Agents should not pass a public RPC URL."),
3320
+ target: evmAddressSchema.optional().describe("Action contract address for lookup / validate."),
3321
+ functionName: zod.z.string().min(1).optional().describe("Function name (transfer) or full signature (transfer(address,uint256))."),
3322
+ value: zod.z.string().optional().describe("ETH value in wei for this action. Default 0."),
3323
+ inputs: zod.z.array(
3324
+ zod.z.object({
3325
+ name: zod.z.string().optional(),
3326
+ type: zod.z.string().optional(),
3327
+ value: zod.z.string().optional()
3328
+ })
3329
+ ).optional().describe("Parameter values to type-check. Omit to only fetch the interface."),
3330
+ abi: zod.z.union([zod.z.string(), zod.z.array(zod.z.unknown())]).optional().describe("Prefer ABI from etherscan__get_contract_abi (chainid 59144 or 59141). Pass JSON if the contract is unverified."),
3331
+ configuration: govConfigurationSchema.optional().describe("Set with actions/options to preview the full draft table."),
3332
+ title: zod.z.string().min(1).max(128).optional(),
3333
+ actions: zod.z.array(govActionSchema).optional(),
3334
+ options: zod.z.array(govOptionSchema).optional(),
3335
+ nWinners: zod.z.union([zod.z.string(), zod.z.number()]).optional()
3336
+ }).superRefine((val, ctx) => {
3337
+ const preview = val.configuration != null && (val.actions != null || val.options != null);
3338
+ if (preview) return;
3339
+ if (!val.target?.trim() || !val.functionName?.trim()) {
3340
+ ctx.addIssue({
3341
+ code: zod.z.ZodIssueCode.custom,
3342
+ message: "Pass target + functionName to look up / validate an action, or configuration + actions/options to preview.",
3343
+ path: ["target"]
3344
+ });
3345
+ }
3346
+ });
3347
+ var mcpContinuumDaoComposeProposalActionOutputSchema = zod.z.object({
3348
+ ok: zod.z.boolean(),
3349
+ step: zod.z.enum(["lookup", "validate", "preview"]),
3350
+ target: evmAddressSchema.optional(),
3351
+ functionName: zod.z.string().optional(),
3352
+ signature: zod.z.string().optional(),
3353
+ stateMutability: zod.z.string().optional(),
3354
+ payable: zod.z.boolean().optional(),
3355
+ overloads: zod.z.array(
3356
+ zod.z.object({
3357
+ name: zod.z.string(),
3358
+ signature: zod.z.string(),
3359
+ stateMutability: zod.z.string(),
3360
+ payable: zod.z.boolean(),
3361
+ inputs: zod.z.array(zod.z.object({ name: zod.z.string(), type: zod.z.string() }))
3362
+ })
3363
+ ).optional(),
3364
+ parameters: zod.z.array(
3365
+ zod.z.object({
3366
+ name: zod.z.string(),
3367
+ type: zod.z.string(),
3368
+ value: zod.z.string().optional(),
3369
+ valid: zod.z.boolean(),
3370
+ error: zod.z.string().optional()
3371
+ })
3372
+ ).optional(),
3373
+ encoded: zod.z.object({
3374
+ target: evmAddressSchema,
3375
+ value: zod.z.string(),
3376
+ signature: zod.z.string(),
3377
+ calldata: zod.z.string(),
3378
+ inputs: zod.z.array(zod.z.object({ name: zod.z.string().optional(), type: zod.z.string(), value: zod.z.string() }))
3379
+ }).optional(),
3380
+ table: zod.z.string().optional().describe("Markdown table of draft inputs. Read this aloud."),
3381
+ rows: zod.z.array(
3382
+ zod.z.object({
3383
+ option: zod.z.string().optional(),
3384
+ index: zod.z.number(),
3385
+ target: zod.z.string(),
3386
+ function: zod.z.string(),
3387
+ signature: zod.z.string(),
3388
+ param: zod.z.string(),
3389
+ type: zod.z.string(),
3390
+ value: zod.z.string(),
3391
+ valid: zod.z.boolean(),
3392
+ error: zod.z.string().optional()
3393
+ })
3394
+ ).optional(),
3395
+ actions: zod.z.array(govActionSchema).optional(),
3396
+ options: zod.z.array(govOptionSchema).optional(),
3397
+ configuration: zod.z.enum(["bravo", "delta"]).optional(),
3398
+ nWinners: zod.z.number().optional(),
3399
+ title: zod.z.string().optional(),
3400
+ abiSource: zod.z.string().optional(),
3401
+ missing: zod.z.array(zod.z.string()).optional(),
3402
+ warning: zod.z.string().optional(),
3403
+ error: zod.z.string().optional(),
3404
+ note: zod.z.string(),
3405
+ next: zod.z.string()
3406
+ });
3407
+ var mcpContinuumDaoSimulateProposalOutputSchema = zod.z.object({
3408
+ ok: zod.z.boolean(),
3409
+ configuration: zod.z.enum(["bravo", "delta"]),
3410
+ account: evmAddressSchema,
3411
+ governor: evmAddressSchema,
3412
+ votes: zod.z.string(),
3413
+ threshold: zod.z.string(),
3414
+ canPropose: zod.z.boolean(),
3415
+ warning: zod.z.string().optional().describe(
3416
+ "Present when getVotes(account) < live proposalThreshold(). Read this aloud. Committee addresses are not exempt."
3417
+ ),
3418
+ propose: zod.z.object({
3419
+ ok: zod.z.boolean(),
3420
+ error: zod.z.string().optional()
3421
+ }),
3422
+ foundry: zod.z.object({
3423
+ loadServers: zod.z.array(zod.z.string()).describe("MCP server ids that must be loaded first: etherscan (official V2) and foundry."),
3424
+ chainId: zod.z.number(),
3425
+ governor: evmAddressSchema,
3426
+ proposer: evmAddressSchema,
3427
+ files: zod.z.array(
3428
+ zod.z.object({
3429
+ path: zod.z.string(),
3430
+ contractName: zod.z.string(),
3431
+ source: zod.z.string(),
3432
+ label: zod.z.string().optional()
3433
+ })
3434
+ ),
3435
+ forgeScript: zod.z.object({
3436
+ tool: zod.z.literal("forge_script"),
3437
+ broadcast: zod.z.literal(false),
3438
+ forkUrlFromRegistry: zod.z.literal(true)
3439
+ }),
3440
+ note: zod.z.string()
3441
+ }),
3442
+ execute: zod.z.object({
3443
+ ok: zod.z.boolean(),
3444
+ source: zod.z.enum(["simulate", "foundry_required"]),
3445
+ batches: zod.z.array(
3446
+ zod.z.object({
3447
+ label: zod.z.string().optional(),
3448
+ optionIndex: zod.z.number().optional(),
3449
+ ok: zod.z.boolean(),
3450
+ actions: zod.z.array(
3451
+ zod.z.object({
3452
+ index: zod.z.number(),
3453
+ target: zod.z.string(),
3454
+ signature: zod.z.string(),
3455
+ noOp: zod.z.boolean(),
3456
+ ok: zod.z.boolean(),
3457
+ error: zod.z.string().optional(),
3458
+ gasUsed: zod.z.string().optional()
3459
+ })
3460
+ )
3461
+ })
3462
+ )
3463
+ }),
3464
+ note: zod.z.string()
3465
+ });
3123
3466
  var mcpContinuumDaoCastVoteBravoInputSchema = mcpMultisignInput({
3124
3467
  proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
3125
3468
  support: zod.z.union([zod.z.literal(0), zod.z.literal(1), zod.z.literal(2), zod.z.string()]),
@@ -3155,7 +3498,10 @@ var mcpContinuumDaoFetchProposalStateOutputSchema = zod.z.object({
3155
3498
  state: zod.z.number(),
3156
3499
  againstVotes: zod.z.string(),
3157
3500
  forVotes: zod.z.string(),
3158
- abstainVotes: zod.z.string()
3501
+ abstainVotes: zod.z.string(),
3502
+ votesPartial: zod.z.boolean().optional(),
3503
+ proposalId: zod.z.string().optional(),
3504
+ catalogId: zod.z.number().optional()
3159
3505
  });
3160
3506
  var mcpContinuumDaoFetchProposalsInputSchema = zod.z.object({
3161
3507
  start: zod.z.number().int().optional(),
@@ -3173,12 +3519,70 @@ var mcpContinuumDaoFetchProposalInputSchema = zod.z.object({
3173
3519
  var mcpContinuumDaoFetchProposalOutputSchema = zod.z.object({
3174
3520
  proposal: zod.z.unknown()
3175
3521
  });
3522
+ var mcpContinuumDaoProposalVoteRowSchema = zod.z.object({
3523
+ voter: zod.z.string(),
3524
+ explorerUrl: zod.z.string(),
3525
+ support: zod.z.number().int(),
3526
+ supportLabel: zod.z.string(),
3527
+ weight: zod.z.string(),
3528
+ weightCtm: zod.z.string(),
3529
+ reason: zod.z.string(),
3530
+ optionWeights: zod.z.array(zod.z.string()).optional(),
3531
+ how: zod.z.string(),
3532
+ attached: zod.z.boolean(),
3533
+ attachedTokenId: zod.z.string().optional(),
3534
+ nodeInfo: zod.z.object({
3535
+ forumHandle: zod.z.string().optional(),
3536
+ email: zod.z.string().optional(),
3537
+ ipv4: zod.z.string().optional(),
3538
+ ipv6: zod.z.string().optional(),
3539
+ vpsProvider: zod.z.string().optional(),
3540
+ ramInstalled: zod.z.string().optional(),
3541
+ cpuCores: zod.z.string().optional(),
3542
+ dIDType: zod.z.string().optional(),
3543
+ dID: zod.z.string().optional(),
3544
+ dataHex: zod.z.string().optional()
3545
+ }).strict().optional(),
3546
+ txHash: zod.z.string().optional(),
3547
+ txExplorerUrl: zod.z.string().optional(),
3548
+ blockNumber: zod.z.string().optional()
3549
+ });
3550
+ var mcpContinuumDaoFetchProposalVotesInputSchema = zod.z.object({
3551
+ chainId: zod.z.union([zod.z.string(), zod.z.number()]),
3552
+ rpcUrl: zod.z.string().min(1),
3553
+ proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
3554
+ governor: evmAddressSchema.optional(),
3555
+ votingEscrow: evmAddressSchema.optional(),
3556
+ nodeProperties: evmAddressSchema.optional(),
3557
+ fromBlock: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
3558
+ toBlock: zod.z.union([zod.z.string(), zod.z.number()]).optional()
3559
+ });
3560
+ var mcpContinuumDaoFetchProposalVotesOutputSchema = zod.z.object({
3561
+ proposalId: zod.z.string(),
3562
+ catalogId: zod.z.number().optional(),
3563
+ governor: zod.z.string(),
3564
+ nodeProperties: zod.z.string().optional(),
3565
+ title: zod.z.string().optional(),
3566
+ configuration: zod.z.enum(["bravo", "delta"]).optional(),
3567
+ fromBlock: zod.z.string(),
3568
+ toBlock: zod.z.string(),
3569
+ truncated: zod.z.boolean(),
3570
+ votes: zod.z.array(mcpContinuumDaoProposalVoteRowSchema),
3571
+ voterCount: zod.z.number().int().nonnegative(),
3572
+ attachedVoterCount: zod.z.number().int().nonnegative(),
3573
+ forWeight: zod.z.string(),
3574
+ againstWeight: zod.z.string(),
3575
+ abstainWeight: zod.z.string(),
3576
+ note: zod.z.string()
3577
+ });
3176
3578
  var liveProposalRowSchema = zod.z.object({
3177
3579
  id: zod.z.number().optional(),
3178
3580
  onchainId: zod.z.string(),
3179
3581
  title: zod.z.string(),
3180
3582
  configuration: zod.z.number().optional(),
3181
3583
  governorAddress: zod.z.string().optional(),
3584
+ proposer: zod.z.string().optional(),
3585
+ committeeProposer: zod.z.boolean().optional(),
3182
3586
  state: zod.z.number().nullable(),
3183
3587
  stateLabel: zod.z.string(),
3184
3588
  bucket: zod.z.enum(["live", "pending", "readyToExecute", "recentlyCompleted", "unknown"]),
@@ -3214,6 +3618,7 @@ var mcpContinuumDaoExplainProposalOutputSchema = zod.z.object({
3214
3618
  title: zod.z.string(),
3215
3619
  description: zod.z.string(),
3216
3620
  proposer: zod.z.string(),
3621
+ committeeProposer: zod.z.boolean().optional(),
3217
3622
  forumKey: zod.z.string(),
3218
3623
  forumSection: zod.z.string().nullable().optional(),
3219
3624
  forumCid: zod.z.number().nullable().optional(),
@@ -5906,13 +6311,14 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
5906
6311
  actionId: "continuum-dao.propose-bravo",
5907
6312
  protocolId: "continuum-dao",
5908
6313
  chainCategory: "evm",
5909
- description: "Build ContinuumDAO.propose for a Bravo (For/Against/Abstain) proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). forumKey is required and must be a Governance thread (/topic/:tid) from ctm_continuum_dao_forum_create_topic (decision / election / treasury / constitution / admin). Ideas threads and the homepage are refused. Empty actions insert a no-op to the KeyGen address. Linea only. No billing legs. After the request is mined, call ctm_continuum_dao_register_proposal with the same forumKey.",
6314
+ description: "Build ContinuumDAO.propose for a Bravo (For/Against/Abstain) proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() or propose() reverts. Sequential execute dry-run is the Foundry forge scripts from ctm_continuum_dao_simulate_proposal (not isolated eth_call). For a draft from a different EOA use that tool with account. forumKey is required and must be a Governance thread (/topic/:tid) from ctm_continuum_dao_forum_create_topic (decision / election / treasury / constitution / admin). Ideas threads and the homepage are refused. Empty actions insert a no-op to the KeyGen address. Linea only. No billing legs. After the request is mined, call ctm_continuum_dao_register_proposal with the same forumKey.",
5910
6315
  prerequisites: [
5911
6316
  "keyGen",
5912
6317
  "Linea RPC",
5913
6318
  "configured governor",
5914
- "veCTM voting power >= live proposalThreshold()",
5915
- "forumKey from forum_create_topic"
6319
+ "KeyGen veCTM voting power >= live proposalThreshold() (hard fail)",
6320
+ "forumKey from forum_create_topic",
6321
+ "governor-executed actions must simulate without revert"
5916
6322
  ],
5917
6323
  followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_register_proposal"],
5918
6324
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoProposeBravo" },
@@ -5923,13 +6329,14 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
5923
6329
  actionId: "continuum-dao.propose-delta",
5924
6330
  protocolId: "continuum-dao",
5925
6331
  chainCategory: "evm",
5926
- description: "Build ContinuumDAO.propose for a Delta multi-option proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). forumKey is required and must be a Governance thread from ctm_continuum_dao_forum_create_topic. Ideas threads are not valid forumKey values. Empty options get a no-op so indices increment. Linea only. No billing legs.",
6332
+ description: "Build ContinuumDAO.propose for a Delta multi-option proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() or propose() reverts. Sequential execute dry-run is the Foundry forge scripts from ctm_continuum_dao_simulate_proposal (not isolated eth_call). For a draft from a different EOA use that tool with account. forumKey is required and must be a Governance thread from ctm_continuum_dao_forum_create_topic. Ideas threads are not valid forumKey values. Empty options get a no-op so indices increment. Linea only. No billing legs.",
5927
6333
  prerequisites: [
5928
6334
  "keyGen",
5929
6335
  "at least 2 options",
5930
6336
  "nWinners < nOptions",
5931
- "veCTM voting power >= live proposalThreshold()",
5932
- "forumKey from forum_create_topic"
6337
+ "KeyGen veCTM voting power >= live proposalThreshold() (hard fail)",
6338
+ "forumKey from forum_create_topic",
6339
+ "governor-executed actions must simulate without revert"
5933
6340
  ],
5934
6341
  followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_register_proposal"],
5935
6342
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoProposeDeltaFromMcp" },
@@ -5940,7 +6347,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
5940
6347
  actionId: "continuum-dao.cast-vote-bravo",
5941
6348
  protocolId: "continuum-dao",
5942
6349
  chainCategory: "evm",
5943
- description: "Build ContinuumDAO.castVote. support: 0 against, 1 for, 2 abstain. Refuses unless the proposal is Active, the KeyGen has snapshot voting power, and has not already voted.",
6350
+ description: "Build ContinuumDAO.castVote. support: 0 against, 1 for, 2 abstain. proposalId may be a catalog id (including 0) or the governor hash. Refuses unless the proposal is Active, the KeyGen has snapshot voting power, and has not already voted.",
5944
6351
  prerequisites: ["keyGen", "proposalId", "Active proposal", "snapshot votes > 0", "hasVoted false"],
5945
6352
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCastVoteBravoFromMcp" },
5946
6353
  inputZod: mcpContinuumDaoCastVoteBravoInputSchema
@@ -5960,7 +6367,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
5960
6367
  actionId: "continuum-dao.execute",
5961
6368
  protocolId: "continuum-dao",
5962
6369
  chainCategory: "evm",
5963
- description: "Build ContinuumDAO.execute(proposalId). Call after Succeeded. Queue is not implemented.",
6370
+ description: "Build ContinuumDAO.execute(proposalId). proposalId may be a catalog id (including 0) or the governor hash. Call after Succeeded. Queue is not implemented.",
5964
6371
  prerequisites: ["keyGen", "proposalId", "Succeeded state"],
5965
6372
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoExecute" },
5966
6373
  inputZod: mcpContinuumDaoProposalIdInputSchema
@@ -7432,6 +7839,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
7432
7839
  prerequisites: ["rpcUrl", "account (KeyGen ETH address)", "governor"],
7433
7840
  followUp: [
7434
7841
  "ctm_continuum_dao_fetch_delegates",
7842
+ "ctm_continuum_dao_simulate_proposal",
7435
7843
  "ctm_continuum_dao_build_propose_bravo_multisign",
7436
7844
  "ctm_continuum_dao_build_propose_delta_multisign"
7437
7845
  ],
@@ -7439,6 +7847,46 @@ var CORE_MCP_TOOL_DEFINITIONS = [
7439
7847
  inputZod: mcpContinuumDaoFetchVotingPowerInputSchema,
7440
7848
  outputZod: mcpContinuumDaoFetchVotingPowerOutputSchema
7441
7849
  }),
7850
+ defineMcpTool({
7851
+ name: "ctm_continuum_dao_simulate_proposal",
7852
+ actionId: "continuum-dao.simulate-proposal",
7853
+ protocolId: "continuum-dao",
7854
+ chainCategory: "evm",
7855
+ description: "Dry-run a Bravo or Delta ContinuumDAO proposal without creating a sign request. Load MCP servers etherscan (official V2) and foundry first. Returns foundry.files \u2014 write them with foundry__create_solidity_file and run foundry__forge_script on a Linea fork with no --broadcast. Sequential forge script is the execute sim (later actions see earlier state). Isolated eth_call is not sufficient. Also reads getVotes vs proposalThreshold() (warning if short; Committee is not exempt) and tries sequential eth_simulateV1 when the RPC supports it. Pass account for another EOA; omit account and pass keyGenId for the preferred KeyGen. Linea only. forumKey is not required.",
7856
+ prerequisites: [
7857
+ "chainId 59144 or 59141",
7858
+ "account or keyGenId",
7859
+ "configuration bravo|delta",
7860
+ "actions (Bravo) or options + nWinners (Delta)"
7861
+ ],
7862
+ followUp: [
7863
+ "ctm_continuum_dao_compose_proposal_action",
7864
+ "ctm_continuum_dao_build_propose_bravo_multisign",
7865
+ "ctm_continuum_dao_build_propose_delta_multisign"
7866
+ ],
7867
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoSimulateProposal" },
7868
+ inputZod: mcpContinuumDaoSimulateProposalInputSchema,
7869
+ outputZod: mcpContinuumDaoSimulateProposalOutputSchema
7870
+ }),
7871
+ defineMcpTool({
7872
+ name: "ctm_continuum_dao_compose_proposal_action",
7873
+ actionId: "continuum-dao.compose-proposal-action",
7874
+ protocolId: "continuum-dao",
7875
+ chainCategory: "evm",
7876
+ description: "Compose a ContinuumDAO proposal action or preview a full draft. Load MCP servers etherscan (official V2, get_contract_abi with chainid 59144/59141) and foundry first. Prefer passing abi from etherscan__get_contract_abi. Pass target + functionName to match the function. Pass inputs values to type-check and encode. Pass configuration + actions/options to print the input table. After the table, simulate with a Foundry forge script (not isolated eth_call). Linea only. Does not submit.",
7877
+ prerequisites: [
7878
+ "chainId 59144 or 59141",
7879
+ "target + functionName (lookup/validate) or configuration + actions/options (preview)"
7880
+ ],
7881
+ followUp: [
7882
+ "ctm_continuum_dao_simulate_proposal",
7883
+ "ctm_continuum_dao_build_propose_bravo_multisign",
7884
+ "ctm_continuum_dao_build_propose_delta_multisign"
7885
+ ],
7886
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoComposeProposalAction" },
7887
+ inputZod: mcpContinuumDaoComposeProposalActionInputSchema,
7888
+ outputZod: mcpContinuumDaoComposeProposalActionOutputSchema
7889
+ }),
7442
7890
  defineMcpTool({
7443
7891
  name: "ctm_continuum_dao_fetch_delegates",
7444
7892
  actionId: "continuum-dao.fetch-delegates",
@@ -7459,9 +7907,10 @@ var CORE_MCP_TOOL_DEFINITIONS = [
7459
7907
  actionId: "continuum-dao.fetch-proposal-state",
7460
7908
  protocolId: "continuum-dao",
7461
7909
  chainCategory: "evm",
7462
- description: "Read ContinuumDAO.state and proposalVotes for an on-chain proposal id. Pass the proposal\u2019s own `governorAddress` when set \u2014 catalog ids -2 and -1 live on the superseded Linea governor 0x4800F9f1dC1b6daCA841B71E0531F547D374168E, not the current contract.",
7910
+ description: "Read ContinuumDAO.state and proposalVotes. `proposalId` may be a backend catalog id (0, -1, -2, \u2026) \u2014 those resolve to the row\u2019s onchainId hash and governorAddress before the Governor call. Catalog id 0 is not Governor proposal 0. Pass the row\u2019s governorAddress when set: ids -2 and -1 live on the superseded Linea governor 0x4800F9f1dC1b6daCA841B71E0531F547D374168E. After this, offer ctm_continuum_dao_fetch_proposal_votes to see who voted and how.",
7463
7911
  prerequisites: ["rpcUrl", "proposalId", "governor"],
7464
7912
  followUp: [
7913
+ "ctm_continuum_dao_fetch_proposal_votes",
7465
7914
  "ctm_continuum_dao_build_cast_vote_bravo_multisign",
7466
7915
  "ctm_continuum_dao_build_execute_multisign"
7467
7916
  ],
@@ -7474,9 +7923,13 @@ var CORE_MCP_TOOL_DEFINITIONS = [
7474
7923
  actionId: "continuum-dao.fetch-proposals",
7475
7924
  protocolId: "continuum-dao",
7476
7925
  chainCategory: "evm",
7477
- description: "List proposals from the public ContinuumDAO backend (POST /proposals). start/end are catalog id indexes (end exclusive), not offsets, and may be negative: the superseded Linea governor 0x4800F9f1\u2026 is stored as ids -2 and -1 so the current contract can start at 0. Omit start/end to fetch the full catalog (minIndex..maxIndex). Do not use this to answer \u201Cwhat is live now\u201D \u2014 use ctm_continuum_dao_fetch_live_proposals so on-chain state is overlaid.",
7926
+ description: "List proposals from the public ContinuumDAO backend (POST /proposals). start/end are catalog id indexes (end exclusive), not offsets, and may be negative: the superseded Linea governor 0x4800F9f1\u2026 is stored as ids -2 and -1 so the current contract can start at 0. Omit start/end to fetch the full catalog (minIndex..maxIndex). Do not use this to answer \u201Cwhat is live now\u201D \u2014 use ctm_continuum_dao_fetch_live_proposals so on-chain state is overlaid. After naming a proposal, offer ctm_continuum_dao_fetch_proposal_votes so the operator can see who voted and how.",
7478
7927
  prerequisites: [],
7479
- followUp: ["ctm_continuum_dao_fetch_live_proposals", "ctm_continuum_dao_fetch_proposal"],
7928
+ followUp: [
7929
+ "ctm_continuum_dao_fetch_live_proposals",
7930
+ "ctm_continuum_dao_fetch_proposal",
7931
+ "ctm_continuum_dao_fetch_proposal_votes"
7932
+ ],
7480
7933
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchProposals" },
7481
7934
  inputZod: mcpContinuumDaoFetchProposalsInputSchema,
7482
7935
  outputZod: mcpContinuumDaoFetchProposalsOutputSchema
@@ -7486,9 +7939,13 @@ var CORE_MCP_TOOL_DEFINITIONS = [
7486
7939
  actionId: "continuum-dao.fetch-proposal",
7487
7940
  protocolId: "continuum-dao",
7488
7941
  chainCategory: "evm",
7489
- description: "Fetch one proposal from the public ContinuumDAO backend (GET /proposals/:id). Id may be negative: -2 and -1 are the two proposals from the superseded Linea governor 0x4800F9f1dC1b6daCA841B71E0531F547D374168E.",
7942
+ description: "Fetch one proposal from the public ContinuumDAO backend (GET /proposals/:id). Id may be negative: -2 and -1 are the two proposals from the superseded Linea governor 0x4800F9f1dC1b6daCA841B71E0531F547D374168E. After this, offer ctm_continuum_dao_fetch_proposal_votes so the operator can see who voted and how.",
7490
7943
  prerequisites: ["id"],
7491
- followUp: ["ctm_continuum_dao_explain_proposal", "ctm_continuum_dao_fetch_proposal_state"],
7944
+ followUp: [
7945
+ "ctm_continuum_dao_explain_proposal",
7946
+ "ctm_continuum_dao_fetch_proposal_state",
7947
+ "ctm_continuum_dao_fetch_proposal_votes"
7948
+ ],
7492
7949
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchProposal" },
7493
7950
  inputZod: mcpContinuumDaoFetchProposalInputSchema,
7494
7951
  outputZod: mcpContinuumDaoFetchProposalOutputSchema
@@ -7498,11 +7955,12 @@ var CORE_MCP_TOOL_DEFINITIONS = [
7498
7955
  actionId: "continuum-dao.fetch-live-proposals",
7499
7956
  protocolId: "continuum-dao",
7500
7957
  chainCategory: "evm",
7501
- description: "Answer \u201Cwhat proposals are live now?\u201D. Lists the backend catalog (including negative ids on the superseded Linea governor) and overlays ContinuumDAO.state using each row\u2019s governorAddress. live = Active (voting). pending = Pending. readyToExecute = Succeeded (execute from here; no queue). recentlyCompleted = Canceled/Defeated/Expired/Executed in this scan. Requires Linea chainId + rpcUrl + governor for on-chain overlay. Read the `note` field aloud.",
7958
+ description: "Answer \u201Cwhat proposals are live now?\u201D. Lists the backend catalog (including negative ids on the superseded Linea governor) and overlays ContinuumDAO.state using each row\u2019s governorAddress. Rows set `committeeProposer` when the proposer is a ContinuumDAO Committee address \u2014 say Committee next to those titles. live = Active (voting). pending = Pending. readyToExecute = Succeeded (execute from here; no queue). recentlyCompleted = Canceled/Defeated/Expired/Executed in this scan. Requires Linea chainId + rpcUrl + governor for on-chain overlay. Read the `note` field aloud. Then offer ctm_continuum_dao_fetch_proposal_votes for any named proposal so the operator can see who voted and how.",
7502
7959
  prerequisites: ["load_defi_protocol continuum-dao", "Linea chainId 59144 or 59141", "rpcUrl", "governor if constant is zero"],
7503
7960
  followUp: [
7504
7961
  "ctm_continuum_dao_explain_proposal",
7505
7962
  "ctm_continuum_dao_fetch_proposal",
7963
+ "ctm_continuum_dao_fetch_proposal_votes",
7506
7964
  "ctm_continuum_dao_build_cast_vote_bravo_multisign",
7507
7965
  "ctm_continuum_dao_build_execute_multisign"
7508
7966
  ],
@@ -7515,13 +7973,32 @@ var CORE_MCP_TOOL_DEFINITIONS = [
7515
7973
  actionId: "continuum-dao.explain-proposal",
7516
7974
  protocolId: "continuum-dao",
7517
7975
  chainCategory: "evm",
7518
- description: "Deconstruct a ContinuumDAO proposal for the operator. Walks every user action (Bravo) or every option (Delta), labels encoder no-ops as signaling, flags C3 / value / approve / unknown signatures, and checks the forum thread section against the proposal type. `network.c3governor` is always present; an action is C3-remote only when network.name is not Linea (home chain 59144 / 59141). Read the `briefing` field aloud. Does not vote. For a policy recommendation load the mpc-config continuum-dao-vote-policy skill.",
7976
+ description: "Deconstruct a ContinuumDAO proposal for the operator. Walks every user action (Bravo) or every option (Delta), labels encoder no-ops as signaling, flags C3 / value / approve / unknown signatures, and checks the forum thread section against the proposal type. `network.c3governor` is always present; an action is C3-remote only when network.name is not Linea (home chain 59144 / 59141). `committeeProposer` is true when the proposer is a ContinuumDAO Committee address \u2014 say that aloud. Read the `briefing` field aloud. Then offer ctm_continuum_dao_fetch_proposal_votes so the operator can see who voted and how. Does not vote. For a policy recommendation load the mpc-config continuum-dao-vote-policy skill.",
7519
7977
  prerequisites: ["id (backend) or onchainId"],
7520
- followUp: ["ctm_continuum_dao_fetch_proposal_state", "ctm_continuum_dao_forum_fetch_thread"],
7978
+ followUp: [
7979
+ "ctm_continuum_dao_fetch_proposal_votes",
7980
+ "ctm_continuum_dao_fetch_proposal_state",
7981
+ "ctm_continuum_dao_forum_fetch_thread"
7982
+ ],
7521
7983
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoExplainProposal" },
7522
7984
  inputZod: mcpContinuumDaoExplainProposalInputSchema,
7523
7985
  outputZod: mcpContinuumDaoExplainProposalOutputSchema
7524
7986
  }),
7987
+ defineMcpTool({
7988
+ name: "ctm_continuum_dao_fetch_proposal_votes",
7989
+ actionId: "continuum-dao.fetch-proposal-votes",
7990
+ protocolId: "continuum-dao",
7991
+ chainCategory: "evm",
7992
+ description: "Who voted on a ContinuumDAO proposal and how. Reads Governor VoteCast / VoteCastWithParams for live or past proposals. Each voter includes attached (NodeProperties.attachedTokenId after attachNodeFor) and, when they entered it at attach, nodeInfo (forum handle, VPS, DID, email, IP). Do not read email or IP aloud unless the operator asks. `proposalId` may be a backend catalog id (0, -1, -2, \u2026) or the on-chain hash. Bravo rows have For/Against/Abstain; Delta rows include option weights (last is NOTA). Offer this after listing or explaining a proposal. Linea only. Does not vote.",
7993
+ prerequisites: ["rpcUrl", "proposalId", "governor if constant is zero"],
7994
+ followUp: [
7995
+ "ctm_continuum_dao_fetch_proposal_state",
7996
+ "ctm_continuum_dao_explain_proposal"
7997
+ ],
7998
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchProposalVotes" },
7999
+ inputZod: mcpContinuumDaoFetchProposalVotesInputSchema,
8000
+ outputZod: mcpContinuumDaoFetchProposalVotesOutputSchema
8001
+ }),
7525
8002
  defineMcpTool({
7526
8003
  name: "ctm_continuum_dao_register_proposal",
7527
8004
  actionId: "continuum-dao.register-proposal",
@@ -10052,96 +10529,15 @@ var aerodromeProtocolModule = {
10052
10529
  ]
10053
10530
  };
10054
10531
  registerProtocolModule(aerodromeProtocolModule);
10055
- var CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
10056
- var CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
10057
- var CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
10058
- var CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
10059
- var CTM_TOKEN_NAME = "Continuum";
10060
- var CTM_TOKEN_SYMBOL = "CTM";
10061
- var VECTM_TOKEN_NAME = "Voting Escrow Continuum";
10062
- var VECTM_TOKEN_SYMBOL = "veCTM";
10063
- var CTM_TOKEN_DECIMALS = 18;
10064
- var UNSET = {
10065
- ctm: viem.zeroAddress,
10066
- votingEscrow: viem.zeroAddress,
10067
- nodeProperties: viem.zeroAddress,
10068
- rewards: viem.zeroAddress,
10069
- governor: viem.zeroAddress
10070
- };
10071
- var CTM_TOKEN_ADDRESS = viem.getAddress("0x2026027054F5beBCEB650aBD62dC623e327658e7");
10072
- var VOTING_ESCROW_LINEA_ADDRESS = viem.getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
10073
- viem.getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
10074
- viem.getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
10075
- var CONTINUUM_DAO_DEPLOYMENTS = {
10076
- [CONTINUUM_DAO_LINEA_CHAIN_ID]: {
10077
- ...UNSET,
10078
- ctm: CTM_TOKEN_ADDRESS,
10079
- votingEscrow: VOTING_ESCROW_LINEA_ADDRESS
10080
- },
10081
- [CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
10082
- [CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
10083
- ...UNSET,
10084
- ctm: CTM_TOKEN_ADDRESS
10085
- }
10086
- };
10087
- function isConfiguredAddress(addr) {
10088
- if (!addr?.trim()) return false;
10089
- try {
10090
- return viem.getAddress(addr) !== viem.zeroAddress;
10091
- } catch {
10092
- return false;
10093
- }
10094
- }
10095
- function continuumDaoDeployment(chainId) {
10096
- return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
10097
- }
10098
- function isContinuumDaoLockChain(chainId) {
10099
- return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
10100
- }
10101
- function isContinuumDaoSupportedChainId(chainId) {
10102
- return continuumDaoDeployment(chainId) != null;
10103
- }
10104
- function ctmTokenAddressOnEvmChain(chainId) {
10105
- const ctm = continuumDaoDeployment(chainId)?.ctm;
10106
- return ctm && isConfiguredAddress(ctm) ? viem.getAddress(ctm) : null;
10107
- }
10108
- function votingEscrowAddressOnEvmChain(chainId) {
10109
- const ve = continuumDaoDeployment(chainId)?.votingEscrow;
10110
- return ve && isConfiguredAddress(ve) ? viem.getAddress(ve) : null;
10111
- }
10112
- function listContinuumDaoDefaultAssets() {
10113
- const out = [];
10114
- for (const chainId of [
10115
- CONTINUUM_DAO_LINEA_CHAIN_ID,
10116
- CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
10117
- CONTINUUM_DAO_ETHEREUM_CHAIN_ID
10118
- ]) {
10119
- const dep = continuumDaoDeployment(chainId);
10120
- if (!dep) continue;
10121
- if (isConfiguredAddress(dep.ctm)) {
10122
- out.push({
10123
- chainId,
10124
- tokenType: "CTMERC20",
10125
- contractAddress: viem.getAddress(dep.ctm),
10126
- name: CTM_TOKEN_NAME,
10127
- symbol: CTM_TOKEN_SYMBOL,
10128
- decimals: CTM_TOKEN_DECIMALS
10129
- });
10130
- }
10131
- if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
10132
- out.push({
10133
- chainId,
10134
- tokenType: "ERC721",
10135
- contractAddress: viem.getAddress(dep.votingEscrow),
10136
- name: VECTM_TOKEN_NAME,
10137
- symbol: VECTM_TOKEN_SYMBOL
10138
- });
10139
- }
10140
- }
10141
- return out;
10142
- }
10143
10532
 
10144
10533
  // src/protocols/evm/continuum-dao/index.ts
10534
+ init_constants2();
10535
+ init_constants2();
10536
+ init_governance();
10537
+ init_simulateProposal();
10538
+ init_foundryProposalScript();
10539
+ init_explainProposal();
10540
+ init_forum();
10145
10541
  var continuumDaoProtocolModule = {
10146
10542
  id: CONTINUUM_DAO_PROTOCOL_ID,
10147
10543
  chainCategory: "evm",
@@ -10169,12 +10565,15 @@ var continuumDaoProtocolModule = {
10169
10565
  { id: "continuum-dao.request-detach", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Request governance detach", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "Attached token id" }, nodeProperties: { type: "string", required: true, description: "NodeProperties address" } } },
10170
10566
  { id: "continuum-dao.propose-bravo", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Propose a Bravo (For/Against/Abstain) proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { title: { type: "string", required: true, description: "On-chain description (title)" }, forumKey: { type: "string", required: true, description: "Created forum thread URL from forum_create_topic" } } },
10171
10567
  { id: "continuum-dao.propose-delta", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Propose a Delta multi-option proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { title: { type: "string", required: true, description: "On-chain description (title)" }, nWinners: { type: "number", required: true, description: "Winning options to execute" }, forumKey: { type: "string", required: true, description: "Created forum thread URL from forum_create_topic" } } },
10172
- { id: "continuum-dao.cast-vote-bravo", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cast a Bravo vote", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" }, support: { type: "number", required: true, description: "0 against, 1 for, 2 abstain" } } },
10173
- { id: "continuum-dao.cast-vote-delta", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cast a Delta vote including NOTA", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" } } },
10174
- { id: "continuum-dao.execute", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Execute a succeeded proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" } } },
10175
- { id: "continuum-dao.cancel", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cancel a proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" } } },
10568
+ { id: "continuum-dao.simulate-proposal", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Dry-run a Bravo/Delta proposal; returns sequential Foundry forge scripts (not isolated eth_call)", commonParams: [], params: { account: { type: "string", required: false, description: "Proposer EOA; defaults to KeyGen when keyGenId is set" }, configuration: { type: "string", required: true, description: "bravo or delta" } } },
10569
+ { id: "continuum-dao.compose-proposal-action", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Look up a contract function ABI, type-check parameter values, and preview a Bravo/Delta draft table", commonParams: [], params: { target: { type: "string", required: false, description: "Action contract address" }, functionName: { type: "string", required: false, description: "Function name or signature" }, configuration: { type: "string", required: false, description: "bravo or delta for preview" } } },
10570
+ { id: "continuum-dao.cast-vote-bravo", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cast a Bravo vote", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "Catalog id or governor proposal hash" }, support: { type: "number", required: true, description: "0 against, 1 for, 2 abstain" } } },
10571
+ { id: "continuum-dao.cast-vote-delta", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cast a Delta vote including NOTA", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "Catalog id or governor proposal hash" } } },
10572
+ { id: "continuum-dao.execute", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Execute a succeeded proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "Catalog id or governor proposal hash" } } },
10573
+ { id: "continuum-dao.cancel", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cancel a proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "Catalog id or governor proposal hash" } } },
10176
10574
  { id: "continuum-dao.fetch-live-proposals", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "List live/pending/succeeded proposals with on-chain state overlay", commonParams: [], params: { chainId: { type: "number", required: false, description: "Linea chain id" }, rpcUrl: { type: "string", required: false, description: "Linea RPC for state overlay" } } },
10177
10575
  { id: "continuum-dao.explain-proposal", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Deconstruct a proposal into a readable briefing (actions, C3, no-ops, risks)", commonParams: [], params: { id: { type: "string", required: false, description: "Backend proposal id" }, onchainId: { type: "string", required: false, description: "Governor proposal id" } } },
10576
+ { id: "continuum-dao.fetch-proposal-votes", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Who voted on a proposal and how (VoteCast / VoteCastWithParams)", commonParams: [], params: { proposalId: { type: "string", required: true, description: "Catalog id or governor proposal hash" } } },
10178
10577
  { id: "continuum-dao.forum-sign-in", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "EIP-712 forum login (veCTM gate first)", commonParams: ["keyGen", "purposeText"], params: { nodeKey: { type: "string", required: false, description: "Attached node key" }, username: { type: "string", required: false, description: "Username when there is no node key" } } },
10179
10578
  { id: "continuum-dao.forum-sign-in-eligible", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Check veCTM forum login eligibility", commonParams: [], params: { address: { type: "string", required: true, description: "KeyGen or wallet address" } } },
10180
10579
  { id: "continuum-dao.forum-sign-out", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Revoke forum ticket and sessions", commonParams: [], params: { ticket: { type: "string", required: true, description: "Forum write ticket" } } },
@@ -11288,6 +11687,7 @@ init_support();
11288
11687
  init_support2();
11289
11688
  init_addresses();
11290
11689
  init_stockTokens();
11690
+ init_constants2();
11291
11691
  function advisor(protocolId, tokenFilter, impl) {
11292
11692
  return { protocolId, tokenFilter, ...impl };
11293
11693
  }
@@ -11663,7 +12063,7 @@ var PROTOCOL_SUPPORT_ADVISORS = {
11663
12063
  if (ve) tokens.push({ address: ve, symbol: "veCTM", roles: ["position_nft"] });
11664
12064
  return {
11665
12065
  tokens,
11666
- notes: tokens.length === 0 ? "ContinuumDAO addresses are placeholders until redeploy. Lock/attach/governance stay Linea-only. Create lock needs >= 1 CTM (live minimumLock) and 1\u2013208 weeks. Prefer live GET /protocol/dao. For \u201Cwhat proposals are live now?\u201D use ctm_continuum_dao_fetch_live_proposals (not fetch_proposals). Propose requires getVotes >= live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). Bravo empty actions insert a KeyGen no-op; Delta votes need nOptions+1 weights (last is NOTA). No billing legs. After propose is mined, ctm_continuum_dao_register_proposal. Queue is not implemented." : `Default ContinuumDAO assets: ${listContinuumDaoDefaultAssets().filter((a) => a.chainId === chainId).map((a) => a.symbol).join(", ")}. Lock/attach/governance stay Linea-only. Create lock needs >= 1 CTM (live minimumLock) and 1\u2013208 weeks. For \u201Cwhat proposals are live now?\u201D use ctm_continuum_dao_fetch_live_proposals. Propose requires getVotes >= live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). Bravo empty actions insert a KeyGen no-op; Delta votes need nOptions+1 weights (last is NOTA). No billing legs. After propose is mined, ctm_continuum_dao_register_proposal. Queue is not implemented.`
12066
+ notes: tokens.length === 0 ? "ContinuumDAO addresses are placeholders until redeploy. Lock/attach/governance stay Linea-only. Create lock needs >= 1 CTM (live minimumLock) and 1\u2013208 weeks. Prefer live GET /protocol/dao. For \u201Cwhat proposals are live now?\u201D use ctm_continuum_dao_fetch_live_proposals (not fetch_proposals). After naming a proposal, offer ctm_continuum_dao_fetch_proposal_votes to see who voted and how. Propose requires getVotes >= live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). Bravo empty actions insert a KeyGen no-op; Delta votes need nOptions+1 weights (last is NOTA). No billing legs. After propose is mined, ctm_continuum_dao_register_proposal. Queue is not implemented." : `Default ContinuumDAO assets: ${listContinuumDaoDefaultAssets().filter((a) => a.chainId === chainId).map((a) => a.symbol).join(", ")}. Lock/attach/governance stay Linea-only. Create lock needs >= 1 CTM (live minimumLock) and 1\u2013208 weeks. For \u201Cwhat proposals are live now?\u201D use ctm_continuum_dao_fetch_live_proposals. After naming a proposal, offer ctm_continuum_dao_fetch_proposal_votes to see who voted and how. Propose requires getVotes >= live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). Bravo empty actions insert a KeyGen no-op; Delta votes need nOptions+1 weights (last is NOTA). No billing legs. After propose is mined, ctm_continuum_dao_register_proposal. Queue is not implemented.`
11667
12067
  };
11668
12068
  }
11669
12069
  }),
@@ -11942,6 +12342,8 @@ exports.mcpCompoundV3WithdrawInputSchema = mcpCompoundV3WithdrawInputSchema;
11942
12342
  exports.mcpContinuumDaoAttachInputSchema = mcpContinuumDaoAttachInputSchema;
11943
12343
  exports.mcpContinuumDaoCastVoteBravoInputSchema = mcpContinuumDaoCastVoteBravoInputSchema;
11944
12344
  exports.mcpContinuumDaoCastVoteDeltaInputSchema = mcpContinuumDaoCastVoteDeltaInputSchema;
12345
+ exports.mcpContinuumDaoComposeProposalActionInputSchema = mcpContinuumDaoComposeProposalActionInputSchema;
12346
+ exports.mcpContinuumDaoComposeProposalActionOutputSchema = mcpContinuumDaoComposeProposalActionOutputSchema;
11945
12347
  exports.mcpContinuumDaoCreateLockInputSchema = mcpContinuumDaoCreateLockInputSchema;
11946
12348
  exports.mcpContinuumDaoDelegateInputSchema = mcpContinuumDaoDelegateInputSchema;
11947
12349
  exports.mcpContinuumDaoExplainProposalInputSchema = mcpContinuumDaoExplainProposalInputSchema;
@@ -11954,6 +12356,8 @@ exports.mcpContinuumDaoFetchProposalInputSchema = mcpContinuumDaoFetchProposalIn
11954
12356
  exports.mcpContinuumDaoFetchProposalOutputSchema = mcpContinuumDaoFetchProposalOutputSchema;
11955
12357
  exports.mcpContinuumDaoFetchProposalStateInputSchema = mcpContinuumDaoFetchProposalStateInputSchema;
11956
12358
  exports.mcpContinuumDaoFetchProposalStateOutputSchema = mcpContinuumDaoFetchProposalStateOutputSchema;
12359
+ exports.mcpContinuumDaoFetchProposalVotesInputSchema = mcpContinuumDaoFetchProposalVotesInputSchema;
12360
+ exports.mcpContinuumDaoFetchProposalVotesOutputSchema = mcpContinuumDaoFetchProposalVotesOutputSchema;
11957
12361
  exports.mcpContinuumDaoFetchProposalsInputSchema = mcpContinuumDaoFetchProposalsInputSchema;
11958
12362
  exports.mcpContinuumDaoFetchProposalsOutputSchema = mcpContinuumDaoFetchProposalsOutputSchema;
11959
12363
  exports.mcpContinuumDaoFetchVotingPowerInputSchema = mcpContinuumDaoFetchVotingPowerInputSchema;
@@ -12013,11 +12417,14 @@ exports.mcpContinuumDaoMpaMailboxSendOutputSchema = mcpContinuumDaoMpaMailboxSen
12013
12417
  exports.mcpContinuumDaoMpaRetractInputSchema = mcpContinuumDaoMpaRetractInputSchema;
12014
12418
  exports.mcpContinuumDaoMpaRetractOutputSchema = mcpContinuumDaoMpaRetractOutputSchema;
12015
12419
  exports.mcpContinuumDaoProposalIdInputSchema = mcpContinuumDaoProposalIdInputSchema;
12420
+ exports.mcpContinuumDaoProposalVoteRowSchema = mcpContinuumDaoProposalVoteRowSchema;
12016
12421
  exports.mcpContinuumDaoProposeBravoInputSchema = mcpContinuumDaoProposeBravoInputSchema;
12017
12422
  exports.mcpContinuumDaoProposeDeltaInputSchema = mcpContinuumDaoProposeDeltaInputSchema;
12018
12423
  exports.mcpContinuumDaoRegisterProposalInputSchema = mcpContinuumDaoRegisterProposalInputSchema;
12019
12424
  exports.mcpContinuumDaoRegisterProposalOutputSchema = mcpContinuumDaoRegisterProposalOutputSchema;
12020
12425
  exports.mcpContinuumDaoRequestDetachInputSchema = mcpContinuumDaoRequestDetachInputSchema;
12426
+ exports.mcpContinuumDaoSimulateProposalInputSchema = mcpContinuumDaoSimulateProposalInputSchema;
12427
+ exports.mcpContinuumDaoSimulateProposalOutputSchema = mcpContinuumDaoSimulateProposalOutputSchema;
12021
12428
  exports.mcpContinuumDaoSplitInputSchema = mcpContinuumDaoSplitInputSchema;
12022
12429
  exports.mcpContinuumDaoTechnocoreBindInputSchema = mcpContinuumDaoTechnocoreBindInputSchema;
12023
12430
  exports.mcpContinuumDaoTechnocoreBindOutputSchema = mcpContinuumDaoTechnocoreBindOutputSchema;