tx · 6pGZUTAuz2kEP3p2o88RkFqMHtq8qVpCujCkFUWGwMLJ 3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k: -0.01000000 Waves 2023.01.13 09:22 [2402806] smart account 3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k > SELF 0.00000000 Waves
{ "type": 13, "id": "6pGZUTAuz2kEP3p2o88RkFqMHtq8qVpCujCkFUWGwMLJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1673590986166, "version": 2, "chainId": 84, "sender": "3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k", "senderPublicKey": "3VyXNqJY8HwfqLo6TUZ1V4BwE6NMZuq9XYEARYhktMPE", "proofs": [ "3o7tmx2Y3QL72242dqQc7PELpa4WUDzn4M52dBUdSRtMGtq5YGd8mA175ia3MtqSjJUmkdhsiiAAqwgBmeYUskuS" ], "script": "base64:BgIZCAISBAoCCAgSBAoCCAESBAoCCAESAwoBCAYBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAtDT05GX0FNSU5fSwINQURNSU5fQUREUkVTUwAPQ09ORl9BUlRXT1JLU19LAg1BUlRXT1JLU19EQVBQAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQULQ09ORl9BTUlOX0sADGFydHdvcmtzRGFwcAkBDmdldFN0cmluZ0J5S2V5AQUPQ09ORl9BUlRXT1JLU19LBAZpbnZva2UBB3NldENvbmYCA2tleQN2YWwEBmNhbGxlcgkApQgBCAUGaW52b2tlBmNhbGxlcgMJAQ9jb250YWluc0VsZW1lbnQCCQDMCAIFBWNocmlzCQDMCAIJAKUIAQUEdGhpcwUDbmlsBQZjYWxsZXIJAMwIAgkBC1N0cmluZ0VudHJ5AgUDa2V5BQN2YWwFA25pbAkAAgECIllvdSBhcmUg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MYXJ0d29ya3NEYXBwBQNuaWwFBmNhbGxlcgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQdhZGRyZXNzAgtfZnJlZV9kcm9wcwkAZQIFBmFtb3VudAABBQNuaWwJAAIBAitZb3UgYXJlIG5vdCBhdXRob3JpemVkIHRvIHdoaXRlbGlzdCBhcnRpc3RzALSD8bk=", "height": 2402806, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ADN2rsdDTYnv8EzGsukVpwNfhzUicweaZn44QQdvMDQ3 Next: EF5UUj83ozzbkpEC4TLHZEstiRbUdwnCY2PJ49WV6JeV Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | ||
4 | + | func a (b) = valueOrElse(getString(this, b), "") | |
5 | 5 | ||
6 | - | let b = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
7 | 6 | ||
8 | - | @Callable(c) | |
9 | - | func whitelist (d,e) = { | |
10 | - | let f = toString(addressFromPublicKey(c.callerPublicKey)) | |
11 | - | let g = toBase58String(c.transactionId) | |
12 | - | let h = if ((e == 0)) | |
13 | - | then e | |
14 | - | else (height + (1440 * e)) | |
15 | - | if (containsElement([a, b], f)) | |
16 | - | then [IntegerEntry(d, h)] | |
7 | + | func c (b) = valueOrElse(getInteger(this, b), 0) | |
8 | + | ||
9 | + | ||
10 | + | let d = "ADMIN_ADDRESS" | |
11 | + | ||
12 | + | let e = "ARTWORKS_DAPP" | |
13 | + | ||
14 | + | let f = a(d) | |
15 | + | ||
16 | + | let g = a(e) | |
17 | + | ||
18 | + | @Callable(h) | |
19 | + | func setConf (b,i) = { | |
20 | + | let j = toString(h.caller) | |
21 | + | if (containsElement([f, toString(this)], j)) | |
22 | + | then [StringEntry(b, i)] | |
23 | + | else throw("You are not allowed to change this") | |
24 | + | } | |
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | @Callable(k) | |
29 | + | func whitelist (l,m) = { | |
30 | + | let j = toString(addressFromPublicKey(k.callerPublicKey)) | |
31 | + | let n = toBase58String(k.transactionId) | |
32 | + | let o = if ((m == 0)) | |
33 | + | then m | |
34 | + | else (height + (1440 * m)) | |
35 | + | if (containsElement([f], j)) | |
36 | + | then [IntegerEntry(l, o)] | |
17 | 37 | else throw("You are not authorized to whitelist artists") | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | @Callable(k) | |
43 | + | func whitelistFreeDrop (l,p) = { | |
44 | + | let j = toString(addressFromPublicKey(k.callerPublicKey)) | |
45 | + | let n = toBase58String(k.transactionId) | |
46 | + | if (containsElement([f], j)) | |
47 | + | then [IntegerEntry((l + "_free_drops"), p)] | |
48 | + | else throw("You are not authorized to whitelist artists") | |
49 | + | } | |
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | @Callable(k) | |
54 | + | func useFreeDrop (l) = { | |
55 | + | let j = toString(addressFromPublicKey(k.callerPublicKey)) | |
56 | + | let p = valueOrElse(getInteger(this, (l + "_free_drops")), 0) | |
57 | + | if ((0 >= p)) | |
58 | + | then throw("No free drop available") | |
59 | + | else { | |
60 | + | let n = toBase58String(k.transactionId) | |
61 | + | if (containsElement([f, g], j)) | |
62 | + | then [IntegerEntry((l + "_free_drops"), (p - 1))] | |
63 | + | else throw("You are not authorized to whitelist artists") | |
64 | + | } | |
18 | 65 | } | |
19 | 66 | ||
20 | 67 |
github/deemru/w8io/169f3d6 34.66 ms ◑