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

[SDK-CORE|SUBGRAPH] ERC20x peripherals #1312

Closed
wants to merge 117 commits into from
Closed

Conversation

0xdavinchee
Copy link
Contributor

Context

This PR adds the new protocol level features included in #1274 for SDK-Core and Subgraph.

- CFANFTBase base contract with shared NFT functions implemented w/ reference from OZ ERC721
- COFNFT basic NFT functionality implemented
- Installed contracts-upgradeable and hardhat-upgrades
- Add interface files for NFT contracts
- Rename CFANFTBase => CFAv1NFTBase
- Move shared functions from NFT contracts to CFAv1NFTBase
- Rename NFT contracts
- WIP ConstantInflowNFT
- Add NFT contracts to SuperToken storage
- Add tests for new storage
- Add new storage variable external view functions in ISuperToken.sol
- use OZ Upgradeable interface mainly for explicit semantics for developers
- add upgradability to CFAv1NFTBase with UUPSProxiable contract
- add proxiableUUID function in CFAOutflow/CFAInflowNFT's
- add updateCode function into CFAv1NFTBase
- added onlyConstantInflowNFT modifier
- added dev-forge in ethereum-contracts
- cfav1nft base abstract contract inherited by nft tests
  - does initialization
  - has some tests
  - holds logic which will be used by both tests
- constant outflow nft basic tests (no transfer)
- Added symmetrical (to COF NFT) tests to CIF NFT where relevant
- Add assume helper function
- Add event assertion helpers
- New syntax for passing tests: test_Passing_Description
* upgradability tests WIP
* naming of some test functions to indicate fuzzing
* add metadata trigger function
- Add some more documentation re: upgradability
- Rename test names to be more readable
- Reorder mock contracts for easier readability flow for reviewers
- Remaining upgradability tests
- outflow transfer reverts
- cfa integration (no tests yet)
- remove cfa hook mock contracts
- remove cfa hook code from cfa (except for storage)
- fix up SuperfluidFrameworkDeployer (add cfa nft contract deploy + initialization)
- add deployment of cfa nft logic contracts in deploy-framework only in protocolReleaseVersion="test"
- add deployment of cfa nft proxy, initialization and attach to supertoken in deploy-super-token only in protocolReleaseVersion="test"
- try/catch expect event in ConstantFlowAgreementV1.behavior.ts due to test tooling issues...
- fix up cfav1 forwarder and supertokenv1library cfa tests
- rename flowDataBySenderReceiver to flowDataByTokenId
- add tokenURI to base NFT contract
- test nft minted on flow create
- test nft emits metadataupdate on flow update
- test nft deleted on flow delete
- function renamed to follow consistent_Naming_Pattern
- add emitting address parameter to event asserts
- renaming of IDA stuff
- change from _gap to _reserveN
- delete expect Transfer in behavior
- move integration tests to outflow NFT test file (removes duplication)
- add test_Revert_Create_Flow_Overflows_When_Timestamp_Greater_Than_Uint32_Max test
- fix up mocks
- delete transfer code from constant inflow nft
- delete mint/burn code from constant outflow nft
- link nft deployer library in deploy-test-framework.js
- add foundry coverage to test-coverage script
- refactor FoundrySuperfluidTester slightly
- add missing test cases for 100% coverage
- extract super token deployment from SuperfluidFrameworkDeployer to SuperTokenDeployer
- extract super token deployment tests to new test file
- create deployer base test contract for shared foundry test initialization logic
- fix deploy-test-framework and deployContractsAndToken to work with
- add in the NFT proxy deployment in SuperTokenFactory
- add in missing events for NFT logic creation and nft proxy contract creation
- add a deployer superfluid NFT deployer library
- modify validateStorageLayout for SuperTokenFactory because of new slots for logic contracts
- add in missing assume in tests
- modify SuperTokenDeployer to leverage new SuperTokenFactory.deployNFTProxyContractsAndInitialize
- fix tests to handle SuperfluidNFTDeployer
- move shared logic and testing state to SuperfluidTester in both autowrap and scheduler tests
- fix tests because super tokens are deployed via SuperTokenDeployer now
- install foundry where we are doing coverage tests
- add initialize to IConstantOutflow, IConstantInflow and remove inheritance from ICFAv1NFTBase
- change up number in operation.test.ts for gas estimation
- we are deploying a new contract each time
- reward address added to SuperfluidFrameworkDeployer
- liquidation tests added (pic, pleb, pirate periods)
- FlowData => CFAv1NFTFlowData
- remove `_` prefix from params
- clean up interface stuff
@hellwolf hellwolf changed the title [SDK-CORE/SUBGRAPH] ERC20x peripherals [SDK-CORE|SUBGRAPH] ERC20x peripherals Aug 22, 2023
@0xdavinchee 0xdavinchee marked this pull request as ready for review September 26, 2023 13:16
Copy link
Contributor

@hellwolf hellwolf left a comment

Choose a reason for hiding this comment

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

  • revert some accidental changes
  • wait test pass
  • one comment in packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js

@hellwolf hellwolf enabled auto-merge September 27, 2023 10:02
@hellwolf
Copy link
Contributor

hellwolf commented Sep 27, 2023

@0xdavinchee not all commits are signed

@0xdavinchee
Copy link
Contributor Author

@0xdavinchee not all commits are signed

yeah, not sure how that specific commit slipped through w/o signing on Feb 14 🤔

@0xdavinchee
Copy link
Contributor Author

closing this PR as there is one hidden unsigned commit which requires a lot more manual work to rebase + squash all commits
new replacement PR: #1703

auto-merge was automatically disabled September 27, 2023 13:22

Pull request was closed

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