aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/contracts/current/test/Whitelist/Whitelist.sol10
-rw-r--r--packages/contracts/src/utils/types.ts2
2 files changed, 7 insertions, 5 deletions
diff --git a/packages/contracts/src/contracts/current/test/Whitelist/Whitelist.sol b/packages/contracts/src/contracts/current/test/Whitelist/Whitelist.sol
index d35815474..8b52858b1 100644
--- a/packages/contracts/src/contracts/current/test/Whitelist/Whitelist.sol
+++ b/packages/contracts/src/contracts/current/test/Whitelist/Whitelist.sol
@@ -23,13 +23,13 @@ import "../../protocol/Exchange/interfaces/IExchange.sol";
import "../../protocol/Exchange/libs/LibOrder.sol";
import "../../utils/Ownable/Ownable.sol";
-contract Whitelist is
+contract Whitelist is
Ownable
{
// Revert reasons
- string constant MAKER_NOT_WHITELISTED = "Maker address not whitelisted.";
- string constant TAKER_NOT_WHITELISTED = "Taker address not whitelisted.";
- string constant INVALID_SENDER = "Sender must equal transaction origin.";
+ string constant MAKER_NOT_WHITELISTED = "MAKER_NOT_WHITELISTED"; // Maker address not whitelisted.
+ string constant TAKER_NOT_WHITELISTED = "TAKER_NOT_WHITELISTED"; // Taker address not whitelisted.
+ string constant INVALID_SENDER = "INVALID_SENDER"; // Sender must equal transaction origin.
// Mapping of address => whitelist status.
mapping (address => bool) public isWhitelisted;
@@ -77,7 +77,7 @@ contract Whitelist is
public
{
address takerAddress = msg.sender;
-
+
// This contract must be the entry point for the transaction.
require(
takerAddress == tx.origin,
diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts
index 24183b549..c1eb72099 100644
--- a/packages/contracts/src/utils/types.ts
+++ b/packages/contracts/src/utils/types.ts
@@ -183,4 +183,6 @@ export enum ContractLibErrors {
IndexOutOfBounds = 'INDEX_OUT_OF_BOUNDS',
AuthorizedAddressMismatch = 'AUTHORIZED_ADDRESS_MISMATCH',
OnlyContractOwner = 'ONLY_CONTRACT_OWNER',
+ MakerNotWhitelisted = 'MAKER_NOT_WHITELISTED',
+ TakerNotWhitelisted = 'TAKER_NOT_WHITELISTED',
}