Documentation ¶
Overview ¶
This is a go binding for SputnikVM, an Ethereum Virtual Machine.
Copyright (c) ETC Dev Team 2017. Licensed under Apache-2.0. Authored by Wei Tang <hi@that.world>
Index ¶
- Constants
- func FromCAddress(v C.sputnikvm_address) common.Address
- func FromCGas(v C.sputnikvm_gas) *big.Int
- func FromCH256(v C.sputnikvm_h256) common.Hash
- func FromCU256(v C.sputnikvm_u256) *big.Int
- func PrintCU256(v C.sputnikvm_u256)
- func SetCustomInitialNonce(nonce *big.Int)
- func ToCAddress(v common.Address) C.sputnikvm_address
- func ToCGas(v *big.Int) C.sputnikvm_gas
- func ToCH256(v common.Hash) C.sputnikvm_h256
- func ToCHeaderParams(header *HeaderParams) *C.sputnikvm_header_params
- func ToCU256(v *big.Int) C.sputnikvm_u256
- type AccountChange
- func (change *AccountChange) Address() common.Address
- func (change *AccountChange) Balance() *big.Int
- func (change *AccountChange) ChangedAmount() *big.Int
- func (change *AccountChange) ChangedStorage() []AccountChangeStorageItem
- func (change *AccountChange) Code() []byte
- func (change *AccountChange) Nonce() *big.Int
- func (change *AccountChange) Storage() []AccountChangeStorageItem
- func (change *AccountChange) Typ() AccountChangeType
- type AccountChangeStorageItem
- type AccountChangeType
- type HeaderParams
- type Log
- type Require
- type RequireType
- type Transaction
- type VM
- func NewCustomEIP150(transaction *Transaction, header *HeaderParams) *VM
- func NewCustomEIP160(transaction *Transaction, header *HeaderParams) *VM
- func NewCustomFrontier(transaction *Transaction, header *HeaderParams) *VM
- func NewCustomHomestead(transaction *Transaction, header *HeaderParams) *VM
- func NewEIP150(transaction *Transaction, header *HeaderParams) *VM
- func NewEIP160(transaction *Transaction, header *HeaderParams) *VM
- func NewFrontier(transaction *Transaction, header *HeaderParams) *VM
- func NewGallactic(transaction *Transaction, header *HeaderParams) *VM
- func NewHomestead(transaction *Transaction, header *HeaderParams) *VM
- func NewModernEIP150(transaction *Transaction, header *HeaderParams) *VM
- func NewModernEIP160(transaction *Transaction, header *HeaderParams) *VM
- func NewModernFrontier(transaction *Transaction, header *HeaderParams) *VM
- func NewModernHomestead(transaction *Transaction, header *HeaderParams) *VM
- func (vm *VM) AccountChanges() []AccountChange
- func (vm *VM) CommitAccount(address common.Address, nonce *big.Int, balance *big.Int, code []byte)
- func (vm *VM) CommitAccountCode(address common.Address, code []byte)
- func (vm *VM) CommitAccountStorage(address common.Address, key *big.Int, value *big.Int)
- func (vm *VM) CommitBlockhash(number *big.Int, hash common.Hash)
- func (vm *VM) CommitNonexist(address common.Address)
- func (vm *VM) Failed() bool
- func (vm *VM) Fire() Require
- func (vm *VM) Free()
- func (vm *VM) Logs() []Log
- func (vm *VM) OutLen() uint
- func (vm *VM) Output() []uint8
- func (vm *VM) UsedGas() *big.Int
Constants ¶
View Source
const ( AccountChangeIncreaseBalance = iota AccountChangeDecreaseBalance AccountChangeFull AccountChangeCreate AccountChangeRemoved )
View Source
const ( RequireNone = iota RequireAccount RequireAccountCode RequireAccountStorage RequireBlockhash )
Variables ¶
This section is empty.
Functions ¶
func FromCAddress ¶
func FromCAddress(v C.sputnikvm_address) common.Address
func PrintCU256 ¶
func PrintCU256(v C.sputnikvm_u256)
func SetCustomInitialNonce ¶
func ToCAddress ¶
func ToCAddress(v common.Address) C.sputnikvm_address
func ToCHeaderParams ¶
func ToCHeaderParams(header *HeaderParams) *C.sputnikvm_header_params
Types ¶
type AccountChange ¶
type AccountChange struct {
// contains filtered or unexported fields
}
func (*AccountChange) Address ¶
func (change *AccountChange) Address() common.Address
func (*AccountChange) Balance ¶
func (change *AccountChange) Balance() *big.Int
func (*AccountChange) ChangedAmount ¶
func (change *AccountChange) ChangedAmount() *big.Int
func (*AccountChange) ChangedStorage ¶
func (change *AccountChange) ChangedStorage() []AccountChangeStorageItem
func (*AccountChange) Code ¶
func (change *AccountChange) Code() []byte
func (*AccountChange) Nonce ¶
func (change *AccountChange) Nonce() *big.Int
func (*AccountChange) Storage ¶
func (change *AccountChange) Storage() []AccountChangeStorageItem
func (*AccountChange) Typ ¶
func (change *AccountChange) Typ() AccountChangeType
type AccountChangeType ¶
type AccountChangeType int
type HeaderParams ¶
type Require ¶
type Require struct {
// contains filtered or unexported fields
}
func (*Require) BlockNumber ¶
func (*Require) StorageKey ¶
func (*Require) Typ ¶
func (require *Require) Typ() RequireType
type RequireType ¶
type RequireType int
type Transaction ¶
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func NewCustomEIP150 ¶
func NewCustomEIP150(transaction *Transaction, header *HeaderParams) *VM
func NewCustomEIP160 ¶
func NewCustomEIP160(transaction *Transaction, header *HeaderParams) *VM
func NewCustomFrontier ¶
func NewCustomFrontier(transaction *Transaction, header *HeaderParams) *VM
func NewCustomHomestead ¶
func NewCustomHomestead(transaction *Transaction, header *HeaderParams) *VM
func NewEIP150 ¶
func NewEIP150(transaction *Transaction, header *HeaderParams) *VM
func NewEIP160 ¶
func NewEIP160(transaction *Transaction, header *HeaderParams) *VM
func NewFrontier ¶
func NewFrontier(transaction *Transaction, header *HeaderParams) *VM
func NewGallactic ¶
func NewGallactic(transaction *Transaction, header *HeaderParams) *VM
func NewHomestead ¶
func NewHomestead(transaction *Transaction, header *HeaderParams) *VM
func NewModernEIP150 ¶
func NewModernEIP150(transaction *Transaction, header *HeaderParams) *VM
func NewModernEIP160 ¶
func NewModernEIP160(transaction *Transaction, header *HeaderParams) *VM
func NewModernFrontier ¶
func NewModernFrontier(transaction *Transaction, header *HeaderParams) *VM
func NewModernHomestead ¶
func NewModernHomestead(transaction *Transaction, header *HeaderParams) *VM
func (*VM) AccountChanges ¶
func (vm *VM) AccountChanges() []AccountChange
func (*VM) CommitAccount ¶
func (*VM) CommitAccountStorage ¶
func (*VM) CommitNonexist ¶
Click to show internal directories.
Click to hide internal directories.