tx · DaoxnG2mPD5jvTsMxwsVKrCr6QYMWggMqgZYhY1VgSaz

3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ:  -0.01000000 Waves

2023.10.12 08:39 [2794974] smart account 3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ > SELF 0.00000000 Waves

{ "type": 13, "id": "DaoxnG2mPD5jvTsMxwsVKrCr6QYMWggMqgZYhY1VgSaz", "fee": 1000000, "feeAssetId": null, "timestamp": 1697089187570, "version": 2, "chainId": 84, "sender": "3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ", "senderPublicKey": "HhtVcCt3Zxp8Tuqw9d9Er8kVG8AhbCuxygMA2pTYqrj4", "proofs": [ "2yDoKyVigbsMw2nSWp9WJG55aaaEsVcAii3gc1Rbb4gVb1dx2kc4YxHFebkC7LnFxnvZq8bLRAtREsDzoDmcpTSu" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIICBIFCgMICAgSBwoFCAgICAgAAAAWAAAAAAdWRVJTSU9OAgAAAAUxLjAuMAAAAAAOU1RBVFVTX1BFTkRJTkcCAAAAB1BFTkRJTkcAAAAADlNUQVRVU19GTEFHR0VEAgAAAAdGTEFHR0VEAAAAAA5TVEFUVVNfQ0xFQVJFRAIAAAAHQ0xFQVJFRAAAAAAUQVJUV09SS19GTEFHX0NPTlNFTlQCAAAAB0NPTlNFTlQAAAAAEkFSVFdPUktfRkxBR19SRVNFVAIAAAAAAAAAABxBUlRXT1JLX0ZMQUdfQ0hBTkdFX1JFUVVJUkVEAgAAAA9DSEFOR0VfUkVRVUlSRUQAAAAAFEFSVFdPUktfRkxBR19GTEFHR0VEAgAAAAdGTEFHR0VEAAAAABRBUlRXT1JLX0ZMQUdfSUxMRUdBTAIAAAAHSUxMRUdBTAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAAAAA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AIFAAAABWFydElkBQAAAARhZGRyAgAAAA5fY29tbWVudF9hZG1pbgUAAAAHY29tbWVudAUAAAADbmlsBQAAABFyZXdhcmRfYW5kX3VwZGF0ZQkAAAIAAAABAgAAAAtOb3QgYWxsb3dlZAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlecrG9ec=", "height": 2794974, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BckVET91Ypte8GwmgfJiai4u6Zo2mzCMjjgojZsoQUJr Next: E21iarrxiYheS7aZ8c1Xvxvt3sPQY8SAs9auYT9kBuy9 Diff:
OldNewDifferences
9999 if (!(containsElement([ARTWORK_FLAG_CONSENT, ARTWORK_FLAG_RESET, ARTWORK_FLAG_CHANGE_REQUIRED, ARTWORK_FLAG_FLAGGED, ARTWORK_FLAG_ILLEGAL], status_on_art_dapp)))
100100 then throw("status_on_art_dapp unknown")
101101 else {
102- let flag_artwork = invoke(artworkDapp, "flagArtwork", [artId, addr, status, comment], nil)
102+ let flag_artwork = invoke(artworkDapp, "flagArtwork", [artId, addr, status_on_art_dapp, comment], nil)
103103 if ((flag_artwork == flag_artwork))
104104 then {
105- let $t036523686 = idCallerDate(i)
106- let id = $t036523686._1
107- let caller = $t036523686._2
105+ let $t036643698 = idCallerDate(i)
106+ let id = $t036643698._1
107+ let caller = $t036643698._2
108108 if (containsElement([chris, toString(this)], caller))
109109 then ([StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)] ++ reward_and_update)
110110 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 let ARTWORK_FLAG_CONSENT = "CONSENT"
1313
1414 let ARTWORK_FLAG_RESET = ""
1515
1616 let ARTWORK_FLAG_CHANGE_REQUIRED = "CHANGE_REQUIRED"
1717
1818 let ARTWORK_FLAG_FLAGGED = "FLAGGED"
1919
2020 let ARTWORK_FLAG_ILLEGAL = "ILLEGAL"
2121
2222 func getStringByKey (key) = valueOrElse(getString(this, key), "")
2323
2424
2525 let artworkDapp = value(addressFromString(getStringByKey("conf_artwork_dapp")))
2626
2727 func getStringByKeyOnArt (key) = valueOrElse(getString(artworkDapp, key), "")
2828
2929
3030 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
3131
3232
3333 func keyReport (artId,addr) = ((artId + "_") + addr)
3434
3535
3636 let dappRunning = valueOrElse(getBoolean(this, "conf_dapp_is_running"), true)
3737
3838 let maintenanceMSG = valueOrElse(getString(this, "conf_maintenance_msg"), "")
3939
4040 let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee")))
4141
4242 let artAssetId_str = getStringByKey("conf_accepted_asset_ART")
4343
4444 let artAssetId = fromBase58String(artAssetId_str)
4545
4646 let chris = getStringByKey("conf_admin_1")
4747
4848 func idCallerDate (i) = if (!(dappRunning))
4949 then throw(maintenanceMSG)
5050 else $Tuple2(toBase58String(i.transactionId), toBase58String(i.caller.bytes))
5151
5252
5353 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
5454
5555
5656 @Callable(invoke)
5757 func setConf (key,val) = {
5858 let caller = toString(invoke.caller)
5959 if (containsElement([chris, toString(this)], caller))
6060 then if (contains(key, "conf_"))
6161 then [StringEntry(key, val)]
6262 else throw("Entries starting with conf_ only")
6363 else throw("You are not allowed to change this")
6464 }
6565
6666
6767
6868 @Callable(i)
6969 func report (artId,addr,msg) = {
7070 let $t019742008 = idCallerDate(i)
7171 let id = $t019742008._1
7272 let caller = $t019742008._2
7373 if ((getStringByKeyOnArt(keyName(addr, artId)) == ""))
7474 then throw("No art matching for this address")
7575 else if ((getStringByKey(keyReport(artId, addr)) != ""))
7676 then throw("Already reported.")
7777 else [StringEntry(keyReport(artId, addr), (((STATUS_PENDING + "_") + caller) + "_0")), StringEntry((keyReport(artId, addr) + "_comment_reporter"), msg)]
7878 }
7979
8080
8181
8282 @Callable(i)
8383 func processReport (artId,addr,status,comment,status_on_art_dapp) = if ((getStringByKeyOnArt(keyName(addr, artId)) == ""))
8484 then throw("No art matching for this address")
8585 else if (!(containsElement([STATUS_CLEARED, STATUS_FLAGGED], status)))
8686 then throw("Status not found")
8787 else {
8888 let get_report = getStringByKey(keyReport(artId, addr))
8989 if ((get_report == ""))
9090 then throw("Report not found.")
9191 else {
9292 let reward = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(artAssetId)))
9393 let status_reporter = split(get_report, "_")
9494 let reward_and_update = if (if ((status == STATUS_FLAGGED))
9595 then (status_reporter[2] == "0")
9696 else false)
9797 then [ScriptTransfer(Address(fromBase58String(status_reporter[1])), reward, artAssetId), StringEntry(keyReport(artId, addr), ((((status + "_") + status_reporter[1]) + "_") + toString(reward)))]
9898 else [StringEntry(keyReport(artId, addr), ((((status + "_") + status_reporter[1]) + "_") + status_reporter[2]))]
9999 if (!(containsElement([ARTWORK_FLAG_CONSENT, ARTWORK_FLAG_RESET, ARTWORK_FLAG_CHANGE_REQUIRED, ARTWORK_FLAG_FLAGGED, ARTWORK_FLAG_ILLEGAL], status_on_art_dapp)))
100100 then throw("status_on_art_dapp unknown")
101101 else {
102- let flag_artwork = invoke(artworkDapp, "flagArtwork", [artId, addr, status, comment], nil)
102+ let flag_artwork = invoke(artworkDapp, "flagArtwork", [artId, addr, status_on_art_dapp, comment], nil)
103103 if ((flag_artwork == flag_artwork))
104104 then {
105- let $t036523686 = idCallerDate(i)
106- let id = $t036523686._1
107- let caller = $t036523686._2
105+ let $t036643698 = idCallerDate(i)
106+ let id = $t036643698._1
107+ let caller = $t036643698._2
108108 if (containsElement([chris, toString(this)], caller))
109109 then ([StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)] ++ reward_and_update)
110110 else throw("Not allowed")
111111 }
112112 else throw("Strict value is not equal to itself.")
113113 }
114114 }
115115 }
116116
117117
118118 @Verifier(tx)
119119 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
120120

github/deemru/w8io/026f985 
43.89 ms