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

Add RMNHomeAddress in the OCR3Config #1449

Merged
merged 5 commits into from
Sep 25, 2024
Merged

Conversation

0xnogo
Copy link
Contributor

@0xnogo 0xnogo commented Sep 18, 2024

Adding rmnHomeAddress in the OCR3Config struct + generated wrappers.

Copy link
Contributor

github-actions bot commented Sep 18, 2024

LCOV of commit 76c7455 during Solidity Foundry #8361

Summary coverage rate:
  lines......: 97.7% (2284 of 2338 lines)
  functions..: 94.6% (421 of 445 functions)
  branches...: 93.6% (543 of 580 branches)

Files changed coverage rate: n/a

@0xnogo 0xnogo changed the title add RMNHomeAddress in the OCR3Config Add RMNHomeAddress in the OCR3Config Sep 18, 2024
@0xnogo 0xnogo marked this pull request as ready for review September 18, 2024 20:02
@0xnogo 0xnogo requested a review from a team as a code owner September 18, 2024 20:02
Copy link
Contributor

@RyanRHall RyanRHall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@@ -600,6 +618,7 @@ contract CCIPConfig_ConfigStateMachine is CCIPConfigSetup {
CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({
pluginType: Internal.OCRPluginType.Commit,
offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makramkd why are we using encodePacked? That's almost always bad and in this case it's the same as abi.encode, right? Let's replace them all with normal abi.encode's

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I used it in this case because encodePacked and encode give the same output. Its only used in tests, the contract only uses encode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced all the encodePacked with abi.encode

@@ -647,6 +666,7 @@ contract CCIPConfig_ConfigStateMachine is CCIPConfigSetup {
cfgs[i] = CCIPConfigTypes.OCR3Config({
pluginType: Internal.OCRPluginType.Commit,
Copy link
Collaborator

@RensR RensR Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not in scope for this PR but there's a very high amount of duplication going on here, we should fix

Can you do a quick replace all in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean a quick replace of the encodePacked right?

@0xnogo 0xnogo enabled auto-merge (squash) September 25, 2024 06:18
@0xnogo 0xnogo merged commit 75b4250 into ccip-develop Sep 25, 2024
127 checks passed
@0xnogo 0xnogo deleted the ng/rmnhome-ocr3config branch September 25, 2024 06:47
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants