tx · 5F3R3xJbF2ppjFAHPNKT66mK4ratLMndQXkW9QWQBA2B

3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc:  -0.01000000 Waves

2021.10.21 23:58 [1756564] smart account 3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc > SELF 0.00000000 Waves

{ "type": 13, "id": "5F3R3xJbF2ppjFAHPNKT66mK4ratLMndQXkW9QWQBA2B", "fee": 1000000, "feeAssetId": null, "timestamp": 1634849975726, "version": 2, "chainId": 84, "sender": "3N7a7sTSKaE621QewSqQcL1mUbknJjnLkZc", "senderPublicKey": "6LrPmGtwuADhwHYcxBouLzwfSTGgucbwYG5Pja7LUrcd", "proofs": [ "2Nar1znCxGZBoWgnj3eDc1zQk7DjoVrLcJQWttSF2TfSxPXYTLGjn9riwVn7cmf3wHVPX1de2YS168Cu39pEBCUW" ], "script": "base64:AAIFAAAAAAAAABcIAhIECgIIGRIDCgEBEgMKAQESAwoBAQAAABEAAAAACm9mZmVySWRLZXkCAAAADSRPRkZFUl9OVU1CRVIAAAAAB3Rlc3RLZXkCAAAABSRURVNUAAAAAA9vZmZlck9wZW5TdGF0dXMAAAAAAAAAAAEAAAAAE29mZmVyQ2FuY2VsZWRTdGF0dXMAAAAAAAAAAAIAAAAAE29mZmVyQWNjZXB0ZWRTdGF0dXMAAAAAAAAAAAMAAAAAE29mZmVyUmVqZWN0ZWRTdGF0dXMAAAAAAAAAAAQAAAAAFndhdmVzU3RhbmRJbkJ5dGVWZWN0b3IJAAGbAAAAAQIAAAAFV0FWRVMBAAAAEWdldE9mZmVyU3RhdHVzS2V5AAAAAQAAAAdvZmZlcklkCQABLAAAAAIJAAGkAAAAAQUAAAAHb2ZmZXJJZAIAAAAHX3N0YXR1cwEAAAAWZ2V0T2ZmZXJBZGRyZXNzRnJvbUtleQAAAAEAAAAHb2ZmZXJJZAkAASwAAAACCQABpAAAAAEFAAAAB29mZmVySWQCAAAABV9mcm9tAQAAABRnZXRPZmZlckFkZHJlc3NUb0tle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wMJAQAAAAIhPQAAAAIFAAAACWFkZHJlc3NUbwUAAAAJY2FsbGVyU3RyCQAAAgAAAAECAAAAHG9mZmVyIG11c3QgYmUgbWFkZSB0byBjYWxsZXIJAQAAAAlkcm9wT2ZmZXIAAAACBQAAAAdvZmZlcklkBQAAABNvZmZlclJlamVjdGVkU3RhdHVzAAAAAEL+UAI=", "height": 1756564, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HdUYUQk91q5EuiGywKBw8iE6a8HNjMSa5dnr6R8o2iHq Next: CAR2m5ja2HCzeMUZAmpv77SL8vSFGqZuM9MdAF16ZAmY Diff:
OldNewDifferences
5858 }
5959
6060
61-@Callable(w)
62-func createOffer (x,y) = {
61+func w (i,x) = {
62+ let y = Address(fromBase58String(getStringValue(this, j(i))))
63+ let z = v(i, 0)
64+ let A = q(n(i, 0))
65+[IntegerEntry(h(i), x), ScriptTransfer(y, A, z)]
66+ }
67+
68+
69+@Callable(B)
70+func createOffer (C,D) = {
6371 let i = (q(a) + 1)
64- let z = value(w.payments[0])
65- if (!(isDefined(z)))
72+ let E = value(B.payments[0])
73+ if (!(isDefined(E)))
6674 then throw("no payment")
67- else [IntegerEntry(a, i), 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)]
75+ else [IntegerEntry(a, i), IntegerEntry(h(i), c), StringEntry(j(i), toBase58String(B.caller.bytes)), StringEntry(k(i), C), StringEntry(l(i, 0), toBase64String(valueOrElse(E.assetId, g))), IntegerEntry(n(i, 0), E.amount), StringEntry(l(i, 0), toBase64String(valueOrElse(E.assetId, g))), IntegerEntry(n(i, 0), E.amount)]
6876 }
6977
7078
7179
72-@Callable(w)
80+@Callable(B)
7381 func cancelOffer (i) = {
74- let A = q(h(i))
75- if ((A != c))
82+ let F = q(h(i))
83+ if ((F != c))
7684 then throw("offer status must be open")
7785 else {
78- let B = getStringValue(this, j(i))
79- let C = toBase58String(w.caller.bytes)
80- if ((B != C))
86+ let y = getStringValue(this, j(i))
87+ let G = toBase58String(B.caller.bytes)
88+ if ((y != G))
8189 then throw("offer must be made by caller")
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- }
90+ else w(i, d)
8791 }
8892 }
8993
9094
9195
92-@Callable(w)
96+@Callable(B)
9397 func acceptOffer (i) = {
94- let A = q(h(i))
95- if ((A != c))
98+ let F = q(h(i))
99+ if ((F != c))
96100 then throw("offer status must be open")
97101 else {
98- let F = getStringValue(this, k(i))
99- let C = toBase58String(w.caller.bytes)
100- if ((F != C))
102+ let H = getStringValue(this, k(i))
103+ let G = toBase58String(B.caller.bytes)
104+ if ((H != G))
101105 then throw("offer must be made to caller")
102106 else [IntegerEntry(h(i), e)]
103107 }
105109
106110
107111
108-@Callable(w)
112+@Callable(B)
109113 func rejectOffer (i) = {
110- let A = q(h(i))
111- if ((A != c))
114+ let F = q(h(i))
115+ if ((F != c))
112116 then throw("offer status must be open")
113117 else {
114- let F = getStringValue(this, k(i))
115- let C = toBase58String(w.caller.bytes)
116- if ((F != C))
118+ let H = getStringValue(this, k(i))
119+ let G = toBase58String(B.caller.bytes)
120+ if ((H != G))
117121 then throw("offer must be made to caller")
118- else [IntegerEntry(h(i), f)]
122+ else w(i, f)
119123 }
120124 }
121125
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
1616 let g = toBytes("WAVES")
1717
1818 func h (i) = (toString(i) + "_status")
1919
2020
2121 func j (i) = (toString(i) + "_from")
2222
2323
2424 func k (i) = (toString(i) + "_to")
2525
2626
2727 func l (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_id")
2828
2929
3030 func n (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_amount")
3131
3232
3333 func o (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_id")
3434
3535
3636 func p (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_amount")
3737
3838
3939 func q (r) = {
4040 let s = {
4141 let t = getInteger(this, r)
4242 if ($isInstanceOf(t, "Int"))
4343 then {
4444 let u = t
4545 u
4646 }
4747 else 0
4848 }
4949 s
5050 }
5151
5252
5353 func v (i,m) = {
5454 let s = fromBase64String(getStringValue(this, l(i, m)))
5555 if ((s == g))
5656 then unit
5757 else s
5858 }
5959
6060
61-@Callable(w)
62-func createOffer (x,y) = {
61+func w (i,x) = {
62+ let y = Address(fromBase58String(getStringValue(this, j(i))))
63+ let z = v(i, 0)
64+ let A = q(n(i, 0))
65+[IntegerEntry(h(i), x), ScriptTransfer(y, A, z)]
66+ }
67+
68+
69+@Callable(B)
70+func createOffer (C,D) = {
6371 let i = (q(a) + 1)
64- let z = value(w.payments[0])
65- if (!(isDefined(z)))
72+ let E = value(B.payments[0])
73+ if (!(isDefined(E)))
6674 then throw("no payment")
67- else [IntegerEntry(a, i), 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)]
75+ else [IntegerEntry(a, i), IntegerEntry(h(i), c), StringEntry(j(i), toBase58String(B.caller.bytes)), StringEntry(k(i), C), StringEntry(l(i, 0), toBase64String(valueOrElse(E.assetId, g))), IntegerEntry(n(i, 0), E.amount), StringEntry(l(i, 0), toBase64String(valueOrElse(E.assetId, g))), IntegerEntry(n(i, 0), E.amount)]
6876 }
6977
7078
7179
72-@Callable(w)
80+@Callable(B)
7381 func cancelOffer (i) = {
74- let A = q(h(i))
75- if ((A != c))
82+ let F = q(h(i))
83+ if ((F != c))
7684 then throw("offer status must be open")
7785 else {
78- let B = getStringValue(this, j(i))
79- let C = toBase58String(w.caller.bytes)
80- if ((B != C))
86+ let y = getStringValue(this, j(i))
87+ let G = toBase58String(B.caller.bytes)
88+ if ((y != G))
8189 then throw("offer must be made by caller")
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- }
90+ else w(i, d)
8791 }
8892 }
8993
9094
9195
92-@Callable(w)
96+@Callable(B)
9397 func acceptOffer (i) = {
94- let A = q(h(i))
95- if ((A != c))
98+ let F = q(h(i))
99+ if ((F != c))
96100 then throw("offer status must be open")
97101 else {
98- let F = getStringValue(this, k(i))
99- let C = toBase58String(w.caller.bytes)
100- if ((F != C))
102+ let H = getStringValue(this, k(i))
103+ let G = toBase58String(B.caller.bytes)
104+ if ((H != G))
101105 then throw("offer must be made to caller")
102106 else [IntegerEntry(h(i), e)]
103107 }
104108 }
105109
106110
107111
108-@Callable(w)
112+@Callable(B)
109113 func rejectOffer (i) = {
110- let A = q(h(i))
111- if ((A != c))
114+ let F = q(h(i))
115+ if ((F != c))
112116 then throw("offer status must be open")
113117 else {
114- let F = getStringValue(this, k(i))
115- let C = toBase58String(w.caller.bytes)
116- if ((F != C))
118+ let H = getStringValue(this, k(i))
119+ let G = toBase58String(B.caller.bytes)
120+ if ((H != G))
117121 then throw("offer must be made to caller")
118- else [IntegerEntry(h(i), f)]
122+ else w(i, f)
119123 }
120124 }
121125
122126

github/deemru/w8io/169f3d6 
97.35 ms