Commit Graph

939 Commits

Author SHA1 Message Date
Fabio Berger
12033abe09 Rename OrderAmountScenario to OrderAssetAmountScenario and convert generateOrderCombinations to generateFillOrderCombinations 2018-06-14 12:07:57 +02:00
Fabio Berger
c232a32991 Use a defaultFillScenario in fillOrder tests 2018-06-14 11:17:13 +02:00
Fabio Berger
57f37939d5 Fix incorrect string values in enum 2018-06-14 11:16:51 +02:00
Fabio Berger
432ff58107 Fix calculation of expFilledTakerAmount and expected values in events emitted 2018-06-14 11:16:32 +02:00
Remco Bloemen
2c7d6a7711 Handle tokens that do not return bool 2018-06-14 10:54:54 +02:00
Fabio Berger
d31b051fc5 Replace initial set of legacy manually written fillOrder tests with declarative FillScenario tests 2018-06-14 10:41:04 +02:00
Fabio Berger
98405a39db Add ability to specify takerAssetFillAmount and taker scenarios as part of a FillScenario 2018-06-14 10:40:17 +02:00
Fabio Berger
45186b70ec Move orderFill combinatorialTests to exchange folder 2018-06-13 16:14:48 +02:00
Fabio Berger
b4fead9606 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (26 commits)
  Rename _coverageCollector -> _profilerCollector in TraceCollectionSubprovider
  Refactor sol-cov to de-duplicate code for coverage and profiling
  Rename popByte and popAddress
  Hard code test addresses/bytes32 instead of generating pseudorandom ones
  Update artifacts
  Rename computeCoverageAsync -> computeSingleTraceCoverageAsync
  Fix linter errors
  Refactor sol-cov to avoid keeping traceInfo in memory
  Unpop byte rather than making deep copy
  Pass gas in to marketBuyOrdersNoThrow
  Looks up the memory location of makerAssetData/takerAssetData
  Make ZRX_PROXY_ID constant rather than popping it from ZRX_ASSET_DATA
  Add tests for deepCopyBytes and missing write methods from LibBytes
  Pop id from assetData before dispatching to AssetProxies
  Upgrade solidity-parser-entlr 0.2.11 => 0.2.12
  Fix import order
  Fix typos
  Add CHANGELOGs
  Speed-up sol-cov
  Increase delay when sending transactions during devnet startup
  ...
2018-06-13 16:10:05 +02:00
Fabio Berger
61243b418e Implement initial set of orderFill combinatorial tests 2018-06-13 16:09:04 +02:00
Fabio Berger
fe75660e88 Refactor ERC20 and ERC721 wrappers for V2 and introduce the assetWrapper superset 2018-06-13 16:01:01 +02:00
Fabio Berger
78dcb87a75 Variable rename for clarity 2018-06-13 13:11:45 +02:00
Amir Bandeali
0917fa0d75 Rename popByte and popAddress 2018-06-12 15:30:46 -07:00
Amir Bandeali
cfb73dd534 Hard code test addresses/bytes32 instead of generating pseudorandom ones 2018-06-12 15:30:46 -07:00
Amir Bandeali
3a5f3e8b55 Unpop byte rather than making deep copy 2018-06-12 11:45:02 -07:00
Amir Bandeali
a0a90afbc0 Pass gas in to marketBuyOrdersNoThrow 2018-06-12 11:45:02 -07:00
Greg Hysen
2f96cb257c Looks up the memory location of makerAssetData/takerAssetData 2018-06-12 11:45:02 -07:00
Amir Bandeali
5910bec52e Make ZRX_PROXY_ID constant rather than popping it from ZRX_ASSET_DATA 2018-06-12 11:45:02 -07:00
Amir Bandeali
764b1c35cb Add tests for deepCopyBytes and missing write methods from LibBytes 2018-06-12 11:45:02 -07:00
Amir Bandeali
ee8c9b764d Pop id from assetData before dispatching to AssetProxies 2018-06-12 11:45:02 -07:00
Alex Browne
3cc30f91a9 Speedup awaitTransactionMinedAsync and reduce polling interval in contracts tests 2018-06-11 17:07:28 -07:00
Fabio Berger
7e78f5941a Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (68 commits)
  Stop exporting ArtifactWriter
  Fix no-unused-variable tslint rule to include parameters and fix issues
  Fix linter exclude rule
  Validate all signature types rather then only ECSignatures
  Store the instantiated OrderValidationUtils
  Remove global hooks from tests and deploy contracts from within the specific tests
  Add EmitStatement to ASTVisitor
  Fix tslint issues
  Add back artifacts file
  Fix a bug in SolCompilerArtifacts adapter config overriding
  Move OrderValidationUtils (+ tests) and ExchangeTransferSimulator to order-utils
  export parseECSignature method
  Export ArtifactWriter from migrations package
  Remove unused artifact file
  Pass in generated contract wrapper to orderValidationUtils at instantiation
  Refactor orderValidationUtils to use the generated contract wrapper instead of the higher-level one
  Refactor ExchangeTransferSimulator public interface to accet an AbstractBalanceAndProxyAllowanceLazyStore so that this module could be re-used in different contexts.
  Increase timeout for contract migrations
  Remove some copy-paste code
  Await transactions in migrations
  ...
2018-06-12 00:23:48 +02:00
Fabio Berger
e1879ef4d9 Fix no-unused-variable tslint rule to include parameters and fix issues 2018-06-11 23:42:30 +02:00
Remco Bloemen
82d1412d45 Simplified handling of source < 32 edge case 2018-06-11 09:19:52 +02:00
Leonid Logvinov
760bab8f86 Implement SolidityProfiler & adapt sol-cov to work with Geth 2018-06-08 14:56:45 -07:00
Greg Hysen
05fbc8e6b0 Linter changes to contracts 2018-06-08 11:43:47 -07:00
Greg Hysen
05123ea6f4 Updated LibBytes error messages 2018-06-07 16:32:42 -07:00
Jacob Evans
a8d328bfc9 Basic EIP712 encoder 2018-06-07 16:09:30 -07:00
Greg Hysen
d62ff34a5a Cleanup after last rebase 2018-06-07 15:53:30 -07:00
Greg Hysen
0d4ff5a916 Updated tests to use new revert handler 2018-06-07 15:39:40 -07:00
Greg Hysen
8ace41d144 Minor fixes after rebase 2018-06-07 15:39:40 -07:00
Greg Hysen
5bb7219f4b Camelcase in memCopy 2018-06-07 15:39:40 -07:00
Greg Hysen
f457a56d4a Style updates to contracts 2018-06-07 15:39:40 -07:00
Greg Hysen
db086de84a Union types for generalized decodeAssetData 2018-06-07 15:39:40 -07:00
Greg Hysen
37684c6af0 Fixed a styling throughout contracts. Moved closing parenthesis for long list of function parameters to next line. 2018-06-07 15:39:40 -07:00
Greg Hysen
3c75d4f1dd Removed setting makerAssetData/takerAssetData from tests where values are same as defaultOrderParams. 2018-06-07 15:39:40 -07:00
Greg Hysen
b19276bb0f Fixed merge error when rebasing wrt length variable in asset data decoders 2018-06-07 15:39:40 -07:00
Greg Hysen
774d831fae Style updates to ERC721 onReceiver 2018-06-07 15:39:40 -07:00
Greg Hysen
a1b49d8389 Fixed after rebase 2018-06-07 15:39:40 -07:00
Greg Hysen
12e2bfc794 Fixes after rebasing 2018-06-07 15:39:38 -07:00
Greg Hysen
e4e3676095 Fixed up after rebasing. Contracts build and tests pass 2018-06-07 15:38:48 -07:00
Greg Hysen
3ed13150e1 Style audit for proxies + libmem + libbytes 2018-06-07 15:38:48 -07:00
Greg Hysen
f03e5c6bd1 Style audit proxies 2018-06-07 15:38:48 -07:00
Greg Hysen
8496c1cdd3 Call safeTransferFrom only when there is receiver data present 2018-06-07 15:38:48 -07:00
Greg Hysen
3c3851c221 Fixed formatting in memory layout 2018-06-07 15:38:48 -07:00
Greg Hysen
05f1e9e3b8 Resolved edge case in Memcpy where where send would eventually turn "negative" and wrap around. 2018-06-07 15:38:48 -07:00
Greg Hysen
249a1e6d8d Removed the LibAssetProxyDecoder. Merged decode functions into the proxies. This way they can still be used by the forwarding contract. TestAssetDataDecoders inherits them in the same way the forwarding contract would 2018-06-07 15:38:48 -07:00
Greg Hysen
e042e0ad32 Converged on naming scheme for asset data: renamed all instances of assetMetadata, proxyData, proxyMetadata to assetData 2018-06-07 15:38:48 -07:00
Greg Hysen
5db15ca54c proxyData -> assetData 2018-06-07 15:38:48 -07:00
Remco Bloemen
069b89b208 Implement memcpy using masking and end-aligned words 2018-06-07 15:38:48 -07:00