-
Couldn't load subscription status.
- Fork 249
feat: strict interface-contract matching for TW upgrade #1239
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
base: develop
Are you sure you want to change the base?
Conversation
Hardhat Unit Tests Coverage SummaryDiff against masterResults for commit: c841cdc Minimum allowed coverage is ♻️ This comment has been updated with latest results |
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.
Lets fix some issues ⏲️
package.json
Outdated
| "test:integration:fork:mainnet:custom": "MODE=forking hardhat test --network mainnet-fork", | ||
| "typecheck": "tsc --noEmit", | ||
| "prepare": "husky", | ||
| "check:interfaces": "bash -c 'forge inspect contracts/common/interfaces/IStakingModule.sol abi | diff -u - <(forge inspect contracts/0.4.24/interfaces/IStakingModule.sol abi)'", |
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.
Can we move this to hardhat tasks overrides maybe?
| import {IStakingRouter} from "contracts/common/interfaces/IStakingRouter.sol"; | ||
|
|
||
| contract StakingRouter_Mock is IStakingRouter { | ||
| contract StakingRouter_Mock { |
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.
Should implement interface here.
| import {IStakingRouter} from "contracts/common/interfaces/IStakingRouter.sol"; | ||
|
|
||
| contract StakingRouter_Mock is IStakingRouter { | ||
| contract StakingRouter_Mock { |
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.
| contract StakingRouter_Mock { | |
| contract StakingRouter__Mock { |
| import {IStakingRouter} from "contracts/0.8.9/oracle/AccountingOracle.sol"; | ||
|
|
||
| contract StakingRouter__MockForAccountingOracle is IStakingRouter { | ||
| contract StakingRouter__MockForAccountingOracle { |
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.
Same here
| import {StakingRouter} from "contracts/0.8.9/StakingRouter.sol"; | ||
|
|
||
| contract StakingRouter__MockForDepositSecurityModule is IStakingRouter { | ||
| contract StakingRouter__MockForDepositSecurityModule { |
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.
Same here
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 like we do not need this, can be changed to ABI comparacent
|
Current output: |
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.
Let's settle on this:
- use embedded interfaces, don't create standalone ones unless strictly needed
- the whole PR effort should be focused on the tool to check them
- for TW we suggest embedding ifaces to simplify the way forward
| }, | ||
| { | ||
| commonInterfaceFqn: "contracts/common/interfaces/IValidatorsExitBusOracle.sol:IValidatorsExitBusOracle", | ||
| additionalInterfaces: ["contracts/0.8.9/oracle/ValidatorsExitBus.sol:ValidatorsExitBus"], |
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.
🤔
Only for the contracts updated/deployed on Triggerable Withdrawals upgrade.