👛

Streaming Meta Multi Sig

Branch Info

Author: Amogh Jahagirdar Source code: https://github.com/scaffold-eth/scaffold-eth-examples/tree/meta-multi-sig Intended audience: Intermediate Topics: Scaffold-eth basics, multi-sig wallets

🏃‍♀️ Quick Start

git clone https://github.com/scaffold-eth/scaffold-eth-examples.git streaming-meta-multi-sig
cd streaming-meta-multi-sig
git checkout streaming-meta-multi-sig
yarn install
yarn start
in a second terminal window:
cd scaffold-eth
yarn chain
in a third terminal window:
cd scaffold-eth
yarn deploy
🔏 Edit your smart contract StreamingMetaMultiSigWallet.sol in packages/hardhat/contracts
📝 Edit your frontend App.jsx in packages/react-app/src
💼 Edit your deployment script deploy.js in packages/hardhat/scripts
📱 Open http://localhost:3000 to see the app
in a fourth terminal window:
yarn backend
🔧 Configure your deployment in packages/hardhat/scripts/deploy.js
Edit the chainid, your owner addresses, and the number of signatures required:
image
Deploy again with your frontend address as one of the owners:
yarn deploy
Use the faucet wallet to send your multi-sig contract some funds:
image
To add new owners, use the "Owners" tab:
image
This will take you to a populated transaction create page:
image
Create & sign the new transaction:
image
You will see the new transaction in the pool (this is all off-chain):
image
Give your account some gas at the faucet and execute the transaction
The transction will appear as "executed" on the front page:
image
Create a transaction to open a stream to your frontend account:
image
Again, this will take you to a populated transaction form:
image
This time we will need a second signature:
image
Sign the transacton with enough owners:
image
(You'll notice you don't need ⛽️gas to sign transactions.)
Execute the transction to open the stream:
image
The stream will live update with each new block mined:
image
(You might need to trigger a new block by sending yourself some faucet funds or something. HartHat blocks only get mined when there is a transaction.)
Click the button any time and it will withdraw:
image