I’m trying to implement new contract that can generate new SUI Coin package using sui::coin in sui framework. Basically it will take input from user with token symbol, token name, total supply, … and then generate new coin package and transfer TreasuryCap & new Coin object to user.
I’m stucking with the OTW for input in coin::create_currency method.
I checked some lauched projects like BeLauch to find out how they achieve this but seem like they’ve not open source yet.
Anyone know how to solve this? @amnn
Hi @icebear.near, each coin you create will need to be tied with a new module that you hold a one-time witness for, so in order to create a coin based on user input, you will need to generate such a module off-chain, and then compile and publish it, based on user input on (e.g.) a web interface.
I believe @damirka was experimenting with generating modules like this on the fly, in TypeScript.
saw this last week
To create a new currency on Sui, you must publish a package. This utility assists you in publishing your own . You’ll spend slightly less than 1 SUI on gas and fees. Once published, you can mint tokens here. You have 100% control and ownership over your currency.
The source for this mint tool is also available here:
GitHub - bausano/mint.onsui.gg: Mint tool for Sui blockchain. Create and update currency, mint new tokens..
thanks bro, can I fork this to create my own platform?
btw, how do you figure out the Move bytecode trick? that’s brilliant