tx · 65i9ZrN5bhnN63h5N8mpSpGWNrhZeATdyxNkH1cRXBts
3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves
2023.06.27 12:16 [2640870] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{
"type": 13,
"id": "65i9ZrN5bhnN63h5N8mpSpGWNrhZeATdyxNkH1cRXBts",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1687857359365,
"version": 2,
"chainId": 84,
"sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq",
"senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd",
"proofs": [
"9WSEriyuAqREpgAgDGxJRLHnGNVsNJHxg4sLCyb2mqGPeVAdsWhq4rWN9hXyjLn83qBwfNnWYGRspvMcXybzGBW"
],
"script": "base64:BgIsCAISBAoCAQgSABIDCgEBEgMKAQESAwoBARIECgIIARIAEgQKAggBEgMKAQgGAANhcnIJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQUDbmlsAARhcnIyCQDMCAIAAQkAzAgCAAIFA25pbAEDc3VtAgFhAWIJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQCBmJvcnJvdwkAzAgCAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAkAzAgCAMCEPQUDbmlsBQNuaWwBD2dldEN1cnJlbnRQcmljZQEKYXNzZXRJZFN0cgMJAAACBQphc3NldElkU3RyAgVXQVZFUwACCQACAQIFRXJyb3IBCmdldEJhbGFuY2UCCmFzc2V0SWRTdHIHYWRkcmVzcwMJAAACBQphc3NldElkU3RyAgVXQVZFUwgJAO8HAQUHYWRkcmVzcwlhdmFpbGFibGUJAPAHAgUHYWRkcmVzcwkA2QQBBQphc3NldElkU3RyARl0cmF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bGVyBANyZXMJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQCCHdpdGhkcmF3CQDMCAIFCmFzc2V0SWRTdHIJAMwIAgULYXNzZXRBbW91bnQFA25pbAUDbmlsAwkAAAIFA3JlcwUDcmVzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKwCAgUHYWRkcmVzcwIKX3dpdGhkcmV3XwUKYXNzZXRJZFN0cgULYXNzZXRBbW91bnQFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQxjaGVja0JhbGFuY2UBCmFzc2V0SWRTdHIEB2FkZHJlc3MIBQFpBmNhbGxlcgMJAAACBQphc3NldElkU3RyAgVXQVZFUwkAzAgCCQEMSW50ZWdlckVudHJ5AgINV2F2ZXMgQmFsYW5jZQgJAO8HAQUHYWRkcmVzcwlhdmFpbGFibGUFA25pbAkAzAgCCQEMSW50ZWdlckVudHJ5AgINQXNzZXQgQmFsYW5jZQkA8AcCBQdhZGRyZXNzCQDZBAEFCmFzc2V0SWRTdHIFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmuQ9N5",
"height": 2640870,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 3hDEba7ishGuVj11c4xbNxgYEJTZW3JcNHLHPLvniiV9
Next: VwToUbpMaF3Ja1Vg88oE5hU8wf8vkT93ZSqYonPGzWK
Diff:
Old | New | | Differences |
---|
18 | 18 | | else assetBalance(i, fromBase58String(g)) |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | | - | @Callable(j) |
---|
22 | | - | func transferWaves (k,l) = if ((j.caller != this)) |
---|
| 21 | + | func j (g,k,i) = [IntegerEntry(((i + "_deposited_") + g), k)] |
---|
| 22 | + | |
---|
| 23 | + | |
---|
| 24 | + | @Callable(l) |
---|
| 25 | + | func transferWaves (k,m) = if ((l.caller != this)) |
---|
23 | 26 | | then throw("only for internal smart contract invocations") |
---|
24 | | - | else [ScriptTransfer(this, k, unit), IntegerEntry((l + "_deposited_WAVES"), k)] |
---|
| 27 | + | else [ScriptTransfer(this, k, unit), IntegerEntry((m + "_deposited_WAVES"), k)] |
---|
25 | 28 | | |
---|
26 | 29 | | |
---|
27 | 30 | | |
---|
28 | | - | @Callable(j) |
---|
29 | | - | func transferWavesTest (k) = [IntegerEntry((toString(j.caller) + "_deposited_WAVES"), k)] |
---|
| 31 | + | @Callable(l) |
---|
| 32 | + | func transferWavesTest () = if (if ((size(l.payments) != 1)) |
---|
| 33 | + | then true |
---|
| 34 | + | else (l.payments[0].amount == 0)) |
---|
| 35 | + | then throw("1 payment has to be attached") |
---|
| 36 | + | else { |
---|
| 37 | + | let g = "WAVES" |
---|
| 38 | + | let k = l.payments[0].amount |
---|
| 39 | + | j(g, k, toString(l.caller)) |
---|
| 40 | + | } |
---|
30 | 41 | | |
---|
31 | 42 | | |
---|
32 | 43 | | |
---|
33 | | - | @Callable(j) |
---|
| 44 | + | @Callable(l) |
---|
34 | 45 | | func long2x (k) = { |
---|
35 | | - | let i = toString(j.caller) |
---|
36 | | - | let m = h("WAVES", j.caller) |
---|
37 | | - | if ((m > k)) |
---|
| 46 | + | let i = toString(l.caller) |
---|
| 47 | + | let n = h("WAVES", l.caller) |
---|
| 48 | + | if ((n > k)) |
---|
38 | 49 | | then { |
---|
39 | | - | func n (o,p) = { |
---|
40 | | - | let q = invoke(this, "transferWaves", [k, j.caller], nil) |
---|
41 | | - | if ((q == q)) |
---|
| 50 | + | func o (p,q) = { |
---|
| 51 | + | let r = invoke(this, "transferWaves", [k, l.caller], nil) |
---|
| 52 | + | if ((r == r)) |
---|
42 | 53 | | then { |
---|
43 | | - | let r = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)]) |
---|
44 | | - | if ((r == r)) |
---|
| 54 | + | let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)]) |
---|
| 55 | + | if ((s == s)) |
---|
45 | 56 | | then { |
---|
46 | | - | let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil) |
---|
47 | | - | if ((s == s)) |
---|
48 | | - | then (o + p) |
---|
| 57 | + | let t = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil) |
---|
| 58 | + | if ((t == t)) |
---|
| 59 | + | then (p + q) |
---|
49 | 60 | | else throw("Strict value is not equal to itself.") |
---|
50 | 61 | | } |
---|
51 | 62 | | else throw("Strict value is not equal to itself.") |
---|
|
53 | 64 | | else throw("Strict value is not equal to itself.") |
---|
54 | 65 | | } |
---|
55 | 66 | | |
---|
56 | | - | let t = [k, k] |
---|
57 | | - | let u = { |
---|
58 | | - | let v = t |
---|
59 | | - | let w = size(v) |
---|
60 | | - | let x = 0 |
---|
61 | | - | func y (z,A) = if ((A >= w)) |
---|
62 | | - | then z |
---|
63 | | - | else n(z, v[A]) |
---|
| 67 | + | let u = [k, k] |
---|
| 68 | + | let v = { |
---|
| 69 | + | let w = u |
---|
| 70 | + | let x = size(w) |
---|
| 71 | + | let y = 0 |
---|
| 72 | + | func z (A,B) = if ((B >= x)) |
---|
| 73 | + | then A |
---|
| 74 | + | else o(A, w[B]) |
---|
64 | 75 | | |
---|
65 | | - | func B (z,A) = if ((A >= w)) |
---|
66 | | - | then z |
---|
| 76 | + | func C (A,B) = if ((B >= x)) |
---|
| 77 | + | then A |
---|
67 | 78 | | else throw("List size exceeds 2") |
---|
68 | 79 | | |
---|
69 | | - | B(y(y(x, 0), 1), 2) |
---|
| 80 | + | C(z(z(y, 0), 1), 2) |
---|
70 | 81 | | } |
---|
71 | | - | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(j.caller, ((u * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, u, unit)] |
---|
| 82 | + | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(l.caller, ((v * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, v, unit)] |
---|
72 | 83 | | } |
---|
73 | 84 | | else throw("Error!") |
---|
74 | 85 | | } |
---|
75 | 86 | | |
---|
76 | 87 | | |
---|
77 | 88 | | |
---|
78 | | - | @Callable(j) |
---|
| 89 | + | @Callable(l) |
---|
79 | 90 | | func borrow (k) = { |
---|
80 | | - | let i = toString(j.caller) |
---|
81 | | - | let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
82 | | - | if ((u == u)) |
---|
83 | | - | then [ScriptTransfer(j.caller, k, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k)] |
---|
| 91 | + | let i = toString(l.caller) |
---|
| 92 | + | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
| 93 | + | if ((v == v)) |
---|
| 94 | + | then [ScriptTransfer(l.caller, k, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k)] |
---|
84 | 95 | | else throw("Strict value is not equal to itself.") |
---|
85 | 96 | | } |
---|
86 | 97 | | |
---|
87 | 98 | | |
---|
88 | 99 | | |
---|
89 | | - | @Callable(j) |
---|
| 100 | + | @Callable(l) |
---|
90 | 101 | | func borrow2 (k) = { |
---|
91 | | - | let i = toString(j.caller) |
---|
92 | | - | func n (o,p) = { |
---|
93 | | - | let C = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
94 | | - | if ((C == C)) |
---|
95 | | - | then (o + p) |
---|
| 102 | + | let i = toString(l.caller) |
---|
| 103 | + | func o (p,q) = { |
---|
| 104 | + | let D = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
| 105 | + | if ((D == D)) |
---|
| 106 | + | then (p + q) |
---|
96 | 107 | | else throw("Strict value is not equal to itself.") |
---|
97 | 108 | | } |
---|
98 | 109 | | |
---|
99 | | - | let t = [k, k] |
---|
100 | | - | let u = { |
---|
101 | | - | let v = t |
---|
102 | | - | let w = size(v) |
---|
103 | | - | let x = 0 |
---|
104 | | - | func y (z,A) = if ((A >= w)) |
---|
105 | | - | then z |
---|
106 | | - | else n(z, v[A]) |
---|
| 110 | + | let u = [k, k] |
---|
| 111 | + | let v = { |
---|
| 112 | + | let w = u |
---|
| 113 | + | let x = size(w) |
---|
| 114 | + | let y = 0 |
---|
| 115 | + | func z (A,B) = if ((B >= x)) |
---|
| 116 | + | then A |
---|
| 117 | + | else o(A, w[B]) |
---|
107 | 118 | | |
---|
108 | | - | func B (z,A) = if ((A >= w)) |
---|
109 | | - | then z |
---|
| 119 | + | func C (A,B) = if ((B >= x)) |
---|
| 120 | + | then A |
---|
110 | 121 | | else throw("List size exceeds 2") |
---|
111 | 122 | | |
---|
112 | | - | B(y(y(x, 0), 1), 2) |
---|
| 123 | + | C(z(z(y, 0), 1), 2) |
---|
113 | 124 | | } |
---|
114 | | - | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, u, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] |
---|
| 125 | + | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(l.caller, v, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] |
---|
115 | 126 | | } |
---|
116 | 127 | | |
---|
117 | 128 | | |
---|
118 | 129 | | |
---|
119 | | - | @Callable(j) |
---|
| 130 | + | @Callable(l) |
---|
120 | 131 | | func borrow5 (g,k) = { |
---|
121 | | - | let i = toString(j.caller) |
---|
122 | | - | let u = { |
---|
123 | | - | let v = a |
---|
124 | | - | let w = size(v) |
---|
125 | | - | let x = 0 |
---|
126 | | - | func y (z,A) = if ((A >= w)) |
---|
127 | | - | then z |
---|
128 | | - | else c(z, v[A]) |
---|
| 132 | + | let i = toString(l.caller) |
---|
| 133 | + | let v = { |
---|
| 134 | + | let w = a |
---|
| 135 | + | let x = size(w) |
---|
| 136 | + | let y = 0 |
---|
| 137 | + | func z (A,B) = if ((B >= x)) |
---|
| 138 | + | then A |
---|
| 139 | + | else c(A, w[B]) |
---|
129 | 140 | | |
---|
130 | | - | func B (z,A) = if ((A >= w)) |
---|
131 | | - | then z |
---|
| 141 | + | func C (A,B) = if ((B >= x)) |
---|
| 142 | + | then A |
---|
132 | 143 | | else throw("List size exceeds 5") |
---|
133 | 144 | | |
---|
134 | | - | B(y(y(y(y(y(x, 0), 1), 2), 3), 4), 5) |
---|
| 145 | + | C(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5) |
---|
135 | 146 | | } |
---|
136 | | - | if ((u == u)) |
---|
| 147 | + | if ((v == v)) |
---|
137 | 148 | | then [IntegerEntry(((i + "_borrowed_") + g), k)] |
---|
138 | 149 | | else throw("Strict value is not equal to itself.") |
---|
139 | 150 | | } |
---|
140 | 151 | | |
---|
141 | 152 | | |
---|
142 | 153 | | |
---|
143 | | - | @Callable(j) |
---|
| 154 | + | @Callable(l) |
---|
144 | 155 | | func deposit () = { |
---|
145 | | - | let i = toString(j.caller) |
---|
146 | | - | let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)]) |
---|
147 | | - | if ((u == u)) |
---|
| 156 | + | let i = toString(l.caller) |
---|
| 157 | + | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)]) |
---|
| 158 | + | if ((v == v)) |
---|
148 | 159 | | then [IntegerEntry((i + "supply_waves"), 1000000)] |
---|
149 | 160 | | else throw("Strict value is not equal to itself.") |
---|
150 | 161 | | } |
---|
151 | 162 | | |
---|
152 | 163 | | |
---|
153 | 164 | | |
---|
154 | | - | @Callable(j) |
---|
| 165 | + | @Callable(l) |
---|
155 | 166 | | func withdraw (g,k) = { |
---|
156 | | - | let i = toString(j.caller) |
---|
157 | | - | let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil) |
---|
158 | | - | if ((u == u)) |
---|
| 167 | + | let i = toString(l.caller) |
---|
| 168 | + | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil) |
---|
| 169 | + | if ((v == v)) |
---|
159 | 170 | | then [IntegerEntry(((i + "_withdrew_") + g), k)] |
---|
160 | 171 | | else throw("Strict value is not equal to itself.") |
---|
161 | 172 | | } |
---|
162 | 173 | | |
---|
163 | 174 | | |
---|
164 | 175 | | |
---|
165 | | - | @Callable(j) |
---|
| 176 | + | @Callable(l) |
---|
166 | 177 | | func checkBalance (g) = { |
---|
167 | | - | let i = j.caller |
---|
| 178 | + | let i = l.caller |
---|
168 | 179 | | if ((g == "WAVES")) |
---|
169 | 180 | | then [IntegerEntry("Waves Balance", wavesBalance(i).available)] |
---|
170 | 181 | | else [IntegerEntry("Asset Balance", assetBalance(i, fromBase58String(g)))] |
---|
171 | 182 | | } |
---|
172 | 183 | | |
---|
173 | 184 | | |
---|
174 | | - | @Verifier(D) |
---|
175 | | - | func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey) |
---|
| 185 | + | @Verifier(E) |
---|
| 186 | + | func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) |
---|
176 | 187 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = [1, 2, 3, 4, 5] |
---|
5 | 5 | | |
---|
6 | 6 | | let b = [1, 2] |
---|
7 | 7 | | |
---|
8 | 8 | | func c (d,e) = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", 1000000], nil) |
---|
9 | 9 | | |
---|
10 | 10 | | |
---|
11 | 11 | | func f (g) = if ((g == "WAVES")) |
---|
12 | 12 | | then 2 |
---|
13 | 13 | | else throw("Error") |
---|
14 | 14 | | |
---|
15 | 15 | | |
---|
16 | 16 | | func h (g,i) = if ((g == "WAVES")) |
---|
17 | 17 | | then wavesBalance(i).available |
---|
18 | 18 | | else assetBalance(i, fromBase58String(g)) |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | | - | @Callable(j) |
---|
22 | | - | func transferWaves (k,l) = if ((j.caller != this)) |
---|
| 21 | + | func j (g,k,i) = [IntegerEntry(((i + "_deposited_") + g), k)] |
---|
| 22 | + | |
---|
| 23 | + | |
---|
| 24 | + | @Callable(l) |
---|
| 25 | + | func transferWaves (k,m) = if ((l.caller != this)) |
---|
23 | 26 | | then throw("only for internal smart contract invocations") |
---|
24 | | - | else [ScriptTransfer(this, k, unit), IntegerEntry((l + "_deposited_WAVES"), k)] |
---|
| 27 | + | else [ScriptTransfer(this, k, unit), IntegerEntry((m + "_deposited_WAVES"), k)] |
---|
25 | 28 | | |
---|
26 | 29 | | |
---|
27 | 30 | | |
---|
28 | | - | @Callable(j) |
---|
29 | | - | func transferWavesTest (k) = [IntegerEntry((toString(j.caller) + "_deposited_WAVES"), k)] |
---|
| 31 | + | @Callable(l) |
---|
| 32 | + | func transferWavesTest () = if (if ((size(l.payments) != 1)) |
---|
| 33 | + | then true |
---|
| 34 | + | else (l.payments[0].amount == 0)) |
---|
| 35 | + | then throw("1 payment has to be attached") |
---|
| 36 | + | else { |
---|
| 37 | + | let g = "WAVES" |
---|
| 38 | + | let k = l.payments[0].amount |
---|
| 39 | + | j(g, k, toString(l.caller)) |
---|
| 40 | + | } |
---|
30 | 41 | | |
---|
31 | 42 | | |
---|
32 | 43 | | |
---|
33 | | - | @Callable(j) |
---|
| 44 | + | @Callable(l) |
---|
34 | 45 | | func long2x (k) = { |
---|
35 | | - | let i = toString(j.caller) |
---|
36 | | - | let m = h("WAVES", j.caller) |
---|
37 | | - | if ((m > k)) |
---|
| 46 | + | let i = toString(l.caller) |
---|
| 47 | + | let n = h("WAVES", l.caller) |
---|
| 48 | + | if ((n > k)) |
---|
38 | 49 | | then { |
---|
39 | | - | func n (o,p) = { |
---|
40 | | - | let q = invoke(this, "transferWaves", [k, j.caller], nil) |
---|
41 | | - | if ((q == q)) |
---|
| 50 | + | func o (p,q) = { |
---|
| 51 | + | let r = invoke(this, "transferWaves", [k, l.caller], nil) |
---|
| 52 | + | if ((r == r)) |
---|
42 | 53 | | then { |
---|
43 | | - | let r = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)]) |
---|
44 | | - | if ((r == r)) |
---|
| 54 | + | let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)]) |
---|
| 55 | + | if ((s == s)) |
---|
45 | 56 | | then { |
---|
46 | | - | let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil) |
---|
47 | | - | if ((s == s)) |
---|
48 | | - | then (o + p) |
---|
| 57 | + | let t = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil) |
---|
| 58 | + | if ((t == t)) |
---|
| 59 | + | then (p + q) |
---|
49 | 60 | | else throw("Strict value is not equal to itself.") |
---|
50 | 61 | | } |
---|
51 | 62 | | else throw("Strict value is not equal to itself.") |
---|
52 | 63 | | } |
---|
53 | 64 | | else throw("Strict value is not equal to itself.") |
---|
54 | 65 | | } |
---|
55 | 66 | | |
---|
56 | | - | let t = [k, k] |
---|
57 | | - | let u = { |
---|
58 | | - | let v = t |
---|
59 | | - | let w = size(v) |
---|
60 | | - | let x = 0 |
---|
61 | | - | func y (z,A) = if ((A >= w)) |
---|
62 | | - | then z |
---|
63 | | - | else n(z, v[A]) |
---|
| 67 | + | let u = [k, k] |
---|
| 68 | + | let v = { |
---|
| 69 | + | let w = u |
---|
| 70 | + | let x = size(w) |
---|
| 71 | + | let y = 0 |
---|
| 72 | + | func z (A,B) = if ((B >= x)) |
---|
| 73 | + | then A |
---|
| 74 | + | else o(A, w[B]) |
---|
64 | 75 | | |
---|
65 | | - | func B (z,A) = if ((A >= w)) |
---|
66 | | - | then z |
---|
| 76 | + | func C (A,B) = if ((B >= x)) |
---|
| 77 | + | then A |
---|
67 | 78 | | else throw("List size exceeds 2") |
---|
68 | 79 | | |
---|
69 | | - | B(y(y(x, 0), 1), 2) |
---|
| 80 | + | C(z(z(y, 0), 1), 2) |
---|
70 | 81 | | } |
---|
71 | | - | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(j.caller, ((u * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, u, unit)] |
---|
| 82 | + | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(l.caller, ((v * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, v, unit)] |
---|
72 | 83 | | } |
---|
73 | 84 | | else throw("Error!") |
---|
74 | 85 | | } |
---|
75 | 86 | | |
---|
76 | 87 | | |
---|
77 | 88 | | |
---|
78 | | - | @Callable(j) |
---|
| 89 | + | @Callable(l) |
---|
79 | 90 | | func borrow (k) = { |
---|
80 | | - | let i = toString(j.caller) |
---|
81 | | - | let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
82 | | - | if ((u == u)) |
---|
83 | | - | then [ScriptTransfer(j.caller, k, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k)] |
---|
| 91 | + | let i = toString(l.caller) |
---|
| 92 | + | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
| 93 | + | if ((v == v)) |
---|
| 94 | + | then [ScriptTransfer(l.caller, k, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k)] |
---|
84 | 95 | | else throw("Strict value is not equal to itself.") |
---|
85 | 96 | | } |
---|
86 | 97 | | |
---|
87 | 98 | | |
---|
88 | 99 | | |
---|
89 | | - | @Callable(j) |
---|
| 100 | + | @Callable(l) |
---|
90 | 101 | | func borrow2 (k) = { |
---|
91 | | - | let i = toString(j.caller) |
---|
92 | | - | func n (o,p) = { |
---|
93 | | - | let C = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
94 | | - | if ((C == C)) |
---|
95 | | - | then (o + p) |
---|
| 102 | + | let i = toString(l.caller) |
---|
| 103 | + | func o (p,q) = { |
---|
| 104 | + | let D = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) |
---|
| 105 | + | if ((D == D)) |
---|
| 106 | + | then (p + q) |
---|
96 | 107 | | else throw("Strict value is not equal to itself.") |
---|
97 | 108 | | } |
---|
98 | 109 | | |
---|
99 | | - | let t = [k, k] |
---|
100 | | - | let u = { |
---|
101 | | - | let v = t |
---|
102 | | - | let w = size(v) |
---|
103 | | - | let x = 0 |
---|
104 | | - | func y (z,A) = if ((A >= w)) |
---|
105 | | - | then z |
---|
106 | | - | else n(z, v[A]) |
---|
| 110 | + | let u = [k, k] |
---|
| 111 | + | let v = { |
---|
| 112 | + | let w = u |
---|
| 113 | + | let x = size(w) |
---|
| 114 | + | let y = 0 |
---|
| 115 | + | func z (A,B) = if ((B >= x)) |
---|
| 116 | + | then A |
---|
| 117 | + | else o(A, w[B]) |
---|
107 | 118 | | |
---|
108 | | - | func B (z,A) = if ((A >= w)) |
---|
109 | | - | then z |
---|
| 119 | + | func C (A,B) = if ((B >= x)) |
---|
| 120 | + | then A |
---|
110 | 121 | | else throw("List size exceeds 2") |
---|
111 | 122 | | |
---|
112 | | - | B(y(y(x, 0), 1), 2) |
---|
| 123 | + | C(z(z(y, 0), 1), 2) |
---|
113 | 124 | | } |
---|
114 | | - | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, u, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] |
---|
| 125 | + | [IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(l.caller, v, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] |
---|
115 | 126 | | } |
---|
116 | 127 | | |
---|
117 | 128 | | |
---|
118 | 129 | | |
---|
119 | | - | @Callable(j) |
---|
| 130 | + | @Callable(l) |
---|
120 | 131 | | func borrow5 (g,k) = { |
---|
121 | | - | let i = toString(j.caller) |
---|
122 | | - | let u = { |
---|
123 | | - | let v = a |
---|
124 | | - | let w = size(v) |
---|
125 | | - | let x = 0 |
---|
126 | | - | func y (z,A) = if ((A >= w)) |
---|
127 | | - | then z |
---|
128 | | - | else c(z, v[A]) |
---|
| 132 | + | let i = toString(l.caller) |
---|
| 133 | + | let v = { |
---|
| 134 | + | let w = a |
---|
| 135 | + | let x = size(w) |
---|
| 136 | + | let y = 0 |
---|
| 137 | + | func z (A,B) = if ((B >= x)) |
---|
| 138 | + | then A |
---|
| 139 | + | else c(A, w[B]) |
---|
129 | 140 | | |
---|
130 | | - | func B (z,A) = if ((A >= w)) |
---|
131 | | - | then z |
---|
| 141 | + | func C (A,B) = if ((B >= x)) |
---|
| 142 | + | then A |
---|
132 | 143 | | else throw("List size exceeds 5") |
---|
133 | 144 | | |
---|
134 | | - | B(y(y(y(y(y(x, 0), 1), 2), 3), 4), 5) |
---|
| 145 | + | C(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5) |
---|
135 | 146 | | } |
---|
136 | | - | if ((u == u)) |
---|
| 147 | + | if ((v == v)) |
---|
137 | 148 | | then [IntegerEntry(((i + "_borrowed_") + g), k)] |
---|
138 | 149 | | else throw("Strict value is not equal to itself.") |
---|
139 | 150 | | } |
---|
140 | 151 | | |
---|
141 | 152 | | |
---|
142 | 153 | | |
---|
143 | | - | @Callable(j) |
---|
| 154 | + | @Callable(l) |
---|
144 | 155 | | func deposit () = { |
---|
145 | | - | let i = toString(j.caller) |
---|
146 | | - | let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)]) |
---|
147 | | - | if ((u == u)) |
---|
| 156 | + | let i = toString(l.caller) |
---|
| 157 | + | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)]) |
---|
| 158 | + | if ((v == v)) |
---|
148 | 159 | | then [IntegerEntry((i + "supply_waves"), 1000000)] |
---|
149 | 160 | | else throw("Strict value is not equal to itself.") |
---|
150 | 161 | | } |
---|
151 | 162 | | |
---|
152 | 163 | | |
---|
153 | 164 | | |
---|
154 | | - | @Callable(j) |
---|
| 165 | + | @Callable(l) |
---|
155 | 166 | | func withdraw (g,k) = { |
---|
156 | | - | let i = toString(j.caller) |
---|
157 | | - | let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil) |
---|
158 | | - | if ((u == u)) |
---|
| 167 | + | let i = toString(l.caller) |
---|
| 168 | + | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil) |
---|
| 169 | + | if ((v == v)) |
---|
159 | 170 | | then [IntegerEntry(((i + "_withdrew_") + g), k)] |
---|
160 | 171 | | else throw("Strict value is not equal to itself.") |
---|
161 | 172 | | } |
---|
162 | 173 | | |
---|
163 | 174 | | |
---|
164 | 175 | | |
---|
165 | | - | @Callable(j) |
---|
| 176 | + | @Callable(l) |
---|
166 | 177 | | func checkBalance (g) = { |
---|
167 | | - | let i = j.caller |
---|
| 178 | + | let i = l.caller |
---|
168 | 179 | | if ((g == "WAVES")) |
---|
169 | 180 | | then [IntegerEntry("Waves Balance", wavesBalance(i).available)] |
---|
170 | 181 | | else [IntegerEntry("Asset Balance", assetBalance(i, fromBase58String(g)))] |
---|
171 | 182 | | } |
---|
172 | 183 | | |
---|
173 | 184 | | |
---|
174 | | - | @Verifier(D) |
---|
175 | | - | func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey) |
---|
| 185 | + | @Verifier(E) |
---|
| 186 | + | func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) |
---|
176 | 187 | | |
---|