Documentation ¶
Index ¶
- func IsGasLimitErr(err error) bool
- type Account
- type Code
- type GasLimitErr
- type Log
- type Logs
- type StateDB
- func (self *StateDB) AddBalance(addr []byte, amount *big.Int)
- func (self *StateDB) AddLog(log Log)
- func (s *StateDB) Cmp(other *StateDB) bool
- func (self *StateDB) Copy() *StateDB
- func (self *StateDB) CreateOutputForDiff()
- func (self *StateDB) Delete(addr []byte) bool
- func (self *StateDB) DeleteStateObject(stateObject *StateObject)
- func (self *StateDB) Dump() []byte
- func (self *StateDB) Empty()
- func (self *StateDB) EmptyLogs()
- func (self *StateDB) GetAccount(addr []byte) *StateObject
- func (self *StateDB) GetBalance(addr []byte) *big.Int
- func (self *StateDB) GetCode(addr []byte) []byte
- func (self *StateDB) GetNonce(addr []byte) uint64
- func (self *StateDB) GetOrNewStateObject(addr []byte) *StateObject
- func (self *StateDB) GetState(a, b []byte) []byte
- func (self *StateDB) GetStateObject(addr []byte) *StateObject
- func (self *StateDB) Logs() Logs
- func (self *StateDB) NewStateObject(addr []byte) *StateObject
- func (self *StateDB) Refund(addr []byte, gas *big.Int)
- func (self *StateDB) Refunds() map[string]*big.Int
- func (s *StateDB) Reset()
- func (s *StateDB) Root() []byte
- func (self *StateDB) Set(state *StateDB)
- func (self *StateDB) SetCode(addr, code []byte)
- func (self *StateDB) SetNonce(addr []byte, nonce uint64)
- func (self *StateDB) SetState(addr, key []byte, value interface{})
- func (self *StateDB) SetStateObject(object *StateObject)
- func (s *StateDB) Sync()
- func (self *StateDB) Update(gasUsed *big.Int)
- func (self *StateDB) UpdateStateObject(stateObject *StateObject)
- type StateLog
- type StateObject
- func (c *StateObject) AddAmount(amount *big.Int)
- func (c *StateObject) AddBalance(amount *big.Int)
- func (c *StateObject) Address() []byte
- func (self *StateObject) Balance() *big.Int
- func (self *StateObject) BuyGas(gas, price *big.Int) error
- func (self *StateObject) Code() []byte
- func (c *StateObject) CodeHash() ethutil.Bytes
- func (c *StateObject) ConvertGas(gas, price *big.Int) error
- func (self *StateObject) Copy() *StateObject
- func (self *StateObject) CreateOutputForDiff()
- func (c *StateObject) GetInstr(pc *big.Int) *ethutil.Value
- func (self *StateObject) GetState(k []byte) *ethutil.Value
- func (self *StateObject) GetStorage(key *big.Int) *ethutil.Value
- func (c *StateObject) Init() Code
- func (self *StateObject) MarkForDeletion()
- func (c *StateObject) N() *big.Int
- func (self *StateObject) Nonce() uint64
- func (self *StateObject) RefundGas(gas, price *big.Int)
- func (self *StateObject) Reset()
- func (c *StateObject) ReturnGas(gas, price *big.Int)
- func (c *StateObject) RlpDecode(data []byte)
- func (c *StateObject) RlpEncode() []byte
- func (self *StateObject) Root() []byte
- func (self *StateObject) Set(stateObject *StateObject)
- func (c *StateObject) SetBalance(amount *big.Int)
- func (self *StateObject) SetCode(code []byte)
- func (self *StateObject) SetGasPool(gasLimit *big.Int)
- func (self *StateObject) SetInitCode(code []byte)
- func (self *StateObject) SetNonce(nonce uint64)
- func (self *StateObject) SetState(k []byte, value *ethutil.Value)
- func (self *StateObject) SetStorage(key *big.Int, value *ethutil.Value)
- func (self *StateObject) Storage() map[string]*ethutil.Value
- func (c *StateObject) SubAmount(amount *big.Int)
- func (c *StateObject) SubBalance(amount *big.Int)
- func (self *StateObject) Sync()
- func (self *StateObject) Trie() *trie.Trie
- type Storage
- type StorageState
- type World
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGasLimitErr ¶
Types ¶
type GasLimitErr ¶
func GasLimitError ¶
func GasLimitError(is, max *big.Int) *GasLimitErr
func (*GasLimitErr) Error ¶
func (err *GasLimitErr) Error() string
type StateDB ¶
type StateDB struct {
// contains filtered or unexported fields
}
StateDBs within the ethereum protocol are used to store anything within the merkle trie. StateDBs take care of caching and storing nested states. It's the general query interface to retrieve: * Contracts * Accounts
func (*StateDB) DeleteStateObject ¶
func (self *StateDB) DeleteStateObject(stateObject *StateObject)
Delete the given state object and delete it from the state trie
func (*StateDB) GetBalance ¶
Retrieve the balance from the given address or 0 if object not found
func (*StateDB) GetOrNewStateObject ¶
func (self *StateDB) GetOrNewStateObject(addr []byte) *StateObject
Retrieve a state object or create a new state object if nil
func (*StateDB) GetStateObject ¶
func (self *StateDB) GetStateObject(addr []byte) *StateObject
Retrieve a state object given my the address. Nil if not found
func (*StateDB) NewStateObject ¶
func (self *StateDB) NewStateObject(addr []byte) *StateObject
Create a state object whether it exist in the trie or not
func (*StateDB) SetStateObject ¶
func (self *StateDB) SetStateObject(object *StateObject)
func (*StateDB) UpdateStateObject ¶
func (self *StateDB) UpdateStateObject(stateObject *StateObject)
Update the given state object and apply it to state trie
type StateLog ¶
type StateLog struct {
// contains filtered or unexported fields
}
func NewLogFromValue ¶
type StateObject ¶
type StateObject struct { // Contract related attributes State *StateDB // contains filtered or unexported fields }
func NewStateObject ¶
func NewStateObject(addr []byte, db ethutil.Database) *StateObject
func NewStateObjectFromBytes ¶
func NewStateObjectFromBytes(address, data []byte, db ethutil.Database) *StateObject
func (*StateObject) AddAmount ¶
func (c *StateObject) AddAmount(amount *big.Int)
func (*StateObject) AddBalance ¶
func (c *StateObject) AddBalance(amount *big.Int)
func (*StateObject) Address ¶
func (c *StateObject) Address() []byte
Returns the address of the contract/account
func (*StateObject) Balance ¶
func (self *StateObject) Balance() *big.Int
func (*StateObject) Code ¶
func (self *StateObject) Code() []byte
func (*StateObject) CodeHash ¶
func (c *StateObject) CodeHash() ethutil.Bytes
func (*StateObject) ConvertGas ¶
func (c *StateObject) ConvertGas(gas, price *big.Int) error
func (*StateObject) Copy ¶
func (self *StateObject) Copy() *StateObject
func (*StateObject) CreateOutputForDiff ¶
func (self *StateObject) CreateOutputForDiff()
Debug stuff
func (*StateObject) GetStorage ¶
func (self *StateObject) GetStorage(key *big.Int) *ethutil.Value
func (*StateObject) MarkForDeletion ¶
func (self *StateObject) MarkForDeletion()
func (*StateObject) N ¶
func (c *StateObject) N() *big.Int
func (*StateObject) Nonce ¶
func (self *StateObject) Nonce() uint64
func (*StateObject) RefundGas ¶
func (self *StateObject) RefundGas(gas, price *big.Int)
func (*StateObject) Reset ¶
func (self *StateObject) Reset()
func (*StateObject) ReturnGas ¶
func (c *StateObject) ReturnGas(gas, price *big.Int)
Return the gas back to the origin. Used by the Virtual machine or Closures
func (*StateObject) RlpDecode ¶
func (c *StateObject) RlpDecode(data []byte)
func (*StateObject) RlpEncode ¶
func (c *StateObject) RlpEncode() []byte
State object encoding methods
func (*StateObject) Root ¶
func (self *StateObject) Root() []byte
func (*StateObject) Set ¶
func (self *StateObject) Set(stateObject *StateObject)
func (*StateObject) SetBalance ¶
func (c *StateObject) SetBalance(amount *big.Int)
func (*StateObject) SetCode ¶
func (self *StateObject) SetCode(code []byte)
func (*StateObject) SetGasPool ¶
func (self *StateObject) SetGasPool(gasLimit *big.Int)
func (*StateObject) SetInitCode ¶ added in v0.8.4
func (self *StateObject) SetInitCode(code []byte)
func (*StateObject) SetNonce ¶ added in v0.8.4
func (self *StateObject) SetNonce(nonce uint64)
func (*StateObject) SetStorage ¶
func (self *StateObject) SetStorage(key *big.Int, value *ethutil.Value)
func (*StateObject) SubAmount ¶
func (c *StateObject) SubAmount(amount *big.Int)
func (*StateObject) SubBalance ¶
func (c *StateObject) SubBalance(amount *big.Int)
func (*StateObject) Sync ¶
func (self *StateObject) Sync()
func (*StateObject) Trie ¶ added in v0.8.4
func (self *StateObject) Trie() *trie.Trie
type StorageState ¶
Storage change object. Used by the manifest for notifying changes to the sub channels.