Struct | Solidity 0.8

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025

Комментарии • 37

  • @smartcontractprogrammer
    @smartcontractprogrammer  3 года назад +4

    0:00 - Defining a struct
    0:23 - Use in state variables
    1:04 - Initialize
    5:01 - Get
    5:59 - Update
    6:50 - Delete

  • @sumeshk.s4244
    @sumeshk.s4244 2 года назад +5

    i haven't seen a smart contract explanation as good as yours anywhere in RUclips. your explanation on structs is on point and i am thankful to you . keep up the good work brother

  • @CNOD-lg6mv
    @CNOD-lg6mv 8 месяцев назад

    man. You have no idea how this video helpful to me, I’ve been struggling about the struct for whole day and this video just explained all my questions. Thanks a lot about your efforts. Keep creating these content please!!!❤❤❤

  • @franckyking93
    @franckyking93 3 года назад +1

    You're awesome, man. Love your step by step explanations.

  • @RiquezaIntegrativa
    @RiquezaIntegrativa 3 года назад +1

    AAAAAAWWWWWSSSSOOOOMMMMMEEE EXPLANATION! Thank you!

    • @RiquezaIntegrativa
      @RiquezaIntegrativa 3 года назад

      lol, I didn't see I'd already commented below. Well, it's the 1000th time I'm watching. Very instructive!

  • @suri7573
    @suri7573 3 года назад

    thanks for the video! love how you make it short and simple

  • @RiquezaIntegrativa
    @RiquezaIntegrativa 3 года назад

    Very comprehensive explanation! Congrats!

  • @salem232
    @salem232 3 года назад +1

    Thank you boss !! 😎

  • @mattmouraa
    @mattmouraa 3 года назад

    WOW!! Keep up with the good work, you're a great teacher

  • @Ts2pc
    @Ts2pc 2 года назад

    Such a nice course!

  • @robertogarcia8842
    @robertogarcia8842 3 года назад

    You can expand the topic by explaining how to interact with a mapping within a struct.
    Thanks.

  • @electronicmail6497
    @electronicmail6497 Год назад

    Hi! Beginner here. Thanks for this tutorial.
    I want to know how we can use this code: Car public car?
    Particularly how can we use the "car" based on that code?

  • @Bruhne
    @Bruhne 2 года назад

    Got it! Though I think it’s time for me to spend a few days to a week and go back and review everything I’ve learned, and forgot lol. Thus meaning more views for you.

  • @TheGaneshshow
    @TheGaneshshow 2 года назад

    How to use
    mapping(address => Car[]) public carsByOwner;
    I'm unable to make use of it in contract.
    what should I insert as address, uint156 arguments?
    Please answer soon!, Thank you.

    • @ethisfreedom
      @ethisfreedom Год назад

      bruh you obviously need to insert address type value for address type key🦧

  • @immanuelpochtar9016
    @immanuelpochtar9016 2 года назад

    Variable that defined in memory is alive as function running. So, what is the difference between 'memory' variable and local stack variables ?

  • @validyor
    @validyor 2 года назад

    Finally, an answer to the question "wer lambo"

  • @ecrypto1849
    @ecrypto1849 2 года назад

    When we push inputs to an array of struct "Transaction[] public transactions;" why do we include "Transaction" in "transactions.push(Transaction(*values*));" but when we access it with "require(!transactions[_txId].executed, "error") we do not include "Transaction" ?

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 года назад

      First code is creating a struct Transaction and storing it into an array
      Seconde code is accessing Transaction struct stored in the array

  • @mrin0
    @mrin0 9 месяцев назад +1

    !

  • @cortexyphan
    @cortexyphan Год назад

    Sorry for my answer but I am a novice. Could someone explain me the reason why a mapping (address => Car[]) it's been created even if address is a data already included into the Struct?

  • @D3athW1ng
    @D3athW1ng 3 года назад

    Is there any reason I need to create a memory variable _car to get the values/ element values for the cars stored in the array, can't I just call the array directly?

    • @smartcontractprogrammer
      @smartcontractprogrammer  3 года назад +1

      You can. Depending on code, it might consume lower gas to load struct to memory first.

  • @jackykwan8214
    @jackykwan8214 3 года назад

    Hi, thanks for the video. Is there any chance to migrate a structure?
    Let say I want to add a colour property to Car strict, how can I modify current structure data saved in blockchain?

    • @smartcontractprogrammer
      @smartcontractprogrammer  3 года назад +1

      Copy all data over to a new contract

    • @mihaelacostea5783
      @mihaelacostea5783 2 года назад

      I dont think you can modify anything that was deployed on the blockchain....blockchains cannot be changed.

  • @mihaelacostea5783
    @mihaelacostea5783 2 года назад

    Is struct similar to objects of type class in object orriented programming?

  • @GyZhang-s9i
    @GyZhang-s9i Год назад

    is Car[] public cars; created on memory by default?

  • @suruxpro5603
    @suruxpro5603 3 года назад

    Please make a video on how to make refferal smart contract up to 5 levels with their income their refferel referee and team

  • @nellykantu8428
    @nellykantu8428 3 года назад

    Hello sir, the property model isn't "string memory model". Why?