-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Description
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.
MattKetmo, Velnbur, zzir and DirectX
Metadata
Metadata
Assignees
Labels
No labels