68 Commits

Author SHA1 Message Date
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
Greg Hysen
d6645b8a91 Explicit encoding rules in tests. 2018-11-28 16:38:11 -08:00
Greg Hysen
f196dc9e35 Use ethUti.isValidAddress in encoder 2018-11-28 16:38:11 -08:00
Greg Hysen
2e79ce26cb Tests use to.be.deep.equal instead of JSON 2018-11-28 16:38:11 -08:00
Greg Hysen
acd364b71c Comments and inline documentation for dynamic bytes 2018-11-28 16:38:11 -08:00
Greg Hysen
5a748fb4e5 Split ABI Encoder/Decoder tests into separate files 2018-11-28 16:38:11 -08:00
Greg Hysen
5934e5a57b Renaming some EVM data types for clarity 2018-11-28 16:38:11 -08:00
Greg Hysen
62e6b22789 Fixed linter errors on tests 2018-11-28 16:38:11 -08:00
Greg Hysen
fbbca8e283 Ran prettier on utils 2018-11-28 16:38:11 -08:00
Greg Hysen
b0ebc6fa14 Tests for decoding return values + Ability to encode return values 2018-11-28 16:38:11 -08:00
Greg Hysen
6daa79ec12 Arrays nested in tuples 2018-11-28 16:38:10 -08:00
Greg Hysen
acd570b2b3 Multidimensional Array tests 2018-11-28 16:38:10 -08:00
Greg Hysen
0d65c9da4a Optimizer Tests 2018-11-28 16:38:10 -08:00
Greg Hysen
67dd062a2f Cleaning up optimizer tests 2018-11-28 16:38:10 -08:00
Greg Hysen
b213cb3974 Temporary change for testing functions 2018-11-28 16:38:10 -08:00