Closed containerman17 closed 1 month ago
Prototype implementation of EIP712 integration in MorpheusVM
Verify(ctx context.Context, msg []byte) error
to Verify(ctx context.Context, tx *Transaction) error
.Transaction.Digest()
call from Transaction to Auth.MarshalJSON
method of an Action, e.g., displaying dates in ISO format and adding decimal separators to numbers.This bug https://github.com/MetaMask/metamask-extension/issues/13675 prevents us from using the full uint256 chain IDs. For now, we'll have to use chainId % 4503599627370476
instead of the actual chain ID in EIP712. This issue requires further investigation.
Most blockchain applications generate transactions through JavaScript browser-based clients. I expect the same for HyperSDK.
EIP-712 allows structured data to be signed in Core wallet, Metamask, and other mainstream EVM-compatible wallets. We can use it as a temporary solution to sign transactions in HyperSDK.
Drawbacks:
Anticipated steps for PoC:
[ ] Implement a non-backwards compatible version of EIP-712 for MorpheusVM or TokenVM.The goal is not to implement but rather to decide if this is implementable and worth implementing.