@stabilitydao/host 0.2.1 → 0.2.2
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 +135 -0
- package/out/activity/builder.d.ts.map +1 -0
- package/out/activity/builder.js +17 -0
- package/out/activity/builder.js.map +1 -0
- package/out/activity/index.d.ts +18 -0
- package/out/activity/index.d.ts.map +1 -0
- package/out/activity/index.js +31 -0
- package/out/activity/index.js.map +1 -0
- package/out/agents.d.ts +21 -0
- package/out/agents.d.ts.map +1 -0
- package/out/agents.js +16 -0
- package/out/agents.js.map +1 -0
- package/out/api.d.ts +47 -0
- package/out/api.d.ts.map +1 -0
- package/out/api.js +3 -0
- package/out/api.js.map +1 -0
- package/out/assets.d.ts +13 -0
- package/out/assets.d.ts.map +1 -0
- package/out/assets.js +1515 -0
- package/out/assets.js.map +1 -0
- package/out/chains.d.ts +105 -0
- package/out/chains.d.ts.map +1 -0
- package/out/chains.js +591 -0
- package/out/chains.js.map +1 -0
- package/out/host.d.ts +407 -0
- package/out/host.d.ts.map +1 -0
- package/out/host.js +765 -0
- package/out/host.js.map +1 -0
- package/out/index.d.ts +10 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js.map +1 -0
- package/out/storage/daoMetaData.d.ts +5 -0
- package/out/storage/daoMetaData.d.ts.map +1 -0
- package/out/storage/daoMetaData.js +311 -0
- package/out/storage/daoMetaData.js.map +1 -0
- package/out/storage/daos.d.ts +3 -0
- package/out/storage/daos.d.ts.map +1 -0
- package/out/storage/daos.js +303 -0
- package/out/storage/daos.js.map +1 -0
- package/package.json +7 -1
- package/.github/workflows/npm.yml +0 -19
- package/.github/workflows/prettier.yml +0 -25
- package/.github/workflows/test.yml +0 -29
- package/.prettierignore +0 -4
- package/.prettierrc +0 -1
- package/jest.config.js +0 -9
- package/logo.png +0 -0
- package/src/activity/builder.ts +0 -141
- package/src/activity/index.ts +0 -34
- package/src/agents.ts +0 -31
- package/src/api.ts +0 -51
- package/src/assets.ts +0 -1579
- package/src/chains.ts +0 -604
- package/src/host.ts +0 -1212
- package/src/index.ts +0 -36
- package/src/storage/daoMetaData.ts +0 -312
- package/src/storage/daos.ts +0 -306
- package/tests/assets.test.ts +0 -61
- package/tests/chains.test.ts +0 -22
- package/tests/host.test.ts +0 -811
- package/tsconfig.json +0 -18
- /package/{src → out}/tokenlist.json +0 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.daos = void 0;
|
|
4
|
+
const host_1 = require("../host");
|
|
5
|
+
const chains_1 = require("../chains");
|
|
6
|
+
const activity_1 = require("../activity");
|
|
7
|
+
exports.daos = [
|
|
8
|
+
{
|
|
9
|
+
phase: host_1.LifecyclePhase.DRAFT,
|
|
10
|
+
name: "Host Dev",
|
|
11
|
+
symbol: "HOST",
|
|
12
|
+
socials: ["https://t.me/dao_host"],
|
|
13
|
+
activity: [activity_1.Activity.BUILDER, activity_1.Activity.DEFI],
|
|
14
|
+
images: {
|
|
15
|
+
token: "/builder.png",
|
|
16
|
+
},
|
|
17
|
+
deployments: {},
|
|
18
|
+
chainSettings: {
|
|
19
|
+
bbRate: 10,
|
|
20
|
+
},
|
|
21
|
+
initialChain: chains_1.ChainName.ETHEREUM,
|
|
22
|
+
units: [
|
|
23
|
+
{
|
|
24
|
+
unitId: "core",
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
params: {
|
|
28
|
+
vePeriod: 180,
|
|
29
|
+
pvpFee: 100,
|
|
30
|
+
},
|
|
31
|
+
funding: [
|
|
32
|
+
{
|
|
33
|
+
type: host_1.FundingType.SEED,
|
|
34
|
+
start: 1772323200, // Sunday, 1 March 2026
|
|
35
|
+
end: 1776211200, // Wednesday, 15 April 2026
|
|
36
|
+
minRaise: 40000,
|
|
37
|
+
maxRaise: 500000,
|
|
38
|
+
raised: 0,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: host_1.FundingType.TGE,
|
|
42
|
+
start: 1793577600, // Monday, 2 November 2026
|
|
43
|
+
end: 1794182399, // Sunday, 8 November 2026, 23:59:59
|
|
44
|
+
claim: 1794268800, // Tuesday, 10 November 2026
|
|
45
|
+
minRaise: 400000,
|
|
46
|
+
maxRaise: 1200000,
|
|
47
|
+
raised: 0,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
vesting: [],
|
|
51
|
+
governanceSettings: {},
|
|
52
|
+
deployer: "0x0",
|
|
53
|
+
daoMetaDataLocation: "local",
|
|
54
|
+
unitsMetaData: [
|
|
55
|
+
{
|
|
56
|
+
name: "dao.host",
|
|
57
|
+
status: host_1.UnitStatus.BUILDING,
|
|
58
|
+
revenueShare: 100,
|
|
59
|
+
type: host_1.UnitType.DEFI_PROTOCOL,
|
|
60
|
+
//components: {},
|
|
61
|
+
emoji: "🍀",
|
|
62
|
+
ui: [
|
|
63
|
+
{
|
|
64
|
+
href: "https://dao.host",
|
|
65
|
+
title: "dao.host",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
phase: host_1.LifecyclePhase.LIVE_VESTING,
|
|
73
|
+
name: "Stability",
|
|
74
|
+
symbol: "STBL",
|
|
75
|
+
socials: [
|
|
76
|
+
"https://x.com/stabilitydao",
|
|
77
|
+
"https://discord.com/invite/R3nnetWzC9",
|
|
78
|
+
"https://t.me/stabilitydao",
|
|
79
|
+
],
|
|
80
|
+
activity: [activity_1.Activity.DEFI],
|
|
81
|
+
images: {
|
|
82
|
+
token: "/stbl.svg",
|
|
83
|
+
xToken: "/xstbl.png",
|
|
84
|
+
daoToken: "/STBL_DAO.png",
|
|
85
|
+
},
|
|
86
|
+
deployments: {
|
|
87
|
+
["146"]: {
|
|
88
|
+
tgeToken: "0x4D61CB8553bB5Db02DF3bdc6CDa88AA85b32224b",
|
|
89
|
+
token: "0x78a76316F66224CBaCA6e70acB24D5ee5b2Bd2c7",
|
|
90
|
+
xToken: "0x902215dd96a291b256a3aef6c4dee62d2a9b80cb",
|
|
91
|
+
staking: "0x17a7cf838a7c91de47552a9f65822b547f9a6997",
|
|
92
|
+
daoToken: "0x77773Cb473aD1bfE991bA299a127F64b45C17777",
|
|
93
|
+
revenueRouter: "0x23b8cc22c4c82545f4b451b11e2f17747a730810",
|
|
94
|
+
recovery: "0xB8d6019eD82a9e6216c9Bf87cAf145fFe4439b40",
|
|
95
|
+
vesting: {
|
|
96
|
+
["Investors"]: "0x1a125ff7efdB54dc9EFB4Ad90C552C4C8822b212",
|
|
97
|
+
["Foundation"]: "0x8C42C261A3104cEEFBb388CFd6C1f0E7c9F22062",
|
|
98
|
+
["Community"]: "0xEF2CE83527FAE22E0012Efc4d64987C1a51448c5",
|
|
99
|
+
["Team"]: "0xe6C2AA6e67EF1B806B9Daec7147b113051a445E8",
|
|
100
|
+
},
|
|
101
|
+
tokenBridge: "0xD6a8b05f08834Ed2f205E3d591CD6D1A84b7C19B",
|
|
102
|
+
xTokenBridge: "0x533A0c7869e36D1640D4058Bac4604DB6b4d7AD5",
|
|
103
|
+
},
|
|
104
|
+
["9745"]: {
|
|
105
|
+
token: "0xfdf91362B7E9330F232e500c0236a02B0DE3e492",
|
|
106
|
+
xToken: "0xF40D0724599282CaF9dfb66feB630e936bC0CFBE",
|
|
107
|
+
staking: "0x601572b91DC054Be500392A6d3e15c690140998D",
|
|
108
|
+
revenueRouter: "0x5AC5b2740F77200CCe6562795cFcf4c3c2aC3745",
|
|
109
|
+
daoToken: "0x87C51aa090587790A5298ea4C2d0DBbcCD0026A6",
|
|
110
|
+
tokenBridge: "0xfdf91362B7E9330F232e500c0236a02B0DE3e492",
|
|
111
|
+
xTokenBridge: "0x4E3F0A27bbF443Ba81FCf17E28F4100f35b1b51B",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
chainSettings: {
|
|
115
|
+
bbRate: 100,
|
|
116
|
+
},
|
|
117
|
+
initialChain: chains_1.ChainName.SONIC,
|
|
118
|
+
units: [
|
|
119
|
+
{
|
|
120
|
+
unitId: "xstbl",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
unitId: "stability:stabilityFarm",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
unitId: "stability:stabilityMarket",
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
params: {
|
|
130
|
+
vePeriod: 180,
|
|
131
|
+
pvpFee: 80,
|
|
132
|
+
minPower: 4000,
|
|
133
|
+
recoveryShare: 10,
|
|
134
|
+
},
|
|
135
|
+
funding: [
|
|
136
|
+
{
|
|
137
|
+
type: host_1.FundingType.TGE,
|
|
138
|
+
start: 1740700800,
|
|
139
|
+
end: 1741132800,
|
|
140
|
+
minRaise: 250000,
|
|
141
|
+
maxRaise: 500000,
|
|
142
|
+
raised: 500000,
|
|
143
|
+
claim: 1741167300,
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
vesting: [
|
|
147
|
+
{
|
|
148
|
+
name: "Investors",
|
|
149
|
+
allocation: 20000000,
|
|
150
|
+
start: 1756954800,
|
|
151
|
+
end: 1788490800,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "Foundation",
|
|
155
|
+
allocation: 30000000,
|
|
156
|
+
start: 1756954800,
|
|
157
|
+
end: 1883098800,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "Community",
|
|
161
|
+
allocation: 19972000,
|
|
162
|
+
start: 1756954800,
|
|
163
|
+
end: 1883098800,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "Team",
|
|
167
|
+
allocation: 20000000,
|
|
168
|
+
start: 1756954800,
|
|
169
|
+
end: 1883098800,
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
governanceSettings: {
|
|
173
|
+
proposalThreshold: 100000,
|
|
174
|
+
ttBribe: 10,
|
|
175
|
+
},
|
|
176
|
+
deployer: "0x0",
|
|
177
|
+
daoMetaDataLocation: "local",
|
|
178
|
+
unitsMetaData: [
|
|
179
|
+
{
|
|
180
|
+
name: "PVP",
|
|
181
|
+
status: host_1.UnitStatus.LIVE,
|
|
182
|
+
revenueShare: 100,
|
|
183
|
+
type: host_1.UnitType.PVP,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "VaaS",
|
|
187
|
+
status: host_1.UnitStatus.LIVE,
|
|
188
|
+
revenueShare: 100,
|
|
189
|
+
type: host_1.UnitType.DEFI_PROTOCOL,
|
|
190
|
+
/*components: {
|
|
191
|
+
[UnitComponentCategory.DEFI_STRATEGY]: Object.keys(strategies).filter(
|
|
192
|
+
(s) =>
|
|
193
|
+
strategies[s as StrategyShortId].state !==
|
|
194
|
+
StrategyState.CANCELLED,
|
|
195
|
+
) as StrategyShortId[],
|
|
196
|
+
[UnitComponentCategory.CHAIN_SUPPORT]: [
|
|
197
|
+
ChainName.SONIC,
|
|
198
|
+
ChainName.AVALANCHE,
|
|
199
|
+
ChainName.PLASMA,
|
|
200
|
+
],
|
|
201
|
+
},*/
|
|
202
|
+
emoji: "🧊",
|
|
203
|
+
ui: [
|
|
204
|
+
{
|
|
205
|
+
href: "https://stability.farm/vaults",
|
|
206
|
+
title: "All Vaults",
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
href: "https://stability.farm/metavaults",
|
|
210
|
+
title: "Meta Vaults",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
href: "https://stability.farm/leverage-vaults",
|
|
214
|
+
title: "Leverage Vaults",
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "Lending",
|
|
220
|
+
status: host_1.UnitStatus.LIVE,
|
|
221
|
+
revenueShare: 25,
|
|
222
|
+
type: host_1.UnitType.DEFI_PROTOCOL,
|
|
223
|
+
/*components: {
|
|
224
|
+
[UnitComponentCategory.ENGINE_SUPPORT]: [
|
|
225
|
+
LendingEngine.AAVE_3_0_2,
|
|
226
|
+
LendingEngine.AAVE_3_5,
|
|
227
|
+
],
|
|
228
|
+
},*/
|
|
229
|
+
emoji: "🏦",
|
|
230
|
+
ui: [
|
|
231
|
+
{
|
|
232
|
+
href: "https://stability.farm/lending",
|
|
233
|
+
title: "Markets",
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
phase: host_1.LifecyclePhase.DRAFT,
|
|
241
|
+
name: "MEV Fighter",
|
|
242
|
+
symbol: "MEVBOT",
|
|
243
|
+
socials: [],
|
|
244
|
+
activity: [activity_1.Activity.BUILDER, activity_1.Activity.MEV],
|
|
245
|
+
images: {
|
|
246
|
+
token: "/mevbot.jpg",
|
|
247
|
+
},
|
|
248
|
+
deployments: {},
|
|
249
|
+
chainSettings: {
|
|
250
|
+
bbRate: 50,
|
|
251
|
+
},
|
|
252
|
+
initialChain: chains_1.ChainName.ETHEREUM,
|
|
253
|
+
units: [
|
|
254
|
+
{
|
|
255
|
+
unitId: "mevbot:liquidation",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
unitId: "mevbot:arb",
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
params: {
|
|
262
|
+
vePeriod: 120,
|
|
263
|
+
pvpFee: 100,
|
|
264
|
+
},
|
|
265
|
+
funding: [
|
|
266
|
+
{
|
|
267
|
+
type: host_1.FundingType.SEED,
|
|
268
|
+
start: 1772323200, // Sunday, 1 March 2026
|
|
269
|
+
end: 1780185600, // Sunday, 31 May 2026
|
|
270
|
+
minRaise: 50000,
|
|
271
|
+
maxRaise: 250000,
|
|
272
|
+
raised: 0,
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
vesting: [],
|
|
276
|
+
governanceSettings: {},
|
|
277
|
+
deployer: "0x0",
|
|
278
|
+
daoMetaDataLocation: "local",
|
|
279
|
+
unitsMetaData: [
|
|
280
|
+
{
|
|
281
|
+
name: "Liquidator",
|
|
282
|
+
status: host_1.UnitStatus.RESEARCH,
|
|
283
|
+
revenueShare: 100,
|
|
284
|
+
type: host_1.UnitType.MEV_SEARCHER,
|
|
285
|
+
/*components: {
|
|
286
|
+
[UnitComponentCategory.MEV_STRATEGY]: [],
|
|
287
|
+
},*/
|
|
288
|
+
emoji: "🐺",
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "Arbitrager",
|
|
292
|
+
status: host_1.UnitStatus.RESEARCH,
|
|
293
|
+
revenueShare: 100,
|
|
294
|
+
type: host_1.UnitType.MEV_SEARCHER,
|
|
295
|
+
/*components: {
|
|
296
|
+
[UnitComponentCategory.MEV_STRATEGY]: [],
|
|
297
|
+
},*/
|
|
298
|
+
emoji: "🦄",
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
},
|
|
302
|
+
];
|
|
303
|
+
//# sourceMappingURL=daos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daos.js","sourceRoot":"","sources":["../../src/storage/daos.ts"],"names":[],"mappings":";;;AAAA,kCAMiB;AACjB,sCAAsC;AACtC,0CAAuC;AAE1B,QAAA,IAAI,GAAe;IAC9B;QACE,KAAK,EAAE,qBAAc,CAAC,KAAK;QAC3B,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,CAAC,uBAAuB,CAAC;QAClC,QAAQ,EAAE,CAAC,mBAAQ,CAAC,OAAO,EAAE,mBAAQ,CAAC,IAAI,CAAC;QAC3C,MAAM,EAAE;YACN,KAAK,EAAE,cAAc;SACtB;QACD,WAAW,EAAE,EAAE;QACf,aAAa,EAAE;YACb,MAAM,EAAE,EAAE;SACX;QACD,YAAY,EAAE,kBAAS,CAAC,QAAQ;QAChC,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,MAAM;aACf;SACF;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,GAAG;YACb,MAAM,EAAE,GAAG;SACZ;Q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aACZ;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE,iBAAU,CAAC,QAAQ;gBAC3B,YAAY,EAAE,GAAG;gBACjB,IAAI,EAAE,eAAQ,CAAC,YAAY;gBAC3B;;oBAEI;gBACJ,KAAK,EAAE,IAAI;aACZ;SACF;KACF;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stabilitydao/host",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Host library",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"out",
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"README.md",
|
|
11
|
+
"package.json"
|
|
12
|
+
],
|
|
7
13
|
"repository": "https://github.com/stabilitydao/host.git",
|
|
8
14
|
"author": "Host Dev",
|
|
9
15
|
"license": "GPL-3.0",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Publish Package to npmjs
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [published]
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v4
|
|
10
|
-
# Setup .npmrc file to publish to npm
|
|
11
|
-
- uses: actions/setup-node@v4
|
|
12
|
-
with:
|
|
13
|
-
node-version: '20.x'
|
|
14
|
-
registry-url: 'https://registry.npmjs.org'
|
|
15
|
-
- run: yarn
|
|
16
|
-
- run: yarn build
|
|
17
|
-
- run: yarn publish --access public
|
|
18
|
-
env:
|
|
19
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: Prettier check
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request: { }
|
|
7
|
-
workflow_dispatch: { }
|
|
8
|
-
jobs:
|
|
9
|
-
run:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout
|
|
13
|
-
uses: actions/checkout@v4
|
|
14
|
-
- name: Set up Node 18
|
|
15
|
-
uses: actions/setup-node@v3
|
|
16
|
-
with:
|
|
17
|
-
node-version: 18
|
|
18
|
-
- name: Run yarn install
|
|
19
|
-
uses: borales/actions-yarn@v4
|
|
20
|
-
with:
|
|
21
|
-
cmd: install
|
|
22
|
-
- name: Run prettier check
|
|
23
|
-
uses: borales/actions-yarn@v4
|
|
24
|
-
with:
|
|
25
|
-
cmd: prettier . --check
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: Test and coverage
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request: { }
|
|
7
|
-
workflow_dispatch: { }
|
|
8
|
-
jobs:
|
|
9
|
-
run:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout
|
|
13
|
-
uses: actions/checkout@v4
|
|
14
|
-
- name: Set up Node 18
|
|
15
|
-
uses: actions/setup-node@v3
|
|
16
|
-
with:
|
|
17
|
-
node-version: 18
|
|
18
|
-
- name: Run yarn install
|
|
19
|
-
uses: borales/actions-yarn@v4
|
|
20
|
-
with:
|
|
21
|
-
cmd: install # will run `yarn install` command
|
|
22
|
-
- name: Run tests and collect coverage
|
|
23
|
-
uses: borales/actions-yarn@v4
|
|
24
|
-
with:
|
|
25
|
-
cmd: coverage # will run `yarn coverage` command
|
|
26
|
-
# - name: Upload coverage to Codecov
|
|
27
|
-
# uses: codecov/codecov-action@v4
|
|
28
|
-
# env:
|
|
29
|
-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/jest.config.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
preset: "ts-jest",
|
|
3
|
-
transform: { "^.+\\.ts?$": "ts-jest" },
|
|
4
|
-
testEnvironment: "node",
|
|
5
|
-
testRegex: "/tests/.*\\.(test|spec)?\\.(ts|tsx)$",
|
|
6
|
-
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
|
7
|
-
modulePathIgnorePatterns: ["out"],
|
|
8
|
-
collectCoverageFrom: ["src/**/*.ts"],
|
|
9
|
-
};
|
package/logo.png
DELETED
|
Binary file
|
package/src/activity/builder.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
BUILDER activity.
|
|
3
|
-
BUILDER is a team of engineers managed by DAOs.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { UnitComponentCategory } from "../host";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
BUILDER data.
|
|
10
|
-
|
|
11
|
-
@alpha
|
|
12
|
-
@interface
|
|
13
|
-
*/
|
|
14
|
-
export interface IBuilderActivity {
|
|
15
|
-
/** Safe multisig account of dev team */
|
|
16
|
-
multisig: string[];
|
|
17
|
-
/** Tracked Github repositories where development going on */
|
|
18
|
-
repo: string[];
|
|
19
|
-
/** Engineers */
|
|
20
|
-
workers: IWorker[];
|
|
21
|
-
/** Conveyors of unit components. */
|
|
22
|
-
conveyors: IConveyor[];
|
|
23
|
-
/** Pools of development tasks. */
|
|
24
|
-
pools: IPool[];
|
|
25
|
-
/** Total salaries paid */
|
|
26
|
-
burnRate: {
|
|
27
|
-
/** Period of burning. Can be 1 month or any other. */
|
|
28
|
-
period: string;
|
|
29
|
-
/** How much USD was spent during period. */
|
|
30
|
-
usdAmount: number;
|
|
31
|
-
}[];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
Engineer hired by a DAO. Can be human or machine (AI agent).
|
|
36
|
-
|
|
37
|
-
@alpha
|
|
38
|
-
@interface
|
|
39
|
-
*/
|
|
40
|
-
export interface IWorker {
|
|
41
|
-
/** Github username */
|
|
42
|
-
github: string;
|
|
43
|
-
/** USD hourly rate */
|
|
44
|
-
rate?: number;
|
|
45
|
-
/** USD xTOKEN hourly rate */
|
|
46
|
-
xRate?: number;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Pool of development tasks. A set of open github issues.
|
|
51
|
-
* @interface
|
|
52
|
-
*/
|
|
53
|
-
export interface IPool {
|
|
54
|
-
/** Pool is always linked to a set of units. */
|
|
55
|
-
unitIds: string[];
|
|
56
|
-
/** Short name of the pool. */
|
|
57
|
-
name: string;
|
|
58
|
-
/** Label on github repositories identifying relation to the pool. */
|
|
59
|
-
label: IGithubLabel;
|
|
60
|
-
/** What need to be done by the pool? */
|
|
61
|
-
description?: string;
|
|
62
|
-
/** Each solved task in the pool must have an artifact of specified type. */
|
|
63
|
-
artifacts?: ArtifactType[];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Conveyor belt for building a components for units.
|
|
68
|
-
* @interface
|
|
69
|
-
*/
|
|
70
|
-
export interface IConveyor {
|
|
71
|
-
/** Linked unit */
|
|
72
|
-
unitId: string;
|
|
73
|
-
componentCategory: UnitComponentCategory;
|
|
74
|
-
name: string;
|
|
75
|
-
symbol: string;
|
|
76
|
-
type: string;
|
|
77
|
-
label: IGithubLabel;
|
|
78
|
-
description: string;
|
|
79
|
-
issueTitleTemplate: string;
|
|
80
|
-
taskIdIs: string;
|
|
81
|
-
steps: IConveyorStep[];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface IGithubLabel {
|
|
85
|
-
name: string;
|
|
86
|
-
description: string;
|
|
87
|
-
color: string;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface IGithubUser {
|
|
91
|
-
username: string;
|
|
92
|
-
img: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface IGithubIssue {
|
|
96
|
-
repo: string;
|
|
97
|
-
id: number;
|
|
98
|
-
title: string;
|
|
99
|
-
labels: IGithubLabel[];
|
|
100
|
-
assignees: IGithubUser;
|
|
101
|
-
body?: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export const enum ArtifactType {
|
|
105
|
-
URL_UI = "URL to UI page",
|
|
106
|
-
URL_RELEASE = "Github package release link",
|
|
107
|
-
DEPLOYMENT_ADDRESSES = "Deployment addresses",
|
|
108
|
-
URL_API = "API endpoint",
|
|
109
|
-
URL_STATIC = "Static content URL",
|
|
110
|
-
CONTRACT_ADDRESS = "Address of deployed contract",
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface IConveyorStep {
|
|
114
|
-
name: string;
|
|
115
|
-
issues: {
|
|
116
|
-
repo: string;
|
|
117
|
-
taskList?: string[];
|
|
118
|
-
issueTemplate?: string;
|
|
119
|
-
body?: string;
|
|
120
|
-
generator?: string;
|
|
121
|
-
}[];
|
|
122
|
-
artifacts?: ArtifactType[];
|
|
123
|
-
result?: string;
|
|
124
|
-
guide?: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface IBuildersMemory {
|
|
128
|
-
[tokenSymbol: string]: {
|
|
129
|
-
openIssues: {
|
|
130
|
-
total: { [repo: string]: number };
|
|
131
|
-
pools: { [poolName: string]: IGithubIssue[] };
|
|
132
|
-
};
|
|
133
|
-
conveyors: {
|
|
134
|
-
[conveyorName: string]: {
|
|
135
|
-
[taskId: string]: {
|
|
136
|
-
[stepName: string]: IGithubIssue[];
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
}
|
package/src/activity/index.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { UnitType } from "../host";
|
|
2
|
-
|
|
3
|
-
/** Organization activities supported by OS. */
|
|
4
|
-
export enum Activity {
|
|
5
|
-
/** Owner of Decentralized Finance protocols */
|
|
6
|
-
DEFI = "DEFI",
|
|
7
|
-
/** Owner of Maximum Extractable Value tools */
|
|
8
|
-
MEV = "MEV",
|
|
9
|
-
/** BUILDER is a team of engineers managed by DAOs. */
|
|
10
|
-
BUILDER = "BUILDER",
|
|
11
|
-
/** Owner of Software as a Service business */
|
|
12
|
-
//SAAS_OPERATOR = "SAAS_OPERATOR",
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const activities: {
|
|
16
|
-
[activity in Activity]: {
|
|
17
|
-
title: string;
|
|
18
|
-
unitTypes: UnitType[];
|
|
19
|
-
description?: string;
|
|
20
|
-
};
|
|
21
|
-
} = {
|
|
22
|
-
[Activity.DEFI]: {
|
|
23
|
-
title: "Decentralized Finance Protocol Operator",
|
|
24
|
-
unitTypes: [UnitType.DEFI_PROTOCOL],
|
|
25
|
-
},
|
|
26
|
-
[Activity.MEV]: {
|
|
27
|
-
title: "Maximum Extractable Value tools",
|
|
28
|
-
unitTypes: [UnitType.MEV_SEARCHER],
|
|
29
|
-
},
|
|
30
|
-
[Activity.BUILDER]: {
|
|
31
|
-
title: "Team of engineers with multisig wallet.",
|
|
32
|
-
unitTypes: [],
|
|
33
|
-
},
|
|
34
|
-
};
|
package/src/agents.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Agent is highly abstract and high-level entity that follow role directives.
|
|
3
|
-
* Agents are owned by DAOs built on Host.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface IAgent {
|
|
7
|
-
api: string[];
|
|
8
|
-
roles: AgentRole[];
|
|
9
|
-
name: string;
|
|
10
|
-
directives?: string[];
|
|
11
|
-
image?: string;
|
|
12
|
-
telegram?: `@${string}`;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const enum AgentRole {
|
|
16
|
-
OPERATOR = "OPERATOR",
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface IAgentRuntime {
|
|
20
|
-
machineIDs: string[];
|
|
21
|
-
providers: {
|
|
22
|
-
name: string;
|
|
23
|
-
image: string;
|
|
24
|
-
queries: number;
|
|
25
|
-
}[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const emptyRuntime: IAgentRuntime = {
|
|
29
|
-
machineIDs: [],
|
|
30
|
-
providers: [],
|
|
31
|
-
};
|
package/src/api.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { IBuildersMemory } from "./activity/builder";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
Hot memory with indexed and aggregated data. OS API reply.
|
|
5
|
-
@interface
|
|
6
|
-
*/
|
|
7
|
-
export interface IOSMemory {
|
|
8
|
-
/** Prices of assets */
|
|
9
|
-
prices: Prices;
|
|
10
|
-
|
|
11
|
-
/** Total Value Locked in blockchains */
|
|
12
|
-
chainTvl: { [chainId: string]: number };
|
|
13
|
-
|
|
14
|
-
/** DAO runtime data. Updates each minute or faster. */
|
|
15
|
-
daos: {
|
|
16
|
-
[symbol: string]: IDAOAPIData;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/** Instant Updates by subscribing to github application webhooks */
|
|
20
|
-
builders: IBuildersMemory;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface IDAOAPIData {
|
|
24
|
-
/** Price from Stability interchain oracle */
|
|
25
|
-
oraclePrice: string;
|
|
26
|
-
/** Coingecko price */
|
|
27
|
-
coingeckoPrice?: string;
|
|
28
|
-
/** Data for total revenue chart */
|
|
29
|
-
revenueChart: RevenueChart;
|
|
30
|
-
/** Extracted on-chain data */
|
|
31
|
-
onChainData: {
|
|
32
|
-
[chainId: string]: {
|
|
33
|
-
stakingAPR: number;
|
|
34
|
-
staked: number;
|
|
35
|
-
units: {
|
|
36
|
-
[unitId: string]: {
|
|
37
|
-
pendingRevenue: number;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type Prices = {
|
|
45
|
-
[symbol: string]: {
|
|
46
|
-
price: string;
|
|
47
|
-
priceChange: number;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export type RevenueChart = Record<number, string>;
|