This repository provides a comprehensive boilerplate for developing, testing, and deploying smart contracts on the IPSChain network using Hardhat. It is designed to offer developers a quick start with Hardhat framework.
- Basic Sample Contract: Includes a simple smart contract to demonstrate the structure and deployment process.
- Contract Testing: Features tests for the smart contract to ensure correctness and reliability.
- Hardhat Ignition Module: Utilizes the Hardhat Ignition module for efficient contract deployment.
- Local and Network Deployment: Instructions for both local testing and deployment to the IPSChain.
Before you begin, ensure you have installed Node.js (version 18.x or higher) and npm. This project requires these to run the Hardhat environment and other dependencies.
-
Clone this repository to your local machine:
git clone https://github.com/IPSProtocol/ipschain-boilerplate.git
-
Navigate into the cloned directory:
cd ipschain-boilerplate
-
Install the necessary dependencies:
npm install
To start, you can run various Hardhat tasks to compile, test, and deploy your contracts locally:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat ignition deploy ./ignition/modules/Token.js
To deploy your contract to the IPSChain network, follow these steps:
Install the Hardhat verify plugin:
npm install --save-dev @nomicfoundation/hardhat-verify
Compile your contracts:
npx hardhat compile
List available networks:
npx hardhat verify --list-networks
Setup environment variables (e.g., private keys) found in hardhat.config.js
:
npx hardhat vars setup
# your wallet private key
npx hardhat vars set IPSPROTOCOL_PRIVATE_KEY
# your rpc credentials
npx hardhat vars set IPSPROTOCOL_API_KEY
Deploy your contract to the IPSChain:
npx hardhat ignition deploy ./ignition/modules/Token.js --network ipschain
Check deployment status:
npx hardhat ignition status chain-8337
Verify your contract on the network:
npx hardhat verify --network ipschain <CONTRACT_ADDRESS>
The IPSChain, an EVM-compatible Layer 2 solution, is pioneering in securing decentralized applications (dApps) against smart contract exploits. With its emphasis on hack prevention and minimal impact on transaction costs, IPSChain offers a unique framework that enables dApps to proactively protect their operations. Its decentralized approach ensures transparency, decentralization, and scalability while maintaining compatibility with existing Ethereum smart contracts. Through innovative mechanisms like the decentralized firewall and invariant-based approach, IPSChain is set to redefine Web3 security, offering a robust platform for deploying and managing secure dApps.
For more detailed information, please visit IPSProtocol.