CompositeFunctionParameter class

A function parameter that includes other named parameter instead of just wrapping single types.

Consider this contract:

pragma solidity >=0.4.19 <0.7.0;
pragma experimental ABIEncoderV2;

contract Test {
  struct S { uint a; uint[] b; T[] c; }
  struct T { uint x; uint y; }
  function f(S memory s, T memory t, uint a) public;
  function g() public returns (S memory s, T memory t, uint a);
}

For the parameter s in the function f, we still want to know the names of the components in the tuple. Simply knowing that it's a tuple is not enough. Similarly, we want to know the names of the parameters of T in S.c.

Inheritance

Constructors

CompositeFunctionParameter(String name, List<FunctionParameter> components, List<int?> arrayLengths)
Constructor.

Properties

arrayLengths List<int?>
If the composite type is wrapped in arrays, contains the length of these arrays. For instance, given a struct S, the type S[3][][4] would be represented with a CompositeFunctionParameter that has the components of S and arrayLengths of [3, null, 4].
final
components List<FunctionParameter>
Components.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Name.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type AbiType
Type.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited