Code: https://www.contractreader.io/contract/mainnet/0x0C7D4bdA40CF78F9F1BAf6e3D5774f1E22c9CC4B
My question is about this verifyCalldata() call:
function verifyAddress( uint256 _projectId, bytes32[] calldata _proof, address _address ) public view returns (bool) { return _proof.verifyCalldata( projectMerkleRoot[_projectId], hashAddress(_address) ); } If _proof is a bytes32[], how can it have the method verifyCalldata()?
bytes32[] is an array of bytes, right?
I see verifyCalldata() in @openzeppelin-4.7/contracts/utils/cryptography/MerkleProof.sol and it's signature is:
library MerkleProof { ... function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { ... So I would expect the call to be something like:
return MerkleProof.verifyCalldata( merkleProof, merkleRoot, leaf ); but it is not. Why?
I feel like there's some magic (or shorthand) I haven't learned yet.