Hardhat plugin to publish DAO on Tally
This plugin will allow you to publish your DAO on Tally website right from your code editor.
npm i @withtally/tally-publish-dao
Import the plugin in your hardhat.config.js
:
// Javascript
require('@withtally/tally-publish-dao');
Or if you are using TypeScript, in your hardhat.config.ts
:
// Typescript
import '@withtally/tally-publish-dao';
This plugin extends the Hardhat Runtime Environment
by adding the tally
property field whose type is Tally
.
This plugin extends the HardhatRuntimeEnvironment
and adds the tally
property to it.
To set it just import the plugin in your hardhat configuration file like so:
require('@withtally/tally-publish-dao');
import "@withtally/tally-publish-dao";
There are no additional steps you need to take for this plugin to work.
Install it and access ethers through the Hardhat Runtime Environment anywhere you need it (tasks, scripts, tests, etc).
Here's a using sample of the plugin in a task:
import { task } from "hardhat/config";
import { getExpectedContractAddress } from "../utils";
task("deploy:Dao").setAction(async function (_, { ethers, run, tally }) {
// Token and governor deployments
// ...
await tally.publishDao({
name: "My DAO",
contracts: {
governor: {
address: governor.address,
type: "OPENZEPPELINGOVERNOR",
},
token: {
address: token.address,
type: "ERC721",
}
}
})
// ...
});