aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol')
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol50
1 files changed, 11 insertions, 39 deletions
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol b/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol
index 6aaa729fb..b8b67e6ee 100644
--- a/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol
+++ b/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol
@@ -20,9 +20,12 @@ pragma solidity 0.4.24;
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
import "../interfaces/IThresholdAsset.sol";
+import "../interfaces/IBalanceThresholdFilterCore.sol";
-contract MBalanceThresholdFilterCore {
+contract MBalanceThresholdFilterCore is
+ IBalanceThresholdFilterCore
+{
// Points to 0x exchange contract
// solhint-disable var-name-mixedcase
@@ -40,43 +43,12 @@ contract MBalanceThresholdFilterCore {
address[] addresses
);
- /// @dev Executes an Exchange transaction iff the maker and taker meet
- /// the hold at least `BALANCE_THRESHOLD` of the asset `THRESHOLD_ASSET` OR
- /// the exchange function is a cancellation.
- /// Supported Exchange functions:
- /// - batchFillOrders
- /// - batchFillOrdersNoThrow
- /// - batchFillOrKillOrders
- /// - fillOrder
- /// - fillOrderNoThrow
- /// - fillOrKillOrder
- /// - marketBuyOrders
- /// - marketBuyOrdersNoThrow
- /// - marketSellOrders
- /// - marketSellOrdersNoThrow
- /// - matchOrders
- /// - cancelOrder
- /// - batchCancelOrders
- /// - cancelOrdersUpTo
- /// Trying to call any other exchange function will throw.
- /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
+ /// @dev Constructs an array of addresses to be validated.
+ /// Addresses depend on which Exchange function is to be called
+ /// (defined by `signedExchangeTransaction` above).
/// @param signerAddress Address of transaction signer.
- /// @param signedExchangeTransaction AbiV2 encoded calldata.
- /// @param signature Proof of signer transaction by signer.
- function executeTransaction(
- uint256 salt,
- address signerAddress,
- bytes signedExchangeTransaction,
- bytes signature
- )
- external;
-
- /// @dev Validates addresses meet the balance threshold specified by `BALANCE_THRESHOLD`
- /// for the asset `THRESHOLD_ASSET`. If one address does not meet the thresold
- /// then this function will revert. Which addresses are validated depends on
- /// which Exchange function is to be called (defined by `signedExchangeTransaction` above).
- /// No parameters are taken as this function reads arguments directly from calldata, to save gas.
- /// If all addresses are valid then this function emits a ValidatedAddresses event, listing all
- /// of the addresses whose balance thresholds it checked.
- function validateBalanceThresholdsOrRevert(address signerAddress) internal;
+ /// @return addressesToValidate Array of addresses to validate.
+ function getAddressesToValidate(address signerAddress)
+ internal pure
+ returns (address[] memory addressesToValidate);
}