Skip to content

EIP 712 Signatures #188

Answered by brunoalano
brunoalano asked this question in Q&A
Feb 19, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Got it working using the following:

import type { VoidSigner } from "@ethersproject/abstract-signer";
import { useNetwork, useSigner } from "wagmi";

const [{ data: signer }] = useSigner();

const domain = {
  name: "Ether Mail",
  version: "1",
  chainId: networkData.chain.id,
  verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
};

// The named list of all type definitions
const types = {
  Person: [
    { name: "name", type: "string" },
    { name: "wallet", type: "address" },
  ],
  Mail: [
    { name: "from", type: "Person" },
    { name: "to", type: "Person" },
    { name: "contents", type: "string" },
  ],
};

// The data to sign
const value = {
  from: {
    name: "Cow"

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jasheal
Comment options

Answer selected by brunoalano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants