I’m exploring the possibility of implementing a fixed supply token in Sway and Fuel with specific features related to ownership and control. I would like to know if the following functionalities can be effectively implemented in Sway and Fuel:
Fixed Supply Initialization: The token should have a fixed initial supply minted to the owner upon deployment.
Token Metadata: There should be a way to store and retrieve token metadata, similar to a token URI.
Ownership Controls: The contract should restrict certain actions to the owner. For example, transfers should only be allowed if a specific condition (like a launch) is met.
Launch Mechanism: There should be a mechanism to enable or disable certain functionalities, like transferring tokens, based on the contract’s state.
Transfer Restrictions: Before the token is in the desired state (e.g., launched), certain operations should be restricted.
Given the UTXO model and the specific constructs in Sway and Fuel, can these features be implemented effectively? Are there any best practices or considerations I should be aware of when designing this contract in Sway and Fuel?
Hey @naz3eh , Thanks for the reply, this is really helpful!
One more thing just wanted to know, how efficient is the sway playground solidity to sway converter?, is the transpiled code given by charcoal correct?
Yes, it is majorly correct. Though, note that it is not 100% accurate. You should not rely on it for the production though and always give it another eye before using it.