-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement EIP-712 Typed Data #51
Conversation
@awrichar - looks like there's a DCO issue on the initial commit. Will work with you to get that resolved. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
===========================================
- Coverage 100.00% 99.90% -0.10%
===========================================
Files 35 38 +3
Lines 3015 3317 +302
===========================================
+ Hits 3015 3314 +299
- Misses 0 2 +2
- Partials 0 1 +1 ☔ View full report in Codecov by Sentry. |
@@ -199,8 +199,16 @@ func (rc *RPCClient) SyncRequest(ctx context.Context, rpcReq *RPCRequest) (rpcRe | |||
} | |||
// JSON/RPC allows errors to be returned with a 200 status code, as well as other status codes | |||
if res.IsError() || rpcRes.Error != nil && rpcRes.Error.Code != 0 { | |||
log.L(ctx).Errorf("RPC[%s] <-- [%d]: %s", rpcTraceID, res.StatusCode(), rpcRes.Message()) | |||
err := fmt.Errorf(rpcRes.Message()) | |||
rpcMsg := rpcRes.Message() |
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 was required due to resty
update
This is very incomplete - just a start based on reading of EIP-712. Signed-off-by: Andrew Richardson <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Andrew Richardson <[email protected]>
Signed-off-by: Andrew Richardson <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
FYI: I went back to add signoff on my commit, then replayed all of @peterbroadhurst 's commits on top. Should be unchanged in terms of the actual code changes. |
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
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.
Just a quick question about error codes with a possible duplicate, but happy to merge as is
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Summary
V4
derivation of the behavior, as adopted by Metamask and OpenZeppelin communitiesethsigner.Wallet
interface withethsigner.WalletTypedData
fswallet.Wallet
implementation to includeSignTypedDataV4
firefly-common
Outstanding conversations
chainId
in theEIP712Domain
structure, where it can be verified on-chain using the currentblock.chainId
.ethsigner.SignTypedDataV4
code does not callsig.UpdateEIP155(chainID)