Skip to content

PanIndustrial-Org/icrc10.mo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICRC10.mo

A simple library for managing ICRC-10 compliance.

Usage


import ICRC10 "mo:icrc10-mo";

shared ({ caller = _owner }) actor class Token  (
    init_args : ICRC1.InitArgs,
) = this{

  stable var supportedStandards = ICRC10.initCollection();


  public func(msg) init() : async(){
    assert(msg.caller == this);

    for(thisItem in ICRC1.supportedStandards){
      ICRC10.register(supportedStandards, thisItem);
    };
  };

  public query icrc10_supported_standards() : ICRC10.Response{
    ICRC10.respond(supportedStandards);
  };

};