tx · 5Y39PyhQ8PRGmTHduAmx5QmYLyX8yZZJVzgSzEJChgzu

3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z:  -0.01400000 Waves

2019.10.18 18:33 [725626] smart account 3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z > SELF 0.00000000 Waves

{ "type": 13, "id": "5Y39PyhQ8PRGmTHduAmx5QmYLyX8yZZJVzgSzEJChgzu", "fee": 1400000, "feeAssetId": null, "timestamp": 1571412900231, "version": 1, "sender": "3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z", "senderPublicKey": "EEGsMXJbL3i6pER7gfBpcw87Km3h2gz6qiqhqPXbdob1", "proofs": [ "3eHWViP5C8ZacESHb14ndDVY22XnddM3YYfLGnAVnuqWRsA7v7hJVpqAc2KGRXJoWB13hZ5hjSuUYTD6Xfut1yeW" ], "script": "base64:AAIDAAAAAAAAABIIARIAEgUKAwgBCBIAEgMKAQEAAAANAAAAAAVvd25lcgEAAAAgxI5sOc85F96AyMEOQS+ZrrcXbjWOtavgO5Vy9VGjFCwBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAABm51bWJlcgQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAAGbnVtYmVyAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAZzdHJpbmcEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAABG5vbmUFAAAABnN0cmluZwEAAAAPZ2V0SXRlbUtleVByaWNlAAAAAQAAAARpdGVtCQABLAAAAAIFAAAABGl0ZW0CAAAABl9wcmljZQEAAAARZ2V0V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mVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABYQUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAABW93bmVyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWIFAAAAByRtYXRjaDAGBzcVMZY=", "chainId": 84, "height": 725626, "spentComplexity": 0 } View: original | compacted Prev: BEBVB9dADX4fvRRDye9yrfxdVNzT9FWzNwqPpWaYJd3q Next: none Diff:
OldNewDifferences
107107
108108
109109 @Callable(x)
110-func purchare () = {
110+func purchase () = {
111111 let y = extract(x.payment)
112112 if (isDefined(y.assetId))
113113 then throw("you can use WAVES only at the moment")
123123 else 0
124124 }
125125 if ((D > y.amount))
126- then throw("purchare amount cannot be less that item price")
126+ then throw("purchase amount cannot be less that item price")
127127 else if ((y.amount > D))
128- then throw("purchare amount cannot be higher that item price")
129- else WriteSet([DataEntry(("status:purchare_item_A_customer_" + G), "confirmed"), DataEntry(("price:purchare_item_A_customer" + G), D)])
128+ then throw("purchase amount cannot be higher that item price")
129+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + G), "confirmed"), DataEntry(("price:purchase_item_A_customer" + G), D)])
130130 }
131131 }
132132
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'EEGsMXJbL3i6pER7gfBpcw87Km3h2gz6qiqhqPXbdob1'
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 h = {
2222 let e = getString(this, c)
2323 if ($isInstanceOf(e, "String"))
2424 then {
2525 let f = e
2626 f
2727 }
2828 else "none"
2929 }
3030 h
3131 }
3232
3333
3434 func i (j) = (j + "_price")
3535
3636
3737 func k (j) = b(i(j))
3838
3939
4040 func l (m,j) = (((j + "_") + m) + "count")
4141
4242
4343 func n (m,j) = b(l(m, j))
4444
4545
4646 func o (p,q) = ("item_" + toBase58String(toBytes((p + q))))
4747
4848
4949 func r (j) = (j + "_data")
5050
5151
5252 func s (j) = (j + "_owner")
5353
5454
5555 func t (j) = g(s(j))
5656
5757
5858 func u (v) = (v + "_balance")
5959
6060
6161 func w (v) = b(u(v))
6262
6363
6464 @Callable(x)
6565 func deposit () = {
6666 let y = extract(x.payment)
6767 if (isDefined(y.assetId))
6868 then throw("you can use WAVES only at the moment")
6969 else {
7070 let z = toBase58String(x.caller.bytes)
7171 let A = {
7272 let e = getInteger(this, ("wl_sts" + z))
7373 if ($isInstanceOf(e, "Int"))
7474 then {
7575 let f = e
7676 f
7777 }
7878 else 0
7979 }
8080 let B = {
8181 let e = getString(this, ("wls_sts" + z))
8282 if ($isInstanceOf(e, "String"))
8383 then {
8484 let f = e
8585 f
8686 }
8787 else throw("user has not waitlisted")
8888 }
8989 let C = (A + y.amount)
9090 WriteSet([DataEntry(z, C)])
9191 }
9292 }
9393
9494
9595
9696 @Callable(x)
9797 func addItem (q,D,E) = {
9898 let F = toBase58String(x.caller.bytes)
9999 let j = o(F, q)
100100 if ((0 >= D))
101101 then throw("purchase amount cannot be less that item price")
102102 else if (("none" != t(j)))
103103 then throw("an item is alreadt exist")
104104 else WriteSet([DataEntry(s(j), F), DataEntry(i(j), D), DataEntry(r(j), E)])
105105 }
106106
107107
108108
109109 @Callable(x)
110-func purchare () = {
110+func purchase () = {
111111 let y = extract(x.payment)
112112 if (isDefined(y.assetId))
113113 then throw("you can use WAVES only at the moment")
114114 else {
115115 let G = toBase58String(x.caller.bytes)
116116 let D = {
117117 let e = getInteger(this, "item_A_coupon_price")
118118 if ($isInstanceOf(e, "Int"))
119119 then {
120120 let f = e
121121 f
122122 }
123123 else 0
124124 }
125125 if ((D > y.amount))
126- then throw("purchare amount cannot be less that item price")
126+ then throw("purchase amount cannot be less that item price")
127127 else if ((y.amount > D))
128- then throw("purchare amount cannot be higher that item price")
129- else WriteSet([DataEntry(("status:purchare_item_A_customer_" + G), "confirmed"), DataEntry(("price:purchare_item_A_customer" + G), D)])
128+ then throw("purchase amount cannot be higher that item price")
129+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + G), "confirmed"), DataEntry(("price:purchase_item_A_customer" + G), D)])
130130 }
131131 }
132132
133133
134134
135135 @Callable(x)
136136 func withdraw (H) = {
137137 let z = toBase58String(x.caller.bytes)
138138 let A = {
139139 let e = getInteger(this, z)
140140 if ($isInstanceOf(e, "Int"))
141141 then {
142142 let f = e
143143 f
144144 }
145145 else 0
146146 }
147147 let C = (A - H)
148148 if ((0 > H))
149149 then throw("can't withdraw negative amount")
150150 else if ((0 > C))
151151 then throw("not enough balance")
152152 else ScriptResult(WriteSet([DataEntry(z, C)]), TransferSet([ScriptTransfer(x.caller, H, unit)]))
153153 }
154154
155155
156156 @Verifier(I)
157157 func J () = {
158158 let e = I
159159 if ($isInstanceOf(e, "SetScriptTransaction"))
160160 then {
161161 let f = e
162162 sigVerify(I.bodyBytes, I.proofs[0], a)
163163 }
164164 else if ($isInstanceOf(e, "DataTransaction"))
165165 then {
166166 let K = e
167167 true
168168 }
169169 else false
170170 }
171171

github/deemru/w8io/169f3d6 
41.52 ms