Substrate is the Rust modular framework powering Polkadot chains. FRAME (Framework for Runtime Aggregation of Modularized Entities) allows composable runtime creation using modular Pallets (e.g. `pallet_balances`, `pallet_contracts`, `pallet_xcm`).
rust
#[frame_support::pallet]
pub mod pallet {
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
#[pallet::pallet]
pub struct Pallet<T>(_);
#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
}
}