From c8737eb2118b2fe2d1f282724a74f50f2198843c Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Thu, 7 Dec 2023 18:02:09 +0530 Subject: [PATCH] added the deployment script --- contracts/Vault.sol | 1 - scripts/deploy.ts | 14 +++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/contracts/Vault.sol b/contracts/Vault.sol index 700edce..b4d02c0 100644 --- a/contracts/Vault.sol +++ b/contracts/Vault.sol @@ -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"; diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 9a84a2d..4001516 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -1,6 +1,8 @@ import { viem } from "hardhat"; const chainlinkFunctionsRouter = "0x6E2dc0F9DB014aE19888F539E59285D2Ea04244C"; +const uniswapV2RouterAddress = "0x"; +const stableTokenAddress = "0x"; async function main() { const fundManager = await viem.deployContract("FundManager", [ @@ -8,20 +10,14 @@ async function main() { ]); 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