tx · 9nU4DZzPwf3XWUdVCAtYCgpqLYdq43GJ9qjx3SqkiC8t

3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA:  -0.01400000 Waves

2019.11.13 00:21 [762386] smart account 3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA > SELF 0.00000000 Waves

{ "type": 13, "id": "9nU4DZzPwf3XWUdVCAtYCgpqLYdq43GJ9qjx3SqkiC8t", "fee": 1400000, "feeAssetId": null, "timestamp": 1573593746321, "version": 1, "sender": "3N7pSjP7r8aY9kYSi61ucLbWnm2waE6PcaA", "senderPublicKey": "8wiXMdZVbTSwMFxqoW7jfgropja3bTT7MX8VuQwPwPje", "proofs": [ "3z1cpYm2FxHDSK7cR1jWt7EFxnf6h5p2u5Kk1psG8DMQm8LxJmF6yrwacVQVSySWtBajqai9awVeFvSw9bkGmGCw" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMIAQgAAAAdAAAAAAROT05FAgAAAARub25lAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAD2dldEtleUl0ZW1QcmljZQAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfcHJpY2UBAAAAEWdldFZhbHVlSXRlbVByaWNlAAAAAQAAAARpdGVtCQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABCQEAAAAPZ2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spentComplexity": 0 } View: original | compacted Prev: GRUsa5k4gsKJ5Zy9WLTyzLN6FYwasHb5R2HVcWDh45Ao Next: HBcArQEc1gZGUXUcEYhWKsw7f1KbnwL1hTnRrgD1mEa3 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'8wiXMdZVbTSwMFxqoW7jfgropja3bTT7MX8VuQwPwPje'
4+let a = "none"
55
6-@Callable(b)
7-func purchase () = {
8- let c = extract(b.payment)
9- if (isDefined(c.assetId))
10- then throw("can use WAVES only at the moment")
11- else {
12- let d = toBase58String(b.caller.bytes)
13- let e = {
14- let f = getInteger(this, "item_A_coupon_price")
15- if ($isInstanceOf(f, "Int"))
16- then {
17- let g = f
18- g
19- }
20- else 0
6+func b (c) = {
7+ let d = {
8+ let e = getInteger(this, c)
9+ if ($isInstanceOf(e, "Int"))
10+ then {
11+ let f = e
12+ f
2113 }
22- if ((e > c.amount))
23- then throw("purchase amount cannot be less than item price")
24- else if ((c.amount > e))
25- then throw("purchase amount cannot be higher than item price")
26- else WriteSet([DataEntry(("status:purchase_item_A_customer" + d), "confirmed"), DataEntry(("price:purchase_item_A_customer" + d), e)])
27- }
14+ else 0
15+ }
16+ d
2817 }
2918
3019
31-@Verifier(h)
32-func i () = {
33- let f = h
34- if ($isInstanceOf(f, "SetScriptTransaction"))
35- then {
36- let j = f
37- true
38- }
39- else if ($isInstanceOf(f, "DataTransaction"))
20+func g (c) = {
21+ let h = {
22+ let e = getString(this, c)
23+ if ($isInstanceOf(e, "String"))
4024 then {
41- let j = f
42- true
25+ let f = e
26+ f
4327 }
44- else false
28+ else a
29+ }
30+ h
4531 }
32+
33+
34+func i (j) = (j + "_price")
35+
36+
37+func k (j) = b(i(j))
38+
39+
40+func l (m,j) = (((j + "_") + m) + "_cnt")
41+
42+
43+func n (m,j) = b(l(m, j))
44+
45+
46+func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q)))))
47+
48+
49+func r (j) = (j + "_data")
50+
51+
52+func s (j) = (j + "_owner")
53+
54+
55+func t (j) = g(s(j))
56+
57+
58+func u (v) = (v + "_balance")
59+
60+
61+func w (v) = b(u(v))
62+
63+
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 (j,m) = (((j + "_") + m) + "_commit")
77+
78+
79+func E (j,m) = g(D(j, m))
80+
81+
82+func F (j) = (j + "_comcnt")
83+
84+
85+func G (j) = b(F(j))
86+
87+
88+func H (j,m) = (((j + "_") + m) + "_reveal")
89+
90+
91+func I (j,m) = g(H(j, m))
92+
93+
94+func J (j) = (j + "_status")
95+
96+
97+func K (j) = g(J(j))
98+
99+
100+func L (j,M) = ((j + "_res:") + M)
101+
102+
103+func N (j,M) = b(L(j, M))
104+
105+
106+@Callable(O)
107+func addItem (q,P,Q) = {
108+ let R = toBase58String(O.caller.bytes)
109+ let j = o(R, q)
110+ if ((0 >= P))
111+ then throw("purchase amount cannot be less than item price")
112+ else if ((t(j) != a))
113+ then throw("an item is already exist")
114+ else WriteSet([DataEntry(s(j), R), DataEntry(i(j), P), DataEntry(r(j), Q)])
115+ }
116+
46117

github/deemru/w8io/169f3d6 
47.24 ms