Skip to content
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

Add metamask compliance tests #130

Open
pnowosie opened this issue Oct 2, 2019 · 1 comment
Open

Add metamask compliance tests #130

pnowosie opened this issue Oct 2, 2019 · 1 comment
Labels
v0.3 To work with OMG Network v0.3

Comments

@pnowosie
Copy link

pnowosie commented Oct 2, 2019

We agreed on slack that testing metamask compliance regarding structural hash will be more maintainable in this repo than in omisego/elixir-omg.

Here is original message:


In elixir-omg we have metamask 🦊 structural hash compliance test
https://github.com/omisego/elixir-omg/blob/4d0e8b4c60efb2072dab1c8179c1644679a243f4/apps/omg/test/omg/typed_data_hash_test.exs#L178
which are just hard-coded hashes we've generated once playing with browser extension

I'm thinking of moving the test to omg-js because 🦊 's eth-sig-util looks promising https://github.com/MetaMask/eth-sig-util#typedsignaturehash-typeddata and it should be more natural to combine it in JS native env 🙂

My idea is as follows:
• omg-js talking to ch-ch (I've heard we have / planning e2e tests) so we can verify sigs js -> elixir
• omg-js verifies signatures against metamask with above eth-sig-util: js -> metamask
• elixir-omg integration tests or omg-js e2e talks to contract so we have elixir/js -> solidity verification

@pdobacz
Copy link

pdobacz commented Oct 2, 2019

For future reference: the PR linked just above (omgnetwork/elixir-omg#1005) cuts the metamask-compliance tests out of elixir-omg, in case we need that old code for anything

@kevsul kevsul added this to To do in omg-js tasks Oct 4, 2019
@kevsul kevsul added the v0.3 To work with OMG Network v0.3 label Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.3 To work with OMG Network v0.3
Projects
No open projects
omg-js tasks
  
To do
Development

No branches or pull requests

3 participants