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

Staking tutorial #153

Merged
merged 8 commits into from
Sep 22, 2023
Merged

Staking tutorial #153

merged 8 commits into from
Sep 22, 2023

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Sep 6, 2023

A big tutorial focused on creating an omnichain contract that works both with EVM-based connected chains as well as Bitcoin.

This tutorial shows how to:

  • create an omnichain contract that can receive tokens from connected chains
  • use the parameters of the onCrossChainCall function to:
    • decode the staker address from the context.origin parameter
    • decode the contents of the message parameter
    • determine the chain ID from context.chainID
  • dispatch different logic using an action code
  • how to withdraw tokens correctly both to EVM-based chains and to Bitcoin

Related: zeta-chain/example-contracts#60

@vercel
Copy link

vercel bot commented Sep 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2023 6:44am

@fadeev
Copy link
Member Author

fadeev commented Sep 21, 2023

I'm sure there are some areas for improvements, but if there are no critical errors, I'd prefer to ship it and make it better later.

@fadeev fadeev merged commit 948adf5 into main Sep 22, 2023
5 checks passed
@fadeev fadeev deleted the staking-tutorial branch September 22, 2023 06:48
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.

2 participants