SC CODE: Function InitializePrivate(collection String, metadataFormat String, metadata String) Uint64
1 IF EXISTS("minter") == 1 THEN GOTO 11
2 STORE("minter", SIGNER())
3 STORE("type", "G45-NFT")
4 STORE("owner", "")
5 STORE("timestamp", BLOCK_TIMESTAMP())
6 SEND_ASSET_TO_ADDRESS(SIGNER(), 1, SCID())
7 STORE("collection", collection)
8 STORE("metadataFormat", metadataFormat)
9 STORE("metadata", metadata)
10 RETURN 0
11 RETURN 1
End Function
Function DisplayNFT() Uint64
1 IF ADDRESS_STRING(SIGNER()) == "" THEN GOTO 5
2 IF ASSETVALUE(SCID()) != 1 THEN GOTO 5
3 STORE("owner", ADDRESS_STRING(SIGNER()))
4 RETURN 0
5 RETURN 1
End Function
Function RetrieveNFT() Uint64
1 IF LOAD("owner") != ADDRESS_STRING(SIGNER()) THEN GOTO 5
2 SEND_ASSET_TO_ADDRESS(SIGNER(), 1, SCID())
3 STORE("owner", "")
4 RETURN 0
5 RETURN 1
End Function |
SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'Function InitializePrivate(collection String, metadataFormat String, metadata String) Uint64
1 IF EXISTS("minter") == 1 THEN GOTO 11
2 STORE("minter", SIGNER())
3 STORE("type", "G45-NFT")
4 STORE("owner", "")
5 STORE("timestamp", BLOCK_TIMESTAMP())
6 SEND_ASSET_TO_ADDRESS(SIGNER(), 1, SCID())
7 STORE("collection", collection)
8 STORE("metadataFormat", metadataFormat)
9 STORE("metadata", metadata)
10 RETURN 0
11 RETURN 1
End Function
Function DisplayNFT() Uint64
1 IF ADDRESS_STRING(SIGNER()) == "" THEN GOTO 5
2 IF ASSETVALUE(SCID()) != 1 THEN GOTO 5
3 STORE("owner", ADDRESS_STRING(SIGNER()))
4 RETURN 0
5 RETURN 1
End Function
Function RetrieveNFT() Uint64
1 IF LOAD("owner") != ADDRESS_STRING(SIGNER()) THEN GOTO 5
2 SEND_ASSET_TO_ADDRESS(SIGNER(), 1, SCID())
3 STORE("owner", "")
4 RETURN 0
5 RETURN 1
End Function' Name:collection Type:string Value:'a5d8b56aad2e4ce2bf6feefe38e8743dde2f476569bfabcbf56b7573a6da9189' Name:metadata Type:string Value:'{"attributes":{"Background":"Dark Gradient","Description":"Behold, an exquisite addition to your digital art collection - a rare and unique white porcelain nesting doll, adorned with stunning blue flower designs. The intricate details and rich, painterly surfaces make this hyper-realistic rendering a true masterpiece. It stands out with its babycore aesthetic, making it a must-have for any art enthusiast. Don't miss your chance to own this one-of-a-kind piece, as it is sure to become a coveted treasure in any collection.Introducing the exquisite Nested Treasures NFT collection, featuring a series of one - of -a - kind digital art pieces inspired by the timeless beauty of the traditional Matryoshka doll.Each NFT in this collection showcases a unique interpretation of the matryoshka design,with different themes and intricate patterns, that truly bring this universally beloved symbol to life.With only a limited number of pieces available, the Nested Treasures collection is a rare and highly sought - after addition to any digital art collection.Don 't miss your chance to own a piece of this stunning art in form of a truly unique NFT.","Mood":"Serene and Elegant","Motifs":"Flower Designs","Object":"Porcelain Nesting Doll","Painting Style":"Painterly Surfaces","Resembles":"Blue and White China","Style":"Realistic Hyper-Detailed Rendering"},"id":7,"image":"ipfs://QmZWD1E2v7vswPQqtnzwocJLacjKjwVYWs2KJAShTsyQga/nested-treasures-7-sm.jpg","name":"Nested Treasures #7"}' Name:metadataFormat Type:string Value:'json'] |