tx · 65uAJAgE1nZv99ThTtju3fSEyVyZ5HM9rtQMmF9XC4eg 3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu: -0.14000000 Waves 2021.10.27 11:31 [1764459] smart account 3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu > SELF 0.00000000 Waves
{ "type": 13, "id": "65uAJAgE1nZv99ThTtju3fSEyVyZ5HM9rtQMmF9XC4eg", "fee": 14000000, "feeAssetId": null, "timestamp": 1635323484556, "version": 2, "chainId": 84, "sender": "3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu", "senderPublicKey": "Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8", "proofs": [ "2tNBhhmLRjq7faoJ8HApoHzV7S4YrtzPmYKFq54kaYQ6S4qbWn84xHjRyeQrmtg58WvksRfRB9ynTpdbj2PT4bxp", "2JQBY69zY8otwZYbQRCB6qeajsF4oj6Q978XRRfiCEcZ4PMZT6VcoxX6y8KkAMqnfDKyscAWQaQZgg1z9oe7DZvh" ], "script": "base64:AAIFAAAAAAAAAA0IAhIAEgMKAQESABIAAAAADQAAAAAMYWRtaW5QdWJLZXkxAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAMYWRtaW5QdWJLZXkyAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAMYWRtaW5QdWJLZXkzAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIM4g6x+sX8HSDf+o3PS26XhSlvJ+gy9dQq4M8nek2W8bAAAAAAlrZXlBY3RpdmUCAAAABmFjdGl2ZQAAAAAIa2V5Q2F1c2UCAAAADnNodXRkb3duX2NhdXNlAAAAABFrZXlVc2VyRU5OT0xvY2tlZAIAAAAMX0VOTk9fYW1vdW50AAAAABJrZXlUb3RhbEVOTk9Mb2NrZW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AnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAxhZG1pblB1YktleTMAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAAJseTnI", "height": 1764459, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GovS7S95YvAwKdXn6q594We5zP4W72bXPSEMtXkGvfpJ Next: HgCWcPF9xikzzS5dZ1QfdJDYskbR18vpt6sozTaRCoHS Diff:
Old | New | Differences | |
---|---|---|---|
40 | 40 | if ((s != j)) | |
41 | 41 | then throw("Incorrect pmtAssetId") | |
42 | 42 | else { | |
43 | - | let t = m(p. | |
43 | + | let t = m(p.originCaller) | |
44 | 44 | let u = (t + r) | |
45 | 45 | let v = o() | |
46 | 46 | let w = (v + r) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8' | |
5 | 5 | ||
6 | 6 | let b = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8' | |
7 | 7 | ||
8 | 8 | let c = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8' | |
9 | 9 | ||
10 | 10 | let d = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8' | |
11 | 11 | ||
12 | 12 | let e = "active" | |
13 | 13 | ||
14 | 14 | let f = "shutdown_cause" | |
15 | 15 | ||
16 | 16 | let g = "_ENNO_amount" | |
17 | 17 | ||
18 | 18 | let h = "total_ENNO_amount" | |
19 | 19 | ||
20 | 20 | let i = valueOrElse(getBoolean(this, e), true) | |
21 | 21 | ||
22 | 22 | let j = base58'2Tqhz5PWbkijnzYpdLxLDFfVDw5ALQWm2rmxQ79ooMRZ' | |
23 | 23 | ||
24 | 24 | func k (l) = [BooleanEntry(e, false), StringEntry(f, l)] | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func m (n) = valueOrElse(getInteger(this, (toString(n) + g)), 0) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func o () = valueOrElse(getInteger(this, h), 0) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | @Callable(p) | |
34 | 34 | func lockENNO () = if (!(i)) | |
35 | 35 | then throw("DApp is inactive at this moment") | |
36 | 36 | else { | |
37 | 37 | let q = $Tuple2(p.payments[0].amount, p.payments[0].assetId) | |
38 | 38 | let r = q._1 | |
39 | 39 | let s = q._2 | |
40 | 40 | if ((s != j)) | |
41 | 41 | then throw("Incorrect pmtAssetId") | |
42 | 42 | else { | |
43 | - | let t = m(p. | |
43 | + | let t = m(p.originCaller) | |
44 | 44 | let u = (t + r) | |
45 | 45 | let v = o() | |
46 | 46 | let w = (v + r) | |
47 | 47 | [IntegerEntry((toString(p.caller) + g), u), IntegerEntry(h, w)] | |
48 | 48 | } | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | ||
53 | 53 | @Callable(p) | |
54 | 54 | func withdrawENNO (x) = if (!(i)) | |
55 | 55 | then throw("DApp is inactive at this moment") | |
56 | 56 | else if ((0 >= x)) | |
57 | 57 | then throw("withdrawAmount <= 0") | |
58 | 58 | else { | |
59 | 59 | let v = o() | |
60 | 60 | let t = m(p.caller) | |
61 | 61 | if ((x > t)) | |
62 | 62 | then throw("withdrawAmount > availableToUnstake") | |
63 | 63 | else { | |
64 | 64 | let w = (v - x) | |
65 | 65 | let y = (t - x) | |
66 | 66 | [IntegerEntry((toString(p.caller) + g), y), IntegerEntry(h, w), ScriptTransfer(p.caller, x, j)] | |
67 | 67 | } | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | ||
72 | 72 | @Callable(p) | |
73 | 73 | func shutdown () = if (!(i)) | |
74 | 74 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, f), "the cause wasn't specified"))) | |
75 | 75 | else if (!(containsElement([a, b, c, d], p.callerPublicKey))) | |
76 | 76 | then throw("Only admin can call this function") | |
77 | 77 | else k("Paused by admin") | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | ||
81 | 81 | @Callable(p) | |
82 | 82 | func activate () = if (i) | |
83 | 83 | then throw("DApp is already active") | |
84 | 84 | else if (!(containsElement([a, b, c, d], p.callerPublicKey))) | |
85 | 85 | then throw("Only admin can call this function") | |
86 | 86 | else [BooleanEntry(e, true), DeleteEntry(f)] | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Verifier(z) | |
90 | 90 | func A () = { | |
91 | 91 | let B = if (sigVerify(z.bodyBytes, z.proofs[0], a)) | |
92 | 92 | then 1 | |
93 | 93 | else 0 | |
94 | 94 | let C = if (sigVerify(z.bodyBytes, z.proofs[1], b)) | |
95 | 95 | then 1 | |
96 | 96 | else 0 | |
97 | 97 | let D = if (sigVerify(z.bodyBytes, z.proofs[2], c)) | |
98 | 98 | then 1 | |
99 | 99 | else 0 | |
100 | 100 | (((B + C) + D) >= 2) | |
101 | 101 | } | |
102 | 102 |
github/deemru/w8io/169f3d6 29.10 ms ◑