tx · Hc5NxFAYykVAm27kKY7w7DS2j7HxHbS1vmksieSEwRUH

3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb:  -0.00300000 Waves

2023.03.16 00:04 [2491655] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves

{ "type": 13, "id": "Hc5NxFAYykVAm27kKY7w7DS2j7HxHbS1vmksieSEwRUH", "fee": 300000, "feeAssetId": null, "timestamp": 1678914257839, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "2xuMPJc2u7SDJaKJzgZPAkGYp4p685tZJspLeTWfNJN2up7b2jyTcToiKKofvim92XNJ3PMJ73PjD83cgceB19J9" ], "script": "base64:BgI3CAISBAoCGBgSBAoCGBgSAwoBCBIDCgEIEgQKAggIEgUKAwgICBIDCgECEgUKAwgICBIECgIICAgADmNvbGxlY3Rpb25OYW1lCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAg5jb2xsZWN0aW9uTmFtZQAGc3ltYm9sCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAgZzeW1ib2wAC2Rlc2NyaXB0aW9uCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAgtkZXNjcmlwdGlvbgALdG90YWxBbW91bnQJARFAZXh0ck5hdGl2ZSgxMDUwKQIFBHRoaXMCC3RvdGFsQW1vdW50AAhkQXBwSnNvbgkBB0FkZHJlc3MBCQDZBAECIzNNckdhWlZSaGtuRUdmSEoxOXR0VVBObkRSb0ZxY0hoVk43AAx0b2tlblBheW1lbnQJAQdBZGRyZXNzAQkBEUBleHRyTmF0aXZlKDEwNTIpAgUEdGhpcwIMdG9rZW5QYXltZW50AQxvbmx5SW50ZXJuYWwBBmNhbGxlcgMJAAACBQZjYWxsZXIFBHRoaXMFBHVuaX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ZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAMC1zqE=", "height": 2491655, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CuwEoXYFkyPsDt3j2pBgkVsD9PUQQg6UF5p1bJW1UVuw Next: BsCrNyVKeMHgGDJcaeAF4GMprBkgQ72cvqucJ1g9ftAC Diff:
OldNewDifferences
1010 let totalAmount = getIntegerValue(this, "totalAmount")
1111
1212 let dAppJson = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7"))
13+
14+let tokenPayment = Address(getBinaryValue(this, "tokenPayment"))
1315
1416 func onlyInternal (caller) = if ((caller == this))
1517 then unit
8284
8385
8486 @Callable(i)
87+func setTokenPayment (assetId) = valueOrElse(onlyInternal(i.caller), [BinaryEntry("tokenPayment", assetId)])
88+
89+
90+
91+@Callable(i)
8592 func init (collectionName,symbol,description) = valueOrElse(onlyInternal(i.caller), [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)])
8693
8794
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"))
13+
14+let tokenPayment = Address(getBinaryValue(this, "tokenPayment"))
1315
1416 func onlyInternal (caller) = if ((caller == this))
1517 then unit
1618 else throw("Only internal call")
1719
1820
1921 func transferOrNot (to,assetId) = if ((to == this))
2022 then StringEntry("костыль", "костыль")
2123 else ScriptTransfer(to, 1, assetId)
2224
2325
2426 @Callable(i)
2527 func makeJSONInternal (arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
2628 let res = invoke(dAppJson, "makeJSON", [arrKeys, arrValues], nil)
2729 if ((res == res))
2830 then $Tuple2(nil, res)
2931 else throw("Strict value is not equal to itself.")
3032 })
3133
3234
3335
3436 @Callable(i)
3537 func addToJSONInternal (arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
3638 let res = invoke(dAppJson, "addToJSON", [arrKeys, arrValues], nil)
3739 if ((res == res))
3840 then $Tuple2(nil, res)
3941 else throw("Strict value is not equal to itself.")
4042 })
4143
4244
4345
4446 @Callable(i)
4547 func readByJSONKeyInternal (key) = valueOrElse(onlyInternal(i.caller), {
4648 let res = invoke(dAppJson, "readByJSONKey", [key], nil)
4749 if ((res == res))
4850 then $Tuple2(nil, res)
4951 else throw("Strict value is not equal to itself.")
5052 })
5153
5254
5355
5456 @Callable(i)
5557 func deleteByJSONKeyInternal (key) = valueOrElse(onlyInternal(i.caller), {
5658 let res = invoke(dAppJson, "deleteByJSONKey", [key], nil)
5759 if ((res == res))
5860 then $Tuple2(nil, res)
5961 else throw("Strict value is not equal to itself.")
6062 })
6163
6264
6365
6466 @Callable(i)
6567 func storageJsonInternal (jsonKey,jsonString) = valueOrElse(onlyInternal(i.caller), [StringEntry(jsonKey, jsonString)])
6668
6769
6870
6971 @Callable(i)
7072 func setUser (assetId,user,expires) = valueOrElse(onlyInternal(i.caller), {
7173 let res = invoke(dAppJson, "makeJSON", [["user", "expires"], [user, expires]], nil)
7274 if ((res == res))
7375 then $Tuple2([StringEntry(("userOf-" + assetId), {
7476 let @ = res
7577 if ($isInstanceOf(@, "String"))
7678 then @
7779 else throw(($getType(@) + " couldn't be cast to String"))
7880 })], res)
7981 else throw("Strict value is not equal to itself.")
8082 })
8183
8284
8385
8486 @Callable(i)
87+func setTokenPayment (assetId) = valueOrElse(onlyInternal(i.caller), [BinaryEntry("tokenPayment", assetId)])
88+
89+
90+
91+@Callable(i)
8592 func init (collectionName,symbol,description) = valueOrElse(onlyInternal(i.caller), [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)])
8693
8794
8895
8996 @Callable(i)
9097 func mint (to,tokenURI) = valueOrElse(onlyInternal(i.caller), {
9198 let tokenId = (totalAmount + 1)
9299 let preName = ((symbol + "#") + toString(tokenId))
93100 let name = if ((16 >= size(preName)))
94101 then preName
95102 else toString(tokenId)
96103 let asset = Issue(name, (("{uri:\"" + tokenURI) + "\"}"), 1, 0, false, unit, height)
97104 let assetId = calculateAssetId(asset)
98105 let toAddress = Address(fromBase58String(to))
99106 let transfer = transferOrNot(toAddress, assetId)
100107 if ((transfer == transfer))
101108 then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
102109 else throw("Strict value is not equal to itself.")
103110 })
104111
105112

github/deemru/w8io/026f985 
25.21 ms