Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
CTG-TOKEN committed Jan 21, 2023
1 parent 8da4eed commit 9553658
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1 @@
pragma solidity ^0.8.0;

contract MultiSigWallet {
address[] public owners;
mapping(address => bool) public isOwner;
address public owner;
address public spender;
address public recipient;
uint public value;

constructor(address[] memory _owners) public {
owners = _owners;
for (uint i = 0; i < owners.length; i++) {
isOwner[owners[i]] = true;
}
}

function execute(address _spender, address _recipient, uint _value) public {
require(isOwner[msg.sender], "Sender is not an owner of the contract");
require(isOwner[spender], "Spender is not an owner of the contract");
spender = _spender;
recipient = _recipient;
value = _value;
}

function confirm(address _spender, address _recipient, uint _value) public {
require(spender == _spender, "Spender does not match the transaction");
require(recipient == _recipient, "Recipient does not match the transaction");
require(value == _value, "Value does not match the transaction");
require(isOwner[msg.sender], "Sender is not an owner of the contract");
spender.transfer(_value);
}
}

0 comments on commit 9553658

Please sign in to comment.