-
Notifications
You must be signed in to change notification settings - Fork 8
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
Calculate compiled ErgoScript hash from URL #25
Comments
Hi @greenhat, do you want this feature to be packaged as a separate playground, or part of the library? Also, does the dependency on ergo-scala-compiler overlap with appkit? Thanks. |
Part of the library. In the end, I see a link in EIP repo to Scastie that calculate and shows the hash for the contract in EIP's PR. |
When it's convenient for you, could I please get write access to this repo? I've got a PR for this issue ready to go. |
Sure. I sent an invitation. |
Thank you! |
Motivation
To show a hash of serialized ErgoTree for a published contract(ErgoScript). Think of a contract in EIP that is then used in some off-chain code. The idea is to give a user a way to check the hash of the published contract (EIP) to be equivalent to the hash of the compiled contract used in the app(off-chain code).
Implementation details
Fetch ErgoScript from a given URL (i.e. github), compile it to ErgoTree, serialize then calculate a hash. Print the hash along with P2S addresses for mainnet and testnet, and also print serialized ErgoTree in Base16 encoding (node/explorer API format).
The text was updated successfully, but these errors were encountered: