Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-sig wallet Learneth Course #31

Open
moritzfelipe opened this issue Oct 23, 2023 · 0 comments
Open

Multi-sig wallet Learneth Course #31

moritzfelipe opened this issue Oct 23, 2023 · 0 comments
Assignees

Comments

@moritzfelipe
Copy link
Member

moritzfelipe commented Oct 23, 2023

  1. Multi-sig wallet
    We propose the development of an interactive tutorial focused on the Multi-Signature Wallet contract, as featured on the 'Solidity by Example' website (https://solidity-by-example.org/app/multi-sig-wallet/). The tutorial will be designed for Remix Learneth and will be broken down into distinct, manageable steps. Each step will feature testable elements, and wherever feasible, we will incorporate assignments that participants can complete, supported by unit tests. The following outline serves as a preliminary agenda for the tutorial, although it is subject to modification as we delve deeper into the subject.

Step 1: Introduction
Introduction to Multi-Signature Wallets
Provide an overview of multi-signature wallets and their significance in cryptocurrency and decentralized finance (DeFi).
Introduction to the MultiSigWallet Contract
Introduce the MultiSigWallet contract and explain its role as a multi-signature wallet.
Discuss the benefits of using such a contract.
Assignment: Multiple choice test.

Step 2: Constructor and owners.
Contract Structure and Variables
Explain the contract's structure and initial variables:
address[] public owners: List of wallet owners.
mapping(address => bool) public isOwner: Mapping to track ownership.
uint public numConfirmationsRequired: Number of confirmations required for a transaction.
Assignment: Unit test
Step 3: Transactions

Creating and Submitting Transactions
Explain how to create and submit transactions to the wallet.
Discuss the parameters needed for submitting a transaction (_to, _value, _data).
Show how to submit a transaction using the submitTransaction function.
Confirming Transactions
Describe how wallet owners can confirm transactions.
Explain the confirmTransaction function and its purpose.
Emphasize that transactions require multiple confirmations to be executed.

Executing Transactions
Explain how authorized owners can execute confirmed transactions.
Describe the executeTransaction function and its requirements.
Discuss the role of numConfirmationsRequired in executing transactions.
Assignment: Unit test

Step 4: Transaction confirmations and status
Revoking Confirmations
Discuss how owners can revoke their confirmations if they change their minds.
Explain the revokeConfirmation function and how it works.
Viewing Wallet Status
Describe the functions for viewing wallet status:
getOwners: Retrieve the list of wallet owners.
getTransactionCount: Get the total transaction count.
getTransaction: Get transaction details by index.
Event Emitters
Describe the events used in the contract, such as SubmitTransaction, ConfirmTransaction, RevokeConfirmation, and ExecuteTransaction.
Explain the importance of events for tracking wallet activities.
Assignment: Unit test

Step 5: Deployment and contact interaction
Demonstrate how to deploy the MultiSigWallet contract in Remix IDE.
In Remix IDE, create test Ethereum addresses to act as owners of the multi-signature wallet. These addresses will be used for testing transactions and confirmations.
Explain how to create and submit transactions to the wallet from different owner addresses.
Emphasize the need for multiple confirmations for transaction execution and show how owners can confirm transactions in Remix IDE.
Explain how to execute transactions that have received the required number of confirmations and demonstrate the execution process using Remix IDE.
Walk through the process of revoking confirmations for a transaction using different owner addresses.
Assignment: Unit test

Step 6: Conclusion
Conclusion of Multi-sig contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants