Would love to see you deploy the contract and show the functions working as intended in the end of the video. Great content regardless . Thanks for sharing
There is a link in the description which contains `TestContract` for this kind of simple Multi-Sig Wallet contract. **Could someone direct me to materials to understand `abi.encodeWithSignature()` used in that `TestContract`: why do they use it there, and what're the details.** E.g. where does _signature_ of function comes from, does it comes from `contract.json` file, what function signature is used: `getData()` or `callMe()`?
Oh man your way of explaining is amazing and easy to follow, kep it up. Could you do some DeFi videos to cover the fundamentals of DEXs like a simple Uniswap thing ?
When you get to 7:30, anybody watching this might want to review the video #27 in this playlist Storage, Memory, and Calldata | Solidity 0.8 (it's taking me a while to get through this series, and I needed a review)
Shouldn't it be transactions.length -1 in the modifier txExist at 11:32? I told this because I knew that arrays start from 0, so if you use as input the exact array.length there'll be a number which does not represent any transaction.
I am confused why at 8:19 you say that iterating over the array would be gas inefficient. In Solidity By Example "Reading and Writing to a State Variable" it says : "..you can read state variables, for free, without any transaction fee".
very instructive video, can you tell me why we didn't use the "storage" word in revoke() while we used it in execute(), we are changing the blockchain state in both the cases it seems. Thank you in advance
if we consider gas optimisation, will it not be more optimised to loop over the whole owner array instead of having one more state variable map to store isOwner data? or better just have the isOwner map? PS: I am considering the case when we have an option of modifying the owners.
Thanks for your help. I have a question regarding how the transaction will go to other owners for approval? when does the msg. sender calls a submit function, does the transaction go to other owners automatically?
Good content thank you. Is there a reasoning to preferring modifiers over require in the function body? Edit: now I see you reuse the modifiers I did not get far enough into the video before commenting. Mea culpa.
Great video, thanks! Question, would it make sense to track the approval count in a mapping and increment/detract in the approve/revoke functions respectively? I am not very experienced, but it seems more efficient than running the for loop for each instance where the count is checked. Curious to hear your opinion. :)
Hi I saw almost all of your videos on solidity 0.8 and I'm pretty confident in writing smart contracts like this one. But I don't really know how to advance from here to big projects and more complex smart contracts. Is there something you would recommend? Thanks a lot for the videos by the way they really helped my understanding solidity.
Thanks for good video, i have a question regarding withdrawal. If one of owners want to withdraw eth from multisigwallet, how can he or she withdraw ether? Just implement withdraw function with onlyOwner modifier? But.. i think withdraw should be implemented with approval.. But any idea doesn't come to my mind about that. any ideas??????
Please explain how does gnosis multisig wallet supports gasless approvals? Does it store those off chain? Please explain gnosis factory, proxy and safe please. Would be best playlist
What's the point of checking if the transaction was approved before revoking it? If it's not approved, we'd waste gas because the require will fail. If it's approved it will be revoked. In both scenarios the end result is that the current owner has not approved the transaction.
Thanks for this video. Correct me if i'm wrong. Your multisig wallet allows user to input number of confirmation required to be 1 even if the total owners is 10? If that's the case, i don't think it's good for security.
@@tharbusred6071 The “no one” here refers to the person deploying the contract. It’s specified once in the constructor following which no other users could change it. The coding in the constructor has simply been giving the person deploying the contract the flexibilty of deciding how many confirmations out of all owners required for the assosiated multi-sig functions. He/she will certainly not a fool to specify 1 out of 10. Hope this helps clarify and make sense to you.
@@_shark Thanks for your info. I do understand how it works, but relying on the premise that “he/she is not a fool to set 1/10 signers” is not a good security practice in designing smart contract. What if Im a malicious actor who want to trick other non-technical signers to use this multisig wallet to store fund? If you see the contract design, i can set 1/10 signers and i can be the one who approve the transaction that i submitted myself. For me, that’s a poor smart contract design for security.
There is the logical issue in the constructor that completely makes no sense of multiSigWallet constructor(address[] memory _owners, uint _numConfirmationsRequired) { require(_owners.length > 0, "owners required"); // If single owner ["0x0121"] as Input // 0 Index = 1 Length // 1 Length > 0 Length = true [ Bug ] // Atleast length of 2 owner should requires for the confirmation require( _numConfirmationsRequired > 0 && _numConfirmationsRequired 0 && 1
Your explanation of NFTs was so helpful; I’m excited to learn more.
Would love to see you deploy the contract and show the functions working as intended in the end of the video. Great content regardless . Thanks for sharing
There is a link in the description which contains `TestContract` for this kind of simple Multi-Sig Wallet contract. **Could someone direct me to materials to understand `abi.encodeWithSignature()` used in that `TestContract`: why do they use it there, and what're the details.** E.g. where does _signature_ of function comes from, does it comes from `contract.json` file, what function signature is used: `getData()` or `callMe()`?
Spoke to too earlier but wow .. this was fun. Thank you kindly for your continued support in the community. History in the making here.
It ressemble the way you can code a DAO for exemple, very interesting presentation, thanks, this channel is getting better and better!
This series is a gold. Thanks a lot.
I just looked it up, it looks like you can make the constructor payable so as to avoid 2 transactions in setting up a multisig wallet contract
You're the man!!! This content is worth of Udemy++
Oh man your way of explaining is amazing and easy to follow, kep it up.
Could you do some DeFi videos to cover the fundamentals of DEXs like a simple Uniswap thing ?
Done
When you get to 7:30, anybody watching this might want to review the video #27 in this playlist Storage, Memory, and Calldata | Solidity 0.8 (it's taking me a while to get through this series, and I needed a review)
When calling the execute function the transaction gets reverted because something in the low level call isn't working, any ideas of what it could be?
Very smooth implementation ser
Great and well explained video. Thank for sharing. However, you did not mention about security.
fantastic video!!! Thank you 🙏🏼
Thanks for your efforts man!
I have one question. One an owner approves a transaction, shouldnt there be a "numConfirmations" in the Transaction struct?
you can store it in the struct or calculate it when executing a transcation
Shouldn't it be transactions.length -1 in the modifier txExist at 11:32? I told this because I knew that arrays start from 0, so if you use as input the exact array.length there'll be a number which does not represent any transaction.
strictly less <
txId
I am confused why at 8:19 you say that iterating over the array would be gas inefficient. In Solidity By Example "Reading and Writing to a State Variable" it says : "..you can read state variables, for free, without any transaction fee".
Gas consumption is calculated both for reading and writing to smart contracts.
Transaction you pay for gas.
So efficient and effective 🙏
very instructive video, can you tell me why we didn't use the "storage" word in revoke() while we used it in execute(), we are changing the blockchain state in both the cases it seems. Thank you in advance
I can't "execute" unless I added "payable" to the function, am I correct?
Can you create an nft market place tutorial
if we consider gas optimisation, will it not be more optimised to loop over the whole owner array instead of having one more state variable map to store isOwner data? or better just have the isOwner map?
PS: I am considering the case when we have an option of modifying the owners.
Thanks for your help. I have a question regarding how the transaction will go to other owners for approval? when does the msg. sender calls a submit function, does the transaction go to other owners automatically?
Good content thank you. Is there a reasoning to preferring modifiers over require in the function body? Edit: now I see you reuse the modifiers I did not get far enough into the video before commenting. Mea culpa.
This is amazing! Thanks
Great video, thanks! Question, would it make sense to track the approval count in a mapping and increment/detract in the approve/revoke functions respectively? I am not very experienced, but it seems more efficient than running the for loop for each instance where the count is checked. Curious to hear your opinion. :)
Yes that's possible
wow, this channel is great.
Hi I saw almost all of your videos on solidity 0.8 and I'm pretty confident in writing smart contracts like this one. But I don't really know how to advance from here to big projects and more complex smart contracts. Is there something you would recommend? Thanks a lot for the videos by the way they really helped my understanding solidity.
Write contract to interact with DeFi
@@smartcontractprogrammer Ok thanks a lot
Thanks for the code and its explanation and the website! I am wondering, why the `approval` is replaced by `confirmation`?
just renaming variables
Do u have any course which will teach complete etherium development from scratch
Could we get other coding videos with you implementing solidity into react. You already did a multisig for this for 0.5
Thanks for good video, i have a question regarding withdrawal. If one of owners want to withdraw eth from multisigwallet, how can he or she withdraw ether? Just implement withdraw function with onlyOwner modifier?
But.. i think withdraw should be implemented with approval.. But any idea doesn't come to my mind about that. any ideas??????
submit a transaction with
address - address to withdraw to
data - ""
value - amount of ETH to withdraw
Please explain how does gnosis multisig wallet supports gasless approvals? Does it store those off chain? Please explain gnosis factory, proxy and safe please. Would be best playlist
What's the point of checking if the transaction was approved before revoking it? If it's not approved, we'd waste gas because the require will fail. If it's approved it will be revoked. In both scenarios the end result is that the current owner has not approved the transaction.
safe code > gas cost
once you know that the code is redundant, then go ahead and remove the check
In what format do was pass data when submitting new transaction?
hex encoded string
for example
"0x123123ABCABC"
@@smartcontractprogrammerhow can I convert function name and arguments into hex encoded string like that so multisig would understand?
Oh you describe that in the next video (Function Selector | Solidity 0.8)
why is it important to check if the owner is not address(0)?
address(0) doesn't belong to anyone.
person who can find the private key to address(0) will be mega rich
Small question why there is a need to check that the transaction is approved in Revoke function because revoke is just setting as false right?
Prevent dumb user mistakes - revoke unapproved transaction
What should be added to the smart contract in order to add support for ERC20?
Multisig can interface with ERC20s
how to remove sig error from wallet !?
Wow, Can we decrease submition and confirmation gas by verify signature ?
yes
@@smartcontractprogrammer Is it possible for you to teach it from this (Multisig with signature verification) :)
Can you explain what _data should be inputted in remix?
data to call functions of contract
what video about call
@@smartcontractprogrammer thank you
@@smartcontractprogrammer What if i remove the _data variable? will it still allow me to transfer?
Thanks for this video. Correct me if i'm wrong. Your multisig wallet allows user to input number of confirmation required to be 1 even if the total owners is 10? If that's the case, i don't think it's good for security.
No one will use a 1 outta 10 multisig.
@@smartcontractprogrammer hmm i dont think “no one will do that” is applicable especially when you have fund in the contract
@@tharbusred6071 The “no one” here refers to the person deploying the contract. It’s specified once in the constructor following which no other users could change it. The coding in the constructor has simply been giving the person deploying the contract the flexibilty of deciding how many confirmations out of all owners required for the assosiated multi-sig functions. He/she will certainly not a fool to specify 1 out of 10. Hope this helps clarify and make sense to you.
@@_shark Thanks for your info. I do understand how it works, but relying on the premise that “he/she is not a fool to set 1/10 signers” is not a good security practice in designing smart contract. What if Im a malicious actor who want to trick other non-technical signers to use this multisig wallet to store fund? If you see the contract design, i can set 1/10 signers and i can be the one who approve the transaction that i submitted myself. For me, that’s a poor smart contract design for security.
what is data for in the submit?
data to execute arbitrary transaction
🔥
Quick question. Why do we put transaction.data as an argument for the "call" low level function? Thanks in advance!
transaction.data contains instructions for EVM, the function to call and the inputs to pass
Bro
Been stuck on this for like a week plus
Can't realky wrap my head tound it
it's a wallet owned by multiple owners
There is the logical issue in the constructor that completely makes no sense of multiSigWallet
constructor(address[] memory _owners, uint _numConfirmationsRequired) {
require(_owners.length > 0, "owners required");
// If single owner ["0x0121"] as Input
// 0 Index = 1 Length
// 1 Length > 0 Length = true [ Bug ]
// Atleast length of 2 owner should requires for the confirmation
require( _numConfirmationsRequired > 0 && _numConfirmationsRequired 0 && 1
this is kinda hard omg
Too complex what's the application of this wallet??