ton-blockchain / minter-contract

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

Questions and some last polish #13

Closed talkol closed 2 years ago

talkol commented 2 years ago
  1. I see there are a few TypeScript source files remaining in the root directory (line index.ts), if I remember correctly we moved this logic to the web client. I recommend that we delete these files in order to simplify. Also, this repo is no longer consumable via NPM so let's remove the relevant parts in package.json (like files, types, main) that make it seem like it is.

  2. If I understand correctly, the /example directory is also to teach how to deploy via the controller. If we remove the deploy controller in (1) then let's also remove the example directory.

  3. In the build directory, why aren't *.compiled.json in .gitignore? The webclient repo has these files committed anyways and anyone can build them by running npm run build.

  4. In build/jetton-minter.deploy.ts - please add some comment documentation above jettonParams to explain users that they need to change the params in this file before deploying - like setting their jetton name or an example for the image URL

  5. There's code in contracts/jetton-minter.ts that I'm not sure should be here.. Shouldn't initData() and mintBody() be moved to the test helpers directory? They're only used in tests. Also let's rename parseOnChainData and buildOnChainData to parseTokenMetadataCell and buildTokenMetadataCell (it took me a while to understand what it does).

  6. Question - with the standard code, after the initial supply is minted, can the deploying wallet continue to mint? We naturally don't want to allow this, meaning after the initial deployment minting should be blocked to protect users against inflation.

shaharyakir commented 2 years ago

@talkol 1-5 fixed in linked PR. 6 is handled in https://github.com/ton-defi-org/jetton-deployer-contracts/issues/15

shaharyakir commented 2 years ago

In the build directory, why aren't *.compiled.json in .gitignore? The webclient repo has these files committed anyways and anyone can build them by running npm run build.

I remembered later it was to enable the CI to run tests, but since we now have a CI flow in tonstarter contracts we can now build the contracts on the fly which is nicer :)