Skip to content

abiGen crashes when on tuples #17152

@StoyanD

Description

@StoyanD

When creating wrappers using abiGen, it crashes when you have nested struct's in your code. This occurs when abiGen tries to unmarshal json and the supported types don't match a tuple Leading to a runtime crash.

Expected behaviour

abiGen should not crash on tuples, or it should ignore them since in solidity no public function can take tuples as parameters or return them as output.

Actual behaviour

abiGen crashes on perfectly valid abi from the solc compiler

Steps to reproduce the behaviour

run abigen --sol Nested.sol --pkg main --out nested.go

On this file Nested.sol:

pragma solidity ^0.4.24;

contract Nested {

    Parent public parent;
    struct Parent {
        uint a;
        Child child;
    }

    struct Child {
        uint b;
    }

}

Backtrace

Failed to generate ABI binding: unsupported arg type: tuple

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions