Convert bytes to uint256
(s)
| 295 | |
| 296 | |
| 297 | def uint256_from_str(s): |
| 298 | """Convert bytes to uint256""" |
| 299 | r = 0 |
| 300 | t = struct.unpack(b"<IIIIIIII", s[:32]) |
| 301 | for i in range(8): |
| 302 | r += t[i] << (i * 32) |
| 303 | return r |
| 304 | |
| 305 | |
| 306 | def uint256_from_compact(c): |
no outgoing calls