Multi Sig Wallet | Solidity 0.8

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 80

  • @patitilinda
    @patitilinda 3 місяці тому +1

    Your explanation of NFTs was so helpful; I’m excited to learn more.

  • @SympatheiaReinelv
    @SympatheiaReinelv 3 роки тому +25

    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

    • @РомаПетров-ж1н
      @РомаПетров-ж1н 2 роки тому +1

      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()`?

  • @D3athW1ng
    @D3athW1ng 3 роки тому +1

    Spoke to too earlier but wow .. this was fun. Thank you kindly for your continued support in the community. History in the making here.

  • @DistantVirtue
    @DistantVirtue 2 роки тому +1

    It ressemble the way you can code a DAO for exemple, very interesting presentation, thanks, this channel is getting better and better!

  • @rayanacheck1233
    @rayanacheck1233 Рік тому +1

    This series is a gold. Thanks a lot.

  • @MrCoreyTexas
    @MrCoreyTexas 7 місяців тому +2

    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

  •  2 роки тому +1

    You're the man!!! This content is worth of Udemy++

  • @FahadAlQallaf
    @FahadAlQallaf 3 роки тому +2

    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 ?

  • @MrCoreyTexas
    @MrCoreyTexas 7 місяців тому

    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)

  • @suu566
    @suu566 3 роки тому +2

    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?

  • @Ale-dj1on
    @Ale-dj1on 2 роки тому

    Very smooth implementation ser

  • @emmanuelezeka7236
    @emmanuelezeka7236 2 роки тому +1

    Great and well explained video. Thank for sharing. However, you did not mention about security.

  • @hv6411
    @hv6411 3 роки тому

    fantastic video!!! Thank you 🙏🏼

  • @ouailtayarth4012
    @ouailtayarth4012 3 роки тому +1

    Thanks for your efforts man!

  • @Siik94Skillz
    @Siik94Skillz 2 роки тому +1

    I have one question. One an owner approves a transaction, shouldnt there be a "numConfirmations" in the Transaction struct?

  • @leonardo0542
    @leonardo0542 2 роки тому

    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.

  • @auroratokenfactory136
    @auroratokenfactory136 2 роки тому

    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".

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому

      Gas consumption is calculated both for reading and writing to smart contracts.
      Transaction you pay for gas.

  • @markeljan
    @markeljan 3 роки тому

    So efficient and effective 🙏

  • @srinivasjoshi1895
    @srinivasjoshi1895 2 роки тому

    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

  • @chanyk7989
    @chanyk7989 Рік тому

    I can't "execute" unless I added "payable" to the function, am I correct?

  • @sarcasticdna
    @sarcasticdna 3 роки тому +1

    Can you create an nft market place tutorial

  • @AdityaKumar-jj9cq
    @AdityaKumar-jj9cq 2 роки тому

    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.

  • @amitkochar5867
    @amitkochar5867 2 роки тому

    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?

  • @dennisdecoene
    @dennisdecoene 3 роки тому +1

    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.

  • @meka4996
    @meka4996 Рік тому

    This is amazing! Thanks

  • @mr.x5582
    @mr.x5582 3 роки тому +1

    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. :)

  • @akashsivasubramanian4067
    @akashsivasubramanian4067 2 роки тому

    wow, this channel is great.

  • @davidkulman2291
    @davidkulman2291 3 роки тому +1

    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.

  • @henriwang8603
    @henriwang8603 Рік тому

    Thanks for the code and its explanation and the website! I am wondering, why the `approval` is replaced by `confirmation`?

  • @adityarout530
    @adityarout530 2 роки тому

    Do u have any course which will teach complete etherium development from scratch

  • @RA-eg8tw
    @RA-eg8tw 3 роки тому

    Could we get other coding videos with you implementing solidity into react. You already did a multisig for this for 0.5

  • @gunbos4990
    @gunbos4990 2 роки тому +1

    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??????

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому +1

      submit a transaction with
      address - address to withdraw to
      data - ""
      value - amount of ETH to withdraw

  • @LukeSamkharadze
    @LukeSamkharadze 2 роки тому

    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

  • @nikolakatrandzhiev63
    @nikolakatrandzhiev63 2 роки тому

    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.

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому +2

      safe code > gas cost
      once you know that the code is redundant, then go ahead and remove the check

  • @LukeSamkharadze
    @LukeSamkharadze 2 роки тому +1

    In what format do was pass data when submitting new transaction?

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому +1

      hex encoded string
      for example
      "0x123123ABCABC"

    • @LukeSamkharadze
      @LukeSamkharadze 2 роки тому

      ​@@smartcontractprogrammerhow can I convert function name and arguments into hex encoded string like that so multisig would understand?

    • @LukeSamkharadze
      @LukeSamkharadze 2 роки тому

      Oh you describe that in the next video (Function Selector | Solidity 0.8)

  • @veliea5160
    @veliea5160 2 роки тому

    why is it important to check if the owner is not address(0)?

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому +1

      address(0) doesn't belong to anyone.
      person who can find the private key to address(0) will be mega rich

  • @r.avinashkumar5372
    @r.avinashkumar5372 3 роки тому

    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?

  • @gandatrowx
    @gandatrowx 2 роки тому

    What should be added to the smart contract in order to add support for ERC20?

  • @yassinedoumani4943
    @yassinedoumani4943 2 роки тому

    how to remove sig error from wallet !?

  • @dogemon5765
    @dogemon5765 2 роки тому

    Wow, Can we decrease submition and confirmation gas by verify signature ?

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому +1

      yes

    • @dogemon5765
      @dogemon5765 2 роки тому

      @@smartcontractprogrammer Is it possible for you to teach it from this (Multisig with signature verification) :)

  • @anthonyzammit4088
    @anthonyzammit4088 2 роки тому

    Can you explain what _data should be inputted in remix?

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому +1

      data to call functions of contract
      what video about call

    • @anthonyzammit4088
      @anthonyzammit4088 2 роки тому

      @@smartcontractprogrammer thank you

    • @anthonyzammit4088
      @anthonyzammit4088 2 роки тому

      @@smartcontractprogrammer What if i remove the _data variable? will it still allow me to transfer?

  • @tharbusred6071
    @tharbusred6071 2 роки тому

    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.

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому

      No one will use a 1 outta 10 multisig.

    • @tharbusred6071
      @tharbusred6071 2 роки тому

      @@smartcontractprogrammer hmm i dont think “no one will do that” is applicable especially when you have fund in the contract

    • @_shark
      @_shark 2 роки тому

      @@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.

    • @tharbusred6071
      @tharbusred6071 2 роки тому

      @@_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.

  • @coderinthailand641
    @coderinthailand641 2 роки тому

    what is data for in the submit?

  • @ldkick
    @ldkick 3 роки тому

    🔥

  • @MRROCKMAST
    @MRROCKMAST 2 роки тому

    Quick question. Why do we put transaction.data as an argument for the "call" low level function? Thanks in advance!

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому

      transaction.data contains instructions for EVM, the function to call and the inputs to pass

  • @totdking
    @totdking 7 місяців тому

    Bro
    Been stuck on this for like a week plus
    Can't realky wrap my head tound it

  • @smartcontract647
    @smartcontract647 Рік тому

    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

  • @nellykantu8428
    @nellykantu8428 3 роки тому

    this is kinda hard omg

  • @onkarkumar6325
    @onkarkumar6325 2 роки тому

    Too complex what's the application of this wallet??

  • @rizwansiddiqu1
    @rizwansiddiqu1 2 роки тому