From 5f366ddd02b688ea75fadb5f1c5c40efd14a80ca Mon Sep 17 00:00:00 2001 From: jlwaugh Date: Thu, 22 Dec 2022 14:46:53 -0500 Subject: [PATCH] bountiful --- types/bounty/Bounty.md | 65 ++++++++ types/bounty/BountyClaim.md | 34 ++++ types/bounty/BountyContext.md | 234 ++++++++++++++++++++++++++ types/bounty/BountyDoneProposal.md | 131 +++++++++++++++ types/bounty/Dao.md | 255 +++++++++++++++++++++++++++++ 5 files changed, 719 insertions(+) create mode 100644 types/bounty/Bounty.md create mode 100644 types/bounty/BountyClaim.md create mode 100644 types/bounty/BountyContext.md create mode 100644 types/bounty/BountyDoneProposal.md create mode 100644 types/bounty/Dao.md diff --git a/types/bounty/Bounty.md b/types/bounty/Bounty.md new file mode 100644 index 0000000..dd050f7 --- /dev/null +++ b/types/bounty/Bounty.md @@ -0,0 +1,65 @@ +# Bounty + +This exploratory standard is in DRAFT mode. + +## Schema + +| Key | Type | About | +| --- | --- | --- | +| `bounty` | [Bounty](./Bounty.md) | bounty data | +| `bountyContext` | [BountyContext](./BountyContext.md) | about a bounty | +| `bountyClaims` | [BountyClaim](./BountyClaim.md) | self-assigned tasks | +| `bountyDoneProposals` | [BountyDoneProposal](./BountyDoneProposal.md) | payouts requested | +| `dao` | [Dao](./Dao.md) | reviewers / approvers | + +## Example + +The format used for storing a bounty. + +{ + "id": "string", + "bountyId": 0, + "description": "string", + "proposalId": "string", + "daoId": "string", + "dao": { ... }, + "bountyContext": { ... }, + "bountyDoneProposals": [ { ... } ] + "bountyClaims": [ { ... } ] + "description": "string", + "token": "string", + "amount": "string", + "times": 0, + "maxDeadline": "string", + "numberOfClaims": 0 +} + + +Astro API response for a given bounty ID: + +https://api.app.astrodao.com/docs/#/Bounty/BountyController_bountyById + + +{ + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.607Z", + "updatedAt": "2022-12-22T04:35:37.607Z", + "transactionHash": "string", + "updateTransactionHash": "string", + "createTimestamp": "string", + "updateTimestamp": "string", + "id": "string", + "bountyId": 0, + "proposalId": "string", + "daoId": "string", + "dao": { ... }, + "bountyContext": { ... }, + "bountyDoneProposals": [{ ... }] + "bountyClaims": [{ ... }], + "description": "string", + "token": "string", + "amount": "string", + "times": 0, + "maxDeadline": "string", + "numberOfClaims": 0 +} \ No newline at end of file diff --git a/types/bounty/BountyClaim.md b/types/bounty/BountyClaim.md new file mode 100644 index 0000000..8bc20ff --- /dev/null +++ b/types/bounty/BountyClaim.md @@ -0,0 +1,34 @@ +# Bounty Claim + +This exploratory standard is in DRAFT mode. + +## Example + +from the [Astro API](https://api.app.astrodao.com/docs/#/Bounty/BountyController_bountyById) + +{ + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.608Z", + "updatedAt": "2022-12-22T04:35:37.608Z", + "transactionHash": "string", + "updateTransactionHash": "string", + "createTimestamp": "string", + "updateTimestamp": "string", + "id": "string", + "accountId": "string", + "startTime": "string", + "deadline": "string", + "completed": true, + "endTime": "string" +} + +___ + +from the Sputnik DAO [bounties.rs](https://github.com/near-daos/sputnik-dao-contract/blob/main/sputnikdao2/src/bounties.rs#L12-L21) file + +pub struct BountyClaim { + bounty_id: u64, + start_time: U64, + deadline: U64, + completed: bool, +} \ No newline at end of file diff --git a/types/bounty/BountyContext.md b/types/bounty/BountyContext.md new file mode 100644 index 0000000..7d3ef49 --- /dev/null +++ b/types/bounty/BountyContext.md @@ -0,0 +1,234 @@ +# Bounty Context + +This exploratory standard is in DRAFT mode. + +## Example + +The format used for storing the bounty metadata. + +{ + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.607Z", + "updatedAt": "2022-12-22T04:35:37.607Z", + "id": "string", + "daoId": "string", + "proposal": { + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.607Z", + "updatedAt": "2022-12-22T04:35:37.607Z", + "transactionHash": "string", + "updateTransactionHash": "string", + "createTimestamp": "string", + "updateTimestamp": "string", + "id": "string", + "proposalId": 0, + "daoId": "string", + "dao": { + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.607Z", + "updatedAt": "2022-12-22T04:35:37.607Z", + "transactionHash": "string", + "updateTransactionHash": "string", + "createTimestamp": "string", + "updateTimestamp": "string", + "id": "string", + "config": { + "name": "string", + "purpose": "string", + "metadata": "string" + }, + "metadata": {}, + "amount": "string", + "totalSupply": "string", + "lastBountyId": 0, + "lastProposalId": 0, + "stakingContract": "string", + "numberOfAssociates": 0, + "numberOfMembers": 0, + "numberOfGroups": 0, + "council": [ + "string" + ], + "accountIds": [ + "string" + ], + "councilSeats": 0, + "policy": { + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.607Z", + "updatedAt": "2022-12-22T04:35:37.607Z", + "daoId": "string", + "proposalBond": "string", + "bountyBond": "string", + "proposalPeriod": "string", + "bountyForgivenessPeriod": "string", + "defaultVotePolicy": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "roles": [ + { + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.607Z", + "updatedAt": "2022-12-22T04:35:37.607Z", + "id": "string", + "name": "string", + "kind": "string", + "balance": 0, + "accountIds": [ + "string" + ], + "permissions": [ + "string" + ], + "votePolicy": { + "additionalProp1": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "additionalProp2": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "additionalProp3": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + } + } + } + ] + }, + "createdBy": "string", + "daoVersionHash": "string", + "daoVersion": { + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.607Z", + "updatedAt": "2022-12-22T04:35:37.607Z", + "hash": "string", + "version": [ + "string" + ], + "commitId": "string", + "changelogUrl": "string" + }, + "status": {}, + "activeProposalCount": 0, + "totalProposalCount": 0, + "totalDaoFunds": 0, + "bountyCount": 0, + "nftCount": 0 + }, + "proposer": "string", + "description": "string", + "status": "InProgress", + "voteStatus": "Active", + "kind": { + "type": "ChangeConfig", + "config": { + "name": "string", + "purpose": "string", + "metadata": "string" + }, + "policy": { + "proposalBond": "string", + "bountyBond": "string", + "proposalPeriod": "string", + "bountyForgivenessPeriod": "string", + "defaultVotePolicy": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "roles": { + "id": "string", + "name": "string", + "balance": 0, + "accountIds": [ + "string" + ], + "permissions": [ + "string" + ], + "votePolicy": {}, + "kind": { + "group": [ + "string" + ] + } + } + }, + "proposalVariant": "string", + "memberId": "string", + "role": "string", + "receiverId": "string", + "actions": [ + { + "methodName": 0, + "args": "string", + "deposit": "string", + "gas": "string" + } + ], + "hash": "string", + "methodName": "string", + "tokenId": "string", + "msg": "string", + "stakingId": "string", + "bounty": "string", + "bountyId": 0, + "amount": "string" + }, + "type": "ChangeConfig", + "submissionTime": "string", + "voteCounts": {}, + "votes": {}, + "failure": {}, + "actions": [ + { + "id": "string", + "proposalId": "string", + "accountId": "string", + "action": {}, + "transactionHash": "string", + "timestamp": "string" + } + ], + "votePeriodEnd": "string", + "bountyDoneId": "string", + "bountyClaimId": "string", + "commentsCount": 0, + "permissions": { + "canApprove": true, + "canReject": true, + "canDelete": true, + "isCouncil": true, + "canAdd": true + } + }, + "bounty": "string", + "commentsCount": 0 + }, \ No newline at end of file diff --git a/types/bounty/BountyDoneProposal.md b/types/bounty/BountyDoneProposal.md new file mode 100644 index 0000000..ad6e416 --- /dev/null +++ b/types/bounty/BountyDoneProposal.md @@ -0,0 +1,131 @@ +# Bounty Proposal + +This exploratory standard is in DRAFT mode. + +## Example + +The format used for storing a "bounty done" proposal. + +{ + "isArchived": true, + "createdAt": "string($date-time)", + "updatedAt": "string($date-time)", + "transactionHash": "string", + "updateTransactionHash": "string", + "createTimestamp": "string", + "updateTimestamp": "string", + "id": "string", + "proposalId": 0, + "daoId": "string", + "dao": { + + "proposer": "string", + "description": "string", + "status": "InProgress", + "voteStatus": "Active", + "kind": { + "type": "ChangeConfig", + "config": { + "name": "string", + "purpose": "string", + "metadata": "string" + }, + "policy": { + "proposalBond": "string", + "bountyBond": "string", + "proposalPeriod": "string", + "bountyForgivenessPeriod": "string", + "defaultVotePolicy": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "roles": { + "id": "string", + "name": "string", + "balance": 0, + "accountIds": [ + "string" + ], + "permissions": [ + "string" + ], + "votePolicy": {}, + "kind": { + "group": [ + "string" + ] + } + } + }, + "proposalVariant": "string", + "memberId": "string", + "role": "string", + "receiverId": "string", + "actions": [ + { + "methodName": 0, + "args": "string", + "deposit": "string", + "gas": "string" + } + ], + "hash": "string", + "methodName": "string", + "tokenId": "string", + "msg": "string", + "stakingId": "string", + "bounty": "string", + "bountyId": 0, + "amount": "string" + }, + "type": "ChangeConfig", + "submissionTime": "string", + "voteCounts": {}, + "votes": {}, + "failure": {}, + "actions": [ + { + "id": "string", + "proposalId": "string", + "accountId": "string", + "action": {}, + "transactionHash": "string", + "timestamp": "string" + } + ], + "votePeriodEnd": "string", + "bountyDoneId": "string", + "bountyClaimId": "string", + "commentsCount": 0, + "permissions": { + "canApprove": true, + "canReject": true, + "canDelete": true, + "isCouncil": true, + "canAdd": true + } + } +} + +___ + +from the Sputnik DAO [proposals.rs](https://github.com/near-daos/sputnik-dao-contract/blob/main/sputnikdao2/src/proposals.rs) file: + +pub struct PolicyParameters { + pub proposal_bond: Option, + pub proposal_period: Option, + pub bounty_bond: Option, + pub bounty_forgiveness_period: Option, +} + +AddBounty { bounty: Bounty }, + +BountyDone { + bounty_id: u64, + receiver_id: AccountId, +}, \ No newline at end of file diff --git a/types/bounty/Dao.md b/types/bounty/Dao.md new file mode 100644 index 0000000..d4b4d77 --- /dev/null +++ b/types/bounty/Dao.md @@ -0,0 +1,255 @@ +# DAO + +This exploratory standard is in DRAFT mode. + +## Schema + +from [DAOstar](https://daostar.org/schema) + +| Type | About | +| --- | --- | +| name | title of the DAO | +| description | info regarding the DAO | +| membersURI | pointing to a Json file representing the Members object | +| proposalsURI | pointing to a Json file representing the Proposals object | +| activityLogURI | pointing to a Json file representing the Activity Log object | +| governanceURI | pointing to a flat file, detailing the governance system of the DAO | + +## Example + +from the [Astro API](https://api.app.astrodao.com/docs/#/DAO/DaoController_daoById) + +{ + "isArchived": true, + "createdAt": "string($date-time)", + "updatedAt": "string($date-time)", + "transactionHash": "string", + "updateTransactionHash": "string", + "createTimestamp": "string", + "updateTimestamp": "string", + "id": "string", + "config": { + "name": "string", + "purpose": "string", + "metadata": "string" + }, + "metadata": {}, + "amount": "string", + "totalSupply": "string", + "lastBountyId": 0, + "lastProposalId": 0, + "stakingContract": "string", + "numberOfAssociates": 0, + "numberOfMembers": 0, + "numberOfGroups": 0, + "council": [ + "string" + ], + "accountIds": [ + "string" + ], + "councilSeats": 0, + "policy": { + "isArchived": true, + "createdAt": "string($date-time)", + "updatedAt": "string($date-time)", + "daoId": "string", + "proposalBond": "string", + "bountyBond": "string", + "proposalPeriod": "string", + "bountyForgivenessPeriod": "string", + "defaultVotePolicy": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "roles": [ + { + "isArchived": true, + "createdAt": "string($date-time)", + "updatedAt": "string($date-time)", + "id": "string", + "name": "string", + "kind": "string", + "balance": 0, + "accountIds": [ + "string" + ], + "permissions": [ + "string" + ], + "votePolicy": { + "additionalProp1": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "additionalProp2": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + }, + "additionalProp3": { + "weightKind": "TokenWeight", + "quorum": "string", + "kind": "Weight", + "weight": "string", + "ratio": [ + "string" + ] + } + } + } + ] + }, + "createdBy": "string", + "daoVersionHash": "string", + "daoVersion": { + "isArchived": true, + "createdAt": "2022-12-22T04:35:37.608Z", + "updatedAt": "2022-12-22T04:35:37.608Z", + "hash": "string", + "version": [ + "string" + ], + "commitId": "string", + "changelogUrl": "string" + }, + "status": {}, + "activeProposalCount": 0, + "totalProposalCount": 0, + "totalDaoFunds": 0, + "bountyCount": 0, + "nftCount": 0 +} + +___ + +## Common Interfaces for DAOs + +from [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824), courtesy of [DAOstar](https://daostar.one) + +{ + "@context": "http://www.daostar.org/schemas", + "type": "DAO", + "name": "", + "description": "", + "membersURI": "", + "proposalsURI": "", + "activityLogURI": "", + "governanceURI": "", + "contractsRegistryURI": "" +} + +### Members + +{ + "@context": "", + "type": "DAO", + "name": "", + "members": [ + { + "type": "EthereumAddress", + "id": "
" + }, + { + "type": "EthereumAddress", + "id": "
" + } + ] +} + +### Proposals + +{ + "@context": "http://www.daostar.org/schemas", + "type": "DAO", + "name": "", + "proposals": [ + { + "type": "proposal", + "id": "", + "name": "", + "contentURI": "", + "status": "", + "calls": [ + { + "type": "CallDataEVM", + "operation": "", + "from": "", + "to": "", + "value": "", + "data": "" + } + ] + } + ] +} + +### Contracts Registry + +{ + "@context": "", + "type": "DAO", + "name": "", + "contracts": [ + { + "type": "EthereumAddress", + "id": "
", + "label": "Treasury" + }, + { + "type": "EthereumAddress", + "id": "
", + "label": "Governance Token" + + } + ] +} + +### Activity Log + +{ + "@context": "", + "type": "DAO", + "name": "", + "activities": [ + { + "id": "", + "type": "activity", + "proposal": { + "id": "", + "type": "proposal" + }, + "member": { + "type": "EthereumAddress", + "id": "
" + } + }, + "activities": [ + { + "id": "", + "type": "activity", + "proposal": { + "id": "", + "type": "proposal" + }, + "member": { + "type": "EthereumAddress", + "id": "
" + } + } + ] +} \ No newline at end of file