tx · GwLnU9cSwxpyjWpEedoZVuBTz8bk1fL6eej92kBQqWzK 3MxnfLmkQdmBHFpvMrtUBZ6oU1BnTHt7wCk: -0.01400000 Waves 2020.09.23 11:20 [1189706] smart account 3MxnfLmkQdmBHFpvMrtUBZ6oU1BnTHt7wCk > SELF 0.00000000 Waves
{ "type": 13, "id": "GwLnU9cSwxpyjWpEedoZVuBTz8bk1fL6eej92kBQqWzK", "fee": 1400000, "feeAssetId": null, "timestamp": 1600849308666, "version": 2, "chainId": 84, "sender": "3MxnfLmkQdmBHFpvMrtUBZ6oU1BnTHt7wCk", "senderPublicKey": "55rB1q3MKx9sFwZpomq8X1LrY9sSqqHu1uDFDEhhHSWe", "proofs": [ "43HRJLw7pJsWYrCAHyH6etL4PVpkY3XrpmwiiiU2pVaJg1wo2kG1stC3dEwHoGiAJdtBgw2NckMLVxYSuR9zxwnL" ], "script": "base64:AAIEAAAAAAAAABAIAhIECgIIARIAEgQKAgEIAAAAFwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAHYWRkcmVzcwUAAAADa2V5AAAAAAAAAAAAAQAAABhnZXRTdHJpbmdCeUFkZHJlc3NBbmRLZXkAAAACAA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YW5jZQAAAAEFAAAADWFzc2V0SWRTdHJpbmcFAAAADHVubG9ja0Ftb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkBAAAAEWdldFVzZXJCYWxhbmNlS2V5AAAAAgUAAAAHYWNjb3VudAUAAAANYXNzZXRJZFN0cmluZwUAAAAHYmFsYW5jZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAdhY2NvdW50BQAAAAx1bmxvY2tBbW91bnQFAAAAB2Fzc2V0SWQFAAAAA25pbAAAAAAzznpj", "height": 1189706, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fmb2N7vrr8LSKUmSbPFvVfAZ9MiqHG45nvgAppmWZ88w Next: none Diff:
Old | New | Differences | |
---|---|---|---|
45 | 45 | func x (n) = (((("%s%s" + h) + n) + h) + "initialShare") | |
46 | 46 | ||
47 | 47 | ||
48 | - | func y (l) = (((((("%s%s%s" + h) + " | |
48 | + | func y (l) = (((((("%s%s%s" + h) + "defoAsset") + h) + l) + h) + "addressByAssetId") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func z (A,B) = split(A, B) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrElse(getInteger(this, b), 0) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (b) = valueOrElse(getString(this, b), "") | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func d (b) = valueOrElse(getBoolean(this, b), false) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func e (f,b) = valueOrElse(getInteger(addressFromStringValue(f), b), 0) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func g (f,b) = valueOrElse(getString(f, b), "") | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | let h = "__" | |
20 | 20 | ||
21 | 21 | let i = (("%s" + h) + "factory") | |
22 | 22 | ||
23 | 23 | let j = 3 | |
24 | 24 | ||
25 | 25 | func k (l) = (((("%s%s" + h) + "stakingBalance") + h) + l) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func m (n,l) = (((((("%s%s%s" + h) + "stakingBalance") + h) + l) + h) + n) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func o (p) = ((((("%s%s%s" + h) + "defoAsset") + h) + p) + "__config") | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func q (n,r,s) = (((((((("%s%s%s%s" + h) + "stakingConfig") + h) + n) + h) + toString(r)) + h) + s) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func t (n) = (((("%s%s" + h) + "stakingConfigCurrent") + h) + n) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func u (v,w) = (v + (if (w) | |
41 | 41 | then (h + "start") | |
42 | 42 | else (h + "end"))) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func x (n) = (((("%s%s" + h) + n) + h) + "initialShare") | |
46 | 46 | ||
47 | 47 | ||
48 | - | func y (l) = (((((("%s%s%s" + h) + " | |
48 | + | func y (l) = (((((("%s%s%s" + h) + "defoAsset") + h) + l) + h) + "addressByAssetId") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func z (A,B) = split(A, B) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | let C = addressFromStringValue(valueOrErrorMessage(getString(this, i), "No factory contract specified.")) | |
55 | 55 | ||
56 | 56 | func D (n,l) = a(m(n, l)) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func E (l) = a(k(l)) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func F (l) = getString(C, y(l)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (p) = z(valueOrErrorMessage(g(C, o(p)), (("No DEFO Asset " + p) + "config present")), h) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func H (I,s,r) = { | |
69 | 69 | let J = valueOrErrorMessage(I.payments[0], "No asset pased in payment.") | |
70 | 70 | let K = toBase58String(value(J.assetId)) | |
71 | 71 | let L = valueOrErrorMessage(F(K), "Passed payment asset is not valid.") | |
72 | 72 | let M = G(L) | |
73 | 73 | if (!(isDefined(addressFromString(s)))) | |
74 | 74 | then throw(("Invalid address format " + s)) | |
75 | 75 | else if ((r > 100)) | |
76 | 76 | then throw("staking rewards share cannot be higher than 100%") | |
77 | 77 | else if ((1 > r)) | |
78 | 78 | then throw("staking rewards share cannot be lower than 1%") | |
79 | 79 | else if ((M[j] != "ISSUED")) | |
80 | 80 | then throw("Synthetic asset should be with ISSUED status") | |
81 | 81 | else { | |
82 | 82 | let N = toString(I.caller) | |
83 | 83 | let O = c(t(N)) | |
84 | 84 | let P = if ((O != "")) | |
85 | 85 | then { | |
86 | 86 | let Q = split(O, h) | |
87 | 87 | let R = parseIntValue(Q[3]) | |
88 | 88 | let S = Q[4] | |
89 | 89 | let T = a(x(N)) | |
90 | 90 | let U = if ((T == 0)) | |
91 | 91 | then R | |
92 | 92 | else T | |
93 | 93 | let V = if (if ((U > r)) | |
94 | 94 | then true | |
95 | 95 | else (S != s)) | |
96 | 96 | then U | |
97 | 97 | else r | |
98 | 98 | [toString(U), toString(V), S] | |
99 | 99 | } | |
100 | 100 | else [toString(r), toString(r), s] | |
101 | 101 | let W = parseIntValue(P[0]) | |
102 | 102 | let X = parseIntValue(P[1]) | |
103 | 103 | let Y = P[2] | |
104 | 104 | let Z = q(N, X, Y) | |
105 | 105 | let aa = !((O == Z)) | |
106 | 106 | let ab = if (aa) | |
107 | 107 | then height | |
108 | 108 | else 0 | |
109 | 109 | let ac = if (aa) | |
110 | 110 | then height | |
111 | 111 | else a(u(Z, true)) | |
112 | 112 | [IntegerEntry(k(K), (E(K) + J.amount)), IntegerEntry(m(N, K), (D(N, K) + J.amount)), IntegerEntry(u(O, false), ab), IntegerEntry(u(Z, true), ac), IntegerEntry(x(N), W), StringEntry(t(N), Z)] | |
113 | 113 | } | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | @Callable(I) | |
118 | 118 | func startStakingSP (s,r) = H(I, s, r) | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | ||
122 | 122 | @Callable(I) | |
123 | 123 | func startStaking () = H(I, toString(I.caller), 100) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | ||
127 | 127 | @Callable(I) | |
128 | 128 | func stopStaking (ad,K) = { | |
129 | 129 | let N = toString(I.caller) | |
130 | 130 | let l = fromBase58String(K) | |
131 | 131 | let L = valueOrErrorMessage(F(K), "Passed payment asset is not valid.") | |
132 | 132 | let M = G(L) | |
133 | 133 | let ae = (D(N, K) - ad) | |
134 | 134 | if ((0 > ae)) | |
135 | 135 | then throw("invalid amount") | |
136 | 136 | else if ((M[j] != "ISSUED")) | |
137 | 137 | then throw("Synthetic asset should be with ISSUED status") | |
138 | 138 | else [IntegerEntry(k(K), (E(K) - ad)), IntegerEntry(m(N, K), ae), ScriptTransfer(addressFromStringValue(N), ad, l)] | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 |
github/deemru/w8io/169f3d6 36.25 ms ◑