tx · 4yjhaehSSSKwF8CpjdkAqrXRmRPShNM4x8JLWvx3iatG

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.06.27 11:12 [2640797] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "4yjhaehSSSKwF8CpjdkAqrXRmRPShNM4x8JLWvx3iatG", "fee": 1000000, "feeAssetId": null, "timestamp": 1687853530749, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "5BeswQXpjzrcEqUEoqPhoeqsBNiYHyVprNcZCvQbCCd82viKXRRWnwbhTx5UYZJco3hahNvE5hzKxEgxrMvwbAuf" ], "script": "base64:BgIqCAISBAoCAQgSAwoBARIDCgEBEgMKAQESBAoCCAESABIECgIIARIDCgEIBQADYXJyCQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUFA25pbAAEYXJyMgkAzAgCAAEJAMwIAgACBQNuaWwBA3N1bQIBYQFiCQD8BwQJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNOM0RuVmZmblV5WnR6Mk1SYms1VTdnaU4xMTJXZW1wTU5kAgZib3Jyb3cJAMwIAgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQJAMwIAgDAhD0FA25pbAUDbmlsAQ9nZXRDdXJyZW50UHJpY2UBCmFzc2V0SWRTdHIDCQAAAgUKYXNzZXRJZFN0cgIFV0FWRVMAAgkAAgECBUVycm9yAQpnZXRCYWxhbmNlAgphc3NldElkU3RyB2FkZHJlc3MDCQAAAgUKYXNzZXRJZFN0cgIFV0FWRVMICQDvBwEFB2FkZHJlc3MJYXZhaWxhYmxlCQDwBwIFB2FkZHJlc3MJANkEAQUKYXNzZXRJZFN0cggBaQEN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O8HAQUHYWRkcmVzcwlhdmFpbGFibGUFA25pbAkAzAgCCQEMSW50ZWdlckVudHJ5AgINQXNzZXQgQmFsYW5jZQkA8AcCBQdhZGRyZXNzCQDZBAEFCmFzc2V0SWRTdHIFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXk+o2wI", "height": 2640797, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3GRdukLdzBj5FT5SjVzMEBWhxEHUVPfEeuujmqoA4qwX Next: BLkAVQsubnWRZRfXW2ye8WAzFx7G25tMjhJ2mP36hT2T Diff:
OldNewDifferences
1919
2020
2121 @Callable(j)
22+func transferToken (k,l) = if ((j.caller != this))
23+ then throw("only for internal smart contract invocations")
24+ else [ScriptTransfer(this, k, unit), IntegerEntry((l + "_deposited_WAVES"), k)]
25+
26+
27+
28+@Callable(j)
2229 func long2x (k) = {
2330 let i = toString(j.caller)
24- let l = h("WAVES", j.caller)
25- if ((l > k))
31+ let m = h("WAVES", j.caller)
32+ if ((m > k))
2633 then {
27- func m (n,o) = {
28- let p = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)])
29- if ((p == p))
34+ func n (o,p) = {
35+ let q = invoke(this, "transferToken", [k, j.caller], nil)
36+ if ((q == q))
3037 then {
31- let q = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil)
32- if ((q == q))
33- then (n + o)
38+ let r = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)])
39+ if ((r == r))
40+ then {
41+ let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil)
42+ if ((s == s))
43+ then (o + p)
44+ else throw("Strict value is not equal to itself.")
45+ }
3446 else throw("Strict value is not equal to itself.")
3547 }
3648 else throw("Strict value is not equal to itself.")
3749 }
3850
39- let r = [k, k]
40- let s = {
41- let t = r
42- let u = size(t)
43- let v = 0
44- func w (x,y) = if ((y >= u))
45- then x
46- else m(x, t[y])
51+ let t = [k, k]
52+ let u = {
53+ let v = t
54+ let w = size(v)
55+ let x = 0
56+ func y (z,A) = if ((A >= w))
57+ then z
58+ else n(z, v[A])
4759
48- func z (x,y) = if ((y >= u))
49- then x
60+ func B (z,A) = if ((A >= w))
61+ then z
5062 else throw("List size exceeds 2")
5163
52- z(w(w(v, 0), 1), 2)
64+ B(y(y(x, 0), 1), 2)
5365 }
54-[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(j.caller, ((s * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, s, unit)]
66+[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(j.caller, ((u * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, u, unit)]
5567 }
5668 else throw("Error!")
5769 }
6173 @Callable(j)
6274 func borrow (k) = {
6375 let i = toString(j.caller)
64- let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
65- if ((s == s))
76+ let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
77+ if ((u == u))
6678 then [ScriptTransfer(j.caller, k, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k)]
6779 else throw("Strict value is not equal to itself.")
6880 }
7284 @Callable(j)
7385 func borrow2 (k) = {
7486 let i = toString(j.caller)
75- func m (n,o) = {
76- let A = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
77- if ((A == A))
78- then (n + o)
87+ func n (o,p) = {
88+ let C = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
89+ if ((C == C))
90+ then (o + p)
7991 else throw("Strict value is not equal to itself.")
8092 }
8193
82- let r = [k, k]
83- let s = {
84- let t = r
85- let u = size(t)
86- let v = 0
87- func w (x,y) = if ((y >= u))
88- then x
89- else m(x, t[y])
94+ let t = [k, k]
95+ let u = {
96+ let v = t
97+ let w = size(v)
98+ let x = 0
99+ func y (z,A) = if ((A >= w))
100+ then z
101+ else n(z, v[A])
90102
91- func z (x,y) = if ((y >= u))
92- then x
103+ func B (z,A) = if ((A >= w))
104+ then z
93105 else throw("List size exceeds 2")
94106
95- z(w(w(v, 0), 1), 2)
107+ B(y(y(x, 0), 1), 2)
96108 }
97-[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, s, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
109+[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, u, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
98110 }
99111
100112
102114 @Callable(j)
103115 func borrow5 (g,k) = {
104116 let i = toString(j.caller)
105- let s = {
106- let t = a
107- let u = size(t)
108- let v = 0
109- func w (x,y) = if ((y >= u))
110- then x
111- else c(x, t[y])
117+ let u = {
118+ let v = a
119+ let w = size(v)
120+ let x = 0
121+ func y (z,A) = if ((A >= w))
122+ then z
123+ else c(z, v[A])
112124
113- func z (x,y) = if ((y >= u))
114- then x
125+ func B (z,A) = if ((A >= w))
126+ then z
115127 else throw("List size exceeds 5")
116128
117- z(w(w(w(w(w(v, 0), 1), 2), 3), 4), 5)
129+ B(y(y(y(y(y(x, 0), 1), 2), 3), 4), 5)
118130 }
119- if ((s == s))
131+ if ((u == u))
120132 then [IntegerEntry(((i + "_borrowed_") + g), k)]
121133 else throw("Strict value is not equal to itself.")
122134 }
126138 @Callable(j)
127139 func deposit () = {
128140 let i = toString(j.caller)
129- let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)])
130- if ((s == s))
141+ let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)])
142+ if ((u == u))
131143 then [IntegerEntry((i + "supply_waves"), 1000000)]
132144 else throw("Strict value is not equal to itself.")
133145 }
137149 @Callable(j)
138150 func withdraw (g,k) = {
139151 let i = toString(j.caller)
140- let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil)
141- if ((s == s))
152+ let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil)
153+ if ((u == u))
142154 then [IntegerEntry(((i + "_withdrew_") + g), k)]
143155 else throw("Strict value is not equal to itself.")
144156 }
154166 }
155167
156168
157-@Verifier(B)
158-func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
169+@Verifier(D)
170+func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
159171
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
2121 @Callable(j)
22+func transferToken (k,l) = if ((j.caller != this))
23+ then throw("only for internal smart contract invocations")
24+ else [ScriptTransfer(this, k, unit), IntegerEntry((l + "_deposited_WAVES"), k)]
25+
26+
27+
28+@Callable(j)
2229 func long2x (k) = {
2330 let i = toString(j.caller)
24- let l = h("WAVES", j.caller)
25- if ((l > k))
31+ let m = h("WAVES", j.caller)
32+ if ((m > k))
2633 then {
27- func m (n,o) = {
28- let p = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)])
29- if ((p == p))
34+ func n (o,p) = {
35+ let q = invoke(this, "transferToken", [k, j.caller], nil)
36+ if ((q == q))
3037 then {
31- let q = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil)
32- if ((q == q))
33- then (n + o)
38+ let r = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)])
39+ if ((r == r))
40+ then {
41+ let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * f("WAVES")) / 100)], nil)
42+ if ((s == s))
43+ then (o + p)
44+ else throw("Strict value is not equal to itself.")
45+ }
3446 else throw("Strict value is not equal to itself.")
3547 }
3648 else throw("Strict value is not equal to itself.")
3749 }
3850
39- let r = [k, k]
40- let s = {
41- let t = r
42- let u = size(t)
43- let v = 0
44- func w (x,y) = if ((y >= u))
45- then x
46- else m(x, t[y])
51+ let t = [k, k]
52+ let u = {
53+ let v = t
54+ let w = size(v)
55+ let x = 0
56+ func y (z,A) = if ((A >= w))
57+ then z
58+ else n(z, v[A])
4759
48- func z (x,y) = if ((y >= u))
49- then x
60+ func B (z,A) = if ((A >= w))
61+ then z
5062 else throw("List size exceeds 2")
5163
52- z(w(w(v, 0), 1), 2)
64+ B(y(y(x, 0), 1), 2)
5365 }
54-[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(j.caller, ((s * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, s, unit)]
66+[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * f("WAVES"))), ScriptTransfer(j.caller, ((u * f("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, u, unit)]
5567 }
5668 else throw("Error!")
5769 }
5870
5971
6072
6173 @Callable(j)
6274 func borrow (k) = {
6375 let i = toString(j.caller)
64- let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
65- if ((s == s))
76+ let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
77+ if ((u == u))
6678 then [ScriptTransfer(j.caller, k, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k)]
6779 else throw("Strict value is not equal to itself.")
6880 }
6981
7082
7183
7284 @Callable(j)
7385 func borrow2 (k) = {
7486 let i = toString(j.caller)
75- func m (n,o) = {
76- let A = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
77- if ((A == A))
78- then (n + o)
87+ func n (o,p) = {
88+ let C = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil)
89+ if ((C == C))
90+ then (o + p)
7991 else throw("Strict value is not equal to itself.")
8092 }
8193
82- let r = [k, k]
83- let s = {
84- let t = r
85- let u = size(t)
86- let v = 0
87- func w (x,y) = if ((y >= u))
88- then x
89- else m(x, t[y])
94+ let t = [k, k]
95+ let u = {
96+ let v = t
97+ let w = size(v)
98+ let x = 0
99+ func y (z,A) = if ((A >= w))
100+ then z
101+ else n(z, v[A])
90102
91- func z (x,y) = if ((y >= u))
92- then x
103+ func B (z,A) = if ((A >= w))
104+ then z
93105 else throw("List size exceeds 2")
94106
95- z(w(w(v, 0), 1), 2)
107+ B(y(y(x, 0), 1), 2)
96108 }
97-[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, s, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
109+[IntegerEntry(((i + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(j.caller, u, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')]
98110 }
99111
100112
101113
102114 @Callable(j)
103115 func borrow5 (g,k) = {
104116 let i = toString(j.caller)
105- let s = {
106- let t = a
107- let u = size(t)
108- let v = 0
109- func w (x,y) = if ((y >= u))
110- then x
111- else c(x, t[y])
117+ let u = {
118+ let v = a
119+ let w = size(v)
120+ let x = 0
121+ func y (z,A) = if ((A >= w))
122+ then z
123+ else c(z, v[A])
112124
113- func z (x,y) = if ((y >= u))
114- then x
125+ func B (z,A) = if ((A >= w))
126+ then z
115127 else throw("List size exceeds 5")
116128
117- z(w(w(w(w(w(v, 0), 1), 2), 3), 4), 5)
129+ B(y(y(y(y(y(x, 0), 1), 2), 3), 4), 5)
118130 }
119- if ((s == s))
131+ if ((u == u))
120132 then [IntegerEntry(((i + "_borrowed_") + g), k)]
121133 else throw("Strict value is not equal to itself.")
122134 }
123135
124136
125137
126138 @Callable(j)
127139 func deposit () = {
128140 let i = toString(j.caller)
129- let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)])
130- if ((s == s))
141+ let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)])
142+ if ((u == u))
131143 then [IntegerEntry((i + "supply_waves"), 1000000)]
132144 else throw("Strict value is not equal to itself.")
133145 }
134146
135147
136148
137149 @Callable(j)
138150 func withdraw (g,k) = {
139151 let i = toString(j.caller)
140- let s = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil)
141- if ((s == s))
152+ let u = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil)
153+ if ((u == u))
142154 then [IntegerEntry(((i + "_withdrew_") + g), k)]
143155 else throw("Strict value is not equal to itself.")
144156 }
145157
146158
147159
148160 @Callable(j)
149161 func checkBalance (g) = {
150162 let i = j.caller
151163 if ((g == "WAVES"))
152164 then [IntegerEntry("Waves Balance", wavesBalance(i).available)]
153165 else [IntegerEntry("Asset Balance", assetBalance(i, fromBase58String(g)))]
154166 }
155167
156168
157-@Verifier(B)
158-func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
169+@Verifier(D)
170+func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
159171

github/deemru/w8io/169f3d6 
50.52 ms