Documentation ¶
Index ¶
- func Stor_k_1(parts ...[]byte) *common.Hash
- func Stor_k_2(parts ...[]byte) common.Hash
- type AddressesIMap
- type AddressesIMapReader
- func (self *AddressesIMapReader) AccountExists(account *common.Address) bool
- func (self *AddressesIMapReader) GetAccounts(batch uint32, count uint32) (result []common.Address, end bool)
- func (self *AddressesIMapReader) GetCount() (count uint32)
- func (self *AddressesIMapReader) Init(stor *StorageReaderWrapper, prefix []byte)
- type EVMStateStorage
- func (self EVMStateStorage) AddBalance(address *common.Address, b *big.Int)
- func (self EVMStateStorage) GetAccountStorage(address *common.Address, k *common.Hash, cb func([]byte))
- func (self EVMStateStorage) GetNonce(address *common.Address) *big.Int
- func (self EVMStateStorage) IncrementNonce(address *common.Address)
- func (self EVMStateStorage) Put(address *common.Address, k *common.Hash, v []byte)
- func (self EVMStateStorage) SubBalance(address *common.Address, b *big.Int) bool
- type IterableMap
- type IterableMapReader
- type Storage
- type StorageReader
- type StorageReaderWrapper
- func (self *StorageReaderWrapper) ClearCache()
- func (self *StorageReaderWrapper) Get(k *common.Hash, cb func([]byte))
- func (self *StorageReaderWrapper) Init(contract_address *common.Address, backend StorageReader) *StorageReaderWrapper
- func (self *StorageReaderWrapper) ListForEach(prefix []byte, cb func([]byte))
- func (self *StorageReaderWrapper) ListPrint(prefix []byte)
- type StorageWrapper
- func (self *StorageWrapper) Init(contract_address *common.Address, storage Storage) *StorageWrapper
- func (self *StorageWrapper) ListAppend(prefix []byte, val []byte) (pos uint64)
- func (self *StorageWrapper) ListRemove(prefix []byte, pos uint64) (last_element []byte)
- func (self *StorageWrapper) Put(k *common.Hash, v []byte)
- type StorageWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressesIMap ¶
type AddressesIMap struct { AddressesIMapReader // contains filtered or unexported fields }
AccountsIMap is a IterableMap wrapper for storing account addresses
func (*AddressesIMap) CreateAccount ¶
func (self *AddressesIMap) CreateAccount(account *common.Address) bool
Creates account from iterable map
func (*AddressesIMap) GetAllAccounts ¶
func (self *AddressesIMap) GetAllAccounts() []common.Address
func (*AddressesIMap) Init ¶
func (self *AddressesIMap) Init(stor *StorageWrapper, prefix []byte)
Inits iterable map with prefix, so multiple iterable maps can coexists thanks to different prefixes
func (*AddressesIMap) RemoveAccount ¶
func (self *AddressesIMap) RemoveAccount(account *common.Address) uint32
Removes account from iterable map, returns number of left accounts in the iterable map
type AddressesIMapReader ¶
type AddressesIMapReader struct {
// contains filtered or unexported fields
}
func (*AddressesIMapReader) AccountExists ¶
func (self *AddressesIMapReader) AccountExists(account *common.Address) bool
Checks is account exists in iterable map
func (*AddressesIMapReader) GetAccounts ¶
func (*AddressesIMapReader) GetCount ¶
func (self *AddressesIMapReader) GetCount() (count uint32)
Returns number of stored items
func (*AddressesIMapReader) Init ¶
func (self *AddressesIMapReader) Init(stor *StorageReaderWrapper, prefix []byte)
Inits iterable map with prefix, so multiple iterable maps can coexists thanks to different prefixes
type EVMStateStorage ¶
func (EVMStateStorage) AddBalance ¶
func (self EVMStateStorage) AddBalance(address *common.Address, b *big.Int)
func (EVMStateStorage) GetAccountStorage ¶
func (EVMStateStorage) GetNonce ¶
func (self EVMStateStorage) GetNonce(address *common.Address) *big.Int
func (EVMStateStorage) IncrementNonce ¶
func (self EVMStateStorage) IncrementNonce(address *common.Address)
func (EVMStateStorage) SubBalance ¶
type IterableMap ¶
type IterableMap struct { IterableMapReader // contains filtered or unexported fields }
IterableMap storage wrapper
func (*IterableMap) CreateItem ¶
func (self *IterableMap) CreateItem(item []byte) bool
Creates item from iterable map
func (*IterableMap) Init ¶
func (self *IterableMap) Init(stor *StorageWrapper, prefix []byte)
Inits iterable map with prefix, so multiple iterbale maps can coexists thanks to different prefixes
func (*IterableMap) RemoveItem ¶
func (self *IterableMap) RemoveItem(item []byte) uint32
Removes item from iterable map, returns number of left items in the iterbale map
type IterableMapReader ¶
type IterableMapReader struct {
// contains filtered or unexported fields
}
func (*IterableMapReader) GetCount ¶
func (self *IterableMapReader) GetCount() (count uint32)
Returns number of stored items
func (*IterableMapReader) GetItems ¶
func (self *IterableMapReader) GetItems(batch uint32, count uint32) (result [][]byte, end bool)
func (*IterableMapReader) Init ¶
func (self *IterableMapReader) Init(stor *StorageReaderWrapper, prefix []byte)
Inits iterable map with prefix, so multiple iterbale maps can coexists thanks to different prefixes
func (*IterableMapReader) ItemExists ¶
func (self *IterableMapReader) ItemExists(item []byte) bool
Checks is item exists in iterable map
type Storage ¶
type Storage interface { StorageReader StorageWriter }
type StorageReader ¶
type StorageReaderWrapper ¶
type StorageReaderWrapper struct { StorageReader // contains filtered or unexported fields }
func (*StorageReaderWrapper) ClearCache ¶
func (self *StorageReaderWrapper) ClearCache()
func (*StorageReaderWrapper) Get ¶
func (self *StorageReaderWrapper) Get(k *common.Hash, cb func([]byte))
func (*StorageReaderWrapper) Init ¶
func (self *StorageReaderWrapper) Init(contract_address *common.Address, backend StorageReader) *StorageReaderWrapper
func (*StorageReaderWrapper) ListForEach ¶
func (self *StorageReaderWrapper) ListForEach(prefix []byte, cb func([]byte))
func (*StorageReaderWrapper) ListPrint ¶
func (self *StorageReaderWrapper) ListPrint(prefix []byte)
debug-only
type StorageWrapper ¶
type StorageWrapper struct { StorageReaderWrapper StorageWriter // contains filtered or unexported fields }
func (*StorageWrapper) Init ¶
func (self *StorageWrapper) Init(contract_address *common.Address, storage Storage) *StorageWrapper
func (*StorageWrapper) ListAppend ¶
func (self *StorageWrapper) ListAppend(prefix []byte, val []byte) (pos uint64)
func (*StorageWrapper) ListRemove ¶
func (self *StorageWrapper) ListRemove(prefix []byte, pos uint64) (last_element []byte)