tx · F7q6VDXsJdmLz5PEwss27dK14xz9FWgWg2ZvyhzNc79m 3N313C4z4RbEC616WHLeVRpGQkoxaGWrdtM: -0.01000000 Waves 2019.08.14 09:35 [630387] smart account 3N313C4z4RbEC616WHLeVRpGQkoxaGWrdtM > SELF 0.00000000 Waves
{ "type": 13, "id": "F7q6VDXsJdmLz5PEwss27dK14xz9FWgWg2ZvyhzNc79m", "fee": 1000000, "feeAssetId": null, "timestamp": 1565764500388, "version": 1, "sender": "3N313C4z4RbEC616WHLeVRpGQkoxaGWrdtM", "senderPublicKey": "AWzwkpZ5dYGDGavkFVy562SJPRsa9koEzroPmPk9EYzh", "proofs": [ "2g6cpoH3gPoBvcuhyAtM2JrEJx3M2oyyxD4B788gbkAXfeMG5nXbWVymrjSW3tzXYgsrss4aZLepyZEGBGsBYXwV" ], "script": "base64:AAIDAAAAAAAAAAAAAAAeAAAAAAxkZXBvc2l0VG9rZW4FAAAABHVuaXQAAAAADW9yYWNsZURhdGFLZXkCAAAAC3dhdmVzX2J0Y184AAAAAA5ncmFjZVBlcmlvZEtleQIAAAALZ3JhY2VQZXJpb2QAAAAAEWludGVyZXN0UGVyaW9kS2V5AgAAAA5pbnRlcmVzdFBlcmlvZAAAAAAJb3JhY2xlS2V5AgAAAAZvcmFjbGUAAAAAFWRpc2NvdW50UGVyY2VudGlsZUtleQIAAAASZGlzY291bnRQZXJjZW50aWxlAAAAAAptYXhSYXRlS2V5AgAAAAdtYXhSYXRlAAAAAA1hc3NldFRva2VuS2V5AgAAAAphc3NldFRva2VuAAAAAAhvd25lcktleQIAAAAFb3duZXIBAAAAB3N0YXJ0T2YAAAABAAAABnJlbnRlcgkAASwAAAACAgAAAAlzdGFydF9vZl8FAAAABnJlbnRlcgEAAAAMZW5kT2ZHcmFjZU9mAAAAAQAAAAZyZW50ZXIJAAEsAAAAAgIAAAAQZW5kX29mX2dyYWNlX29mXwUAAAAGcmVudGVyAQAAAA1lbmRPZkZyZWV6ZU9mAAAAAQAAAAZy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XIgY2FuIGNsb3NlIGV4cGlyZWQgcmVudCBvZiBhIHVzZXIDCQEAAAABIQAAAAEFAAAAC2xvYW5FeHBpcmVkCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAN093bmVyIGNhbiBvbmx5IGNsb3NlIGV4cGlyZWQgcmVudHMuIEV4cGlyaW5nIG9uIGhlaWdodCAJAAGkAAAAAQUAAAAMZXhwaXJ5SGVpZ2h0AgAAABAsIGN1cnJlbnQgaGVpZ2h0CQABpAAAAAEFAAAABmhlaWdodAkBAAAADGNsb3NlRXhwaXJlZAAAAAEFAAAAB2FkZHJlc3MAAAABaQEAAAAHZGlzY2FyZAAAAAAEAAAAB2FkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkBAAAADGNsb3NlRXhwaXJlZAAAAAEFAAAAB2FkZHJlc3MAAAABaQEAAAAId2l0aGRyYXcAAAABAAAABmFtb3VudAMJAAAAAAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAAVvd25lcgkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAVvd25lcgUAAAAGYW1vdW50BQAAAAphc3NldFRva2VuBQAAAANuaWwJAAACAAAAAQIAAAAcb25seSBvd25lciBjYW4gd2l0aGRyYXcgV0JUQwAAAACB7Dio", "chainId": 84, "height": 630387, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = unit | |
5 | + | ||
6 | + | let b = "waves_btc_8" | |
7 | + | ||
8 | + | let c = "gracePeriod" | |
9 | + | ||
10 | + | let d = "interestPeriod" | |
11 | + | ||
12 | + | let e = "oracle" | |
13 | + | ||
14 | + | let f = "discountPercentile" | |
15 | + | ||
16 | + | let g = "maxRate" | |
17 | + | ||
18 | + | let h = "assetToken" | |
19 | + | ||
20 | + | let i = "owner" | |
21 | + | ||
22 | + | func j (k) = ("start_of_" + k) | |
23 | + | ||
24 | + | ||
25 | + | func l (k) = ("end_of_grace_of_" + k) | |
26 | + | ||
27 | + | ||
28 | + | func m (k) = ("end_of_freeze_of_" + k) | |
29 | + | ||
30 | + | ||
31 | + | func n (k) = ("rate_of_" + k) | |
32 | + | ||
33 | + | ||
34 | + | func o (k) = ("deposit_of_" + k) | |
35 | + | ||
36 | + | ||
37 | + | func p (k) = ("lend_of_" + k) | |
38 | + | ||
39 | + | ||
40 | + | func q (r) = ("registered_return_of_" + r) | |
41 | + | ||
42 | + | ||
43 | + | let s = addressFromStringValue(value(getString(this, i))) | |
44 | + | ||
45 | + | let t = fromBase58String(value(getString(this, h))) | |
46 | + | ||
47 | + | let u = value(getInteger(this, c)) | |
48 | + | ||
49 | + | let v = value(getInteger(this, d)) | |
50 | + | ||
51 | + | let w = value(getInteger(this, g)) | |
52 | + | ||
53 | + | let x = value(getString(this, e)) | |
54 | + | ||
55 | + | let y = value(getInteger(value(addressFromString(x)), b)) | |
56 | + | ||
57 | + | let z = value(getInteger(this, f)) | |
58 | + | ||
59 | + | let A = if ((w >= y)) | |
60 | + | then y | |
61 | + | else throw(((("Suspicious rate value: actual: " + toString(y)) + ", max: ") + toString(w))) | |
62 | + | ||
63 | + | let B = isDefined(getString(this, h)) | |
64 | + | ||
65 | + | func C (k) = { | |
66 | + | let D = getInteger(this, j(k)) | |
67 | + | if ($isInstanceOf(D, "Int")) | |
68 | + | then { | |
69 | + | let E = D | |
70 | + | (E > 0) | |
71 | + | } | |
72 | + | else false | |
73 | + | } | |
74 | + | ||
75 | + | ||
76 | + | func F (k) = WriteSet([DataEntry(j(k), 0), DataEntry(l(k), 0), DataEntry(m(k), 0), DataEntry(n(k), 0), DataEntry(o(k), 0), DataEntry(p(k), 0)]) | |
77 | + | ||
78 | + | ||
79 | + | func G (H) = { | |
80 | + | let I = value(getInteger(this, o(H))) | |
81 | + | ScriptResult(F(H), TransferSet([ScriptTransfer(s, I, a)])) | |
82 | + | } | |
83 | + | ||
84 | + | ||
85 | + | func J (k,K,L) = { | |
86 | + | let M = toString(k) | |
87 | + | let N = C(M) | |
88 | + | let O = (K == t) | |
89 | + | let P = getIntegerValue(this, p(M)) | |
90 | + | let Q = (P == L) | |
91 | + | let R = getIntegerValue(this, o(M)) | |
92 | + | if (!(N)) | |
93 | + | then throw("No open loan for caller") | |
94 | + | else if (!(O)) | |
95 | + | then throw(((("User must return WBTC: " + toBase58String(t)) + " but returning: ") + toBase58String(K))) | |
96 | + | else if (!(Q)) | |
97 | + | then throw(((("User must return " + toString(P)) + " WBTC, but returning ") + toString(L))) | |
98 | + | else { | |
99 | + | let S = getIntegerValue(this, l(M)) | |
100 | + | let T = getIntegerValue(this, m(M)) | |
101 | + | let U = (S >= height) | |
102 | + | let V = if (U) | |
103 | + | then R | |
104 | + | else if ((height > T)) | |
105 | + | then throw("your loan has expired") | |
106 | + | else fraction(R, (T - height), (T - S)) | |
107 | + | let W = (R - V) | |
108 | + | ScriptResult(F(M), TransferSet([ScriptTransfer(k, V, a), ScriptTransfer(s, W, a)])) | |
109 | + | } | |
110 | + | } | |
111 | + | ||
112 | + | ||
113 | + | @Callable(X) | |
114 | + | func init (s,Y,x,w,Z,aa,ab) = if ((X.caller == this)) | |
115 | + | then WriteSet([DataEntry(i, s), DataEntry(f, Z), DataEntry(h, Y), DataEntry(e, x), DataEntry(g, w), DataEntry(c, aa), DataEntry(d, ab)]) | |
116 | + | else throw("only dapp itself can init") | |
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | @Callable(X) | |
121 | + | func updateParams (x,w,Z,aa,ab) = if ((X.caller == s)) | |
122 | + | then WriteSet([DataEntry(e, x), DataEntry(g, w), DataEntry(f, Z), DataEntry(c, aa), DataEntry(d, ab)]) | |
123 | + | else throw("only contract owner can update params") | |
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | @Callable(X) | |
128 | + | func borrow () = { | |
129 | + | let k = toBase58String(X.caller.bytes) | |
130 | + | if (C(k)) | |
131 | + | then throw((k + " already has an open loan")) | |
132 | + | else { | |
133 | + | let D = X.payment | |
134 | + | if ($isInstanceOf(D, "AttachedPayment")) | |
135 | + | then { | |
136 | + | let ac = D | |
137 | + | if ((ac.assetId == a)) | |
138 | + | then { | |
139 | + | let ad = height | |
140 | + | let S = (height + u) | |
141 | + | let T = (S + v) | |
142 | + | let ae = ac.amount | |
143 | + | let af = fraction((ac.amount / A), z, 100) | |
144 | + | let ag = WriteSet([DataEntry(j(k), ad), DataEntry(l(k), S), DataEntry(m(k), T), DataEntry(n(k), fraction(A, 100, z)), DataEntry(o(k), ae), DataEntry(p(k), af)]) | |
145 | + | ScriptResult(ag, TransferSet([ScriptTransfer(X.caller, af, t)])) | |
146 | + | } | |
147 | + | else throw(("can only lend WBTC for WAVES, but got " + toBase58String(value(ac.assetId)))) | |
148 | + | } | |
149 | + | else throw("payment in assetTokens must be attached") | |
150 | + | } | |
151 | + | } | |
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | @Callable(X) | |
156 | + | func restoreBuyBack (r) = { | |
157 | + | let D = transferTransactionById(fromBase58String(r)) | |
158 | + | if ($isInstanceOf(D, "TransferTransaction")) | |
159 | + | then { | |
160 | + | let ah = D | |
161 | + | let ai = getBoolean(this, q(r)) | |
162 | + | if ($isInstanceOf(ai, "Boolean")) | |
163 | + | then { | |
164 | + | let aj = ai | |
165 | + | throw((("Tx id " + r) + " has already been registered")) | |
166 | + | } | |
167 | + | else if ((ah.recipient != this)) | |
168 | + | then throw("Can only register payments for this dapp address") | |
169 | + | else { | |
170 | + | let ak = J(ah.sender, value(ah.assetId), ah.amount) | |
171 | + | ScriptResult(WriteSet([DataEntry(q(r), true), ak.writeSet.data]), ak.transferSet) | |
172 | + | } | |
173 | + | } | |
174 | + | else if ($isInstanceOf(D, "Unit")) | |
175 | + | then throw("Transaction doesn't exist") | |
176 | + | else throw() | |
177 | + | } | |
178 | + | ||
179 | + | ||
180 | + | ||
181 | + | @Callable(X) | |
182 | + | func buyBack () = J(X.caller, value(value(X.payment).assetId), value(X.payment).amount) | |
183 | + | ||
184 | + | ||
185 | + | ||
186 | + | @Callable(X) | |
187 | + | func closeExpiredFor (H) = { | |
188 | + | let al = value(getInteger(this, m(H))) | |
189 | + | let am = (height > al) | |
190 | + | let an = (X.caller == s) | |
191 | + | if (!(an)) | |
192 | + | then throw("Only owner can close expired rent of a user") | |
193 | + | else if (!(am)) | |
194 | + | then throw(((("Owner can only close expired rents. Expiring on height " + toString(al)) + ", current height") + toString(height))) | |
195 | + | else G(H) | |
196 | + | } | |
197 | + | ||
198 | + | ||
199 | + | ||
200 | + | @Callable(X) | |
201 | + | func discard () = { | |
202 | + | let H = toBase58String(X.caller.bytes) | |
203 | + | G(H) | |
204 | + | } | |
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | @Callable(X) | |
209 | + | func withdraw (ao) = if ((X.caller == s)) | |
210 | + | then TransferSet([ScriptTransfer(s, ao, t)]) | |
211 | + | else throw("only owner can withdraw WBTC") | |
212 | + | ||
213 | + |
github/deemru/w8io/026f985 19.96 ms ◑