func NewBaseState(db ethdb.Database,
	root common.Hash,
	signer ethTypes.Signer,
	chainConfig params.ChainConfig,
	vmConfig vm.Config,
	gasLimit uint64) BaseState {
	stateDB, _ := ethState.New(root, ethState.NewDatabase(db))
	return BaseState{
		db:          db,
		stateDB:     stateDB,
		signer:      signer,
		chainConfig: chainConfig,
		vmConfig:    vmConfig,
		gasLimit:    gasLimit,
		gp:          new(core.GasPool).AddGas(gasLimit),
	}
}
NewBaseState returns a BaseState initialized from a database and root hash.
package state
import (
	"math/big"
	"sync"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/common/math"
	"github.com/ethereum/go-ethereum/core"
	ethState "github.com/ethereum/go-ethereum/core/state"
	ethTypes "github.com/ethereum/go-ethereum/core/types"
	"github.com/ethereum/go-ethereum/core/vm"
	"github.com/ethereum/go-ethereum/crypto"
	"github.com/ethereum/go-ethereum/ethdb"
	"github.com/ethereum/go-ethereum/params"
	"github.com/ethereum/go-ethereum/rlp"
	"github.com/mosaicnetworks/evm-lite/src/currency"
)
var _receiptsPrefix = []byte("receipts-")
type BaseState struct {
	sync.Mutex
	db           ethdb.Database
	stateDB      *ethState.StateDB
	signer       ethTypes.Signer
	chainConfig  params.ChainConfig
	vmConfig     vm.Config
	gasLimit     uint64
	gp           *core.GasPool
	totalUsedGas uint64
}