tx · 4T8getL4ABxxbKzBGGX613ovqYFpoikP9tDxD1E5NQF1

3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ:  -0.01000000 Waves

2023.10.12 08:00 [2794936] smart account 3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ > SELF 0.00000000 Waves

{ "type": 13, "id": "4T8getL4ABxxbKzBGGX613ovqYFpoikP9tDxD1E5NQF1", "fee": 1000000, "feeAssetId": null, "timestamp": 1697086865805, "version": 2, "chainId": 84, "sender": "3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ", "senderPublicKey": "HhtVcCt3Zxp8Tuqw9d9Er8kVG8AhbCuxygMA2pTYqrj4", "proofs": [ "51W2YJCxbS16UbSUbUTDL46NP9PHzuxD1EbnwWXpZxrRzRex9EN8oYuy4Sw5nLEEJtXL1Tc5vq1PnuEuTqrbQAkp" ], "script": "base64:AAIFAAAAAAAAABcIAhIECgIICBIFCgMICAgSBgoECAgICAAAABEAAAAAB1ZFUlNJT04CAAAABTEuMC4wAAAAAA5TVEFUVVNfUEVORElORwIAAAAHUEVORElORwAAAAAOU1RBVFVTX0ZMQUdHRUQCAAAAB0ZMQUdHRUQAAAAADlNUQVRVU19DTEVBUkVEAgAAAAdDTEVBUkVEAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAAAAAAthcnR3b3JrRGFwcAkBAAAABXZhbHVlAAAAAQkABCYAAAABCQEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAgAAABFjb25mX2FydHdvcmtfZGFwcAEAAAATZ2V0U3RyaW5nQnlLZXlPbkFydAAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAAC2FydHdvcmtEYXBwBQAAAANrZXkCAAAAAAEAAAAHa2V5TmFtZQAAAAIAAAAGY2FsbGVyAAAABWFydElkCQABLAAAA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ACBQAAAAZzdGF0dXMFAAAADlNUQVRVU19GTEFHR0VECQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABCQABkQAAAAIFAAAAD3N0YXR1c19yZXBvcnRlcgAAAAAAAAAAAQUAAAAGcmV3YXJkBQAAAAphcnRBc3NldElkBQAAAANuaWwFAAAAA25pbAQAAAALJHQwMjg3MDI5MDQJAQAAAAxpZENhbGxlckRhdGUAAAABBQAAAAFpBAAAAAJpZAgFAAAACyR0MDI4NzAyOTA0AAAAAl8xBAAAAAZjYWxsZXIIBQAAAAskdDAyODcwMjkwNAAAAAJfMgMJAQAAAA9jb250YWluc0VsZW1lbnQAAAACCQAETAAAAAIFAAAABWNocmlzCQAETAAAAAIJAAQlAAAAAQUAAAAEdGhpcwUAAAADbmlsBQAAAAZjYWxsZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAACWtleVJlcG9ydAAAAAIFAAAABWFydElkBQAAAARhZGRyBQAAAAZzdGF0dXMJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQEAAAAJa2V5UmVwb3J0AAAAAgUAAAAFYXJ0SWQFAAAABGFkZHICAAAADl9jb21tZW50X2FkbWluBQAAAAdjb21tZW50BQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleY3/ocM=", "height": 2794936, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9tmk7twWB8y9rGxYyMe33uKb1H4esyNiQXb5DAxmqfaQ Next: 9qZAabPwAjjur13t3TsxGPqnzGwq7Je6ngRSVZomyebW Diff:
OldNewDifferences
7070
7171
7272 @Callable(i)
73-func processReport (artId,addr,status,comment) = if ((getStringByKey(keyName(addr, artId)) == ""))
73+func processReport (artId,addr,status,comment) = if ((getStringByKeyOnArt(keyName(addr, artId)) == ""))
7474 then throw("No art matching for this address")
7575 else if (!(containsElement([STATUS_CLEARED, STATUS_FLAGGED], status)))
7676 then throw("Status not found")
8484 let pay = if ((status == STATUS_FLAGGED))
8585 then [ScriptTransfer(Address(fromBase58String(status_reporter[1])), reward, artAssetId)]
8686 else nil
87- let $t028652899 = idCallerDate(i)
88- let id = $t028652899._1
89- let caller = $t028652899._2
87+ let $t028702904 = idCallerDate(i)
88+ let id = $t028702904._1
89+ let caller = $t028702904._2
9090 if (containsElement([chris, toString(this)], caller))
9191 then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)]
9292 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), "")
1313
1414
1515 let artworkDapp = value(addressFromString(getStringByKey("conf_artwork_dapp")))
1616
1717 func getStringByKeyOnArt (key) = valueOrElse(getString(artworkDapp, key), "")
1818
1919
2020 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
2121
2222
2323 func keyReport (artId,addr) = ((artId + "_") + addr)
2424
2525
2626 let dappRunning = valueOrElse(getBoolean(this, "conf_dapp_is_running"), true)
2727
2828 let maintenanceMSG = valueOrElse(getString(this, "conf_maintenance_msg"), "")
2929
3030 let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee")))
3131
3232 let artAssetId_str = getStringByKey("conf_accepted_asset_ART")
3333
3434 let artAssetId = fromBase58String(artAssetId_str)
3535
3636 let chris = getStringByKey("conf_admin_1")
3737
3838 func idCallerDate (i) = if (!(dappRunning))
3939 then throw(maintenanceMSG)
4040 else $Tuple2(toBase58String(i.transactionId), toBase58String(i.caller.bytes))
4141
4242
4343 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
4444
4545
4646 @Callable(invoke)
4747 func setConf (key,val) = {
4848 let caller = toString(invoke.caller)
4949 if (containsElement([chris, toString(this)], caller))
5050 then if (contains(key, "conf_"))
5151 then [StringEntry(key, val)]
5252 else throw("Entries starting with conf_ only")
5353 else throw("You are not allowed to change this")
5454 }
5555
5656
5757
5858 @Callable(i)
5959 func report (artId,addr,msg) = {
6060 let $t017811815 = idCallerDate(i)
6161 let id = $t017811815._1
6262 let caller = $t017811815._2
6363 if ((getStringByKeyOnArt(keyName(addr, artId)) == ""))
6464 then throw("No art matching for this address")
6565 else if ((getStringByKey(keyReport(artId, addr)) != ""))
6666 then throw("Already reported.")
6767 else [StringEntry(keyReport(artId, addr), ((STATUS_PENDING + "_") + caller)), StringEntry((keyReport(artId, addr) + "_comment_reporter"), msg)]
6868 }
6969
7070
7171
7272 @Callable(i)
73-func processReport (artId,addr,status,comment) = if ((getStringByKey(keyName(addr, artId)) == ""))
73+func processReport (artId,addr,status,comment) = if ((getStringByKeyOnArt(keyName(addr, artId)) == ""))
7474 then throw("No art matching for this address")
7575 else if (!(containsElement([STATUS_CLEARED, STATUS_FLAGGED], status)))
7676 then throw("Status not found")
7777 else {
7878 let get_report = getStringByKey(keyReport(artId, addr))
7979 if ((get_report == ""))
8080 then throw("Report not found.")
8181 else {
8282 let reward = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(artAssetId)))
8383 let status_reporter = split(get_report, "_")
8484 let pay = if ((status == STATUS_FLAGGED))
8585 then [ScriptTransfer(Address(fromBase58String(status_reporter[1])), reward, artAssetId)]
8686 else nil
87- let $t028652899 = idCallerDate(i)
88- let id = $t028652899._1
89- let caller = $t028652899._2
87+ let $t028702904 = idCallerDate(i)
88+ let id = $t028702904._1
89+ let caller = $t028702904._2
9090 if (containsElement([chris, toString(this)], caller))
9191 then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)]
9292 else throw("Not allowed")
9393 }
9494 }
9595
9696
9797 @Verifier(tx)
9898 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9999

github/deemru/w8io/026f985 
24.76 ms