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:BgIsCAISBAoCAQgSABIDCgEBEgMKAQESAwoBARIECgIIARIAEgQKAggBEgMKAQgGAANhcnIJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQUDbmlsAARhcnIyCQDMCAIAAQkAzAgCAAIFA25pbAEDc3VtAgFhAWIJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQCBmJvcnJvdwkAzAgCAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAkAzAgCAMCEPQUDbmlsBQNuaWwBD2dldEN1cnJlbnRQcmljZQEKYXNzZXRJZFN0cgMJAAACBQphc3NldElkU3RyAgVXQVZFUwACCQACAQIFRXJyb3IBCmdldEJhbGFuY2UCCmFzc2V0SWRTdHIHYWRkcmVzcwMJAAACBQphc3NldElkU3RyAgVXQVZFUwgJAO8HAQUHYWRkcmVzcwlhdmFpbGFibGUJAPAHAgUHYWRkcmVzcwkA2QQBBQphc3NldElkU3RyARl0cmFuc2Zlcldh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MJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQCCHdpdGhkcmF3CQDMCAIFCmFzc2V0SWRTdHIJAMwIAgULYXNzZXRBbW91bnQFA25pbAUDbmlsAwkAAAIFA3JlcwUDcmVzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKwCAgUHYWRkcmVzcwIKX3dpdGhkcmV3XwUKYXNzZXRJZFN0cgULYXNzZXRBbW91bnQFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQxjaGVja0JhbGFuY2UBCmFzc2V0SWRTdHIEB2FkZHJlc3MIBQFpBmNhbGxlcgMJAAACBQphc3NldElkU3RyAgVXQVZFUwkAzAgCCQEMSW50ZWdlckVudHJ5AgINV2F2ZXMgQmFsYW5jZQgJAO8HAQUHYWRkcmVzcwlhdmFpbGFibGUFA25pbAkAzAgCCQEMSW50ZWdlckVudHJ5AgINQXNzZXQgQmFsYW5jZQkA8AcCBQdhZGRyZXNzCQDZBAEFCmFzc2V0SWRTdHIFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmuQ9N5", "height": 2640870, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3hDEba7ishGuVj11c4xbNxgYEJTZW3JcNHLHPLvniiV9 Next: VwToUbpMaF3Ja1Vg88oE5hU8wf8vkT93ZSqYonPGzWK Diff:
OldNewDifferences
1818 else assetBalance(i, fromBase58String(g))
1919
2020
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))
2326 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)]
2528
2629
2730
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+ }
3041
3142
3243
33-@Callable(j)
44+@Callable(l)
3445 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))
3849 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))
4253 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))
4556 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)
4960 else throw("Strict value is not equal to itself.")
5061 }
5162 else throw("Strict value is not equal to itself.")
5364 else throw("Strict value is not equal to itself.")
5465 }
5566
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])
6475
65- func B (z,A) = if ((A >= w))
66- then z
76+ func C (A,B) = if ((B >= x))
77+ then A
6778 else throw("List size exceeds 2")
6879
69- B(y(y(x, 0), 1), 2)
80+ C(z(z(y, 0), 1), 2)
7081 }
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)]
7283 }
7384 else throw("Error!")
7485 }
7586
7687
7788
78-@Callable(j)
89+@Callable(l)
7990 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)]
8495 else throw("Strict value is not equal to itself.")
8596 }
8697
8798
8899
89-@Callable(j)
100+@Callable(l)
90101 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)
96107 else throw("Strict value is not equal to itself.")
97108 }
98109
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])
107118
108- func B (z,A) = if ((A >= w))
109- then z
119+ func C (A,B) = if ((B >= x))
120+ then A
110121 else throw("List size exceeds 2")
111122
112- B(y(y(x, 0), 1), 2)
123+ C(z(z(y, 0), 1), 2)
113124 }
114-[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, u, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
125+[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(l.caller, v, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
115126 }
116127
117128
118129
119-@Callable(j)
130+@Callable(l)
120131 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])
129140
130- func B (z,A) = if ((A >= w))
131- then z
141+ func C (A,B) = if ((B >= x))
142+ then A
132143 else throw("List size exceeds 5")
133144
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)
135146 }
136- if ((u == u))
147+ if ((v == v))
137148 then [IntegerEntry(((i + "_borrowed_") + g), k)]
138149 else throw("Strict value is not equal to itself.")
139150 }
140151
141152
142153
143-@Callable(j)
154+@Callable(l)
144155 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))
148159 then [IntegerEntry((i + "supply_waves"), 1000000)]
149160 else throw("Strict value is not equal to itself.")
150161 }
151162
152163
153164
154-@Callable(j)
165+@Callable(l)
155166 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))
159170 then [IntegerEntry(((i + "_withdrew_") + g), k)]
160171 else throw("Strict value is not equal to itself.")
161172 }
162173
163174
164175
165-@Callable(j)
176+@Callable(l)
166177 func checkBalance (g) = {
167- let i = j.caller
178+ let i = l.caller
168179 if ((g == "WAVES"))
169180 then [IntegerEntry("Waves Balance", wavesBalance(i).available)]
170181 else [IntegerEntry("Asset Balance", assetBalance(i, fromBase58String(g)))]
171182 }
172183
173184
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)
176187
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = [1, 2, 3, 4, 5]
55
66 let b = [1, 2]
77
88 func c (d,e) = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", 1000000], nil)
99
1010
1111 func f (g) = if ((g == "WAVES"))
1212 then 2
1313 else throw("Error")
1414
1515
1616 func h (g,i) = if ((g == "WAVES"))
1717 then wavesBalance(i).available
1818 else assetBalance(i, fromBase58String(g))
1919
2020
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))
2326 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)]
2528
2629
2730
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+ }
3041
3142
3243
33-@Callable(j)
44+@Callable(l)
3445 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))
3849 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))
4253 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))
4556 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)
4960 else throw("Strict value is not equal to itself.")
5061 }
5162 else throw("Strict value is not equal to itself.")
5263 }
5364 else throw("Strict value is not equal to itself.")
5465 }
5566
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])
6475
65- func B (z,A) = if ((A >= w))
66- then z
76+ func C (A,B) = if ((B >= x))
77+ then A
6778 else throw("List size exceeds 2")
6879
69- B(y(y(x, 0), 1), 2)
80+ C(z(z(y, 0), 1), 2)
7081 }
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)]
7283 }
7384 else throw("Error!")
7485 }
7586
7687
7788
78-@Callable(j)
89+@Callable(l)
7990 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)]
8495 else throw("Strict value is not equal to itself.")
8596 }
8697
8798
8899
89-@Callable(j)
100+@Callable(l)
90101 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)
96107 else throw("Strict value is not equal to itself.")
97108 }
98109
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])
107118
108- func B (z,A) = if ((A >= w))
109- then z
119+ func C (A,B) = if ((B >= x))
120+ then A
110121 else throw("List size exceeds 2")
111122
112- B(y(y(x, 0), 1), 2)
123+ C(z(z(y, 0), 1), 2)
113124 }
114-[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, u, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
125+[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(l.caller, v, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
115126 }
116127
117128
118129
119-@Callable(j)
130+@Callable(l)
120131 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])
129140
130- func B (z,A) = if ((A >= w))
131- then z
141+ func C (A,B) = if ((B >= x))
142+ then A
132143 else throw("List size exceeds 5")
133144
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)
135146 }
136- if ((u == u))
147+ if ((v == v))
137148 then [IntegerEntry(((i + "_borrowed_") + g), k)]
138149 else throw("Strict value is not equal to itself.")
139150 }
140151
141152
142153
143-@Callable(j)
154+@Callable(l)
144155 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))
148159 then [IntegerEntry((i + "supply_waves"), 1000000)]
149160 else throw("Strict value is not equal to itself.")
150161 }
151162
152163
153164
154-@Callable(j)
165+@Callable(l)
155166 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))
159170 then [IntegerEntry(((i + "_withdrew_") + g), k)]
160171 else throw("Strict value is not equal to itself.")
161172 }
162173
163174
164175
165-@Callable(j)
176+@Callable(l)
166177 func checkBalance (g) = {
167- let i = j.caller
178+ let i = l.caller
168179 if ((g == "WAVES"))
169180 then [IntegerEntry("Waves Balance", wavesBalance(i).available)]
170181 else [IntegerEntry("Asset Balance", assetBalance(i, fromBase58String(g)))]
171182 }
172183
173184
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)
176187

github/deemru/w8io/169f3d6 
59.74 ms