Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2024 Changes in this version + var ErrAddressLengthNotCorrect = errors.New("address length is not correct") + var ErrEmptyCode = errors.New("empty code in provided smart contract holding account") + var ErrNilBlockchainHookCounter = errors.New("nil blockchain hook counter") + var ErrNilMissingTrieNodesNotifier = errors.New("nil missing trie nodes notifier") + var ErrNotImplemented = errors.New("not implemented") + var ErrVMTypeLengthIsNotCorrect = errors.New("vm type length is not correct") + type ArgBlockChainHook struct + Accounts state.AccountsAdapter + BlockChain data.ChainHandler + BuiltInFunctions vmcommon.BuiltInFunctionContainer + CompiledSCPool storage.Cacher + ConfigSCStorage config.StorageConfig + Counter BlockChainHookCounter + DataPool dataRetriever.PoolsHolder + EnableEpochs config.EnableEpochs + EnableEpochsHandler common.EnableEpochsHandler + EpochNotifier vmcommon.EpochNotifier + GasSchedule core.GasScheduleNotifier + GlobalSettingsHandler vmcommon.DCDTGlobalSettingsHandler + Marshalizer marshal.Marshalizer + MissingTrieNodesNotifier common.MissingTrieNodesNotifier + NFTStorageHandler vmcommon.SimpleDCDTNFTStorageHandler + NilCompiledSCStore bool + PubkeyConv core.PubkeyConverter + ShardCoordinator sharding.Coordinator + StorageService dataRetriever.StorageService + Uint64Converter typeConverters.Uint64ByteSliceConverter + WorkingDir string + type BlockChainHookCounter interface + GetCounterValues func() map[string]uint64 + IsInterfaceNil func() bool + ProcessCrtNumberOfTrieReadsCounter func() error + ProcessMaxBuiltInCounters func(input *vmcommon.ContractCallInput) error + ResetCounters func() + SetMaximumValues func(mapsOfValues map[string]uint64) + type BlockChainHookImpl struct + func NewBlockChainHookImpl(args ArgBlockChainHook) (*BlockChainHookImpl, error) + func (bh *BlockChainHookImpl) ApplyFiltersOnSCCodeMetadata(codeMetadata vmcommon.CodeMetadata) vmcommon.CodeMetadata + func (bh *BlockChainHookImpl) ClearCompiledCodes() + func (bh *BlockChainHookImpl) Close() error + func (bh *BlockChainHookImpl) CurrentEpoch() uint32 + func (bh *BlockChainHookImpl) CurrentNonce() uint64 + func (bh *BlockChainHookImpl) CurrentRandomSeed() []byte + func (bh *BlockChainHookImpl) CurrentRound() uint64 + func (bh *BlockChainHookImpl) CurrentTimeStamp() uint64 + func (bh *BlockChainHookImpl) DeleteCompiledCode(codeHash []byte) + func (bh *BlockChainHookImpl) EpochConfirmed(epoch uint32, _ uint64) + func (bh *BlockChainHookImpl) ExecuteSmartContractCallOnOtherVM(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) + func (bh *BlockChainHookImpl) FilterCodeMetadataForUpgrade(input []byte) ([]byte, error) + func (bh *BlockChainHookImpl) GasScheduleChange(gasSchedule map[string]map[string]uint64) + func (bh *BlockChainHookImpl) GetAccountsAdapter() state.AccountsAdapter + func (bh *BlockChainHookImpl) GetAllState(_ []byte) (map[string][]byte, error) + func (bh *BlockChainHookImpl) GetBlockhash(nonce uint64) ([]byte, error) + func (bh *BlockChainHookImpl) GetBuiltinFunctionNames() vmcommon.FunctionNames + func (bh *BlockChainHookImpl) GetBuiltinFunctionsContainer() vmcommon.BuiltInFunctionContainer + func (bh *BlockChainHookImpl) GetCode(account vmcommon.UserAccountHandler) []byte + func (bh *BlockChainHookImpl) GetCompiledCode(codeHash []byte) (bool, []byte) + func (bh *BlockChainHookImpl) GetCounterValues() map[string]uint64 + func (bh *BlockChainHookImpl) GetDCDTToken(address []byte, tokenID []byte, nonce uint64) (*dcdt.DCDigitalToken, error) + func (bh *BlockChainHookImpl) GetShardOfAddress(address []byte) uint32 + func (bh *BlockChainHookImpl) GetSnapshot() int + func (bh *BlockChainHookImpl) GetStateRootHash() []byte + func (bh *BlockChainHookImpl) GetStorageData(accountAddress []byte, index []byte) ([]byte, uint32, error) + func (bh *BlockChainHookImpl) GetUserAccount(address []byte) (vmcommon.UserAccountHandler, error) + func (bh *BlockChainHookImpl) IsBuiltinFunctionName(functionName string) bool + func (bh *BlockChainHookImpl) IsInterfaceNil() bool + func (bh *BlockChainHookImpl) IsLimitedTransfer(tokenID []byte) bool + func (bh *BlockChainHookImpl) IsPaused(tokenID []byte) bool + func (bh *BlockChainHookImpl) IsPayable(sndAddress []byte, recvAddress []byte) (bool, error) + func (bh *BlockChainHookImpl) IsSmartContract(address []byte) bool + func (bh *BlockChainHookImpl) LastEpoch() uint32 + func (bh *BlockChainHookImpl) LastNonce() uint64 + func (bh *BlockChainHookImpl) LastRandomSeed() []byte + func (bh *BlockChainHookImpl) LastRound() uint64 + func (bh *BlockChainHookImpl) LastTimeStamp() uint64 + func (bh *BlockChainHookImpl) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) + func (bh *BlockChainHookImpl) NumberOfShards() uint32 + func (bh *BlockChainHookImpl) ProcessBuiltInFunction(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) + func (bh *BlockChainHookImpl) ResetCounters() + func (bh *BlockChainHookImpl) RevertToSnapshot(snapshot int) error + func (bh *BlockChainHookImpl) SaveCompiledCode(codeHash []byte, code []byte) + func (bh *BlockChainHookImpl) SaveNFTMetaDataToSystemAccount(tx data.TransactionHandler) error + func (bh *BlockChainHookImpl) SetCurrentHeader(hdr data.HeaderHandler) + func (bh *BlockChainHookImpl) SetVMContainer(vmContainer process.VirtualMachinesContainer) error + type VMCryptoHook struct + func NewVMCryptoHook() *VMCryptoHook + func (vmch *VMCryptoHook) Ecrecover(_ []byte, _ []byte, _ []byte, _ []byte) ([]byte, error) + func (vmch *VMCryptoHook) IsInterfaceNil() bool + func (vmch *VMCryptoHook) Keccak256(data []byte) ([]byte, error) + func (vmch *VMCryptoHook) Ripemd160(data []byte) ([]byte, error) + func (vmch *VMCryptoHook) Sha256(data []byte) ([]byte, error)