ethereum-php icon indicating copy to clipboard operation
ethereum-php copied to clipboard

Unknown ABI type: tuple[]

Open SelimTavukcuoglu opened this issue 4 years ago • 4 comments

Using the pragma abicoder v2 in my solidity smart contract, I have this error when the result of the method called returns an array of struct.

Thx for your work !

SelimTavukcuoglu avatar Apr 01 '21 14:04 SelimTavukcuoglu

I am also having the same issue with bytes[] for following ABI. This Contract is used by every BSC related platform, but I couldn't make it work with ethereum-php.

@asihud sorry for the tag, I saw that you solved the issue #40. Maybe you can also help us with this. @digitaldonkey is this repo abondoned?

https://bscscan.com/address/0x1ee38d535d541c55c9dae27b12edf090c608e6fb#code

[
  {
    "constant": true,
    "inputs": [
      {
        "components": [
          {
            "name": "target",
            "type": "address"
          },
          {
            "name": "callData",
            "type": "bytes"
          }
        ],
        "name": "calls",
        "type": "tuple[]"
      }
    ],
    "name": "aggregate",
    "outputs": [
      {
        "name": "blockNumber",
        "type": "uint256"
      },
      {
        "name": "returnData",
        "type": "bytes[]"
      }
    ],
    "payable": false,
    "stateMutability": "view",
    "type": "function"
  },
  {
    "constant": true,
    "inputs": [
      {
        "name": "addr",
        "type": "address"
      }
    ],
    "name": "getEthBalance",
    "outputs": [
      {
        "name": "balance",
        "type": "uint256"
      }
    ],
    "payable": false,
    "stateMutability": "view",
    "type": "function"
  }
]

mrcolak avatar May 14 '21 00:05 mrcolak

I haven't tested for this case but can you try use this fix I made a pull request for? https://github.com/digitaldonkey/ethereum-php/pull/55/commits/7d3610a64073074b1ca3dda5730bd53aea52e631

ynohtna92 avatar May 23 '21 09:05 ynohtna92

@mrcolak I just migrated the pipeline. For PR uncluding tests I promise faster response. Otherwise I work on it when I find time, which is currently not very often.

digitaldonkey avatar Jun 26 '21 13:06 digitaldonkey

Same problem. Any update?

@digitaldonkey @ynohtna92

Thanks!

JSanchezFDZ avatar Jul 20 '22 11:07 JSanchezFDZ