tx · 6JmtJTPuNg22kLToY3wV6bhsrBdMc5iqeYdqbBwwrpd7

3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k:  -0.01000000 Waves

2023.01.24 09:14 [2418671] smart account 3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k > SELF 0.00000000 Waves

{ "type": 13, "id": "6JmtJTPuNg22kLToY3wV6bhsrBdMc5iqeYdqbBwwrpd7", "fee": 1000000, "feeAssetId": null, "timestamp": 1674540871279, "version": 2, "chainId": 84, "sender": "3Mt6jj1WUYqd7DT7dHEubs9jETLUXMcAB8k", "senderPublicKey": "3VyXNqJY8HwfqLo6TUZ1V4BwE6NMZuq9XYEARYhktMPE", "proofs": [ "g5pbnxBYLtNnm38DiVbzGz7dsWdibnwcZogtJwaSvyQwzy2Wh12PetF1jBE4tD1SSgj9e8fmDQKSDyCYypB8E87" ], "script": "base64:BgIrCAISBAoCCAgSBAoCCAESBQoDCAEEEgMKAQgSBQoDCAEEEgMKAQgSAwoBCAgBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAtDT05GX0FNSU5fSwINQURNSU5fQUREUkVTUwAPQ09ORl9BUlRXT1JLU19LAg1BUlRXT1JLU19EQVBQAAxDT05GX1VTRVJTX0sCClVTRVJTX0RBUFAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBBQtDT05GX0FNSU5fSwAMYXJ0d29ya3NEYXBwCQEOZ2V0U3RyaW5nQnlLZXkBBQ9DT05GX0FSVFdPUktTX0sACXVzZXJzRGFwcAkBDmdldFN0cmluZ0J5S2V5AQUMQ09ORl9VU0VSU19LBwZpbnZva2UBB3NldENvbmYCA2tleQN2YWwEBmNhbGxlcgkApQgBCAUGaW52b2tlBmNhbGxlcgMJAQ9jb250YWluc0VsZW1lbnQCC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XIJAKUIAQkApwgBCAUBaQ9jYWxsZXJQdWJsaWNLZXkEBmFtb3VudAkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzCQCsAgIFB2FkZHJlc3MCCV9mcmVlX3R4cwAAAwkAZwIAAAUGYW1vdW50CQACAQIUTm8gZnJlZSB0eCBhdmFpbGFibGUEAmlkCQDYBAEIBQFpDXRyYW5zYWN0aW9uSWQDCQEPY29udGFpbnNFbGVtZW50AgkAzAgCBQxhcnR3b3Jrc0RhcHAJAMwIAgUJdXNlcnNEYXBwBQNuaWwFBmNhbGxlcgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQdhZGRyZXNzAglfZnJlZV90eHMJAGUCBQZhbW91bnQAAQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUGY2FsbGVyAKDCHgUEdW5pdAUDbmlsCQACAQIhWW91IGFyZSBub3QgYXV0aG9yaXplZCB0byBkbyB0aGlzAWkBC2RlbGV0ZUVudHJ5AQVlbnRyeQQGY2FsbGVyCQClCAEIBQFpBmNhbGxlcgMJAAACBQZjYWxsZXIFBWNocmlzCQDMCAIJAQtEZWxldGVFbnRyeQEFBWVudHJ5BQNuaWwJAAIBAgJubwADF9El", "height": 2418671, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BLUucQ6YZ6x2kDcFNYQu96ikhXDe8zoGwChZcvCazkXh Next: BP7tQSL54knaZ1zGaEwXFXDbZ1XobGFwghCPeuLH3o4V Diff:
OldNewDifferences
108108 }
109109
110110
111+
112+@Callable(i)
113+func deleteEntry (entry) = {
114+ let caller = toString(i.caller)
115+ if ((caller == chris))
116+ then [DeleteEntry(entry)]
117+ else throw("no")
118+ }
119+
120+
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 CONF_USERS_K = "USERS_DAPP"
1515
1616 let chris = getStringByKey(CONF_AMIN_K)
1717
1818 let artworksDapp = getStringByKey(CONF_ARTWORKS_K)
1919
2020 let usersDapp = getStringByKey(CONF_USERS_K)
2121
2222 @Callable(invoke)
2323 func setConf (key,val) = {
2424 let caller = toString(invoke.caller)
2525 if (containsElement([chris, toString(this)], caller))
2626 then [StringEntry(key, val)]
2727 else throw("You are not allowed to change this")
2828 }
2929
3030
3131
3232 @Callable(i)
3333 func whitelist (address,days) = {
3434 let caller = toString(addressFromPublicKey(i.callerPublicKey))
3535 let id = toBase58String(i.transactionId)
3636 let expire = if ((days == 0))
3737 then days
3838 else (height + (1440 * days))
3939 if (containsElement([chris], caller))
4040 then [IntegerEntry(address, expire)]
4141 else throw("You are not authorized to whitelist artists")
4242 }
4343
4444
4545
4646 @Callable(i)
4747 func whitelistFreeDrop (address,amount,addToCurrentAmount) = {
4848 let caller = toString(addressFromPublicKey(i.callerPublicKey))
4949 let id = toBase58String(i.transactionId)
5050 if (containsElement([chris], caller))
5151 then {
5252 let currentAmount = valueOrElse(getInteger(this, (address + "_free_drops")), 0)
5353 let newAmount = if (addToCurrentAmount)
5454 then (currentAmount + amount)
5555 else amount
5656 [IntegerEntry((address + "_free_drops"), newAmount)]
5757 }
5858 else throw("You are not authorized to whitelist drops")
5959 }
6060
6161
6262
6363 @Callable(i)
6464 func useFreeDrop (address) = {
6565 let caller = toString(addressFromPublicKey(i.callerPublicKey))
6666 let amount = valueOrElse(getInteger(this, (address + "_free_drops")), 0)
6767 if ((0 >= amount))
6868 then throw("No free drop available")
6969 else {
7070 let id = toBase58String(i.transactionId)
7171 if (containsElement([artworksDapp], caller))
7272 then [IntegerEntry((address + "_free_drops"), (amount - 1))]
7373 else throw("You are not authorized to do this")
7474 }
7575 }
7676
7777
7878
7979 @Callable(i)
8080 func whitelistFreeTxs (address,amount,addToCurrentAmount) = {
8181 let caller = toString(addressFromPublicKey(i.callerPublicKey))
8282 let id = toBase58String(i.transactionId)
8383 if (containsElement([chris], caller))
8484 then {
8585 let currentAmount = valueOrElse(getInteger(this, (address + "_free_txq")), 0)
8686 let newAmount = if (addToCurrentAmount)
8787 then (currentAmount + amount)
8888 else amount
8989 [IntegerEntry((address + "_free_txs"), newAmount)]
9090 }
9191 else throw("You are not authorized to whitelist txs")
9292 }
9393
9494
9595
9696 @Callable(i)
9797 func useFreeTx (address) = {
9898 let caller = toString(addressFromPublicKey(i.callerPublicKey))
9999 let amount = valueOrElse(getInteger(this, (address + "_free_txs")), 0)
100100 if ((0 >= amount))
101101 then throw("No free tx available")
102102 else {
103103 let id = toBase58String(i.transactionId)
104104 if (containsElement([artworksDapp, usersDapp], caller))
105105 then [IntegerEntry((address + "_free_txs"), (amount - 1)), ScriptTransfer(Address(fromBase58String(caller)), 500000, unit)]
106106 else throw("You are not authorized to do this")
107107 }
108108 }
109109
110110
111+
112+@Callable(i)
113+func deleteEntry (entry) = {
114+ let caller = toString(i.caller)
115+ if ((caller == chris))
116+ then [DeleteEntry(entry)]
117+ else throw("no")
118+ }
119+
120+

github/deemru/w8io/169f3d6 
20.89 ms