tx · Dz14xVuLDy3xWNhWvpZEWDsbGm9v1eCQCtPfRki7jd1p

3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu:  -0.01400000 Waves

2020.11.12 10:52 [1261866] smart account 3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu > SELF 0.00000000 Waves

{ "type": 13, "id": "Dz14xVuLDy3xWNhWvpZEWDsbGm9v1eCQCtPfRki7jd1p", "fee": 1400000, "feeAssetId": null, "timestamp": 1605167571039, "version": 2, "chainId": 84, "sender": "3N5rNyYSAsaP9QL2eQq286RhevB8msHFffu", "senderPublicKey": "CBTEuFN6ku1LNaPuGHHTMh2CBb3kPa5D73XXTJvKydun", "proofs": [ "5ax4Gi7ABDyfarT5Jud5FaRqHYdGDEWFS4iMHHQJyzXYmVA5wuNwsbkFehPPWFPxhXTxGsAemTN6ArKmD2ZpZbGk" ], "script": "base64:AAIDAAAAAAAAACcIARIHCgUICAgICBIECgIICBIDCgEIEgMKAQgSAwoBCBIAEgMKAQEAAAATAAAAAAZ1cFZvdGUCAAAABnVwdm90ZQAAAAANYWRtaW5BZGRyZXNzMQEAAAAaAVQ4tiFYgDZYCD0glAFUKaBkl4Sdk8P2NIsAAAAADWFkbWluQWRkcmVzczIBAAAAGgFU5Y9QPfO/GENOfAQWVCPUAvi8IBb2t+w6AAAAAA1hZG1pbkFkZHJlc3MzAQAAABoBVD6NGwucHiBYhj9yswIcasK4s6nfRDIKFQAAAAAFZHl6SWQBAAAAIH6rQdnOUsq3YY00nk9jVDL2OOQ/e846gXAImq8xTxZrAQAAAA1nZXRQcm9maWxlS2V5AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAUX2VudHJlcHJlbmV1clByb2ZpbGUBAAAADGdldFN0YXR1c0tleQAAAAEAAAACaWQJAAEsAAAAAgUAAAACaWQCAAAAB19zdGF0dXMBAAAAEWdldFZvdGVyQW1vdW50S2V5AAAAAgAAAAJpZAAAAAZ2b3RlSWQJAAEsAAAAAgkAASwAAAACCQABLA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VlvdSBkb24ndCBoYXZlIGFueSBzdGFrZXMDCQAAZgAAAAIFAAAABmFtb3VudAUAAAAMY3VycmVudFN0YWtlCQAAAgAAAAECAAAAM1lvdSBjYW4ndCB3aXRoZHJhdyBhbiBhbW91bnQgaGlnaGVyIHRoYW4geW91IHN0YWtlZAQAAAAPbmV3U3Rha2VkQW1vdW50CQAAZQAAAAIFAAAADGN1cnJlbnRTdGFrZQUAAAAGYW1vdW50CQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADGdldFN0YWtlcktleQAAAAEFAAAABnN0YWtlcgUAAAAPbmV3U3Rha2VkQW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABWR5eklkBQAAAANuaWwAAAAA14PZeQ==", "height": 1261866, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F3Fdv54noSFXLmYRku2G9QF9ktXH6PQaop6nVLY43tby Next: DBo8gern8siwr5h3cZKaV1p9GPuNDkkPEMVQ9rAq7kuf Diff:
OldNewDifferences
9696 }
9797
9898
99-@Callable(z)
100-func addEntrepreneurProfile (A,B,C,D,E) = if (if (if ((z.caller.bytes == b))
99+func z (A) = (A + "_stake")
100+
101+
102+func B (A) = {
103+ let o = getInteger(this, z(A))
104+ if ($isInstanceOf(o, "Int"))
105+ then {
106+ let p = o
107+ p
108+ }
109+ else 0
110+ }
111+
112+
113+@Callable(C)
114+func addEntrepreneurProfile (D,E,F,G,H) = if (if (if ((C.caller.bytes == b))
101115 then true
102- else (z.caller.bytes == c))
116+ else (C.caller.bytes == c))
103117 then true
104- else (z.caller.bytes == d))
118+ else (C.caller.bytes == d))
105119 then {
106- let F = toBase58String(z.transactionId)
107- WriteSet([DataEntry(f(F), ((((((((A + "_") + B) + "_") + C) + "_") + D) + "_") + E)), DataEntry(k(F, "upvote"), 0), DataEntry(m(F, "upvote"), 0), DataEntry(h(F), "open")])
120+ let I = toBase58String(C.transactionId)
121+ WriteSet([DataEntry(f(I), ((((((((D + "_") + E) + "_") + F) + "_") + G) + "_") + H)), DataEntry(k(I, "upvote"), 0), DataEntry(m(I, "upvote"), 0), DataEntry(h(I), "open")])
108122 }
109123 else throw("Only Dyzrupt Admin can call this dApp function")
110124
111125
112126
113-@Callable(z)
127+@Callable(C)
114128 func vote (j,s) = {
115- let G = extract(z.payment)
116- let y = toBase58String(z.caller.bytes)
117- if ((G.amount == 0))
129+ let J = extract(C.payment)
130+ let y = toBase58String(C.caller.bytes)
131+ if ((J.amount == 0))
118132 then throw("You cannot vote without paying voting fee")
119- else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
133+ else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
120134 then throw("You can only vote with DYZRUPT token")
121135 else if (x(y, j))
122136 then if (n(j))
123137 then if ((q(j) == "open"))
124138 then if ((s == a))
125139 then {
126- let H = r(j, s)
127- let I = t(j, s)
128- let J = (H + 1)
129- let K = (I + G.amount)
130- ScriptResult(WriteSet([DataEntry(k(j, s), J), DataEntry(u(y, j), j), DataEntry(i(y, j), G.amount), DataEntry(m(j, s), K)]), TransferSet([ScriptTransfer(this, G.amount, e)]))
140+ let K = r(j, s)
141+ let L = t(j, s)
142+ let M = (K + 1)
143+ let N = (L + J.amount)
144+ ScriptResult(WriteSet([DataEntry(k(j, s), M), DataEntry(u(y, j), j), DataEntry(i(y, j), J.amount), DataEntry(m(j, s), N)]), TransferSet([ScriptTransfer(this, J.amount, e)]))
131145 }
132146 else throw("Not a valid vote value")
133147 else throw("This profile is not open for voting")
137151
138152
139153
140-@Callable(z)
141-func openVote (j) = if (if (if ((z.caller.bytes == b))
154+@Callable(C)
155+func openVote (j) = if (if (if ((C.caller.bytes == b))
142156 then true
143- else (z.caller.bytes == c))
157+ else (C.caller.bytes == c))
144158 then true
145- else (z.caller.bytes == d))
159+ else (C.caller.bytes == d))
146160 then if (n(j))
147161 then WriteSet([DataEntry(h(j), "open")])
148162 else throw("Invalid ID")
150164
151165
152166
153-@Callable(z)
154-func closeVote (j) = if (if (if ((z.caller.bytes == b))
167+@Callable(C)
168+func closeVote (j) = if (if (if ((C.caller.bytes == b))
155169 then true
156- else (z.caller.bytes == c))
170+ else (C.caller.bytes == c))
157171 then true
158- else (z.caller.bytes == d))
172+ else (C.caller.bytes == d))
159173 then if (n(j))
160174 then WriteSet([DataEntry(h(j), "closed")])
161175 else throw("Invalid ID")
163177
164178
165179
166-@Callable(z)
180+@Callable(C)
167181 func withdraw (j) = {
168- let y = toBase58String(z.caller.bytes)
182+ let y = toBase58String(C.caller.bytes)
169183 if ((w(y, j) != ""))
170184 then if ((q(j) == "closed"))
171185 then {
172- let L = i(y, j)
173- let M = {
174- let o = getInteger(this, L)
186+ let O = i(y, j)
187+ let P = {
188+ let o = getInteger(this, O)
175189 if ($isInstanceOf(o, "Int"))
176190 then {
177191 let p = o
179193 }
180194 else throw("You didn't vote for this entrepreneur")
181195 }
182- if ((M == 0))
196+ if ((P == 0))
183197 then throw("Seems you have previously withdrawn.")
184- else ScriptResult(WriteSet([DataEntry(L, 0)]), TransferSet([ScriptTransfer(z.caller, M, e)]))
198+ else ScriptResult(WriteSet([DataEntry(O, 0)]), TransferSet([ScriptTransfer(C.caller, P, e)]))
185199 }
186200 else throw("Can't withdraw vote amount while voting is still open.")
187201 else throw("You didn't vote for this entrepreneur")
202+ }
203+
204+
205+
206+@Callable(C)
207+func stake () = {
208+ let A = toBase58String(C.caller.bytes)
209+ let J = extract(C.payment)
210+ if ((J.amount == 0))
211+ then throw("Stake amount too low")
212+ else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
213+ then throw("You can only stake with DYZRUPT token")
214+ else {
215+ let Q = B(A)
216+ let R = (20 / 100)
217+ let S = (J.amount * R)
218+ let T = (J.amount - S)
219+ let U = (Q + T)
220+ ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(this, J.amount, e)]))
221+ }
222+ }
223+
224+
225+
226+@Callable(C)
227+func unstake (V) = {
228+ let A = toBase58String(C.caller.bytes)
229+ let Q = B(A)
230+ if ((Q == 0))
231+ then throw("You don't have any stakes")
232+ else if ((V > Q))
233+ then throw("You can't withdraw an amount higher than you staked")
234+ else {
235+ let U = (Q - V)
236+ ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(C.caller, V, e)]))
237+ }
188238 }
189239
190240
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "upvote"
55
66 let b = base58'3Mu5woJ54s7vHJgaeNcJ4C9ByfdmMF2jpjC'
77
88 let c = base58'3NAqtCScgFynCuRLUoXm2BHTdu8suatCe7b'
99
1010 let d = base58'3Mucpi1K4FMVrZKnYEgjxQf5DkkBX7QrHoJ'
1111
1212 let e = base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'
1313
1414 func f (g) = (g + "_entrepreneurProfile")
1515
1616
1717 func h (g) = (g + "_status")
1818
1919
2020 func i (g,j) = (((g + "_") + j) + "_amount")
2121
2222
2323 func k (g,l) = if ((l == "upvote"))
2424 then (g + "_upvote")
2525 else throw("Invalid vote type")
2626
2727
2828 func m (g,l) = if ((l == "upvote"))
2929 then (((g + "_") + l) + "_amount")
3030 else throw("Invalid vote type")
3131
3232
3333 func n (g) = {
3434 let o = getString(this, f(g))
3535 if ($isInstanceOf(o, "String"))
3636 then {
3737 let p = o
3838 true
3939 }
4040 else false
4141 }
4242
4343
4444 func q (j) = {
4545 let o = getString(this, h(j))
4646 if ($isInstanceOf(o, "String"))
4747 then {
4848 let p = o
4949 p
5050 }
5151 else false
5252 }
5353
5454
5555 func r (j,s) = {
5656 let o = getInteger(this, k(j, s))
5757 if ($isInstanceOf(o, "Int"))
5858 then {
5959 let p = o
6060 p
6161 }
6262 else throw("Not a valid vote ID")
6363 }
6464
6565
6666 func t (j,s) = {
6767 let o = getInteger(this, m(j, s))
6868 if ($isInstanceOf(o, "Int"))
6969 then {
7070 let p = o
7171 p
7272 }
7373 else 0
7474 }
7575
7676
7777 func u (v,j) = ((((v + "_") + j) + "_") + "vote")
7878
7979
8080 func w (v,j) = {
8181 let o = getString(this, u(v, j))
8282 if ($isInstanceOf(o, "String"))
8383 then {
8484 let p = o
8585 p
8686 }
8787 else ""
8888 }
8989
9090
9191 func x (v,j) = {
9292 let y = w(v, j)
9393 if ((y == ""))
9494 then true
9595 else false
9696 }
9797
9898
99-@Callable(z)
100-func addEntrepreneurProfile (A,B,C,D,E) = if (if (if ((z.caller.bytes == b))
99+func z (A) = (A + "_stake")
100+
101+
102+func B (A) = {
103+ let o = getInteger(this, z(A))
104+ if ($isInstanceOf(o, "Int"))
105+ then {
106+ let p = o
107+ p
108+ }
109+ else 0
110+ }
111+
112+
113+@Callable(C)
114+func addEntrepreneurProfile (D,E,F,G,H) = if (if (if ((C.caller.bytes == b))
101115 then true
102- else (z.caller.bytes == c))
116+ else (C.caller.bytes == c))
103117 then true
104- else (z.caller.bytes == d))
118+ else (C.caller.bytes == d))
105119 then {
106- let F = toBase58String(z.transactionId)
107- WriteSet([DataEntry(f(F), ((((((((A + "_") + B) + "_") + C) + "_") + D) + "_") + E)), DataEntry(k(F, "upvote"), 0), DataEntry(m(F, "upvote"), 0), DataEntry(h(F), "open")])
120+ let I = toBase58String(C.transactionId)
121+ WriteSet([DataEntry(f(I), ((((((((D + "_") + E) + "_") + F) + "_") + G) + "_") + H)), DataEntry(k(I, "upvote"), 0), DataEntry(m(I, "upvote"), 0), DataEntry(h(I), "open")])
108122 }
109123 else throw("Only Dyzrupt Admin can call this dApp function")
110124
111125
112126
113-@Callable(z)
127+@Callable(C)
114128 func vote (j,s) = {
115- let G = extract(z.payment)
116- let y = toBase58String(z.caller.bytes)
117- if ((G.amount == 0))
129+ let J = extract(C.payment)
130+ let y = toBase58String(C.caller.bytes)
131+ if ((J.amount == 0))
118132 then throw("You cannot vote without paying voting fee")
119- else if ((G.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
133+ else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
120134 then throw("You can only vote with DYZRUPT token")
121135 else if (x(y, j))
122136 then if (n(j))
123137 then if ((q(j) == "open"))
124138 then if ((s == a))
125139 then {
126- let H = r(j, s)
127- let I = t(j, s)
128- let J = (H + 1)
129- let K = (I + G.amount)
130- ScriptResult(WriteSet([DataEntry(k(j, s), J), DataEntry(u(y, j), j), DataEntry(i(y, j), G.amount), DataEntry(m(j, s), K)]), TransferSet([ScriptTransfer(this, G.amount, e)]))
140+ let K = r(j, s)
141+ let L = t(j, s)
142+ let M = (K + 1)
143+ let N = (L + J.amount)
144+ ScriptResult(WriteSet([DataEntry(k(j, s), M), DataEntry(u(y, j), j), DataEntry(i(y, j), J.amount), DataEntry(m(j, s), N)]), TransferSet([ScriptTransfer(this, J.amount, e)]))
131145 }
132146 else throw("Not a valid vote value")
133147 else throw("This profile is not open for voting")
134148 else throw("Invalid Profile")
135149 else throw("You can't vote twice")
136150 }
137151
138152
139153
140-@Callable(z)
141-func openVote (j) = if (if (if ((z.caller.bytes == b))
154+@Callable(C)
155+func openVote (j) = if (if (if ((C.caller.bytes == b))
142156 then true
143- else (z.caller.bytes == c))
157+ else (C.caller.bytes == c))
144158 then true
145- else (z.caller.bytes == d))
159+ else (C.caller.bytes == d))
146160 then if (n(j))
147161 then WriteSet([DataEntry(h(j), "open")])
148162 else throw("Invalid ID")
149163 else throw("Only Dyzrupt Admin can call this dApp function")
150164
151165
152166
153-@Callable(z)
154-func closeVote (j) = if (if (if ((z.caller.bytes == b))
167+@Callable(C)
168+func closeVote (j) = if (if (if ((C.caller.bytes == b))
155169 then true
156- else (z.caller.bytes == c))
170+ else (C.caller.bytes == c))
157171 then true
158- else (z.caller.bytes == d))
172+ else (C.caller.bytes == d))
159173 then if (n(j))
160174 then WriteSet([DataEntry(h(j), "closed")])
161175 else throw("Invalid ID")
162176 else throw("Only Dyzrupt Admin can call this dApp function")
163177
164178
165179
166-@Callable(z)
180+@Callable(C)
167181 func withdraw (j) = {
168- let y = toBase58String(z.caller.bytes)
182+ let y = toBase58String(C.caller.bytes)
169183 if ((w(y, j) != ""))
170184 then if ((q(j) == "closed"))
171185 then {
172- let L = i(y, j)
173- let M = {
174- let o = getInteger(this, L)
186+ let O = i(y, j)
187+ let P = {
188+ let o = getInteger(this, O)
175189 if ($isInstanceOf(o, "Int"))
176190 then {
177191 let p = o
178192 p
179193 }
180194 else throw("You didn't vote for this entrepreneur")
181195 }
182- if ((M == 0))
196+ if ((P == 0))
183197 then throw("Seems you have previously withdrawn.")
184- else ScriptResult(WriteSet([DataEntry(L, 0)]), TransferSet([ScriptTransfer(z.caller, M, e)]))
198+ else ScriptResult(WriteSet([DataEntry(O, 0)]), TransferSet([ScriptTransfer(C.caller, P, e)]))
185199 }
186200 else throw("Can't withdraw vote amount while voting is still open.")
187201 else throw("You didn't vote for this entrepreneur")
202+ }
203+
204+
205+
206+@Callable(C)
207+func stake () = {
208+ let A = toBase58String(C.caller.bytes)
209+ let J = extract(C.payment)
210+ if ((J.amount == 0))
211+ then throw("Stake amount too low")
212+ else if ((J.assetId != base58'9XTqBQeJvdMs8VNHv6rXiJLJichg2acG7wCfYcTajQ1G'))
213+ then throw("You can only stake with DYZRUPT token")
214+ else {
215+ let Q = B(A)
216+ let R = (20 / 100)
217+ let S = (J.amount * R)
218+ let T = (J.amount - S)
219+ let U = (Q + T)
220+ ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(this, J.amount, e)]))
221+ }
222+ }
223+
224+
225+
226+@Callable(C)
227+func unstake (V) = {
228+ let A = toBase58String(C.caller.bytes)
229+ let Q = B(A)
230+ if ((Q == 0))
231+ then throw("You don't have any stakes")
232+ else if ((V > Q))
233+ then throw("You can't withdraw an amount higher than you staked")
234+ else {
235+ let U = (Q - V)
236+ ScriptResult(WriteSet([DataEntry(z(A), U)]), TransferSet([ScriptTransfer(C.caller, V, e)]))
237+ }
188238 }
189239
190240

github/deemru/w8io/026f985 
43.89 ms