Creating & Minting Tokens
Token Creation
module;
import lib.yours;
namespace ft4 { // <-- Add FT4
import lib.ft4.accounts;
import lib.ft4.auth;
}// modules/equippables/operations.rell
operation create_equippable(
collection: text,
name: text,
slots: list<text>
) {
// Authenticate the caller
ft4.auth.authenticate();
// Create token specification
val spec = yours.token_info(
project = yours.project_info("Example Dapp", chain_context.blockchain_rid),
collection,
type = yours.token_type.yours,
name,
modules = [rell.meta(equippable).module_name]
);
// Create the token
val token = yours.create_token(spec);
// Attach our equippable module
attach(token, slots);
}Minting Tokens
Understanding Token Types
Best Practices
Last updated