-
-
Notifications
You must be signed in to change notification settings - Fork 237
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(smart-contracts): UP token contract #13875
Conversation
__GovernorTimelockControl_init(_timelock); | ||
|
||
// default quorum set to 30k | ||
_quorum = 30000e18; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nouvelle syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quorum should be 3k NOT 30k.
TimelockControllerUpgradeable _timelock | ||
) public initializer { | ||
__Governor_init("UnlockProtocolGovernor"); | ||
__GovernorSettings_init(43200 /* 6 day */, 43200 /* 6 days */, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this in seconds? If so this is not 6 days! please use 6* 24 * 60 * 60
for clarty.
@@ -12,15 +12,15 @@ const { getEvent } = require('@unlock-protocol/hardhat-helpers') | |||
|
|||
const PROPOSER_ROLE = ethers.keccak256(ethers.toUtf8Bytes('PROPOSER_ROLE')) | |||
|
|||
describe('UnlockProtocolGovernor', () => { | |||
// default values | |||
const SIX_DAYS = 43200 // in blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum, I think we should not use blocks because that's different based on what chain we go for. Can we use seconds rather?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved the gov and erc20 votes to use timestamps instead of blocks
Co-authored-by: Julien Genestoux <julien.genestoux@gmail.com>
// default quorum set to 3000 | ||
_quorum = 3000e18; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use GovernorVotesQuorumFraction
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok added relative quorum
Here the entire UP supply has been transferred to the Swap contract on creation https://sepolia.basescan.org/tx/0x0e7f60f86a244b68101267d606354816b5fb42f871f640c207f609c4b8740d82 |
_mint(preMinter, TOTAL_SUPPLY * 10 ** decimals()); | ||
} | ||
|
||
// required to base votes on timestamp instead of blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I think this is good!
Co-authored-by: Julien Genestoux <julien.genestoux@gmail.com>
Governor is there https://www.tally.xyz/gov/up-token-base-sepolia-test-dao |
Description
This PR adds the UnlockDiscountToken ERC20 contract
Need to rebase once #13874 s mergedIssues
Fixes #
Refs #
Checklist:
Release Note Draft Snippet