Skip to main content
Hardhat is a flexible and extensible Ethereum development environment that is fully compatible with Cosmos EVM. It’s an excellent choice for teams with JavaScript/TypeScript expertise or those who need complex deployment and testing workflows.

Project Setup and Configuration

Initialize and configure a new Hardhat project for Cosmos EVM development.

1. Installation

2. Configuration

Modify hardhat.config.ts to include networks and settings for Cosmos EVM.
hardhat.config.ts

TypeScript Integration

Hardhat’s first-class TypeScript support enables type-safe contract interactions and tests.

1. Writing a Contract

Create a contract in the contracts/ directory. For this example, we’ll use a simple LiquidStakingVault.
contracts/LiquidStakingVault.sol

2. Writing Tests

Create type-safe tests in the test/ directory.
test/LiquidStakingVault.test.ts
Run your tests:

Deployment Scripts

Create a deployment script in the scripts/ directory to deploy your contract to a live network.
scripts/deploy.ts
Run the deployment script: