-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(EIP712): new test + moved EIP712 reused data into one file;
- Loading branch information
1 parent
07965a1
commit 5493dd0
Showing
3 changed files
with
95 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// | ||
// EIP712TestData.swift | ||
// | ||
// Created by JeneaVranceanu on 19.10.2023. | ||
// | ||
|
||
import Foundation | ||
|
||
class EIP712TestData { | ||
static let testTypedDataPayload = """ | ||
{ | ||
"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, | ||
"verifyingContract":"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" | ||
}, | ||
"message":{ | ||
"from":{ | ||
"name":"Cow", | ||
"wallet":"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" | ||
}, | ||
"to":{ | ||
"name":"Bob", | ||
"wallet":"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" | ||
}, | ||
"contents":"Hello, Bob!" | ||
} | ||
} | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters