tx · EF5UUj83ozzbkpEC4TLHZEstiRbUdwnCY2PJ49WV6JeV 3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k: -0.01000000 Waves 2023.01.18 05:08 [2409756] smart account 3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k > SELF 0.00000000 Waves
{ "type": 13, "id": "EF5UUj83ozzbkpEC4TLHZEstiRbUdwnCY2PJ49WV6JeV", "fee": 1000000, "feeAssetId": null, "timestamp": 1674007706817, "version": 2, "chainId": 84, "sender": "3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k", "senderPublicKey": "3VyXNqJY8HwfqLo6TUZ1V4BwE6NMZuq9XYEARYhktMPE", "proofs": [ "35TJ2aQMWoBUk1RQFqwFwALUVuWjPeCq8g5jvjoMHMdtetTJK2cDbQq4QAfceYuzqhrnf5GeLpksjagJXZUpNga2" ], "script": "base64:BgIZCAISBAoCCAgSBAoCCAESBAoCCAESAwoBCAYBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAtDT05GX0FNSU5fSwINQURNSU5fQUREUkVTUwAPQ09ORl9BUlRXT1JLU19LAg1BUlRXT1JLU19EQVBQAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQULQ09ORl9BTUlOX0sADGFydHdvcmtzRGFwcAkBDmdldFN0cmluZ0J5S2V5AQUPQ09ORl9BUlRXT1JLU19LBAZpbnZva2UBB3NldENvbmYCA2tleQN2YWwEBmNhbGxlcgkApQgBCAUGaW52b2tlBmNhbGxlcgMJAQ9jb250YWluc0VsZW1lbnQCCQDMCAIFBWNocmlzCQDMCAIJAKUIAQUEdGhpcwUDbmlsBQZjYWxsZXIJAMwIAgkBC1N0cmluZ0VudHJ5AgUDa2V5BQN2YWwFA25pbAkAAgECIllvdSBhcmUgbm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XJ0d29ya3NEYXBwBQNuaWwFBmNhbGxlcgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQdhZGRyZXNzAgtfZnJlZV9kcm9wcwkAZQIFBmFtb3VudAABBQNuaWwJAAIBAitZb3UgYXJlIG5vdCBhdXRob3JpemVkIHRvIHdoaXRlbGlzdCBhcnRpc3RzALSD8bk=", "height": 2409756, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6pGZUTAuz2kEP3p2o88RkFqMHtq8qVpCujCkFUWGwMLJ Next: H5PgdiwCkSLydxh4mDKhpNAiYxiXFLmwAQJae2kESam7 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | let CONF_AMIN_K = "ADMIN_ADDRESS" | |
11 | 11 | ||
12 | 12 | let CONF_ARTWORKS_K = "ARTWORKS_DAPP" | |
13 | 13 | ||
14 | 14 | let chris = getStringByKey(CONF_AMIN_K) | |
15 | 15 | ||
16 | 16 | let artworksDapp = getStringByKey(CONF_ARTWORKS_K) | |
17 | 17 | ||
18 | 18 | @Callable(invoke) | |
19 | 19 | func setConf (key,val) = { | |
20 | 20 | let caller = toString(invoke.caller) | |
21 | 21 | if (containsElement([chris, toString(this)], caller)) | |
22 | 22 | then [StringEntry(key, val)] | |
23 | 23 | else throw("You are not allowed to change this") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func whitelist (address,days) = { | |
30 | 30 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
31 | 31 | let id = toBase58String(i.transactionId) | |
32 | 32 | let expire = if ((days == 0)) | |
33 | 33 | then days | |
34 | 34 | else (height + (1440 * days)) | |
35 | 35 | if (containsElement([chris], caller)) | |
36 | 36 | then [IntegerEntry(address, expire)] | |
37 | 37 | else throw("You are not authorized to whitelist artists") | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | @Callable(i) | |
43 | 43 | func whitelistFreeDrop (address,amount) = { | |
44 | 44 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
45 | 45 | let id = toBase58String(i.transactionId) | |
46 | 46 | if (containsElement([chris], caller)) | |
47 | 47 | then [IntegerEntry((address + "_free_drops"), amount)] | |
48 | 48 | else throw("You are not authorized to whitelist artists") | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | ||
53 | 53 | @Callable(i) | |
54 | 54 | func useFreeDrop (address) = { | |
55 | 55 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
56 | 56 | let amount = valueOrElse(getInteger(this, (address + "_free_drops")), 0) | |
57 | 57 | if ((0 >= amount)) | |
58 | 58 | then throw("No free drop available") | |
59 | 59 | else { | |
60 | 60 | let id = toBase58String(i.transactionId) | |
61 | 61 | if (containsElement([chris, artworksDapp], caller)) | |
62 | 62 | then [IntegerEntry((address + "_free_drops"), (amount - 1))] | |
63 | 63 | else throw("You are not authorized to whitelist artists") | |
64 | 64 | } | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 |
github/deemru/w8io/169f3d6 23.95 ms ◑