tx · DkEDgDE7qbaLNRibDcanEPty1P9RwfwGggifPP8paE8W

3NAbyG5uiek2BiiY8Wx5reyjn7DKGaSuyD2:  -0.01000000 Waves

2022.05.08 14:17 [2042630] smart account 3NAbyG5uiek2BiiY8Wx5reyjn7DKGaSuyD2 > SELF 0.00000000 Waves

{ "type": 13, "id": "DkEDgDE7qbaLNRibDcanEPty1P9RwfwGggifPP8paE8W", "fee": 1000000, "feeAssetId": null, "timestamp": 1652008699695, "version": 2, "chainId": 84, "sender": "3NAbyG5uiek2BiiY8Wx5reyjn7DKGaSuyD2", "senderPublicKey": "8wiW9F8GK5sx7hz2Vcg6HvXdGV89Xoxfkq2FefA6wbnN", "proofs": [ "2w9hsYhuGUp4CpWj5MeudALVx38KEvjGW8RjW5RswzmMZwXvby5vG4pnLCwEEBPsbPv4Y3DcoN1q6VBXvzVeCdYg" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQAAAAACkVYVEVOU0lPTlMJAARMAAAAAgIAAAADZ2lmCQAETAAAAAICAAAAA0dJRgkABEwAAAACAgAAAANqcGcJAARMAAAAAgIAAAADSlBHCQAETAAAAAICAAAAA3BuZwkABEwAAAACAgAAAANQTkcFAAAAA25pbAEAAAALaXNQYXltZW50T2sAAAABAAAAAWkEAAAAEWFjY2VwdGFibGVBc3NldElkBQAAAA1QQVlNRU5UX0FTU0VUAwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFFBheW1lbnQgbm90IGF0dGFjaGVkBAAAAAFwCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAckbWF0Y2gwCAUAAAABcAAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAdhc3NldElkBQAAAAckbWF0Y2gwAwkAAAAAAAACBQAAAAdhc3NldElkBQAAABFhY2NlcHRhYmxlQXNzZXRJZAkAAAAAAAACCAUAAAABcAAAAAZhbW91bnQAAAAAAACYloAHCQAAAgAAAAECAAAAE1dyb25nIHBheW1lbnQgYXNzZXQAAAABAAAAAWkBAAAACW5mdE1pbnRlcgAAAAEAAAADdXJsBAAAAARsYXN0CQEAAAAJdGFrZVJpZ2h0AAAAAgUAAAADdXJsAAAAAAAAAAADBAAAAAhpc0V4aXN0cwkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIFAAAACkVYVEVOU0lPTlMFAAAABGxhc3QDBQAAAAhpc0V4aXN0cwMJAQAAAAtpc1BheW1lbnRPawAAAAEFAAAAAWkEAAAABGhhc2gJAAJcAAAAAQkAAZsAAAABBQAAAAN1cmwEAAAABnZhbHVlYQkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwUAAAAEaGFzaAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAZ3YWxsZXQFAAAACmN1cnJlbnRLZXkJAAACAAAAAQUAAAAGdmFsdWVhCQAAAgAAAAECAAAAHVdyb25nIHBheW1lbnQgYW1vdW50IG9yIGFzc2V0CQAAAgAAAAECAAAACXdyb25nIGV4dAAAAAAX2+Ls", "height": 2042630, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ErKDevMHqmsXimL1DnrcinKodQPBs1vvHicNgJQe7LTn Next: E122sYB8H213FV94hvS6BcvEtpUEatUTDjSZdzs7Th33 Diff:
OldNewDifferences
3131 then if (isPaymentOk(i))
3232 then {
3333 let hash = toBase16String(toBytes(url))
34- let isValueExists = getStringValue(this, hash)
34+ let valuea = getStringValue(this, hash)
3535 let currentKey = toBase58String(i.caller.bytes)
3636 let wallet = currentKey
37-[StringEntry(((wallet + "_") + toString(height)), hash)]
37+ throw(valuea)
3838 }
3939 else throw("Wrong payment amount or asset")
4040 else throw("wrong ext")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 let EXTENSIONS = ["gif", "GIF", "jpg", "JPG", "png", "PNG"]
77
88 func isPaymentOk (i) = {
99 let acceptableAssetId = PAYMENT_ASSET
1010 if ((size(i.payments) == 0))
1111 then throw("Payment not attached")
1212 else {
1313 let p = i.payments[0]
1414 match p.assetId {
1515 case assetId: ByteVector =>
1616 if ((assetId == acceptableAssetId))
1717 then (p.amount == 10000000)
1818 else false
1919 case _ =>
2020 throw("Wrong payment asset")
2121 }
2222 }
2323 }
2424
2525
2626 @Callable(i)
2727 func nftMinter (url) = {
2828 let last = takeRight(url, 3)
2929 let isExists = containsElement(EXTENSIONS, last)
3030 if (isExists)
3131 then if (isPaymentOk(i))
3232 then {
3333 let hash = toBase16String(toBytes(url))
34- let isValueExists = getStringValue(this, hash)
34+ let valuea = getStringValue(this, hash)
3535 let currentKey = toBase58String(i.caller.bytes)
3636 let wallet = currentKey
37-[StringEntry(((wallet + "_") + toString(height)), hash)]
37+ throw(valuea)
3838 }
3939 else throw("Wrong payment amount or asset")
4040 else throw("wrong ext")
4141 }
4242
4343

github/deemru/w8io/169f3d6 
65.22 ms