@midl-xyz/hardhat-deploy
v2.0.1
Published
A hardhat plugin to deploy contract to the MIDL ecosystem. Use this plugin alongside with [hardhat-deploy](https://github.com/wighawag/hardhat-deploy) to get the best experience.
Downloads
634
Readme
@midl-xyz/hardhat-deploy
A hardhat plugin to deploy contract to the MIDL ecosystem. Use this plugin alongside with hardhat-deploy to get the best experience.
Installation
pnpm add @midl-xyz/hardhat-deployUsage
Add the following lines to your hardhat.config.js:
import "@midl-xyz/hardhat-deploy";
module.exports = {
midl: {
mnemonic: "your mnemonic",
path: "deployments",
},
networks: {
default: {
url: "https://evm-rpc.regtest.midl.xyz",
chainId: 777,
},
},
};Deploying a contract
export default async function deploy(hre) {
await hre.midl.initialize();
const deployer = await hre.midl.getAddress();
await hre.midl.deploy("YourContract", {
from: deployer,
args: [100],
});
await hre.midl.execute();
}