Versions in this module Expand all Collapse all v1 v1.1.66 Jun 17, 2021 v1.1.65 Jun 17, 2021 Changes in this version + const MetadataPayable + const MetadataReadable + const MetadataUpgradeable + type BlockchainHook interface + ClearCompiledCodes func() + 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 + GetCode func(UserAccountHandler) []byte + GetCompiledCode func(codeHash []byte) (bool, []byte) + GetESDTToken func(address []byte, tokenID []byte, nonce uint64) (*esdt.ESDigitalToken, error) + GetShardOfAddress func(address []byte) uint32 + GetSnapshot func() int + GetStateRootHash func() []byte + GetStorageData func(accountAddress []byte, index []byte) ([]byte, error) + GetUserAccount func(address []byte) (UserAccountHandler, error) + IsInterfaceNil func() bool + IsPayable func(address []byte) (bool, 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) + RevertToSnapshot func(snapshot int) error + SaveCompiledCode func(codeHash []byte, code []byte) + type CallType int + const AsynchronousCall + const AsynchronousCallBack + const DirectCall + const ESDTTransferAndExecute + type CodeMetadata struct + Payable bool + Readable bool + Upgradeable bool + func CodeMetadataFromBytes(bytes []byte) CodeMetadata + func (metadata *CodeMetadata) ToBytes() []byte + type ContractCallInput struct + AllowInitFunction bool + 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) + IsInterfaceNil func() bool + 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 + Code []byte + CodeDeployerAddress []byte + CodeMetadata []byte + GasUsed uint64 + Nonce uint64 + OutputTransfers []OutputTransfer + StorageUpdates map[string]*StorageUpdate + func (o *OutputAccount) MergeOutputAccounts(outAcc *OutputAccount) + func (o *OutputAccount) MergeStorageUpdates(outAcc *OutputAccount) + type OutputTransfer struct + CallType CallType + Data []byte + GasLimit uint64 + GasLocked uint64 + SenderAddress []byte + Value *big.Int + 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 + 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 + GasScheduleChange func(newGasSchedule map[string]map[string]uint64) + GetVersion func() string + IsInterfaceNil func() bool + 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 + ESDTTokenName []byte + ESDTTokenNonce uint64 + ESDTTokenType uint32 + ESDTValue *big.Int + GasLocked uint64 + GasPrice uint64 + GasProvided uint64 + OriginalTxHash []byte + PrevTxHash []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)