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

Authenticated call support #52

Merged
merged 21 commits into from
Nov 26, 2024
Merged

Authenticated call support #52

merged 21 commits into from
Nov 26, 2024

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Oct 21, 2024

  • gateway on three chains: Ethereum, BNB, ZetaChain (still on the same anvil instance)
  • authenticated and arbitrary calls through callOptions
  • automatically swap for gas tokens when handling reverts
  • separate handling of depositedAndCalled and withdrawnAndCalled events
  • onCall instead of onCrossChainCall
  • sender info is in context.sender
  • throw an error when function doesn't exist when making an arbitrary call

This version is being used in all E2E tests in zeta-chain/example-contracts#218

@fadeev fadeev changed the title Authenticated calls Authenticated call support Oct 21, 2024
@fadeev
Copy link
Member Author

fadeev commented Oct 22, 2024

Having both --is-arbitrary-call and --function "hello(string)" seems redundant: if a function is defined, then it's an arbitrary call. This was my criticism of the Gateway API. I'll be keeping it in the CLI interface so that it's still possible for users to test the scenario where isArbitraryCall is true, but there is no function defined.

@fadeev fadeev linked an issue Oct 25, 2024 that may be closed by this pull request
@fadeev fadeev linked an issue Oct 25, 2024 that may be closed by this pull request
@fadeev fadeev marked this pull request as ready for review November 8, 2024 15:06
@fadeev fadeev marked this pull request as draft November 8, 2024 17:23
@fadeev fadeev marked this pull request as ready for review November 12, 2024 11:12
@fbac
Copy link

fbac commented Nov 12, 2024

@fadeev since localnet is getting more complex, could you include a brief explanation, or even better a diagram on how it is supposed to work? That would help greatly with the review process.

I'm thinking something similar to this diagram, where we can clearly see the entrypoints, what actor does what exactly, when is every handleXXX function called, etc.

@fadeev
Copy link
Member Author

fadeev commented Nov 12, 2024

@fbac

Untitled

https://www.figma.com/board/uABT4inqEYuRjgFY142xI2/Localnet?node-id=0-1&node-type=canvas

@fadeev
Copy link
Member Author

fadeev commented Nov 25, 2024

@fbac @skosito please, review.

Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

utACK

@fadeev fadeev merged commit 28b837e into main Nov 26, 2024
4 checks passed
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.

Add support for authenticated connected chain calls Deploy two EVM gateways
3 participants