Skip to content

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Aug 19, 2025

Follow the docs: zeta-chain/docs#685

If build fails:

rustup update
rm Cargo.lock
anchor build

Copy link
Contributor

coderabbitai bot commented Aug 19, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-solana-example

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@fadeev
Copy link
Member Author

fadeev commented Aug 19, 2025

Withdraw And Call

zetachain z withdraw-and-call \
  --amount 0.001 \
  --receiver $PROGRAM_ID \
  --data $PAYLOAD \
  --private-key $PRIVATE_KEY \
  --rpc $RPC_ZETACHAIN \
  --zrc20 $ZRC20_SOL \
  --gateway $GATEWAY_ZETACHAIN
Withdraw and call details:
Amount: 0.001 SOL.SOLANA
Withdraw Gas Fee: 0.001 SOL.SOLANA
Raw data: 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000003b3e5f0413b220140821aa728a564fcf2d9a5c3c492944a2a10c50cf0dbe38387000000000000000000000000000000000000000000000000000000000000000118a14c1ff4fdcdb919aadb9fc2340cc5047960db89930154409cccdf9a65bb42000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000568656c6c6f000000000000000000000000000000000000000000000000000000
ZetaChain Gateway: 0x6c533f7fe93fae114d0954697069df33c9b74fd7

❌ Reverts:

https://zetachain-athens.blockpi.network/lcd/v1/public/zeta-chain/crosschain/inboundHashToCctxData/0x7a95ea9f3b0e43037891d283fb715c0eb1f2fe6ff4511e338b592b51e529b7d1

https://solana.fm/tx/5MwKnYt8aJJonJvGzU1J4qW8ypXmejgv2bC8AsmMHb4CYkmaxb3qJWNGofq7gor2muFXeV9HxHGYh2rdoso1qU3G?cluster=devnet-solana

Program logged: "Failure reason: Program ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis failed: sum of account balances before and after instruction do not match"

@fadeev
Copy link
Member Author

fadeev commented Aug 19, 2025

yarn -s zetachain z call \
  --receiver $PROGRAM_ID \
  --data $PAYLOAD \
  --private-key $PRIVATE_KEY \
  --rpc $RPC_ZETACHAIN \
  --zrc20 $ZRC20_SOL \
  --gateway $GATEWAY_ZETACHAIN
Contract call details:
Raw data: 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000003b3e5f0413b220140821aa728a564fcf2d9a5c3c492944a2a10c50cf0dbe38387000000000000000000000000000000000000000000000000000000000000000118a14c1ff4fdcdb919aadb9fc2340cc5047960db89930154409cccdf9a65bb42000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000568656c6c6f000000000000000000000000000000000000000000000000000000
Withdraw Gas Fee: 0.001 SOL.SOLANA
ZetaChain Gateway: 0x6c533f7fe93fae114d0954697069df33c9b74fd7

❌ Reverts:

https://zetachain-athens.blockpi.network/lcd/v1/public/zeta-chain/crosschain/inboundHashToCctxData/0x8321465d9d1eb8613d454257604b11bcd9b45e7464a5916be6b4e7d4ca2f0f8a

https://solana.fm/tx/2UZfrzD81ZZTCpCUyWWKTvVmmrWJZvpVEPNVNCVAoWWCpL22T3SQEcKNbpKqvMx7RkghoDWKYTdz1AyuUyCwCCgu?cluster=devnet-solana

Program logged: "Failure reason: Program D7FLXZPthgJewjp4jsGBLNSCTdDyhB6GEmWddyqTYLZc failed: custom program error: 0x1004"

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.

Solana example: replace with example from protocol contracts
1 participant