Versions in this module Expand all Collapse all v0 v0.0.1 Sep 29, 2023 Changes in this version + const METADATA_RESERVED_1 + const METADATA_RESERVED_2 + const METADATA_RESERVED_3 + const METADATA_UPGRADEABLE + type BlockchainHook interface + CurrentEpoch func() uint32 + CurrentNonce func() uint64 + CurrentRandomSeed func() []byte + CurrentRound func() uint64 + CurrentTimeStamp func() uint64 + GetAllState func(address []byte) (map[string][]byte, error) + GetBlockhash func(nonce uint64) ([]byte, error) + GetBuiltinFunctionNames func() FunctionNames + GetShardOfAddress func(address []byte) uint32 + GetStateRootHash func() []byte + GetStorageData func(accountAddress []byte, index []byte) ([]byte, error) + GetUserAccount func(address []byte) (UserAccountHandler, error) + IsSmartContract func(address []byte) bool + LastEpoch func() uint32 + LastNonce func() uint64 + LastRandomSeed func() []byte + LastRound func() uint64 + LastTimeStamp func() uint64 + NewAddress func(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) + ProcessBuiltInFunction func(input *ContractCallInput) (*VMOutput, error) + type CallType int + const AsynchronousCall + const AsynchronousCallBack + const DirectCall + type CodeMetadata struct + Upgradeable bool + func CodeMetadataFromBytes(bytes []byte) CodeMetadata + func (metadata *CodeMetadata) ToBytes() []byte + type ContractCallInput struct + Function string + RecipientAddr []byte + type ContractCreateInput struct + ContractCode []byte + ContractCodeMetadata []byte + type CryptoHook interface + Ecrecover func(hash []byte, recoveryID []byte, r []byte, s []byte) ([]byte, error) + Keccak256 func(data []byte) ([]byte, error) + Ripemd160 func(data []byte) ([]byte, error) + Sha256 func(data []byte) ([]byte, error) + type FunctionNames = map[string]struct + type LogEntry struct + Address []byte + Data []byte + Identifier []byte + Topics [][]byte + type OutputAccount struct + Address []byte + Balance *big.Int + BalanceDelta *big.Int + CallType CallType + Code []byte + CodeMetadata []byte + Data []byte + GasLimit uint64 + Nonce uint64 + StorageUpdates map[string]*StorageUpdate + type ReturnCode int + const AccountCollision + const CallStackOverFlow + const ContractInvalid + const ContractNotFound + const ExecutionFailed + const FunctionNotFound + const FunctionWrongSignature + const Ok + const OutOfFunds + const OutOfGas + const UpgradeFailed + const UserError + func (rc ReturnCode) String() string + type ReturnDataKind int + const AsBigInt + const AsBigIntString + const AsHex + const AsString + type StorageUpdate struct + Data []byte + Offset []byte + type UserAccountHandler interface + AddressBytes func() []byte + GetBalance func() *big.Int + GetCode func() []byte + GetCodeHash func() []byte + GetCodeMetadata func() []byte + GetDeveloperReward func() *big.Int + GetNonce func() uint64 + GetOwnerAddress func() []byte + GetRootHash func() []byte + GetUserName func() []byte + IsInterfaceNil func() bool + type VMExecutionHandler interface + RunSmartContractCall func(input *ContractCallInput) (*VMOutput, error) + RunSmartContractCreate func(input *ContractCreateInput) (*VMOutput, error) + type VMInput struct + Arguments [][]byte + CallType CallType + CallValue *big.Int + CallerAddr []byte + CurrentTxHash []byte + GasPrice uint64 + GasProvided uint64 + OriginalTxHash []byte + type VMOutput struct + DeletedAccounts [][]byte + GasRefund *big.Int + GasRemaining uint64 + Logs []*LogEntry + OutputAccounts map[string]*OutputAccount + ReturnCode ReturnCode + ReturnData [][]byte + ReturnMessage string + TouchedAccounts [][]byte + func (vmOutput *VMOutput) GetFirstReturnData(asType ReturnDataKind) (interface{}, error)