Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emit deposit and withdrawal events #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion contracts/SimpleMultiSig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf
address[] public ownersArr; // immutable state

bytes32 DOMAIN_SEPARATOR; // hash for EIP712, computed from contract address

event Deposit(address indexed from, uint value);
event Withdrawal(address indexed to, uint value);

// Note that owners_ must be strictly increasing, in order to prevent duplicates
constructor(uint threshold_, address[] owners_, uint chainId) public {
Expand Down Expand Up @@ -68,8 +71,11 @@ bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf
nonce = nonce + 1;
bool success = false;
assembly { success := call(gasLimit, destination, value, add(data, 0x20), mload(data), 0, 0) }
emit Withdrawal(destination, value);
require(success);
}

function () payable external {}
function () payable external {
emit Deposit(msg.sender, msg.value);
}
}