页面加载中
页面加载中
Solidity & EVM 基础(筛选关)
分层讲解:storage 布局、读写优化、算术与错误处理、批量与数据结构选择。
uint128 占一个 uint256 slot)uint128 a; uint128 b; 放同一 slot,一次 SSTORE 写入两个字段,比两个 uint256 省约 20000 gas(首次写入)memory / calldata 缓存 storage 变量immutable / constant 替代可变的 storage 读取uncheckedrequire,省部署和 revert gasbool 状态staticcall 就不要 callcalldata 结构,避免冗余字段