Added testnet deployments

This commit is contained in:
PedroCailleret
2023-01-09 18:05:14 -03:00
parent 95a43113ec
commit 042667f10d
26 changed files with 122 additions and 39 deletions

View File

@@ -6,7 +6,7 @@ import { ethers, network } from "hardhat";
import { Deploys } from "../test/utils/fixtures";
// import hre from "hardhat";
import hre from "hardhat";
let deploysJson: Deploys;
const supply: BigNumber = ethers.utils.parseEther("20000000");
@@ -34,18 +34,19 @@ const main = async () => {
deploysJson.token = erc20.address;
console.log("🚀 Mock Token Deployed:", erc20.address);
await erc20.deployTransaction.wait(6);
fs.writeFileSync(
`./deploys/${network.name}.json`,
JSON.stringify(deploysJson, undefined, 2),
);
/* UNCOMMENT WHEN DEPLOYING TO MAINNET */
//verify
// await hre.run("verify:verify", {
// address: erc20.address,
// constructorArguments: supply,
// });
/* UNCOMMENT WHEN DEPLOYING TO MAINNET/PUBLIC TESTNETS */
// verify
await hre.run("verify:verify", {
address: erc20.address,
constructorArguments: [supply],
});
};
main()

View File

@@ -5,6 +5,8 @@ import { ethers, network } from "hardhat";
import { Deploys } from "../test/utils/fixtures";
import hre from "hardhat";
let deploysJson: Deploys;
const main = async () => {
@@ -40,18 +42,26 @@ const main = async () => {
deploysJson.p2pix = p2pix.address;
console.log("🚀 P2PIX Deployed:", p2pix.address);
await p2pix.deployTransaction.wait(6);
fs.writeFileSync(
`./deploys/${network.name}.json`,
JSON.stringify(deploysJson, undefined, 2),
);
/* UNCOMMENT WHEN DEPLOYING TO MAINNET */
/* UNCOMMENT WHEN DEPLOYING TO MAINNET/PUBLIC TESTNETS */
//verify
// await hre.run("verify:verify", {
// address: p2pix.address,
// constructorArguments: [2, deploysJson.signers],
// });
await hre.run("verify:verify", {
address: p2pix.address,
constructorArguments:
[
10,
deploysJson.signers,
reputation.address,
[deploysJson.token],
[true],
],
});
};
main()