Documentation
¶
Index ¶
- func NewPrecompileAdapter(extState *ExtState) contract.StateDB
- type ExtState
- type PrecompileAdapter
- func (p *PrecompileAdapter) AddBalance(addr common.Address, amount *uint256.Int)
- func (p *PrecompileAdapter) AddLog(log *types.Log)
- func (p *PrecompileAdapter) CreateAccount(addr common.Address)
- func (p *PrecompileAdapter) Exist(addr common.Address) bool
- func (p *PrecompileAdapter) GetBalance(addr common.Address) *uint256.Int
- func (p *PrecompileAdapter) GetNonce(addr common.Address) uint64
- func (p *PrecompileAdapter) GetPredicateStorageSlots(address common.Address, index int) ([]byte, bool)
- func (p *PrecompileAdapter) GetState(addr common.Address, key common.Hash) common.Hash
- func (p *PrecompileAdapter) GetTxHash() common.Hash
- func (p *PrecompileAdapter) RevertToSnapshot(snapshot int)
- func (p *PrecompileAdapter) SetNonce(addr common.Address, nonce uint64)
- func (p *PrecompileAdapter) SetState(addr common.Address, key common.Hash, value common.Hash)
- func (p *PrecompileAdapter) Snapshot() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrecompileAdapter ¶ added in v0.8.6
NewPrecompileAdapter creates a new PrecompileAdapter
Types ¶
type ExtState ¶ added in v0.8.8
type ExtState struct {
// contains filtered or unexported fields
}
ExtState wraps a StateDB for extended state operations
type PrecompileAdapter ¶ added in v0.8.8
type PrecompileAdapter struct {
// contains filtered or unexported fields
}
PrecompileAdapter adapts ExtState for precompile usage
func (*PrecompileAdapter) AddBalance ¶ added in v0.8.8
func (p *PrecompileAdapter) AddBalance(addr common.Address, amount *uint256.Int)
AddBalance adds balance to an account
func (*PrecompileAdapter) AddLog ¶ added in v0.8.8
func (p *PrecompileAdapter) AddLog(log *types.Log)
AddLog adds a log entry
func (*PrecompileAdapter) CreateAccount ¶ added in v0.8.8
func (p *PrecompileAdapter) CreateAccount(addr common.Address)
CreateAccount creates a new account
func (*PrecompileAdapter) Exist ¶ added in v0.8.8
func (p *PrecompileAdapter) Exist(addr common.Address) bool
Exist returns whether an account exists
func (*PrecompileAdapter) GetBalance ¶ added in v0.8.8
func (p *PrecompileAdapter) GetBalance(addr common.Address) *uint256.Int
GetBalance gets account balance
func (*PrecompileAdapter) GetNonce ¶ added in v0.8.8
func (p *PrecompileAdapter) GetNonce(addr common.Address) uint64
GetNonce gets account nonce
func (*PrecompileAdapter) GetPredicateStorageSlots ¶ added in v0.8.8
func (p *PrecompileAdapter) GetPredicateStorageSlots(address common.Address, index int) ([]byte, bool)
GetPredicateStorageSlots gets predicate storage slots
func (*PrecompileAdapter) GetTxHash ¶ added in v0.8.8
func (p *PrecompileAdapter) GetTxHash() common.Hash
GetTxHash gets the current transaction hash
func (*PrecompileAdapter) RevertToSnapshot ¶ added in v0.8.8
func (p *PrecompileAdapter) RevertToSnapshot(snapshot int)
RevertToSnapshot reverts to a previous snapshot
func (*PrecompileAdapter) SetNonce ¶ added in v0.8.8
func (p *PrecompileAdapter) SetNonce(addr common.Address, nonce uint64)
SetNonce sets account nonce
func (*PrecompileAdapter) Snapshot ¶ added in v0.8.8
func (p *PrecompileAdapter) Snapshot() int
Snapshot returns the current revision number
Click to show internal directories.
Click to hide internal directories.