SelendraKit is a toolkit for building decentralized applications (dApps) on the Selendra Network. It provides a set of utilities and templates to streamline the development process and make it easier to interact with the Selendra blockchain.
- Easy project scaffolding with CLI
- Pre-configured Hardhat setup for Selendra Network
- Frontend templates (Next.js and Vite)
- Selendra-specific utilities for contract deployment and interaction
- Comprehensive testing suite
To install Selendrakit globally, run:
npm install -g selendra-kit
To create a new Selendra project, run:
selendra create my-selendra-app
This will create a new directory with a basic project structure, including Hardhat configuration and a frontend template.
A typical project created with Selendrakit will have the following structure:
my-selendra-app/
├── contracts/
│ └── Lock.sol
├── frontend/
│ ├── (Next.js or Vite files)
├── scripts/
│ └── deploy.js
├── test/
├── utils/
│ ├── selendraConfig.js
│ └── contractInteraction.js
├── hardhat.config.js
└── .env
-
Navigate to your project directory:
cd my-selendra-app
-
Install dependencies:
npm install
-
Set up your environment variables by copying the
.env.example
file to.env
and filling in your private key:cp .env.example .env
-
Compile your smart contracts:
npx hardhat compile
-
Deploy your contracts to Selendra Network:
npx hardhat run scripts/deploy.js --network selendra
-
Navigate to the frontend directory:
cd frontend
-
Install frontend dependencies:
npm install
-
Start the development server:
npm run dev
Selendrakit provides utility functions to interact with the Selendra Network:
getSelendraProvider(network)
: Get a provider for Selendra NetworkgetSelendraWallet(privateKey, network)
: Get a wallet instance for Selendra NetworkdeployContract(contractJson, constructorArgs, privateKey, network)
: Deploy a contract to Selendra NetworkgetContract(contractAddress, contractAbi, signerOrProvider)
: Get a contract instanceestimateGas(contract, method, args)
: Estimate gas for a contract methodsendTransaction(contract, method, args, options)
: Send a transaction to a contract
For detailed usage of these utilities, refer to the API Documentation.
We welcome contributions to Selendrakit! Please see our Contributing Guide for more details.
Selendrakit is released under the MIT License.