Skip to content

Instantly share code, notes, and snippets.

@b1acKr0se
b1acKr0se / signTypedData.js.md
Created August 23, 2022 07:58 — forked from backus/signTypedData.js.md
How signTypedData works

I couldn't find a good explanation of each step of signTypedData EIP with examples of inputs and outputs at each step. I wanted this so I could keep track.

Say this is our private key

const privKey = new Buffer(
  "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",
  "hex"
);
// Dependency file: @openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, { Component } from "react";
import { View, Image, TouchableOpacity } from "react-native";
public abstract class Job {
public JobType type;
public JobListener listener;
abstract public void start();
public void setListener(JobListener listener) {
this.listener = listener;
}
*.iml
.gradle
/local.properties
.DS_Store
/build
/captures
/.idea/
public class ExceptionHandler implements
java.lang.Thread.UncaughtExceptionHandler {
private final Activity myContext;
private final String LINE_SEPARATOR = "\n";
public ExceptionHandler(Activity context) {
myContext = context;
}
public void uncaughtException(Thread thread, Throwable exception) {