-
Notifications
You must be signed in to change notification settings - Fork 51
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
Increase test coverage #785
Conversation
WalkthroughThe changes introduce new Solidity test contracts for the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LiFiDiamond
participant Facets
User->>LiFiDiamond: Deploy contract
LiFiDiamond->>Facets: Initialize facets
User->>LiFiDiamond: Call function
LiFiDiamond->>Facets: Forward call
Facets-->>LiFiDiamond: Return result
LiFiDiamond-->>User: Return result
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- test/solidity/LiFiDiamond.t.sol (1 hunks)
- test/solidity/LiFiDiamondImmutable.t.sol (1 hunks)
- test/solidity/Periphery/ERC20Proxy.t.sol (1 hunks)
Additional comments not posted (16)
test/solidity/Periphery/ERC20Proxy.t.sol (4)
1-11
: LGTM!The code segment correctly sets up the necessary imports for the test file.
12-21
: LGTM!The code segment correctly sets up the test contract and necessary state variables.
22-25
: LGTM!The code segment correctly sets up the test environment by deploying a new instance of
ERC20Proxy
before each test case.
27-40
: LGTM!The test functions are correctly testing the deployment and ETH reception behavior of the
ERC20Proxy
contract.test/solidity/LiFiDiamond.t.sol (5)
32-50
: LGTM!The code changes are approved.
52-54
: LGTM!The code changes are approved.
56-87
: LGTM!The code changes are approved.
89-95
: LGTM!The code changes are approved.
97-102
: LGTM!The code changes are approved.
test/solidity/LiFiDiamondImmutable.t.sol (7)
12-17
: LGTM!The contract declaration and state variables are correctly implemented.
33-54
: LGTM!The
setUp
function is correctly implemented.
56-61
: LGTM!The
test_DeploysWithoutErrors
function is correctly implemented.
63-94
: LGTM!The
test_ForwardsCallsViaDelegateCall
function is correctly implemented.
96-116
: LGTM!The
test_NonOwnerCannotAddFacet
function is correctly implemented.
118-124
: LGTM!The
test_RevertsOnUnknownFunctionSelector
function is correctly implemented.
126-131
: LGTM!The
test_CanReceiveETH
function is correctly implemented.
Which Jira task belongs to this PR?
Why did I implement it this way?
Checklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)
Summary by CodeRabbit
New Features
LiFiDiamond
,LiFiDiamondImmutable
, andERC20Proxy
contracts to validate their functionalities.Bug Fixes
ERC20Proxy
to prevent it from accepting ETH.