@stabilitydao/stability 0.53.0 → 0.54.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/out/activity/builder.d.ts +92 -54
- package/out/activity/builder.d.ts.map +1 -1
- package/out/activity/builder.js +4 -0
- package/out/activity/builder.js.map +1 -1
- package/out/daos.d.ts +4 -0
- package/out/daos.d.ts.map +1 -0
- package/out/daos.js +532 -0
- package/out/daos.js.map +1 -0
- package/out/deployments.d.ts.map +1 -1
- package/out/deployments.js +1 -0
- package/out/deployments.js.map +1 -1
- package/out/index.d.ts +3 -2
- package/out/index.d.ts.map +1 -1
- package/out/index.js +8 -3
- package/out/index.js.map +1 -1
- package/out/os.d.ts +198 -40
- package/out/os.d.ts.map +1 -1
- package/out/os.js +134 -432
- package/out/os.js.map +1 -1
- package/package.json +1 -1
package/out/os.js
CHANGED
|
@@ -1,446 +1,148 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
Stability OS MVP prototype
|
|
4
|
-
Self-developing DAOs Operating System
|
|
3
|
+
Stability OS MVP prototype.
|
|
5
4
|
*/
|
|
6
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
exports.OS = exports.UnitComponentCategory = exports.UnitStatus = exports.UnitType = exports.FundingType = exports.LifecyclePhase = exports.Activity = exports.STABILITY_OS_DESCRIPTION = void 0;
|
|
7
|
+
exports.STABILITY_OS_DESCRIPTION = "Operating System of Self-developing DAOs";
|
|
8
|
+
/** Organization activities supported by OS. */
|
|
9
|
+
var Activity;
|
|
10
|
+
(function (Activity) {
|
|
11
|
+
/** Owner of Decentralized Finance protocols */
|
|
12
|
+
Activity["DEFI_PROTOCOL_OPERATOR"] = "DEFI_PROTOCOL_OPERATOR";
|
|
13
|
+
/** Owner of Software as a Service business */
|
|
14
|
+
Activity["SAAS_OPERATOR"] = "SAAS_OPERATOR";
|
|
15
|
+
/** Searching of Maximum Extractable Value opportunities and submitting it to block builders. */
|
|
16
|
+
Activity["MEV_SEARCHER"] = "MEV_SEARCHER";
|
|
17
|
+
/** BUILDER is a team of engineers managed by DAOs. */
|
|
18
|
+
Activity["BUILDER"] = "BUILDER";
|
|
19
|
+
})(Activity || (exports.Activity = Activity = {}));
|
|
20
|
+
/**
|
|
21
|
+
Lifecycle phase represents DAO tokenomics stage.
|
|
22
|
+
*/
|
|
23
|
+
var LifecyclePhase;
|
|
24
|
+
(function (LifecyclePhase) {
|
|
13
25
|
/** Created */
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
26
|
+
LifecyclePhase["DRAFT"] = "DRAFT";
|
|
27
|
+
/**
|
|
28
|
+
Initial funding. DAO project passed requirements.
|
|
29
|
+
Since SEED started a DAO become real DAO:
|
|
30
|
+
- noncustodial
|
|
31
|
+
- tokenized share holdings
|
|
32
|
+
- collective management via voting
|
|
33
|
+
*/
|
|
34
|
+
LifecyclePhase["SEED"] = "SEED";
|
|
17
35
|
/** Using SEED funds to launch MVP / Unit generating */
|
|
18
|
-
|
|
19
|
-
/** TGE is funding event for token liquidity and DAO developments */
|
|
20
|
-
|
|
36
|
+
LifecyclePhase["DEVELOPMENT"] = "DEVELOPMENT";
|
|
37
|
+
/** TGE is funding event for token liquidity and DAO developments (optionally) */
|
|
38
|
+
LifecyclePhase["TGE"] = "TGE";
|
|
21
39
|
/** Delay before any vesting allocation started */
|
|
22
|
-
|
|
40
|
+
LifecyclePhase["LIVE_CLIFF"] = "LIVE_CLIFF";
|
|
23
41
|
/** Vesting period active */
|
|
24
|
-
|
|
42
|
+
LifecyclePhase["LIVE_VESTING"] = "LIVE_VESTING";
|
|
25
43
|
/** Vesting ended - token fully distributed */
|
|
26
|
-
|
|
44
|
+
LifecyclePhase["LIVE"] = "LIVE";
|
|
27
45
|
/** Absorbed by other DAO running on Stability OS */
|
|
28
|
-
|
|
29
|
-
})(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
LifecyclePhase["ABSORBED"] = "ABSORBED";
|
|
47
|
+
})(LifecyclePhase || (exports.LifecyclePhase = LifecyclePhase = {}));
|
|
48
|
+
var FundingType;
|
|
49
|
+
(function (FundingType) {
|
|
50
|
+
FundingType["SEED"] = "SEED";
|
|
51
|
+
FundingType["TGE"] = "TGE";
|
|
52
|
+
})(FundingType || (exports.FundingType = FundingType = {}));
|
|
53
|
+
/** Supported unit types */
|
|
54
|
+
var UnitType;
|
|
55
|
+
(function (UnitType) {
|
|
56
|
+
/** VE-token early exit fees */
|
|
57
|
+
UnitType["PVP"] = "PVP";
|
|
58
|
+
/** Decentralized finance protocol */
|
|
59
|
+
UnitType["DEFI_PROTOCOL"] = "DEFI_PROTOCOL";
|
|
60
|
+
/** Software as a Service business */
|
|
61
|
+
UnitType["SAAS"] = "SAAS";
|
|
62
|
+
/** Maximum Extractable Value tool */
|
|
63
|
+
UnitType["MEV"] = "MEV";
|
|
64
|
+
})(UnitType || (exports.UnitType = UnitType = {}));
|
|
65
|
+
var UnitStatus;
|
|
66
|
+
(function (UnitStatus) {
|
|
67
|
+
UnitStatus["RESEARCH"] = "RESEARCH";
|
|
68
|
+
UnitStatus["BUILDING"] = "BUILDING";
|
|
69
|
+
UnitStatus["LIVE"] = "LIVE";
|
|
70
|
+
})(UnitStatus || (exports.UnitStatus = UnitStatus = {}));
|
|
71
|
+
/** Supported categories of running units. */
|
|
72
|
+
var UnitComponentCategory;
|
|
73
|
+
(function (UnitComponentCategory) {
|
|
74
|
+
UnitComponentCategory["CHAIN_SUPPORT"] = "CHAIN_SUPPORT";
|
|
75
|
+
UnitComponentCategory["ENGINE_SUPPORT"] = "ENGINE_SUPPORT";
|
|
76
|
+
UnitComponentCategory["DEFI_STRATEGY"] = "DEFI_STRATEGY";
|
|
77
|
+
UnitComponentCategory["MEV_STRATEGY"] = "MEV_STRATEGY";
|
|
78
|
+
})(UnitComponentCategory || (exports.UnitComponentCategory = UnitComponentCategory = {}));
|
|
79
|
+
/**
|
|
80
|
+
Operating System typescript implementation
|
|
81
|
+
@class
|
|
82
|
+
*/
|
|
83
|
+
class OS {
|
|
84
|
+
constructor(daos) {
|
|
85
|
+
daos.forEach((dao) => this.validate(dao));
|
|
86
|
+
this.daos = daos;
|
|
37
87
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
emoji: "🧊",
|
|
72
|
-
ui: [
|
|
73
|
-
{
|
|
74
|
-
href: "https://stability.farm/vaults",
|
|
75
|
-
title: "All Vaults",
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
href: "https://stability.farm/metavaults",
|
|
79
|
-
title: "Meta Vaults",
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
href: "https://stability.farm/leverage-vaults",
|
|
83
|
-
title: "Leverage Vaults",
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
unitId: "stability:stabilityMarket",
|
|
89
|
-
name: "Lending",
|
|
90
|
-
status: "LIVE" /* UnitStatus.LIVE */,
|
|
91
|
-
revenueShare: 25,
|
|
92
|
-
type: "DEFI_PROTOCOL" /* UnitType.DEFI_PROTOCOL */,
|
|
93
|
-
components: {
|
|
94
|
-
["ENGINE_SUPPORT" /* UnitComponentCategory.ENGINE_SUPPORT */]: ["Aave v3.0.2" /* LendingEngine.AAVE_3_0_2 */],
|
|
95
|
-
},
|
|
96
|
-
emoji: "🏦",
|
|
97
|
-
ui: [
|
|
98
|
-
{
|
|
99
|
-
href: "https://stability.farm/lending",
|
|
100
|
-
title: "Markets",
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
agents: [
|
|
106
|
-
{
|
|
107
|
-
roles: ["OPERATOR" /* AgentRole.OPERATOR */],
|
|
108
|
-
name: "Stability Operator",
|
|
109
|
-
telegram: "@stability_dao_bot",
|
|
110
|
-
image: "OPERATOR.png",
|
|
111
|
-
...agents_1.emptyRuntime,
|
|
112
|
-
api: ["https://api.stability.farm", "https://api.stabilitydao.org"],
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
params: {
|
|
116
|
-
lockPeriod: 180,
|
|
117
|
-
instantExitFee: 80,
|
|
118
|
-
minPower: 4000,
|
|
119
|
-
proposalThreshold: 100000,
|
|
120
|
-
sttBribe: 10,
|
|
121
|
-
recoveryShare: 10,
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
name: "DeFi Builder",
|
|
126
|
-
socials: [],
|
|
127
|
-
activity: ["BUILDER" /* Activity.BUILDER */, "SAAS_OPERATOR" /* Activity.SAAS_OPERATOR */],
|
|
128
|
-
tokenization: {
|
|
129
|
-
state: TokenizationState.DRAFT,
|
|
130
|
-
tokenSymbol: "BUILDER",
|
|
131
|
-
xSymbol: "xBUILDER",
|
|
132
|
-
daoSymbol: "BUILDER_DAO",
|
|
133
|
-
},
|
|
134
|
-
units: [
|
|
135
|
-
{
|
|
136
|
-
unitId: "os",
|
|
137
|
-
name: "Stability OS",
|
|
138
|
-
status: "BUILDING" /* UnitStatus.BUILDING */,
|
|
139
|
-
revenueShare: 100,
|
|
140
|
-
type: "SAAS" /* UnitType.SAAS */,
|
|
141
|
-
components: {},
|
|
142
|
-
emoji: "🍀",
|
|
143
|
-
},
|
|
144
|
-
],
|
|
145
|
-
agents: [
|
|
146
|
-
{
|
|
147
|
-
roles: ["OPERATOR" /* AgentRole.OPERATOR */],
|
|
148
|
-
name: "Stability OS",
|
|
149
|
-
image: "BUILDER.png",
|
|
150
|
-
...agents_1.emptyRuntime,
|
|
151
|
-
api: [],
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
params: {
|
|
155
|
-
lockPeriod: 180,
|
|
156
|
-
instantExitFee: 100,
|
|
157
|
-
},
|
|
158
|
-
builderActivity: {
|
|
159
|
-
multisig: [
|
|
160
|
-
"matic:0x36780E69D38c8b175761c6C5F8eD42E61ee490E9",
|
|
161
|
-
"sonic:0xF564EBaC1182578398E94868bea1AbA6ba339652",
|
|
162
|
-
"avax:0x06111E02BEb85B57caebEf15F5f90Bc82D54da3A",
|
|
163
|
-
],
|
|
164
|
-
repo: [
|
|
165
|
-
"stabilitydao/stability",
|
|
166
|
-
"stabilitydao/stability-contracts",
|
|
167
|
-
"stabilitydao/stability-ui",
|
|
168
|
-
"stabilitydao/stability-subgraph",
|
|
169
|
-
"stabilitydao/lending-deploy",
|
|
170
|
-
"stabilitydao/stability-os",
|
|
171
|
-
"stabilitydao/stability-os-ui",
|
|
172
|
-
"stabilitydao/stability-node-pro",
|
|
173
|
-
],
|
|
174
|
-
burnRate: [
|
|
175
|
-
{
|
|
176
|
-
period: "Sep, 2025",
|
|
177
|
-
usdAmount: 32200,
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
period: "Oct, 2025",
|
|
181
|
-
usdAmount: 31100,
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
workers: ["a17", "omriss", "DevTeaLeaf", "nikita-dogil", "iammrjude"],
|
|
185
|
-
conveyors: [
|
|
186
|
-
{
|
|
187
|
-
unitId: "stability:stabilityFarm",
|
|
188
|
-
componentCategory: "DEFI_STRATEGY" /* UnitComponentCategory.DEFI_STRATEGY */,
|
|
189
|
-
name: "Strategies",
|
|
190
|
-
symbol: "📜",
|
|
191
|
-
type: "Task",
|
|
192
|
-
label: {
|
|
193
|
-
name: "conveyor:STRATEGY",
|
|
194
|
-
description: "Developing and deploying a new DeFi asset management strategy on the **Strategies** conveyor belt.",
|
|
195
|
-
color: "#cc02ff",
|
|
196
|
-
},
|
|
197
|
-
issueTitleTemplate: "📜 %STRATEGY_SHORT_ID% | %STRATEGY_ID%: %STEP_NAME%",
|
|
198
|
-
taskIdIs: "%STRATEGY_SHORT_ID%",
|
|
199
|
-
description: "Implement and integrate new strategy smart contract",
|
|
200
|
-
steps: [
|
|
201
|
-
{
|
|
202
|
-
name: "Prepare",
|
|
203
|
-
issues: [
|
|
204
|
-
{
|
|
205
|
-
repo: "stabilitydao/stability",
|
|
206
|
-
issueTemplate: "strategy.md",
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
artifacts: ["Library release tag" /* ArtifactType.LIBRARY_RELEASE_TAG */],
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
name: "Contract",
|
|
213
|
-
issues: [
|
|
214
|
-
{
|
|
215
|
-
repo: "stabilitydao/stability-contracts",
|
|
216
|
-
generator: "yarn issue",
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
artifacts: ["Address of deployed contract" /* ArtifactType.CONTRACT_ADDRESS */],
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
name: "Integrate",
|
|
223
|
-
issues: [
|
|
224
|
-
{
|
|
225
|
-
repo: "stabilitydao/stability",
|
|
226
|
-
taskList: [
|
|
227
|
-
"Setup platform in chains",
|
|
228
|
-
"Add farms / strategy init params",
|
|
229
|
-
"Deploy vaults",
|
|
230
|
-
"Do post setup (toggleDistributorOperator, etc)",
|
|
231
|
-
"Add all necessary tokens to `src/stability.tokenlist.json`, `src/assets.ts`",
|
|
232
|
-
"Set status READY to strategy in `src/strategies.ts`",
|
|
233
|
-
],
|
|
234
|
-
},
|
|
235
|
-
],
|
|
236
|
-
artifacts: ["Library release tag" /* ArtifactType.LIBRARY_RELEASE_TAG */],
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
name: "Backend",
|
|
240
|
-
issues: [
|
|
241
|
-
{
|
|
242
|
-
repo: "stabilitydao/stability-node-pro",
|
|
243
|
-
taskList: ["Update library"],
|
|
244
|
-
},
|
|
245
|
-
],
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
name: "Frontend",
|
|
249
|
-
issues: [
|
|
250
|
-
{
|
|
251
|
-
repo: "stabilitydao/stability-ui",
|
|
252
|
-
taskList: [
|
|
253
|
-
"Update library",
|
|
254
|
-
"Generate and fill new vault OG images",
|
|
255
|
-
],
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
},
|
|
259
|
-
],
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
unitId: "stability:stabilityFarm",
|
|
263
|
-
componentCategory: "CHAIN_SUPPORT" /* UnitComponentCategory.CHAIN_SUPPORT */,
|
|
264
|
-
name: "Chains",
|
|
265
|
-
symbol: "⛓️",
|
|
266
|
-
type: "Task",
|
|
267
|
-
label: {
|
|
268
|
-
name: "conveyor:CHAIN",
|
|
269
|
-
description: "Chain integration by Chains conveyor",
|
|
270
|
-
color: "#b1dc13",
|
|
271
|
-
},
|
|
272
|
-
issueTitleTemplate: "⛓️ %CHAIN_NAME% [%CHAIN_ID%]: %STEP_NAME%",
|
|
273
|
-
taskIdIs: "%CHAIN_NAME%",
|
|
274
|
-
description: "Add chain support",
|
|
275
|
-
steps: [
|
|
276
|
-
{
|
|
277
|
-
name: "Prepare",
|
|
278
|
-
issues: [
|
|
279
|
-
{
|
|
280
|
-
repo: "stabilitydao/stability",
|
|
281
|
-
taskList: [
|
|
282
|
-
"Add chain image to static repo",
|
|
283
|
-
"add new chain to `src/chains.ts` with status `ChainStatus.DEVELOPMENT`",
|
|
284
|
-
"fill multisig",
|
|
285
|
-
"fill assets",
|
|
286
|
-
"fill integrations",
|
|
287
|
-
],
|
|
288
|
-
},
|
|
289
|
-
],
|
|
290
|
-
artifacts: ["Library release tag" /* ArtifactType.LIBRARY_RELEASE_TAG */],
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
name: "Contracts",
|
|
294
|
-
issues: [
|
|
295
|
-
{
|
|
296
|
-
repo: "stabilitydao/stability-contracts",
|
|
297
|
-
generator: "🎇 Run `yarn issue` in library repo, fill issue id to `src/chains.ts`.",
|
|
298
|
-
},
|
|
299
|
-
],
|
|
300
|
-
artifacts: ["Address of deployed contract" /* ArtifactType.CONTRACT_ADDRESS */],
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
name: "Subgraph",
|
|
304
|
-
issues: [
|
|
305
|
-
{
|
|
306
|
-
repo: "stabilitydao/stability-subgraph",
|
|
307
|
-
taskList: ["add chain support", "deploy subgraph"],
|
|
308
|
-
},
|
|
309
|
-
],
|
|
310
|
-
result: "subgraph endpoint url",
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
name: "Deployment",
|
|
314
|
-
issues: [
|
|
315
|
-
{
|
|
316
|
-
repo: "stabilitydao/stability",
|
|
317
|
-
taskList: ["Add chain to `src/deployments.ts`"],
|
|
318
|
-
},
|
|
319
|
-
],
|
|
320
|
-
artifacts: ["Library release tag" /* ArtifactType.LIBRARY_RELEASE_TAG */],
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
name: "Backend",
|
|
324
|
-
issues: [
|
|
325
|
-
{
|
|
326
|
-
repo: "stabilitydao/stability-node-pro",
|
|
327
|
-
taskList: ["Show chain in API", "Setup TxSender"],
|
|
328
|
-
},
|
|
329
|
-
],
|
|
330
|
-
result: "API reply has chain data",
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
name: "Frontend",
|
|
334
|
-
issues: [
|
|
335
|
-
{
|
|
336
|
-
repo: "stabilitydao/stability-ui",
|
|
337
|
-
taskList: [
|
|
338
|
-
"add chain support to dapp",
|
|
339
|
-
"show chain in vaults filter",
|
|
340
|
-
],
|
|
341
|
-
},
|
|
342
|
-
],
|
|
343
|
-
result: "beta UI show chain",
|
|
344
|
-
},
|
|
345
|
-
],
|
|
346
|
-
},
|
|
347
|
-
],
|
|
348
|
-
pools: [
|
|
349
|
-
{
|
|
350
|
-
unitIds: ["stability:stabilityFarm", "stability:stabilityMarket"],
|
|
351
|
-
name: "Products",
|
|
352
|
-
label: {
|
|
353
|
-
name: "STBL:PRODUCT",
|
|
354
|
-
description: "New product request",
|
|
355
|
-
color: "#02a3fc",
|
|
356
|
-
},
|
|
357
|
-
productTypes: ["CVault", "MetaVault", "Lending market"],
|
|
358
|
-
artifacts: ["URL to UI page" /* ArtifactType.URL_UI */],
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
unitIds: ["stability:stabilityFarm", "stability:stabilityMarket"],
|
|
362
|
-
name: "Features",
|
|
363
|
-
label: {
|
|
364
|
-
name: "STBL:FEAT",
|
|
365
|
-
description: "",
|
|
366
|
-
color: "#3b15d2",
|
|
367
|
-
},
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
unitIds: ["stability:stabilityFarm", "stability:stabilityMarket"],
|
|
371
|
-
name: "Maintenance",
|
|
372
|
-
label: {
|
|
373
|
-
name: "STBL:MAINTENANCE",
|
|
374
|
-
description: "",
|
|
375
|
-
color: "#da7130",
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
unitIds: ["os"],
|
|
380
|
-
name: "Stability OS",
|
|
381
|
-
label: {
|
|
382
|
-
name: "BUILDER:OS",
|
|
383
|
-
description: "",
|
|
384
|
-
color: "#00b243",
|
|
385
|
-
},
|
|
386
|
-
},
|
|
387
|
-
],
|
|
388
|
-
},
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
name: "MEV Fighter",
|
|
392
|
-
socials: [],
|
|
393
|
-
activity: ["BUILDER" /* Activity.BUILDER */, "MEV_SEARCHER" /* Activity.MEV_SEARCHER */],
|
|
394
|
-
tokenization: {
|
|
395
|
-
state: TokenizationState.DRAFT,
|
|
396
|
-
tokenSymbol: "MEVBOT",
|
|
397
|
-
xSymbol: "xMEVBOT",
|
|
398
|
-
daoSymbol: "MEVBOT_DAO",
|
|
399
|
-
},
|
|
400
|
-
units: [
|
|
401
|
-
{
|
|
402
|
-
unitId: "mevbot:liquidation",
|
|
403
|
-
name: "Liquidation",
|
|
404
|
-
status: "RESEARCH" /* UnitStatus.RESEARCH */,
|
|
405
|
-
revenueShare: 100,
|
|
406
|
-
type: "MEV" /* UnitType.MEV */,
|
|
407
|
-
components: {
|
|
408
|
-
["MEV_STRATEGY" /* UnitComponentCategory.MEV_STRATEGY */]: [],
|
|
409
|
-
},
|
|
410
|
-
emoji: "🐺",
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
unitId: "mevbot:arb",
|
|
414
|
-
name: "Arbitrage",
|
|
415
|
-
status: "RESEARCH" /* UnitStatus.RESEARCH */,
|
|
416
|
-
revenueShare: 100,
|
|
417
|
-
type: "MEV" /* UnitType.MEV */,
|
|
418
|
-
components: {
|
|
419
|
-
["MEV_STRATEGY" /* UnitComponentCategory.MEV_STRATEGY */]: [],
|
|
420
|
-
},
|
|
421
|
-
emoji: "🦄",
|
|
88
|
+
static getTokensNaming(name, symbol) {
|
|
89
|
+
return {
|
|
90
|
+
seedName: `${name} SEED`,
|
|
91
|
+
seedSymbol: `seed${symbol}`,
|
|
92
|
+
tgeName: `${name} PRESALE`,
|
|
93
|
+
tgeSymbol: `sale${symbol}`,
|
|
94
|
+
tokenName: name,
|
|
95
|
+
tokenSymbol: symbol,
|
|
96
|
+
xName: `x${name}`,
|
|
97
|
+
xSymbol: `x${symbol}`,
|
|
98
|
+
daoName: `${name} DAO`,
|
|
99
|
+
daoSymbol: `${symbol}_DAO`,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Create new DAO
|
|
104
|
+
* @throws Error
|
|
105
|
+
*/
|
|
106
|
+
createDAO(name, symbol, activity, vePeriod, pvpFee, funding) {
|
|
107
|
+
const dao = {
|
|
108
|
+
phase: LifecyclePhase.DRAFT,
|
|
109
|
+
name,
|
|
110
|
+
symbol,
|
|
111
|
+
activity,
|
|
112
|
+
socials: [],
|
|
113
|
+
deployments: {},
|
|
114
|
+
units: [],
|
|
115
|
+
agents: [],
|
|
116
|
+
params: {
|
|
117
|
+
vePeriod,
|
|
118
|
+
pvpFee,
|
|
422
119
|
},
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
{
|
|
426
|
-
roles: ["OPERATOR" /* AgentRole.OPERATOR */],
|
|
427
|
-
name: "MEV Earner",
|
|
428
|
-
...agents_1.emptyRuntime,
|
|
429
|
-
api: [],
|
|
120
|
+
tokenomics: {
|
|
121
|
+
funding,
|
|
430
122
|
},
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
123
|
+
};
|
|
124
|
+
this.validate(dao);
|
|
125
|
+
this.daos.push(dao);
|
|
126
|
+
return dao;
|
|
127
|
+
}
|
|
128
|
+
/** @throws Error */
|
|
129
|
+
validate(dao) {
|
|
130
|
+
if (!dao.symbol.length || dao.symbol.length > 7) {
|
|
131
|
+
throw new Error(`SymbolLengthError(${dao.symbol.length})`);
|
|
132
|
+
}
|
|
133
|
+
if (!dao.tokenomics.funding.length) {
|
|
134
|
+
throw new Error("NeedFunding");
|
|
135
|
+
}
|
|
136
|
+
// todo: check name min/max length
|
|
137
|
+
// todo: check name is unique
|
|
138
|
+
// todo: check symbol is unique
|
|
139
|
+
// todo: check activity are correct
|
|
140
|
+
// todo: check vePeriod min/max duration
|
|
141
|
+
// todo: check pvpFee min/max
|
|
142
|
+
// todo: check funding array has unique funding types
|
|
143
|
+
// todo: check funding dates
|
|
144
|
+
// todo: check funding raise goals
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.OS = OS;
|
|
446
148
|
//# sourceMappingURL=os.js.map
|
package/out/os.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os.js","sourceRoot":"","sources":["../src/os.ts"],"names":[],"mappings":";AAAA;;;
|
|
1
|
+
{"version":3,"file":"os.js","sourceRoot":"","sources":["../src/os.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AASW,QAAA,wBAAwB,GACnC,0CAA0C,CAAC;AA8D7C,+CAA+C;AAC/C,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,+CAA+C;IAC/C,6DAAiD,CAAA;IACjD,8CAA8C;IAC9C,2CAA+B,CAAA;IAC/B,iGAAiG;IACjG,yCAA6B,CAAA;IAC7B,sDAAsD;IACtD,+BAAmB,CAAA;AACrB,CAAC,EATW,QAAQ,wBAAR,QAAQ,QASnB;AAED;;GAEG;AACH,IAAY,cA8BX;AA9BD,WAAY,cAAc;IACxB,cAAc;IACd,iCAAe,CAAA;IAEf;;;;;;OAMG;IACH,+BAAa,CAAA;IAEb,uDAAuD;IACvD,6CAA2B,CAAA;IAE3B,iFAAiF;IACjF,6BAAW,CAAA;IAEX,kDAAkD;IAClD,2CAAyB,CAAA;IAEzB,4BAA4B;IAC5B,+CAA6B,CAAA;IAE7B,8CAA8C;IAC9C,+BAAa,CAAA;IAEb,oDAAoD;IACpD,uCAAqB,CAAA;AACvB,CAAC,EA9BW,cAAc,8BAAd,cAAc,QA8BzB;AA+BD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,0BAAW,CAAA;AACb,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAuED,2BAA2B;AAC3B,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,+BAA+B;IAC/B,uBAAW,CAAA;IACX,qCAAqC;IACrC,2CAA+B,CAAA;IAC/B,qCAAqC;IACrC,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