Skip to content

Commit

Permalink
add Astra++ project
Browse files Browse the repository at this point in the history
  • Loading branch information
sekaiking committed Aug 6, 2023
1 parent 61b4fa5 commit 29e51d1
Show file tree
Hide file tree
Showing 45 changed files with 5,970 additions and 0 deletions.
109 changes: 109 additions & 0 deletions apps/astraplusplus/type/dao.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"properties": [

{
"name": "name",
"type": "string",
"required": true,
"string": {
"validation": {
"min": 3,
"max": 50
}
}
},
{
"name": "address",
"type": "string",
"required": true,
"string": {
"validation": {
"pattern": "^(([a-zd]+[-_])*[a-zd]+.)*([a-zd]+[-_])*[a-zd]+$"
}
}
},
{
"name": "soulBoundTokenIssuer",
"type": "string",
"required": false,
"string": {
"validation": {
"pattern": "^(([a-zd]+[-_])*[a-zd]+.)*([a-zd]+[-_])*[a-zd]+$"
}
}
},
{
"name": "purpose",
"type": "string",
"required": true,
"string": {
"validation": {
"min": 0,
"max": 1000
}
}
},
{
"name": "legalStatus",
"type": "string",
"required": false,
"string": {
"validation": {
"min": 0,
"max": 100
}
}
},
{
"name": "legalDocument",
"type": "string",
"required": false,
"string": {
"validation": {
"pattern": "(https?://(?:www.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9].[^s]{2,}|www.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9].[^s]{2,}|https?://(?:www.|(?!www))[a-zA-Z0-9]+.[^s]{2,}|www.[a-zA-Z0-9]+.[^s]{2,})"
}
}
},
{
"name": "links",
"type": "array",
"required": false,
"array": {
"type": "string",
"validation": {
"min": 0,
"max": 10
}
}
},
{
"name": "coolDownPeriod",
"type": "number",
"required": true,
"number": {
"validation": {
"min": 0,
"max": 31536000
}
}
},
{
"name": "policy",
"type": "/*__@appAccount__*//type/daoPolicy",
"required": true
},
{
"name": "profileImage",
"required": false,
"type": "/*__@appAccount__*//type/image"
},
{
"name": "coverImage",
"type": "/*__@appAccount__*//type/image",
"required": false
}
],
"widgets": {
"create": "/*__@appAccount__*//widget/CreateDAO"
}
}
105 changes: 105 additions & 0 deletions apps/astraplusplus/type/daoPolicy.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"properties": [
{
"name": "roles",
"type": "array",
"required": true,
"array": {
"validation": {
"min": 1
},
"type": {
"properties": [
{
"name": "name",
"type": "string",
"required": true,
"string": {
"validation": {
"minLength": 1,
"maxLength": 32,
"pattern": "^[a-zA-Z0-9]+[a-zA-Z0-9- ]*[a-zA-Z0-9]+$"
}
}
},
{
"name": "kind",
"type": [
"string",
{
"properties": [
{
"name": "Group",
"type": "array",
"required": true,
"array": {
"type": "string",
"min": 1,
"string": {
"validation": {
"minLength": 1,
"maxLength": 100,
"pattern": "^(([a-zd]+[-_])*[a-zd]+.)*([a-zd]+[-_])*[a-zd]+$"
}
}
}
}
]
}
]
},
{
"name": "permissions",
"type": "array",
"array": {
"type": "string"
}
},
{
"name": "vote_policy",
"type": "object"
}
]
}
}
},
{
"name": "default_vote_policy",
"type": {
"properties": [
{
"name": "weight_kind",
"type": "string"
},
{
"name": "quorum",
"type": "string"
},
{
"name": "threshold",
"type": "array",
"array": {
"type": "number"
}
}
]
}
},
{
"name": "proposal_bond",
"type": "string"
},
{
"name": "proposal_period",
"type": "string"
},
{
"name": "bounty_bond",
"type": "string"
},
{
"name": "bounty_forgiveness_period",
"type": "string"
}
]
}
Loading

0 comments on commit 29e51d1

Please sign in to comment.