Commit 7b5dfee9 authored by Maurelian's avatar Maurelian

docs(ctb): Improved comments in SafeSigners.sol

parent 30377e22
......@@ -38,10 +38,11 @@ library SafeSigners {
}
/// @notice Extract the signers from a set of signatures.
/// @param dataHash Hash of the data.
/// @param signatures Signature data for identifying signers.
/// @param requiredSignatures Amount of required valid signatures.
/// @return _owners List of unique signers.
/// This method is based closely on the code in the Safe.checkNSignatures() method.
/// https://github.com/safe-global/safe-contracts/blob/e870f514ad34cd9654c72174d6d4a839e3c6639f/contracts/Safe.sol#L274
/// It has been modified by removing all signature _validation_ code. We trust the Safe to properly validate
/// the signatures.
/// This method therefore simply extracts the addresses from the signatures.
function getNSigners(
bytes32 dataHash,
bytes memory signatures,
......@@ -53,10 +54,6 @@ library SafeSigners {
{
_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;
uint8 v;
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