Member-only story
How to Implement Basic Multisig in Ethereum via Smart Contracts (Multi-Party Consensus)
Multisig is the feature that requires a certain number (M) of keys or signatures out of the defined keys (N), in order to execute a transaction or action on a blockchain. This is also sometimes referred to as M-of-N Multisig. Bitcoin has multisig built in, Ethereum does not.
Here is how to implement multisig or multi-party consensus in Ethereum.
First you need to define the following:
- Define M, the number of keys required to perform a certain action.
- Define N, the set of keys that will be allowed to perform this action. This can be done when the contract is initially created, or via functions that allow you to add/remove keys from this list.
Next, in the function that you only want to execute in your smart contract if the required number (M) of keys has requested, add the following:
Need help with any software development? My team and I can help. Come say hi at Utopia Solutions!
- Check if contract caller is in approved list.
- Increment a counter, in the…