Created
August 11, 2022 19:22
-
-
Save Falilah/91f570afe0c5e45de70e3079966eb2a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.9; | |
import "./multisig.sol"; | |
contract MultiSigFactory { | |
//a factory contract that create multiple clones of multisig.sol | |
//a function that create a new multisig | |
//an array that holds contract addresses created | |
//a function that calls the approve function in multisig.sol | |
// a function that calls the withdraw function in multisig.sol | |
MultiSig[] multiSigAddresses; | |
event newClone(MultiSig indexed, uint256 indexed position); | |
function cloneMultiSig(address[] memory _validOwners) | |
external | |
returns (MultiSig NewMS, uint256 _length) | |
{ | |
NewMS = new MultiSig(_validOwners); | |
multiSigAddresses.push(NewMS); | |
_length = multiSigAddresses.length; | |
emit newClone(NewMS, _length); | |
} | |
function ClonedAddresses() | |
external | |
view | |
returns (MultiSig[] memory _multisig) | |
{ | |
_multisig = multiSigAddresses; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
contract MultiSig {
///A contract that allows 70% of validSigner to Approve before a withdrawal can be succesful
}