tx · 9qZAabPwAjjur13t3TsxGPqnzGwq7Je6ngRSVZomyebW 3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ: -0.01000000 Waves 2023.10.12 08:21 [2794956] smart account 3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ > SELF 0.00000000 Waves
{ "type": 13, "id": "9qZAabPwAjjur13t3TsxGPqnzGwq7Je6ngRSVZomyebW", "fee": 1000000, "feeAssetId": null, "timestamp": 1697088136322, "version": 2, "chainId": 84, "sender": "3N7yL6nhsHwrkLfxpWGjM39hFj4qo97bCdZ", "senderPublicKey": "HhtVcCt3Zxp8Tuqw9d9Er8kVG8AhbCuxygMA2pTYqrj4", "proofs": [ "5s9KNF5qmTdU9ZBPtBH8bg7e6GEUKCaNrCKoefAc74oexS1nePSYfWGidHVt9zgMSnM1myCGa4ZBKbGBKjS1K42" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIICBIFCgMICAgSBwoFCAgICAgAAAAWAAAAAAdWRVJTSU9OAgAAAAUxLjAuMAAAAAAOU1RBVFVTX1BFTkRJTkcCAAAAB1BFTkRJTkcAAAAADlNUQVRVU19GTEFHR0VEAgAAAAdGTEFHR0VEAAAAAA5TVEFUVVNfQ0xFQVJFRAIAAAAHQ0xFQVJFRAAAAAAUQVJUV09SS19GTEFHX0NPTlNFTlQCAAAAB0NPTlNFTlQAAAAAEkFSVFdPUktfRkxBR19SRVNFVAIAAAAAAAAAABxBUlRXT1JLX0ZMQUdfQ0hBTkdFX1JFUVVJUkVEAgAAAA9DSEFOR0VfUkVRVUlSRUQAAAAAFEFSVFdPUktfRkxBR19GTEFHR0VEAgAAAAdGTEFHR0VEAAAAABRBUlRXT1JLX0ZMQUdfSUxMRUdBTAIAAAAHSUxMRUdBTAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAAAAAALYXJ0d29ya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kABEwAAAACBQAAAARhZGRyCQAETAAAAAIFAAAABnN0YXR1cwkABEwAAAACBQAAAAdjb21tZW50BQAAAANuaWwFAAAAA25pbAUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAADGZsYWdfYXJ0d29yawUAAAAMZmxhZ19hcnR3b3JrBAAAAAskdDAzNDMyMzQ2NgkBAAAADGlkQ2FsbGVyRGF0ZQAAAAEFAAAAAWkEAAAAAmlkCAUAAAALJHQwMzQzMjM0NjYAAAACXzEEAAAABmNhbGxlcggFAAAACyR0MDM0MzIzNDY2AAAAAl8yAwkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIJAARMAAAAAgUAAAAFY2hyaXMJAARMAAAAAgkABCUAAAABBQAAAAR0aGlzBQAAAANuaWwFAAAABmNhbGxlcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAAJa2V5UmVwb3J0AAAAAgUAAAAFYXJ0SWQFAAAABGFkZHIFAAAABnN0YXR1cwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAQAAAAlrZXlSZXBvcnQAAAACBQAAAAVhcnRJZAUAAAAEYWRkcgIAAAAOX2NvbW1lbnRfYWRtaW4FAAAAB2NvbW1lbnQFAAAAA25pbAkAAAIAAAABAgAAAAtOb3QgYWxsb3dlZAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleTQvjJE=", "height": 2794956, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4T8getL4ABxxbKzBGGX613ovqYFpoikP9tDxD1E5NQF1 Next: BckVET91Ypte8GwmgfJiai4u6Zo2mzCMjjgojZsoQUJr Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let STATUS_FLAGGED = "FLAGGED" | |
9 | 9 | ||
10 | 10 | let STATUS_CLEARED = "CLEARED" | |
11 | + | ||
12 | + | let ARTWORK_FLAG_CONSENT = "CONSENT" | |
13 | + | ||
14 | + | let ARTWORK_FLAG_RESET = "" | |
15 | + | ||
16 | + | let ARTWORK_FLAG_CHANGE_REQUIRED = "CHANGE_REQUIRED" | |
17 | + | ||
18 | + | let ARTWORK_FLAG_FLAGGED = "FLAGGED" | |
19 | + | ||
20 | + | let ARTWORK_FLAG_ILLEGAL = "ILLEGAL" | |
11 | 21 | ||
12 | 22 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
13 | 23 | ||
57 | 67 | ||
58 | 68 | @Callable(i) | |
59 | 69 | func report (artId,addr,msg) = { | |
60 | - | let $ | |
61 | - | let id = $ | |
62 | - | let caller = $ | |
70 | + | let $t019742008 = idCallerDate(i) | |
71 | + | let id = $t019742008._1 | |
72 | + | let caller = $t019742008._2 | |
63 | 73 | if ((getStringByKeyOnArt(keyName(addr, artId)) == "")) | |
64 | 74 | then throw("No art matching for this address") | |
65 | 75 | else if ((getStringByKey(keyReport(artId, addr)) != "")) | |
70 | 80 | ||
71 | 81 | ||
72 | 82 | @Callable(i) | |
73 | - | func processReport (artId,addr,status,comment) = if ((getStringByKeyOnArt(keyName(addr, artId)) == "")) | |
83 | + | func processReport (artId,addr,status,comment,status_on_art_dapp) = if ((getStringByKeyOnArt(keyName(addr, artId)) == "")) | |
74 | 84 | then throw("No art matching for this address") | |
75 | 85 | else if (!(containsElement([STATUS_CLEARED, STATUS_FLAGGED], status))) | |
76 | 86 | then throw("Status not found") | |
84 | 94 | let pay = if ((status == STATUS_FLAGGED)) | |
85 | 95 | then [ScriptTransfer(Address(fromBase58String(status_reporter[1])), reward, artAssetId)] | |
86 | 96 | else nil | |
87 | - | let $t028702904 = idCallerDate(i) | |
88 | - | let id = $t028702904._1 | |
89 | - | let caller = $t028702904._2 | |
90 | - | if (containsElement([chris, toString(this)], caller)) | |
91 | - | then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)] | |
92 | - | else throw("Not allowed") | |
97 | + | if (!(containsElement([ARTWORK_FLAG_CONSENT, ARTWORK_FLAG_RESET, ARTWORK_FLAG_CHANGE_REQUIRED, ARTWORK_FLAG_FLAGGED, ARTWORK_FLAG_ILLEGAL], status_on_art_dapp))) | |
98 | + | then throw("status_on_art_dapp unknown") | |
99 | + | else { | |
100 | + | let flag_artwork = if ((status == STATUS_FLAGGED)) | |
101 | + | then [invoke(artworkDapp, "flagArtwork", [artId, addr, status, comment], nil)] | |
102 | + | else nil | |
103 | + | if ((flag_artwork == flag_artwork)) | |
104 | + | then { | |
105 | + | let $t034323466 = idCallerDate(i) | |
106 | + | let id = $t034323466._1 | |
107 | + | let caller = $t034323466._2 | |
108 | + | if (containsElement([chris, toString(this)], caller)) | |
109 | + | then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)] | |
110 | + | else throw("Not allowed") | |
111 | + | } | |
112 | + | else throw("Strict value is not equal to itself.") | |
113 | + | } | |
93 | 114 | } | |
94 | 115 | } | |
95 | 116 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let VERSION = "1.0.0" | |
5 | 5 | ||
6 | 6 | let STATUS_PENDING = "PENDING" | |
7 | 7 | ||
8 | 8 | let STATUS_FLAGGED = "FLAGGED" | |
9 | 9 | ||
10 | 10 | let STATUS_CLEARED = "CLEARED" | |
11 | + | ||
12 | + | let ARTWORK_FLAG_CONSENT = "CONSENT" | |
13 | + | ||
14 | + | let ARTWORK_FLAG_RESET = "" | |
15 | + | ||
16 | + | let ARTWORK_FLAG_CHANGE_REQUIRED = "CHANGE_REQUIRED" | |
17 | + | ||
18 | + | let ARTWORK_FLAG_FLAGGED = "FLAGGED" | |
19 | + | ||
20 | + | let ARTWORK_FLAG_ILLEGAL = "ILLEGAL" | |
11 | 21 | ||
12 | 22 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
13 | 23 | ||
14 | 24 | ||
15 | 25 | let artworkDapp = value(addressFromString(getStringByKey("conf_artwork_dapp"))) | |
16 | 26 | ||
17 | 27 | func getStringByKeyOnArt (key) = valueOrElse(getString(artworkDapp, key), "") | |
18 | 28 | ||
19 | 29 | ||
20 | 30 | func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller) | |
21 | 31 | ||
22 | 32 | ||
23 | 33 | func keyReport (artId,addr) = ((artId + "_") + addr) | |
24 | 34 | ||
25 | 35 | ||
26 | 36 | let dappRunning = valueOrElse(getBoolean(this, "conf_dapp_is_running"), true) | |
27 | 37 | ||
28 | 38 | let maintenanceMSG = valueOrElse(getString(this, "conf_maintenance_msg"), "") | |
29 | 39 | ||
30 | 40 | let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee"))) | |
31 | 41 | ||
32 | 42 | let artAssetId_str = getStringByKey("conf_accepted_asset_ART") | |
33 | 43 | ||
34 | 44 | let artAssetId = fromBase58String(artAssetId_str) | |
35 | 45 | ||
36 | 46 | let chris = getStringByKey("conf_admin_1") | |
37 | 47 | ||
38 | 48 | func idCallerDate (i) = if (!(dappRunning)) | |
39 | 49 | then throw(maintenanceMSG) | |
40 | 50 | else $Tuple2(toBase58String(i.transactionId), toBase58String(i.caller.bytes)) | |
41 | 51 | ||
42 | 52 | ||
43 | 53 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
44 | 54 | ||
45 | 55 | ||
46 | 56 | @Callable(invoke) | |
47 | 57 | func setConf (key,val) = { | |
48 | 58 | let caller = toString(invoke.caller) | |
49 | 59 | if (containsElement([chris, toString(this)], caller)) | |
50 | 60 | then if (contains(key, "conf_")) | |
51 | 61 | then [StringEntry(key, val)] | |
52 | 62 | else throw("Entries starting with conf_ only") | |
53 | 63 | else throw("You are not allowed to change this") | |
54 | 64 | } | |
55 | 65 | ||
56 | 66 | ||
57 | 67 | ||
58 | 68 | @Callable(i) | |
59 | 69 | func report (artId,addr,msg) = { | |
60 | - | let $ | |
61 | - | let id = $ | |
62 | - | let caller = $ | |
70 | + | let $t019742008 = idCallerDate(i) | |
71 | + | let id = $t019742008._1 | |
72 | + | let caller = $t019742008._2 | |
63 | 73 | if ((getStringByKeyOnArt(keyName(addr, artId)) == "")) | |
64 | 74 | then throw("No art matching for this address") | |
65 | 75 | else if ((getStringByKey(keyReport(artId, addr)) != "")) | |
66 | 76 | then throw("Already reported.") | |
67 | 77 | else [StringEntry(keyReport(artId, addr), ((STATUS_PENDING + "_") + caller)), StringEntry((keyReport(artId, addr) + "_comment_reporter"), msg)] | |
68 | 78 | } | |
69 | 79 | ||
70 | 80 | ||
71 | 81 | ||
72 | 82 | @Callable(i) | |
73 | - | func processReport (artId,addr,status,comment) = if ((getStringByKeyOnArt(keyName(addr, artId)) == "")) | |
83 | + | func processReport (artId,addr,status,comment,status_on_art_dapp) = if ((getStringByKeyOnArt(keyName(addr, artId)) == "")) | |
74 | 84 | then throw("No art matching for this address") | |
75 | 85 | else if (!(containsElement([STATUS_CLEARED, STATUS_FLAGGED], status))) | |
76 | 86 | then throw("Status not found") | |
77 | 87 | else { | |
78 | 88 | let get_report = getStringByKey(keyReport(artId, addr)) | |
79 | 89 | if ((get_report == "")) | |
80 | 90 | then throw("Report not found.") | |
81 | 91 | else { | |
82 | 92 | let reward = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(artAssetId))) | |
83 | 93 | let status_reporter = split(get_report, "_") | |
84 | 94 | let pay = if ((status == STATUS_FLAGGED)) | |
85 | 95 | then [ScriptTransfer(Address(fromBase58String(status_reporter[1])), reward, artAssetId)] | |
86 | 96 | else nil | |
87 | - | let $t028702904 = idCallerDate(i) | |
88 | - | let id = $t028702904._1 | |
89 | - | let caller = $t028702904._2 | |
90 | - | if (containsElement([chris, toString(this)], caller)) | |
91 | - | then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)] | |
92 | - | else throw("Not allowed") | |
97 | + | if (!(containsElement([ARTWORK_FLAG_CONSENT, ARTWORK_FLAG_RESET, ARTWORK_FLAG_CHANGE_REQUIRED, ARTWORK_FLAG_FLAGGED, ARTWORK_FLAG_ILLEGAL], status_on_art_dapp))) | |
98 | + | then throw("status_on_art_dapp unknown") | |
99 | + | else { | |
100 | + | let flag_artwork = if ((status == STATUS_FLAGGED)) | |
101 | + | then [invoke(artworkDapp, "flagArtwork", [artId, addr, status, comment], nil)] | |
102 | + | else nil | |
103 | + | if ((flag_artwork == flag_artwork)) | |
104 | + | then { | |
105 | + | let $t034323466 = idCallerDate(i) | |
106 | + | let id = $t034323466._1 | |
107 | + | let caller = $t034323466._2 | |
108 | + | if (containsElement([chris, toString(this)], caller)) | |
109 | + | then [StringEntry(keyReport(artId, addr), status), StringEntry((keyReport(artId, addr) + "_comment_admin"), comment)] | |
110 | + | else throw("Not allowed") | |
111 | + | } | |
112 | + | else throw("Strict value is not equal to itself.") | |
113 | + | } | |
93 | 114 | } | |
94 | 115 | } | |
95 | 116 | ||
96 | 117 | ||
97 | 118 | @Verifier(tx) | |
98 | 119 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
99 | 120 |
github/deemru/w8io/026f985 49.77 ms ◑