Skip to content

Commit ac3dbdb

Browse files
limemlohabizjak
andauthored
Add listing and single nft contract examples (#68)
* First version of listing and single nft contract examples * Update examples/cis1-single-nft/src/lib.rs Co-authored-by: Aleš Bizjak <[email protected]> * Update examples README with contracts listing-cis1 and cis1-single-nft Co-authored-by: Aleš Bizjak <[email protected]>
1 parent f272caf commit ac3dbdb

File tree

6 files changed

+637
-1
lines changed

6 files changed

+637
-1
lines changed

concordium-cis1/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub type Sha256 = [u8; 32];
5050
/// The location of the metadata and an optional hash of the content.
5151
// Note: For the serialization to be derived according to the CIS1
5252
// specification, the order of the fields cannot be changed.
53-
#[derive(Debug, Serialize, SchemaType)]
53+
#[derive(Debug, Serialize, SchemaType, Clone)]
5454
pub struct MetadataUrl {
5555
/// The URL following the specification RFC1738.
5656
#[concordium(size_length = 2)]

examples/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ The list of contracts is as follows
2323
containing NFTs.
2424
- [cis1-wccd](./cis1-wccd) An example implementation of the CIS-1 Concordium Token Standard
2525
containing a single fungible token which is a wrapped CCD.
26+
- [cis1-single-nft](./cis1-single-nft) An example implementation of the CIS-1 Concordium Token Standard
27+
specialized to contain a single non-fungible token per contract instance.
28+
- [listing-cis1](./listing-cis1) An example implementation of a contract for listing CIS-1 tokens. It is specialized only to work with the above NFT contract `cis1-single-nft`.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "cis1-single-nft"
3+
version = "0.1.0"
4+
authors = ["Concordium <[email protected]>"]
5+
edition = "2018"
6+
license = "MPL-2.0"
7+
8+
[features]
9+
default = ["std"]
10+
std = ["concordium-std/std", "concordium-cis1/std"]
11+
12+
[dependencies]
13+
concordium-std = {path = "../../concordium-std", default-features = false}
14+
concordium-cis1 = {path = "../../concordium-cis1", default-features = false}
15+
16+
[lib]
17+
crate-type=["cdylib", "rlib"]
18+
19+
[profile.release]
20+
codegen-units = 1
21+
opt-level = "s"

0 commit comments

Comments
 (0)