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
Name | Type | Description |
---|---|---|
addr | struct L1Address | The L1 address. |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint8 | The 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
Name | Type | Description |
---|---|---|
addr | address | The Ethereum address. |
iscChainID | ISCChainID | The ISC chain ID. |
Return Values
Name | Type | Description |
---|---|---|
[0] | struct ISCAgentID | The new ISCAgentID. |
newL1AgentID
function newL1AgentID(bytes l1Addr) internal pure returns (struct ISCAgentID)
Create a new L1 AgentID.
Parameters
Name | Type | Description |
---|---|---|
l1Addr | bytes | The L1 address. |
Return Values
Name | Type | Description |
---|---|---|
[0] | struct ISCAgentID | The new ISCAgentID. |
isEthereum
function isEthereum(struct ISCAgentID a) internal pure returns (bool)
Check if an ISCAgentID is of Ethereum type.
Parameters
Name | Type | Description |
---|---|---|
a | struct ISCAgentID | The ISCAgentID to check. |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True 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
Name | Type | Description |
---|---|---|
a | struct ISCAgentID | The ISCAgentID. |
Return Values
Name | Type | Description |
---|---|---|
[0] | address | The Ethereum address. |
chainID
function chainID(struct ISCAgentID a) internal pure returns (ISCChainID)
Get the chain ID from an ISCAgentID.
Parameters
Name | Type | Description |
---|---|---|
a | struct ISCAgentID | The ISCAgentID. |
Return Values
Name | Type | Description |
---|---|---|
[0] | ISCChainID | The ISCChainID. |
asNFTID
function asNFTID(uint256 tokenID) internal pure returns (NFTID)
Convert a token ID to an NFTID.
Parameters
Name | Type | Description |
---|---|---|
tokenID | uint256 | The token ID. |
Return Values
Name | Type | Description |
---|---|---|
[0] | NFTID | The NFTID. |
isInCollection
function isInCollection(struct ISCNFT nft, NFTID collectionId) internal pure returns (bool)
Check if an NFT is part of a given collection.
Parameters
Name | Type | Description |
---|---|---|
nft | struct ISCNFT | The NFT to check. |
collectionId | NFTID | The collection ID to check against. |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True if the NFT is part of the collection, false otherwise. |