testhelpers

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 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)

AddBalance implements the simplified AddBalance interface by providing a default reason

func (*StateDBAdapter) AddBalanceMultiCoin

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

func (*StateDBAdapter) AddLog

func (s *StateDBAdapter) AddLog(addr common.Address, topics []common.Hash, data []byte, blockNumber uint64)

AddLog implements the Lux-specific AddLog signature

func (*StateDBAdapter) GetBalanceMultiCoin

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

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