diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-09 11:29:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-09 11:29:31 +0800 |
commit | 14c96e0b97725244dcd7f671dac97f18d473432f (patch) | |
tree | 46e8364474df902b390c2d7267f664d72dc73391 /packages/contracts/src/2.0.0/forwarder/mixins/MExpectedResults.sol | |
parent | ef03d1ae13a3a1ceb56ff2a0682ce909e50d3bf6 (diff) | |
parent | f1613d36ac1381a978a97fd0ee7cd7bc95e7d66a (diff) | |
download | dexon-sol-tools-14c96e0b97725244dcd7f671dac97f18d473432f.tar dexon-sol-tools-14c96e0b97725244dcd7f671dac97f18d473432f.tar.gz dexon-sol-tools-14c96e0b97725244dcd7f671dac97f18d473432f.tar.bz2 dexon-sol-tools-14c96e0b97725244dcd7f671dac97f18d473432f.tar.lz dexon-sol-tools-14c96e0b97725244dcd7f671dac97f18d473432f.tar.xz dexon-sol-tools-14c96e0b97725244dcd7f671dac97f18d473432f.tar.zst dexon-sol-tools-14c96e0b97725244dcd7f671dac97f18d473432f.zip |
Merge pull request #839 from 0xProject/refactor/contracts/forwarder-interfaces
Refactor forwarder file structure
Diffstat (limited to 'packages/contracts/src/2.0.0/forwarder/mixins/MExpectedResults.sol')
-rw-r--r-- | packages/contracts/src/2.0.0/forwarder/mixins/MExpectedResults.sol | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/packages/contracts/src/2.0.0/forwarder/mixins/MExpectedResults.sol b/packages/contracts/src/2.0.0/forwarder/mixins/MExpectedResults.sol new file mode 100644 index 000000000..cf03bb32e --- /dev/null +++ b/packages/contracts/src/2.0.0/forwarder/mixins/MExpectedResults.sol @@ -0,0 +1,42 @@ +/* + + Copyright 2018 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity 0.4.24; +pragma experimental ABIEncoderV2; + +import "../../protocol/Exchange/libs/LibFillResults.sol"; +import "../../protocol/Exchange/libs/LibOrder.sol"; +import "../interfaces/IExpectedResults.sol"; + + +contract MExpectedResults is + IExpectedResults +{ + + /// @dev Simulates the 0x Exchange fillOrder validation and calculations, without performing any state changes. + /// @param order An Order struct containing order specifications. + /// @param takerAssetFillAmount A number representing the amount of this order to fill. + /// @return fillResults Amounts filled and fees paid by maker and taker. + function calculateFillResults( + LibOrder.Order memory order, + uint256 takerAssetFillAmount + ) + internal + view + returns (LibFillResults.FillResults memory fillResults); +} |