-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
642 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"react-hooks/exhaustive-deps": "off", | ||
"space-infix-ops": ["warn", { "int32Hint": false }], | ||
"@typescript-eslint/no-explicit-any": ["off"], | ||
"@next/next/no-img-element": ["off"], | ||
"@typescript-eslint/no-non-null-assertion": ["off"] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,69 @@ | ||
import { network, ethers } from "hardhat" | ||
import { network } from "hardhat" | ||
import { DeployFunction } from "hardhat-deploy/dist/types" | ||
import { HardhatRuntimeEnvironment } from "hardhat/types" | ||
import { developmentChains } from "../helper-hardhat-config" | ||
import verify from "../utils/verify" | ||
|
||
const deployCrowdFunder: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts } = hre | ||
const { deploy, log } = deployments | ||
const { deployer } = await getNamedAccounts() | ||
const chainId = network.config.chainId | ||
const waitBlockConfirmations = chainId?.toString() == "31337" ? 1 : 5 | ||
const deployCrowdFunder: DeployFunction = async function ( | ||
hre: HardhatRuntimeEnvironment | ||
) { | ||
const { deployments, getNamedAccounts } = hre | ||
const { deploy, log } = deployments | ||
const { deployer } = await getNamedAccounts() | ||
const chainId = network.config.chainId | ||
const waitBlockConfirmations = chainId?.toString() == "31337" ? 1 : 5 | ||
|
||
log("==========================") | ||
const refunderLib = await deploy("RefunderLib", { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
waitConfirmations: waitBlockConfirmations | ||
}) | ||
log("==========================") | ||
const refunderLib = await deploy("RefunderLib", { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
waitConfirmations: waitBlockConfirmations, | ||
}) | ||
|
||
const campaignFactory = await deploy("CampaignFactory", { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
libraries: { | ||
RefunderLib: refunderLib.address | ||
}, | ||
waitConfirmations: waitBlockConfirmations | ||
}) | ||
const campaignFactory = await deploy("CampaignFactory", { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
libraries: { | ||
RefunderLib: refunderLib.address, | ||
}, | ||
waitConfirmations: waitBlockConfirmations, | ||
}) | ||
|
||
const rewardFactory = await deploy("RewardFactory", { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
libraries: { | ||
RefunderLib: refunderLib.address | ||
}, | ||
waitConfirmations: waitBlockConfirmations | ||
}) | ||
const rewardFactory = await deploy("RewardFactory", { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
libraries: { | ||
RefunderLib: refunderLib.address, | ||
}, | ||
waitConfirmations: waitBlockConfirmations, | ||
}) | ||
|
||
const args:any[] = [campaignFactory.address, rewardFactory.address] | ||
const crowdFunder = await deploy("CrowdFunder", { | ||
from: deployer, | ||
args: args, | ||
log: true, | ||
libraries: { | ||
RefunderLib: refunderLib.address | ||
}, | ||
waitConfirmations: waitBlockConfirmations | ||
}) | ||
const args: any[] = [campaignFactory.address, rewardFactory.address] | ||
const crowdFunder = await deploy("CrowdFunder", { | ||
from: deployer, | ||
args: args, | ||
log: true, | ||
libraries: { | ||
RefunderLib: refunderLib.address, | ||
}, | ||
waitConfirmations: waitBlockConfirmations, | ||
}) | ||
|
||
if(!developmentChains.includes(network.name) && process.env.ETHERSCAN_API_KEY) { | ||
log("Verifying...") | ||
await verify(refunderLib.address, []) | ||
await verify(campaignFactory.address, []) | ||
await verify(rewardFactory.address, []) | ||
await verify(crowdFunder.address, args) | ||
} | ||
log("==========================") | ||
if ( | ||
!developmentChains.includes(network.name) && | ||
process.env.ETHERSCAN_API_KEY | ||
) { | ||
log("Verifying...") | ||
await verify(refunderLib.address, []) | ||
await verify(campaignFactory.address, []) | ||
await verify(rewardFactory.address, []) | ||
await verify(crowdFunder.address, args) | ||
} | ||
log("==========================") | ||
} | ||
|
||
export default deployCrowdFunder | ||
deployCrowdFunder.tags = ["all", "crowdfunder"] | ||
deployCrowdFunder.tags = ["all", "crowdfunder"] |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
deployments/sepolia/solcInputs/29f2960a323d69a7be5b01d1ca776898.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.