Writing smart contracts for Solana is done in Rust or C using Solana's SDK. The SDK provides the necessary tools and libraries for creating and managing Solana programs. When writing a smart contract, you'll define the data you want to store, the instructions for manipulating that data, and the entry point for the program. For Rust, Solana provides a crate called solana-program that contains modules you'll use to interact with Solana's runtime. For C, Solana provides a header file with necessary functions and types. After writing and thoroughly testing the contract, you can deploy it to the Solana blockchain. It's also highly recommended to use a framework like Anchor, which provides a high-level set of tools and an easier development experience for creating Solana smart contracts.