Skip to main content
Version: v1.4

ISCTypes

ISC_MAGIC_ADDRESS

address ISC_MAGIC_ADDRESS

ISC_ERC20BASETOKENS_ADDRESS

address ISC_ERC20BASETOKENS_ADDRESS

ISC_ERC721_ADDRESS

address ISC_ERC721_ADDRESS

L1Address

struct L1Address {
bytes data;
}

L1AddressTypeEd25519

uint8 L1AddressTypeEd25519

L1AddressTypeAlias

uint8 L1AddressTypeAlias

L1AddressTypeNFT

uint8 L1AddressTypeNFT

NativeTokenID

struct NativeTokenID {
bytes data;
}

NativeToken

struct NativeToken {
struct NativeTokenID ID;
uint256 amount;
}

NativeTokenScheme

struct NativeTokenScheme {
uint256 mintedTokens;
uint256 meltedTokens;
uint256 maximumSupply;
}

NFTID

ISCNFT

struct ISCNFT {
NFTID ID;
struct L1Address issuer;
bytes metadata;
struct ISCAgentID owner;
}

IRC27NFTMetadata

struct IRC27NFTMetadata {
string standard;
string version;
string mimeType;
string uri;
string name;
string description;
}

IRC27NFT

struct IRC27NFT {
struct ISCNFT nft;
struct IRC27NFTMetadata metadata;
}

ISCTransactionID

ISCHname

ISCChainID

ISCAgentID

struct ISCAgentID {
bytes data;
}

ISCAgentIDKindNil

uint8 ISCAgentIDKindNil

ISCAgentIDKindAddress

uint8 ISCAgentIDKindAddress

ISCAgentIDKindContract

uint8 ISCAgentIDKindContract

ISCAgentIDKindEthereumAddress

uint8 ISCAgentIDKindEthereumAddress

ISCRequestID

struct ISCRequestID {
bytes data;
}

ISCDictItem

struct ISCDictItem {
bytes key;
bytes value;
}

ISCDict

struct ISCDict {
struct ISCDictItem[] items;
}

ISCSendMetadata

struct ISCSendMetadata {
ISCHname targetContract;
ISCHname entrypoint;
struct ISCDict params;
struct ISCAssets allowance;
uint64 gasBudget;
}

ISCAssets

struct ISCAssets {
uint64 baseTokens;
struct NativeToken[] nativeTokens;
NFTID[] nfts;
}

ISCSendOptions

struct ISCSendOptions {
int64 timelock;
struct ISCExpiration expiration;
}

ISCExpiration

struct ISCExpiration {
int64 time;
struct L1Address returnAddress;
}

ISCTokenProperties

struct ISCTokenProperties {
string name;
string tickerSymbol;
uint8 decimals;
uint256 totalSupply;
}

ISCTypes

L1AddressType

function L1AddressType(struct L1Address addr) internal pure returns (uint8)

Get the type of an L1 address.

Parameters

NameTypeDescription
addrstruct L1AddressThe L1 address.

Return Values

NameTypeDescription
[0]uint8The type of the L1 address. For more details about the types of L1 addresses, please refer to the IOTA Tangle Improvement Proposal (TIP) 18: https://wiki.iota.org/tips/tips/TIP-0018/#address-unlock-condition

newEthereumAgentID

function newEthereumAgentID(address addr, ISCChainID iscChainID) internal pure returns (struct ISCAgentID)

Create a new Ethereum AgentID.

Parameters

NameTypeDescription
addraddressThe Ethereum address.
iscChainIDISCChainIDThe ISC chain ID.

Return Values

NameTypeDescription
[0]struct ISCAgentIDThe new ISCAgentID.

newL1AgentID

function newL1AgentID(bytes l1Addr) internal pure returns (struct ISCAgentID)

Create a new L1 AgentID.

Parameters

NameTypeDescription
l1AddrbytesThe L1 address.

Return Values

NameTypeDescription
[0]struct ISCAgentIDThe new ISCAgentID.

isEthereum

function isEthereum(struct ISCAgentID a) internal pure returns (bool)

Check if an ISCAgentID is of Ethereum type.

Parameters

NameTypeDescription
astruct ISCAgentIDThe ISCAgentID to check.

Return Values

NameTypeDescription
[0]boolTrue if the ISCAgentID is of Ethereum type, false otherwise.

ethAddress

function ethAddress(struct ISCAgentID a) internal pure returns (address)

Get the Ethereum address from an ISCAgentID.

Parameters

NameTypeDescription
astruct ISCAgentIDThe ISCAgentID.

Return Values

NameTypeDescription
[0]addressThe Ethereum address.

chainID

function chainID(struct ISCAgentID a) internal pure returns (ISCChainID)

Get the chain ID from an ISCAgentID.

Parameters

NameTypeDescription
astruct ISCAgentIDThe ISCAgentID.

Return Values

NameTypeDescription
[0]ISCChainIDThe ISCChainID.

asNFTID

function asNFTID(uint256 tokenID) internal pure returns (NFTID)

Convert a token ID to an NFTID.

Parameters

NameTypeDescription
tokenIDuint256The token ID.

Return Values

NameTypeDescription
[0]NFTIDThe NFTID.

isInCollection

function isInCollection(struct ISCNFT nft, NFTID collectionId) internal pure returns (bool)

Check if an NFT is part of a given collection.

Parameters

NameTypeDescription
nftstruct ISCNFTThe NFT to check.
collectionIdNFTIDThe collection ID to check against.

Return Values

NameTypeDescription
[0]boolTrue if the NFT is part of the collection, false otherwise.