Versions in this module Expand all Collapse all v0 v0.4.0 Mar 25, 2024 Changes in this version + type PredicateExecutor func(ctx context.Context, predicate types.PredicateBytes, args []byte, ...) (bool, error) v0.3.0 Feb 28, 2024 Changes in this version + const DefaultBlockGasLimit + const DefaultEvmTxSystemIdentifier + const DefaultGasPrice + const PayloadTypeEVMCall + const TypePartLength + const UnitIDLength + const UnitPartLength + 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 struct + func (m FeeAccount) GenericTransactionValidator() genericTransactionValidator + func (m FeeAccount) TxExecutors() map[string]txsystem.ExecuteFunc + type FeeCalculator func() uint64 + func FixedFee(fee uint64) FeeCalculator + type Module struct + func NewEVMModule(systemIdentifier types.SystemID, opts *Options, log *slog.Logger) (*Module, error) + func (m *Module) GenericTransactionValidator() genericTransactionValidator + func (m *Module) StartBlockFunc(blockGasLimit uint64) []func(blockNr uint64) error + func (m *Module) TxExecutors() map[string]txsystem.ExecuteFunc + type Option func(*Options) + 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 struct + func DefaultOptions() *Options + type ProcessingDetails struct + ContractAddr common.Address + ErrorDetails string + Logs []*statedb.LogEntry + ReturnData []byte + func (d *ProcessingDetails) Bytes() ([]byte, error) + type TxAttributes struct + Data []byte + From []byte + Gas uint64 + Nonce uint64 + To []byte + Value *big.Int + func (t *TxAttributes) AsMessage(gasPrice *big.Int, fake bool) *core.Message + func (t *TxAttributes) FromAddr() common.Address + func (t *TxAttributes) ToAddr() *common.Address + type TxSystem struct + func NewEVMTxSystem(systemIdentifier types.SystemID, log *slog.Logger, opts ...Option) (*TxSystem, error) + 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) SerializeState(writer io.Writer, committed bool) error + func (m *TxSystem) State() *state.State + func (m *TxSystem) StateSummary() (txsystem.StateSummary, error) + type TxValidationContext struct + BlockNumber uint64 + SystemIdentifier types.SystemID + Tx *types.TransactionOrder + Unit *state.Unit