forked from mirror/go-ethereum
core/signer, clef: improve ui-test flow, fix errors in uint handling (#19584)
* core/signer, clef: improve ui-test flow, fix errors in uint handling for eip-712 * core/signer: add fuzzer testcases + crashfixes * signer: address review concerns, check sign in integer parsingChrisChinchilla-patch-3
parent
7a22da98b9
commit
17381ecc66
@ -0,0 +1,51 @@ |
|||||||
|
// Copyright 2019 The go-ethereum Authors
|
||||||
|
// This file is part of go-ethereum.
|
||||||
|
//
|
||||||
|
// go-ethereum is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// go-ethereum is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
package core |
||||||
|
|
||||||
|
import ( |
||||||
|
"math/big" |
||||||
|
"testing" |
||||||
|
) |
||||||
|
|
||||||
|
func TestParseInteger(t *testing.T) { |
||||||
|
for i, tt := range []struct { |
||||||
|
t string |
||||||
|
v interface{} |
||||||
|
exp *big.Int |
||||||
|
}{ |
||||||
|
{"uint32", "-123", nil}, |
||||||
|
{"int32", "-123", big.NewInt(-123)}, |
||||||
|
{"uint32", "0xff", big.NewInt(0xff)}, |
||||||
|
{"int8", "0xffff", nil}, |
||||||
|
} { |
||||||
|
res, err := parseInteger(tt.t, tt.v) |
||||||
|
if tt.exp == nil && res == nil { |
||||||
|
continue |
||||||
|
} |
||||||
|
if tt.exp == nil && res != nil { |
||||||
|
t.Errorf("test %d, got %v, expected nil", i, res) |
||||||
|
continue |
||||||
|
} |
||||||
|
if tt.exp != nil && res == nil { |
||||||
|
t.Errorf("test %d, got '%v', expected %v", i, err, tt.exp) |
||||||
|
continue |
||||||
|
} |
||||||
|
if tt.exp.Cmp(res) != 0 { |
||||||
|
t.Errorf("test %d, got %v expected %v", i, res, tt.exp) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,5 @@ |
|||||||
|
### EIP 712 tests |
||||||
|
|
||||||
|
These tests are json files which are converted into eip-712 typed data. |
||||||
|
All files are expected to be proper json, and tests will fail if they are not. |
||||||
|
Files that begin with `expfail' are expected to not pass the hashstruct construction. |
@ -0,0 +1,60 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Foo": [ |
||||||
|
{ |
||||||
|
"name": "addys", |
||||||
|
"type": "address[]" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "stringies", |
||||||
|
"type": "string[]" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "inties", |
||||||
|
"type": "uint[]" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Foo", |
||||||
|
"domain": { |
||||||
|
"name": "Lorem", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"addys": [ |
||||||
|
"0x0000000000000000000000000000000000000001", |
||||||
|
"0x0000000000000000000000000000000000000002", |
||||||
|
"0x0000000000000000000000000000000000000003" |
||||||
|
], |
||||||
|
"stringies": [ |
||||||
|
"lorem", |
||||||
|
"ipsum", |
||||||
|
"dolores" |
||||||
|
], |
||||||
|
"inties": [ |
||||||
|
"0x0000000000000000000000000000000000000001", |
||||||
|
"3", |
||||||
|
4.0 |
||||||
|
] |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,54 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person[]" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { "name": "Cow"}, |
||||||
|
"to": [{ "name": "Moose"},{ "name": "Goose"}], |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,76 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "test2", |
||||||
|
"type": "uint8" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { |
||||||
|
"name": "Cow", |
||||||
|
"test": "3", |
||||||
|
"test2": 5.0, |
||||||
|
"wallet": "0xcD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": { |
||||||
|
"name": "Bob", |
||||||
|
"test": "0", |
||||||
|
"test2": 5, |
||||||
|
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" |
||||||
|
}, |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,67 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person[]": [ |
||||||
|
{ |
||||||
|
"name": "baz", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person[]" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { |
||||||
|
"name": "Cow", |
||||||
|
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": {"baz": "foo"}, |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,64 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "Person" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { |
||||||
|
"name": "Cow", |
||||||
|
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": { |
||||||
|
"name": "Bob", |
||||||
|
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" |
||||||
|
}, |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,76 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256 ... and now for something completely different" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "test2", |
||||||
|
"type": "uint8" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { |
||||||
|
"name": "Cow", |
||||||
|
"test": "3", |
||||||
|
"test2": 5.0, |
||||||
|
"wallet": "0xcD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": { |
||||||
|
"name": "Bob", |
||||||
|
"test": "0", |
||||||
|
"test2": 5, |
||||||
|
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" |
||||||
|
}, |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,77 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "test2", |
||||||
|
"type": "uint8" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"blahonga": "zonk bonk", |
||||||
|
"from": { |
||||||
|
"name": "Cow", |
||||||
|
"test": "3", |
||||||
|
"test2": 5.0, |
||||||
|
"wallet": "0xcD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": { |
||||||
|
"name": "Bob", |
||||||
|
"test": "0", |
||||||
|
"test2": 5, |
||||||
|
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" |
||||||
|
}, |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,64 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"vFAILFAILerifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { |
||||||
|
"name": "Cow", |
||||||
|
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": { |
||||||
|
"name": "Bob", |
||||||
|
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" |
||||||
|
}, |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,64 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "Blahonga" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { |
||||||
|
"name": "Cow", |
||||||
|
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": { |
||||||
|
"name": "Bob", |
||||||
|
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" |
||||||
|
}, |
||||||
|
"contents": "Hello, Bob!" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"test":"257" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"test":257 |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"test":"255.3" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"test": 255.3 |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"test":"255.3" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,60 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Foo": [ |
||||||
|
{ |
||||||
|
"name": "addys", |
||||||
|
"type": "address[]" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "stringies", |
||||||
|
"type": "string[]" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "inties", |
||||||
|
"type": "uint[]" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Foo", |
||||||
|
"domain": { |
||||||
|
"name": "Lorem", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"addys": [ |
||||||
|
"0x0000000000000000000000000000000000000001", |
||||||
|
"0x0000000000000000000000000000000000000002", |
||||||
|
"0x0000000000000000000000000000000000000003" |
||||||
|
], |
||||||
|
"stringies": [ |
||||||
|
"lorem", |
||||||
|
"ipsum", |
||||||
|
"dolores" |
||||||
|
], |
||||||
|
"inties": [ |
||||||
|
"0x0000000000000000000000000000000000000001", |
||||||
|
"3", |
||||||
|
4.0 |
||||||
|
] |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "uint256" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "test", |
||||||
|
"type": "uint8" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "Ether Mail", |
||||||
|
"version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingContract": "0xCCCcccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"test":257 |
||||||
|
} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
{"domain":{"version":"0","chainId":""}} |
@ -0,0 +1,54 @@ |
|||||||
|
{ "types": { "":[ { |
||||||
|
"name": "name", |
||||||
|
"type":"string" }, |
||||||
|
{ |
||||||
|
"name":"version", |
||||||
|
"type": "string" }, { |
||||||
|
"name": "chaiI", |
||||||
|
"type":"uint256 . ad nowretig omeedifere" }, { |
||||||
|
"ae": "eifinC", |
||||||
|
"ty":"dess" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person":[ |
||||||
|
{ |
||||||
|
"name":"name", |
||||||
|
"type": "string" |
||||||
|
}, { |
||||||
|
"name":"tes", "type":"it8" |
||||||
|
}, |
||||||
|
{ "name":"t", "tye":"uit8" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"a":"ale", |
||||||
|
"type": "ress" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name":"from", "type":"Person" }, |
||||||
|
{ |
||||||
|
"name": "to", "type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "contents", |
||||||
|
"type": "string" |
||||||
|
} |
||||||
|
] |
||||||
|
}, "primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name":"theMail", "version": "1", |
||||||
|
"chainId": "1", |
||||||
|
"verifyingntract": "0xCcccCCCcCCCCCCCcCCcCCCcCcccccC" |
||||||
|
}, |
||||||
|
"message": { "from": { |
||||||
|
"name": "Cow", |
||||||
|
"test": "3", |
||||||
|
"est2":5.0, |
||||||
|
"llt": "0xcD2a3938E13D947E0bE734DfDD86" }, "to": { "name": "Bob", |
||||||
|
"ts":"", |
||||||
|
"tet2": 5, |
||||||
|
"allet": "0bBBBBbbBBbbbbBbbBbbbbBBBbB" |
||||||
|
}, |
||||||
|
"contents": "Hello, Bob!" } |
||||||
|
} |
@ -0,0 +1,64 @@ |
|||||||
|
{ |
||||||
|
"types": { |
||||||
|
"EIP712Domain": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "version", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "chainId", |
||||||
|
"type": "int" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "verifyingContract", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Person": [ |
||||||
|
{ |
||||||
|
"name": "name", |
||||||
|
"type": "string" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "wallet", |
||||||
|
"type": "address" |
||||||
|
} |
||||||
|
], |
||||||
|
"Mail": [ |
||||||
|
{ |
||||||
|
"name": "from", |
||||||
|
"type": "Person" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "to", |
||||||
|
"type": "Mail" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "s", |
||||||
|
"type": "Person" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"primaryType": "Mail", |
||||||
|
"domain": { |
||||||
|
"name": "l", |
||||||
|
"version": "1", |
||||||
|
"chainId": "", |
||||||
|
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" |
||||||
|
}, |
||||||
|
"message": { |
||||||
|
"from": { |
||||||
|
"name": "", |
||||||
|
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" |
||||||
|
}, |
||||||
|
"to": { |
||||||
|
"name": "", |
||||||
|
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" |
||||||
|
}, |
||||||
|
"": "" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
{"types":{"0":[{}]}} |
Loading…
Reference in new issue