Documentation ¶
Index ¶
- func CreateAccountAndAddCredit(addr common.Address, owner types.PredicateBytes, balance *big.Int, ...) state.Action
- func SetBalance(id types.UnitID, value *big.Int) state.Action
- func UpdateEthAccountAddCredit(id types.UnitID, value *big.Int, timeout uint64, transactionRecordHash []byte) state.Action
- func UpdateEthAccountCloseCredit(id types.UnitID, value *big.Int, txHash []byte) state.Action
- type Account
- type AlphaBillLink
- type LogEntry
- type StateDB
- func (s *StateDB) AddAddressToAccessList(addr common.Address)
- func (s *StateDB) AddBalance(address common.Address, amount *big.Int)
- func (s *StateDB) AddLog(log *ethtypes.Log)
- func (s *StateDB) AddPreimage(_ common.Hash, _ []byte)
- func (s *StateDB) AddRefund(gas uint64)
- func (s *StateDB) AddSlotToAccessList(addr common.Address, slot common.Hash)
- func (s *StateDB) AddressInAccessList(addr common.Address) bool
- func (s *StateDB) CreateAccount(address common.Address)
- func (s *StateDB) DBError() error
- func (s *StateDB) Empty(address common.Address) bool
- func (s *StateDB) Exist(address common.Address) bool
- func (s *StateDB) Finalize() error
- func (s *StateDB) ForEachStorage(address common.Address, f func(common.Hash, common.Hash) bool) error
- func (s *StateDB) GetAlphaBillData(address common.Address) *AlphaBillLink
- func (s *StateDB) GetBalance(address common.Address) *big.Int
- func (s *StateDB) GetCode(address common.Address) []byte
- func (s *StateDB) GetCodeHash(address common.Address) common.Hash
- func (s *StateDB) GetCodeSize(address common.Address) int
- func (s *StateDB) GetCommittedState(address common.Address, key common.Hash) common.Hash
- func (s *StateDB) GetLogs() []*LogEntry
- func (s *StateDB) GetNonce(address common.Address) uint64
- func (s *StateDB) GetRefund() uint64
- func (s *StateDB) GetState(address common.Address, key common.Hash) common.Hash
- func (s *StateDB) GetTransientState(addr common.Address, key common.Hash) common.Hash
- func (s *StateDB) GetUpdatedUnits() []types.UnitID
- func (s *StateDB) HasSelfDestructed(address common.Address) bool
- func (s *StateDB) Prepare(rules params.Rules, sender, coinbase common.Address, dest *common.Address, ...)
- func (s *StateDB) RevertToSnapshot(i int)
- func (s *StateDB) SelfDestruct(address common.Address)
- func (s *StateDB) Selfdestruct6780(address common.Address)
- func (s *StateDB) SetAlphaBillData(address common.Address, fee *AlphaBillLink)
- func (s *StateDB) SetCode(address common.Address, code []byte)
- func (s *StateDB) SetNonce(address common.Address, nonce uint64)
- func (s *StateDB) SetState(address common.Address, key common.Hash, value common.Hash)
- func (s *StateDB) SetTransientState(addr common.Address, key, value common.Hash)
- func (s *StateDB) SlotInAccessList(addr common.Address, slot common.Hash) (addressPresent bool, slotPresent bool)
- func (s *StateDB) Snapshot() int
- func (s *StateDB) SubBalance(address common.Address, amount *big.Int)
- func (s *StateDB) SubRefund(gas uint64)
- type StateObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccountAndAddCredit ¶
func CreateAccountAndAddCredit(addr common.Address, owner types.PredicateBytes, balance *big.Int, timeout uint64, transactionRecordHash []byte) state.Action
CreateAccountAndAddCredit - creates EMV account from add fee credit
func SetBalance ¶
SetBalance - set balance to value
Types ¶
type Account ¶
type Account struct { Balance *big.Int CodeHash []byte Code []byte Nonce uint64 // contains filtered or unexported fields }
Account represents an account in Ethereum.
type AlphaBillLink ¶
type AlphaBillLink struct { TxHash []byte Timeout uint64 // contains filtered or unexported fields }
AlphaBillLink links Account to AB FCR bill
func (*AlphaBillLink) Copy ¶
func (f *AlphaBillLink) Copy() *AlphaBillLink
func (*AlphaBillLink) GetTimeout ¶
func (f *AlphaBillLink) GetTimeout() uint64
type StateDB ¶
type StateDB struct {
// contains filtered or unexported fields
}
func (*StateDB) AddAddressToAccessList ¶
AddAddressToAccessList adds the given address to the access list
func (*StateDB) AddSlotToAccessList ¶
AddSlotToAccessList adds the given (address, slot)-tuple to the access list
func (*StateDB) AddressInAccessList ¶
AddressInAccessList returns true if the given address is in the access list.
func (*StateDB) CreateAccount ¶
func (*StateDB) ForEachStorage ¶
func (*StateDB) GetAlphaBillData ¶
func (s *StateDB) GetAlphaBillData(address common.Address) *AlphaBillLink
func (*StateDB) GetCommittedState ¶
func (*StateDB) GetTransientState ¶
GetTransientState gets transient storage for a given account.
func (*StateDB) GetUpdatedUnits ¶
GetUpdatedUnits returns updated UnitID's since last Finalize call
func (*StateDB) HasSelfDestructed ¶
func (*StateDB) Prepare ¶
func (s *StateDB) Prepare(rules params.Rules, sender, coinbase common.Address, dest *common.Address, precompiles []common.Address, txAccesses ethtypes.AccessList)
Prepare handles the preparatory steps for executing a state transition with. This method must be invoked before state transition.
Berlin fork: - Add sender to access list (2929) - Add destination to access list (2929) - Add precompiles to access list (2929) - Add the contents of the optional tx access list (2930)
Potential EIPs: - Reset access list (Berlin) - Add coinbase to access list (EIP-3651) - Reset transient storage (EIP-1153)
func (*StateDB) RevertToSnapshot ¶
func (*StateDB) SelfDestruct ¶
func (*StateDB) Selfdestruct6780 ¶
Selfdestruct6780 - EIP-6780 changes the functionality of the SELFDESTRUCT opcode. The new functionality will be only to send all Ether in the account to the caller, except that the current behaviour is preserved when SELFDESTRUCT is called in the same transaction a contract was created.
func (*StateDB) SetAlphaBillData ¶
func (s *StateDB) SetAlphaBillData(address common.Address, fee *AlphaBillLink)
func (*StateDB) SetTransientState ¶
SetTransientState sets transient storage for a given account. It adds the change to the journal so that it can be rolled back to its previous value if there is a revert. (for more see https://eips.ethereum.org/EIPS/eip-6780)
type StateObject ¶
type StateObject struct { Address common.Address Account *Account Storage state.Storage AlphaBill *AlphaBillLink Suicided bool // contains filtered or unexported fields }
func (*StateObject) Copy ¶
func (s *StateObject) Copy() abstate.UnitData
func (*StateObject) SummaryValueInput ¶
func (s *StateObject) SummaryValueInput() uint64