Enum | Solidity 0.8

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

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

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

    0:12 - Declaring an enum
    0:49 - State variables
    1:37 - Function output
    2:01 - Function input
    2:30 - Update
    3:02 - Delete

  • @rodgenoalbury2557
    @rodgenoalbury2557 3 года назад +3

    Thanks man! I was stuck at first but you helped me a lot today! Keep up the good work!👏💯

    • @zes7215
      @zes7215 2 года назад +1

      no such thing as allowx to expx or etc, ts just macx , nonerx, cepitxuax, exprx infix any nmw

  • @catreunion
    @catreunion 2 года назад +1

    enum was difficult to understand. After studying your code for 3 days, I suddenly get it. Thank you so much sir. :D

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

      Enum expresses choice. Yes you can represent choice with other data like uint and strings, but enum makes the code more clear

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

      It takes what it takes ;). You’re in good company.

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

    Very Good example! Thanks!

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

    great videos! many thanks.

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

    Very clear !! Thank you!!🤓

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

    Thanks a lot .

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

    Got it! I hope to one day repay you in some ETH or the like.

  • @hernanphillip334
    @hernanphillip334 3 года назад +2

    All good but please don't set similar names for some stuffs because it just make some misconceptions

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

    Hi @Smart Contract Programmer whenever i try to call the reset function gives me error tx reverted out of gas

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

    Is there a way to change state values internally in contract with respect to time of contract creation? For example change state from a to b when block.timestamp += 30 days.

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

      no such thing as allowx or etc or ex about it, say, can say infix any nmw and any s perfx

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

      @@zes7215 tf you baffling about dude?🙄

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

    You used a "_" before status in the set function, I saw that it was a way to do only for private functions. So what should I do ?

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

      it's a coding practice in Solidity to avoid name conflict with state variables.
      I also like to prefix private / internal functions with underscore

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

      @@smartcontractprogrammer good to know, thanks !
      Keep up the good work man ;)

  • @Shirley-n6t
    @Shirley-n6t Год назад

    Could someone please share with me what "Status public status" mean

    • @karthikb9214
      @karthikb9214 Год назад +1

      "Status" is the enum and its accessbility is "PUBLIC" and its given the name "status"

  • @pebble-q1f
    @pebble-q1f 4 месяца назад

    where are u from originally u r accent seems little different?

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

    Great video. Solidity enums are wack though