-
Notifications
You must be signed in to change notification settings - Fork 27
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
Native Token Bridges uses Teleporter Registry #197
Conversation
Native Token Bridges uses Teleporter Registry
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
contracts/src/CrossChainApplications/NativeTokenBridge/tests/NativeTokenSourceTests.t.sol
Outdated
Show resolved
Hide resolved
contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol
Outdated
Show resolved
Hide resolved
@@ -14,13 +14,13 @@ import { | |||
TeleporterMessageInput, | |||
TeleporterFeeInfo | |||
} from "../../Teleporter/ITeleporterMessenger.sol"; | |||
import {ITeleporterReceiver} from "../../Teleporter/ITeleporterReceiver.sol"; | |||
import {TeleporterOwnerUpgradeable} from "../../Teleporter/upgrades/TeleporterOwnerUpgradeable.sol"; |
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.
calling out with #194 to update to use remapping @teleporter
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 update this witht he merge
bytes32 senderBlockchainID, | ||
address senderAddress, | ||
bytes calldata message | ||
) external nonReentrant { |
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.
we mgiht want to add reentrancy guard to TeleporterUpgradeable.receiveTeleporterMessage
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.
Yes, I think we should
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.
created issue #213
contracts/src/CrossChainApplications/NativeTokenBridge/ERC20TokenSource.sol
Outdated
Show resolved
Hide resolved
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.
LGTM. One cleanup comment
@@ -303,6 +306,43 @@ contract NativeTokenSourceTest is Test { | |||
); | |||
} | |||
|
|||
function _initMockTeleporterRegistry() 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.
Can we consolidate this function that's repeated in multiple files?
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.
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.
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.
Sounds good!
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.
One nit, and a few merge conflicts with main
, but otherwise LGTM.
Why this should be merged
Enables use of the Native Token Bridge contracts with the
TeleporterRegistry
.How this works
ERC20TokenSource
,NativeTokenSource
, andNativeTokenDestination
all now inheritTeleporterOwnerUpgradeable
.How this was tested
E2E/unit tests that were updated.
How is this documented