tx · CuwEoXYFkyPsDt3j2pBgkVsD9PUQQg6UF5p1bJW1UVuw

3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb:  -0.00300000 Waves

2023.03.15 23:51 [2491642] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves

{ "type": 13, "id": "CuwEoXYFkyPsDt3j2pBgkVsD9PUQQg6UF5p1bJW1UVuw", "fee": 300000, "feeAssetId": null, "timestamp": 1678913527143, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "5cTUNGsriBm9TuJU3kxUrkC1iiR27tygEUSmT7nNDVL5u7NjpP15TBJcfUtvbNYKHsEh2iPeCWS3K8qBjYqvMJBv" ], "script": "base64:BgIyCAISBAoCGBgSBAoCGBgSAwoBCBIDCgEIEgQKAggIEgUKAwgICBIFCgMICAgSBAoCCAgHAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1MCkCBQR0aGlzAgt0b3RhbEFtb3VudAAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwEMb25seUludGVybmFsAQZjYWxsZXIDCQAAAgUGY2FsbGVyBQR0aGlzBQR1bml0CQACAQIST25seSBpbnRlcm5hbCBjYWxsAQ10cmFuc2Zlck9yTm90AgJ0bwdhc3NldElkAwkAAAIFAnRvBQR0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nN5bWJvbAUGc3ltYm9sCQDMCAIJAQtTdHJpbmdFbnRyeQICC2Rlc2NyaXB0aW9uBQtkZXNjcmlwdGlvbgkAzAgCCQEMSW50ZWdlckVudHJ5AgILdG90YWxBbW91bnQAAAUDbmlsAWkBBG1pbnQCAnRvCHRva2VuVVJJCQELdmFsdWVPckVsc2UCCQEMb25seUludGVybmFsAQgFAWkGY2FsbGVyBAd0b2tlbklkCQBkAgULdG90YWxBbW91bnQAAQQHcHJlTmFtZQkArAICCQCsAgIFBnN5bWJvbAIBIwkApAMBBQd0b2tlbklkBARuYW1lAwkAZwIAEAkAsQIBBQdwcmVOYW1lBQdwcmVOYW1lCQCkAwEFB3Rva2VuSWQEBWFzc2V0CQDDCAcFBG5hbWUJAKwCAgkArAICAgZ7dXJpOiIFCHRva2VuVVJJAgIifQABAAAHBQR1bml0BQZoZWlnaHQEB2Fzc2V0SWQJALgIAQUFYXNzZXQECXRvQWRkcmVzcwkBB0FkZHJlc3MBCQDZBAEFAnRvBAh0cmFuc2ZlcgkBDXRyYW5zZmVyT3JOb3QCBQl0b0FkZHJlc3MFB2Fzc2V0SWQDCQAAAgUIdHJhbnNmZXIFCHRyYW5zZmVyCQDMCAIFBWFzc2V0CQDMCAIFCHRyYW5zZmVyCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgt0b3RhbEFtb3VudAUHdG9rZW5JZAkAzAgCCQELU3RyaW5nRW50cnkCBQRuYW1lBQh0b2tlblVSSQUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAHfEZq4=", "height": 2491642, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hu5BDFzVeuV3Ao1d9aFR5XQDZ3RoeAjx44484KfFBRr7 Next: Hc5NxFAYykVAm27kKY7w7DS2j7HxHbS1vmksieSEwRUH Diff:
OldNewDifferences
7070 func setUser (assetId,user,expires) = valueOrElse(onlyInternal(i.caller), {
7171 let res = invoke(dAppJson, "makeJSON", [["user", "expires"], [user, expires]], nil)
7272 if ((res == res))
73- then $Tuple2([StringEntry(("userOf-" + toUtf8String(assetId)), {
73+ then $Tuple2([StringEntry(("userOf-" + assetId), {
7474 let @ = res
7575 if ($isInstanceOf(@, "String"))
7676 then @
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let collectionName = getStringValue(this, "collectionName")
55
66 let symbol = getStringValue(this, "symbol")
77
88 let description = getStringValue(this, "description")
99
1010 let totalAmount = getIntegerValue(this, "totalAmount")
1111
1212 let dAppJson = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7"))
1313
1414 func onlyInternal (caller) = if ((caller == this))
1515 then unit
1616 else throw("Only internal call")
1717
1818
1919 func transferOrNot (to,assetId) = if ((to == this))
2020 then StringEntry("костыль", "костыль")
2121 else ScriptTransfer(to, 1, assetId)
2222
2323
2424 @Callable(i)
2525 func makeJSONInternal (arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
2626 let res = invoke(dAppJson, "makeJSON", [arrKeys, arrValues], nil)
2727 if ((res == res))
2828 then $Tuple2(nil, res)
2929 else throw("Strict value is not equal to itself.")
3030 })
3131
3232
3333
3434 @Callable(i)
3535 func addToJSONInternal (arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
3636 let res = invoke(dAppJson, "addToJSON", [arrKeys, arrValues], nil)
3737 if ((res == res))
3838 then $Tuple2(nil, res)
3939 else throw("Strict value is not equal to itself.")
4040 })
4141
4242
4343
4444 @Callable(i)
4545 func readByJSONKeyInternal (key) = valueOrElse(onlyInternal(i.caller), {
4646 let res = invoke(dAppJson, "readByJSONKey", [key], nil)
4747 if ((res == res))
4848 then $Tuple2(nil, res)
4949 else throw("Strict value is not equal to itself.")
5050 })
5151
5252
5353
5454 @Callable(i)
5555 func deleteByJSONKeyInternal (key) = valueOrElse(onlyInternal(i.caller), {
5656 let res = invoke(dAppJson, "deleteByJSONKey", [key], nil)
5757 if ((res == res))
5858 then $Tuple2(nil, res)
5959 else throw("Strict value is not equal to itself.")
6060 })
6161
6262
6363
6464 @Callable(i)
6565 func storageJsonInternal (jsonKey,jsonString) = valueOrElse(onlyInternal(i.caller), [StringEntry(jsonKey, jsonString)])
6666
6767
6868
6969 @Callable(i)
7070 func setUser (assetId,user,expires) = valueOrElse(onlyInternal(i.caller), {
7171 let res = invoke(dAppJson, "makeJSON", [["user", "expires"], [user, expires]], nil)
7272 if ((res == res))
73- then $Tuple2([StringEntry(("userOf-" + toUtf8String(assetId)), {
73+ then $Tuple2([StringEntry(("userOf-" + assetId), {
7474 let @ = res
7575 if ($isInstanceOf(@, "String"))
7676 then @
7777 else throw(($getType(@) + " couldn't be cast to String"))
7878 })], res)
7979 else throw("Strict value is not equal to itself.")
8080 })
8181
8282
8383
8484 @Callable(i)
8585 func init (collectionName,symbol,description) = valueOrElse(onlyInternal(i.caller), [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)])
8686
8787
8888
8989 @Callable(i)
9090 func mint (to,tokenURI) = valueOrElse(onlyInternal(i.caller), {
9191 let tokenId = (totalAmount + 1)
9292 let preName = ((symbol + "#") + toString(tokenId))
9393 let name = if ((16 >= size(preName)))
9494 then preName
9595 else toString(tokenId)
9696 let asset = Issue(name, (("{uri:\"" + tokenURI) + "\"}"), 1, 0, false, unit, height)
9797 let assetId = calculateAssetId(asset)
9898 let toAddress = Address(fromBase58String(to))
9999 let transfer = transferOrNot(toAddress, assetId)
100100 if ((transfer == transfer))
101101 then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
102102 else throw("Strict value is not equal to itself.")
103103 })
104104
105105

github/deemru/w8io/026f985 
30.07 ms