datahaven/operator/precompiles/erc20-balances
Gonza Montiel fe2227ef53
fix: 🔧 account for storage reads on withdrawal (#407)
## Summary
ERC20 balances precompile `withdraw()` was failing to account for gas
costs associated with storage reads. In fact the function was calling
`usable_balance` without accounting for `record_db_read`.

## Changes
- Added `116 bytes` of storage read computed like this: `Blake2128(16) +
AccountId(20) + AccountInfo ((4 * 4) + AccountData(16 * 4))`, to cover
for `usable_balance`, following the same that `balance_of` does.
2026-01-21 16:25:57 -03:00
..
src fix: 🔧 account for storage reads on withdrawal (#407) 2026-01-21 16:25:57 -03:00
Cargo.toml feat: Bump client version to v0.2.0 & runtime spec_version to 200 (#194) 2025-09-29 23:35:12 +02:00
ERC20.sol feat: Add ERC20 Balances precompile (#150) 2025-09-12 08:57:44 +00:00
Permit.sol feat: Add ERC20 Balances precompile (#150) 2025-09-12 08:57:44 +00:00