0

I have started learning Solana and discovered that solana program is different from ethereum smart contract.

1

2 Answers 2

2

In calls to EVM contracts, you only provide the inputs to a given function that updates contract state.

Solana programs are stateless and hence they can be reused and the general throughput can be parallelised. Because of that along with the function inputs you also need to provide all the state the program will need to read or modify.

A given account containing the state may not exist, so you need to derive it so that the program can request its creation.

This in my opinion makes front end integration or writing tests much more challenging.

2

I'd recommend the Rareskills EVM development to Solana program development guide but a quick dump off the the top of my head:

  • Obviously Solana is faster and cheaper than Ethereum was.
  • My understanding is that minting an NFT on Ethereum required deploying a program. On Solana you can do this without deploying an onchain program
  • Solana programs are typically written in Rust using Anchor, Eth programs are written in Solidity.
  • Solana uses a safe curve (Ed25519) rather than Secp256k1
  • Ethereum put executables and their data in the same location, Solana stores data items in PDAs, a big key/value store built into Solana.

Not the answer you're looking for? Browse other questions tagged or ask your own question.