Skip to content

Commit

Permalink
added function to update the fund manager contract
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgo0018 committed Dec 18, 2023
1 parent 9590cf0 commit 8b5d9e3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions contracts/Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ pragma solidity ^0.8.20;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

import "./VaultShareToken.sol";
import "./FundManager.sol";
import "./interfaces/ExtendedIERC20.sol";

contract Vault {
contract Vault is Ownable {
VaultShareToken public shareToken;
ExtendedIERC20 public stableToken;
FundManager public fundManager;
Expand All @@ -28,7 +29,7 @@ contract Vault {
ExtendedIERC20 _stableToken,
FundManager _fundManager,
address _uniswapRouter
) {
) Ownable(msg.sender) {
fundManager = _fundManager;
stableToken = _stableToken;
shareToken = new VaultShareToken();
Expand All @@ -38,6 +39,10 @@ contract Vault {
emit AddSupportedToken(address(stableToken));
}

function updateFundManager(FundManager _fundManager) public onlyOwner {
fundManager = _fundManager;
}

function addSupportedToken(address _token) public {
if (isTokenSupported[_token]) revert("Token already supported");
supportedTokens.push(_token);
Expand Down

0 comments on commit 8b5d9e3

Please sign in to comment.