File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed 
contracts/utils/cryptography Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,12 @@ library ECDSA {
207207
208208    /** 
209209     * @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098) 
210-      * formats. Returns (0,0,0) for invalid signatures. Consider skipping {tryRecover} or {recover} if so. 
210+      * formats. Returns (0,0,0) for invalid signatures. 
211+      * 
212+      * For 64-byte signatures, `v` is automatically normalized to 27 or 28. 
213+      * For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover. 
214+      * 
215+      * Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation. 
211216     */ 
212217    function parse  (bytes  memory  signature ) internal  pure  returns  (uint8  v , bytes32  r , bytes32  s ) {
213218        assembly  ("memory-safe" ) {
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments