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

Native Token Bridges uses Teleporter Registry #197

Merged
merged 16 commits into from
Jan 2, 2024

Conversation

geoff-vball
Copy link
Contributor

Why this should be merged

Enables use of the Native Token Bridge contracts with the TeleporterRegistry.

How this works

ERC20TokenSource, NativeTokenSource, and NativeTokenDestination all now inherit TeleporterOwnerUpgradeable.

How this was tested

E2E/unit tests that were updated.

How is this documented

Copy link

openzeppelin-code bot commented Dec 13, 2023

Native Token Bridges uses Teleporter Registry

Generated at commit: fe9079a9a60216c37982f6c5f822e56ae706c6e4

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
0
0
5
24
29
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@@ -14,13 +14,13 @@ import {
TeleporterMessageInput,
TeleporterFeeInfo
} from "../../Teleporter/ITeleporterMessenger.sol";
import {ITeleporterReceiver} from "../../Teleporter/ITeleporterReceiver.sol";
import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol";

Choose a reason for hiding this comment

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

calling out with #194 to update to use remapping @teleporter

Choose a reason for hiding this comment

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

can you update this witht he merge

bytes32 senderBlockchainID,
address senderAddress,
bytes calldata message
) external nonReentrant {

Choose a reason for hiding this comment

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

we mgiht want to add reentrancy guard to TeleporterUpgradeable.receiveTeleporterMessage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think we should

Choose a reason for hiding this comment

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

created issue #213

Copy link
Contributor

@cam-schultz cam-schultz left a comment

Choose a reason for hiding this comment

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

LGTM. One cleanup comment

@@ -303,6 +306,43 @@ contract NativeTokenSourceTest is Test {
);
}

function _initMockTeleporterRegistry() internal {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we consolidate this function that's repeated in multiple files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Michael's PR #203 extracts some of the common functionality here. I'll make a followon PR to extract everything I can when his is all merged in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good!

cam-schultz
cam-schultz previously approved these changes Dec 20, 2023
Copy link
Collaborator

@michaelkaplan13 michaelkaplan13 left a comment

Choose a reason for hiding this comment

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

One nit, and a few merge conflicts with main, but otherwise LGTM.

@geoff-vball geoff-vball merged commit f47d92a into main Jan 2, 2024
15 checks passed
@geoff-vball geoff-vball deleted the gstuart/native-token-bridge-teleporter-registry branch January 2, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants