Skip to content

Commit

Permalink
redeploy contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Nov 30, 2023
1 parent a1a2425 commit 5fc5258
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
8 changes: 8 additions & 0 deletions packages/hardhat/contracts/HighRiskVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ contract HighRiskVault is Ownable, ERC4626 {
* @param amount the amount of assets removed from this vault by market contract
*/

function simulateLoss(uint256 amount) external onlyOwner {
require(
amount <= IERC20(asset()).balanceOf(address(this)),
"Insufficient asset balance in low risk vault to simulate loss"
);
IERC20(asset()).transfer(owner(), amount);
}

/**
* @dev burns a player's shares w/o sending them any assets
*/
Expand Down
23 changes: 18 additions & 5 deletions packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,7 @@ const deployedContracts = {
},
80001: {
GoldToken: {
address: "0x85D3B09cbA4f5994102435caD33f27f00E7f00CB",
address: "0x88CA96372D2196aAcaa9093fca361C576b2d171c",
abi: [
{
inputs: [],
Expand Down Expand Up @@ -2857,7 +2857,7 @@ const deployedContracts = {
],
},
HighRiskVault: {
address: "0xbDD01425dC5B72b84730411d344359Bf667BA6AA",
address: "0x0fBf225a33b81942aAC95a69514990ce9583cb54",
abi: [
{
inputs: [
Expand Down Expand Up @@ -3499,6 +3499,19 @@ const deployedContracts = {
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "simulateLoss",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "symbol",
Expand Down Expand Up @@ -3636,7 +3649,7 @@ const deployedContracts = {
],
},
LowRiskVault: {
address: "0xFd22CFe7977ec28909e3f4867dF9962Ce5BFD861",
address: "0xCb53D95C67c12D1db7A73bfCB36d7eE18CA6Af24",
abi: [
{
inputs: [
Expand Down Expand Up @@ -4428,7 +4441,7 @@ const deployedContracts = {
],
},
Market: {
address: "0x51f83e8653e198A089c41F61f8De1791140a9d03",
address: "0xc60D0494C120Fd0D233Fe35bbAE2b4e9812Ae937",
abi: [
{
inputs: [
Expand Down Expand Up @@ -5197,7 +5210,7 @@ const deployedContracts = {
],
},
MediumRiskVault: {
address: "0xFe3f176aDC15008d3e79181803a689572b8D3730",
address: "0xDd3325B8209bfD7eFB2781aDe9b953D053324b10",
abi: [
{
inputs: [
Expand Down

0 comments on commit 5fc5258

Please sign in to comment.