Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: moved enum and events to USM.sol #43

Merged
merged 1 commit into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions contracts/IUSM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ pragma solidity ^0.6.7;


interface IUSM {
enum Side {Buy, Sell}

event MinFumBuyPriceChanged(uint previous, uint latest);
event MintBurnAdjustmentChanged(uint previous, uint latest);
event FundDefundAdjustmentChanged(uint previous, uint latest);

function mint(address from, address to, uint ethIn) external returns (uint);
function burn(address from, address to, uint usmToBurn) external returns (uint);
function fund(address from, address to, uint ethIn) external returns (uint);
Expand Down
6 changes: 6 additions & 0 deletions contracts/USM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ contract USM is IUSM, ERC20Permit, Delegable {
using SafeMath for uint;
using WadMath for uint;

enum Side {Buy, Sell}

event MinFumBuyPriceChanged(uint previous, uint latest);
event MintBurnAdjustmentChanged(uint previous, uint latest);
event FundDefundAdjustmentChanged(uint previous, uint latest);

uint public constant WAD = 10 ** 18;
uint public constant MAX_DEBT_RATIO = WAD * 8 / 10; // 80%
uint public constant MIN_FUM_BUY_PRICE_HALF_LIFE = 24 * 60 * 60; // 1 day
Expand Down
1 change: 1 addition & 0 deletions contracts/WadMath.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.6.7;

import "@openzeppelin/contracts/math/SafeMath.sol";
Expand Down