Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1714 from 0xProject/feature/order-utils/one-sided…
Browse files Browse the repository at this point in the history
…-transfer-validation

Simulate Maker transfer in order validation
  • Loading branch information
dekz authored Mar 28, 2019
2 parents 0beb2f9 + d8bfc92 commit f9921d2
Show file tree
Hide file tree
Showing 26 changed files with 1,730 additions and 103 deletions.
9 changes: 9 additions & 0 deletions contracts/erc20/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "2.2.0",
"changes": [
{
"note": "Added UntransferrableDummyERC20Token",
"pr": 1714
}
]
},
{
"version": "2.1.0",
"changes": [
Expand Down
3 changes: 2 additions & 1 deletion contracts/erc20/compiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"src/interfaces/IEtherToken.sol",
"test/DummyERC20Token.sol",
"test/DummyMultipleReturnERC20Token.sol",
"test/DummyNoReturnERC20Token.sol"
"test/DummyNoReturnERC20Token.sol",
"test/UntransferrableDummyERC20Token.sol"
]
}
61 changes: 61 additions & 0 deletions contracts/erc20/contracts/test/UntransferrableDummyERC20Token.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
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.5.5;

import "./DummyERC20Token.sol";


// solhint-disable no-empty-blocks
contract UntransferrableDummyERC20Token is
DummyERC20Token
{
constructor (
string memory _name,
string memory _symbol,
uint256 _decimals,
uint256 _totalSupply
)
public
DummyERC20Token(
_name,
_symbol,
_decimals,
_totalSupply
)
{}

/// @dev send `value` token to `to` from `from` on the condition it is approved by `from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
function transferFrom(
address _from,
address _to,
uint256 _value
)
external
returns (bool)
{
require(
false,
"TRANSFER_DISABLED"
);
}
}

9 changes: 9 additions & 0 deletions packages/abi-gen-wrappers/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "4.2.0",
"changes": [
{
"note": "Added IAssetProxy wrapper",
"pr": 1714
}
]
},
{
"version": "4.1.0",
"changes": [
Expand Down
2 changes: 1 addition & 1 deletion packages/abi-gen-wrappers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers"
},
"config": {
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken|Coordinator|CoordinatorRegistry).json"
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IAssetProxy|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken|Coordinator|CoordinatorRegistry).json"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit f9921d2

Please sign in to comment.