Skip to content

Commit 08c2958

Browse files
committed
Merge branch 'main' of https://github.com/stacksgov/sips
2 parents fcee484 + 68b7f1f commit 08c2958

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

sips/sip-007/sip-007-stacking-consensus.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ reward in a base cryptocurrency by actively participating in the
3737
consensus algorithm.
3838

3939
This SIP proposes to change the mining mechanism of the Stacks
40-
blockchain. [SIP-001](./sip-001-burn-election.md) introduced
40+
blockchain. [SIP-001](../sip-001/sip-001-burn-election.md) introduced
4141
proof-of-burn (PoB) where a base cryptocurrency is destroyed to
4242
participate in mining of a new cryptocurrency. This proposal argues
4343
that a new mining mechanism called proof-of-transfer (PoX) will be an
@@ -92,7 +92,7 @@ converting electricity and computing power to newly minted tokens, nor
9292
are they staking their cryptocurrency. Rather they use an existing PoW
9393
cryptocurrency to secure a new, separate blockchain.
9494

95-
This SIP is currently a draft and proposes to change the mining
95+
This SIP proposes to change the mining
9696
mechanism of the Stacks blockchain from proof-of-burn (SIP-001) to
9797
proof-of-transfer.
9898

sips/sip-009/sip-009-nft-standard.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ Sign-off: Jude Nelson <jude@stacks.org>, Technical Steering Committee Chair
2020

2121
# Abstract
2222

23-
Non-fungible tokens or NFTs are digital assets registered on blockchain with unique identifiers and properties that distinguish them from each other.
24-
It should be possible to uniquely identify, own and transfer a non-fungible token. This SIP aims to provide a flexible and easy-to-implement standard that can be used by developers on the Stacks blockchain when creating their own NFTs. This standard only specifies a basic set of requirements, non-fungible tokens can have more features than what's specified in this standard.
23+
Non-fungible tokens or NFTs are digital assets registered on blockchain with unique identifiers and properties that distinguish them from each other.
24+
It should be possible to uniquely identify, own and transfer a non-fungible token. This SIP aims to provide a flexible and easy-to-implement standard that can be used by developers on the Stacks blockchain when creating their own NFTs. This standard only specifies a basic set of requirements, non-fungible tokens can have more features than what's specified in this standard.
25+
2526
# License and Copyright
2627

2728
This SIP is made available under the terms of the Creative Commons CC0 1.0 Universal license, available at https://creativecommons.org/publicdomain/zero/1.0/
@@ -51,23 +52,23 @@ This function must never return an error response. It can be defined as read-onl
5152

5253
### Token URI
5354

54-
`(get-token-uri (uint) (response (optional (string-ascii 256)) uint))`
55+
`(get-token-uri (uint) (response (optional (string-ascii 256)) uint))`
5556

5657
Takes an NFT identifier and returns a response containing a valid URI which resolves to the NFT's metadata. The URI string must be wrapped in an `optional`. If the corresponding NFT doesn't exist or the contract doesn't maintain metadata, the response must be `(ok none)`. If a valid URI exists for the NFT, the response must be `(ok (some "<URI>"))`. The length of the returned URI is limited to 256 characters. The specification of the metadata should be covered in a separate SIP.
5758

5859
This function must never return an error response. It can be defined as read-only, i.e. `define-read-only`.
5960

6061
### Owner
6162

62-
`(get-owner (uint) (response (optional principal) uint))`
63+
`(get-owner (uint) (response (optional principal) uint))`
6364

64-
Takes an NFT identifier and returns a response containing the principal owning the NFT with the given identifier. The principal must be wrapped in an optional. If the corresponding NFT doesn't exist, the response must be `(ok none)`. The owner can be a contract principal.
65+
Takes an NFT identifier and returns a response containing the principal owning the NFT with the given identifier. The principal must be wrapped in an optional. If the corresponding NFT doesn't exist, the response must be `(ok none)`. The owner can be a contract principal.
6566

6667
If a call to function `get-owner` returns some principal `A`, then it must return the same value until the `transfer` function is called with principal `A` as the sender.
6768

6869
For any call to `get-owner` with an ID greater than the last token ID returned by the `get-last-token-id` function, the call must return a response `(ok none)`.
6970

70-
This function must never return an error response. It can be defined as read-only, i.e. `define-read-only`.
71+
This function must never return an error response. It can be defined as read-only, i.e. `define-read-only`.
7172

7273
### Transfer
7374

@@ -82,6 +83,7 @@ After a successful call to `transfer`, the function `get-owner` must return the
8283
For any call to `transfer` with an ID greater than the last token ID returned by the `get-last-token-id` function, the call must return an error response.
8384

8485
It is recommended to use error codes from standardized list of codes and implement the function for converting the error codes to messages function that are defined in a separate SIP.
86+
8587
## Trait
8688

8789
```
@@ -90,7 +92,7 @@ It is recommended to use error codes from standardized list of codes and impleme
9092
;; Last token ID, limited to uint range
9193
(get-last-token-id () (response uint uint))
9294
93-
;; URI for metadata associated with the token
95+
;; URI for metadata associated with the token
9496
(get-token-uri (uint) (response (optional (string-ascii 256)) uint))
9597
9698
;; Owner of a given token identifier
@@ -115,7 +117,9 @@ The native asset functions include:
115117
- `nft-transfer?`
116118

117119
The following requirements for using native asset functions are defined:
120+
118121
### Transfer
122+
119123
If the `transfer` function is called from a client without a [post-condition](https://docs.blockstack.org/understand-stacks/transactions#post-conditions) in deny mode or without any NFT condition about a changed owner, then the function call must fail with `abort_by_post_condition`.
120124

121125
# Using NFTs in applications
@@ -135,6 +139,7 @@ For example, when applications call the `transfer` function, they should _always
135139
NFTs are an established asset class on blockchains. Read for example [here](https://www.ledger.com/academy/what-are-nft).
136140

137141
## EIP 721
142+
138143
Ethereum has [EIP 721](https://eips.ethereum.org/EIPS/eip-721) that defined non-fungible tokens on the Ethereum blockchain. Notable differences are that the transfer function in EIP 721 uses a different ordering of the arguments ending with the token id. The transfer function in this SIP uses the token ID as the first argument which is in line with the other native functions in Clarity. Furthermore, this SIP only defines a function for getting the URI pointing to the metadata of an NFT. The specifications for schema and other properties of the token metadata should be defined in a separate SIP.
139144

140145
# Backwards Compatibility
@@ -150,5 +155,12 @@ A trait that follows this specification is available on mainnet as [`SP2PABAF9FT
150155
# Reference Implementations
151156

152157
## Source code
158+
153159
### Friedger's clarity-smart-contracts
160+
154161
https://github.com/friedger/clarity-smart-contracts/blob/master/contracts/sips/nft-trait.clar
162+
163+
## Deployed Contracts
164+
165+
- mainnet: [SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait](https://explorer.stacks.co/txid/SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait?chain=mainnet)
166+
- testnet: [ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait.nft-trait](https://explorer.stacks.co/txid/ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait?chain=testnet)

sips/sip-010/sip-010-fungible-token-standard.md

+5
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,8 @@ Other examples of Clarity contracts that implement fungible tokens, although not
236236

237237
- [@psq's trait and implementation](https://github.com/psq/flexr/blob/master/contracts/src20-trait.clar)
238238
- [@friedger's fungible token implementation](https://github.com/friedger/clarity-smart-contracts/blob/master/contracts/tokens/fungible-token.clar)
239+
240+
## Deployed Contracts
241+
242+
- mainnet: [SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.sip-010-trait](https://explorer.stacks.co/txid/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard?chain=mainnet)
243+
- testnet: [ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.sip-010-trait-ft-standard.sip-010-trait](https://explorer.stacks.co/txid/ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.sip-010-trait-ft-standard?chain=testnet)

sips/sip-015/sip-015-network-upgrade.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ to interact with exchanges that follow this convention.
973973

974974
```clarity
975975
(as-contract
976-
(stx-transfer? u50 'SP3X6QWWETNBZWGBK6DRGTR1KX50S74D3433WDGJY tx-sender 0x00)) ;; Returns (err u4)
976+
(stx-transfer-memo? u50 'SP3X6QWWETNBZWGBK6DRGTR1KX50S74D3433WDGJY tx-sender 0x00)) ;; Returns (err u4)
977977
(stx-transfer-memo? u60 tx-sender 'SP3X6QWWETNBZWGBK6DRGTR1KX50S74D3433WDGJY 0x010203) ;; Returns (ok true)
978978
```
979979

0 commit comments

Comments
 (0)