tx · 3GGPJsUJoSxF9zhWFjYoEJKQKwMc2tA1zxPZ9uQ5HDRj

3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ:  -0.10000000 Waves

2020.12.01 17:16 [1289707] smart account 3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ > SELF 0.00000000 Waves

{ "type": 13, "id": "3GGPJsUJoSxF9zhWFjYoEJKQKwMc2tA1zxPZ9uQ5HDRj", "fee": 10000000, "feeAssetId": null, "timestamp": 1606832163240, "version": 2, "chainId": 84, "sender": "3MtV1AQ8fEPk76tjKgvrufuMe5aA3q4TviQ", "senderPublicKey": "3Fjao2FW1JXSPd5EkP7C3uerW18HYacYsaMYALFMGA6N", "proofs": [ "4gHPqf7ysAoCdSuiuKsH3yQLyyeNSCxH8yQLgmhR7NSnvtMZzNQ37FqkpPHRCEQGoDN26Qc9BV8KjynBJ4pyDUKZ" ], "script": "base64:AAIDAAAAAAAAADMIARIDCgEIEgQKAggIEgQKAggBEgMKAQgSBAoCCAESAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAJAAAAAAZRVU9SVU0AAAAAAAAAAAEBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAAAAAAxtYWluQ29udHJhY3QFAAAABHRoaXMBAAAAB2lzT3duZXIAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWR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AANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAAYSLyxw==", "height": 1289707, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5uBktXog3ByE1idHffyb4MYdrjQcr9nEfqceXndzDaVm Next: Hhn1n26oo6JW7YFJKRn1CqotunjTntxXRLESVw5ufRBH Diff:
OldNewDifferences
9090 }
9191 (d > 0)
9292 }
93+
94+
95+@Callable(p)
96+func test (q) = WriteSet([DataEntry((("test_" + toBase58String(p.transactionId)) + "_title"), q)])
97+
9398
9499
95100 @Callable(p)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 1
55
66 func b (c) = {
77 let d = {
88 let e = getInteger(this, c)
99 if ($isInstanceOf(e, "Int"))
1010 then {
1111 let f = e
1212 f
1313 }
1414 else 0
1515 }
1616 d
1717 }
1818
1919
2020 func g (c) = {
2121 let d = {
2222 let e = getString(this, c)
2323 if ($isInstanceOf(e, "String"))
2424 then {
2525 let f = e
2626 f
2727 }
2828 else ""
2929 }
3030 d
3131 }
3232
3333
3434 let h = this
3535
3636 func i (j) = (j == this)
3737
3838
3939 func k () = {
4040 let d = {
4141 let e = getString(h, "working_group_members")
4242 if ($isInstanceOf(e, "String"))
4343 then {
4444 let f = e
4545 f
4646 }
4747 else ""
4848 }
4949 d
5050 }
5151
5252
5353 func l () = {
5454 let d = {
5555 let e = getString(h, "dao_members")
5656 if ($isInstanceOf(e, "String"))
5757 then {
5858 let f = e
5959 f
6060 }
6161 else ""
6262 }
6363 d
6464 }
6565
6666
6767 func m (n) = {
6868 let d = {
6969 let e = getInteger(h, (("working_group_member_" + toString(n)) + "_weight"))
7070 if ($isInstanceOf(e, "Int"))
7171 then {
7272 let f = e
7373 f
7474 }
7575 else 0
7676 }
7777 (d > 0)
7878 }
7979
8080
8181 func o (p) = {
8282 let d = {
8383 let e = getInteger(h, (("dao_member_" + toString(p.caller)) + "_weight"))
8484 if ($isInstanceOf(e, "Int"))
8585 then {
8686 let f = e
8787 f
8888 }
8989 else 0
9090 }
9191 (d > 0)
9292 }
93+
94+
95+@Callable(p)
96+func test (q) = WriteSet([DataEntry((("test_" + toBase58String(p.transactionId)) + "_title"), q)])
97+
9398
9499
95100 @Callable(p)
96101 func addTask (q,r) = WriteSet([DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_title"), q), DataEntry((("tasks_" + toBase58String(p.transactionId)) + "_link"), r)])
97102
98103
99104
100105 @Callable(p)
101106 func addTaskDetails (s,t) = {
102107 let u = getStringValue(this, (("tasks_" + s) + "_performer"))
103108 if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader"))))
104109 then throw("team leader only")
105110 else WriteSet([DataEntry((("tasks_" + s) + "_requestedreward"), t)])
106111 }
107112
108113
109114
110115 @Callable(p)
111116 func initTaskVoting (s) = if (!(m(p.caller)))
112117 then throw("grants working group access only")
113118 else WriteSet([DataEntry((("tasks_" + s) + "_status"), "voting_started")])
114119
115120
116121
117122 @Callable(p)
118123 func voteForTaskProposal (s,v) = if (!(o(p)))
119124 then throw("you can't vote")
120125 else if ((getStringValue(this, (("tasks_" + s) + "_status")) != "proposed"))
121126 then throw("voting is closed or not started")
122127 else if (if ((v != -1))
123128 then (v != 1)
124129 else false)
125130 then throw("you need to vote 1 or -1")
126131 else {
127132 let w = ((("tasks_" + s) + "_voted_") + toString(p.caller))
128133 let x = b(w)
129134 if (!((x == 0)))
130135 then throw("you have already voted")
131136 else {
132137 let y = (("tasks_" + s) + "_voting_state")
133138 let z = b(y)
134139 let A = (("tasks_" + s) + "_voting_amount")
135140 let B = (b(y) + 1)
136141 let C = (z + v)
137142 ScriptResult(WriteSet([DataEntry(y, C), DataEntry(w, v), DataEntry(A, B)]), TransferSet([ScriptTransfer(p.caller, 500000, unit)]))
138143 }
139144 }
140145
141146
142147
143148 @Callable(p)
144149 func finishTaskProposalVoting (s) = if ((a > ((b((("tasks_" + s) + "_voting_amount")) * 100) / b("dao_size"))))
145150 then throw((("more than " + toString(a)) + "% members have to vote before finishing the voting"))
146151 else if (!(m(p.caller)))
147152 then throw("grants working group access only")
148153 else {
149154 let y = (("tasks_" + s) + "_voting_state")
150155 let z = b(y)
151156 if ((z > 0))
152157 then {
153158 let D = "approved"
154159 WriteSet([DataEntry((("tasks_" + s) + "_status"), D)])
155160 }
156161 else {
157162 let D = "rejected"
158163 WriteSet([DataEntry((("tasks_" + s) + "_status"), D)])
159164 }
160165 }
161166
162167
163168
164169 @Callable(p)
165170 func startWork (s) = {
166171 let u = getStringValue(this, (("tasks_" + s) + "_performer"))
167172 if ((toString(p.caller) != getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader"))))
168173 then throw("team leader only")
169174 else WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_started")])
170175 }
171176
172177
173178
174179 @Callable(p)
175180 func rejectTask (s) = if (!(m(p.caller)))
176181 then throw("grants working group access only")
177182 else {
178183 let u = getStringValue(this, (("tasks_" + s) + "_performer"))
179184 WriteSet([DataEntry((("tasks_" + s) + "_status"), "rejected"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_process"), "rejected")])
180185 }
181186
182187
183188
184189 @Callable(p)
185190 func acceptWorkResult (s,E) = if (!(m(p.caller)))
186191 then throw("grants working group access only")
187192 else {
188193 let F = b((("tasks_" + s) + "_reward"))
189194 let u = getStringValue(this, (("tasks_" + s) + "_performer"))
190195 let G = getStringValue(this, (((("tasks_" + s) + "_app_") + u) + "_leader"))
191196 ScriptResult(WriteSet([DataEntry((("tasks_" + s) + "_status"), "work_finished"), DataEntry((((("tasks_" + s) + "_app_") + u) + "_report"), E)]), TransferSet([ScriptTransfer(addressFromStringValue(G), F, unit)]))
192197 }
193198
194199

github/deemru/w8io/169f3d6 
42.47 ms