tx · 9tmk7twWB8y9rGxYyMe33uKb1H4esyNiQXb5DAxmqfaQ

3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ:  -0.01000000 Waves

2023.10.12 07:14 [2794889] smart account 3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ > SELF 0.00000000 Waves

{ "type": 13, "id": "9tmk7twWB8y9rGxYyMe33uKb1H4esyNiQXb5DAxmqfaQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1697084141761, "version": 2, "chainId": 84, "sender": "3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ", "senderPublicKey": "HhtVcCt3Zxp8Tuqw9d9Er8kVG8AhbCuxygMA2pTYqrj4", "proofs": [ "2YDukq1T1aNAagzJmQ3NWvMBjir6A5ovBkftJ8GtEwjt6DBJ7YQdkuNcTrHdmi19hmCjHGw8Z9zcpBkRAF9H1uYs" ], "script": "base64:AAIFAAAAAAAAABcIAhIECgIICBIFCgMICAgSBgoECAgICAAAABEAAAAAB1ZFUlNJT04CAAAABTEuMC4wAAAAAA5TVEFUVVNfUEVORElORwIAAAAHUEVORElORwAAAAAOU1RBVFVTX0ZMQUdHRUQCAAAAB0ZMQUdHRUQAAAAADlNUQVRVU19DTEVBUkVEAgAAAAdDTEVBUkVEAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAAAAAAthcnR3b3JrRGFwcAkBAAAABXZhbHVlAAAAAQkABCYAAAABCQEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAgAAABFjb25mX2FydHdvcmtfZGFwcAEAAAATZ2V0U3RyaW5nQnlLZXlPbkFydAAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAAC2FydHdvcmtEYXBwBQAAAANrZXkCAAAAAAEAAAAHa2V5TmFtZQAAAAIAAAAGY2FsbGVyAAAABWFydElkC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CAAAAAV8EAAAAA3BheQMJAAAAAAAAAgUAAAAGc3RhdHVzBQAAAA5TVEFUVVNfRkxBR0dFRAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQkAAZEAAAACBQAAAA9zdGF0dXNfcmVwb3J0ZXIAAAAAAAAAAAEFAAAABnJld2FyZAUAAAAKYXJ0QXNzZXRJZAUAAAADbmlsBQAAAANuaWwEAAAACyR0MDI4NjUyODk5CQEAAAAMaWRDYWxsZXJEYXRlAAAAAQUAAAABaQQAAAACaWQIBQAAAAskdDAyODY1Mjg5OQAAAAJfMQQAAAAGY2FsbGVyCAUAAAALJHQwMjg2NTI4OTkAAAACXzIDCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgkABEwAAAACBQAAAAVjaHJpcwkABEwAAAACCQAEJQAAAAEFAAAABHRoaXMFAAAAA25pbAUAAAAGY2FsbGVyCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAlrZXlSZXBvcnQAAAACBQAAAAVhcnRJZAUAAAAEYWRkcgUAAAAGc3RhdHVzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkBAAAACWtleVJlcG9ydAAAAAIFAAAABWFydElkBQAAAARhZGRyAgAAAA5fY29tbWVudF9hZG1pbgUAAAAHY29tbWVudAUAAAADbmlsCQAAAgAAAAECAAAAC05vdCBhbGxvd2VkAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnF8szB", "height": 2794889, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9eEywyMhrCAjvswy6yfxoXc4MLbGp2AtiHCbvw7z1FAd Next: 4T8getL4ABxxbKzBGGX613ovqYFpoikP9tDxD1E5NQF1 Diff:
OldNewDifferences
1010 let STATUS_CLEARED = "CLEARED"
1111
1212 func getStringByKey (key) = valueOrElse(getString(this, key), "")
13+
14+
15+let artworkDapp = value(addressFromString(getStringByKey("conf_artwork_dapp")))
16+
17+func getStringByKeyOnArt (key) = valueOrElse(getString(artworkDapp, key), "")
1318
1419
1520 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
5257
5358 @Callable(i)
5459 func report (artId,addr,msg) = {
55- let $t016151649 = idCallerDate(i)
56- let id = $t016151649._1
57- let caller = $t016151649._2
58- if ((getStringByKey(keyName(addr, artId)) == ""))
60+ let $t017811815 = idCallerDate(i)
61+ let id = $t017811815._1
62+ let caller = $t017811815._2
63+ if ((getStringByKeyOnArt(keyName(addr, artId)) == ""))
5964 then throw("No art matching for this address")
6065 else if ((getStringByKey(keyReport(artId, addr)) != ""))
6166 then throw("Already reported.")
7984 let pay = if ((status == STATUS_FLAGGED))
8085 then [ScriptTransfer(Address(fromBase58String(status_reporter[1])), reward, artAssetId)]
8186 else nil
82- let $t026942728 = idCallerDate(i)
83- let id = $t026942728._1
84- let caller = $t026942728._2
87+ let $t028652899 = idCallerDate(i)
88+ let id = $t028652899._1
89+ let caller = $t028652899._2
8590 if (containsElement([chris, toString(this)], caller))
8691 then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)]
8792 else throw("Not allowed")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VERSION = "1.0.0"
55
66 let STATUS_PENDING = "PENDING"
77
88 let STATUS_FLAGGED = "FLAGGED"
99
1010 let STATUS_CLEARED = "CLEARED"
1111
1212 func getStringByKey (key) = valueOrElse(getString(this, key), "")
13+
14+
15+let artworkDapp = value(addressFromString(getStringByKey("conf_artwork_dapp")))
16+
17+func getStringByKeyOnArt (key) = valueOrElse(getString(artworkDapp, key), "")
1318
1419
1520 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
1621
1722
1823 func keyReport (artId,addr) = ((artId + "_") + addr)
1924
2025
2126 let dappRunning = valueOrElse(getBoolean(this, "conf_dapp_is_running"), true)
2227
2328 let maintenanceMSG = valueOrElse(getString(this, "conf_maintenance_msg"), "")
2429
2530 let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee")))
2631
2732 let artAssetId_str = getStringByKey("conf_accepted_asset_ART")
2833
2934 let artAssetId = fromBase58String(artAssetId_str)
3035
3136 let chris = getStringByKey("conf_admin_1")
3237
3338 func idCallerDate (i) = if (!(dappRunning))
3439 then throw(maintenanceMSG)
3540 else $Tuple2(toBase58String(i.transactionId), toBase58String(i.caller.bytes))
3641
3742
3843 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
3944
4045
4146 @Callable(invoke)
4247 func setConf (key,val) = {
4348 let caller = toString(invoke.caller)
4449 if (containsElement([chris, toString(this)], caller))
4550 then if (contains(key, "conf_"))
4651 then [StringEntry(key, val)]
4752 else throw("Entries starting with conf_ only")
4853 else throw("You are not allowed to change this")
4954 }
5055
5156
5257
5358 @Callable(i)
5459 func report (artId,addr,msg) = {
55- let $t016151649 = idCallerDate(i)
56- let id = $t016151649._1
57- let caller = $t016151649._2
58- if ((getStringByKey(keyName(addr, artId)) == ""))
60+ let $t017811815 = idCallerDate(i)
61+ let id = $t017811815._1
62+ let caller = $t017811815._2
63+ if ((getStringByKeyOnArt(keyName(addr, artId)) == ""))
5964 then throw("No art matching for this address")
6065 else if ((getStringByKey(keyReport(artId, addr)) != ""))
6166 then throw("Already reported.")
6267 else [StringEntry(keyReport(artId, addr), ((STATUS_PENDING + "_") + caller)), StringEntry((keyReport(artId, addr) + "_comment_reporter"), msg)]
6368 }
6469
6570
6671
6772 @Callable(i)
6873 func processReport (artId,addr,status,comment) = if ((getStringByKey(keyName(addr, artId)) == ""))
6974 then throw("No art matching for this address")
7075 else if (!(containsElement([STATUS_CLEARED, STATUS_FLAGGED], status)))
7176 then throw("Status not found")
7277 else {
7378 let get_report = getStringByKey(keyReport(artId, addr))
7479 if ((get_report == ""))
7580 then throw("Report not found.")
7681 else {
7782 let reward = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(artAssetId)))
7883 let status_reporter = split(get_report, "_")
7984 let pay = if ((status == STATUS_FLAGGED))
8085 then [ScriptTransfer(Address(fromBase58String(status_reporter[1])), reward, artAssetId)]
8186 else nil
82- let $t026942728 = idCallerDate(i)
83- let id = $t026942728._1
84- let caller = $t026942728._2
87+ let $t028652899 = idCallerDate(i)
88+ let id = $t028652899._1
89+ let caller = $t028652899._2
8590 if (containsElement([chris, toString(this)], caller))
8691 then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)]
8792 else throw("Not allowed")
8893 }
8994 }
9095
9196
9297 @Verifier(tx)
9398 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9499

github/deemru/w8io/026f985 
29.86 ms