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

Method splitExternalFunctionIdFunction

libsolidity/codegen/YulUtilFunctions.cpp:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85std::string YulUtilFunctions::splitExternalFunctionIdFunction()
86{
87 std::string functionName = "split_external_function_id";
88 return m_functionCollector.createFunction(functionName, [&]() {
89 return Whiskers(R"(
90 function <functionName>(combined) -> addr, selector {
91 combined := <shr64>(combined)
92 selector := and(combined, 0xffffffff)
93 addr := <shr32>(combined)
94 }
95 )")
96 ("functionName", functionName)
97 ("shr32", shiftRightFunction(32))
98 ("shr64", shiftRightFunction(64))
99 .render();
100 });
101}
102
103std::string YulUtilFunctions::copyToMemoryFunction(bool _fromCalldata, bool _cleanup)
104{

Callers 1

Calls 3

WhiskersClass · 0.85
renderMethod · 0.80
createFunctionMethod · 0.45

Tested by

no test coverage detected