Smart Contract Details
Open on Dero ExplorerInternal ID:
11843
Hash / Transaction:
Block:
Timestamp:
2023-01-20 00:03:51 UTC (2.7 years ago)
Creator:
LUXY
(+32 more)
(1385490)
Raw Data:
[{"name":"SC_ACTION","datatype":"U","value":1},{"name":"SC_CODE","datatype":"S","value":"Function InitializePrivate(collection String, metadataFormat String, metadata String) Uint64\r\n1 IF EXISTS(\"minter\") == 1 THEN GOTO 11\r\n2 STORE(\"minter\", SIGNER())\r\n3 STORE(\"type\", \"G45-NFT\")\r\n4 STORE(\"owner\", \"\")\r\n5 STORE(\"timestamp\", BLOCK_TIMESTAMP())\r\n6 SEND_ASSET_TO_ADDRESS(SIGNER(), 1, SCID())\r\n7 STORE(\"collection\", collection)\r\n8 STORE(\"metadataFormat\", metadataFormat)\r\n9 STORE(\"metadata\", metadata)\r\n10 RETURN 0\r\n11 RETURN 1\r\nEnd Function\r\n\r\nFunction DisplayNFT() Uint64\r\n1 IF ADDRESS_STRING(SIGNER()) == \"\" THEN GOTO 5\r\n2 IF ASSETVALUE(SCID()) != 1 THEN GOTO 5\r\n3 STORE(\"owner\", ADDRESS_STRING(SIGNER()))\r\n4 RETURN 0\r\n5 RETURN 1\r\nEnd Function\r\n\r\nFunction RetrieveNFT() Uint64\r\n1 IF LOAD(\"owner\") != ADDRESS_STRING(SIGNER()) THEN GOTO 5\r\n2 SEND_ASSET_TO_ADDRESS(SIGNER(), 1, SCID())\r\n3 STORE(\"owner\", \"\")\r\n4 RETURN 0\r\n5 RETURN 1\r\nEnd Function"},{"name":"collection","datatype":"S","value":"ec90b4365fff397d2cd3d6b023f37f6c4397d78d34f17617febf4ec8a7e920de"},{"name":"metadata","datatype":"S","value":"{\"attributes\":{\"Alchemical Potency\":\"5\",\"Arcanum\":\"The Major Arcana\",\"Card Number\":\"IX\",\"Rarity\":\"Mythic Rare\",\"Suit\":\"NONE\"},\"description\":\"Ruled by Virgo, which is also the sign of Lord Hanuman in the Vedas, you see a Monkey God/Monk levitating with a double halo. The Hermit may have at one point represented the act of isolating oneself in remote areas, but in the higher interpretation more applicable to today’s world, it means an isolation from external influences, or rather, the generic version of reality we all are given. This is a symbolic type of isolation that breeds nonreaction, and fosters the power of thinking for oneself, not being swayed by external sources. Seeing that, at this stage in our path, we’ve already realized so much, symbolized by the double illumination, we simply cannot integrate with others that well, even from within spiritual communities at times. The solitude deepens as we turn to the only satiating thing—that of our own pure presence and communion with Creator, resting in the bosom of our awareness.\",\"id\":9,\"image\":\"ipfs://QmYAuN78RkqrEsLSwtbswBToxnTxHbYXqT9ZXsYyx7pjFH/\",\"name\":\"The Hermit\"}"},{"name":"metadataFormat","datatype":"S","value":"json"}]
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