ceramicnetwork / ceramicnetwork/CIPs
cip: Conviction Voting Template
- Dominant language
- HTML
- Stars
- 84
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
```
cip:
title: Conviction Voting Template
author: Joel Thorstensson (@oed)
discussions-to:
status: Idea
category: Standards
type: RFC
created: 2021-02-28
```
> This is still a work in progress. Will add more context to these schemas!
## Simple Summary
This CIP describes a template that can be used to create off-chain conviction voting dapps.
## Abstract
Abstract goes here.
## Motivation
Fix me :)
## Specification
### Definition content
**Deployment:** Deploy your own.
```json
{
"name": "Conviction Voting Dapp",
"description": "Voting data for my dapp",
"schema": "",
"config": {
"context": ""
}
}
```
### Proposal Schema
**Deployment:** ``
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Convictions",
"properties": {
"context": {
"type": "string"
},
"title": {
"type": "string"
},
"currency": {
"type": "string"
},
"amount": {
"type": "number"
},
"beneficiary": {
"type": "string"
},
"description": {
"type": "string"
},
"url": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"context",
"title",
"currency",
"amount",
"beneficiary",
"url"
]
}
```
### Convictions Schema
**Deployment:** ``
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Convictions",
"properties": {
"context": {
"type": "string"
},
"supply": {
"type": "number"
},
"proposals": {
"type": "array",
"items": {
"$ref": "#/definitions/proposals"
}
},
"convictions": {
"type": "array",
"items": {
"$ref": "#/definitions/convictions"
}
}
},
"additionalProperties": false,
"required": [
"context",
"proposals",
"convictions"
],
"definitions": {
"proposals": {
"type": "string",
"$id": "ceramic://doc",
"$ceramicSchema": "",
"maxLength": 150
},
"convictions": {
"type": "object",
"properties": {
"proposal": {
"type": "string",
"$id": "ceramic://doc",
"$ceramicSchema": "",
"maxLength": 150
},
"allocation": {
"type": "number"
}
},
"required": [
"proposal",
"allocation"
]
}
}
}
```
### Conviction State Schema
**Deployment:** ``
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "ConvictionState",
"properties": {
"context": {
"type": "string"
},
"blockHeight": {
"type": "number"
},
"supply": {
"type": "number"
},
"participants": {
"type": "array",
"items": {
"$ref": "#/definitions/participants"
}
},
"proposals": {
"type": "array",
"items": {
"$ref": "#/definitions/proposals"
}
}
},
"additionalProperties": false,
"required": [
"context",
"supply",
"participants",
"proposals"
],
"definitions": {
"participants": {
"type": "object",
"properties": {
"account": {
"type": "string"
},
"balance": {
"type": "number"
},
"convictions": {
"type": "string",
"$id": "ceramic://doc",
"$ceramicSchema": "",
"maxLength": 150
}
},
"required": [
"account",
"balance",
"convictions"
]
},
"proposals": {
"type": "object",
"properties": {
"proposal": {
"type": "string",
"$id": "ceramic://doc",
"$ceramicSchema": "",
"maxLength": 150
},
"totalConviction": {
"type": "number"
},
"triggered": {
"type": "boolean"
}
},
"required": [
"proposal",
"totalConviction",
"triggered"
]
}
}
}
```
## Rationale
Fix me :)
## Backwards Compatibility
N/A
## Implementation
Fix me :)
## Security Considerations
Security considerations go here.
## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.