tx · FCmDoaxe2X3rEjUgCsfGCZgqHm83KNQzTNtREgAQGs7h

3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn:  -0.00200000 Waves

2023.03.20 19:42 [2498585] smart account 3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn > SELF 0.00000000 Waves

{ "type": 13, "id": "FCmDoaxe2X3rEjUgCsfGCZgqHm83KNQzTNtREgAQGs7h", "fee": 200000, "feeAssetId": null, "timestamp": 1679330669668, "version": 2, "chainId": 84, "sender": "3MxVYj6ScMArhAamy7nB6b342kh1Pso1LTn", "senderPublicKey": "CZeucjRLCKrkiP9zuj9KbLe23Wv9DywFzHBqNDnte51B", "proofs": [ "3jsAer5h8FuinAwdbiA7WjyhSWKFTkhDLCLWr98C3fSuE4b5nAnV1C3ekJvEryeKYTrTTxhUZqHybTdxjTgcqvxN" ], "script": "base64:BgIbCAISBAoCCAgSBAoCCAESBgoECAgICBIDCgEICAAOY29sbGVjdGlvbk5hbWUJARFAZXh0ck5hdGl2ZSgxMDU4KQECDmNvbGxlY3Rpb25OYW1lAAZzeW1ib2wJARFAZXh0ck5hdGl2ZSgxMDU4KQECBnN5bWJvbAALZGVzY3JpcHRpb24JARFAZXh0ck5hdGl2ZSgxMDU4KQECC2Rlc2NyaXB0aW9uAAt0b3RhbEFtb3VudAkBEUBleHRyTmF0aXZlKDEwNTUpAQILdG90YWxBbW91bnQAB2Jhc2VVUkkJARFAZXh0ck5hdGl2ZSgxMDU4KQECB2Jhc2VVUkkACGRBcHBKc29uCQEHQWRkcmVzcwEJANkEAQIjM01yR2FaVlJoa25FR2ZISjE5dHRVUE5uRFJvRnFjSGhWTjcBDG9ubHlJbnRlcm5hbAEGY2FsbGVyAwkAAAIFBmNhbGxlcgUEdGhpcwUEdW5pdAkAAgECEk9ubHkgaW50ZXJuYWwgY2FsbAENdHJhbnNmZXJPck5vdAICdG8HYXNzZXRJZAMJAAACBQJ0bwUEdGhpcwkBC1N0cmluZ0VudHJ5AgIEc210aAIE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ACQACAQkArAICCQADAQUBQAIbIGNvdWxkbid0IGJlIGNhc3QgdG8gU3RyaW5nBAVhc3NldAkAwwgHBQRuYW1lBQRqc29uAAEAAAcFBHVuaXQFBmhlaWdodAQHYXNzZXRJZAkAuAgBBQVhc3NldAQJdG9BZGRyZXNzCQEHQWRkcmVzcwEJANkEAQUCdG8ECHRyYW5zZmVyCQENdHJhbnNmZXJPck5vdAIFCXRvQWRkcmVzcwUHYXNzZXRJZAMJAAACBQh0cmFuc2ZlcgUIdHJhbnNmZXIJAMwIAgUFYXNzZXQJAMwIAgUIdHJhbnNmZXIJAMwIAgkBDEludGVnZXJFbnRyeQICC3RvdGFsQW1vdW50BQd0b2tlbklkCQDMCAIJAQtTdHJpbmdFbnRyeQIFBG5hbWUFCHRva2VuVVJJBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4A4M6/NA==", "height": 2498585, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GHwgUu4v4ZLnHSZAiErCHDGnyFugohjo6EfANK7GtBoz Next: H8akVuHfi4XQ5XvFgdeHRis2VKD8dguz3DCCfWMizo5S Diff:
OldNewDifferences
3939
4040
4141 @Callable(i)
42-func mint (to,tokenURI) = {
42+func mint (to) = {
4343 let tokenId = (totalAmount + 1)
44- let preName = ((symbol + "#") + toString(tokenId))
44+ let tokenIdString = toString(tokenId)
45+ let preName = ((symbol + "#") + tokenIdString)
4546 let name = if ((16 >= size(preName)))
4647 then preName
47- else toString(tokenId)
48+ else tokenIdString
49+ let tokenURI = (baseURI + tokenIdString)
4850 let json = {
4951 let @ = invoke(dAppJson, "makeJSON", [["tokenURI"], [tokenURI]], nil)
5052 if ($isInstanceOf(@, "String"))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let collectionName = getStringValue("collectionName")
55
66 let symbol = getStringValue("symbol")
77
88 let description = getStringValue("description")
99
1010 let totalAmount = getIntegerValue("totalAmount")
1111
1212 let baseURI = getStringValue("baseURI")
1313
1414 let dAppJson = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7"))
1515
1616 func onlyInternal (caller) = if ((caller == this))
1717 then unit
1818 else throw("Only internal call")
1919
2020
2121 func transferOrNot (to,assetId) = if ((to == this))
2222 then StringEntry("smth", "smth")
2323 else ScriptTransfer(to, 1, assetId)
2424
2525
2626 @Callable(i)
2727 func setString (_key,_value) = [StringEntry(_key, _value)]
2828
2929
3030
3131 @Callable(i)
3232 func setInt (_key,_value) = [IntegerEntry(_key, _value)]
3333
3434
3535
3636 @Callable(i)
3737 func init (_collectionName,_symbol,_description,_baseURI) = valueOrElse(onlyInternal(i.caller), [StringEntry("collectionName", _collectionName), StringEntry("symbol", _symbol), StringEntry("description", _description), IntegerEntry("totalAmount", 0), StringEntry("baseURI", _baseURI)])
3838
3939
4040
4141 @Callable(i)
42-func mint (to,tokenURI) = {
42+func mint (to) = {
4343 let tokenId = (totalAmount + 1)
44- let preName = ((symbol + "#") + toString(tokenId))
44+ let tokenIdString = toString(tokenId)
45+ let preName = ((symbol + "#") + tokenIdString)
4546 let name = if ((16 >= size(preName)))
4647 then preName
47- else toString(tokenId)
48+ else tokenIdString
49+ let tokenURI = (baseURI + tokenIdString)
4850 let json = {
4951 let @ = invoke(dAppJson, "makeJSON", [["tokenURI"], [tokenURI]], nil)
5052 if ($isInstanceOf(@, "String"))
5153 then @
5254 else throw(($getType(@) + " couldn't be cast to String"))
5355 }
5456 let asset = Issue(name, json, 1, 0, false, unit, height)
5557 let assetId = calculateAssetId(asset)
5658 let toAddress = Address(fromBase58String(to))
5759 let transfer = transferOrNot(toAddress, assetId)
5860 if ((transfer == transfer))
5961 then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
6062 else throw("Strict value is not equal to itself.")
6163 }
6264
6365

github/deemru/w8io/026f985 
27.58 ms