mediumStudy question · answer published in Blockchain interview questions, so no pointssmart-contract-securityarithmetic
Casting uint256 to uint96
A staking contract stores amounts as uint96 to pack storage and writes stake = uint96(amount). What happens if amount exceeds type(uint96).max?
Discussion 0
Join free to post in the discussion.
Related questions
- Private variables are public dataBlockchain Developer
- Verifying a contract on EtherscanBlockchain Developer
- Sharing a seed phraseBlockchain Developer
- Why use OpenZeppelinBlockchain Developer
- The checks-effects-interactions orderBlockchain Developer
- What nonReentrant doesBlockchain Developer
- What front-running isBlockchain Developer
- Anyone can mintBlockchain Developer