

Share Dialog
Share Dialog

Subscribe to James Burns

Subscribe to James Burns
Solana is an emerging high-performance, permissionless blockchain that offers fast, cheap, and scalable transactions and supports smart contracts being built with the Rust, C++, and C programming languages. One of the primary differentiators of the Solana network is its Proof of History (PoH) verification mechanism. Without getting overly technical, the most notable improvement offered by this is parallel processing of transactions. This is part of the explanation why the number of transactions per second (TPS) looks like this (source):

The only other architectural improvement worth noting (for the purposes of this article) is Solana’s divergent smart contract architecture. On most networks (like Ethereum) smart contract code, logic and state are wrapped up into the on-chain deployed contract. This is why smart contracts are typically thought of as “immutable” once deployed, there is not an interaction layer after you send your smart contract “out to the wolves” Solana unbundles this experience, developers deploy a read-only contract which can then be interacted with by external accounts. One additional way Solana facilitates this type of external interaction is through their CLI which allows decentralized applications to interact with their blockchain.
Lets start with a simple contract Solana Labs put together is their Hello World Program Open up vscode and clone this repo:
git clone git@github.com:solana-labs/example-helloworld.git
Next, we are going to set our network to the solana test network (this will allow us to deploy a smart contract
solana config set --url https://api.devnet.solana.com
Note: after running this command you may get a message noting the export PATH for your solana install. if you do, be sure to copy and paste it into your terminal to prevent Solana commands from erroring. if you continue getting are getting an error (namely zsh: command not found: solana) it is because your PATH environment variable is not updated to include your solana install. If the error persists, refer to this video for additional help + instruction.
After ensuring Solana is installed + configured correctly, you will need a keypair for your account (this allows you to interact with deployed smart contracts on the solana blockchain as a developer):
solana-keygen new --force
Next, we need to get some tokens on our account in order to deploy our smart contract. the maximum airdrop request is currently two SOL, some older articles may attempt to request larger amounts but those will give you an error.
Now that we are locked and loaded with solana on our identified development account, we can build our hello world program:
npm run build:program-rust
This will take a minute or so, but once completed you will see a message like this:

Now we are ready to actually deploy the program to solana’s test network. the output of the prior build command is what we need to run, in my case this is:
solana program deploy /Users/jamesburns/Desktop/flatiron/Crypto/example-helloworld/dist/program/helloworld.so
After this program runs (which repeats the message approximately 60 times), you will receive a program ID that is searchable on the Solana Devnet Explorer. In my case, the link to the account (and subsequent transaction history) can be found here.
Now that our program has been deployed, we want to interact with it. The example-helloworld program comes prebuilt with a simple client written in typescript - in order to setup and visualize what exactly we have done by deploying this program we install our client dependencies:
Then, we start our client.
npm run start
our result displays the number of times that the program has executed, which “greets” our account.

If we run the program again, the number of “greetings” will increase.

This is a novel example with no practical applications, but in going through this process we were able to setup a solana development environment, and interact with a blockchain in less than 20 minutes.
Compared to deploying a smart contract on Ethereum, from a brand new developers standpoint this was significantly easier.
Solana is an emerging high-performance, permissionless blockchain that offers fast, cheap, and scalable transactions and supports smart contracts being built with the Rust, C++, and C programming languages. One of the primary differentiators of the Solana network is its Proof of History (PoH) verification mechanism. Without getting overly technical, the most notable improvement offered by this is parallel processing of transactions. This is part of the explanation why the number of transactions per second (TPS) looks like this (source):

The only other architectural improvement worth noting (for the purposes of this article) is Solana’s divergent smart contract architecture. On most networks (like Ethereum) smart contract code, logic and state are wrapped up into the on-chain deployed contract. This is why smart contracts are typically thought of as “immutable” once deployed, there is not an interaction layer after you send your smart contract “out to the wolves” Solana unbundles this experience, developers deploy a read-only contract which can then be interacted with by external accounts. One additional way Solana facilitates this type of external interaction is through their CLI which allows decentralized applications to interact with their blockchain.
Lets start with a simple contract Solana Labs put together is their Hello World Program Open up vscode and clone this repo:
git clone git@github.com:solana-labs/example-helloworld.git
Next, we are going to set our network to the solana test network (this will allow us to deploy a smart contract
solana config set --url https://api.devnet.solana.com
Note: after running this command you may get a message noting the export PATH for your solana install. if you do, be sure to copy and paste it into your terminal to prevent Solana commands from erroring. if you continue getting are getting an error (namely zsh: command not found: solana) it is because your PATH environment variable is not updated to include your solana install. If the error persists, refer to this video for additional help + instruction.
After ensuring Solana is installed + configured correctly, you will need a keypair for your account (this allows you to interact with deployed smart contracts on the solana blockchain as a developer):
solana-keygen new --force
Next, we need to get some tokens on our account in order to deploy our smart contract. the maximum airdrop request is currently two SOL, some older articles may attempt to request larger amounts but those will give you an error.
Now that we are locked and loaded with solana on our identified development account, we can build our hello world program:
npm run build:program-rust
This will take a minute or so, but once completed you will see a message like this:

Now we are ready to actually deploy the program to solana’s test network. the output of the prior build command is what we need to run, in my case this is:
solana program deploy /Users/jamesburns/Desktop/flatiron/Crypto/example-helloworld/dist/program/helloworld.so
After this program runs (which repeats the message approximately 60 times), you will receive a program ID that is searchable on the Solana Devnet Explorer. In my case, the link to the account (and subsequent transaction history) can be found here.
Now that our program has been deployed, we want to interact with it. The example-helloworld program comes prebuilt with a simple client written in typescript - in order to setup and visualize what exactly we have done by deploying this program we install our client dependencies:
Then, we start our client.
npm run start
our result displays the number of times that the program has executed, which “greets” our account.

If we run the program again, the number of “greetings” will increase.

This is a novel example with no practical applications, but in going through this process we were able to setup a solana development environment, and interact with a blockchain in less than 20 minutes.
Compared to deploying a smart contract on Ethereum, from a brand new developers standpoint this was significantly easier.
<100 subscribers
<100 subscribers
No activity yet