multi-sig-wallet
Multi signature wallet contract in Solidity. Requires multiple signatures from different owners for transacting. See here. I may create another one in the future. Click here to see the frontend I've made.
Instructions (pure contract invocation in Remix, solidity)
This contract requires multiple arguments for functions, including the constructor (deploying the contract.) In Remix, click the upside down arrow and you will see you can put each argument for the constructor.
Put your address in an array format with double quotes in the _owners
argument, as shown in example below. ex. ["0x......address1", "0x......address2", 0x......address2"]
. _required
is the nessescary approvals from owners / digital signatures to execute a transaction. For instance, if you have 3 owners, you could have 2 or 3 required approvals to execute. Click 'transact' to deploy contract. Notice how I have no value being sent as I deploy this contract.
Notice that we have deployed with no value (as adding value when deploying will result in an error). For other owners to approve, execute function calls etc, they will 'Load contract from address' and paste the instance of the contract.
Paste your EOA (metamask address) in isOwner
to see if the address is an owner or not. (isOwner = true)
Now, as one of the owners, we can submit
, approve
, revoke
, and execute
. To submit a transaction, we can first load the contract with ether by calling the fallback recieve function, and or just call the submit
function with some ether if you didn't send ether using the fallback. Unfortunately we have to put Wei as the unit for the submit
function. See ether unit converter here.
After you complete the submit call, the function with emit a txId
as an index (0 being first transaction, 1 being second). The txId
is called as an argument for the approve, revoke and execute function when you call them.
As mentioned before, put the index of txId
in approve, and submit (or revoke). There must be as many approvals as there was _required
declared in the constructor. (if there was '2' in _required
, there must be 2 approve calls from different owners.)
After the required amount of approvals have been met, any owner can call the execute function with the txId
.
If you have followed the steps above, you have successfully created a transaction with a multi-sig wallet.
To-do
- Need to provide instructions on how it's used. (function calls are hard)
- Need to optimize functionality of contract.
- Working on front-end interaction of multi-sig.
- Finished a rough version of front-end interaction of multi-sig.
- Need to reformat and make mobile friendly UI.
- Reformat in Svelte.
- Create new UI that is much better.
- Optimized to a good deal.
- Create instances (allow users to deploy their own multi-sig
- Perform an audit.
- Ultimately finish frontend and release a decent version.
- Polish, refactor code to the best possible version.
- Create and integrate postgres tables for transaction IDs and contract information.
- Showcase and tell people.