Commit 7b5dfee9 authored by Maurelian's avatar Maurelian

docs(ctb): Improved comments in SafeSigners.sol

parent 30377e22
...@@ -38,10 +38,11 @@ library SafeSigners { ...@@ -38,10 +38,11 @@ library SafeSigners {
} }
/// @notice Extract the signers from a set of signatures. /// @notice Extract the signers from a set of signatures.
/// @param dataHash Hash of the data. /// This method is based closely on the code in the Safe.checkNSignatures() method.
/// @param signatures Signature data for identifying signers. /// https://github.com/safe-global/safe-contracts/blob/e870f514ad34cd9654c72174d6d4a839e3c6639f/contracts/Safe.sol#L274
/// @param requiredSignatures Amount of required valid signatures. /// It has been modified by removing all signature _validation_ code. We trust the Safe to properly validate
/// @return _owners List of unique signers. /// the signatures.
/// This method therefore simply extracts the addresses from the signatures.
function getNSigners( function getNSigners(
bytes32 dataHash, bytes32 dataHash,
bytes memory signatures, bytes memory signatures,
...@@ -53,10 +54,6 @@ library SafeSigners { ...@@ -53,10 +54,6 @@ library SafeSigners {
{ {
_owners = new address[](requiredSignatures); _owners = new address[](requiredSignatures);
// The following code is extracted from the Safe.checkNSignatures() method. It removes the signature
// validation code, and keeps only the parsing code necessary to extract the owner addresses from the
// signatures. We do not double check if the owner derived from a signature is valid. As this is handled
// in the final require statement of Safe.checkNSignatures().
address currentOwner; address currentOwner;
uint8 v; uint8 v;
bytes32 r; bytes32 r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment