-
Notifications
You must be signed in to change notification settings - Fork 0
feat(sdk): keystore full example #144
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
base: main
Are you sure you want to change the base?
Conversation
Previous implementation required the user to set the value to transfer in the overrides. The new one makes use of the `amount` field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the PR description and make it step by step:
- Download contract deps and compile example contract.
- Create a new keystore named "LambdaClass" in the "ContractKeystores" directory.
- Load the keystore.
- Fund the keystore account.
- Deploy the signer recovery example contract with the keystore account.
- Prepare the calldata to call the example contract
- Prepare a message.
- Sign the hash of the message with the keystore private key.
- ABI-encode the parameters.
- Prepare and send the transaction for calling the example contract.
- Get the log emitted by the contract call execution.
- Compare it with the expected one.
Do the same for the comments in the code (add 1., 2., etc, consistently with the PRs description).
Also add to the PR description a step by step of how to run this (we should consider adding the rich account private key as an argument, or either the path to a funded keystore).
Motivation
New example using the new keystore feature.
Description
This PR adds an example that:
i. Prepares a message.
ii. Signs the hash of the message with the keystore private key.
iii. ABI-encodes the parameters.
How to test
http://localhost:8545
: