tx · ANxWRmH7i5BAqzJ5YRdhXuvBCX4WV4CM89AP6gWm1k2s 3N4gGXLoQLDL8J6rHho3CK714TWiAw3ahi4: -0.01400000 Waves 2020.09.11 16:44 [1172728] smart account 3N4gGXLoQLDL8J6rHho3CK714TWiAw3ahi4 > SELF 0.00000000 Waves
{ "type": 13, "id": "ANxWRmH7i5BAqzJ5YRdhXuvBCX4WV4CM89AP6gWm1k2s", "fee": 1400000, "feeAssetId": null, "timestamp": 1599831965481, "version": 1, "sender": "3N4gGXLoQLDL8J6rHho3CK714TWiAw3ahi4", "senderPublicKey": "2G2SB6hLj6PxUgshtzMt5QLV3XzLbQNhvXk5f6QTkTZy", "proofs": [ "5UKUpP7GXejibvAfZNQGrzUg1zfg1WvAM15BYiHWRiARFaThg25zUKp5SLTFfs5ZWJTQLTdiHZhmEWGEt98XZNs3" ], "script": "base64:AAIDAAAAAAAAAA8IARIECgICCBIFCgMICAEAAAAfAAAAAAVXQVZFUwIAAAAFV0FWRVMAAAAAB0ludFR5cGUAAAAAAAAAAAAAAAAAClN0cmluZ1R5cGUAAAAAAAAAAAEAAAAACUJ5dGVzVHlwZQAAAAAAAAAAAgEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdgUAAAAHJG1hdGNoMAUAAAABdgAAAAAAAAAAAAEAAAANZ2V0Qnl0ZXNCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABdgUAAAAHJG1hdGNoMAUAAAABdgEAAAAD0AAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJ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AIAAAABAgAAABVpbnZhbGlkIGZ1bmN0aW9uIG5hbWUDCQEAAAACIT0AAAACCQABkAAAAAEIBQAAAAhpbnZva2VUeAAAAARhcmdzAAAAAAAAAAACCQAAAgAAAAECAAAAEWludmFsaWQgYXJncyBzaXplAwkBAAAAAiE9AAAAAggFAAAACGludm9rZVR4AAAABGRBcHAJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAARc3Vic2NyaWJlckFkZHJlc3MJAAACAAAAAQIAAAAUaW52YWxpZCBkYXBwIGFkZHJlc3MDCQEAAAACIT0AAAACCQEAAAAQZ2V0SGVpZ2h0QnlQdWxzZQAAAAEFAAAACHZQdWxzZUlkBQAAAAZoZWlnaHQJAAACAAAAAQIAAAAOaW52YWxpZCBoZWlnaHQDCQAAAAAAAAIJAQAAAAtnZXRIYXNoRGF0YQAAAAEFAAAACHZQdWxzZUlkAQAAAAPQAAAJAAACAAAAAQIAAAAQaW52YWxpZCBwdWxzZSBpZAMJAQAAAAIhPQAAAAIJAAH1AAAAAQUAAAAGdkJ5dGVzCQEAAAALZ2V0SGFzaERhdGEAAAABBQAAAAh2UHVsc2VJZAkAAAIAAAABAgAAABhpbnZhbGlkIGtlY2NhazI1Nih2YWx1ZSkGCQAB9AAAAAMIBQAAAAFpAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABaQAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFpAAAAD3NlbmRlclB1YmxpY0tleYYJPvA=", "chainId": 84, "height": 1172728, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FwkgAqTcGuJuEiLXG2r9rG3zV8cDryidaFZLHxxp9Ux7 Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "WAVES" | |
5 | 5 | ||
6 | 6 | let b = 0 | |
7 | 7 | ||
8 | 8 | let c = 1 | |
9 | 9 | ||
10 | 10 | let d = 2 | |
11 | 11 | ||
12 | 12 | func e (f) = { | |
13 | 13 | let g = getInteger(this, f) | |
14 | 14 | if ($isInstanceOf(g, "Int")) | |
15 | 15 | then { | |
16 | 16 | let h = g | |
17 | 17 | h | |
18 | 18 | } | |
19 | 19 | else 0 | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func i (f) = { | |
24 | 24 | let g = getBinary(this, f) | |
25 | 25 | if ($isInstanceOf(g, "ByteVector")) | |
26 | 26 | then { | |
27 | 27 | let h = g | |
28 | 28 | h | |
29 | 29 | } | |
30 | 30 | else base58'2CsAf' | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func j (f) = { | |
35 | 35 | let g = getString(this, f) | |
36 | 36 | if ($isInstanceOf(g, "String")) | |
37 | 37 | then { | |
38 | 38 | let h = g | |
39 | 39 | h | |
40 | 40 | } | |
41 | 41 | else "" | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func k (l,f) = { | |
46 | 46 | let g = getString(l, f) | |
47 | 47 | if ($isInstanceOf(g, "String")) | |
48 | 48 | then { | |
49 | 49 | let h = g | |
50 | 50 | h | |
51 | 51 | } | |
52 | 52 | else "" | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func m (l,f) = { | |
57 | 57 | let g = getInteger(l, f) | |
58 | 58 | if ($isInstanceOf(g, "Int")) | |
59 | 59 | then { | |
60 | 60 | let h = g | |
61 | 61 | h | |
62 | 62 | } | |
63 | 63 | else 0 | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | let n = "oracles" | |
68 | 68 | ||
69 | 69 | let o = "subscriber_address" | |
70 | 70 | ||
71 | 71 | let p = "type" | |
72 | 72 | ||
73 | 73 | let q = "gravity_contract" | |
74 | 74 | ||
75 | 75 | let r = "bft_coefficient" | |
76 | 76 | ||
77 | 77 | let s = "last_height" | |
78 | 78 | ||
79 | 79 | let t = "last_round" | |
80 | 80 | ||
81 | 81 | let u = "last_pulse_id" | |
82 | 82 | ||
83 | 83 | func v (w) = ("data_hash_" + toString(w)) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func x (w) = ("height_" + toString(w)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func y (z) = ("consuls_" + toString(z)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | let A = split(j(n), ",") | |
93 | 93 | ||
94 | 94 | let B = e(r) | |
95 | 95 | ||
96 | 96 | let C = addressFromStringValue(j(q)) | |
97 | 97 | ||
98 | 98 | let D = m(C, t) | |
99 | 99 | ||
100 | 100 | let E = split(k(C, y(D)), ",") | |
101 | 101 | ||
102 | 102 | let F = j(o) | |
103 | 103 | ||
104 | 104 | let G = e(p) | |
105 | 105 | ||
106 | 106 | let H = e(u) | |
107 | 107 | ||
108 | 108 | func I (w) = i(v(w)) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func J (w) = e(x(w)) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func K (L,M,N) = if ((M != "nil")) | |
115 | 115 | then if (sigVerify(L, fromBase58String(M), fromBase58String(N))) | |
116 | 116 | then 1 | |
117 | 117 | else 0 | |
118 | 118 | else 0 | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | @Callable(O) | |
122 | 122 | func sendHashValue (L,P) = { | |
123 | 123 | let Q = split(P, ",") | |
124 | 124 | let R = ((((K(L, Q[0], A[0]) + K(L, Q[1], A[1])) + K(L, Q[2], A[2])) + K(L, Q[3], A[3])) + K(L, Q[4], A[4])) | |
125 | 125 | if ((B > R)) | |
126 | 126 | then throw("invalid bft count") | |
127 | 127 | else if ((i(toString(height)) != base58'2CsAf')) | |
128 | 128 | then throw("data is exist") | |
129 | 129 | else { | |
130 | 130 | let w = (H + 1) | |
131 | 131 | WriteSet([DataEntry(v(H), L), DataEntry(x(H), height), DataEntry(s, height), DataEntry(u, w)]) | |
132 | 132 | } | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | ||
137 | 137 | @Callable(O) | |
138 | 138 | func updateOracles (S,T,z) = { | |
139 | 139 | let P = split(T, ",") | |
140 | 140 | let R = ((((K(toBytes(S), P[0], E[0]) + K(toBytes(S), P[1], E[1])) + K(toBytes(S), P[2], E[2])) + K(toBytes(S), P[3], E[3])) + K(toBytes(S), P[4], E[4])) | |
141 | 141 | if ((R > B)) | |
142 | 142 | then throw("invalid bft count") | |
143 | 143 | else WriteSet([DataEntry(n, S), DataEntry(((t + "_") + toString(z)), z)]) | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Verifier(O) | |
148 | 148 | func U () = { | |
149 | 149 | let g = O | |
150 | 150 | if ($isInstanceOf(g, "InvokeScriptTransaction")) | |
151 | 151 | then { | |
152 | 152 | let V = g | |
153 | 153 | let W = if ((G == b)) | |
154 | 154 | then { | |
155 | 155 | let h = { | |
156 | 156 | let X = V.args[0] | |
157 | 157 | if ($isInstanceOf(X, "Int")) | |
158 | 158 | then { | |
159 | 159 | let h = X | |
160 | 160 | h | |
161 | 161 | } | |
162 | 162 | else throw("invalid value type") | |
163 | 163 | } | |
164 | 164 | toBytes(h) | |
165 | 165 | } | |
166 | 166 | else if ((G == c)) | |
167 | 167 | then { | |
168 | 168 | let h = { | |
169 | 169 | let X = V.args[0] | |
170 | 170 | if ($isInstanceOf(X, "String")) | |
171 | 171 | then { | |
172 | 172 | let h = X | |
173 | 173 | h | |
174 | 174 | } | |
175 | 175 | else throw("invalid value type") | |
176 | 176 | } | |
177 | 177 | toBytes(h) | |
178 | 178 | } | |
179 | 179 | else if ((G == d)) | |
180 | 180 | then { | |
181 | 181 | let h = { | |
182 | 182 | let X = V.args[0] | |
183 | 183 | if ($isInstanceOf(X, "ByteVector")) | |
184 | 184 | then { | |
185 | 185 | let h = X | |
186 | 186 | h | |
187 | 187 | } | |
188 | 188 | else throw("invalid value type") | |
189 | 189 | } | |
190 | 190 | h | |
191 | 191 | } | |
192 | 192 | else throw("invalid value type") | |
193 | 193 | let Y = { | |
194 | 194 | let X = V.args[1] | |
195 | 195 | if ($isInstanceOf(X, "Int")) | |
196 | 196 | then { | |
197 | 197 | let Y = X | |
198 | 198 | Y | |
199 | 199 | } | |
200 | 200 | else throw("invalid height type") | |
201 | 201 | } | |
202 | 202 | if ((V.function != "attachValue")) | |
203 | 203 | then throw("invalid function name") | |
204 | 204 | else if ((size(V.args) != 2)) | |
205 | 205 | then throw("invalid args size") | |
206 | 206 | else if ((V.dApp != addressFromStringValue(F))) | |
207 | 207 | then throw("invalid dapp address") | |
208 | 208 | else if ((J(Y) != height)) | |
209 | 209 | then throw("invalid height") | |
210 | 210 | else if ((I(Y) == base58'2CsAf')) | |
211 | 211 | then throw("invalid pulse id") | |
212 | 212 | else if ((keccak256(W) != I(Y))) | |
213 | 213 | then throw("invalid keccak256(value)") | |
214 | 214 | else true | |
215 | 215 | } | |
216 | 216 | else sigVerify(O.bodyBytes, O.proofs[0], O.senderPublicKey) | |
217 | 217 | } | |
218 | 218 |
github/deemru/w8io/169f3d6 36.09 ms ◑