-
Notifications
You must be signed in to change notification settings - Fork 19
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
added ethereum address20 support #2216
Conversation
Codecov ReportAttention: Patch coverage is
|
@@ -103,6 +103,7 @@ allow = [ | |||
"OpenSSL", | |||
"Unicode-DFS-2016", | |||
"Zlib", | |||
"Unicode-3.0", |
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.
@wilwade This appears to be compatible with our license but would be good to double check.
@@ -0,0 +1,379 @@ | |||
#![cfg_attr(not(feature = "std"), no_std)] |
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.
Copied from sp_runtime
and only modified the Ecdsa Path
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.
- Reviewed code. Left a couple comments in the e2e tests & JS code, non-blocking, could be in another PR
- Ran unit tests
- Ran e2e tests locally
throw new Error(`ecdsa type is not supported!`); | ||
} | ||
return pair.address; | ||
} |
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.
this might be required at quite a few places at some point/utility, should be documented?
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.
I Agree With This Comment
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.
Yeah, I already cleaned up and added more documentation on my other PR which focuses on e2e tests. Going to keep it as is so that it does not cause conflicts with my second PR
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.
Looks great... also checked out & ran e2e tests as well as reviewing code.
const passkeyPayload = await createPasskeyPayload(passKeyPrivateKey, passKeyPublicKey, passkeyCall, false); | ||
const passkeyProxy = ExtrinsicHelper.executePassKeyProxy(fundedKeys, passkeyPayload); | ||
assert.doesNotReject(passkeyProxy.fundAndSendUnsigned(fundingSource)); | ||
await assert.doesNotReject(passkeyProxy.fundAndSendUnsigned(fundingSource)); |
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.
👍 thanks
throw new Error(`ecdsa type is not supported!`); | ||
} | ||
return pair.address; | ||
} |
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.
I Agree With This Comment
) | ||
); | ||
} catch (e) { | ||
if ((e as any).name === 'RpcError') { |
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.
🎖️
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.
Great work 💯
Goal
The goal of this PR is to allow sending transactions using ethereum signatures and ethereum addresses
Closes #2206
Changes
MultiSignature
withUnifiedSignature
in the runtime which supports ethereum signatures for ecdsaAccountIdLookup
withEthereumCompatibleAccountIdLookup
in runtime which support 20 bytes accounts in MultiAddressstart-frequency-instant
mode (this would be helpful in debugging)Warning
getUnifiedAddress(keyPair)
function instead ofkeypair.address
directly. Thisb would ensure we are using correct ethereum address for ethereum keys.Checklist