0.4.0 • Published 1 year ago

@zk-groups/hardhat v0.4.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago
This Hardhat plugin provides simple tasks that can be used to deploy the ZKGroups contracts without any additional configuration.

🛠 Install

npm or yarn

Install the @zk-groups/hardhat package with npm:

npm i @zk-groups/hardhat

or yarn:

yarn add @zk-groups/hardhat

📜 Usage

Import the plugin in your hardhat.config.ts file:

import "@zk-groups/hardhat"
import "./tasks/deploy"

const hardhatConfig: HardhatUserConfig = {
    solidity: "0.8.4"
}

export default hardhatConfig

And use its tasks to create your own deploy task and deploy your contract with a ZKGroups address.

import { task, types } from "hardhat/config"

task("deploy", "Deploy a Greeter contract")
    .addOptionalParam("logs", "Print the logs", true, types.boolean)
    .setAction(async ({ logs }, { ethers, run }) => {
        const { zkGroups } = await run("deploy:zk-groups", {
            logs
        })

        const Greeter = await ethers.getContractFactory("Greeter")

        const greeter = await Greeter.deploy(zkGroups.address)

        await greeter.deployed()

        if (logs) {
            console.log(
                `Greeter contract has been deployed to: ${greeter.address}`
            )
        }

        return greeter
    })
0.3.0

1 year ago

0.2.0

1 year ago

0.2.1-0

1 year ago

0.4.0

1 year ago

1.0.0-beta.1

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago