Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: introduce SNT V2 #1

Merged
merged 1 commit into from
Nov 28, 2023
Merged

chore: introduce SNT V2 #1

merged 1 commit into from
Nov 28, 2023

Conversation

0x-r4bbit
Copy link
Member

This introduces an SNT V2 token implementation. It inherits from MiniMeToken and also comes with an SNTTestnetController that can be used on test networks for allowing minting of tokens by anyone.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran forge snapshot?
  • Ran pnpm lint?
  • Ran forge test?


event ClaimedTokens(address indexed _token, address indexed _controller, uint256 _amount);
event ControllerChanged(address indexed _newController);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might as well remove SNTTestnetController and extend SNTController to have an enabled property or something which would enable generateTokens(). Then we can use one controller contract for different networks.

uint8 _decimalUnits,
string memory _tokenSymbol
)
MiniMeToken(MiniMeToken(payable(address(0))), 0, _tokenName, _decimalUnits, _tokenSymbol, true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've hardcoded some of the parameters here as I don't think it's likely we'll ever want to deploy an SNT token that is not transferable or needs a parent block snapshot, or parent token.

@3esmit lemme know if you think this should be changed.

This introduces an SNT V2 token implementation. It inherits from
`MiniMeToken` and also comes with an `SNTTestnetController` that can be
used on test networks for allowing minting of tokens by anyone.

This makes the token controller more general and introduces an `open`
property to enable/disable the faucet.

Also adds a `destroyTokens()` function for completeness' sake.
@0x-r4bbit 0x-r4bbit merged commit 23de68f into main Nov 28, 2023
4 checks passed
@0x-r4bbit 0x-r4bbit deleted the chore/sntv2 branch November 28, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants