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