{"id":23235775,"url":"https://github.com/hack-light/multi-sig-wallet","last_synced_at":"2025-04-05T20:35:25.032Z","repository":{"id":185124893,"uuid":"673044154","full_name":"Hack-Light/multi-sig-wallet","owner":"Hack-Light","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-31T18:52:18.000Z","size":815,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T20:57:48.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hack-Light.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-31T18:34:00.000Z","updated_at":"2023-07-31T18:35:17.000Z","dependencies_parsed_at":"2023-07-31T20:30:45.804Z","dependency_job_id":null,"html_url":"https://github.com/Hack-Light/multi-sig-wallet","commit_stats":null,"previous_names":["hack-light/multi-sig-wallet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hack-Light%2Fmulti-sig-wallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hack-Light%2Fmulti-sig-wallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hack-Light%2Fmulti-sig-wallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hack-Light%2Fmulti-sig-wallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hack-Light","download_url":"https://codeload.github.com/Hack-Light/multi-sig-wallet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399889,"owners_count":20932876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T03:29:30.967Z","updated_at":"2025-04-05T20:35:24.997Z","avatar_url":"https://github.com/Hack-Light.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏗 scaffold-eth | 🏰 BuidlGuidl\n\n## 🚩 Challenge 5 - Multisig 👛\n\n## 🚩 My Solution\n\n[Link to the verified contract address](https://sepolia.etherscan.io/address/0x03Da74C2522e6f36A1879A2E45108a9758763016)\n\n[Link to live wallet](https://weak-rain.surge.sh)\n\n## 👇🏼 Quick Break-Down 👛\n\nThis is a smart contract that acts as an off-chain signature-based shared wallet amongst different signers that showcases use of meta-transaction knowledge and ECDSA `recover()`. **If you are looking for the challenge, go to the challenges repo within scaffold-eth!**\n\n\u003e If you are unfamiliar with these concepts, check out all the [ETH.BUILD videos](https://www.youtube.com/watch?v=CbbcISQvy1E\u0026ab_channel=AustinGriffith) by Austin Griffith, especially the Meta Transactions one!\n\nAt a high-level, the contract core functions are carried out as follows:\n\n**Off-chain: ⛓🙅🏻‍♂️** - Generation of a packed hash (bytes32) for a function call with specific parameters through a public view function . - It is signed by one of the signers associated to the multisig, and added to an array of signatures (`bytes[] memory signatures`)\n\n**On-Chain: ⛓🙆🏻‍♂️**\n\n- `bytes[] memory signatures` is then passed into `executeTransaction` as well as the necessary info to use `recover()` to obtain the public address that ought to line up with one of the signers of the wallet.\n  - This method, plus some conditional logic to avoid any duplicate entries from a single signer, is how votes for a specific transaction (hashed tx) are assessed.\n- If it's a success, the tx is passed to the `call(){}` function of the deployed MetaMultiSigWallet contract (this contract), thereby passing the `onlySelf` modifier for any possible calls to internal txs such as (`addSigner()`,`removeSigner()`,`transferFunds()`,`updateSignaturesRequried()`).\n\n**Cool Stuff that is Showcased: 😎**\n\n- NOTE: Showcases how the `call(){}` function is an external call that ought to increase the nonce of an external contract, as [they increment differently](https://ethereum.stackexchange.com/questions/764/do-contracts-also-have-a-nonce) from user accounts.\n- Normal internal functions, such as changing the signers, and adding or removing signers, are treated as external function calls when `call()` is used with the respective transaction hash.\n- Showcases use of an array (see constructor) populating a mapping to store pertinent information within the deployed smart contract storage location within the EVM in a more efficient manner.\n\n---\n\n# 🏃‍♀️ Quick Start\n\nrequired: [Node](https://nodejs.org/dist/latest-v12.x/) plus [Yarn](https://classic.yarnpkg.com/en/docs/install/) and [Git](https://git-scm.com/downloads)\n\n```bash\ngit clone https://github.com/scaffold-eth/scaffold-eth-challenges challenge-5-multisig\n\ncd challenge-5-multisig\n\ngit checkout challenge-5-multisig\n```\n\n```bash\n\nyarn install\n\n```\n\n```bash\n\nyarn chain\n\n```\n\n\u003e in a second terminal window:\n\n```bash\ncd challenge-5-multisig\nyarn start\n\n```\n\n🔏 Edit your smart contract `MultiSigWallet.sol` in `packages/hardhat/contracts`\n\n📝 Edit your frontend `App.jsx` in `packages/react-app/src`\n\n💼 Edit your deployment script `deploy.js` in `packages/hardhat/scripts`\n\n📱 Open http://localhost:3000 to see the app\n\n\u003e in a third terminal window:\n\n```bash\nyarn backend\n\n```\n\n🔧 Configure your deployment in `packages/hardhat/scripts/deploy.js`\n\n\u003e Edit the chainid, your owner addresses, and the number of signatures required:\n\n![image](https://user-images.githubusercontent.com/2653167/99156751-bfc59b00-2680-11eb-8d9d-e33777173209.png)\n\n\u003e in a fourth terminal deploy with your frontend address as one of the owners:\n\n```bash\n\nyarn deploy\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhack-light%2Fmulti-sig-wallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhack-light%2Fmulti-sig-wallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhack-light%2Fmulti-sig-wallet/lists"}