Documentation
¶
Index ¶
- func MergeResultCache(src *ResultCache, to *ResultCache)
- type BalanceCache
- type Cache
- type CacheUnderNamespace
- type CodeCache
- type IExternalStorage
- type Log
- type LogCache
- type ResultCache
- func (r *ResultCache) XCachedLoad(namespace string, key string, t TypeOfStorage) *evmInt256.Int
- func (r *ResultCache) XCachedStore(namespace string, key string, v *evmInt256.Int, t TypeOfStorage)
- func (r *ResultCache) XOriginalLoad(namespace string, key string, t TypeOfStorage) *evmInt256.Int
- func (r *ResultCache) XOriginalStore(namespace string, key string, v *evmInt256.Int, t TypeOfStorage)
- type Storage
- func (s *Storage) Balance(address *evmInt256.Int) (*evmInt256.Int, error)
- func (s *Storage) BalanceModify(address *evmInt256.Int, value *evmInt256.Int, neg bool)
- func (s *Storage) CanTransfer(from *evmInt256.Int, to *evmInt256.Int, amount *evmInt256.Int) bool
- func (s *Storage) Destruct(address *evmInt256.Int)
- func (s *Storage) GetBlockHash(block *evmInt256.Int) (*evmInt256.Int, error)
- func (s *Storage) GetCode(address *evmInt256.Int) ([]byte, error)
- func (s *Storage) GetCodeHash(address *evmInt256.Int) (*evmInt256.Int, error)
- func (s *Storage) GetCodeSize(address *evmInt256.Int) (*evmInt256.Int, error)
- func (s *Storage) Log(address *evmInt256.Int, topics [][]byte, data []byte, ...)
- func (s *Storage) NewContract(address *evmInt256.Int, code []byte) error
- func (s *Storage) XLoad(n *evmInt256.Int, k *evmInt256.Int, t TypeOfStorage) (*evmInt256.Int, error)
- func (s *Storage) XStore(n *evmInt256.Int, k *evmInt256.Int, v *evmInt256.Int, t TypeOfStorage)
- type TypeOfStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeResultCache ¶
func MergeResultCache(src *ResultCache, to *ResultCache)
Types ¶
type BalanceCache ¶
type BalanceCache map[string]*balance
type CacheUnderNamespace ¶
type IExternalStorage ¶
type IExternalStorage interface { GetBalance(address *evmInt256.Int) (*evmInt256.Int, error) GetCode(address *evmInt256.Int) ([]byte, error) GetCodeSize(address *evmInt256.Int) (*evmInt256.Int, error) GetCodeHash(address *evmInt256.Int) (*evmInt256.Int, error) GetBlockHash(block *evmInt256.Int) (*evmInt256.Int, error) CreateAddress(caller *evmInt256.Int, tx environment.Transaction) *evmInt256.Int CreateFixedAddress(caller *evmInt256.Int, salt *evmInt256.Int, tx environment.Transaction) *evmInt256.Int CanTransfer(from *evmInt256.Int, to *evmInt256.Int, amount *evmInt256.Int) bool Load(n string, k string) (*evmInt256.Int, error) TLoad(n string, k string) (*evmInt256.Int, error) NewContract(n string, code []byte) error }
type ResultCache ¶
type ResultCache struct { OriginalData CacheUnderNamespace CachedData CacheUnderNamespace TOriginalData CacheUnderNamespace TCachedData CacheUnderNamespace Balance BalanceCache Logs LogCache Destructs Cache }
func (*ResultCache) XCachedLoad ¶ added in v0.2.0
func (r *ResultCache) XCachedLoad(namespace string, key string, t TypeOfStorage) *evmInt256.Int
func (*ResultCache) XCachedStore ¶ added in v0.2.0
func (r *ResultCache) XCachedStore(namespace string, key string, v *evmInt256.Int, t TypeOfStorage)
func (*ResultCache) XOriginalLoad ¶ added in v0.2.0
func (r *ResultCache) XOriginalLoad(namespace string, key string, t TypeOfStorage) *evmInt256.Int
func (*ResultCache) XOriginalStore ¶ added in v0.2.0
func (r *ResultCache) XOriginalStore(namespace string, key string, v *evmInt256.Int, t TypeOfStorage)
type Storage ¶
type Storage struct { ResultCache ResultCache ExternalStorage IExternalStorage // contains filtered or unexported fields }
func New ¶
func New(extStorage IExternalStorage) *Storage
func (*Storage) BalanceModify ¶
func (*Storage) CanTransfer ¶
func (*Storage) GetBlockHash ¶
func (*Storage) GetCodeHash ¶
func (*Storage) GetCodeSize ¶
func (*Storage) NewContract ¶
type TypeOfStorage ¶ added in v0.2.0
type TypeOfStorage int
const ( SStorage TypeOfStorage = 1 TStorage TypeOfStorage = 2 )
Click to show internal directories.
Click to hide internal directories.