Solana Smart Contract Development: Hello World Tutorial | Rust and Typescript walkthrough

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 84

  • @cam41527
    @cam41527 2 роки тому +6

    Great video!! I really like the way you go into detail on each part, most people would just load up the smart contract and not explain it :)

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

    This channel is a gold mine. Look at all his videos

  • @klimentdukovski
    @klimentdukovski Рік тому +2

    You made everything so simple amidst chaos of info. Thank you!

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

    Awesome course! Coming from the Cosmos ecosystem Solana seems pretty difficult. It's really helpful having someone to walk me through the code.

  • @clean-coder
    @clean-coder 2 роки тому +3

    Great content and great presentation. There aren't that many videos about Solana development on UA-cam yet, this was definitely helpful.

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

    Thank you for taking time to provide such quality videos. I personaly did not like ETH ecosystem and wanting to move to another one. Found your tutorials and already in love with them.

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

    I really appreciated that you took the time to walk through how the code works before firing off the command lines. Well done, and appreciated 👍

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

    16:04 talks about checking `account.owner != program_id` Can a program has many accounts?

  • @user-ce4ct8ws8r
    @user-ce4ct8ws8r 2 роки тому

    Great video their man, really appreciate it, but all it needs is that you code and explain it step by step which makes it much more understandable and interactive.

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

    Hello, thank you so much for your videos. When I "npm run build..." I get the error error: not a directory: (/rust/lib are the parts missing). Any insight? Thank you in advance.

  • @Michael-im5mq
    @Michael-im5mq 8 місяців тому

    Super helpful videos! Keep making more!

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

    Thank you for making these videos. They are very helpful!

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

    Loved it. Learnt so much. Thanks a lot.

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

    Thank you so much for ur fantastic effort, can understand the pain in explaining this tough concepts and editing the video to a meaningful explanation, thnx again brother.

  • @mohammadanaskhan5294
    @mohammadanaskhan5294 3 місяці тому

    underrrated, goldmine this is!

  • @yehoriliushchenko4401
    @yehoriliushchenko4401 5 місяців тому

    Josh, thank you for your video! For a long time blockchain development been something far for me, but now i see it's essentially a DB. Thx!

  • @TheVioArtsofficial
    @TheVioArtsofficial 8 місяців тому

    Why we use the WSL Stuff? Why I cant just begin locally? Why I have to work with a container there?

    • @AndrewT-e6f
      @AndrewT-e6f 8 місяців тому +1

      You can do all this on Linux, so that you dont need wsl. Here he uses windows and to interact with local solana blockchain we need to run test validator on linux machine

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

    I love your tutorials! Please try to remember us total newbies! Assume we are doing this for the very first time, because sometimes you just go on to do something, but for us the first time, it has to download or whatever, and we can think it's failed. When I tried to open the remote WSL from VSCode, it seemed to stall out and not connect. I tried a few times, then I noticed... It was downloading the server, and the status bar moved so slowly I never noticed it. But finally I realized it and just waited. Yours - just click and click and keep going! And I'm thinking, what's wrong here?? heh heh

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

    Great video !! I have a problem when "run build:program-rust" cause cargo-build-bpf is deprecated . I can't fix it . Help!!

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

    hi sir your content is awesome

  • @user-ky4jd8cm2o
    @user-ky4jd8cm2o 2 роки тому

    Great tutorial! I am new to TypeScript. VS code shows errors on the TS code in the example (even though they can be run correctly). Is there a better way to configure TS on VS code so that those error marks can be removed?

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

    I can't run test validator because it keeps giving me an os30 error (read only file system). how do i solve this please?

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

    Hey Josh, really thanks for your very helpful contents!
    
I am missing just one thing to get the entire puzzle:
    
When we create the account to be greeted (in checkProgram() function, through ‘createAccountWithSeed’) we do not pass it any info about the GreetingAccount itself (like the counter, where we pass it is 0?) or GreetingSchema.
    It is like we create just an empty account of size GREETING_SIZE

    So how does it know that the account we stored in the network contains those info?
    

I see in reportGreeting() that when we deserialize we get those info, but I can’t understand when/where we set it.

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

    I don't need the WSL stuff if I'm on a Mac right?

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

    Hi leet, I am trying to directly interact with the solana blockchain with web3 to mint an NFT from a project without using a launchpad like magic eden. Can you help me with this?

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

    i got abort (core dumped) when running solana-test-validator. anyone know how to solve?

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

    amazing content, thank you!

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

    Thank you !

  • @VipulKumar-vn6fx
    @VipulKumar-vn6fx 2 роки тому

    Hey man, nice video.. just one question though.. why does my solana-test-validator always say aborted.. I tried installing pre built binaries as well.. Nothing seems to work.. Any help is much appreciated..

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

      Hmm interesting, unfortunately I don't know. Have you tried the cluster tuning mentioned in the video? Otherwise I see: github.com/solana-labs/example-helloworld/issues/296 mention cloning the solana repo and running it from there

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

    hey ty mango

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

    Thank you for your detailed tutorial, I really appreciate the time and effort you put into these videos.

  •  2 роки тому

    Very nice video, tks!

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

    u r a champ !!

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

    hey man this was very helpful, do you happen to do any freelance work? we are looking for a custom smart contract for an upcoming mint that uses an nft collection as a wl token. would you be interested in do this?

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

    i am facing some issue while running cmd solana-test-validator:
    --faucet-sol argument ignored, ledger already exists
    Ledger location: test-ledger
    Log: test-ledger/validator.log
    ⠤ Initializing...
    ⠤ Unable to connect to validator: Client error: test-ledger/admin.rpc does not exist

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

    youre da best

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

    hahahahaha ignore tests. I love the humor :D :D

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

    Great tutorial.Thank you :) How can I DM you ,please?

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

    I love ur face!

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

    that was a lot more complicated than working with, say, polygon using hardhat and ethers.js

  • @NoumanKhan-ck7vx
    @NoumanKhan-ck7vx 2 роки тому +1

    my head is spinning :(

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

    1st

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

    this is not beginners friendly tutorial

  • @Евгений-з3ь7з
    @Евгений-з3ь7з 9 місяців тому

    салам

  • @digitalstorm3028
    @digitalstorm3028 2 роки тому +4

    Make videos faster pls

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

      You can increase the speed in settings

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

      @@bluith2 I guess he s asking to make more number of videos :)

  • @KyleMalcolm24
    @KyleMalcolm24 10 місяців тому

    solana program deploy dist/program/helloworld.so doesnt find a directory

  • @adithyakrishnaa9286
    @adithyakrishnaa9286 10 місяців тому

    Hi I am getting this error when running npm build:
    error[E0433]: failed to resolve: use of undeclared crate or module `imp`
    --> src/lib.rs:246:5
    |
    246 | imp::getrandom_inner(dest)
    | ^^^ use of undeclared crate or module `imp`
    For more information about this error, try `rustc --explain E0433`.
    error: could not compile `getrandom` (lib) due to 2 previous errors
    warning: build failed, waiting for other jobs to finish...
    error[E0599]: no method named `lock` found for struct `Stderr` in the current scope
    --> src/log.rs:266:52
    |
    266 | let mut writer = BufWriter::new(stderr.lock());
    | ^^^^ method not found in `Stderr`
    For more information about this error, try `rustc --explain E0599`.
    Please help!!!!

    • @saakshiraut4828
      @saakshiraut4828 8 місяців тому

      Did you find solution to these errors?

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

    hey huge thanks for these videos.
    I am using my windows to set this up and followed all your recommendations and pre-requisites for WSL.
    I can get my test-validator running, create wallets etc.
    but when i run npm run build:program-rust
    the program doesn't build and throws the below error
    BPF SDK: /home/rohitsubr/.local/share/solana/install/releases/1.10.8/solana-release/bin/sdk/bpf
    cargo-build-bpf child: rustup toolchain list -v
    cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
    error: process didn't exit successfully: `rustc -vV` (signal: 7, SIGBUS: access to undefined memory)
    anyway i can fix this?

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

    also while running this:
    npm run build:program-rust
    i got this:
    > helloworld@0.0.1 build:program-rust
    > cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program
    Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf
    cargo-build-bpf child:ab\.local\share\solana\install\active_release\bin\cargo-build-sbf.exe --manifest-path=./src/program-rust/Cargo.toml --sbf-out-dir=dist/program --arch bpf
    [2023-06-02T08:43:50.754738300Z ERROR cargo_build_sbf] Failed to install sbf-tools: A required privilege is not held by the client. (os error 1314)

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

    Thank you!