Documentation
¶
Index ¶
- Variables
- func AddressStoragePrefix(address ethcmn.Address) []byte
- func HeightHashKey(height uint64) []byte
- type ContractStore
- func (cs *ContractStore) Delete(prefix []byte, key []byte) (bool, error)
- func (cs *ContractStore) Get(prefix []byte, key []byte) ([]byte, error)
- func (cs *ContractStore) GetStoreKey(prefix []byte, key []byte) storage.StoreKey
- func (cs *ContractStore) Iterate(prefix []byte, fn func(key []byte, value []byte) bool) (stop bool)
- func (cs *ContractStore) Set(prefix []byte, key []byte, value []byte) error
- func (cs *ContractStore) WithState(state *storage.State) *ContractStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KeyPrefixCode = []byte{0x01} KeyPrefixStorage = []byte{0x02} KeyPrefixHeightHash = []byte{0x03} KeyPrefixLogs = []byte{0x04} )
Functions ¶
func AddressStoragePrefix ¶
AddressStoragePrefix returns a prefix to iterate over a given account storage.
func HeightHashKey ¶
HeightHashKey returns the key for the given chain epoch and height. The key will be composed in the following order:
key = prefix + bytes(height)
This ordering facilitates the iteration by height for the EVM GetHashFn queries.
Types ¶
type ContractStore ¶
func NewContractStore ¶
func NewContractStore(state *storage.State) *ContractStore
func (*ContractStore) Delete ¶
func (cs *ContractStore) Delete(prefix []byte, key []byte) (bool, error)
func (*ContractStore) GetStoreKey ¶
func (cs *ContractStore) GetStoreKey(prefix []byte, key []byte) storage.StoreKey
func (*ContractStore) Set ¶
func (cs *ContractStore) Set(prefix []byte, key []byte, value []byte) error
func (*ContractStore) WithState ¶
func (cs *ContractStore) WithState(state *storage.State) *ContractStore
Click to show internal directories.
Click to hide internal directories.