Skip to content

Support for abi functions (abi.encode, abi.decode) #68

Open
@dddejan

Description

@dddejan

In test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory_v2.sol

pragma experimental "ABIEncoderV2";

contract C {
  struct S { uint x; uint[] b; }
  function f() public pure returns (S memory, bytes memory, uint[][2] memory) {
    return abi.decode("abc", (S, bytes, uint[][2]));
  }
}

The AST goes into parsing the indexed expression uint[][2] and fails in L1133 of ASTBoogieExpressionConverter.cpp:

index->accept(*this); // TODO: can this be a nullptr?

So yes, it can be nullptr :)

We don't support the abi.decode and type parsing yet, but we should try not to segfault.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions