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

Method abiEncodeV2

libsolidity/codegen/CompilerUtils.cpp:608–625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608void CompilerUtils::abiEncodeV2(
609 TypePointers const& _givenTypes,
610 TypePointers const& _targetTypes,
611 bool _encodeAsLibraryTypes,
612 bool _padToWordBoundaries
613)
614{
615 if (!_padToWordBoundaries)
616 solAssert(!_encodeAsLibraryTypes, "Library calls cannot be packed.");
617
618 // stack: <$value0> <$value1> ... <$value(n-1)> <$headStart>
619
620 std::string encoderName =
621 _padToWordBoundaries ?
622 m_context.abiFunctions().tupleEncoderReversed(_givenTypes, _targetTypes, _encodeAsLibraryTypes) :
623 m_context.abiFunctions().tupleEncoderPackedReversed(_givenTypes, _targetTypes);
624 m_context.callYulFunction(encoderName, sizeOnStack(_givenTypes) + 1, 1);
625}
626
627void CompilerUtils::abiDecodeV2(TypePointers const& _parameterTypes, bool _fromMemory)
628{

Callers

nothing calls this directly

Calls 4

tupleEncoderReversedMethod · 0.80
abiFunctionsMethod · 0.80
callYulFunctionMethod · 0.80

Tested by

no test coverage detected