# Packages

No description provided by the author
No description provided by the author

# Functions

BooleanToInt returns 1 if the given bool is true, 0 otherwise.
CustomStorageKey appends the given key type to the given associated key.
GetBigIntContext returns the big int context.
GetBlockchainContext returns the blockchain context.
GetCryptoContext returns the crypto context.
GetMeteringContext returns the metering context.
GetOutputContext returns the output context.
GetRuntimeContext returns the runtime context.
GetSCCode returns the SC code from a given file.
GetStorageContext returns the storage context.
GetVMHost returns the vm Context from the vm context map.
GuardedGetBytesSlice returns a chunk from the given data.
GuardedMakeByteSlice2D creates a new two-dimensional byte slice of the given dimension.
IfNil tests if the provided interface pointer or underlying object is nil.
InverseBytes reverses the bytes of the given byte slice.
PadBytesLeft adds a padding of the given size to the left the byte slice.
U64ToLEB128 encodes an uint64 using LEB128 (Little Endian Base 128), used in WASM bytecode See https://en.wikipedia.org/wiki/LEB128 Copied from https://github.com/filecoin-project/go-leb128/blob/master/leb128.go.
WithFault returns true if the error is not nil, and uses the remaining gas if the execution has failed.

# Constants

AddressLen specifies the length of the address.
AsyncBuiltinFuncCrossShard indicates that the async call is a cross-shard call to a built-in function, which is executed half in-shard, half cross-shard.
AsyncBuiltinFuncIntraShard indicates that the async call is an intra-shard built in function call.
AsyncCallPending is the status of an async call that awaits complete execution.
AsyncCallRejected is the status of an async call that was executed completely but unsuccessfully.
AsyncCallResolved is the status of an async call that was executed completely and successfully.
AsyncDataPrefix is the storage key prefix used for AsyncContext-related storage.
AsyncUnknown indicates that the async call cannot be executed locally, and must be forwarded to the destination account.
BalanceLen specifies the number of bytes on which the balance is stored.
BreakpointAsyncCall means that Wasmer must stop immediately so VM can execute an AsyncCall.
BreakpointExecutionFailed means that Wasmer must stop immediately due to failure indicated by VM.
BreakpointNone signifies the lack of a breakpoint.
BreakpointOutOfGas means that Wasmer must stop immediately due to gas being exhausted.
BreakpointSignalError means that Wasmer must stop immediately due to a contract-signalled error.
CallbackFunctionName is the name of the default asynchronous callback function of a smart contract.
CodeMetadataLen specifies the length of the code metadata.
ESDTTransferOnCallBack indicated that the async call is actually a callback with ESDT transfer.
HashLen specifies the lenghth of a hash.
InitFunctionName specifies the name for the init function.
InitFunctionNameEth specifies the name for the init function on Ethereum.
ProtectedStoragePrefix is the storage key prefix that will be protected by VM explicitly, and implicitly by the node due to '@'; the protection can be disabled temporarily by the StorageContext.
StorageAdded signals that something was added to storage.
StorageDeleted signals that something was removed from storage.
StorageModified signals that the storage has been modified.
StorageUnchanged signals that the storage was not changed.
SyncCall indicates that the async call can be executed synchronously, with its corresponding callback.
TimeLockKeyPrefix is the storage key prefix used for timelock-related storage.
UpgradeFunctionName specifies if the call is an upgradeContract call.
No description provided by the author

# Variables

ErrAccountNotPayable signals that the value transfer to a non payable contract is not possible.
ErrArgIndexOutOfRange signals that the argument index is out of range.
ErrArgOutOfRange signals that the argument is out of range.
ErrAsyncContextDoesNotExist signals that the async context does not exist.
ErrBadBounds signals that a certain variable is out of bounds.
ErrBadLowerBounds signals that a certain variable is lower than allowed.
ErrBadUpperBounds signals that a certain variable is higher than allowed.
ErrBitwiseNegative signals that an attempt to apply a bitwise operation on negative numbers has been made.
ErrBuiltinCallOnSameContextDisallowed signals that calling a built-in function on the same context is not allowed.
ErrCallBackFuncCalledInRun signals that a callback func was called directly, which is forbidden.
ErrCallBackFuncNotExpected signals that an unexpected callback was received.
ErrCannotWriteProtectedKey signals an attempt to write to a protected key, while storage protection is enforced.
ErrContractInvalid signals that the contract code is invalid.
ErrContractNotFound signals that the contract was not found.
ErrDeploymentOverExistingAccount signals that an attempt to deploy a new SC over an already existing account has been made.
ErrDivZero signals that an attempt to divide by 0 has been made.
ErrExecutionFailed signals that the execution failed.
ErrFailedTransfer signals that the transfer operation has failed.
ErrFuncNotFound signals that the the function does not exist.
ErrFunctionNonvoidSignature signals that the signature for the function is invalid.
ErrInitFuncCalledInRun signals that the init func was called directly, which is forbidden.
ErrInputAndOutputGasDoesNotMatch is raised when the output gas (gas used + gas locked + gas remaining) is not equal to the input gas.
ErrInvalidAccount signals that a certain account does not exist.
ErrInvalidCallOnReadOnlyMode signals that an operation is not permitted due to read only mode.
ErrInvalidFunction signals that the function is invalid.
ErrInvalidFunctionName signals that the function name is invalid.
ErrInvalidPublicKeySize signals that the public key size is invalid.
ErrInvalidUpgradeArguments signals that the upgrade process failed due to invalid arguments.
ErrMaxInstancesReached signals that the max number of Wasmer instances has been reached.
ErrMemoryDeclarationMissing signals that a memory declaration is missing.
ErrNegativeLength signals that the given length is less than 0.
ErrNilCallbackFunction signals that a nil callback function has been provided.
ErrNilContract signals that the contract is nil.
ErrNilEnableEpochsHandler signals that enable epochs handler is nil.
ErrNonPayableFunctionEgld signals that a non-payable function received non-zero call value.
ErrNonPayableFunctionEsdt signals that a non-payable function received non-zero ESDT call value.
ErrNotEnoughGas signals that there is not enough gas for the operation.
ErrReturnCodeNotOk signals that the returned code is different than vmcommon.Ok.
ErrShiftNegative signals that an attempt to apply a bitwise shift operation on negative numbers has been made.
ErrSignalError is given when the smart contract signals an error.
ErrStorageValueOutOfRange signals that the storage value is out of range.
ErrStoreReservedKey signals that an attempt to write under an reserved key has been made.
ErrSyncExecutionNotInSameShard signals that the sync execution request is not in the same shard.
ErrTransferInsufficientFunds signals that the transfer has failed due to insufficient funds.
ErrTransferNegativeValue signals that the transfer has failed due to the fact that the value is less than 0.
ErrTransferValueOnESDTCall signals that balance transfer was given in esdt call.
ErrUnhandledRuntimeBreakpoint signals that the runtime breakpoint is unhandled.
ErrUpgradeFailed signals that the upgrade encountered an error.
ErrUpgradeNotAllowed signals that an upgrade is not allowed.
Zero is the big integer 0.

# Structs

AsyncCallInfo contains the information required to handle the asynchronous call of another SmartContract.
AsyncContext is a structure containing a group of async calls and a callback that should be called when all these async calls are resolved.
AsyncContextInfo is the structure resulting after a smart contract call that has initiated one or more async calls.
AsyncGeneratedCall holds the information abount an async call.
CodeDeployInput contains code deploy state, whether it comes from a ContractCreateInput or a ContractCallInput.
VMHostParameters represents the parameters to be passed to VMHost.

# Interfaces

AsyncCallInfoHandler defines the functionality for working with AsyncCallInfo.
BigIntContext defines the functionality needed for interacting with the big int context.
BlockchainContext defines the functionality needed for interacting with the blockchain context.
CallArgsParser defines the functionality to parse transaction data for a smart contract call.
EnableEpochsHandler is used to verify which flags are set in a specific epoch based on EnableEpochs config.
InstanceBuilder defines the functionality needed to create Wasmer instances.
MeteringContext defines the functionality needed for interacting with the metering context.
OutputContext defines the functionality needed for interacting with the output context.
RuntimeContext defines the functionality needed for interacting with the runtime context.
StateStack defines the functionality for working with a state stack.
StorageContext defines the functionality needed for interacting with the storage context.
VMHost defines the functionality for working with the VM.

# Type aliases

AsyncCallExecutionMode encodes the execution modes of an AsyncCall.
AsyncCallStatus represents the different status an async call can have.
BreakpointValue encodes Wasmer runtime breakpoint types.
StorageStatus defines the states the storage can be in.