tx · AH9AK5TJk4WwEU395BFqp7iJ4AbcgZboWQ3nTrKd63AP

3NBgsjXLDDCSJ1S26pQtK2q78rDmt8fDZHJ:  -0.01000000 Waves

2019.07.04 14:30 [570621] smart account 3NBgsjXLDDCSJ1S26pQtK2q78rDmt8fDZHJ > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
21.44 ms