Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support function types in ParamType #273

Open
mattsse opened this issue Jun 28, 2022 · 0 comments
Open

Support function types in ParamType #273

mattsse opened this issue Jun 28, 2022 · 0 comments

Comments

@mattsse
Copy link
Contributor

mattsse commented Jun 28, 2022

The ParamType currently does not support Function types.

a function type

 function map(uint[] memory self, function (uint) pure returns (uint) f)

get's type

"abi": [
	{
	"inputs": [
		{
			"internalType": "uint256[]",
			"name": "self",
			"type": "uint256[]"
		},
		{
			"internalType": "function (uint256) pure external returns (uint256)",
			"name": "f",
			"type": "function"
		}
	],
	"name": "map",
	"outputs": [],
	"stateMutability": "nonpayable",
	"type": "function"
	}
]

the methodIdentifier would be

"map(uint256[],function)": "8bd968ff"

"type": "function" is currently only supported on Contract level and not for, this could be achieved by adding a ParamType::Function variant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant