140 Commits

Author SHA1 Message Date
Michael Zhu
6754cd48e2 refactor + fix lint 2019-12-09 23:45:38 -08:00
Michael Zhu
4663eec950 Add function assertions required for staking rewards fuzzing: withdrawDelegatorRewards, finalizePool, and endEpoch. Also adds payProtocolFee-related assertions to fillOrder 2019-12-09 23:45:37 -08:00
Michael Zhu
1dcbebd130 lint 2019-12-09 23:42:32 -08:00
Michael Zhu
faf306ad23 Simulation logging, hopefully address function assertion lifetime issue 2019-12-09 23:42:32 -08:00
Michael Zhu
d11cdcd5d2 Use seeded rng for simulations 2019-12-09 23:42:32 -08:00
Xianny
fcbcbac889
Remove assetDataUtils everywhere (#2373)
* remove assetDataUtils everywhere

* export IAssetDataContract from @0x/contract-wrappers to allow @0x/instant to decode asset data  synchronously

* export generic function `decodeAssetDataOrThrow` and add ERC20Bridge support

* export `hexUtils` from order-utils instead of contracts-test-utils
2019-12-04 13:08:08 -08:00
Jacob Evans
00e34758c4
Remove artifacts dep from contract-wrappers 2019-12-02 18:51:47 +11:00
Alex Towle
72cdd1ea50 @0x:contracts-integrations Removed dependence on number_utils from staking 2019-11-18 17:56:07 -08: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
Xianny
f0d7d10fe7
update abi-gen with new method interfaces (#2325)
* update abi-gen with new method interfaces

* wip: get all packages to build

* wip: get all packages to build

* Fix two contract wrapper calls

* Export necessary types part of the contract wrapper public interfaces

* Revive and fix wrapper_unit_tests

* Remove duplicate type

* Fix lib_exchange_rich_error_decoder tests

* Fix remaining test failures in contracts-* packages

* Prettier fixes

* remove transactionHelper

* lint and update changelogs

* Fix prettier

* Revert changes to reference docs

* Add back changelog already published and add revert changelog entry

* Add missing CHANGELOG entries

* Add missing comma

* Update mesh-rpc-client dep

* Update Mesh RPC logic in @0x/orderbook to v6.0.1-beta

* Align package versions
2019-11-14 11:22:29 -05:00
fabioberger
15a5bc02ef Fix remaining build issues 2019-11-11 00:13:44 +00:00
Xianny
6a852ab0ed
Replace assetDataUtils with DevUtilsContract wherever possible (#2304)
* Replace assetDataUtils with DevUtilsContract wherever possible

Does not replace from @0x/instant and some @0x/order-utils uses

* Add revertIfInvalidAssetData to LibAssetData

This is needed to replace `assetDataUtils.decodeAssetDataOrThrow`.
Because it's used in packages and not only contracts, we should wait
to deploy the updated contract so we can update `@0x/contract-artifacts`,
`@0x/abi-gen-wrappers`, and `@0x/contract-wrappers` first.

* remove usages of signatureUtils

* fix test for  optimised encoding

* refactor @0x/contracts-integrations

* update changelogs

* Move @0x/contracts-dev-utils from devDependencies to dependencies
It is exported as part of the package
2019-11-06 19:40:20 -08:00
F. Eugene Aumson
f51c80adb2
Change all instances of networkId to chainId (#2313)
* abi-gen/test: recompile contract fixtures for 3.0

It seems this hadn't been done since the merge with the 3.0 branch.

* Sync `monorepo$ yarn test` exclusions to CI config

* sra-spec: correct typo

* contract-wrappers: TODO after coord.-server update

* utils: fix typo in comment

* Refactor networkId to chainId everywhere

* Update CHANGELOGs
2019-11-06 01:18:55 -05:00
Michael Zhu
7aa88307f6 Flesh out fillOrder integration tests 2019-10-31 15:27:39 -07:00
Michael Zhu
3d56c06ff3 Move Forwarder test to integrations; update to use new framework 2019-10-29 11:26:56 -07:00
F. Eugene Aumson
0067f10a6a
@0x/utils: fix wrong RPC method in getChainIdAsync() (#2270)
It was using net_version, but it should be using the eth_chainId method
introduced in EIP-695.  I'm not sure whether/how the network ID differs
from the chain ID on mainnet and the testnets, but in Ganache in
particular, the network ID is 50 while the chain ID is 1337, and this
difference was causing problems for Python tests.  Specifically, the
Web3.py interface `Web3.eth.chainId` invokes the eth_chainId method, and
the result feeds into the order hash, which wasn't lining up with the
non-Python side of things.
2019-10-25 21:08:31 -04:00
Lawrence Forman
c7222c17ae @0x/contracts-test-utils: prettier 2019-10-25 10:55:03 -04:00
Lawrence Forman
0f237d22f9 @0x/contracts-test-utils: Refactor verifyEvents() to just use verifyEventsFromLogs(). 2019-10-25 10:55:03 -04:00
Lawrence Forman
6ee1605a77 @0x/contracts-test-utils: Add verifyEventsFromLogs(). 2019-10-25 10:54:38 -04:00
Alex Towle
01aee08c02 @0x:contracts-integrations Wrote a simple integration test and AddressManager 2019-10-22 12:01:30 -07:00
Michael Zhu
93b02e93b9 juggling some files around 2019-10-21 11:16:14 -07:00
Amir Bandeali
083216a0c6
Merge pull request #2271 from 0xProject/feat/3.0/zero-ex-governor
Rename AssetProxyOwner to ZeroExGovernor
2019-10-19 17:05:07 -07:00
Amir Bandeali
c50cbd7a75 Rename AssetProxyOwner to ZeroExGovernor throughout all contracts packages 2019-10-17 17:41:54 -07:00
Michael Zhu
cde0169733 Update BlockchainBalanceStore to not rely on erc*_wrappers + better balance equality assertions 2019-10-16 18:46:55 -07:00
fabioberger
d8605ed91d Remove ambient Mocha declaration 2019-10-03 11:42:19 +08:00
Michael Zhu
e954e9ca20 update tests 2019-09-30 21:51:34 -07:00
Lawrence Forman
2c8f7fac0e
Merge pull request #2220 from 0xProject/feat/erc20-bridge/hello-world
ERC20BridgeProxy
2019-09-30 20:52:36 -04:00
Lawrence Forman
cf8d424b9b @0x/contracts-test-utils: Add number_utils.ts and hexSize(). 2019-09-27 19:32:55 -04:00
fragosti
efd5eff22c Fix tests 2019-09-27 12:46:20 -07:00
fragosti
8ba38b9b29 Remove the OrderWithoutDomain type 2019-09-25 18:44:19 -07:00
fragosti
9870f55d24 Remove domain from Order type 2019-09-25 18:44:19 -07:00
Amir Bandeali
0bc4b50818 Add codesize tests 2019-09-24 13:36:54 -07:00
Amir Bandeali
ae75aed55e Change verifyingContractAddress -> verifyingContract everywhere 2019-09-23 16:00:37 -07:00
Lawrence Forman
2bb9b9a8f7 @0x/contracts-test-utils: Ran prettier. 2019-09-22 12:13:24 -04:00
Lawrence Forman
0270777cfc @0x/contracts-test-utils: Add hexHash() to hex_utils. 2019-09-22 12:13:24 -04:00
Lawrence Forman
b4b6d4d969 @0x/contracts-test-utils: Add shortZip(). 2019-09-22 12:11:47 -04:00
Lawrence Forman
58a5ab4550 @0x/contracts-test-utils: Allow hexSlice() to take negative numbers, and a range. 2019-09-22 12:07:11 -04:00
Amir Bandeali
f47feabb4a Update AssetProxyOwner tests 2019-09-19 13:37:59 -07:00
Amir Bandeali
bb46f184ed Remove use of generatePseudoRandomAddress in favor of randomAddress 2019-09-17 10:46:58 -07:00
Amir Bandeali
6641af2a58 Fix build 2019-09-17 08:48:14 -07:00
Alex Towle
b7f25ee3b6 @0x:contracts-staking Addressed review comments 2019-09-11 17:16:33 -07:00
Alex Towle
be83789bee @0x:contracts-staking Added unit tests for LibProxy 2019-09-11 17:15:47 -07:00
Lawrence Forman
d37679c129 @0x/contracts-test-utils: Add Numberish type. 2019-09-10 00:30:43 -04:00
Lawrence Forman
20ba23fe5f @0x/contracts-test-utils: Allow negative values in toHex().
`@0x/contracts-test-utils`: Add `PPM_DENOMINATOR` and `PPM_100_PERCENT` constants.
2019-09-04 20:18:55 -04:00
Lawrence Forman
5ccbe167a1 @0x/contracts-test-utils: Increase the number of ganache accounts to 20. 2019-09-04 20:18:55 -04:00
Lawrence Forman
0999805b3a @0x/contracts-test-utils: Add toHex(), hexInvert(), hexLeftPad(), and hexRightPad() hex utils. 2019-09-04 20:15:15 -04:00
Amir Bandeali
8231e7703e Allow unlimited contract sizes by default 2019-09-01 18:30:33 -07:00
Alex Towle
dba0d8469d @0x:contracts-exchange Addressed review feedback 2019-08-29 15:20:52 -07:00
Alex Towle
2c970a0466 @0x:contracts-exchange Added protocol fees to fill order 2019-08-28 15:01:30 -07:00
Michael Zhu
0d5e037081 use mocha extensions in staking tests 2019-08-26 15:49:09 -07:00