Skip to content

Commit

Permalink
Merge pull request #149 from usmfum/fix/consistent-caps
Browse files Browse the repository at this point in the history
Resolves #122.
  • Loading branch information
jacob-eliosoff authored Apr 6, 2021
2 parents 390dd02 + 490ce8c commit 1880c61
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions contracts/USM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ contract USM is IUSM, Oracle, ERC20Permit, OptOutable, Delegable {
/**
* @dev Sometimes we want to give FUM privileged access.
*/
modifier onlyHolderOrDelegateOrFUM(address owner, string memory errorMessage) {
modifier onlyHolderOrDelegateOrFum(address owner, string memory errorMessage) {
require(
msg.sender == owner || delegated[owner][msg.sender] || msg.sender == address(fum),
errorMessage
Expand Down Expand Up @@ -123,7 +123,7 @@ contract USM is IUSM, Oracle, ERC20Permit, OptOutable, Delegable {
*/
function defund(address from, address payable to, uint fumToBurn, uint minEthOut)
external override
onlyHolderOrDelegateOrFUM(from, "Only holder or delegate or FUM")
onlyHolderOrDelegateOrFum(from, "Only holder or delegate or FUM")
returns (uint ethOut)
{
ethOut = _defundFum(from, to, fumToBurn, minEthOut);
Expand Down
2 changes: 1 addition & 1 deletion contracts/UsmWethProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "./IUSM.sol";
* @title USM Weth Frontend Proxy
* @author Alberto Cuesta Cañada, Jacob Eliosoff, Alex Roan
*/
contract UsmWethProxy {
contract USMWETHProxy {
IUSM public immutable usm;
IWETH9 public immutable weth;

Expand Down
6 changes: 3 additions & 3 deletions deploy/4_deploy_usmwethproxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ const func = async function ({ deployments, getNamedAccounts, getChainId }) {

usmAddress = (await get('USM')).address;

const proxy = await deploy('UsmWethProxy', {
const proxy = await deploy('USMWETHProxy', {
from: deployer,
deterministicDeployment: true,
args: [usmAddress, wethAddress]
})

console.log(`Deployed UsmWethProxy to ${proxy.address}`);
console.log(`Deployed USMWETHProxy to ${proxy.address}`);
}

module.exports = func;
module.exports.tags = ["UsmWethProxy"];
module.exports.tags = ["USMWETHProxy"];
6 changes: 3 additions & 3 deletions test/04_Proxy_Eth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const TestOracle = artifacts.require('TestOracle')
const USM = artifacts.require('USM')
const FUM = artifacts.require('FUM')
const USMView = artifacts.require('USMView')
const UsmWethProxy = artifacts.require('UsmWethProxy')
const USMWETHProxy = artifacts.require('USMWETHProxy')

require('chai').use(require('chai-as-promised')).should()

contract('USM - UsmWethProxy - Eth', (accounts) => {
contract('USM - USMWETHProxy - Eth', (accounts) => {
const [deployer, user1, user2] = accounts
const [TWO, WAD] =
[2, '1000000000000000000'].map(function (n) { return new BN(n) })
Expand All @@ -32,7 +32,7 @@ contract('USM - UsmWethProxy - Eth', (accounts) => {
await usm.refreshPrice() // Ensures the savedPrice passed to the constructor above is also set in usm.storedPrice
fum = await FUM.at(await usm.fum())
usmView = await USMView.new(usm.address, { from: deployer })
proxy = await UsmWethProxy.new(usm.address, weth.address, { from: deployer })
proxy = await USMWETHProxy.new(usm.address, weth.address, { from: deployer })

await weth.deposit({ from: user1, value: oneEth.mul(TWO) }) // One 1-ETH fund() + one 1-ETH mint()
await weth.approve(proxy.address, MAX, { from: user1 })
Expand Down

0 comments on commit 1880c61

Please sign in to comment.