update comments
This commit is contained in:
@@ -20,8 +20,8 @@ pragma solidity 0.4.24;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
|
||||
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
|
||||
import "../../tokens/ERC20Token/IERC20Token.sol";
|
||||
import "../../tokens/ERC721Token/IERC721Token.sol";
|
||||
import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
|
||||
import "@0x/contracts-tokens/contracts/tokens/ERC721Token/IERC721Token.sol";
|
||||
import "./mixins/MAssets.sol";
|
||||
import "./libs/LibConstants.sol";
|
||||
|
||||
@@ -98,6 +98,7 @@ contract MixinAssets is
|
||||
)
|
||||
internal
|
||||
{
|
||||
// 4 byte id + 12 0 bytes before ABI encoded token address.
|
||||
address token = assetData.readAddress(16);
|
||||
|
||||
// Transfer tokens.
|
||||
@@ -149,7 +150,9 @@ contract MixinAssets is
|
||||
"INVALID_AMOUNT"
|
||||
);
|
||||
// Decode asset data.
|
||||
// 4 byte id + 12 0 bytes before ABI encoded token address.
|
||||
address token = assetData.readAddress(16);
|
||||
// 4 byte id + 32 byte ABI encoded token address before token id.
|
||||
uint256 tokenId = assetData.readUint256(36);
|
||||
|
||||
// Perform transfer.
|
||||
|
||||
@@ -230,7 +230,7 @@ contract MixinMatchOrders is
|
||||
// | 932 | a | rightMakerAssetData Contents |
|
||||
// | 932 + a | 32 | rightTakerAssetData Length |
|
||||
// | 964 | b | rightTakerAssetData Contents |
|
||||
// | 964 + b | 32 | rightSigature Length (always 0) |
|
||||
// | 964 + b | 32 | rightSignature Length (always 0) |
|
||||
|
||||
// We assume that `leftOrder.makerAssetData == rightOrder.takerAssetData` and `leftOrder.takerAssetData == rightOrder.makerAssetData`
|
||||
// `EXCHANGE.matchOrders` already makes this assumption, so it is likely
|
||||
@@ -280,6 +280,7 @@ contract MixinMatchOrders is
|
||||
)
|
||||
mstore(rightSignatureStart, 0)
|
||||
|
||||
// function selector (4 bytes) + 3 params (3 * 32 bytes) must be stored before `rightOrderStart`
|
||||
let cdStart := sub(rightOrderStart, 100)
|
||||
|
||||
// `fillOrder` selector = 0xb4be83d5
|
||||
@@ -288,7 +289,7 @@ contract MixinMatchOrders is
|
||||
// Write offset to `rightOrder`
|
||||
mstore(add(cdStart, 4), 96)
|
||||
|
||||
// Write `takerAssetFillAmount`
|
||||
// Write `takerAssetFillAmount`, which will be the `leftMakerAssetSpreadAmount` received from the `matchOrders` call
|
||||
mstore(add(cdStart, 36), mload(256))
|
||||
|
||||
// Write offset to `rightSignature`
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
pragma solidity 0.4.24;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../../../protocol/Exchange/libs/LibOrder.sol";
|
||||
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
|
||||
|
||||
|
||||
contract IMatchOrders {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
|
||||
import "../../../utils/Ownable/IOwnable.sol";
|
||||
import "@0x/contract-utils/contracts/utils/Ownable/IOwnable.sol";
|
||||
import "./IMatchOrders.sol";
|
||||
import "./IAssets.sol";
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
|
||||
import "../../../protocol/Exchange/interfaces/IExchange.sol";
|
||||
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
|
||||
|
||||
|
||||
contract LibConstants {
|
||||
|
||||
Reference in New Issue
Block a user