Skip to content

Commit

Permalink
added contract verification on polygonscan
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgo0018 committed Dec 16, 2023
1 parent 5ba0335 commit 4766579
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ PRIVATE_KEY=
POLYGON_MUMBAI_RPC=
PINATA_API_KEY=
POLYGON_MAINNET_RPC=
POLYGONSCAN_API_KEY=
7 changes: 7 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ const config: HardhatUserConfig = {
accounts: [process.env.PRIVATE_KEY || ""],
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: {
polygon: process.env.POLYGONSCAN_API_KEY || "",
},
},
};

export default config;
20 changes: 19 additions & 1 deletion scripts/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { viem } from "hardhat";
import { run, viem } from "hardhat";

const chainlinkFunctionsRouter = "0xdc2AAF042Aeff2E68B3e8E33F19e4B9fA7C73F10";
const uniswapV2RouterAddress = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff";
Expand All @@ -14,6 +14,11 @@ async function main() {
chainlinkFunctionsRouter,
]);

await run("verify:verify", {
address: fundManager.address,
constructorArguments: [chainlinkFunctionsRouter],
});

console.log(`Fund Manager is deployed to ${fundManager.address}`);

const vault = await viem.deployContract("Vault", [
Expand All @@ -22,8 +27,21 @@ async function main() {
uniswapV2RouterAddress,
]);

await run("verify:verify", {
address: vault.address,
constructorArguments: [
stableTokenAddress,
fundManager.address,
uniswapV2RouterAddress,
],
});

console.log(`Vault Contract is deployed to ${vault.address}`);

console.log(
`Vault Share token contract is deployed to ${await vault.read.shareToken()}`
);

await fundManager.write.setDONConfig([
donHostedSecretsSlotID,
donHostedSecretsVersion,
Expand Down

0 comments on commit 4766579

Please sign in to comment.