From ab6f8295ffc84d7ad3e7210abd8271fbeabf4ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Cuesta=20Ca=C3=B1ada?= Date: Mon, 5 Oct 2020 09:42:26 +0100 Subject: [PATCH] feat: moved enum and events to USM.sol --- contracts/IUSM.sol | 6 ------ contracts/USM.sol | 6 ++++++ contracts/WadMath.sol | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contracts/IUSM.sol b/contracts/IUSM.sol index aa687f7..78a4be7 100644 --- a/contracts/IUSM.sol +++ b/contracts/IUSM.sol @@ -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); diff --git a/contracts/USM.sol b/contracts/USM.sol index 0ddd5a2..cff47cb 100644 --- a/contracts/USM.sol +++ b/contracts/USM.sol @@ -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 diff --git a/contracts/WadMath.sol b/contracts/WadMath.sol index a2af669..fd1abc8 100644 --- a/contracts/WadMath.sol +++ b/contracts/WadMath.sol @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.6.7; import "@openzeppelin/contracts/math/SafeMath.sol";