motherearthapi

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleMint = 1 << iota
	RoleBurn
	RoleNFTCreate
	RoleNFTAddQuantity
	RoleNFTBurn
)

Variables

This section is empty.

Functions

func BigFloatImports

func BigFloatImports(imports motherearthapimeta.EIFunctionReceiver) error

BigFloatImports creates a new wasmer.Imports populated with the BigFloat API methods

func BigIntImports

func BigIntImports(imports motherearthapimeta.EIFunctionReceiver) error

BigIntImports creates a new wasmer.Imports populated with the BigInt API methods

func BigIntToStringWithHost

func BigIntToStringWithHost(host andes.VMHost, bigIntHandle int32, destinationHandle int32)

func CleanReturnDataWithHost

func CleanReturnDataWithHost(host andes.VMHost)

CleanReturnDataWithHost - exposed version of v1_4_deleteFromReturnData for tests

func DeleteFromReturnDataWithHost

func DeleteFromReturnDataWithHost(host andes.VMHost, resultID int32)

DeleteFromReturnDataWithHost - exposed version of v1_4_deleteFromReturnData for tests

func DeployFromSourceContractWithTypedArgs

func DeployFromSourceContractWithTypedArgs(
	host andes.VMHost,
	sourceContractAddress []byte,
	codeMetadata []byte,
	value *big.Int,
	data [][]byte,
	gasLimit int64,
) ([]byte, error)

DeployFromSourceContractWithTypedArgs - deployFromSourceContract with args already read from memory

func ExecuteOnDestContextByCallerWithHost

func ExecuteOnDestContextByCallerWithHost(
	host andes.VMHost,
	gasLimit int64,
	addressOffset int32,
	valueOffset int32,
	functionOffset int32,
	functionLength int32,
	numArguments int32,
	argumentsLengthOffset int32,
	dataOffset int32,
) int32

ExecuteOnDestContextByCallerWithHost - executeOnDestContextByCaller with host instead of pointer context

func ExecuteOnDestContextByCallerWithTypedArgs

func ExecuteOnDestContextByCallerWithTypedArgs(
	host andes.VMHost,
	gasLimit int64,
	value *big.Int,
	function []byte,
	dest []byte,
	args [][]byte,
) int32

ExecuteOnDestContextByCallerWithTypedArgs - executeOnDestContextByCaller with args already read from memory

func ExecuteOnDestContextWithHost

func ExecuteOnDestContextWithHost(
	host andes.VMHost,
	gasLimit int64,
	addressOffset int32,
	valueOffset int32,
	functionOffset int32,
	functionLength int32,
	numArguments int32,
	argumentsLengthOffset int32,
	dataOffset int32,
) int32

ExecuteOnDestContextWithHost - executeOnDestContext with host instead of pointer context

func ExecuteOnDestContextWithTypedArgs

func ExecuteOnDestContextWithTypedArgs(
	host andes.VMHost,
	gasLimit int64,
	value *big.Int,
	function []byte,
	dest []byte,
	args [][]byte,
) int32

ExecuteOnDestContextWithTypedArgs - executeOnDestContext with args already read from memory

func ExecuteOnSameContextWithHost

func ExecuteOnSameContextWithHost(
	host andes.VMHost,
	gasLimit int64,
	addressOffset int32,
	valueOffset int32,
	functionOffset int32,
	functionLength int32,
	numArguments int32,
	argumentsLengthOffset int32,
	dataOffset int32,
) int32

ExecuteOnSameContextWithHost - executeOnSameContext with host instead of pointer context

func ExecuteOnSameContextWithTypedArgs

func ExecuteOnSameContextWithTypedArgs(
	host andes.VMHost,
	gasLimit int64,
	value *big.Int,
	function []byte,
	dest []byte,
	args [][]byte,
) int32

ExecuteOnSameContextWithTypedArgs - executeOnSameContext with args already read from memory

func ExecuteReadOnlyWithHost

func ExecuteReadOnlyWithHost(
	host andes.VMHost,
	gasLimit int64,
	addressOffset int32,
	functionOffset int32,
	functionLength int32,
	numArguments int32,
	argumentsLengthOffset int32,
	dataOffset int32,
) int32

ExecuteReadOnlyWithHost - executeReadOnly with host instead of pointer context

func ExecuteReadOnlyWithTypedArguments

func ExecuteReadOnlyWithTypedArguments(
	host andes.VMHost,
	gasLimit int64,
	function []byte,
	dest []byte,
	args [][]byte,
) int32

ExecuteReadOnlyWithTypedArguments - executeReadOnly with args already read from memory

func GetReturnDataWithHostAndTypedArgs

func GetReturnDataWithHostAndTypedArgs(host andes.VMHost, resultID int32) []byte

func ManagedAsyncCallWithHost

func ManagedAsyncCallWithHost(
	host andes.VMHost,
	destHandle int32,
	valueHandle int32,
	functionHandle int32,
	argumentsHandle int32)

func ManagedBufferCopyByteSliceWithHost

func ManagedBufferCopyByteSliceWithHost(host andes.VMHost, sourceHandle int32, startingPosition int32, sliceLength int32, destinationHandle int32) int32

func ManagedBufferImports

func ManagedBufferImports(imports motherearthapimeta.EIFunctionReceiver) error

ManagedBufferImports creates a new wasmer.Imports populated with the ManagedBuffer API methods

func ManagedBufferSetByteSliceWithHost

func ManagedBufferSetByteSliceWithHost(host andes.VMHost, mBufferHandle int32, startingPosition int32, dataLength int32, dataOffset int32) int32

func ManagedBufferSetByteSliceWithTypedArgs

func ManagedBufferSetByteSliceWithTypedArgs(host andes.VMHost, mBufferHandle int32, startingPosition int32, dataLength int32, data []byte) int32

func ManagedBufferToHexWithHost

func ManagedBufferToHexWithHost(host andes.VMHost, sourceHandle int32, destHandle int32)

func ManagedEIImports

func ManagedEIImports(imports motherearthapimeta.EIFunctionReceiver) error

ManagedEIImports creates a new wasmer.Imports populated with variants of the API methods that use managed types only.

func ManagedIsMECTFrozenWithHost

func ManagedIsMECTFrozenWithHost(
	host andes.VMHost,
	addressHandle int32,
	tokenIDHandle int32,
	nonce int64) int32

func ManagedIsMECTLimitedTransferWithHost

func ManagedIsMECTLimitedTransferWithHost(host andes.VMHost, tokenIDHandle int32) int32

func ManagedIsMECTPausedWithHost

func ManagedIsMECTPausedWithHost(host andes.VMHost, tokenIDHandle int32) int32

func MotherEarthEIImports

func MotherEarthEIImports(imports motherearthapimeta.EIFunctionReceiver) error

MotherEarthEIImports creates a new wasmer.Imports populated with the MotherEarthEI API methods

func SetStorageLockWithHost

func SetStorageLockWithHost(host andes.VMHost, keyOffset int32, keyLength int32, lockTimestamp int64) int32

SetStorageLockWithHost - setStorageLock with host instead of pointer context

func SetStorageLockWithTypedArgs

func SetStorageLockWithTypedArgs(host andes.VMHost, key []byte, lockTimestamp int64) int32

SetStorageLockWithTypedArgs - setStorageLock with args already read from memory

func SmallIntImports

func SmallIntImports(imports motherearthapimeta.EIFunctionReceiver) error

SmallIntImports creates a new wasmer.Imports populated with the small int (int64/uint64) API methods

func StorageLoadFromAddressWithHost

func StorageLoadFromAddressWithHost(host andes.VMHost, addressOffset int32, keyOffset int32, keyLength int32, dataOffset int32) int32

StorageLoadFromAddressWithHost - storageLoadFromAddress with host instead of pointer context

func StorageLoadFromAddressWithTypedArgs

func StorageLoadFromAddressWithTypedArgs(host andes.VMHost, address []byte, key []byte) []byte

StorageLoadFromAddressWithTypedArgs - storageLoadFromAddress with args already read from memory

func StorageLoadWithHost

func StorageLoadWithHost(host andes.VMHost, keyOffset int32, keyLength int32, dataOffset int32) int32

StorageLoadWithHost - storageLoad with host instead of pointer context

func StorageLoadWithWithTypedArgs

func StorageLoadWithWithTypedArgs(host andes.VMHost, key []byte) []byte

StorageLoadWithWithTypedArgs - storageLoad with args already read from memory

func StorageStoreWithHost

func StorageStoreWithHost(host andes.VMHost, keyOffset int32, keyLength int32, dataOffset int32, dataLength int32) int32

StorageStoreWithHost - storageStore with host instead of pointer context

func StorageStoreWithTypedArgs

func StorageStoreWithTypedArgs(host andes.VMHost, key []byte, data []byte) int32

StorageStoreWithTypedArgs - storageStore with args already read from memory

func TransferMECTNFTExecuteWithHost

func TransferMECTNFTExecuteWithHost(
	host andes.VMHost,
	destOffset int32,
	tokenIDOffset int32,
	tokenIDLen int32,
	valueOffset int32,
	nonce int64,
	gasLimit int64,
	functionOffset int32,
	functionLength int32,
	numArguments int32,
	argumentsLengthOffset int32,
	dataOffset int32,
) int32

TransferMECTNFTExecuteWithHost contains only memory reading of arguments

func TransferMECTNFTExecuteWithTypedArgs

func TransferMECTNFTExecuteWithTypedArgs(
	host andes.VMHost,
	dest []byte,
	transfers []*vmcommon.MECTTransfer,
	gasLimit int64,
	function []byte,
	data [][]byte,
) int32

TransferMECTNFTExecuteWithTypedArgs defines the actual transfer MECT execute logic

func TransferValueExecuteWithHost

func TransferValueExecuteWithHost(
	host andes.VMHost,
	destOffset int32,
	valueOffset int32,
	gasLimit int64,
	functionOffset int32,
	functionLength int32,
	numArguments int32,
	argumentsLengthOffset int32,
	dataOffset int32,
) int32

TransferValueExecuteWithHost - transferValueExecute with host instead of pointer context

func TransferValueExecuteWithTypedArgs

func TransferValueExecuteWithTypedArgs(
	host andes.VMHost,
	dest []byte,
	value *big.Int,
	gasLimit int64,
	function []byte,
	args [][]byte,
) int32

TransferValueExecuteWithTypedArgs - transferValueExecute with args already read from memory

func UpgradeFromSourceContractWithTypedArgs

func UpgradeFromSourceContractWithTypedArgs(
	host andes.VMHost,
	sourceContractAddress []byte,
	destContractAddress []byte,
	value []byte,
	data [][]byte,
	gasLimit int64,
	codeMetadata []byte,
)

UpgradeFromSourceContractWithTypedArgs - upgradeFromSourceContract with args already read from memory

func ValidateToken

func ValidateToken(tokenID []byte) bool

ValidateToken - validates the token ID

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL