mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## 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. |
||
|---|---|---|
| .. | ||
| batch | ||
| call-permit | ||
| collective | ||
| conviction-voting | ||
| datahaven-native-transfer | ||
| erc20-balances | ||
| identity | ||
| precompile-registry | ||
| preimage | ||
| proxy | ||
| referenda | ||