Xls20
Calls
enableXls20Compatibility
Enables XLS-20 compatibility on a collection. However, this will remove the ability to change the collection metadata.
Collection must not have any tokens minted
Caller must be collection owner
Namespace
api.tx.xls20.enableXls20CompatibilityType
function enableXls20Compatibility(
collection_id: u32
)fulfillXls20Mint
Submit XLS-20 token ids to The Root Network Only callable by the trusted relayer account Can apply multiple mappings from the same collection in one transaction
Namespace
api.tx.xls20.fulfillXls20MintType
function fulfillXls20Mint(
collection_id: u32,
token_mappings: Vec<(u32,[u8;64])>
)reRequestXls20Mint
Namespace
api.tx.xls20.reRequestXls20MintType
function reRequestXls20Mint(
collection_id: u32,
serial_numbers: Vec<u32>
)setRelayer
Set the relayer address
Namespace
api.tx.xls20.setRelayerType
function setRelayer(
relayer: SeedPrimitivesSignatureAccountId20
)setXls20Fee
Set the xls20 mint fee which is paid per token by the collection owner This covers the additional costs incurred by the relayer for the following:
Minting the token on XRPL
Calling fulfill_xls20_mint on The Root Network
Namespace
api.tx.xls20.setXls20FeeType
function setXls20Fee(
new_fee: u128
)Storage
relayer
The permissioned relayer
Namespace
api.query.xls20.relayerType
function relayer(
): Option<SeedPrimitivesSignatureAccountId20>xls20MintFee
The extra cost of minting an XLS-20 compatible NFT
Namespace
api.query.xls20.xls20MintFeeType
function xls20MintFee(
): u128xls20TokenMap
Maps from TRN native token_id to XLS-20 TokenId
Namespace
api.query.xls20.xls20TokenMapType
function xls20TokenMap(
u32,
u32
): Option<[u8;64]>Events
RelayerSet
A new relayer has been set
Namespace
api.events.xls20.RelayerSetType
type RelayerSet = {
account: SeedPrimitivesSignatureAccountId20
}Xls20CompatibilityEnabled
A collection has had XLS-20 compatibility enabled
Namespace
api.events.xls20.Xls20CompatibilityEnabledType
type Xls20CompatibilityEnabled = {
collection_id: u32
}Xls20MappingSet
A new XLS20 mapping has been set
Namespace
api.events.xls20.Xls20MappingSetType
type Xls20MappingSet = {
collection_id: u32,
mappings: Vec<(u32,[u8;64])>
}Xls20MintFeePaid
Additional mint fee for XLS-20 mint has been paid to relayer
Namespace
api.events.xls20.Xls20MintFeePaidType
type Xls20MintFeePaid = {
collection_owner: SeedPrimitivesSignatureAccountId20,
total_fee: u128
}Xls20MintFeeSet
A new Xls20 Mint Fee has been set
Namespace
api.events.xls20.Xls20MintFeeSetType
type Xls20MintFeeSet = {
new_fee: u128
}Xls20MintRequest
Request sent to XLS20 Relayer
Namespace
api.events.xls20.Xls20MintRequestType
type Xls20MintRequest = {
collection_id: u32,
serial_numbers: Vec<u32>,
token_uris: Vec<Bytes>
}Errors
MappingAlreadyExists
There is already a Root native -> XLS-20 mapping for this token
Namespace
api.errors.xls20.MappingAlreadyExistsNotCollectionOwner
No the owner of the collection
Namespace
api.errors.xls20.NotCollectionOwnerNoToken
The NFT does not exist
Namespace
api.errors.xls20.NoTokenNotRelayer
The caller is not the relayer and does not have permission to perform this action
Namespace
api.errors.xls20.NotRelayerNotXLS20Compatible
The collection is not compatible with XLS-20
Namespace
api.errors.xls20.NotXLS20CompatibleXls20MintFeeTooLow
The supplied fee for minting XLS-20 tokens is too low
Namespace
api.errors.xls20.Xls20MintFeeTooLowundefined