Skip to content
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

Set up Axelar router #55

Merged
merged 7 commits into from
Mar 22, 2023
Merged

Set up Axelar router #55

merged 7 commits into from
Mar 22, 2023

Conversation

hieronx
Copy link
Contributor

@hieronx hieronx commented Mar 22, 2023

First setup of the axelar router. This is assuming the axelar gateway address (this is using an upgradeable proxy, so that seems like a safe assumption) and the centrifuge chain ID are stable, and if we want to swap the gateway (currently referenced as the connector, but this will change in #52) we would deploy a new router as well.

@hieronx hieronx marked this pull request as ready for review March 22, 2023 17:57
NunoAlexandre
NunoAlexandre previously approved these changes Mar 22, 2023
Copy link
Contributor

@NunoAlexandre NunoAlexandre left a comment

Choose a reason for hiding this comment

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

Awesome! Just one comment but I'm happy if we address it in a separate PR

src/routers/axelar/Router.sol Show resolved Hide resolved
// Script to deploy Connectors with an Axelar router.
contract ConnectorAxelarScript is Script {
// address(0)[0:20] + heccak("Centrifuge")[21:32]
bytes32 SALT = 0x000000000000000000000000000000000000000075eb27011b69f002dc094d05;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why we have a constant SALT? And what why the encoded meaning behind it is significant here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah there's no documentation on this right now: foundry-rs/book#782

The salt itself leads to deploying contracts to the same address on different chains.

AStox
AStox previously approved these changes Mar 22, 2023
Copy link
Contributor

@AStox AStox left a comment

Choose a reason for hiding this comment

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

Looks good!

@hieronx hieronx dismissed stale reviews from AStox and NunoAlexandre via 67f609e March 22, 2023 19:18
@hieronx hieronx merged commit 5f353bb into main Mar 22, 2023
@NunoAlexandre NunoAlexandre deleted the axelar-router branch March 22, 2023 20:07
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.

None yet

3 participants