Documentation
¶
Index ¶
- Constants
- Variables
- func Faucet(kvStore *MockKVStore, address common.Address, amount *big.Int)
- func MockBlock(num int64) types.BlockEnv
- func MockTx(caller common.Address, transactTo [20]byte, txData []byte, nonce uint64) types.TransactionEnv
- type AccountInfo
- type Bytecode
- type KVStore
- type MockKVStore
- func (k *MockKVStore) CreateEOA(accountKey []byte) ([]byte, error)
- func (l MockKVStore) Delete(key []byte)
- func (l MockKVStore) Get(key []byte) []byte
- func (l MockKVStore) Iterator(start, end []byte) dbm.Iterator
- func (l MockKVStore) ReverseIterator(start, end []byte) dbm.Iterator
- func (l MockKVStore) Set(key, value []byte)
Constants ¶
View Source
const KECCAK_EMPTY = "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
Variables ¶
View Source
var AccountPrefix = []byte{0x01}
Functions ¶
Types ¶
type AccountInfo ¶
72 Byte
func AccountInfoFromBytes ¶
func AccountInfoFromBytes(data []byte) (AccountInfo, error)
func ExtractAccountInfo ¶
func ExtractAccountInfo(kvStore *MockKVStore, caller common.Address) AccountInfo
func (AccountInfo) ToBytes ¶
func (accountInfo AccountInfo) ToBytes() []byte
type KVStore ¶
type KVStore interface { Get(key []byte) []byte Set(key, value []byte) Delete(key []byte) Iterator(start, end []byte) dbm.Iterator ReverseIterator(start, end []byte) dbm.Iterator }
KVStore defines the interface for key-value store operations.
type MockKVStore ¶
type MockKVStore struct {
// contains filtered or unexported fields
}
func NewMockKVStore ¶
func NewMockKVStore() *MockKVStore
func (MockKVStore) Delete ¶
func (l MockKVStore) Delete(key []byte)
Delete wraps the underlying DB's Delete method panicing on error.
func (MockKVStore) Get ¶
func (l MockKVStore) Get(key []byte) []byte
Get wraps the underlying DB's Get method panicing on error.
func (MockKVStore) Iterator ¶
func (l MockKVStore) Iterator(start, end []byte) dbm.Iterator
Iterator wraps the underlying DB's Iterator method panicing on error.
func (MockKVStore) ReverseIterator ¶
func (l MockKVStore) ReverseIterator(start, end []byte) dbm.Iterator
ReverseIterator wraps the underlying DB's ReverseIterator method panicing on error.
func (MockKVStore) Set ¶
func (l MockKVStore) Set(key, value []byte)
Set wraps the underlying DB's Set method panicing on error.
Click to show internal directories.
Click to hide internal directories.