Skip to content

Commit

Permalink
added the deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgo0018 committed Dec 7, 2023
1 parent 6c6673f commit c8737eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion contracts/Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.20;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

import "./VaultShareToken.sol";
Expand Down
14 changes: 5 additions & 9 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
import { viem } from "hardhat";

const chainlinkFunctionsRouter = "0x6E2dc0F9DB014aE19888F539E59285D2Ea04244C";
const uniswapV2RouterAddress = "0x";
const stableTokenAddress = "0x";

async function main() {
const fundManager = await viem.deployContract("FundManager", [
chainlinkFunctionsRouter,
]);

console.log(`Fund Manager is deployed to ${fundManager.address}`);
const usdc = await viem.deployContract("MockERC20", []);

const mockUniswapRouter = await viem.deployContract("MockUniswapRouter", [
fundManager.address,
usdc.address,
]);

const vault = await viem.deployContract("Vault", [
usdc.address,
stableTokenAddress,
fundManager.address,
mockUniswapRouter.address,
uniswapV2RouterAddress,
]);

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

// We recommend this pattern to be able to use async/await everywhere
Expand Down

0 comments on commit c8737eb

Please sign in to comment.