aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-12 01:12:06 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:17 +0800
commit564ddff4c72cb86be1bce0e4bdea4e5d7b5d63be (patch)
treec52dfca4440fe7ea1ea0c7038a2ab9666f238ded /packages/contracts/src
parent023ea94f07feee8ceba3c176dcdaa0b1ca125d8b (diff)
downloaddexon-0x-contracts-564ddff4c72cb86be1bce0e4bdea4e5d7b5d63be.tar.gz
dexon-0x-contracts-564ddff4c72cb86be1bce0e4bdea4e5d7b5d63be.tar.zst
dexon-0x-contracts-564ddff4c72cb86be1bce0e4bdea4e5d7b5d63be.zip
IAssetProxyDispatcher to IAssetProxy in MixinSettlement layer + allowing 0-condition in ERC721 transfer
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol3
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol2
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol10
3 files changed, 8 insertions, 7 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol
index be1266780..9b920b79c 100644
--- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol
+++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol
@@ -42,6 +42,9 @@ contract ERC721Proxy is
public
onlyAuthorized
{
+ // No work to do
+ if (amount == 0) return;
+
// Decode metadata
address token;
uint256 tokenId;
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol
index 13623894a..9f5573dae 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol
@@ -37,7 +37,7 @@ contract Exchange is
function Exchange(
IToken _zrxToken,
bytes _zrxProxyMetadata,
- IAssetProxyDispatcher _assetProxyDispatcher)
+ IAssetProxy _assetProxyDispatcher)
public
MixinExchangeCore()
MixinSignatureValidator()
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol
index be5fec96a..9e2d8bfb9 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol
@@ -22,20 +22,20 @@ pragma experimental ABIEncoderV2;
import "./mixins/MSettlement.sol";
import "../../tokens/Token/IToken.sol";
import "./LibPartialAmount.sol";
-import "../AssetProxyDispatcher/IAssetProxyDispatcher.sol";
+import "../AssetProxyDispatcher/IAssetProxy.sol";
/// @dev Provides MixinSettlement
contract MixinSettlementProxy is
MSettlement,
LibPartialAmount
{
- IAssetProxyDispatcher TRANSFER_PROXY;
+ IAssetProxy TRANSFER_PROXY;
bytes ZRX_PROXY_METADATA;
IToken ZRX_TOKEN;
function transferProxy()
public view
- returns (IAssetProxyDispatcher)
+ returns (IAssetProxy)
{
return TRANSFER_PROXY;
}
@@ -55,7 +55,7 @@ contract MixinSettlementProxy is
}
function MixinSettlementProxy(
- IAssetProxyDispatcher assetProxyDispatcherContract,
+ IAssetProxy assetProxyDispatcherContract,
IToken zrxToken,
bytes zrxProxyMetadata)
public
@@ -65,8 +65,6 @@ contract MixinSettlementProxy is
ZRX_PROXY_METADATA = zrxProxyMetadata;
}
-
-
function settleOrder(
Order memory order,
address takerAddress,