-
Notifications
You must be signed in to change notification settings - Fork 62
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
add veBoba contracts #257
add veBoba contracts #257
Conversation
|
||
uint internal constant week = 86400 * 7; // allows minting once per week (reset every Thursday 00:00 UTC) | ||
uint internal weeklyEmission; | ||
underlying public immutable _token; |
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.
was confused for a sec. Is this a forked contract or self-written?
If we wrote it ourselves, shouldn't we maybe follow general code styleguides such as IUnderlying
, or at least Underlying
.
Super minor remark. same for others
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.
(min diff with solidly BaseV1-minter.sol)
// load up the custodian contract with initAmount, which should cover for sum amounts | ||
// if we want initial ve dist, to be a percent owner, make sure | ||
// sum amounts / initAmount = % ownership of top protocols | ||
function initialize( |
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.
Using initializer
and initialize
let's me always think about proxies. Super minor again, but if it is self-written/not forked, then maybe let's use a different name for better maintainability/readability?
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.
(min diff with solidly BaseV1-minter.sol)
int256 _weight = int256(ve(_ve).balanceOfNFT(_tokenId)); | ||
int256 _totalVoteWeight = 0; | ||
int256 _totalWeight = 0; | ||
int256 _usedWeight = 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.
Everything super minor today sorry, but wouldn't it save some gas if we don't assign default values? Since we are on L2 that really doesn't matter, just wanted to say it.
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.
(min diff with solidly BaseV1-voter.sol)
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.
Looks good to me, I think I reviewed this code already somewhere else right?
Just left some super minor remarks, can be ignored but might make sense maybe if it's easy to refactor (and is not forked from somewhere else, because then I always tend to stick to the original).
Hey @wsdt, yes you have reviewed this before. Just moving all of that to the monorepo :) |
Yes, minimizing the diff is much more important! thank you |
* add veBoba contracts * update deps (cherry picked from commit 9a41eaf)
* Add BOBA API README (#209) (cherry picked from commit 5da8638) * Add new API (#196) (cherry picked from commit 5621463) * boba support for faucet (#218) * boba support for faucet * withdraw boba * Update deploy.sh Co-authored-by: undefined <undefined> (cherry picked from commit a37780f) * Feature (Gateway): Ve-Boba Lock for Vote page. (#222) * add ve endpoints * changes: - fix for avoiding the GA call on local env. - create new page for lock for vote. - Area Chart as separate common component along with other components. * changes: - created separate component for createLock - Populating the actual value of balance and connect to BOBA options. - prepare the styles for lock records. * chagnes: - Date picker on the create Lock screen - reading the value of radio button in datepicker. - redux setup for the lock for vote page - network service function schema for lock page. * changes: - removed fetchrecords from interval call - calling fetch records for lock on page and creations of new records. - tested and populated the records on lock screen - create lock to be fixed * changes- manage lock modals changes. * changes: - create lock fixes - extend time of lock - increase lock amount fix - representation of ration and voting power fixes - manage boba locks. - static data on chart representation. - cleanup * changes: - create lock fixes - extend time of lock - increase lock amount fix - representation of ration and voting power fixes - manage boba locks. - static data on chart representation. * changes: removed-address-rinkeby * remove-lock-link-from-navigation * change: - fix: pager on records listing - fix: disabled button when lock is creating - fix: disabled button when extend and increase already trigger. * - comment cleanup - added ENV var to show lock in option. * Change: 1. fix for the constants to separate file 2. fix for the chart data to 3,9,12 3. fix added env details in readme 3. fix copyright to bobanetwork * removed unused code. * removed empty file along with copyright change * Add contract address and import package * change: 1. fetchrecords on completion of lock, increase, extends time tx. 2. fix button disabling on value getting empty 3. fix for the value to empty with placeholder as '0' * rinkeby address for boba contracts * change: - fix typo in ratio. - fix in month => this month - voting power label update in increase amount. * fix: vpower calculation on increase lock * added suggested change. Co-authored-by: souradeep-das <[email protected]> Co-authored-by: cby3149 <[email protected]> (cherry picked from commit 7228802) * update sentry sdk & Zendesk Integration. (#254) 1. Update Sentry SDK. 2. ZenDesk Integration on Gateway. (cherry picked from commit 6140e5e) * updated copyrights to bobanetwork (#252) updated copyrights to bobanetwork (cherry picked from commit aa06b5f) * Update boba node for the community and remove release tag (#256) (cherry picked from commit d9e6a4f) * Add the link to community-built tools for Turing (#190) * Add the link to community-built tools for Turing * Update turing.md (cherry picked from commit bd3dc5a) * add veBoba contracts (#257) * add veBoba contracts * update deps (cherry picked from commit 9a41eaf) * Split by timings for parallel run (#230) * try split by timings * increase retries * try to rebuild image * add mocha options * update folder * expose docker volumes * fix syntax error * update config * turn off gas report * turn off gas report * build no cache * default time for missing cases * try to reduce number of testcases * try to reduce number of testcases * change testcase path * Rewrite file path for next run * Adjust file path * Fix typo * Fix result * Fix command * Run full testcases * Increase parallel * try with existing images * try split by timings * try to rebuild image * add mocha options * update folder * expose docker volumes * try to reduce number of testcases * try to reduce number of testcases * change testcase path * Rewrite file path for next run * try mocha multi reporters * config gas reporter through mocha * try to remove hardhat reporter * switch to eth-gas-reporter * update l1 url for eth-gas-reporter * fix contracts path * Force console eth-gas-report * remove output to file * run whole testcase with both gas reporter and timing reporter * run all tests * retry * remove no cache, enable gas report, parallel docker builds, parallelism 5 * fix tests * reduce parallellism * update yarn and add dependency ignores * testing the same code twice * increase timeout for turing tests * shuf test files * harden tests * prevent parallel execution * response logs Co-authored-by: Ino Murko <[email protected]> Co-authored-by: Ino Murko <[email protected]> (cherry picked from commit dc4c6d9) * Symptomatic Fix - Turing Examples Tests (#263) * symptomatic fix * lending fix * Updated config.yml * example tests spec refactoring * Updated config.yml * Updated config.yml (cherry picked from commit fd7968f) * Wsdt/erigon (#258) * erigon * submodule * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml * Updated Erigon submodule * Update sync-submodules.yml * Update sync-submodules.yml * Updated Erigon submodule * Update sync-submodules.yml * Update sync-submodules.yml trigger * submodule * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml * Updated Erigon submodule * Update sync-submodules.yml * Update sync-submodules.yml * Updated Erigon submodule * Update sync-submodules.yml * Update sync-submodules.yml * Updated Erigon submodule * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml * Update sync-submodules.yml Co-authored-by: Git bot <[email protected]> Co-authored-by: Github bot <> (cherry picked from commit dc23297) * Wsdt/turing twitter (#238) * init * added tests, first draft * twitter - debugging aws, .. * twitter turing - seems to work * twitter api integration * clean up * twitter turing works - first draft * further twitter data preparation * nft -> faucet, bytes debugging, twitter gates, etc. * cooldown adapted to faucet logic * clarify boba Bubble auth flow * converted to regular claim * ui integration & testing * cleanup * minor clean * Wsdt/turing twitter meta (#157) * oz way * meta works * withdraw * ui * debug * clean * clean git * some fixes * finally works * clean Co-authored-by: Boyuan-Chen <[email protected]> * update wording * Wsdt/turing twitter meta (#161) * oz way * meta works * withdraw * ui * debug * clean * clean git * some fixes * finally works * clean * production ready, fresh deployments, etc. Co-authored-by: Boyuan-Chen <[email protected]> * move UI to token page * adding constraints to view * grammar * add proper error messages * Âease twitter constraints * remove monsters.js faucet code * test fix * Add a function for loading contracts (#170) * Wsdt/turing twitter pay (#171) * first draft * fe integration, registration done * fe send funds * Twitter Pay: First draft * collision * additional collision protection * mv to core * Delete build.toml * rm unused function * Turing TwitterPay tests * Update boba-contracts-unit.yml * Update boba-contracts-unit.yml * Update boba-contracts-unit.yml * Update boba-contracts-unit.yml * Update boba-contracts-unit.yml * Update boba-contracts-unit.yml * Update boba-contracts-unit.yml * cleanup * python clean * merge * TwitterPay added to deployer * adapted TwitterPay test (local, py, fixed pre-deploy, ..) * undo deployer add, mv to boba_examples * Update boba-contracts-unit.yml * update yarn lock Co-authored-by: CAPtheorem <[email protected]> Co-authored-by: undefined <undefined> Co-authored-by: Ino Murko <[email protected]> * rm twitterpay from gateway * Update README.md * PR review fixes: clean up Co-authored-by: CAPtheorem <[email protected]> Co-authored-by: Boyuan-Chen <[email protected]> Co-authored-by: Ino Murko <[email protected]> (cherry picked from commit 15fcfe1) * Adds reference-optimistic-geth submodule (#274) * submodule * adds new pr reviewers * Update sync-submodules.yml (cherry picked from commit bffbb93) * auth faucet done (#282) (cherry picked from commit e8f4286) * Update sync-submodules.yml (#281) Old branch replaced (cherry picked from commit 5aae0c2) * feat: modify community DAO to work with veBoba (#270) * feat: modify dao to work with veNFTs * add merge ve comment * add tests * update depl script to custom input ve addr * remove unused params and update thresholds (cherry picked from commit c80667c) * ve: update to proxy compatible contracts (#287) * update to proxy compatible contracts * update tests (cherry picked from commit 2ea7f7a) * Updated submodules (#289) Co-authored-by: Github bot <> (cherry picked from commit 85b908d) Co-authored-by: Boyuan-Chen <[email protected]> Co-authored-by: Riedl Kevin, Bsc <[email protected]> Co-authored-by: Sahil K <[email protected]> Co-authored-by: 0xEstarriol <[email protected]> Co-authored-by: Souradeep Das <[email protected]> Co-authored-by: trangtran-enya <[email protected]> Co-authored-by: Riedl Kevin, Bsc <[email protected]> Co-authored-by: bobabot-enya-ai <[email protected]>
📋 ref: moving https://github.com/bobanetwork/ve-boba/pull/13
Overview
Adds all veBoba contracts and tests according to design spec https://github.com/bobanetwork/ve-boba/issues/4
Changes
Testing
set up env and