Skip to content

Update Crosschain contract: transition from CAIP-10 to ERC-7930 #171

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

Merged
merged 20 commits into from
Jun 23, 2025

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Jun 9, 2025

Based on #169

@Amxx Amxx requested review from cjcobb23 and a team as code owners June 9, 2025 14:27
@Amxx Amxx mentioned this pull request Jun 12, 2025
@Amxx
Copy link
Collaborator Author

Amxx commented Jun 13, 2025

Note:
Please don't look at 7930.sol contract and review this PR instead OpenZeppelin/openzeppelin-contracts#5736. The goal is to have a clear/documented version in the vanilla repo and import it here.

luiz-lvj
luiz-lvj previously approved these changes Jun 18, 2025
event Received(bytes32 indexed receiveId, address gateway);
event ExecutionSuccess(bytes32 indexed receiveId);
event ExecutionFailed(bytes32 indexed receiveId);
event GatewayAdded(address indexed gateway);
event GatewayRemoved(address indexed gateway);
event ThresholdUpdated(uint8 threshold);

error ERC7786AggregatorValueNotSupported();
error UnsupportedNativeTransfer();
Copy link
Member

Choose a reason for hiding this comment

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

I think this error will throw an "Already declared identifier" if used along with AxelarGatewaySource (i.e. contract A is ERC7786Aggregator, AxelarGatewaySource, ... {}).

We may want to create a library for 7786-related errors

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can rename that error, but the aggregator is an independant contract that does calls to gateways. The aggregator should NOT inherit from another gateway implementation.

I think the analogy is ERC-4626 <> ERC-20.
ERC-4626 implements the ERC-20 interface, and all the corresponding logic, but you would not do contract A is ERC4626, WETH, ... {}

Copy link
Member

@ernestognw ernestognw Jun 23, 2025

Choose a reason for hiding this comment

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

Got it, I just don't think this is an aggregator then..., it's more like a redundant bridge

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its going to be renamed anyway. The current marking name is "ERC7786OpenBridge". Makes little sens in my opinion.

I think "multibridge" might be a good option.

Copy link
Member

Choose a reason for hiding this comment

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

More in favor of MultiBridge after past discussions but happy with OpenBridge since marketing has gone with that one.

Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@Amxx Amxx merged commit f9fc20c into master Jun 23, 2025
11 checks passed
@Amxx Amxx deleted the update/erc7786 branch June 23, 2025 13:55
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