datahaven/operator/precompiles
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
..
batch feat: set POV gas limit ratio to zero for solo chain (#313) 2025-11-27 11:14:41 +01:00
call-permit fix: change pallet_evm alias to EVM to fix eth_getCode (#213) 2025-10-10 17:48:52 +00:00
collective feat: set POV gas limit ratio to zero for solo chain (#313) 2025-11-27 11:14:41 +01:00
conviction-voting feat: set POV gas limit ratio to zero for solo chain (#313) 2025-11-27 11:14:41 +01:00
datahaven-native-transfer feat: Add datahaven native transfer precompile (#309) 2025-12-02 13:57:40 +01:00
erc20-balances fix: 🔧 account for storage reads on withdrawal (#407) 2026-01-21 16:25:57 -03:00
identity feat: set POV gas limit ratio to zero for solo chain (#313) 2025-11-27 11:14:41 +01:00
precompile-registry feat: Add CI license check (#269) 2025-11-02 23:32:59 +02:00
preimage feat: set POV gas limit ratio to zero for solo chain (#313) 2025-11-27 11:14:41 +01:00
proxy feat: set POV gas limit ratio to zero for solo chain (#313) 2025-11-27 11:14:41 +01:00
referenda feat: set POV gas limit ratio to zero for solo chain (#313) 2025-11-27 11:14:41 +01:00