MCPcopy Create free account
hub / github.com/LUX-Core/lux / toByte

Function toByte

src/cpp-ethereum/test/libtesteth/TestHelper.cpp:208–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208byte toByte(json_spirit::mValue const& _v)
209{
210 switch (_v.type())
211 {
212 case json_spirit::str_type: return (byte)stoi(_v.get_str());
213 case json_spirit::int_type: return (byte)_v.get_uint64();
214 case json_spirit::bool_type: return (byte)_v.get_bool();
215 case json_spirit::real_type: return (byte)_v.get_real();
216 default: cwarn << "Bad type for scalar: " << _v.type();
217 }
218 return 0;
219}
220
221bytes importByteArray(std::string const& _str)
222{

Callers 2

importDataFunction · 0.85
importCodeFunction · 0.85

Calls 5

get_strMethod · 0.80
typeMethod · 0.45
get_uint64Method · 0.45
get_boolMethod · 0.45
get_realMethod · 0.45

Tested by

no test coverage detected