tx · 37TP2HGXh4WHhv6JsS97atS8hJvgwDQdt3oZZ5nj6N5f 3N7qDfVLtK6WzUGnMe7SKJo4Z5krbQAvuWP: -0.00400000 Waves 2024.09.24 00:02 [3296749] smart account 3N7qDfVLtK6WzUGnMe7SKJo4Z5krbQAvuWP > SELF 0.00000000 Waves
{ "type": 13, "id": "37TP2HGXh4WHhv6JsS97atS8hJvgwDQdt3oZZ5nj6N5f", "fee": 400000, "feeAssetId": null, "timestamp": 1727125377947, "version": 2, "chainId": 84, "sender": "3N7qDfVLtK6WzUGnMe7SKJo4Z5krbQAvuWP", "senderPublicKey": "CW4UxavA4VQuHC35gsPpNHvDChPSW1BdEhBAhD2ez35N", "proofs": [ "5E7eVq9pELejYCLT2NLE72sgDZbD8Kg3KGbWjj9MLD7wdbr3rmMA6jB43HKXVHjWhQv2Kd7Vxszv1HezhqDZLxZR" ], "script": "base64:BgIWCAISAwoBCBIDCgEIEgMKAQgSAwoBCA8BC3dyaXRlU3RyaW5nAgNrZXkFdmFsdWUJAQtTdHJpbmdFbnRyeQIFA2tleQUFdmFsdWUBEHdyaXRlQ29uc3RTdHJpbmcCA2tleQV2YWx1ZQMJAQEhAQkBCWlzRGVmaW5lZAEJAJ0IAgUEdGhpcwUDa2V5CQELU3RyaW5nRW50cnkCBQNrZXkFBXZhbHVlCQACAQkArAICAhVhbHJlYWR5IGluaXRpYWxpemVkOiAFA2tleQANY29uZmlnQWRkcmVzcwUEdGhpcwANdm90aW5nUmVzdWx0cwkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCmCAEJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQ1jb25maWdBZGRyZXNzAhZjb250cmFjdF92b3RpbmdfcmVzdWx0AiFjb25maWc6IG5vIGNvbnRyYWN0X3ZvdGluZ19yZXN1bHQCHmludmFsaWQgY29udHJhY3Rfdm90aW5nX3Jlc3VsdAAGSEVJR0hUBQZoZWlnaHQBBmFkdmlzZQAJAKwCAgIIaGVpZ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scwUIc2VudGluZWwFA25pbAkAzAgCCQELU3RyaW5nRW50cnkCBQ5zZW50aW5lbHNTdG9yZQkArAICCQCsAgIJAQV2YWx1ZQEFDHNlbnRpbmVsc1N0cgIBLAUIc2VudGluZWwFA25pbAECdHgBBnZlcmlmeQAECGJ5Vm90aW5nBAdlbmFibGVkCQELdmFsdWVPckVsc2UCCQCbCAIFDWNvbmZpZ0FkZHJlc3MJAQ5vcEFsbG93ZWRTdG9yZQECE2dvdmVybmFuY2VfYXBwbHlfdHgGAwkBASEBBQdlbmFibGVkCQACAQIrdHggYXBwbGljYXRpb24gdGhyb3cgZ292ZXJuYW5jZSBub3QgZW5hYmxlZAQCaWQJANgEAQgFAnR4AmlkCQBnAgUGSEVJR0hUCQERQGV4dHJOYXRpdmUoMTA1MCkCBQ12b3RpbmdSZXN1bHRzCQCsAgIJAKwCAgkArAICAhlwcm9wb3NhbF9hbGxvd19icm9hZGNhc3RfCQClCAEFBHRoaXMCAV8FAmlkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQYFCGJ5Vm90aW5nZ+1vnw==", "height": 3296749, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func a (b,c) = StringEntry(b, c) | |
5 | + | ||
6 | + | ||
7 | + | func d (b,c) = if (!(isDefined(getString(this, b)))) | |
8 | + | then StringEntry(b, c) | |
9 | + | else throw(("already initialized: " + b)) | |
10 | + | ||
11 | + | ||
12 | + | let e = this | |
13 | + | ||
14 | + | let f = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(e, "contract_voting_result"), "config: no contract_voting_result")), "invalid contract_voting_result") | |
15 | + | ||
16 | + | let g = height | |
17 | + | ||
18 | + | func h () = ("height: " + toString(g)) | |
19 | + | ||
20 | + | ||
21 | + | let i = ["stake", "unstake", "governance_propose_tx", "governance_edit_attachments", "governance_vote_tx", "governance_retract_vote", "governance_retract_proposal_tx", "governance_apply_tx"] | |
22 | + | ||
23 | + | let j = "system_allowed" | |
24 | + | ||
25 | + | func k (l) = if (isDefined(indexOf(i, l))) | |
26 | + | then (("op_" + l) + "_allowed") | |
27 | + | else throw((("Invalid argument: op. " + l) + " operation is not registered")) | |
28 | + | ||
29 | + | ||
30 | + | func m (l) = (("op_" + l) + "_unpaused_by") | |
31 | + | ||
32 | + | ||
33 | + | let n = "sentinels" | |
34 | + | ||
35 | + | let o = getString(this, n) | |
36 | + | ||
37 | + | let p = if (isDefined(o)) | |
38 | + | then split(value(o), ",") | |
39 | + | else nil | |
40 | + | ||
41 | + | func q (r) = valueOrErrorMessage(indexOf(p, toString(r)), "pauseOp denied") | |
42 | + | ||
43 | + | ||
44 | + | func s () = { | |
45 | + | let t = size(p) | |
46 | + | if ((3 > t)) | |
47 | + | then 1 | |
48 | + | else ((t / 2) + 1) | |
49 | + | } | |
50 | + | ||
51 | + | ||
52 | + | @Callable(u) | |
53 | + | func opAllowed (l) = { | |
54 | + | let v = k(l) | |
55 | + | if (contains(valueOrElse(getString(this, "stoplist"), ""), toString(u.originCaller))) | |
56 | + | then throw("operation paused by stoplist") | |
57 | + | else if (contains(valueOrElse(getString(this, "exc"), ""), toString(u.originCaller))) | |
58 | + | then $Tuple2(nil, true) | |
59 | + | else { | |
60 | + | let w = valueOrElse(getBoolean(this, j), true) | |
61 | + | let x = valueOrElse(getBoolean(this, v), true) | |
62 | + | if (!(w)) | |
63 | + | then throw((("operation paused by " + j) + "=false")) | |
64 | + | else if (!(x)) | |
65 | + | then throw((("operation paused by " + v) + "=false")) | |
66 | + | else $Tuple2(nil, true) | |
67 | + | } | |
68 | + | } | |
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | @Callable(u) | |
73 | + | func pauseOp (l) = { | |
74 | + | let r = q(u.caller) | |
75 | + | if ((r == r)) | |
76 | + | then [BooleanEntry(k(l), false)] | |
77 | + | else throw("Strict value is not equal to itself.") | |
78 | + | } | |
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | @Callable(u) | |
83 | + | func unpauseOp (l) = { | |
84 | + | let r = q(u.caller) | |
85 | + | if ((r == r)) | |
86 | + | then { | |
87 | + | let v = k(l) | |
88 | + | if (valueOrElse(getBoolean(this, v), true)) | |
89 | + | then throw("unpauseOp: invalid operation") | |
90 | + | else { | |
91 | + | let y = toString(u.caller) | |
92 | + | let z = m(l) | |
93 | + | let A = getString(this, z) | |
94 | + | let B = s() | |
95 | + | if (isDefined(A)) | |
96 | + | then { | |
97 | + | let C = value(A) | |
98 | + | let D = split(C, ",") | |
99 | + | if (isDefined(indexOf(D, y))) | |
100 | + | then throw("duplicate unpause") | |
101 | + | else if (((size(D) + 1) == B)) | |
102 | + | then [DeleteEntry(v), DeleteEntry(z)] | |
103 | + | else [StringEntry(z, ((C + ",") + y))] | |
104 | + | } | |
105 | + | else if ((B == 1)) | |
106 | + | then [DeleteEntry(v)] | |
107 | + | else [StringEntry(z, y)] | |
108 | + | } | |
109 | + | } | |
110 | + | else throw("Strict value is not equal to itself.") | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | @Callable(u) | |
116 | + | func addSentinel (y) = if ((u.caller != this)) | |
117 | + | then throw("only self can add sentinel") | |
118 | + | else if (!(isDefined(o))) | |
119 | + | then [StringEntry(n, y)] | |
120 | + | else if (isDefined(indexOf(p, y))) | |
121 | + | then nil | |
122 | + | else [StringEntry(n, ((value(o) + ",") + y))] | |
123 | + | ||
124 | + | ||
125 | + | @Verifier(E) | |
126 | + | func F () = { | |
127 | + | let G = { | |
128 | + | let H = valueOrElse(getBoolean(e, k("governance_apply_tx")), true) | |
129 | + | if (!(H)) | |
130 | + | then throw("tx application throw governance not enabled") | |
131 | + | else { | |
132 | + | let I = toBase58String(E.id) | |
133 | + | (g >= getIntegerValue(f, ((("proposal_allow_broadcast_" + toString(this)) + "_") + I))) | |
134 | + | } | |
135 | + | } | |
136 | + | if (sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey)) | |
137 | + | then true | |
138 | + | else G | |
139 | + | } | |
140 | + |
github/deemru/w8io/026f985 15.23 ms ◑