Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: regenerate BalanceChangeReason stringer #456

Open
wants to merge 1 commit into
base: optimism
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions core/types/balance.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package types

//go:generate stringer -type=BalanceChangeReason

// BalanceChangeReason describes the reason why an account's balance was changed in a transaction
type BalanceChangeReason uint8

const (
// ValidatorReward is the balance change caused by the block validator reward
ValidatorReward BalanceChangeReason = iota

// EmptyAccountByCode0 is the balance change caused by the empty account by code0 rule
EmptyAccountByCode0

// StartNonce is the balance change caused by the start nonce
StartNonce

// GasRefund is the balance change caused by refunding gas
GasRefund

// BalanceMint is for balance minting operations
BalanceMint

// BalanceBurn is for balance burning operations
BalanceBurn

// BlockReward is for block mining reward
BlockReward

// FeeTip is for transaction fee tips
FeeTip

// UncleReward is for uncle block rewards
UncleReward

// TransactionFee is for transaction fees
TransactionFee

// L1Fee is for Layer 1 fees
L1Fee

// Deposit is for deposits
Deposit

// BaseFeeBurn is for base fee burning
BaseFeeBurn
)
16 changes: 16 additions & 0 deletions core/types/balance_change_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.