Documentation
¶
Index ¶
- type IExternalStorage
- type Storage
- func (s *Storage) AccountWithoutCache(addr types.Address) (*environment.Account, error)
- func (s *Storage) Balance(address types.Address) (*evmInt256.Int, error)
- func (s *Storage) CacheAccount(acc *environment.Account, newContract bool)
- func (s *Storage) CachedContract(addr types.Address) bool
- func (s *Storage) CachedData(addr types.Address, slot types.Slot) (org *evmInt256.Int, current *evmInt256.Int)
- func (s *Storage) CanTransfer(from types.Address, to types.Address, amount *evmInt256.Int) bool
- func (s *Storage) ClearCache()
- func (s *Storage) Clone() *Storage
- func (s *Storage) ContractEmpty(addr types.Address) bool
- func (s *Storage) ContractExist(addr types.Address) bool
- func (s *Storage) CreateAddress(caller types.Address, tx environment.Transaction) types.Address
- func (s *Storage) CreateFixedAddress(caller types.Address, salt types.Hash, code []byte, tx environment.Transaction) types.Address
- func (s *Storage) Destruct(address types.Address)
- func (s *Storage) GetAccount(address types.Address) (*environment.Account, error)
- func (s *Storage) GetBlockHash(block *evmInt256.Int) (*evmInt256.Int, error)
- func (s *Storage) GetCode(address types.Address) ([]byte, error)
- func (s *Storage) GetCodeHash(address types.Address) (*types.Hash, error)
- func (s *Storage) GetCodeSize(address types.Address) (*evmInt256.Int, error)
- func (s *Storage) GetExternalStorage() IExternalStorage
- func (s *Storage) HashOfCode(code []byte) types.Hash
- func (s *Storage) Log(log *types.Log)
- func (s *Storage) RemoveCachedAccount(addr types.Address)
- func (s *Storage) Transfer(fromAddr types.Address, toAddr types.Address, val *evmInt256.Int) error
- func (s *Storage) UpdateAccountContract(address types.Address, code []byte)
- func (s *Storage) XLoad(address types.Address, slot types.Slot, t cache.TypeOfStorage) (*evmInt256.Int, error)
- func (s *Storage) XStore(address types.Address, slot types.Slot, val *evmInt256.Int, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IExternalStorage ¶
type IExternalStorage interface { GetBlockHash(block *evmInt256.Int) (*evmInt256.Int, error) GetAccount(address types.Address) (*environment.Account, error) AccountExist(address types.Address) bool AccountEmpty(address types.Address) bool HashOfCode(code []byte) types.Hash CreateAddress(caller types.Address, tx environment.Transaction) types.Address CreateFixedAddress(caller types.Address, salt types.Hash, code []byte, tx environment.Transaction) types.Address Load(address types.Address, slot types.Slot) (*evmInt256.Int, error) }
type Storage ¶
type Storage struct { ResultCache cache.ResultCache // contains filtered or unexported fields }
func New ¶
func New(extStorage IExternalStorage) *Storage
func (*Storage) AccountWithoutCache ¶ added in v0.5.1
func (*Storage) CacheAccount ¶ added in v0.5.0
func (s *Storage) CacheAccount(acc *environment.Account, newContract bool)
func (*Storage) CachedContract ¶ added in v0.4.1
func (*Storage) CachedData ¶ added in v0.4.1
func (*Storage) CanTransfer ¶
func (*Storage) ClearCache ¶ added in v0.2.2
func (s *Storage) ClearCache()
func (*Storage) ContractEmpty ¶ added in v0.4.1
func (*Storage) ContractExist ¶ added in v0.4.1
func (*Storage) CreateAddress ¶ added in v0.2.2
func (s *Storage) CreateAddress(caller types.Address, tx environment.Transaction) types.Address
func (*Storage) CreateFixedAddress ¶ added in v0.2.2
func (s *Storage) CreateFixedAddress(caller types.Address, salt types.Hash, code []byte, tx environment.Transaction) types.Address
func (*Storage) GetAccount ¶ added in v0.5.0
func (*Storage) GetBlockHash ¶
func (*Storage) GetCodeHash ¶
func (*Storage) GetCodeSize ¶
func (*Storage) GetExternalStorage ¶ added in v0.2.2
func (s *Storage) GetExternalStorage() IExternalStorage
func (*Storage) RemoveCachedAccount ¶ added in v0.5.0
func (*Storage) UpdateAccountContract ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.