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

Function formatImmutableReferences

libsolidity/interface/StandardCompiler.cpp:435–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435Json formatImmutableReferences(std::map<u256, evmasm::LinkerObject::ImmutableRefs> const& _immutableReferences)
436{
437 Json ret = Json::object();
438
439 for (auto const& immutableReference: _immutableReferences)
440 {
441 auto const& [identifier, byteOffsets] = immutableReference.second;
442 Json array = Json::array();
443 for (size_t byteOffset: byteOffsets)
444 {
445 Json byteRange;
446 byteRange["start"] = Json::number_unsigned_t(byteOffset);
447 byteRange["length"] = Json::number_unsigned_t(32); // immutable references are currently always 32 bytes wide
448 array.emplace_back(byteRange);
449 }
450 ret[identifier] = array;
451 }
452
453 return ret;
454}
455
456std::optional<Json> checkKeys(Json const& _input, std::set<std::string> const& _keys, std::string const& _name)
457{

Callers 3

importEVMAssemblyMethod · 0.85
compileSolidityMethod · 0.85
compileYulMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected