-
Notifications
You must be signed in to change notification settings - Fork 149
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
Implement Pink #399
Merged
Implement Pink #399
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2ab8ec0
to
3e0e52e
Compare
4b7bb06
to
9900926
Compare
Finish key management in #546 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
State: The core of the substrate pallet-contract runs in enclave without any modification now.
How to play
1. Compile and run pRuntime, pherry and phala-node.
2. Force register the worker as GK with sudo.
3. Compile an ink project to get an ink wasm binary.
4. Instantiate the ink.
4.1 Create the message binary with debug-cli:
4.2 Copy the above command output and push the instantiate message to
phala/pink/gk/request
.5. Check the instantiate status.
We can see the following pRuntime log on instantiate success:
Or check the chain-state to get the contract id and pubkey:
![image](https://user-images.githubusercontent.com/6442159/137665639-6ff99a56-6b50-46e1-a857-e179e8e0eddf.png)
6. Query the ink.
After the ink contract has been instantiated, we can play with it via
query
orcommand
.Use debug-cli for a basic query:
Or use the js-sdk for more featured functions.