Commit 73eeb25
authored
fix erc1155 single transfers materialized view (#166)
### TL;DR
Added support for ERC1155 token amount parsing in token balance materialized view
### What changed?
Updated the token balance calculation logic to properly handle ERC1155 token amounts by parsing the data field when it contains batch transfer information (130 characters). For ERC1155 transfers, it now extracts the amount from the appropriate position in the data field, defaulting to 1 if not present.
### Why make this change?
ERC1155 tokens can transfer multiple tokens in a single transaction. The previous implementation treated all ERC1155 transfers as single unit transfers, which was incorrect for batch transfers. This change ensures accurate token balance tracking for ERC1155 tokens.1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
0 commit comments