Documentation
¶
Index ¶
- func MergeResultCache(src *ResultCache, to *ResultCache)
- type BalanceCache
- type Cache
- type CacheUnderAddress
- type CodeCache
- type ContractStorage
- func (c *ContractStorage) CanTransfer(from, to, val *evmutils.Int) bool
- func (c *ContractStorage) CreateAddress(caller *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int
- func (c *ContractStorage) CreateFixedAddress(caller *evmutils.Int, salt *evmutils.Int, tx environment.Transaction, ...) *evmutils.Int
- func (c *ContractStorage) GetBalance(address *evmutils.Int) (*evmutils.Int, error)
- func (c *ContractStorage) GetBlockHash(block *evmutils.Int) (*evmutils.Int, error)
- func (c *ContractStorage) GetCode(address *evmutils.Int) (code []byte, err error)
- func (c *ContractStorage) GetCodeHash(address *evmutils.Int) (codeHase *evmutils.Int, err error)
- func (c *ContractStorage) GetCodeSize(address *evmutils.Int) (size *evmutils.Int, err error)
- func (c *ContractStorage) Load(n string, k string) (*evmutils.Int, error)
- func (c ContractStorage) Store(address string, key string, val []byte)
- type IExternalStorage
- type Log
- type LogCache
- type ResultCache
- type Storage
- func (s *Storage) Balance(address *evmutils.Int) (*evmutils.Int, error)
- func (s *Storage) BalanceModify(address *evmutils.Int, value *evmutils.Int, neg bool)
- func (s *Storage) CreateAddress(caller *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int
- func (s *Storage) CreateFixedAddress(caller *evmutils.Int, salt *evmutils.Int, tx environment.Transaction, ...) *evmutils.Int
- func (s *Storage) Destruct(address *evmutils.Int)
- func (s *Storage) GetBlockHash(block *evmutils.Int) (*evmutils.Int, error)
- func (s *Storage) GetCode(address *evmutils.Int) ([]byte, error)
- func (s *Storage) GetCodeHash(address *evmutils.Int) (*evmutils.Int, error)
- func (s *Storage) GetCodeSize(address *evmutils.Int) (*evmutils.Int, error)
- func (s *Storage) Log(address *evmutils.Int, topics [][]byte, data []byte, ...)
- func (s *Storage) SLoad(n *evmutils.Int, k *evmutils.Int) (*evmutils.Int, error)
- func (s *Storage) SStore(n *evmutils.Int, k *evmutils.Int, v *evmutils.Int)
- func (s *Storage) SetCode(address *evmutils.Int, code []byte)
- func (s *Storage) SetCodeHash(address *evmutils.Int, codeHash *evmutils.Int)
- func (s *Storage) SetCodeSize(address *evmutils.Int, size *evmutils.Int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeResultCache ¶
func MergeResultCache(src *ResultCache, to *ResultCache)
Types ¶
type CacheUnderAddress ¶
type ContractStorage ¶
type ContractStorage struct { ResultCache ResultCache ExternalStorage IExternalStorage Ctx protocol.TxSimContext BlockHash *evmutils.Int // contains filtered or unexported fields }
func NewStorage ¶
func NewStorage(extStorage IExternalStorage) *ContractStorage
func (*ContractStorage) CanTransfer ¶
func (c *ContractStorage) CanTransfer(from, to, val *evmutils.Int) bool
func (*ContractStorage) CreateAddress ¶
func (c *ContractStorage) CreateAddress(caller *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int
func (*ContractStorage) CreateFixedAddress ¶
func (c *ContractStorage) CreateFixedAddress(caller *evmutils.Int, salt *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int
func (*ContractStorage) GetBalance ¶
func (*ContractStorage) GetBlockHash ¶
func (*ContractStorage) GetCode ¶
func (c *ContractStorage) GetCode(address *evmutils.Int) (code []byte, err error)
func (*ContractStorage) GetCodeHash ¶
func (*ContractStorage) GetCodeSize ¶
func (*ContractStorage) Load ¶
func (ContractStorage) Store ¶
func (c ContractStorage) Store(address string, key string, val []byte)
type IExternalStorage ¶
type IExternalStorage interface { GetBalance(address *evmutils.Int) (*evmutils.Int, error) GetCode(address *evmutils.Int) ([]byte, error) GetCodeSize(address *evmutils.Int) (*evmutils.Int, error) GetCodeHash(address *evmutils.Int) (*evmutils.Int, error) GetBlockHash(block *evmutils.Int) (*evmutils.Int, error) CreateAddress(caller *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int CreateFixedAddress(caller *evmutils.Int, salt *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int CanTransfer(from *evmutils.Int, to *evmutils.Int, amount *evmutils.Int) bool Load(n string, k string) (*evmutils.Int, error) Store(address string, key string, val []byte) }
Teh External Storage,provding a Storage for touching out of current evm
type Log ¶
type Log struct { Topics [][]byte Data []byte Context environment.Context }
type ResultCache ¶
type ResultCache struct { //OriginalData CacheUnderAddress CachedData CacheUnderAddress Balance BalanceCache Logs LogCache Destructs Cache }
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) CreateAddress ¶
func (s *Storage) CreateAddress(caller *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int
func (*Storage) CreateFixedAddress ¶
func (s *Storage) CreateFixedAddress(caller *evmutils.Int, salt *evmutils.Int, tx environment.Transaction, addrType int32) *evmutils.Int
func (*Storage) GetBlockHash ¶
func (*Storage) GetCodeHash ¶
func (*Storage) GetCodeSize ¶
func (*Storage) Log ¶
func (*Storage) SLoad ¶
func (*Storage) SStore ¶
func (*Storage) SetCodeHash ¶
Click to show internal directories.
Click to hide internal directories.