tx · FY3LcmAJKzwe7hV8UHrTfZiPCjpbidDsowYP3xJ7LTK8 3MyfKzBNordUSxbv54zj1hxm98ojcDvaiXU: -0.04000000 Waves 2021.09.01 21:29 [1684330] smart account 3MyfKzBNordUSxbv54zj1hxm98ojcDvaiXU > SELF 0.00000000 Waves
{ "type": 13, "id": "FY3LcmAJKzwe7hV8UHrTfZiPCjpbidDsowYP3xJ7LTK8", "fee": 4000000, "feeAssetId": null, "timestamp": 1630520972395, "version": 2, "chainId": 84, "sender": "3MyfKzBNordUSxbv54zj1hxm98ojcDvaiXU", "senderPublicKey": "EhGswdVQkp8SXCWyKvRCUKYDidTrRjnzTPa8CZk6GYgN", "proofs": [ "5h4BUGQeoA1pQN1tPgxsMrRu9TPyUzYek5tYWpkJq68otcwz3ycYY9MBNQZUtrWgRuaxqWj6KsHeoZpGHPRP9ozA" ], "script": "base64:AAIFAAAAAAAAABUIAhIECgIIBBIGCgQICAgIEgMKAQgAAAAmAAAAAApiYXNlRmFjdG9yAAAAAAAAAAPoAAAAAAliYXNlSW5kZXgAACOG8m/BAAAAAAAADWJsb2Nrc1BlclllYXIAAAAAAAAIBSAAAAAABmNvbmZpZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAA1jb25maWdBZGRyZXNzAgAAAAAAAAAABWFkbWluCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAABmNvbmZpZwIAAAAFYWRtaW4CAAAAAAAAAAALd2F2ZXRyb2xsZXIJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAGY29uZmlnAgAAAAt3YXZldHJvbGxlcgIAAAAAAAAAAAphc3NldElkU3ViCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAHYXNzZXR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lckVudHJ5AAAAAgIAAAAMZFRva2VuU3VwcGx5AAAAAAAAAAAABQAAAANuaWwJAAACAAAAAQIAAAATUG9vbCBhbHJlYWR5IHNldHVwIQAAAAFpAQAAAApkZWxldEVudHJ5AAAAAQAAAANrZXkDCQEAAAAOaXNBZG1pbkFkZHJlc3MAAAABCAUAAAABaQAAAAZjYWxsZXIJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAADa2V5BQAAAANuaWwJAAACAAAAAQIAAAAXQ2FsbGVyIGlzIG5vdCBhbiBhZG1pbiEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tled7f8Gc=", "height": 1684330, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 64X3AS6Ptwc2fnmRtPvAPQzYPTk3daUKtMUvSXi3bY57 Next: G8rXyivHFiyBJ7BgnrrUQ23P1hjdkn1HDxoBQ7LxM2Ww Diff:
Old | New | Differences | |
---|---|---|---|
127 | 127 | else throw("Pool already setup!") | |
128 | 128 | ||
129 | 129 | ||
130 | + | ||
131 | + | @Callable(Y) | |
132 | + | func deletEntry (z) = if (v(Y.caller)) | |
133 | + | then [DeleteEntry(z)] | |
134 | + | else throw("Caller is not an admin!") | |
135 | + | ||
136 | + | ||
130 | 137 | @Verifier(ak) | |
131 | 138 | func al () = sigVerify(ak.bodyBytes, ak.proofs[0], ak.senderPublicKey) | |
132 | 139 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1000 | |
5 | 5 | ||
6 | 6 | let b = 10000000000000000 | |
7 | 7 | ||
8 | 8 | let c = 525600 | |
9 | 9 | ||
10 | 10 | let d = valueOrElse(getString(this, "configAddress"), "") | |
11 | 11 | ||
12 | 12 | let e = valueOrElse(getString(addressFromStringValue(d), "admin"), "") | |
13 | 13 | ||
14 | 14 | let f = valueOrElse(getString(addressFromStringValue(d), "wavetroller"), "") | |
15 | 15 | ||
16 | 16 | let g = valueOrErrorMessage(getString(this, "assetId"), "No assetId could be found in data storage!") | |
17 | 17 | ||
18 | 18 | let h = valueOrErrorMessage(getInteger(addressFromStringValue(d), (g + "_Decimals")), (("No key " + (g + "_Decimals")) + " was found")) | |
19 | 19 | ||
20 | 20 | let i = valueOrErrorMessage(getInteger(addressFromStringValue(d), (g + "_Multiplier")), (("No key " + (g + "_Multiplier")) + " was found")) | |
21 | 21 | ||
22 | 22 | let j = valueOrErrorMessage(getInteger(addressFromStringValue(d), (g + "_Kink")), (("No key " + (g + "_Kink")) + " was found")) | |
23 | 23 | ||
24 | 24 | let k = valueOrErrorMessage(getInteger(addressFromStringValue(d), (g + "_JumpMultiplier")), (("No key " + (g + "_JumpMultiplier")) + " was found")) | |
25 | 25 | ||
26 | 26 | let l = valueOrErrorMessage(getInteger(addressFromStringValue(d), (g + "_BaseRate")), (("No key " + (g + "_BaseRate")) + " was found")) | |
27 | 27 | ||
28 | 28 | let m = valueOrErrorMessage(getInteger(addressFromStringValue(d), (g + "_ReserveFactor")), (("No key " + (g + "_ReserveFactor")) + " was found")) | |
29 | 29 | ||
30 | 30 | let n = valueOrElse(getInteger(this, "totalBorrow"), 0) | |
31 | 31 | ||
32 | 32 | let o = valueOrElse(getInteger(this, "totalSupply"), 0) | |
33 | 33 | ||
34 | 34 | let p = valueOrElse(getInteger(this, "totalReserve"), 0) | |
35 | 35 | ||
36 | 36 | let q = valueOrErrorMessage(getInteger(this, "dTokenSupply"), "No key dTokenSupply was found") | |
37 | 37 | ||
38 | 38 | let r = valueOrErrorMessage(getInteger(this, "dTokenDecimals"), "No key dTokenDecimals was found") | |
39 | 39 | ||
40 | 40 | let s = valueOrErrorMessage(getString(this, "dTokenId"), "No key dTokenId was found") | |
41 | 41 | ||
42 | 42 | let t = valueOrElse(getInteger(this, "storedHeight"), height) | |
43 | 43 | ||
44 | 44 | let u = valueOrElse(getInteger(this, "storedIndex"), 10000000000000000) | |
45 | 45 | ||
46 | 46 | func v (w) = if ((addressFromStringValue(e) == w)) | |
47 | 47 | then true | |
48 | 48 | else false | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func x (w) = if ((addressFromStringValue(f) == w)) | |
52 | 52 | then true | |
53 | 53 | else false | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func y (z,A) = StringEntry(z, A) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func B (z,C) = IntegerEntry(z, C) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func D (E) = valueOrElse(getInteger(this, (E + "_tokenBalance")), 0) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | let F = if ((o > 0)) | |
66 | 66 | then fraction(n, a, o) | |
67 | 67 | else 0 | |
68 | 68 | ||
69 | 69 | let G = { | |
70 | 70 | let H = [F, j] | |
71 | 71 | let I = min(H) | |
72 | 72 | let J = [0, (F - j)] | |
73 | 73 | let K = max(J) | |
74 | 74 | ((fraction(i, I, a) + fraction(k, K, a)) + l) | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | let L = fraction(fraction(G, F, a), (a - m), a) | |
78 | 78 | ||
79 | 79 | let M = fraction(G, b, (c * a)) | |
80 | 80 | ||
81 | 81 | let N = (height - t) | |
82 | 82 | ||
83 | 83 | let O = fraction(u, (b + (M * N)), b, CEILING) | |
84 | 84 | ||
85 | 85 | let P = fraction(n, O, u) | |
86 | 86 | ||
87 | 87 | let Q = fraction(n, (M * N), b) | |
88 | 88 | ||
89 | 89 | let R = (o + fraction((a - m), Q, a)) | |
90 | 90 | ||
91 | 91 | let S = (p + fraction(m, Q, a)) | |
92 | 92 | ||
93 | 93 | let T = if ((q > 0)) | |
94 | 94 | then { | |
95 | 95 | let U = ((18 - r) + h) | |
96 | 96 | let V = pow(10, 0, U, 0, 0, CEILING) | |
97 | 97 | fraction(R, V, q) | |
98 | 98 | } | |
99 | 99 | else 20000000000000000 | |
100 | 100 | ||
101 | 101 | func W (X) = { | |
102 | 102 | let U = ((18 - r) + h) | |
103 | 103 | let V = pow(10, 0, U, 0, 0, CEILING) | |
104 | 104 | fraction(X, V, T) | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | @Callable(Y) | |
109 | 109 | func deposit (Z,aa) = if (x(Y.caller)) | |
110 | 110 | then { | |
111 | 111 | let ab = W(Y.payments[0].amount) | |
112 | 112 | let ac = (q + ab) | |
113 | 113 | let ad = (D(Z) + ab) | |
114 | 114 | $Tuple2([Reissue(fromBase58String(s), ab, true), B("dTokenSupply", ac), B((Z + "_tokenBalance"), ad), BooleanEntry((Z + "_useAsCollateral"), aa), B("totalBorrow", P), B("totalSupply", (R + Y.payments[0].amount)), B("totalReserve", S), B("storedIndex", O), B("storedHeight", height), ScriptTransfer(Y.caller, ab, fromBase58String(s))], ab) | |
115 | 115 | } | |
116 | 116 | else throw("Address does not match with wavetroller address!") | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | ||
120 | 120 | @Callable(Y) | |
121 | 121 | func setup (ae,af,ag,ah) = if (!(isDefined(getString(this, "configAddress")))) | |
122 | 122 | then { | |
123 | 123 | let ai = Issue(ag, ah, 0, 8, true) | |
124 | 124 | let aj = calculateAssetId(ai) | |
125 | 125 | [ai, y("assetId", ae), y("configAddress", af), IntegerEntry("totalBorrow", 0), IntegerEntry("totalSupply", 0), IntegerEntry("totalReserve", 0), IntegerEntry("storedIndex", b), IntegerEntry("storedHeight", height), y("dTokenName", ag), y("dTokenId", toBase58String(aj)), IntegerEntry("dTokenDecimals", 8), IntegerEntry("dTokenSupply", 0)] | |
126 | 126 | } | |
127 | 127 | else throw("Pool already setup!") | |
128 | 128 | ||
129 | 129 | ||
130 | + | ||
131 | + | @Callable(Y) | |
132 | + | func deletEntry (z) = if (v(Y.caller)) | |
133 | + | then [DeleteEntry(z)] | |
134 | + | else throw("Caller is not an admin!") | |
135 | + | ||
136 | + | ||
130 | 137 | @Verifier(ak) | |
131 | 138 | func al () = sigVerify(ak.bodyBytes, ak.proofs[0], ak.senderPublicKey) | |
132 | 139 |
github/deemru/w8io/026f985 44.90 ms ◑