Skip to content

Commit

Permalink
Deployments after deploy to polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
mobycrypt committed Sep 8, 2023
1 parent 152841f commit e20b81d
Show file tree
Hide file tree
Showing 7 changed files with 413 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ typechain-types
# Hardhat files
cache
artifacts

deployments/
dao-factories-local.json
dev-tokens-local.json
18 changes: 3 additions & 15 deletions deploy/01-deploy-erc-20-dao-factory.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
// TypeScript
import { DeployFunction, DeployResult } from "hardhat-deploy/dist/types";
import { DeployFunction } from "hardhat-deploy/dist/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { network } from "hardhat";
import fs from 'fs';

const deployErc20DaoFactory: DeployFunction = async (
hre: HardhatRuntimeEnvironment
) => {
const { deploy } = hre.deployments;
const { deployer } = await hre.getNamedAccounts();
console.log('deployer', deployer);
const chainId = network.config.chainId!;
const currentNetwork = network.name;

const deployerResult = await deploy("ERC20DaoFactory", {
await deploy("ERC20DaoFactory", {
from: deployer,
log: true,
args: [],
waitConfirmations: chainId == 31337 ? 1 : 6,
});

if (!fs.existsSync('deployments')) {
fs.mkdirSync('deployments');
}
fs.writeFileSync(
`deployments/erc-20-dao-factory-${currentNetwork}.json`,
JSON.stringify({
address: deployerResult.address,
}, null, 2));
console.log('Done!');
};

export default deployErc20DaoFactory;
Expand Down
16 changes: 2 additions & 14 deletions deploy/02-deploy-nft-dao-factory.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
// TypeScript
import { DeployFunction, DeployResult } from "hardhat-deploy/dist/types";
import { DeployFunction } from "hardhat-deploy/dist/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { network } from "hardhat";
import fs from 'fs';

const deployNftDaoFactory: DeployFunction = async (
hre: HardhatRuntimeEnvironment
) => {
const { deploy } = hre.deployments;
const { deployer } = await hre.getNamedAccounts();
const chainId = network.config.chainId!;
const currentNetwork = network.name;

const deployerResult = await deploy("NFTDaoFactory", {
await deploy("NFTDaoFactory", {
from: deployer,
log: true,
args: [],
waitConfirmations: chainId == 31337 ? 1 : 6,
});
if (!fs.existsSync('deployments')) {
fs.mkdirSync('deployments');
}
fs.writeFileSync(
`deployments/nft-dao-factory-${currentNetwork}.json`,
JSON.stringify({
address: deployerResult.address,
}, null, 2));
console.log('Done!');
};

export default deployNftDaoFactory;
Expand Down
1 change: 1 addition & 0 deletions deployments/polygon/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
137
135 changes: 135 additions & 0 deletions deployments/polygon/ERC20DaoFactory.json

Large diffs are not rendered by default.

135 changes: 135 additions & 0 deletions deployments/polygon/NFTDaoFactory.json

Large diffs are not rendered by default.

135 changes: 135 additions & 0 deletions deployments/polygon/solcInputs/cda1079c0ec7aa9519c537fb093da964.json

Large diffs are not rendered by default.

0 comments on commit e20b81d

Please sign in to comment.