DEV Community

Cover image for How to start with Solana
codenjobs
codenjobs

Posted on • Updated on • Originally published at codenjobs.com

How to start with Solana

We at Code&Jobs plan to use Solana as our main blockchain tech along with BSC and ETH. We like to share useful links and a few tips to help others by sharing our experience with Solana.

You can see the latest post at our website.

First, see what the official Solana website authors thought important.

If you are a programmer, Anchor and Solana Python SDK can be helpful to find what you want to use for Solana development.

Whether you like Rust for blockchain or not, it is almost required knowing it as a blockchain dev. If you don't have it in your computer yet, install it.

If you already had Rust in your computer but have an issue similar to this,

proc_macro::Literal::from_str(repr) function or associated item not found in `proc_macro::Literal`
Enter fullscreen mode Exit fullscreen mode

Update your Rust version and install the dependencies required again.

$rustup update
Enter fullscreen mode Exit fullscreen mode

You can also have a problem while installing Solana Test Validator if you use Macbook with M1 chip. Then, you can test your luck with this repository with Docker.

Where to buy Solana

You will need it if you want to develop production projects later. Buy it early.

You can refer to this.

FTX Logo

How to learn Solana

You can follow these.

Start

The best way to learn something is having working examples.

The first two articles are very similar, but the second one will help you see the live app and have code snippets you can reuse.

You can also read them if you want to learn more.

NFT and MetaPlex

Different from other blockchain techs, Solana already has the MetaPlex framework to help you develop NFT projects easily.

Because it is very new, some part of documentations are not complete, so read its source code.

$git clone https://github.com/metaplex-foundation/metaplex.git
Enter fullscreen mode Exit fullscreen mode

If you are already familiar with blockchain development, you can also reimplement this project written with ETH to Solana.

References

If you are a blockchain dev, you can find these useful and save your time.

use anchor_spl::token::{self, TokenAccount, Transfer};
// Transfer funds to the check.
let cpi_accounts = Transfer {
    from: ctx.accounts.from.to_account_info().clone(),
    to: ctx.accounts.vault.to_account_info().clone(),
    authority: ctx.accounts.owner.clone(),
};
let cpi_program = ctx.accounts.token_program.clone();
let cpi_ctx = CpiContext::new(cpi_program, cpi_accounts);
token::transfer(cpi_ctx, amount)?;
Enter fullscreen mode Exit fullscreen mode
get_balance
simulate_transaction
get_token_account_balance
get_minimum_balance_for_rent_exemption
send_transaction
Enter fullscreen mode Exit fullscreen mode

Some Solana clients listed here and select what can be useful for your projects.

The tests part from Anchor is where you can find most useful code snippets you can reuse.

You can start from errors and events along with tutorials part.

Jobs

You can find Solana, Rust and Blockchain jobs at our website.

Feel free to post your job post at our website. It is currently totally free and you can post any number of jobs you want.

You can also use https://jobs.solana.com/ website.

Subscribe to Code&Jobs Telegram channel for the instant job notifications.

Others

We are still learning Solana dev environments and will update this blog post while doing that. If you want more information, refer to this.

Contribution

If you want to improve or include any useful link to help other Solana users, feel free to contact us at our Telegram group chat.

If you have a Solana project and want to include yours here, contact us.

Discussion (0)