Skip to content
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

Add ethereum compatible signer to subxt_signer? #1467

Closed
jsdw opened this issue Mar 7, 2024 · 2 comments · Fixed by #1501
Closed

Add ethereum compatible signer to subxt_signer? #1467

jsdw opened this issue Mar 7, 2024 · 2 comments · Fixed by #1501
Assignees

Comments

@jsdw
Copy link
Collaborator

jsdw commented Mar 7, 2024

Anybody can implement a custom signer for Subxt to sign things as they need.

An example which I put together just now which seems to work for creating ethereum-compatible signatures and using AccountId20s is here:

https://gist.github.com/jsdw/13240f9341e433ea639b89d0d4235c8b

I'd be interested to check with other eth-compatible chains whether this solution works for all of them, and if so, it might be a good idea to add this in a more complete form to subxt_signer.

For now though, if anybody needs eth style signing, please check out the Gist above and let me know whether it works for you!

(this has come up previously in #1037)

@ryanleecode
Copy link
Contributor

On moonbeam this is working perfect. For other chains that claim they are "EVM compatible" i'm looking inside their metadata to see if there are any entries that are Account20. The issue with the implementation is trying to guess where the Account20 is located under eth_runtime::runtime_types. Because its not always the same path say eth_runtime_runtime_types::account:Account20.

@jsdw
Copy link
Collaborator Author

jsdw commented Mar 25, 2024

The issue with the implementation is trying to guess where the Account20 is located under eth_runtime::runtime_types. Because its not always the same path say eth_runtime_runtime_types::account:Account20.

It's totally ok if their AccountId20's live in different places (that part is configued separately per chain anyway) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants