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

feat: stargate receiver #1

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

feat: stargate receiver #1

wants to merge 19 commits into from

Conversation

kuchmenko
Copy link

@kuchmenko kuchmenko commented Jan 24, 2025

  • Implement starage receive lzCompose contract
  • Add multicalls handling
  • Deployment docs + .env.example

@gemcoder21 gemcoder21 requested a review from 0xh3rman January 24, 2025 17:50
stargate/foundry.toml Outdated Show resolved Hide resolved
stargate/src/GemStargateMulticallHandler.sol Outdated Show resolved Hide resolved
stargate/src/GemStargateMulticallHandler.sol Outdated Show resolved Hide resolved
@0xh3rman
Copy link
Collaborator

Things to improve:

  1. we can refactor the folder structure a little bit to share same forge-std submodule
  2. let's make multicall a separate Contract for reuse if possible, somthing like contract GemStargateReceiver is MulticallHandler, ILayerZeroComposer
  3. Add github action to do deployment

I will work on 3

@kuchmenko kuchmenko marked this pull request as ready for review January 27, 2025 15:55
.env.example Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
.env.example Show resolved Hide resolved
deploy/deploy-stargate.sh Show resolved Hide resolved
@0xh3rman
Copy link
Collaborator

can you rename folder shared to library?

Copy link
Collaborator

@0xh3rman 0xh3rman left a comment

Choose a reason for hiding this comment

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

Thanks for the efforts to continue improving, I left some more comments, the ReentrancyGuard should be added back

* @notice A contract that handles multiple calls in a single transaction.
* @dev Inspired by https://github.com/across-protocol/contracts/blob/master/contracts/handlers/MulticallHandler.sol
*/
contract MulticallHandler {
Copy link
Collaborator

Choose a reason for hiding this comment

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

across's handler has MulticallHandler but i can't see it on here or GemStargateMulticallHandler


struct Instructions {
// Added to handle
address token;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we handle this in composeMsg? Instructions is better to be as generic as possible

Comment on lines +30 to +32
// call across

// Rest from across
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// call across
// Rest from across

echo "✅ Deployment to $NETWORK_NAME completed."
done

echo "🎉 All non-zkSync deployments done!"
Copy link
Collaborator

Choose a reason for hiding this comment

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

lol, why zkSync is so special, deploy/deploy-stargate.sh and deploy/deploy-stargate-zksync.sh should be more proper naming

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