tx · 6eC7XpinLjD7ZWisd4M5TyHy41mSk9PgvHEUDHHc5UMq 3MsU428UzSefm85q7jvBsRV66Du7E72xEkL: -0.01000000 Waves 2022.06.10 10:18 [2089982] smart account 3MsU428UzSefm85q7jvBsRV66Du7E72xEkL > SELF 0.00000000 Waves
{ "type": 13, "id": "6eC7XpinLjD7ZWisd4M5TyHy41mSk9PgvHEUDHHc5UMq", "fee": 1000000, "feeAssetId": null, "timestamp": 1654845447444, "version": 2, "chainId": 84, "sender": "3MsU428UzSefm85q7jvBsRV66Du7E72xEkL", "senderPublicKey": "58FFoU7LCj1DKboVntQXuE3KQDpf92NouXncN5b4vY8U", "proofs": [ "uUvgCLpCEegbnR9eXKbq5p7kuwpPENVmvFuXvjxFvDZYfVATQchLxZiTZkjcpcNeWzTc7Yg9R9BXMXDLHJs2tur" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQESAAAAAAgAAAAACkRJU0NMQUlNRVICAAAARXRlc3RpbmcgUFVaWkxFIHN0YWtpbmcgc21hcnQgY29udHJhY3Qgd2l0aCByZXdhcmRzIGluIG11bHRpcGxlIGFzc2V0cwAAAAAFc2NhbGUAAAAAAAX14QAAAAAACHB1enpsZUlkAQAAACAtNxOB0yQ3XZ/hb3bT0Q+T7yws9N2JrVxKVuh8yQFyGwAAAAAMZWFybmVkQXNzZXRzCQAETAAAAAIBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0BQAAAANuaWwAAAAAEmVhcm5lZEFzc2V0c0Ftb3VudAkAAZAAAAABBQAAAAxlYXJuZWRBc3NldHMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAEAAAAdY2FsY3VsYXRlQ3VycmVudEFzc2V0SW50ZXJlc3Q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AABlAAAAAgkBAAAADXRyeUdldEludGVnZXIAAAABAgAAABNnbG9iYWxfcHV6emxlU3Rha2VkBQAAAAxwdXp6bGVBbW91bnQFAAAAA25pbAAAAAFpAQAAAAVjbGFpbQAAAAAJAQAAAAtjbGFpbVJlc3VsdAAAAAEIBQAAAAFpAAAABmNhbGxlcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V54dH/UQ==", "height": 2089982, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5dtNnjNdnoHmk49iqqVGkQRRGL9J2FenuXy7GKyLfkxN Next: HX2qcsRGvSQgnaxXsFFtksiF2352Mj4QzarSYFrTa4XA Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = "testing PUZZLE staking smart contract with rewards in multiple assets" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = 100000000 | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS' | |
9 | 9 | ||
10 | - | @Callable(d) | |
10 | + | let d = [base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'] | |
11 | + | ||
12 | + | let e = size(d) | |
13 | + | ||
14 | + | func f (g) = { | |
15 | + | let h = getInteger(this, g) | |
16 | + | if ($isInstanceOf(h, "Int")) | |
17 | + | then { | |
18 | + | let i = h | |
19 | + | i | |
20 | + | } | |
21 | + | else 0 | |
22 | + | } | |
23 | + | ||
24 | + | ||
25 | + | func j (k,l) = { | |
26 | + | let m = f("global_puzzleStaked") | |
27 | + | let n = f((("global_lastCheck_" + l) + "_earnings")) | |
28 | + | let o = max([n, assetBalance(this, k)]) | |
29 | + | let p = (o - n) | |
30 | + | let q = if ((m == 0)) | |
31 | + | then 0 | |
32 | + | else fraction(p, b, m) | |
33 | + | let r = f((("global_lastCheck_" + l) + "_interest")) | |
34 | + | (r + q) | |
35 | + | } | |
36 | + | ||
37 | + | ||
38 | + | func s (t) = { | |
39 | + | let u = toString(t) | |
40 | + | let v = f((u + "_puzzleStaked")) | |
41 | + | func w (x,k) = { | |
42 | + | let l = toBase58String(k) | |
43 | + | let y = j(k, l) | |
44 | + | let o = max([f((("global_lastCheck_" + l) + "_earnings")), assetBalance(this, k)]) | |
45 | + | let z = fraction(v, (y - f((((u + "_lastCheck_") + l) + "_interest"))), b) | |
46 | + | if ((z == 0)) | |
47 | + | then x | |
48 | + | else (x ++ [IntegerEntry((("global_lastCheck_" + l) + "_earnings"), (o - z)), IntegerEntry((("global_lastCheck_" + l) + "_interest"), y), IntegerEntry((((u + "_lastCheck_") + l) + "_interest"), y), ScriptTransfer(t, z, k)]) | |
49 | + | } | |
50 | + | ||
51 | + | let A = d | |
52 | + | let B = size(A) | |
53 | + | let C = nil | |
54 | + | func D (E,F) = if ((F >= B)) | |
55 | + | then E | |
56 | + | else w(E, A[F]) | |
57 | + | ||
58 | + | func G (E,F) = if ((F >= B)) | |
59 | + | then E | |
60 | + | else throw("List size exceeds 17") | |
61 | + | ||
62 | + | G(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(C, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | @Callable(H) | |
11 | 67 | func stake () = { | |
12 | - | let e = $Tuple2(d.payments[0].amount, d.payments[0].assetId) | |
13 | - | let f = e._1 | |
14 | - | let g = e._2 | |
15 | - | if (if (if ((size(d.payments) == 0)) | |
16 | - | then (g != b) | |
17 | - | else false) | |
18 | - | then (0 >= f) | |
19 | - | else false) | |
20 | - | then throw("send token to stake") | |
68 | + | let u = toString(H.caller) | |
69 | + | let I = H.payments[0] | |
70 | + | if ((value(I.assetId) != c)) | |
71 | + | then throw("wrong asset attached") | |
21 | 72 | else { | |
22 | - | let h = toBase58String(d.caller.bytes) | |
23 | - | let i = valueOrElse(getInteger(this, (h + "_staked")), 0) | |
24 | - | let j = valueOrElse(getInteger(this, "total"), 0) | |
25 | - | let k = (i + f) | |
26 | - | [IntegerEntry((((h + "_") + toString(height)) + "_staked"), k), IntegerEntry("total", (j + k))] | |
73 | + | func w (x,k) = { | |
74 | + | let l = toBase58String(k) | |
75 | + | let y = j(k, l) | |
76 | + | (x ++ [IntegerEntry((("global_lastCheck_" + l) + "_earnings"), assetBalance(this, k)), IntegerEntry((("global_lastCheck_" + l) + "_interest"), y), IntegerEntry((((u + "_lastCheck_") + l) + "_interest"), y)]) | |
77 | + | } | |
78 | + | ||
79 | + | let J = { | |
80 | + | let A = d | |
81 | + | let B = size(A) | |
82 | + | let C = nil | |
83 | + | func D (E,F) = if ((F >= B)) | |
84 | + | then E | |
85 | + | else w(E, A[F]) | |
86 | + | ||
87 | + | func G (E,F) = if ((F >= B)) | |
88 | + | then E | |
89 | + | else throw("List size exceeds 17") | |
90 | + | ||
91 | + | G(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(D(C, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
92 | + | } | |
93 | + | (J ++ [IntegerEntry((u + "_puzzleStaked"), (f((u + "_puzzleStaked")) + I.amount)), IntegerEntry("global_puzzleStaked", (f("global_puzzleStaked") + I.amount))]) | |
27 | 94 | } | |
28 | 95 | } | |
29 | 96 | ||
30 | 97 | ||
31 | 98 | ||
32 | - | @Callable(d) | |
33 | - | func withdraw () = throw("test") | |
99 | + | @Callable(H) | |
100 | + | func unstake (v) = { | |
101 | + | let u = toString(H.caller) | |
102 | + | let K = f((u + "_puzzleStaked")) | |
103 | + | if ((v > K)) | |
104 | + | then throw("you don't have PUZZLE available") | |
105 | + | else (s(H.caller) ++ [IntegerEntry((u + "_puzzleStaked"), (K - v)), IntegerEntry("global_puzzleStaked", (f("global_puzzleStaked") - v))]) | |
106 | + | } | |
34 | 107 | ||
35 | 108 | ||
36 | 109 | ||
37 | - | @Callable( | |
38 | - | func | |
110 | + | @Callable(H) | |
111 | + | func claim () = s(H.caller) | |
39 | 112 | ||
40 | 113 | ||
41 | - | ||
42 | - | @Callable(d) | |
43 | - | func del (l) = [DeleteEntry(l)] | |
44 | - | ||
45 | - | ||
46 | - | @Verifier(m) | |
47 | - | func n () = sigVerify(m.bodyBytes, m.proofs[0], m.senderPublicKey) | |
114 | + | @Verifier(L) | |
115 | + | func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) | |
48 | 116 |
github/deemru/w8io/169f3d6 29.82 ms ◑