tx · 9qjQ7prN1uN8zFBAFA3cmehN8bies5ynw7cTvFZpSYzj 3NA3yH1QryPynpwGhEYR3W3LSneJK73rWeL: -0.00900000 Waves 2022.08.10 19:56 [2178604] smart account 3NA3yH1QryPynpwGhEYR3W3LSneJK73rWeL > SELF 0.00000000 Waves
{ "type": 13, "id": "9qjQ7prN1uN8zFBAFA3cmehN8bies5ynw7cTvFZpSYzj", "fee": 900000, "feeAssetId": null, "timestamp": 1660150635638, "version": 2, "chainId": 84, "sender": "3NA3yH1QryPynpwGhEYR3W3LSneJK73rWeL", "senderPublicKey": "6Ji8AyKFQegAeGHgCr6CYZgm3xxVSbQ9A884zpfzxS77", "proofs": [ "4aE6CaptPfDo9ecL7CGmJXREQKNREj88VRv4jLRJVhpwReBAZGfJQjdZeUpkbQAssE4427D8MdtRc4FF8L6m3x4v" ], "script": "base64:AAIFAAAAAAAAAB8IAhIDCgEIEgMKAQgSBAoCCAESBQoDCAgBEgQKAggYAAAAFwAAAAAUc3Rha2VBbW91bnRUaHJlc2hvbGQAAAAAAAAAAAEAAAAAEWxvY2tQZXJpb2RzSW5EYXlzCQAETAAAAAIAAAAAAAAAAAEJAARMAAAAAgAAAAAAAAAACgkABEwAAAACAAAAAAAAAAAeCQAETAAAAAIAAAAAAAAAAFoFAAAAA25pbAAAAAAYcG9zc2libGVUb2tlbnNGb3JSZXdhcmRzCQAETAAAAAICAAAABlJFRFNtYgkABEwAAAACAgAAAANCVEMFAAAAA25pbAAAAAAHaG91cnMyNAAAAAAABSZcAAAAAAAKYXByOG9mMjAyMgAAAAGABnh4AAAAAAAQY3VycmVudFRpbWVzdGFtcAgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAAAAAAE2tleV9IYXNocmF0ZVRva2VuSWQCAAAAD2hhc2hyYXRlVG9rZW5JZAAAAAAPa2V5X1N0YWtlZFRvdGFsAgAAAAxzdGFrZWRfdG90YWwBAAAAD2tleV9Vc2VyU3Rha2luZwAAAAIAAAAHYWRkcmVzc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==", "height": 2178604, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6DaPD16Yqps9GjwdXMDWTy14yvGCJztqcJJ1qbG8WrFb Next: none Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | func i (j,k) = ((j + "_staking_") + k) | |
21 | 21 | ||
22 | 22 | ||
23 | - | func l (j) = (j + "_ | |
23 | + | func l (j) = (j + "_lockedTotal") | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | let m = "last_stake_tx_id" | |
63 | 63 | let H = ((f + d) - (f % d)) | |
64 | 64 | let I = (H + (D * d)) | |
65 | 65 | let J = i(F, toBase58String(B.transactionId)) | |
66 | - | let K = makeString([u, toString(G), C, toString(D), toString(f), toString(I)], ",") | |
66 | + | let K = makeString([u, toString(G), C, toString(D), toString(f), toString(I), toString(E)], ",") | |
67 | 67 | if ((B.transactionId == s)) | |
68 | 68 | then throw("There is only one staking per transaction allowed for now") | |
69 | 69 | else if (isDefined(getString(this, J))) | |
85 | 85 | then throw("Only the DApp itself can call this function") | |
86 | 86 | else if (p) | |
87 | 87 | then throw("DApp is already init") | |
88 | - | else [StringEntry(g, toBase58String(O)), IntegerEntry(h, 0)] | |
88 | + | else [StringEntry(g, toBase58String(O)), IntegerEntry(h, 0), StringEntry(m, toBase58String(B.transactionId))] | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(B) | |
106 | - | func lockBy (E,C,D) = A(B, C, D, valueOrErrorMessage(addressFromString(E), (("Can't parse benefeciary '" + E) + "' as address"))) | |
106 | + | func lockBy (E,C,D) = if ((B.caller != t)) | |
107 | + | then throw("") | |
108 | + | else A(B, C, D, valueOrErrorMessage(addressFromString(E), (("Can't parse benefeciary '" + E) + "' as address"))) | |
107 | 109 | ||
108 | 110 | ||
109 | 111 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1 | |
5 | 5 | ||
6 | 6 | let b = [1, 10, 30, 90] | |
7 | 7 | ||
8 | 8 | let c = ["REDSmb", "BTC"] | |
9 | 9 | ||
10 | 10 | let d = 86400000 | |
11 | 11 | ||
12 | 12 | let e = 1649376000000 | |
13 | 13 | ||
14 | 14 | let f = lastBlock.timestamp | |
15 | 15 | ||
16 | 16 | let g = "hashrateTokenId" | |
17 | 17 | ||
18 | 18 | let h = "staked_total" | |
19 | 19 | ||
20 | 20 | func i (j,k) = ((j + "_staking_") + k) | |
21 | 21 | ||
22 | 22 | ||
23 | - | func l (j) = (j + "_ | |
23 | + | func l (j) = (j + "_lockedTotal") | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | let m = "last_stake_tx_id" | |
27 | 27 | ||
28 | 28 | let n = "promo_dapp" | |
29 | 29 | ||
30 | 30 | let o = "assetId" | |
31 | 31 | ||
32 | 32 | let p = if (!(isDataStorageUntouched(this))) | |
33 | 33 | then true | |
34 | 34 | else isDefined(getString(this, g)) | |
35 | 35 | ||
36 | 36 | let q = fromBase58String(getStringValue(this, g)) | |
37 | 37 | ||
38 | 38 | let r = valueOrErrorMessage(getInteger(this, h), (("Can't read field '" + h) + "'")) | |
39 | 39 | ||
40 | 40 | let s = fromBase58String(valueOrErrorMessage(getString(this, m), (("Can't read field '" + m) + "'"))) | |
41 | 41 | ||
42 | 42 | let t = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, n), (("Can't read field '" + n) + "'"))), "Can't parse promo DApp address") | |
43 | 43 | ||
44 | 44 | let u = "1" | |
45 | 45 | ||
46 | 46 | let v = "0" | |
47 | 47 | ||
48 | 48 | func w (x) = if ((size(x) != 1)) | |
49 | 49 | then throw("Single payment required") | |
50 | 50 | else if ((x[0].assetId != q)) | |
51 | 51 | then throw("Only REDSmb token is accepted") | |
52 | 52 | else if ((a > x[0].amount)) | |
53 | 53 | then throw(("Payment amount must be greater then threshold " + toString(a))) | |
54 | 54 | else x[0].amount | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func y (z) = valueOrElse(getInteger(this, l(z)), 0) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func A (B,C,D,E) = { | |
61 | 61 | let F = toString(B.caller) | |
62 | 62 | let G = w(B.payments) | |
63 | 63 | let H = ((f + d) - (f % d)) | |
64 | 64 | let I = (H + (D * d)) | |
65 | 65 | let J = i(F, toBase58String(B.transactionId)) | |
66 | - | let K = makeString([u, toString(G), C, toString(D), toString(f), toString(I)], ",") | |
66 | + | let K = makeString([u, toString(G), C, toString(D), toString(f), toString(I), toString(E)], ",") | |
67 | 67 | if ((B.transactionId == s)) | |
68 | 68 | then throw("There is only one staking per transaction allowed for now") | |
69 | 69 | else if (isDefined(getString(this, J))) | |
70 | 70 | then throw((("Staking '" + J) + "' already exists")) | |
71 | 71 | else if (!(containsElement(c, C))) | |
72 | 72 | then throw((("Unsupported reward type '" + C) + "'")) | |
73 | 73 | else if (!(containsElement(b, D))) | |
74 | 74 | then throw((("Unsupported number of days " + toString(D)) + " to mine")) | |
75 | 75 | else [StringEntry(J, K), IntegerEntry(l(toString(B.caller)), (y(toString(B.caller)) + G)), IntegerEntry(h, (r + G)), StringEntry(m, toBase58String(B.transactionId))] | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | @Callable(B) | |
80 | 80 | func init (L) = { | |
81 | 81 | let M = valueOrErrorMessage(addressFromString(L), (("Can't parse issuer address '" + L) + "'")) | |
82 | 82 | let N = valueOrErrorMessage(getString(M, o), ((("Can't find entry '" + o) + "' at address ") + L)) | |
83 | 83 | let O = valueOrErrorMessage(assetInfo(fromBase58String(N)), (("Can't find asset '" + N) + "'")).id | |
84 | 84 | if ((B.caller != this)) | |
85 | 85 | then throw("Only the DApp itself can call this function") | |
86 | 86 | else if (p) | |
87 | 87 | then throw("DApp is already init") | |
88 | - | else [StringEntry(g, toBase58String(O)), IntegerEntry(h, 0)] | |
88 | + | else [StringEntry(g, toBase58String(O)), IntegerEntry(h, 0), StringEntry(m, toBase58String(B.transactionId))] | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(B) | |
94 | 94 | func setPromoDApp (j) = if (isDefined(getString(this, n))) | |
95 | 95 | then throw("Promo DApp address is already specified") | |
96 | 96 | else [StringEntry(n, toString(valueOrErrorMessage(addressFromString(j), (("Can't parse '" + j) + "' as address"))))] | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(B) | |
101 | 101 | func lock (C,D) = A(B, C, D, B.caller) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(B) | |
106 | - | func lockBy (E,C,D) = A(B, C, D, valueOrErrorMessage(addressFromString(E), (("Can't parse benefeciary '" + E) + "' as address"))) | |
106 | + | func lockBy (E,C,D) = if ((B.caller != t)) | |
107 | + | then throw("") | |
108 | + | else A(B, C, D, valueOrErrorMessage(addressFromString(E), (("Can't parse benefeciary '" + E) + "' as address"))) | |
107 | 109 | ||
108 | 110 | ||
109 | 111 | ||
110 | 112 | @Callable(B) | |
111 | 113 | func unlock (z,P) = { | |
112 | 114 | let Q = valueOrErrorMessage(addressFromString(z), (("Can't parse user address '" + z) + "'")) | |
113 | 115 | func R (S,k) = { | |
114 | 116 | let T = { | |
115 | 117 | let U = split(valueOrErrorMessage(getString(this, i(z, k)), ((("Staking " + k) + " doesn't exist for user ") + z)), ",") | |
116 | 118 | if ((size(U) != 6)) | |
117 | 119 | then throw(("Can't parse parameters of staking " + k)) | |
118 | 120 | else if ((U[0] != u)) | |
119 | 121 | then throw((("staking '" + k) + "' is already unlocked")) | |
120 | 122 | else U | |
121 | 123 | } | |
122 | 124 | let V = $Tuple2(parseIntValue(T[1]), parseIntValue(T[5])) | |
123 | 125 | let W = V._1 | |
124 | 126 | let X = V._2 | |
125 | 127 | if ((X > f)) | |
126 | 128 | then throw(((("Unable to withdraw staking " + k) + " because it is still locked until ") + toString(X))) | |
127 | 129 | else $Tuple2((S._1 :+ StringEntry(((z + "_") + k), makeString([v, T[1], T[2], T[3], T[4], T[5]], ","))), (S._2 + W)) | |
128 | 130 | } | |
129 | 131 | ||
130 | 132 | let Y = { | |
131 | 133 | let Z = P | |
132 | 134 | let aa = size(Z) | |
133 | 135 | let ab = $Tuple2(nil, 0) | |
134 | 136 | func ac (ad,ae) = if ((ae >= aa)) | |
135 | 137 | then ad | |
136 | 138 | else R(ad, Z[ae]) | |
137 | 139 | ||
138 | 140 | func af (ad,ae) = if ((ae >= aa)) | |
139 | 141 | then ad | |
140 | 142 | else throw("List size exceeds 10") | |
141 | 143 | ||
142 | 144 | af(ac(ac(ac(ac(ac(ac(ac(ac(ac(ac(ab, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
143 | 145 | } | |
144 | 146 | let ag = Y._1 | |
145 | 147 | let ah = Y._2 | |
146 | 148 | let ai = l(z) | |
147 | 149 | let aj = valueOrElse(getInteger(this, ai), 0) | |
148 | 150 | let ak = (aj - ah) | |
149 | 151 | if ((size(B.payments) != 0)) | |
150 | 152 | then throw("There should be no payments for this function") | |
151 | 153 | else if (if ((B.caller != this)) | |
152 | 154 | then (Q != B.caller) | |
153 | 155 | else false) | |
154 | 156 | then throw("Only users themselves can withdraw their unlocked staking, or admin for them") | |
155 | 157 | else if ((Q == t)) | |
156 | 158 | then throw("Promo staking can be unlocked only by Promo DApp only") | |
157 | 159 | else if (if (if ((0 > aj)) | |
158 | 160 | then true | |
159 | 161 | else (0 > ah)) | |
160 | 162 | then true | |
161 | 163 | else (0 > ak)) | |
162 | 164 | then throw("negative result") | |
163 | 165 | else (ag ++ [IntegerEntry(h, (r - ah)), if ((ak > 0)) | |
164 | 166 | then IntegerEntry(ai, ak) | |
165 | 167 | else DeleteEntry(ai), ScriptTransfer(Q, ah, q)]) | |
166 | 168 | } | |
167 | 169 | ||
168 | 170 |
github/deemru/w8io/169f3d6 92.23 ms ◑