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

Cannon fixes #1042

Merged
merged 2 commits into from
Jul 26, 2022
Merged

Cannon fixes #1042

merged 2 commits into from
Jul 26, 2022

Conversation

sunnyvempati
Copy link
Contributor

  • upgrade cannon
  • fix call to USDToken
  • fix breaking test with setting fund position

@sunnyvempati sunnyvempati changed the base branch from main to feature-v3-mvp July 26, 2022 21:06
@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #1042 (25e9e31) into feature-v3-mvp (5323d2d) will not change coverage.
The diff coverage is n/a.

❗ Current head 25e9e31 differs from pull request most recent head f080acc. Consider uploading reports for the commit f080acc to get more accurate results

@@               Coverage Diff               @@
##           feature-v3-mvp    #1042   +/-   ##
===============================================
  Coverage           98.92%   98.92%           
===============================================
  Files                  43       43           
  Lines                 464      464           
  Branches               80       80           
===============================================
  Hits                  459      459           
  Misses                  5        5           
Flag Coverage Δ
ambassador-council ∅ <ø> (∅)
core-contracts 95.71% <ø> (ø)
core-js 99.47% <ø> (ø)
grants-council ∅ <ø> (∅)
spartan-council ?
synthetix-governance 100.00% <ø> (ø)

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

Help us with your feedback. Take ten seconds to tell us how you rate us.

1,
[1, 2],
[1, 1],
[1000, 1000]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the maxValuePerShare, not yet implemented? Maybe we set to 0, presumably what we'll use for an undefined maximum?

@sunnyvempati sunnyvempati merged commit 8d99b33 into feature-v3-mvp Jul 26, 2022
@sunnyvempati sunnyvempati deleted the cannon-fixes branch July 26, 2022 21:19
mjlescano added a commit that referenced this pull request Aug 23, 2022
* add controlled mint/burn to synth

* Abstract authorization and propagate to SNX and Synth

* Use authorization to mint

* Bootstrap AccountModule (#895)

* 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

* Bootstrap FundModule (#897)

* initial commit

* cleanup satellite stuff

* V3-mvp/base-account-and-fund-interface (#904)

* 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

* V3-mvp/fund (#926)

* 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

* merge

* add multicall module, finalize initial cannonfile

* update package-lock

* update deploy script to use new multicall abi task (#1008)

* Add MulDivUp Math util  (#1015)

* add utils

* lint

* PR fix

* lint

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

* Initial commit

* fix tests

* Add views for account liquidity items (#1020)

* first commit

* add missing hidratation

* Mint next account (#1019)

* mintNext function

* fix lint

* Apply suggestions from code review

Co-authored-by: Leonardo Massazza <lmassazza@gmail.com>

* fix issues with deployment and oracle price resolve

* Fixes for onboarding (#1027)

* Revert "Mint next account (#1019)"

This reverts commit 4edbdd5.

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

This reverts commit f5fcf54.

* upgrade cannon

* Split Fund Module (#1024)

* Initial commit

* make tests pass

* add sUSD token and mint/burn from fund

* pr updates

* fix test

* make test work

* rename FundSCCP to FundConfiguration

* update getCollateralTypes etc

* Rename stuff and fix tests

* 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

* 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

* Cannonfile Update (#1038)

* fixed first issue

* fix cannonfile build

* v 0.7

* version fix

* progress

* working

* start testing MarketManager

* Add test

* fix package lock

* add fundMaxDebtShare (supplyTarget cap)

* add functionality to MarketMock

* bootstrap whole system test

* more tests

* update cannon version

* add associated systems module

simplify the implementation of satellites to the leanest level.

also more cannon friendly

* cannon update

* Market module (#1033)

* 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 <noah.litvin@gmail.com>

* lint

* Add erc721 enumerability (#1040)

* add contract

* add hooks

* fix prettier

* code review fixes

* remove interface inheritence

* tests

* remove only

* fix nit

* getting close to rewards

* add missing files

* contracts compile

* restructuring of deployment

* Cannon fixes (#1042)

* cannon and test fix

* fix test

* make it private

* move assocaited systems module to core modules

* fix pkglock

* update deployment mostly working

* changes to tests and add ts

time to use typechain and have better tests

bootstrap will happen with cannon now (and cannon is cached so tests
will be much better)

* cannonfile compiles with the new

* print info needs to use `getAddress`

* changes to core-js to natively support typescript

needed to support typescript on downstream tests

* more test fixes

* working tests

* fix coverage

* fix lint

* remove prettier for now since it doesn't support graceful warnings

* more tests fixes

* add build step

* add another build step

* fix syntax

* remove sinon types

* fix deployer and core module tests

* fix

* write ts declaration files

* working tests

* finally works

* debt refactor 304 306 compiles

* partial

* compiles again with theoretically working debt, liquidations, markets

* existing tests pass

* add some vault tests

* tests are passing for 304 markets, and debt!

Co-authored-by: Leonardo Massazza <lmassazza@gmail.com>
Co-authored-by: Matías <mjlescano@protonmail.com>
Co-authored-by: Matías Lescano <mjlescano@users.noreply.github.com>
Co-authored-by: Noah Litvin <335975+noahlitvin@users.noreply.github.com>
Co-authored-by: Noah Litvin <noah.litvin@gmail.com>
Co-authored-by: Sunny Vempati <sunnyvempati@gmail.com>
mjlescano added a commit that referenced this pull request Aug 23, 2022
* Sip 305 rewards (#1045)

* add controlled mint/burn to synth

* Abstract authorization and propagate to SNX and Synth

* Use authorization to mint

* Bootstrap AccountModule (#895)

* 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

* Bootstrap FundModule (#897)

* initial commit

* cleanup satellite stuff

* V3-mvp/base-account-and-fund-interface (#904)

* 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

* V3-mvp/fund (#926)

* 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

* merge

* add multicall module, finalize initial cannonfile

* update package-lock

* update deploy script to use new multicall abi task (#1008)

* Add MulDivUp Math util  (#1015)

* add utils

* lint

* PR fix

* lint

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

* Initial commit

* fix tests

* Add views for account liquidity items (#1020)

* first commit

* add missing hidratation

* Mint next account (#1019)

* mintNext function

* fix lint

* Apply suggestions from code review

Co-authored-by: Leonardo Massazza <lmassazza@gmail.com>

* fix issues with deployment and oracle price resolve

* Fixes for onboarding (#1027)

* Revert "Mint next account (#1019)"

This reverts commit 4edbdd5.

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

This reverts commit f5fcf54.

* upgrade cannon

* Split Fund Module (#1024)

* Initial commit

* make tests pass

* add sUSD token and mint/burn from fund

* pr updates

* fix test

* make test work

* rename FundSCCP to FundConfiguration

* update getCollateralTypes etc

* Rename stuff and fix tests

* 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

* 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

* Cannonfile Update (#1038)

* fixed first issue

* fix cannonfile build

* v 0.7

* version fix

* progress

* working

* start testing MarketManager

* Add test

* fix package lock

* add fundMaxDebtShare (supplyTarget cap)

* add functionality to MarketMock

* bootstrap whole system test

* more tests

* update cannon version

* add associated systems module

simplify the implementation of satellites to the leanest level.

also more cannon friendly

* cannon update

* Market module (#1033)

* 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 <noah.litvin@gmail.com>

* lint

* Add erc721 enumerability (#1040)

* add contract

* add hooks

* fix prettier

* code review fixes

* remove interface inheritence

* tests

* remove only

* fix nit

* getting close to rewards

* add missing files

* contracts compile

* restructuring of deployment

* Cannon fixes (#1042)

* cannon and test fix

* fix test

* make it private

* move assocaited systems module to core modules

* fix pkglock

* update deployment mostly working

* changes to tests and add ts

time to use typechain and have better tests

bootstrap will happen with cannon now (and cannon is cached so tests
will be much better)

* cannonfile compiles with the new

* print info needs to use `getAddress`

* changes to core-js to natively support typescript

needed to support typescript on downstream tests

* more test fixes

* working tests

* fix coverage

* fix lint

* remove prettier for now since it doesn't support graceful warnings

* more tests fixes

* add build step

* add another build step

* fix syntax

* remove sinon types

* fix deployer and core module tests

* fix

* write ts declaration files

* working tests

* finally works

* debt refactor 304 306 compiles

* partial

* compiles again with theoretically working debt, liquidations, markets

* existing tests pass

* add some vault tests

* tests are passing for 304 markets, and debt!

Co-authored-by: Leonardo Massazza <lmassazza@gmail.com>
Co-authored-by: Matías <mjlescano@protonmail.com>
Co-authored-by: Matías Lescano <mjlescano@users.noreply.github.com>
Co-authored-by: Noah Litvin <335975+noahlitvin@users.noreply.github.com>
Co-authored-by: Noah Litvin <noah.litvin@gmail.com>
Co-authored-by: Sunny Vempati <sunnyvempati@gmail.com>

* Account permissions view (#1048)

* add account permissions

* fix cr

* fix new references

* V3 Docs Workflow (#1051)

* for review

* lint fix

* lint fix

Co-authored-by: dbeal <git@danb.email>
Co-authored-by: Leonardo Massazza <lmassazza@gmail.com>
Co-authored-by: Noah Litvin <335975+noahlitvin@users.noreply.github.com>
Co-authored-by: Noah Litvin <noah.litvin@gmail.com>
Co-authored-by: Sunny Vempati <sunnyvempati@gmail.com>
Co-authored-by: Sunny Vempati <sunny@cc.snxdao.io>
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.

2 participants