tx · 9UrYBHjBzPTYPKQnjFfbw5p1g9ao54FjQCxQYdwHy7JP 3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6: -0.01000000 Waves 2021.04.21 13:25 [1492088] smart account 3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6 > SELF 0.00000000 Waves
{ "type": 13, "id": "9UrYBHjBzPTYPKQnjFfbw5p1g9ao54FjQCxQYdwHy7JP", "fee": 1000000, "feeAssetId": null, "timestamp": 1619000730723, "version": 2, "chainId": 84, "sender": "3N8DijjUMpYq512vvE9GHnCTUBUd4AZwhH6", "senderPublicKey": "75SuvmjmHX6J7smVGHvWY6acr5mqyRQCYpFxeFQh8Cy3", "proofs": [ "49RtkfYgJA6Qy1KLZjqsycRTK4gpohPJgDDzyapbcCRWcHtZbfU4q8PnGLTuEooY7ULjUGfBpjWyeqFQ59CtsamK" ], "script": "base64:AAIEAAAAAAAAABsIAhIAEgQKAggIEgUKAwEEARIECgIBCBIAEgAAAAAbAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAEWtleU51bWJlck9mVm90aW5nAgAAAA1udW1iZXJfdm90aW5nAAAAAA9rZXlIZWlnaHRPZlBvb2wCAAAAB19oZWlnaHQAAAAABWtleU5vAgAAAANfbm8AAAAABmtleVllcwIAAAAEX3llcwAAAAARa2V5U3RhdHVzT2ZWb3RpbmcCAAAAB19zdGF0dXMAAAAAEWtleUFtb3VudE9mVm90aW5nAgAAAA1hbW91bnRfdm90aW5nAAAAAA1rZXlDb21taXNzaW9uAgAAAApjb21taXNzaW9uAAAAABtrZXlDb21taXNzaW9uU2NhbGVEZWxpbWl0ZXICAAAAGmNvbW1pc3Npb25fc2NhbGVfZGVsaW1pdGVyAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAADmtleUNhbmNlbENhdXNlAgAAAA1fY2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UAAAAJa2V5QWN0aXZlBgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAhrZXlDYXVzZQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAYQQHmv", "height": 1492088, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6CoSEKknwXX6jCdLtMWwA7tZEXvLQNNxZ9MsuBErQeYj Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "1.0.0" | |
5 | + | ||
6 | + | let b = "version" | |
7 | + | ||
8 | + | let c = "active" | |
9 | + | ||
10 | + | let d = "number_voting" | |
11 | + | ||
12 | + | let e = "_height" | |
13 | + | ||
14 | + | let f = "_no" | |
15 | + | ||
16 | + | let g = "_yes" | |
17 | + | ||
18 | + | let h = "_status" | |
19 | + | ||
20 | + | let i = "amount_voting" | |
21 | + | ||
22 | + | let j = "commission" | |
23 | + | ||
24 | + | let k = "commission_scale_delimiter" | |
25 | + | ||
26 | + | let l = "shutdown_cause" | |
27 | + | ||
28 | + | let m = "_cancel_cause" | |
29 | + | ||
30 | + | let n = "_SWOP_amount" | |
31 | + | ||
32 | + | let o = getBooleanValue(this, c) | |
33 | + | ||
34 | + | let p = getIntegerValue(this, d) | |
35 | + | ||
36 | + | let q = getIntegerValue(this, i) | |
37 | + | ||
38 | + | let r = 1000000000 | |
39 | + | ||
40 | + | let s = 1000 | |
41 | + | ||
42 | + | let t = 100000000 | |
43 | + | ||
44 | + | let u = 1000 | |
45 | + | ||
46 | + | let v = 8 | |
47 | + | ||
48 | + | let w = 5 | |
49 | + | ||
50 | + | let x = (1440 * 5) | |
51 | + | ||
52 | + | func y (z) = if ((z == "WAVES")) | |
53 | + | then unit | |
54 | + | else fromBase58String(z) | |
55 | + | ||
56 | + | ||
57 | + | func A (B) = [BooleanEntry(c, false), StringEntry(l, B)] | |
58 | + | ||
59 | + | ||
60 | + | func C (D,E) = throw(((((("Insufficient DApp balance to pay " + toString(D)) + " ") + E) + " due to staking.") + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
61 | + | ||
62 | + | ||
63 | + | @Callable(F) | |
64 | + | func init () = { | |
65 | + | let G = 0 | |
66 | + | let H = 0 | |
67 | + | let I = true | |
68 | + | [StringEntry(b, a), BooleanEntry(c, I), IntegerEntry(d, G), IntegerEntry(i, H)] | |
69 | + | } | |
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | @Callable(F) | |
74 | + | func initVotingForNewPool (J,K) = { | |
75 | + | let L = $Tuple2(y(J), y(K)) | |
76 | + | let M = L._1 | |
77 | + | let N = L._2 | |
78 | + | if (!(o)) | |
79 | + | then throw("DApp is inactive at this moment") | |
80 | + | else if ((M == N)) | |
81 | + | then throw("Assets must be different") | |
82 | + | else if ((p > w)) | |
83 | + | then throw(("Too many votes. Maximum quantity -" + toString(w))) | |
84 | + | else [IntegerEntry(((((J + "_") + K) + "_") + toString(q)), q), IntegerEntry((toString(q) + e), (height + x)), BooleanEntry((toString(q) + h), true), IntegerEntry(i, (q + 1)), IntegerEntry(d, (p + 1))] | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | ||
89 | + | @Callable(F) | |
90 | + | func voteForPool (O,P,Q) = { | |
91 | + | let R = height | |
92 | + | let S = valueOrErrorMessage(getIntegerValue(this, (toString(O) + e)), ("Voting " + toString(O))) | |
93 | + | if (P) | |
94 | + | then { | |
95 | + | let T = (valueOrElse(getIntegerValue(this, (toString(O) + g)), 0) + Q) | |
96 | + | [IntegerEntry((toString(O) + g), T), IntegerEntry((((toString(F.caller) + "_") + toString(O)) + g), Q)] | |
97 | + | } | |
98 | + | else { | |
99 | + | let T = (valueOrElse(getIntegerValue(this, (toString(O) + f)), 0) + Q) | |
100 | + | [IntegerEntry((toString(O) + f), T), IntegerEntry((((toString(F.caller) + "_") + toString(O)) + f), Q)] | |
101 | + | } | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | @Callable(F) | |
107 | + | func cancellationVoting (O,B) = [IntegerEntry(d, (p - 1)), BooleanEntry((toString(O) + h), false), StringEntry((toString(O) + m), B)] | |
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | @Callable(F) | |
112 | + | func shutdown () = if (!(o)) | |
113 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
114 | + | else A("Paused by admin") | |
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | @Callable(F) | |
119 | + | func activate () = if (o) | |
120 | + | then throw("DApp is already active") | |
121 | + | else [BooleanEntry(c, true), DeleteEntry(l)] | |
122 | + | ||
123 | + | ||
124 | + | @Verifier(U) | |
125 | + | func V () = true | |
126 | + |
github/deemru/w8io/026f985 27.49 ms ◑