testhelpers

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2025 License: GPL-3.0, LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

(c) 2023, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestStateDB

func NewTestStateDB(t testing.TB) contract.StateDB

Types

type StateDBAdapter

type StateDBAdapter struct {
	*state.StateDB
}

StateDBAdapter wraps a state.StateDB to implement the simpler AddBalance interface

func NewStateDBAdapter

func NewStateDBAdapter(statedb *state.StateDB) *StateDBAdapter

NewStateDBAdapter creates a new adapter

func (*StateDBAdapter) AddBalance

func (s *StateDBAdapter) AddBalance(addr common.Address, amount *uint256.Int, reason tracing.BalanceChangeReason) uint256.Int

AddBalance implements the VmStateDB AddBalance interface

func (*StateDBAdapter) AddBalanceMultiCoin

func (s *StateDBAdapter) AddBalanceMultiCoin(addr common.Address, coinID common.Hash, amount *big.Int)

func (*StateDBAdapter) GetBalanceMultiCoin

func (s *StateDBAdapter) GetBalanceMultiCoin(addr common.Address, coinID common.Hash) *big.Int

func (*StateDBAdapter) GetTxHash added in v0.8.1

func (s *StateDBAdapter) GetTxHash() common.Hash

GetTxHash returns the current transaction hash

func (*StateDBAdapter) Logs added in v0.8.1

func (s *StateDBAdapter) Logs() []*types.Log

Logs returns our log types

func (*StateDBAdapter) SubBalanceMultiCoin

func (s *StateDBAdapter) SubBalanceMultiCoin(addr common.Address, coinID common.Hash, amount *big.Int)

MultiCoin methods - these are Lux-specific extensions not in geth

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL