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

LoomProvider should use a dummy address when making static calls #291

Open
enlight opened this issue Jul 22, 2019 · 1 comment
Open

LoomProvider should use a dummy address when making static calls #291

enlight opened this issue Jul 22, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@enlight
Copy link
Contributor

enlight commented Jul 22, 2019

Currently the LoomProvider API requires a private key to be passed into the constructor

privateKey: Uint8Array,

Frequently users will be constructing a LoomProvider for use with eth-signing, in which case the private key isn't actually needed. The private key should be optional, if it's not provided a dummy address should be used.

A related problem is that if a dummy private key is specified when constructing LoomProvider and callerChainId is set (as is usually the case when doing eth-signing) then the address used for static calls has the callerChainId prefix - which is the wrong prefix since the private key is always expected to be a native ed25519 key, and therefore the chain ID should always match the client chain ID.

@eduardonunesp
Copy link
Contributor

#307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants