Solana Smart Contract Tutorial: Using the Anchor Framework

Sdílet
Vložit
  • čas přidán 25. 08. 2024

Komentáře • 78

  • @boredaliensclub4416
    @boredaliensclub4416 Před 2 lety +13

    Please upload more videos .. dont give up!! you are the one youtuber who is posting solana dev tutorial.. other people gave up with 4 or 5 videos.

    • @JoshsDevBox
      @JoshsDevBox  Před 2 lety +5

      Thanks! I'm doing my best, but fingers cross, I already have a track record of abandoning ship 😅

    • @joonlee6164
      @joonlee6164 Před 2 lety +1

      @@JoshsDevBox amazing videos, i hope your hard work and easy to understand explanations don't go unnoticed! subscribed and looking foward to learning more from you

  • @jamescarter9147
    @jamescarter9147 Před 2 lety +8

    These videos are better than the ones referenced on the Solana CZcams account. Well done appreciate it.

  • @alperozyurt2118
    @alperozyurt2118 Před 2 lety +15

    You are perfect!!
    Hey there is a lot of solidity smart contract development courses/tutorials but there isn't any kind of rust solana smart contract development guide. Especially from scratch. I suggest you create a udemy full stack Solana/rust smart contract course. In this way, you will be first guy who has created a detailed course like this and you could make money for your life !!!

    • @JoshsDevBox
      @JoshsDevBox  Před 2 lety +2

      Great idea! i'll keep that in mind for the future. I appreciate the idea!

  • @LexBuildAdventures
    @LexBuildAdventures Před rokem +3

    just a tip for everyone, you can type "code ." in your wsl terminal to open visual studio code with the project in that folder (as long as you have the wsl plugin installed for code). great video!

  • @noel1735
    @noel1735 Před 2 lety +6

    If you get "Error: Cannot find module '/root/anchor/examples/tutorial/node_modules/@project-serum/anchor/dist/cjs/index.js'. Please verify that the package.json has a valid "main" entry"
    Here's what you do.
    1. cd out into anchor, and then cd into the folder called "ts"
    2. in the terminal, enter "bash build-packages.sh"
    3. Make yourself some tea because that's going to take a while
    4. cd back into examples/tutorial and then permanently delete node_modules and yarn.lock in that tutorial folder
    5. cd back into basic-1, and in case you have node_modules and yarn.lock there as well- delete them
    6. do "yarn install"
    7. Enter "anchor test --skip-local-validator"

    • @sasangaedirisinghe239
      @sasangaedirisinghe239 Před rokem +1

      Thanks man. I was stuck for a while and then saw the comment. Great stuff!

    • @teddyleno4364
      @teddyleno4364 Před rokem +1

      Really helpfull, this one should be pinned.

    • @apexwins2087
      @apexwins2087 Před rokem

      Thank you for the precise instructions. I'd looked everywhere and had some version of this without specific instructions and I'd almost given up until I came back to the tutorial and looked in the comments -- you made my day today!

  • @LeoN-nl9kj
    @LeoN-nl9kj Před 2 lety

    Yes please keep uploading more videos. I religiously watch your videos right now to gain a clear overview. I'm looking to built out my first Solana app and it's been difficult figuring out how everything ties together in a more practical way. Like pulling wallet data once connected, checking if a wallet has NFT in wallet, creating user accounts with wallet addresses, how much data (JSON) can be saved in the blockchain / costs and what should be stored in an external database vs on blockchain..etc.. There's so many questions I have about what is possible.

  • @tareqqazi2029
    @tareqqazi2029 Před 2 lety

    Yeah Anchor is really powerful, definitely seeing the differences in the videos in how much we need to write

  • @daagcentral
    @daagcentral Před 2 lety +2

    Clear. Concise. Love it!

    • @JoshsDevBox
      @JoshsDevBox  Před 2 lety +1

      Awesome! I'm glad you thought so! I try to keep things short, but.... well here's this 46 minute monstrocity!

  • @muhammadshahrukhazeem5873

    Your videos are better than any docs, Great work and Thanks alot.

  • @jonathanbakebwa2292
    @jonathanbakebwa2292 Před 2 lety +3

    Amazing video. I've been waiting for this videos. Thank you!

  • @zb2747
    @zb2747 Před 2 lety

    Keep up the videos bro - just watched your front end video. Alot of docs on anchor and solana which are great, yet it's always nice to have videos to see some of the code implemented. Thank you!

  • @user-gk9eo5bq4z
    @user-gk9eo5bq4z Před 2 lety +8

    'info is not an account info, it comes from rustlang itself, it's lifetime parameter. If you look in the anchor source code - struct Account, it contains struct AccountInfo inside. One don't have to bother the liftemes programming for solana, since everything is single threaded(in the context of program being executed) and race conditions are impossible by the rules solana runtime works. But still you have to specify lifetime params, because rust compiler needs them and it knows nothing about runtime the rust binary will be executed at.

  • @EASTSIDESEE
    @EASTSIDESEE Před rokem

    Thank you Sir. Youve got me geeked to dev. Finally time to make school worth it's weight. Peace and blessings.

  • @StoicGucci
    @StoicGucci Před 2 lety +1

    This is great! Thank you for making these!

  • @btkb1427
    @btkb1427 Před 2 lety +1

    Brilliant tutorial :) Really clear! Thank you

  • @Ibrahim-oc5ql
    @Ibrahim-oc5ql Před 8 měsíci

    Good stuff m8. Appreciate your time and effort spent on making this!

  • @apricotcomputers7915
    @apricotcomputers7915 Před rokem +1

    nice vid! I learned a lot. Thanks

  • @iampawankumar
    @iampawankumar Před 2 lety

    Thanks Man. You are Awesome. Watched all your related videos.

  • @epic4507
    @epic4507 Před 2 lety +1

    very good video hope your next video coming soon , great work thanks you

  • @ChristopherTritton-hr1zg
    @ChristopherTritton-hr1zg Před měsícem

    the benefit of keeping it assert.ok is that you can feed in a variable in to the assert for the new number instead of hardcoding a new BN

  • @meka4996
    @meka4996 Před 9 měsíci

    Super! Thanks

  • @SilvestreVivo
    @SilvestreVivo Před 2 lety +1

    Thank you so much for this explanation. It would be great the same example ( tests included ) for a PDA. :)

    • @JoshsDevBox
      @JoshsDevBox  Před 2 lety +2

      Don't worry, creating and exchanging tokens/nfts will be next and I'm sure PDA's will appear one way or another in there!

  • @sasangaedirisinghe239

    Great work man!! Keep it up.

  • @nexusofthenebula6498
    @nexusofthenebula6498 Před 2 lety +1

    Yes good work you are awesome 👌

  • @cherriepie
    @cherriepie Před 2 lety

    🤯 this is difficult stuff, holy smokes!

  • @abhisheklingwal7961
    @abhisheklingwal7961 Před 11 měsíci

    Good Work Josh !

  • @TheHellishFrog
    @TheHellishFrog Před 2 lety +3

    I am the first here - and I am the first to Thank You for your effort :) Thank You!

  • @michaelm6260
    @michaelm6260 Před 2 lety

    I subbed you better keep making content like this, you are great at this.

  • @MrTiagoSan
    @MrTiagoSan Před 2 lety

    great content man! am i waiting for the next one!

  • @aven7us797
    @aven7us797 Před 2 lety

    Keep up the good work!

  • @krissie8888
    @krissie8888 Před 2 lety

    u da best bro

  • @jlinsy
    @jlinsy Před 9 měsíci

    How do you take your videos like that with you in the foreground and PC screen in the back? Very cool format!

  • @megaLostatsea
    @megaLostatsea Před 2 lety +1

    Please make an AnchorPy tutorial next!

  • @sergeyt4282
    @sergeyt4282 Před 2 lety

    That is a nice tutorial.
    Josh, I'm curious - is Anchor some kind of a standard for Solana development with Rust? Or it is just a convenience thing?
    Are like 100% of Solana Rust contracts use it?

  • @StringSwoosh
    @StringSwoosh Před rokem

    How did you get those type inference and intellisense in your vscode? Everything is just any on my side and when I hover for example the anchor.BN I get nothing

  • @SamiSabirIdrissi
    @SamiSabirIdrissi Před 2 lety +1

    Like magic

  • @dylanpowell2674
    @dylanpowell2674 Před 2 lety +1

    I followed this moment by moment but when I run anchor test I get a basic cannot find module @ root/MyProject/anchor/examples/etc. “please verify pkg.json has valid main entry” and fails with exit code 1. -> do you know why it is doing this? I’ve yarn installed and npm even..

  • @dummyname7543
    @dummyname7543 Před rokem

    Hello I have a question.
    Is myaccount also pda? If so, giving seed and bump are not mandatory on initializing pda?

  • @Banksy_said_hi
    @Banksy_said_hi Před 2 lety

    Awesome video!

  • @dhananjytmg9433
    @dhananjytmg9433 Před 7 měsíci

    Solana good 👍

  • @user-ug7mh6pn8e
    @user-ug7mh6pn8e Před rokem

    Hi Josh, just wondering why on test initialize we need to include a signer but for the rest, update increment and decrement we don't have to include the signers ?

  • @speedlead4008
    @speedlead4008 Před 3 měsíci

    declare_id seems to be program id

  • @rehanchoudhury1937
    @rehanchoudhury1937 Před 2 lety

    Really amazing contents, can you put a big project from scratch

  • @maxzak5310
    @maxzak5310 Před 2 lety

    23:20
    are steps 5&6 neccesary ? in the documentation it just says build&deploy

  • @VictorChuqz
    @VictorChuqz Před 4 měsíci

    anchor installation link is down

  • @Srgkord
    @Srgkord Před 2 lety

    Why the data field of MyAccount struct is haven't (mut) statement?

  • @nextgodlevel4056
    @nextgodlevel4056 Před 2 lety

    amazing video
    can you provide the playlist notes

  • @AlexChandler100
    @AlexChandler100 Před rokem

    The link to the instructions page is no longer active. Not sure how to proceed.

  • @Srgkord
    @Srgkord Před 2 lety

    U sad if we want to change variable we should use &mut. But in line 11 where we want to change my_account.data for some reason we don't use &mut. Why?

  • @myemiofficial
    @myemiofficial Před 2 lety

    HOw can i install anchor there isnt none in the links in the description:c

  • @divyarang9681
    @divyarang9681 Před 2 lety

    Hello is it work for multiplesigner

  • @tonysuri1794
    @tonysuri1794 Před 2 lety

    Hi great video. I got lost on knowing where its deploying, is it mainnet or devnet? Also on which wallet do I have to add funds to pay for deployment? Thx

    • @JoshsDevBox
      @JoshsDevBox  Před 2 lety

      It's all based off of the anchor.toml file, so in this instance, it's neither and it's just your lcoal environment.

  • @Johntyty912
    @Johntyty912 Před 2 lety

    Hello, I got an error when testing initialize. Error: Invalid arguments: myAccount not provided. Any Idea? Thanks in advance.

    • @Johntyty912
      @Johntyty912 Před 2 lety

      Finally, It works when I add new anchor.BN(0). anyone know why?🤔
      await program.rpc.initialize(new anchor.BN(0), {
      accounts: {
      myAccount: _myAccount.publicKey,
      user: provider.wallet.publicKey,
      systemProgram: SystemProgram.programId,
      },
      signers: [_myAccount],
      });

    • @Johntyty912
      @Johntyty912 Před 2 lety

      I understand now, I didn't follow 20:50🤣

  • @kukikukac
    @kukikukac Před 9 měsíci

    wow great video but this lib is a mess

  • @rafaelramos3260
    @rafaelramos3260 Před 2 lety +1

  • @nani2574
    @nani2574 Před 2 lety +3

    project-serum.github.io/anchor/getting-started/installation.html this link is not working josh

  • @apricotcomputers7915
    @apricotcomputers7915 Před rokem

    nice vid! I learned a lot. Thanks