Skip to content

Commit 3516a80

Browse files
committed
πŸ”¨πŸ€ class OS: describe part of DAO validation tasks
1 parent 6712edd commit 3516a80

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

β€Žsrc/os.tsβ€Ž

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export class OS {
296296
daos: IDAO[];
297297

298298
constructor(daos: IDAO[]) {
299-
daos.forEach((dao) => this._validate(dao));
299+
daos.forEach((dao) => this.validate(dao));
300300
this.daos = daos;
301301
}
302302

@@ -344,18 +344,28 @@ export class OS {
344344
funding,
345345
},
346346
};
347-
this._validate(dao);
347+
this.validate(dao);
348348
this.daos.push(dao);
349349
return dao;
350350
}
351351

352352
/** @throws Error */
353-
_validate(dao: IDAO) {
353+
validate(dao: IDAO) {
354354
if (!dao.symbol.length || dao.symbol.length > 7) {
355355
throw new Error(`SymbolLengthError(${dao.symbol.length})`);
356356
}
357357
if (!dao.tokenomics.funding.length) {
358358
throw new Error("NeedFunding");
359359
}
360+
361+
// todo: check name min/max length
362+
// todo: check name is unique
363+
// todo: check symbol is unique
364+
// todo: check activity are correct
365+
// todo: check vePeriod min/max duration
366+
// todo: check pvpFee min/max
367+
// todo: check funding array has unique funding types
368+
// todo: check funding dates
369+
// todo: check funding raise goals
360370
}
361371
}

0 commit comments

Comments
Β (0)