74 Commits

Author SHA1 Message Date
Fabio Berger
83747934ad Fix linter 2018-07-18 12:11:11 +02:00
Fabio Berger
25160d7344 Move encodeUint256 & decodeUint256 out of assetDataUtils since we don't want them exported 2018-07-18 11:32:01 +02:00
Fabio Berger
f8dbf57582 Rename assetProxyUtils to assetDataUtils 2018-07-17 15:26:55 +02:00
Alex Browne
5b64b3ea93
Improve robustness of revert reason assertions 2018-07-02 18:57:33 -07:00
Amir Bandeali
2fcc36bbad Update file structure 2018-06-29 18:05:40 -07:00
Fabio Berger
27670f4da6 Rename RevertReasons to RevertReason since singular enum names are more common 2018-06-26 08:11:14 +02:00
Fabio Berger
f811c07454 Move RevertReasons to @0xproject/types package 2018-06-25 12:59:26 +02:00
Fabio Berger
df79fb19af Merge branch 'v2-prototype' into refactor/check-revert-reasons
* v2-prototype: (48 commits)
  Fix typos in comments
  Add modifier and tests for removeAuthorizedAddressAtIndex
  Update and add tests
  Change removeAuthorizedAddress => removeAuthorizedAddressAtIndex
  Move isFunctionRemoveAuthorizedAddress to test
  Fix usage of `popLastByte`
  Fix LibBytes is a library
  Remove `areBytesEqual`
  Fix usage of `contentAddress()`
  Clean low bits in bytes4
  Clean high bits in address
  Refactor LibBytes.readBytes4 for consistency
  Fix LibBytes.equals
  Add trailing garbage testcase for LibBytes.equals
  Rename bytes.equals
  Add slice and sliceDestructive
  Rename bytes.rawAddress and add bytes.contentAddress
  Rename read/writeBytesWithLength
  Using LibBytes for bytes
  Make LibBytes a library
  ...

# Conflicts:
#	packages/contracts/src/contracts/current/utils/Ownable/Ownable.sol
#	packages/contracts/test/libraries/lib_bytes.ts
2018-06-25 11:45:17 +02:00
Amir Bandeali
8ddcb6c841 Update and add tests 2018-06-23 13:53:39 +02:00
Remco Bloemen
943e556f43 Refactor LibBytes.readBytes4 for consistency 2018-06-23 13:53:38 +02:00
Remco Bloemen
384cd2f605 Add trailing garbage testcase for LibBytes.equals 2018-06-23 13:53:38 +02:00
Remco Bloemen
425af46f98 Rename bytes.equals 2018-06-23 13:53:38 +02:00
Remco Bloemen
88982f98ff Rename read/writeBytesWithLength 2018-06-23 13:53:38 +02:00
Remco Bloemen
7f84049538 Merge LibMem and LibBytes 2018-06-23 13:53:38 +02:00
Remco Bloemen
98840c9c5f Use provided mem in refernce memcpy 2018-06-23 13:53:38 +02:00
Fabio Berger
1e03fbe1a8 Fix prettier 2018-06-22 18:50:02 +02:00
Fabio Berger
4409f11b24 Rename ContractLibErrors to RevertReasons 2018-06-22 18:45:45 +02:00
Fabio Berger
0e7c254b93 Move constants over to ContractLibError enum and update all tests 2018-06-22 18:36:15 +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
764b1c35cb Add tests for deepCopyBytes and missing write methods from LibBytes 2018-06-12 11:45:02 -07:00
Fabio Berger
e1879ef4d9 Fix no-unused-variable tslint rule to include parameters and fix issues 2018-06-11 23:42:30 +02: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
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
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
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
8496c1cdd3 Call safeTransferFrom only when there is receiver data present 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
5db15ca54c proxyData -> assetData 2018-06-07 15:38:48 -07:00
Remco Bloemen
63014aeb6b Add tests for word loop iteration 2018-06-07 15:38:48 -07:00
Remco Bloemen
31e21db5b5 Add test for zero-size overlap 2018-06-07 15:38:48 -07:00
Remco Bloemen
7f21872510 Add test cases 2018-06-07 15:38:47 -07:00
Remco Bloemen
27351c9a90 Cleanup test script 2018-06-07 15:38:47 -07:00
Remco Bloemen
76b918d40e Convert Solidity tests to vectors 2018-06-07 15:38:47 -07:00
Remco Bloemen
f5bc0b205c Generate tests from vectors 2018-06-07 15:38:47 -07:00
Greg Hysen
b3c253ea2a Tests for writing bytes to nested bytes 2018-06-07 15:38:47 -07:00
Greg Hysen
842363200b Tons of tests around nested byte arrays and ERC721 receiver 2018-06-07 15:38:42 -07:00
Greg Hysen
9b82e2df58 Foundation for TestLibAssetProxyDecoder 2018-06-07 15:36:18 -07:00
Greg Hysen
3d65341080 Tests for libMem 2018-06-07 15:36:18 -07:00
Fabio Berger
18ed45597a Fix tslint issues 2018-06-07 18:58:51 +02:00
Fabio Berger
73429fc720 merge v2-prototype 2018-06-07 12:27:03 +02:00
fragosti
e0d5b9daf8 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting 2018-06-06 16:36:11 -07:00
Alex Browne
167a38e27d
Add Async suffix to relevant assertions 2018-06-06 12:41:14 -07:00
Alex Browne
d6d7f4e875
Update more things to work with both Geth and Ganache 2018-06-06 12:40:31 -07:00
Alex Browne
98ffe9931d
Get LibBytes tests working on both Ganache and Geth 2018-06-06 12:40:30 -07:00
Alex Browne
31c98fc0db
Update some tests after rebase 2018-06-06 12:39:43 -07:00