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:
Old | New | Differences | |
---|---|---|---|
31 | 31 | then if (isPaymentOk(i)) | |
32 | 32 | then { | |
33 | 33 | let hash = toBase16String(toBytes(url)) | |
34 | - | let | |
34 | + | let valuea = getStringValue(this, hash) | |
35 | 35 | let currentKey = toBase58String(i.caller.bytes) | |
36 | 36 | let wallet = currentKey | |
37 | - | ||
37 | + | throw(valuea) | |
38 | 38 | } | |
39 | 39 | else throw("Wrong payment amount or asset") | |
40 | 40 | else throw("wrong ext") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' | |
5 | 5 | ||
6 | 6 | let EXTENSIONS = ["gif", "GIF", "jpg", "JPG", "png", "PNG"] | |
7 | 7 | ||
8 | 8 | func isPaymentOk (i) = { | |
9 | 9 | let acceptableAssetId = PAYMENT_ASSET | |
10 | 10 | if ((size(i.payments) == 0)) | |
11 | 11 | then throw("Payment not attached") | |
12 | 12 | else { | |
13 | 13 | let p = i.payments[0] | |
14 | 14 | match p.assetId { | |
15 | 15 | case assetId: ByteVector => | |
16 | 16 | if ((assetId == acceptableAssetId)) | |
17 | 17 | then (p.amount == 10000000) | |
18 | 18 | else false | |
19 | 19 | case _ => | |
20 | 20 | throw("Wrong payment asset") | |
21 | 21 | } | |
22 | 22 | } | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(i) | |
27 | 27 | func nftMinter (url) = { | |
28 | 28 | let last = takeRight(url, 3) | |
29 | 29 | let isExists = containsElement(EXTENSIONS, last) | |
30 | 30 | if (isExists) | |
31 | 31 | then if (isPaymentOk(i)) | |
32 | 32 | then { | |
33 | 33 | let hash = toBase16String(toBytes(url)) | |
34 | - | let | |
34 | + | let valuea = getStringValue(this, hash) | |
35 | 35 | let currentKey = toBase58String(i.caller.bytes) | |
36 | 36 | let wallet = currentKey | |
37 | - | ||
37 | + | throw(valuea) | |
38 | 38 | } | |
39 | 39 | else throw("Wrong payment amount or asset") | |
40 | 40 | else throw("wrong ext") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 |
github/deemru/w8io/169f3d6 65.22 ms ◑