Motoko public function: defaulttokeninfo

Hi all,

I have this series of code in a util.Mo file,

public let defaultTokenInfo : Launchpad.TokenInfo = {
name = “”;
symbol = “”;
logo = “”;
transFee = 0;
quantity = “”;
};

public let defaultTokenSet : Launchpad.TokenSet = {
token = defaultTokenInfo;
pricingToken = defaultTokenInfo;
** };**

And I was wondering if this is where I would add a fee to utilize the software and what token is “native” to the software or am I otherwise mistaken and should not edit these fields

I’m not sure what you’re exactly trying to do. If you have your own tokens in your project, you can always charge a fee in those in whatever mechanism you have available. An alternative is to use cycles as payments, but that’s mostly intended for automated interactions from canisters. For that I’d recommend this Motoko library. Last, there’s the option of ICP payments. For that, please search around the forum for examples how to do it or have a look in the examples

But these lines of code in particular, do I need to alter these at all? Like do I need to specify in this .mo what the default token is?

I don’t know what exactly you’re trying to do, so I can’t say what you’re supposed to do. If you describe how your mechanism is supposed to work maybe I can give you some pointers, but in the end it’s up to you to figure out what you want to do and what information you need for that

1 Like