Skip to content

Conversation

@aalimsahin
Copy link

Description

This PR implements an Axelar-based oracle for cross-chain message attestation.

Oracle Implementation:

  • Extends BaseInputOracle for standardized attestation storage
  • Inherits ChainMap for protocol endpoint ID to canonical chain ID mapping
  • Uses MinimalOApp for ownerless LayerZero V2 integration

Public Interface:

  • submit() - Sends attested payloads cross-chain via Axelar General Message Passing Protocol
  • execute() - Receives and stores cross-chain attestations
  • setChainMap() - Maps Axelar chain names to canonical chain IDs (owner-only)

Design Decisions:

  • Payment for sending message: Payments for sending crosschain messages with Axelar can be made on both the source and destination chains. If the payment is made on the source chain, the message is triggered directly on the destination chain. However, there are two ways to calculate the payment amount: either through an onchain contract or offchain. I didn't include the onchain calculation because the documentation recommends offchain one.

Related Issues

There is no related issue.

Third-Party Integration Checklist

⚠️ CRITICAL: All third-party integrations must follow strict dependency guidelines

  • No external library imports - Confirmed no new dependencies added to foundry.toml
  • Interfaces copied locally - All required interfaces copied to src/oracles/[oracle-type]/external/[protocol-name]/
  • Proper documentation - Each copied interface includes source header with:
    • Protocol name and version
    • Original source URL
    • Commit hash and copy date
    • List of any modifications made
  • Self-contained - Integration works with only repository code
  • Minimal interfaces - Only copied the specific methods/events needed

Additional Notes

Copy link
Member

@reednaa reednaa left a comment

Choose a reason for hiding this comment

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

Looks fine to me.

Before we merge, we should consider a way to display which contracts (including oracles) have been audited and which have not.

Comment on lines 70 to 73
if (source == address(0)) revert InvalidAddress();
if (payloads.length == 0) revert EmptyPayloadsNotAllowed();

if (!IAttester(source).hasAttested(payloads)) revert NotAllPayloadsValid();
Copy link
Member

Choose a reason for hiding this comment

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

(Opinion) Should be implemented in the outer submit function. The inner function is (mainly) concerned with messaging layer logic.

Comment on lines +83 to +85
function gateway() public view returns (IAxelarGateway) {
return IAxelarGateway(gatewayAddress);
}
Copy link
Member

Choose a reason for hiding this comment

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

Some strange code inherited from Axalar 😅

@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@aalimsahin aalimsahin requested a review from reednaa October 13, 2025 22:28
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