From 98227928afd558e0e0b191674a0821139b8b2e98 Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Mon, 11 Mar 2019 16:12:31 -0700 Subject: [PATCH] Added Address.sol for `isContract` checks to contracts-utils package --- contracts/erc1155/compiler.json | 3 +-- contracts/erc1155/contracts/src/ERC1155.sol | 2 +- contracts/utils/CHANGELOG.json | 4 ++++ contracts/utils/compiler.json | 1 + .../contracts/src/utils => utils/contracts/src}/Address.sol | 0 5 files changed, 7 insertions(+), 3 deletions(-) rename contracts/{erc1155/contracts/src/utils => utils/contracts/src}/Address.sol (100%) diff --git a/contracts/erc1155/compiler.json b/contracts/erc1155/compiler.json index 8b4584994a..e24bb9224b 100644 --- a/contracts/erc1155/compiler.json +++ b/contracts/erc1155/compiler.json @@ -25,7 +25,6 @@ "src/MixinNonFungibleToken.sol", "src/interfaces/IERC1155Mintable.sol", "src/interfaces/IERC1155Receiver.sol", - "src/interfaces/IERC1155.sol", - "src/utils/Address.sol" + "src/interfaces/IERC1155.sol" ] } diff --git a/contracts/erc1155/contracts/src/ERC1155.sol b/contracts/erc1155/contracts/src/ERC1155.sol index ee586e612b..db9e2697b3 100644 --- a/contracts/erc1155/contracts/src/ERC1155.sol +++ b/contracts/erc1155/contracts/src/ERC1155.sol @@ -19,7 +19,7 @@ pragma solidity ^0.5.3; import "@0x/contracts-utils/contracts/src/SafeMath.sol"; -import "./utils/Address.sol"; +import "@0x/contracts-utils/contracts/src/Address.sol"; import "./interfaces/IERC1155.sol"; import "./interfaces/IERC1155Receiver.sol"; import "./MixinNonFungibleToken.sol"; diff --git a/contracts/utils/CHANGELOG.json b/contracts/utils/CHANGELOG.json index 11322582b7..a3787b8dbc 100644 --- a/contracts/utils/CHANGELOG.json +++ b/contracts/utils/CHANGELOG.json @@ -13,6 +13,10 @@ { "note": "Upgrade contracts to Solidity 0.5.5", "pr": 1682 + }, + { + "note": "Added Address.sol with test for whether or not an address is a contract", + "pr": 1657 } ] }, diff --git a/contracts/utils/compiler.json b/contracts/utils/compiler.json index e2884880e9..7dd36ba4d9 100644 --- a/contracts/utils/compiler.json +++ b/contracts/utils/compiler.json @@ -23,6 +23,7 @@ } }, "contracts": [ + "src/Address.sol", "src/LibBytes.sol", "src/Ownable.sol", "src/ReentrancyGuard.sol", diff --git a/contracts/erc1155/contracts/src/utils/Address.sol b/contracts/utils/contracts/src/Address.sol similarity index 100% rename from contracts/erc1155/contracts/src/utils/Address.sol rename to contracts/utils/contracts/src/Address.sol