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:BgIZCAISBAoCCAgSBAoCCAESBAoCCAESAwoBCAYBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAtDT05GX0FNSU5fSwINQURNSU5fQUREUkVTUwAPQ09ORl9BUlRXT1JLU19LAg1BUlRXT1JLU19EQVBQAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQULQ09ORl9BTUlOX0sADGFydHdvcmtzRGFwcAkBDmdldFN0cmluZ0J5S2V5AQUPQ09ORl9BUlRXT1JLU19LBAZpbnZva2UBB3NldENvbmYCA2tleQN2YWwEBmNhbGxlcgkApQgBCAUGaW52b2tlBmNhbGxlcgMJAQ9jb250YWluc0VsZW1lbnQCCQDMCAIFBWNocmlzCQDMCAIJAKUIAQUEdGhpcwUDbmlsBQZjYWxsZXIJAMwIAgkBC1N0cmluZ0VudHJ5AgUDa2V5BQN2YWwFA25pbAkAAgECIllvdSBhcmUgb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YXJ0d29ya3NEYXBwBQNuaWwFBmNhbGxlcgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQdhZGRyZXNzAgtfZnJlZV9kcm9wcwkAZQIFBmFtb3VudAABBQNuaWwJAAIBAitZb3UgYXJlIG5vdCBhdXRob3JpemVkIHRvIHdoaXRlbGlzdCBhcnRpc3RzALSD8bk=", "height": 2409756, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6pGZUTAuz2kEP3p2o88RkFqMHtq8qVpCujCkFUWGwMLJ Next: H5PgdiwCkSLydxh4mDKhpNAiYxiXFLmwAQJae2kESam7 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringByKey (key) = valueOrElse(getString(this, key), "")
55
66
77 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
88
99
1010 let CONF_AMIN_K = "ADMIN_ADDRESS"
1111
1212 let CONF_ARTWORKS_K = "ARTWORKS_DAPP"
1313
1414 let chris = getStringByKey(CONF_AMIN_K)
1515
1616 let artworksDapp = getStringByKey(CONF_ARTWORKS_K)
1717
1818 @Callable(invoke)
1919 func setConf (key,val) = {
2020 let caller = toString(invoke.caller)
2121 if (containsElement([chris, toString(this)], caller))
2222 then [StringEntry(key, val)]
2323 else throw("You are not allowed to change this")
2424 }
2525
2626
2727
2828 @Callable(i)
2929 func whitelist (address,days) = {
3030 let caller = toString(addressFromPublicKey(i.callerPublicKey))
3131 let id = toBase58String(i.transactionId)
3232 let expire = if ((days == 0))
3333 then days
3434 else (height + (1440 * days))
3535 if (containsElement([chris], caller))
3636 then [IntegerEntry(address, expire)]
3737 else throw("You are not authorized to whitelist artists")
3838 }
3939
4040
4141
4242 @Callable(i)
4343 func whitelistFreeDrop (address,amount) = {
4444 let caller = toString(addressFromPublicKey(i.callerPublicKey))
4545 let id = toBase58String(i.transactionId)
4646 if (containsElement([chris], caller))
4747 then [IntegerEntry((address + "_free_drops"), amount)]
4848 else throw("You are not authorized to whitelist artists")
4949 }
5050
5151
5252
5353 @Callable(i)
5454 func useFreeDrop (address) = {
5555 let caller = toString(addressFromPublicKey(i.callerPublicKey))
5656 let amount = valueOrElse(getInteger(this, (address + "_free_drops")), 0)
5757 if ((0 >= amount))
5858 then throw("No free drop available")
5959 else {
6060 let id = toBase58String(i.transactionId)
6161 if (containsElement([chris, artworksDapp], caller))
6262 then [IntegerEntry((address + "_free_drops"), (amount - 1))]
6363 else throw("You are not authorized to whitelist artists")
6464 }
6565 }
6666
6767

github/deemru/w8io/169f3d6 
23.95 ms