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

V3 MVP Feature Base #892

Closed
wants to merge 33 commits into from
Closed

V3 MVP Feature Base #892

wants to merge 33 commits into from

Conversation

leomassazza
Copy link
Contributor

@leomassazza leomassazza commented Apr 11, 2022

fix #894

@leomassazza leomassazza requested a review from noahlitvin April 12, 2022 10:22
@leomassazza leomassazza changed the title V3 MVP Base V3 MVP Feature Base Apr 13, 2022
leomassazza and others added 8 commits April 21, 2022 17:29
* Add permission management to account

* (WIP) Implement permissions based modifier for account

* increase packed permission store

* Improve Permission identification

* cleanup

* Add Account delegation operations

* Set as Satellite and add Module test

* lint

* cleanup

* more cleanup

* rogue copypasta

* add draft API for account and fund

* reduce PR to just bootstrap the module and satellite
* initial commit

* cleanup satellite stuff
* initial commit

* move error definition to AccountBase

* added basic stuff for fund

* add some comments

* remove dependency on accountBase for the moment

* wip - add more logic to account

* more updates

* cleanup Account

* define basics fund storage

* Make it compile and deploy

* basic SIP interface coverage

* pair programming storage and some logic

* Account Code compiling

* Add enabled Collateral Types

* bootstrap test

* some logs cleanup

* extend deploy test timeout

* add some tests structure

* staking and unstaking happy path

* cleanup

* lint

* add more tests
* initial commit

* more coding...

* fix some errors

* make it compile

* correct transfer ownership signature on fund token

* some accounting logic

* Add more logic and make it compile

* remove duplicated function

* Start CollateralModule migration from account

* add collateralModule test

* refactor WIP

* (WIP) is deployable

* add some comments to Collateral Module

* split account test

* add RBAC tests to account

* bootstrap RBACMixin test

* complete tests for RBAC Mixin

* Complete Collateral Module SCCP test

* Add missing tests to AccountModuleToken

* Fix CollateralModule Stake

* Lint + cleanup

* fundToken prevent transferFrom and allow coordinated ownership transfer

* Test for FundModule Token (Ownership)

* remove link between the owner on the FundToken and FundModule

* bootstrap funds (functionality) test

* more tests and get fund positions

* Add tests to cover one account liquidity changes

* some cleanup

* lint

* Collateral SCCP fixed

* some fixes from feedback

* make tests pass

* Fund SCCP add coverage, some errors and events

* cleanup some TODOs

* add collateralMixin

* Lint + make tests pass again

* add code for minting and burning sUSD

* clean up some variables

* add comments and reorder

* duh
@codecov
Copy link

codecov bot commented May 31, 2022

Codecov Report

Merging #892 (3f2fa44) into main (2bb404a) will increase coverage by 0.88%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #892      +/-   ##
==========================================
+ Coverage   98.08%   98.97%   +0.88%     
==========================================
  Files          92       24      -68     
  Lines        1515      389    -1126     
  Branches      119        0     -119     
==========================================
- Hits         1486      385    -1101     
+ Misses         29        4      -25     
Flag Coverage Δ
core-contracts ?
core-js 98.97% <ø> (ø)
core-modules ?
deployer ?
spartan-council ?
synthetix-governance ?
synthetix-main ?
treasury-council ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core-contracts/contracts/token/ERC721.sol
packages/deployer/subtasks/get-deployment-info.js
packages/deployer/subtasks/load-deployment.js
packages/deployer/utils/deployments.js
packages/deployer/subtasks/create-deployment.js
...ages/core-contracts/contracts/utils/StringUtil.sol
packages/deployer/tasks/verify.js
...ges/core-contracts/contracts/proxy/BeaconProxy.sol
...ix-governance/contracts/modules/ElectionModule.sol
packages/deployer/subtasks/get-multicall-abi.js
... and 57 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

mjlescano and others added 13 commits May 31, 2022 20:31
* add utils

* lint

* PR fix

* lint
* first commit

* add missing hidratation
* mintNext function

* fix lint

* Apply suggestions from code review

Co-authored-by: Leonardo Massazza <[email protected]>
* Revert "Mint next account (#1019)"

This reverts commit 4edbdd5.

* Revert "Change AccountModule.createAccount to AccountToken.mint (#1016)"

This reverts commit f5fcf54.
* Initial commit

* make tests pass

* add sUSD token and mint/burn from fund

* pr updates

* fix test

* make test work

* rename FundSCCP to FundConfiguration
@leomassazza leomassazza marked this pull request as ready for review July 7, 2022 13:32
@leomassazza leomassazza marked this pull request as draft July 7, 2022 13:33
noahlitvin and others added 9 commits July 11, 2022 12:43
* fixed first issue

* fix cannonfile build

* v 0.7

* version fix

* progress

* working
* market module WIP

* fix tests - add setAllowance

* lint

* wip

* wip rename sUSD to USD

* started liquidations

* wip

* wip

* move curve to library; make it compile

* make tests great again

* change return value to CollateralData

* implement registerMarket

* improve MathUtil

* wip

* update cannon version

* link Fund to MarketManager

* fix test

* add tests to MathUtil lib

* overload functions for uint and int

* cleanup and order parameters

* Remove supplyTarget and order/rename variables

* Document interfaces

* start testing MarketManager

* Add test

* add fundMaxDebtShare (supplyTarget cap)

* add functionality to MarketMock

* bootstrap whole system test

* more tests

* update cannon version

Co-authored-by: Noah Litvin <[email protected]>
* add contract

* add hooks

* fix prettier

* code review fixes

* remove interface inheritence

* tests

* remove only

* fix nit
* cannon and test fix

* fix test
@noahlitvin
Copy link
Contributor

@leomassazza Can we close this?

@noahlitvin noahlitvin closed this Oct 1, 2022
@mjlescano mjlescano deleted the feature-v3-mvp branch November 10, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mvp-v3 feature
5 participants