-
Notifications
You must be signed in to change notification settings - Fork 0
/
Calyptus447.sol
37 lines (26 loc) · 1.03 KB
/
Calyptus447.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// https://x.com/calyptus_web3/status/1842089777476092153
// Have a look at the Multisig Authorization contract below
// and tell us what's wrong with the executeAction() function.
contract MultisigAuth {
struct AuthData {
bytes digitalSignature;
address signer;
bytes32 actionHash;
}
// additional fields as needed
// Other parts of the contract...
function executeAction(AuthData[] calldata authorizations, bytes calldata operation) public {
// Logic to prevent replay attacks remains here
for (uint256 idx = 0; idx < authorizations.length; ++idx) {
require(
checkSignatureValidity(authorizations[idx].digitalSignature, authorizations[idx].signer),
"Signature not valid"
);
require(allowedSigners[authorizations[idx].signer], "Signer not authorized");
}
performOperation(operation);
// Additional functions and logic...
}
}