solidity
solidity copied to clipboard
Update description of input parameter type and return type limitations
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.
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.
Looks good. It's helpful to clearly understand the specifications.
Rebased and applied suggestions from @ekpyron .