# Openzeppelin defender hardhat plugin

**URL:** <https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958>\
**Category:** Defender\
**Created:** [August 5, 2022, 7:24pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958 "2022-08-05T19:24:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![asmel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/asmel/32/11994_2.png) [@asmel](https://forum.openzeppelin.com/u/asmel)\
**Post date:** [August 5, 2022, 7:24pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/1 "2022-08-05T19:24:23Z")

</div>

hello community, I would like to share a plugin that I created for hardhat that integrates the modules of the referent defender api, allowing a more effective and organized integration 😀

> **[hardhat-openzeppelin-defender](https://www.npmjs.com/package/hardhat-openzeppelin-defender)**
>
> Hardhat plugin openzeppelin defender. Latest version: 1.1.0, last published: 3 hours ago. Start using hardhat-openzeppelin-defender in your project by running \`npm i hardhat-openzeppelin-defender\`. There are no other projects in the npm registry...

I look forward to your feedback 😀

---

<div class="post-metadata">

**Author:** ![ernestognw](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ernestognw/32/18576_2.png) [@ernestognw](https://forum.openzeppelin.com/u/ernestognw)\
**Post date:** [August 6, 2022, 2:13am UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/2 "2022-08-06T02:13:44Z")

</div>

Hey @asmel,

This is amazing!, we really appreciate your hard work, and also we'd like to know more about a use case for this.

Going through the `README` I think there's still some improvements to do in regards to the documentation, however, it's still something I personally think might help to setup Defender environments from code, which is one of our future roadmap items.

Can you write any tutorial for doing so? Or examples?  
I'll forward this to the team and get back to you with some more feedback.

Best!

---

<div class="post-metadata">

**Author:** ![asmel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/asmel/32/11994_2.png) [@asmel](https://forum.openzeppelin.com/u/asmel)\
**Post date:** [August 6, 2022, 12:15pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/3 "2022-08-06T12:15:02Z")

</div>

hi @ernestognw

Thanks for your comment 😀, I am going to prepare a repository with use cases, and small examples, I could also send you a demo video, only since my native language is Spanish and my English is very basic, I could send it without audio

---

<div class="post-metadata">

**Author:** ![ernestognw](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ernestognw/32/18576_2.png) [@ernestognw](https://forum.openzeppelin.com/u/ernestognw)\
**Post date:** [August 7, 2022, 2:03am UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/4 "2022-08-07T02:03:35Z")

</div>

Hey Asmel,

Sounds good, as I said, I see this as a good way to setup a Defender environment using it. Like creating sentinels, relayers, and for example, setup a deployment via relayer and immediately creating sentinels to monitor the deployment.

Feel free to post a tutorial in the forum or anything similar, I think @slw.eth might help/guide you if needed 😃

---

<div class="post-metadata">

**Author:** ![asmel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/asmel/32/11994_2.png) [@asmel](https://forum.openzeppelin.com/u/asmel)\
**Post date:** [August 7, 2022, 1:55pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/5 "2022-08-07T13:55:25Z")

</div>

Hey @ernestognw

I share the repository of examples that I built and also the update of the plugin documentation

> **[GitHub - asmel2020/hardhat-openzeppelin-defender-example](https://github.com/asmel2020/hardhat-openzeppelin-defender-example)**
>
> Contribute to asmel2020/hardhat-openzeppelin-defender-example development by creating an account on GitHub.

plugin

> **[hardhat-openzeppelin-defender](https://www.npmjs.com/package/hardhat-openzeppelin-defender)**
>
> Hardhat plugin openzeppelin defender. Latest version: 1.2.3, last published: 7 minutes ago. Start using hardhat-openzeppelin-defender in your project by running \`npm i hardhat-openzeppelin-defender\`. There are no other projects in the npm registry...

I look forward to your opinion 😃

---

<div class="post-metadata">

**Author:** ![slw.eth](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/slw.eth/32/12499_2.png) [@slw.eth](https://forum.openzeppelin.com/u/slw.eth)\
**Post date:** [August 16, 2022, 2:17pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/6 "2022-08-16T14:17:56Z")

</div>

The plugin seems great, thanks for putting this together and for the example usages in your sample repo! It seems like a good package to import to help simplify things when spinning up a new project.

One thought: What would you think about the idea of incorporating the [Wizard API](https://www.npmjs.com/package/@openzeppelin/wizard) as well? If you wanted this to serve as a solid starting point for bootstrapping new projects, incorporating Wizard in the mix could be interesting, too.

---

<div class="post-metadata">

**Author:** ![asmel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/asmel/32/11994_2.png) [@asmel](https://forum.openzeppelin.com/u/asmel)\
**Post date:** [August 16, 2022, 2:42pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/7 "2022-08-16T14:42:08Z")

</div>

hi @slw.eth

Thank you for your comment about the plugin.

I am going to study [Wizard Api](https://www.npmjs.com/package/@openzeppelin/wizard) in depth, to find the possible use cases to perform an integration, I am also preparing an update to make the openzeppelin defender packages available in the hardhat console.

since I would like to create an environment for the creation of autoTask, sentinel and relayer within the same project and easy to configure.

As soon as I have the first demo I will inform you so that you can review it and tell me your opinion

---

<div class="post-metadata">

**Author:** ![asmel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/asmel/32/11994_2.png) [@asmel](https://forum.openzeppelin.com/u/asmel)\
**Post date:** [August 21, 2022, 5:42pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/8 "2022-08-21T17:42:08Z")

</div>

hi @slw.eth

I share a video tutorial of the [Wizard Api](https://www.npmjs.com/package/@openzeppelin/wizard) that you shared with me already integrated into the hardhat plugin, it is not publicly available yet, I would like to know your opinion 😀

in the same way I am creating a CLI for the defender api

[![](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/3X/6/f/6f59fa703ff9c248d338820f480bad0bef830fc5.jpeg "openzappelin wizard CLI hardhat") ](https://www.youtube.com/watch?v=9NmWDW--0Z0)

---

<div class="post-metadata">

**Author:** ![slw.eth](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/slw.eth/32/12499_2.png) [@slw.eth](https://forum.openzeppelin.com/u/slw.eth)\
**Post date:** [August 22, 2022, 1:54pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/9 "2022-08-22T13:54:24Z")

</div>

This is cool! I like how it gives the additional option of creating a contract via CLI, which gets me thinking about the possibility of taking any modifiers as command line args, optionally, to shortcut the process even further. Sort of how it feels to run npm init -y rather than npm init and hitting Y to all the prompts.

It's great as-is, so my suggestion might be overengineering it, but it just gets me thinking. This is a great way of taking the API and offering cli functionality.

---

<div class="post-metadata">

**Author:** ![asmel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/asmel/32/11994_2.png) [@asmel](https://forum.openzeppelin.com/u/asmel)\
**Post date:** [August 22, 2022, 10:32pm UTC](https://forum.openzeppelin.com/t/openzeppelin-defender-hardhat-plugin/30958/10 "2022-08-22T22:32:22Z")

</div>

Hi @slw.eth

Thanks for your opinion . I also thought of accepting parameters when creating the contracts to do it faster. but I decided on a more user friendly flow.

In another order of ideas, I would like to know if you have any api or package to create secret in autotasks. since I checked the [autotask admin package](https://www.npmjs.com/package/defender-autotask-client) and I didn't find a way
