Documentation ¶
Index ¶
- Constants
- func Execute(currentBlockNumber uint64, stateDB *statedb.StateDB, ...) (*types.ServerMetadata, error)
- func NewBlockContext(currentBlockNumber uint64, blockDB keyvaluedb.KeyValueDB) vm.BlockContext
- func NewChainConfig(chainID *big.Int) *params.ChainConfig
- func NewFeeCreditRecordID(shardPart []byte, unitPart []byte) types.UnitID
- func NewTxContext(attr *TxAttributes, gasPrice *big.Int) vm.TxContext
- func NewUnitData(unitID types.UnitID) (state.UnitData, error)
- func NewVMConfig() vm.Config
- 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 WithMoneyTXSystemIdentifier(moneyTxSystemID types.SystemID) Option
- func WithState(s *state.State) Option
- func WithTrustBase(tb map[string]crypto.Verifier) Option
- type Options
- type PredicateExecutor
- type ProcessingDetails
- type TxAttributes
- type TxSystem
- func (m *TxSystem) BeginBlock(blockNr uint64) error
- func (m *TxSystem) Commit(uc *types.UnicityCertificate) error
- func (m *TxSystem) CommittedUC() *types.UnicityCertificate
- func (m *TxSystem) CurrentBlockNumber() uint64
- func (m *TxSystem) EndBlock() (txsystem.StateSummary, error)
- func (m *TxSystem) Execute(tx *types.TransactionOrder) (sm *types.ServerMetadata, err error)
- func (m *TxSystem) Revert()
- func (m *TxSystem) State() txsystem.StateReader
- func (m *TxSystem) StateSummary() (txsystem.StateSummary, error)
- type TxValidationContext
Constants ¶
View Source
const ( UnitIDLength = UnitPartLength + TypePartLength UnitPartLength = 32 TypePartLength = 0 )
View Source
const DefaultBlockGasLimit = 15000000
View Source
const DefaultEvmTxSystemIdentifier types.SystemID = 0x00000003
View Source
const DefaultGasPrice = 210000000
View Source
const PayloadTypeEVMCall = "evm"
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(currentBlockNumber uint64, stateDB *statedb.StateDB, blockDB keyvaluedb.KeyValueDB, attr *TxAttributes, systemIdentifier types.SystemID, gp *core.GasPool, gasUnitPrice *big.Int, fake bool, log *slog.Logger) (*types.ServerMetadata, error)
func NewBlockContext ¶
func NewBlockContext(currentBlockNumber uint64, blockDB keyvaluedb.KeyValueDB) vm.BlockContext
func NewChainConfig ¶
func NewChainConfig(chainID *big.Int) *params.ChainConfig
NewChainConfig returns an Ethereum ChainConfig for EVM state transitions.
func NewFeeCreditRecordID ¶
func NewTxContext ¶
func NewTxContext(attr *TxAttributes, gasPrice *big.Int) vm.TxContext
func NewVMConfig ¶
Types ¶
type FeeAccount ¶
type FeeAccount struct {
// contains filtered or unexported fields
}
func (FeeAccount) GenericTransactionValidator ¶
func (m FeeAccount) GenericTransactionValidator() genericTransactionValidator
func (FeeAccount) TxExecutors ¶
func (m FeeAccount) TxExecutors() map[string]txsystem.ExecuteFunc
type FeeCalculator ¶
type FeeCalculator func() uint64
func FixedFee ¶
func FixedFee(fee uint64) FeeCalculator
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func NewEVMModule ¶
func (*Module) GenericTransactionValidator ¶
func (m *Module) GenericTransactionValidator() genericTransactionValidator
func (*Module) StartBlockFunc ¶
func (*Module) TxExecutors ¶
func (m *Module) TxExecutors() map[string]txsystem.ExecuteFunc
type Option ¶
type Option func(*Options)
func WithBlockDB ¶
func WithBlockDB(blockDB keyvaluedb.KeyValueDB) Option
func WithBlockGasLimit ¶
func WithGasPrice ¶
func WithHashAlgorithm ¶
type PredicateExecutor ¶ added in v0.4.0
type PredicateExecutor func(ctx context.Context, predicate types.PredicateBytes, args []byte, txo *types.TransactionOrder, env predicates.TxContext) (bool, error)
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 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) CommittedUC ¶
func (m *TxSystem) CommittedUC() *types.UnicityCertificate
func (*TxSystem) CurrentBlockNumber ¶
func (*TxSystem) Execute ¶
func (m *TxSystem) Execute(tx *types.TransactionOrder) (sm *types.ServerMetadata, err error)
func (*TxSystem) State ¶
func (m *TxSystem) State() txsystem.StateReader
func (*TxSystem) StateSummary ¶
func (m *TxSystem) StateSummary() (txsystem.StateSummary, error)
type TxValidationContext ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.