Skip to content

Commit

Permalink
eth/tracers/live: update supply tracer to track deposits
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Aug 8, 2024
1 parent 6f9fab0 commit 9b527a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth/tracers/live/supply.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ func (s *supply) OnBalanceChange(a common.Address, prevBalance, newBalance *big.
// BalanceDecreaseSelfdestructBurn is non-reversible as it happens
// at the end of the transaction.
s.delta.Burn.Misc.Sub(s.delta.Burn.Misc, diff)
// Technically an OP-Stack deposit mint is a "withdrawal" from L1, taking funds into L2.
case tracing.BalanceMint:
s.delta.Issuance.Withdrawals.Add(s.delta.Issuance.Withdrawals, diff)
default:
return
}
Expand Down
7 changes: 7 additions & 0 deletions fork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,13 @@ def:
globs:
- "accounts/abi/bind/backends/simulated.go"
- "ethclient/simulated/backend.go"
- title: Live tracer update
description: |
Track L1-deposited native currency that is coming into the L2 supply.
The balance delta is considered to be a "withdrawal" from L1,
similar to a withdrawal of the Beacon-chain into the Ethereum L1 execution chain.
globs:
- "eth/tracers/live/supply.go"
- title: "Hardware wallet support"
description: Extend Ledger wallet support for newer devices on Macos
sub:
Expand Down

0 comments on commit 9b527a8

Please sign in to comment.