@@ -43,10 +43,11 @@ export interface Attestation {
43
43
export const getDomainSeparator = (
44
44
chainId : number ,
45
45
disputeManagerAddress : string ,
46
+ version : string ,
46
47
) : string => {
47
48
const domainSeparator = eip712 . domainSeparator ( {
48
49
name : 'Graph Protocol' ,
49
- version : '0' ,
50
+ version,
50
51
chainId,
51
52
verifyingContract : disputeManagerAddress ,
52
53
salt : SALT ,
@@ -59,8 +60,9 @@ export const createAttestation = async (
59
60
chainId : number ,
60
61
disputeManagerAddress : string ,
61
62
receipt : Receipt ,
63
+ version : string ,
62
64
) : Promise < Attestation > => {
63
- const domainSeparator = getDomainSeparator ( chainId , disputeManagerAddress )
65
+ const domainSeparator = getDomainSeparator ( chainId , disputeManagerAddress , version )
64
66
const encodedReceipt = encodeReceipt ( receipt )
65
67
const message = eip712 . encode ( domainSeparator , encodedReceipt )
66
68
const messageHash = utils . keccak256 ( message )
@@ -116,8 +118,9 @@ export const recoverAttestation = (
116
118
chainId : number ,
117
119
disputeManagerAddress : string ,
118
120
attestation : Attestation ,
121
+ version : string ,
119
122
) : string => {
120
- const domainSeparator = getDomainSeparator ( chainId , disputeManagerAddress )
123
+ const domainSeparator = getDomainSeparator ( chainId , disputeManagerAddress , version )
121
124
const receipt = {
122
125
requestCID : attestation . requestCID ,
123
126
responseCID : attestation . responseCID ,
0 commit comments