tx · AcG73AascJjsA5136DAHZxoZQSQWdrEjBJKLc8BskNVE

3MyJoBjw9nC4uhgWULVJUaEZEL6z9As7Yfq:  -0.00900000 Waves

2022.07.06 20:40 [2128140] smart account 3MyJoBjw9nC4uhgWULVJUaEZEL6z9As7Yfq > SELF 0.00000000 Waves

{ "type": 13, "id": "AcG73AascJjsA5136DAHZxoZQSQWdrEjBJKLc8BskNVE", "fee": 900000, "feeAssetId": null, "timestamp": 1657129266487, "version": 2, "chainId": 84, "sender": "3MyJoBjw9nC4uhgWULVJUaEZEL6z9As7Yfq", "senderPublicKey": "6E1saVK6whrqLsuLBQRGg6smask3XK5nkfiAWyGd3pEm", "proofs": [ "4PFKhJAZL7wquK1pL7DfmSC4UCSJ8GTL21Eq5c33EcS37VXbRwH2HDdkkcMNKxJMB1cdaMQEcyFgXDm8FGUcxRhj" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgMKAQgSAwoBCBIECgIICAAAABIAAAAADVZPVElOR19CTE9DS1MAAAAAAAAAAGQAAAAAC1ZPVEVfQ0xPU0VEAgAAAAZDTE9TRUQAAAAAC1ZPVEVfT1BFTkVEAgAAAARPUEVOAAAAAAxEWVpfQVNTRVRfSUQCAAAALEcyUGI3Q016dHBzN1hFVkdDaVV1SmtMaVMzWkNvNjlBUFFOYkpzMm56MjFqAAAAAA5NSU5fRFlaX0FNT1VOVAAAAAAABfXhAAAAAAAPc3RhdHVzS2V5UHJlZml4AgAAAAdzdGF0dXNfAAAAAA1vcGVuS2V5UHJlZml4AgAAAAVvcGVuXwAAAAAOdG90YWxZZXNTdWZmaXgCAAAACl90b3RhbF95ZXMAAAAADXRvdGFsTm9TdWZmaXgCAAAACV90b3RhbF9ubwAAAAAPcmVwYXltZW50UHJlZml4AgAAAApyZXBheW1lbnRfAQAAAAxnZXRTdGF0dXNLZXkAAAABAAAAAmlkCQABLAAAAAIFAAAAD3N0YXR1c0tleVByZWZpeAUAAAACaWQBAAAACmdldE9wZW5LZXkAAAABAA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GF5bWVudEtleQUAAAAGYW1vdW50BQAAAANuaWwDCQAAAAAAAAIFAAAABHZvdGUCAAAAAm5vBAAAAAlub1ZvdGVLZXkJAQAAAA1nZXRUb3RhbE5vS2V5AAAAAQUAAAACaWQEAAAADG5vVm90ZXNTb0ZhcgQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAAlub1ZvdGVLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAKbmV3Tm9Wb3RlcwkAAGQAAAACBQAAAAxub1ZvdGVzU29GYXIAAAAAAAAAAAEJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAACW5vVm90ZUtleQUAAAAKbmV3Tm9Wb3RlcwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAMcmVwYXltZW50S2V5BQAAAAZhbW91bnQFAAAAA25pbAUAAAADbmlsBQAAAAhuZXdFbnRyeQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5OZTMlQ==", "height": 2128140, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EYaR3BHXGddTaVa4ZKoWNBk93z8m7KUfSfkWar7NFenp Next: HoaLEY4orje8FnnPmpTcDgTgv2E6pogBrdY3KXgEEGah Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 10
4+let a = 100
55
66 let b = "CLOSED"
77
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 10
4+let a = 100
55
66 let b = "CLOSED"
77
88 let c = "OPEN"
99
1010 let d = "G2Pb7CMztps7XEVGCiUuJkLiS3ZCo69APQNbJs2nz21j"
1111
1212 let e = 100000000
1313
1414 let f = "status_"
1515
1616 let g = "open_"
1717
1818 let h = "_total_yes"
1919
2020 let i = "_total_no"
2121
2222 let j = "repayment_"
2323
2424 func k (l) = (f + l)
2525
2626
2727 func m (l) = (g + l)
2828
2929
3030 func n (l) = (l + h)
3131
3232
3333 func o (l) = (l + h)
3434
3535
3636 func p (l) = {
3737 let q = k(l)
3838 let r = getString(this, q)
3939 r
4040 }
4141
4242
4343 func s (l,t) = (((j + l) + "_") + toString(t))
4444
4545
4646 func u (l) = {
4747 let v = {
4848 let w = getInteger(this, m(l))
4949 if ($isInstanceOf(w, "Int"))
5050 then {
5151 let x = w
5252 x
5353 }
5454 else -1
5555 }
5656 v
5757 }
5858
5959
6060 func y (l,t) = {
6161 let z = s(l, t)
6262 let v = {
6363 let w = getInteger(this, z)
6464 if ($isInstanceOf(w, "Int"))
6565 then {
6666 let x = w
6767 x
6868 }
6969 else -1
7070 }
7171 v
7272 }
7373
7474
7575 @Callable(A)
7676 func openVote (l) = {
7777 let B = m(l)
7878 let q = k(l)
7979 [StringEntry(q, c), IntegerEntry(B, height)]
8080 }
8181
8282
8383
8484 @Callable(A)
8585 func closeVote (l) = {
8686 let q = k(l)
8787 [StringEntry(q, b)]
8888 }
8989
9090
9191
9292 @Callable(A)
9393 func claim (l) = {
9494 let C = u(l)
9595 if ((C == -1))
9696 then throw("No vote started for this id!")
9797 else if (((C + a) >= height))
9898 then throw("You can only claim after vote ends!")
9999 else {
100100 let D = A.caller
101101 let E = y(l, D)
102102 let q = k(l)
103103 let z = s(l, D)
104104 if ((E > 0))
105105 then [ScriptTransfer(D, E, toBytes(d)), StringEntry(q, b), IntegerEntry(z, 0)]
106106 else throw("Nothing to claim!")
107107 }
108108 }
109109
110110
111111
112112 @Callable(A)
113113 func vote (l,F) = if ((size(A.payments) != 1))
114114 then throw("One payment in DZY needs to be attached")
115115 else {
116116 let G = value(A.payments[0])
117117 let D = A.caller
118118 let H = G.amount
119119 if (!(isDefined(G.assetId)))
120120 then throw("Payment in Waves not allowed!")
121121 else {
122122 let I = toBase58String(value(G.assetId))
123123 if ((I != d))
124124 then throw("payment in DZY necessary!")
125125 else if ((H != e))
126126 then throw("payment amount wrong!")
127127 else {
128128 let z = s(l, D)
129129 let J = p(l)
130130 if ((J == b))
131131 then throw("vote closed!")
132132 else {
133133 let K = {
134134 let w = getInteger(this, m(l))
135135 if ($isInstanceOf(w, "Int"))
136136 then {
137137 let x = w
138138 x
139139 }
140140 else 0
141141 }
142142 if ((height > (K + a)))
143143 then throw("voting ended!")
144144 else {
145145 let L = if ((F == "yes"))
146146 then {
147147 let M = n(l)
148148 let N = {
149149 let w = getInteger(this, M)
150150 if ($isInstanceOf(w, "Int"))
151151 then {
152152 let O = w
153153 O
154154 }
155155 else 0
156156 }
157157 let P = (N + 1)
158158 [IntegerEntry(M, P), IntegerEntry(z, H)]
159159 }
160160 else if ((F == "no"))
161161 then {
162162 let Q = o(l)
163163 let R = {
164164 let w = getInteger(this, Q)
165165 if ($isInstanceOf(w, "Int"))
166166 then {
167167 let O = w
168168 O
169169 }
170170 else 0
171171 }
172172 let S = (R + 1)
173173 [IntegerEntry(Q, S), IntegerEntry(z, H)]
174174 }
175175 else nil
176176 L
177177 }
178178 }
179179 }
180180 }
181181 }
182182
183183
184184 @Verifier(T)
185185 func U () = sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey)
186186

github/deemru/w8io/169f3d6 
42.99 ms