Move.

Post

Share your knowledge.

skywinder.
Jan 17, 2025
Expert Q&A

How can I verify on-chain binary matches GitHub code?

I've got a smart contract on-chain and I need to ensure that its binary matches with the code from a GitHub repository. I've installed the sui client. How can I compile the repo and compare the binary effectively?

  • Move Bug
2
2
Share
Comments
.

Answers

2
Theoremus.
Jan 17 2025, 16:19

To verify if the on-chain contract binary matches the GitHub repository, you should clone the repository locally and compile it to generate the bytecode. Once you have the bytecode, use an Explorer's bytecode viewer for a specific package to compare it with the on-chain binary. For example, you can use this link to view on-chain bytecode. By comparing the locally compiled bytecode to the one on-chain, you can verify if they match.

2
Best Answer
Comments
.
Xavier.eth.
Jan 17 2025, 21:22

Make sure you compile the source code locally using the command sui move build after you clone the repository. This step will help you generate the bytecode needed for verification.

2
Comments
.

Do you know the answer?

Please log in and share it.

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148Posts231Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

Reward CampaignJuly