tx · F9NrXu4VauTXkaj3oC43Wci1jVZwGaoM2oiQepJkgQhD

3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb:  -0.00300000 Waves

2023.03.15 21:50 [2491519] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves

{ "type": 13, "id": "F9NrXu4VauTXkaj3oC43Wci1jVZwGaoM2oiQepJkgQhD", "fee": 300000, "feeAssetId": null, "timestamp": 1678906227776, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "K9qqfy3MQDoyR31vRUAGbUu2DBtLbHue5RSmAY6YX72uVfxWjDdDfntgSbkR9BCPJZ9pNcZoMvcQUgmCFLngddF" ], "script": "base64:BgIsCAISBAoCGBgSBAoCGBgSAwoBCBIDCgEIEgUKAwgICBIECgIICBIFCgMIGBgIAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1MCkCBQR0aGlzAgt0b3RhbEFtb3VudAAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwEMb25seUludGVybmFsAQZjYWxsZXIDCQAAAgUGY2FsbGVyBQR0aGlzBQR1bml0CQACAQIST25seSBpbnRlcm5hbCBjYWxsAQ10cmFuc2Zlck9yTm90AgJ0bwdhc3NldElkAwkAAAIFAnRvBQR0aGlzCQELU3RyaW5nR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cmFuc2ZlcgkAzAgCBQVhc3NldAkAzAgCBQh0cmFuc2ZlcgkAzAgCCQEMSW50ZWdlckVudHJ5AgILdG90YWxBbW91bnQFB3Rva2VuSWQJAMwIAgkBC1N0cmluZ0VudHJ5AgUEbmFtZQUIdG9rZW5VUkkFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQ90ZXN0U3RvcmFnZUpzb24DB2pzb25LZXkHYXJyS2V5cwlhcnJWYWx1ZXMEA3JlcwkA/AcEBQR0aGlzAhBtYWtlSlNPTkludGVybmFsCQDMCAIFB2FycktleXMJAMwIAgUJYXJyVmFsdWVzBQNuaWwFA25pbAMJAAACBQNyZXMFA3JlcwkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQIFB2pzb25LZXkKAAFABQNyZXMDCQABAgUBQAIGU3RyaW5nBQFACQACAQkArAICCQADAQUBQAIbIGNvdWxkbid0IGJlIGNhc3QgdG8gU3RyaW5nBQNuaWwFA3JlcwkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgBEDjPC", "height": 2491519, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4M1KzdxQvgMasE2qgtMcKNdw4ETXJEfirz4kXf8LVfAe Next: EELprxkvTDR2igkzDf4FJxbJnhpn3YPm1voU2cFGVrps 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 func setUser (assetId,user,expires) = throw()
2525
2626
2727 @Callable(i)
2828 func makeJSONInternal (arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
2929 let res = invoke(dAppJson, "makeJSON", [arrKeys, arrValues], nil)
3030 if ((res == res))
3131 then $Tuple2(nil, res)
3232 else throw("Strict value is not equal to itself.")
3333 })
3434
3535
3636
3737 @Callable(i)
3838 func addToJSONInternal (arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
3939 let res = invoke(dAppJson, "addToJSON", [arrKeys, arrValues], nil)
4040 if ((res == res))
4141 then $Tuple2(nil, res)
4242 else throw("Strict value is not equal to itself.")
4343 })
4444
4545
4646
4747 @Callable(i)
4848 func readByJSONKeyInternal (key) = valueOrElse(onlyInternal(i.caller), {
4949 let res = invoke(dAppJson, "readByJSONKey", [key], nil)
5050 if ((res == res))
5151 then $Tuple2(nil, res)
5252 else throw("Strict value is not equal to itself.")
5353 })
5454
5555
5656
5757 @Callable(i)
5858 func deleteByJSONKeyInternal (key) = valueOrElse(onlyInternal(i.caller), {
5959 let res = invoke(dAppJson, "deleteByJSONKey", [key], nil)
6060 if ((res == res))
6161 then $Tuple2(nil, res)
6262 else throw("Strict value is not equal to itself.")
6363 })
6464
6565
6666
6767 @Callable(i)
6868 func init (collectionName,symbol,description) = valueOrElse(onlyInternal(i.caller), [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)])
6969
7070
7171
7272 @Callable(i)
7373 func mint (to,tokenURI) = valueOrElse(onlyInternal(i.caller), {
7474 let tokenId = (totalAmount + 1)
7575 let preName = ((symbol + "#") + toString(tokenId))
7676 let name = if ((16 >= size(preName)))
7777 then preName
7878 else toString(tokenId)
7979 let asset = Issue(name, (("{uri:\"" + tokenURI) + "\"}"), 1, 0, false, unit, height)
8080 let assetId = calculateAssetId(asset)
8181 let toAddress = Address(fromBase58String(to))
8282 let transfer = transferOrNot(toAddress, assetId)
8383 if ((transfer == transfer))
8484 then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
8585 else throw("Strict value is not equal to itself.")
8686 })
8787
8888
8989
9090 @Callable(i)
9191 func testStorageJson (jsonKey,arrKeys,arrValues) = {
9292 let res = invoke(this, "makeJSONInternal", [arrKeys, arrValues], nil)
9393 if ((res == res))
9494 then $Tuple2([StringEntry(jsonKey, {
9595 let @ = res
9696 if ($isInstanceOf(@, "String"))
9797 then @
9898 else throw(($getType(@) + " couldn't be cast to String"))
9999 })], res)
100100 else throw("Strict value is not equal to itself.")
101101 }
102102
103103

github/deemru/w8io/169f3d6 
35.92 ms