The current inputs and outputs params for Function and Event are Vec<Param>, but the problem is that, if the Param is a tuple, then will lose name and internal_type information about the elements in this tuple.
For example, if I have an abi like.
"inputs": [
{
"components": [
{
"internalType": "uint8",
"name": "blockType",
"type": "uint8"
},
{
"components": [
{
"internalType": "uint256",
"name": "txIndex",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"internalType": "struct ExchangeData.AuxiliaryData[]",
"name": "auxiliaryData",
"type": "tuple[]"
},
{
"internalType": "bytes",
"name": "offchainData",
"type": "bytes"
}
],
"internalType": "struct ExchangeData.Block[]",
"name": "blocks",
"type": "tuple[]"
}
],
This abi can be parsed fine, but the problem is that the current ParamType for tuple is Tuple(Vec<ParamType>). So this means I cannot get the elements' names blockType and blocks.
Those information is important in my use case, I would like to suggest to change the ParamType::Tuple(Vec<ParamType>) to ParamType::Tuple(Vec<TupleParam>), in this way, users can get the name and internal type information.
The current inputs and outputs params for
FunctionandEventareVec<Param>, but the problem is that, if theParamis a tuple, then will lose name and internal_type information about the elements in this tuple.For example, if I have an abi like.
This abi can be parsed fine, but the problem is that the current
ParamTypefor tuple isTuple(Vec<ParamType>). So this means I cannot get the elements' namesblockTypeandblocks.Those information is important in my use case, I would like to suggest to change the
ParamType::Tuple(Vec<ParamType>)toParamType::Tuple(Vec<TupleParam>), in this way, users can get the name and internal type information.