File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -56,18 +56,23 @@ impl TapVersion {
5656}
5757
5858/// The domain separator is defined as:
59- /// - `name`: "TAP"
60- /// - `version`: "1" or "2" depending on protocol version
59+ /// - `name`: "TAP" for V1, "GraphTally" for V2 - This could be a fn argument but we don't want to change the function signature.
60+ /// - `version`: always set to "1", what changes is the domain name.
6161/// - `chain_id`: The chain ID of the chain where the domain separator is deployed.
6262/// - `verifying_contract`: The address of the contract that is verifying the signature.
6363pub fn tap_eip712_domain (
6464 chain_id : u64 ,
6565 verifying_contract_address : Address ,
6666 version : TapVersion ,
6767) -> Eip712Domain {
68+ let name = match version {
69+ TapVersion :: V1 => "TAP" ,
70+ TapVersion :: V2 => "GraphTally" ,
71+ } ;
72+
6873 eip712_domain ! {
69- name: "TAP" ,
70- version: version . as_str ( ) ,
74+ name: name ,
75+ version: "1" ,
7176 chain_id: chain_id,
7277 verifying_contract: verifying_contract_address,
7378 }
You can’t perform that action at this time.
0 commit comments