solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Update description of input parameter type and return type limitations

Open minaminao opened this issue 2 years ago • 2 comments

ABI coder V2 is now enabled by default. It allows us to do the following:

  • Multidimensional arrays (including dynamic arrays) can be used as input for external functions.
  • Multidimensional arrays (including dynamic arrays) and structs can be used as return values for external functions.

I changed the documentation based on this. (I have already experimented on my machine to make sure it works.)

However, mapping is not allowed as a return value before, so I left it as it is.

EDIT: I am not aware whether all multidimensional arrays of all value types are supported by ABI coder V2.

minaminao avatar Aug 04 '22 07:08 minaminao

The failing OpenZeppelin test is already fixed on latest develop. I rebased the PR and pushed to the original branch to make it pass so that we can merge this.

I also added some more tweaks while at it:

  • Expanded the note according to @ekpyron's comment but with even more detail
  • Removed another mention of v2 not being the default
  • Added more consistent index entries for pragmas.

@minaminao Please check if you're fine with these changes.

cameel avatar Aug 05 '22 14:08 cameel

Looks good. It's helpful to clearly understand the specifications.

minaminao avatar Aug 05 '22 15:08 minaminao

Rebased and applied suggestions from @ekpyron .

leonardoalt avatar Aug 13 '22 12:08 leonardoalt