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

[Bug] There is a bug in MetadataRenderer.sol in the _generateSeed function #129

Open
spennyp opened this issue Feb 12, 2024 · 0 comments
Open

Comments

@spennyp
Copy link

spennyp commented Feb 12, 2024

There is a bug in MetadataRenderer.sol in the _generateSeed function which impacts psuedo-randomness:

return uint256(keccak256(abi.encode(_tokenId, blockhash(block.number), block.coinbase, block.timestamp)));

blockhash(block.number) will always return0x0000000000000000000000000000000000000000000000000000000000000000, since the hash of the current block cannot be known when the transaction is being executed.

Instead, blockhash(block.number - 1) should be used.

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