Every multisig wallet should have the following basic components:
- A list of addresses who have permission to do something
- A set of rules for approval
- An option to receive Ether
- Ways to submit/approve a request
- Create a contract that can act as the Multisig wallet. Create a mapping to store the approver list:
pragma solidity^0.4.24;contract MultiSig { // Mapping to save the ownership status mapping (address => bool) public isOwner; // Owners array address[] public owners; // Returns list of owners. function getOwners() public view returns (address[]) { return owners; } // Modifier to restrict access modifier onlyOwner(address owner) { require(isOwner[owner]); _; }}
- Use a state variable to store the number of approvals ...