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:AAIFAAAAAAAAABcIAhIECgIIGRIDCgEBEgMKAQESAwoBAQAAABEAAAAACm9mZmVySWRLZXkCAAAADSRPRkZFUl9OVU1CRVIAAAAAB3Rlc3RLZXkCAAAABSRURVNUAAAAAA9vZmZlck9wZW5TdGF0dXMAAAAAAAAAAAEAAAAAE29mZmVyQ2FuY2VsZWRTdGF0dXMAAAAAAAAAAAIAAAAAE29mZmVyQWNjZXB0ZWRTdGF0dXMAAAAAAAAAAAMAAAAAE29mZmVyUmVqZWN0ZWRTdGF0dXMAAAAAAAAAAAQAAAAAFndhdmVzU3RhbmRJbkJ5dGVWZWN0b3IJAAGbAAAAAQIAAAAFV0FWRVMBAAAAEWdldE9mZmVyU3RhdHVzS2V5AAAAAQAAAAdvZmZlcklkCQABLAAAAAIJAAGkAAAAAQUAAAAHb2ZmZXJJZAIAAAAHX3N0YXR1cwEAAAAWZ2V0T2ZmZXJBZGRyZXNzRnJvbUtleQAAAAEAAAAHb2ZmZXJJZAkAASwAAAACCQABpAAAAAEFAAAAB29mZmVySWQCAAAABV9mcm9tAQAAABRnZXRPZmZlckFkZHJlc3NUb0tleQ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MJAQAAAAIhPQAAAAIFAAAACWFkZHJlc3NUbwUAAAAJY2FsbGVyU3RyCQAAAgAAAAECAAAAHG9mZmVyIG11c3QgYmUgbWFkZSB0byBjYWxsZXIJAQAAAAlkcm9wT2ZmZXIAAAACBQAAAAdvZmZlcklkBQAAABNvZmZlclJlamVjdGVkU3RhdHVzAAAAAEL+UAI=", "height": 1756564, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HdUYUQk91q5EuiGywKBw8iE6a8HNjMSa5dnr6R8o2iHq Next: CAR2m5ja2HCzeMUZAmpv77SL8vSFGqZuM9MdAF16ZAmY Diff:
Old | New | Differences | |
---|---|---|---|
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
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) = { | |
63 | 71 | let i = (q(a) + 1) | |
64 | - | let | |
65 | - | if (!(isDefined( | |
72 | + | let E = value(B.payments[0]) | |
73 | + | if (!(isDefined(E))) | |
66 | 74 | then throw("no payment") | |
67 | - | else [IntegerEntry(a, i), IntegerEntry(h(i), c), StringEntry(j(i), toBase58String( | |
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)] | |
68 | 76 | } | |
69 | 77 | ||
70 | 78 | ||
71 | 79 | ||
72 | - | @Callable( | |
80 | + | @Callable(B) | |
73 | 81 | func cancelOffer (i) = { | |
74 | - | let | |
75 | - | if (( | |
82 | + | let F = q(h(i)) | |
83 | + | if ((F != c)) | |
76 | 84 | then throw("offer status must be open") | |
77 | 85 | else { | |
78 | - | let | |
79 | - | let | |
80 | - | if (( | |
86 | + | let y = getStringValue(this, j(i)) | |
87 | + | let G = toBase58String(B.caller.bytes) | |
88 | + | if ((y != G)) | |
81 | 89 | 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) | |
87 | 91 | } | |
88 | 92 | } | |
89 | 93 | ||
90 | 94 | ||
91 | 95 | ||
92 | - | @Callable( | |
96 | + | @Callable(B) | |
93 | 97 | func acceptOffer (i) = { | |
94 | - | let | |
95 | - | if (( | |
98 | + | let F = q(h(i)) | |
99 | + | if ((F != c)) | |
96 | 100 | then throw("offer status must be open") | |
97 | 101 | else { | |
98 | - | let | |
99 | - | let | |
100 | - | if (( | |
102 | + | let H = getStringValue(this, k(i)) | |
103 | + | let G = toBase58String(B.caller.bytes) | |
104 | + | if ((H != G)) | |
101 | 105 | then throw("offer must be made to caller") | |
102 | 106 | else [IntegerEntry(h(i), e)] | |
103 | 107 | } | |
105 | 109 | ||
106 | 110 | ||
107 | 111 | ||
108 | - | @Callable( | |
112 | + | @Callable(B) | |
109 | 113 | func rejectOffer (i) = { | |
110 | - | let | |
111 | - | if (( | |
114 | + | let F = q(h(i)) | |
115 | + | if ((F != c)) | |
112 | 116 | then throw("offer status must be open") | |
113 | 117 | else { | |
114 | - | let | |
115 | - | let | |
116 | - | if (( | |
118 | + | let H = getStringValue(this, k(i)) | |
119 | + | let G = toBase58String(B.caller.bytes) | |
120 | + | if ((H != G)) | |
117 | 121 | then throw("offer must be made to caller") | |
118 | - | else | |
122 | + | else w(i, f) | |
119 | 123 | } | |
120 | 124 | } | |
121 | 125 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "$OFFER_NUMBER" | |
5 | 5 | ||
6 | 6 | let b = "$TEST" | |
7 | 7 | ||
8 | 8 | let c = 1 | |
9 | 9 | ||
10 | 10 | let d = 2 | |
11 | 11 | ||
12 | 12 | let e = 3 | |
13 | 13 | ||
14 | 14 | let f = 4 | |
15 | 15 | ||
16 | 16 | let g = toBytes("WAVES") | |
17 | 17 | ||
18 | 18 | func h (i) = (toString(i) + "_status") | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func j (i) = (toString(i) + "_from") | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func k (i) = (toString(i) + "_to") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func l (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_id") | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func n (i,m) = (((toString(i) + "_") + toString(m)) + "_offered_asset_amount") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func o (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_id") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func p (i,m) = (((toString(i) + "_") + toString(m)) + "_asked_asset_amount") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func q (r) = { | |
40 | 40 | let s = { | |
41 | 41 | let t = getInteger(this, r) | |
42 | 42 | if ($isInstanceOf(t, "Int")) | |
43 | 43 | then { | |
44 | 44 | let u = t | |
45 | 45 | u | |
46 | 46 | } | |
47 | 47 | else 0 | |
48 | 48 | } | |
49 | 49 | s | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func v (i,m) = { | |
54 | 54 | let s = fromBase64String(getStringValue(this, l(i, m))) | |
55 | 55 | if ((s == g)) | |
56 | 56 | then unit | |
57 | 57 | else s | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
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) = { | |
63 | 71 | let i = (q(a) + 1) | |
64 | - | let | |
65 | - | if (!(isDefined( | |
72 | + | let E = value(B.payments[0]) | |
73 | + | if (!(isDefined(E))) | |
66 | 74 | then throw("no payment") | |
67 | - | else [IntegerEntry(a, i), IntegerEntry(h(i), c), StringEntry(j(i), toBase58String( | |
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)] | |
68 | 76 | } | |
69 | 77 | ||
70 | 78 | ||
71 | 79 | ||
72 | - | @Callable( | |
80 | + | @Callable(B) | |
73 | 81 | func cancelOffer (i) = { | |
74 | - | let | |
75 | - | if (( | |
82 | + | let F = q(h(i)) | |
83 | + | if ((F != c)) | |
76 | 84 | then throw("offer status must be open") | |
77 | 85 | else { | |
78 | - | let | |
79 | - | let | |
80 | - | if (( | |
86 | + | let y = getStringValue(this, j(i)) | |
87 | + | let G = toBase58String(B.caller.bytes) | |
88 | + | if ((y != G)) | |
81 | 89 | 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) | |
87 | 91 | } | |
88 | 92 | } | |
89 | 93 | ||
90 | 94 | ||
91 | 95 | ||
92 | - | @Callable( | |
96 | + | @Callable(B) | |
93 | 97 | func acceptOffer (i) = { | |
94 | - | let | |
95 | - | if (( | |
98 | + | let F = q(h(i)) | |
99 | + | if ((F != c)) | |
96 | 100 | then throw("offer status must be open") | |
97 | 101 | else { | |
98 | - | let | |
99 | - | let | |
100 | - | if (( | |
102 | + | let H = getStringValue(this, k(i)) | |
103 | + | let G = toBase58String(B.caller.bytes) | |
104 | + | if ((H != G)) | |
101 | 105 | then throw("offer must be made to caller") | |
102 | 106 | else [IntegerEntry(h(i), e)] | |
103 | 107 | } | |
104 | 108 | } | |
105 | 109 | ||
106 | 110 | ||
107 | 111 | ||
108 | - | @Callable( | |
112 | + | @Callable(B) | |
109 | 113 | func rejectOffer (i) = { | |
110 | - | let | |
111 | - | if (( | |
114 | + | let F = q(h(i)) | |
115 | + | if ((F != c)) | |
112 | 116 | then throw("offer status must be open") | |
113 | 117 | else { | |
114 | - | let | |
115 | - | let | |
116 | - | if (( | |
118 | + | let H = getStringValue(this, k(i)) | |
119 | + | let G = toBase58String(B.caller.bytes) | |
120 | + | if ((H != G)) | |
117 | 121 | then throw("offer must be made to caller") | |
118 | - | else | |
122 | + | else w(i, f) | |
119 | 123 | } | |
120 | 124 | } | |
121 | 125 | ||
122 | 126 |
github/deemru/w8io/169f3d6 97.35 ms ◑