Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIP-0088? | Token Policy Registration #467

Merged
merged 33 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
aaad960
Add first draft of the on-chain token policy registration CIP.
Crypto2099 Feb 27, 2023
6396990
qualify pull request discussion URL
rphair Mar 6, 2023
87cee97
correct anchor for CIP-0036 URL
rphair Mar 6, 2023
f1981c0
reformat license to standard CIP form
rphair Mar 6, 2023
18bc58a
Merge branch 'cardano-foundation:master' into token-registration
Crypto2099 Mar 7, 2023
131a338
Add proposed CIP-26 Fungible Token registration along with examples a…
Crypto2099 Mar 7, 2023
79ff0f3
Merge remote-tracking branch 'origin/token-registration' into token-r…
Crypto2099 Mar 7, 2023
a8472f3
Minor formatting changes for CIP-26 README.md as well as first draft …
Crypto2099 Mar 8, 2023
d6ef38f
Minor updates to the URI Array schema definition and adding CIP-25 su…
Crypto2099 Mar 8, 2023
e300829
Update CIP-XXXX/README.md
Crypto2099 Mar 15, 2023
24d8fdc
Update directory structure to use proposed CIP #88 and add 867 metada…
Crypto2099 Mar 24, 2023
6e4ca32
Merge branch 'token-registration' of https://github.com/Crypto2099/CI…
Crypto2099 Mar 24, 2023
aadb582
Update CIP Title
Crypto2099 Mar 24, 2023
a18a571
Merge branch 'cardano-foundation:master' into token-registration
Crypto2099 Mar 24, 2023
9b00dcc
**CIP-0088: Token Policy Registration**
Crypto2099 Mar 24, 2023
36633e6
Merge remote-tracking branch 'origin/token-registration' into token-r…
Crypto2099 Mar 24, 2023
92999f7
**CIP-0088: Token Policy Registration**
Crypto2099 Mar 25, 2023
36f4a4f
**CIP-0088: Token Policy Registration**
Crypto2099 Mar 25, 2023
73efd08
Update CIP-0088/README.md
Crypto2099 Mar 25, 2023
b393db2
Update CIP-0088/README.md
Crypto2099 Mar 25, 2023
f5b8c59
**CIP-0088: Token Policy Registration**
Crypto2099 Mar 28, 2023
02d70a6
Merge remote-tracking branch 'origin/token-registration' into token-r…
Crypto2099 Mar 28, 2023
2194e4e
**CIP-0088: Registration Certificates**
Crypto2099 Mar 28, 2023
2b89192
**CIP-0088: Registration Certificates**
Crypto2099 Mar 28, 2023
c3cf7e8
**CIP-0088: Registration Certificates**
Crypto2099 Mar 28, 2023
46dbafd
- Add NFT Project Details CDDL and Specification Details
Crypto2099 Mar 28, 2023
8b6d7d6
Correct minor capitalization issue in NFT-Project-Details.md
Crypto2099 Mar 28, 2023
3c9fdfa
Some minor changes to CDDL specs and building out a better directory …
Crypto2099 Apr 2, 2023
f074536
Merge branch 'master' into token-registration
rphair Jul 8, 2023
f6c1d69
Updates to CIP-88:
Crypto2099 Nov 17, 2023
3504937
Fix YAML header
Crypto2099 Nov 17, 2023
637f023
Update CIP-0088/README.md
Crypto2099 Nov 20, 2023
221453a
Update Native Script scope
Crypto2099 Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CIP-0010/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
},
{
"transaction_metadatum_label": 839,
"description": "Agora - Proposal creation metadata"
"description": "Agora - Proposal creation metadata"
},
{
"transaction_metadatum_label": 867,
"description": "CIP-0088 - Token Policy Registration Standard"
},
{
"transaction_metadatum_label": 888,
Expand Down
7 changes: 7 additions & 0 deletions CIP-0088/CIPs/0025/CIP25_v1.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; CIP-0025: Token Metadata Standard
; Version: 1

cip25-details = {
? 0 : uint, ; version
1 : token-project-details ; [CIP-0025 Token Project Details](../common/token-project-details.cddl)
}
40 changes: 40 additions & 0 deletions CIP-0088/CIPs/0025/CIP25_v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"25": {
"0": 1,
"1": {
"0": "SpaceBudz",
"1": [
"10,000 SpaceBudz are out there.",
"Where will your SpaceBudz take you?"
],
"2": [
"https://",
"static.spacebudz.io",
"/images/logo.png"
],
"3": [
"https://",
"static.spacebudz.io",
"/images/banner.jpg"
],
"4": 0,
"5": [
[
"twitter",
[
"https://",
"twitter.com/spacebudzNFT"
]
],
[
"discord",
[
"https://",
"discord.gg/spacebudz"
]
]
],
"6": "SpaceBudz"
}
}
}
30 changes: 30 additions & 0 deletions CIP-0088/CIPs/0025/CIP25_v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$id": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/CIPs/0025/CIP25_v1.schema.json",
"title": "CIP-25: Token Project Details",
"description": "Additional context for token policy declaring support for CIP-25 token metadata standards",
"type": "object",
"properties": {
"25": {
"type": "object",
"properties": {
"0": {
"type": "integer",
"title": "Version",
"description": "The version of the standard in use",
"minimum": 1
},
"1": {
"title": "Project Details",
"description": "Describe top-level details about the Token Project",
"$ref": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/common/token-project-details_v1.schema.json"
}
},
"required": [
"1"
]
}
},
"required": [
"25"
]
}
81 changes: 81 additions & 0 deletions CIP-0088/CIPs/0025/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# CIP-88 Extension: CIP-0025 | Token Project Information

`Version: 1`

## Top-Level Fields

Both CIP-25 and CIP-68 are specifications describing a standard for storing and retrieving token metadata from the
chain. To this end, we have given them the same data structure although each will utilize their own numerical index in
the feature set and CIP-Specific details section of the registration.

These sections may be separated in the future if the respective CIPs diverge in terms of the data or information that
may be useful to provide about one format or the other in the future.

| index | name | type | required | notes |
|-------|--------------------------|------------------|----------|-------------------------------------------------------------------------------------------------------------|
| 0 | Version | Unsigned Integer | No | Default: 1, which version of this specification is in use |
| 1 | Token Collection Details | Object | Yes | Provide additional context about this "Collection" for consumption by marketplaces, explorers, and wallets. |

The information registered here is helpful to aggregator services and marketplaces, it applies equally to both CIP-25
and CIP-68 metadata standards. A project utilizing one or the other should reference this documentation and include the
relevant information under index #6, prefixed by the number of the CIP (25 or 68) depending upon the metadata format.

## Token Collection Details Fields

| index | name | type | required |
|-------|---------------------|----------|----------|
| 0 | Collection Name | String | Yes |
| 1 | Description | Array | No |
| 2 | Project Image | UriArray | No |
| 3 | Project Banner | UriArray | No |
| 4 | NSFW Flag | 0 or 1 | No |
| 5 | Social Media | Array | No |
| 6 | Project/Artist Name | String | No |

For details on what these fields represent and how they should be structured in the metadata, please refer to
[Token Project Details](../common/Token-Project-Details_v1.md)

## CIP-25 Example

```cbor
{
25: {
0: 1,
1: {
0: "Cool NFT Project",
1: [
"This is a description of my project",
"longer than 64 characters so broken up into a string array"
],
2: [
"https://",
"static.coolnftproject.io",
"/images/icon.png"
],
3: [
"https://",
"static.coolnftproject.io",
"/images/banner1.jpg"
],
4: 0,
5: [
[
"twitter",
[
"https://",
"twitter.com/spacebudzNFT"
]
],
[
"discord",
[
"https://",
"discord.gg/spacebudz"
]
]
],
6: "Virtua Metaverse"
}
}
}
```
39 changes: 39 additions & 0 deletions CIP-0088/CIPs/0026/CIP26_v1.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
; CIP-0026: Fungible Token Registration Standard
; Version: 1

string = text .size (0..64)

; A uri should consist of a scheme and one or more path strings describing the path to the resource
; The first entry should contain the URI "Scheme" (e.g. "https://", "ftp://", "ar://", "ipfs://")
; One or more subsequent entries should describe the path of the URI

uri.scheme = text .size (5..64)
uri.path = text .size (1..64)
uri = {
uri.scheme,
+ uri.path
}

policy_id = bytes .size(28)
asset_name = bytes .size (0..32)

token-asset = {
policy_id,
asset_name
}

fungible-details = {
0 : token-asset, ; asset identifier
1 : string, ; token name
2 : [* string], ; description
? 3 : string, ; token ticker
? 4 : uint, ; token decimals
? 5 : uri, ; uri of token website
? 6 : uri, ; uri of token image
? 7 : token-asset ; beacon token identifier
}

cip26-details = {
? 0 : uint, ; version
1 : [+ fungible-details] ; CIP-0026 Fungible Token Registration(s)
}
35 changes: 35 additions & 0 deletions CIP-0088/CIPs/0026/CIP26_v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"26": {
"0": 1,
"1": [
{
"0": [
"d894897411707efa755a76deb66d26dfd50593f2e70863e1661e98a0",
"7370616365636f696e73"
],
"1": "spacecoins",
"2": "SPACE",
"3": [
"the OG Cardano community token",
"-",
"whatever you do, your did it!",
"",
"Learn more at https://spacecoins.io!"
],
"4": 0,
"5": [
"https://",
"spacecoins.io"
],
"6": [
"ipfs://",
"bafkreib3e5u4am2btduu5s76rdznmqgmmrd4l6xf2vpi4vzldxe25fqapy"
],
"7": [
"d894897411707efa755a76deb66d26dfd50593f2e70863e1661e98a0",
""
]
}
]
}
}
118 changes: 118 additions & 0 deletions CIP-0088/CIPs/0026/CIP26_v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"$id": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/CIPs/0026/CIP26_v1.schema.json",
"title": "CIP-26: Fungible Token",
"description": "Additional context for a policy declaring support for fungible token standards",
"type": "object",
"properties": {
"26": {
"type": "object",
"properties": {
"0": {
"type": "integer",
"title": "Version",
"description": "The version of the standard in use",
"minimum": 1
},
"1": {
"type": "array",
"minItems": 1,
"items": {
"title": "Fungible Token Details",
"description": "Describes details about a particular fungible token under this policy",
"type": "object",
"properties": {
"0": {
"title": "Subject",
"description": "The hex-encoded Policy ID and Asset ID of the token",
"$ref": "#/$defs/tokenAsset"
},
"1": {
"title": "Name",
"description": "The full display name of the token",
"type": "string",
"example": "spacecoins"
},
"2": {
"title": "Symbol/Ticker",
"description": "The ticker or listing symbol for the token",
"type": "string",
"example": "SPACE"
},
"3": {
"title": "Description",
"description": "A short description for the token",
"type": "array",
"items": {
"type": "string",
"maxLength": 64
},
"example": [
"The OG Cardano Community Token","- whatever you do, your did it!"
]
},
"4": {
"title": "Decimals",
"description": "How many decimal places this token should be rendered with",
"type": "integer",
"example": 0,
"default": 0
},
"5": {
"title": "URL",
"description": "A URL to the project's web page",
"$ref": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/common/uri-array.schema.json"
},
"6": {
"title": "Logo",
"description": "A URI to the token's logo",
"$ref": "https://raw.githubusercontent.com/cardano-foundation/CIPs/main/CIP-0088/common/uri-array.schema.json"
},
"7": {
"title": "Reference Token",
"description": "A reference to a 'Beacon Token' that can provide additional context via inline datum to smart contracts",
"$ref": "#/$defs/tokenAsset"
}
},
"required": [
"0",
"1",
"2"
]
}
}
},
"required": [
"1"
]
}
},
"required": [
"26"
],
"$defs": {
"tokenAsset": {
"title": "Token Asset",
"description": "The hex-encoded Policy ID and hex-encoded Asset ID of the token",
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"title": "Policy ID",
"description": "The hex-encoded Policy ID of the token",
"type": "string",
"maxLength": 56,
"minLength": 56
},
{
"title": "Asset ID",
"description": "The hex-encoded Asset ID of the token",
"type": "string",
"minLength": 0,
"maxLength": 64
}
],
"additionalItems": false
}
}
}
Loading