Closed
Description
This is a very smart piece of code found in the ENS repository that we think could be a useful feature for people to plug into their contracts. I suppose this would be the utils/Multicall
module, unless we come up with another name!
function multicall(bytes[] calldata data) external returns(bytes[] memory results) {
results = new bytes[](data.length);
for(uint i = 0; i < data.length; i++) {
(bool success, bytes memory result) = address(this).delegatecall(data[i]);
require(success);
results[i] = result;
}
return results;
}
Metadata
Metadata
Assignees
Labels
No labels
Activity