This is a brief tutorial on how to use SVM on the current Lumio on Solana devnet. For EVM and Move VM, you can refer to the tutorials from the Lumio on Optimism testnet, but be sure to use the correct RPC and faucet RPC endpoints.
Copy solana config set --url https://svm.devnet.lumio.io
Copy solana-keygen new -o ./keypair.json
Copy # Install
cargo install spl-token-cli
# Create token
spl-token create-token
Copy # Check supply
spl-token supply <address>
# Create an account to hold balance
spl-token create-account <address>
# Check balance
spl-token balance <address>
# Mint some
spl-token mint <address> <amount>
# Check supply again
spl-token supply <address>
Be sure CLI is configured and account funded.
Copy cargo init hello_world --lib
cd hello_world
Copy [lib]
name = "hello_world"
crate-type = ["cdylib", "lib"]
Copy use solana_program::{
account_info::AccountInfo,
entrypoint,
entrypoint::ProgramResult,
pubkey::Pubkey,
msg,
};
// declare and export the program's entrypoint
entrypoint!(process_instruction);
// program entrypoint's implementation
pub fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
instruction_data: &[u8]
) -> ProgramResult {
// log a message to the blockchain
msg!("Hello, world!");
// gracefully exit the program
Ok(())
}
Copy solana program deploy ./target/deploy/hello_world.so