39 Commits

Author SHA1 Message Date
Elena
c4b1f043c6
Remove obsoleted code from 0x/contracts-utils (#643)
* Remove TestAuthorizable

* Remove contracts/utils Authorizable and IAuthorizable

* Remove contracts/utils D18 contract

* Remove contracts/utils LibAddress contracts

* Remove contracts/utils LogDecoding contracts

* Remove contracts/utils Refundable contracts

* Remove contracts/utils LibAuthorizableRichErrors contracts

* Remove contracts/utils EIP712 contracts

* Remove contracts/utils TestRefundableReceiver contracts

* Remove contracts/utils EIP1271 contracts

* Remove contracts/utils ReentrancyGuardV06 contracts

* Remove contracts/utils LibMath contracts

* Remove contracts/utils LibFractions contracts

* Remove contracts/utils LibMathRichErrors contracts

* Remove DeploymentConstants as per PR review
https://github.com/0xProject/protocol/pull/643#pullrequestreview-1264963784
2023-02-06 19:35:39 +02:00
Jacob Evans
68656b4a4d
chore: Prune old contracts (#304)
Prune exchange-libs
deploy migrations at specific address
remove exchange-libs, moving LibMath into Utils
Remove staking order-utils multisig and remaining asset-proxy
2021-08-18 10:33:47 +10:00
Jacob Evans
ad8caa2b51
Remove moved RevertErrors 2019-11-27 11:52:14 +11:00
fabioberger
e1ea65525f Add doc generation to several more packages and fix up their index.ts files so all public interface types are exported 2019-11-18 10:29:25 +00:00
F. Eugene Aumson
f11d8a5bd8
@0x/order-utils refactors for v3: orderParsingUtils, signatureUtils, orderHashUtils, RevertErrors, transactionHashUtils (#2321)
* move orderParsingUtils from order-utils to connect

* Remove many functions from signatureUtils

Removed from the exported object, that is.  All of them are used in
other existing code, so they were all moved to be as local to their
usage as possible.

* remove orderHashUtils.isValidOrderHash()

* Move all *RevertErrors from order-utils...

...into their respective @0x/contracts- packages.

* Refactor @0x/order-utils' orderHashUtils away

- Move existing routines into @0x/contracts-test-utils

- Migrate non-contract-test callers to a newly-exposed getOrderHash()
method in DevUtils.

* Move all *RevertErrors from @0x/utils...

...into their respective @0x/contracts- packages.

* rm transactionHashUtils.isValidTransactionHash()

* DevUtils.sol: Fail yarn test if too big to deploy

* Refactor @0x/order-utils transactionHashUtils away

- Move existing routines into @0x/contracts-test-utils

- Migrate non-contract-test callers to a newly-exposed
getTransactionHash() method in DevUtils.

* Consolidate `Removed export...` CHANGELOG entries

* Rm EthBalanceChecker from devutils wrapper exports

* Stop importing from '.' or '.../src'

* fix builds

* fix prettier; dangling promise

* increase max bundle size
2019-11-14 17:14:24 -05:00
fabioberger
86b76a3e75 Introduce publicFacingContracts config in all package.jsons, refactor all imports from src in contracts packages 2019-11-11 15:10:15 +00:00
Alex Towle
41d99e77c7 @0x:contracts-utils Removed SafeMath and the use of the contract throughout contracts/ 2019-10-15 14:31:48 -07:00
Greg Hysen
c0cb78bb3f Improving readability of staking 2019-09-05 11:46:50 -07:00
Alex Towle
05eb646848 @0x:contracts-utils Added a Refundable contract 2019-08-28 15:01:30 -07:00
Alex Towle
365cb161cf @0x:contracts-utils Added a Refundable contract 2019-08-28 14:51:57 -07:00
Michael Zhu
078b1af04e Binop -> BinOp 2019-08-26 16:06:31 -07:00
Michael Zhu
2c15b3f9bd remove staking RevertReasons from TS types, ExchangeAlreadyRegisteredError -> ExchangeAddressAlreadyRegisteredError 2019-08-26 15:49:09 -07:00
Michael Zhu
98e5b26eb7 refactor SafeMath rich errors and use them in staking libs 2019-08-26 15:49:09 -07:00
Alex Towle
22c8a25a26 Merge branch 'development' into 3.0 2019-08-19 11:13:21 -07:00
Amir Bandeali
ccce7e001e Compile all contracts by default, regenerate boilerplate 2019-08-13 16:19:48 -07:00
Amir Bandeali
2e97cfa5e5 Remove LibAssetProxyIds and TestLibConstants 2019-08-13 16:04:33 -07:00
Lawrence Forman
6345faa4a9 `@0x/contracts-exchange-libs: Appease the linter and prettier gods. 2019-08-06 15:30:59 -04:00
Lawrence Forman
51391b7f0e @0x/contracts-exchange-libs: Correct internal variable naming in src/index.ts.
`@0x/contracts-utils`: Correct internal variable naming in `src/index.ts`.
`@0x/contracts-exchange`: Remove functions from `TestExchangeInternals.sol` that are now in other packages.
`@0x/contracts-exchange`: Remove `TestExchangeMath.sol`. Exchange math functions are now tested in `@0x/contracts-exchange-libs`.
`@0x/contracts-exchange`: Move `ReferenceFunctions` to default package export.
`@0x/contracts-exchange`: Update `match_order.ts` tests to use reference math functions instead of `TestExchangeMath`.
`@0x/contracts-exchange`: Remove `_updateFilledState()` combinatorial tests in favor of normal unit testing. Combinatorial testing was overkill.
`@0x/contracts-exchange`: Update/refactor `calculateFillResults()` combinatorial tests to use the reference functions and hide them behind `TEST_ALL`.
2019-08-06 15:30:59 -04:00
Lawrence Forman
d03f13a729 @0x/contracts-utils: LibMath._safeDiv() now throws a rich revert when dividing by zero. 2019-08-06 15:30:30 -04:00
Lawrence Forman
c30d59d5d3 @0x/types: Add FillResults, MatchedFillResults, and
`BatchMatchedFillResults` types.
`@0x/contracts-utils`: Add reference functions for `SafeMath`.
`@0x/contracts-exchange-libs`: Add reference functions for `LibMath` and
`LibFillResults`.
`@0x/contracts-test-utils`: Move `*FillResults` types to `@0x/types`.
`@0x/contracts-test-utils`: Add `log_utils.ts`.
`@0x/contracts-test-utils`: Add `hexRandom()` to `hex_utils.ts`.
`@0x/contracts-test-utils`: Add the contstants: `MAX_UINT256`,
`ADDRESS_LENGTH`.
2019-08-06 15:30:30 -04:00
Alex Towle
6fc38292f2 Add RichErrors for Authorizable 2019-08-02 13:45:41 -07:00
Alex Towle
89d8df3385 Moved MixinAuthorizable to Authorizable and fixed imports 2019-08-02 13:45:41 -07:00
Alex Towle
9c7df2b41e Reverted MixinAuthorizable to old version and moved the new version to utils 2019-08-02 13:45:41 -07:00
Alex Towle
03fced81f5 Added unit tests for LibRichErrors 2019-07-30 12:06:35 -07:00
Alex Towle
f9292a8fb8 Added unit tests for LibEIP712 2019-07-30 12:06:35 -07:00
Alex Towle
065f46a020 Added unit tests for LibAddress 2019-07-30 12:06:35 -07:00
Alex Towle
6efb7027b5 Added unit tests for ReentrancyGuard 2019-07-30 12:06:35 -07:00
Alex Towle
f4f922acb5 Added unit tests for Ownable 2019-07-30 12:06:35 -07:00
Alex Towle
4a4d2e7079 Added unit tests for SafeMath 2019-07-30 12:06:35 -07:00
Greg Hysen
365c056b0f Added tests for for decoding log arguments when artifact dependencies are included/excluded 2019-07-29 12:11:02 +02:00
James Towle
e229d2d59f Updated tests to work with LibMathRichErrors 2019-07-23 15:52:20 -07:00
Amir Bandeali
18979f3f30 Fix linting error 2019-07-23 15:21:14 -07:00
Amir Bandeali
8bd29596c4 Rename remaining inconsistencies 2019-07-23 15:21:14 -07:00
Lawrence Forman
7232bef07b Change LibRichErrors to just RichErrors.
Fix compilation issues in `exchange`.
2019-07-23 15:10:31 -07:00
Amir Bandeali
308ff15adc Refactor EIP712 libraries 2019-07-23 15:09:46 -07:00
Lawrence
b8925baa88 Add unit tests for contracts/utils/LibAddressArray.
Fix `LibAddressArray.indexOf` returning wrong index.
2019-03-20 10:19:46 -04:00
Leonid Logvinov
1a88eac9c7
Make the banner more visible 2019-02-04 13:00:15 +01:00
Leonid Logvinov
6943bbcacb
Temp 2019-02-04 10:38:02 +01:00
Leonid Logvinov
e8d0aff333
Refactor @0x/contracts-utils from @0x/contracts-core 2018-12-04 14:41:18 +01:00