Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Update batchWithdrawInternal's error messages to match new format (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrazines committed Nov 9, 2018
1 parent ebeeee8 commit 863da89
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
15 changes: 12 additions & 3 deletions contracts/core/extensions/CoreAccounting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,22 @@ contract CoreAccounting is
internal
{
// Confirm an empty _tokens array is not passed
require(_tokens.length > 0, "WITHDRAW_TOKENS_ARRAY_EMPTY");
require(
_tokens.length > 0,
"Core.batchWithdraw: Empty tokens array"
);

// Confirm an empty _quantities array is not passed
require(_quantities.length > 0, "WITHDRAW_QUANTITY_ARRAY_EMPTY");
require(
_quantities.length > 0,
"Core.batchWithdraw: Empty quantities array"
);

// Confirm there is one quantity for every token address
require(_tokens.length == _quantities.length, "WITHDRAW_UNEQUAL_ARRAYS");
require(
_tokens.length == _quantities.length,
"Core.batchWithdraw: Tokens and quantities lengths mismatch"
);

// For each token and quantity pair, call withdrawInternal function
for (uint256 i = 0; i < _tokens.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

pragma solidity 0.4.25;


/**
* @title IAuctionPriceCurve
* @author Set Protocol
*
* The IAuctionPriceCurve interface provides a structured way to interact with any AuctionLibrary
*/

interface IAuctionPriceCurve {

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import { SafeMath } from "openzeppelin-solidity/contracts/math/SafeMath.sol";
*
* Contract used in rebalancing auctions to calculate price based off of a linear curve
*/


contract LinearAuctionPriceCurve {
using SafeMath for uint256;

Expand Down

0 comments on commit 863da89

Please sign in to comment.