-
Notifications
You must be signed in to change notification settings - Fork 4
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
refactor: Adding logic to check more L2 chains fo guard CM #122
Conversation
kupermind
commented
Mar 4, 2024
- Revising Guard CM L2 calls verification;
- Adding logic to check more L2 chains;
- L2 verifications can now be added separately without redeployment of Guard CM.
/// @dev Processes bridged data: checks the header and verifies the payload. | ||
/// @param data Full data bytes with the header. | ||
/// @param chainId L2 chain Id. | ||
function _processBridgeData( |
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.
_processBridgeData -> processBridgeData ?
function _processBridgeData( | ||
bytes memory data, | ||
uint256 chainId | ||
) internal |
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.
to external?
details: https://eip2535diamonds.substack.com/p/the-difference-between-solidity-libraries internal lib vs external lib with delegatecall
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.
Great catch :)
refactor and test: addressing internal audit and adding full coverage
V1.1.11 internal audit
…s-governance into guard_more_l2_chains
/// @dev Processes bridged data: checks the header and verifies the payload. | ||
/// @param data Full data bytes with the header. | ||
/// @param bridgeMediatorL2 Address of a bridged mediator on L2. | ||
/// @param chainId L2 chain Id. |
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.
maybe we can add a note saying that, when Wormhole is used, the ChainID EVM L2 correspond to the wormhole one
address verifierL2; | ||
// Bridge mediator (data receiving) contract on L2 | ||
address bridgeMediatorL2; | ||
// Chain Id: this value cannot practically be bigger than `floor(MAX_UINT64 / 2) - 36` as per EIP 2294 |
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 comment above