-
Notifications
You must be signed in to change notification settings - Fork 34
chore: restricted eliminate deficit #1067
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: main
Are you sure you want to change the base?
Conversation
| address spoke | ||
| ) external returns (uint256) { | ||
| ) external restricted returns (uint256) { | ||
| Asset storage asset = _assets[assetId]; |
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.
check asset is registered
| ) external restricted returns (uint256) { | ||
| Asset storage asset = _assets[assetId]; | ||
| SpokeData storage callerSpoke = _spokes[assetId][msg.sender]; | ||
| SpokeData storage coveredSpoke = _spokes[assetId][spoke]; |
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.
check coveredSpoke is registered
| bytes4[] memory selectors = new bytes4[](1); | ||
| selectors[0] = IHub.eliminateDeficit.selector; | ||
| manager.setTargetFunctionRole(address(targetHub), selectors, Roles.HUB_UMBRELLA_ROLE); | ||
| } |
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 you put this into a helper func, will be easier to refactor later
| ); | ||
|
|
||
| vm.prank(ADMIN); | ||
| accessManager.grantRole(Roles.HUB_UMBRELLA_ROLE, address(spoke1), 0); |
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 you put this into a helper func too
No description provided.