mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-23 17:28:23 +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. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| ERC20.sol | ||
| Permit.sol | ||