Files
protocol/contracts/zero-ex/tsconfig.json
mzhu25 c1177416f5 [Final] ERC721 and ERC1155 Orders (#429)
* add LibERC721Order.sol

* Add ERC721 interface to vendor/

* Add ERC721OrdersFeature interface

* Storage lib for ERC721 orders feature

* Implement basic functionality for ERC721 orders (buy, sell, cancel, etc)

* Add isValidERC721OrderSignature to interface

* implement onERC721Received

* Implement batchBuyERC721s

* left/right orders -> sell/buy orders

* Add missing @return comments

* Implement matching functions

* Use SafeMath where necessary

* add rich errors for ERC721OrdersFeature

* Add comments

* Add presign support for ERC721 orders

* Cancel using just the order nonce

* Add IERC721OrdersFeature to IZeroEx

* Add taker callback

* Assembly optimizations in LibERC721Order

* Add ERC721Orders TS class

* create zero-ex/contracts/test/integration/ and tokens/ directories

* TestMintableERC721Token

* tmp

* address feedback from original PR (#391)

* address feedback from original PR

* Update contracts/zero-ex/contracts/src/features/ERC721OrdersFeature.sol

Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>

* address review feedback and improve order parameter naming

* Add batchCancel function

* Emit order fields in preSign

* Fix tests

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>

* Remove revertIfIncomplete from batchMatch

* Sanity check maker address in preSign

* ERC1155OrdersFeature contracts

* Commence refactor, abstract base contract

* ERC721OrdersFeature inherits from NFTOrders

* Refactor ERC1155OrdersFeature to inherit from NFTOrders

* Fix order hashing

* Fix ERC721OrdersFeature tests

* Typos

* Remove maker address from preSigned mapping

* disable dex sampler tests

* Refactor TS tooling

* Address PR feedback

* Rearrange event fields to better align with struct fields

* Update comments

* update AbiEncoder.create params

* Add ERC1155Order to protocol-utils

* Add ERC1155OrdersFeeature tests

* Bump package versions and regenerate contract wrappers

* Add ERC165Feature

* NFT orders: address audit findings (#417)

* CVF-1: use pragma solidity ^0.6 instead of ^0.6.5

* CVF-11: fix inaccurate comment

* CVF-16: Enable taker callbacks for batchBuyERC1155s

* CVF-17: use internal call if revertIfIncomplete is true

* CVF-21: avoid duplicate SLOAD

* CVF-23: merge if statements

* CVF-24: Reorder status checks to be consistent with ERC721OrdersFeature

* CVF-25: Update unclear comment (canonical hash -> EIP-712 hash)

* CVF-31: Document keys of orderState mapping

* CVF-45: DRY up fees/properties hashing

* CVF-47, CVF-50, CVF-57: calculate properties.length once; hash propertyStructHashArray in-place using assembly

* CVF-56: More descriptive names for assembly variables

* CVF-71: Update confusing comment about rounding in _payFees

* CVF-72: Move ETH assertions outside of loop in _payFees

* CVF-74: Move property validation loop to else branch

* CVF-82: Update inaccurate comment

* CVF-86: Enable taker callbacks for batchBuyERC721s

* CVF-87: use internal call if revertIfIncomplete is true

* CVF-89: Perform token mismatch checks before stateful operations

* CVF-90, CVF-91: Defer ERC20 token mismatch check

* CVF-93: Add inline comments for _payFees parameters in matchERC721Orders

* CVF-94: Fix comment (Step 7 -> Step 5)

* CVF-98: Use binary & operator instead of mod

* CVF-99: Update unclear comment (canonical hash -> EIP-712 hash)

* CVF-65, CVF-66, CVF-67: Copy params.ethAvailable into local variable; check that ethSpent does not exceed ethAvailable; remove ethAvailable < erc20FillAmount check

* CVF-52, CVF-55, CVF-59: calculate fees.length once; hash feeStructHashArray in-place using assembly

* CVF-14, CVF-32: OrderState struct; separate storage mapping for 1155 cancellations so orders can be cancelled by nonce

* Update changelogs, IZeroEx artifact/wrapper

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
2022-02-22 10:00:22 -08:00

236 lines
14 KiB
JSON

{
"extends": "../../tsconfig",
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*", "./scripts/**/*"],
"files": [
"generated-artifacts/AffiliateFeeTransformer.json",
"generated-artifacts/BatchFillNativeOrdersFeature.json",
"generated-artifacts/BridgeAdapter.json",
"generated-artifacts/CurveLiquidityProvider.json",
"generated-artifacts/FeeCollector.json",
"generated-artifacts/FeeCollectorController.json",
"generated-artifacts/FillQuoteTransformer.json",
"generated-artifacts/FullMigration.json",
"generated-artifacts/IBatchFillNativeOrdersFeature.json",
"generated-artifacts/IERC20Transformer.json",
"generated-artifacts/IFlashWallet.json",
"generated-artifacts/ILiquidityProviderFeature.json",
"generated-artifacts/IMultiplexFeature.json",
"generated-artifacts/INativeOrdersFeature.json",
"generated-artifacts/IOtcOrdersFeature.json",
"generated-artifacts/IOwnableFeature.json",
"generated-artifacts/ISimpleFunctionRegistryFeature.json",
"generated-artifacts/ITransformERC20Feature.json",
"generated-artifacts/IZeroEx.json",
"generated-artifacts/InitialMigration.json",
"generated-artifacts/LiquidityProviderFeature.json",
"generated-artifacts/LogMetadataTransformer.json",
"generated-artifacts/MetaTransactionsFeature.json",
"generated-artifacts/MultiplexFeature.json",
"generated-artifacts/NativeOrdersFeature.json",
"generated-artifacts/OtcOrdersFeature.json",
"generated-artifacts/OwnableFeature.json",
"generated-artifacts/PayTakerTransformer.json",
"generated-artifacts/PositiveSlippageFeeTransformer.json",
"generated-artifacts/SimpleFunctionRegistryFeature.json",
"generated-artifacts/TransformERC20Feature.json",
"generated-artifacts/WethTransformer.json",
"generated-artifacts/ZeroEx.json",
"test/generated-artifacts/AffiliateFeeTransformer.json",
"test/generated-artifacts/BatchFillNativeOrdersFeature.json",
"test/generated-artifacts/BootstrapFeature.json",
"test/generated-artifacts/BridgeAdapter.json",
"test/generated-artifacts/BridgeProtocols.json",
"test/generated-artifacts/CurveLiquidityProvider.json",
"test/generated-artifacts/ERC1155OrdersFeature.json",
"test/generated-artifacts/ERC165Feature.json",
"test/generated-artifacts/ERC721OrdersFeature.json",
"test/generated-artifacts/FeeCollector.json",
"test/generated-artifacts/FeeCollectorController.json",
"test/generated-artifacts/FillQuoteTransformer.json",
"test/generated-artifacts/FixinCommon.json",
"test/generated-artifacts/FixinEIP712.json",
"test/generated-artifacts/FixinERC1155Spender.json",
"test/generated-artifacts/FixinERC721Spender.json",
"test/generated-artifacts/FixinProtocolFees.json",
"test/generated-artifacts/FixinReentrancyGuard.json",
"test/generated-artifacts/FixinTokenSpender.json",
"test/generated-artifacts/FlashWallet.json",
"test/generated-artifacts/FullMigration.json",
"test/generated-artifacts/FundRecoveryFeature.json",
"test/generated-artifacts/IBatchFillNativeOrdersFeature.json",
"test/generated-artifacts/IBootstrapFeature.json",
"test/generated-artifacts/IBridgeAdapter.json",
"test/generated-artifacts/IERC1155OrdersFeature.json",
"test/generated-artifacts/IERC1155Token.json",
"test/generated-artifacts/IERC165Feature.json",
"test/generated-artifacts/IERC20Bridge.json",
"test/generated-artifacts/IERC20Transformer.json",
"test/generated-artifacts/IERC721OrdersFeature.json",
"test/generated-artifacts/IERC721Token.json",
"test/generated-artifacts/IFeature.json",
"test/generated-artifacts/IFeeRecipient.json",
"test/generated-artifacts/IFlashWallet.json",
"test/generated-artifacts/IFundRecoveryFeature.json",
"test/generated-artifacts/ILiquidityProvider.json",
"test/generated-artifacts/ILiquidityProviderFeature.json",
"test/generated-artifacts/ILiquidityProviderSandbox.json",
"test/generated-artifacts/IMetaTransactionsFeature.json",
"test/generated-artifacts/IMooniswapPool.json",
"test/generated-artifacts/IMultiplexFeature.json",
"test/generated-artifacts/INativeOrdersEvents.json",
"test/generated-artifacts/INativeOrdersFeature.json",
"test/generated-artifacts/IOtcOrdersFeature.json",
"test/generated-artifacts/IOwnableFeature.json",
"test/generated-artifacts/IPancakeSwapFeature.json",
"test/generated-artifacts/IPropertyValidator.json",
"test/generated-artifacts/ISimpleFunctionRegistryFeature.json",
"test/generated-artifacts/IStaking.json",
"test/generated-artifacts/ITakerCallback.json",
"test/generated-artifacts/ITestSimpleFunctionRegistryFeature.json",
"test/generated-artifacts/ITokenSpenderFeature.json",
"test/generated-artifacts/ITransformERC20Feature.json",
"test/generated-artifacts/IUniswapFeature.json",
"test/generated-artifacts/IUniswapV2Pair.json",
"test/generated-artifacts/IUniswapV3Feature.json",
"test/generated-artifacts/IUniswapV3Pool.json",
"test/generated-artifacts/IZeroEx.json",
"test/generated-artifacts/InitialMigration.json",
"test/generated-artifacts/LibBootstrap.json",
"test/generated-artifacts/LibCommonRichErrors.json",
"test/generated-artifacts/LibERC1155OrdersStorage.json",
"test/generated-artifacts/LibERC20Transformer.json",
"test/generated-artifacts/LibERC721OrdersStorage.json",
"test/generated-artifacts/LibFeeCollector.json",
"test/generated-artifacts/LibLiquidityProviderRichErrors.json",
"test/generated-artifacts/LibMetaTransactionsRichErrors.json",
"test/generated-artifacts/LibMetaTransactionsStorage.json",
"test/generated-artifacts/LibMigrate.json",
"test/generated-artifacts/LibNFTOrder.json",
"test/generated-artifacts/LibNFTOrdersRichErrors.json",
"test/generated-artifacts/LibNativeOrder.json",
"test/generated-artifacts/LibNativeOrdersRichErrors.json",
"test/generated-artifacts/LibNativeOrdersStorage.json",
"test/generated-artifacts/LibOtcOrdersStorage.json",
"test/generated-artifacts/LibOwnableRichErrors.json",
"test/generated-artifacts/LibOwnableStorage.json",
"test/generated-artifacts/LibProxyRichErrors.json",
"test/generated-artifacts/LibProxyStorage.json",
"test/generated-artifacts/LibReentrancyGuardStorage.json",
"test/generated-artifacts/LibSignature.json",
"test/generated-artifacts/LibSignatureRichErrors.json",
"test/generated-artifacts/LibSimpleFunctionRegistryRichErrors.json",
"test/generated-artifacts/LibSimpleFunctionRegistryStorage.json",
"test/generated-artifacts/LibStorage.json",
"test/generated-artifacts/LibTransformERC20RichErrors.json",
"test/generated-artifacts/LibTransformERC20Storage.json",
"test/generated-artifacts/LibWalletRichErrors.json",
"test/generated-artifacts/LiquidityProviderFeature.json",
"test/generated-artifacts/LiquidityProviderSandbox.json",
"test/generated-artifacts/LogMetadataTransformer.json",
"test/generated-artifacts/MetaTransactionsFeature.json",
"test/generated-artifacts/MixinAaveV2.json",
"test/generated-artifacts/MixinBalancer.json",
"test/generated-artifacts/MixinBalancerV2.json",
"test/generated-artifacts/MixinBancor.json",
"test/generated-artifacts/MixinCoFiX.json",
"test/generated-artifacts/MixinCompound.json",
"test/generated-artifacts/MixinCryptoCom.json",
"test/generated-artifacts/MixinCurve.json",
"test/generated-artifacts/MixinCurveV2.json",
"test/generated-artifacts/MixinDodo.json",
"test/generated-artifacts/MixinDodoV2.json",
"test/generated-artifacts/MixinKyber.json",
"test/generated-artifacts/MixinKyberDmm.json",
"test/generated-artifacts/MixinLido.json",
"test/generated-artifacts/MixinMStable.json",
"test/generated-artifacts/MixinMakerPSM.json",
"test/generated-artifacts/MixinMooniswap.json",
"test/generated-artifacts/MixinNerve.json",
"test/generated-artifacts/MixinOasis.json",
"test/generated-artifacts/MixinShell.json",
"test/generated-artifacts/MixinUniswap.json",
"test/generated-artifacts/MixinUniswapV2.json",
"test/generated-artifacts/MixinUniswapV3.json",
"test/generated-artifacts/MixinZeroExBridge.json",
"test/generated-artifacts/MooniswapLiquidityProvider.json",
"test/generated-artifacts/MultiplexFeature.json",
"test/generated-artifacts/MultiplexLiquidityProvider.json",
"test/generated-artifacts/MultiplexOtc.json",
"test/generated-artifacts/MultiplexRfq.json",
"test/generated-artifacts/MultiplexTransformERC20.json",
"test/generated-artifacts/MultiplexUniswapV2.json",
"test/generated-artifacts/MultiplexUniswapV3.json",
"test/generated-artifacts/NFTOrders.json",
"test/generated-artifacts/NativeOrdersCancellation.json",
"test/generated-artifacts/NativeOrdersFeature.json",
"test/generated-artifacts/NativeOrdersInfo.json",
"test/generated-artifacts/NativeOrdersProtocolFees.json",
"test/generated-artifacts/NativeOrdersSettlement.json",
"test/generated-artifacts/OtcOrdersFeature.json",
"test/generated-artifacts/OwnableFeature.json",
"test/generated-artifacts/PancakeSwapFeature.json",
"test/generated-artifacts/PayTakerTransformer.json",
"test/generated-artifacts/PermissionlessTransformerDeployer.json",
"test/generated-artifacts/PositiveSlippageFeeTransformer.json",
"test/generated-artifacts/SimpleFunctionRegistryFeature.json",
"test/generated-artifacts/TestBridge.json",
"test/generated-artifacts/TestCallTarget.json",
"test/generated-artifacts/TestCurve.json",
"test/generated-artifacts/TestDelegateCaller.json",
"test/generated-artifacts/TestFeeCollectorController.json",
"test/generated-artifacts/TestFeeRecipient.json",
"test/generated-artifacts/TestFillQuoteTransformerBridge.json",
"test/generated-artifacts/TestFillQuoteTransformerExchange.json",
"test/generated-artifacts/TestFillQuoteTransformerHost.json",
"test/generated-artifacts/TestFixinProtocolFees.json",
"test/generated-artifacts/TestFixinTokenSpender.json",
"test/generated-artifacts/TestFullMigration.json",
"test/generated-artifacts/TestInitialMigration.json",
"test/generated-artifacts/TestLibNativeOrder.json",
"test/generated-artifacts/TestLibSignature.json",
"test/generated-artifacts/TestLiquidityProvider.json",
"test/generated-artifacts/TestMetaTransactionsNativeOrdersFeature.json",
"test/generated-artifacts/TestMetaTransactionsTransformERC20Feature.json",
"test/generated-artifacts/TestMigrator.json",
"test/generated-artifacts/TestMintTokenERC20Transformer.json",
"test/generated-artifacts/TestMintableERC1155Token.json",
"test/generated-artifacts/TestMintableERC20Token.json",
"test/generated-artifacts/TestMintableERC721Token.json",
"test/generated-artifacts/TestMooniswap.json",
"test/generated-artifacts/TestNFTOrderPresigner.json",
"test/generated-artifacts/TestNativeOrdersFeature.json",
"test/generated-artifacts/TestNoEthRecipient.json",
"test/generated-artifacts/TestOrderSignerRegistryWithContractWallet.json",
"test/generated-artifacts/TestPermissionlessTransformerDeployerSuicidal.json",
"test/generated-artifacts/TestPermissionlessTransformerDeployerTransformer.json",
"test/generated-artifacts/TestPropertyValidator.json",
"test/generated-artifacts/TestRfqOriginRegistration.json",
"test/generated-artifacts/TestSimpleFunctionRegistryFeatureImpl1.json",
"test/generated-artifacts/TestSimpleFunctionRegistryFeatureImpl2.json",
"test/generated-artifacts/TestStaking.json",
"test/generated-artifacts/TestTokenSpenderERC20Token.json",
"test/generated-artifacts/TestTransformERC20.json",
"test/generated-artifacts/TestTransformerBase.json",
"test/generated-artifacts/TestTransformerDeployerTransformer.json",
"test/generated-artifacts/TestTransformerHost.json",
"test/generated-artifacts/TestUniswapV2Factory.json",
"test/generated-artifacts/TestUniswapV2Pool.json",
"test/generated-artifacts/TestUniswapV3Factory.json",
"test/generated-artifacts/TestUniswapV3Feature.json",
"test/generated-artifacts/TestUniswapV3Pool.json",
"test/generated-artifacts/TestWeth.json",
"test/generated-artifacts/TestWethTransformerHost.json",
"test/generated-artifacts/TestZeroExFeature.json",
"test/generated-artifacts/TransformERC20Feature.json",
"test/generated-artifacts/Transformer.json",
"test/generated-artifacts/TransformerDeployer.json",
"test/generated-artifacts/UniswapFeature.json",
"test/generated-artifacts/UniswapV3Feature.json",
"test/generated-artifacts/WethTransformer.json",
"test/generated-artifacts/ZeroEx.json",
"test/generated-artifacts/ZeroExOptimized.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}