You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that ethers.js cannot be used to provide EIP712 signatures for evmos due to the main reason that ethers.js and the EIP domain definitions defined by evmos have different types.
There is an inconsistency between the type defined in quarix and the verifyingContract and salt values provided by ethers.js.
The ethers.js library provides the signTypedData method for signing structured data following the EIP712 standard. However, it only allows users to provide the data domain and does not support custom EIP712 domain definitions. This causes a problem when validating signatures in evmos as the provided signature does not match the expected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I found that ethers.js cannot be used to provide EIP712 signatures for evmos due to the main reason that ethers.js and the EIP domain definitions defined by evmos have different types.
The EIP712 domain defined by ethers.js is as follows, for details please refer to https://github.com/ethers-io/ethers.js/blob/main/src.ts/hash/typed-data.ts#L83-L89 and https://eips.ethereum.org/EIPS/eip-712
The EIP712 domain defined by evmos is as follows, for details please refer to https://github.com/evmos/evmos/blob/main/ethereum/eip712/eip712_legacy.go#L89C19-L110C4
There is an inconsistency between the type defined in
quarix
and theverifyingContract
andsalt
values provided byethers.js
.The
ethers.js
library provides thesignTypedData
method for signing structured data following the EIP712 standard. However, it only allows users to provide the data domain and does not support custom EIP712 domain definitions. This causes a problem when validating signatures in evmos as the provided signature does not match the expected.Beta Was this translation helpful? Give feedback.
All reactions