Commit 9994f17
authored
starkgate: switch deposit event to upgraded Deposit signature (#485)
The StarkGate proxy implementations were upgraded in Feb 2025 (impl
0xa72a8F31163d74d708664493d09167dfa13008E9, deployed block 21771817).
Post-upgrade the bridges emit:
Deposit(address indexed sender, address indexed token, uint256 amount,
uint256 indexed l2Recipient, uint256 nonce, uint256 fee)
topic[0] = 0x5f971bd00bf3ffbca8a6d72cdd4fd92cfd4f62636161921d1e5a64f0b64ccb6d
The current adapter (added Nov 2025 in #436) still filters on the
legacy five-arg LogDeposit signature, so getLogs returns ~0 results
and StarkGate deposit volume is effectively untracked.
Verified on Ethereum mainnet across all 14 sub-bridges over the last
49,000 blocks (~7 days, head = 25,131,221):
bridge LEGACY NEW
STRK 0 21
ETH 2 46
USDT 0 54
wstETH 0 1
USDC, WBTC, DAI, rETH, sfrxETH, UNI, FRAX, FXS, LUSD, R: 0 / 0
122 new-topic deposits vs 2 legacy on the active bridges = the adapter
catches < 2% of real deposit activity. The new event is firing across
multiple distinct senders / l2 recipients, not a single test address.
ETH bridge `token` arg detail: the post-upgrade ETH bridge fills the
indexed `token` field with 0x0000000000000000000000000000000000455448
(ASCII "ETH") rather than a real ERC20. ERC20 bridges fill it with
the L1 token address (verified on USDT and STRK). The fix keeps the
existing `fixedEventData.token = WETH` override so the pricing layer
can value ETH deposits and stays drop-in compatible with the rest of
the adapter shape.
The withdrawal side (LogMessageToL1 on StarkNet Core 0xc662c410...)
is untouched — verified 152 events in the same 49k-block window with
the same payload layout, so the existing withdrawal params are still
correct.
Topic hash verification per RULES.md Rule 13:
- keccak256("Deposit(address,address,uint256,uint256,uint256,uint256)")
= 0x5f971bd00bf3ffbca8a6d72cdd4fd92cfd4f62636161921d1e5a64f0b64ccb6d
- Cross-checked with openchain.xyz signature DB.1 parent 7951e7c commit 9994f17
1 file changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
61 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
62 | 71 | | |
63 | 72 | | |
64 | | - | |
| 73 | + | |
65 | 74 | | |
66 | | - | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
120 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | | - | |
| 136 | + | |
124 | 137 | | |
125 | | - | |
| 138 | + | |
126 | 139 | | |
127 | 140 | | |
128 | 141 | | |
| |||
0 commit comments