Reputation: 19148
I need to pass an empty byte array to a function derived from OpenZeppelin:
function mintTo(address to, uint256 tokenId, uint256 amount)
{
bytes memory data;
_mint(to, tokenId, amount, data);
}
However, although this code compiles and works perfectly, Slither is complaining that this is
is a local variable never initialized
I'm curious how to achieve that?
Upvotes: 0
Views: 674
Reputation: 1273
You can shut slither up or just use an empty string:
_mint(to, tokenId, amount, "");
Upvotes: 1