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

feat: make Token pausable #366

Merged
merged 6 commits into from
Feb 13, 2024
Merged

feat: make Token pausable #366

merged 6 commits into from
Feb 13, 2024

Conversation

bowd
Copy link
Contributor

@bowd bowd commented Feb 12, 2024

Description

Based on recent token-related conversations we've decided we want more flexibility when it comes to the time between when we launch governance and give utility to the token, and the time when the token is transferable, i.e. tradable.
Most recent token launches have followed this approach, most notably Safe.
These changes make the token ownable and pausable.

However, even when paused the token can still be transferred by:

  • The owner
  • The locking contract - it can be locked and unlocked, thus the airgrab can run while paused
  • The emissions contract - it can be minted into existence while paused

Other changes

N/A

Tested

  • Tests have been added for the paused scenario

Backwards compatibility

N/A

Documentation

N/A

Copy link

openzeppelin-code bot commented Feb 12, 2024

feat: make Token pausable

Generated at commit: 45921357224a4898291c9563551e6ab27ae9a553

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
3
0
13
38
57
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@baroooo baroooo self-requested a review February 12, 2024 15:20
Copy link
Contributor

@chapati23 chapati23 left a comment

Choose a reason for hiding this comment

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

looks solid, just one question on testing transfer from Emissions while paused

Copy link
Contributor

@philbow61 philbow61 left a comment

Choose a reason for hiding this comment

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

LGTM


/**
* @title Mento Token
* @author Mento Labs
* @notice This contract represents the Mento Protocol Token which is a Burnable ERC20 token.
*/
contract MentoToken is ERC20Burnable {
contract MentoToken is Ownable, Pausable, ERC20Burnable {
/// @notice The address of the emission contract that has the capability to emit new tokens.
Copy link
Collaborator

Choose a reason for hiding this comment

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

update?

Comment on lines +74 to +76
function unpause() public virtual onlyOwner {
require(paused(), "MentoToken: token is not paused");
_unpause();
Copy link
Collaborator

Choose a reason for hiding this comment

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

couldn't find tests for this function?

Copy link
Collaborator

@nvtaveras nvtaveras left a comment

Choose a reason for hiding this comment

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

a few small things

@bowd bowd merged commit 9ff0cfc into feat/tokenWork Feb 13, 2024
2 of 15 checks passed
@chapati23 chapati23 deleted the feat/make-token-pausable branch February 14, 2024 10:39
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.

4 participants