hyperledger / web3j-maven-plugin

web3j Maven plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsupported type encountered: tuple

cryptoDevTrader opened this issue · 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);
}

Looks like this is directly related to hyperledger/web3j#935

Have you solved the problem