Versions in this module Expand all Collapse all v0 v0.0.1 Oct 8, 2022 Changes in this version + const EnvVarAndesPath + const ErrCodeCannotCreateFile + const ErrCodeInit + const ErrCodeSuccess + const ErrCodeTerminated + var ErrAndesClosed = &CriticalError + var ErrAndesNotFound = &CriticalError + var ErrAndesTimeExpired = &CriticalError + var ErrBadAndesArguments = &CriticalError + var ErrBadHookResponseFromNode = &CriticalError + var ErrBadMessageFromAndes = &CriticalError + var ErrBadRequestFromNode = &CriticalError + var ErrCannotReceiveHookCallResponse = &CriticalError + var ErrCannotSendContractRequest = &CriticalError + var ErrCannotSendHookCallRequest = &CriticalError + var ErrCannotSendHookCallResponse = &CriticalError + var ErrInvalidMessageNonce = &CriticalError + var ErrStopPerNodeRequest = &CriticalError + func IsContractResponse(message MessageHandler) bool + func IsCriticalError(err error) bool + func IsDiagnose(message MessageHandler) bool + func IsGasScheduleChangeResponse(message MessageHandler) bool + func IsHookCall(message MessageHandler) bool + func IsStopRequest(message MessageHandler) bool + func IsVersionResponse(message MessageHandler) bool + func SendAndesArguments(pipe *os.File, pipeArguments AndesArguments) error + type Account struct + Address []byte + Balance *big.Int + CodeHash []byte + CodeMetadata []byte + DeveloperReward *big.Int + Nonce uint64 + OwnerAddress []byte + RootHash []byte + UserName []byte + func (a *Account) AccountDataHandler() vmcommon.AccountDataHandler + func (a *Account) AddToBalance(_ *big.Int) error + func (a *Account) AddressBytes() []byte + func (a *Account) ChangeOwnerAddress(_ []byte, _ []byte) error + func (a *Account) ClaimDeveloperRewards(_ []byte) (*big.Int, error) + func (a *Account) GetBalance() *big.Int + func (a *Account) GetCodeHash() []byte + func (a *Account) GetCodeMetadata() []byte + func (a *Account) GetDeveloperReward() *big.Int + func (a *Account) GetNonce() uint64 + func (a *Account) GetOwnerAddress() []byte + func (a *Account) GetRootHash() []byte + func (a *Account) GetUserName() []byte + func (a *Account) IncreaseNonce(_ uint64) + func (a *Account) IsInterfaceNil() bool + func (a *Account) SetOwnerAddress(_ []byte) + func (a *Account) SetUserName(_ []byte) + type AndesArguments struct + LogsMarshalizer marshaling.MarshalizerKind + MessagesMarshalizer marshaling.MarshalizerKind + func GetAndesArguments(pipe *os.File) (*AndesArguments, error) + type CriticalError struct + InnerErr error + func WrapCriticalError(err error) *CriticalError + func (err *CriticalError) Error() string + func (err *CriticalError) Unwrap() error + type Message struct + DialogueNonce uint32 + ErrorMessage string + Kind MessageKind + func NewGasScheduleChangeResponse() *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 MessageBlockchainClearCompiledCodesRequest struct + func NewMessageBlockchainClearCompiledCodesRequest() *MessageBlockchainClearCompiledCodesRequest + type MessageBlockchainClearCompiledCodesResponse struct + func NewMessageBlockchainClearCompiledCodesResponse() *MessageBlockchainClearCompiledCodesResponse + type MessageBlockchainCurrentEpochRequest struct + func NewMessageBlockchainCurrentEpochRequest() *MessageBlockchainCurrentEpochRequest + type MessageBlockchainCurrentEpochResponse struct + Result uint32 + func NewMessageBlockchainCurrentEpochResponse(result uint32) *MessageBlockchainCurrentEpochResponse + type MessageBlockchainCurrentNonceRequest struct + func NewMessageBlockchainCurrentNonceRequest() *MessageBlockchainCurrentNonceRequest + type MessageBlockchainCurrentNonceResponse struct + Result uint64 + func NewMessageBlockchainCurrentNonceResponse(result uint64) *MessageBlockchainCurrentNonceResponse + type MessageBlockchainCurrentRandomSeedRequest struct + func NewMessageBlockchainCurrentRandomSeedRequest() *MessageBlockchainCurrentRandomSeedRequest + type MessageBlockchainCurrentRandomSeedResponse struct + Result []byte + func NewMessageBlockchainCurrentRandomSeedResponse(result []byte) *MessageBlockchainCurrentRandomSeedResponse + type MessageBlockchainCurrentRoundRequest struct + func NewMessageBlockchainCurrentRoundRequest() *MessageBlockchainCurrentRoundRequest + type MessageBlockchainCurrentRoundResponse struct + Result uint64 + func NewMessageBlockchainCurrentRoundResponse(result uint64) *MessageBlockchainCurrentRoundResponse + type MessageBlockchainCurrentTimeStampRequest struct + func NewMessageBlockchainCurrentTimeStampRequest() *MessageBlockchainCurrentTimeStampRequest + type MessageBlockchainCurrentTimeStampResponse struct + Result uint64 + func NewMessageBlockchainCurrentTimeStampResponse(result uint64) *MessageBlockchainCurrentTimeStampResponse + type MessageBlockchainGetAllStateRequest struct + Address []byte + func NewMessageBlockchainGetAllStateRequest(address []byte) *MessageBlockchainGetAllStateRequest + type MessageBlockchainGetAllStateResponse struct + Result *SerializableMapStringBytes + func NewMessageBlockchainGetAllStateResponse(result map[string][]byte, err error) *MessageBlockchainGetAllStateResponse + type MessageBlockchainGetBlockhashRequest struct + Nonce uint64 + func NewMessageBlockchainGetBlockhashRequest(nonce uint64) *MessageBlockchainGetBlockhashRequest + type MessageBlockchainGetBlockhashResponse struct + Result []byte + func NewMessageBlockchainGetBlockhashResponse(result []byte, err error) *MessageBlockchainGetBlockhashResponse + type MessageBlockchainGetBuiltinFunctionNamesRequest struct + func NewMessageBlockchainGetBuiltinFunctionNamesRequest() *MessageBlockchainGetBuiltinFunctionNamesRequest + type MessageBlockchainGetBuiltinFunctionNamesResponse struct + Result vmcommon.FunctionNames + func NewMessageBlockchainGetBuiltinFunctionNamesResponse(result vmcommon.FunctionNames) *MessageBlockchainGetBuiltinFunctionNamesResponse + type MessageBlockchainGetCodeRequest struct + Account *Account + func NewMessageBlockchainGetCodeRequest(account *Account) *MessageBlockchainGetCodeRequest + type MessageBlockchainGetCodeResponse struct + Code []byte + func NewMessageBlockchainGetCodeResponse(code []byte) *MessageBlockchainGetCodeResponse + type MessageBlockchainGetCompiledCodeRequest struct + CodeHash []byte + func NewMessageBlockchainGetCompiledCodeRequest(codeHash []byte) *MessageBlockchainGetCompiledCodeRequest + type MessageBlockchainGetCompiledCodeResponse struct + Code []byte + Found bool + func NewMessageBlockchainGetCompiledCodeResponse(found bool, code []byte) *MessageBlockchainGetCompiledCodeResponse + type MessageBlockchainGetMECTTokenRequest struct + Address []byte + Nonce uint64 + TokenID []byte + func NewMessageBlockchainGetMECTTokenRequest(address []byte, tokenID []byte, nonce uint64) *MessageBlockchainGetMECTTokenRequest + type MessageBlockchainGetMECTTokenResponse struct + Result *mect.MECToken + func NewMessageBlockchainGetMECTTokenResponse(result *mect.MECToken, err error) *MessageBlockchainGetMECTTokenResponse + type MessageBlockchainGetShardOfAddressRequest struct + Address []byte + func NewMessageBlockchainGetShardOfAddressRequest(address []byte) *MessageBlockchainGetShardOfAddressRequest + type MessageBlockchainGetShardOfAddressResponse struct + Result uint32 + func NewMessageBlockchainGetShardOfAddressResponse(result uint32) *MessageBlockchainGetShardOfAddressResponse + type MessageBlockchainGetSnapshotRequest struct + func NewMessageBlockchainGetSnapshotRequest() *MessageBlockchainGetSnapshotRequest + type MessageBlockchainGetSnapshotResponse struct + Result int + func NewMessageBlockchainGetSnapshotResponse(result int) *MessageBlockchainGetSnapshotResponse + type MessageBlockchainGetStateRootHashRequest struct + func NewMessageBlockchainGetStateRootHashRequest() *MessageBlockchainGetStateRootHashRequest + type MessageBlockchainGetStateRootHashResponse struct + Result []byte + func NewMessageBlockchainGetStateRootHashResponse(result []byte) *MessageBlockchainGetStateRootHashResponse + type MessageBlockchainGetStorageDataRequest struct + AccountAddress []byte + Index []byte + func NewMessageBlockchainGetStorageDataRequest(accountAddress []byte, index []byte) *MessageBlockchainGetStorageDataRequest + type MessageBlockchainGetStorageDataResponse struct + Data []byte + func NewMessageBlockchainGetStorageDataResponse(data []byte, err error) *MessageBlockchainGetStorageDataResponse + type MessageBlockchainGetUserAccountRequest struct + Address []byte + func NewMessageBlockchainGetUserAccountRequest(address []byte) *MessageBlockchainGetUserAccountRequest + type MessageBlockchainGetUserAccountResponse struct + Result *Account + func NewMessageBlockchainGetUserAccountResponse(result *Account, err error) *MessageBlockchainGetUserAccountResponse + type MessageBlockchainIsInterfaceNilRequest struct + func NewMessageBlockchainIsInterfaceNilRequest() *MessageBlockchainIsInterfaceNilRequest + type MessageBlockchainIsInterfaceNilResponse struct + Result bool + func NewMessageBlockchainIsInterfaceNilResponse(result bool) *MessageBlockchainIsInterfaceNilResponse + type MessageBlockchainIsPayableRequest struct + Address []byte + func NewMessageBlockchainIsPayableRequest(address []byte) *MessageBlockchainIsPayableRequest + type MessageBlockchainIsPayableResponse struct + Result bool + func NewMessageBlockchainIsPayableResponse(result bool, err error) *MessageBlockchainIsPayableResponse + type MessageBlockchainIsSmartContractRequest struct + Address []byte + func NewMessageBlockchainIsSmartContractRequest(address []byte) *MessageBlockchainIsSmartContractRequest + type MessageBlockchainIsSmartContractResponse struct + Result bool + func NewMessageBlockchainIsSmartContractResponse(result bool) *MessageBlockchainIsSmartContractResponse + type MessageBlockchainLastEpochRequest struct + func NewMessageBlockchainLastEpochRequest() *MessageBlockchainLastEpochRequest + type MessageBlockchainLastEpochResponse struct + Result uint32 + func NewMessageBlockchainLastEpochResponse(result uint32) *MessageBlockchainLastEpochResponse + type MessageBlockchainLastNonceRequest struct + func NewMessageBlockchainLastNonceRequest() *MessageBlockchainLastNonceRequest + type MessageBlockchainLastNonceResponse struct + Result uint64 + func NewMessageBlockchainLastNonceResponse(result uint64) *MessageBlockchainLastNonceResponse + type MessageBlockchainLastRandomSeedRequest struct + func NewMessageBlockchainLastRandomSeedRequest() *MessageBlockchainLastRandomSeedRequest + type MessageBlockchainLastRandomSeedResponse struct + Result []byte + func NewMessageBlockchainLastRandomSeedResponse(result []byte) *MessageBlockchainLastRandomSeedResponse + type MessageBlockchainLastRoundRequest struct + func NewMessageBlockchainLastRoundRequest() *MessageBlockchainLastRoundRequest + type MessageBlockchainLastRoundResponse struct + Result uint64 + func NewMessageBlockchainLastRoundResponse(result uint64) *MessageBlockchainLastRoundResponse + type MessageBlockchainLastTimeStampRequest struct + func NewMessageBlockchainLastTimeStampRequest() *MessageBlockchainLastTimeStampRequest + type MessageBlockchainLastTimeStampResponse struct + Result uint64 + func NewMessageBlockchainLastTimeStampResponse(result uint64) *MessageBlockchainLastTimeStampResponse + type MessageBlockchainNewAddressRequest struct + CreatorAddress []byte + CreatorNonce uint64 + VmType []byte + func NewMessageBlockchainNewAddressRequest(creatorAddress []byte, creatorNonce uint64, vmType []byte) *MessageBlockchainNewAddressRequest + type MessageBlockchainNewAddressResponse struct + Result []byte + func NewMessageBlockchainNewAddressResponse(result []byte, err error) *MessageBlockchainNewAddressResponse + type MessageBlockchainProcessBuiltInFunctionRequest struct + Input *vmcommon.ContractCallInput + func NewMessageBlockchainProcessBuiltInFunctionRequest(input *vmcommon.ContractCallInput) *MessageBlockchainProcessBuiltInFunctionRequest + type MessageBlockchainProcessBuiltInFunctionResponse struct + VmOutput *SerializableVMOutput + func NewMessageBlockchainProcessBuiltInFunctionResponse(vmOutput *vmcommon.VMOutput, err error) *MessageBlockchainProcessBuiltInFunctionResponse + type MessageBlockchainRevertToSnapshotRequest struct + Snapshot int + func NewMessageBlockchainRevertToSnapshotRequest(snapshot int) *MessageBlockchainRevertToSnapshotRequest + type MessageBlockchainRevertToSnapshotResponse struct + func NewMessageBlockchainRevertToSnapshotResponse(err error) *MessageBlockchainRevertToSnapshotResponse + type MessageBlockchainSaveCompiledCodeRequest struct + Code []byte + CodeHash []byte + func NewMessageBlockchainSaveCompiledCodeRequest(codeHash []byte, code []byte) *MessageBlockchainSaveCompiledCodeRequest + type MessageBlockchainSaveCompiledCodeResponse struct + func NewMessageBlockchainSaveCompiledCodeResponse() *MessageBlockchainSaveCompiledCodeResponse + type MessageContractCallRequest struct + CallInput *vmcommon.ContractCallInput + func NewMessageContractCallRequest(input *vmcommon.ContractCallInput) *MessageContractCallRequest + type MessageContractDeployRequest struct + CreateInput *vmcommon.ContractCreateInput + func NewMessageContractDeployRequest(input *vmcommon.ContractCreateInput) *MessageContractDeployRequest + type MessageContractResponse struct + SerializableVMOutput *SerializableVMOutput + func NewMessageContractResponse(vmOutput *vmcommon.VMOutput, err error) *MessageContractResponse + type MessageDiagnoseWaitRequest struct + Milliseconds uint32 + func NewMessageDiagnoseWaitRequest(milliseconds uint32) *MessageDiagnoseWaitRequest + type MessageDiagnoseWaitResponse struct + func NewMessageDiagnoseWaitResponse() *MessageDiagnoseWaitResponse + type MessageGasScheduleChangeRequest struct + GasSchedule map[string]map[string]uint64 + func NewMessageGasScheduleChangeRequest(gasSchedule map[string]map[string]uint64) *MessageGasScheduleChangeRequest + type MessageHandler interface + DebugString func() string + GetError func() error + GetKind func() MessageKind + GetKindName func() string + GetNonce func() uint32 + SetError func(err error) + SetKind func(kind MessageKind) + SetNonce func(nonce uint32) + func CreateMessage(kind MessageKind) MessageHandler + type MessageInitialize struct + Arguments AndesArguments + func NewMessageInitialize(arguments AndesArguments) *MessageInitialize + type MessageKind uint32 + const BlockchainClearCompiledCodesRequest + const BlockchainClearCompiledCodesResponse + const BlockchainCurrentEpochRequest + const BlockchainCurrentEpochResponse + const BlockchainCurrentNonceRequest + const BlockchainCurrentNonceResponse + const BlockchainCurrentRandomSeedRequest + const BlockchainCurrentRandomSeedResponse + const BlockchainCurrentRoundRequest + const BlockchainCurrentRoundResponse + const BlockchainCurrentTimeStampRequest + const BlockchainCurrentTimeStampResponse + const BlockchainGetAllStateRequest + const BlockchainGetAllStateResponse + const BlockchainGetBlockhashRequest + const BlockchainGetBlockhashResponse + const BlockchainGetBuiltinFunctionNamesRequest + const BlockchainGetBuiltinFunctionNamesResponse + const BlockchainGetCodeRequest + const BlockchainGetCodeResponse + const BlockchainGetCompiledCodeRequest + const BlockchainGetCompiledCodeResponse + const BlockchainGetMECTTokenRequest + const BlockchainGetMECTTokenResponse + const BlockchainGetShardOfAddressRequest + const BlockchainGetShardOfAddressResponse + const BlockchainGetSnapshotRequest + const BlockchainGetSnapshotResponse + const BlockchainGetStateRootHashRequest + const BlockchainGetStateRootHashResponse + const BlockchainGetStorageDataRequest + const BlockchainGetStorageDataResponse + const BlockchainGetUserAccountRequest + const BlockchainGetUserAccountResponse + const BlockchainIsInterfaceNilRequest + const BlockchainIsInterfaceNilResponse + const BlockchainIsPayableRequest + const BlockchainIsPayableResponse + const BlockchainIsSmartContractRequest + const BlockchainIsSmartContractResponse + const BlockchainLastEpochRequest + const BlockchainLastEpochResponse + const BlockchainLastNonceRequest + const BlockchainLastNonceResponse + const BlockchainLastRandomSeedRequest + const BlockchainLastRandomSeedResponse + const BlockchainLastRoundRequest + const BlockchainLastRoundResponse + const BlockchainLastTimeStampRequest + const BlockchainLastTimeStampResponse + const BlockchainNewAddressRequest + const BlockchainNewAddressResponse + const BlockchainProcessBuiltInFunctionRequest + const BlockchainProcessBuiltInFunctionResponse + const BlockchainProcessBuiltinFunctionRequest + const BlockchainProcessBuiltinFunctionResponse + const BlockchainRevertToSnapshotRequest + const BlockchainRevertToSnapshotResponse + const BlockchainSaveCompiledCodeRequest + const BlockchainSaveCompiledCodeResponse + const ContractCallRequest + const ContractDeployRequest + const ContractResponse + const DiagnoseWaitRequest + const DiagnoseWaitResponse + const FirstKind + const GasScheduleChangeRequest + const GasScheduleChangeResponse + const Initialize + const LastKind + const Stop + const UndefinedRequestOrResponse + const VersionRequest + const VersionResponse + type MessageReplier func(MessageHandler) MessageHandler + func CreateReplySlots(noopReplier MessageReplier) []MessageReplier + type MessageStop struct + func NewMessageStop() *MessageStop + type MessageVersionRequest struct + func NewMessageVersionRequest() *MessageVersionRequest + type MessageVersionResponse struct + Version string + func NewMessageVersionResponse(version string) *MessageVersionResponse + type Messenger struct + Name string + Nonce uint32 + func NewMessenger(name string, receiver *Receiver, sender *Sender) *Messenger + func NewMessengerPipes(name string, reader *os.File, writer *os.File, ...) *Messenger + func (messenger *Messenger) Receive(timeout int) (MessageHandler, error) + func (messenger *Messenger) Reset() + func (messenger *Messenger) ResetDialogue() + func (messenger *Messenger) Send(message MessageHandler) error + func (messenger *Messenger) Shutdown() + type Receiver struct + func NewReceiver(reader *os.File, marshalizer marshaling.Marshalizer) *Receiver + func (receiver *Receiver) Receive(timeout int) (MessageHandler, int, error) + func (receiver *Receiver) Shutdown() error + type Sender struct + func NewSender(writer *os.File, marshalizer marshaling.Marshalizer) *Sender + func (sender *Sender) Send(message MessageHandler) (int, error) + func (sender *Sender) Shutdown() error + type SerializableMapStringBytes struct + Keys [][]byte + Values [][]byte + func NewSerializableMapStringBytes(data map[string][]byte) *SerializableMapStringBytes + func (s *SerializableMapStringBytes) ConvertToMap() map[string][]byte + type SerializableOutputAccount struct + Address []byte + Balance *big.Int + BalanceDelta *big.Int + Code []byte + CodeDeployerAddress []byte + CodeMetadata []byte + GasUsed uint64 + Nonce uint64 + StorageUpdates []*vmcommon.StorageUpdate + Transfers []SerializableOutputTransfer + func NewSerializableOutputAccount(account *vmcommon.OutputAccount) *SerializableOutputAccount + func (a *SerializableOutputAccount) ConvertToOutputAccount() *vmcommon.OutputAccount + type SerializableOutputTransfer struct + CallType vm.CallType + Data []byte + GasLimit uint64 + GasLocked uint64 + SenderAddress []byte + Value *big.Int + type SerializableVMOutput struct + CorrectedOutputAccounts []*SerializableOutputAccount + DeletedAccounts [][]byte + GasRefund *big.Int + GasRemaining uint64 + Logs []*vmcommon.LogEntry + ReturnCode vmcommon.ReturnCode + ReturnData [][]byte + ReturnMessage string + TouchedAccounts [][]byte + func NewSerializableVMOutput(vmOutput *vmcommon.VMOutput) *SerializableVMOutput + func (o *SerializableVMOutput) ConvertToVMOutput() *vmcommon.VMOutput + type UndefinedMessage struct + func NewUndefinedMessage() *UndefinedMessage