diff --git a/contracts/SimpleMultiSig.sol b/contracts/SimpleMultiSig.sol index 34036c5..3848308 100644 --- a/contracts/SimpleMultiSig.sol +++ b/contracts/SimpleMultiSig.sol @@ -1,4 +1,5 @@ -pragma solidity ^0.4.24; +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.4; contract SimpleMultiSig { @@ -25,7 +26,7 @@ bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf bytes32 DOMAIN_SEPARATOR; // hash for EIP712, computed from contract address // Note that owners_ must be strictly increasing, in order to prevent duplicates - constructor(uint threshold_, address[] owners_, uint chainId) public { + constructor(uint threshold_, address[] memory owners_, uint chainId) { require(owners_.length <= 10 && threshold_ <= owners_.length && threshold_ > 0); address lastAdd = address(0); @@ -46,7 +47,7 @@ bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf } // Note that address recovered from signatures must be strictly increasing, in order to prevent duplicates - function execute(uint8[] sigV, bytes32[] sigR, bytes32[] sigS, address destination, uint value, bytes data, address executor, uint gasLimit) public { + function execute(uint8[] memory sigV, bytes32[] memory sigR, bytes32[] memory sigS, address destination, uint value, bytes memory data, address executor, uint gasLimit) public { require(sigR.length == threshold); require(sigR.length == sigS.length && sigR.length == sigV.length); require(executor == msg.sender || executor == address(0)); @@ -71,5 +72,8 @@ bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf require(success); } - function () payable external {} + event Received(address, uint); + receive() external payable { + emit Received(msg.sender, msg.value); + } }