Documentation
¶
Index ¶
- Constants
- Variables
- func Execute(currentBlockNumber uint64, stateDB *statedb.StateDB, ...) (*types.ServerMetadata, error)
- type FeeAccount
- type FeeCalculator
- type Module
- type Option
- func WithBlockDB(blockDB keyvaluedb.KeyValueDB) Option
- func WithBlockGasLimit(limit uint64) Option
- func WithGasPrice(gasPrice uint64) Option
- func WithHashAlgorithm(algorithm gocrypto.Hash) Option
- func WithInitialAddressAndBalance(address []byte, balance *big.Int) Option
- func WithMoneyTXSystemIdentifier(moneyTxSystemID []byte) Option
- func WithState(s *state.State) Option
- func WithTrustBase(tb map[string]crypto.Verifier) Option
- type Options
- type ProcessingDetails
- type StateTransition
- type TxAttributes
- type TxSystem
- func (m *TxSystem) BeginBlock(blockNr uint64) error
- func (m *TxSystem) Commit() error
- func (m *TxSystem) CurrentBlockNumber() uint64
- func (m *TxSystem) EndBlock() (txsystem.State, error)
- func (m *TxSystem) Execute(tx *types.TransactionOrder) (sm *types.ServerMetadata, err error)
- func (m *TxSystem) GetState() *state.State
- func (m *TxSystem) Revert()
- func (m *TxSystem) StateSummary() (txsystem.State, error)
Constants ¶
View Source
const DefaultBlockGasLimit = 15000000
View Source
const DefaultGasPrice = 210000000
View Source
const PayloadTypeEVMCall = "evm"
Variables ¶
View Source
var DefaultEvmTxSystemIdentifier = []byte{0, 0, 0, 3}
Functions ¶
func Execute ¶
func Execute(currentBlockNumber uint64, stateDB *statedb.StateDB, blockDB keyvaluedb.KeyValueDB, attr *TxAttributes, systemIdentifier []byte, gp *core.GasPool, gasUnitPrice *big.Int, fake bool) (*types.ServerMetadata, error)
Types ¶
type FeeAccount ¶
type FeeAccount struct {
// contains filtered or unexported fields
}
func (FeeAccount) GenericTransactionValidator ¶
func (m FeeAccount) GenericTransactionValidator() txsystem.GenericTransactionValidator
func (FeeAccount) TxExecutors ¶
func (m FeeAccount) TxExecutors() map[string]txsystem.TxExecutor
type FeeCalculator ¶
type FeeCalculator func() uint64
func FixedFee ¶
func FixedFee(fee uint64) FeeCalculator
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GenericTransactionValidator ¶
func (m *Module) GenericTransactionValidator() txsystem.GenericTransactionValidator
func (*Module) StartBlockFunc ¶
func (*Module) TxExecutors ¶
func (m *Module) TxExecutors() map[string]txsystem.TxExecutor
type Option ¶
type Option func(*Options)
func WithBlockDB ¶
func WithBlockDB(blockDB keyvaluedb.KeyValueDB) Option
func WithBlockGasLimit ¶
func WithGasPrice ¶
func WithHashAlgorithm ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func DefaultOptions ¶
func DefaultOptions() *Options
type ProcessingDetails ¶
type ProcessingDetails struct { ErrorDetails string ReturnData []byte ContractAddr common.Address Logs []*statedb.LogEntry // contains filtered or unexported fields }
func (*ProcessingDetails) Bytes ¶
func (d *ProcessingDetails) Bytes() ([]byte, error)
type StateTransition ¶
type StateTransition struct {
// contains filtered or unexported fields
}
type TxAttributes ¶
type TxAttributes struct { From []byte To []byte Data []byte Value *big.Int Gas uint64 Nonce uint64 // contains filtered or unexported fields }
func (*TxAttributes) AsMessage ¶
AsMessage returns the Alphabill transaction as a ethereum core.Message.
func (*TxAttributes) FromAddr ¶
func (t *TxAttributes) FromAddr() common.Address
FromAddr - returns From as Address, if nil empty address is returned From is mandatory field and must not be nil in a valid TxAttributes
func (*TxAttributes) ToAddr ¶
func (t *TxAttributes) ToAddr() *common.Address
ToAddr - returns To as Address pointer. To field is optional and not present on contract creation calls. If To is nil then nil pointer is returned
type TxSystem ¶
type TxSystem struct {
// contains filtered or unexported fields
}
func NewEVMTxSystem ¶
func (*TxSystem) BeginBlock ¶
func (*TxSystem) CurrentBlockNumber ¶
func (*TxSystem) Execute ¶
func (m *TxSystem) Execute(tx *types.TransactionOrder) (sm *types.ServerMetadata, err error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.