|
|
@ -38,7 +38,10 @@ template <unsigned S> std::string toJS(FixedHash<S> const& _h) |
|
|
|
|
|
|
|
template <unsigned N> std::string toJS(boost::multiprecision::number<boost::multiprecision::cpp_int_backend<N, N, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>> const& _n) |
|
|
|
{ |
|
|
|
return "0x" + toHex(toCompactBigEndian(_n, 1)); |
|
|
|
std::string h = toHex(toCompactBigEndian(_n, 1)); |
|
|
|
// remove first 0, if it is necessary;
|
|
|
|
std::string res = h[0] != '0' ? h : h.substr(1); |
|
|
|
return "0x" + res; |
|
|
|
} |
|
|
|
|
|
|
|
inline std::string toJS(bytes const& _n, std::size_t _padding = 0) |
|
|
|