Documentation
¶
Index ¶
- Variables
- type Protocol
- func (p *Protocol) CreatePreStates(ctx context.Context, sm protocol.StateManager) error
- func (p *Protocol) ForceRegister(r *protocol.Registry) error
- func (p *Protocol) Handle(ctx context.Context, elp action.Envelope, sm protocol.StateManager) (*action.Receipt, error)
- func (p *Protocol) Name() string
- func (p *Protocol) ReadState(context.Context, protocol.StateReader, []byte, ...[]byte) ([]byte, uint64, error)
- func (p *Protocol) Register(r *protocol.Registry) error
- func (p *Protocol) Validate(ctx context.Context, elp action.Envelope, _ protocol.StateReader) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SystemAddress is where the system-transaction is sent from as per EIP-4788 SystemAddress = params.SystemAddress // EIP-2935 - Serve historical block hashes from state HistoryStorageAddress = params.HistoryStorageAddress HistoryStorageCode = params.HistoryStorageCode )
System contracts.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
Protocol defines the protocol of handling executions
func FindProtocol ¶
FindProtocol finds the registered protocol from registry
func NewProtocol ¶
func NewProtocol(_ evm.GetBlockHash, depositGas protocol.DepositGas, _ evm.GetBlockTime, isBlackListed evm.IsBlackListedFunc) *Protocol
NewProtocol instantiates the protocol of exeuction TODO: remove unused getBlockHash and getBlockTime
func (*Protocol) CreatePreStates ¶
CreatePreStates creates states for state manager
func (*Protocol) ForceRegister ¶
ForceRegister registers the protocol with a unique ID and force replacing the previous protocol if it exists
func (*Protocol) Handle ¶
func (p *Protocol) Handle(ctx context.Context, elp action.Envelope, sm protocol.StateManager) (*action.Receipt, error)
Handle handles an execution
func (*Protocol) ReadState ¶
func (p *Protocol) ReadState(context.Context, protocol.StateReader, []byte, ...[]byte) ([]byte, uint64, error)
ReadState read the state on blockchain via protocol
Click to show internal directories.
Click to hide internal directories.