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

Method revertWithError

libsolidity/codegen/CompilerUtils.cpp:106–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void CompilerUtils::revertWithError(
107 std::string const& _signature,
108 std::vector<Type const*> const& _parameterTypes,
109 std::vector<Type const*> const& _argumentTypes
110)
111{
112 fetchFreeMemoryPointer();
113 m_context << util::selectorFromSignatureU256(_signature);
114 m_context << Instruction::DUP2 << Instruction::MSTORE;
115 m_context << u256(4) << Instruction::ADD;
116 // Stack: <arguments...> <mem pos of encoding start>
117 abiEncode(_argumentTypes, _parameterTypes);
118 toSizeAfterFreeMemoryPointer();
119 m_context << Instruction::REVERT;
120}
121
122void CompilerUtils::returnDataToArray()
123{

Callers 1

visitMethod · 0.45

Calls 1

Tested by

no test coverage detected