Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Eip712 doesn't support any messages #1245

Closed
facs95 opened this issue Aug 12, 2022 · 2 comments
Closed

Eip712 doesn't support any messages #1245

facs95 opened this issue Aug 12, 2022 · 2 comments
Assignees
Milestone

Comments

@facs95
Copy link
Contributor

facs95 commented Aug 12, 2022

Most messages with EIP712 are working fine, but the code is not working if some values that are not the cosmos transaction itself, are contained inside a proto.Any object.

The issue is that when we create read the transactions values, they are parsed using the JSON lib, for example, for public keys it returns the base64 representation of the pubkey as a string.

When the lib generates the types for the EIP712 message, it uses codec.UnpackAny if the message is contained inside a proto.Any object it will return {type:string, value:...} instead of the expected string

Expected

Add tests for any messages, here's a start: #1076

@facs95 facs95 added C:x/evm EVM module Type: Bug and removed C:x/evm EVM module labels Aug 12, 2022
@facs95 facs95 linked a pull request Aug 12, 2022 that will close this issue
11 tasks
@facs95 facs95 moved this to 🏗 In progress in Ethermint Board Aug 12, 2022
@danburck
Copy link
Contributor

@ramirocarlucho Lets try to avoid forking the sdk

@fedekunze fedekunze added this to the v0.20.x milestone Aug 19, 2022
@facs95 facs95 moved this from 🏗 In progress to 👀 In review in Ethermint Board Aug 22, 2022
@facs95 facs95 moved this from 👀 In review to ✅ Done in Ethermint Board Aug 31, 2022
@ramacarlucho
Copy link
Contributor

This issue is related to the amino encoding of the messages in the cosmos-sdk and out eip712 implementation. As long as the message supports amino encoding, the eip712 will work correctly.

Since updating to cosmos-sdk 0.46 all the problems were fixed, some test were added on this pr
#1346

Repository owner moved this from ✅ Done to ❌ Canceled in Ethermint Board Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Status: Canceled
4 participants