ton-blockchain / minter-contract

Jetton Deployer FunC Smart Contracts
http://jetton.live
MIT License
258 stars 154 forks source link

Support transfer ownership to address zero (max supply/non-mintable) #15

Closed shaharyakir closed 2 years ago

talkol commented 2 years ago

This should be the default behavior to protect users since most tokens should be left without an admin - this admin can do a lot of damage to users.

Also, we need to do this in a single transaction, meaning one deploy transaction from the wallet should do both the deploy and the renounce ownership (Doron can explain how to concat two messages together, I think it's possible).

shaharyakir commented 2 years ago

Whereas the wallet contract does support multi-messages, all of the APIs (ton npm pkg, chrome ext wallet) seem to allow only a single message.

Our options, therefore:

  1. Kote coin -> capped supply (a variant of the ICO standard). So we can modify the contract to throw if current_supply is at X
  2. Modify the mint function to zero out the admin, essentially allowing it to only run once.

Either of these should come with turning off burning (do we remove the function altogether or throw if called?) so that the circulating supply doesn't ever change.

@talkol wdyt?

shaharyakir commented 2 years ago

@doronaviguy fyi

shaharyakir commented 2 years ago

Implementing in https://github.com/ton-defi-org/jetton-deployer-webclient/pull/33