Skip to content

Commit

Permalink
Comment update (#102)
Browse files Browse the repository at this point in the history
* comment update

* Update spot-contracts/contracts/PerpetualTranche.sol

Co-authored-by: nms-7 <[email protected]>

* ran linter

Co-authored-by: nms-7 <[email protected]>
  • Loading branch information
aalavandhan and nms-7 authored Sep 20, 2022
1 parent 9840aa7 commit 11dba20
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions spot-contracts/contracts/PerpetualTranche.sol
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ contract PerpetualTranche is ERC20BurnableUpgradeable, OwnableUpgradeable, Pausa
/// @dev The computed price is expected to be a fixed point unsigned integer with {PRICE_DECIMALS} decimals.
IPricingStrategy public pricingStrategy;

/// @notice External contract that computes a given reserve token's discount.
/// @dev Discount is the discount or premium factor applied to every asset when added to
/// the reserve. This accounts for things like tranche seniority and underlying
/// collateral volatility. It also allows for standardizing denominations when comparing,
/// two different reserve tokens.
/// The computed discount is expected to be a fixed point unsigned integer with {DISCOUNT_DECIMALS} decimals.
/// @notice External contract that computes a given reserve token's discount factor.
/// @dev It is a multiplier, applied to every asset when added to the reserve.
/// This accounts for things like tranche seniority and underlying collateral volatility.
/// It also allows for standardizing denominations when comparing two different reserve tokens.
/// For example, a factor of 0.95 on a particular tranche results in a 5% discount.
/// The discount factor is expected to be a fixed point unsigned integer with {DISCOUNT_DECIMALS} decimals.
IDiscountStrategy public discountStrategy;

/// @notice External contract that stores a predefined bond config and frequency,
Expand Down
2 changes: 1 addition & 1 deletion spot-contracts/contracts/test/mocks/MockTranche.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.15;

import {MockERC20} from "./MockERC20.sol";
import { MockERC20 } from "./MockERC20.sol";

contract MockTranche is MockERC20 {
address public bond;
Expand Down
4 changes: 2 additions & 2 deletions spot-contracts/test/PerpetualTranche_deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ describe("PerpetualTranche", function () {
const ERC20 = await ethers.getContractFactory("MockTranche");
const maliciousTranche = await ERC20.deploy();
await maliciousTranche.init("Tranche", "TRA");
await maliciousTranche.mint(deployerAddress, toFixedPtAmt("500"))
await maliciousTranche.setBond(await perp.callStatic.getDepositBond())
await maliciousTranche.mint(deployerAddress, toFixedPtAmt("500"));
await maliciousTranche.setBond(await perp.callStatic.getDepositBond());
await maliciousTranche.approve(perp.address, toFixedPtAmt("500"));
await expect(perp.deposit(maliciousTranche.address, toFixedPtAmt("500"))).to.revertedWith(
"UnacceptableDepositTranche",
Expand Down

0 comments on commit 11dba20

Please sign in to comment.