web3j-maven-plugin icon indicating copy to clipboard operation
web3j-maven-plugin copied to clipboard

Unsupported type encountered: tuple

Open cryptoDevTrader opened this issue 4 years ago • 2 comments

When generating sources for a contract which has return or input values which are arrays of a struct, the following error is thrown.

Execution default-cli of goal org.web3j:web3j-maven-plugin:4.6.5:generate-sources failed: Unsupported type encountered: tuple

Below is a sample contract which causes the error above.

// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

interface MyContract {
    struct MyData {
        address account;
        uint256 balance;
    }

    function myFunction(address account) external view returns (MyData[] memory data);
}

cryptoDevTrader avatar Dec 11 '20 18:12 cryptoDevTrader

Looks like this is directly related to https://github.com/web3j/web3j/issues/935

cryptoDevTrader avatar Dec 11 '20 19:12 cryptoDevTrader

Have you solved the problem

zouqingfeng avatar Apr 22 '21 07:04 zouqingfeng