Skip to content

feat: ReadHop#37

Draft
pegahcarter wants to merge 95 commits intomasterfrom
feat/readHop
Draft

feat: ReadHop#37
pegahcarter wants to merge 95 commits intomasterfrom
feat/readHop

Conversation

@pegahcarter
Copy link
Collaborator

@pegahcarter pegahcarter commented Oct 27, 2025

Provides a new Hop auxilliary contract that reads contract data on a target chain and returns the output data to the sender.

I added a "nonce" argument that can be passed by the caller which can be used on receipt direct the read compose to a particular action. For example, I've encoded a uint256 to be unpacked into an address, amount, and action.

@pegahcarter pegahcarter changed the base branch from refactor/composeMsg to feat/remoteSet November 10, 2025 23:14
@pegahcarter pegahcarter changed the base branch from feat/remoteSet to FraxtalHopV2 November 10, 2025 23:17
@iamkunal9
Copy link

@pegahcarter please feel free to tag me here if you want our AI auditor to scan the PR for a security review.

* refactor: RemoteHopV2 composeMsg

* refactor: _sendLocal()

* refactor: FraxtalHopV2

* fix: compile

* revert: fee calculation

* revert: fee caluclations on FraxtalHop

* refactor: HopV2 with shared state

* refactor: _sendLocal()

* refactor: _sendToDestination()

* refactor: _isTrustedHopMessage

* docs: isTrustedHopMessage

* refactor: _validateComposeMessage()

* refactor: sendOFT()

* refactor: quote()

* refactor: localEid, endpoint to constructor

* refactor: successful HopMessage passing

* refactor: isTrustedHopMessage arg to hopCompose()

* build: upgrade frax-standard-solidity

* refactor: upgradeable HopV2

* fix: overwrite HopMessage from untrusted sender

* refactor: include data to HopMessage

* revert: hopCompose() remove _isTrustedHopMessage

* fix: replay on fraxtal of failing remoteHop.lzCompose()

* chore: docs

* nit: doc

* feat: remotely set admin funcs

* feat: remotely set admin funcs

* fix: only allow self-calls

* chore: interfaces

* feat: HopSetter

* scripts: deploy hop setter

* Revert "feat: remotely set admin funcs"

This reverts commit 0966000.

* chore: fmt

* refactor: add-back access control

* chore: rm warnings

* ops: deploy HopV2 on arb, base

* refactor: localEid to storage

* fix: HopSetter receive()

* fix: proxy addr instead of imp

* demo: set Solana executor options

* refactor: deploy checklist

* refactor: AccessControlEnumerableUpgradeable

* chore: fmt

* refactor: amount => amountLD

* fix: support oz 5.x

* ops: re-deploy hops, hopSetter

* feedback: @tom2o17

* feat: RemoteAdmin with Fraxtal registry (#38)

* feat: RemoteAdmin with Fraxtal registry

* chore: rm old hopCompose within HopV2

* chore: rm HopSetter scripts

* feedback: tom2o17

* refactor: rm REMOTE_ADMIN_ROLE

* chore: lint

* chore: add pauser roles to msig signers

* chore: lint

* chore: improve RemoteAdmin docs
@denett
Copy link
Collaborator

denett commented Nov 21, 2025

if (_oft != frxUsdOft()) revert InvalidOFT();

Do not forget to check the the hop is actually calling the hopCompose, otherwise anybody can spoof these messages.

@denett
Copy link
Collaborator

denett commented Nov 21, 2025

(bool success, bytes memory data) = readOutboundMsg.targetAddress.toAddress().call(readOutboundMsg.data);

Make this a static call, otherwise somebody could spoof a readCompose callback.

@pegahcarter
Copy link
Collaborator Author

It was decided internally that at this time ReadHop is not needed. Going to leave this PR open for a while in case we revisit in the future.

Base automatically changed from FraxtalHopV2 to master February 18, 2026 16:58
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.

3 participants