Complete the code to define the minimum number of signatures required.
uint constant MIN_SIGNATURES = [1];The minimum number of signatures required is set to 3 to ensure multi-signature security.
Complete the code to check if the number of collected signatures meets the minimum required.
require(signaturesCount [1] MIN_SIGNATURES, "Not enough signatures");
The code checks if the collected signatures are greater than or equal to the minimum required.
Fix the error in the function that verifies if a signer is authorized.
function isAuthorized(address signer) public view returns (bool) {
return owners[[1]];
}The function should check if the given signer address is in the owners list.
Fill both blanks to create a mapping that tracks signatures for each transaction.
mapping(uint => mapping(address => [1])) public signatures; function signTransaction(uint txId) public { signatures[txId][[2]] = true; }
The mapping stores a boolean to track if an owner signed a transaction. The signer is msg.sender.
Fill all three blanks to create a function that executes a transaction after enough signatures.
function executeTransaction(uint txId) public {
require(signatures[txId][[1]], "Not signed by owner");
require(signaturesCount [2] MIN_SIGNATURES, "Insufficient signatures");
transactions[txId].[3]();
}The function checks if the caller signed, verifies enough signatures, then calls the transaction.