Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

make signing easy to do from sol-rs #16

Open
snd opened this issue Dec 18, 2017 · 4 comments
Open

make signing easy to do from sol-rs #16

snd opened this issue Dec 18, 2017 · 4 comments
Assignees

Comments

@snd
Copy link
Contributor

snd commented Dec 18, 2017

i'm trying to replicate a truffle test that uses web.eth.sign (https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsign)

how can i best do this in rust?

@tomusdrw
Copy link
Collaborator

This needs to be a separate API of evm object, the code is in ethkey, you can have a look at accounts_provider.mod.

I think the API should look like this:

let account = evm.new_account();
let signed = account.sign(data);

contract.functions().do_sth(signed).transact(evm.with_sender(account.address()));

@snd
Copy link
Contributor Author

snd commented Dec 18, 2017

thanks for the pointer!

@lght
Copy link
Contributor

lght commented Dec 18, 2017

Thank you for opening this issue, working on something similar myself for the PrivateContract example.

@tomusdrw this will likely solve the issues I'm having with recovering correct addresses, many thanks!

@snd snd self-assigned this Dec 20, 2017
@snd
Copy link
Contributor Author

snd commented Dec 20, 2017

i'll figure this out and try to make it easy to use from sol-rs

@snd snd changed the title how to web.eth.sign in rust? make signing easy to do from sol-rs Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants
@snd @tomusdrw @lght and others