-
Notifications
You must be signed in to change notification settings - Fork 470
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
Custom signing methods #287
Conversation
…data. Previously, it could only sign std::String and std::str (UTF-8) data. This reflects the functionality in the Go implementation of message signing: https://github.com/bas-vk/go-ethereum/blob/e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80/internal/ethapi/api.go#L352 as well as what is available in the `ethereum-tx-sign` crate: https://docs.rs/ethereum-tx-sign/2.0.0/ethereum_tx_sign/struct.RawTransaction.html (note the `data` field is a Vec<u8>)
7055c20
to
7f64d60
Compare
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.
Perfect! 👌
Can you fix the formatting issue? |
I fixed the formatting. My only note would be that the fields of |
Thanks for working on this! I feel that we don't really give any guarantees about the types, you can still get the error when you try to recover a signature from them, and being able to construct them outside is probably useful too, so I'll keep it as is. |
what do you mean by "the error"? |
`@reuvenpo This error for instance: Line 122 in 355f092
|
Ah, i see your point. Very well 👍 |
This is a follow up PR to the ideas in this comment on #279.
I define equivalents of methods that call functions on secret contracts, but i sign the transactions locally instead of letting the ethereum node sign them for me with an unlocked account.
The first commit addresses the issue pointed out in this comment (Signing should accept arbitrary binary data rather than only UTF-8 data.)