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

Method returnDataSelectorFunction

libsolidity/codegen/YulUtilFunctions.cpp:4656–4674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4654}
4655
4656std::string YulUtilFunctions::returnDataSelectorFunction()
4657{
4658 std::string const functionName = "return_data_selector";
4659 solAssert(m_evmVersion.supportsReturndata(), "");
4660
4661 return m_functionCollector.createFunction(functionName, [&]() {
4662 return util::Whiskers(R"(
4663 function <functionName>() -> sig {
4664 if gt(returndatasize(), 3) {
4665 returndatacopy(0, 0, 4)
4666 sig := <shr224>(mload(0))
4667 }
4668 }
4669 )")
4670 ("functionName", functionName)
4671 ("shr224", shiftRightFunction(224))
4672 .render();
4673 });
4674}
4675
4676std::string YulUtilFunctions::tryDecodeErrorMessageFunction()
4677{

Callers 2

handleCatchMethod · 0.80
handleCatchMethod · 0.80

Calls 4

WhiskersClass · 0.85
supportsReturndataMethod · 0.80
renderMethod · 0.80
createFunctionMethod · 0.45

Tested by

no test coverage detected