MCPcopy Create free account
hub / github.com/argotorg/solidity / readValue

Method readValue

test/Metadata.cpp:84–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 return readString();
83 }
84 std::string readValue()
85 {
86 switch(nextType())
87 {
88 case MajorType::ByteString:
89 return util::toHex(readBytes(readLength()));
90 case MajorType::TextString:
91 return readString();
92 case MajorType::SimpleData:
93 {
94 unsigned value = nextImmediate();
95 m_pos++;
96 if (value == 20)
97 return "false";
98 if (value == 21)
99 return "true";
100 solUnimplemented("Unsupported simple value (not a boolean).");
101 }
102 case MajorType::Map:
103 solUnimplemented("Nested maps not supported.");
104 }
105 util::unreachable();
106 }
107private:
108 enum class MajorType
109 {

Callers 1

parseCBORMetadataFunction · 0.80

Calls 2

toHexFunction · 0.85
unreachableFunction · 0.85

Tested by

no test coverage detected