Documentation ¶
Index ¶
- Constants
- Variables
- func IsContractResponse(message MessageHandler) bool
- func IsCriticalError(err error) bool
- func IsDiagnose(message MessageHandler) bool
- func IsHookCall(message MessageHandler) bool
- func IsStopRequest(message MessageHandler) bool
- func SendArwenArguments(pipe *os.File, pipeArguments ArwenArguments) error
- type ArwenArguments
- type CriticalError
- type Message
- func (message *Message) DebugString() string
- func (message *Message) GetError() error
- func (message *Message) GetKind() MessageKind
- func (message *Message) GetKindName() string
- func (message *Message) GetNonce() uint32
- func (message *Message) SetError(err error)
- func (message *Message) SetKind(kind MessageKind)
- func (message *Message) SetNonce(nonce uint32)
- type MessageBlockchainAccountExistsRequest
- type MessageBlockchainAccountExistsResponse
- type MessageBlockchainCurrentEpochRequest
- type MessageBlockchainCurrentEpochResponse
- type MessageBlockchainCurrentNonceRequest
- type MessageBlockchainCurrentNonceResponse
- type MessageBlockchainCurrentRandomSeedRequest
- type MessageBlockchainCurrentRandomSeedResponse
- type MessageBlockchainCurrentRoundRequest
- type MessageBlockchainCurrentRoundResponse
- type MessageBlockchainCurrentTimeStampRequest
- type MessageBlockchainCurrentTimeStampResponse
- type MessageBlockchainGetBalanceRequest
- type MessageBlockchainGetBalanceResponse
- type MessageBlockchainGetBlockhashRequest
- type MessageBlockchainGetBlockhashResponse
- type MessageBlockchainGetBuiltinFunctionNamesRequest
- type MessageBlockchainGetBuiltinFunctionNamesResponse
- type MessageBlockchainGetCodeRequest
- type MessageBlockchainGetCodeResponse
- type MessageBlockchainGetNonceRequest
- type MessageBlockchainGetNonceResponse
- type MessageBlockchainGetStateRootHashRequest
- type MessageBlockchainGetStateRootHashResponse
- type MessageBlockchainGetStorageDataRequest
- type MessageBlockchainGetStorageDataResponse
- type MessageBlockchainIsCodeEmptyRequest
- type MessageBlockchainIsCodeEmptyResponse
- type MessageBlockchainLastEpochRequest
- type MessageBlockchainLastEpochResponse
- type MessageBlockchainLastNonceRequest
- type MessageBlockchainLastNonceResponse
- type MessageBlockchainLastRandomSeedRequest
- type MessageBlockchainLastRandomSeedResponse
- type MessageBlockchainLastRoundRequest
- type MessageBlockchainLastRoundResponse
- type MessageBlockchainLastTimeStampRequest
- type MessageBlockchainLastTimeStampResponse
- type MessageBlockchainNewAddressRequest
- type MessageBlockchainNewAddressResponse
- type MessageBlockchainProcessBuiltinFunctionRequest
- type MessageBlockchainProcessBuiltinFunctionResponse
- type MessageContractCallRequest
- type MessageContractDeployRequest
- type MessageContractResponse
- type MessageDiagnoseWaitRequest
- type MessageDiagnoseWaitResponse
- type MessageHandler
- type MessageInitialize
- type MessageKind
- type MessageReplier
- type MessageStop
- type Messenger
- type Receiver
- type Sender
- type UndefinedMessage
Constants ¶
const ( // ErrCodeSuccess signals success ErrCodeSuccess = iota // ErrCodeCannotCreateFile signals a critical error ErrCodeCannotCreateFile // ErrCodeInit signals a critical error ErrCodeInit // ErrCodeTerminated signals a critical error ErrCodeTerminated )
const EnvVarArwenPath = "ARWEN_PATH"
EnvVarArwenPath is an environment variable
Variables ¶
var ErrArwenClosed = &CriticalError{InnerErr: fmt.Errorf("arwen closed")}
ErrArwenClosed signals a critical error
var ErrArwenNotFound = &CriticalError{InnerErr: fmt.Errorf("arwen binary not found")}
ErrArwenNotFound signals a critical error
var ErrArwenTimeExpired = &CriticalError{InnerErr: fmt.Errorf("arwen time expired")}
ErrArwenTimeExpired signals a critical error
var ErrBadArwenArguments = &CriticalError{InnerErr: fmt.Errorf("bad arguments passed to arwen")}
ErrBadArwenArguments signals a critical error
var ErrBadHookResponseFromNode = &CriticalError{InnerErr: fmt.Errorf("bad hook response from node")}
ErrBadHookResponseFromNode signals a critical error
var ErrBadMessageFromArwen = &CriticalError{InnerErr: fmt.Errorf("bad message from arwen")}
ErrBadMessageFromArwen signals a critical error
var ErrBadRequestFromNode = &CriticalError{InnerErr: fmt.Errorf("bad message from node")}
ErrBadRequestFromNode signals a critical error
var ErrCannotReceiveHookCallResponse = &CriticalError{InnerErr: fmt.Errorf("cannot receive hook call response")}
ErrCannotReceiveHookCallResponse signals a critical error
var ErrCannotSendContractRequest = &CriticalError{InnerErr: fmt.Errorf("cannot send contract request")}
ErrCannotSendContractRequest signals a critical error
var ErrCannotSendHookCallRequest = &CriticalError{InnerErr: fmt.Errorf("cannot send hook call request")}
ErrCannotSendHookCallRequest signals a critical error
var ErrCannotSendHookCallResponse = &CriticalError{InnerErr: fmt.Errorf("cannot send hook call response")}
ErrCannotSendHookCallResponse signals a critical error
var ErrInvalidMessageNonce = &CriticalError{InnerErr: fmt.Errorf("invalid dialogue nonce")}
ErrInvalidMessageNonce signals a critical error
var ErrStopPerNodeRequest = &CriticalError{InnerErr: fmt.Errorf("arwen will stop, as requested")}
ErrStopPerNodeRequest signals a critical error
Functions ¶
func IsContractResponse ¶
func IsContractResponse(message MessageHandler) bool
IsContractResponse returns whether a message is a contract response
func IsCriticalError ¶
IsCriticalError returns whether the error is critical
func IsDiagnose ¶
func IsDiagnose(message MessageHandler) bool
IsDiagnose returns whether a message is a diagnose request
func IsHookCall ¶
func IsHookCall(message MessageHandler) bool
IsHookCall returns whether a message is a hook call
func IsStopRequest ¶
func IsStopRequest(message MessageHandler) bool
IsStopRequest returns whether a message is a stop request
func SendArwenArguments ¶
func SendArwenArguments(pipe *os.File, pipeArguments ArwenArguments) error
SendArwenArguments sends initialization arguments through a pipe
Types ¶
type ArwenArguments ¶
type ArwenArguments struct { arwen.VMHostParameters LogsMarshalizer marshaling.MarshalizerKind MessagesMarshalizer marshaling.MarshalizerKind }
ArwenArguments represents the initialization arguments required by Arwen, passed through the initialization pipe
func GetArwenArguments ¶
func GetArwenArguments(pipe *os.File) (*ArwenArguments, error)
GetArwenArguments reads initialization arguments from the pipe
type CriticalError ¶
type CriticalError struct {
InnerErr error
}
CriticalError signals a critical error
func WrapCriticalError ¶
func WrapCriticalError(err error) *CriticalError
WrapCriticalError wraps an error
func (*CriticalError) Error ¶
func (err *CriticalError) Error() string
func (*CriticalError) Unwrap ¶
func (err *CriticalError) Unwrap() error
Unwrap unwraps the inner error
type Message ¶
type Message struct { DialogueNonce uint32 Kind MessageKind ErrorMessage string }
Message is the implementation of the abstraction
func (*Message) DebugString ¶
DebugString is a debug representation of the message
func (*Message) GetKind ¶
func (message *Message) GetKind() MessageKind
GetKind gets the message kind
func (*Message) GetKindName ¶
GetKindName gets the kind name
func (*Message) SetKind ¶
func (message *Message) SetKind(kind MessageKind)
SetKind sets the message kind
type MessageBlockchainAccountExistsRequest ¶
MessageBlockchainAccountExistsRequest represents a request message
func NewMessageBlockchainAccountExistsRequest ¶
func NewMessageBlockchainAccountExistsRequest(address []byte) *MessageBlockchainAccountExistsRequest
NewMessageBlockchainAccountExistsRequest creates a request message
type MessageBlockchainAccountExistsResponse ¶
MessageBlockchainAccountExistsResponse represents a response message
func NewMessageBlockchainAccountExistsResponse ¶
func NewMessageBlockchainAccountExistsResponse(result bool, err error) *MessageBlockchainAccountExistsResponse
NewMessageBlockchainAccountExistsResponse creates a response message
type MessageBlockchainCurrentEpochRequest ¶
type MessageBlockchainCurrentEpochRequest struct {
Message
}
MessageBlockchainCurrentEpochRequest represents a request message
func NewMessageBlockchainCurrentEpochRequest ¶
func NewMessageBlockchainCurrentEpochRequest() *MessageBlockchainCurrentEpochRequest
NewMessageBlockchainCurrentEpochRequest creates a request message
type MessageBlockchainCurrentEpochResponse ¶
MessageBlockchainCurrentEpochResponse represents a response message
func NewMessageBlockchainCurrentEpochResponse ¶
func NewMessageBlockchainCurrentEpochResponse(result uint32) *MessageBlockchainCurrentEpochResponse
NewMessageBlockchainCurrentEpochResponse creates a response message
type MessageBlockchainCurrentNonceRequest ¶
type MessageBlockchainCurrentNonceRequest struct {
Message
}
MessageBlockchainCurrentNonceRequest represents a request message
func NewMessageBlockchainCurrentNonceRequest ¶
func NewMessageBlockchainCurrentNonceRequest() *MessageBlockchainCurrentNonceRequest
NewMessageBlockchainCurrentNonceRequest creates a request message
type MessageBlockchainCurrentNonceResponse ¶
MessageBlockchainCurrentNonceResponse represents a response message
func NewMessageBlockchainCurrentNonceResponse ¶
func NewMessageBlockchainCurrentNonceResponse(result uint64) *MessageBlockchainCurrentNonceResponse
NewMessageBlockchainCurrentNonceResponse creates a response message
type MessageBlockchainCurrentRandomSeedRequest ¶
type MessageBlockchainCurrentRandomSeedRequest struct {
Message
}
MessageBlockchainCurrentRandomSeedRequest represents a request message
func NewMessageBlockchainCurrentRandomSeedRequest ¶
func NewMessageBlockchainCurrentRandomSeedRequest() *MessageBlockchainCurrentRandomSeedRequest
NewMessageBlockchainCurrentRandomSeedRequest creates a request message
type MessageBlockchainCurrentRandomSeedResponse ¶
MessageBlockchainCurrentRandomSeedResponse represents a response message
func NewMessageBlockchainCurrentRandomSeedResponse ¶
func NewMessageBlockchainCurrentRandomSeedResponse(result []byte) *MessageBlockchainCurrentRandomSeedResponse
NewMessageBlockchainCurrentRandomSeedResponse creates a response message
type MessageBlockchainCurrentRoundRequest ¶
type MessageBlockchainCurrentRoundRequest struct {
Message
}
MessageBlockchainCurrentRoundRequest represents a request message
func NewMessageBlockchainCurrentRoundRequest ¶
func NewMessageBlockchainCurrentRoundRequest() *MessageBlockchainCurrentRoundRequest
NewMessageBlockchainCurrentRoundRequest creates a request message
type MessageBlockchainCurrentRoundResponse ¶
MessageBlockchainCurrentRoundResponse represents a response message
func NewMessageBlockchainCurrentRoundResponse ¶
func NewMessageBlockchainCurrentRoundResponse(result uint64) *MessageBlockchainCurrentRoundResponse
NewMessageBlockchainCurrentRoundResponse creates a response message
type MessageBlockchainCurrentTimeStampRequest ¶
type MessageBlockchainCurrentTimeStampRequest struct {
Message
}
MessageBlockchainCurrentTimeStampRequest represents a request message
func NewMessageBlockchainCurrentTimeStampRequest ¶
func NewMessageBlockchainCurrentTimeStampRequest() *MessageBlockchainCurrentTimeStampRequest
NewMessageBlockchainCurrentTimeStampRequest creates a request message
type MessageBlockchainCurrentTimeStampResponse ¶
MessageBlockchainCurrentTimeStampResponse represents a response message
func NewMessageBlockchainCurrentTimeStampResponse ¶
func NewMessageBlockchainCurrentTimeStampResponse(result uint64) *MessageBlockchainCurrentTimeStampResponse
NewMessageBlockchainCurrentTimeStampResponse creates a response message
type MessageBlockchainGetBalanceRequest ¶
MessageBlockchainGetBalanceRequest represents a request message
func NewMessageBlockchainGetBalanceRequest ¶
func NewMessageBlockchainGetBalanceRequest(address []byte) *MessageBlockchainGetBalanceRequest
NewMessageBlockchainGetBalanceRequest creates a request message
type MessageBlockchainGetBalanceResponse ¶
MessageBlockchainGetBalanceResponse represents a response message
func NewMessageBlockchainGetBalanceResponse ¶
func NewMessageBlockchainGetBalanceResponse(balance *big.Int, err error) *MessageBlockchainGetBalanceResponse
NewMessageBlockchainGetBalanceResponse creates a response message
type MessageBlockchainGetBlockhashRequest ¶
MessageBlockchainGetBlockhashRequest represents a request message
func NewMessageBlockchainGetBlockhashRequest ¶
func NewMessageBlockchainGetBlockhashRequest(nonce uint64) *MessageBlockchainGetBlockhashRequest
NewMessageBlockchainGetBlockhashRequest creates a request message
type MessageBlockchainGetBlockhashResponse ¶
MessageBlockchainGetBlockhashResponse represents a response message
func NewMessageBlockchainGetBlockhashResponse ¶
func NewMessageBlockchainGetBlockhashResponse(result []byte, err error) *MessageBlockchainGetBlockhashResponse
NewMessageBlockchainGetBlockhashResponse creates a response message
type MessageBlockchainGetBuiltinFunctionNamesRequest ¶ added in v0.3.14
type MessageBlockchainGetBuiltinFunctionNamesRequest struct {
Message
}
MessageBlockchainGetBuiltinFunctionNamesRequest represents a request message
func NewMessageBlockchainGetBuiltinFunctionNamesRequest ¶ added in v0.3.14
func NewMessageBlockchainGetBuiltinFunctionNamesRequest() *MessageBlockchainGetBuiltinFunctionNamesRequest
NewMessageBlockchainGetBuiltinFunctionNamesRequest creates a request message
type MessageBlockchainGetBuiltinFunctionNamesResponse ¶ added in v0.3.14
type MessageBlockchainGetBuiltinFunctionNamesResponse struct { Message FunctionNames vmcommon.FunctionNames }
MessageBlockchainGetBuiltinFunctionNamesResponse represents a response message
func NewMessageBlockchainGetBuiltinFunctionNamesResponse ¶ added in v0.3.14
func NewMessageBlockchainGetBuiltinFunctionNamesResponse(functionNames vmcommon.FunctionNames) *MessageBlockchainGetBuiltinFunctionNamesResponse
NewMessageBlockchainGetBuiltinFunctionNamesResponse creates a response message
type MessageBlockchainGetCodeRequest ¶
MessageBlockchainGetCodeRequest represents a request message
func NewMessageBlockchainGetCodeRequest ¶
func NewMessageBlockchainGetCodeRequest(address []byte) *MessageBlockchainGetCodeRequest
NewMessageBlockchainGetCodeRequest creates a request message
type MessageBlockchainGetCodeResponse ¶
MessageBlockchainGetCodeResponse represents a response message
func NewMessageBlockchainGetCodeResponse ¶
func NewMessageBlockchainGetCodeResponse(code []byte, err error) *MessageBlockchainGetCodeResponse
NewMessageBlockchainGetCodeResponse creates a response message
type MessageBlockchainGetNonceRequest ¶
MessageBlockchainGetNonceRequest represents a request message
func NewMessageBlockchainGetNonceRequest ¶
func NewMessageBlockchainGetNonceRequest(address []byte) *MessageBlockchainGetNonceRequest
NewMessageBlockchainGetNonceRequest creates a request message
type MessageBlockchainGetNonceResponse ¶
MessageBlockchainGetNonceResponse represents a response message
func NewMessageBlockchainGetNonceResponse ¶
func NewMessageBlockchainGetNonceResponse(nonce uint64, err error) *MessageBlockchainGetNonceResponse
NewMessageBlockchainGetNonceResponse creates a response message
type MessageBlockchainGetStateRootHashRequest ¶
type MessageBlockchainGetStateRootHashRequest struct {
Message
}
MessageBlockchainGetStateRootHashRequest represents a request message
func NewMessageBlockchainGetStateRootHashRequest ¶
func NewMessageBlockchainGetStateRootHashRequest() *MessageBlockchainGetStateRootHashRequest
NewMessageBlockchainGetStateRootHashRequest creates a request message
type MessageBlockchainGetStateRootHashResponse ¶
MessageBlockchainGetStateRootHashResponse represents a response message
func NewMessageBlockchainGetStateRootHashResponse ¶
func NewMessageBlockchainGetStateRootHashResponse(result []byte) *MessageBlockchainGetStateRootHashResponse
NewMessageBlockchainGetStateRootHashResponse creates a response message
type MessageBlockchainGetStorageDataRequest ¶
MessageBlockchainGetStorageDataRequest represents a request message
func NewMessageBlockchainGetStorageDataRequest ¶
func NewMessageBlockchainGetStorageDataRequest(address []byte, index []byte) *MessageBlockchainGetStorageDataRequest
NewMessageBlockchainGetStorageDataRequest creates a request message
type MessageBlockchainGetStorageDataResponse ¶
MessageBlockchainGetStorageDataResponse represents a response message
func NewMessageBlockchainGetStorageDataResponse ¶
func NewMessageBlockchainGetStorageDataResponse(data []byte, err error) *MessageBlockchainGetStorageDataResponse
NewMessageBlockchainGetStorageDataResponse creates a response message
type MessageBlockchainIsCodeEmptyRequest ¶
MessageBlockchainIsCodeEmptyRequest represents a request message
func NewMessageBlockchainIsCodeEmptyRequest ¶
func NewMessageBlockchainIsCodeEmptyRequest(address []byte) *MessageBlockchainIsCodeEmptyRequest
NewMessageBlockchainIsCodeEmptyRequest creates a request message
type MessageBlockchainIsCodeEmptyResponse ¶
MessageBlockchainIsCodeEmptyResponse represents a response message
func NewMessageBlockchainIsCodeEmptyResponse ¶
func NewMessageBlockchainIsCodeEmptyResponse(result bool, err error) *MessageBlockchainIsCodeEmptyResponse
NewMessageBlockchainIsCodeEmptyResponse creates a response message
type MessageBlockchainLastEpochRequest ¶
type MessageBlockchainLastEpochRequest struct {
Message
}
MessageBlockchainLastEpochRequest represents a request message
func NewMessageBlockchainLastEpochRequest ¶
func NewMessageBlockchainLastEpochRequest() *MessageBlockchainLastEpochRequest
NewMessageBlockchainLastEpochRequest creates a request message
type MessageBlockchainLastEpochResponse ¶
MessageBlockchainLastEpochResponse represents a response message
func NewMessageBlockchainLastEpochResponse ¶
func NewMessageBlockchainLastEpochResponse(result uint32) *MessageBlockchainLastEpochResponse
NewMessageBlockchainLastEpochResponse creates a response message
type MessageBlockchainLastNonceRequest ¶
type MessageBlockchainLastNonceRequest struct {
Message
}
MessageBlockchainLastNonceRequest represents a request message
func NewMessageBlockchainLastNonceRequest ¶
func NewMessageBlockchainLastNonceRequest() *MessageBlockchainLastNonceRequest
NewMessageBlockchainLastNonceRequest creates a request message
type MessageBlockchainLastNonceResponse ¶
MessageBlockchainLastNonceResponse represents a response message
func NewMessageBlockchainLastNonceResponse ¶
func NewMessageBlockchainLastNonceResponse(result uint64) *MessageBlockchainLastNonceResponse
NewMessageBlockchainLastNonceResponse creates a response message
type MessageBlockchainLastRandomSeedRequest ¶
type MessageBlockchainLastRandomSeedRequest struct {
Message
}
MessageBlockchainLastRandomSeedRequest represents a request message
func NewMessageBlockchainLastRandomSeedRequest ¶
func NewMessageBlockchainLastRandomSeedRequest() *MessageBlockchainLastRandomSeedRequest
NewMessageBlockchainLastRandomSeedRequest creates a request message
type MessageBlockchainLastRandomSeedResponse ¶
MessageBlockchainLastRandomSeedResponse represents a response message
func NewMessageBlockchainLastRandomSeedResponse ¶
func NewMessageBlockchainLastRandomSeedResponse(result []byte) *MessageBlockchainLastRandomSeedResponse
NewMessageBlockchainLastRandomSeedResponse creates a response message
type MessageBlockchainLastRoundRequest ¶
type MessageBlockchainLastRoundRequest struct {
Message
}
MessageBlockchainLastRoundRequest represents a request message
func NewMessageBlockchainLastRoundRequest ¶
func NewMessageBlockchainLastRoundRequest() *MessageBlockchainLastRoundRequest
NewMessageBlockchainLastRoundRequest creates a request message
type MessageBlockchainLastRoundResponse ¶
MessageBlockchainLastRoundResponse represents a response message
func NewMessageBlockchainLastRoundResponse ¶
func NewMessageBlockchainLastRoundResponse(result uint64) *MessageBlockchainLastRoundResponse
NewMessageBlockchainLastRoundResponse creates a response message
type MessageBlockchainLastTimeStampRequest ¶
type MessageBlockchainLastTimeStampRequest struct {
Message
}
MessageBlockchainLastTimeStampRequest represents a request message
func NewMessageBlockchainLastTimeStampRequest ¶
func NewMessageBlockchainLastTimeStampRequest() *MessageBlockchainLastTimeStampRequest
NewMessageBlockchainLastTimeStampRequest creates a request message
type MessageBlockchainLastTimeStampResponse ¶
MessageBlockchainLastTimeStampResponse represents a response message
func NewMessageBlockchainLastTimeStampResponse ¶
func NewMessageBlockchainLastTimeStampResponse(result uint64) *MessageBlockchainLastTimeStampResponse
NewMessageBlockchainLastTimeStampResponse creates a response message
type MessageBlockchainNewAddressRequest ¶
type MessageBlockchainNewAddressRequest struct { Message CreatorAddress []byte CreatorNonce uint64 VmType []byte }
MessageBlockchainNewAddressRequest represents a request message
func NewMessageBlockchainNewAddressRequest ¶
func NewMessageBlockchainNewAddressRequest(creatorAddress []byte, creatorNonce uint64, vmType []byte) *MessageBlockchainNewAddressRequest
NewMessageBlockchainNewAddressRequest creates a request message
type MessageBlockchainNewAddressResponse ¶
MessageBlockchainNewAddressResponse represents a response message
func NewMessageBlockchainNewAddressResponse ¶
func NewMessageBlockchainNewAddressResponse(result []byte, err error) *MessageBlockchainNewAddressResponse
NewMessageBlockchainNewAddressResponse creates a response message
type MessageBlockchainProcessBuiltinFunctionRequest ¶ added in v0.3.14
type MessageBlockchainProcessBuiltinFunctionRequest struct { Message CallInput vmcommon.ContractCallInput }
MessageBlockchainProcessBuiltinFunctionRequest represents a request message
func NewMessageBlockchainProcessBuiltinFunctionRequest ¶ added in v0.3.14
func NewMessageBlockchainProcessBuiltinFunctionRequest(callInput vmcommon.ContractCallInput) *MessageBlockchainProcessBuiltinFunctionRequest
NewMessageBlockchainProcessBuiltinFunctionRequest creates a request message
type MessageBlockchainProcessBuiltinFunctionResponse ¶ added in v0.3.14
MessageBlockchainProcessBuiltinFunctionResponse represents a response message
func NewMessageBlockchainProcessBuiltinFunctionResponse ¶ added in v0.3.14
func NewMessageBlockchainProcessBuiltinFunctionResponse(vmOutput *vmcommon.VMOutput, err error) *MessageBlockchainProcessBuiltinFunctionResponse
NewMessageBlockchainProcessBuiltinFunctionResponse creates a response message
type MessageContractCallRequest ¶
type MessageContractCallRequest struct { Message CallInput *vmcommon.ContractCallInput }
MessageContractCallRequest is call request message (from Node)
func NewMessageContractCallRequest ¶
func NewMessageContractCallRequest(input *vmcommon.ContractCallInput) *MessageContractCallRequest
NewMessageContractCallRequest creates a message
type MessageContractDeployRequest ¶
type MessageContractDeployRequest struct { Message CreateInput *vmcommon.ContractCreateInput }
MessageContractDeployRequest is deploy request message (from Node)
func NewMessageContractDeployRequest ¶
func NewMessageContractDeployRequest(input *vmcommon.ContractCreateInput) *MessageContractDeployRequest
NewMessageContractDeployRequest creates a message
type MessageContractResponse ¶
MessageContractResponse is a contract response message (from Arwen)
func NewMessageContractResponse ¶
func NewMessageContractResponse(vmOutput *vmcommon.VMOutput, err error) *MessageContractResponse
NewMessageContractResponse creates a message
type MessageDiagnoseWaitRequest ¶
MessageDiagnoseWaitRequest is a diagnose request message (from Node)
func NewMessageDiagnoseWaitRequest ¶
func NewMessageDiagnoseWaitRequest(milliseconds uint32) *MessageDiagnoseWaitRequest
NewMessageDiagnoseWaitRequest creates a message
type MessageDiagnoseWaitResponse ¶
type MessageDiagnoseWaitResponse struct {
Message
}
MessageDiagnoseWaitResponse is a diagnose response message (from Arwen)
func NewMessageDiagnoseWaitResponse ¶
func NewMessageDiagnoseWaitResponse() *MessageDiagnoseWaitResponse
NewMessageDiagnoseWaitResponse creates a message
type MessageHandler ¶
type MessageHandler interface { GetNonce() uint32 SetNonce(nonce uint32) GetKind() MessageKind SetKind(kind MessageKind) GetError() error SetError(err error) GetKindName() string DebugString() string }
MessageHandler is a message abstraction
func CreateMessage ¶
func CreateMessage(kind MessageKind) MessageHandler
CreateMessage creates a message given its kind
type MessageInitialize ¶
type MessageInitialize struct { Message Arguments ArwenArguments }
MessageInitialize is a message sent by Node to initialize Arwen
func NewMessageInitialize ¶
func NewMessageInitialize(arguments ArwenArguments) *MessageInitialize
NewMessageInitialize creates a new message
type MessageKind ¶
type MessageKind uint32
MessageKind is the kind of a message (that is passed between the Node and Arwen)
const ( FirstKind MessageKind = iota Initialize Stop ContractDeployRequest ContractCallRequest ContractResponse BlockchainAccountExistsRequest BlockchainAccountExistsResponse BlockchainNewAddressRequest BlockchainNewAddressResponse BlockchainGetBalanceRequest BlockchainGetBalanceResponse BlockchainGetNonceRequest BlockchainGetNonceResponse BlockchainGetStorageDataRequest BlockchainGetStorageDataResponse BlockchainIsCodeEmptyRequest BlockchainIsCodeEmptyResponse BlockchainGetCodeRequest BlockchainGetCodeResponse BlockchainGetBlockhashRequest BlockchainGetBlockhashResponse BlockchainLastNonceRequest BlockchainLastNonceResponse BlockchainLastRoundRequest BlockchainLastRoundResponse BlockchainLastTimeStampRequest BlockchainLastTimeStampResponse BlockchainLastRandomSeedRequest BlockchainLastRandomSeedResponse BlockchainLastEpochRequest BlockchainLastEpochResponse BlockchainGetStateRootHashRequest BlockchainGetStateRootHashResponse BlockchainCurrentNonceRequest BlockchainCurrentNonceResponse BlockchainCurrentRoundRequest BlockchainCurrentRoundResponse BlockchainCurrentTimeStampRequest BlockchainCurrentTimeStampResponse BlockchainCurrentRandomSeedRequest BlockchainCurrentRandomSeedResponse BlockchainCurrentEpochRequest BlockchainCurrentEpochResponse BlockchainProcessBuiltinFunctionRequest BlockchainProcessBuiltinFunctionResponse BlockchainGetBuiltinFunctionNamesRequest BlockchainGetBuiltinFunctionNamesResponse DiagnoseWaitRequest DiagnoseWaitResponse UndefinedRequestOrResponse LastKind )
type MessageReplier ¶
type MessageReplier func(MessageHandler) MessageHandler
MessageReplier is a callback signature
func CreateReplySlots ¶
func CreateReplySlots(noopReplier MessageReplier) []MessageReplier
CreateReplySlots creates a slice of no-operation repliers, to be substituted with actual repliers (by message listeners)
type MessageStop ¶
type MessageStop struct {
Message
}
MessageStop is a message sent by Node to stop Arwen
type Messenger ¶
Messenger intermediates communication (message exchange) via pipes
func NewMessenger ¶
NewMessenger creates a new messenger
func NewMessengerPipes ¶
func NewMessengerPipes(name string, reader *os.File, writer *os.File, marshalizer marshaling.Marshalizer) *Messenger
NewMessengerPipes creates a new messenger from pipes
func (*Messenger) Receive ¶
func (messenger *Messenger) Receive(timeout int) (MessageHandler, error)
Receive receives a message, reads it from the pipe
func (*Messenger) ResetDialogue ¶
func (messenger *Messenger) ResetDialogue()
ResetDialogue resets the dialogue nonce
func (*Messenger) Send ¶
func (messenger *Messenger) Send(message MessageHandler) error
Send sends a message over the pipe
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver intermediates communication (message receiving) via pipes
func NewReceiver ¶
func NewReceiver(reader *os.File, marshalizer marshaling.Marshalizer) *Receiver
NewReceiver creates a new receiver
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender intermediates communication (message sending) via pipes
func NewSender ¶
func NewSender(writer *os.File, marshalizer marshaling.Marshalizer) *Sender
NewSender creates a new sender
type UndefinedMessage ¶
type UndefinedMessage struct {
Message
}
UndefinedMessage is an undefined message
func NewUndefinedMessage ¶
func NewUndefinedMessage() *UndefinedMessage
NewUndefinedMessage creates an undefined message