tx · 4tAFdtWtx24NrvTB3nY8y47DxRNVcHkMgEmjNRGz9EPJ 3MsH5PGAzchQox92fKoATyqvbbZGtCnM7HL: -0.01000000 Waves 2022.10.11 16:23 [2267734] smart account 3MsH5PGAzchQox92fKoATyqvbbZGtCnM7HL > SELF 0.00000000 Waves
{ "type": 13, "id": "4tAFdtWtx24NrvTB3nY8y47DxRNVcHkMgEmjNRGz9EPJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1665494673105, "version": 2, "chainId": 84, "sender": "3MsH5PGAzchQox92fKoATyqvbbZGtCnM7HL", "senderPublicKey": "6hLKKefEEN4wfGHMRuQoWStMfcXVjfTvah6x2UCEi9P9", "proofs": [ "5vsH7FC33qLzX2zLrjA2ZdxzHXqau1xEb4uFwumBQbBYqDZMgZwSHYf75YZakhdnqURrVF1Phq8qDHH49sWrEER6" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAEgAAAAARa2V5QWN0aXZhdGVIZWlnaHQCAAAAD2FjdGl2YXRlX2hlaWdodAAAAAAPa2V5RmluaXNoSGVpZ2h0AgAAAA1maW5pc2hfaGVpZ2h0AAAAAA5hY3RpdmF0ZUhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAARa2V5QWN0aXZhdGVIZWlnaHQAAAAADGZpbmlzaEhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAAPa2V5RmluaXNoSGVpZ2h0AAAAAA50b3RhbFNoYXJlU1dPUAAAAFrzEHpAAAAAAAAEU1dPUAEAAAAgEv+BIJFIbrNA9tN9ExhCV/1vofsy06rszWo/nWl9O/gAAAAABm9yYWNsZQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEgTlwzA0zPMJTKAtin3p2RogKvjzHtLmQAAAAAYa2V5VXNlclNXT1BDbGFpbWVkQW1vdW50AgAAABRfU1dPUF9jbGFpbWVkX2Ftb3VudAAAAAAca2V5VXNlclNX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Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAACoL4Ytw==", "height": 2267734, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "activate_height" | |
5 | + | ||
6 | + | let b = "finish_height" | |
7 | + | ||
8 | + | let c = getIntegerValue(this, a) | |
9 | + | ||
10 | + | let d = getIntegerValue(this, b) | |
11 | + | ||
12 | + | let e = 100000000000000 | |
13 | + | ||
14 | + | let f = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
15 | + | ||
16 | + | let g = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
17 | + | ||
18 | + | let h = "_SWOP_claimed_amount" | |
19 | + | ||
20 | + | let i = "_SWOP_last_claimed_amount" | |
21 | + | ||
22 | + | let j = "admin_pub_1" | |
23 | + | ||
24 | + | let k = "admin_pub_2" | |
25 | + | ||
26 | + | let l = "admin_pub_3" | |
27 | + | ||
28 | + | func m (n) = { | |
29 | + | let o = getString(g, n) | |
30 | + | if ($isInstanceOf(o, "String")) | |
31 | + | then { | |
32 | + | let p = o | |
33 | + | fromBase58String(p) | |
34 | + | } | |
35 | + | else { | |
36 | + | let q = o | |
37 | + | throw("Admin public key is empty") | |
38 | + | } | |
39 | + | } | |
40 | + | ||
41 | + | ||
42 | + | let r = m(j) | |
43 | + | ||
44 | + | let s = m(k) | |
45 | + | ||
46 | + | let t = m(l) | |
47 | + | ||
48 | + | func u (v) = { | |
49 | + | let w = getInteger(this, ("share_" + toString(v))) | |
50 | + | let x = { | |
51 | + | let o = w | |
52 | + | if ($isInstanceOf(o, "Int")) | |
53 | + | then { | |
54 | + | let y = o | |
55 | + | y | |
56 | + | } | |
57 | + | else if ($isInstanceOf(o, "Unit")) | |
58 | + | then { | |
59 | + | let y = o | |
60 | + | throw("Only early liquidity providers can call this function") | |
61 | + | } | |
62 | + | else throw("Match error") | |
63 | + | } | |
64 | + | x | |
65 | + | } | |
66 | + | ||
67 | + | ||
68 | + | func z (v) = { | |
69 | + | let A = getInteger(this, (toString(v) + h)) | |
70 | + | let B = { | |
71 | + | let o = A | |
72 | + | if ($isInstanceOf(o, "Int")) | |
73 | + | then { | |
74 | + | let y = o | |
75 | + | y | |
76 | + | } | |
77 | + | else if ($isInstanceOf(o, "Unit")) | |
78 | + | then { | |
79 | + | let y = o | |
80 | + | 0 | |
81 | + | } | |
82 | + | else throw("Match error") | |
83 | + | } | |
84 | + | B | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | @Callable(C) | |
89 | + | func claimSWOP () = { | |
90 | + | let D = (d - c) | |
91 | + | let E = if ((d > height)) | |
92 | + | then height | |
93 | + | else d | |
94 | + | let F = u(C.caller) | |
95 | + | let G = z(C.caller) | |
96 | + | let H = (fraction((E - c), F, D) - G) | |
97 | + | let I = (G + H) | |
98 | + | [ScriptTransfer(C.caller, H, f), IntegerEntry((toString(C.caller) + h), I), IntegerEntry((toString(C.caller) + i), H)] | |
99 | + | } | |
100 | + | ||
101 | + | ||
102 | + | @Verifier(J) | |
103 | + | func K () = { | |
104 | + | let o = J | |
105 | + | let L = if (sigVerify(J.bodyBytes, J.proofs[0], r)) | |
106 | + | then 1 | |
107 | + | else 0 | |
108 | + | let M = if (sigVerify(J.bodyBytes, J.proofs[1], s)) | |
109 | + | then 1 | |
110 | + | else 0 | |
111 | + | let N = if (sigVerify(J.bodyBytes, J.proofs[2], t)) | |
112 | + | then 1 | |
113 | + | else 0 | |
114 | + | (((L + M) + N) >= 2) | |
115 | + | } | |
116 | + |
github/deemru/w8io/169f3d6 27.51 ms ◑