Skip to main content

Types

To call core contracts from Move you have to encode the parameters using BCS. This page lists custom enums and structs used.

Enums

AgentID

NameType
NoTypenull
AddressAgentIDIscAddressAgentID
ContractAgentIDIscContractAgentID
EthereumAddressAgentIDIscEthereumAddressAgentID
NilAgentIDIscNilAgentID

Request

NameType
OnLedgerOnLedgerRequestData
OffLedgerOffLedgerRequestData
EVMOffLedgerTxevmOffLedgerTxRequest

VMErrorParam

NameType
NoTypenull
uint16u16
int64[u8; 8]
stringstring
uint8u8
int32[u8; 4]
uint64u64
int16[u8; 2]
uint32u32

Maps

CoinBalances

[CoinType][u64]

Structs

AccessNodeData

NameType
ValidatorAddr[u8; 32]
Certificate[u8]
ForCommitteebool
AccessAPIstring

AccessNodeInfo

NameType
NodePubKey[u8; 32]
AccessNodeDataAccessNodeData

Anchor

NameType
iD[u8; 32]
assetsReferent_AssetsBag
stateMetadata[u8]
stateIndexu32

AnchorWithRef

NameType
objectRefObjectRef
objectAnchor
owner[u8; 32]

Assets

NameType
CoinsCoinBalances
Objects[u8; 32]

AssetsBag

NameType
iD[u8; 32]
sizeu64

AssetsBagWithBalances

NameType
AssetsBagAssetsBag
AssetsAssets

BlockInfo

NameType
schemaVersionu8
blockIndexu32
timestampu64
previousAnchorStateAnchor
l1ParamsL1Params
totalRequestsu16
numSuccessfulRequestsu16
numOffLedgerRequestsu16
gasBurnedu64
gasFeeChargedu64

CallTarget

NameType
contractu32
entryPointu32

ChainInfo

NameType
chainID[u8; 32]
chainOwnerID[u8; 32]
gasFeePolicyFeePolicy
gasLimitsLimits
blockKeepAmount[u8; 4]
publicURLstring
metadataPublicChainMetadata

CoinType

NameType
sstring

ContractIdentity

NameType
kindu8
evmAddr[u8, 20]
hnameu32

ContractRecord

NameType
Namestring

Event

NameType
ContractIDu32
Topicstring
Timestampu64
Payload[u8]

FeePolicy

NameType
eVMGasRatioRatio32
gasPerTokenRatio32
validatorFeeShareu8

GasBurnLog

NameType
records[GasBurnRecord]

GasBurnRecord

NameType
codeu16
gasBurnedu64

IotaCoinInfo

NameType
CoinTypeCoinType
Decimalsu8
Namestring
Symbolstring
Descriptionstring
IconURLstring
TotalSupplyu64

L1Params

NameType
protocolProtocol
baseTokenIotaCoinInfo

Limits

NameType
maxGasPerBlocku64
minGasPerRequestu64
maxGasPerRequestu64
maxGasExternalViewCallu64

Message

NameType
TargetCallTarget
Params[[byte]]

ObjectRef

NameType
objectID[u8; 32]
versionu64
digest[u8]

OnLedgerRequestData

NameType
requestRefObjectRef
senderAddress*[u8; 32]
targetAddress*[u8; 32]
assets*Assets
assetsBag*AssetsBagWithBalances
requestMetadata*RequestMetadata

Protocol

NameType
epochBigInt
protocolVersionBigInt
systemStateVersionBigInt
iotaTotalSupplyBigInt
referenceGasPriceBigInt
epochStartTimestampMsBigInt
epochDurationMsBigInt

PublicChainMetadata

NameType
eVMJsonRPCURLstring
eVMWebSocketURLstring
namestring
descriptionstring
websitestring

Ratio32

NameType
Au32
Bu32

Referent_AssetsBag

NameTypeoptional
iD[u8; 32]No
valueAssetsBagYes

RequestMetadata

NameType
senderContractContractIdentity
messageMessage
allowance*Assets
gasBudgetu64

RequestReceipt

NameType
RequestRequest
ErrorIscUnresolvedVMError (optional)
GasBudgetu64
GasBurnedu64
GasFeeChargedu64
GasBurnLogGasBurnLog
BlockIndexu32
RequestIndexu16

RequestReceiptsResponse

NameType
BlockIndexu32
Receipts[RequestReceipt]

StateAnchor

NameType
anchorAnchorWithRef
iscPackage[u8; 32]

UnresolvedVMError

NameType
errorCodeIscVMErrorCode
params[VMErrorParam]

VMErrorCode

NameType
contractIDu32
iDu16