tx · FKfSZvKbZ1DuMByKrSahfY7BGgX9Bq74X3XkFNqPdGaB

3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq:  -0.01400000 Waves

2019.06.22 21:45 [553633] smart account 3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq > SELF 0.00000000 Waves

{ "type": 13, "id": "FKfSZvKbZ1DuMByKrSahfY7BGgX9Bq74X3XkFNqPdGaB", "fee": 1400000, "feeAssetId": null, "timestamp": 1561229158987, "version": 1, "sender": "3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq", "senderPublicKey": "4fygXNNAjU52sT9N6uq4o9Ck8G75e94ukktN3pd4VxVo", "proofs": [ "5qZ8v5esARSyfPKUWCxMCLCRNNcSwpn2XKe8CoX3TzebC2MVxauYW19mkuJhhr3HMoCkLWWrFapZpUMFgKPfK8WB" ], "script": "base64:AAIDAAAAAAAAAAAAAAAdAAAAAAROT05FAgAAAARub25lAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAGX3ByaWNlAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAFWdldEtleVVzZXJJdGVtQ291bnRlcgAAAAIAAAAEdXNlcgAAAARpdGVtCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARpdGVtA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ZW0FAAAABE5PTkUJAAACAAAAAQIAAAASaXRlbSBkb2Vzbm90IGV4aXN0AwMJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAAETk9ORQkBAAAAAiE9AAAAAgUAAAAGc3RhdHVzBQAAAAZWb3RpbmcHCQAAAgAAAAECAAAADW5vdCBwb3NzaWxibGUJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAAxnZXRLZXlDb21taXQAAAACBQAAAARpdGVtBQAAAAR1c2VyBQAAAARoYXNoCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAASZ2V0S2V5Q29tbWl0c0NvdW50AAAAAQUAAAAEaXRlbQkAAGQAAAACBQAAAAdjb21taXRzAAAAAAAAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAQZ2V0S2V5SXRlbVN0YXR1cwAAAAEFAAAABGl0ZW0DCQAAAAAAAAIFAAAAB2NvbW1pdHMFAAAABlZvdGVycwUAAAAGUmV2ZWFsBQAAAAZWb3RpbmcFAAAAA25pbAAAAABJrT0l", "chainId": 84, "height": 553633, "spentComplexity": 0 } View: original | compacted Prev: HeRHzxxTGC5NoPqJLvFtMF9b7mDb9zjEuaZRaw3yGjU6 Next: 42ujvvpHFCiMcy7LXZpHraEq7P2agG58WrsiMxkN77FJ Diff:
OldNewDifferences
6161 func w (v) = d(u(v))
6262
6363
64-@Callable(x)
65-func additem (q,y,z) = {
66- let A = toBase58String(x.caller.bytes)
67- let c = o(A, q)
68- if ((0 >= y))
64+let x = 3
65+
66+let y = 2
67+
68+let z = "voting"
69+
70+let A = "reveal"
71+
72+let B = "featured"
73+
74+let C = "delisted"
75+
76+func D (c,l) = (((c + "_") + l) + "_commit")
77+
78+
79+func E (c,l) = i(D(c, l))
80+
81+
82+func F (c) = (c + "+comcnt")
83+
84+
85+func G (c) = d(F(c))
86+
87+
88+func H (c,l) = (((c + "_") + l) + "_reveal")
89+
90+
91+func I (c,l) = i(H(c, l))
92+
93+
94+func J (c) = (c + "_status")
95+
96+
97+func K (c) = i(J(c))
98+
99+
100+func L (c,M) = ((c + "_res:") + M)
101+
102+
103+func N (c,M) = d(L(c, M))
104+
105+
106+@Callable(O)
107+func additem (q,P,Q) = {
108+ let R = toBase58String(O.caller.bytes)
109+ let c = o(R, q)
110+ if ((0 >= P))
69111 then throw("purchase amount cannot be less than 0 or 0")
70112 else if ((t(c) != a))
71113 then throw("an item already exists")
72- else WriteSet([DataEntry(s(c), A), DataEntry(b(c), y), DataEntry(r(c), z)])
114+ else WriteSet([DataEntry(s(c), R), DataEntry(b(c), P), DataEntry(r(c), Q)])
73115 }
74116
75117
76118
77-@Callable(x)
119+@Callable(O)
78120 func purchase (c) = {
79- let B = extract(x.payment)
80- if (isDefined(B.assetId))
121+ let S = extract(O.payment)
122+ if (isDefined(S.assetId))
81123 then throw("Can use Waves only at the moment")
82124 else {
83- let C = toBase58String(x.caller.bytes)
84- let y = m(c)
85- let D = t(c)
86- if ((y > B.amount))
125+ let T = toBase58String(O.caller.bytes)
126+ let P = m(c)
127+ let U = t(c)
128+ if ((P > S.amount))
87129 then throw("purchase amount cannot be less than item price ")
88- else if ((B.amount > y))
130+ else if ((S.amount > P))
89131 then throw("purchase amount cannot be higher than item price")
90- else WriteSet([DataEntry(k(C, c), (n(C, c) + 1)), DataEntry(u(D), (w(D) + B.amount))])
132+ else WriteSet([DataEntry(k(T, c), (n(T, c) + 1)), DataEntry(u(U), (w(U) + S.amount))])
91133 }
92134 }
93135
94136
95137
96-@Callable(x)
138+@Callable(O)
97139 func withdraw () = {
98- let E = toBase58String(x.caller.bytes)
99- let F = d("3MqjzNpmZAF3K7W6RRcezbSdWorMAXXwdqo_balance")
100- if ((0 >= F))
140+ let V = toBase58String(O.caller.bytes)
141+ let W = d("3MqjzNpmZAF3K7W6RRcezbSdWorMAXXwdqo_balance")
142+ if ((0 >= W))
101143 then throw("Insufficient Balance xD")
102- else ScriptResult(WriteSet([DataEntry(u(E), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(E), F, unit)]))
144+ else ScriptResult(WriteSet([DataEntry(u(V), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(V), W, unit)]))
145+ }
146+
147+
148+
149+@Callable(O)
150+func voteCommit (c,X) = {
151+ let l = toBase58String(O.caller.bytes)
152+ let Y = G(c)
153+ let Z = K(c)
154+ if ((Y >= x))
155+ then throw("Max votes")
156+ else if ((E(c, l) != a))
157+ then throw("already done")
158+ else if ((s(c) == a))
159+ then throw("item doesnot exist")
160+ else if (if ((Z != a))
161+ then (Z != z)
162+ else false)
163+ then throw("not possilble")
164+ else WriteSet([DataEntry(D(c, l), X), DataEntry(F(c), (Y + 1)), DataEntry(J(c), if ((Y == x))
165+ then A
166+ else z)])
103167 }
104168
105169
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "none"
55
66 func b (c) = (c + "_price")
77
88
99 func d (e) = {
1010 let f = {
1111 let g = getInteger(this, e)
1212 if ($isInstanceOf(g, "Int"))
1313 then {
1414 let h = g
1515 h
1616 }
1717 else 0
1818 }
1919 f
2020 }
2121
2222
2323 func i (e) = {
2424 let j = {
2525 let g = getString(this, e)
2626 if ($isInstanceOf(g, "String"))
2727 then {
2828 let h = g
2929 h
3030 }
3131 else a
3232 }
3333 j
3434 }
3535
3636
3737 func k (l,c) = (((c + "_") + l) + "_cnt")
3838
3939
4040 func m (c) = d(b(c))
4141
4242
4343 func n (l,c) = d(k(l, c))
4444
4545
4646 func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q)))))
4747
4848
4949 func r (c) = (c + "_data")
5050
5151
5252 func s (c) = (c + "_owner")
5353
5454
5555 func t (c) = i(s(c))
5656
5757
5858 func u (v) = (v + "_balance")
5959
6060
6161 func w (v) = d(u(v))
6262
6363
64-@Callable(x)
65-func additem (q,y,z) = {
66- let A = toBase58String(x.caller.bytes)
67- let c = o(A, q)
68- if ((0 >= y))
64+let x = 3
65+
66+let y = 2
67+
68+let z = "voting"
69+
70+let A = "reveal"
71+
72+let B = "featured"
73+
74+let C = "delisted"
75+
76+func D (c,l) = (((c + "_") + l) + "_commit")
77+
78+
79+func E (c,l) = i(D(c, l))
80+
81+
82+func F (c) = (c + "+comcnt")
83+
84+
85+func G (c) = d(F(c))
86+
87+
88+func H (c,l) = (((c + "_") + l) + "_reveal")
89+
90+
91+func I (c,l) = i(H(c, l))
92+
93+
94+func J (c) = (c + "_status")
95+
96+
97+func K (c) = i(J(c))
98+
99+
100+func L (c,M) = ((c + "_res:") + M)
101+
102+
103+func N (c,M) = d(L(c, M))
104+
105+
106+@Callable(O)
107+func additem (q,P,Q) = {
108+ let R = toBase58String(O.caller.bytes)
109+ let c = o(R, q)
110+ if ((0 >= P))
69111 then throw("purchase amount cannot be less than 0 or 0")
70112 else if ((t(c) != a))
71113 then throw("an item already exists")
72- else WriteSet([DataEntry(s(c), A), DataEntry(b(c), y), DataEntry(r(c), z)])
114+ else WriteSet([DataEntry(s(c), R), DataEntry(b(c), P), DataEntry(r(c), Q)])
73115 }
74116
75117
76118
77-@Callable(x)
119+@Callable(O)
78120 func purchase (c) = {
79- let B = extract(x.payment)
80- if (isDefined(B.assetId))
121+ let S = extract(O.payment)
122+ if (isDefined(S.assetId))
81123 then throw("Can use Waves only at the moment")
82124 else {
83- let C = toBase58String(x.caller.bytes)
84- let y = m(c)
85- let D = t(c)
86- if ((y > B.amount))
125+ let T = toBase58String(O.caller.bytes)
126+ let P = m(c)
127+ let U = t(c)
128+ if ((P > S.amount))
87129 then throw("purchase amount cannot be less than item price ")
88- else if ((B.amount > y))
130+ else if ((S.amount > P))
89131 then throw("purchase amount cannot be higher than item price")
90- else WriteSet([DataEntry(k(C, c), (n(C, c) + 1)), DataEntry(u(D), (w(D) + B.amount))])
132+ else WriteSet([DataEntry(k(T, c), (n(T, c) + 1)), DataEntry(u(U), (w(U) + S.amount))])
91133 }
92134 }
93135
94136
95137
96-@Callable(x)
138+@Callable(O)
97139 func withdraw () = {
98- let E = toBase58String(x.caller.bytes)
99- let F = d("3MqjzNpmZAF3K7W6RRcezbSdWorMAXXwdqo_balance")
100- if ((0 >= F))
140+ let V = toBase58String(O.caller.bytes)
141+ let W = d("3MqjzNpmZAF3K7W6RRcezbSdWorMAXXwdqo_balance")
142+ if ((0 >= W))
101143 then throw("Insufficient Balance xD")
102- else ScriptResult(WriteSet([DataEntry(u(E), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(E), F, unit)]))
144+ else ScriptResult(WriteSet([DataEntry(u(V), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(V), W, unit)]))
145+ }
146+
147+
148+
149+@Callable(O)
150+func voteCommit (c,X) = {
151+ let l = toBase58String(O.caller.bytes)
152+ let Y = G(c)
153+ let Z = K(c)
154+ if ((Y >= x))
155+ then throw("Max votes")
156+ else if ((E(c, l) != a))
157+ then throw("already done")
158+ else if ((s(c) == a))
159+ then throw("item doesnot exist")
160+ else if (if ((Z != a))
161+ then (Z != z)
162+ else false)
163+ then throw("not possilble")
164+ else WriteSet([DataEntry(D(c, l), X), DataEntry(F(c), (Y + 1)), DataEntry(J(c), if ((Y == x))
165+ then A
166+ else z)])
103167 }
104168
105169

github/deemru/w8io/026f985 
46.89 ms