Skip to content

Conversation

@MalteHerrmann
Copy link
Collaborator

This PR adjusts the contract implementation to avoid storing a payload hash in transient storage and then retrieving it within _transferRemote but instead is adding a new external method transferRemoteWithPayload that is enabling to pass the full payload (or a compressed version) as a function argument.

@MalteHerrmann MalteHerrmann self-assigned this Oct 23, 2025
@MalteHerrmann MalteHerrmann added the improvement New feature or request label Oct 23, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch malte/test-bytes-memory

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MalteHerrmann
Copy link
Collaborator Author

E2E tests will be fixed on the base branch, has nothing to do with the contracts implementation here.

@MalteHerrmann MalteHerrmann marked this pull request as ready for review October 23, 2025 13:20
Copy link
Member

@0xstepit 0xstepit left a comment

Choose a reason for hiding this comment

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

Great job here @MalteHerrmann! Added a couple of comments but the code looks great

Copy link
Member

Choose a reason for hiding this comment

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

we should remember to add to codespell for doc the entire doc folder!


# ------------------------------
# Testing
# Linting
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we align the section heading with the main Makefile 🙏

/// bridging mechanisms (e.g. IBC, CCTP).
///
/// TODO: make upgradeable
/// TODO: make upgradeable?
Copy link
Member

Choose a reason for hiding this comment

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

we should move it to a linear ticket

/// @notice Creates a new instance of the OrbiterGateway contract.
/// @param _domain The Hyperlane domain of the Noble network, which is the destination domain for Orbiter transfers.
constructor(uint32 _domain) {
destinationDomain = _domain;
Copy link
Member

Choose a reason for hiding this comment

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

why are we passing it instead of setting it as a const? For mainnet and testnet?

/// @param _amount The amount of tokens to transfer.
/// @param _payload The payload passed along with the asset transfer.
/// @return messageID The ID of the dispatched Hyperlane message.
function sendForwardedTransfer(
Copy link
Member

Choose a reason for hiding this comment

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

In CCTP we call it WithOrbiterPayload. It would be nice to have parity

Comment on lines +87 to +89
// We only want to handle transfers with a non-zero payload.
if (_payload.length == 0) {
revert EmptyPayload();
Copy link
Member

Choose a reason for hiding this comment

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

Isn't better to have this check in the public method? This way we'd avoid a bunch of useless computation

Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this?

Copy link
Member

Choose a reason for hiding this comment

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

Mailbox, Messange, and ITransparentUpgradableProxy are not used

Copy link
Member

Choose a reason for hiding this comment

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

There are variables in the constant section: DECIMALS, SCALE, ...

@0xstepit
Copy link
Member

I would also add the formatting config for contracts, in the CCTP ones I have this:

[fmt]
multiline_func_header = "attributes_first"
line_length = 100
number_underscore = "thousands"
bracket_spacing = true
wrap_comments = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants