Skip to content

Commit

Permalink
@0x/contracts-zero-ex: Remove tokenspender/allowance target/greedy …
Browse files Browse the repository at this point in the history
…tokens stuff.'

`@0x/contract-addresses`: Add BSC addresses. Remove exchangeProxyAllowanceTarget.
`@0x/migrations`: Remove exchangeProxyAllowanceTarget.
  • Loading branch information
dorothy-zbornak committed Mar 3, 2021
1 parent eeea8c2 commit b754774
Show file tree
Hide file tree
Showing 38 changed files with 108 additions and 1,025 deletions.
6 changes: 5 additions & 1 deletion contracts/zero-ex/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
{
"note": "Add PancakeSwapFeature",
"pr": 164
},
{
"note": "Remove TokenSpender/AllowanceTarget/greedy tokens stuff",
"pr": 164
}
]
}
},
{
"version": "0.20.0",
"changes": [
Expand Down
2 changes: 0 additions & 2 deletions contracts/zero-ex/contracts/src/IZeroEx.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pragma experimental ABIEncoderV2;

import "./features/IOwnableFeature.sol";
import "./features/ISimpleFunctionRegistryFeature.sol";
import "./features/ITokenSpenderFeature.sol";
import "./features/ITransformERC20Feature.sol";
import "./features/IMetaTransactionsFeature.sol";
import "./features/IUniswapFeature.sol";
Expand All @@ -34,7 +33,6 @@ import "./features/INativeOrdersFeature.sol";
interface IZeroEx is
IOwnableFeature,
ISimpleFunctionRegistryFeature,
ITokenSpenderFeature,
ITransformERC20Feature,
IMetaTransactionsFeature,
IUniswapFeature,
Expand Down
47 changes: 0 additions & 47 deletions contracts/zero-ex/contracts/src/errors/LibSpenderRichErrors.sol

This file was deleted.

56 changes: 0 additions & 56 deletions contracts/zero-ex/contracts/src/external/AllowanceTarget.sol

This file was deleted.

56 changes: 0 additions & 56 deletions contracts/zero-ex/contracts/src/features/ITokenSpenderFeature.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ contract LiquidityProviderFeature is
/// @dev The sandbox contract address.
ILiquidityProviderSandbox public immutable sandbox;

constructor(LiquidityProviderSandbox sandbox_, bytes32 greedyTokensBloomFilter)
constructor(LiquidityProviderSandbox sandbox_)
public
FixinCommon()
FixinTokenSpender(greedyTokensBloomFilter)
{
sandbox = sandbox_;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ contract MetaTransactionsFeature is
}
}

constructor(address zeroExAddress, bytes32 greedyTokensBloomFilter)
constructor(address zeroExAddress)
public
FixinCommon()
FixinEIP712(zeroExAddress)
FixinTokenSpender(greedyTokensBloomFilter)
{
// solhint-disable-next-line no-empty-blocks
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,11 @@ contract NativeOrdersFeature is
IEtherTokenV06 weth,
IStaking staking,
FeeCollectorController feeCollectorController,
uint32 protocolFeeMultiplier,
bytes32 greedyTokensBloomFilter
uint32 protocolFeeMultiplier
)
public
FixinEIP712(zeroExAddress)
FixinProtocolFees(weth, staking, feeCollectorController, protocolFeeMultiplier)
FixinTokenSpender(greedyTokensBloomFilter)
{
// solhint-disable no-empty-blocks
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ contract PancakeSwapFeature is
0xC00,
// Copy only the first 32 bytes of return data. We
// only care about reading a boolean in the success
// case, and we discard the return data in the
// failure case.
// case. We will use returndatacopy() in the failure case.
0x20
)

Expand All @@ -392,6 +391,12 @@ contract PancakeSwapFeature is
)
)
)

if iszero(success) {
// Revert with the data returned from the transferFrom call.
returndatacopy(0, 0, rdsize)
revert(0, rdsize)
}
}
}

Expand Down
137 changes: 0 additions & 137 deletions contracts/zero-ex/contracts/src/features/TokenSpenderFeature.sol

This file was deleted.

Loading

0 comments on commit b754774

Please sign in to comment.