dexe-mcp 0.11.0 → 0.14.0
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/CHANGELOG.md +109 -0
- package/README.md +11 -6
- package/dist/cli/init.d.ts +6 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +64 -2
- package/dist/cli/init.js.map +1 -1
- package/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -1
- package/dist/diag/checks.d.ts.map +1 -1
- package/dist/diag/checks.js +29 -0
- package/dist/diag/checks.js.map +1 -1
- package/dist/env/schema.d.ts +14 -0
- package/dist/env/schema.d.ts.map +1 -1
- package/dist/env/schema.js +14 -0
- package/dist/env/schema.js.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/preflight.d.ts +133 -0
- package/dist/lib/preflight.d.ts.map +1 -0
- package/dist/lib/preflight.js +239 -0
- package/dist/lib/preflight.js.map +1 -0
- package/dist/lib/proposalBuilders.d.ts +50 -0
- package/dist/lib/proposalBuilders.d.ts.map +1 -0
- package/dist/lib/proposalBuilders.js +311 -0
- package/dist/lib/proposalBuilders.js.map +1 -0
- package/dist/lib/stateStore.d.ts +63 -0
- package/dist/lib/stateStore.d.ts.map +1 -0
- package/dist/lib/stateStore.js +128 -0
- package/dist/lib/stateStore.js.map +1 -0
- package/dist/lib/time.d.ts +16 -0
- package/dist/lib/time.d.ts.map +1 -0
- package/dist/lib/time.js +24 -0
- package/dist/lib/time.js.map +1 -0
- package/dist/tools/daoCreate.d.ts +6 -0
- package/dist/tools/daoCreate.d.ts.map +1 -0
- package/dist/tools/daoCreate.js +155 -0
- package/dist/tools/daoCreate.js.map +1 -0
- package/dist/tools/daoDeploy.d.ts +394 -0
- package/dist/tools/daoDeploy.d.ts.map +1 -1
- package/dist/tools/daoDeploy.js +393 -422
- package/dist/tools/daoDeploy.js.map +1 -1
- package/dist/tools/doctor.d.ts.map +1 -1
- package/dist/tools/doctor.js +15 -0
- package/dist/tools/doctor.js.map +1 -1
- package/dist/tools/flow.d.ts +13 -2
- package/dist/tools/flow.d.ts.map +1 -1
- package/dist/tools/flow.js +97 -16
- package/dist/tools/flow.js.map +1 -1
- package/dist/tools/gate.d.ts +28 -0
- package/dist/tools/gate.d.ts.map +1 -0
- package/dist/tools/gate.js +295 -0
- package/dist/tools/gate.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +14 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/operationalContext.d.ts +6 -0
- package/dist/tools/operationalContext.d.ts.map +1 -0
- package/dist/tools/operationalContext.js +122 -0
- package/dist/tools/operationalContext.js.map +1 -0
- package/dist/tools/otc.d.ts.map +1 -1
- package/dist/tools/otc.js +3 -0
- package/dist/tools/otc.js.map +1 -1
- package/dist/tools/proposalBuildMore.d.ts +69 -0
- package/dist/tools/proposalBuildMore.d.ts.map +1 -1
- package/dist/tools/proposalBuildMore.js +3 -2
- package/dist/tools/proposalBuildMore.js.map +1 -1
- package/dist/tools/subgraph.d.ts.map +1 -1
- package/dist/tools/subgraph.js +3 -0
- package/dist/tools/subgraph.js.map +1 -1
- package/package.json +2 -1
- package/skills/dexe-create-dao/SKILL.md +99 -0
- package/skills/dexe-create-proposal/SKILL.md +84 -0
- package/skills/dexe-otc/SKILL.md +73 -0
- package/skills/dexe-setup/SKILL.md +108 -0
- package/skills/dexe-vote-execute/SKILL.md +64 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { RpcProvider } from "../rpc.js";
|
|
3
|
+
import { PinataClient } from "../lib/ipfs.js";
|
|
4
|
+
import { markdownToSlate } from "../lib/markdownToSlate.js";
|
|
5
|
+
import { resolveChain } from "../config.js";
|
|
6
|
+
import { sendOrCollect } from "./flow.js";
|
|
7
|
+
import { buildDeployGovPool, DeployParamsSchema } from "./daoDeploy.js";
|
|
8
|
+
import { checkDeployCap, checkUserKeeperAsset, checkTreasuryRemainder, checkLinearInitData, assertPreflight, } from "../lib/preflight.js";
|
|
9
|
+
/**
|
|
10
|
+
* `dexe_dao_create` — the one-call DAO deploy composite (Phase 1b). Wraps:
|
|
11
|
+
* avatar CID → DAO IPFS metadata → deploy config (buildDeployGovPool,
|
|
12
|
+
* reusing the exact predicted-address wiring / settings auto-expand /
|
|
13
|
+
* executorDescription upload) → sendOrCollect (dryRun / no-signer payloads /
|
|
14
|
+
* broadcast). Deploy gotchas (cap>minted, LINEAR initData, non-zero
|
|
15
|
+
* userKeeper asset, mainnet treasury remainder) are pre-flighted with
|
|
16
|
+
* actionable errors.
|
|
17
|
+
*
|
|
18
|
+
* Validated on BSC testnet (chain 97) only — mainnet deployGovPool is broken
|
|
19
|
+
* upstream (require(false)).
|
|
20
|
+
*/
|
|
21
|
+
function err(message) {
|
|
22
|
+
return { content: [{ type: "text", text: message }], isError: true };
|
|
23
|
+
}
|
|
24
|
+
function ok(data) {
|
|
25
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
26
|
+
}
|
|
27
|
+
// Params minus the two fields the composite derives itself.
|
|
28
|
+
const DaoCreateDeployParams = DeployParamsSchema.omit({ descriptionURL: true, name: true });
|
|
29
|
+
export function registerDaoCreateTools(server, ctx, signer, state) {
|
|
30
|
+
const rpc = new RpcProvider(ctx.config);
|
|
31
|
+
server.tool("dexe_dao_create", "Create (deploy) a new DeXe DAO in ONE call. Uploads DAO profile metadata to IPFS, builds the " +
|
|
32
|
+
"PoolFactory.deployGovPool tx (predicted-address wiring, 1→5 settings auto-expand, executorDescription " +
|
|
33
|
+
"IPFS upload all handled), pre-flights the known deploy reverts (cap>minted, LINEAR initData, non-zero " +
|
|
34
|
+
"userKeeper asset, mainnet treasury remainder), then signs+broadcasts when DEXE_PRIVATE_KEY is set " +
|
|
35
|
+
"(else returns the TxPayload). Validate on BSC testnet (chain 97) — mainnet deployGovPool is broken upstream. " +
|
|
36
|
+
"`deployer` defaults to the configured signer. Pass avatarCID from dexe_ipfs_upload_avatar / dexe_dao_generate_avatar.", {
|
|
37
|
+
chainId: z
|
|
38
|
+
.number()
|
|
39
|
+
.int()
|
|
40
|
+
.positive()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("Target chain id. Defaults to the MCP's default chain. Use 97 (BSC testnet) to validate."),
|
|
43
|
+
poolFactory: z.string().optional().describe("PoolFactory override; defaults to ContractsRegistry lookup"),
|
|
44
|
+
deployer: z
|
|
45
|
+
.string()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("tx.origin that sends the deploy (needed for address prediction). Defaults to the signer address."),
|
|
48
|
+
daoName: z.string().min(1).describe("DAO name (also the deployGovPool pool name)"),
|
|
49
|
+
daoDescription: z.string().default("").describe("DAO description (markdown; uploaded to IPFS as slate)"),
|
|
50
|
+
websiteUrl: z.string().default(""),
|
|
51
|
+
socialLinks: z.array(z.tuple([z.string(), z.string()])).default([]).describe("[[network, url], ...]"),
|
|
52
|
+
avatarCID: z.string().default("").describe("IPFS CID of an already-pinned JPEG avatar (dexe_ipfs_upload_avatar)"),
|
|
53
|
+
avatarFileName: z.string().default("avatar.jpeg"),
|
|
54
|
+
params: DaoCreateDeployParams,
|
|
55
|
+
dryRun: z.boolean().default(false).describe("If true, return the deploy TxPayload even when DEXE_PRIVATE_KEY is set."),
|
|
56
|
+
}, async (input) => {
|
|
57
|
+
if (!ctx.config.pinataJwt)
|
|
58
|
+
return err("DEXE_PINATA_JWT required for DAO creation (IPFS metadata upload).");
|
|
59
|
+
const deployer = input.deployer ?? (signer.hasSigner() ? signer.getAddress() : undefined);
|
|
60
|
+
if (!deployer)
|
|
61
|
+
return err("Provide 'deployer' address or set DEXE_PRIVATE_KEY.");
|
|
62
|
+
const chain = resolveChain(ctx.config, input.chainId);
|
|
63
|
+
const chainId = chain.chainId;
|
|
64
|
+
const pinata = new PinataClient(ctx.config.pinataJwt);
|
|
65
|
+
// ---------- deploy preflight (fail fast, before the RPC-heavy predict) ----------
|
|
66
|
+
const isTokenCreation = input.params.tokenParams.name.length > 0;
|
|
67
|
+
try {
|
|
68
|
+
assertPreflight([
|
|
69
|
+
checkDeployCap(input.params.tokenParams.cap, input.params.tokenParams.mintedTotal, isTokenCreation),
|
|
70
|
+
checkUserKeeperAsset(input.params.userKeeperParams.tokenAddress, input.params.userKeeperParams.nftAddress, isTokenCreation),
|
|
71
|
+
checkTreasuryRemainder(input.params.tokenParams.mintedTotal, input.params.tokenParams.amounts, chainId, isTokenCreation),
|
|
72
|
+
// LINEAR initData is auto-encoded by the deploy builder; this only trips
|
|
73
|
+
// if a caller hand-passes a wrong CUSTOM/LINEAR override.
|
|
74
|
+
checkLinearInitData(input.params.votePowerParams.voteType, input.params.votePowerParams.initData),
|
|
75
|
+
]);
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
return err(e instanceof Error ? e.message : String(e));
|
|
79
|
+
}
|
|
80
|
+
// ---------- build + upload DAO profile metadata ----------
|
|
81
|
+
let descriptionRef = "";
|
|
82
|
+
if (input.daoDescription && input.daoDescription.length > 0) {
|
|
83
|
+
const descSlate = markdownToSlate(input.daoDescription);
|
|
84
|
+
const descRes = await pinata.pinJson(descSlate, { name: `dao-desc:${input.daoName.slice(0, 30)}` });
|
|
85
|
+
descriptionRef = `ipfs://${descRes.cid}`;
|
|
86
|
+
}
|
|
87
|
+
const daoMeta = {
|
|
88
|
+
daoName: input.daoName,
|
|
89
|
+
websiteUrl: input.websiteUrl,
|
|
90
|
+
description: descriptionRef,
|
|
91
|
+
socialLinks: input.socialLinks,
|
|
92
|
+
documents: [],
|
|
93
|
+
};
|
|
94
|
+
if (input.avatarCID) {
|
|
95
|
+
daoMeta.avatarCID = input.avatarCID;
|
|
96
|
+
daoMeta.avatarFileName = input.avatarFileName;
|
|
97
|
+
daoMeta.avatarUrl = `https://${input.avatarCID}.ipfs.dweb.link/${input.avatarFileName}`;
|
|
98
|
+
}
|
|
99
|
+
let descriptionURL;
|
|
100
|
+
try {
|
|
101
|
+
const daoMetaRes = await pinata.pinJson(daoMeta, { name: `dao-meta:${input.daoName.slice(0, 30)}` });
|
|
102
|
+
descriptionURL = `ipfs://${daoMetaRes.cid}`;
|
|
103
|
+
}
|
|
104
|
+
catch (e) {
|
|
105
|
+
return err(`Failed to upload DAO metadata to IPFS: ${e instanceof Error ? e.message : String(e)}`);
|
|
106
|
+
}
|
|
107
|
+
// ---------- build the deploy tx (shared with dexe_dao_build_deploy) ----------
|
|
108
|
+
const res = await buildDeployGovPool({
|
|
109
|
+
chainId: input.chainId,
|
|
110
|
+
poolFactory: input.poolFactory,
|
|
111
|
+
deployer,
|
|
112
|
+
params: { ...input.params, descriptionURL, name: input.daoName },
|
|
113
|
+
}, ctx, rpc);
|
|
114
|
+
if (!res.ok)
|
|
115
|
+
return err(res.error);
|
|
116
|
+
// ---------- send or collect ----------
|
|
117
|
+
let result;
|
|
118
|
+
try {
|
|
119
|
+
result = await sendOrCollect(signer, [res.payload], { dryRun: input.dryRun, chainId });
|
|
120
|
+
}
|
|
121
|
+
catch (e) {
|
|
122
|
+
return err(`Deploy broadcast failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
123
|
+
}
|
|
124
|
+
// Phase 3: record the deployed DAO so dexe_context surfaces it next
|
|
125
|
+
// session. Best-effort — never fail the deploy on a state-write error.
|
|
126
|
+
if (result.mode === "executed" && state && res.predictedGovPool) {
|
|
127
|
+
try {
|
|
128
|
+
const txHash = [...result.steps].reverse().find((s) => s.txHash)?.txHash;
|
|
129
|
+
state.recordDao({
|
|
130
|
+
name: input.daoName,
|
|
131
|
+
govPool: res.predictedGovPool,
|
|
132
|
+
chainId,
|
|
133
|
+
token: res.predicted.govToken,
|
|
134
|
+
txHash,
|
|
135
|
+
deployedAt: new Date().toISOString(),
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
/* ignore */
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return ok({
|
|
143
|
+
mode: result.mode,
|
|
144
|
+
daoName: input.daoName,
|
|
145
|
+
chainId,
|
|
146
|
+
deployer,
|
|
147
|
+
descriptionURL,
|
|
148
|
+
predictedGovPool: res.predictedGovPool ?? null,
|
|
149
|
+
predicted: res.predicted,
|
|
150
|
+
note: res.note,
|
|
151
|
+
steps: result.steps,
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=daoCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daoCreate.js","sourceRoot":"","sources":["../../src/tools/daoCreate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;GAWG;AAEH,SAAS,GAAG,CAAC,OAAe;IAC1B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAChF,CAAC;AACD,SAAS,EAAE,CAAC,IAA6B;IACvC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI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C,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,398 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
3
|
import type { ToolContext } from "./context.js";
|
|
4
|
+
import { type TxPayload } from "../lib/calldata.js";
|
|
5
|
+
import { RpcProvider } from "../rpc.js";
|
|
3
6
|
export declare function registerDaoDeployTools(server: McpServer, ctx: ToolContext): void;
|
|
7
|
+
/**
|
|
8
|
+
* Full `deployGovPool` parameter object. `descriptionURL` and `name` are the
|
|
9
|
+
* two fields `dexe_dao_create` derives itself (from the uploaded DAO metadata
|
|
10
|
+
* + daoName), so it consumes `DeployParamsSchema.omit({ descriptionURL, name })`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DeployParamsSchema: z.ZodObject<{
|
|
13
|
+
settingsParams: z.ZodObject<{
|
|
14
|
+
proposalSettings: z.ZodArray<z.ZodObject<{
|
|
15
|
+
earlyCompletion: z.ZodBoolean;
|
|
16
|
+
delegatedVotingAllowed: z.ZodBoolean;
|
|
17
|
+
validatorsVote: z.ZodBoolean;
|
|
18
|
+
duration: z.ZodString;
|
|
19
|
+
durationValidators: z.ZodString;
|
|
20
|
+
executionDelay: z.ZodDefault<z.ZodString>;
|
|
21
|
+
quorum: z.ZodString;
|
|
22
|
+
quorumValidators: z.ZodString;
|
|
23
|
+
minVotesForVoting: z.ZodString;
|
|
24
|
+
minVotesForCreating: z.ZodString;
|
|
25
|
+
rewardsInfo: z.ZodObject<{
|
|
26
|
+
rewardToken: z.ZodString;
|
|
27
|
+
creationReward: z.ZodDefault<z.ZodString>;
|
|
28
|
+
executionReward: z.ZodDefault<z.ZodString>;
|
|
29
|
+
voteRewardsCoefficient: z.ZodDefault<z.ZodString>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
rewardToken: string;
|
|
32
|
+
creationReward: string;
|
|
33
|
+
executionReward: string;
|
|
34
|
+
voteRewardsCoefficient: string;
|
|
35
|
+
}, {
|
|
36
|
+
rewardToken: string;
|
|
37
|
+
creationReward?: string | undefined;
|
|
38
|
+
executionReward?: string | undefined;
|
|
39
|
+
voteRewardsCoefficient?: string | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
executorDescription: z.ZodDefault<z.ZodString>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
duration: string;
|
|
44
|
+
earlyCompletion: boolean;
|
|
45
|
+
delegatedVotingAllowed: boolean;
|
|
46
|
+
validatorsVote: boolean;
|
|
47
|
+
durationValidators: string;
|
|
48
|
+
executionDelay: string;
|
|
49
|
+
quorum: string;
|
|
50
|
+
quorumValidators: string;
|
|
51
|
+
minVotesForVoting: string;
|
|
52
|
+
minVotesForCreating: string;
|
|
53
|
+
rewardsInfo: {
|
|
54
|
+
rewardToken: string;
|
|
55
|
+
creationReward: string;
|
|
56
|
+
executionReward: string;
|
|
57
|
+
voteRewardsCoefficient: string;
|
|
58
|
+
};
|
|
59
|
+
executorDescription: string;
|
|
60
|
+
}, {
|
|
61
|
+
duration: string;
|
|
62
|
+
earlyCompletion: boolean;
|
|
63
|
+
delegatedVotingAllowed: boolean;
|
|
64
|
+
validatorsVote: boolean;
|
|
65
|
+
durationValidators: string;
|
|
66
|
+
quorum: string;
|
|
67
|
+
quorumValidators: string;
|
|
68
|
+
minVotesForVoting: string;
|
|
69
|
+
minVotesForCreating: string;
|
|
70
|
+
rewardsInfo: {
|
|
71
|
+
rewardToken: string;
|
|
72
|
+
creationReward?: string | undefined;
|
|
73
|
+
executionReward?: string | undefined;
|
|
74
|
+
voteRewardsCoefficient?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
executionDelay?: string | undefined;
|
|
77
|
+
executorDescription?: string | undefined;
|
|
78
|
+
}>, "many">;
|
|
79
|
+
additionalProposalExecutors: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
proposalSettings: {
|
|
82
|
+
duration: string;
|
|
83
|
+
earlyCompletion: boolean;
|
|
84
|
+
delegatedVotingAllowed: boolean;
|
|
85
|
+
validatorsVote: boolean;
|
|
86
|
+
durationValidators: string;
|
|
87
|
+
executionDelay: string;
|
|
88
|
+
quorum: string;
|
|
89
|
+
quorumValidators: string;
|
|
90
|
+
minVotesForVoting: string;
|
|
91
|
+
minVotesForCreating: string;
|
|
92
|
+
rewardsInfo: {
|
|
93
|
+
rewardToken: string;
|
|
94
|
+
creationReward: string;
|
|
95
|
+
executionReward: string;
|
|
96
|
+
voteRewardsCoefficient: string;
|
|
97
|
+
};
|
|
98
|
+
executorDescription: string;
|
|
99
|
+
}[];
|
|
100
|
+
additionalProposalExecutors: string[];
|
|
101
|
+
}, {
|
|
102
|
+
proposalSettings: {
|
|
103
|
+
duration: string;
|
|
104
|
+
earlyCompletion: boolean;
|
|
105
|
+
delegatedVotingAllowed: boolean;
|
|
106
|
+
validatorsVote: boolean;
|
|
107
|
+
durationValidators: string;
|
|
108
|
+
quorum: string;
|
|
109
|
+
quorumValidators: string;
|
|
110
|
+
minVotesForVoting: string;
|
|
111
|
+
minVotesForCreating: string;
|
|
112
|
+
rewardsInfo: {
|
|
113
|
+
rewardToken: string;
|
|
114
|
+
creationReward?: string | undefined;
|
|
115
|
+
executionReward?: string | undefined;
|
|
116
|
+
voteRewardsCoefficient?: string | undefined;
|
|
117
|
+
};
|
|
118
|
+
executionDelay?: string | undefined;
|
|
119
|
+
executorDescription?: string | undefined;
|
|
120
|
+
}[];
|
|
121
|
+
additionalProposalExecutors?: string[] | undefined;
|
|
122
|
+
}>;
|
|
123
|
+
validatorsParams: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
name: z.ZodString;
|
|
125
|
+
symbol: z.ZodString;
|
|
126
|
+
proposalSettings: z.ZodObject<{
|
|
127
|
+
duration: z.ZodString;
|
|
128
|
+
executionDelay: z.ZodDefault<z.ZodString>;
|
|
129
|
+
quorum: z.ZodString;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
duration: string;
|
|
132
|
+
executionDelay: string;
|
|
133
|
+
quorum: string;
|
|
134
|
+
}, {
|
|
135
|
+
duration: string;
|
|
136
|
+
quorum: string;
|
|
137
|
+
executionDelay?: string | undefined;
|
|
138
|
+
}>;
|
|
139
|
+
validators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
140
|
+
balances: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
symbol: string;
|
|
143
|
+
name: string;
|
|
144
|
+
validators: string[];
|
|
145
|
+
proposalSettings: {
|
|
146
|
+
duration: string;
|
|
147
|
+
executionDelay: string;
|
|
148
|
+
quorum: string;
|
|
149
|
+
};
|
|
150
|
+
balances: string[];
|
|
151
|
+
}, {
|
|
152
|
+
symbol: string;
|
|
153
|
+
name: string;
|
|
154
|
+
proposalSettings: {
|
|
155
|
+
duration: string;
|
|
156
|
+
quorum: string;
|
|
157
|
+
executionDelay?: string | undefined;
|
|
158
|
+
};
|
|
159
|
+
validators?: string[] | undefined;
|
|
160
|
+
balances?: string[] | undefined;
|
|
161
|
+
}>>;
|
|
162
|
+
userKeeperParams: z.ZodObject<{
|
|
163
|
+
tokenAddress: z.ZodDefault<z.ZodString>;
|
|
164
|
+
nftAddress: z.ZodDefault<z.ZodString>;
|
|
165
|
+
individualPower: z.ZodDefault<z.ZodString>;
|
|
166
|
+
nftsTotalSupply: z.ZodDefault<z.ZodString>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
nftAddress: string;
|
|
169
|
+
tokenAddress: string;
|
|
170
|
+
individualPower: string;
|
|
171
|
+
nftsTotalSupply: string;
|
|
172
|
+
}, {
|
|
173
|
+
nftAddress?: string | undefined;
|
|
174
|
+
tokenAddress?: string | undefined;
|
|
175
|
+
individualPower?: string | undefined;
|
|
176
|
+
nftsTotalSupply?: string | undefined;
|
|
177
|
+
}>;
|
|
178
|
+
tokenParams: z.ZodObject<{
|
|
179
|
+
name: z.ZodDefault<z.ZodString>;
|
|
180
|
+
symbol: z.ZodDefault<z.ZodString>;
|
|
181
|
+
users: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
182
|
+
cap: z.ZodDefault<z.ZodString>;
|
|
183
|
+
mintedTotal: z.ZodDefault<z.ZodString>;
|
|
184
|
+
amounts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
symbol: string;
|
|
187
|
+
name: string;
|
|
188
|
+
users: string[];
|
|
189
|
+
cap: string;
|
|
190
|
+
mintedTotal: string;
|
|
191
|
+
amounts: string[];
|
|
192
|
+
}, {
|
|
193
|
+
symbol?: string | undefined;
|
|
194
|
+
name?: string | undefined;
|
|
195
|
+
users?: string[] | undefined;
|
|
196
|
+
cap?: string | undefined;
|
|
197
|
+
mintedTotal?: string | undefined;
|
|
198
|
+
amounts?: string[] | undefined;
|
|
199
|
+
}>;
|
|
200
|
+
votePowerParams: z.ZodObject<{
|
|
201
|
+
voteType: z.ZodEnum<["LINEAR_VOTES", "POLYNOMIAL_VOTES", "CUSTOM_VOTES"]>;
|
|
202
|
+
/** Raw initData override — only used for CUSTOM_VOTES. For LINEAR/POLYNOMIAL
|
|
203
|
+
* the tool auto-encodes the correct initializer calldata. */
|
|
204
|
+
initData: z.ZodOptional<z.ZodString>;
|
|
205
|
+
presetAddress: z.ZodDefault<z.ZodString>;
|
|
206
|
+
/** Required when voteType is POLYNOMIAL_VOTES. */
|
|
207
|
+
polynomialCoefficients: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
coefficient1: z.ZodString;
|
|
209
|
+
coefficient2: z.ZodString;
|
|
210
|
+
coefficient3: z.ZodString;
|
|
211
|
+
}, "strip", z.ZodTypeAny, {
|
|
212
|
+
coefficient1: string;
|
|
213
|
+
coefficient2: string;
|
|
214
|
+
coefficient3: string;
|
|
215
|
+
}, {
|
|
216
|
+
coefficient1: string;
|
|
217
|
+
coefficient2: string;
|
|
218
|
+
coefficient3: string;
|
|
219
|
+
}>>;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
voteType: "LINEAR_VOTES" | "POLYNOMIAL_VOTES" | "CUSTOM_VOTES";
|
|
222
|
+
presetAddress: string;
|
|
223
|
+
initData?: string | undefined;
|
|
224
|
+
polynomialCoefficients?: {
|
|
225
|
+
coefficient1: string;
|
|
226
|
+
coefficient2: string;
|
|
227
|
+
coefficient3: string;
|
|
228
|
+
} | undefined;
|
|
229
|
+
}, {
|
|
230
|
+
voteType: "LINEAR_VOTES" | "POLYNOMIAL_VOTES" | "CUSTOM_VOTES";
|
|
231
|
+
initData?: string | undefined;
|
|
232
|
+
presetAddress?: string | undefined;
|
|
233
|
+
polynomialCoefficients?: {
|
|
234
|
+
coefficient1: string;
|
|
235
|
+
coefficient2: string;
|
|
236
|
+
coefficient3: string;
|
|
237
|
+
} | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
verifier: z.ZodDefault<z.ZodString>;
|
|
240
|
+
onlyBABTHolders: z.ZodDefault<z.ZodBoolean>;
|
|
241
|
+
descriptionURL: z.ZodString;
|
|
242
|
+
name: z.ZodString;
|
|
243
|
+
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
name: string;
|
|
245
|
+
descriptionURL: string;
|
|
246
|
+
settingsParams: {
|
|
247
|
+
proposalSettings: {
|
|
248
|
+
duration: string;
|
|
249
|
+
earlyCompletion: boolean;
|
|
250
|
+
delegatedVotingAllowed: boolean;
|
|
251
|
+
validatorsVote: boolean;
|
|
252
|
+
durationValidators: string;
|
|
253
|
+
executionDelay: string;
|
|
254
|
+
quorum: string;
|
|
255
|
+
quorumValidators: string;
|
|
256
|
+
minVotesForVoting: string;
|
|
257
|
+
minVotesForCreating: string;
|
|
258
|
+
rewardsInfo: {
|
|
259
|
+
rewardToken: string;
|
|
260
|
+
creationReward: string;
|
|
261
|
+
executionReward: string;
|
|
262
|
+
voteRewardsCoefficient: string;
|
|
263
|
+
};
|
|
264
|
+
executorDescription: string;
|
|
265
|
+
}[];
|
|
266
|
+
additionalProposalExecutors: string[];
|
|
267
|
+
};
|
|
268
|
+
userKeeperParams: {
|
|
269
|
+
nftAddress: string;
|
|
270
|
+
tokenAddress: string;
|
|
271
|
+
individualPower: string;
|
|
272
|
+
nftsTotalSupply: string;
|
|
273
|
+
};
|
|
274
|
+
tokenParams: {
|
|
275
|
+
symbol: string;
|
|
276
|
+
name: string;
|
|
277
|
+
users: string[];
|
|
278
|
+
cap: string;
|
|
279
|
+
mintedTotal: string;
|
|
280
|
+
amounts: string[];
|
|
281
|
+
};
|
|
282
|
+
votePowerParams: {
|
|
283
|
+
voteType: "LINEAR_VOTES" | "POLYNOMIAL_VOTES" | "CUSTOM_VOTES";
|
|
284
|
+
presetAddress: string;
|
|
285
|
+
initData?: string | undefined;
|
|
286
|
+
polynomialCoefficients?: {
|
|
287
|
+
coefficient1: string;
|
|
288
|
+
coefficient2: string;
|
|
289
|
+
coefficient3: string;
|
|
290
|
+
} | undefined;
|
|
291
|
+
};
|
|
292
|
+
verifier: string;
|
|
293
|
+
onlyBABTHolders: boolean;
|
|
294
|
+
validatorsParams?: {
|
|
295
|
+
symbol: string;
|
|
296
|
+
name: string;
|
|
297
|
+
validators: string[];
|
|
298
|
+
proposalSettings: {
|
|
299
|
+
duration: string;
|
|
300
|
+
executionDelay: string;
|
|
301
|
+
quorum: string;
|
|
302
|
+
};
|
|
303
|
+
balances: string[];
|
|
304
|
+
} | undefined;
|
|
305
|
+
}, {
|
|
306
|
+
name: string;
|
|
307
|
+
descriptionURL: string;
|
|
308
|
+
settingsParams: {
|
|
309
|
+
proposalSettings: {
|
|
310
|
+
duration: string;
|
|
311
|
+
earlyCompletion: boolean;
|
|
312
|
+
delegatedVotingAllowed: boolean;
|
|
313
|
+
validatorsVote: boolean;
|
|
314
|
+
durationValidators: string;
|
|
315
|
+
quorum: string;
|
|
316
|
+
quorumValidators: string;
|
|
317
|
+
minVotesForVoting: string;
|
|
318
|
+
minVotesForCreating: string;
|
|
319
|
+
rewardsInfo: {
|
|
320
|
+
rewardToken: string;
|
|
321
|
+
creationReward?: string | undefined;
|
|
322
|
+
executionReward?: string | undefined;
|
|
323
|
+
voteRewardsCoefficient?: string | undefined;
|
|
324
|
+
};
|
|
325
|
+
executionDelay?: string | undefined;
|
|
326
|
+
executorDescription?: string | undefined;
|
|
327
|
+
}[];
|
|
328
|
+
additionalProposalExecutors?: string[] | undefined;
|
|
329
|
+
};
|
|
330
|
+
userKeeperParams: {
|
|
331
|
+
nftAddress?: string | undefined;
|
|
332
|
+
tokenAddress?: string | undefined;
|
|
333
|
+
individualPower?: string | undefined;
|
|
334
|
+
nftsTotalSupply?: string | undefined;
|
|
335
|
+
};
|
|
336
|
+
tokenParams: {
|
|
337
|
+
symbol?: string | undefined;
|
|
338
|
+
name?: string | undefined;
|
|
339
|
+
users?: string[] | undefined;
|
|
340
|
+
cap?: string | undefined;
|
|
341
|
+
mintedTotal?: string | undefined;
|
|
342
|
+
amounts?: string[] | undefined;
|
|
343
|
+
};
|
|
344
|
+
votePowerParams: {
|
|
345
|
+
voteType: "LINEAR_VOTES" | "POLYNOMIAL_VOTES" | "CUSTOM_VOTES";
|
|
346
|
+
initData?: string | undefined;
|
|
347
|
+
presetAddress?: string | undefined;
|
|
348
|
+
polynomialCoefficients?: {
|
|
349
|
+
coefficient1: string;
|
|
350
|
+
coefficient2: string;
|
|
351
|
+
coefficient3: string;
|
|
352
|
+
} | undefined;
|
|
353
|
+
};
|
|
354
|
+
validatorsParams?: {
|
|
355
|
+
symbol: string;
|
|
356
|
+
name: string;
|
|
357
|
+
proposalSettings: {
|
|
358
|
+
duration: string;
|
|
359
|
+
quorum: string;
|
|
360
|
+
executionDelay?: string | undefined;
|
|
361
|
+
};
|
|
362
|
+
validators?: string[] | undefined;
|
|
363
|
+
balances?: string[] | undefined;
|
|
364
|
+
} | undefined;
|
|
365
|
+
verifier?: string | undefined;
|
|
366
|
+
onlyBABTHolders?: boolean | undefined;
|
|
367
|
+
}>;
|
|
368
|
+
export type DeployParams = z.infer<typeof DeployParamsSchema>;
|
|
369
|
+
export interface DeployBuildInput {
|
|
370
|
+
chainId?: number;
|
|
371
|
+
poolFactory?: string;
|
|
372
|
+
deployer: string;
|
|
373
|
+
params: DeployParams;
|
|
374
|
+
}
|
|
375
|
+
export type DeployBuildResult = {
|
|
376
|
+
ok: true;
|
|
377
|
+
payload: TxPayload;
|
|
378
|
+
predictedGovPool?: string;
|
|
379
|
+
note: string;
|
|
380
|
+
predicted: {
|
|
381
|
+
govPool?: string;
|
|
382
|
+
govToken?: string;
|
|
383
|
+
distributionProposal?: string;
|
|
384
|
+
govTokenSale?: string;
|
|
385
|
+
};
|
|
386
|
+
} | {
|
|
387
|
+
ok: false;
|
|
388
|
+
error: string;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Pure builder for the `PoolFactory.deployGovPool` tx. Extracted from the
|
|
392
|
+
* `dexe_dao_build_deploy` handler so the `dexe_dao_create` composite reuses the
|
|
393
|
+
* exact same predicted-address wiring, settings auto-expand, cap/minted guard,
|
|
394
|
+
* executorDescription IPFS upload, and encoding. Returns a discriminated result
|
|
395
|
+
* instead of tool-shaped content.
|
|
396
|
+
*/
|
|
397
|
+
export declare function buildDeployGovPool(input: DeployBuildInput, ctx: ToolContext, rpc: RpcProvider): Promise<DeployBuildResult>;
|
|
4
398
|
//# sourceMappingURL=daoDeploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daoDeploy.d.ts","sourceRoot":"","sources":["../../src/tools/daoDeploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"daoDeploy.d.ts","sourceRoot":"","sources":["../../src/tools/daoDeploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE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