tx · Ga5wcD8sxwhMegh1rA5yGDpoz3bEWX633Hgg2fDPDhSe

3Muxd5JEAQz655DDi2yiZxSQ63jVJJHrQyV:  -0.01400000 Waves

2022.02.04 04:31 [1908209] smart account 3Muxd5JEAQz655DDi2yiZxSQ63jVJJHrQyV > SELF 0.00000000 Waves

{ "type": 13, "id": "Ga5wcD8sxwhMegh1rA5yGDpoz3bEWX633Hgg2fDPDhSe", "fee": 1400000, "feeAssetId": null, "timestamp": 1643938266110, "version": 2, "chainId": 84, "sender": "3Muxd5JEAQz655DDi2yiZxSQ63jVJJHrQyV", "senderPublicKey": "7ycxALbgfzht9z36iWCgRauBfWzQGSgkc3HMwu7wDwNX", "proofs": [ "4QYvf6oLk7sznbfS9KrjHUpSxJxyvxEa9urYquFC39f3FwkbJHmAPyHNHTqaJSMPNH2qehwNWxSZHUtaMV3x6Gkp" ], "script": "base64:AAIFAAAAAAAAAhEIAhIDCgEIEgUKAwgBCBIFCgMICAgSAwoBCBIDCgEIEgMKAQgaDAoBQRIHcGF5bWVudBoRCgFCEgxjdXN0b21lckFkZHIaBgoBQxIBcBoMCgFEEgdzb2xkb3V0GgcKAUUSAnR4GgsKAUYSBnZlcmlmeRoJCgFhEgROT05FGg0KAWISCGN1c3RvbWVyGg0KAWMSCHN1cHBsaWVyGg8KAWQSCmVyaWNQdWJLZXkaEwoBZRIOZ2V0U3RyaW5nQnlLZXkaCAoBZhIDa2V5GgwKAWcSByRtYXRjaDAaBgoBaBIBYRoQCgFpEgtnZXRJdGVtSGFzaBoKCgFqEgV0aXRsZRoPCgFrEgpjb21ib1RpdGxlGg8KAWwSCmdldE5hbWVLZXkaCQoBbRIEdHlwZRoJCgFuEgRhZGRyGhcKAW8SEmdldEl0ZW1TdXBwbGllcktleRoJCgFwEgRpdGVtGhQKAXESD2dldEl0ZW1QcmljZUtleRoWCgFyEhFnZXRJdGVtU29sZE91dEtleRoTCgFzEg5nZXRJdGVtRGF0YUtleRoZCgF0EhRnZXRWYWx1ZUl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QAAAAEJAQAAAAFzAAAAAQUAAAABcAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAABcgAAAAEFAAAAAXAFAAAAA25pbAkAAAIAAAABAgAAABRObyBzdWNoIGl0ZW0gcHJlc2VudAAAAAF3AQAAAAtkZWxldGVFbnRyeQAAAAEAAAABZgMJAAAAAAAAAggFAAAAAXcAAAAPY2FsbGVyUHVibGljS2V5BQAAAAFkCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAAWYFAAAAA25pbAkAAAIAAAABAgAAABxPbmx5IEVyaWMgY2FuIGRlbGV0ZSBlbnRyaWVzAAAAAXcBAAAACnVucmVnaXN0ZXIAAAABAAAAAW0DAwkAAAAAAAACBQAAAAFtBQAAAAFjBgkAAAAAAAACBQAAAAFtBQAAAAFiBAAAAAFuCQACWAAAAAEICAUAAAABdwAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAAWwAAAACBQAAAAFtBQAAAAFuBQAAAANuaWwJAAACAAAAAQIAAAAQSWxsZWdhbCBhcmd1bWVudAAAAAEAAAABRQEAAAABRgAAAAAJAAH0AAAAAwgFAAAAAUUAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAFFAAAABnByb29mcwAAAAAAAAAAAAgFAAAAAUUAAAAPc2VuZGVyUHVibGljS2V50idhPw==", "height": 1908209, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRXA72GWLbTeHMQBpZme4fnekwwPi2p71Wnk5ZQ9aiTC Next: none Diff:
OldNewDifferences
4949
5050 func v (p) = {
5151 let f = r(p)
52- if (true)
53- then throw(("SoldKey: " + f))
54- else {
55- let g = getInteger(this, f)
56- if ($isInstanceOf(g, "Int"))
57- then {
58- let h = g
59- h
60- }
61- else 2
52+ let g = getInteger(this, f)
53+ if ($isInstanceOf(g, "Int"))
54+ then {
55+ let h = g
56+ h
6257 }
58+ else 2
6359 }
6460
6561
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "NONE"
55
66 let b = "CUSTOMER"
77
88 let c = "SUPPLIER"
99
1010 let d = base58'8haEN2a7ZmkzawLmnr5rFX14X1oHi5kjt8NQUDNjSDLG'
1111
1212 func e (f) = {
1313 let g = getString(f)
1414 if ($isInstanceOf(g, "String"))
1515 then {
1616 let h = g
1717 h
1818 }
1919 else a
2020 }
2121
2222
2323 func i (c,j) = {
2424 let k = (c + j)
2525 ("item_" + toBase58String(sha256(toBytes(k))))
2626 }
2727
2828
2929 func l (m,n) = (((m + "_") + n) + "_name")
3030
3131
3232 func o (p) = (p + "_owner")
3333
3434
3535 func q (p) = (p + "_price")
3636
3737
3838 func r (p) = (p + "_soldout")
3939
4040
4141 func s (p) = (p + "_data")
4242
4343
4444 func t (p) = {
4545 let u = o(p)
4646 e(u)
4747 }
4848
4949
5050 func v (p) = {
5151 let f = r(p)
52- if (true)
53- then throw(("SoldKey: " + f))
54- else {
55- let g = getInteger(this, f)
56- if ($isInstanceOf(g, "Int"))
57- then {
58- let h = g
59- h
60- }
61- else 2
52+ let g = getInteger(this, f)
53+ if ($isInstanceOf(g, "Int"))
54+ then {
55+ let h = g
56+ h
6257 }
58+ else 2
6359 }
6460
6561
6662 @Callable(w)
6763 func register (m) = {
6864 let n = toBase58String(w.caller.bytes)
6965 if (if (isDefined(m))
7066 then if ((m == b))
7167 then true
7268 else (m == c)
7369 else false)
7470 then [StringEntry(l(m, n), n)]
7571 else throw("Invalid func parameters")
7672 }
7773
7874
7975
8076 @Callable(w)
8177 func createItem (j,x,y) = {
8278 let z = toBase58String(w.caller.bytes)
8379 let p = i(z, j)
8480 if ((0 >= x))
8581 then throw("Price can not be negative value or zero")
8682 else if ((t(p) != a))
8783 then throw("Item already exists")
8884 else [StringEntry(o(p), z), IntegerEntry(q(p), x), IntegerEntry(r(p), 0), StringEntry(s(p), y)]
8985 }
9086
9187
9288
9389 @Callable(w)
9490 func purchase (j,c,y) = if ((size(w.payments) > 0))
9591 then {
9692 let A = w.payments[0]
9793 if (if (isDefined(j))
9894 then isDefined(c)
9995 else false)
10096 then if (isDefined(A.assetId))
10197 then throw("Only should pay in waves")
10298 else {
10399 let B = toBase58String(w.caller.bytes)
104100 let p = i(c, j)
105101 let x = {
106102 let g = getInteger(this, q(p))
107103 if ($isInstanceOf(g, "Int"))
108104 then {
109105 let C = g
110106 C
111107 }
112108 else 0
113109 }
114110 let D = v(p)
115111 if ((D != 0))
116112 then throw(("Item is already sold, res: " + toString(D)))
117113 else if ((A.amount > x))
118114 then throw("payment cant be higher than price")
119115 else if ((x > A.amount))
120116 then throw("payment cant be lower than price")
121117 else [DeleteEntry(o(p)), DeleteEntry(q(p)), DeleteEntry(s(p)), DeleteEntry(r(p)), StringEntry(o(p), B), IntegerEntry(q(p), x), IntegerEntry(r(p), 1), StringEntry(s(p), y), StringEntry(((((("status:purchase_" + p) + "_supplier_") + c) + "_customer_") + B), "confirmed"), IntegerEntry(((((("price:purchase_" + p) + "_supplier_") + c) + "_customer_") + B), x)]
122118 }
123119 else throw("Coupon title and supplier address should be present")
124120 }
125121 else throw("Please attach payment")
126122
127123
128124
129125 @Callable(w)
130126 func deleteItem (j) = {
131127 let z = toBase58String(w.caller.bytes)
132128 let p = i(z, j)
133129 if ((t(p) != a))
134130 then [DeleteEntry(o(p)), DeleteEntry(q(p)), DeleteEntry(s(p)), DeleteEntry(r(p))]
135131 else throw("No such item present")
136132 }
137133
138134
139135
140136 @Callable(w)
141137 func deleteEntry (f) = if ((w.callerPublicKey == d))
142138 then [DeleteEntry(f)]
143139 else throw("Only Eric can delete entries")
144140
145141
146142
147143 @Callable(w)
148144 func unregister (m) = if (if ((m == c))
149145 then true
150146 else (m == b))
151147 then {
152148 let n = toBase58String(w.caller.bytes)
153149 [DeleteEntry(l(m, n))]
154150 }
155151 else throw("Illegal argument")
156152
157153
158154 @Verifier(E)
159155 func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey)
160156

github/deemru/w8io/026f985 
34.24 ms