82 Commits

Author SHA1 Message Date
Jacob Evans
42dc112a13
RevertError: Decode Parity revert errors 2019-11-15 19:39:06 +10:00
Amir Bandeali
ae75aed55e Change verifyingContractAddress -> verifyingContract everywhere 2019-09-23 16:00:37 -07:00
Lawrence Forman
b07fc95c81 @0x/utils: Add docstring for raw constructor parameter in RevertError.
`@0x/utils`: Use `...is.instanceof()` pattern in `RevertError` tests.
2019-09-04 20:18:55 -04:00
Lawrence Forman
f724212fd7 @0x/utils: Prettier. 2019-09-04 20:18:55 -04:00
Lawrence Forman
0542c70d22 @0x/utils: Make decoding of unknown selectors to RawRevertError optional. 2019-09-04 20:16:44 -04:00
Lawrence Forman
2cf74a7a96 @0x/utils: Make RevertError.decode() return a RawRevertError if the selector is unknown. 2019-09-04 20:15:16 -04:00
Lawrence Forman
fb38867e78 Ran prettier 2019-08-21 10:59:34 -04:00
Lawrence Forman
a3f6160898 @0x/utils: Allow for array types in RevertError types. 2019-08-21 10:59:34 -04:00
Alex Towle
22c8a25a26 Merge branch 'development' into 3.0 2019-08-19 11:13:21 -07:00
Greg Hysen
7eb2d290d8 Ran prettier 2019-08-01 20:25:19 +02:00
Greg Hysen
da28a542c7 Added abi encoder test when bad selector is passed to method decoding 2019-08-01 19:07:12 +02:00
Greg Hysen
0d4dd5ff0d Appeased the linter 2019-08-01 19:05:22 +02:00
Greg Hysen
f97ee80955 Added tests for strict decoding of method arguments 2019-08-01 19:00:50 +02:00
Greg Hysen
547322ae63 Do not allow allow reading beyond calldata 2019-08-01 19:00:50 +02:00
Lawrence Forman
eaa4373a18 @0x/utils: Tweak RevertError to produce a meaningful Error message/stack trace.
`@0x/utils`: Add more `RevertError` decoding/transforming functions (such as `decodeThrownErrorAsRevertError()`)
2019-07-23 15:27:39 -07:00
Lawrence Forman
633c5d5938 In @0x/utils add encode() method to RevertError 2019-07-23 15:17:56 -07:00
Lawrence Forman
703a0fde3c In @0x/utils: Add AnyRevertError type that matches with any revert error 2019-07-23 15:17:28 -07:00
Lawrence Forman
6231724f49 Rename RichRevertReason to RevertError.
Rename `StandardError` to `StringRevertError`.
Rename `RichRevertAbi` to `RevertErrorAbi`.
Make `RevertError` extend `Error` so it can be thrown.
Add `RevertError` tests.
2019-07-23 15:15:17 -07:00
Lawrence Forman
dc9a26ae8a Update packages/utils tests to conform to new domain schema 2019-07-23 15:04:46 -07:00
Lawrence Forman
3688956ee5 Switch eip712 domain field verifyingContract to verifyingContractAddress 2019-07-23 15:04:46 -07:00
Lawrence Forman
2d28fde24d Migrate all contract-related tooling and tests to accept a chain ID in domain separators. 2019-07-23 14:58:00 -07:00
Greg Hysen
f3539bf448 fixed typo 2019-05-08 11:22:03 -07:00
Greg Hysen
31190f921c fixed linter errors 2019-05-07 12:34:05 -07:00
Greg Hysen
a099d970a4 Fixes Issue #1723: ABI-Encoded strings can have incorrect length header (multibyte characters) 2019-05-07 11:52:14 -07:00
Greg Hysen
500b4940a3 Improvements and conventions in utils package + abi decoder 2019-02-08 17:12:54 -08:00
Greg Hysen
c72e3667b8 ran prettier and linter 2019-02-08 16:25:30 -08:00
Greg Hysen
6406126ae3 Merged tx decoder into AbiDecoder in utils and merged zeroex tx decoder into ContractWrappers. 2019-02-08 16:25:30 -08:00
Greg Hysen
831a628379 ran linter 2019-02-08 16:25:30 -08:00
Greg Hysen
3d2babd059 Tests for transaction decoder 2019-02-08 16:25:30 -08:00
Greg Hysen
d9c4c74a56 Added tests for ZeroExTransactionDecoder 2019-02-08 16:25:30 -08:00
Greg Hysen
5a231fb057 Prep for txData decoder tests 2019-02-08 16:25:30 -08:00
Greg Hysen
436d87da98 Ran prettier and linter 2019-02-08 16:25:30 -08:00
Greg Hysen
896874fb99 separated tx decode classes and types into separate files 2019-02-08 16:25:30 -08:00
Greg Hysen
a9f8e80b1c Abstractd out ZeroExTransactionDecoder 2019-02-08 16:25:30 -08:00
Greg Hysen
f93cd1bb48 Can query decoder by contract address / network id OR contract name 2019-02-08 16:25:30 -08:00
Greg Hysen
100840b743 Utility function to decode arbitrary 0x calldata 2019-02-08 16:25:30 -08:00
Greg Hysen
eb5f7e36e9 Signature parsing tests 2019-02-07 15:00:07 -08:00
Greg Hysen
3d7a635543 Added NULL decoding tests for return values 2019-02-05 21:33:07 -08:00
Greg Hysen
2ad6bd3945 Test cases for handling NULL input for all data types 2019-02-05 18:01:38 -08:00
Greg Hysen
db900d180c Decode NULL as false 2019-02-04 16:32:14 -08:00
Leonid Logvinov
2cca2d70d7
Add a throw reason in tests 2019-01-15 16:25:26 +01:00
Greg Hysen
cf2dee60dc Ran prettier 2019-01-14 10:49:44 -08:00
Greg Hysen
0b87aec9c6 Renamed decode rule structsAsObjects to shouldConvertStructsToObjects 2019-01-14 10:49:44 -08:00
Greg Hysen
86caa4a0bb Ran prettier and linter 2019-01-14 10:49:44 -08:00
Greg Hysen
0b6c9c8468 Ran prettier 2019-01-14 10:49:44 -08:00
Greg Hysen
b06f8239e1 Finished porting new abi encoder to contracts 2019-01-14 10:49:44 -08:00
Greg Hysen
7991de9ed0 Generalized create for signature / dataItems. Cleaner. 2019-01-14 10:49:44 -08:00
Greg Hysen
e9a82905e3 Abi Encoder tests fixed + added a signature parser for cases where MethodAbi/DataItems are not readily available 2019-01-14 10:49:44 -08:00
Amir Bandeali
c6ff77bdd8 Add prefix to names of properties in EncodingRules and DecodingRules 2019-01-07 10:31:11 -08:00
kao
f14603ca4d Implement prefer-template tslint rule 2018-12-07 17:06:52 -08:00