Skip to content

Return array - TypeError: Cannot read property 'type' of undefined #32

@gpersoon

Description

@gpersoon

I found another edge case with the following contract:

pragma solidity >=0.4.0 <0.7.0;
contract Test {
  uint[] aa=[1,2,3,4];
   function GetStorage() public view returns(uint[] memory) {
       return aa;
   }
}

Calling the function GetStorage results in the following error:

bundle.js:49678 Uncaught (in promise) TypeError: Cannot read property 'type' of undefined
    at getTypes (bundle.js:49678)
    at bundle.js:49661
    at Array.map (<anonymous>)
    at decodeReturnData (bundle.js:49661)
    at getReturnData (bundle.js:50058)
    at makeReturn (bundle.js:50050)
    at sendTx (bundle.js:50485)

Metadata

Metadata

Assignees

No one assigned

    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