Selendra

Documentation

Project Templates

Available project templates in Selendra CLI

Project Templates

Selendra CLI provides ready-to-use templates for both EVM and WASM development.

EVM Template (Default)

The EVM template sets up a Hardhat project with TypeScript. It is ideal for developers familiar with Ethereum development tools.

Command:

selendra init my-project --template evm

Includes:

  • Hardhat: Standard Ethereum development environment.
  • TypeScript: Fully typed configuration and scripts.
  • Ethers.js: For contract interaction.
  • Sample Contract: An ERC20 token example (MyToken.sol).
  • Selendra Config: Pre-configured networks for Selendra Mainnet and Testnet.

Structure:

my-project/
├── contracts/
│   └── MyToken.sol
├── scripts/
│   └── deploy.ts
├── test/
├── hardhat.config.ts
├── package.json
└── tsconfig.json

WASM Template

The WASM template sets up an ink! project for Substrate-native smart contracts.

Command:

selendra init my-project --template wasm

Includes:

  • Cargo: Rust package manager.
  • ink!: Rust-based smart contract language.
  • Sample Contract: A basic "Flipper" contract.
  • Build Scripts: Configured for cargo-contract.

Structure:

my-project/
├── lib.rs          # Contract logic
├── Cargo.toml      # Dependencies
└── README.md

Prerequisites for WASM:

  • Rust toolchain
  • cargo-contract CLI tool
Contribute

Found an issue or want to contribute?

Help us improve this documentation by editing this page on GitHub.

Edit this page on GitHub