- Consist of a signature and a message.
- Signature: Array of private keys.
- Message: Payload sent to the smart contract, includes:
- Account addresses.
- Recent block hash.
- Instructions.
- Contain logic for the smart contract.
- Components:
- Program ID.
- Accounts.
- Data.
- Important for sending/receiving data.
- Potential source of errors.
- Required to execute a transaction.
- Focus on the involved accounts.
- Track the state on a Solana program.
- Properties:
- Signer: User sending the transaction.
- Read-Only: Accounts that can only be read.
- Executable: Accounts that can process instructions.
- Rent: Fee for keeping accounts on the network.
- Data in accounts is serializable.
- Instruction received, account data read/parsed/incremented.
- New state serialized and stored on the network.
- JavaScript equivalent of the smart contract account.
- Data deserialized from account info.
- Allows sending data to the smart contract and querying information.
- solana config get - give configuraiton
- solana config set --url localhost / --keypair path_to_keypair.json - sets keypair path
- solana balance - tells balance in above set account
- solana airdrop amount account - if accoutn not specified uses default account
Next we need to set RPC URL for our localized blockchain - solana config set --url localhost the ports are predefined
Or we can use the testnet provided by solana itself solana config set --url testnet
to create a new wallet - solana-keygen new or solana-keygen new -o filepath
solana program deploy path_to_compile_file (in example-helloworld its ./dist/program/helloworld.so) //file ending with .so //this will give you the program id
and then run the client