tx · EigQthiRcwfkBtqGUVjmvMan6w8tvR4AEjRxD8abDnBX

3N2nCHvKXtFH8RUsGQB4LVEwVEWfTsT5i2B:  -0.01400000 Waves

2019.07.14 21:23 [585772] smart account 3N2nCHvKXtFH8RUsGQB4LVEwVEWfTsT5i2B > SELF 0.00000000 Waves

{ "type": 13, "id": "EigQthiRcwfkBtqGUVjmvMan6w8tvR4AEjRxD8abDnBX", "fee": 1400000, "feeAssetId": null, "timestamp": 1563128630922, "version": 1, "sender": "3N2nCHvKXtFH8RUsGQB4LVEwVEWfTsT5i2B", "senderPublicKey": "6NXakHCUpkyyHNuwDVZ4gYubvvbuP2qL6v2WzJhniSN1", "proofs": [ "3496ezq83cmZkDaTmU5VxsFV4Ekw4WEzQaBnDbp24RLiCMf2j6KyKEPPGDh6Fy7jysdzHUxfTzM7Pc9zvB4nJsWV" ], "script": "base64:AAIDAAAAAAAAAAAAAAAdAAAAAAZWT1RFUlMAAAAAAAAAAAQAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAETk9ORQIAAAAEbm9uZQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9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RlaSB2b3RhbnRpIG5vbiDDqCBzdGF0byByYWdnaXVudG8DCQEAAAACIT0AAAACCQEAAAAOZ2V0VmFsdWVSZXZlYWwAAAACBQAAAARpdGVtBQAAAAR1c2VyBQAAAAROT05FCQAAAgAAAAECAAAAK2wndXRlbnRlIGhhIGdpw6AgcGFydGVjaXBhdG8gYWxsYSB2b3RhemlvbmUDAwkBAAAAAiE9AAAAAgUAAAAGc3RhdHVzBQAAAAZSRVZFQUwJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAAGVk9USU5HBwkAAAIAAAABAgAAAAxTdGF0byBlcnJhdG8DAwkBAAAAAiE9AAAAAgUAAAAEdm90ZQUAAAAIRkVBVFVSRUQJAQAAAAIhPQAAAAIFAAAABHZvdGUFAAAACERFTElTVEVEBwkAAAIAAAABAgAAAAtWb3RvIGVycmF0bwMDCQAAAAAAAAIFAAAABnN0YXR1cwUAAAAIRkVBVFVSRUQGCQAAAAAAAAIFAAAABnN0YXR1cwUAAAAIREVMSVNURUQJAAACAAAAAQIAAAAbTGEgdm90YXppb25lIHNpIMOoIGNvbmNsdXNhCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAMZ2V0S2V5UmV2ZWFsAAAAAgUAAAAEaXRlbQUAAAAEdXNlcgUAAAAEdm90ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAD2dldEtleVZvdGVDb3VudAAAAAIFAAAABGl0ZW0FAAAABHZvdGUFAAAADG5ld1ZvdGVDb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtAwkAAGcAAAACBQAAAAxuZXdWb3RlQ291bnQFAAAABlFVT1JVTQUAAAAGVk9USU5HBQAAAAZSRVZFQUwFAAAAA25pbAAAAABcoM7w", "chainId": 84, "height": 585772, "spentComplexity": 0 } View: original | compacted Prev: BxAEFqLpLBmo8f6CiSvR8bTZPV5huyXPYvesVwkSBmJc Next: B4W5ixJoUcMmMq8uWTFLKxieQJmpjbE7UgW8Vo32Tat5 Diff:
OldNewDifferences
117117 else if (if ((R != g))
118118 then (R != c)
119119 else false)
120- then throw("Votazione non possibile")
120+ then throw(("Votazione non possibile " + R))
121121 else {
122122 let S = (Q + 1)
123123 WriteSet([DataEntry(o(p, q), P), DataEntry(s(p), S), DataEntry(w(p), if ((S == a))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 4
55
66 let b = 2
77
88 let c = "voting"
99
1010 let d = "reveal"
1111
1212 let e = "featured"
1313
1414 let f = "delisted"
1515
1616 let g = "none"
1717
1818 func h (i) = {
1919 let j = {
2020 let k = getInteger(this, i)
2121 if ($isInstanceOf(k, "Int"))
2222 then {
2323 let l = k
2424 l
2525 }
2626 else 0
2727 }
2828 j
2929 }
3030
3131
3232 func m (i) = {
3333 let n = {
3434 let k = getString(this, i)
3535 if ($isInstanceOf(k, "String"))
3636 then {
3737 let l = k
3838 l
3939 }
4040 else g
4141 }
4242 n
4343 }
4444
4545
4646 func o (p,q) = (((p + "_") + q) + "_commit")
4747
4848
4949 func r (p,q) = m(o(p, q))
5050
5151
5252 func s (p) = (p + "_commit_count")
5353
5454
5555 func t (p) = h(s(p))
5656
5757
5858 func u (p,q) = (((p + "_") + q) + "_reveal")
5959
6060
6161 func v (p,q) = m(u(p, q))
6262
6363
6464 func w (p) = (p + "_status")
6565
6666
6767 func x (p) = m(w(p))
6868
6969
7070 func y (p,z) = ((p + "_res_") + z)
7171
7272
7373 func A (p,z) = h(y(p, z))
7474
7575
7676 func B (p) = (p + "_price")
7777
7878
7979 func C (p) = h(B(p))
8080
8181
8282 func D (q,p) = (((p + "_") + q) + "_cnt")
8383
8484
8585 func E (q,p) = h(D(q, p))
8686
8787
8888 func F (G,H) = ("item_" + toBase58String(sha256(toBytes((G + H)))))
8989
9090
9191 func I (p) = (p + "_data")
9292
9393
9494 func J (p) = (p + "_owner")
9595
9696
9797 func K (p) = m(J(p))
9898
9999
100100 func L (M) = (M + "_balance")
101101
102102
103103 func N (M) = h(L(M))
104104
105105
106106 @Callable(O)
107107 func voteCommit (p,P) = {
108108 let q = toBase58String(O.caller.bytes)
109109 let Q = t(p)
110110 let R = x(p)
111111 if ((Q >= a))
112112 then throw("Raggiunto il numero massimo di voti")
113113 else if ((r(p, q) != g))
114114 then throw("Hai già espresso un voto per questo articolo")
115115 else if ((J(p) == g))
116116 then throw("L'articolo che vuoi votare non esiste")
117117 else if (if ((R != g))
118118 then (R != c)
119119 else false)
120- then throw("Votazione non possibile")
120+ then throw(("Votazione non possibile " + R))
121121 else {
122122 let S = (Q + 1)
123123 WriteSet([DataEntry(o(p, q), P), DataEntry(s(p), S), DataEntry(w(p), if ((S == a))
124124 then d
125125 else c)])
126126 }
127127 }
128128
129129
130130
131131 @Callable(O)
132132 func voteReveal (p,z,T) = {
133133 let q = toBase58String(O.caller.bytes)
134134 let R = x(p)
135135 let U = (A(p, z) + 1)
136136 if ((toBase58String(sha256(toBytes((z + T)))) != r(p, q)))
137137 then throw("Reveal data is not valid")
138138 else if ((a > t(p)))
139139 then throw("Il numero massimo dei votanti non è stato raggiunto")
140140 else if ((v(p, q) != g))
141141 then throw("l'utente ha già partecipato alla votazione")
142142 else if (if ((R != d))
143143 then (R != c)
144144 else false)
145145 then throw("Stato errato")
146146 else if (if ((z != e))
147147 then (z != f)
148148 else false)
149149 then throw("Voto errato")
150150 else if (if ((R == e))
151151 then true
152152 else (R == f))
153153 then throw("La votazione si è conclusa")
154154 else WriteSet([DataEntry(u(p, q), z), DataEntry(y(p, z), U), DataEntry(w(p), if ((U >= b))
155155 then c
156156 else d)])
157157 }
158158
159159

github/deemru/w8io/026f985 
34.81 ms