@costruct/iel-hardhat
v0.1.2
Published
Hardhat plugin for Intent Execution Layer (IEL) development
Maintainers
Readme
@costruct/iel-hardhat
Hardhat plugin for Intent Execution Layer (IEL) development.
Installation
npm install --save-dev @costruct/iel-hardhat
# or
yarn add --dev @costruct/iel-hardhatUsage
Add the plugin to your hardhat.config.js or hardhat.config.ts:
import "@costruct/iel-hardhat";
// or in JavaScript
require("@costruct/iel-hardhat");Features
Deploy Complete IEL Stack
Deploy the entire IEL infrastructure with a single command:
npx hardhat iel:deployThis deploys:
- ConstraintLib (library)
- MockPermit2 (for testing)
- IntentManager (core intent processing)
- ExecutorERC20 (token transfer executor)
- Permit2Executor (Permit2-based executor)
- TestToken (for testing)
- MockR1Verify (R1 signature verification)
Programmatic Usage
import { ethers } from "hardhat";
async function deployIEL() {
// Deploy all contracts
const contracts = await hre.iel.deployAll();
console.log("IntentManager:", contracts.intentManager);
console.log("TestToken:", contracts.testToken);
// Use contracts
const intentManager = await ethers.getContractAt(
"IntentManager",
contracts.intentManager
);
}Quiet Mode
Suppress deployment logs:
npx hardhat iel:deploy --quietOr programmatically:
const contracts = await hre.iel.deployAll(true); // quiet = trueContract Addresses
After deployment, the plugin returns an object with all deployed contract addresses:
interface IELContracts {
constraintLib: string;
mockPermit2: string;
intentManager: string;
executorERC20: string;
permit2Executor: string;
testToken: string;
mockR1Verify: string;
}Requirements
- Hardhat ^2.0.0
- ethers ^6.0.0
- @nomicfoundation/hardhat-ethers ^3.0.0
License
MIT
