@continuumdao/ctm-mpc-defi 0.2.46 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/catalog.cjs +446 -128
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +1297 -27
- package/dist/agent/catalog.js +443 -129
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/continuum-dao/SKILL.md +10 -5
- package/dist/protocols/evm/continuum-dao/index.cjs +3893 -2576
- package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/continuum-dao/index.d.ts +3597 -6
- package/dist/protocols/evm/continuum-dao/index.js +3811 -2478
- package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/catalog.cjs
CHANGED
|
@@ -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(),
|
|
@@ -3179,6 +3525,8 @@ var liveProposalRowSchema = zod.z.object({
|
|
|
3179
3525
|
title: zod.z.string(),
|
|
3180
3526
|
configuration: zod.z.number().optional(),
|
|
3181
3527
|
governorAddress: zod.z.string().optional(),
|
|
3528
|
+
proposer: zod.z.string().optional(),
|
|
3529
|
+
committeeProposer: zod.z.boolean().optional(),
|
|
3182
3530
|
state: zod.z.number().nullable(),
|
|
3183
3531
|
stateLabel: zod.z.string(),
|
|
3184
3532
|
bucket: zod.z.enum(["live", "pending", "readyToExecute", "recentlyCompleted", "unknown"]),
|
|
@@ -3214,6 +3562,7 @@ var mcpContinuumDaoExplainProposalOutputSchema = zod.z.object({
|
|
|
3214
3562
|
title: zod.z.string(),
|
|
3215
3563
|
description: zod.z.string(),
|
|
3216
3564
|
proposer: zod.z.string(),
|
|
3565
|
+
committeeProposer: zod.z.boolean().optional(),
|
|
3217
3566
|
forumKey: zod.z.string(),
|
|
3218
3567
|
forumSection: zod.z.string().nullable().optional(),
|
|
3219
3568
|
forumCid: zod.z.number().nullable().optional(),
|
|
@@ -5906,13 +6255,14 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
5906
6255
|
actionId: "continuum-dao.propose-bravo",
|
|
5907
6256
|
protocolId: "continuum-dao",
|
|
5908
6257
|
chainCategory: "evm",
|
|
5909
|
-
description: "Build ContinuumDAO.propose for a Bravo (For/Against/Abstain) proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() (
|
|
6258
|
+
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
6259
|
prerequisites: [
|
|
5911
6260
|
"keyGen",
|
|
5912
6261
|
"Linea RPC",
|
|
5913
6262
|
"configured governor",
|
|
5914
|
-
"veCTM voting power >= live proposalThreshold()",
|
|
5915
|
-
"forumKey from forum_create_topic"
|
|
6263
|
+
"KeyGen veCTM voting power >= live proposalThreshold() (hard fail)",
|
|
6264
|
+
"forumKey from forum_create_topic",
|
|
6265
|
+
"governor-executed actions must simulate without revert"
|
|
5916
6266
|
],
|
|
5917
6267
|
followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_register_proposal"],
|
|
5918
6268
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoProposeBravo" },
|
|
@@ -5923,13 +6273,14 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
5923
6273
|
actionId: "continuum-dao.propose-delta",
|
|
5924
6274
|
protocolId: "continuum-dao",
|
|
5925
6275
|
chainCategory: "evm",
|
|
5926
|
-
description: "Build ContinuumDAO.propose for a Delta multi-option proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() (
|
|
6276
|
+
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
6277
|
prerequisites: [
|
|
5928
6278
|
"keyGen",
|
|
5929
6279
|
"at least 2 options",
|
|
5930
6280
|
"nWinners < nOptions",
|
|
5931
|
-
"veCTM voting power >= live proposalThreshold()",
|
|
5932
|
-
"forumKey from forum_create_topic"
|
|
6281
|
+
"KeyGen veCTM voting power >= live proposalThreshold() (hard fail)",
|
|
6282
|
+
"forumKey from forum_create_topic",
|
|
6283
|
+
"governor-executed actions must simulate without revert"
|
|
5933
6284
|
],
|
|
5934
6285
|
followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_register_proposal"],
|
|
5935
6286
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoProposeDeltaFromMcp" },
|
|
@@ -5940,7 +6291,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
5940
6291
|
actionId: "continuum-dao.cast-vote-bravo",
|
|
5941
6292
|
protocolId: "continuum-dao",
|
|
5942
6293
|
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.",
|
|
6294
|
+
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
6295
|
prerequisites: ["keyGen", "proposalId", "Active proposal", "snapshot votes > 0", "hasVoted false"],
|
|
5945
6296
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCastVoteBravoFromMcp" },
|
|
5946
6297
|
inputZod: mcpContinuumDaoCastVoteBravoInputSchema
|
|
@@ -5960,7 +6311,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
5960
6311
|
actionId: "continuum-dao.execute",
|
|
5961
6312
|
protocolId: "continuum-dao",
|
|
5962
6313
|
chainCategory: "evm",
|
|
5963
|
-
description: "Build ContinuumDAO.execute(proposalId). Call after Succeeded. Queue is not implemented.",
|
|
6314
|
+
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
6315
|
prerequisites: ["keyGen", "proposalId", "Succeeded state"],
|
|
5965
6316
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoExecute" },
|
|
5966
6317
|
inputZod: mcpContinuumDaoProposalIdInputSchema
|
|
@@ -7432,6 +7783,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
7432
7783
|
prerequisites: ["rpcUrl", "account (KeyGen ETH address)", "governor"],
|
|
7433
7784
|
followUp: [
|
|
7434
7785
|
"ctm_continuum_dao_fetch_delegates",
|
|
7786
|
+
"ctm_continuum_dao_simulate_proposal",
|
|
7435
7787
|
"ctm_continuum_dao_build_propose_bravo_multisign",
|
|
7436
7788
|
"ctm_continuum_dao_build_propose_delta_multisign"
|
|
7437
7789
|
],
|
|
@@ -7439,6 +7791,46 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
7439
7791
|
inputZod: mcpContinuumDaoFetchVotingPowerInputSchema,
|
|
7440
7792
|
outputZod: mcpContinuumDaoFetchVotingPowerOutputSchema
|
|
7441
7793
|
}),
|
|
7794
|
+
defineMcpTool({
|
|
7795
|
+
name: "ctm_continuum_dao_simulate_proposal",
|
|
7796
|
+
actionId: "continuum-dao.simulate-proposal",
|
|
7797
|
+
protocolId: "continuum-dao",
|
|
7798
|
+
chainCategory: "evm",
|
|
7799
|
+
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.",
|
|
7800
|
+
prerequisites: [
|
|
7801
|
+
"chainId 59144 or 59141",
|
|
7802
|
+
"account or keyGenId",
|
|
7803
|
+
"configuration bravo|delta",
|
|
7804
|
+
"actions (Bravo) or options + nWinners (Delta)"
|
|
7805
|
+
],
|
|
7806
|
+
followUp: [
|
|
7807
|
+
"ctm_continuum_dao_compose_proposal_action",
|
|
7808
|
+
"ctm_continuum_dao_build_propose_bravo_multisign",
|
|
7809
|
+
"ctm_continuum_dao_build_propose_delta_multisign"
|
|
7810
|
+
],
|
|
7811
|
+
handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoSimulateProposal" },
|
|
7812
|
+
inputZod: mcpContinuumDaoSimulateProposalInputSchema,
|
|
7813
|
+
outputZod: mcpContinuumDaoSimulateProposalOutputSchema
|
|
7814
|
+
}),
|
|
7815
|
+
defineMcpTool({
|
|
7816
|
+
name: "ctm_continuum_dao_compose_proposal_action",
|
|
7817
|
+
actionId: "continuum-dao.compose-proposal-action",
|
|
7818
|
+
protocolId: "continuum-dao",
|
|
7819
|
+
chainCategory: "evm",
|
|
7820
|
+
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.",
|
|
7821
|
+
prerequisites: [
|
|
7822
|
+
"chainId 59144 or 59141",
|
|
7823
|
+
"target + functionName (lookup/validate) or configuration + actions/options (preview)"
|
|
7824
|
+
],
|
|
7825
|
+
followUp: [
|
|
7826
|
+
"ctm_continuum_dao_simulate_proposal",
|
|
7827
|
+
"ctm_continuum_dao_build_propose_bravo_multisign",
|
|
7828
|
+
"ctm_continuum_dao_build_propose_delta_multisign"
|
|
7829
|
+
],
|
|
7830
|
+
handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoComposeProposalAction" },
|
|
7831
|
+
inputZod: mcpContinuumDaoComposeProposalActionInputSchema,
|
|
7832
|
+
outputZod: mcpContinuumDaoComposeProposalActionOutputSchema
|
|
7833
|
+
}),
|
|
7442
7834
|
defineMcpTool({
|
|
7443
7835
|
name: "ctm_continuum_dao_fetch_delegates",
|
|
7444
7836
|
actionId: "continuum-dao.fetch-delegates",
|
|
@@ -7459,7 +7851,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
7459
7851
|
actionId: "continuum-dao.fetch-proposal-state",
|
|
7460
7852
|
protocolId: "continuum-dao",
|
|
7461
7853
|
chainCategory: "evm",
|
|
7462
|
-
description: "Read ContinuumDAO.state and proposalVotes
|
|
7854
|
+
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.",
|
|
7463
7855
|
prerequisites: ["rpcUrl", "proposalId", "governor"],
|
|
7464
7856
|
followUp: [
|
|
7465
7857
|
"ctm_continuum_dao_build_cast_vote_bravo_multisign",
|
|
@@ -7498,7 +7890,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
7498
7890
|
actionId: "continuum-dao.fetch-live-proposals",
|
|
7499
7891
|
protocolId: "continuum-dao",
|
|
7500
7892
|
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.",
|
|
7893
|
+
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.",
|
|
7502
7894
|
prerequisites: ["load_defi_protocol continuum-dao", "Linea chainId 59144 or 59141", "rpcUrl", "governor if constant is zero"],
|
|
7503
7895
|
followUp: [
|
|
7504
7896
|
"ctm_continuum_dao_explain_proposal",
|
|
@@ -7515,7 +7907,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
7515
7907
|
actionId: "continuum-dao.explain-proposal",
|
|
7516
7908
|
protocolId: "continuum-dao",
|
|
7517
7909
|
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.",
|
|
7910
|
+
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. Does not vote. For a policy recommendation load the mpc-config continuum-dao-vote-policy skill.",
|
|
7519
7911
|
prerequisites: ["id (backend) or onchainId"],
|
|
7520
7912
|
followUp: ["ctm_continuum_dao_fetch_proposal_state", "ctm_continuum_dao_forum_fetch_thread"],
|
|
7521
7913
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoExplainProposal" },
|
|
@@ -10052,96 +10444,15 @@ var aerodromeProtocolModule = {
|
|
|
10052
10444
|
]
|
|
10053
10445
|
};
|
|
10054
10446
|
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
10447
|
|
|
10144
10448
|
// src/protocols/evm/continuum-dao/index.ts
|
|
10449
|
+
init_constants2();
|
|
10450
|
+
init_constants2();
|
|
10451
|
+
init_governance();
|
|
10452
|
+
init_simulateProposal();
|
|
10453
|
+
init_foundryProposalScript();
|
|
10454
|
+
init_explainProposal();
|
|
10455
|
+
init_forum();
|
|
10145
10456
|
var continuumDaoProtocolModule = {
|
|
10146
10457
|
id: CONTINUUM_DAO_PROTOCOL_ID,
|
|
10147
10458
|
chainCategory: "evm",
|
|
@@ -10169,10 +10480,12 @@ var continuumDaoProtocolModule = {
|
|
|
10169
10480
|
{ 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
10481
|
{ 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
10482
|
{ 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.
|
|
10173
|
-
{ id: "continuum-dao.
|
|
10174
|
-
{ id: "continuum-dao.
|
|
10175
|
-
{ id: "continuum-dao.
|
|
10483
|
+
{ 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" } } },
|
|
10484
|
+
{ 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" } } },
|
|
10485
|
+
{ 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" } } },
|
|
10486
|
+
{ 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" } } },
|
|
10487
|
+
{ 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" } } },
|
|
10488
|
+
{ 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
10489
|
{ 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
10490
|
{ 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" } } },
|
|
10178
10491
|
{ 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" } } },
|
|
@@ -11288,6 +11601,7 @@ init_support();
|
|
|
11288
11601
|
init_support2();
|
|
11289
11602
|
init_addresses();
|
|
11290
11603
|
init_stockTokens();
|
|
11604
|
+
init_constants2();
|
|
11291
11605
|
function advisor(protocolId, tokenFilter, impl) {
|
|
11292
11606
|
return { protocolId, tokenFilter, ...impl };
|
|
11293
11607
|
}
|
|
@@ -11942,6 +12256,8 @@ exports.mcpCompoundV3WithdrawInputSchema = mcpCompoundV3WithdrawInputSchema;
|
|
|
11942
12256
|
exports.mcpContinuumDaoAttachInputSchema = mcpContinuumDaoAttachInputSchema;
|
|
11943
12257
|
exports.mcpContinuumDaoCastVoteBravoInputSchema = mcpContinuumDaoCastVoteBravoInputSchema;
|
|
11944
12258
|
exports.mcpContinuumDaoCastVoteDeltaInputSchema = mcpContinuumDaoCastVoteDeltaInputSchema;
|
|
12259
|
+
exports.mcpContinuumDaoComposeProposalActionInputSchema = mcpContinuumDaoComposeProposalActionInputSchema;
|
|
12260
|
+
exports.mcpContinuumDaoComposeProposalActionOutputSchema = mcpContinuumDaoComposeProposalActionOutputSchema;
|
|
11945
12261
|
exports.mcpContinuumDaoCreateLockInputSchema = mcpContinuumDaoCreateLockInputSchema;
|
|
11946
12262
|
exports.mcpContinuumDaoDelegateInputSchema = mcpContinuumDaoDelegateInputSchema;
|
|
11947
12263
|
exports.mcpContinuumDaoExplainProposalInputSchema = mcpContinuumDaoExplainProposalInputSchema;
|
|
@@ -12018,6 +12334,8 @@ exports.mcpContinuumDaoProposeDeltaInputSchema = mcpContinuumDaoProposeDeltaInpu
|
|
|
12018
12334
|
exports.mcpContinuumDaoRegisterProposalInputSchema = mcpContinuumDaoRegisterProposalInputSchema;
|
|
12019
12335
|
exports.mcpContinuumDaoRegisterProposalOutputSchema = mcpContinuumDaoRegisterProposalOutputSchema;
|
|
12020
12336
|
exports.mcpContinuumDaoRequestDetachInputSchema = mcpContinuumDaoRequestDetachInputSchema;
|
|
12337
|
+
exports.mcpContinuumDaoSimulateProposalInputSchema = mcpContinuumDaoSimulateProposalInputSchema;
|
|
12338
|
+
exports.mcpContinuumDaoSimulateProposalOutputSchema = mcpContinuumDaoSimulateProposalOutputSchema;
|
|
12021
12339
|
exports.mcpContinuumDaoSplitInputSchema = mcpContinuumDaoSplitInputSchema;
|
|
12022
12340
|
exports.mcpContinuumDaoTechnocoreBindInputSchema = mcpContinuumDaoTechnocoreBindInputSchema;
|
|
12023
12341
|
exports.mcpContinuumDaoTechnocoreBindOutputSchema = mcpContinuumDaoTechnocoreBindOutputSchema;
|