Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: near-examples/nft-tutorial
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: ddd-marketplace/contracts-NEAR
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 6 files changed
  • 1 contributor

Commits on Feb 20, 2022

  1. feat: update metadata

    dellwatson committed Feb 20, 2022
    Copy the full SHA
    a4cd97f View commit details
Showing with 9 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +4 −3 nft-contract/src/lib.rs
  3. +3 −0 nft-contract/src/metadata.rs
  4. BIN out/main.wasm
  5. BIN out/market.wasm
  6. +1 −0 update_info
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
target
notes

/out
# testing
/coverage

7 changes: 4 additions & 3 deletions nft-contract/src/lib.rs
Original file line number Diff line number Diff line change
@@ -75,8 +75,8 @@ impl Contract {
owner_id,
NFTContractMetadata {
spec: "nft-1.0.0".to_string(),
name: "NFT Tutorial Contract".to_string(),
symbol: "GOTEAM".to_string(),
name: "DDD Marketplace Contract".to_string(),
symbol: "DDD".to_string(),
icon: None,
base_uri: None,
reference: None,
@@ -111,4 +111,5 @@ impl Contract {
//return the Contract object
this
}
}
}

3 changes: 3 additions & 0 deletions nft-contract/src/metadata.rs
Original file line number Diff line number Diff line change
@@ -27,6 +27,9 @@ pub struct TokenMetadata {
pub media: Option<String>, // URL to associated media, preferably to decentralized, content-addressed storage
pub media_hash: Option<Base64VecU8>, // Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included.
pub copies: Option<u64>, // number of copies of this set of metadata in existence when token was minted.
pub ori_creator: String,
pub model3d_url: String,
pub ipfs_meta: Option<String>,
pub issued_at: Option<u64>, // When token was issued or minted, Unix epoch in milliseconds
pub expires_at: Option<u64>, // When token expires, Unix epoch in milliseconds
pub starts_at: Option<u64>, // When token starts being valid, Unix epoch in milliseconds
Binary file modified out/main.wasm
Binary file not shown.
Binary file modified out/market.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions update_info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rustup target add wasm32-unknown-unknown