feat: deployment scripts fixed and lock fx unit tests added

This commit is contained in:
PedroCailleret
2022-12-07 12:43:57 -03:00
parent 1a4b4973d4
commit d541e7b70c
17 changed files with 585 additions and 96 deletions

View File

@@ -2,14 +2,8 @@ import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-etherscan";
import * as fs from "fs";
import { ethers, network } from "hardhat";
import { Deploys } from "../test/utils/fixtures";
// import hre from "hardhat";
interface Deploys {
signers: string[];
p2pix: string;
token: string;
}
let deploysJson: Deploys;
@@ -28,8 +22,18 @@ const main = async () => {
const [deployer] = await ethers.getSigners();
console.log(`Deploying contracts with ${deployer.address}`);
const Reputation = await ethers.getContractFactory("Reputation");
const reputation = await Reputation.deploy();
await reputation.deployed();
const P2PIX = await ethers.getContractFactory("P2PIX");
const p2pix = await P2PIX.deploy(2, deploysJson.signers);
const p2pix = await P2PIX.deploy(
10,
deploysJson.signers,
reputation.address,
[deploysJson.token],
[true]
);
await p2pix.deployed();
deploysJson.p2pix = p2pix.address;