tx · riQozEsCy9boF9YsGcMyGE2BLfuYxzm1oUd6zJ1zTYq

3MzUQnFjbyi1TY8hFtwGDS8n6HpvVbKui7s:  -0.02000000 Waves

2020.05.09 20:12 [990918] smart account 3MzUQnFjbyi1TY8hFtwGDS8n6HpvVbKui7s > SELF 0.00000000 Waves

{ "type": 13, "id": "riQozEsCy9boF9YsGcMyGE2BLfuYxzm1oUd6zJ1zTYq", "fee": 2000000, "feeAssetId": null, "timestamp": 1589044340629, "version": 1, "sender": "3MzUQnFjbyi1TY8hFtwGDS8n6HpvVbKui7s", "senderPublicKey": "387woTgM4ga2rKA8PeeX8v5eKzZsN9pkv7QsT2veEXKV", "proofs": [ "5CNTYWF3oPs9HKqXgzAzEkopWxw6L6P89bhwvYGjdqMAnoUKooNgt7KMeYCMy356YB1TXJpnc7YVJGuga1irrFHP" ], "script": "base64:AAIDAAAAAAAAADkIARIDCgECEgMKAQISAwoBAhIDCgECEgMKAQISAwoBAhIDCgECEgMKAQISAwoBAhIDCgECEgMKAQgAAAAKAQAAAApkZWNvZGVJbnQ4AAAAAgAAAARkYXRhAAAABm9mZnNldAMJAABmAAAAAgAAAAAAAAAAAQkAAMgAAAABBQAAAARkYXRhCQAAAgAAAAECAAAALWRlY29kZSB1OCBlcnJvciwgZGF0YSBtdXN0IGJlIGF0IGxlYXN0IDEgYnl0ZQMJAABmAAAAAgUAAAAGb2Zmc2V0CQAAyAAAAAEFAAAABGRhdGEJAAACAAAAAQIAAAAjZGVjb2RlIHU4IGVycm9yLCBkZWNvZGluZyBpcyBmaW5pc2gEAAAAAngwCQAAyQAAAAIJAADKAAAAAgUAAAAEZGF0YQUAAAAGb2Zmc2V0AAAAAAAAAAABBAAAAAJ4MQkABLIAAAACCQAAywAAAAIBAAAABwAAAAAAAAAFAAAAAngwAAAAAAAAAAAAAwkAAGYAAAACAAAAAAAAAACABQAAAAJ4MQkABEwAAAACBQAAAAJ4MQkABEwAAAACCQAAZAAAAAIFAAAABm9mZnNldAAAAAAAA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AAAABBQAAAARkYXRhAAAAAAAAAAAIBQAAAAZvZmZzZXQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAGnRlc3RfY3V0X2xvbmdfYnl0ZXNfdG9faTY0CQABkQAAAAIFAAAAB2RlY29kZWQAAAAAAAAAAAAFAAAAA25pbAAAAApjb250ZXh0T2JqAQAAAAxzZXRWYWxpZGF0b3IAAAABAAAACXZhbGlkYXRvcgMJAAAAAAAAAggFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyBQAAAAR0aGlzCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAl2YWxpZGF0b3IFAAAACXZhbGlkYXRvcgUAAAADbmlsCQAAAgAAAAECAAAAIU9ubHkgb3duZXIgY2FuIHVzZSB0aGlzIGZ1bmN0aW9uLgAAAApjb250ZXh0T2JqAQAAAApyZXBvcnREYXRhAAAAAQAAAARkYXRhBAAAAAl2YWxpZGF0b3IJAAQcAAAAAgUAAAAEdGhpcwIAAAAJdmFsaWRhdG9yAwkAAAAAAAACCAgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAl2YWxpZGF0b3IJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAADWRhdGFfcmVwb3J0ZWQFAAAABGRhdGEFAAAAA25pbAkAAAIAAAABAgAAACVPbmx5IHZhbGlkYXRvciBjYW4gdXNlIHRoaXMgZnVuY3Rpb24uAAAAAJbG310=", "chainId": 84, "height": 990918, "spentComplexity": 0 } View: original | compacted Prev: 7xhoFceM1rEpZJ5UPSCYMu3hwGWSpSeNgk9kWNE9Hz29 Next: 2XzEnXMoMYQYEfyykAsySZh5j9UA3BSHFV9dWBQ1i7LD Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func decodeInt8 (data,offset) = if ((1 > size(data)))
55 then throw("decode u8 error, data must be at least 1 byte")
66 else if ((offset > size(data)))
77 then throw("decode u8 error, decoding is finish")
88 else {
99 let x0 = take(drop(data, offset), 1)
1010 let x1 = toInt((base58'1111111' + x0), 0)
1111 if ((128 > x1))
1212 then [x1, (offset + 1)]
1313 else [toInt((base58'Ahg1opVcGW' + x0), 0), (offset + 1)]
1414 }
1515
1616
1717 func decodeInt16 (data,offset) = if ((2 > size(data)))
1818 then throw("decode u16 error, data must be at least 2 bytes")
1919 else if ((offset > size(data)))
2020 then throw("decode u16 error, decoding is finish")
2121 else {
2222 let x0 = drop(data, offset)
2323 let x1 = take(x0, 1)
2424 let x2 = take(drop(x0, 1), 1)
2525 if ((decodeInt8(x2, 0)[0] >= 0))
2626 then [toInt(((base58'111111' + x2) + x1), 0), (offset + 2)]
2727 else [toInt(((base58'3CUsUpv9t' + x2) + x1), 0), (offset + 2)]
2828 }
2929
3030
3131 func decodeInt32 (data,offset) = if ((4 > size(data)))
3232 then throw("decode u32 error, data must be at least 4 bytes")
3333 else if ((offset > size(data)))
3434 then throw("decode u32 error, decoding is finish")
3535 else {
3636 let x0 = drop(data, offset)
3737 let x1 = take(x0, 1)
3838 let x2 = take(drop(x0, 1), 1)
3939 let x3 = take(drop(x0, 2), 1)
4040 let x4 = take(drop(x0, 3), 1)
4141 if ((decodeInt8(x4, 0)[0] >= 0))
4242 then [toInt(((((base58'1111' + x4) + x3) + x2) + x1), 0), (offset + 4)]
4343 else [toInt(((((base58'7YXq9G' + x4) + x3) + x2) + x1), 0), (offset + 4)]
4444 }
4545
4646
4747 func decodeInt64 (data,offset) = if ((8 > size(data)))
4848 then throw("decode u32 error, data must be at least 8 bytes")
4949 else if ((offset > size(data)))
5050 then throw("decode u32 error, decoding is finish")
5151 else {
5252 let x0 = drop(data, offset)
5353 let x1 = take(x0, 1)
5454 let x2 = take(drop(x0, 1), 1)
5555 let x3 = take(drop(x0, 2), 1)
5656 let x4 = take(drop(x0, 3), 1)
5757 let x5 = take(drop(x0, 4), 1)
5858 let x6 = take(drop(x0, 5), 1)
5959 let x7 = take(drop(x0, 6), 1)
6060 let x8 = take(drop(x0, 7), 1)
6161 [toInt((((((((x8 + x7) + x6) + x5) + x4) + x3) + x2) + x1), 0), (offset + 8)]
6262 }
6363
6464
6565 func decodeBool (data,offset) = {
6666 let decoded1 = decodeInt8(data, offset)
6767 [(decoded1[0] != 0), decoded1[1]]
6868 }
6969
7070
7171 func decodeBytes32 (data,offset) = if ((32 > size(data)))
7272 then throw("decode bytes32 error, data must be at least 32 bytes")
7373 else [take(drop(data, offset), 32), (offset + 32)]
7474
7575
7676 func decodeBytes64 (data,offset) = if ((64 > size(data)))
7777 then throw("decode bytes64 error, data must be at least 64 bytes")
7878 else [take(drop(data, offset), 64), (offset + 64)]
7979
8080
8181 func decodeBytes65 (data,offset) = if ((65 > size(data)))
8282 then throw("decode bytes65 error, data must be at least 65 bytes")
8383 else [take(drop(data, offset), 65), (offset + 65)]
8484
8585
8686 func decodeBytes (data,offset) = {
8787 let decoded1 = decodeInt32(data, offset)
8888 let bytesSize = decoded1[0]
8989 let nextOffset = decoded1[1]
9090 [take(drop(data, nextOffset), bytesSize), (nextOffset + bytesSize)]
9191 }
9292
9393
9494 func decodeString (data,offset) = {
9595 let decoded1 = decodeInt32(data, offset)
9696 let bytesSize = decoded1[0]
9797 let nextOffset = decoded1[1]
9898 [toUtf8String(take(drop(data, nextOffset), bytesSize)), (nextOffset + bytesSize)]
9999 }
100100
101101
102102 @Callable(contextObj)
103103 func testDecodeInt16 (data) = {
104104 let offset = 0
105105 let x1 = decodeInt16(data, offset)
106106 WriteSet([DataEntry("i16", x1[0])])
107107 }
108108
109109
110110
111111 @Callable(contextObj)
112112 func testDecodeInt64 (data) = {
113113 let offset = 0
114114 let decoded = decodeInt64(data, offset)
115115 WriteSet([DataEntry("i64", decoded[0])])
116116 }
117117
118118
119119
120120 @Callable(contextObj)
121121 func testDecodeString (data) = {
122122 let offset = 0
123123 let decoded = decodeString(data, offset)
124124 WriteSet([DataEntry("string", decoded[0])])
125125 }
126126
127127
128128
129129 @Callable(contextObj)
130130 func testDecodeBytes (data) = {
131131 let offset = 0
132132 let decoded = decodeBytes(data, offset)
133133 WriteSet([DataEntry("bytes", decoded[0])])
134134 }
135135
136136
137137
138138 @Callable(contextObj)
139139 func testCryptoPrice (data) = {
140140 let offset = 0
141141 let x1 = decodeString(data, offset)
142142 match x1[1] {
143143 case t: Int =>
144144 let x2 = decodeInt64(data, t)
145145 WriteSet([DataEntry("symbol", x1[0]), DataEntry("multiplier", x2[0])])
146146 case _ =>
147147 throw("error decoding")
148148 }
149149 }
150150
151151
152152
153153 @Callable(contextObj)
154154 func testDecodeBytes32 (data) = {
155155 let offset = 0
156156 let decoded = decodeBytes32(data, offset)
157157 WriteSet([DataEntry("bytes", decoded[0])])
158158 }
159159
160160
161161
162162 @Callable(contextObj)
163163 func testIntFromBytes (data) = WriteSet([DataEntry("bytesToInt", toInt(data, 0))])
164164
165165
166166
167167 @Callable(contextObj)
168168 func testStringFromBytes (data) = WriteSet([DataEntry("bytesToString", toUtf8String(data))])
169169
170170
171171
172172 @Callable(contextObj)
173173 func testCutLongBytes (data) = {
174174 let offset = 0
175175 let decoded = decodeInt64(drop(data, (size(data) - 8)), offset)
176176 WriteSet([DataEntry("test_cut_long_bytes_to_i64", decoded[0])])
177177 }
178178
179179
180180
181181 @Callable(contextObj)
182182 func setValidator (validator) = if ((contextObj.caller == this))
183183 then WriteSet([DataEntry("validator", validator)])
184184 else throw("Only owner can use this function.")
185185
186186
187187
188188 @Callable(contextObj)
189189 func reportData (data) = {
190190 let validator = getBinary(this, "validator")
191191 if ((contextObj.caller.bytes == validator))
192192 then WriteSet([DataEntry("data_reported", data)])
193193 else throw("Only validator can use this function.")
194194 }
195195
196196

github/deemru/w8io/026f985 
33.66 ms