tx · E2AHDVsdo9hLL4FN1wT6FRC3CHziXBgpKdpqCuN87Pxt

3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc:  -0.01000000 Waves

2021.10.21 23:42 [1756548] smart account 3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc > SELF 0.00000000 Waves

{ "type": 13, "id": "E2AHDVsdo9hLL4FN1wT6FRC3CHziXBgpKdpqCuN87Pxt", "fee": 1000000, "feeAssetId": null, "timestamp": 1634848965479, "version": 2, "chainId": 84, "sender": "3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc", "senderPublicKey": "6LrPmGtwuADhwHYcxBouLzwfSTGgucbwYG5Pja7LUrcd", "proofs": [ "fkxCFwVy6PqfhZY1qcuMsH9Y1hnFZCRfAFsWK2FK1NrhbZQiLNbUakKHyShjMVE51C5eGn9s6Mt2hc4YzzctHbK" ], "script": "base64:AAIFAAAAAAAAABcIAhIECgIIGBIDCgEBEgMKAQESAwoBAQAAABAAAAAACm9mZmVySWRLZXkCAAAADSRPRkZFUl9OVU1CRVIAAAAAB3Rlc3RLZXkCAAAABSRURVNUAAAAAA9vZmZlck9wZW5TdGF0dXMAAAAAAAAAAAEAAAAAE29mZmVyQ2FuY2VsZWRTdGF0dXMAAAAAAAAAAAIAAAAAE29mZmVyQWNjZXB0ZWRTdGF0dXMAAAAAAAAAAAMAAAAAE29mZmVyUmVqZWN0ZWRTdGF0dXMAAAAAAAAAAAQAAAAAFndhdmVzU3RhbmRJbkJ5dGVWZWN0b3IJAAGbAAAAAQIAAAAFV0FWRVMBAAAAEWdldE9mZmVyU3RhdHVzS2V5AAAAAQAAAAdvZmZlcklkCQABLAAAAAIJAAGkAAAAAQUAAAAHb2ZmZXJJZAIAAAAHX3N0YXR1cwEAAAAWZ2V0T2ZmZXJBZGRyZXNzRnJvbUtleQAAAAEAAAAHb2ZmZXJJZAkAASwAAAACCQABpAAAAAEFAAAAB29mZmVySWQCAAAABV9mcm9tAQAAABRnZXRPZmZlckFkZHJlc3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XNLZXkAAAABBQAAAAdvZmZlcklkAwkBAAAAAiE9AAAAAgUAAAALb2ZmZXJTdGF0dXMFAAAAD29mZmVyT3BlblN0YXR1cwkAAAIAAAABAgAAABlvZmZlciBzdGF0dXMgbXVzdCBiZSBvcGVuBAAAAAlhZGRyZXNzVG8JAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAQAAABRnZXRPZmZlckFkZHJlc3NUb0tleQAAAAEFAAAAB29mZmVySWQEAAAACWNhbGxlclN0cgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwkBAAAAAiE9AAAAAgUAAAAJYWRkcmVzc1RvBQAAAAljYWxsZXJTdHIJAAACAAAAAQIAAAAcb2ZmZXIgbXVzdCBiZSBtYWRlIHRvIGNhbGxlcgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkBAAAAEWdldE9mZmVyU3RhdHVzS2V5AAAAAQUAAAAHb2ZmZXJJZAUAAAATb2ZmZXJSZWplY3RlZFN0YXR1cwUAAAADbmlsAAAAAGd8nhQ=", "height": 1756548, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AshK3p7zNscKXJwKwy5AH9Zk25mqgcq55zf9ztdZvjnH Next: 9N8EDBLqcnWxKYnRMt6jJHLYw1wzjsmUVfR7xcdVxpGx Diff:
OldNewDifferences
1313
1414 let f = 4
1515
16-func g (h) = (toString(h) + "_status")
16+let g = toBytes("WAVES")
17+
18+func h (i) = (toString(i) + "_status")
1719
1820
19-func i (h) = (toString(h) + "_from")
21+func j (i) = (toString(i) + "_from")
2022
2123
22-func j (h) = (toString(h) + "_to")
24+func k (i) = (toString(i) + "_to")
2325
2426
25-func k (h,l) = (((toString(h) + "_") + toString(l)) + "_offered_asset_id")
27+func l (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_id")
2628
2729
28-func m (h,l) = (((toString(h) + "_") + toString(l)) + "_offered_asset_amount")
30+func n (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_amount")
2931
3032
31-func n (h,l) = (((toString(h) + "_") + toString(l)) + "_asked_asset_id")
33+func o (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_id")
3234
3335
34-func o (h,l) = (((toString(h) + "_") + toString(l)) + "_asked_asset_amount")
36+func p (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_amount")
3537
3638
37-func p (q) = {
38- let r = {
39- let s = getInteger(this, q)
40- if ($isInstanceOf(s, "Int"))
39+func q (r) = {
40+ let s = {
41+ let t = getInteger(this, r)
42+ if ($isInstanceOf(t, "Int"))
4143 then {
42- let t = s
43- t
44+ let u = t
45+ u
4446 }
4547 else 0
4648 }
47- r
49+ s
4850 }
4951
5052
51-@Callable(u)
52-func createOffer (v,w) = {
53- let h = p(a)
54- let x = value(u.payments[0])
55- if (!(isDefined(x)))
53+func v (i,m) = {
54+ let s = fromBase64String(getStringValue(this, l(i, m)))
55+ if ((s == g))
56+ then unit
57+ else s
58+ }
59+
60+
61+@Callable(w)
62+func createOffer (x,y) = {
63+ let i = q(a)
64+ let z = value(w.payments[0])
65+ if (!(isDefined(z)))
5666 then throw("no payment")
57- else [IntegerEntry(g(h), c), StringEntry(i(h), toBase58String(u.caller.bytes)), StringEntry(j(h), v), StringEntry(k(h, 0), toBase58String(valueOrElse(x.assetId, toBytes("WAVES")))), IntegerEntry(m(h, 0), x.amount)]
67+ else [IntegerEntry(h(i), c), StringEntry(j(i), toBase58String(w.caller.bytes)), StringEntry(k(i), x), StringEntry(l(i, 0), toBase64String(valueOrElse(z.assetId, g))), IntegerEntry(n(i, 0), z.amount)]
5868 }
5969
6070
6171
62-@Callable(u)
63-func cancelOffer (h) = {
64- let y = p(g(h))
65- if ((y != c))
72+@Callable(w)
73+func cancelOffer (i) = {
74+ let A = q(h(i))
75+ if ((A != c))
6676 then throw("offer status must be open")
6777 else {
68- let z = getStringValue(this, i(h))
69- let A = toBase58String(u.caller.bytes)
70- if ((z != A))
78+ let B = getStringValue(this, j(i))
79+ let C = toBase58String(w.caller.bytes)
80+ if ((B != C))
7181 then throw("offer must be made by caller")
72- else [IntegerEntry(g(h), d)]
82+ else {
83+ let D = v(i, 0)
84+ let E = q(n(i, 0))
85+[IntegerEntry(h(i), d), ScriptTransfer(w.caller, E, D)]
86+ }
7387 }
7488 }
7589
7690
7791
78-@Callable(u)
79-func acceptOffer (h) = {
80- let y = p(g(h))
81- if ((y != c))
92+@Callable(w)
93+func acceptOffer (i) = {
94+ let A = q(h(i))
95+ if ((A != c))
8296 then throw("offer status must be open")
8397 else {
84- let B = getStringValue(this, j(h))
85- let A = toBase58String(u.caller.bytes)
86- if ((B != A))
98+ let F = getStringValue(this, k(i))
99+ let C = toBase58String(w.caller.bytes)
100+ if ((F != C))
87101 then throw("offer must be made to caller")
88- else [IntegerEntry(g(h), e)]
102+ else [IntegerEntry(h(i), e)]
89103 }
90104 }
91105
92106
93107
94-@Callable(u)
95-func rejectOffer (h) = {
96- let y = p(g(h))
97- if ((y != c))
108+@Callable(w)
109+func rejectOffer (i) = {
110+ let A = q(h(i))
111+ if ((A != c))
98112 then throw("offer status must be open")
99113 else {
100- let B = getStringValue(this, j(h))
101- let A = toBase58String(u.caller.bytes)
102- if ((B != A))
114+ let F = getStringValue(this, k(i))
115+ let C = toBase58String(w.caller.bytes)
116+ if ((F != C))
103117 then throw("offer must be made to caller")
104- else [IntegerEntry(g(h), f)]
118+ else [IntegerEntry(h(i), f)]
105119 }
106120 }
107121
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "$OFFER_NUMBER"
55
66 let b = "$TEST"
77
88 let c = 1
99
1010 let d = 2
1111
1212 let e = 3
1313
1414 let f = 4
1515
16-func g (h) = (toString(h) + "_status")
16+let g = toBytes("WAVES")
17+
18+func h (i) = (toString(i) + "_status")
1719
1820
19-func i (h) = (toString(h) + "_from")
21+func j (i) = (toString(i) + "_from")
2022
2123
22-func j (h) = (toString(h) + "_to")
24+func k (i) = (toString(i) + "_to")
2325
2426
25-func k (h,l) = (((toString(h) + "_") + toString(l)) + "_offered_asset_id")
27+func l (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_id")
2628
2729
28-func m (h,l) = (((toString(h) + "_") + toString(l)) + "_offered_asset_amount")
30+func n (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_amount")
2931
3032
31-func n (h,l) = (((toString(h) + "_") + toString(l)) + "_asked_asset_id")
33+func o (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_id")
3234
3335
34-func o (h,l) = (((toString(h) + "_") + toString(l)) + "_asked_asset_amount")
36+func p (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_amount")
3537
3638
37-func p (q) = {
38- let r = {
39- let s = getInteger(this, q)
40- if ($isInstanceOf(s, "Int"))
39+func q (r) = {
40+ let s = {
41+ let t = getInteger(this, r)
42+ if ($isInstanceOf(t, "Int"))
4143 then {
42- let t = s
43- t
44+ let u = t
45+ u
4446 }
4547 else 0
4648 }
47- r
49+ s
4850 }
4951
5052
51-@Callable(u)
52-func createOffer (v,w) = {
53- let h = p(a)
54- let x = value(u.payments[0])
55- if (!(isDefined(x)))
53+func v (i,m) = {
54+ let s = fromBase64String(getStringValue(this, l(i, m)))
55+ if ((s == g))
56+ then unit
57+ else s
58+ }
59+
60+
61+@Callable(w)
62+func createOffer (x,y) = {
63+ let i = q(a)
64+ let z = value(w.payments[0])
65+ if (!(isDefined(z)))
5666 then throw("no payment")
57- else [IntegerEntry(g(h), c), StringEntry(i(h), toBase58String(u.caller.bytes)), StringEntry(j(h), v), StringEntry(k(h, 0), toBase58String(valueOrElse(x.assetId, toBytes("WAVES")))), IntegerEntry(m(h, 0), x.amount)]
67+ else [IntegerEntry(h(i), c), StringEntry(j(i), toBase58String(w.caller.bytes)), StringEntry(k(i), x), StringEntry(l(i, 0), toBase64String(valueOrElse(z.assetId, g))), IntegerEntry(n(i, 0), z.amount)]
5868 }
5969
6070
6171
62-@Callable(u)
63-func cancelOffer (h) = {
64- let y = p(g(h))
65- if ((y != c))
72+@Callable(w)
73+func cancelOffer (i) = {
74+ let A = q(h(i))
75+ if ((A != c))
6676 then throw("offer status must be open")
6777 else {
68- let z = getStringValue(this, i(h))
69- let A = toBase58String(u.caller.bytes)
70- if ((z != A))
78+ let B = getStringValue(this, j(i))
79+ let C = toBase58String(w.caller.bytes)
80+ if ((B != C))
7181 then throw("offer must be made by caller")
72- else [IntegerEntry(g(h), d)]
82+ else {
83+ let D = v(i, 0)
84+ let E = q(n(i, 0))
85+[IntegerEntry(h(i), d), ScriptTransfer(w.caller, E, D)]
86+ }
7387 }
7488 }
7589
7690
7791
78-@Callable(u)
79-func acceptOffer (h) = {
80- let y = p(g(h))
81- if ((y != c))
92+@Callable(w)
93+func acceptOffer (i) = {
94+ let A = q(h(i))
95+ if ((A != c))
8296 then throw("offer status must be open")
8397 else {
84- let B = getStringValue(this, j(h))
85- let A = toBase58String(u.caller.bytes)
86- if ((B != A))
98+ let F = getStringValue(this, k(i))
99+ let C = toBase58String(w.caller.bytes)
100+ if ((F != C))
87101 then throw("offer must be made to caller")
88- else [IntegerEntry(g(h), e)]
102+ else [IntegerEntry(h(i), e)]
89103 }
90104 }
91105
92106
93107
94-@Callable(u)
95-func rejectOffer (h) = {
96- let y = p(g(h))
97- if ((y != c))
108+@Callable(w)
109+func rejectOffer (i) = {
110+ let A = q(h(i))
111+ if ((A != c))
98112 then throw("offer status must be open")
99113 else {
100- let B = getStringValue(this, j(h))
101- let A = toBase58String(u.caller.bytes)
102- if ((B != A))
114+ let F = getStringValue(this, k(i))
115+ let C = toBase58String(w.caller.bytes)
116+ if ((F != C))
103117 then throw("offer must be made to caller")
104- else [IntegerEntry(g(h), f)]
118+ else [IntegerEntry(h(i), f)]
105119 }
106120 }
107121
108122

github/deemru/w8io/026f985 
38.82 ms