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:'86bcfcfb215301a2d72702c989adbcfb03e446ec59f13c2a2e0ec5e0b5db3e9a' Name:entrypoint Type:string Value:'InitializePrivate' Name:metadata Type:string Value:'{"name":"Dirty Dero Daily #1 -- Why Hermes Hates Ethereum","image":"https://thumbs.odycdn.com/255bb8e21db8e2d2308beb2c209aa17f.jpg","description":"In this episode Apollo and Hermes discuss the May 9th 2022 crypto crash, hatred for ethereum, and of course love for dero.","video":"@apollo5ever:1/dirty_dero_daily_E01:5?r=HWkqSMMXFY8ojKTyy7N9xPX5gSa36B9d","attributes":{"release":1652181071,"guests":["Hermes"],"bigfoot":false,"deep voice":true,"music":false,"animated":false},"id":1}' Name:metadataFormat Type:string Value:'json'] |