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

Addressing audit and correcting test #104

Merged
merged 9 commits into from
Dec 18, 2023
8 changes: 6 additions & 2 deletions audits/internal8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ Only via constructor (re-deploy) we can update mapBridgeMediator ...
Perhaps update methods does not make sense because custom logic is needed inside function _processBridgeData() for new/updated bridges.
A clear comment about this needs to be added.
```
[x] fixed

- Assumed that the checked data in _verifyData() is always exists (data.length > 0). For discussion
- Assumed that the checked data in _verifyData() always exists (data.length > 0). For discussion
```
function _verifyData(address target, bytes memory data) internal view {
// Push a pair of key defining variables into one key
Expand All @@ -69,6 +70,7 @@ so, case _to.call{value: msg.value}("") makes the situation uncertain.
2. is this allowed for the case L2 (bridge)?
clearer processing needed
```
[x] fixed

- dataLength < DEFAULT_DATA_LENGTH Does it make sense to check earlier? For discussion
```
Expand All @@ -80,13 +82,15 @@ if (dataLength < DEFAULT_DATA_LENGTH) {
}
moved to _processBridgeData with modification
```
[x] fixed

- Pay attention to memory cleaning. For discussion
```
bytes memory payload = new bytes(data.length - 4);
payload = new bytes(mediatorPayload.length - 4);
Should we do some kind of memory explicity cleaning?
```
[x] fixed

- "shared" mapAllowedTargetSelectors for all chains. For discussion
```
Expand All @@ -101,7 +105,7 @@ targetSelector |= uint256(uint32(bytes4(data))) << 160;
+
targetSelector |= uint256(chainId) << 192;
```

[x] fixed



Expand Down
Loading
Loading