Files
evm/stateupgrade/interfaces.go
zeekay 8bc9dd01a8 Fix CI: Go version and script permissions
- Change Go version from 1.24.6 to 1.22.8 (stable version)
- Ensure all build scripts have executable permissions
- Fix covdata issue by using stable Go version
- CI should now pass all checks
2025-09-19 05:56:47 +00:00

37 lines
936 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package stateupgrade
import (
"math/big"
"github.com/holiman/uint256"
"github.com/luxfi/geth/common"
)
// StateDB is the interface for accessing EVM state in state upgrades
type StateDB interface {
SetState(common.Address, common.Hash, common.Hash)
SetCode(common.Address, []byte)
AddBalance(common.Address, *uint256.Int)
GetNonce(common.Address) uint64
SetNonce(common.Address, uint64)
CreateAccount(common.Address)
Exist(common.Address) bool
}
// ChainContext defines an interface that provides information to a state upgrade
// about the chain configuration.
type ChainContext interface {
IsEIP158(num *big.Int) bool
}
// BlockContext defines an interface that provides information to a state upgrade
// about the block that activates the upgrade.
type BlockContext interface {
Number() *big.Int
}