Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
harpy-wings committed Sep 23, 2023
1 parent 2984c94 commit 4dab0f7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions contracts/MultiSigWallet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ contract MultiSigWallet {
event ConfirmTransaction(address indexed owner, uint indexed txIndex);
event RevokeConfirmation(address indexed owner, uint indexed txIndex);
event ExecuteTransaction(address indexed owner, uint indexed txIndex);

enum TxType {transfer, addOwner, removeOwner }
address[] public owners;
mapping(address => bool) public isOwner;
Expand All @@ -26,7 +27,7 @@ contract MultiSigWallet {
uint public addOwnerConfirmationsRequired = 70; // 70/100 70%
uint public removeOwnerConfirmationsRequired = 90; // 90/100 | 90%

bytes4 private _transferSelector;
bytes4 private _transferSelector = bytes4(keccak256("transfer(address,uint256)"));
struct Transaction {
TxType txType;
address baseToken;
Expand Down Expand Up @@ -68,8 +69,6 @@ contract MultiSigWallet {
for (uint i = 0; i < _owners.length; i++) {
addOwner(_owners[i]);
}

_transferSelector = bytes4(keccak256("transfer(address,uint256)"));
}

receive() external payable {
Expand Down Expand Up @@ -153,9 +152,7 @@ contract MultiSigWallet {
emit ExecuteTransaction(msg.sender, _txIndex);
}

function revokeConfirmation(
uint _txIndex
) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) {
function revokeConfirmation(uint _txIndex) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) {
Transaction storage transaction = transactions[_txIndex];

require(isConfirmed[_txIndex][msg.sender], "tx not confirmed");
Expand Down

0 comments on commit 4dab0f7

Please sign in to comment.