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

Method tryDecodePanicDataFunction

libsolidity/codegen/YulUtilFunctions.cpp:4715–4733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4713}
4714
4715std::string YulUtilFunctions::tryDecodePanicDataFunction()
4716{
4717 std::string const functionName = "try_decode_panic_data";
4718 solAssert(m_evmVersion.supportsReturndata(), "");
4719
4720 return m_functionCollector.createFunction(functionName, [&]() {
4721 return util::Whiskers(R"(
4722 function <functionName>() -> success, data {
4723 if gt(returndatasize(), 0x23) {
4724 returndatacopy(0, 4, 0x20)
4725 success := 1
4726 data := mload(0)
4727 }
4728 }
4729 )")
4730 ("functionName", functionName)
4731 .render();
4732 });
4733}
4734
4735std::string YulUtilFunctions::extractReturndataFunction()
4736{

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