Skip to content

Commit

Permalink
fix: conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
TTNguyenDev committed Jan 23, 2024
1 parent 2bdb780 commit 47e6550
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.sepolia.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
RPC_URL="https://rpc.sepolia.org"
ETHERSCAN_API_KEY=TZHJV2MCZ19jsdHFWG7DY9PS26EWGQ6G27F
DEPLOYER_PRIVATE_KEY=""

NATION_SUPPLY="42069000000000000000000"
Expand Down
24 changes: 24 additions & 0 deletions scripts/dev-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { wallet, dec, save } from "./helpers";
import { ethers, BigNumber, Contract } from "ethers";
import { formatUnits } from "@ethersproject/units"

import { exec } from "child_process";

import Nation from '../out/NATION.sol/NATION.json';
import VotingEscrow from '../out/VotingEscrow.vy/VotingEscrow.json';
import LiquidityDistributor from '../out/BoostedLiquidityDistributor.sol/BoostedLiquidityDistributor.json';
Expand All @@ -22,6 +24,17 @@ const deployContract = async ({ name, deployer, factory, args }: { name: string,
return contract;
}

const verifyContact = async (address: string, path: string, constructorArgs: Array<any>) => {
exec(
["forge verify-contract", address, path, "--chain-id", 11155111].join(" "),
(error, stdout, stderr) => {
console.log(error)
console.log(stdout)
console.log(stderr)
}
);
}

const deployNation = async () => {
const supply: BigNumber = BigNumber.from(process.env.NATION_SUPPLY ?? dec(42069, 18));
const Factory = getContractFactory(Nation);
Expand Down Expand Up @@ -166,6 +179,17 @@ const main = async () => {
save(deployment, manifestFile);

console.log(`Deployment manifest saved to ${manifestFile}`)

console.log("Contract verification...")
// await verifyContact(NATION.address, "src/tokens/NATION.sol:NATION", [])
// // await verifyContact(veNATION.address, "src/tokens/NATION.sol:NATION", []) //TODO: Verify vyper contract later
// TODO:
// await verifyContact(lpContracts.lpToken.address, "src/tokens/NATION.sol:NATION", [])
// await verifyContact(lpContracts.lpRewardsContract.address, "src/tokens/NATION.sol:NATION", [])
// await verifyContact(passportContracts.passportToken.address, "src/tokens/NATION.sol:NATION", [])
// await verifyContact(passportContracts.passportIssuer.address, "src/tokens/NATION.sol:NATION", [])

await verifyContact("0x23Ca3002706b71a440860E3cf8ff64679A00C9d7", "src/tokens/NATION.sol:NATION", [])
}


Expand Down

0 comments on commit 47e6550

Please sign in to comment.