Skip to content

Commit

Permalink
Merge pull request #75 from neutron-org/feat/neutron-voting-registry-v2
Browse files Browse the repository at this point in the history
[NTRN-78] upgrade neutron voting registry to v2
  • Loading branch information
pr0n00gler authored Sep 5, 2023
2 parents 83b7733 + cdbb558 commit 1cd5d88
Show file tree
Hide file tree
Showing 14 changed files with 1,459 additions and 510 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,36 @@
{
"type": "object",
"required": [
"remove_voting_vault"
"deactivate_voting_vault"
],
"properties": {
"remove_voting_vault": {
"deactivate_voting_vault": {
"type": "object",
"required": [
"old_voting_vault_contract"
"voting_vault_contract"
],
"properties": {
"old_voting_vault_contract": {
"voting_vault_contract": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"activate_voting_vault"
],
"properties": {
"activate_voting_vault": {
"type": "object",
"required": [
"voting_vault_contract"
],
"properties": {
"voting_vault_contract": {
"type": "string"
}
}
Expand Down Expand Up @@ -126,6 +146,16 @@
"properties": {
"voting_vaults": {
"type": "object",
"properties": {
"height": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
Expand Down Expand Up @@ -206,18 +236,11 @@
"title": "Config",
"type": "object",
"required": [
"owner",
"voting_vaults"
"owner"
],
"properties": {
"owner": {
"$ref": "#/definitions/Addr"
},
"voting_vaults": {
"type": "array",
"items": {
"$ref": "#/definitions/Addr"
}
}
},
"definitions": {
Expand Down Expand Up @@ -329,7 +352,8 @@
"required": [
"address",
"description",
"name"
"name",
"state"
],
"properties": {
"address": {
Expand All @@ -340,8 +364,29 @@
},
"name": {
"type": "string"
},
"state": {
"$ref": "#/definitions/VotingVaultState"
}
}
},
"VotingVaultState": {
"oneOf": [
{
"description": "Voting vault is active means that it's considered in voting power queries to the Neutron voting registry.",
"type": "string",
"enum": [
"Active"
]
},
{
"description": "Voting vault is inactive means that it's not considered in voting power queries to the Neutron voting registry.",
"type": "string",
"enum": [
"Inactive"
]
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,36 @@
{
"type": "object",
"required": [
"remove_voting_vault"
"deactivate_voting_vault"
],
"properties": {
"remove_voting_vault": {
"deactivate_voting_vault": {
"type": "object",
"required": [
"old_voting_vault_contract"
"voting_vault_contract"
],
"properties": {
"old_voting_vault_contract": {
"voting_vault_contract": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"activate_voting_vault"
],
"properties": {
"activate_voting_vault": {
"type": "object",
"required": [
"voting_vault_contract"
],
"properties": {
"voting_vault_contract": {
"type": "string"
}
}
Expand Down
10 changes: 10 additions & 0 deletions contracts/dao/voting/neutron-voting-registry/schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
"properties": {
"voting_vaults": {
"type": "object",
"properties": {
"height": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@
"title": "Config",
"type": "object",
"required": [
"owner",
"voting_vaults"
"owner"
],
"properties": {
"owner": {
"$ref": "#/definitions/Addr"
},
"voting_vaults": {
"type": "array",
"items": {
"$ref": "#/definitions/Addr"
}
}
},
"definitions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"required": [
"address",
"description",
"name"
"name",
"state"
],
"properties": {
"address": {
Expand All @@ -22,8 +23,29 @@
},
"name": {
"type": "string"
},
"state": {
"$ref": "#/definitions/VotingVaultState"
}
}
},
"VotingVaultState": {
"oneOf": [
{
"description": "Voting vault is active means that it's considered in voting power queries to the Neutron voting registry.",
"type": "string",
"enum": [
"Active"
]
},
{
"description": "Voting vault is inactive means that it's not considered in voting power queries to the Neutron voting registry.",
"type": "string",
"enum": [
"Inactive"
]
}
]
}
}
}
Loading

0 comments on commit 1cd5d88

Please sign in to comment.