Skip to content

A minimal multi sig wallet manager on Ethereum. Mobile friendly. Shareable links.

License

Notifications You must be signed in to change notification settings

dvinubius/tiny-multisig

Repository files navigation

Tiny Multi Sig

An minimal multi sig wallet app built with scaffold eth.

Live on Rinkeby 🤩

tiny-multisig

On its way from Proof of Concept to Production Build...

Specs

As a user I can create multisig vaults.

Each vault has

  • a set of owners
  • a requirement for minimum confirmations

I can see an overview of vaults where I am the creator or a co-owner

I can copy shareable links for any of my vaults.

A vault can execute transactions with given

  • ether amount
  • execution calldata

I can enter a detailed view of a vault, and there

  • create multisig transactions
  • approve (confirm) existing transactions
  • execute sufficiently approved transactions

As a user I can also view existing vaults, without the right to interact with them (may be interesting for DAO treasuries' transparency).

@dev

Burner wallets

Burner wallets turned off in local development to closer resemble production use:

See App.jsx:

const userProviderAndSigner = useUserProviderAndSigner(injectedProvider);

Turn them on by using the usual

const userProviderAndSigner = useUserProviderAndSigner(injectedProvider, localProvider);

useContext()

useContext() used extensively for values like userSigner, localProvider, gasPrice etc.

Customize Component Kit for optimal UI

Custom kit of scaffold-eth components

  • more flexible (customizable)
  • destructured props for better readability

Low gas vs. simple frontend dev experience

Factory contract code could be crafted for cheaper transactions if proper event indexing were used.

We don't have to include all owners and requiredConfirmations in Vault Created events. However, it's easier to provide good frontend functionality if that data is available directly from the events.

Rpc load

This project uses no indexing. RPC requests are kept to a minimum but it may still be an issue.

It won't scale well if

  • many MultiSig Vaults created
  • many transactions within any one vault the problems being speed and (probably) rpc server request caps.

So this is not a production setup.

Improvements possible via Subgraph or Moralis for "backend" support.

Even with this minimal setup the app can get quite intensive on RPC requests.

These issues can be mitigated out-of-the box by using the eth-hooks v4, which can be used with the scaffold-eth typescript. Make sure you take v4. It allows for optimized data retrieval (less rpc calls), both by caching values and by explicit setup of polling intervals etc.

Use

Feel free to fork an build on top!

For questions DM me on Twitter @dvinubius

🏗 Scaffold-ETH

everything you need to build on Ethereum! 🚀

🧪 Quickly experiment with Solidity using a frontend that adapts to your smart contract:

image

🏄‍♂️ Quick Start

Prerequisites: Node plus Yarn and Git

clone/fork 🏗 scaffold-eth:

git clone https://github.com/austintgriffith/scaffold-eth.git

install and start your 👷‍ Hardhat chain:

cd scaffold-eth
yarn install
yarn chain

in a second terminal window, start your 📱 frontend:

cd scaffold-eth
yarn start

in a third terminal window, 🛰 deploy your contract:

cd scaffold-eth
yarn deploy

🔏 Edit your smart contract YourContract.sol in packages/hardhat/contracts

📝 Edit your frontend App.jsx in packages/react-app/src

💼 Edit your deployment scripts in packages/hardhat/deploy

📱 Open http://localhost:3000 to see the app

📚 Documentation

Documentation, tutorials, challenges, and many more resources, visit: docs.scaffoldeth.io

🔭 Learning Solidity

📕 Read the docs: https://docs.soliditylang.org

📚 Go through each topic from solidity by example editing YourContract.sol in 🏗 scaffold-eth

📧 Learn the Solidity globals and units

🛠 Buidl

Check out all the active branches, open issues, and join/fund the 🏰 BuidlGuidl!

💬 Support Chat

Join the telegram support chat 💬 to ask questions and find others building with 🏗 scaffold-eth!


🙏 Please check out our Gitcoin grant too!