Compare commits

..

7072 Commits

Author SHA1 Message Date
xianny
b5eb1c9ee8 Publish
- @0x/contracts-asset-proxy@3.4.0
 - @0x/contracts-broker@1.1.6
 - @0x/contracts-coordinator@3.1.7
 - @0x/contracts-dev-utils@1.3.5
 - @0x/contracts-erc1155@2.1.7
 - @0x/contracts-erc20-bridge-sampler@1.7.0
 - @0x/contracts-erc20@3.2.1
 - @0x/contracts-erc721@3.1.7
 - @0x/contracts-exchange-forwarder@4.2.7
 - @0x/contracts-exchange-libs@4.3.7
 - @0x/contracts-exchange@3.2.7
 - @0x/contracts-extensions@6.2.1
 - @0x/contracts-integrations@2.6.0
 - @0x/contracts-multisig@4.1.7
 - @0x/contracts-staking@2.0.14
 - @0x/contracts-test-utils@5.3.4
 - @0x/contracts-utils@4.5.1
 - @0x/contracts-zero-ex@0.2.0
 - 0x.js@9.2.0
 - @0x/abi-gen@5.3.1
 - @0x/assert@3.0.9
 - @0x/asset-swapper@4.6.0
 - @0x/base-contract@6.2.3
 - @0x/connect@6.0.9
 - @0x/contract-addresses@4.11.0
 - @0x/contract-artifacts@3.7.1
 - @0x/contract-wrappers-test@12.2.16
 - @0x/contract-wrappers@13.8.0
 - @0x/contracts-gen@2.0.10
 - @0x/dev-utils@3.3.0
 - ethereum-types@3.2.0
 - @0x/instant@1.0.53
 - @0x/json-schemas@5.1.0
 - @0x/migrations@6.4.0
 - @0x/monorepo-scripts@1.0.54
 - @0x/order-utils@10.3.0
 - @0x/orderbook@2.2.7
 - @0x/sol-compiler@4.1.1
 - @0x/sol-coverage@4.0.10
 - @0x/sol-doc@3.1.8
 - @0x/sol-profiler@4.1.0
 - @0x/sol-resolver@3.1.0
 - @0x/sol-trace@3.0.10
 - @0x/sol-tracing-utils@7.1.0
 - @0x/sra-spec@3.0.9
 - @0x/subproviders@6.1.1
 - @0x/tslint-config@4.1.0
 - @0x/types@3.2.0
 - @0x/typescript-typings@5.1.1
 - @0x/utils@5.5.1
 - @0x/web3-wrapper@7.2.0
2020-07-14 21:48:14 -07:00
xianny
9d3755db36 Updated CHANGELOGS & MD docs 2020-07-14 21:47:59 -07:00
Jacob Evans
762e0aec2d fix: Update to use KNP getExpectedRateAfterFee (#2629)
* Update to use KNP getExpectedRateAfterFee

* hack: use overrides instead of forking in ganache

* fix: added some tests using overrides

* override sampler

* Overrides in bridge_sampler_mainnet_test

* use getContracts to fake out tests

* chore: supply devUtils address

* feat: specify the call override by default

* CHANGELOGs

* export SamplerOverrides

* fix package.json

* fix: after rebase
2020-07-15 14:05:57 +10:00
mzhu25
ff9c9241d8 BalancerBridge (#2613)
* Add BalancerBridge and Sampler functions

* Update sampler artifacts/wrappers

* Add Balancer support to AssetSwapper + related refactoring

* Make use of GraphQL instead of sampler

* "fix" build and add mainnet BalancerBridge tests

* address some comments

* add balancer cache and fix DexSampler tests

* lint

* wip: tests for balancer sampler ops

* Fix market operation utils test

* balancer unit tests

* Return a buy quote of 0 if the buy amount exceeds the Balancer pool's balance

* Dynamic fee estimation

* Update contract addresses, export BalancerBridge wrapper

* Update changelogs

* Fix bugs discovered via simbot

* Fix issues in balancer_utils

* override `BigNumber.config` in configured_bignumber.ts

* Special case Balancer subops in  too

* Address some more comments

* Address Balancer performance issue

* Performance improvements

* Address comment

* Fix tests

Co-authored-by: xianny <xianny@gmail.com>
2020-07-14 19:18:50 -07:00
Lawrence Forman
18bc701e8b Merge pull request #2610 from 0xProject/feat/zero-ex/meta-transactions
EP: MetaTransactions
2020-07-10 11:12:58 -04:00
Lawrence Forman
a47795fd3f @0x/contract-wrappers-test: Increase test timeout. 2020-07-10 03:05:56 -04:00
Lawrence Forman
a55e8b268c @0x/contracts-zero-ex: Fix linter errors. 2020-07-10 02:36:25 -04:00
Lawrence Forman
e8106f04b5 @0x/contracts-zero-ex: Address review feedback. 2020-07-10 02:36:25 -04:00
Lawrence Forman
bdc1dbf08a @0x/order-utils: Address review feedback. 2020-07-10 02:36:25 -04:00
Lawrence Forman
06eeb2088b @0x/types: Address review feedback. 2020-07-10 02:36:25 -04:00
Lawrence Forman
7da9ec2c75 @0x/contract-addresses: Update ganache snapshot addresses for the Exchange Proxy. 2020-07-10 02:36:24 -04:00
Lawrence Forman
297ff10c14 @0x/contracts-zero-ex: add SignatureValidator and MetaTransactions features. 2020-07-10 02:36:00 -04:00
Lawrence Forman
1305f4314d @0x/0x.js: Export ExchangeProxyMetaTransaction and SignedExchangeProxyMetaTransaction 2020-07-10 02:36:00 -04:00
Lawrence Forman
55474c0599 @0x/types: Add ExchangeProxyMetaTransactionHash(). 2020-07-10 02:36:00 -04:00
Lawrence Forman
687c79ae81 @0x/utils: Add more revert errors to ZeroExRevertErrors 2020-07-10 02:36:00 -04:00
Lawrence Forman
829a353b14 @0x/order-utils: Add getOrderHash(), getExchangeTransactionHash(), getExchangeProxyTransactionHash() 2020-07-10 02:36:00 -04:00
Lawrence Forman
aced474dc5 Merge pull request #2628 from 0xProject/fix/dfb-redeploy-kovan-07-10-20
Redeploy DFB on kovan.
2020-07-10 02:35:37 -04:00
Lawrence Forman
7c08d5f198 etheereum-types: Touch this package to fix publish. 2020-07-10 01:53:02 -04:00
Lawrence Forman
c546787994 @0x/contract-addresses: Redeploy DFB on kovan.
`@0x/contracts-utils`: Reorganize `DeploymentConstants` addresses.
2020-07-10 01:29:28 -04:00
Lawrence Forman
7967a8416c Merge pull request #2625 from 0xProject/feat/deploy-new-fqt-2608
Deploy FQT from #2608
2020-07-07 16:05:04 -04:00
Lawrence Forman
9164cff234 @0x/contract-addresses: Deploy FQT from PR 2608 2020-07-07 01:10:16 -04:00
Lawrence Forman
017f98e87e Merge pull request #2616 from 0xProject/fix/dfb-revert
Fix DFB instability
2020-07-07 01:08:51 -04:00
Lawrence Forman
f33d8670aa @0x/contract-addresses: Update DFB addresses. 2020-07-07 01:07:44 -04:00
Lawrence Forman
845a42e73a @0x/asset-proxy: Fix DFB instability 2020-07-07 01:06:46 -04:00
Jacob Evans
406d2cefc5 feat: ExchangeProxy FillQuoteTransformer bridge direct (#2608)
* Detect Bridge orders and fill direct

* Mark as external for try/catch

* Initial tests

* discuss: Continue if protocol fee insufficient

* Emit ProtocolFeeUnfunded

* put the clamps on taker balance

* feat: GST free and optimize

* fix: low level GST free call

* fix: review feedback

* remove unused return struct
2020-07-07 07:37:26 +10:00
Lawrence Forman
41cdbc0ec4 Merge pull request #2622 from 0xProject/migration/exchange-proxy/affiliate-fee-transformer-initial
Deploy AffiliateFeeTransformer
2020-07-02 23:40:35 -04:00
Lawrence Forman
c6ec261c5c @0x/asset-swapper: Fix failing test. 2020-07-02 21:45:39 -04:00
Lawrence Forman
a2db1a3275 @0x/migrations: Add affiliateFeeTransformer and exchangeProxyFlashWallet to ganache snapshot migration. 2020-07-02 21:45:39 -04:00
Lawrence Forman
1e8f2f0e83 @0x/contract-addresses: Add affiliateFeeTransformer and exchangeProxyFlashWallet addresses. 2020-07-02 16:04:33 -04:00
Lawrence Forman
8491abe142 @0x/contracts-zero-ex: Export AffiliateFeeTransformer. 2020-07-02 16:04:33 -04:00
Lawrence Forman
d4302538bf Merge pull request #2620 from 0xProject/feat/contract-wrappers/geth-call-support
geth eth_call support.
2020-07-02 11:48:35 -04:00
Lawrence Forman
c34e3765ef @0x/dev-utils: Export GethCallOverrides type 2020-07-02 01:57:01 -04:00
Lawrence Forman
1f86bc06ef @0x/web3-wrapper: Export GethCallOverrides and GethCallOverridesRPC. 2020-07-02 01:56:33 -04:00
Lawrence Forman
7e892fac2d @0x/asset-swapper: Increase test timeout for slow CI 2020-07-02 00:33:23 -04:00
Lawrence Forman
23789b0692 @0x/contract-wrappers: Export GethCallOverrides. 2020-07-01 22:33:52 -04:00
Lawrence Forman
89adbe4127 0x.js: Export GethCallOverrides. 2020-07-01 21:08:25 -04:00
Lawrence Forman
11940fb98e @0x/json-schemas: Rename CallData.value -> CallData.balance and make it `wholeNumberSchema type.'
`@0x/web3-wrapper`: Only supply overrides to eth_call RPC if provided.
2020-07-01 20:43:33 -04:00
Lawrence Forman
13ae335811 0x/ethereum-types: Add geth eth_call types.
`0x/json-schemas`: Add geth eth_call properties to `CallData`.
`@0x/web3-wrapper`: Add geth geth eth_call support.
2020-07-01 15:54:49 -04:00
Lawrence Forman
b2dc6ad2fa @0x/asset-swapper: "Fix" forwarder buys of low decimal tokens. (#2618)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-07-01 20:30:12 +10:00
Jacob Evans
85ca926fd0 feat: asset-swapper singleton gas price oracle (#2619) 2020-07-01 18:43:47 +10:00
Jacob Evans
676698a59b fix: asset-swapper ethgasstation url option (#2617)
* fix: asset-swapper order-utils version

* fix: asset-swapper specify ethgasstation url as option

* default to real EGS

* fix: bad package.json
2020-07-01 13:47:34 +10:00
Lawrence Forman
22408ecd58 @0x/asset-swapper: Fix best/worst case asset amount calculations. (#2615)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Jacob Evans <jacob@dekz.net>
2020-06-30 17:58:06 +10:00
Jacob Evans
d36acc7ec7 fix: asset-swapper EthGasStation proxy url (#2614) 2020-06-30 17:41:52 +10:00
Lawrence Forman
a5a68acfec Add Exchange Proxy to Ganache snapshot (#2612)
* `@0x/contracts-zero-ex`: Expose migration tools.

* `@0x/contract-addresses`: Update ganache snapshot Exchange Proxy addresses

* `@0x/migrations`: Add Exchange Proxy migration
2020-06-25 13:52:01 +10:00
Jacob Evans
7431651666 fix: package.json from publish (#2611) 2020-06-24 15:44:42 +10:00
Jacob Evans
4f91bfd907 Updated CHANGELOGS & MD docs 2020-06-24 14:12:56 +10:00
mzhu25
8d2086870b Merge pull request #2607 from 0xProject/fix/sol-profiler-returns
Fix sol-profiler bugs
2020-06-22 14:35:52 -07:00
Daniel Pyrathon
1511ef1a98 Merge pull request #2609 from 0xProject/feature/quote-requestor-strings
Quote Requestor Fix:  BigNumbers to Strings
2020-06-19 15:40:58 -07:00
Daniel Pyrathon
4e030ce1e8 remove legacy taker request 2020-06-19 15:07:39 -07:00
Steve Klebanoff
2507ad274b remove BigNumbers from expectedParams 2020-06-19 14:42:45 -07:00
Steve Klebanoff
fb1c149eb9 another comment 2020-06-19 13:43:27 -07:00
Steve Klebanoff
d4662f428a change BNs to strings 2020-06-19 13:29:19 -07:00
F. Eugene Aumson
73c779c13a Merge pull request #2582 from 0xProject/feat/asset-swapper/use-quote-server
asset-swapper: Use @0x/quote-server, not local typedefs; and adapt to renamed taker request parameters
2020-06-19 13:05:10 -04:00
F. Eugene Aumson
b8cc164af1 asset-s: rm refs to quoteExpiry for RFQT tests
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r441836846
2020-06-17 17:29:35 -04:00
Michael Zhu
64a391b5f8 Update changelogs 2020-06-17 12:23:49 -07:00
Michael Zhu
21a202dd16 Fix sol-profiler bugs 2020-06-17 12:08:29 -07:00
F. Eugene Aumson
187dd2fdc3 asset-swapper: Prune dead code 2020-06-17 14:56:39 -04:00
F. Eugene Aumson
c18f3f0b33 asset-s: use RFQT-specific types in MarketOpUtils 2020-06-17 14:56:04 -04:00
F. Eugene Aumson
7162935028 asset-s: use RFQT-specific types in MarketOpUtils 2020-06-17 10:39:48 -04:00
Lawrence Forman
9215a73b6c Merge pull request #2604 from 0xProject/feat/order-utils/transformer-encoders
order-utils: ERC20 Transformer utils
2020-06-17 09:32:43 -04:00
Lawrence Forman
edd840794c @0x/asset-swapper: Fix linter errors. 2020-06-17 02:12:32 -04:00
Lawrence Forman
c30a6eb1aa @0x/contracts-zero-ex: Fix linter errors. 2020-06-17 01:23:08 -04:00
Lawrence Forman
233642af29 @0x/asset-swapper: Remove dependency on contracts-zero-ex. 2020-06-17 01:23:08 -04:00
Lawrence Forman
7dffd0a03e @0x/contracts-zero-ex: Use transformer utils from order-utils. 2020-06-17 01:23:08 -04:00
Lawrence Forman
f7bc3ff49d @0x/order-utils: Add ERC20 Transformer utils and export useful constants. 2020-06-17 01:23:08 -04:00
Lawrence Forman
53aabe3cdb Merge pull request #2605 from 0xProject/feat/zero-ex/transform-erc20-make-creatTransformWallet-onlyOwner
Flip `TransformERC20.createTransformWallet()` to `onlyOwner`
2020-06-17 01:17:43 -04:00
Lawrence Forman
09b8d7cfc9 @0x/contracts-zero-ex: Flip TransformERC20.createTransformWallet() to onlyOwner. 2020-06-16 18:07:03 -04:00
F. Eugene Aumson
1512afc7e6 CI: persist test-publish npm logs as Artifacts 2020-06-16 17:33:30 -04:00
F. Eugene Aumson
dde0c76112 Merge branch 'development' into feat/asset-swapper/use-quote-server 2020-06-16 10:26:56 -04:00
Xianny
f14b6f2ba2 Fix/erc20 sampler/uniswap v2 buys (#2603)
* `@0x/contracts-erc20-bridge-sampler`: Fix `sampleBuysFromUniswapV2()`

* fix uniswapV2 buys

* redeploy ERC20BridgeSampler to fix Uniswap buys

* fix changelog, move artifact to correct dir

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-06-12 15:54:19 -07:00
Lawrence Forman
4fced276c4 Merge pull request #2591 from 0xProject/feat/asset-swapper/exchange-proxy-support
asset-swapper: Exchange Proxy support
2020-06-12 01:52:07 -04:00
Lawrence Forman
7590471d62 @0x/migrations: Add uniswapV2Bridge entry that was lost in rebase. 2020-06-12 00:40:37 -04:00
Lawrence Forman
0b6bcf6739 @0x/asset-swapper: Fix linter errors. 2020-06-11 23:59:54 -04:00
Lawrence Forman
3a5ce86ed9 @0x/sol-compiler: Fix CompilerOptions schema.
`@0x/contract-addresses`: Add `exchangeProxyGovernor`.
`@0x/contract-addresses`: Add deployed EP addresses.
`@0x/migrations`: Add `exchangeProxyGovernor`.
2020-06-11 23:59:24 -04:00
Lawrence Forman
7b298939e2 @0x/asset-swapper: Guess deployment nonce from transformer address.
`@0x/asset-swapper`: Fix ETH not being passed as the token to `transformERC20()`.
2020-06-11 23:53:18 -04:00
Lawrence Forman
f1f6aa7d80 Switch to using deployment nonce instead of transformer addresses. 2020-06-11 23:53:18 -04:00
Lawrence Forman
7ce7dd7252 @0x/asset-swapper: Address review feedback 2020-06-11 23:53:16 -04:00
Lawrence Forman
01aa556ede @0x/abi-gen: Update python wrappers generation to work with leading underscores in identifiers.' 2020-06-11 23:52:59 -04:00
Lawrence Forman
48ad39c1c7 @0x/asset-swapper: Add ExchangeProxySwapQuoteConsumer. 2020-06-11 23:52:56 -04:00
Lawrence Forman
9cab034448 @0x/migrations: Use new ContractAddresses type. 2020-06-11 23:52:39 -04:00
Lawrence Forman
0d7a22634c @0x/contract-addresses: Add exchange proxy address placeholders. 2020-06-11 23:51:45 -04:00
Lawrence Forman
3e3bc5c06d @0x/contract-artifacts: Add ITransformERC20 artifact.
`@0x/contract-wrappers`: Add `ITransformERC20Contract`.
2020-06-11 23:50:25 -04:00
Lawrence Forman
2a81e468c7 @0x/contracts-zero-ex: Add transformer decoders 2020-06-11 23:49:52 -04:00
Lawrence Forman
0ba67a363e @0x/instant: Pin asset-swapper version. 2020-06-11 23:49:52 -04:00
Lawrence Forman
deae846864 @0x/contracts-broker: Fix broken tests. 2020-06-11 23:49:52 -04:00
Lawrence Forman
3a0d48ad77 Run broker tests on CI 2020-06-11 23:49:52 -04:00
Jacob Evans
81d4803b4d fix: UniswapV2 path order (#2601) 2020-06-12 13:26:56 +10:00
mzhu25
e936c7c507 Merge pull request #2593 from 0xProject/feature/multibridge/asset-swapper
Add MultiBridge support to AssetSwapper
2020-06-11 14:26:32 -07:00
F. Eugene Aumson
ad868af96e asset-swapper: use RFQT-specific response types
@0x/quote-server was recently updated to offer RFQT- and RFQM-specific
types, in addition to abstracted types.  Since everything here is RFQT
specific, usage has been changed to use those specific types.

Addresses review comments
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437623138
and
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437625305
2020-06-11 15:57:49 -04:00
Michael Zhu
cd14a45414 Update sampler artifacts/wrappers 2020-06-11 12:47:54 -07:00
F. Eugene Aumson
f7cd7110ea asset-s: Remove erroneous addition of API key
It was added due to the introduction of the use of the TakerRequest type
from @0x/quote-server, as it's included in that structure.  However,
that structure is primarily used within the quote server as the output
of parameter parsing, and that parsing routine transforms the API key
HEADER from the request into the TakerRequest type.  In short, the API
key is input as a header, not a parameter.

Addresses review comment
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437624647
2020-06-11 14:17:45 -04:00
Michael Zhu
44262bf747 MultiBridge support in AssetSwapper 2020-06-11 11:14:48 -07:00
Xianny
0fbbabe208 Add Uniswap V2 support to @0x/asset-swapper (#2599)
* add uniswapV2

* update changelogs

* remove unused import

* add tests for Uniswap V2 ETH

* rename UniswapV2 and UniswapV2Eth

* use correct token address path

* update contract addresses after deploy
2020-06-11 10:23:50 -07:00
Lawrence Forman
b39189fde3 Merge pull request #2594 from 0xProject/feat/contracts-zero-ex/AffiliateFeeTransformer
Exchange Proxy: AffiliateFeeTransformer
2020-06-08 22:24:17 -04:00
Lawrence Forman
18fc1d78f4 @0x/contracts-zero-ex: Rebase 2020-06-08 21:34:09 -04:00
Lawrence Forman
d44a91d10b @0x/contracts-zero-ex: Address review feedback. 2020-06-08 21:33:27 -04:00
Lawrence Forman
5e9829b2d8 @0x/contracts-zero-ex: Add AffiliateFeeTransformer tests. 2020-06-08 21:33:27 -04:00
Lawrence Forman
2176deae36 @0x/contracts-zero-ex: Rebase 2020-06-08 21:33:27 -04:00
Lawrence Forman
7c5035aa39 @0x/contracts-zero-ex: Use array of structs in AffiliateFeeTransformer data. 2020-06-08 21:33:27 -04:00
Lawrence Forman
5707993995 @0x/contracts-zero-ex: Add AffiliateFeeTransformer. 2020-06-08 21:33:26 -04:00
Lawrence Forman
f81697527c Merge pull request #2592 from 0xProject/feat/zero-ex/transformer-deployer
Exchange Proxy: TransformerDeployer
2020-06-08 20:30:09 -04:00
Lawrence Forman
967eff4c58 Merge pull request #2597 from 0xProject/fix/zero-ex/transform-erc20-audit
Exchange Proxy: Address audit feedback (2)
2020-06-08 20:29:27 -04:00
F. Eugene Aumson
d5d07dd34e Merge branch 'development' into feat/asset-swapper/use-quote-server 2020-06-08 19:15:07 -04:00
F. Eugene Aumson
b91cc3781d asset-swapper: Use newer @0x/quote-server 2020-06-08 18:07:59 -04:00
Lawrence Forman
87ed0071c4 @0x/contracts-zero-ex: Make TransformerDeployer boring. 2020-06-08 15:30:56 -04:00
Lawrence Forman
0fed48630c @0x/contracts-zero-ex: Add TransformDeployer contract. 2020-06-08 15:30:56 -04:00
Lawrence Forman
7b3e7c98ac @0x/contracts-zero-ex: Add missing docstrings + fix compilation errors. 2020-06-08 15:28:27 -04:00
Lawrence Forman
09f44b0375 Update changelogs 2020-06-08 15:28:27 -04:00
Lawrence Forman
ebfa62637e @0x/contracts-zero-ex: Address audit feedback. 2020-06-08 15:28:27 -04:00
Lawrence Forman
cb2cc05cac @0x/contracts-erc20: Update LibERC20TokenV06 comments. 2020-06-08 15:28:27 -04:00
Lawrence Forman
f9c9131d81 @0x/contracts-utils: Update V06 contracts to get around 0.6.9 docstring errors 2020-06-08 15:28:27 -04:00
Lawrence Forman
1be9a1cbc7 @0x/utils: Update ZeroExRevertErrors. 2020-06-08 15:28:27 -04:00
F. Eugene Aumson
b7fda8ecf0 Merge pull request #2598 from 0xProject/fix/py-ci-mypy-0.780
Python: pin mypy to <= 0.770
2020-06-08 12:27:30 -04:00
F. Eugene Aumson
db16392821 Python: pin mypy to <= 0.770
See also https://github.com/python/mypy/issues/8953
2020-06-08 11:51:38 -04:00
Xianny
7127f541c3 UniswapV2Bridge (#2590)
* implement UniswapV2 Bridge

* More tests for UniswapV2Bridge

* cleanup and remove ERC20BridgeSampler changes

* enable multihop; address review comments

* solidity 0.6.9 doesnt allow devdoc for public storage vars

* codestyle improvements
2020-06-05 11:56:52 -07:00
Lawrence Forman
32793cc008 Merge pull request #2595 from 0xProject/feat/erc20-bridge-sampler/uniswapv2-tests
Add Uniswap V2 to ERC20BridgeSampler
2020-06-04 12:14:07 -04:00
xianny
fbaf55cb25 update @0x/contract-artifacts and @0x/contract-wrappers 2020-06-03 13:45:35 -07:00
xianny
b8d51fc4e8 rename contract to UniswapV2Router01
https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/UniswapV2Router01.sol
2020-06-03 12:08:08 -07:00
Lawrence Forman
0c6e05d220 Merge pull request #2576 from 0xProject/feat/contracts-zero-ex/0x-api-erc20-transformers
ZeroEx: ERC20 Transformers
2020-06-03 14:09:20 -04:00
Lawrence Forman
4066c17a0f @0x/contracts-erc20-bridge-sampler: Add UniswapV2. 2020-06-03 14:01:09 -04:00
Lawrence Forman
429f2bb8dd @0x/contracts-utils: Add UniswapV2 to DeploymentConstants. 2020-06-03 13:57:59 -04:00
Lawrence Forman
112f4fc4f0 @0x/contracts-zero-ex: Address review comments. 2020-06-02 22:01:22 -04:00
Lawrence Forman
ecfbd6280f @0x/contracts-zero-ex: Address review feedback. 2020-05-28 11:56:59 -04:00
Lawrence Forman
bf84409839 @0x/utils: Update InvalidTransformDataError. 2020-05-28 11:56:59 -04:00
Lawrence Forman
a7ce72cae0 @0x/contracts-zero-ex: Rebase against development 2020-05-28 11:56:59 -04:00
Lawrence Forman
28402ff7d8 @0x/contracts-zero-ex: Add self-destructing to transformers 2020-05-28 11:56:59 -04:00
Lawrence Forman
e1d213d1a3 @0x/utils: Add more transformer revert errors. 2020-05-28 11:56:59 -04:00
Lawrence Forman
c610dd96f5 @0x/contracts-zero-ex: Rebase, returning nonces in transform(). 2020-05-28 11:56:59 -04:00
Lawrence Forman
2ba3818b65 @0x/contracts-zero-ex: Introduce transformer contracts. 2020-05-28 11:56:59 -04:00
Lawrence Forman
0e1a5a375a @0x/contracts-test-utils: Add msg param to assertIntegerRoughlyEquals 2020-05-28 11:56:59 -04:00
Lawrence Forman
cfc3daeb65 @0x/utils: Add ERC20 transformer revert errors. 2020-05-28 11:56:59 -04:00
Lawrence Forman
6359f1950e @0x/contracts-zero-ex: Address review feedback. 2020-05-28 11:56:59 -04:00
Lawrence Forman
d2f581853d @x/utils: Address review feedback. 2020-05-28 11:56:59 -04:00
Lawrence Forman
030cb285da @0x/contracts-zero-ex: Use immutable owner in Puppet instead of Ownable. 2020-05-28 11:56:59 -04:00
Lawrence Forman
af45409959 @0x/contracts-zero-ex: Revamp TransformERC20. 2020-05-28 11:56:59 -04:00
Lawrence Forman
d9a9bc35e3 @0x/zero-ex: Rebase and use "slot" instead of "offset" language in storage buckets. 2020-05-28 11:56:59 -04:00
Lawrence Forman
c911c3352c @0x/contracts-zero-ex: Make TokenSpender's puppet contract a distinct contract type and rename getTokenSpenderPuppet() to getAllowanceTarget() 2020-05-28 11:56:58 -04:00
Lawrence Forman
654abbac25 @0x/contracts-zero-ex: Introduce the TransformERC20 feature. 2020-05-28 11:56:58 -04:00
Lawrence Forman
46d5f42c9d @0x/utils: Add new ZeroExRevertErrors revert types 2020-05-28 11:56:58 -04:00
Lawrence Forman
1509da1215 @0x/contracts-utils: Convert more 0.6 contracts 2020-05-28 11:56:58 -04:00
F. Eugene Aumson
98a99d96aa Merge pull request #2588 from 0xProject/feuGeneA-patch-4
asset-swapper: For RFQ, don't log error status code if there isn't one
2020-05-27 19:31:43 -04:00
F. Eugene Aumson
d62d81af17 Update quote_requestor.ts 2020-05-27 14:19:24 -04:00
Lawrence Forman
dba67eb927 asset-swapper: Increase timeout for tests. (#2587)
* `@0x/asset-swapper`: Increase timeout for tests.

* Update packages/asset-swapper/CHANGELOG.json

Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
2020-05-27 09:51:20 -04:00
Lawrence Forman
548c30d6a0 ZeroEx: Audit Fixes (#2586)
* `@0x/utils`: Remove unused revert error.

* `@0x/contracts-zero-ex`: Address audit feedback.
2020-05-26 20:57:55 -04:00
F. Eugene Aumson
1b8b9186a8 asset-swapper: Fix test-publish 2020-05-26 18:46:19 -04:00
F. Eugene Aumson
a8cfcfb371 Fix test-publish CI failure 2020-05-26 15:24:43 -04:00
F. Eugene Aumson
f7a414bc29 asset-s/RFQ: adapt to renamed TakerRequest fields 2020-05-26 15:24:42 -04:00
F. Eugene Aumson
e05cd1d66b asset-s/QuoteRequestor: use TakerRequest type 2020-05-26 15:24:38 -04:00
F. Eugene Aumson
511cd90c44 Merge pull request #2585 from 0xProject/fix/asset-swapper/rfqt-error-status-logging
asset-s/QuoteRequestor: fix statusCode logging
2020-05-21 18:43:04 -04:00
F. Eugene Aumson
8fb2d8da88 asset-s/QuoteRequestor: fix statusCode logging 2020-05-21 16:37:37 -04:00
Lawrence Forman
2fce332ed7 ZeroEx: TransformERC20, TokenSpender (#2545)
* `@0x/contracts-utils`: Convert more 0.6 contracts

* `@0x/contracts-erc20`: Add solidity 0.6 contracts.

* `@0x/utils`: Add new `ZeroExRevertErrors` revert types

* `@0x/contracts-zero-ex`: Introduce the `TransformERC20` feature.

* `@0x/subproviders`: Update ganache-core.
`@0x/web3-wrapper`: Update ganache-core.

* `@0x/contracts-zero-ex`: Make `TokenSpender`'s puppet contract a distinct contract type and rename `getTokenSpenderPuppet()` to `getAllowanceTarget()`

* `@0x/zero-ex`: Rebase and use "slot" instead of "offset" language in storage buckets.

* `@0x/web3-wrapper`: Add `getAccountNonceAsync()` to `Web3Wrapper`

* `@0x/contracts-zero-ex`: Revamp TransformERC20.

* `@0x/contracts-zero-ex`: Remove `payable` from `IERC20Transformer.transform()` and disable hex capitalization linter rule because of prettier conflicts.

* `@0x/contracts-zero-ex`: Use `immutable` owner in `Puppet` instead of `Ownable`.

* `@x/utils`: Address review feedback.

* `@0x/contracts-zero-ex`: Address review feedback.

* `@0x/contracts-utils`: Address review feedback.

* `@0x/contracts-zero-ex`: Return deployment nonce in `transform()`.

* `@0x/contracts-zero-ex`: Finish returning deployment nonce in `transform()`.

* `@0x/contracts-zero-ex`: Fix doc-gen bug.

* `@0x/contracts-zero-ex`: Address review comments.

* `@0x/utils`: Add `NegativeTransformERC20OutputERror`

* `@0x/contracts-zero-ex`: Revert if the taker's output amount decreases.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-05-20 22:47:21 -04:00
Francesco Agosti
b23f1eb145 Merge pull request #2583 from 0xProject/feat/estimated-gas-token-refund
Expose fills object in asset-swapper quote orders
2020-05-20 14:56:49 -07:00
fragosti
f694072b5a Run prettier 2020-05-20 14:20:54 -07:00
fragosti
10de266e0f Remove unused variable SignedOrderWithFillableAmounts 2020-05-20 13:13:01 -07:00
fragosti
71811ed04f Remove unused variable 2020-05-20 12:53:58 -07:00
fragosti
e9638ef95e Add to changelog 2020-05-20 12:52:35 -07:00
fragosti
5226bb5596 Expose fills in asset-swapper quote 2020-05-20 12:50:15 -07:00
F. Eugene Aumson
b9984b6df4 asset-swapper: fix bug: bad maker response throws
Formerly, a maker sending back a non-JSON was causing an exception to be
thrown.
2020-05-15 01:20:30 -04:00
F. Eugene Aumson
9c11835fee asset-s: use @0x/quote-server, not local typedefs 2020-05-15 01:20:29 -04:00
F. Eugene Aumson
d9e13d6b99 Merge pull request #2581 from 0xProject/fix/asset-swapper/rfqt-logging
asset-swapper: Improve logging for 0x API consumption
2020-05-11 19:13:07 -04:00
F. Eugene Aumson
dede076835 asset-s/QuoteRequestor: clarify axios error type
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2581#discussion_r423337773
2020-05-11 18:34:32 -04:00
F. Eugene Aumson
c929782e0d asset-swapper/RFQT: Log params sent to maker
* Include in RFQ-T info log entry the query parameters that were sent to
the maker.

* Re-organize log entry
    * Rename top-level field from rfqtMakerResponse to
    rfqtMakerInteraction.
    * Create separate `request` and `response` sub-objects.

* Rename field `latency` to `latencyMs`.
2020-05-11 18:01:06 -04:00
F. Eugene Aumson
a43c7e36f8 asset-swapper/RFQT: log maker response metadata 2020-05-11 17:40:19 -04:00
F. Eugene Aumson
b95cec9c32 asset-swapper: fix bug: RFQ-T info log was broken 2020-05-11 17:39:30 -04:00
F. Eugene Aumson
9a7d9abe3c asset-swapper: consolidate RFQ-T usage of Axios 2020-05-11 13:52:42 -04:00
F. Eugene Aumson
c77b620453 asset-swapper: Improve RFQ-T logging for 0x API
* Change QuoteRequestor logger parameters to conform to pino logging
library, duplicating (one of) their LogFunction prototype interfaces for
our purposes here.  With this, every log emission now includes BOTH a
human-readable message AND a JSON object.  Also, this pattern has been
applied to both the error logger and the info logger.

* Do better handling of Axios errors when logging them.  Before we were
(a) logging errors in a separate log entry than the message that
explains it, and (b) dumping the whole error object to the log entry,
which was resulting in an object so massive that pino/Kibana was
splitting it into 3 separate entries.  Now, we (a) follow the pattern
described in the previous bullet, which puts the error object and the
human readable message into the same log entry, and (b) we check to see
if an error object is Axios-specific, and if so then we use the
AxiosError.toJSON() method to strip out the irrelevant properties.

* Log a uniform maker response metric, with maker endpoint URL, status
code, and latency, for both successful cases and erroneous ones.
(Before, we were only doing this for successful cases.)
2020-05-11 13:38:37 -04:00
Lawrence Forman
b348084e2a @0x/zero-ex: Always offset storage bucket ID by 1. (#2579)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-05-08 20:13:45 -04:00
F. Eugene Aumson
ff1811ef90 Merge pull request #2574 from 0xProject/rfqt-follow-ups
asset-swapper: RFQ-T follow ups
2020-05-07 17:44:02 -04:00
F. Eugene Aumson
39cf4a7576 Ran prettier...on development code! wtf?
Maybe something weird happened in the merge conflict resolution? Though
I didn't see anything in particular.
2020-05-07 01:39:22 -04:00
F. Eugene Aumson
21b67625a6 Merge branch 'development' into rfqt-follow-ups 2020-05-07 01:07:41 -04:00
Jacob Evans
fb0311e675 feat: ERC20BridgeSampler Unlock Kyber collisions (#2575)
* feat: ERC20BridgeSampler Unlock Kyber collisions

* Updated fallback strategy

* Address comments

* Eth2Dai hop sampler

* Update packages/asset-swapper/src/utils/market_operation_utils/index.ts

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>

* Set DFB expiry to 2hr

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-05-07 07:56:03 +10:00
F. Eugene Aumson
8a14b4afff asset-swapper: clarify comment
This comment recently got moved from one context to another.  In the old
context, the whole comment made sense, but in the new context it needed
paring down.
2020-05-06 13:24:20 -04:00
F. Eugene Aumson
e42701599a asset-s/RFQT: log each maker resp. time, not agg.
Log each maker's individual response times, rather than logging them in
aggregate.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419769846
2020-05-06 13:23:35 -04:00
F. Eugene Aumson
352b1b43f2 asset-s: restore type safety to rfqt.skipBuyReq's
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r420465928
2020-05-06 13:16:23 -04:00
F. Eugene Aumson
2922ebd095 asset-s/test: stop unnecessarily priming mock
Addresses review comment 93bdaba8ee (r419774170)
2020-05-05 17:17:47 -04:00
F. Eugene Aumson
a9e72085dd asset-s: fix bug handling RFQ-T skipBuyRequest
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419772045
2020-05-05 17:17:47 -04:00
F. Eugene Aumson
ed3d194c90 asset-s: ignore case verifying RFQT taker address
Do case INsensitive comparison when verifying that RFQ-T firm quote
contains the requested taker address.

This commit also introduces some changes around the RfqtRequestOpts
parameter.  Without these changes, there were errors (tsc or tslint?
can't remember) about takerAddress being possibly undefined.

Rather than asserting it yet again (which we're already doing via
assertTakerAddressOrThrow()), I decided to change the RfqtRequestOpts
param to be required, not optional.  Coincidentally, this brings the
requestRfqtFirmQuotesAsync() interface into alignment with the
requestRfqtIndicativeQuotesAsync() one, which already requires the
options parameter.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419770087
2020-05-05 17:17:46 -04:00
F. Eugene Aumson
125c53827b asset-s: check RFQ expiry more canonically
For firm quotes, re-use orderCalculationUtils.willOrderExpire(), just
like utils.order_prune_utils.

For indicative quotes, duplicate the logic used in that
willOrderExpire() function, since it can't be re-used for an indicative
quote (it's not a full Order object), and since the logic is very
minimal.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419768395
2020-05-05 17:16:48 -04:00
F. Eugene Aumson
38781807cd asset-s: simplify test util usage 2020-05-05 12:53:31 -04:00
F. Eugene Aumson
c046943269 asset-s: fix bug: expiry is BigNumber, not string 2020-05-05 12:43:41 -04:00
Lawrence Forman
fe36cd86bb Merge pull request #2573 from 0xProject/fix/contracts-zero-ex/initial-migration-self-destruct
ZeroEx: InitialMigration Race Condition/Self-destruct
2020-04-30 15:02:16 -04:00
F. Eugene Aumson
401410089c asset-s/QuoteRequestor: info log Objects, not strs
In the QuoteRequestor class, when _infoLogger() is used, log objects
directly, rather than stringifying them first.  This changes the 0x API
log rendering from

{"level":"info","time":1588209135290,"pid":13022,"hostname":"precision5510","msg":"{\"aggregatedRfqtLatencyMs\":4}","v":1}

to

{"level":"info","time":1588224481908,"pid":3637,"hostname":"precision5510","aggregatedRfqtLatencyMs":2,"v":1}

This facilitates parsing of these logs by Kibana.
2020-04-30 01:32:06 -04:00
F. Eugene Aumson
fa23337519 asset-swapper: Ran prettier 2020-04-29 17:50:16 -04:00
F. Eugene Aumson
ae5421f76e asset-s: Use expiryBufferMs to filter RFQ-T quotes 2020-04-29 17:24:51 -04:00
F. Eugene Aumson
a2e2b429d5 asset-s: exclude RFQ-T orders w/ bad takerAddress 2020-04-29 17:24:42 -04:00
F. Eugene Aumson
ac852b23b3 asset-s: allow disabling of buy req's for RFQ-T 2020-04-29 17:23:16 -04:00
F. Eugene Aumson
e12389a002 asset-s: don't ignore default SwapQuoter RFQT opts 2020-04-29 17:23:16 -04:00
F. Eugene Aumson
da18e42d2a asset-s: Fix prettier command to match monorepo's 2020-04-29 17:23:15 -04:00
F. Eugene Aumson
93bdaba8ee asset-s: skip RFQT makers not supporting reqd pair
Skip querying an RFQ-T maker for a quote when the requested asset pair
isn't supported by that maker.
2020-04-29 17:23:10 -04:00
F. Eugene Aumson
4cb08a61d5 asset-s: RFQT info logger; log maker response time 2020-04-29 17:22:59 -04:00
Lawrence Forman
133692ca92 @0x/contract-wrappers-test: Increase test timeout for CI 2020-04-29 17:11:00 -04:00
F. Eugene Aumson
4bcc4b3cf8 asset-s: relay expiration time in indicative quote 2020-04-29 15:45:35 -04:00
F. Eugene Aumson
4eb20ca4b6 asset-s/QuoteRequestor: use constructor assignment 2020-04-29 15:45:35 -04:00
Lawrence Forman
69f7343be5 @0x/contracts-zero-ex: Lock the caller of InitialMigration.deploy() and actually self-destruct. 2020-04-29 14:26:55 -04:00
F. Eugene Aumson
19b28a58d6 Merge pull request #2544 from 0xProject/fix/pyfail-dupe-docstrings
Python: unpin Sphinx dependency, clean up warnings
2020-04-29 13:53:18 -04:00
Lawrence Forman
3c33a93b9c Merge pull request #2572 from 0xProject/feat/contracts-zero-ex/syntactic-sugar-1
ZeroEx: Switch rich revert style.
2020-04-29 13:52:39 -04:00
Lawrence Forman
f2e16dfb21 @0x/contracts-zero-ex: Switch rich revert style.
`@0x/contracts-zero-ex`: Merge `FixinOwnable` -> `FixinCommon`.
2020-04-29 13:01:19 -04:00
F. Eugene Aumson
0f689e8051 Merge pull request #2571 from 0xProject/fix/pylint-upgrade
Python: adapt to latest version of pylint
2020-04-29 12:15:31 -04:00
F. Eugene Aumson
5b44e6ef64 Python: adapt to latest version of pylint 2020-04-29 10:10:18 -04:00
Lawrence Forman
49e4ade66f Merge pull request #2570 from 0xProject/fix/redeploy-sampler-on-kovan
`@0x/contract-addresses`: Redeploy sampler on kovan
2020-04-28 17:33:02 -04:00
Lawrence Forman
3bae27d039 @0x/contract-addresses: Redeploy sampler on kovan 2020-04-28 15:05:51 -04:00
Lawrence Forman
a77f0c606d Merge pull request #2569 from 0xProject/feat/contracts-zero-ex/iownable-compat
ZeroEx: IOwnable(V06) compatibility
2020-04-28 14:29:33 -04:00
Lawrence Forman
f1de64dcaf @0x/contracts-zero-ex: Make Ownable feature conform to IOwnable. 2020-04-28 12:16:30 -04:00
Lawrence Forman
feb672c3cd @0x/contracts-utils: Make IOwnableV06 conform to IOwnable. 2020-04-28 12:16:11 -04:00
mzhu25
a90b463a7d Merge pull request #2567 from 0xProject/fix/instanceof-array-isArray
instanceof Array -> Array.isArray
2020-04-28 01:03:02 -07:00
Jacob Evans
5f5f25c978 fix: contract-addresses ERC20BridgeSampler (#2568)
* fix: contract-addresses ERC20BridgeSampler

* CHANGELOG
2020-04-28 17:48:32 +10:00
Michael Zhu
351ea8bc1c instanceof Array -> Array.isArray 2020-04-27 18:28:56 -07:00
Jacob Evans
b34edcbf87 [asset-swapper] clip native fill data (#2565)
* [asset-swapper] clip native fill data

* Test for createFillPaths

* CHANGELOG
2020-04-25 08:44:48 +10:00
Alex Towle
160519e1fe Merge pull request #2566 from 0xProject/fix/dangling-promises-asset-swapper
[asset-swapper] Fixed dangling promises
2020-04-24 16:53:30 -05:00
Alex Towle
44d626e12e Changed style 2020-04-24 13:31:47 -05:00
Alex Towle
efb9dc51c9 Fix linting error 2020-04-24 13:07:15 -05:00
Alex Towle
deb51434fd Fixed dangling promises 2020-04-24 12:44:05 -05:00
Lawrence Forman
501070bfb0 Merge pull request #2564 from 0xProject/feat/contracts-zero-ex/consolidate-bootstrap-features
ZeroEx: Merge Migrate and Ownable Features
2020-04-24 01:43:04 -04:00
Lawrence Forman
712958d8c8 @0x/asset-swapper: Fix sporadically failing quote simulation tests. 2020-04-24 01:07:16 -04:00
Lawrence Forman
4d8d944fe5 @0x/contracts-utils: Update package.json 2020-04-24 01:06:44 -04:00
Lawrence Forman
0042e42160 @0x/contracts-zero-ex: Merge Migrate into Ownable 2020-04-24 01:06:44 -04:00
Lawrence Forman
85509ea251 @0x/utils: ZeroExRevertErrors.Migrate -> ZeroExRevertErrors.Ownable 2020-04-24 01:06:44 -04:00
Jacob Evans
6063854d06 Add Curve sUSD (#2563) 2020-04-24 07:06:36 +10:00
F. Eugene Aumson
456f8a90b1 Merge pull request #2562 from 0xProject/feature/rfqt-warning-logger
asset-swapper: support RFQ-T logger callback
2020-04-23 01:48:43 -04:00
F. Eugene Aumson
980246d07a asset-swapper: use lambda not .bind() 2020-04-23 01:11:15 -04:00
F. Eugene Aumson
141c30b173 asset-swapper: remove debug logging 2020-04-23 01:08:26 -04:00
F. Eugene Aumson
22f9b03fce asset-swapper: Remove superfluous conditional 2020-04-23 01:07:57 -04:00
Lawrence Forman
be2db504b9 Merge pull request #2561 from 0xProject/feat/contracts-zero-ex/unused-storage-id
ZeroEx: Add `Unused` to `StorageId` enum
2020-04-23 00:23:35 -04:00
Jacob Evans
cac6f5234f Collapse on-chain sources into DexForwarderBridge (#2560)
* Collapse on-chain sources into DexForwarderBridge

* Fix tests. CHANGELOG
2020-04-23 13:12:46 +10:00
F. Eugene Aumson
eb6b32b6ee asset-swapper: support RFQ-T logger callback
For use in integrations that have specific log formats to adhere to.
2020-04-22 20:59:17 -04:00
F. Eugene Aumson
07acc9529e Merge pull request #2555 from 0xProject/rfq-t-indicative
asset-swapper: RFQ-T indicative quotes
2020-04-22 16:34:02 -04:00
Lawrence Forman
f7f0152573 @0x/contracts-zero-ex: Add Unused to StorageId enum 2020-04-22 16:06:49 -04:00
F. Eugene Aumson
153533f1d5 Fix bug in prior revision: wrong asset data
I tried to get fancy back in 5effc6ec90.
I changed something more than the single refactor targetted by the
commit, and it broke things!  This reverts part of that commit,
restoring clean runs of 0x API tests.
2020-04-22 11:58:09 -04:00
F. Eugene Aumson
11622c586a asset-s: Add RfqtRequestOpts.isIndicative 2020-04-22 11:58:09 -04:00
Lawrence Forman
7396bb508a Merge pull request #2540 from 0xProject/feat/contracts/zero-ex
ZeroEx: Universal proxy
2020-04-21 23:37:35 -04:00
Lawrence Forman
7df6530f3a @0x/contracrts-zero-ex: Address more review comments. 2020-04-21 22:29:46 -04:00
Lawrence Forman
80787456fa @0x/contracts-zero-ex: Fix comments. 2020-04-21 22:29:46 -04:00
Lawrence Forman
4446ac1ca3 @0x/contracts-zero-ex: Use (scaled) enums for storage IDs 2020-04-21 22:29:46 -04:00
Lawrence Forman
220039ab00 @0x/contracts-zero-ex: Allow any call target to bootstrap(). 2020-04-21 22:29:46 -04:00
Lawrence Forman
12f2250ab5 @0x/contracts-zero-ex: bootstrap() is now a temporary feature, registered in the ZeroEx constructor.
`@0x/contracts-zero-ex`: `bootstrap()` de-registers itself and self-destructs once it's called.
`@0x/contracts-zero-ex`: `bootstrap()` now takes arbitrary call data, but the callee is fixed in an immutable.
`@0x/contracts-zero-ex`: `bootstrap()` caller is fixed in an immutable.
`@0x/contracts-zero-ex`: `bootstrap()` only calls a single target.
`@0x/contracts-zero-ex`: Renamed `BasicMigration` to `InitialMigration`.
`@0x/contracts-zero-ex`: `InitialMigration` is now the bootstrap target and multiplexes to the initial features.
`@0x/contracts-zero-ex`: Add `Migrate` feature and tests.
`@0x/contracts-zero-ex`: Re-organize contract locatins (remove `interfaces` folder).
2020-04-21 22:29:46 -04:00
Lawrence Forman
0c33aa16a1 @0x/utils: Add more ZeroEx rich reverts.
`@0x/utils: Display revert error payload in stack traces.
2020-04-21 22:29:46 -04:00
Lawrence Forman
72908b02fe @0x/contracts-zero-ex: Address review feedback.
`@0x/contracts-zero-ex`: Add target implementation address to `rollback()`.
`@0x/contracts-zero-ex`: Add storage ID uniqueness test.
`@0x/contracts-zero-ex`: Add rollback history querying functions to `SimpleFunctionRegistry`.
2020-04-21 22:29:46 -04:00
Lawrence Forman
223aa04424 @0x/utils: Change SimpleFunctionRegistry NoRollbackHistoryError to NotInRollbackHistoryError. 2020-04-21 22:29:46 -04:00
Lawrence Forman
e53248cca6 @0x/sol-compiler: Address review feedback. 2020-04-21 22:29:46 -04:00
Lawrence Forman
c11d661b39 @0x/contracts-zero-ex`: Create ZeroEx (proxy) contracts 2020-04-21 22:29:46 -04:00
Lawrence Forman
4212a08337 @0x/contracts-utils: Add solidity 0.6 contracts 2020-04-21 22:29:46 -04:00
Lawrence Forman
c0553fa9eb Add @0x/contracts-zero-ex project to monorepo.
Tweak circleci config to avoid running out of memory.
2020-04-21 22:29:46 -04:00
Lawrence Forman
7f26fafed7 @0x/utils: ZeroExRevertErrors. 2020-04-21 22:29:46 -04:00
Lawrence Forman
3e9309c003 @0x/sol-compiler: Strip receive functions from 0.6 ABI output 2020-04-21 22:29:46 -04:00
Lawrence Forman
1017707475 ethereum-types: Update MethodAbi definition for solidity 0.6 2020-04-21 22:29:46 -04:00
F. Eugene Aumson
e8ff5da209 asset-swapper: update CHANGELOG 2020-04-21 01:49:28 -04:00
F. Eugene Aumson
03ed3ac1b0 Merge branch 'development' into rfq-t-indicative 2020-04-21 00:50:50 -04:00
F. Eugene Aumson
2c97208e74 asset-s: simplify type with ?, not |undefined
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2555#discussion_r411081841
2020-04-21 00:49:30 -04:00
Jacob Evans
a458e81f8d ERC20BridgeSampler: Additional Buy support (#2551)
* ERC20BridgeSampler: Sample Curve Buy

* Fake Buy Kyber/PLP

* Deploy mainnet

* Add Kyber rates for buy tests

* CHANGELOGs

* Provide maxIterations and targetSlippage as options

* Cleanup ERC20BridgeSampler for re-use

* Redeploy Mainnet Kovan

* Feedback fixes

* Handle OOG/revert 0s

* Redeploy Mainnet refactor
2020-04-21 13:26:12 +10:00
F. Eugene Aumson
83289bc801 asset-s: consider falsey takerAddress as absent
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2555#discussion_r411543876
2020-04-20 22:56:44 -04:00
F. Eugene Aumson
ba2ac6a7b5 asset-s: Clarify indicative quote enablement
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2555#discussion_r411498729
2020-04-20 22:56:44 -04:00
F. Eugene Aumson
245b6da577 asset-s: Require RfqtRequestOpts.intentOnFilling
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2555#discussion_r411083497
2020-04-20 22:56:44 -04:00
F. Eugene Aumson
8875f924b0 asset-s: test requestRfqtIndicativeQuotesAsync 2020-04-20 22:56:44 -04:00
F. Eugene Aumson
ad7868ebe1 asset-s: clean up order faking for indicative RFQT
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2555#discussion_r411545804
2020-04-20 22:56:44 -04:00
F. Eugene Aumson
5effc6ec90 asset-swapper: extract method
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2555#discussion_r411514718
2020-04-20 22:56:43 -04:00
F. Eugene Aumson
4cc9ceabd2 asset-swapper: Rm unused ERC20BridgeSource.Rfqt
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2555#discussion_r410517580
2020-04-20 22:56:43 -04:00
F. Eugene Aumson
464c918134 asset-swapper: test RFQT indicative quote handling 2020-04-20 22:56:43 -04:00
F. Eugene Aumson
2456adcb68 asset-swapper: validate RFQT indicative quotes
Validate that the responses returned from maker endpoints both conform
to expected JSON schema data types and also have the expected asset
data, per the taker's request.
2020-04-20 22:56:43 -04:00
F. Eugene Aumson
45bc967f30 asset-swapper: Differentiate RFQT warning messages 2020-04-17 02:34:36 -04:00
F. Eugene Aumson
d6d4d29257 asset-swapper: RFQ-T indicative quotes
These changes have been exercised via mocha tests in the 0x-api repo.

Not sure why I had to add GetMarketOrdersRfqtOpts to the package
exports.  `yarn test:generate_docs:circleci` said:

$ node ./packages/monorepo-scripts/lib/doc_generate.js --package @0x/asset-swapper
GENERATE_DOCS: Generating Typedoc JSON for @0x/asset-swapper...
GENERATE_DOCS: Generating Typedoc Markdown for @0x/asset-swapper...
GENERATE_DOCS: Modifying Markdown To Exclude Unexported Items...
Error: @0x/asset-swapper package needs to export:
GetMarketOrdersRfqtOpts
From it's index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_MAP.
    at DocGenerateUtils._lookForMissingReferenceExportsThrowIfExists (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:288:19)
    at DocGenerateUtils.<anonymous> (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:255:34)
    at step (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:32:23)
    at Object.next (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:13:53)
    at fulfilled (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
2020-04-17 02:34:36 -04:00
F. Eugene Aumson
33fdfdc8c0 asset-swapper: Extract method inferQueryParams
For use in upcoming implementation of indicative quotes.
2020-04-17 01:18:46 -04:00
F. Eugene Aumson
80c8712b2a asset-swapper: Rm unused field in SwapQuoterOpts 2020-04-17 01:18:28 -04:00
F. Eugene Aumson
957e3eb93c asset-swapper: Restructure RFQ-T request options
There's one subtlety here: apiKey has been moved to be within the rfqt
namespace, after talking to Fabio and discovering that he only needs to
re-use the API key in 0x API, not in asset-swapper.
2020-04-17 01:18:07 -04:00
F. Eugene Aumson
110e1afa8e Merge pull request #2541 from 0xProject/rfq-t
asset-swapper: RFQ-T firm quotes
2020-04-15 15:24:48 -04:00
F. Eugene Aumson
1da8f68871 migrations: Add independent yarn prettier script 2020-04-15 14:17:03 -04:00
F. Eugene Aumson
513ddb4cca Merge branch 'development' into rfq-t 2020-04-15 11:12:30 -04:00
F. Eugene Aumson
3bdfcb8542 Update {asset-s,migrat,contract-ad}* CHANGELOGs 2020-04-15 01:47:13 -04:00
F. Eugene Aumson
aee758eca2 Fix bug: Stop ignoring default SwapQuoteRequestOps
SwapQuoter._getSwapQuoteAsync() was merging defaults into the options
sent into SwapQuoteCalculator.calculateMarket{Buy,Sell}SwapQuoteAsync(),
but it was using the unmerged options function parameter for the RFQ-T
options and also for the gas price option.
2020-04-15 01:47:01 -04:00
Steve Klebanoff
47ef7fffce RFQ-T: validate assetData & add more tests (#2552)
* test for returning a 200 with invalid data, and additonal logging for that case

* Ensure RFQ-T response has asset data we expect

* validate signed order schema

* give more descriptive variable names and test an unsigned order

* takeout unused var
2020-04-15 00:11:37 -04:00
F. Eugene Aumson
58d6256607 Bug fix: RFQ-T orders werent going through sorting 2020-04-13 12:53:08 -04:00
F. Eugene Aumson
b854fcdb72 Remove an unnecessary type annotation 2020-04-13 12:53:08 -04:00
F. Eugene Aumson
27ca75d94f Clarify parallelization of orderbook & RFQT
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406955099
2020-04-13 12:53:08 -04:00
F. Eugene Aumson
bb15f78af0 Validate maker endpoint responses with JSON Schema
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406957115
2020-04-13 12:53:08 -04:00
F. Eugene Aumson
ccc9e18132 Type Axios response with undefined, not void
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406956436
2020-04-13 12:53:08 -04:00
F. Eugene Aumson
d55108ab60 Eliminate unnecessary else
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405906319
2020-04-13 12:53:07 -04:00
Steve Klebanoff
84adbcb683 asset-swapper: Mockable axios for QuoteRequestor (#2549)
* Mockable axios for QuoteRequestor

* Move RFQT Mocker to src

* move MockedRfqtFirmQuoteResponse into types file

* fix import
2020-04-10 23:09:56 -04:00
F. Eugene Aumson
0cb5e4553b Await Axios response so we don't circumvent catch
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406604110
2020-04-10 15:34:06 -04:00
F. Eugene Aumson
264407b707 In Opts types, REQUIRE rfqt SUB-options
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406505994
2020-04-09 21:58:22 -04:00
F. Eugene Aumson
eb5ec58453 Add yarn prettier script, & call it from lint 2020-04-09 21:58:22 -04:00
F. Eugene Aumson
39c2a757be Promote a closure to a function
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405953107
2020-04-09 18:39:46 -04:00
F. Eugene Aumson
8cdc05f582 Promote max maker response time to a global option 2020-04-09 17:21:36 -04:00
F. Eugene Aumson
5f4778c852 Don't throw when RFQ-T client isn't whitelisted
Addresses review comments
https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405964457
and
https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406040453
2020-04-09 17:21:35 -04:00
F. Eugene Aumson
70add44fc1 Push RFQ-T opts to SwapQuoterReqOpts subnamespace
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405969509
2020-04-09 17:21:35 -04:00
F. Eugene Aumson
fa617d2e9d Demote public member to private
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405963834
2020-04-09 17:21:35 -04:00
F. Eugene Aumson
3c795d365d Demote instance member to just constructor a arg
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405963779
2020-04-09 17:21:35 -04:00
F. Eugene Aumson
93872ad7a3 Push RFQ-T opts to own SwapQuoterOpts subnamespace
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405963240
2020-04-09 17:21:35 -04:00
F. Eugene Aumson
227676c150 Remove unused intentOnFilling method parameter
Addresses review comments
https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405952889
and
https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406048104
2020-04-09 17:21:35 -04:00
F. Eugene Aumson
5f23833b43 rm unused SwapQuoteRequestOpts key enableRfqt
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406043111
2020-04-09 17:21:35 -04:00
F. Eugene Aumson
121d51b414 Use try...catch instead of Promise.catch()
Addresses review comments
https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405953735
and
https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405966703
2020-04-09 17:21:34 -04:00
Jacob Evans
0e196a59d9 Always use DFB in asset-swapper (#2542)
* Always use DFB in asset-swapper

* Clean up
2020-04-09 15:52:15 +10:00
F. Eugene Aumson
63bfd23310 Pass QuoteRequestor via SwapQuoteOpts not ctor arg
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405900525
2020-04-09 00:29:58 -04:00
F. Eugene Aumson
aadcf8fed0 Parallelize RFQ-T with orderbook query
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405905572
2020-04-09 00:29:57 -04:00
F. Eugene Aumson
37390e03b4 Use Array.push instead of Array.concat
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405905052
2020-04-09 00:09:10 -04:00
F. Eugene Aumson
98fc780ade Use map idiom instead of for loop
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405904035
2020-04-08 23:14:06 -04:00
F. Eugene Aumson
1670b21123 Use NULL_ADDRESS instead of literal
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405901406
2020-04-08 22:56:11 -04:00
F. Eugene Aumson
5602aacbd2 mk SwapQuoterOpt rfqtTakerApiKeyWhitelist optional
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405749147
2020-04-08 22:48:21 -04:00
F. Eugene Aumson
6ddbea207f Stop using 3rd party sphinx typehints plugin
Because sphinx itself supports typehints now, and a recent update to
plugin caused it to start spewing massive amounts of warnings.
2020-04-08 14:09:50 -04:00
F. Eugene Aumson
261bced822 Fix redundant docstrings and unpin sphinx
The latest version of Sphinx (documentation generation utility) was
giving a warning (which we were configured to treat as an error) about
there being multiple docstring definitions for the same class.  This had
never been flagged before.
2020-04-08 14:09:49 -04:00
Lawrence Forman
a80d1f861c Merge pull request #2536 from 0xProject/feat/asset-swapper/DexForwarderBridge-support
asset-swapper: DFB support + refactors
2020-04-07 14:35:01 -04:00
Lawrence Forman
c541340ef5 Update CHANGELOG.json
`@0x/contract-addresses`: Redeploy `DexForwarderBridge` on Mainnet with Gas Token freeing
`@0x/contract-addresses`: Revert to older Curve Bridge (without Gas Tokens)
2020-04-07 13:41:37 -04:00
Lawrence Forman
434af0ae64 @0x/contracts-asset-proxy: Update CHANGELOG 2020-04-07 13:38:35 -04:00
Jacob Evans
c6379ca1d4 Update DexForwarderBridge address 2020-04-07 12:35:18 -04:00
Jacob Evans
cdbcada49b Authorize sender adddress 2020-04-07 12:35:18 -04:00
Jacob Evans
282930cb9b Add GST support to DFB 2020-04-07 12:35:18 -04:00
Lawrence Forman
b09c751942 @0x/asset-swapper: Remove deprecated swap_quote_calculator tests 2020-04-07 12:35:18 -04:00
Lawrence Forman
b2047b90b3 @0x/asset-proxy: Fix failing test. 2020-04-07 12:35:18 -04:00
Lawrence Forman
0c8aec30bd @0x/asset-swapper: Fix linter lies. 2020-04-07 12:35:18 -04:00
Lawrence Forman
fafaa3e69b @0x/asset-swapper: Lint and remove @0x/contracts-asset-proxy dep. 2020-04-07 12:35:18 -04:00
Lawrence Forman
d19bb3de8d @0x/asset-swapper: Run prettier 2020-04-07 12:35:18 -04:00
Lawrence Forman
481136166c @0x/asset-swapper: Remove unused Order export from index.ts. 2020-04-07 12:35:18 -04:00
Lawrence Forman
4df81a0b9e @0x/asset-swapper: add quote fill simulation tests 2020-04-07 12:35:18 -04:00
Lawrence Forman
da1e9c2d97 @0x/asset-swapper: Add DFB support + refactor swap quote calculation utils 2020-04-07 12:35:18 -04:00
F. Eugene Aumson
4b5a02c246 asset-swapper, migrations: incl. prettier in lint 2020-04-07 01:41:47 -04:00
F. Eugene Aumson
0e1572cfd7 migrations: add yarn publish:private 2020-04-07 01:41:47 -04:00
F. Eugene Aumson
343caa1ff6 migrations: Deploy ERC20BridgeSampler 2020-04-07 01:41:47 -04:00
F. Eugene Aumson
403fb3826d asset-swapper: support firm RFQ-T quote requests 2020-04-07 01:41:47 -04:00
F. Eugene Aumson
3cdccb7b4e prep asset-swapper: rename variable 2020-04-07 00:48:25 -04:00
F. Eugene Aumson
d9be78cdb4 py/contract_wrappers: Pin sphinx to prev version (#2539) 2020-04-07 00:47:45 -04:00
F. Eugene Aumson
16dc8255e1 Pin pytests to ganache snapshot 6.0.0 (#2535) 2020-04-06 20:01:54 -04:00
Lawrence Forman
2086bfff25 Merge pull request #2532 from 0xProject/feat/sol-compiler/support-0.6
sol-compiler: 0.6 support
2020-04-01 15:07:18 -04:00
Lawrence Forman
b9a68c0b8e @0x/sol-compiler: Address review feedback. 2020-04-01 14:30:17 -04:00
Lawrence Forman
74647f0e88 @0x/sol-compiler: remove fs.promises usage 2020-04-01 13:42:48 -04:00
Lawrence Forman
6e29c8bea9 @0x/sol-compiler: Make source paths in output artifacts nicer if they're within modules.
`@0x/sol-compiler`: Makea Add v0.6 solidity test.
2020-04-01 13:42:48 -04:00
Lawrence Forman
b36373ab81 @0x/sol-compiler: Insert compiler version in input artifacts. 2020-04-01 13:42:48 -04:00
Lawrence Forman
dc437aacf1 @0x/sol-compiler`: Refactor + add solidity 0.6 support 2020-04-01 13:42:48 -04:00
Lawrence Forman
e19dae9b28 @0x/typescript-typings: Add version() to SolcInstance 2020-04-01 13:42:48 -04:00
Jacob Evans
424cbd4831 Forwarder Market sell specified amount or throw (#2521)
* Forwarder Market sell specified amount or throw

* Address feedback comments

* Break if we have only protocol fee remaining

* Lint

* Update deployed addresses

* Updated artifacts and wrappers

* [asset-swapper] Forwarder throws on market sell if amount not sold (#2534)
2020-03-31 16:25:34 +10:00
Lawrence Forman
350feed993 Merge pull request #2531 from 0xProject/feat/erc20-bridge-sampler/dev-utils-as-param
ERC20BridgeSampler: Pass in `DevUtils` address as a constructor arg
2020-03-30 18:02:33 -04:00
Jacob Evans
7ca4aa0ff4 [asset-swapper] Fix getBatchMarketBuyOrdersAsync (#2533) 2020-03-31 04:21:03 +10:00
Lawrence Forman
bf00e67245 Merge pull request #2525 from 0xProject/feat/bridge/DexForwarderBridge
DexForwarderBridge
2020-03-27 17:44:47 -04:00
Lawrence Forman
c5a6e49681 update ganache forwarder address 2020-03-27 16:50:11 -04:00
Lawrence Forman
a509af2875 @0x/contract-addresses: Add dexForwarderBridge address.
`@0x/migrations`: Add `dexForwarderBridge` address field.
2020-03-27 16:40:46 -04:00
Lawrence Forman
1f789bf396 @0x/contracts-asset-proxy: Add DexForwarderBridge.executeBridgeCall() test. 2020-03-27 16:39:57 -04:00
Lawrence Forman
0ccbc7d3d2 @0x/contracts-asset-proxy: Fix typos and remove BridgeTransferFromCallFailed event from DexForwarderBridge. 2020-03-27 16:39:57 -04:00
Lawrence Forman
f3c6f26f85 @0x/contracts-asset-proxy: Fix typo in DFB tests. 2020-03-27 16:39:57 -04:00
Lawrence Forman
338c358df2 @0x/contracts-asset-proxy: Address review comments. 2020-03-27 16:39:57 -04:00
Lawrence Forman
4bdaa48303 @0x/contracts-asset-proxy: Create DexForwarderBridge bridge contract. 2020-03-27 16:39:57 -04:00
Lawrence Forman
36267746da @0x/contracts-erc20-bridge-sampler: Cache DevUtils address in getOrderFillableTakerAssetAmounts. 2020-03-26 12:11:14 -04:00
Lawrence Forman
7775541eed @0x/contracts-integrations: Update ERC20BridgeSampler tests 2020-03-26 12:09:14 -04:00
Lawrence Forman
5029be4c83 @0x/contracts-erc20-bridge-sampler: Pass in DevUtils address as a constructor parameter 2020-03-26 11:58:25 -04:00
Jacob Evans
277dbacf68 Set GSTCollector address and deploy Curve (#2530)
* Set GSTCollector address and deploy Curve

* CHANGELOGs
2020-03-26 18:26:16 +10:00
Lawrence Forman
0fdfb03f3c Merge pull request #2529 from 0xProject/fix/contract-addresses/fix-dydx-bridge-mainnet-address
Fix DydxBridge addresses.
2020-03-25 23:30:00 -04:00
Lawrence Forman
17d81bf014 @0x/contract-addresses: Fix DydxBridge mainnet/kovan address.
`@0x/contract-addresses`: Lowercase GodsUnchained/broker addresses.
2020-03-25 22:40:18 -04:00
Jacob Evans
568e9be07e Gas Tokens in Bridges (#2523)
* Gas Tokens in Bridges

* Added freesGasTokensFromCollector.

To handle the case where GST2 is being traded and the balanceOf checks become confusing

* Update CHANGELOGs
2020-03-26 11:58:28 +10:00
Lawrence Forman
99b0a95f8a Merge pull request #2526 from 0xProject/fix/asset-swapper/optimizer-fee-bugs
AssetSwapper: Fix quote optimizer fee bug
2020-03-24 09:56:09 -04:00
Lawrence Forman
0fdd31892a @0x/asset-swapper: Fix quote optimizer bug not properly accounting for fees. 2020-03-20 15:59:48 -04:00
Lawrence Forman
7a682604f9 Merge pull request #2524 from 0xProject/feat/erc20-bridge/less-ambiguous-transfer-event-args
Rename `ERC20BridgeTransfer` event args
2020-03-13 23:04:57 -04:00
Lawrence Forman
ce96e35d7d @0x/contracts-asset-proxy: Rename ERC20BridgeTransfer event args to be less ambiguous. 2020-03-13 21:00:35 -04:00
Xianny
b7fb5394a7 add gitpkg to contract-wrappers (#2520) 2020-03-13 10:10:32 -07:00
Lawrence Forman
aaa62beca7 Merge pull request #2522 from 0xProject/fix/asset-swapper/fee-schedule
`@0x/asset-swapper`: Fix fee schedule not being scaled by gas price.
2020-03-13 01:14:23 -04:00
Lawrence Forman
2b58a7242b @0x/asset-swapper: Fix changelog. 2020-03-13 00:40:19 -04:00
Lawrence Forman
5ed919df79 @0x/asset-swapper: Fix fee schedule not being scaled by gas price. 2020-03-13 00:10:04 -04:00
Lawrence Forman
baf6372179 Merge pull request #2513 from 0xProject/feat/asset-swapper/death-to-reverts
Asset-swapper: Fallback orders + refactors
2020-03-12 18:45:27 -04:00
Lawrence Forman
1a9063a55b @0x/asset-swapper: Address review comments. 2020-03-11 12:24:32 -04:00
Lawrence Forman
87999f402f @0x/asset-swapper: Sort native path fills by ADJUSTED rate. 2020-03-11 01:17:23 -04:00
Lawrence Forman
109d466260 @0x/asset-swapper: Fix double bridgeSlippage on generated orders. 2020-03-10 23:02:41 -04:00
Lawrence Forman
37597eca75 @0x/asset-swapper: Fix getPathSize() and getAdjustedPathSize() bug.
`@0x/asset-swapper`: Add `maxFallbackSlippage` option.
2020-03-10 14:25:13 -04:00
Lawrence Forman
5fd767b739 @0x/instant: Fix changelog. 2020-03-10 13:25:39 -04:00
Lawrence Forman
0e7a473116 @0x/asset-swapper: Clean up source breakdown code a bit.
`@0x/asset-swapper`: Allow Kyber conflicts in fallback path.
2020-03-10 00:05:14 -04:00
Lawrence Forman
05bf55dca8 @0x/asset-swapper: Add gasSchedule option to SwapQuoter.
`@0x/asset-swapper`: Rename `fees` `SwapQuoter` option to `feeSchedule`.
2020-03-09 22:33:33 -04:00
Lawrence Forman
cc12ad8d86 @0x/asset-swapper: Only generate fallbacks for native orders in optimal path.
`@0x/asset-swapper`: Exclude conflicting sources across both optimal and fallback paths.
2020-03-09 21:44:30 -04:00
Lawrence Forman
847a7f470c @0x/instant: Fix for changed asset-swapper configs. 2020-03-09 21:44:30 -04:00
Lawrence Forman
95bebd6d1d @0x/asset-swapper: Clean up median price calls. 2020-03-09 21:44:30 -04:00
Lawrence Forman
8179a964ea @0x/asset-swapper: Reintroduce runLimit option.
`@0x/asset-swapper`: Make native fills one single path.
`@0x/asset-swapper`: Redo the optimizer algo again to be more thorough.
`@0x/asset-swapper`: Make `getMedianSellRate()` return `1` if maker token == taker token.
2020-03-09 21:44:30 -04:00
Lawrence Forman
d0805d4bbb @0x/asset-swapper: Rebase and fix some minor bugs. 2020-03-09 21:44:29 -04:00
Lawrence Forman
f901c401b7 rebase 2020-03-09 21:44:29 -04:00
Lawrence Forman
6ccadcb928 @0x/asset-swapper: Refactor market op utils.
`@0x/asset-swapper`: add fallback orders.
`@0x/asset-swapper`: Remove `noConflicts` and `dustThreshold` options.
`@0x/asset-swapper`: Add `allowFallback` option.
2020-03-09 21:44:29 -04:00
Daniel Pyrathon
58b6c25d5c Merge pull request #2519 from 0xProject/PirosB3-patch-1
Update addresses.json
2020-03-09 10:44:44 -07:00
Daniel Pyrathon
9cbab26202 added CHANGELOG changes 2020-03-09 10:36:32 -07:00
Daniel Pyrathon
74bcb468ca Update addresses.json 2020-03-09 10:23:20 -07:00
Daniel Pyrathon
07a6ba88f4 Merge pull request #2515 from 0xProject/PirosB3-patch-1
Update CHANGELOG.json
2020-03-06 13:44:22 -08:00
Daniel Pyrathon
49dff49993 Update CHANGELOG.json 2020-03-06 12:47:18 -08:00
Daniel Pyrathon
68207aac80 Merge pull request #2505 from 0xProject/feature/plp-integration
🔂 Liquidity Provider Asset Swapper integration
2020-03-06 12:34:45 -08:00
Francesco Agosti
64652b2ff0 Merge pull request #2514 from 0xProject/feat/add-gitpkg-to-contract-addresses
Add private:publish to contract-addresses
2020-03-06 12:17:22 -08:00
Daniel Pyrathon
659e8991de Completed feedback 2020-03-06 12:02:36 -08:00
fragosti
9f495b6dc9 Add private:publish to contract-addresses 2020-03-06 11:32:08 -08:00
Daniel Pyrathon
d8498134ad Merge branch 'development' of github.com:0xProject/0x-monorepo into feature/plp-integration
# Conflicts:
#	packages/contract-addresses/addresses.json
#	packages/contract-wrappers/package.json
2020-03-06 09:59:16 -08:00
Daniel Pyrathon
17b2320b0d remove unit tests that were ported to erc20-bridge-sampler package 2020-03-06 09:53:54 -08:00
Daniel Pyrathon
36c457f483 added unit tests for the Liquidity Provider 2020-03-06 09:47:17 -08:00
Lawrence Forman
b8ec7f5e26 Merge pull request #2512 from 0xProject/fix/contracts/bridges-usdt-fix
Bridges: USDT/KNC fix + ERC20BridgeTransfer events
2020-03-05 19:41:55 -05:00
Daniel Pyrathon
dbc5c0d5d8 moved unit tests to the appropriate sections 2020-03-05 16:29:34 -08:00
Daniel Pyrathon
fa886aa849 prettify and lint 2020-03-05 16:21:15 -08:00
Daniel Pyrathon
32e1ae2b18 added unit tests to avoid regression due to variable order 2020-03-05 16:07:49 -08:00
Daniel Pyrathon
61f03b0ea2 invert maker and taker token variable 2020-03-05 16:07:10 -08:00
Lawrence Forman
c47825a820 @0x/contract-addresses: Redeploy bridges. 2020-03-05 18:39:48 -05:00
Lawrence Forman
2d7cb63c7b @0x/contracts-asset-proxy: Address review comments. 2020-03-05 18:21:38 -05:00
Lawrence Forman
c3d4c13936 @0x/contracts-erc20: Switch LibERC20Token.approveIfBelowMax() to LibERC20Token.approveIfBelow().
`@0x/contracts-asset-proxy`: Use `LibERC20Token.approveIfBelow()` for bridge approvals.
2020-03-05 18:21:38 -05:00
Lawrence Forman
3f51b9322f @0x/contracts-asset-proxy: Emit ERC20BridgeTransfer events in bridges. 2020-03-05 18:21:38 -05:00
Lawrence Forman
b604e2bd4e @0x/contracts-erc20: Add LibERC20Token.approveIfBelowMax().
`@0x/contracts-asset-proxy`: Use `LibERC20Token.approveIfBelowMax` in all DEX bridges.
2020-03-05 18:21:38 -05:00
mzhu25
bcd92473d1 Merge pull request #2511 from 0xProject/feature/extensions/max-gasprice-orders
`@0x/contracts-extensions`: Maximum gas price contract
2020-03-05 12:30:03 -08:00
Michael Zhu
6f5bf9d146 Add artifacts, wrappers, and addresses 2020-03-05 10:53:02 -08:00
Michael Zhu
490094939f Address comments 2020-03-04 22:12:48 -08:00
Daniel Pyrathon
d0d7d2772f upgrades contracts-erc20-bridge-sampler dependency 2020-03-04 14:33:43 -08:00
Daniel Pyrathon
59091896b4 Merge branch 'development' of github.com:0xProject/0x-monorepo into feature/plp-integration
# Conflicts:
#	packages/asset-swapper/package.json
#	packages/asset-swapper/src/utils/market_operation_utils/sampler.ts
#	packages/asset-swapper/src/utils/market_operation_utils/types.ts
#	packages/asset-swapper/test/market_operation_utils_test.ts
2020-03-04 14:11:17 -08:00
Daniel Pyrathon
3eb1429a25 adds possibility to exclude PLP 2020-03-04 13:50:07 -08:00
Daniel Pyrathon
bc7504c469 refresh wrappers and artifacts 2020-03-04 08:24:35 -08:00
Daniel Pyrathon
99dc4b8e07 refactor more code 2020-03-04 08:17:01 -08:00
Daniel Pyrathon
807904bb86 addressed PR comments 2020-03-04 07:59:09 -08:00
Francesco Agosti
7b8c8348f4 Merge pull request #2502 from 0xProject/feat/gitpkg-asset-swapper
Install gitpkg in asset-swapper
2020-03-04 07:30:22 -08:00
Michael Zhu
9c5ac26170 Update changelog 2020-03-03 17:30:53 -08:00
Michael Zhu
5db065644c Add tooling and unit tests 2020-03-03 17:30:53 -08:00
Alex Towle
0cc3a99169 Merge pull request #2504 from 0xProject/feature/better_resolver_errors
Update resolver errors to include parent filename
2020-03-03 16:56:26 -08:00
Michael Zhu
2b1545145b MaximumGasPrice contract 2020-03-03 15:39:45 -08:00
Daniel Pyrathon
49b7c9c8a4 update sampler address 2020-03-03 14:02:15 -08:00
fragosti
114119f7c8 Build before publish 2020-03-03 13:45:25 -08:00
fragosti
b4ef866c10 Update gitpkg to use fork 2020-03-03 13:27:43 -08:00
Jacob Evans
15f75a08d5 Publish
- @0x/contracts-asset-proxy@3.2.5
 - @0x/contracts-broker@1.1.4
 - @0x/contracts-coordinator@3.1.5
 - @0x/contracts-dev-utils@1.3.3
 - @0x/contracts-erc1155@2.1.5
 - @0x/contracts-erc20-bridge-sampler@1.5.1
 - @0x/contracts-erc20@3.1.5
 - @0x/contracts-erc721@3.1.5
 - @0x/contracts-exchange-forwarder@4.2.5
 - @0x/contracts-exchange-libs@4.3.5
 - @0x/contracts-exchange@3.2.5
 - @0x/contracts-extensions@6.1.5
 - @0x/contracts-integrations@2.5.1
 - @0x/contracts-multisig@4.1.5
 - @0x/contracts-staking@2.0.12
 - @0x/contracts-test-utils@5.3.2
 - @0x/contracts-utils@4.4.3
 - 0x.js@9.1.5
 - @0x/asset-swapper@4.4.0
 - @0x/contract-addresses@4.9.0
 - @0x/contract-wrappers-test@12.2.13
 - @0x/contract-wrappers@13.6.3
 - @0x/instant@1.0.50
 - @0x/migrations@6.2.4
 - @0x/order-utils@10.2.4
 - @0x/orderbook@2.2.5
2020-03-03 18:26:46 +11:00
Jacob Evans
29f9c5473d Updated CHANGELOGS & MD docs 2020-03-03 18:26:14 +11:00
Jacob Evans
ea1528aea6 [asset-swapper] Add latest BUSD Curve (#2506)
* [asset-swapper] Add latest BUSD Curve

* Update Compound Curve
2020-03-03 17:53:35 +11:00
Daniel Pyrathon
18ce19a84d refactored imports 2020-03-02 11:03:11 -08:00
Daniel Pyrathon
b0fd78d68d added linting to the contracts 2020-03-02 10:48:52 -08:00
Daniel Pyrathon
8186d6277e fixed a bug with imports 2020-03-02 10:16:40 -08:00
Daniel Pyrathon
599af2b1a9 factored out interfaces in types.ts 2020-03-02 10:12:51 -08:00
Daniel Pyrathon
82de5adbe9 refactored sampler operations into a single external file 2020-03-02 10:06:43 -08:00
Daniel Pyrathon
82b0f85258 transformed the new artifacts 2020-03-02 10:01:06 -08:00
David Sun
cded58c30d Merge pull request #2491 from 0xProject/fix/instant/support-erc721
[FIX] Instant + Asset-swapper support for ERC721
2020-03-01 14:57:18 -05:00
David Sun
da17b49b81 added changelog 2020-03-01 13:54:14 -05:00
David Sun
4728cdfa7c added changelog 2020-03-01 13:36:56 -05:00
Alex Towle
d97b30dcee Improve error message for nested errors 2020-02-28 17:11:30 -08:00
Daniel Pyrathon
fa8e8ad52d Update artifacts after rename 2020-02-28 17:09:48 -08:00
Daniel Pyrathon
7495ac8111 performed a rename 2020-02-28 16:54:05 -08:00
Daniel Pyrathon
08619e2c06 re-generate ERC20BridgeSampler artifacts 2020-02-28 15:59:46 -08:00
Daniel Pyrathon
5d4bbd5b37 Merge branch 'development' of github.com:0xProject/0x-monorepo into feature/plp-integration
# Conflicts:
#	packages/asset-swapper/package.json
2020-02-28 15:50:34 -08:00
Daniel Pyrathon
9d2aef5006 Added linting and prettifying 2020-02-28 12:36:47 -08:00
Daniel Pyrathon
bcc3e5ebb0 refactor tests, and add more tests 2020-02-28 12:28:09 -08:00
Daniel Pyrathon
e5df51a83a tidy up tests, add other tests 2020-02-28 12:12:58 -08:00
David Sun
97fb843f01 prettier 2020-02-28 14:03:54 -05:00
David Sun
8afb044877 address feedback 2020-02-28 13:15:50 -05:00
David Sun
7f869868c9 prettier + lint 2020-02-28 13:13:46 -05:00
David Sun
31275228ac patch asset-swapper to support ERC721 2020-02-28 13:13:18 -05:00
Daniel Pyrathon
7181be8768 added more unit tests, reinforced existing tests, added more implementation 2020-02-28 10:02:18 -08:00
Lawrence Forman
3b446e887a Merge pull request #2503 from 0xProject/feat/deploy-erc20-bridge-sampler
Redeploy `ERC20BridgeSampler`
2020-02-28 12:01:06 -05:00
Lawrence Forman
431196c391 @0x/contract-addresses: Redeploy ERC20BridgeSampler. 2020-02-28 01:18:24 -05:00
Daniel Pyrathon
9608d8fb46 added more unit tests for PLP DEX sampling 2020-02-27 16:03:44 -08:00
mzhu25
d574ca1628 Merge pull request #2501 from 0xProject/fix/bridge-sampler/get-liquidity-provider-from-registry
Fix getLiquidityProviderFromRegistry
2020-02-27 14:09:28 -08:00
Daniel Pyrathon
8be60e2ff5 initial unit tests for DEX sampler 2020-02-27 14:00:08 -08:00
Daniel Pyrathon
3c0fd540b1 generated wrappers for ERC20 sampler 2020-02-27 13:53:52 -08:00
fragosti
23a7dc9a8a Install gitpkg in asset-swapper 2020-02-27 13:51:28 -08:00
Michael Zhu
f97e6892b6 Fix getLiquidityProviderFromRegistry 2020-02-27 13:39:03 -08:00
Jacob Evans
7742901e5c Publish
- @0x/contracts-asset-proxy@3.2.4
 - @0x/contracts-broker@1.1.3
 - @0x/contracts-coordinator@3.1.4
 - @0x/contracts-dev-utils@1.3.2
 - @0x/contracts-erc1155@2.1.4
 - @0x/contracts-erc20-bridge-sampler@1.5.0
 - @0x/contracts-erc20@3.1.4
 - @0x/contracts-erc721@3.1.4
 - @0x/contracts-exchange-forwarder@4.2.4
 - @0x/contracts-exchange-libs@4.3.4
 - @0x/contracts-exchange@3.2.4
 - @0x/contracts-extensions@6.1.4
 - @0x/contracts-integrations@2.5.0
 - @0x/contracts-multisig@4.1.4
 - @0x/contracts-staking@2.0.11
 - @0x/contracts-test-utils@5.3.1
 - @0x/contracts-utils@4.4.2
 - 0x.js@9.1.4
 - @0x/asset-swapper@4.3.2
 - @0x/contract-addresses@4.8.0
 - @0x/contract-wrappers-test@12.2.12
 - @0x/contract-wrappers@13.6.2
 - @0x/instant@1.0.49
 - @0x/migrations@6.2.3
 - @0x/order-utils@10.2.3
 - @0x/orderbook@2.2.4
2020-02-28 08:13:33 +11:00
Jacob Evans
de68cb25d0 Updated CHANGELOGS & MD docs 2020-02-28 08:13:09 +11:00
Daniel Pyrathon
77d7afe505 created DummyPLPRegistry and DummyPLP + generated wrappers for these new contracts and their respective interfaces 2020-02-27 12:52:13 -08:00
Daniel Pyrathon
68fb6c2c27 Merge pull request #2499 from 0xProject/feature/erc20-bridge-sampler/liquidity-provider-registry
`@0x/contracts-erc20-bridge-sampler`: LiquidityProviderRegistry
2020-02-27 12:37:10 -08:00
Michael Zhu
a47c031ad1 Catch reverts when calling registry 2020-02-27 11:23:25 -08:00
Michael Zhu
817049456c Get liquidity provider from registry in the sampler 2020-02-27 11:05:56 -08:00
Lawrence Forman
e1a061789f Merge pull request #2500 from 0xProject/fix/asset-swapper/native-order-prune
[asset-swapper] Fix native fill prune
2020-02-27 13:38:49 -05:00
Jacob Evans
28573ba772 [asset-swapper] Fix native fill prune 2020-02-27 16:42:20 +11:00
David Sun
880b9413f6 Merge pull request #2492 from 0xProject/fix/instant/constant-polling
[Fix] Instant call destroyAsync on unmount
2020-02-26 19:36:48 -05:00
mzhu25
9a7c4b21a9 @0x/contracts-erc20-bridge-sampler: Generic liquidity provider sampling (#2487)
* Add methods to Sampler contract to plug into generic on-chain liquidity provider
2020-02-26 11:54:48 -08:00
mzhu25
ac56038eca Add Broker, GodsUnchainedValidator, ChainlinkStopLimit to ContractAddresses interface (#2498) 2020-02-26 11:54:32 -08:00
Lawrence Forman
4dd2fb6903 Merge pull request #2478 from 0xProject/feat/contracts/integrations/chai-bridge-benchmarks
`@0x/contracts-integrations`: Add `ChaiBridge` and `DydxBridge` gas b…
2020-02-26 14:17:15 -05:00
Lawrence Forman
0baec61f06 @0x/contracts/integrations: Update wallets and add comments with last run gas costs to benchmarks. 2020-02-26 12:57:03 -05:00
Lawrence Forman
d4751788d1 @0x/contracts-integrations: Add ChaiBridge and DydxBridge gas benchmark tests. 2020-02-26 11:29:44 -05:00
Lawrence Forman
ae68c061d1 @0x/asset-proxy: Add more functions to IDydx.
`@0x/dev-utils`: Fix all the weird dydx base unit madness.
2020-02-26 11:29:26 -05:00
Lawrence Forman
b0387245f0 @0x/contracts-utils: Roll back additions to LibFractions.
`@0x/contracts-dev-utils`: Add `D18` library for working with base-10, 18-digit decimals.
`@0x/contracts-dev-utils`: Use `D18` library instead of `LibFractions` in `LibDydxBalance`.
2020-02-26 11:29:16 -05:00
Lawrence Forman
c2d06a4a23 Cherry pick dydx validation from #2456 2020-02-26 11:29:02 -05:00
Lawrence Forman
270108abb7 Cherry pick DevUtils refactor code from #2456 2020-02-26 11:26:57 -05:00
Lawrence Forman
e76c33232d Cherry-pick changes from feat/dev-utils/dydx-bridge-validation 2020-02-26 11:26:57 -05:00
Jacob Evans
58ff2dc492 Publish
- @0x/contracts-asset-proxy@3.2.3
 - @0x/contracts-broker@1.1.2
 - @0x/contracts-coordinator@3.1.3
 - @0x/contracts-dev-utils@1.3.1
 - @0x/contracts-erc1155@2.1.3
 - @0x/contracts-erc20-bridge-sampler@1.4.2
 - @0x/contracts-erc20@3.1.3
 - @0x/contracts-erc721@3.1.3
 - @0x/contracts-exchange-forwarder@4.2.3
 - @0x/contracts-exchange-libs@4.3.3
 - @0x/contracts-exchange@3.2.3
 - @0x/contracts-extensions@6.1.3
 - @0x/contracts-integrations@2.4.2
 - @0x/contracts-multisig@4.1.3
 - @0x/contracts-staking@2.0.10
 - @0x/contracts-utils@4.4.1
 - 0x.js@9.1.3
 - @0x/abi-gen@5.2.2
 - @0x/asset-swapper@4.3.1
 - @0x/contract-wrappers-test@12.2.11
 - @0x/instant@1.0.48
 - @0x/migrations@6.2.2
 - @0x/orderbook@2.2.3
 - @0x/sol-doc@3.1.6
2020-02-26 11:34:29 +11:00
Jacob Evans
13c45a0e96 Updated CHANGELOGS & MD docs 2020-02-26 11:34:00 +11:00
henrynguyen5
90cb86911a Update resolver errors to include parent filename 2020-02-25 18:40:45 -05:00
Jacob Evans
be7b1a1bd4 Include bin in npm publish (#2496)
* Include bin in npm publish

* Include bin in files

* Update CHANGELOG

* Changelog
2020-02-26 10:12:52 +11:00
Amir Bandeali
132a3c6705 Merge pull request #2495 from 0xProject/feat/defaults-should-save-standard-input
Update boilerplate
2020-02-25 10:56:26 -08:00
Amir
5e73257557 Set shouldSaveStandardInput to true in all compiler.json files 2020-02-25 10:04:19 -08:00
Amir
e83346fbbb Do not prettify Solidity 2020-02-25 10:04:19 -08:00
Jacob Evans
2dd47a2103 Publish
- @0x/contracts-asset-proxy@3.2.2
 - @0x/contracts-broker@1.1.1
 - @0x/contracts-coordinator@3.1.2
 - @0x/contracts-dev-utils@1.3.0
 - @0x/contracts-erc1155@2.1.2
 - @0x/contracts-erc20-bridge-sampler@1.4.1
 - @0x/contracts-erc20@3.1.2
 - @0x/contracts-erc721@3.1.2
 - @0x/contracts-exchange-forwarder@4.2.2
 - @0x/contracts-exchange-libs@4.3.2
 - @0x/contracts-exchange@3.2.2
 - @0x/contracts-extensions@6.1.2
 - @0x/contracts-integrations@2.4.1
 - @0x/contracts-multisig@4.1.2
 - @0x/contracts-staking@2.0.9
 - @0x/contracts-test-utils@5.3.0
 - @0x/contracts-utils@4.4.0
 - 0x.js@9.1.2
 - @0x/abi-gen@5.2.1
 - @0x/assert@3.0.7
 - @0x/asset-swapper@4.3.0
 - @0x/base-contract@6.2.1
 - @0x/connect@6.0.7
 - @0x/contract-addresses@4.7.0
 - @0x/contract-artifacts@3.6.1
 - @0x/contract-wrappers-test@12.2.10
 - @0x/contract-wrappers@13.6.1
 - @0x/contracts-gen@2.0.8
 - @0x/dev-utils@3.2.1
 - @0x/instant@1.0.47
 - @0x/json-schemas@5.0.7
 - @0x/migrations@6.2.1
 - @0x/monorepo-scripts@1.0.51
 - @0x/order-utils@10.2.2
 - @0x/orderbook@2.2.2
 - @0x/sol-compiler@4.0.8
 - @0x/sol-coverage@4.0.8
 - @0x/sol-doc@3.1.5
 - @0x/sol-profiler@4.0.8
 - @0x/sol-trace@3.0.8
 - @0x/sol-tracing-utils@7.0.8
 - @0x/sra-spec@3.0.7
 - @0x/subproviders@6.0.8
 - @0x/utils@5.4.1
 - @0x/web3-wrapper@7.0.7
2020-02-25 20:43:55 +11:00
Jacob Evans
f31e530b6e Updated CHANGELOGS & MD docs 2020-02-25 20:43:31 +11:00
Jacob Evans
eb50f3fa9c Xlab/fix/extra space (#2494)
* Fix extra space in `provider.send` signature from fabio. Fixes #2285.

* Fix style and update changelog.

Co-authored-by: Maxim <max@kc.vc>
2020-02-25 19:56:33 +11:00
Lawrence Forman
8417fe4fdb Merge pull request #2493 from 0xProject/feat/redeploy-devutils
Redeploy DevUtils
2020-02-25 00:40:58 -05:00
Lawrence Forman
0f1c15a6ca Asset-Swapper: Incorporate fees into fill path optimization (#2481)
* `@0x/asset-swapper`: Incorporate fees into fill optimization.

* `@0x/asset-swapper`: Address review comments.

* `@0x/asset-swapper`: Rebase and update tests for curve.

* `@0x/asset-swapper`: Bring back a form of native order pruning.
`@0x/asset-swapper`: Bring back dust thresholds.
`@0x/asset-swapper`: Avoid calling `getMedianSellRate()` if output token is ETH.

* Update devdoc for `fees` option

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-02-25 14:47:33 +11:00
Lawrence Forman
9345c4fb7f @0x/contract-addresses: Update DevUtils addresses. 2020-02-24 12:47:33 -05:00
Lawrence Forman
5e0758917b @0x/contracts-utils: Update DevUtils address in DeploymentConstants. 2020-02-24 12:42:01 -05:00
David Sun
f56839ec6b call destroyAsync on unmount 2020-02-24 12:24:07 -05:00
Lawrence Forman
cbb23a42e2 Merge pull request #2466 from 0xProject/feat/contracts/dev-utils/dydx-validation
DevUtils: DydxBridge validation
2020-02-20 13:36:22 -07:00
Kim Persson
5a59c286d0 Merge pull request #2488 from 0xProject/kim/fix-readme-spelling
FIXES spelling in exchange readme
2020-02-20 17:27:32 +01:00
Kim Persson
2e8c600d7a FIXES spelling in exchange readme 2020-02-20 14:45:53 +01:00
Lawrence Forman
e851cb1cbc @0x/contracts-dev-utils: Move D18 out to @0x/contracts-utils. 2020-02-19 16:19:38 -05:00
Lawrence Forman
3da03da32a @0x/contracts-utils: Add D18 library. 2020-02-19 16:19:09 -05:00
Lawrence Forman
3ec8924e7f @0x/contracts-dev-utils: Rebase. 2020-02-19 16:02:35 -05:00
Lawrence Forman
a04722b612 @0x/contracts-integrations: Add USDC->DAI forked dydx bridge order validation. 2020-02-19 15:51:05 -05:00
Lawrence Forman
f9a7857a90 @0x/contracts-dev-utils: Address review comments. 2020-02-19 15:51:05 -05:00
Lawrence Forman
58f772c74e foo 2020-02-19 15:51:05 -05:00
Lawrence Forman
a425c7e260 Regenerate artifacts and wrappers 2020-02-19 15:50:10 -05:00
Lawrence Forman
809885afd0 @0x/contracts-asset-proxy: Add getMarketMarginPremium() to IDydx.
`@0x/contracts-dev-utils`: Handle dydx market premiums.
2020-02-19 15:49:41 -05:00
Lawrence Forman
bf9b4b993f @0x/contracts-test-utils: Fix blockchainTests fork config to work with other tests. 2020-02-19 15:49:41 -05:00
Lawrence Forman
d94a26f0f4 @0x/contracts-integrations: Add DydxBridge validation integration tests. 2020-02-19 15:49:41 -05:00
Lawrence Forman
bd9c9cedca @0x/contracts-test-utils: Add blockchainTests.config 2020-02-19 15:45:27 -05:00
Lawrence Forman
651e94bd94 @0x/asset-proxy: Add more functions to IDydx.
`@0x/dev-utils`: Fix all the weird dydx base unit madness.
2020-02-19 15:45:27 -05:00
Lawrence Forman
162b6f1a74 @0x/dev-utils: Fix dydx min CR not being +1.
`@0x/dev-utils`: Fix withdraw rate vs order conversion rate check .
2020-02-19 15:45:27 -05:00
Lawrence Forman
865a253eb5 @0x/contracts-utils: Roll back additions to LibFractions.
`@0x/contracts-dev-utils`: Add `D18` library for working with base-10, 18-digit decimals.
`@0x/contracts-dev-utils`: Use `D18` library instead of `LibFractions` in `LibDydxBalance`.
2020-02-19 15:45:27 -05:00
Lawrence Forman
9b3781abf1 Cherry pick dydx validation from #2456 2020-02-19 15:45:27 -05:00
Lawrence Forman
d89243a0d3 Cherry pick DevUtils refactor code from #2456 2020-02-19 15:44:59 -05:00
Lawrence Forman
b4cefc64b4 Cherry pick library linking code from #2456 2020-02-19 15:44:59 -05:00
Lawrence Forman
2fd26587e5 Cherry-pick changes from feat/dev-utils/dydx-bridge-validation 2020-02-19 15:44:59 -05:00
David Sun
282a351859 Merge pull request #2404 from 0xProject/feature/instant/fortmatic-integration
Formatic integration into instant
2020-02-18 13:58:10 -06:00
David Sun
a84b848ea9 prettier 2020-02-18 14:20:30 -05:00
David Sun
d329320fc2 linted 2020-02-18 14:02:48 -05:00
David Sun
bc096554b5 fixed webpack issues 2020-02-18 13:58:22 -05:00
David Sun
5902d878d8 fixed affiliate + fortmatic 2020-02-18 12:13:38 -05:00
Jacob Evans
4a133ca36f Publish
- @0x/contracts-asset-proxy@3.2.1
 - @0x/contracts-broker@1.1.0
 - @0x/contracts-coordinator@3.1.1
 - @0x/contracts-dev-utils@1.1.1
 - @0x/contracts-erc1155@2.1.1
 - @0x/contracts-erc20-bridge-sampler@1.4.0
 - @0x/contracts-erc20@3.1.1
 - @0x/contracts-erc721@3.1.1
 - @0x/contracts-exchange-forwarder@4.2.1
 - @0x/contracts-exchange-libs@4.3.1
 - @0x/contracts-exchange@3.2.1
 - @0x/contracts-extensions@6.1.1
 - @0x/contracts-integrations@2.4.0
 - @0x/contracts-multisig@4.1.1
 - @0x/contracts-staking@2.0.8
 - @0x/contracts-test-utils@5.1.5
 - @0x/contracts-utils@4.3.1
 - 0x.js@9.1.1
 - @0x/asset-swapper@4.2.0
 - @0x/contract-addresses@4.6.0
 - @0x/contract-artifacts@3.6.0
 - @0x/contract-wrappers-test@12.2.9
 - @0x/contract-wrappers@13.6.0
 - @0x/instant@1.0.46
 - @0x/migrations@6.2.0
 - @0x/order-utils@10.2.1
 - @0x/orderbook@2.2.1
2020-02-15 17:39:09 +11:00
Jacob Evans
f7252f919a Updated CHANGELOGS & MD docs 2020-02-15 17:38:47 +11:00
Jacob Evans
e05a03a842 Curve ERC20Bridge (#2480)
* Curve ERC20Bridge

* ERC20BridgeSampler Curve (#2483)

* ERC20Sampler Curve

* Use Bridge Sources for each Curve

* Support multiple versions of the Curve contract

* CHANGELOG and redeployed Curve (mainnet)

* Fix Market ops utils test

* Added Curve DAI USDC USDT TUSD

* Bump sampler gas limit default

* Decode the Curve in tests

* Disable Curve in Buy tests

* blockchainTests.fork.resets Curve and Sampler
2020-02-15 17:02:19 +11:00
mzhu25
dcce8276b8 Add decoders for broker and stop-limit data (#2484)
* Add decoders for broker and stop-limit data

* update changelogs

* Address comments
2020-02-14 17:38:43 -08:00
Alex Towle
fd47947e55 Merge pull request #2454 from 0xProject/fix/dev-utils/and-another-one
Another one...
2020-02-13 20:45:34 -08:00
Alex Towle
ae151df2eb Addressed amir's review feedback 2020-02-13 18:07:45 -08:00
Alex Towle
79de188683 Updated addresses again 2020-02-13 17:37:03 -08:00
Alex Towle
6e5c788e13 Added a test that fails for the old DevUtils 2020-02-13 17:37:03 -08:00
Alex Towle
f53606007d Updated DevUtils again 2020-02-13 17:37:03 -08:00
Greg Hysz
a4ac418bc9 Merge pull request #2479 from 0xProject/test/dydx-mainnet-tests/updateDeployment
Fixed dYdX Bridge Tests
2020-02-13 14:42:47 -08:00
Greg Hysen
a8c09d0bdb Updated contracts-integrations changelog. 2020-02-13 13:21:07 -08:00
Greg Hysen
871105a48a Fixed dYdX Bridge Tests 2020-02-13 13:19:26 -08:00
Fabio B
3b61129ade Update link to docs for web3-wrapper 2020-02-12 22:08:10 +01:00
mzhu25
f471c79b59 Chainlink stop-limit orders (#2473)
* Contracts for Chainlink stop-limit orders

* Tests and asset data utils

* Update contracts-integrations changelog

* Address comments

* Remove priceFreshness parameter

* Remove LibSafeMath

* fix typo

* Add ChainlinkStopLimit addresses to @0x/contract-addresses
2020-02-11 15:10:06 -08:00
Lawrence Forman
dfd9443f74 Merge pull request #2477 from 0xProject/feat/batched-sampler
ERC20BridgeSampler: batchCall()
2020-02-11 14:32:48 -07:00
Lawrence Forman
a36ff9e365 `@0x/asset-swapper: Address review comments. 2020-02-11 12:08:15 -07:00
Lawrence Forman
12e65bbf26 @0x/contracts-erc20-bridge-sampler: Fix failing tests. 2020-02-11 12:08:15 -07:00
Lawrence Forman
ab9841e60b @0x/contract-addresses: Update ERC20BridgeSampler addresses on mainnet and kovan. 2020-02-11 12:08:15 -07:00
Lawrence Forman
7a52f12e57 Rebase and update contract artifacts + wrappers. 2020-02-11 12:07:48 -07:00
Lawrence Forman
11fd4506ac @0x/asset-swapper: Fix failing asset-swapper test. 2020-02-11 12:07:48 -07:00
Lawrence Forman
0c9c68030e @0x/asset-swapper: Use batchCall() version of the ERC20BridgeSampler contract 2020-02-11 12:07:48 -07:00
Lawrence Forman
55d6eddbb2 @0x/contract-artifacts: Update IERC20BridgeSampler wrapper. 2020-02-11 12:07:48 -07:00
Lawrence Forman
8341e60edb @0x/contract-artifacts: Update ERC20BridgeSampler artifact. 2020-02-11 12:07:48 -07:00
Lawrence Forman
6273a1ca73 @0x/contracts-erc20-bridge-sampler: Remove wrapper functions and introduce batchCall(). 2020-02-11 12:07:48 -07:00
mzhu25
1b83ebdf89 Merge pull request #2469 from 0xProject/feature/broker/deployments
Broker-related updates to contract-artifacts, contract-wrappers, contract-addresses
2020-02-10 18:41:24 -08:00
Michael Zhu
fef7f0506f rebase 🙄 2020-02-10 17:38:16 -08:00
Michael Zhu
f44eb4e383 Update changelogs for Forwarder changes 2020-02-10 17:11:01 -08:00
Michael Zhu
05df485c4a Update Forwarder in contract-artifacts and contract-wrappers 2020-02-10 17:11:00 -08:00
Michael Zhu
44857c526b Remove DutchAuction and OrderValidator from python contract addresses 2020-02-10 17:10:36 -08:00
Michael Zhu
b8ad5d5d32 Update Forwarder addresses 2020-02-10 17:10:36 -08:00
Michael Zhu
e3e0d00e21 Add Broker and GodsUnchainedValidator to contract-wrappers 2020-02-10 17:10:14 -08:00
Michael Zhu
a9b1ea9690 Add Broker and GodsUnchainedValidator to contract-addresses 2020-02-10 17:09:34 -08:00
Michael Zhu
8e5dd0f8d9 Add Broker and GodsUnchainedValidator to contract-artifacts 2020-02-10 17:08:24 -08:00
David Sun
3b0c8f6d92 fortmatic patches 2020-02-09 21:08:46 -05:00
David Sun
21058c2227 changes to fetch account state behavior 2020-02-09 21:08:46 -05:00
David Sun
f3b8ae0781 fix for fortmatic 2020-02-09 21:08:46 -05:00
David Sun
d590b004c1 incomplete, fixes for heartbeater 2020-02-09 21:08:46 -05:00
David Sun
02e21141c6 added minor polish + bug fixes 2020-02-09 21:08:46 -05:00
David Sun
f839a3087d add yarn.lock 2020-02-09 21:08:46 -05:00
David Sun
f458815541 fixing + testing fortmatic integration 2020-02-09 21:08:46 -05:00
apane
7ba754d2a4 Fixs styling 2020-02-09 21:08:46 -05:00
apane
09706e4ae2 Fix metamask logo size on connect and on install 2020-02-09 21:08:46 -05:00
apane
d18de4c541 Fixs styling
Removes unused imports
2020-02-09 21:08:46 -05:00
apane
001c7bfdbc Fixs order details only when a wallet is connected 2020-02-09 21:08:46 -05:00
apane
d4e04dc712 Fix chevron icon
Fixs metamask icon size
2020-02-09 21:08:46 -05:00
apane
8650cb5217 Disables order details if no payment method is selected 2020-02-09 21:08:46 -05:00
apane
0eaaddeb95 Removes unused colors
Adds white background
Adds phone.svg
2020-02-09 21:08:46 -05:00
apane
1cf8663f20 Adds phone svg
Updates design of payment methods
2020-02-09 21:08:46 -05:00
apane
5130259552 Remove icon on connect button 2020-02-09 21:08:46 -05:00
apane
ba5e19a015 Fix lint errors
Remove icon
2020-02-09 21:08:46 -05:00
apane
c0400fa986 Removes onUnlockFormatic, just uses onUnlockGenericWallet
Removes unlockWalletWithFormaticProvider, now just uses unlockWalletAndDispatchToStore with getProviderStateBasedOnProviderType
Adds getProviderStateBasedOnProviderType
Adds orderSource to providerState type
2020-02-09 21:08:46 -05:00
apane
51179d10ce Adds webpack config to use env var
Updates env example
Adds unlockWalletWithFormaticProvider on connect
2020-02-09 21:08:46 -05:00
apane
78752f9178 Adds connect to formatic button if the user does not have metamask installed 2020-02-09 21:08:46 -05:00
apane
762db417d7 Adds setProviderState action
unlockWalletAndDispatchToStore now changes the provider state based on the provider type
Adds button to connect with fortmatic
Adds FORTMATIC_API_KEY constant
2020-02-09 21:08:45 -05:00
apane
85bdccbc06 Adds Fortmatic to providerType
Uses fortmatic as default provider
2020-02-09 21:08:45 -05:00
apane
9f8cb99340 Removes prompt formatic
Fixs wallet prompt, adds marginTop props, splits border into border and borderColor
Adds fortmaticPrimary and fortmaticSecondary prop colors
2020-02-09 21:08:45 -05:00
apane
87b90bb04b Adds fortmatic button
Adds fortmatic colors
2020-02-09 21:08:45 -05:00
apane
e961d88277 Adds fortmatic dependency 2020-02-09 21:08:45 -05:00
Jacob Evans
5754c11e34 Publish
- @0x/contracts-asset-proxy@3.2.0
 - @0x/contracts-broker@1.0.2
 - @0x/contracts-coordinator@3.1.0
 - @0x/contracts-dev-utils@1.1.0
 - @0x/contracts-erc1155@2.1.0
 - @0x/contracts-erc20-bridge-sampler@1.3.0
 - @0x/contracts-erc20@3.1.0
 - @0x/contracts-erc721@3.1.0
 - @0x/contracts-exchange-forwarder@4.2.0
 - @0x/contracts-exchange-libs@4.3.0
 - @0x/contracts-exchange@3.2.0
 - @0x/contracts-extensions@6.1.0
 - @0x/contracts-integrations@2.3.0
 - @0x/contracts-multisig@4.1.0
 - @0x/contracts-staking@2.0.7
 - @0x/contracts-test-utils@5.1.4
 - @0x/contracts-utils@4.3.0
 - 0x.js@9.1.0
 - @0x/abi-gen@5.2.0
 - @0x/assert@3.0.6
 - @0x/asset-swapper@4.1.2
 - @0x/base-contract@6.2.0
 - @0x/connect@6.0.6
 - @0x/contract-addresses@4.5.0
 - @0x/contract-artifacts@3.5.0
 - @0x/contract-wrappers-test@12.2.8
 - @0x/contract-wrappers@13.5.0
 - @0x/contracts-gen@2.0.7
 - @0x/dev-utils@3.2.0
 - ethereum-types@3.1.0
 - @0x/instant@1.0.45
 - @0x/json-schemas@5.0.6
 - @0x/migrations@6.1.0
 - @0x/monorepo-scripts@1.0.50
 - @0x/order-utils@10.2.0
 - @0x/orderbook@2.2.0
 - @0x/sol-compiler@4.0.7
 - @0x/sol-coverage@4.0.7
 - @0x/sol-doc@3.1.4
 - @0x/sol-profiler@4.0.7
 - @0x/sol-resolver@3.0.3
 - @0x/sol-trace@3.0.7
 - @0x/sol-tracing-utils@7.0.7
 - @0x/sra-spec@3.0.6
 - @0x/subproviders@6.0.7
 - @0x/types@3.1.2
 - @0x/typescript-typings@5.0.2
 - @0x/utils@5.4.0
 - @0x/web3-wrapper@7.0.6
2020-02-09 09:37:34 +10:00
Jacob Evans
7bd88c1bb8 Updated CHANGELOGS & MD docs 2020-02-09 09:37:04 +10:00
Lawrence Forman
445b686c6c Merge pull request #2463 from 0xProject/feat/abi-gen/library-linking
Support contracts with unlinked libraries
2020-02-08 00:23:57 -05:00
Lawrence Forman
0cb7b75214 Merge pull request #2464 from 0xProject/feat/contracts/dev-utils/public-libraries-refactor
DevUtils refactor into public libraries
2020-02-07 23:53:16 -05:00
Lawrence Forman
a08399dfee regenerate artifacts and wrappers 2020-02-07 23:23:23 -05:00
Lawrence Forman
4016808fa4 Cherry pick DevUtils refactor code from #2456 2020-02-07 23:23:23 -05:00
Lawrence Forman
8635849977 Address review comments and regenerate contract-wrappers 2020-02-07 23:22:58 -05:00
Lawrence Forman
1a9ed4d4fe Add es2018.promises tsconfig lib target. 2020-02-07 23:22:58 -05:00
Lawrence Forman
e7b3246dd0 Cherry pick library linking code from #2456 2020-02-07 23:22:58 -05:00
Lawrence Forman
19589aec57 Cherry-pick changes from feat/dev-utils/dydx-bridge-validation 2020-02-07 23:22:58 -05:00
Lawrence Forman
4d33ff0417 Cherry-pick changes from feat/dev-utils/dydx-bridge-validation 2020-02-07 23:22:58 -05:00
Lawrence Forman
93a5ab5b33 Merge pull request #2462 from 0xProject/fix-and-feat/restore-contract-tests-and-refactors
Fix contracts tests + refactors
2020-02-07 23:16:50 -05:00
Lawrence Forman
59ada06cdf Fix linter errors. 2020-02-07 22:39:56 -05:00
Lawrence Forman
ae650849b0 Rebase and address review comments. 2020-02-07 22:29:32 -05:00
Lawrence Forman
3e8f9a6b53 Cherry-pick changes from feat/dev-utils/dydx-bridge-validation 2020-02-07 22:10:10 -05:00
Lawrence Forman
79362b0dba Merge pull request #2476 from 0xProject/fix/erc20-bridge-sampler/dev-utils-gas-stipend
ERC20BridgeSampler: Catch DevUtils reverts
2020-02-07 10:08:40 -05:00
Lawrence Forman
3e3df06d57 @0x/contracts-erc20-bridge-sampler: Fix catching invalid opcode from DevUtils
`@0x/contract-addresses`: Update `ERC20BridgeSampler` mainnet and kovan addresses.
2020-02-07 03:07:33 -05:00
Lawrence Forman
6b220eb1c5 Merge pull request #2474 from 0xProject/feat/eth2dai-bridge/market-migration
Update Eth2Dai address
2020-02-07 02:42:29 -05:00
Lawrence Forman
a1c61cae11 @0x/contract-addresses: Redeploy ERC20BridgeSampler 2020-02-07 02:10:19 -05:00
Jacob Evans
d48a917bf3 [erc20-bridge-sampler] gas stipend for DevUtils 2020-02-07 16:57:11 +10:00
Lawrence Forman
646b6dafb2 @0x/contract-addresses Redeploy Eth2DaiBridge and ERC20BridgeSampler. 2020-02-07 01:56:59 -05:00
Lawrence Forman
8d10f33a3f @0x/contracts-utils: Update Eth2Dai address. 2020-02-07 01:56:59 -05:00
Jacob Evans
5d603b2f80 Publish
- @0x/contracts-asset-proxy@3.1.3
 - @0x/contracts-broker@1.0.1
 - @0x/contracts-coordinator@3.0.6
 - @0x/contracts-dev-utils@1.0.6
 - @0x/contracts-erc1155@2.0.6
 - @0x/contracts-erc20-bridge-sampler@1.2.1
 - @0x/contracts-erc20@3.0.6
 - @0x/contracts-erc721@3.0.6
 - @0x/contracts-exchange-forwarder@4.1.0
 - @0x/contracts-exchange-libs@4.2.0
 - @0x/contracts-exchange@3.1.2
 - @0x/contracts-extensions@6.0.0
 - @0x/contracts-integrations@2.2.3
 - @0x/contracts-multisig@4.0.6
 - @0x/contracts-staking@2.0.6
 - @0x/contracts-test-utils@5.1.3
 - @0x/contracts-utils@4.2.1
 - 0x.js@9.0.7
 - @0x/abi-gen@5.1.2
 - @0x/assert@3.0.5
 - @0x/asset-swapper@4.1.1
 - @0x/base-contract@6.1.2
 - @0x/connect@6.0.5
 - @0x/contract-artifacts@3.4.1
 - @0x/contract-wrappers-test@12.2.7
 - @0x/contract-wrappers@13.4.2
 - @0x/contracts-gen@2.0.6
 - @0x/dev-utils@3.1.3
 - @0x/instant@1.0.44
 - @0x/json-schemas@5.0.5
 - @0x/migrations@6.0.2
 - @0x/monorepo-scripts@1.0.49
 - @0x/order-utils@10.1.3
 - @0x/orderbook@2.1.2
 - @0x/sol-compiler@4.0.6
 - @0x/sol-coverage@4.0.6
 - @0x/sol-doc@3.1.3
 - @0x/sol-profiler@4.0.6
 - @0x/sol-trace@3.0.6
 - @0x/sol-tracing-utils@7.0.6
 - @0x/sra-spec@3.0.5
 - @0x/subproviders@6.0.6
 - @0x/utils@5.3.0
 - @0x/web3-wrapper@7.0.5
2020-02-06 21:24:29 +10:00
Jacob Evans
0e1b08ff54 Updated CHANGELOGS & MD docs 2020-02-06 21:24:05 +10:00
David Sun
befc22d718 [FIX] asset-swapper liquidity breakdown (#2472)
* changed divided

* added changelog

* prettier

Co-authored-by: Jacob Evans <dekz@dekz.net>
2020-02-06 15:09:39 +10:00
Jacob Evans
4a62e80967 [asset-swapper] Bump sampler gas limit and allow for override (#2471)
* [asset-swapper] Bump sampler gas limit and allow for override

* Fix imports

* Set to 36e6
2020-02-06 12:31:28 +10:00
Jacob Evans
ee9ef9f2c1 [asset-swapper] prune before dummy order creation (#2470) 2020-02-06 07:08:31 +10:00
mzhu25
93dcb68437 Merge pull request #2455 from 0xProject/feature/broker/gods-unchained
`@0x/contracts-broker`: Property-based Gods Unchained orders
2020-02-04 10:53:54 -08:00
Michael Zhu
0691cc7909 rename _transferEthRefund -> _unwrapAndTransferEth 2020-02-04 10:13:07 -08:00
Michael Zhu
d82f34fe59 add weth-related integration tests 2020-02-04 10:13:07 -08:00
Michael Zhu
d2313b30af Address PR feedback and add support for affiliate fees 2020-02-04 10:13:07 -08:00
Michael Zhu
329719472a Move LibAssetDataTransfer and MixinWeth(Utils) to contracts-extensions 2020-02-04 10:13:02 -08:00
Michael Zhu
a2fcab47d4 skip coordinator client test 2020-02-04 10:08:25 -08:00
Michael Zhu
4ab5951c25 Add comments 2020-02-04 10:08:25 -08:00
Michael Zhu
403cabb201 more integrations tests 2020-02-04 10:08:25 -08:00
Michael Zhu
3da7c5d3e2 Move LibAssetDataTransfer from forwarder to exchange-libs package 2020-02-04 10:08:21 -08:00
Michael Zhu
c5e0de51aa Add Broker rich errors 2020-02-04 10:06:12 -08:00
Michael Zhu
c581f1bba4 Update Broker README 2020-02-04 10:06:12 -08:00
Michael Zhu
b8ac9c2edd lint 2020-02-04 10:06:10 -08:00
Michael Zhu
1027ee2481 Broker integrations tests 2020-02-04 10:05:17 -08:00
Michael Zhu
2f311f7821 GodsUnchainedValidator unit tests 2020-02-04 10:04:19 -08:00
Michael Zhu
a98c95b514 Broker contracts 2020-02-04 10:04:19 -08:00
Michael Zhu
5bbbae5b23 create contracts-broker package 2020-02-04 10:04:19 -08:00
Jacob Evans
f9c9b9f924 Prevent docs dir from being completely removed 2020-02-04 20:29:16 +10:00
Jacob Evans
5921208ea6 Publish
- @0x/contracts-asset-proxy@3.1.2
 - @0x/contracts-coordinator@3.0.5
 - @0x/contracts-dev-utils@1.0.5
 - @0x/contracts-erc1155@2.0.5
 - @0x/contracts-erc20-bridge-sampler@1.2.0
 - @0x/contracts-erc20@3.0.5
 - @0x/contracts-erc721@3.0.5
 - @0x/contracts-exchange-forwarder@4.0.5
 - @0x/contracts-exchange-libs@4.1.1
 - @0x/contracts-exchange@3.1.1
 - @0x/contracts-extensions@5.1.4
 - @0x/contracts-integrations@2.2.2
 - @0x/contracts-multisig@4.0.5
 - @0x/contracts-staking@2.0.5
 - @0x/contracts-test-utils@5.1.2
 - @0x/contracts-utils@4.2.0
 - 0x.js@9.0.6
 - @0x/abi-gen@5.1.1
 - @0x/asset-swapper@4.1.0
 - @0x/base-contract@6.1.1
 - @0x/contract-addresses@4.4.0
 - @0x/contract-wrappers-test@12.2.6
 - @0x/contract-wrappers@13.4.1
 - @0x/contracts-gen@2.0.5
 - @0x/dev-utils@3.1.2
 - @0x/instant@1.0.43
 - @0x/migrations@6.0.1
 - @0x/monorepo-scripts@1.0.48
 - @0x/order-utils@10.1.2
 - @0x/orderbook@2.1.1
 - @0x/sol-compiler@4.0.5
 - @0x/sol-coverage@4.0.5
 - @0x/sol-doc@3.1.2
 - @0x/sol-profiler@4.0.5
 - @0x/sol-trace@3.0.5
 - @0x/sol-tracing-utils@7.0.5
 - @0x/subproviders@6.0.5
2020-02-04 20:22:07 +10:00
Jacob Evans
f89c78abd1 Updated CHANGELOGS & MD docs 2020-02-04 20:21:45 +10:00
David Sun
74d3b9334c Add liquidity source breakdown to asset-swapper (#2465)
* add liquidity source breakdown to asset-swapper

* remove debug line

* use OptimizedMarketOrder metadata

* updated change-log

* prettier + lint

* bug fixes

* fixes

* Prettier

* Fix types

Co-authored-by: Jacob Evans <dekz@dekz.net>
2020-02-04 19:03:28 +10:00
Xianny
919fc66b9d Stop hardcoding contract addresses (#2461)
* stop hardcoding contract addresses

* update changelog

* export ContractAddresses for docs
2020-02-04 17:49:45 +10:00
Francesco Agosti
400fb5a5bb Merge pull request #2468 from 0xProject/feat/fix-test-publish
Bump maxBuffer?
2020-02-03 19:59:03 -08:00
fragosti
3bb4f9085c Add post-instal step 2020-02-03 18:13:31 -08:00
Jacob Evans
714c6cec3c Bump maxBuffer? 2020-02-03 17:50:32 -08:00
Lawrence Forman
cb69921202 ERC20BridgeSampler: Unlock full sampling on Kovan (#2459)
* `@0x/contracts-utils`: Update kovan addresses in `DeploymentConstants`

* `@0x/contracts-erc20-bridge-sampler`: Make source IDs static on all networks, not inherited from `DeploymentConstants`.

* `@0x/contract-addresses`: Update `ERC20BridgeSampler` addresses on mainnet and kovan.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-01-31 11:27:28 -05:00
Jacob Evans
277a0adac9 [base-contract] throw string revert error (#2453) 2020-01-24 07:48:26 +10:00
Jacob Evans
02d14f504f Remove docs from sol-doc gitignore 2020-01-23 12:10:42 +10:00
Jacob Evans
1ab7664a60 Publish
- @0x/contracts-integrations@2.2.1
 - 0x.js@9.0.5
 - @0x/asset-swapper@4.0.1
 - @0x/instant@1.0.42
2020-01-23 11:58:27 +10:00
Jacob Evans
1be46ffb7e Updated CHANGELOGS & MD docs 2020-01-23 11:58:10 +10:00
Lawrence Forman
6ca52aed0d @0x/asset-swapper: Fix understimated protocol fee in worst case quote. (#2452) 2020-01-22 18:22:56 -05:00
Jacob Evans
74e20970e2 Create docs folder for sol-doc 2020-01-22 18:56:10 +10:00
Jacob Evans
93f2b6b4d8 Publish
- @0x/contracts-asset-proxy@3.1.1
 - @0x/contracts-coordinator@3.0.4
 - @0x/contracts-dev-utils@1.0.4
 - @0x/contracts-erc1155@2.0.4
 - @0x/contracts-erc20-bridge-sampler@1.1.0
 - @0x/contracts-erc20@3.0.4
 - @0x/contracts-erc721@3.0.4
 - @0x/contracts-exchange-forwarder@4.0.4
 - @0x/contracts-exchange-libs@4.1.0
 - @0x/contracts-exchange@3.1.0
 - @0x/contracts-extensions@5.1.3
 - @0x/contracts-integrations@2.2.0
 - @0x/contracts-multisig@4.0.4
 - @0x/contracts-staking@2.0.4
 - @0x/contracts-test-utils@5.1.1
 - @0x/contracts-utils@4.1.0
 - 0x.js@9.0.4
 - @0x/abi-gen@5.1.0
 - @0x/assert@3.0.4
 - @0x/asset-swapper@4.0.0
 - @0x/base-contract@6.1.0
 - @0x/connect@6.0.4
 - @0x/contract-addresses@4.3.0
 - @0x/contract-artifacts@3.4.0
 - @0x/contract-wrappers-test@12.2.5
 - @0x/contract-wrappers@13.4.0
 - @0x/contracts-gen@2.0.4
 - @0x/dev-utils@3.1.1
 - @0x/instant@1.0.41
 - @0x/json-schemas@5.0.4
 - @0x/migrations@6.0.0
 - @0x/monorepo-scripts@1.0.47
 - @0x/order-utils@10.1.1
 - @0x/orderbook@2.1.0
 - @0x/sol-compiler@4.0.4
 - @0x/sol-coverage@4.0.4
 - @0x/sol-doc@3.1.1
 - @0x/sol-profiler@4.0.4
 - @0x/sol-trace@3.0.4
 - @0x/sol-tracing-utils@7.0.4
 - @0x/sra-spec@3.0.4
 - @0x/subproviders@6.0.4
 - @0x/utils@5.2.0
 - @0x/web3-wrapper@7.0.4
2020-01-22 18:49:46 +10:00
Jacob Evans
00e616b57a Updated CHANGELOGS & MD docs 2020-01-22 18:49:24 +10:00
Jacob Evans
e436673304 [asset-swapper] Change Exchange sell to marketSellOrdersFillOrKill (#2450)
* Change Exchange sell to marketSellOrdersFillOrKill

* Update Changelog
2020-01-22 18:25:09 +10:00
James Towle
ce04d3ce41 Fix regression in DevUtils (#2449)
* fix bug in OrderTransferSimulationUtils causing failures for 721 assets

* Patched the regression and added tests

* Added regression test for fillable order

* Created a test for in and out of process ganache

* Split up DevUtils into two contracts

* Updated migration

* Remove the in and out of process ganache test

* Fixed contract addresses

* Appease linter

* Addressed review comments and updated artifacts, wrappers, and snapshots

* Fixed regression after refactor

* Update DevUtils and libTransactionDecoder contracts on mainnet and testnets

* Addressed @mzhu's review feedback

* Addressed @hysz's review feedback

* Updated devUtils address on testnets and mainnet after deployment

Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Fabio B <kandinsky454@protonmail.ch>
2020-01-22 12:54:10 +10:00
Jacob Evans
4e46bf4697 Merge pull request #2427 from 0xProject/feature/erc20-bridge-sampler/query-multiple-buys-sells
ERC20BridgeSampler: Allow for batching multiple buy/sell samples
2020-01-22 11:54:45 +10:00
Jacob Evans
9b95508f99 Merge pull request #2445 from 0xProject/feat/asset-swapper/better-best-price-quote
asset-swapper: provide more accurate best quote price
2020-01-22 11:16:40 +10:00
Jacob Evans
c8c24456c1 Fix prettier 2020-01-22 10:01:18 +10:00
Lawrence Forman
80a6e82e1b @0x/contracts-erc20-bridge-sampler: Fix linter error. 2020-01-21 17:47:27 -05:00
Lawrence Forman
80cec20d38 Update packages/asset-swapper/src/utils/swap_quote_calculator.ts
Co-Authored-By: Jacob Evans <jacob@dekz.net>
2020-01-21 16:53:02 -05:00
Lawrence Forman
26cb22020d Update packages/asset-swapper/src/utils/swap_quote_calculator.ts
Co-Authored-By: Jacob Evans <jacob@dekz.net>
2020-01-21 16:52:54 -05:00
Lawrence Forman
09d05d09c9 @0x/asset-swapper: Provide more accurate best quote price. 2020-01-21 15:48:35 +10:00
Jacob Evans
160c91f908 Rename to Batch 2020-01-21 15:48:35 +10:00
Jacob Evans
58f41bcd42 Update asset-swapper WIP 2020-01-21 15:46:31 +10:00
Jacob Evans
0235429995 Update contract addresses 2020-01-21 09:15:47 +10:00
Lawrence Forman
f79697e117 @0x/contract-wrappers: Fix linter error. 2020-01-20 13:30:58 +10:00
Lawrence Forman
6f0019c71e @0x/contract-wrappers: Update IERC20BridgeSampler wrapper. 2020-01-20 13:30:58 +10:00
Lawrence Forman
1a04a18245 @0x/contract-artifacts: Update IERC20BridgeSampler artifact. 2020-01-20 13:30:57 +10:00
Lawrence Forman
0cf3ff8209 @0x/contracts-erc20-bridge-sampler: Increase gas forwarded to kyber and eth2dai.
`@0x/contracts-erc20-bridge-sampler`: Bail as soon as any quote from a DEX fails.

`@0x/contracts-erc20-bridge-sampler`: Fix broken tests.
2020-01-20 13:30:57 +10:00
Lawrence Forman
7f56091fbd @0x/asset-swapper: Add exponential sampling, exposed by sampleDistributionBase.
`@0x/asset-swapper`: Disable ethgasstation polling in tests.
`@0x/asset-swapper`: Tweak default hyper parameters to be friendlier to big fills.
2020-01-20 13:30:57 +10:00
F. Eugene Aumson
391f9b31f6 wrappers.py: satisfy linter (rm unnecessary pass) 2020-01-20 13:30:56 +10:00
F. Eugene Aumson
1d7c0f504a abi-gen: ran black on CLI test Python output 2020-01-20 13:30:56 +10:00
F. Eugene Aumson
9cdc62f918 abi-gen: fix bug w/ 2D arrays of UDT's in Python
Fix bug in handling 2-dimensional arrays of user defined data types in
generated Python code.
2020-01-20 13:30:56 +10:00
F. Eugene Aumson
6027d0481e wrappers.py: fix clean not rm'ing gen'd code 2020-01-20 13:30:55 +10:00
F. Eugene Aumson
277fb92f9e abi-gen: exit when black fails to parse Python
Note: this is not the same case as when the black executable can't be
found; that case is still just a (non-fatal) warning.
2020-01-20 13:30:55 +10:00
Jacob Evans
79b6c3c1af Update CHANGELOGs 2020-01-20 13:30:55 +10:00
Jacob Evans
ad17174119 Rename to Batch 2020-01-20 13:30:54 +10:00
Jacob Evans
6c2692eec0 Enable batch fetching from orderbook. Refactor 2020-01-20 13:30:54 +10:00
Jacob Evans
08640e8575 Update asset-swapper WIP 2020-01-20 13:30:54 +10:00
Jacob Evans
4a2575136f Allow for batching multiple buy/sell samples 2020-01-20 13:30:52 +10:00
Jacob Evans
e792afad17 Merge pull request #2441 from 0xProject/kroeger/fix_function_name_in_readme
Fixed function name in README, network -> chain
2020-01-20 13:29:45 +10:00
Jacob Evans
5ecc4b027d Merge pull request #2448 from 0xProject/fix/python-latest-ganache
Fix/python latest ganache
2020-01-20 13:25:26 +10:00
Jacob Evans
bc540f0cf0 [python] change gas estimate expected 2020-01-20 12:53:34 +10:00
Jacob Evans
a24b14c465 Pull 0xorg/ganache-cli:6.0.0 in circleci 2020-01-20 12:06:28 +10:00
Jacob Evans
c3f36c3123 Change python to use latest ganache 2020-01-20 11:50:43 +10:00
fabioberger
1d34da7557 Remove -v3-beta from snapshot name 2020-01-19 20:10:06 +01:00
fabioberger
27d74a4327 Update ganache-cli version to Istanbul-compatible version 2020-01-19 20:09:50 +01:00
mzhu25
8a20cc682c Merge pull request #2446 from 0xProject/feature/contract-addresses/update-dev-utils-1-17-20
`@0x/contract-addresses`: update DevUtils addresses
2020-01-17 13:38:04 -08:00
mzhu25
9b20359e7b Merge pull request #2431 from 0xProject/feature/fuzz/revert-assertions
`@0x/contracts-integrations`: Negative assertions for fuzzing
2020-01-17 13:10:00 -08:00
Michael Zhu
8866d0ccef update contract-addresses changelog 2020-01-17 12:42:56 -08:00
Michael Zhu
7fa91a9971 update dev-utils addresses 2020-01-17 12:39:07 -08:00
Amir Bandeali
28d1f3eef0 Merge pull request #2440 from 0xProject/feat/dev-utils/chai-bridge-validation
Add ChaiBridge order balance/allowance checks to DevUtils
2020-01-17 11:46:27 -08:00
Amir
f321cf6655 Update DevUtils contract wrapper 2020-01-17 11:08:04 -08:00
Amir
14ade737da Fix linting errors 2020-01-17 10:47:17 -08:00
Amir
41b1b1f141 Skip failing dydxBridge tests 2020-01-17 10:47:17 -08:00
Amir
25dfd47d32 Fix Ganache migrations 2020-01-17 10:47:17 -08:00
Amir
6afa9c8b92 Add mainnet integration tests for checking balances/allowances of ChaiBridge orders using DevUtils 2020-01-17 10:00:16 -08:00
Amir
2fc449da4c Fix integrations tests build 2020-01-17 10:00:16 -08:00
Amir
5dd3b8cf9d Special case unlimited allowance for Chai 2020-01-17 09:59:03 -08:00
Amir
e834fa0050 Split Dai calculation and erc20 balance checks into separate functions 2020-01-17 09:59:03 -08:00
Amir
9a97401606 Add ChaiBridge allowance checks 2020-01-17 09:59:03 -08:00
Amir
410a3fef18 Add ChaiBridge balance checks to DevUtils 2020-01-17 09:59:03 -08:00
Amir Bandeali
969b9814d5 Merge pull request #2442 from 0xProject/feat/forwarder/1155-support
Add 1155 support to Forwarder
2020-01-16 11:41:20 -08:00
Amir
2275e27b87 Rename internal functions in LibAssetDataTransfer and fix tests 2020-01-15 18:33:02 -08:00
Amir
62b06cd204 Add tests for transfering ERC1155 tokens out 2020-01-15 18:33:02 -08:00
Amir
350934ca21 Remove unused params 2020-01-15 18:32:57 -08:00
mzhu25
6332673434 Merge pull request #2436 from 0xProject/fix/dev-utils/map-fixes
`@0x/contracts-dev-utils`: LibAssetData fixes
2020-01-15 16:10:11 -08:00
Michael Zhu
f217840998 address comments 2020-01-15 13:22:53 -08:00
Michael Zhu
089ec35ceb update changelog 2020-01-15 13:22:53 -08:00
Michael Zhu
fecd0b809e tslint be trippin 2020-01-15 13:20:54 -08:00
Michael Zhu
4707a46561 Add negative assertions for endEpoch 2020-01-15 13:20:54 -08:00
Michael Zhu
616533c5a8 Add negative assertions for moveStake 2020-01-15 13:20:54 -08:00
Michael Zhu
c5b2991821 fix bug in finalizePool 2020-01-15 13:20:54 -08:00
Michael Zhu
c36d0fdc7c invalidWithdrawDelegatorRewardsAssertion 2020-01-15 13:20:54 -08:00
Michael Zhu
544e09cf4b invalidUnstakeAssertion 2020-01-15 13:20:54 -08:00
Michael Zhu
c110dc9e6a generic assertion for TRANSFER_FAILED reverts; _invalidStake generator 2020-01-15 13:20:54 -08:00
Michael Zhu
3bf37d6afd invalidDecreaseStakingPoolOperatorShareAssertion 2020-01-15 13:20:54 -08:00
Michael Zhu
b80ae5796b invalidCreateStakingPoolAssertion 2020-01-15 13:20:54 -08:00
Michael Zhu
2083632299 Update addresses, artifact, wrapper 2020-01-15 10:38:57 -08:00
Amir
3ca2f8ac9e Split out transfer logic into library, add 1155 support 2020-01-14 20:27:12 -08:00
Greg Hysz
7172432084 Merge pull request #2443 from 0xProject/fix/abiDecoder/LogDecodingDynamicData
Fixes log decoding of dynamic data
2020-01-14 18:33:57 -08:00
Greg Hysz
0e6afd147f Merge pull request #2437 from 0xProject/test/contracts-integrations/fuzzOrderMatching
Fuzz order matching
2020-01-14 18:04:27 -08:00
Greg Hysen
46275a4f43 Minor fixes to order matching fuzz code 2020-01-14 17:32:10 -08:00
Michael Zhu
1dca378e03 add division-by-zero check for ERC1155 too 2020-01-14 16:32:18 -08:00
Greg Hysen
06669594b1 Updated changelogs. 2020-01-14 16:18:50 -08:00
Greg Hysen
c09ac58ac0 Fuzz testing for matchOrders and matchOrdersWithMaximalFill. 2020-01-14 16:17:43 -08:00
Greg Hysen
e01d32ef1a added order matching functions to Taker actor. 2020-01-14 16:17:43 -08:00
Greg Hysen
5ea3bcf59e Added matchOrders and matchOrdersWithMaximalFill to the reference functions. 2020-01-14 16:17:43 -08:00
Greg Hysen
aa8b14b7ee Added order martching to Maker actor. Also fixed the joinStakingPool to record the pool id. 2020-01-14 16:17:43 -08:00
Greg Hysen
e1722cf739 Updated changelogs 2020-01-14 15:01:02 -08:00
Greg Hysen
7a7f70e15d Updating tests after fixing log decoding 2020-01-14 14:17:45 -08:00
Greg Hysen
b3c3ec16e5 Fixed log decoding. Dynamic structures were not decoding properly. Now uses AbiEncoder from utils package. 2020-01-14 14:17:42 -08:00
Michael Zhu
149f863951 unbreak migrations cli 2020-01-14 09:15:17 -08:00
Michael Zhu
684d09faac refactor LibAssetData tests 2020-01-13 15:29:37 -08:00
Michael Zhu
8a42691c80 Add test cases 2020-01-13 14:10:55 -08:00
Michael Zhu
d591b3dd98 LibAssetData fixes 2020-01-13 14:10:55 -08:00
Alex Kroeger
a90fb4d8b6 Fixed function name in README, network -> chain 2020-01-13 13:33:54 -08:00
Lawrence Forman
ebd08d9c63 Contract wrappers: Catch empty reverts on live networks (#2433)
* `@0x/utils`: Allow strict decoding of return values.

* `@0x/base-contract`: Catch empty call reverts on live networks.
`@0x/abi-gen`: Catch empty call reverts on live networks.

* `@0x/contracts-integrations`: Add mainnet contract wrapper `callAsync()` revert behavior tests.

* `@0x/contract-wrappers`: Regenerate wrappers to catch empty reverts on live networks.

* Update CHANGELOGs

* `@0x/contracts-integrations`: Fix solidity linter errors.

* `@0x/abi-gen`: Regenerate test outputs.

* `@0x/base-contract`: Update CHANGELOG.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-01-13 15:33:45 -05:00
Lawrence Forman
71731d223b Update contract wrappers (esp Forwarder + asset-swapper) (#2432)
* `@0x/contract-artifacts`: Update artifacts.

* `@0x/contract-wrappers`: Regenerate wrappers.

* `@0x/migrations`: Update Forwarder migration.

* `@0x/asset-swapper`: Update forwarder fees for new forwarder contract.

* `@0x/dev-utils`: Make `"istanbul"` the default `hardfork` when creating a ganache provider.

* `@0x/asset-swapper`: Remove debug code.

* `@0x/asset-swapper`: Remove `getSmartContractParamsOrThrowAsync()` because why does it even exist?
`@0x/asset-swapper`: Fix broken tests.
`@0x/asset-swapper`: Correctly handle affiliate fees in `getCalldataOrThrow()`.

* `@0x/contract-wrappers`: Export `ExchangeOwnershipTransferredEventArgs`.
`@0x/0x.js`: Export `ExchangeOwnershipTransferredEventArgs`.
`@0x/asset-swapper`: Unexport `MethodAbi`, `ConstructorStateMutability`, and `StateMutability`.

* Update changelogs

* Update packages/migrations/CHANGELOG.json

Co-Authored-By: Jacob Evans <jacob@dekz.net>

* Update packages/asset-swapper/CHANGELOG.json

Co-Authored-By: Jacob Evans <jacob@dekz.net>

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Jacob Evans <dekz@dekz.net>
2020-01-09 15:35:22 -05:00
David Sun
726ea5e01e Merge pull request #2430 from 0xProject/feature/instant/enable-aggregator
Instant: whitelist tokens using bridge orders array
2020-01-08 16:50:40 -08:00
David Sun
16c7d2964b typo 2020-01-08 16:17:25 -08:00
David Sun
5a6e494bda lint + prettier 2020-01-08 16:16:29 -08:00
David Sun
88c6d89fbb whitelist constants array 2020-01-08 13:55:53 -08:00
Lawrence Forman
de12da18da Exchange signature validation fuzz tests (#2425)
* `@0x/contracts-integrations`: Add Exchange signature validation fuzz tests.

* `@0x/contracts-integrations`: Switch from actor pattern to just pure function generators.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-01-07 17:35:25 -05:00
Amir Bandeali
8d10736934 Merge pull request #2390 from 0xProject/feat/forwarder/v2-backwards-compatibility
Make Forwarder backwards compatible with v2
2020-01-07 13:04:27 -08:00
Amir
2328e02d82 Redeploy Forwarder 2020-01-07 11:03:18 -08:00
Michael Zhu
87cd5fca90 address comments 2020-01-07 11:03:18 -08:00
Michael Zhu
b70cb726c5 remove _noTakerFee (i.e. disallow StaticCall takerFeeAssetData) 2020-01-07 11:03:18 -08:00
Michael Zhu
295811ed5a add integrations tests 2020-01-07 11:03:18 -08:00
Michael Zhu
4bc55551c6 Add unit tests 2020-01-07 11:03:18 -08:00
Michael Zhu
2b8c6dc8f9 Forwarder StaticCall and MultiAsset buy support 2020-01-07 11:03:18 -08:00
Amir Bandeali
8b27380feb Fix dep version 2020-01-07 11:03:18 -08:00
Amir Bandeali
8de3a90851 Update CHANGELOG 2020-01-07 11:03:18 -08:00
Amir Bandeali
f8bb94d721 Remove unnecessary BigNumber cast 2020-01-06 22:12:05 -08:00
Amir Bandeali
0c6d06e7bb Redeploy bridges and Forwarder on mainnet 2020-01-06 22:12:05 -08:00
Amir Bandeali
b0aa5d3af2 Check makerFeeAssetData length before attempting to read id 2020-01-06 22:12:05 -08:00
Amir Bandeali
27d09713fd Add forwarder mainnet tests 2020-01-06 22:12:05 -08:00
Amir Bandeali
ff18852879 Fix build 2020-01-06 22:12:05 -08:00
Amir Bandeali
e515c91e5e Do not attempt to transfer asset if fill failed 2020-01-06 22:12:05 -08:00
Amir Bandeali
1d5800c4f7 Fix WETH compilation 2020-01-06 22:12:05 -08:00
Amir Bandeali
de8f190945 Change erc-20 package compiler target to istanbul 2020-01-06 22:12:05 -08:00
Amir Bandeali
f371e3c8d3 Regenerate boilerplate 2020-01-06 22:12:05 -08:00
Amir Bandeali
b15a6290a7 Handle v2 order edge cases 2020-01-06 22:12:05 -08:00
Amir Bandeali
0f151db355 Enable istanbul in Ganache 2020-01-06 22:12:05 -08:00
Amir Bandeali
fa99b75d1f Redeploy Forwarder and all bridges 2020-01-06 22:12:05 -08:00
Amir Bandeali
4a299c1f39 Change EVM target to istanbul for all contract packages except erc-20 2020-01-06 22:12:05 -08:00
Amir Bandeali
30a2015a68 Fix build 2020-01-06 22:12:05 -08:00
Amir Bandeali
c7c8a4891f Update TS boilerplate 2020-01-06 22:12:05 -08:00
Amir Bandeali
fe9fc6b459 Allow v2 orders to be filled if their makerAssetFeeData field uses a v2 order id 2020-01-06 22:12:05 -08:00
Jacob Evans
2113fb490d Publish
- @0x/contracts-asset-proxy@3.1.0
 - @0x/contracts-coordinator@3.0.3
 - @0x/contracts-dev-utils@1.0.3
 - @0x/contracts-erc1155@2.0.3
 - @0x/contracts-erc20-bridge-sampler@1.0.3
 - @0x/contracts-erc20@3.0.3
 - @0x/contracts-erc721@3.0.3
 - @0x/contracts-exchange-forwarder@4.0.3
 - @0x/contracts-exchange-libs@4.0.3
 - @0x/contracts-exchange@3.0.3
 - @0x/contracts-extensions@5.1.2
 - @0x/contracts-integrations@2.1.0
 - @0x/contracts-multisig@4.0.3
 - @0x/contracts-staking@2.0.3
 - @0x/contracts-test-utils@5.1.0
 - @0x/contracts-utils@4.0.3
 - 0x.js@9.0.3
 - @0x/abi-gen@5.0.3
 - @0x/assert@3.0.3
 - @0x/asset-swapper@3.0.3
 - @0x/base-contract@6.0.3
 - @0x/connect@6.0.3
 - @0x/contract-addresses@4.2.0
 - @0x/contract-artifacts@3.3.0
 - @0x/contract-wrappers-test@12.2.4
 - @0x/contract-wrappers@13.3.0
 - @0x/contracts-gen@2.0.3
 - @0x/dev-utils@3.1.0
 - @0x/instant@1.0.40
 - @0x/json-schemas@5.0.3
 - @0x/migrations@5.1.0
 - @0x/monorepo-scripts@1.0.46
 - @0x/order-utils@10.1.0
 - @0x/orderbook@2.0.1
 - @0x/sol-compiler@4.0.3
 - @0x/sol-coverage@4.0.3
 - @0x/sol-doc@3.1.0
 - @0x/sol-profiler@4.0.3
 - @0x/sol-trace@3.0.3
 - @0x/sol-tracing-utils@7.0.3
 - @0x/sra-spec@3.0.3
 - @0x/subproviders@6.0.3
 - @0x/utils@5.1.2
 - @0x/web3-wrapper@7.0.3
2020-01-06 11:10:22 +10:00
Jacob Evans
0afedbd252 Updated CHANGELOGS & MD docs 2020-01-06 11:10:03 +10:00
Jacob Evans
3dec38450a Merge pull request #2396 from Arctek/patch-1
Fix circular reference
2020-01-06 10:29:19 +10:00
Jacob Evans
d7a00b05e3 Merge pull request #2423 from 0xProject/fix/migrations-docker-wget-timestamping
@0x/migrations/Dockerfile: Remove --timestamping arg from wget invocation
2020-01-06 10:27:35 +10:00
Lawrence Forman
ff2cc8c887 Add aggregator mainnet tests (#2407)
* `@0x/contracts-erc20-bridge-sampler`: Add gas limits to external quote calls.
`@0x/contract-addresses`: Point `erc20BridgeSampler` to new version.

* `@0x/contracts-utils`: Add kovan addresses to `DeploymentConstants`.
`@0x/contract-addresses`: Add kovan `ERC20BridgeSampler` address.

* `@0x/contracts-erc20-bridge-sampler`: Fix changelog.

* `@0x/asset-swapper`: Ignore zero sample results from the sampler contract.
`@0x/asset-swapper`: Allow skipping Uniswap when dealing with low precision amounts with `minUniswapDecimals` option.
`@0x/asset-swapper`: Increase default `runLimit` from `1024` to `4096`.
`@0x/asset-swapper`: Increase default `numSamples` from `8` to `10`
`@0x/asset-swapper`: Fix ordering of optimized orders.
`@0x/asset-swapper`: Fix best and worst quotes being reversed sometimes.
`@0x/asset-swapper`: Fix rounding of quoted asset amounts.

* `@0x/asset-swapper`: Change default `minUniswapDecimals` option from 8 to 7.

* `@0x/asset-swapper`: Revert uniswap decimals fix.

* `@0x/contracts-test-utils`: Add `blockchainTests.live()` for live network tests.
`@0x/contracts-test-utils`: Add modifiers to `blockchainTests.fork()`.
`@0x/contracts-integrations`: Add aggregator mainnet tests.

* `@0x/contracts-integrations`: Fix `fork/resets` modifier ordering on dydx tests.
`@0x/contracts-integrations`: Move and tweak aggregation tests.

* `@0x/contracts-integrations`: Handle non-responsive third-party SRA ordebooks with a little more grace.

* `@0x/contracts-integrations`: Fix linter error.

* `@0x/contracts-test-utils`: Consolidate fork provider logic into `mocha_blockchain.ts`.

* `@0x/contracts-integrations`: Run prettier on aggregation fill tests.

* `@0x/dev-utils`: Add `locked` to `Web3Config`.

* `@0x/contracts-integrations`: Update mainnet fork tests.
`@0x/contracts-test-utils`: Fix forked tests being skipped.
`@0x/contracts-erc20-bridge-sampler`: Regenerate artifacts.

* `@0x/contracts-test-utils`: Remove unecessary `locked` option when creating forked ganache provider.

* Fix redundant zero check

* Set fee amount in fillable amounts test

Co-authored-by: Jacob Evans <dekz@dekz.net>
2020-01-03 23:47:40 -05:00
Lawrence Forman
0571a96cea Fix asset-swapper bugs and misc improvements. (#2406)
* `@0x/contracts-erc20-bridge-sampler`: Add gas limits to external quote calls.
`@0x/contract-addresses`: Point `erc20BridgeSampler` to new version.

* `@0x/asset-swapper`: Ignore zero sample results from the sampler contract.
`@0x/asset-swapper`: Allow skipping Uniswap when dealing with low precision amounts with `minUniswapDecimals` option.
`@0x/asset-swapper`: Increase default `runLimit` from `1024` to `4096`.
`@0x/asset-swapper`: Increase default `numSamples` from `8` to `10`
`@0x/asset-swapper`: Fix ordering of optimized orders.
`@0x/asset-swapper`: Fix best and worst quotes being reversed sometimes.
`@0x/asset-swapper`: Fix rounding of quoted asset amounts.

* `@0x/contracts-utils`: Add kovan addresses to `DeploymentConstants`.
`@0x/contract-addresses`: Add kovan `ERC20BridgeSampler` address.

* `@0x/asset-swapper`: Change default `minUniswapDecimals` option from 8 to 7.

* `@0x/contracts-erc20-bridge-sampler`: Fix changelog.

* `@0x/asset-swapper`: Revert uniswap decimals fix.

* `@0x/asset-swapper`: Undo bridge slippage when computing best case quote.

* `@0x/asset-swapper`: Take asset data from input orders instead of output orders in quote result calculation.

* `@0x/asset-swapper`: Move `SAMPLER_CONTRACT_GAS_LIMIT` constant to `market_operation_utils/constants`.

* Compare equivalent asset data

* Fix redundant zero check

* Update CHANGELOG

* Set fee amount in fillable amounts test

Co-authored-by: Jacob Evans <dekz@dekz.net>
2020-01-03 23:21:39 -05:00
Lawrence Forman
b7b457b076 Generate (complete) solidity docs (#2391)
* `@0x/sol-doc`: New doc generator.

* `@0x/sol-compiler`: Be more tolerant of AST-only compilation targets.

* `@0x/contracts-exchange`: Add more devdoc comments.
`@0x/contracts-exchange-libs`: Add more devdoc comments.

* `@0x/sol-doc`: Update package script.

* `@0x/sol-doc`: Remove unused files and update package scripts to be easier to configure.

* Add more devdocs to contracts.

* `@0x/sol-doc`: Remove doc artifacts.

* `@0x/sol-doc`: Add `.gitignore` and `.npmignore`.

* `@0x/contracts-exchange`: Fix compilation errors.

* Fix more broken contracts.

* `@0x/contracts-erc20-bridge-sampler`: Fix failing tests.

* `@0x/contracts-asset-proxy`: Remove accidentally introduced hackathion file (lol).

* `@0x/sol-doc`: Prevent some inherited contracts from being included in docs unintentionally.

* `@0x/sol-doc`: Rename test file.

* `@0x/contracts-exchange`: Update `orderEpoch` devdoc.

* `@0x/sol-doc`: Tweak event and function docs.

* Update CODEOWNERS.

* `@0x/sol-doc` Tweak function md generation.

* `@0x/sol-doc`: add `transformDocs()` tests.

* `@0x/sol-doc`: add `extract_docs` tests.

* `@0x/sol-doc` Fix linter errors.

* `@0x/contracts-erc20-bridge-sampler`: Fix broken `ERC20BridgeSampler.sol` compile.

* `@0x/sol-doc` Fix mismatched `dev-utils` dep version.

* `@0x/sol-doc`: Add `gen_md` tests.

* `@0x/sol-doc`: Remove `fs.promises` calls.

* `@0x/sol-doc`: Fix linter errors.

* `@0x/sol-doc`: Export all relevant types and functions.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-01-03 22:59:18 -05:00
F. Eugene Aumson
d2c12005b2 Also publish versioned docker image tag
Not just `latest`
2020-01-03 16:51:02 -05:00
F. Eugene Aumson
25f26d7e5f Remove --timestamping arg from wget invocation 2020-01-03 12:40:40 -05:00
F. Eugene Aumson
9d5724e1a0 Fix 0xorg/ganache-cli docker image not supporting re-runs (#2420)
* Overwrite existing snapshot when unzipping

* Don't re-download snapshot if it isn't updated

* Update CHANGELOG.json
2020-01-02 20:19:06 -05:00
David Sun
784d23ec87 Merge pull request #2416 from 0xProject/feature/instant/disable-file-removal--in-s3
Instant - Added should_remove_files_in_s3 flag in discharge configuration
2019-12-22 20:54:43 -08:00
James Towle
709689a7ee Merge pull request #2417 from 0xProject/tests/fix/dev-utils-tests
Fixed the DevUtils tests
2019-12-21 16:55:33 -08:00
F. Eugene Aumson
35d5d3d995 Pare down Mesh env vars in Py test env (#2418) 2019-12-21 13:19:00 -05:00
Alex Towle
630a8d8a4e Addressed dorothy's nit 2019-12-20 19:14:52 -08:00
Alex Towle
54eb1d9055 Fixed the DevUtils tests 2019-12-20 15:51:45 -08:00
David Sun
cb63caea61 prettier 2019-12-20 12:57:40 -08:00
David Sun
8e046bb022 updated to new flag name 2019-12-20 12:07:59 -08:00
David Sun
189b53b8c4 added removal flag in configuration 2019-12-20 11:40:54 -08:00
Lawrence Forman
9b7277d464 Fix Kyber and Uniswap ERC20Bridges (#2412)
* `@0x/contracts-asset-proxy`: Fix `UniswapBridge` token -> token transfer logic.
`@0x/contract-addresses`: Update `UniswapBridge` mainnet address.

* `@0x/asset-proxy`: Fix `KyberBridge` incorrect `minConversionRate` calculation.

* `@0x/contract-addresses`: Update `KyberBridge` mainnet address.
2019-12-20 13:41:52 -05:00
F. Eugene Aumson
551a65c069 0x-sra-client.py: Fix bug in config_order, and other small improvements (#2399)
* Bug fix: unescape backslashes in regexes

Root problem is that there are too many backslashes in the SRA spec
itself.  See https://github.com/0xProject/0x-monorepo/issues/1727

This was previously fixed for heavily-tested endpoints (get and post
order, etc), but was only recently discovered for the get-order-config
endpoint.

* Demonstrate get_order_config()

* Rename DefaultApi to RelayerApi

* Simplify RelayerApi instantiation

* Document paylod and response schemas

* Stop caring which contracts are wrapped

* Increase platform agnosticism

* Update CHANGELOG

* Remove unnecessary f-string
2019-12-20 12:24:55 -05:00
F. Eugene Aumson
4c21a697f4 sra_client.py: Tweak Mesh block polling interval used in tests (#2413)
* Change Mesh block polling interval to 50ms

* Increase Mesh's Ethereum node RPC rate limit
2019-12-20 11:26:57 -05:00
Greg Hysz
a8506c07ae Merge pull request #2401 from 0xProject/feat/asset-proxy/DyDxBridgeTests
DydxBridge Contract Integration Tests
2019-12-19 22:16:44 -08:00
Greg Hysen
b0feb85b5c Fixed merge conflict 2019-12-19 21:36:43 -08:00
Greg Hysen
f371eba8ad Hardcoded address of ERC20BridgeProxy in unlocked accounts 2019-12-19 21:32:03 -08:00
Greg Hysen
265fa52ace Rounding error tests in DydxBridgeProxy 2019-12-19 21:32:03 -08:00
Greg Hysen
c1f5322d38 Added TestDydxUser contract - this is deployed to mainnent as the dYdX Account Owner for the mainnet integration tests. 2019-12-19 21:32:03 -08:00
Greg Hysen
4415e00b38 Added more integration tests for DydxBridge with the Exchange (demonstrates use cases) 2019-12-19 21:32:03 -08:00
Greg Hysen
d4e46c5a9c Updated Changelogs 2019-12-19 21:32:03 -08:00
Greg Hysen
bf5b9949fe Ran prettier 2019-12-19 21:32:03 -08:00
Greg Hysen
3c11a2b1da Increased mocha timeout for mainnet tests 2019-12-19 21:32:03 -08:00
Greg Hysen
1248868169 Added mainnet DydxBridge integration tests with dYdX SoloMargin contract 2019-12-19 21:32:03 -08:00
Greg Hysen
930b95a548 Added integration tests for DydxBridge with Exchange contract 2019-12-19 21:32:03 -08:00
Greg Hysen
27c9f68c7c Added dydx bridge to contract-addresses package 2019-12-19 21:32:02 -08:00
Greg Hysen
358d4d86a7 Added ERC20BridgeProxy.transferFrom tests for DydxBridge 2019-12-19 21:31:07 -08:00
Lawrence Forman
d55eea2239 ERC20BridgeSampler: Gas limits (#2405)
* `@0x/contracts-erc20-bridge-sampler`: Add gas limits to external quote calls.
`@0x/contract-addresses`: Point `erc20BridgeSampler` to new version.

* `@0x/contracts-utils`: Add kovan addresses to `DeploymentConstants`.
`@0x/contract-addresses`: Add kovan `ERC20BridgeSampler` address.

* `@0x/contracts-erc20-bridge-sampler`: Fix changelog.

* `@0x/contracts-erc20-bridge-contracts`: Fix invalid CHANGELOG json (I hope).
2019-12-20 00:08:39 -05:00
David Sun
4507954ea5 Merge pull request #2410 from 0xProject/fix/instant/coverage
Fix bundlewatch for instant and passing static-test
2019-12-19 22:37:42 -05:00
David Sun
8e0a83f8d8 bundlewatch 2019-12-19 19:20:24 -08:00
David Sun
b6ec09e6cf Merge pull request #2409 from 0xProject/feature/instant/minor-fixes-dai-aggregator
Fixes for instant (DAI + disable aggregator functionality)
2019-12-19 20:21:59 -05:00
David Sun
ed4e90623d more fixes 2019-12-19 16:49:20 -08:00
David Sun
38cdb48748 fixes 2019-12-19 16:36:00 -08:00
James Towle
71bfe9b745 Merge pull request #2402 from 0xProject/deploy/dev-utils/12-18-2019
Added artifacts, addresses, and wrappers
2019-12-19 14:38:01 -08:00
Alex Towle
9e7645a167 Removed hand-written timestamps 2019-12-19 13:26:00 -08:00
Alex Towle
6dccc37143 Removed forbidden fields in artifact 2019-12-19 11:40:49 -08:00
Alex Towle
3310310d8c Added artifacts, addresses, and wrappers 2019-12-19 10:32:01 -08:00
Greg Hysz
abb499aad8 Merge pull request #2403 from 0xProject/fix/circle/yarnInstall
Fix Circle builds
2019-12-19 10:24:48 -08:00
Greg Hysen
1afc09b08a Workaround for https://github.com/yarnpkg/yarn/issues/7773 2019-12-19 01:12:46 -08:00
Alex Browne
0e86d72f05 Merge pull request #2384 from 0xProject/update-code-owners-contracts-albrow
Update CODEOWNERS
2019-12-18 13:48:31 -08:00
mzhu25
c9857a2764 Merge pull request #2392 from 0xProject/feature/fuzz/better-input-gen
`@0x/contracts-integrations`: Better input generation for fuzzing
2019-12-18 12:03:23 -08:00
Michael Zhu
701ba3902c add comments 2019-12-18 11:38:33 -08:00
Michael Zhu
bb3ec970a9 lint 2019-12-18 11:38:33 -08:00
Michael Zhu
1d023e6db5 Add optional parameter to sample and sampleSize 2019-12-18 11:38:33 -08:00
Michael Zhu
1bd906ecb3 Add optional distribution parameter to Pseudorandom.integer, use Kumaraswamy distribution for operator share 2019-12-18 11:38:33 -08:00
James Towle
7cbffdb86b Merge pull request #2400 from 0xProject/feature/dev-utils/duplicate-erc721-bug-fix
Duplicate ERC721 Bug Fix
2019-12-18 10:46:27 -08:00
Alex Towle
b979196ffd Remove the taker patch 2019-12-17 19:02:57 -08:00
Alex Towle
2949db5f49 Fixed the bug and added tests that fail without the patch 2019-12-17 19:02:57 -08:00
Alex Towle
47c3ed9705 Fixed the bug and moved "contracts-tests" to "contracts-integrations" 2019-12-17 19:02:57 -08:00
xianny
51ca3109eb Publish
- @0x/contracts-asset-proxy@3.0.2
 - @0x/contracts-coordinator@3.0.2
 - @0x/contracts-dev-utils@1.0.2
 - @0x/contracts-erc1155@2.0.2
 - @0x/contracts-erc20-bridge-sampler@1.0.2
 - @0x/contracts-erc20@3.0.2
 - @0x/contracts-erc721@3.0.2
 - @0x/contracts-exchange-forwarder@4.0.2
 - @0x/contracts-exchange-libs@4.0.2
 - @0x/contracts-exchange@3.0.2
 - @0x/contracts-extensions@5.1.1
 - @0x/contracts-integrations@2.0.2
 - @0x/contracts-multisig@4.0.2
 - @0x/contracts-staking@2.0.2
 - @0x/contracts-test-utils@5.0.1
 - @0x/contracts-tests@0.0.8
 - @0x/contracts-utils@4.0.2
 - 0x.js@9.0.2
 - @0x/abi-gen@5.0.2
 - @0x/assert@3.0.2
 - @0x/asset-swapper@3.0.2
 - @0x/base-contract@6.0.2
 - @0x/connect@6.0.2
 - @0x/contract-addresses@4.1.0
 - @0x/contract-artifacts@3.2.0
 - @0x/contract-wrappers-test@12.2.3
 - @0x/contract-wrappers@13.2.0
 - @0x/contracts-gen@2.0.2
 - @0x/dev-utils@3.0.2
 - @0x/instant@1.0.39
 - @0x/json-schemas@5.0.2
 - @0x/migrations@5.0.2
 - @0x/monorepo-scripts@1.0.45
 - @0x/order-utils@10.0.1
 - @0x/orderbook@2.0.0
 - @0x/sol-compiler@4.0.2
 - @0x/sol-coverage@4.0.2
 - @0x/sol-doc@3.0.2
 - @0x/sol-profiler@4.0.2
 - @0x/sol-resolver@3.0.2
 - @0x/sol-trace@3.0.2
 - @0x/sol-tracing-utils@7.0.2
 - @0x/sra-spec@3.0.2
 - @0x/subproviders@6.0.2
 - @0x/types@3.1.1
 - @0x/typescript-typings@5.0.1
 - @0x/utils@5.1.1
 - @0x/web3-wrapper@7.0.2
2019-12-16 16:05:16 -08:00
xianny
2bcb79dc44 Updated CHANGELOGS & MD docs 2019-12-16 16:05:03 -08:00
xianny
ecec985649 pin python regex version 2019-12-16 14:22:48 -08:00
Lawrence Forman
994908549d Asset-swapper aggregator utils (#2353)
* `@0x/asset-swapper`: Add ERC20Bridge aggregator library.

* `@0x/asset-swapper`: Finish off `aggregate.ts`.

* `@0x/types`: Add `OrderWithoutDomain` type.

* `@0x/asset-swapper`: Add testing infra for sampler/aggregator.

* `@0x/types`: Add `SignedOrderWithoutDomain` type.

* `@0x/asset-swapper`: Update aggregator to take and return orders with signatures.

* `@0x/asset-swapper`: Fix broken aggregator tests.

* `@0x/asset-swapper`: Pass the sampler contract into aggregator entry points.

* `@0x/contract-artifacts`: Add `IERC20BridgeSampler` artifact.

* `@0x/contract-wrappers`: Add `IERC20BridgeSampler` wrapper.

* `@0x/asset-swapper`: Address review comments.

* fixed testing

* refactored aggregate.ts and embeded into asset-swapper

* added adjusted rates for taker and maker fees

* remove PrunedSignedOrders

* updated contract-addresses and addressed some other todos

* streamlined logic

* patched in lawrences changes

* renamed aggregator utils and removed market_utils.ts

* added ack heartbeats

* fixed bug

* patches

* added dummy order things

* Dummy with valid sig

* Tweak gas price calculation to wei

* added test coverage and fixed bugs

* fixed migrations

* Fix CHANGELOGs and types export

* Deploy latest ERC20BridgeSampler on Mainnet

* `@0x/types` Revert CHANGELOG.

* `@0x/asset-swapper`: Address review comments.
`@0x/contract-addresses`: Make kyber lowercase.

* made protocol fee multiplier async

* `@0x/asset-swapper: Fix build errors and do some code cleanup.

* use assetDataUtils where possible
2019-12-16 12:35:58 -08:00
Arctek
e00f059a4a Fix circular refence 2019-12-14 16:00:05 +10:30
Greg Hysz
6808e0d531 Merge pull request #2365 from 0xProject/feat/asset-proxy/DyDxBridge
dYdX Bridge
2019-12-13 13:46:06 -08:00
Greg Hysen
410c95308a Updated dydx account encoding to assume that all actions are on partial balances 2019-12-13 12:02:23 -08:00
Greg Hysen
bec1f23616 Fixed merge conflicts 2019-12-13 11:06:16 -08:00
Greg Hysen
34596b7f83 Use safeGetPartialAmountFloor 2019-12-13 10:58:22 -08:00
Greg Hysen
5ca7169ee5 Reverted to version of dydx bridge that only allows from to be the account owner 2019-12-13 10:58:22 -08:00
Greg Hysen
3300aaa1b9 Refactored so that deposits are done from taker asset data and withdrawals from maker asset data. 2019-12-13 10:58:22 -08:00
Greg Hysen
54afc8a4a1 Fixed merge conflicts 2019-12-13 10:58:22 -08:00
Greg Hysen
f19f4310f4 Updating bridge to work w/o MultiAssetProxy 2019-12-13 10:57:57 -08:00
Greg Hysen
444125a7e1 Simplified the dydx bridge implememtation that does not use the bridge as the maker. 2019-12-13 10:57:57 -08:00
Greg Hysen
56cbb69401 DyDx bridge implementation using contract as maker with signature validation. 2019-12-13 10:56:54 -08:00
Lawrence Forman
70870ffcd2 Swallow reverts in ERC20BridgeSampler (#2395)
* `@0x/erc20-bridge-sampler`: Do not query empty/unsigned orders. Swallow revets on DEX quotes.

* `@0x/contracts-utils`: Add `DEV_UTILS_ADDRESS` and `KYBER_ETH_ADDRESS` to `DeploymentConstants`.

* `@0x/contracts-erc20-bridge-sampler`: Address review comments.
2019-12-13 10:53:25 -08:00
mzhu25
a556d91673 Merge pull request #2387 from 0xProject/feature/fuzz/staking-rewards
`@0x/contracts-integrations`: Staking rewards fuzz test
2019-12-12 15:43:29 -08:00
Michael Zhu
8ecbde8e1e Chagne StoredBalance functions to not mutate in place 2019-12-12 15:21:42 -08:00
Michael Zhu
a24b293818 register actors in the SimulationEnvironment constructor 2019-12-12 14:38:07 -08:00
Xianny
cab5ebf94b re-enable coordinator client tests (#2394) 2019-12-12 14:36:52 -08:00
Jacob Evans
a54b5baef2 Merge pull request #2393 from 0xProject/feature/orderbook-orderstore-async
orderbook: Make OrderStore async for use in db adapter
2019-12-12 10:30:17 -08:00
Jacob Evans
c324fe204e Make OrderStore async for use in db adapter
CHANGELOGS
2019-12-12 09:43:07 -08:00
Amir Bandeali
37d972ed9e Merge pull request #2389 from 0xProject/feat/contracts/mainnet-fork
Allow mainnet fork to be used for contract tests
2019-12-11 22:50:09 -08:00
Michael Zhu
e4a3b1cb05 fix bug in LibFractions reference function 2019-12-11 18:12:02 -08:00
Michael Zhu
49538f272e address comments 2019-12-11 16:54:48 -08:00
mzhu25
1283232144 Merge pull request #2372 from 0xProject/feature/fuzz/prng
`@0x/contracts-integrations`: Seeded RNG and simulation logging
2019-12-11 10:23:08 -08:00
Michael Zhu
2f9891f0aa fix CI failures 2019-12-10 00:32:48 -08:00
Michael Zhu
865a2b1fb0 add/update comments 2019-12-09 23:45:38 -08:00
Michael Zhu
1fde62eeb6 fix bug in finalizePool 2019-12-09 23:45:38 -08:00
Michael Zhu
6754cd48e2 refactor + fix lint 2019-12-09 23:45:38 -08:00
Michael Zhu
ccb477687a fixing bugs 2019-12-09 23:45:38 -08:00
Michael Zhu
be0e6c8925 Staking rewards simulation/fuzz test 2019-12-09 23:45:38 -08:00
Michael Zhu
1c2cb947c0 Add assertion generators to keeper, staker, taker mixins for the new function assertions 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
fff3c1eb36 update pool membership simulation to use multiple makers and takers, partial fills 2019-12-09 23:43:16 -08:00
Michael Zhu
4b7434d1e8 post-rebase lockfile update 2019-12-09 23:42:32 -08:00
Michael Zhu
8cc35a60e6 Add yarn command to run a specific fuzz test 2019-12-09 23:42:32 -08:00
Michael Zhu
130653a1aa move logger, pseudorandom, wrapper_interfaces to framework/utils/ 2019-12-09 23:42:32 -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
Amir Bandeali
0e59bd0bf3 Add mainnet config tests 2019-12-09 16:16:22 -08:00
Amir Bandeali
c0c6154ec1 Add fork option to describe and blockchainTests 2019-12-09 16:14:41 -08:00
Amir Bandeali
cb5384c2fb Use fork configs if FORK_RPC_URL env var is set 2019-12-09 16:14:41 -08:00
Amir Bandeali
038c836fe5 Rename fillorder_test to fill_order_test 2019-12-09 16:14:41 -08:00
xianny
6b0f3570b9 Publish
- @0x/contracts-asset-proxy@3.0.1
 - @0x/contracts-coordinator@3.0.1
 - @0x/contracts-dev-utils@1.0.1
 - @0x/contracts-erc1155@2.0.1
 - @0x/contracts-erc20-bridge-sampler@1.0.1
 - @0x/contracts-erc20@3.0.1
 - @0x/contracts-erc721@3.0.1
 - @0x/contracts-exchange-forwarder@4.0.1
 - @0x/contracts-exchange-libs@4.0.1
 - @0x/contracts-exchange@3.0.1
 - @0x/contracts-extensions@5.1.0
 - @0x/contracts-integrations@2.0.1
 - @0x/contracts-multisig@4.0.1
 - @0x/contracts-staking@2.0.1
 - @0x/contracts-test-utils@5.0.0
 - @0x/contracts-tests@0.0.7
 - @0x/contracts-utils@4.0.1
 - 0x.js@9.0.1
 - @0x/abi-gen@5.0.1
 - @0x/assert@3.0.1
 - @0x/asset-swapper@3.0.1
 - @0x/base-contract@6.0.1
 - @0x/connect@6.0.1
 - @0x/contract-artifacts@3.1.0
 - @0x/contract-wrappers-test@12.2.2
 - @0x/contract-wrappers@13.1.0
 - @0x/contracts-gen@2.0.1
 - @0x/dev-utils@3.0.1
 - @0x/instant@1.0.38
 - @0x/json-schemas@5.0.1
 - @0x/migrations@5.0.1
 - @0x/monorepo-scripts@1.0.44
 - @0x/order-utils@10.0.0
 - @0x/orderbook@1.0.1
 - @0x/sol-compiler@4.0.1
 - @0x/sol-coverage@4.0.1
 - @0x/sol-doc@3.0.1
 - @0x/sol-profiler@4.0.1
 - @0x/sol-resolver@3.0.1
 - @0x/sol-trace@3.0.1
 - @0x/sol-tracing-utils@7.0.1
 - @0x/sra-spec@3.0.1
 - @0x/subproviders@6.0.1
 - @0x/types@3.1.0
 - @0x/utils@5.1.0
 - @0x/web3-wrapper@7.0.1
2019-12-09 14:53:19 -08:00
xianny
71de0d04f3 Updated CHANGELOGS & MD docs 2019-12-09 14:53:05 -08:00
Xianny
99debff5d2 Add syntactic sugar for assetDataUtils (#2388)
* add syntactic sugar for assetDataUtils
2019-12-09 13:55:58 -08:00
Amir Bandeali
3bac6fcb27 Merge pull request #2377 from 0xProject/feat/forwarder/multi-affiliate-fees
Forwarder affiliate fee usability improvements
2019-12-08 19:13:28 -08:00
Amir Bandeali
4b842b81a0 Address PR feedback 2019-12-08 16:28:00 -08:00
Amir Bandeali
e2e4d048ab Update tests to use new Forwarder interface 2019-12-04 21:23:55 -08:00
Amir Bandeali
5574c368cd Allow different ETh fees to be specified for different feeRecipient addresses 2019-12-04 21:23:55 -08:00
Amir Bandeali
0d34f7b92e Add EthFeeLengthMismatchError 2019-12-04 21:23:55 -08:00
Amir Bandeali
5be0632e01 Add tests with multiple fee recipients 2019-12-04 21:23:55 -08:00
Amir Bandeali
79ea0bf9f4 Allow affiliate fee to be split between multiple fee recipient addresses 2019-12-04 21:23:54 -08:00
Amir Bandeali
b1929cb688 Update affiliate fee tests 2019-12-04 21:23:54 -08:00
Amir Bandeali
5ad98700e5 Remove FeePercentageTooLargeError rich revert 2019-12-04 21:22:54 -08:00
Amir Bandeali
a54624b697 Do not return ethFeePaid 2019-12-04 21:22:54 -08:00
Amir Bandeali
ca34c865af Remove max fee percentage for affiliate fees 2019-12-04 21:22:54 -08:00
Amir Bandeali
dde57b1eca Make affiliate fee a flat amount 2019-12-04 21:22:54 -08:00
Amir Bandeali
264b06938e Merge pull request #2378 from 0xProject/feat/bridges/chai-bridge
Implement ChaiBridge
2019-12-04 16:25:46 -08:00
John Johnson
99edb303e2 Merge pull request #2386 from 0xProject/feature/fix-unbound-provider
Fix unbound method in provider standardizer
2019-12-04 15:44:22 -08:00
John Johnson
104cc24dfc Fixing unbound provider (metamask v7.7 incorrectly binds this) 2019-12-04 15:09:00 -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
mzhu25
b86d19028c Merge pull request #2366 from 0xProject/feature/fuzz/makers-and-takers
Pool Member Fuzz Tests
2019-12-04 11:12:55 -08:00
F. Eugene Aumson
4f17a251d3 Python publish for v3 (#2383)
* Remove pre-release suffixes from version numbers

* For wrapper test, pull latest ganache image first

* For wrapper test, unpin ganache, use beta snapshot

* In docs, advise using beta ganache snapshot

Because we haven't yet published the non-beta snapshot

* Unpin package interdependencies

* unpin tests from beta 0xorg/ganache-cli version

* use beta ganache snapshot

* Set release date in CHANGELOGs

* In testing deployment, stop testing pre-releases

* Include rmtree("build") in all clean commands

* Fix clean not cleaning what it thought it was

* In monorepo script, install pkgs 1st then dev deps

* Stop pinning ganache snapshot version

* In test setup, wait longer for mesh to start up

* Fix broken hyperlinks in docs

* fix missing \n that was breaking doc rendering

* In monorepo script comment, fix typo, and clarify
2019-12-04 08:42:00 -08:00
Alex Browne
731a823cc2 Update CODEOWNERS
Remove albrow as code owner for the `contract-addresses` and `contract-artifacts` packages. It's been a long time since I've worked on these packages and I am no longer the best person to review changes to them.
2019-12-03 17:19:08 -08:00
Michael Zhu
3d79fe2bf4 post-rebase lockfile update 2019-12-03 15:34:59 -08:00
Alex Towle
474399154f Addressed last review comment 2019-12-03 14:41:53 -08:00
Alex Towle
19f5153d0e Addressed some review feedback 2019-12-03 14:41:53 -08:00
Alex Towle
ce11271866 Appease the linter 2019-12-03 14:40:18 -08:00
Alex Towle
86cf353296 Improved the fuzz test 2019-12-03 14:40:07 -08:00
Alex Towle
36df5dc721 Implemented a hacky version of the fillOrder fuzz tests 2019-12-03 14:40:07 -08:00
Alex Towle
1e44a9c942 Made function assertions work with the new wrappers 2019-12-03 14:39:29 -08:00
mzhu25
8685cf9036 Merge pull request #2357 from 0xProject/refactor/integrations/transaction-tests
`@0x/contracts-integrations`: Transaction integration tests
2019-12-03 11:04:11 -08:00
Michael Zhu
2232870b09 address comments 2019-12-03 10:35:59 -08:00
Amir Bandeali
b68acd101e Fix failing tests 2019-12-03 08:46:47 -08:00
Amir Bandeali
173ba9b2b5 Add ChaiBridge unit tests 2019-12-02 16:42:17 -08:00
Amir Bandeali
64ed1f87d3 Rethrow custom error string if draw call fails 2019-12-02 16:42:17 -08:00
Michael Zhu
1ca085ec4a address comments 2019-12-02 15:39:03 -08:00
Michael Zhu
e332b7535c prettier 2019-12-02 15:39:02 -08:00
Michael Zhu
79eb613b3e Use AbiEncoder for methodAbiToFunctionSignature 2019-12-02 15:39:02 -08:00
Michael Zhu
5a79ec28d1 transaction protocol fee integration tests 2019-12-02 15:39:02 -08:00
Michael Zhu
97e65a02c0 fix test nesting 2019-12-02 15:39:02 -08:00
Michael Zhu
e87c786b77 fix dataItemsToABIString 2019-12-02 15:39:02 -08:00
Michael Zhu
251d30d47f refactor transaction integration tests to use new framework 2019-12-02 15:39:02 -08:00
fabioberger
761d0a0f18 Publish
- @0x/contracts-asset-proxy@3.0.0
 - @0x/contracts-coordinator@3.0.0
 - @0x/contracts-dev-utils@1.0.0
 - @0x/contracts-erc1155@2.0.0
 - @0x/contracts-erc20-bridge-sampler@1.0.0
 - @0x/contracts-erc20@3.0.0
 - @0x/contracts-erc721@3.0.0
 - @0x/contracts-exchange-forwarder@4.0.0
 - @0x/contracts-exchange-libs@4.0.0
 - @0x/contracts-exchange@3.0.0
 - @0x/contracts-extensions@5.0.0
 - @0x/contracts-integrations@2.0.0
 - @0x/contracts-multisig@4.0.0
 - @0x/contracts-staking@2.0.0
 - @0x/contracts-test-utils@4.0.0
 - @0x/contracts-tests@0.0.6
 - @0x/contracts-utils@4.0.0
 - 0x.js@9.0.0
 - @0x/abi-gen@5.0.0
 - @0x/assert@3.0.0
 - @0x/asset-swapper@3.0.0
 - @0x/base-contract@6.0.0
 - @0x/connect@6.0.0
 - @0x/contract-addresses@4.0.0
 - @0x/contract-artifacts@3.0.0
 - @0x/contract-wrappers-test@12.2.1
 - @0x/contract-wrappers@13.0.0
 - @0x/contracts-gen@2.0.0
 - @0x/dev-utils@3.0.0
 - ethereum-types@3.0.0
 - @0x/instant@1.0.37
 - @0x/json-schemas@5.0.0
 - @0x/migrations@5.0.0
 - @0x/monorepo-scripts@1.0.43
 - @0x/order-utils@9.0.0
 - @0x/orderbook@1.0.0
 - @0x/sol-compiler@4.0.0
 - @0x/sol-coverage@4.0.0
 - @0x/sol-doc@3.0.0
 - @0x/sol-profiler@4.0.0
 - @0x/sol-resolver@3.0.0
 - @0x/sol-trace@3.0.0
 - @0x/sol-tracing-utils@7.0.0
 - @0x/sra-spec@3.0.0
 - @0x/subproviders@6.0.0
 - @0x/tslint-config@4.0.0
 - @0x/types@3.0.0
 - @0x/typescript-typings@5.0.0
 - @0x/utils@5.0.0
 - @0x/web3-wrapper@7.0.0
2019-12-02 15:31:06 +01:00
fabioberger
ae4b1e74f9 Updated CHANGELOGS & MD docs 2019-12-02 15:30:53 +01:00
Jacob Evans
ac44618e58 Remove DIST_TAG 2019-12-03 00:44:01 +11:00
Jacob Evans
d634cbf924 Major version CHANGELOGs 2019-12-03 00:26:25 +11:00
Jacob Evans
21db0e6275 Publish
- @0x/contracts-asset-proxy@2.3.0-beta.4
 - @0x/contracts-coordinator@2.1.0-beta.4
 - @0x/contracts-dev-utils@0.1.0-beta.4
 - @0x/contracts-erc1155@1.2.0-beta.4
 - @0x/contracts-erc20-bridge-sampler@1.0.0-beta.2
 - @0x/contracts-erc20@2.3.0-beta.4
 - @0x/contracts-erc721@2.2.0-beta.4
 - @0x/contracts-exchange-forwarder@3.1.0-beta.4
 - @0x/contracts-exchange-libs@3.1.0-beta.4
 - @0x/contracts-exchange@2.2.0-beta.4
 - @0x/contracts-extensions@4.1.0-beta.4
 - @0x/contracts-integrations@1.0.3-beta.2
 - @0x/contracts-multisig@3.2.0-beta.4
 - @0x/contracts-staking@1.1.0-beta.4
 - @0x/contracts-test-utils@3.2.0-beta.4
 - @0x/contracts-tests@0.0.5
 - @0x/contracts-utils@3.3.0-beta.4
 - 0x.js@8.0.0-beta.3
 - @0x/abi-gen@4.4.0-beta.4
 - @0x/assert@2.2.0-beta.3
 - @0x/asset-swapper@2.1.0-beta.4
 - @0x/base-contract@5.5.0-beta.4
 - @0x/connect@5.1.0-beta.3
 - @0x/contract-addresses@3.3.0-beta.5
 - @0x/contract-artifacts@2.3.0-beta.4
 - @0x/contract-wrappers-test@12.2.0
 - @0x/contract-wrappers@12.2.0-beta.4
 - @0x/contracts-gen@1.1.0-beta.4
 - @0x/dev-utils@2.4.0-beta.4
 - @0x/instant@1.0.36
 - @0x/json-schemas@4.1.0-beta.3
 - @0x/migrations@4.4.0-beta.4
 - @0x/monorepo-scripts@1.0.42
 - @0x/order-utils@8.5.0-beta.4
 - @0x/orderbook@0.1.0-beta.4
 - @0x/sol-compiler@3.2.0-beta.4
 - @0x/sol-coverage@3.1.0-beta.4
 - @0x/sol-doc@2.1.0-beta.4
 - @0x/sol-profiler@3.2.0-beta.4
 - @0x/sol-resolver@2.1.0-beta.3
 - @0x/sol-trace@2.1.0-beta.4
 - @0x/sol-tracing-utils@6.1.0-beta.4
 - @0x/sra-spec@2.1.0-beta.3
 - @0x/subproviders@5.1.0-beta.3
 - @0x/types@2.5.0-beta.3
 - @0x/utils@4.6.0-beta.3
 - @0x/web3-wrapper@6.1.0-beta.3
2019-12-02 23:38:04 +11:00
Jacob Evans
ce426fd3f4 Updated CHANGELOGS & MD docs 2019-12-02 23:37:43 +11:00
Jacob Evans
b5d4c91207 Update Changelogs to beta 2019-12-02 23:11:48 +11:00
Jacob Evans
b43263be77 Merge pull request #2382 from 0xProject/fix/contract-wrappers-remove-artifacts
Remove contract-artifacts dep from contract-wrappers
2019-12-02 22:09:01 +10:00
Jacob Evans
207cf7ca24 Fix unused export 2019-12-02 22:48:09 +11:00
Jacob Evans
00e34758c4 Remove artifacts dep from contract-wrappers 2019-12-02 18:51:47 +11:00
Amir Bandeali
7a3f878c11 Add ChaiBridge to boilerplate 2019-12-01 15:57:01 -08:00
Amir Bandeali
b8439598bc Remove redundant getters from bridges 2019-12-01 15:55:27 -08:00
Amir Bandeali
7fb0818923 Implement ChaiBridge 2019-12-01 15:54:58 -08:00
Amir Bandeali
a7c435adc4 Add mainnet deployment addresses for Dai, Chai, and ERC20BridgeProxy 2019-12-01 15:40:29 -08:00
Amir Bandeali
dd90aabad6 Merge pull request #2375 from Arctek/fix/coordinator-client
Fix for typo in constructor and gas price to apply to meta transaction.
2019-12-01 13:06:00 -08:00
Joshua Richardson
5bded1946e Fix for typo in constructor and gas price to apply to meta transaction. 2019-12-01 16:14:31 +10:30
Amir Bandeali
3642e96154 Merge pull request #2374 from 0xProject/feat/redeploy-forwarder-3.0
Redeploy 3.0 Forwarder on all networks
2019-11-30 14:17:52 -08:00
Amir Bandeali
9da09ee3a6 Update CHANGELOGs 2019-11-30 13:31:42 -08:00
Amir Bandeali
141c140f53 Update Forwarder artifact and wrapper 2019-11-30 13:31:36 -08:00
Amir Bandeali
84b660d2ef Pass in WETH address into Forwarder constructor 2019-11-29 18:20:07 -08:00
Amir Bandeali
6beedba957 Update Forwarder addresses on all networks 2019-11-29 15:55:49 -08:00
Xianny
d73982819b Deprecate abi-gen-wrappers (#2370)
* generate wrappers in @0x/contract-wrappers and delete abi-gen-wrappers

* trim exports from contract-wrappers

* separate contract-wrappers tests to get rid of dependency cycle

* remove dummy token contracts

* temporarily skip coordinator test until we can upgrade coordinator server
2019-11-27 17:50:24 -08:00
Jacob Evans
6ac5bcc907 Merge pull request #2362 from 0xProject/fix/revert-errors-utils
Re-export the RevertErrors
2019-11-27 12:27:37 +10:00
Jacob Evans
389d4d10f1 Import from @0x/utils 2019-11-27 13:02:37 +11:00
Jacob Evans
89dcbd0229 Fix import of LibBytesRevertErrors 2019-11-27 11:57:56 +11:00
Jacob Evans
ad8caa2b51 Remove moved RevertErrors 2019-11-27 11:52:14 +11:00
Jacob Evans
9c42241269 Re-export the RevertErrors 2019-11-27 11:43:12 +11:00
mzhu25
38dd45cce2 Merge pull request #2356 from 0xProject/feature/forwarder/erc20-bridge-buy
`@0x/contracts-exchange-forwarder`: ERC20Bridge buy support in Forwarder
2019-11-26 15:20:54 -08:00
Michael Zhu
aa90253c62 update TestUniswapExchangeFactory 2019-11-26 14:39:59 -08:00
Michael Zhu
41576652dc address more comments 2019-11-26 14:19:37 -08:00
Michael Zhu
74830854ca update changelogs 2019-11-26 14:16:54 -08:00
Michael Zhu
2542b1b44d address comments and tests 2019-11-26 14:16:54 -08:00
Michael Zhu
51f5e60224 static tests 2019-11-26 14:16:54 -08:00
Michael Zhu
bb5885e2bb integration tests 2019-11-26 14:16:54 -08:00
Michael Zhu
d51bbb0008 Unit tests 2019-11-26 14:16:54 -08:00
Michael Zhu
49e898b189 add ERC20Bridge buy support 2019-11-26 14:16:54 -08:00
F. Eugene Aumson
42c4fe5705 Pre-release version bumps; test fixes for latest mesh/ganache versions (#2363)
* Use pre-release ver's for tests against deployment

* Pre-release version number bumps

* pin sra_client dev deps to prereleases

for testing against deployed package

* middlewares: incl doctest in tests of deployment

* Unpin mesh, use new snapshot, & pay protocol fees

* .gitignore gen'd wrappers for new contracts

* test build_tx() & support for empty TxParams.from_

* fix doc: fill TAKERAssetAmount, not maker...
2019-11-26 13:27:49 -05:00
Jacob Evans
4b5f2c36b9 Merge pull request #2336 from 0xProject/feature/upgrade-instant-v3
Upgrade instant v3
2019-11-26 20:43:58 +10:00
Jacob Evans
935dca67e6 ERC1155 Wrapper without chai 2019-11-26 17:56:30 +11:00
Jacob Evans
d431790e19 Re-export orderHashUtils
Rather than have hacks spread through the codebase
2019-11-26 15:14:36 +11:00
Jacob Evans
56310b7bd4 Revert to abi-gen-wrappers. Clean package.json 2019-11-26 13:58:21 +11:00
Lawrence Forman
f15e21faad Merge pull request #2344 from 0xProject/feat/erc20-bridge-aggregator
ERC20BridgeSampler
2019-11-25 20:33:19 -05:00
Jacob Evans
44aa6a2b38 Clean up package.json dependencies 2019-11-26 11:33:08 +11:00
David Sun
9f32347c01 revert svg loader 2019-11-26 11:33:07 +11:00
David Sun
3d5b229c46 prettier 2019-11-26 11:33:07 +11:00
David Sun
5863ccc0a0 replay @dekz commits 2019-11-26 11:33:07 +11:00
David Sun
d220a16b99 fixed contract-wrappers again 2019-11-26 11:33:06 +11:00
David Sun
79784fc8ee fixed wrappers usage in contract-wrappers 2019-11-26 11:33:06 +11:00
David Sun
a83bc53c6a updated protocol fee utils 2019-11-26 11:33:05 +11:00
David Sun
85de0b91b1 added todo 2019-11-26 11:33:05 +11:00
Jacob Evans
d91c6e5702 Round affiliate fee for non whole amounts 2019-11-26 11:33:05 +11:00
Jacob Evans
ab7689d188 Re-enable affiliate fee 2019-11-26 11:33:05 +11:00
Jacob Evans
c81455c760 Update SwapQuoteUpdater with gas estimator 2019-11-26 11:33:04 +11:00
David Sun
39bfc97a7a fix build issues 2019-11-26 11:33:04 +11:00
David Sun
88aac78282 removed asset-buyer from residual files 2019-11-26 11:33:04 +11:00
David Sun
863e830d24 prettier + lint 2019-11-26 11:32:34 +11:00
David Sun
6c705728a4 passing instant tests 2019-11-26 11:32:34 +11:00
David Sun
7f00279ffb fixed CI tests for swapper 2019-11-26 11:32:34 +11:00
David Sun
c198d0079e prettier + minor changes 2019-11-26 11:32:33 +11:00
David Sun
1135d5a971 updated unit tests 2019-11-26 11:32:33 +11:00
David Sun
e299fa27a0 update to swapper 2019-11-26 11:32:32 +11:00
David Sun
46e0bc940a refactored and added fees 2019-11-26 11:32:32 +11:00
David Sun
9a552012f2 fixed bugs preventing build 2019-11-26 11:32:31 +11:00
David Sun
6498d385ee reworked largely all the asset-buyer legacy code 2019-11-26 11:32:30 +11:00
David Sun
dd00f2016f removed asset-buyer 2019-11-26 11:32:30 +11:00
David Sun
64d25e6522 removed buyer and adding in asset-swapper 2019-11-26 11:32:29 +11:00
Lawrence Forman
1462ab08de @0x/contracts-erc20-bridge-sampler: Clean up linter workaround in tests. 2019-11-25 17:55:12 -05:00
Lawrence Forman
a8e93a594d @0x/contracts-erc20-bridge-sampler: Throw sampling two of the same tokens.
`@0x/contracts-erc20-bridge-sampler`: Address review comments.
2019-11-25 17:48:53 -05:00
Lawrence Forman
dea30b37ef @0x/contracts-erc20-bridge-sampler: Update README and add index.ts. 2019-11-25 17:48:53 -05:00
Lawrence Forman
39571dda0b Add erc20-bridge-sampler to prettierignore 2019-11-25 17:48:53 -05:00
Lawrence Forman
c7d801b6c2 @0x/contracts-erc20-bridge-sampler: Update DEPLOYS.json 2019-11-25 17:48:53 -05:00
Lawrence Forman
57731be689 @0x/contracts-erc20-bridge-sampler: Remove gitkeep files 2019-11-25 17:48:53 -05:00
Lawrence Forman
f00524e518 @0x/contracts-erc20-bridge-sampler: Update README 2019-11-25 17:48:53 -05:00
Lawrence Forman
5567c40bae Update changelogs 2019-11-25 17:48:53 -05:00
Lawrence Forman
5d1a7613dd Add @0x/contracts-erc20-bridge-sampler to CI 2019-11-25 17:48:53 -05:00
Lawrence Forman
fa768dc112 @0x/contracts-erc20-bridge-sampler: Finish off tests. 2019-11-25 17:48:53 -05:00
Lawrence Forman
27fb51d37f @0x/contracts-asset-proxy: Tweak IUniswapExchangeFactory. 2019-11-25 17:48:53 -05:00
Lawrence Forman
d02db3864e @0x/contracts-erc20-bridge-sampler: Fix kyber bug and add test contract. 2019-11-25 17:48:53 -05:00
Lawrence Forman
a26c3036a7 @0x/contracts-erc20-bridge-sampler: Get contracts compiling. 2019-11-25 17:48:53 -05:00
Lawrence Forman
0af346aad8 @0x/contracts-erc20-bridge-aggregator: Create package.
`@0x/contracts-erc20`: Add `decimals()` to `LibERC20Token`.

`@0x/contracts-erc20-bridge-sampler`: Created package.
2019-11-25 17:48:53 -05:00
James Towle
c3c8ee7292 Merge pull request #2367 from 0xProject/feature/staking/authorizable-tests
Added unit tests for Authorizable
2019-11-25 15:59:15 -06:00
David Sun
5fbdfa66d9 Merge pull request #2368 from 0xProject/fix/reenable-builds-for-v3
Reenable CircleCi tests for swapper + orderbook, and fix migrations bug
2019-11-25 16:35:56 -05:00
David Sun
15b75715ee enable tests 2019-11-25 15:14:02 -05:00
Alex Towle
1fd92b6cbd Added unit tests for onlyAuthorized 2019-11-25 14:02:53 -06:00
David Sun
2918b5d74e add coverage for swapper 2019-11-25 14:40:35 -05:00
David Sun
669c5be344 prettier 2019-11-25 14:28:34 -05:00
Jacob Evans
e1b40ec46e Update Mesh fixtures 2019-11-26 00:07:30 +11:00
Jacob Evans
15767538eb Deploy Forwarder after Exchange is configured 2019-11-25 18:20:26 +11:00
David Sun
de2b16c464 fixed migrations 2019-11-25 01:05:24 -05:00
Alex Towle
d5e6b38450 Added unit tests for Authorizable 2019-11-24 22:55:17 -06:00
Xianny
a636e87a4f remove matchOrders; must be executed directly through Exchange contract (#2364) 2019-11-22 14:19:18 -08:00
Xianny
50d5b4fa37 Refactor/3.0/coordinator client (#2348)
* deduplicate migrateOnceAsync() test helper

* move and rename coordinator client to @0x/contracts-coordinator
2019-11-22 12:19:00 -08:00
Jacob Evans
f6d26392fb Merge pull request #2361 from 0xProject/fix/migrations-massage
Massage the migrations to match contract-addresses
2019-11-22 11:36:35 +11:00
Jacob Evans
2705bcce15 Massage the migrations to match contract-addresses 2019-11-22 11:06:07 +11:00
Fabio B
379a31ece6 Merge pull request #2355 from 0xProject/fix/increaseKeepAliveOnGanacheDockerImage
Extend keepAliveTimeout config on Ganache-cli Docker Image
2019-11-21 23:16:18 +00:00
F. Eugene Aumson
daa593d225 Updated DevUtils contract artifact (#2358)
* Add updated DevUtils contract artifact

New contract methods were added in #2321, but this artifact was not
updated.

* fix for breaking change in eth_utils
2019-11-20 20:50:49 -05:00
Amir Bandeali
ed8340affa Merge pull request #2359 from 0xProject/fix/migrations/verify-exchange-registration
Warn if Exchange contract not registered in StakingProxy
2019-11-20 16:45:38 -08:00
Amir Bandeali
b3c1e72577 Warn if Exchange contract not registered in StakingProxy 2019-11-20 16:43:02 -08:00
fabioberger
3da09d140a Extend keepAliveTimeout on Ganache-cli server to 40sec to fix Mesh issue 2019-11-20 17:36:24 +01:00
Lawrence Forman
51f254bbb1 Merge pull request #2352 from 0xProject/feat/asset-proxy/KyberBridge
KyberBridge
2019-11-20 06:20:52 -05:00
Lawrence Forman
30ee456d4c @0x/contracts-asset-proxy: Use DeploymentConstants from @0x/contracts-utils in bridges.
`@0x/contracts-asset-proxy`: Add fallback function to `KyberBridge`.
`@0x/contracts-asset-proxy`: Minor changes to `KyberBridge` contracts based on feedback.
2019-11-20 05:50:15 -05:00
Lawrence Forman
460d5f2517 @0x/contracts-utils: Add DeploymentConstants. 2019-11-20 05:50:15 -05:00
Lawrence Forman
5da1fc8445 @0x/contracts-asset-proxy: Add KyberBridge. 2019-11-20 05:50:15 -05:00
Jacob Evans
1166b43946 Publish
- @0x/contracts-asset-proxy@2.3.0-beta.3
 - @0x/contracts-coordinator@2.1.0-beta.3
 - @0x/contracts-dev-utils@0.1.0-beta.3
 - @0x/contracts-erc1155@1.2.0-beta.3
 - @0x/contracts-erc20@2.3.0-beta.3
 - @0x/contracts-erc721@2.2.0-beta.3
 - @0x/contracts-exchange-forwarder@3.1.0-beta.3
 - @0x/contracts-exchange-libs@3.1.0-beta.3
 - @0x/contracts-exchange@2.2.0-beta.3
 - @0x/contracts-extensions@4.1.0-beta.3
 - @0x/contracts-integrations@1.0.3-beta.1
 - @0x/contracts-multisig@3.2.0-beta.3
 - @0x/contracts-staking@1.1.0-beta.3
 - @0x/contracts-test-utils@3.2.0-beta.3
 - @0x/contracts-tests@0.0.4
 - @0x/contracts-utils@3.3.0-beta.3
 - 0x.js@8.0.0-beta.2
 - @0x/abi-gen-wrappers@5.4.0-beta.3
 - @0x/abi-gen@4.4.0-beta.3
 - @0x/asset-buyer@6.2.0-beta.3
 - @0x/asset-swapper@2.1.0-beta.3
 - @0x/base-contract@5.5.0-beta.3
 - @0x/contract-addresses@3.3.0-beta.4
 - @0x/contract-wrappers@12.2.0-beta.3
 - @0x/contracts-gen@1.1.0-beta.3
 - @0x/dev-utils@2.4.0-beta.3
 - @0x/instant@1.0.35
 - @0x/migrations@4.4.0-beta.3
 - @0x/monorepo-scripts@1.0.41
 - @0x/order-utils@8.5.0-beta.3
 - @0x/orderbook@0.1.0-beta.3
 - @0x/sol-compiler@3.2.0-beta.3
 - @0x/sol-coverage@3.1.0-beta.3
 - @0x/sol-doc@2.1.0-beta.3
 - @0x/sol-profiler@3.2.0-beta.3
 - @0x/sol-trace@2.1.0-beta.3
 - @0x/sol-tracing-utils@6.1.0-beta.3
2019-11-20 19:34:17 +11:00
Jacob Evans
0a6903c4c3 Updated CHANGELOGS & MD docs 2019-11-20 19:33:49 +11:00
Jacob Evans
62fae9af93 All modified CHANGELOGS are beta 2019-11-20 19:16:55 +11:00
James Towle
509a1c2eb5 Merge pull request #2328 from 0xProject/refactor/integrations/match-orders
Match Orders Integration tests
2019-11-19 16:40:52 -08:00
David Sun
8b94bbbc5e Merge pull request #2350 from 0xProject/fix/asset-swapper/rebase-and-pay-protocol-fees
asset-swapper V3 rebase, pay protocol fees, etc.
2019-11-19 16:40:15 -05:00
Alex Towle
bb923d2b7d Addressed more review feedback and fixed a bug in Actor 2019-11-19 13:03:18 -08:00
Lawrence Forman
38adc72954 @0x/asset-swapper: Remove redundant protocol fee calculation. 2019-11-19 15:11:27 -05:00
Lawrence Forman
362c7c57fa @0x/monorepo-scripts: Add Set to EXTERNAL_TYPE_MAP. 2019-11-19 14:49:38 -05:00
Lawrence Forman
6529b7eebf @0x/asset-swapper: Fix static test errors. 2019-11-19 14:49:38 -05:00
Lawrence Forman
439c98a6e5 @0x/asset-swapper: Rebase against development and pay protocol fees. 2019-11-19 14:49:38 -05:00
Lawrence Forman
32258ef666 @0x/migrations: Deploy Forwarder AFTER hooking up staking. 2019-11-19 14:49:38 -05:00
Amir Bandeali
176e088d4e Merge pull request #2349 from 0xProject/feat/3.0/migrations-patch
Redeploy 3.0 contracts
2019-11-19 07:57:24 -08:00
Alex Towle
4fe57ba025 @0x:contracts-integrations Addressed review comments 2019-11-18 17:56:07 -08:00
Alex Towle
2818e56932 @0x:contracts-integrations Addressed some lingering review comments 2019-11-18 17:56:07 -08:00
Alex Towle
5428a19617 @0x:contracts-integrations Fixed naming collision of fee recipients 2019-11-18 17:56:07 -08:00
Alex Towle
b58cbca61a @0x:contracts-integrations Addressed review feedback 2019-11-18 17:56:07 -08:00
Alex Towle
5fc6a03784 @0x:contracts-integrations Reduced reliance on DevUtils even more 2019-11-18 17:56:07 -08:00
Alex Towle
eb4ad0ba1b @0x:contracts-integrations Reduced reliance on devUtils 2019-11-18 17:56:07 -08:00
Alex Towle
72cdd1ea50 @0x:contracts-integrations Removed dependence on number_utils from staking 2019-11-18 17:56:07 -08:00
Alex Towle
18769f0b8f @0x:contracts-integrations Fixed issues after rebase 2019-11-18 17:56:07 -08:00
Alex Towle
b7d92c3c12 @0x:contracts-integrations Added tests with protocol fees for batch order matching 2019-11-18 17:56:07 -08:00
Alex Towle
b976101dca @0x:contracts-integrations Refactored match_orders_test to handle weth fees for matchOrdersWithMaximalFill 2019-11-18 17:56:07 -08:00
Alex Towle
8943b670a4 @0x:contracts-integrations Refactored match_order_test to do some testing with Weth protocol fees 2019-11-18 17:56:07 -08:00
Alex Towle
c92ff7c622 @0x:contracts-integrations Polished up match order tester 2019-11-18 17:56:07 -08:00
Alex Towle
301b5e1721 @0x:contracts-integrations Added a sanity check for different token types 2019-11-18 17:56:07 -08:00
Alex Towle
4e50b9b479 @0x:contracts-integrations Refactored match_orders_test 2019-11-18 17:56:07 -08:00
Alex Towle
f8b7b8cc28 @0x:contracts-integrations Made an initial refactor of MatchOrderTester 2019-11-18 17:56:07 -08:00
Alex Towle
2a6ea74be7 @0x:contracts-integrations Moved matchOrders into integrations 2019-11-18 17:56:06 -08:00
Jacob Evans
6d6a0c12cd Merge pull request #2343 from 0xProject/optimize/refactor-templates
abi-gen-wrappers: Move shared logic into BaseContract
2019-11-19 11:53:30 +10:00
Amir Bandeali
784a03300a Update CHANGELOGs 2019-11-18 16:10:54 -08:00
Amir Bandeali
392f578567 Make timelock configs synchronous 2019-11-18 16:10:54 -08:00
Amir Bandeali
a91b1d2dd2 Update mainnet ZrxVault in MixinDeploymentConstants 2019-11-18 16:10:54 -08:00
Amir Bandeali
400b3d961e Fix custom timelock config 2019-11-18 16:10:54 -08:00
Amir Bandeali
4f128470bd Update addresses for all networks 2019-11-18 16:10:54 -08:00
Amir Bandeali
fe06f41136 Add UniswapBridge and Eth2DaiBridge deployments to testnet migration script 2019-11-18 16:10:54 -08:00
Amir Bandeali
f81a99565e Update staking logic contract address, add UniswapBridge and Eth2DaiBridge addresses 2019-11-18 16:10:54 -08:00
Jacob Evans
81e146650b Merge branch 'development' into optimize/refactor-templates 2019-11-19 10:07:46 +10:00
Jacob Evans
bd4e04d331 Update mesh-rpc-client to 7.0.4-beta-0xv3 2019-11-19 09:55:48 +10:00
Fabio B
7663d2c64b Merge pull request #2347 from 0xProject/refactor/supportDocsForContractPackages
docs: Generate MD docs for contracts-* packages and a few others
2019-11-18 23:54:24 +00:00
fabioberger
443c3c2802 Add missing export from stakiong 2019-11-19 00:02:43 +01:00
fabioberger
17a546af5d Add more exessive type ignores 2019-11-18 23:42:45 +01:00
fabioberger
71faf46735 Add exception for EnvVars because we use it in a lot of places 2019-11-18 23:04:15 +01:00
fabioberger
ac28744df6 Stop exporting types from integrations package 2019-11-18 23:00:16 +01:00
fabioberger
adaf304b4e Add missing staking exports 2019-11-18 22:44:48 +01:00
fabioberger
16b13f9768 Fix exports from exchange 2019-11-18 22:32:47 +01:00
fabioberger
d64bf98dc0 Update mesh dep 2019-11-18 22:21:24 +01:00
Jacob Evans
71f57d13fa Update Wrappers after rebase 2019-11-18 20:43:44 +10:00
Jacob Evans
469c10e45f Fix Rich Error test bind context 2019-11-18 20:37:27 +10:00
Jacob Evans
62def596af Reuse getABIEncodedTransactionData 2019-11-18 20:37:27 +10:00
Jacob Evans
aa10844d9e Remove Lodash as a dependency in BaseContract 2019-11-18 20:37:27 +10:00
Jacob Evans
be52079182 Re-enable estimateGas in sendTransaction 2019-11-18 20:37:27 +10:00
Jacob Evans
255aca8789 Moved shared logic into BaseContract
Shared validation and default application can be moved into BaseContract

Assignment before return can be skipped here as it saves a line and
makes a dramatic difference.

Store the functionSignature once and reuse, this saving is large for
Exchange functions with order tuples.
2019-11-18 20:35:38 +10:00
fabioberger
117f4a282d Add EnvVars type 2019-11-18 10:29:25 +00: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
fabioberger
d0a3495b5f Refactor docgen command to also support generating docs for contracts-* packages 2019-11-18 10:24:48 +00:00
xianny
9e9e0d6592 Publish
- @0x/contracts-asset-proxy@2.3.0-beta.2
 - @0x/contracts-coordinator@2.1.0-beta.2
 - @0x/contracts-dev-utils@0.1.0-beta.2
 - @0x/contracts-erc1155@1.2.0-beta.2
 - @0x/contracts-erc20@2.3.0-beta.2
 - @0x/contracts-erc721@2.2.0-beta.2
 - @0x/contracts-exchange-forwarder@3.1.0-beta.2
 - @0x/contracts-exchange-libs@3.1.0-beta.2
 - @0x/contracts-exchange@2.2.0-beta.2
 - @0x/contracts-extensions@4.1.0-beta.2
 - @0x/contracts-integrations@1.0.2
 - @0x/contracts-multisig@3.2.0-beta.2
 - @0x/contracts-staking@1.1.0-beta.2
 - @0x/contracts-test-utils@3.2.0-beta.2
 - @0x/contracts-tests@0.0.3
 - @0x/contracts-utils@3.3.0-beta.2
 - 0x.js@8.0.0-beta.1
 - @0x/abi-gen-wrappers@5.4.0-beta.2
 - @0x/abi-gen@4.4.0-beta.2
 - @0x/assert@2.2.0-beta.2
 - @0x/asset-buyer@6.2.0-beta.2
 - @0x/asset-swapper@2.1.0-beta.2
 - @0x/base-contract@5.5.0-beta.2
 - @0x/connect@5.1.0-beta.2
 - @0x/contract-addresses@3.3.0-beta.3
 - @0x/contract-artifacts@2.3.0-beta.3
 - @0x/contract-wrappers@12.2.0-beta.2
 - @0x/contracts-gen@1.1.0-beta.2
 - @0x/dev-utils@2.4.0-beta.2
 - ethereum-types@2.2.0-beta.2
 - @0x/instant@1.0.34
 - @0x/json-schemas@4.1.0-beta.2
 - @0x/migrations@4.4.0-beta.2
 - @0x/monorepo-scripts@1.0.40
 - @0x/order-utils@8.5.0-beta.2
 - @0x/orderbook@0.1.0-beta.2
 - @0x/sol-compiler@3.2.0-beta.2
 - @0x/sol-coverage@3.1.0-beta.2
 - @0x/sol-doc@2.1.0-beta.2
 - @0x/sol-profiler@3.2.0-beta.2
 - @0x/sol-resolver@2.1.0-beta.2
 - @0x/sol-trace@2.1.0-beta.2
 - @0x/sol-tracing-utils@6.1.0-beta.2
 - @0x/sra-spec@2.1.0-beta.2
 - @0x/subproviders@5.1.0-beta.2
 - @0x/tslint-config@3.1.0-beta.2
 - @0x/types@2.5.0-beta.2
 - @0x/typescript-typings@4.4.0-beta.2
 - @0x/utils@4.6.0-beta.2
 - @0x/web3-wrapper@6.1.0-beta.2
2019-11-17 18:03:29 -05:00
xianny
cb5f9ba97d Updated CHANGELOGS & MD docs 2019-11-17 18:03:13 -05:00
xianny
34538f2ced prettier 2019-11-17 17:14:28 -05:00
xianny
2575644920 update CHANGELOG.json for beta publish 2019-11-17 17:11:35 -05:00
Greg Hysz
b4b43a9e9e Updated Coordinator wrappers and artifacts (#2346)
* Updated Coordinator wrappers and artifacts

* Use contracts-coordinator package for Coordinator

* disable custom CoordinatorWrapper

* trim disallowed artifact fields; fix exports for docs; lint
2019-11-16 19:22:22 -05:00
F. Eugene Aumson
df97b20913 abi-gen/Py: fix incorrect method return types and other small issues (#2345)
* .gitignore gen'd Python staking contract wrappers

* abi-gen/test-cli: check Python type hints in lint

* sra_client.py: Update doc for replicating examples

* abi-gen/Py: fix call() return type incl. tx hash

Previously, generated wrappers for contract methods were including type
hints that suggested that a call() (as opposed to a send_transaction())
might return either the underlying return type or a transaction hash.
This doesn't make sense because a call() will never return a TX hash.
Now, the type hint just has the return type of the underlying method.

* abi-gen: fix test_cli:lint checking wrong code

test_cli:lint is meant to be a rudimentary test of the code generated by
abi-gen.  However, previously, this script was incorporated into `yarn
lint`, and in CircleCI `static-tests` runs independently of `build`.
Consequently, the runs of test_cli:lint were checking the OLD code,
which was previously generated and checked in to git, NOT the code
generated with the version of abi-gen represented by the git repo.  Now,
test_cli:lint happens during `yarn test` rather than `yarn lint`,
because `yarn test` IS dependent on `yarn build`.

* contract_wrappers.py: fix misplaced doc

Previously, the routines `order_to_jsdict()` and `jsdict_to_order()`
were moved from contract_wrappers.exchange.types to
contract_wrappers.order_conversions.  However, the module-level
docstring describing those routines was accidentally left behind in
exchange.types.

* abi-gen/Py: stop documenting return types for TXs

Previously the send_transaction() interface included docstring
documentation for the return types of the contract method, but that
doesn't make any sense because send_transaction() returns a transaction
hash rather than any actual return values.

* abi-gen/Py: stop gen'ing send_tx for const methods

* abi-gen/Py: add build_tx to contract methods

* abi-gen/Py: fix incorrect method return types

Fixes #2298 .

* abi-gen/Py: rm validator arg to no-input methods

* abi-gen: mv Py Handlebars helpers to own module

Move all existing Python-related Handlebars helpers to the newly created
python_handlebars_helpers module.

* abi-gen: refactor internal interface

No functionality is changed.  Sole purpose of this commit is to
facilitate an upcoming commit.

* abi-gen: refactor internal interface

No functionality is changed.  Sole purpose of this commit is to
facilitate an upcoming commit.

* abi-gen/Py: name tuples w/internalType, not hash

Use the new `internalType` field on the `DataItem`s in the contract
artifact to give generated tuple classes a better name than just hashing
their component field names.

* Fix CI errors

* abi-gen/Py/wrapper: make internal member private

* Update CHANGELOGs
2019-11-15 18:27:45 -05:00
mzhu25
9e3cc379ed Merge pull request #2335 from 0xProject/refactor/integrations/move-balance-stores
`@0x/contracts-integrations`: Restructure directories, welcome core.ts and balance stores
2019-11-15 11:10:02 -08:00
Michael Zhu
c1d78a94a2 move ValidatorWalletAction to signature_validator.ts 2019-11-15 09:53:06 -08:00
Michael Zhu
7f4cbba076 Refactor integrations directory structure; move core.ts, balance stores, and FillOrderWrapper to integrations 2019-11-15 09:49:20 -08:00
Fabio B
bdca84fe72 Merge pull request #2342 from 0xProject/update/bigNumberDep
Update BigNumber dep to ~9.0.0
2019-11-15 11:53:47 +00:00
fabioberger
cf8fd7103b Add changelog entry re: BigNumber version change in packages that export BigNumber 2019-11-15 11:11:08 +00:00
fabioberger
8e8cdbd413 Update BigNumber dep to ~9.0.0 2019-11-15 11:04:53 +00:00
Jacob Evans
30f01681d4 Merge pull request #2341 from 0xProject/fix/parity-revert-errors
RevertError: Decode Parity revert errors
2019-11-15 20:31:40 +10:00
Fabio B
ecf1ad8da1 Merge pull request #2340 from 0xProject/fix/ciPublish
Fix CI test-publish
2019-11-15 10:23:28 +00:00
Jacob Evans
42dc112a13 RevertError: Decode Parity revert errors 2019-11-15 19:39:06 +10:00
Jacob Evans
58276cefce Merge pull request #2323 from 0xProject/feat/3.0-staking-ganache
ganache: Added Staking, Forwarder, ERC20Bridge
2019-11-15 13:05:37 +10:00
Amir Bandeali
4b6501a739 Merge pull request #2338 from 0xProject/fix/contracts/exchange/marketBuyOrdersNoThrow-rounding
Round up in `marketBuyOrdersNoThrow()`
2019-11-14 18:57:29 -08:00
Jacob Evans
724085e068 Remove TestStaking
CHANGELOG updates
Rebase and clean imports
Fix lint
2019-11-15 12:34:41 +10:00
Jacob Evans
21fab3ef9f Added Staking and ERC20 Bridge to migrations 2019-11-15 11:38:43 +10:00
Amir Bandeali
db8837f4ce Redeploy DevUtils and ZeroExGovernor on testnets 2019-11-15 11:34:31 +10:00
Lawrence Forman
5781cdf6da ran prettier (again) 2019-11-14 18:36:34 -05:00
Lawrence Forman
874eb1602f @0x/contracts-exchange: Round up in marketBuyOrdersNoThrow() so marketBuyOrdersFillOrKill() doesn't throw up. 2019-11-14 17:55:11 -05:00
fabioberger
82149917b7 Update mesh-rpc-client dep to latest version 2019-11-14 22:54:39 +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
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
Fabio B
9d4d9ce978 Merge pull request #2337 from 0xProject/refactor/0xjsInterfaceAndDocs
Remove IWallet/IValidator from 0x.js & update doc gen
2019-11-14 15:38:04 +00:00
fabioberger
96a38602b8 Fix package.json 2019-11-14 14:57:11 +00:00
fabioberger
90d3558d31 Add CHANGELOG entry 2019-11-14 14:56:35 +00:00
fabioberger
e491a56dd0 Remove IValidator and IWallet contracts from 0x.js interface since no beginner uses them 2019-11-14 14:53:26 +00:00
fabioberger
4d8eb61924 Stop generating and uploading docs for asset-buyer since about to get removed 2019-11-14 14:51:44 +00:00
fabioberger
17fab541c6 Stop pushing ethereum-types and web3-wrapper docs to S3 since we no longer want to render them on the website 2019-11-14 14:49:55 +00:00
Amir Bandeali
91de35e8e9 Merge pull request #2333 from 0xProject/fix/staking/operator-share
Fix 100% operator share
2019-11-13 10:17:28 -08:00
Amir Bandeali
f61964676a Add test for when operatorShare == 0 2019-11-13 09:48:04 -08:00
Amir Bandeali
41a34c19bb Add zrxVault config tests in migrations 2019-11-13 09:46:33 -08:00
Amir Bandeali
d90810d127 Add tests for setting operator share to 100% 2019-11-12 22:42:55 -08:00
Amir Bandeali
7f3d281faa Allow operator share to be set to existing share 2019-11-12 20:14:48 -08:00
Greg Hysz
812c306805 Merge pull request #2332 from 0xProject/fix/staking/paramDocsForRewardsPaidOutEvent
Updated `RewardsPaid` event docs
2019-11-12 17:47:47 -08:00
Steve Klebanoff
fc1c59f374 Merge pull request #2329 from 0xProject/feature/debug-subprovider
Add DebugSubprovider
2019-11-12 15:18:00 -08:00
Amir Bandeali
35eac1e3ff Merge pull request #2322 from 0xProject/feat/3.0-mainnet-migrations
Mainnet migrations
2019-11-12 14:50:36 -08:00
Greg Hysen
e16041d7fa Updated RewardsPaid event docs 2019-11-12 14:24:39 -08:00
Amir Bandeali
b8fc84ecc8 Remove test constants from Staking ABI 2019-11-12 13:53:58 -08:00
Amir Bandeali
572c576e15 Update DevUtils addresses on all networks 2019-11-12 13:53:58 -08:00
Amir Bandeali
9df7f80fbb Move extension deployments after contract configurations 2019-11-12 13:53:58 -08:00
Amir Bandeali
f003400135 Add check for if ERC20BridgeProxy is registered in the Exchange 2019-11-12 13:53:58 -08:00
Amir Bandeali
ca7616c1d2 Update CHANGELOGs 2019-11-12 13:53:58 -08:00
Amir Bandeali
a4a2bfdf35 Finish ZrxVault and StakingProxy configs without batch transaction 2019-11-12 13:53:58 -08:00
Amir Bandeali
eb6bbb6e78 Replace Staking artifact with TestStaking to allow params to be passed into constructor 2019-11-12 13:53:58 -08:00
Amir Bandeali
4d0172f634 Fix directory to write standard input 2019-11-12 13:53:58 -08:00
Amir Bandeali
3b61e0e126 Add v3 mainnet addresses 2019-11-12 13:53:58 -08:00
Amir Bandeali
1540a91835 Update testnet migrations to do most configuration outside of batch transsaction 2019-11-12 13:53:58 -08:00
Amir Bandeali
2bcce9eed0 Add mainnet ZrxVault address to deployment constants 2019-11-12 13:53:58 -08:00
Amir Bandeali
1e53564386 Redeploy DevUtils and ZeroExGovernor on testnets 2019-11-12 13:53:58 -08:00
Amir Bandeali
d1c72706ef Add governor and staking configs for each network 2019-11-12 13:53:58 -08:00
Amir Bandeali
bd9e531257 Add flag for saving standard input during compilation 2019-11-12 13:53:58 -08:00
mzhu25
48436424db Merge pull request #2317 from 0xProject/feature/integration-tests/hot-fuzz
`@0x/contracts-integrations`: Pool management, stake management fuzz tests
2019-11-12 13:43:19 -08:00
Michael Zhu
4f10d7f859 post-rebase woes 2019-11-12 13:10:34 -08:00
Francesco Agosti
80e5a29444 Merge pull request #2326 from 0xProject/feature/remove_network_id_from_sra
Remove chainId from @0x/connect related tooling
2019-11-12 13:08:25 -08:00
F. Eugene Aumson
0ec8a4a160 sra_client.py: remove support for chainId parameter 2019-11-12 15:28:11 -05:00
F. Eugene Aumson
810bf7af0c Merge branch 'development' into feature/remove_network_id_from_sra 2019-11-12 15:26:00 -05:00
Michael Zhu
e7825206bf asyncIterator polyfill 2019-11-12 12:06:01 -08:00
Michael Zhu
2b887c336a devutils 😕 2019-11-12 12:05:39 -08:00
Michael Zhu
48ecd32d5d address comments 2019-11-12 12:05:39 -08:00
Michael Zhu
1f5a0987cb static tests, my nemesis 2019-11-12 12:05:39 -08:00
Michael Zhu
f33a9d162a moveStake assertion; use SimulationEnvironment to track global stake and staking pools 2019-11-12 12:05:38 -08:00
Michael Zhu
c2919bcdb0 tslint needs to _chill_ 2019-11-12 12:05:38 -08:00
Michael Zhu
120d554a6b split up pool/stake management simulations, change some types 2019-11-12 12:05:38 -08:00
Michael Zhu
44f268a7ee decouple state (SimulationEnvironment) and Simulation 2019-11-12 12:05:38 -08:00
Michael Zhu
3c7a0bcd85 add createStakingPool and decreaseStakingPoolOperatorShare 2019-11-12 12:05:14 -08:00
Michael Zhu
8e2e9e9331 proof of concept with a single actor and valid stakes/unstakes 2019-11-12 12:05:14 -08:00
Michael Zhu
91c26fc046 rename Result -> FunctionResult 2019-11-12 12:02:49 -08:00
Fabio B
afcfe58add Merge pull request #2330 from 0xProject/refactor/reduceContractPkgBundle
Reduce bundle-size of contracts-* packages
2019-11-13 04:00:05 +08:00
Steve Klebanoff
8d423be223 Use strings instead of bignumbers, and add JSON.stringify call 2019-11-12 11:30:24 -08:00
fabioberger
03b7314550 Disable linter for txn returning PromiseWithTransactionHash 2019-11-12 19:24:29 +00:00
fragosti
1a7e425780 Run linters 2019-11-12 11:18:23 -08:00
fabioberger
8bc5faff3c Move DeploymentManager back into test dir since only used in integrations package 2019-11-12 16:55:36 +00:00
Fabio B
2676278a66 Merge pull request #1990 from 0xProject/removeTestnetFaucet
Remove testnet-faucet from monorepo
2019-11-12 22:23:51 +08:00
fabioberger
6376b3baf3 Update yarn.lock 2019-11-12 13:50:24 +00:00
fabioberger
e569abe740 Update yarn.lock 2019-11-12 13:50:10 +00:00
fabioberger
71be9ef92a Update yarn.lock 2019-11-12 13:50:10 +00:00
fabioberger
4990c4903d Remove testnet-faucet from monorepo 2019-11-12 13:49:38 +00:00
fabioberger
9d468e2383 Move dep back since used in types 2019-11-12 13:05:25 +00:00
fabioberger
109cac013c Add CHANGELOG entries 2019-11-12 13:04:26 +00:00
fabioberger
0d8a9921cd Fix package.json 2019-11-12 12:33:09 +00:00
fabioberger
2a5f5f7312 Move deps to devDeps not used in src dir 2019-11-12 12:27:21 +00:00
fabioberger
fe54fbefbb Improve comment in npmignores 2019-11-12 11:47:11 +00:00
fabioberger
fc824b8d06 Fix prettier issues 2019-11-12 11:35:34 +00:00
fabioberger
d91a7b6d0e Add generate-artifacts and generated-wrappers nested under test dir to prettierignore 2019-11-12 11:35:28 +00:00
fabioberger
aa4b3f93fa Add ERC20 artifacts explicitly to TransactionHelper 2019-11-12 11:27:41 +00:00
fabioberger
efe8225d18 Fix import ordering 2019-11-12 10:52:04 +00:00
fabioberger
b2c0f8c158 Fix .prettierrc to proper json 2019-11-12 10:45:20 +00:00
fabioberger
66dce8794d Add missing dep 2019-11-12 10:45:08 +00:00
fabioberger
30d54407e6 Fix remaining imports 2019-11-12 10:13:25 +00:00
fabioberger
6324a92ec5 Refactor contracts-* exports so none in test dir so npmignore works as intended 2019-11-11 21:49:29 +00:00
fabioberger
67e7b5c124 Merge branch 'development' into refactor/reduceContractPkgBundle 2019-11-11 21:00:36 +00:00
Fabio B
35099d9b2f Merge pull request #2324 from 0xProject/refactor/removeUnusedContractWrappers
Remove unused contract wrappers
2019-11-12 04:59:18 +08:00
fabioberger
e07f7b54e0 Stop using directory level exports 2019-11-11 19:50:13 +00:00
fabioberger
5c409929b4 Remove ethBalanceChecker dir 2019-11-11 19:29:47 +00:00
fabioberger
1a504fdde9 Remove last references of eth_balance_checker in python tooling 2019-11-11 19:01:04 +00:00
fabioberger
4b06fd511b Uniform dep version 2019-11-11 18:18:02 +00:00
fabioberger
def6727286 Remove EthBalanceChecker from Python lib 2019-11-11 18:17:26 +00:00
fabioberger
bedaa0db16 Fix deps 2019-11-11 17:54:57 +00:00
fabioberger
90640a4fcf Fix linter 2019-11-11 17:53:07 +00:00
fabioberger
0142d07f10 Fix linter 2019-11-11 17:53:07 +00:00
fabioberger
c9d85cfc7d Remove EthBalanceChecker as standalone contract artifact/wrapper 2019-11-11 17:53:07 +00:00
fabioberger
64304c1991 Bump dummyTransactionCount to 6 to avoide changing all contract addresses now that we don't deploy DutchAuction anymore 2019-11-11 17:53:07 +00:00
fabioberger
993adc3578 Pass down DevUtils to fillOrder combinatorial tests 2019-11-11 17:53:07 +00:00
fabioberger
8813bd26f6 Pass around DevUtilsContract so it's only instantiated once 2019-11-11 17:53:07 +00:00
fabioberger
35925de320 Update CHANGELOGs 2019-11-11 17:53:07 +00:00
fabioberger
3b426a3f07 Update migration to continue deploying the old coordinator contract 2019-11-11 17:53:07 +00:00
fabioberger
5104fd5dcf Remove unused import 2019-11-11 17:53:07 +00:00
fabioberger
a5a9ca9e46 Deploy OrderValidator _not_ OrderValidationUtils in migrations script 2019-11-11 17:53:07 +00:00
fabioberger
ba0f07e3b2 Fix prettier issues 2019-11-11 17:52:32 +00:00
fabioberger
8614475324 Move TradeSide and TransferType types to contract-exchange package 2019-11-11 17:52:32 +00:00
fabioberger
744dda144b Remove unused types from order-utils export 2019-11-11 17:52:32 +00:00
fabioberger
13d47915f4 Fix linter issues 2019-11-11 17:52:32 +00:00
fabioberger
3059b85e41 Remove ZRX exports from 0x.js too 2019-11-11 17:52:32 +00:00
fabioberger
184ea4a67f Remove ZRXToken related exports 2019-11-11 17:52:32 +00:00
fabioberger
8032f536ed Add caret to version 2019-11-11 17:52:32 +00:00
fabioberger
fba3870ef1 Move ExchangeTransferSimulator into contract-exchange tests since that's the only place it's still used and we no longer want to expose it to external developers 2019-11-11 17:50:48 +00:00
fabioberger
2915ee08ea Remove ZRXToken, AssetProxies and DutchAuction contract from abi-gen-wrappers and contract-wrappers packages 2019-11-11 17:50:01 +00: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
fabioberger
bc1dca3f6f Fix contracts-gen so make sure all dirs are created 2019-11-11 12:39:36 +00:00
fabioberger
5db1820123 Only export non-test source Solidity source-code 2019-11-11 11:46:03 +00:00
Steve Klebanoff
657c35fb86 Adds CHANGELOG 2019-11-10 22:05:32 -08:00
Steve Klebanoff
9432a84468 Upgrade @types/ethereumjs-tx and add DebugSubprovider 2019-11-10 21:58:50 -08:00
fabioberger
15a5bc02ef Fix remaining build issues 2019-11-11 00:13:44 +00:00
fabioberger
f011be9347 Update all contracts-*is package.json, tsconfig.json, compiler.json, artifacts/ts and wrappers.js 2019-11-10 23:41:56 +00:00
fabioberger
b6094fdb34 Add gitignore for new generted artifacts/wrappers dirs 2019-11-10 17:23:05 +00:00
fabioberger
9e6ab9f585 First pass contracts-* separation of test and publish artifacts/wrappers 2019-11-10 17:22:29 +00:00
F. Eugene Aumson
869d2c02fa CI/test-python: give launch-kit-backend CHAIN_ID, not NETWORK_ID (#2327)
* CI/test-python: give LK ID of chain, not network

For CircleCI job test-python, change docker config for
launch-kit-backend to set an environment variable for the chain ID,
not for the network ID.  This was failing on all branches after a recent
update to the `0xorg/launch-kit-backend:v3` tag.

* Update docker config used for local testing

* Update documentation of test environment
2019-11-09 20:25:14 -05:00
fragosti
3b1dca0e70 Add asset-buyer hack 2019-11-08 17:51:25 -08:00
fragosti
595358fa69 Remove chainId when using connect from asset-swapper 2019-11-08 17:41:26 -08:00
fragosti
8a8ec79c6c Remove chainId from the orderbook pacakge 2019-11-08 16:32:22 -08:00
fragosti
6252446bd3 Update error example in SRA 2019-11-08 16:29:28 -08:00
fragosti
403ceebff9 Remove chainId from json-schemas and connect 2019-11-08 16:09:53 -08:00
fabioberger
4767882ed3 Add .npmignore to all contracts-* packages so we only publish the Solidity source and lib dir (minus tests) 2019-11-08 18:20:47 +00:00
fabioberger
3b9d84fa58 Publish
- @0x/contracts-asset-proxy@2.3.0-beta.1
 - @0x/contracts-coordinator@2.1.0-beta.1
 - @0x/contracts-dev-utils@0.1.0-beta.1
 - @0x/contracts-erc1155@1.2.0-beta.1
 - @0x/contracts-erc20@2.3.0-beta.1
 - @0x/contracts-erc721@2.2.0-beta.1
 - @0x/contracts-exchange-forwarder@3.1.0-beta.1
 - @0x/contracts-exchange-libs@3.1.0-beta.1
 - @0x/contracts-exchange@2.2.0-beta.1
 - @0x/contracts-extensions@4.1.0-beta.1
 - @0x/contracts-integrations@1.0.1
 - @0x/contracts-multisig@3.2.0-beta.1
 - @0x/contracts-staking@1.1.0-beta.1
 - @0x/contracts-test-utils@3.2.0-beta.1
 - @0x/contracts-tests@0.0.2
 - @0x/contracts-utils@3.3.0-beta.1
 - 0x.js@8.0.0-beta.0
 - @0x/abi-gen-wrappers@5.4.0-beta.1
 - @0x/abi-gen@4.4.0-beta.1
 - @0x/assert@2.2.0-beta.1
 - @0x/asset-buyer@6.2.0-beta.1
 - @0x/asset-swapper@2.1.0-beta.1
 - @0x/base-contract@5.5.0-beta.1
 - @0x/connect@5.1.0-beta.1
 - @0x/contract-addresses@3.3.0-beta.2
 - @0x/contract-artifacts@2.3.0-beta.2
 - @0x/contract-wrappers@12.2.0-beta.1
 - @0x/contracts-gen@1.1.0-beta.1
 - @0x/dev-utils@2.4.0-beta.1
 - ethereum-types@2.2.0-beta.1
 - @0x/instant@1.0.33
 - @0x/json-schemas@4.1.0-beta.1
 - @0x/migrations@4.4.0-beta.1
 - @0x/monorepo-scripts@1.0.39
 - @0x/order-utils@8.5.0-beta.1
 - @0x/orderbook@0.1.0-beta.1
 - @0x/sol-compiler@3.2.0-beta.1
 - @0x/sol-coverage@3.1.0-beta.1
 - @0x/sol-doc@2.1.0-beta.1
 - @0x/sol-profiler@3.2.0-beta.1
 - @0x/sol-resolver@2.1.0-beta.1
 - @0x/sol-trace@2.1.0-beta.1
 - @0x/sol-tracing-utils@6.1.0-beta.1
 - @0x/sra-spec@2.1.0-beta.1
 - @0x/subproviders@5.1.0-beta.1
 - @0x/testnet-faucets@1.0.89
 - @0x/tslint-config@3.1.0-beta.1
 - @0x/types@2.5.0-beta.1
 - @0x/typescript-typings@4.4.0-beta.1
 - @0x/utils@4.6.0-beta.1
 - @0x/web3-wrapper@6.1.0-beta.1
2019-11-07 20:43:12 +00:00
fabioberger
6fd96a6fd7 Updated CHANGELOGS & MD docs 2019-11-07 20:42:58 +00:00
fabioberger
c93b02d55e Update DevUtils artifacts in contract-artifacts 2019-11-07 19:33:12 +00:00
fabioberger
568f87d5eb Add CHANGELOG entry about the updated DevUtils contract addresses 2019-11-07 19:24:07 +00:00
fabioberger
49ad0f0d54 Update devUtils contract addresses 2019-11-07 19:22:28 +00:00
fabioberger
0e642f59e1 Fix contract-addresses version in 0x.js 2019-11-07 19:00:26 +00:00
fabioberger
7c5730fb03 Update dep versions that were accidentally published 2019-11-07 18:11:40 +00:00
fabioberger
45f0f755ab Merge branch 'development' of github.com:0xProject/0x-monorepo into development 2019-11-07 18:07:23 +00:00
fabioberger
1ef2913c5b Update all CHANGELOGs to prep for publish 2019-11-07 18:07:15 +00:00
F. Eugene Aumson
fecbf220b6 Remove --serial from monorepo test:contracts (#2320) 2019-11-07 13:03:55 -05:00
fabioberger
17a5f05cf3 Make contract-test package private 2019-11-07 18:02:38 +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
Jacob Evans
ec26cff656 Fix contract-addresses CHANGELOG (prettier) 2019-11-07 08:48:48 +11:00
xianny
cdd34a1214 Updated CHANGELOGS & MD docs ONLY for pkgs that made it to npmjs (partial publish) 2019-11-06 12:50:58 -08:00
F. Eugene Aumson
857a4042ef abi-gen: Include templates in published tarball (#2315)
* abi-gen: Include templates in published tarball

* abi-gen: update CHANGELOG

* abi-gen/package.json: explicitly include code

Apparently when you include a "files" section, it by default only
includes the code directly referenced by the package.json.  (For this
package, it was including the lib/src/index.js referenced by "main", and
the bin/abi-gen.js referenced by "bin", but no other *.js files, nor any
*.d.ts files.)
2019-11-06 02:39:35 -05: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
F. Eugene Aumson
e61f23d001 Migrate Python libraries to v3 (#2284)
* .gitignore migrations/0x_ganache_snapshot

* .gitignore new-ish Python contract wrappers

These should have been added back when we started generating these
wrappers.

* rm superfluous contract artifact in Python package

All of the contract artifacts were removed from the Python package
recently, because now they're copied from the monorepo/packages area as
an automated build step.  Somehow this one artifact slipped through the
cracks.

* Eliminate circular dependency

This was preventing the Exchange wrapper from ever importing its
validator!

* Improve output of monorepo-level parallel script

- Capture stderr (and have it included in stdout) so that it doesn't
leak onto the console for commands that didn't actually fail.

- Include all error output in the Exception object (eliminate print
statement).

* Silence new versions of linters

Newer versions care about this stuff.  Old versions didn't, and we don't
either.

* Support Rich Reverts via Web3.py middleware

* Fix bug in generated wrappers' bytes handling

`bytes.fromhex(bytes.decode('utf-8')` is just plain wrong.  It would
work for some cases, but is not working when trying to fill orders with
the latest Exchange contract.

* Migrate to Exchange v3

* Fix typo in DevUtils documentation

* Include new contracts in docs

* Re-enable Python checks in CI

* Accept strings for bytes

* Fix CircleCI build artifacts for gen'd python

I swear the previous way was working before, but it wasn't working now,
so this fixes it.

* Accept a provider OR a Web3 object

In various places.  This allows the caller to install middleware (which
in web3.py is installed on a Web3 object, not on a provider) before
executing any RPC calls, which is important for the case where one wants
to produce signatures locally before submitting to a remote node.

* wrapper base: don't assume there are accounts

* Eliminate some inline linter directives

* make CHANGELOGs be REVERSE chronological

* Update CHANGELOG entries and bump version numbers

* @0x/contract-addresses: Put addr's in JSON, not TS

This allows easier consumption by other languages.  (Specifically, it
eliminates the overhead of keeping the Python addresses package in sync
with the TypeScript one.)

* sra_client.py: incl. docker in `./setup.py clean`

* sra_client.py: Migrate to protocol v3

Removed script that existed only to exclude runs of sra_client builds
(parallel_without_sra_client).  Now `parallel` is used by CI,
re-including sra_client in CI checks.

* abi-gen/templates/Py: clarify if/else logic

In response to
https://github.com/0xProject/0x-monorepo/pull/2284#discussion_r342200906

* sra_client.py: Update CHANGELOG and bump version

* contract_addresses/setup.py: rm unnecessary rm

* json_schemas.py: corrections to dev dependencies

* In tests against deployment, also run doctests

* contract_wrappers example: rm xtra Order attribute

Thanks to @steveklebanoff for catching this.
https://github.com/0xProject/0x-monorepo/pull/2284#pullrequestreview-312065368
2019-11-05 23:04:29 -05:00
Greg Hysz
cbe4c4fbf9 Merge pull request #2319 from 0xProject/fix/development/blockTimestampTooLowNonDeterministicBug
Fix development
2019-11-05 17:23:18 -08:00
xianny
deffdabc30 Revert "Updated CHANGELOGS & MD docs"
This reverts commit f65d8cc325.
2019-11-05 17:06:05 -08:00
xianny
8811a5387a Revert "Publish"
This reverts commit 9336d4e545.
2019-11-05 17:05:58 -08:00
xianny
9336d4e545 Publish
- @0x/contracts-asset-proxy@2.3.0-beta.1
 - @0x/contracts-coordinator@2.1.0-beta.1
 - @0x/contracts-dev-utils@0.1.0-beta.1
 - @0x/contracts-erc1155@1.2.0-beta.1
 - @0x/contracts-erc20@2.3.0-beta.1
 - @0x/contracts-erc721@2.2.0-beta.1
 - @0x/contracts-exchange-forwarder@3.1.0-beta.1
 - @0x/contracts-exchange-libs@3.1.0-beta.1
 - @0x/contracts-exchange@2.2.0-beta.1
 - @0x/contracts-extensions@4.1.0-beta.1
 - @0x/contracts-integrations@1.0.1
 - @0x/contracts-multisig@3.2.0-beta.1
 - @0x/contracts-staking@1.1.0-beta.1
 - @0x/contracts-test-utils@3.2.0-beta.1
 - @0x/contracts-tests@0.0.2
 - @0x/contracts-utils@3.3.0-beta.1
 - 0x.js@7.1.0-beta.1
 - @0x/abi-gen-wrappers@5.4.0-beta.1
 - @0x/abi-gen@4.4.0-beta.1
 - @0x/assert@2.2.0-beta.1
 - @0x/asset-buyer@6.2.0-beta.1
 - @0x/asset-swapper@2.1.0-beta.1
 - @0x/base-contract@5.5.0-beta.1
 - @0x/connect@5.1.0-beta.1
 - @0x/contract-addresses@3.3.0-beta.1
 - @0x/contract-artifacts@2.3.0-beta.1
 - @0x/contract-wrappers@12.2.0-beta.1
 - @0x/contracts-gen@1.1.0-beta.1
 - @0x/dev-utils@2.4.0-beta.1
 - ethereum-types@2.2.0-beta.1
 - @0x/instant@1.0.33
 - @0x/json-schemas@4.1.0-beta.1
 - @0x/migrations@4.4.0-beta.1
 - @0x/monorepo-scripts@1.0.39
 - @0x/order-utils@8.5.0-beta.1
 - @0x/orderbook@0.1.0-beta.1
 - @0x/sol-compiler@3.2.0-beta.1
 - @0x/sol-coverage@3.1.0-beta.1
 - @0x/sol-doc@2.1.0-beta.1
 - @0x/sol-profiler@3.2.0-beta.1
 - @0x/sol-resolver@2.1.0-beta.1
 - @0x/sol-trace@2.1.0-beta.1
 - @0x/sol-tracing-utils@6.1.0-beta.1
 - @0x/sra-spec@2.1.0-beta.1
 - @0x/subproviders@5.1.0-beta.1
 - @0x/testnet-faucets@1.0.89
 - @0x/tslint-config@3.1.0-beta.0
 - @0x/types@2.5.0-beta.1
 - @0x/typescript-typings@4.4.0-beta.1
 - @0x/utils@4.6.0-beta.1
 - @0x/web3-wrapper@6.1.0-beta.1
2019-11-05 16:58:14 -08:00
xianny
f65d8cc325 Updated CHANGELOGS & MD docs 2019-11-05 16:58:00 -08:00
Greg Hysen
68656c4083 Fixes intermittent test failure by removing block timestamp contraints from staking scheduler tests 2019-11-05 16:57:37 -08:00
Greg Hysz
44793a9cf9 Merge pull request #2316 from 0xProject/tests/3.0/StakingMixinCumulativeRewardsUnitTEsts
Unit tests for MixinCumulativeRewards
2019-11-05 16:00:52 -08:00
Greg Hysen
2d0ad6f181 Updated staking changelog 2019-11-05 15:32:35 -08:00
Greg Hysen
a7f0717afb Unit tests for MixinCumulativeRewards 2019-11-05 15:32:04 -08:00
Greg Hysz
a9022352e7 Merge pull request #2314 from 0xProject/tests/3.0/MixinSchedulerUnitTests
Unit tests for MixinScheduler
2019-11-05 15:27:20 -08:00
Greg Hysen
9b2231ed24 Improved readability on some tests + updated staking changelog 2019-11-05 14:59:55 -08:00
Greg Hysen
c123200f38 Unit tests for MixinScheduler 2019-11-04 15:44:46 -08:00
James Towle
3c6c4128a6 Merge pull request #2294 from 0xProject/refactor/integration-tests/wrapper-functions
Refactor/integration tests/wrapper functions
2019-11-04 14:46:11 -08:00
Lawrence Forman
47e050cbaf Merge pull request #2312 from 0xProject/feat/contracts/staking/MixinStakingPoolRewards-unit-tests
MixinStakingPoolRewards unit tests
2019-11-04 17:19:03 -05:00
Alex Towle
62d15117c5 @0x:contracts-integrations Removed the dependency on number_utils from staking 2019-11-04 14:16:43 -08:00
Lawrence Forman
fb8360edfd Merge pull request #2311 from 0xProject/fix/contracts/staking/LibFixedMath-overflow-pt-2
Fix `LibFixedMath._mul()` overflow
2019-11-04 12:49:20 -05:00
Alex Towle
e557f2fb48 @0x:contracts-integrations Added decimal.js to dependencies so that number_utils can be used 2019-11-04 09:39:00 -08:00
Lawrence Forman
c957b48281 @0x/contracts-staking: Run prettier. 2019-11-04 11:10:07 -05:00
Lawrence Forman
c15c5e12b0 @0x/contracts-staking: Fix event name collision in MixinStakingPoolRewards unit tests. 2019-11-04 11:09:21 -05:00
Lawrence Forman
15c3c8074c @0x/contracts-staking: Add separate unit tests for withdrawDelegatorRewards() and _withdrawAndSyncDelegatorRewards(). 2019-11-04 10:43:37 -05:00
Lawrence Forman
cba72c811d @0x/contracts-staking: Add _computePoolRewardsSplit() tests to MixinStakingPoolRewards unit tests. 2019-11-04 10:43:37 -05:00
Lawrence Forman
28a2e56003 @0x/contracts-staking: Add more MixinStakingPoolRewards unit tests. 2019-11-04 10:43:37 -05:00
Lawrence Forman
8c4c3d56c6 @0x/contracts-staking: Create MixinStakingPoolRewards unit tests. 2019-11-04 10:43:37 -05:00
Alex Towle
911fcc0bed @0x:contracts-integrations Addressed review comments from @mzhu 2019-11-01 17:16:17 -07:00
Alex Towle
55fd16ccf1 @0x:contracts-integrations Addressed review comments from @dorothy-zbornak 2019-11-01 12:04:24 -07:00
Lawrence Forman
4e05e41f7f Merge pull request #2309 from 0xProject/feat/contracts/utils/LibERC20Token
LibERC20Token
2019-11-01 14:57:10 -04:00
Alex Towle
ebab80cff7 @0x:contracts-integrations Fixed test issues 2019-11-01 11:22:12 -07:00
Alex Towle
91cb162662 @0x:contracts-integrations Added tests for weth protocol fees 2019-11-01 11:22:12 -07:00
Alex Towle
fa26f8de51 @0x:contracts-integrations Refactored to reduce redundancy 2019-11-01 11:22:12 -07:00
Alex Towle
26602ac2db @0x:contracts-integrations Added assertions for events in all wrapper functions 2019-11-01 11:22:12 -07:00
Alex Towle
0b8af181d8 @0x:contracts-integrations Refactored the wrapper tests to use newer tools 2019-11-01 11:22:12 -07:00
Alex Towle
19d661d324 @0x:contracts-integrations Started to refactor the wrapper tests 2019-11-01 11:22:12 -07:00
Alex Towle
7d29b36246 @0x:contracts-integrations Moved the wrapper tests into the integrations package 2019-11-01 11:21:52 -07:00
Lawrence Forman
8ba7b95e86 @0x/contracts-utils: Move LibERC20Token out.
`@0x/contracts-erc20`: Move `LibERC20Token` in.
`@0x/contracts-erc20`: Use `LibBytes` and `LibRichErrors` in `LibERC20Token`.
`@0x/contracts-erc20`: Use `verifyEventsFromLogs` in `LibERC20Token` unit tests.
2019-11-01 13:58:22 -04:00
Lawrence Forman
30c72daed5 @0x/order-utils: Remove TransferFailedError from ForwarderRevertErrors (for real this time). 2019-11-01 13:36:07 -04:00
Lawrence Forman
575cb99839 @0x/contracts-utils: Update comments in LibERC20Token. 2019-11-01 13:36:07 -04:00
Lawrence Forman
0c064bf85b Update changelogs. 2019-11-01 13:36:07 -04:00
Lawrence Forman
0f3610c92a @0x/contracts-asset-proxy: Use LibERC20Token in UniswapBridge and Eth2DaiBridge. 2019-11-01 13:36:07 -04:00
Lawrence Forman
c8ef10baaf @0x/contracts-utils: Use simple assembly instead of abi.decode() in LibERC20Token._callWithOptionalBooleanResult().
`@0x/contracts-exchange-forwarder`: Use `LibERC20Token` in `MixinAssets`.
`@0x/order-utils`: Remove `TransferFailedError` from `ForwarderRevertErrors`.
2019-11-01 13:36:07 -04:00
Lawrence Forman
16dc73bd1e @0x/contracts-utils: Add LibERC20Token. 2019-11-01 13:36:07 -04:00
Lawrence Forman
4f56d68689 @0x/contracts-staking: Fix overflow w/ LibFixedMath._mul(-1, -2*255). 2019-11-01 13:35:23 -04:00
Greg Hysz
8e6d92cad5 Merge pull request #2310 from 0xProject/tests/3.0/StakingProxyUnitTests
Staking Proxy Unit Tests + Fallback Reverts if No Staking Contract
2019-11-01 10:26:54 -07:00
Greg Hysen
3a1c464543 Readability improvements to Staking Proxy unit tests + one extra case 2019-11-01 09:59:17 -07:00
Greg Hysen
a0c2f6b7b4 Updated Staking changelog 2019-10-31 18:25:33 -07:00
Greg Hysen
7bfbf0ad3a Staking Proxy unit tests + Staking Proxy fallback reverts if no staking contract is attached 2019-10-31 18:22:49 -07:00
mzhu25
82ee6750c7 Merge pull request #2307 from 0xProject/fix/integration-tests/tslint
`@0x/contracts-integrations`: Enable tslint and fix lint errors
2019-10-31 16:23:35 -07:00
mzhu25
c37fc30c55 Merge pull request #2302 from 0xProject/feature/integration-tests/fillOrder
`@0x/contracts-integrations`: fillOrder integration tests
2019-10-31 16:20:07 -07:00
Michael Zhu
09d13b2bfa default before/after in FunctionAssertion 2019-10-31 15:49:12 -07:00
Michael Zhu
af0de72bc3 address comments 2019-10-31 15:30:15 -07:00
Michael Zhu
43e32f6a1a fix other lint errors 2019-10-31 15:30:15 -07:00
Michael Zhu
e9e6452890 add tslint.json to package and update actor mixins 2019-10-31 15:28:02 -07:00
Michael Zhu
5f699b0c47 add test for weth protocol fees 2019-10-31 15:27:39 -07:00
Michael Zhu
bf18b86f9f address comments 2019-10-31 15:27:39 -07:00
Michael Zhu
56f7dd7538 fix deployment_manager_test 2019-10-31 15:27:39 -07:00
Michael Zhu
7aa88307f6 Flesh out fillOrder integration tests 2019-10-31 15:27:39 -07:00
James Towle
8aa69233e0 Merge pull request #2305 from 0xProject/sandstorm/framework/function_assertion_set
Function Assertion Sets
2019-10-31 14:07:57 -07:00
James Towle
e843333918 Merge pull request #2308 from 0xProject/fix/unblock-kroeger/add-contract-artifacts
`@0x:artifacts` Added the Staking and StakingProxy artifacts
2019-10-31 12:42:43 -07:00
Alex Towle
133a4dc4e1 @0x:contract-artifacts Trimmed artifacts and ran prettier 2019-10-31 10:21:40 -07:00
Alex Towle
c7945a542e @0x:abi-gen-wrappers Added exports 2019-10-31 10:18:41 -07:00
Alex Towle
b4e00baa07 @0x:artifacts Added the Staking and StakingProxy artifacts 2019-10-31 10:18:40 -07:00
Alex Towle
dde570706a @0x:contracts-integrations Put final cleaning touches on the function assertion set 2019-10-30 13:26:29 -07:00
Alex Towle
0b3e3ab990 @0x:contracts-integrations Addressed more review comments 2019-10-30 11:11:55 -07:00
Alex Towle
205c895d75 @0x:contracts-integrations Added better documentation to FunctionAssertions 2019-10-29 23:19:28 -07:00
Alex Towle
6402d29dd4 @0x:contracts-integrations Added collections of function assertions 2019-10-29 14:51:01 -07:00
mzhu25
dc18999931 Merge pull request #2293 from 0xProject/refactor/integrations/forwarder-tests
Refactor and move Forwarder tests to integrations package
2019-10-29 13:04:59 -07:00
Michael Zhu
43f8101d0b address comments 2019-10-29 11:26:56 -07:00
Michael Zhu
3d56c06ff3 Move Forwarder test to integrations; update to use new framework 2019-10-29 11:26:56 -07:00
Lawrence Forman
db9be73fec Merge pull request #2292 from 0xProject/feat/staking/MixinStakeBalances-unit-tests
Add MixinStakeBalances unit tests.
2019-10-29 08:11:59 -04:00
Lawrence Forman
a02892cbc8 @0x/contracts-staking: Remove duplicated test case in MixinStakeBalances unit tests. 2019-10-29 07:37:06 -04:00
Lawrence Forman
49c67fbb18 @0x/contracts-staking: Remove unused lodash import and only modifier from MixinStakeBalances unit tests. 2019-10-29 07:37:06 -04:00
Lawrence Forman
6f2e79208a @0x/contracts-staking: Add MixinStakeBalances unit tests. 2019-10-29 07:37:06 -04:00
Amir Bandeali
ceb3ba4116 Merge pull request #2296 from 0xProject/feat/3.0/testnet-migrations-2
Update 3.0 testnet migrations and addresses
2019-10-28 21:29:03 -07:00
Greg Hysz
08d4f1402f Merge pull request #2301 from 0xProject/fix/3.0/removeLibProxy
Removed LibProxy and inlined proxy call in StakingProxy.
2019-10-28 20:00:24 -07:00
Amir Bandeali
77fa97f259 Update DevUtils, Forwarder, and Coordinator addresses for each testnet 2019-10-28 17:40:50 -07:00
Amir Bandeali
3ac5d9add5 Add DevUtils, Forwarder, and Coordinator to testnet migrations 2019-10-28 17:40:45 -07:00
Amir Bandeali
cab89f312a Update CHANGELOG 2019-10-28 16:55:54 -07:00
Amir Bandeali
8972475389 Update testnet migrations and verifications 2019-10-28 16:55:54 -07:00
Amir Bandeali
330f2d54e2 Update contract-addresses with new testnet deployments 2019-10-28 16:55:54 -07:00
Greg Hysen
9c181f09ba Removed LibProxy and inlined proxy call in StakingProxy. 2019-10-28 16:42:52 -07:00
Amir Bandeali
011ecb8f4b Merge pull request #2297 from 0xProject/fix/multisig/allow-tx-to-be-over-confirmed
Allow transactions to be over confirmed without resetting the confirmation time
2019-10-28 12:49:19 -07:00
Amir Bandeali
bc2a9beb14 Merge pull request #2295 from 0xProject/feat/staking/remove-read-only-mode
Remove read-only mode and associated code
2019-10-28 12:02:10 -07:00
Amir Bandeali
091f5ed8b8 Allow transactions to be over confirmed without resetting the confirmation time 2019-10-28 10:45:17 -07:00
F. Eugene Aumson
ea9f535a7c contract_addresses.py: Add DevUtils contract (#2150)
* contract_addresses.py: Add DevUtils

* Update __init__.py

* Remove whitespace to satisfy linters
2019-10-28 13:32:24 -04:00
Amir Bandeali
f246314b1d Update default alpha from 1/2 to 2/3 2019-10-27 16:53:57 -07:00
Amir Bandeali
cdfd62a296 Fix reentrancy tests 2019-10-27 14:23:19 -07:00
Amir Bandeali
dcff7d511b Add tests for detachProtocolFeeCollector 2019-10-27 11:41:06 -07:00
Amir Bandeali
16a5475d24 Add detachProtocolFeeCollector function (in order to have a separate timelock for detaching) 2019-10-27 11:40:28 -07:00
Amir Bandeali
42468c3fa2 Remove read-only proxy from contract addresses and migrations 2019-10-27 11:12:22 -07:00
Amir Bandeali
9312d5d9f7 remove read-only mode related code from integrations 2019-10-27 11:12:22 -07:00
Amir Bandeali
33a0c22021 Remove tests related to read-only mode 2019-10-27 11:12:22 -07:00
Amir Bandeali
58e9c70203 Remove read-only mode related functions, storage variables, and contracts 2019-10-27 11:12:16 -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
59210f5e5e Merge pull request #2287 from 0xProject/feat/staking/MixinStakingPool-unit-tests
Add MixinStakingPool unit tests.
2019-10-25 11:59:50 -04:00
Lawrence Forman
1c695b2759 Rebase onto 3.0 2019-10-25 10:56:03 -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
b1b1162b60 @0x/contracts-staking: Add MixinStakingPool unit tests. 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
Greg Hysz
a22b2e7a9f Merge pull request #2290 from 0xProject/fix/3.0/updatedInterfaces
Created IZrxVaultBackstop and updated IStaking.
2019-10-25 06:33:18 -07:00
Greg Hysz
86ed32a007 Merge pull request #2288 from 0xProject/fix/3.0/minorStakingReadability
Replaced `protocolFeePaid` -> `protocolFeeAmount`
2019-10-25 06:19:20 -07:00
Greg Hysen
8e8ea6a3ab Created IZrxVaultBackstop and updated IStaking. 2019-10-24 15:58:51 -07:00
Greg Hysen
cc7452da8f Replaced protocolFeePaid -> protocolFeeAmount. Changed some wording in comments. 2019-10-24 15:58:18 -07:00
Amir Bandeali
06715201a7 Merge pull request #2283 from 0xProject/fix/3.0/rename-bridge-withdraw-to
Rename `withdrawTo` to `bridgeTransferFrom`
2019-10-23 10:15:08 -07:00
Amir Bandeali
281658ba34 Rename withdrawTo to bridgeTransferFrom 2019-10-23 09:42:37 -07:00
Lawrence Forman
f192648c76 Merge pull request #2279 from 0xProject/fix/3.0-audit/staking/assert-valid-params-in-MixinParams
Assert storage params when calling `MixinParams.setParams()`.
2019-10-23 05:11:10 -04:00
Lawrence Forman
07e1d502e7 @0x/contracts-staking: Update changelog. 2019-10-23 04:40:47 -04:00
Lawrence Forman
703e890918 @0x/contracts-staking: Call StakingProxy.assertValidStorageParams() in MixinParams.setParams() 2019-10-23 04:40:47 -04:00
mzhu25
096950729e Merge pull request #2275 from 0xProject/refactor/integrations/coordinator-tests-part2
Coordinator test refactor [2/2]
2019-10-22 17:37:21 -07:00
Michael Zhu
8869d79c68 rebase 2019-10-22 17:05:08 -07:00
Michael Zhu
752dd04546 address comments 2019-10-22 17:05:08 -07:00
Michael Zhu
3e5d166ec4 moving away from extending DeploymentManager in case we want to deploy multiple extensions alongside one another 2019-10-22 17:05:08 -07:00
Michael Zhu
64bc1b0990 update coordinator tests to use deployment manager, balance stores, actor mixins 2019-10-22 17:05:08 -07:00
Michael Zhu
548b0db6ea coordinator deployment manager 2019-10-22 17:05:08 -07:00
Greg Hysz
c9607e8b2c Merge pull request #2280 from 0xProject/fix/3.0/handleNopInMoveStake
Force no-op when moving stake, in some scenarios
2019-10-22 16:51:46 -07:00
Greg Hysen
c676ecb8cf Force no-op when moving zero stake or moving from undelegated to undelegated. 2019-10-22 15:39:24 -07:00
James Towle
39804fdc83 Merge pull request #2281 from 0xProject/fix/ci/10-22-2019
`CI` Fix build failure
2019-10-22 15:20:24 -07:00
Alex Towle
1a1dc89454 CI Fix build failure 2019-10-22 14:53:13 -07:00
James Towle
e427698956 Merge pull request #2252 from 0xProject/feature/sandstorm/function-assertions
Initial Sandstorm Framework
2019-10-22 13:45:42 -07:00
Greg Hysz
575af6b6e8 Merge pull request #2278 from 0xProject/fix/3.0/removeProtocolFeeZeroAssertion
Remove assertion that protocol fee != zero
2019-10-22 13:24:59 -07:00
Alex Towle
3a1fc9ee5f @0x:contracts-integrations Fixed package after rebase 2019-10-22 13:15:01 -07:00
mzhu25
1237c7d479 Merge pull request #2277 from 0xProject/fix/3.0/rmeove-staking-fallback
Remove payable fallback from Staking.sol
2019-10-22 12:46:13 -07:00
Greg Hysen
c44e16a88f Removed assertion that protocol fee != 0 from staking contract. 2019-10-22 12:42:04 -07:00
Greg Hysz
06c180475e Merge pull request #2276 from 0xProject/cleanup/staking/finalizationDataStructures
Refactored finalization state.
2019-10-22 12:37:50 -07:00
Michael Zhu
74a2c3a199 Remove payable fallback from Staking.sol 2019-10-22 12:15:07 -07:00
Greg Hysen
9ac715f99d Protocol fee amount is not enforced by staking contract 2019-10-22 12:10:34 -07:00
Greg Hysen
22e39f782f Some (more) readability improvements and minor optimizations to staking finalization. 2019-10-22 12:09:18 -07:00
Alex Towle
f5a6b84fa3 CI: Added a seperate workflow for contracts/integrations 2019-10-22 12:07:50 -07:00
Alex Towle
718407ba6f @0x:contracts-integrations Switched to object destructuring in the function assertion unit test 2019-10-22 12:07:50 -07:00
Alex Towle
e603a81a46 @0x:contracts-integrations Simplified the tests 2019-10-22 12:07:50 -07:00
Alex Towle
03e35846fb @0x:contracts-integrations Removed the Cache 2019-10-22 12:07:50 -07:00
Alex Towle
c87364f86b @0x:contracts-integrations Addressed more review feedback 2019-10-22 12:07:50 -07:00
Alex Towle
a794a33551 @0x:contracts-integrations Addressed review comments 2019-10-22 12:06:38 -07:00
Alex Towle
494b437f1a @0x:contracts-integrations Renamed some functions in Address Manager 2019-10-22 12:04:47 -07:00
Alex Towle
92b80fc436 @0x:contracts-integrations Improved the caches 2019-10-22 12:04:47 -07:00
Alex Towle
d66101cd9d @0x:contracts-integrations Added unit tests for FunctionAssertion 2019-10-22 12:04:47 -07:00
Alex Towle
89ae04803f @0x:contract-integrations Added the integrations package to CI 2019-10-22 12:01:54 -07:00
Alex Towle
be95bce4cd @0x:contract-integrations Move caches to a new file 2019-10-22 12:01:30 -07:00
Alex Towle
01aee08c02 @0x:contracts-integrations Wrote a simple integration test and AddressManager 2019-10-22 12:01:30 -07:00
Alex Towle
6cba9fd77f @0x/contracts-integrations Created the FunctionAssertion class and examples 2019-10-22 11:59:17 -07:00
mzhu25
673d45361f Merge pull request #2273 from 0xProject/refactor/integrations/coordinator-tests
Coordinator test refactor [1/2] + actor mixin pattern
2019-10-22 11:37:02 -07:00
Greg Hysen
d91a7fc663 Some readability improvements and minor optimizations to staking finalization. 2019-10-22 11:02:25 -07:00
Greg Hysen
ce8fd44234 Removed lingering references to stale terminology ("active pools") 2019-10-22 11:02:25 -07:00
Greg Hysen
6617ad9531 Refactored finalization state.
1. Removes state variables:
   - totalWeightedStakeThisEpoch
   - totalFeesCollectedThisEpoch
   - numActivePoolsThisEpoch

2. No longer indexes by epoch % 2

3. Renamed event StakingPoolActivated → StakingPoolEarnedRewards.

4. Renamed structs:
   - ActivePool → PoolStats. This holds stats for a pool that earned rewards.
   - UnfinalizedState → AggregatedStats. This aggregates stats from the former struct.
2019-10-22 11:02:25 -07:00
Amir Bandeali
10f8051835 Merge pull request #2274 from 0xProject/feat/staking/separate-function-logic
Separate finalization from withdrawing rewards
2019-10-22 10:36:04 -07:00
Amir Bandeali
e7dc7167d0 Sync delegatedStakeToPoolByOwner whenever _withdrawAndSyncDelegatorRewards is called 2019-10-22 09:38:18 -07:00
Amir Bandeali
359b804001 Add test for withdrawing rewards before epoch is finalized 2019-10-21 22:27:06 -07:00
Amir Bandeali
fd9084b345 Add PoolNotFinalizedError rich revert 2019-10-21 22:27:06 -07:00
Amir Bandeali
44dac2cd80 Fix tests that assume touching stake will finalize pool 2019-10-21 22:27:06 -07:00
Amir Bandeali
a66ea2bf74 Assert that pool has been finalized in _withdrawAndSyncDelegatorRewards rather than calling finalizePool 2019-10-21 22:27:06 -07:00
Amir Bandeali
a362e9d2d8 Use safeMath where possible 2019-10-21 22:27:06 -07:00
Amir Bandeali
1885957bd3 Update tests to start at epoch 1 2019-10-21 22:27:06 -07:00
Amir Bandeali
1a409c3731 Initialize currentEpoch at 1 instead of 0 2019-10-21 22:27:06 -07:00
Amir Bandeali
7b7c64fc6a Add assertion function that checks if pool was finalized last epoch 2019-10-21 22:27:06 -07:00
Michael Zhu
102fcd3fb8 export actor classes 2019-10-21 11:17:53 -07:00
Michael Zhu
566e05aea4 typo 2019-10-21 11:17:53 -07:00
Michael Zhu
f014370531 document mixin constructor params 2019-10-21 11:17:53 -07:00
Michael Zhu
dfbbe9daa2 address comments 2019-10-21 11:17:53 -07:00
Michael Zhu
6b653fb00d prettier gdi 2019-10-21 11:17:53 -07:00
Michael Zhu
21cf2319d5 rename some stuff 2019-10-21 11:17:53 -07:00
Michael Zhu
4210477e71 Introduce actor mixin pattern 2019-10-21 11:17:53 -07:00
Michael Zhu
93b02e93b9 juggling some files around 2019-10-21 11:16:14 -07:00
Michael Zhu
f4cb8cfb7e Support arbitrary # of tokens in DeploymentManager 2019-10-21 11:16:14 -07:00
Xianny
ce9f051d42 Create @0x/contracts-tests (#2261)
* Create @0x/contracts-tests

* Move tests from @0x/contracts-dev-utils
2019-10-21 10:23:46 -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
820b40e227 Import ZeroExGovernor instead of AssetProxyOwner in testnet migrations 2019-10-18 16:31:38 -07:00
mzhu25
59a38a8db0 Merge pull request #2269 from 0xProject/refactor/balance-stores
BalanceStore++
2019-10-18 09:01:33 -07:00
Lawrence Forman
d0884dcb4d Merge pull request #2267 from 0xProject/feat/3.0/staking/MixinStake-unit-tests
Create MixinStake unit tests
2019-10-18 11:41:18 -04:00
Lawrence Forman
c7ca625408 @0x/contracts-staking: Fix MixinStake unit tests typo. 2019-10-18 10:45:07 -04:00
Lawrence Forman
e46f51339a @0x/contracts-staking: Address review comments. 2019-10-18 10:42:47 -04:00
Michael Zhu
b45ec47eee address comments 2019-10-17 19:53:43 -07:00
Amir Bandeali
c50cbd7a75 Rename AssetProxyOwner to ZeroExGovernor throughout all contracts packages 2019-10-17 17:41:54 -07:00
Amir Bandeali
5ddc35fdf2 Rename AssetProxyOwner to ZeroExGovernor 2019-10-17 17:41:54 -07:00
Amir Bandeali
d6c064b9c3 Merge pull request #2224 from 0xProject/feat/3.0/testnet-migrations
3.0 testnet migrations
2019-10-17 17:38:09 -07:00
Amir Bandeali
caf6329bb3 Merge branch '3.0' into feat/3.0/testnet-migrations 2019-10-17 17:13:12 -07:00
Lawrence Forman
008938cf5b @0x/contracts-staking: Check order of increase and derease balance operations in MixinStake unit tests. 2019-10-17 14:09:46 +10:00
Fabio B
3fd29656cb Merge pull request #2268 from 0xProject/addERC1155MintableSupport
Add erc1155 mintable support
2019-10-17 11:50:02 +08:00
Michael Zhu
ffac52f42e lint 2019-10-16 20:19:04 -07:00
fabioberger
9114510c00 Add enum-naming linter ignore to wrappers to fix linter issue with URL in ERC1155Mintable 2019-10-17 12:16:42 +09:00
fabioberger
2dbda6fc42 Deploy ERC1155Mintable in migration 2019-10-17 12:16:08 +09:00
fabioberger
eae4001622 Update ganache-cli version in migration dockerfile 2019-10-17 12:16:08 +09:00
fabioberger
727d0498b6 Export ERC1155Mintable from abi-gen-wrapper 2019-10-17 12:16:08 +09:00
fabioberger
e43f2d39bf Add ERC1155Mintable to artifacts and abi-gen-wrappers packages 2019-10-17 12:16:08 +09:00
Michael Zhu
cde0169733 Update BlockchainBalanceStore to not rely on erc*_wrappers + better balance equality assertions 2019-10-16 18:46:55 -07:00
Xianny
0e90b0e7d0 Make wrappers small again (#2243)
* introduce --debug option to abi-gen and remove debug functions from @0x/abi-gen-wrappers
* make evmExecAsync protected; ignore deployedBytecode in doc comment
* trim deployedBytecode so it's undefined unless a contract has pure functions
* remove validateAndSendTransactionAsync
* Create `AwaitTransactionSuccessOpts` and `SendTransactionOpts` types 
* Remove duplicate types `IndexedFilterValues`, `DecodedLogEvent`, `EventCallback` from `@0x/base-contract`
2019-10-16 09:38:34 -07:00
Lawrence Forman
b793a31cdd @0x/contracts-staking: Create MixinStake unit tests. 2019-10-16 22:53:36 +10:00
James Towle
23198174f3 Merge pull request #2254 from 0xProject/fix/t14
Add SafeMath to Multisig
2019-10-15 15:40:48 -07:00
Alex Towle
523bc3f951 Updated Changelogs 2019-10-15 15:00:01 -07: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
Alex Towle
90193c8197 @0x:contracts-multisig Changed SafeMath to LibSafeMath 2019-10-15 14:31:48 -07:00
Alex Towle
6f5c62914e @0x:contracts-multisig Switched to SafeMath in pastTimeLock 2019-10-15 14:31:48 -07:00
James Towle
17faeae47d Merge pull request #2265 from 0xProject/fix/3.0/c18
Fix/3.0/c18
2019-10-15 11:31:46 -07:00
Alex Towle
7283a16710 @0x:contracts-utils Updated changelog 2019-10-14 11:57:02 -07:00
Alex Towle
52c3dc4ad8 @0x:contracts-utils Fixed and improved the LibBytes tests 2019-10-14 11:54:02 -07:00
Alex Towle
1cf8ae5909 @0x:contracts-utils Removed several functions from LibBytes 2019-10-14 11:54:02 -07:00
Amir Bandeali
51282953bd Merge pull request #2263 from 0xProject/fix/3.0-audit/staking/cumulative-rewards-refactor
Staking: Refactor and slightly simplify rewards tracking
2019-10-14 18:28:03 +09:00
Lawrence Forman
a6603d6bd6 @0x/contracts-staking: Fix typo in MixinCumulativeRewards 2019-10-14 15:19:34 +10:00
Lawrence Forman
54a03eacd6 @0x/contracts-staking: Refactor MixinCumulativeRewards and MixinStakingPoolRewards to better encapsulate cumulative rewards.
`@0x/contracts-staking`: Make sure we don't overwrite an existing CR.
`@0x/contracts-staking`: Remove the need to initialize cumulative rewards when creating a pool.
`@0x/contracts-staking`: Just return an empty CR in `_getCumulativeRewardAtEpoch()` if one can't be found.
2019-10-14 12:36:26 +10:00
Amir Bandeali
43fa753a13 Merge pull request #2262 from 0xProject/fix/staking/simplify-finalization
Staking readability improvements
2019-10-14 10:45:55 +09:00
Amir Bandeali
9d9fe882b6 Remove unnecessary payable keywords 2019-10-14 09:58:31 +09:00
Amir Bandeali
4f6958b7b5 Do not import @0x/contracts-extensions to fix build 2019-10-14 09:46:06 +09:00
Amir Bandeali
9a5752fff9 Remove unused param in Pool struct 2019-10-14 09:45:37 +09:00
Amir Bandeali
c21932d149 Remove _creditRewardsToPool and remove return values from finalizePool 2019-10-13 17:31:55 +09:00
Amir Bandeali
ce6c05637f Update cumulative rewards tracking tests 2019-10-13 17:31:55 +09:00
Amir Bandeali
b0699fc238 Always set cumulative rewards when _withdrawAndSyncDelegatorRewards is called 2019-10-13 17:31:55 +09:00
Amir Bandeali
8bf7c4cf48 Remove unnecessary assert 2019-10-13 17:31:55 +09:00
Lawrence Forman
9f6d113fe8 Merge pull request #2255 from 0xProject/fix/3.0-audit/staking/LibFixedMath-arithmetic-overflows
Fix LibFixedMath arithmetic overflows
2019-10-12 07:38:05 +09:00
James Towle
646507c41a Merge pull request #2253 from 0xProject/fix/t8
Ownership Transferred Event
2019-10-10 16:58:08 -07:00
Alex Towle
65f2626544 @0x:contracts-utils Updated the OwnershipTransferred event to be closer to OpenZeppelin's event 2019-10-10 10:58:58 -07:00
Greg Hysz
7155d878b3 Merge pull request #2257 from 0xProject/cleanup/staking/loadSyncedUnsyncedBalance
Remove `loadSyncedBalance` and `loadUnsyncedBalance`
2019-10-10 16:15:17 +09:00
Greg Hysen
361576814c Removed loadSyncedBalance and loadUnsyncedBalance 2019-10-10 15:51:24 +09:00
Amir Bandeali
aa541d0cad Merge pull request #2256 from 0xProject/feat/staking/immutable
Separate immutable contracts, only inherit as needed
2019-10-10 15:19:37 +09:00
Amir Bandeali
7e58385a78 Separate immutable contracts, only inherit as needed 2019-10-10 15:00:35 +09:00
Amir Bandeali
b5545255d0 Merge pull request #2245 from 0xProject/fix/3.0/validate-assetdata
Enforce assetData is padded to 32 bytes
2019-10-10 10:55:22 +09:00
Lawrence Forman
a22ba8647c Update changelogs 2019-10-10 09:41:57 +09:00
Lawrence Forman
22fc0b4337 @0x/contracts-staking: Add another LibFixedMath.add() test. 2019-10-10 09:31:53 +09:00
Lawrence Forman
063d6ff24e @0x/contracts-staking: Add more overflow safeguards to LibFixedMath. 2019-10-10 09:16:01 +09:00
Lawrence Forman
09c0b83fe3 @0x/utils: Consolidated FixedMathRevertErrors 2019-10-10 09:16:01 +09:00
Lawrence Forman
a42f3d189c @0x/contracts-staking: Implement better overflow detection in LibFixedMath. 2019-10-10 09:16:01 +09:00
Alex Towle
7815da7257 @0x:contracts-utils Addressed review feedback 2019-10-09 10:49:38 -07:00
Amir Bandeali
8e2b971f5a Merge pull request #2249 from 0xProject/feat/staking/catastrophic-failure-backstop
Read-only mode backstop
2019-10-09 19:16:10 +09:00
Amir Bandeali
3fd7132a0d Merge pull request #2248 from 0xProject/fix/staking/cleanup-accounting
Simplify staking state
2019-10-09 18:00:06 +09:00
Amir Bandeali
93edb083fa Remove payable fallback from IStakingProxy, fix linting errors 2019-10-09 17:27:37 +09:00
Amir Bandeali
9e41c648dc Add backstop tests 2019-10-09 17:27:37 +09:00
Amir Bandeali
a7ef54dbff Implement ZrxVaultBackstop 2019-10-09 17:27:37 +09:00
Amir Bandeali
414084a7ad Track state of read-only mode in stakingProxy 2019-10-09 17:27:37 +09:00
Amir Bandeali
681e6eab7a Cleanup language used in comments and variable names 2019-10-09 17:15:25 +09:00
Amir Bandeali
701b203c58 Fix tests 2019-10-09 17:15:25 +09:00
Amir Bandeali
cbd0ca4b60 Make currentEpoch uint64 type, change INACTIVE => UNDELEGATED, and make global balances state a mapping from uin8 => StoredBalance 2019-10-09 17:15:25 +09:00
Amir Bandeali
1626566f93 Change getBalanceOfVault => getBalanceOfZrxVault 2019-10-09 17:15:25 +09:00
Amir Bandeali
ac75053f69 Remove unused rich revert 2019-10-09 17:15:25 +09:00
Amir Bandeali
13afc65b54 Do not store global inactive state 2019-10-09 17:15:25 +09:00
Amir Bandeali
aa0a1bb54d Fix tests to no longer utilize active stake 2019-10-09 17:15:25 +09:00
Amir Bandeali
2e36c7ef83 Remove ACTIVE state 2019-10-09 17:15:25 +09:00
Amir Bandeali
43399a9ad9 Refactor tests to use new getters 2019-10-09 17:15:25 +09:00
Amir Bandeali
2ef546210d Update tests to reflect new withdrawal logic 2019-10-09 17:15:25 +09:00
Amir Bandeali
7b379f3933 Simplify withdrawal flow and storage layout 2019-10-09 17:15:25 +09:00
Amir Bandeali
f8ac986a0f Remove unused struct field 2019-10-09 17:14:28 +09:00
Alex Towle
dc0a78434d @0x:contracts-utils Updated files 2019-10-08 19:27:39 -07:00
Alex Towle
d1b0384aef @0x:contracts-utils Added an event for ownership transfers 2019-10-08 19:22:27 -07:00
Greg Hysz
7ac7f45c4a Merge pull request #2250 from 0xProject/cleanup/staking/simplifyMakers
Simplify Makers Interactions with Staking Pools
2019-10-08 11:25:07 +09:00
Greg Hysen
b3c7ccec57 Changed nextPoolId to lastPoolId 2019-10-08 10:43:18 +09:00
Lawrence Forman
93725ecec0 Merge pull request #2233 from 0xProject/feat/erc20-bridge/uniswap
UniswapBridge
2019-10-08 10:31:47 +09:00
Amir Bandeali
3c31ef188a Merge pull request #2246 from 0xProject/fix/3.0/always-validate-signatures
Always validate order signatures
2019-10-08 10:25:28 +09:00
Lawrence Forman
53df2130ea @0x/contracts-asset-proxy: Remove only modifier on uniswap tests. 2019-10-08 09:27:53 +09:00
Amir Bandeali
8b695f9b98 Fix race condition in tests 2019-10-08 09:12:37 +09:00
Amir Bandeali
d914f6fce9 Test for failure with bad signature after partial fill 2019-10-08 09:12:37 +09:00
Amir Bandeali
e2e5152648 Always validate signatures for all types 2019-10-08 09:12:37 +09:00
Lawrence Forman
d3dcf7fb0c Merge pull request #2247 from 0xProject/fix/3.0-audit/staking/shadowed-variable
fix `_computeUnfinalizedDelegatorReward()` shadowed variable and function mutability
2019-10-07 18:50:32 -05:00
Greg Hysen
a0f5a8b64b Simplify Makers Interactions with Staking Pools.
- No longer an upper limit on how many makers can be in a pool.
- No longer a handshake for a maker to join a pool.
- No longer any special powers given to makers.
- Pool Id starts at 1 and increments by 1.
2019-10-08 06:00:24 +09:00
mzhu25
ee508f70bc Merge pull request #2228 from 0xProject/fix/3.0/refundFinalBalanceNoReentry
refundFinalBalanceNoReentry
2019-10-06 13:39:04 -07:00
mzhu25
200b3d450f Merge pull request #2229 from 0xProject/feature/3.0/update-coordinator
Update Coordinator for 3.0
2019-10-06 13:20:00 -07:00
Michael Zhu
52fc7517f9 Remove approval expirations, address other comments 2019-10-06 12:45:48 -07:00
Michael Zhu
cf517b1459 appease static tests 2019-10-06 12:44:58 -07:00
Michael Zhu
c17984b74f Refactor integration tests (CoordinatorTestFactory) 2019-10-06 12:44:58 -07:00
Michael Zhu
589d2212ee Test coordinator protocol fees 2019-10-06 12:44:58 -07:00
Michael Zhu
9b922f746b Update coordinator tests 2019-10-06 12:44:58 -07:00
Michael Zhu
0e7387550c Update contracts 2019-10-06 12:44:58 -07:00
Lawrence Forman
dbf22583b5 @0x/contracts-asset-proxy: Remove unecessary token allowance when coming from WETH. 2019-10-05 22:37:51 -05:00
Lawrence Forman
6825eb442b @0x/contracts-staking: Fix shadowed variable in MixinStakingPoolRewards._computeUnfinalizedDelegatorReward() and make the function pure. 2019-10-05 17:22:46 -05:00
James Towle
45f284973a Merge pull request #2240 from 0xProject/feature/integration-tests/deployment-manager
Deployment Manager
2019-10-05 15:14:12 -07:00
Lawrence Forman
ef6e691646 @0x/contracts-exchange-libs: Update generated source files after revase. 2019-10-05 16:29:06 -05:00
Lawrence Forman
e67888d65f @0x/contracs-asset-proxy: Pass in minimum buy amounts in the UniswapBridge.
`@0x/contracs-asset-proxy`: Slight refactors in `UniswapBridge`.
2019-10-05 16:27:24 -05:00
Lawrence Forman
584f8b13fe @0x/contracts-asset-proxy: Rebase and update Eth2DaiBridge to use IWallet from exchange-libs. 2019-10-05 13:57:51 -05:00
Lawrence Forman
f993b6d1ed @0x/contracts-exchange: Revert changes to IWallet. 2019-10-05 13:57:51 -05:00
Lawrence Forman
035dc607db @0x/contracts-asset-proxy: Use IWallet from exchange-libs.
`@0x/contracts-asset-proxy`: Fix some comment typos in `UniswapBridge`.
`@0x/contracts-asset-proxy`: Add more allowance tests to the `UniswapBridge` tests.
2019-10-05 13:57:51 -05:00
Lawrence Forman
cf2053ec77 @0x/contracts-exchange-libs: Move IWallet from asset-proxy and exchange packages into this package. 2019-10-05 13:57:51 -05:00
Lawrence Forman
3840ebf538 @0x/contracts-exchange: Move IWallet.sol to exchange-libs. 2019-10-05 13:57:51 -05:00
Lawrence Forman
80cb6b654b @0x/contracts-asset-proxy: Fix linter errors. 2019-10-05 13:57:51 -05:00
Lawrence Forman
ab70c4df74 @0x/contracts-asset-proxy: Remove only modifier on tests. 2019-10-05 13:57:51 -05:00
Lawrence Forman
95e461072f @0x/contracts-asset-proxy: Always set allowance. 2019-10-05 13:57:50 -05:00
Lawrence Forman
2593f1ff30 @0x/contracts-asset-proxy: Update CHANGELOG. 2019-10-05 13:57:50 -05:00
Lawrence Forman
c2261a6bbe @0x/contracts-asset-proxy: Finish off UniswapBridge tests. 2019-10-05 13:57:50 -05:00
Lawrence Forman
b383781870 @0x/contracts-asset-proxy: Getting around stack issues. 2019-10-05 13:57:50 -05:00
Lawrence Forman
7d121bafd0 @0x/contracts-asset-proxy: More work on UniswapBridge tests. 2019-10-05 13:57:50 -05:00
Lawrence Forman
6a2911d10f @0x/contracts-asset-proxy: Start work on UniswapBridge tests. 2019-10-05 13:57:50 -05:00
Lawrence Forman
17362bcf44 @0x/contracts-asset-proxy: Create UniswapBridge. 2019-10-05 13:57:50 -05:00
Amir Bandeali
87906a3af1 Add test for improperly padded assetData 2019-10-04 18:05:20 -07:00
Amir Bandeali
c0c27ed637 Enforce that assetData is padded to 32 bytes, excluding the id, before dispatching transfer 2019-10-04 18:04:44 -07:00
Amir Bandeali
6be5552944 fix static tests 2019-10-04 17:17:07 -07:00
Alex Towle
b4ae42cc9a @0x/contracts-integrations Added the integrations package to the top-level configuration 2019-10-04 16:32:39 -07:00
Alex Towle
3c6957095d @0x:contracts-integrations Addressed review feedback 2019-10-04 15:42:36 -07:00
fabioberger
2020d87824 Fix dist tag issue in publish script 2019-10-04 20:44:18 +08:00
Amir Bandeali
ac1063dd68 Merge branch '3.0' into feat/3.0/testnet-migrations 2019-10-03 23:04:07 -07:00
fabioberger
b8e01d7be5 Add beta version to next tslint-config release 2019-10-04 13:28:25 +08:00
Alex Towle
24e4567b25 @0x:contracts-integration-tests Added an integration-tests package and a deployment manager class 2019-10-03 19:41:51 -07:00
Jacob Evans
ccf40fd65e Merge pull request #2242 from 0xProject/fix-mesh-orderbook-types
HACK: Types as any until Mesh RPC client is published
2019-10-03 18:21:24 -07:00
Jacob Evans
d4729e2669 Increase HEAP space for Instant 2019-10-03 17:47:33 -07:00
Jacob Evans
52d38c63de HACK the types until Mesh RPC client is published 2019-10-03 16:40:42 -07:00
Jacob Evans
086c30831d Merge pull request #2241 from 0xProject/rm-dev-tools-pages
Remove dev tools pages
2019-10-03 16:31:44 -07:00
Jacob Evans
4be83de7e5 Remove dev tools pages 2019-10-03 16:25:46 -07:00
Jacob Evans
c60d1e50c5 Publish
- @0x/contracts-asset-proxy@2.3.0-beta.0
 - @0x/contracts-coordinator@2.1.0-beta.0
 - @0x/contracts-dev-utils@0.1.0-beta.0
 - @0x/contracts-erc1155@1.2.0-beta.0
 - @0x/contracts-erc20@2.3.0-beta.0
 - @0x/contracts-erc721@2.2.0-beta.0
 - @0x/contracts-exchange-forwarder@3.1.0-beta.0
 - @0x/contracts-exchange-libs@3.1.0-beta.0
 - @0x/contracts-exchange@2.2.0-beta.0
 - @0x/contracts-extensions@4.1.0-beta.0
 - @0x/contracts-multisig@3.2.0-beta.0
 - @0x/contracts-staking@1.1.0-beta.0
 - @0x/contracts-test-utils@3.2.0-beta.0
 - @0x/contracts-utils@3.3.0-beta.0
 - 0x.js@7.1.0-beta.0
 - @0x/abi-gen-wrappers@5.4.0-beta.0
 - @0x/abi-gen@4.3.0-beta.0
 - @0x/assert@2.2.0-beta.0
 - @0x/asset-buyer@6.2.0-beta.0
 - @0x/asset-swapper@2.1.0-beta.0
 - @0x/base-contract@5.5.0-beta.0
 - @0x/connect@5.1.0-beta.0
 - @0x/contract-addresses@3.3.0-beta.0
 - @0x/contract-artifacts@2.3.0-beta.0
 - @0x/contract-wrappers@12.2.0-beta.0
 - @0x/contracts-gen@1.1.0-beta.0
 - @0x/dev-utils@2.4.0-beta.0
 - ethereum-types@2.2.0-beta.0
 - @0x/instant@1.0.32
 - @0x/json-schemas@4.1.0-beta.0
 - @0x/migrations@4.4.0-beta.0
 - @0x/monorepo-scripts@1.0.38
 - @0x/order-utils@8.5.0-beta.0
 - @0x/orderbook@0.1.0-beta.0
 - @0x/sol-compiler@3.2.0-beta.0
 - @0x/sol-coverage@3.1.0-beta.0
 - @0x/sol-doc@2.1.0-beta.0
 - @0x/sol-profiler@3.2.0-beta.0
 - @0x/sol-resolver@2.1.0-beta.0
 - @0x/sol-trace@2.1.0-beta.0
 - @0x/sol-tracing-utils@6.1.0-beta.0
 - @0x/sra-spec@2.1.0-beta.0
 - @0x/subproviders@5.1.0-beta.0
 - @0x/testnet-faucets@1.0.88
 - @0x/types@2.5.0-beta.0
 - @0x/typescript-typings@4.4.0-beta.0
 - @0x/utils@4.6.0-beta.0
 - @0x/web3-wrapper@6.1.0-beta.0
2019-10-03 14:10:22 -07:00
Jacob Evans
501f5ad3de Updated CHANGELOGS & MD docs 2019-10-03 14:10:00 -07:00
Fabio B
9fe6c196ad Merge pull request #2237 from 0xProject/fix/reenablePublishAndDocGenCITests
Re-enable publish-test and doc-gen-test on CI
2019-10-04 01:58:36 +08:00
fabioberger
6d462b0598 Fix prettier 2019-10-03 15:28:06 +08:00
fabioberger
3832c66ad0 Exclude unready packages from install step as well 2019-10-03 15:08:05 +08:00
fabioberger
57028069c0 Don't run test-publish for contract-coordinator and contracts-extensions since they're not ready yet 2019-10-03 14:32:55 +08:00
fabioberger
8d84ac9cf8 increase maxBuffer on exec call 2019-10-03 14:07:06 +08:00
fabioberger
17219d22c3 Add mocha types to deps 2019-10-03 13:10:04 +08:00
fabioberger
bf4005b0ee Move mocha to a dependency since it's is actually a dep not a devDep in this case 2019-10-03 11:58:17 +08:00
fabioberger
d8605ed91d Remove ambient Mocha declaration 2019-10-03 11:42:19 +08:00
fabioberger
f18e2a09e6 Change publish script so that we don't generate MD docs unless it's an actual publish 2019-10-03 10:59:31 +08:00
fabioberger
d5c0f5aa47 Move chai extension types out of @0x/typescript-typings 2019-10-03 10:37:09 +08:00
fabioberger
2825a201cd Add missing exports to 0x.js 2019-10-02 21:35:47 +08:00
fabioberger
2d69afec86 Increase timeout on publish test 2019-10-02 21:32:18 +08:00
fabioberger
851e4bfbea Fix prettier 2019-10-02 20:57:57 +08:00
fabioberger
c63745c2ce Fix deps 2019-10-02 20:57:52 +08:00
fabioberger
95f11f2d0e Fix changelog version for staking package 2019-10-02 20:52:25 +08:00
fabioberger
30417fbf24 Increase doc gen timeout 2019-10-02 20:51:41 +08:00
fabioberger
06f095ca23 Move types part of pkg exported interfaces to @0x/types from base-contract so more easily accessible 2019-10-02 19:06:54 +08:00
fabioberger
30141ca6cf Fix md gen for contract-wrappers so also includes re-exported dep content 2019-10-02 18:42:41 +08:00
fabioberger
c4b69efdd1 Update package index.ts exports so that we are able to generate docs 2019-10-02 18:16:10 +08:00
fabioberger
d810aff337 Add latest solc version paths 2019-10-02 17:14:07 +08:00
fabioberger
83532fdae7 Fix Solc bin path so it's _outside_ lib dir and persists across rebuilds 2019-10-02 17:13:54 +08:00
fabioberger
043534dd56 Add back publish and doc gen tests to CI 2019-10-02 14:29:13 +08:00
fabioberger
a90c808fb4 Remove Geth testing from CI 2019-10-02 14:28:27 +08:00
Fabio B
a06c39df9f Merge pull request #2231 from 0xProject/fix/remove-fill-scenarios
Remove fill-scenarios package
2019-10-02 08:23:03 +02:00
xianny
24c3aefb6f remove fill-scenarios 2019-10-02 14:03:50 +08:00
Jacob Evans
9544d317a0 Merge pull request #2234 from 0xProject/v3-rc0-packages
V3 rc0 packages
2019-10-01 22:42:08 -07:00
Amir Bandeali
650efb95e2 Add more contract configs tests 2019-10-01 22:18:09 -07:00
Jacob Evans
506d27816e Update Ropsten devUtils and Forwarder 2019-10-01 22:14:01 -07:00
Jacob Evans
f5a0c87fdc Update Exchange, Forwarder, DevUtils 2019-10-01 22:14:01 -07:00
Jacob Evans
90541f0436 Updated Forwarder 2019-10-01 22:14:01 -07:00
Amir Bandeali
76cac53692 Merge pull request #2235 from 0xProject/fix/3.0/deployment-tests
Fix deployment and configuration tests
2019-10-01 22:08:25 -07:00
Fabio B
18366bd58d Merge pull request #2232 from 0xProject/refactor/3.0-wrappers
Reduce exports from 0x.js
2019-10-02 06:45:02 +02:00
Amir Bandeali
27c039d51c Fix deployment and configuration tests 2019-10-01 21:44:43 -07:00
Fabio B
8465be2a03 Merge pull request #2226 from 0xProject/feature/publishPrep
Final RC publish prep
2019-10-02 05:02:53 +02:00
Amir Bandeali
7d6f49172d Merge pull request #2223 from 0xProject/feat/3.0/do-not-authorize-owner
Do not authorize owner by default
2019-10-01 19:54:46 -07:00
Lawrence Forman
d15f4de4ae @0x/contracts-asset-proxy: Inline _grantAllowances() in Eth2DaiBridge. 2019-10-01 19:46:14 -07:00
Lawrence Forman
4098238019 @0x/contracts-asset-proxy: Set allowance every time. 2019-10-01 19:46:14 -07:00
Lawrence Forman
1356237ec9 @0x/contracts-asset-proxy: Rebase and use IERC20Bridge 2019-10-01 19:46:14 -07:00
Lawrence Forman
35daecd5ae @0x/contracts-asset-proxy: Rebase and use @0x/types.AssetProxyId. 2019-10-01 19:46:14 -07:00
Lawrence Forman
bb87c8e7b5 @0x/contracts-asset-proxy: Switch Eth2DaiBridge to support arbitrary tokens.
`@0x/contracts-asset-proxy`: Support non-conformant tokens in Eth2DaiBridge
2019-10-01 19:46:14 -07:00
Lawrence Forman
48f7a24505 @0x/contracts-asset-proxy: Rebase and update tests for new proxy selector. 2019-10-01 19:46:14 -07:00
Lawrence Forman
98c59091ab @0x/contracts-asset-proxy: Add comments and update naming convention in IEth2Dai. 2019-10-01 19:46:14 -07:00
Lawrence Forman
4ca08adcfa @0x/contracts-asset-proxy: Rebase and add extra comments. 2019-10-01 19:46:14 -07:00
Lawrence Forman
29bcc1b5b7 @0x/contracts-asset-proxy: omg these insidious only modifiers. 2019-10-01 19:46:14 -07:00
Lawrence Forman
6e4186adbe @0x/contracts-asset-proxy: Add some more unit tests for Eth2DaiBridge. 2019-10-01 19:46:14 -07:00
Lawrence Forman
38e540ad9f @0x/contracts-asset-proxy: Remove only modifier on tests. 2019-10-01 19:46:14 -07:00
Lawrence Forman
7762b7b665 @0x/contracts-asset-proxy: Add signature validation. 2019-10-01 19:46:14 -07:00
Lawrence Forman
82ac8e29e3 @0x/contracts-asset-proxy: Add Eth2DaiBridge and tests. 2019-10-01 19:46:14 -07:00
fabioberger
e074335285 Null out all contracts not re-deployed or updated to V3 2019-10-02 09:15:50 +08:00
xianny
3adbe843da update contract-addresses version 2019-10-01 17:51:25 -07:00
mzhu25
d5c8c076dc Merge pull request #2216 from 0xProject/feature/3.0/forwarder-protocol-fees
Forwarder protocol fees
2019-10-01 17:45:02 -07:00
xianny
1d68c4105a redo changes from #2147 2019-10-01 17:17:40 -07:00
Michael Zhu
8077123e9f update contracts and tests to support different maker assets 2019-10-01 16:19:47 -07:00
Michael Zhu
3948f8b66b Replace nonReentrant + refundFinalBalance with refundFinalBalanceNoReentry 2019-10-01 15:39:50 -07:00
Michael Zhu
0ff8b12770 rmeove maker asset equality check; update to reflect removal of weth asset proxy 2019-10-01 13:08:17 -07:00
fabioberger
39a8c0f4e6 Update the Ganache snapshot addresses with latest v3 snapshot 2019-10-01 18:43:56 +08:00
fabioberger
8c5e12d389 Update or add CHANGELOG entries for all packages that will be published by Lerna to include a beta version. This dictates the version published to NPM and avoids any default patch bumps 2019-10-01 17:56:57 +08:00
fabioberger
71660850af Add new addresses to contract-addresses given the latest deployment 2019-10-01 17:11:54 +08:00
fabioberger
b83043648e Also exclude coordinator and extension contract packages when running build 2019-10-01 16:58:05 +08:00
Michael Zhu
b01de802cb address styling nits; only calculate protocol fee once 2019-09-30 21:51:34 -07:00
Michael Zhu
e954e9ca20 update tests 2019-09-30 21:51:34 -07:00
Michael Zhu
3f8639bd9c Update MixinExchangeWrapper to handle protocol fees 2019-09-30 21:51:34 -07:00
Amir Bandeali
ffcd297e5b Rename old exchange address to exchangeV2 2019-09-30 21:03:27 -07:00
Fabio B
56c956df44 Merge pull request #2225 from 0xProject/feature/addDistTagToPublish
Feature/add dist tag to publish
2019-10-01 05:41:19 +02:00
James Towle
c4b621e44d Merge pull request #2215 from 0xProject/feature/staking/end-to-end/deployment-test
End-to-end Deployment Test
2019-09-30 19:42:41 -07:00
Amir Bandeali
cfb099c65c Fix linting errors 2019-09-30 19:00:17 -07:00
Amir Bandeali
ba5c702a9e Update CHANGELOGs 2019-09-30 19:00:17 -07:00
Amir Bandeali
9d4010299a Cleanup migration scripts 2019-09-30 19:00:17 -07:00
Amir Bandeali
b5492bb023 Add ZrxVault testnet addresses to deployment constants 2019-09-30 19:00:17 -07:00
Amir Bandeali
76724a6c73 Implement initial 3.0 migrations script 2019-09-30 19:00:17 -07:00
Amir Bandeali
57ec0858fe Fix migrations build 2019-09-30 19:00:17 -07:00
Amir Bandeali
b281b9aac8 Update 3.0 testnet addresses 2019-09-30 19:00:17 -07:00
Amir Bandeali
f4453c0966 Regenerate abi-gen-wrappers 2019-09-30 18:57:17 -07:00
Amir Bandeali
ebd328db06 Add getSelector helper function to Typescript templates 2019-09-30 18:57:17 -07:00
fabioberger
9a658bf932 Change tag to protocolV3 to disambiguate with a specific version of a package 2019-10-01 09:04:20 +08:00
Francesco Agosti
d6d506d1c5 Merge pull request #2219 from 0xProject/feature/sra-v3
Upgrade @0x/json-schemas, @0x/types, @0x/connect, @sra-spec to SRA V3
2019-09-30 18:00:29 -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
Alex Towle
072ff65bf9 @0x:contracts-staking Removed multisig as a dependency 2019-09-30 17:46:57 -07:00
Amir Bandeali
aa198ad15f Add tests for adding/removing an exchange called by owner 2019-09-30 17:42:25 -07:00
Amir Bandeali
745da8e363 Fix tests 2019-09-30 17:36:37 -07:00
Amir Bandeali
be173a9970 Add sender as authorized address before calling init in test contracts 2019-09-30 17:36:37 -07:00
Amir Bandeali
8b2b500414 Remove authorization of owner in StakingProxy after init is called in constructor 2019-09-30 17:36:37 -07:00
Amir Bandeali
98d1f5405a Do not authorize owner in ZrxVault constructor 2019-09-30 17:36:37 -07:00
fragosti
03595dd1dd Run prettier 2019-09-30 17:28:41 -07:00
Lawrence Forman
6da48be1a4 @0x/contracts-asset-proxy: Merge ERC20Bridge into IERC20Bridge. 2019-09-30 17:28:36 -07:00
fragosti
9b91d574f8 Fix failing json-schema test 2019-09-30 17:27:01 -07:00
Alex Towle
6ca8edbf19 @0x:contracts-exchange Moved the deployment test to the exchange and addressed other review comments 2019-09-30 17:25:31 -07:00
Lawrence Forman
579dba1473 @0x/contracts-asset-proxy: Minor ERC20BridgeProxy test changes. 2019-09-30 17:06:31 -07:00
Amir Bandeali
1b5fa15c8c Merge pull request #2222 from 0xProject/feat/3.0/remove-weth-asset-proxy
Remove wethAssetProxy and wethAssetData from staking contracts
2019-09-30 17:03:16 -07:00
Lawrence Forman
737ad586a5 @0x/types: Add ERC20Bridge to AssetProxyId 2019-09-30 16:12:01 -07:00
F. Eugene Aumson
c051e11a49 OrderValidationUtils: don't parse fee asset data when there are no fees specified (#2218)
* exhibit bug: empty fee asset data induces revert

* fix bug: don't parse fee asset data unless fee>0

* Update DevUtils Kovan contract address
2019-09-30 17:53:21 -04:00
Amir Bandeali
a5692690dc Fix protocol fees tests 2019-09-30 09:37:57 -07:00
Amir Bandeali
98106ca8a2 Fix test conttracts 2019-09-30 09:37:53 -07:00
fabioberger
891d685951 Pass '3.0' tag when publishing so that publishes from 3.0 branch don't clobber the 2.1 packages installed with the default 'latest' tag 2019-09-30 22:17:44 +08:00
fabioberger
991cbc9f4e Add ability to pass specific dist tag to npm publish command from publishing flow 2019-09-30 22:16:56 +08:00
Lawrence Forman
8006e4fe3b @0x/contracts-asset-proxy: Change proxy ID and add proxy signature to IAssetData. 2019-09-29 21:53:42 -04:00
Amir Bandeali
f17c6b0a83 Remove unused IAssetProxy imports 2019-09-29 15:45:27 -07:00
Amir Bandeali
57ca601be1 Remove wethAssetProxy and wethAssetData from staking contract 2019-09-29 15:45:08 -07:00
Lawrence Forman
b50e26dc2a @0x/contracts-asset-proxy: Rename IERC20Bridge.transfer() -> IERC20Bridge.withdrawTo().
`@0x/contracts-asset-proxy`: Make `bridgeData` last parameter in `IERC20Bridge.withdrawTo()`.
`@0x/contracts-asset-proxy`: Reuse `PROXY_ID` as `BRIDGE_SUCCESS`.
2019-09-29 17:10:38 -04:00
Lawrence Forman
b728d13d8c @0x/contracts-asset-proxy: Remove only tests modifier. 2019-09-27 23:54:32 -04:00
Lawrence Forman
1959d149f8 @0x/contracts-asset-proxy: Fix incorrect comments in ERC20BridgeProxy tests. 2019-09-27 19:49:23 -04:00
Lawrence Forman
3e2e05caf2 Update changelogs 2019-09-27 19:47:14 -04:00
Lawrence Forman
d6a4d67a14 @0x/contracts-asset-proxy: Add ERC20BridgeProxy and tests. 2019-09-27 19:33:33 -04:00
Lawrence Forman
cf8d424b9b @0x/contracts-test-utils: Add number_utils.ts and hexSize(). 2019-09-27 19:32:55 -04:00
Lawrence Forman
a9f1237208 ethereum-types: Add DecodedLogs type (again?). 2019-09-27 19:32:05 -04:00
fragosti
319b4dfd75 Remove unused imports 2019-09-27 16:00:41 -07:00
fragosti
d39fcd3475 Upgrade sra-spec 2019-09-27 15:49:57 -07:00
fragosti
c7b7f57ab2 Update request types 2019-09-27 15:25:43 -07:00
fragosti
a36a5366d3 Update connect tests 2019-09-27 15:25:18 -07:00
fragosti
87615025fe Remove Client type 2019-09-27 15:00:35 -07:00
fragosti
5b0fc813c4 Update json-schemas 2019-09-27 15:00:24 -07:00
Francesco Agosti
d21f978def Merge pull request #2212 from 0xProject/refactor/no-domain-in-order
Remove domain from Order and remove OrderWithoutDomain type
2019-09-27 14:04:18 -07:00
fragosti
a9ecf7f1f3 Fix order schema typo 2019-09-27 13:30:30 -07:00
mzhu25
f5ad65bb8a Merge pull request #2217 from 0xProject/feature/contracts-staking/mixin-stake-storage-unit-tests
MixinStakeStorage unit tests
2019-09-27 13:20:42 -07:00
fragosti
88dcf6350d Fix exchange-libs test 2019-09-27 13:20:09 -07:00
Michael Zhu
6cfc17de35 MixinStakeStorage unit tests 2019-09-27 13:01:20 -07:00
fragosti
a2d105593e Add to orderTypedData comment 2019-09-27 12:49:01 -07:00
fragosti
efd5eff22c Fix tests 2019-09-27 12:46:20 -07:00
Alex Towle
9282684d93 @0x:contracts-staking Added a full end-to-end test of a deployment of the exchange and staking system 2019-09-26 18:10:52 -07:00
James Towle
c9e03f7d42 Merge pull request #2211 from 0xProject/feature/staking/exchange-manager-units
`@0x:contracts-staking` Added unit tests for MixinExchangeManager
2019-09-26 15:53:40 -07:00
Xianny
690b31c9be update artifacts and wrappers with pre-audit contracts (#2213)
* update artifacts and wrappers with pre-audit contracts

* increase bundlesize
2019-09-26 09:35:24 -07:00
Xianny
cb20f03a92 Use hardcoded deployedBytecode for local EVM execution (#2198)
* hardcode deployedBytecode in contracts

* log warning if bytecode is empty or invalid

* be typesafe
2019-09-26 08:38:29 -07:00
David Sun
97eabc6c03 Merge pull request #2157 from 0xProject/feature/orderbook-removing-smart-routing-logic
Refactored asset-swapper smart logic and renamed options
2019-09-26 09:18:05 -04:00
fragosti
f0e0f08e0c Run linter and prettier 2019-09-25 18:44:19 -07:00
fragosti
470643ee07 Fix tests 2019-09-25 18:44:19 -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
Xianny
23b724dde4 Merge pull request #2209 from 0xProject/fix/all-tests
Enable tests on 3.0
2019-09-25 18:32:43 -07:00
Alex Towle
3fa922dbab @0x:contracts-staking Wrote a basic deployment test 2019-09-25 18:09:50 -07:00
Alex Towle
aa7f082d56 @0x:contracts-staking Addressed review comments 2019-09-25 16:48:34 -07:00
Alex Towle
b178d025b5 @0x:contracts-staking Added unit tests for MixinExchangeManager 2019-09-25 15:32:02 -07:00
David Sun
e333ab18c7 removed smart quote consumer in favor of utils 2019-09-25 18:30:21 -04:00
David Sun
b60db6ac72 removed smart logic and renamed options 2019-09-25 18:30:21 -04:00
Lawrence Forman
96c8da9fdd Merge pull request #2207 from 0xProject/fix/3.0/improve-readability
Improve readability, fix `_trySetCumulativeReward` logic
2019-09-25 17:14:06 -04:00
Greg Hysz
fca883a4aa Merge pull request #2208 from 0xProject/cleanup/staking/spec
Updated README to point to new specification
2019-09-25 14:01:51 -07:00
David Sun
e60d43110d Merge pull request #2159 from 0xProject/feature/asset-swapper-smarter-fee-logic
Feature asset-swapper smarter fee logic
2019-09-25 16:45:41 -04:00
Greg Hysen
b9b135cfa2 Finished removing outdated contract comments 2019-09-25 13:41:27 -07:00
Lawrence Forman
f925c35344 @0x/contracts-staking: Always do _withdrawAndSyncDelegatorRewards() before staking operations and always add a CR (if unset) in _withdrawSyncDelegatorRewards()`. 2019-09-25 16:34:06 -04:00
Greg Hysen
ca2e9bed27 Updated README to point to new specification, plus removed images we no longer need. 2019-09-25 12:48:12 -07:00
Lawrence Forman
5b77e2c8ac @0x/contracts-staking: Fix stake accounting. 2019-09-25 15:29:22 -04:00
Amir Bandeali
9e3331d018 Fix ordering of function calls, remove optimization in _forceSetCumulativeReward 2019-09-25 11:31:30 -07:00
Amir Bandeali
4440075425 Inline _forceSetMostRecentCumulativeRewardEpoch 2019-09-25 11:03:26 -07:00
xianny
626948774b add comment 2019-09-25 11:01:30 -07:00
Amir Bandeali
25cb1c1138 Remove epoch param that is always equivalent to currentEpoch 2019-09-25 10:58:16 -07:00
xianny
4a173deb27 Merge branch '3.0' into fix/all-tests 2019-09-25 10:51:22 -07:00
xianny
245c87f026 re-enable test-rest 2019-09-25 10:48:55 -07:00
Amir Bandeali
22a6de48ae Remove arguments that are unnecessarily passed around 2019-09-25 10:43:14 -07:00
Xianny
a347c1e848 Remove unnecessary function binding (#2202)
* remove unnecessary function binding

* reenable tests
2019-09-25 09:49:47 -07:00
mzhu25
e4ab832ced Merge pull request #2205 from 0xProject/feature/contracts-staking/rip-mixin-vault-core
Consolidate MixinVaultCore and ZrxVault + unit tests
2019-09-24 23:23:32 -07:00
Amir Bandeali
d07005dcbe Change increment -> increase and decrement -> decrease 2019-09-24 23:04:37 -07:00
Michael Zhu
dc06497cae consolidate MixinVaultCore and ZrxVault 2019-09-24 23:04:17 -07:00
Amir Bandeali
c1871b5bca Fix xumulative reward tests 2019-09-24 23:01:44 -07:00
Amir Bandeali
410b9c50d3 Flatten _withdrawAndSyncDelegatorRewards function, fix bug where cumulative rewards are always reset 2019-09-24 23:01:31 -07:00
James Towle
1c42d0ab3c Merge pull request #2206 from 0xProject/fix/3.0/cleanup-inheritance-again
Cleanup inheritance... again
2019-09-24 19:13:54 -07:00
Amir Bandeali
98698f702f Remove redundant inheritance and imports 2019-09-24 18:47:27 -07:00
Amir Bandeali
4784131dca Merge pull request #2203 from 0xProject/feat/3.0/consolidate-rich-reverts
Cleanup rich reverts
2019-09-24 18:32:41 -07:00
James Towle
6eb28b792a Merge pull request #2204 from 0xProject/feature/staking/move-storage-layout-assertions
Feature/staking/move storage layout assertions
2019-09-24 18:32:12 -07:00
Amir Bandeali
57f5b12e24 Cleanup rich reverts 2019-09-24 18:13:37 -07:00
Amir Bandeali
e5aaf68277 Use uin8 instead of uint256 for status 2019-09-24 18:13:37 -07:00
Alex Towle
b62486923f @0x:contracts-staking Removed storage assertions from Staking and moved them to a test contract 2019-09-24 18:12:00 -07:00
Amir Bandeali
322a0a5967 Merge pull request #2201 from 0xProject/fix/3.0/rename-owner
Rename shadowed instances of `owner` to `staker`
2019-09-24 17:46:38 -07:00
Amir Bandeali
f30c2c4a23 Make setZrxProxy callable by authorized address rather than only owner 2019-09-24 17:27:53 -07:00
xianny
44e5fa5b25 improve readability of async error tests 2019-09-24 16:53:59 -07:00
Amir Bandeali
18a86ef234 Replace all shadowed instances of 'owner' with 'staker' 2019-09-24 16:52:09 -07:00
Alex Towle
a6af3744e2 @0x:contracts-staking Improved the test coverage of MixinStakingPool 2019-09-24 16:49:34 -07:00
Amir Bandeali
9b40164787 Merge pull request #2195 from 0xProject/feat/3.0/deployment-constants
Make wethAssetProxy and zrxVault deployment constants
2019-09-24 16:46:21 -07:00
xianny
52e8cf1366 really fix async error tests 2019-09-24 16:45:24 -07:00
Amir Bandeali
1b159f5ccc Make deployment constant getters public 2019-09-24 16:43:08 -07:00
xianny
893ae35296 exclude lib files from tsc build 2019-09-24 16:24:44 -07:00
Amir Bandeali
85e56706bf Remove wethAssetProxy and zrxVault from storage layout assertions 2019-09-24 16:19:53 -07:00
Amir Bandeali
b8b21cefe3 Make deployment constants private and use string reverts for constructor assertions 2019-09-24 16:19:53 -07:00
Amir Bandeali
6d7bf12ade Make wethAssetProxy and zrxVault deployment constants 2019-09-24 16:19:53 -07:00
Xianny
5266816dd6 Quick fix to abi-gen test (#2197) 2019-09-24 16:11:17 -07:00
Amir Bandeali
0c5f0271c7 Merge pull request #2190 from 0xProject/feat/3.0/consolidate-pool-mixins
Consolidate staking pool mixins
2019-09-24 14:00:28 -07:00
Greg Hysz
b65fd06e95 Merge pull request #2188 from 0xProject/feature/staking/remove-ref-counting
Remove reference counting for cumulative rewards
2019-09-24 14:00:17 -07:00
Amir Bandeali
7f51822bfc Fix storage layout assertions 2019-09-24 13:38:48 -07:00
Amir Bandeali
1acd8d9577 Make _poolJoinedByMakerAddress internal 2019-09-24 13:36:54 -07:00
Amir Bandeali
8aa302f6fc Update OnlyCallableByPoolOperatorOrMakerError params and address PR feedback 2019-09-24 13:36:54 -07:00
Amir Bandeali
f8af5879af Remove _getStakingPoolOperator internal getter function 2019-09-24 13:36:54 -07:00
Amir Bandeali
a7aa7feff4 Remove getAvailableRewardsBalance public function, make wethReservedForPoolRewards public 2019-09-24 13:36:54 -07:00
Amir Bandeali
b6a96cea23 Address PR comments 2019-09-24 13:36:54 -07:00
Amir Bandeali
50b02a4a55 Add more pool tests 2019-09-24 13:36:54 -07:00
Amir Bandeali
8a2b178e6f Remove isMakerAssignedToStakingPool to reduce sloads 2019-09-24 13:36:54 -07:00
Amir Bandeali
7f1afb57b0 Consolidate MixinStakingPool, MixinStakingPoolMakers, and MixinStakingPoolModifiers 2019-09-24 13:36:54 -07:00
Amir Bandeali
0bc4b50818 Add codesize tests 2019-09-24 13:36:54 -07:00
Greg Hysen
91de2194eb Removed reference counting from storage layout test 2019-09-24 13:35:41 -07:00
Greg Hysen
fef06908ec Removed instances fo a frivilous currentEpoch parameter 2019-09-24 13:32:20 -07:00
Greg Hysen
a012eb0cae Updated changelog and ran prettier 2019-09-24 13:32:20 -07:00
Greg Hysen
08c805a489 Removed explicit dependency for delegator on the next epoch after staking. 2019-09-24 13:32:20 -07:00
Greg Hysen
5b595dd080 Remove reference counting for cumulative rewards 2019-09-24 13:32:20 -07:00
James Towle
c29a22187c Merge pull request #2199 from 0xProject/feature/staking/storage-layout-assertion
Feature/staking/storage layout assertion
2019-09-24 13:30:56 -07:00
Jacob Evans
44f6d21e9b Merge pull request #2196 from 0xProject/quick-fixes
Quick fixes
2019-09-24 21:48:58 +02:00
Alex Towle
ef04248191 @0x:contracts-staking Addressed review comments 2019-09-24 10:58:51 -07:00
Jacob Evans
1b47c473b4 Quick fixes
* Fixed the webpack publish for asset swapper to be in line with 0x.js
* Modified the migration snapshot name to not clobber v2 until we're
ready to overwrite
* Added filler transactions to keep contract addresses stable whilst
  asset proxy is disabled
* Non-private package publish for orderbook
2019-09-24 15:48:35 +02:00
Amir Bandeali
fe1fea9a2d Merge pull request #2172 from 0xProject/fix/3.0/exchange/eip712domain
Fix eip712 domain
2019-09-23 21:07:59 -07:00
Alex Towle
970f77beb0 @0x:contracts-staking Added storage layout assertions to the staking contract 2019-09-23 18:26:51 -07:00
Amir Bandeali
2587cd380f Merge pull request #2186 from 0xProject/feat/3.0/delete-vaults
Delete `StakingPoolRewardVault` and `EthVault`
2019-09-23 18:05:53 -07:00
Amir Bandeali
04eab19f15 Fix lingering cases of verifyingContractAddress 2019-09-23 17:56:42 -07:00
Amir Bandeali
abb2b46ed3 Remove vaults from variable names and comments 2019-09-23 17:37:04 -07:00
Alex Towle
db241e8f90 @0x:contracts-staking Modified Staking events to improve their usability 2019-09-23 17:32:52 -07:00
Amir Bandeali
5bbd57d236 Delete unused rich reverts 2019-09-23 17:28:03 -07:00
Amir Bandeali
e9f0f4af86 Rename functions and variables for clarity 2019-09-23 16:38:22 -07:00
Amir Bandeali
ae75aed55e Change verifyingContractAddress -> verifyingContract everywhere 2019-09-23 16:00:37 -07:00
Amir Bandeali
b359738037 Update EIP712 domain separator schema 2019-09-23 15:59:30 -07:00
Amir Bandeali
5ce988957f Fix tests 2019-09-23 15:55:28 -07:00
Xianny
2d77fce99d Re-enable all TypeScript Packages on 3.0 (#2181)
* update with WIP artifacts and wrappers

* Update order-utils to get build:contracts working

* get asset-buyer and asset-swapper building with 3.0

* get testnet-faucets building on 3.0

* re-enable build for most packages
2019-09-23 15:52:51 -07:00
Amir Bandeali
62663ed6d2 Fix rewards tests 2019-09-23 15:34:12 -07:00
Amir Bandeali
3965d8f8c6 Separate wrapping ETH and querying available WETH balance 2019-09-23 15:34:12 -07:00
Amir Bandeali
fd35249de8 Track WETH reserved for rewards 2019-09-23 15:34:12 -07:00
Amir Bandeali
156560ae22 Rename overloaded function 2019-09-23 15:34:12 -07:00
Amir Bandeali
ee687a7dc4 Fix delegator reward unit tests 2019-09-23 15:34:12 -07:00
Amir Bandeali
1710f13242 Fix incorrect return value in _syncPoolRewards 2019-09-23 15:33:10 -07:00
Amir Bandeali
ef645e601c Fix all tests except for reward tests (skipped) 2019-09-23 15:30:55 -07:00
Amir Bandeali
7de23c6af2 Rename variables and functions 2019-09-23 15:30:55 -07:00
Amir Bandeali
639026ea66 Delete vaults and fix contract build 2019-09-23 15:29:36 -07:00
Lawrence Forman
8ddcf88c01 Merge pull request #2155 from 0xProject/feat/staking/hurts-like-a-mbf
Mutli-Block Finalization
2019-09-23 17:51:22 -04:00
Lawrence Forman
3883297991 @0x/contracts-staking: Remove getTotalBalance() function.
`@0x/contracts-staking`: Fix linter errors.
2019-09-23 14:21:18 -04:00
Lawrence Forman
196cc4313f @0x/contract-staking: Make solidity uniformly hideous ;-). 2019-09-23 13:15:51 -04:00
Lawrence Forman
9dd8c61a2f @0x/contract-staking: Address review nits.
`@0x/contracts-utils`: Use `safeDiv()` in `LibFractions.normalize()`.
2019-09-23 11:55:02 -04:00
Lawrence Forman
6d20f0e987 @0x/contracts-staking: Update compiler version in truffle config. 2019-09-22 13:20:47 -04:00
Lawrence Forman
eac4520406 @0x/contracts-staking: Rebase against 3.0 2019-09-22 13:11:42 -04:00
Lawrence Forman
e4126189df @0x/order-utils: Fix staking error codes after rebase. 2019-09-22 13:09:44 -04:00
Lawrence Forman
aa4ee2c166 @0x/dev-utils: Increase gas limit to 9e6 2019-09-22 13:08:59 -04:00
Lawrence Forman
c72a15b488 @0x/contracts-staking: All tests back up and running. 2019-09-22 12:20:42 -04:00
Lawrence Forman
6a29654d7d @0x/contracts-staking: Updating tests and making the contracts testable. 2019-09-22 12:20:04 -04:00
Lawrence Forman
3ad7728a0e @0x/contracts-staking: Remove IStructs.CumulativeRewardInfo, etc.
`@0x/contracts-staking`: Convert all rewards to WETH.
`@0x/contracts-staking`: Style changes.
`@0x/contracts-staking`: Address misc. review comments.
`@0x/contracts-staking`: Make `LibFractions` scaling a separate step.
2019-09-22 12:17:05 -04:00
Lawrence Forman
14c4491b8c @0x/contracts-staking: Add some extra finalizer tests and light refactorings.
`@0x/contracts-staking`: Add finalization-related protocol fees unit tests.
2019-09-22 12:13:24 -04:00
Lawrence Forman
2eff213840 @0x/contracts-staking: Import randomAddress() instead of defining our own. 2019-09-22 12:13:24 -04:00
Lawrence Forman
2bb9b9a8f7 @0x/contracts-test-utils: Ran prettier. 2019-09-22 12:13:24 -04:00
Lawrence Forman
d064543108 @0x/contracts-staking: Add some computeRewardBalanceOfOperator() tests. 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
86106713dd @0x/contracts-staking: Gag! All tests passing? 2019-09-22 12:13:24 -04:00
Lawrence Forman
d5bbbe802b @0x/base-contract: Fix linter errors. 2019-09-22 12:13:24 -04:00
Lawrence Forman
b43fa88606 @0x/contracts-staking: All tests but rewards_test working. 2019-09-22 12:13:24 -04:00
Lawrence Forman
54ac1c284b @0x/base-contract: Properly encode BigNumber indexed filter values in getTopicsForIndexedArgs(). 2019-09-22 12:13:24 -04:00
Lawrence Forman
d33080cf08 @0x/contracts-staking: Finalizer tests passing. 2019-09-22 12:11:47 -04:00
Lawrence Forman
b4b6d4d969 @0x/contracts-test-utils: Add shortZip(). 2019-09-22 12:11:47 -04:00
Lawrence Forman
993f05d5ac @0x/contracts-staking: Fixing tests. 2019-09-22 12:11:47 -04:00
Lawrence Forman
ac7f6aef9e @0x/contracts-staking: It compiles! 2019-09-22 12:11:47 -04:00
Lawrence Forman
7fb5ed0b42 @0x/contracts-staking: Add another test case to delegator rewards tests.
`@0x/contracts-staking`: Rename `delegator_reward_balance_test.ts` -> `delegator_reward_test.ts`.
`@0x/contracts-staking`: Last call before rebasing against 3.0.
2019-09-22 12:11:06 -04:00
Lawrence Forman
52b0ba5b05 @0x/contracts-staking: Fix linter errors. 2019-09-22 12:11:06 -04:00
Lawrence Forman
a43b494302 @0x/contracts-staking: All tests passing! 2019-09-22 12:11:06 -04:00
Lawrence Forman
527ec28915 @0x/contracts-utils: Add auto-scaling and zero-value optimizations to LibFractions. 2019-09-22 12:10:41 -04:00
Lawrence Forman
e267a0e855 @0x/contracts-staking: Transition to V3 2019-09-22 12:10:41 -04:00
Lawrence Forman
0196ce18f3 @0x/contracts-staking: Last call before embarking of V3 of staking integration. 2019-09-22 12:10:41 -04:00
Lawrence Forman
7ef3c12722 @0x/contracts-staking: Well, it almost worked. 2019-09-22 12:10:41 -04:00
Lawrence Forman
38b94ec5f8 @0x/order-utils: Add InvalidMinimumPoolStake to StakingRevertErrors.InvalidParamValueErrorCode. 2019-09-22 12:08:14 -04:00
Lawrence Forman
fa65452e2b @0x/contracts-staking: OK, two more finalizer tests. 2019-09-22 12:07:46 -04:00
Lawrence Forman
da0f6b5e8f @0x/contracts-test-utils: Finish off finalizer tests... for now. 2019-09-22 12:07:46 -04:00
Lawrence Forman
b4929df1e6 @0x/order-utils: Ran prettier. 2019-09-22 12:07:46 -04:00
Lawrence Forman
03c59fdaf7 @0x/contracts-staking: More MixinFinalizer unit tests. 2019-09-22 12:07:46 -04:00
Lawrence Forman
f5ab1e6f86 @0x/contracts-staking: Reduce code duplication in MixinFinalizer and add unit tests for it. 2019-09-22 12:07:46 -04:00
Lawrence Forman
ada1de429c @0x/order-utils: Add PreviousEpochNotFinalizedError to StakingRevertErrors. 2019-09-22 12:07:46 -04:00
Lawrence Forman
a1aad2e55e @0x/contracts-exchange: Fixing tests and writing new ones. 2019-09-22 12:07:46 -04:00
Lawrence Forman
d548ddac0d @0x/contracts-staking: Fixing tests. 2019-09-22 12:07:46 -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
Lawrence Forman
6a8242a6ca @0x/contracts-staking: Fix past epoch reward accounting. 2019-09-22 12:07:11 -04:00
Lawrence Forman
46b8bfe338 @0x/contracts-staking: It compiles! (again) 2019-09-22 12:07:11 -04:00
Lawrence Forman
102ca6b854 @0x/contracts-staking: Almost compiling... 2019-09-22 12:07:11 -04:00
Lawrence Forman
06b4d241af @0x/contracts-staking: Working on MBF v2 2019-09-22 12:07:11 -04:00
Lawrence Forman
712b2569e6 @0x/contracts-staking: Fix solidity linter errors. 2019-09-22 12:06:34 -04:00
Lawrence Forman
294be37afc @0x/contracts-staking: Got the solidity compiling. 2019-09-22 12:06:34 -04:00
Lawrence Forman
b57c0a2ebb @0x/contracts-staking: Fully implement MBF (I hope). 2019-09-22 12:05:33 -04:00
Lawrence Forman
94909f1a0f @0x/contracts-staking: Add another delegator payout test. 2019-09-22 12:05:33 -04:00
Lawrence Forman
9c47d22ff4 @0x/contracts-staking: Add some tests to check rewards in the EthVault to _rewards_test. 2019-09-22 12:05:33 -04:00
Lawrence Forman
e4b9d14f45 @0x/contracts-staking: Tinkering with crediting rewards. 2019-09-22 12:05:33 -04:00
Lawrence Forman
73f1aca4a1 @0x/contracts-staking: More work on MixinFinalizer. 2019-09-22 12:05:33 -04:00
Lawrence Forman
bbae6b3de2 @0x/contracts-staking: Starting MBF. 2019-09-22 12:05:33 -04:00
David Sun
e5133a2dd9 prettier 2019-09-21 22:21:55 -04:00
David Sun
ef0096b7d9 added tests 2019-09-21 22:20:11 -04:00
Amir Bandeali
29f4d6918a Merge pull request #2178 from 0xProject/feat/3.0/upgradability-controls
Upgradability controls
2019-09-20 17:47:36 -07:00
Amir Bandeali
45c7653850 Initialize Authorizable instead of Ownable in constructors, fix tests that use onlyOwner modifier 2019-09-20 17:16:35 -07:00
Amir Bandeali
8bdd1d7680 Fix linting errors 2019-09-20 16:55:30 -07:00
Amir Bandeali
a1ed7183ea Fix tests 2019-09-20 16:55:30 -07:00
Amir Bandeali
7b81af2cb4 Change onlyOwner -> onlyAuthorized everywhere 2019-09-20 16:55:30 -07:00
Amir Bandeali
a70a3c9600 Fix SenderNotAuthorizedError class 2019-09-20 16:55:30 -07:00
Amir Bandeali
a14ddbfac2 Make enterCatastrophicFailure callable by any authorized address 2019-09-20 16:55:30 -07:00
Amir Bandeali
e1c57cf0af Refactor Authorizable to use internal methods 2019-09-20 16:55:30 -07:00
Amir Bandeali
522994262d Update tests 2019-09-20 16:55:30 -07:00
Amir Bandeali
f681357eeb Add missing error codes to InvalidParamValueErrorCode 2019-09-20 16:53:58 -07:00
Amir Bandeali
f9b593da59 Lower length of an epoch to 10 days 2019-09-20 16:53:58 -07:00
Amir Bandeali
a340c817c9 Guarantee that makers can't be added to pools when max amount decreases 2019-09-20 16:53:58 -07:00
Amir Bandeali
cc67f732e1 Move storage assertions into StakingProxy 2019-09-20 16:53:58 -07:00
mzhu25
e2ee7e6837 Merge pull request #2164 from 0xProject/feature/contracts-staking/mixin-vault-core-unit-tests
MixinVaultCore unit tests
2019-09-20 16:35:33 -07:00
Michael Zhu
49d223f344 MixinVaultCore unit tests 2019-09-20 16:02:54 -07:00
Lawrence Forman
314d1b9873 Merge pull request #2179 from 0xProject/feat/staking/LibCobbDouglas
Extract `MixinExchangeFees._cobbDouglas()` into LibCobbDouglas
2019-09-20 18:29:40 -04:00
mzhu25
2a391bf947 Merge pull request #2151 from 0xProject/feature/contracts-staking/maintain-global-stake
Maintain global stake
2019-09-20 15:07:05 -07:00
Lawrence Forman
7a33f68138 @0x/contracts-staking: Extract MixinExchangeFees._cobbDouglas() into its own library. 2019-09-20 15:56:26 -04:00
David Sun
48d0b46e43 added utils for fee detection 2019-09-20 15:36:52 -04:00
David Sun
5fe9edce8c Merge pull request #2175 from 0xProject/steveklebanoff-patch-1
Change asset-swapper URL in package.json
2019-09-19 23:29:53 -04:00
Steve Klebanoff
1c038e1f3c Change asset-swapper URL in package.json 2019-09-19 23:29:08 -04:00
Xianny
a57dd427ca Merge development into 3.0 (#2170)
* Added longer timeout for algolia admin operations. Added an option to apply hidden and custom labels to filters from algolia. Added sorting guides (alphabetically) and tools (by community maintenance and alphabetically).

* Fixed some types in guides

* Updated webpack, webpack-dev-server, webpack-bundle-analyzer, webpack-cli versions

* Updated / cleaned up babel and mdx packages

* Updated terser webpack plugin; Removed uglify plugin (unused). Added parallel option for terser. Added target browsers and cache directory option for babel-loader

* Webpack changes: using eval-source-map for development, added parallel option to Terser plugin, added cache loader and caching directory to mdx / babel loaders.

* Removed unusued pkg: body-scroll-lock

* Removed unused jsonschema / @types/jsonschema packages

* Removed unused less node package, adjusted less loader rules to match other loaders in webpack config

* Removed unusued node-sass package. Left sass-loader for webpack intact.

* Removed unused package react-lazyload

* Removed unused package react-typist

* Removed react-tap-event types as it's not used anymore. Reinstalled node-sass as a dev dependency as it's needed by sass-loader

* Moves @0x/types and @0x/typescript-typings to devDependencies

* Replaced react loadable (only used in Icon) with the native react lazy / suspense. Removed loadable nad its types from package.json

* Removed unused make-promises-safe package

* Moved animations to public and compressed files

* Added opening step links in new tab if the url is valid

* Moved @0x/types back to dependencies.

* Added animation wrapper with positioning props. Updated animations for core concepts.

* Replaced images for core concepts. Fixed a bug causing duplicate props on image and its container in mdx

* Remove legacy FAQ

* Update yarn.lock

* Add MD docs diff test to CI

* Remove unused dep

* Update docs to latest format

* Update yarn.lock

* Update ts-doc-gen with fix for multi-link lines

* Final docs gen

* Fix home route

* Update yarn.lock

* Add Golang Mesh RPC package and update versions

* Update the tools MDX files from authoritative S3 before build and dev server start

* Gitignore the tool MDX files in website repo

* Redirect old docs pages and wiki to new doc pages

* Move out Algolia indexing command-line tool out of website and remove need to expose admin key

* Add updating tools from S3 and indexing content on Algolia to deployment commands

* Add note about admin API env var needed for indexing docs

* Remove scripts gitignore since we don't have monorepo scripts in each package anymore

* Segregate indexes by environment

* Fixed 404 display for docs pages

* Removed webpack bundle analyzer

* Fix search and indexing

* Use `yarn` because otherwise the flags don't get passed down properly

* Improve indexing comment

* Remove legacy doc pages

* Fix linter errors

* Fix clean command to remove bundles recursively

* Revert react and react-dom versions in Instant

* Remove old doc md files

* Fix links

* Fix prettier

* Combine @0x/utils exports

* Update doc links

* Remove unused components

* Fix TS error

* Add missing new line

* Update Guides

* Ignore auto-generated MDX in website repo

* Prettier fix

* Add all guides to the sitemap.txt

* Add MMing guide

* Fix Get Started links

* Add 0x Extensions guide

* Replace all links to wiki with links to guides section

* Fix all /docs/{pkg} links to /docs/tools/{pkg}

* Remove deployer endpoint that is no longer used

* Fix links in Core Concepts

* Fixed regex to not remove hashes on links beyond the initial one

* Fixed huge width on instant screenshot

* Cleaned up core concept illustrations

* Started updating tool titles

* Fixed sectionizing headings in docs: Nested sections do not get wrapped in parent sections anymore; only sectionizing headings that need to be sectionized (i.e. that appear in the table of contents)

* Stylstic fix for the new way we sectionize headings / table of contents

* Change CoordinatorWrapper constructor to take a provider

* Added autolinking headings in mdx docs

* Refactor doc generation script to only generate MD docs and to have them reflect what is exported in their respective index.ts files

* Update ts-doc-gen

* Pass in provider, not Web3Wrapper

* Add back logic to prune out private methods

* Write algolia_metadata to utils dir

* Remove duplicate algolia_meta

* Add more packages to those we generate docs for and remove unused flags

* Update reference.mdx files

* Hide tools from homepage that have isHidden flag

* Link 0x.js to it's reference page

* Update tool naming to be more human readable

* Remove order-watcher reference doc

* Add blurb about on-chain API Explorer

* Add "On-chain" prefix to section name

* Remove committed reference file

* Sorting guides by difficulty and alphabetically

* Pushed sorting guides titles case-insensitive

* Sorting tools by difficulty and alphabetically. Removed icons from featured tools. Extracted common difficultyOrder constant

* Update ts-doc-gen so that it properly converts module relative links to anchor links

* Update doc references

* Remove "Relayers" topic/tag

* Prettier fix

* Remove hr so we don't have a bunch in a row

* Cleaned up CLI tag and added link to tools on API page

* Cleaned up some Guide titles

* Added bug bounty program guide

* Fixed a bug in algolia_meta

* Thrid level of nesting / temporary webpack config

* Open help link in new tab

* Link Python tools to doc pages not PyPi

* Fix links in guides

* Remove unused variables

* Revert webpack config

* Extracted common styles for levels of nesting deeper than 1 in the mdx table of contents

* Smoother animation on active table of contents state change

* Autolink headings in mdx only up to h3. Added heading sizes (in px) for h4,h5,h6 in mdx headings

* Fix prettier

* Adjusted font-size for paragraph, ordered and unordered lists. Fixed line-heights and colors too.

* Update ts-doc-gen and the reference docs

* Replace 0xproject.com urls with 0x.org

* Update README links

* Fix header sizes to display optimally in sidebar

* Fixed an issue with other nodes than text being parsed incorrectly in the table of contents

* Fixed styles for table of contents

* Use a different babel plugin that works in a production webpack build

* Unbroke build process / generating toc

* Changed line-height to 1.6 for paragraph

* Adjust scrollbar / toc height to available space

* Fixed some types

* Remove unnecessary link

* Fix casing on TypeScript

* Fix casing of PyPI

* Remove doc gen from abi-gen-wrappers since it'll be tested via contract-wrappers

* Fix MD docs and make sure generated contract wrappers are being rendered

* Remove generated docs in clean

* Correctly copying code samples

* Several additional fixes to the reference MDX docs

* Changed tools to Tools & Libraries - top nav left as just tools

* Changed references from Asset Buyer to Asset Swapper

* Changed trader keyword to trading

* Nevermind, changed back to Trader

* Sneaking in updated product dropdown menu titles based on Will's feedback

* Removed the word wiki from resources dropdown

* Open legal guide in same window

* Removed the isCommunity filter / custom filter labels functionality (only used for that before)

* Update ts-doc-gen version to one that fixes issues with Object Literals and removes Hierarchy sections and Module headers

* update yarn.lock

* Remove unused code

* Remove unused import

* Remove unused imports

* Remove unused import

* Fix prettier

* Update outdating dep version

* Created a color scheme for code snippets. Fixed language not being passed to some code blocks in two guides.

* Update abi-gen-wrappers dep version

* Update Algolia to production account

* Fix prettier

* Fix prettier in algolia_meta

* Remove packages/dev-tools-pages folder and update yarn.lock

* Remove other random references to dev-tools-pages

* Fix website

* Changed the order of indices in search suggestions

* Removed a comment

* Added scrollbar size adjustment on resize / scroll

* Rendering sidebar on mobile without any event listeners / taxing calculations / changes in height

* Added a performance comment

* Simplified table of contents

* Update ganache-cli to later version

* Remove bundle dirs too

* Added keeping active link in view when scrolling content in the docs

* Increase available memory for webpack

* Update contract addresses

* Update market-making guide to mention Mesh as an alternative to SRA

* Update Web3 Provider Explained guide

* Re-wrote Ganache Setup guide into a Setting up a local 0x testnet guide

* Export more of abi-gen-wrappers from contract-wrappers

* Final update of reference docs

* Add contract-wrappers MD docs and update it's index.ts so that no types are missing

* Fix prettier

* Increase the memory allocation for building the website

* Remove use of remove type

* Check if link is a valid url in mdx inline link: if so, open in a new tab, if not, same tab.

* Print out which snapshot version is being downloaded

* Updated CHANGELOGS & MD docs

* Publish

 - @0x/contracts-asset-proxy@2.2.7
 - @0x/contracts-coordinator@2.0.12
 - @0x/contracts-dev-utils@0.0.9
 - @0x/contracts-erc1155@1.1.14
 - @0x/contracts-erc20@2.2.13
 - @0x/contracts-erc721@2.1.14
 - @0x/contracts-exchange-forwarder@3.0.11
 - @0x/contracts-exchange-libs@3.0.7
 - @0x/contracts-exchange@2.1.13
 - @0x/contracts-extensions@4.0.7
 - @0x/contracts-multisig@3.1.13
 - @0x/contracts-test-utils@3.1.15
 - @0x/contracts-utils@3.2.3
 - 0x.js@7.0.1
 - @0x/abi-gen-wrappers@5.3.1
 - @0x/abi-gen@4.2.0
 - @0x/assert@2.1.5
 - @0x/asset-buyer@6.1.13
 - @0x/asset-swapper@1.0.3
 - @0x/base-contract@5.3.3
 - @0x/connect@5.0.18
 - @0x/contract-artifacts@2.2.1
 - @0x/contract-wrappers@12.0.0
 - @0x/contracts-gen@1.0.14
 - @0x/dev-tools-pages@0.0.30
 - @0x/dev-utils@2.3.2
 - ethereum-types@2.1.5
 - @0x/fill-scenarios@3.0.18
 - @0x/instant@1.0.30
 - @0x/json-schemas@4.0.1
 - @0x/migrations@4.3.1
 - @0x/monorepo-scripts@1.0.36
 - @0x/order-utils@8.3.1
 - @0x/sol-compiler@3.1.14
 - @0x/sol-coverage@3.0.11
 - @0x/sol-doc@2.0.18
 - @0x/sol-profiler@3.1.13
 - @0x/sol-resolver@2.0.10
 - @0x/sol-trace@2.0.19
 - @0x/sol-tracing-utils@6.0.18
 - @0x/sra-spec@2.0.16
 - @0x/subproviders@5.0.3
 - @0x/testnet-faucets@1.0.86
 - @0x/types@2.4.2
 - @0x/typescript-typings@4.2.5
 - @0x/utils@4.5.1
 - @0x/web3-wrapper@6.0.12
 - @0x/website@0.0.89

* Remove the website from the monorepo

* Update yarn.lock

* Remove website files that were accidentally merged back in

* Use local EVM for pure functions (#2108)

* add local evm for pure functions

* increase container size to >=8gb for static-tests

* increase max bundle size because of ethereumjs-vm dependency

* add declarations for ethereumjs-vm in @0x/typescript-typings

* Make `OrdersChannelSubscriptionOpts` conform to SRAv2

* Make it easier to use validateOrderFillableOrThrowAsync (#2096)

* make it easier to use validateOrderFillableOrThrowAsync

* add unit tests, use DevUtils

* remove dependency on @0x/order-utils from @0x/migrations

* add devUtils to contract-wrappers (#2146)

* Delete docs in S3 bucket before uploading latest version so we only ever have one version uploaded at a time

* Update to new ts-doc-gen version that fixes links in "Inherited from" lines

* try to fix instant build

* Remove redoc-cli as a dep from sra-spec

* Smooth out some last incompatible types

* Fix prettier

* Add terser-webpack-plugin to 0x.js deps

* @0x/orderbook

* AssetSwapper to use @0x/orderbook

* Remove unused imported type

* Prevent double websocket connections

* Fix build error

* fixed consumer inconsistency bug

* linted + added convenience functionality

* minor changes/typo fixes

* updated websocket

* updated for prettier

* Fix versions and exported types

* move log tests to @0x/abi-gen; delete exchange_wrapper_test (#2160)

* Remove unused exported types

* Fix exports from asset-swapper

* Update exported types for docs

* Update mesh client dep

* Move perPage and 18 precision lower to re-use

* fix ABI encoding/decoding functions (#2165)

* Fix typo at contract import (#2102)

* Updated CHANGELOGS & MD docs

* Publish

 - @0x/contracts-asset-proxy@2.2.8
 - @0x/contracts-coordinator@2.0.13
 - @0x/contracts-dev-utils@0.0.10
 - @0x/contracts-erc1155@1.1.15
 - @0x/contracts-erc20@2.2.14
 - @0x/contracts-erc721@2.1.15
 - @0x/contracts-exchange-forwarder@3.0.12
 - @0x/contracts-exchange-libs@3.0.8
 - @0x/contracts-exchange@2.1.14
 - @0x/contracts-extensions@4.0.8
 - @0x/contracts-multisig@3.1.14
 - @0x/contracts-test-utils@3.1.16
 - @0x/contracts-utils@3.2.4
 - 0x.js@7.0.2
 - @0x/abi-gen-wrappers@5.3.2
 - @0x/abi-gen@4.2.1
 - @0x/assert@2.1.6
 - @0x/asset-buyer@6.1.14
 - @0x/asset-swapper@2.0.0
 - @0x/base-contract@5.4.0
 - @0x/connect@5.0.19
 - @0x/contract-addresses@3.2.0
 - @0x/contract-artifacts@2.2.2
 - @0x/contract-wrappers@12.1.0
 - @0x/contracts-gen@1.0.15
 - @0x/dev-utils@2.3.3
 - ethereum-types@2.1.6
 - @0x/fill-scenarios@3.0.19
 - @0x/instant@1.0.31
 - @0x/json-schemas@4.0.2
 - @0x/migrations@4.3.2
 - @0x/monorepo-scripts@1.0.37
 - @0x/order-utils@8.4.0
 - @0x/orderbook@0.0.2
 - @0x/sol-compiler@3.1.15
 - @0x/sol-coverage@3.0.12
 - @0x/sol-doc@2.0.19
 - @0x/sol-profiler@3.1.14
 - @0x/sol-resolver@2.0.11
 - @0x/sol-trace@2.0.20
 - @0x/sol-tracing-utils@6.0.19
 - @0x/sra-spec@2.0.17
 - @0x/subproviders@5.0.4
 - @0x/testnet-faucets@1.0.87
 - @0x/types@2.4.3
 - @0x/typescript-typings@4.3.0
 - @0x/utils@4.5.2
 - @0x/web3-wrapper@6.0.13

* fix circleci diff

* update changelog
2019-09-19 19:43:08 -07:00
Amir Bandeali
2253f214a6 Merge pull request #2138 from 0xProject/feat/3.0/update-apowner
Update AssetProxyOwner
2019-09-19 14:52:19 -07:00
Amir Bandeali
ad11dc2421 Remove unnecessary sload 2019-09-19 13:41:02 -07:00
Amir Bandeali
bd3b200b30 Add extra tests 2019-09-19 13:41:02 -07:00
Amir Bandeali
0d259d13b9 Fix base multisig style 2019-09-19 13:40:57 -07:00
Amir Bandeali
6fd55b2f49 Add more tests 2019-09-19 13:37:59 -07:00
Amir Bandeali
057aee8ad2 Fix linting errors 2019-09-19 13:37:59 -07:00
Amir Bandeali
f47feabb4a Update AssetProxyOwner tests 2019-09-19 13:37:59 -07:00
Amir Bandeali
eb784a4a7c Update test contracts 2019-09-19 13:37:59 -07:00
Amir Bandeali
5d30c957cb Update AssetProxyOwner to allow batch transactions and custom timelocks 2019-09-19 13:37:59 -07:00
Amir Bandeali
585adef75d Add revert reasons to bbase MultiSigWallet 2019-09-19 13:37:59 -07:00
Amir Bandeali
2f07fcc81c Upgrade Base MultiSigs to Solidity 0.5.9 2019-09-19 13:37:59 -07:00
F. Eugene Aumson
1d55d12c8f Deployed DevUtils address, & artifact used (#2176) 2019-09-19 07:00:37 -04:00
F. Eugene Aumson
bca8c5eccc DevUtils.sol: Upgrade for v3 (#2161)
* Exhibit bug in getSimulatedOrderTransferResults

* Fix getSimulatedOrderTransferResults

* dev-utils/package.json: add quantify_bytecode cmd

* Fix typo in log message

* Reduce compiler optimization runs

In order to reduce the EVM bytecode object length of the DevUtils
contract to be under the EIP-170 limit of 24 KB.
2019-09-18 19:36:06 -04:00
Michael Zhu
f7462c9f2b keep track of globalStakeByStatus + tests 2019-09-18 10:09:45 -07:00
Greg Hysz
549697dc47 Merge pull request #2156 from 0xProject/feature/staking/syncingRewards
Sync Rewards + Refactored Reward Vault
2019-09-17 21:02:28 -07:00
Greg Hysen
2869dd3bac Removed unnecessary sloads in MixinStakingPoolMakers 2019-09-17 20:32:49 -07:00
Greg Hysen
5a225795e1 Updated changelog and ran linter 2019-09-17 17:51:16 -07:00
Greg Hysen
877abeda63 Removed MixinStakingPoolRewards 2019-09-17 17:37:24 -07:00
Greg Hysen
768387fea9 Rebased and addressed PR comments 2019-09-17 17:37:12 -07:00
Greg Hysen
db97fe8164 updated changelog 2019-09-17 17:36:47 -07:00
Greg Hysen
be1a70c461 refactored the staking vault 2019-09-17 17:36:46 -07:00
Amir Bandeali
b631fc610b Merge pull request #2169 from 0xProject/fix/3.0/fix-breaking-tests
Fix breaking tests, remove MixinZrxVault
2019-09-17 16:16:38 -07:00
Amir Bandeali
9b2672841d Fix build and tests 2019-09-17 15:51:46 -07:00
Amir Bandeali
336e8bafb4 Remove MixinZrxVault 2019-09-17 15:51:41 -07:00
Amir Bandeali
2ea354f748 Merge pull request #2166 from 0xProject/feat/3.0/staking-upgradability
Staking params upgradability
2019-09-17 14:20:25 -07:00
Amir Bandeali
2d125cdc20 Fix typos and remove redundant cached variables 2019-09-17 13:50:18 -07:00
Amir Bandeali
0d441a829f Add missing checks to attachStakingContract tests 2019-09-17 13:01:56 -07:00
Amir Bandeali
ee5cb6909c Merge pull request #2158 from 0xProject/feat/3.0/cleanup-staking-contracts
Change state var visibilities, delete redundant code
2019-09-17 12:57:51 -07:00
mzhu25
5258053dc8 Merge pull request #2152 from 0xProject/feature/contracts-staking/ensure-delegate-pool-exists
Ensure pool exists before (un)delegating
2019-09-17 11:29:51 -07:00
Amir Bandeali
bb46f184ed Remove use of generatePseudoRandomAddress in favor of randomAddress 2019-09-17 10:46:58 -07:00
Michael Zhu
7cc1304eca Revert when attempting to delegate to/undelegate from a pool that doesn't exist 2019-09-17 10:29:57 -07:00
Amir Bandeali
94738444de Fix build an tests 2019-09-17 09:41:27 -07:00
Amir Bandeali
4705b15188 Add addresses back as optional params to attachStakingContract 2019-09-17 08:48:14 -07:00
Amir Bandeali
de567da846 Fix typo across files 2019-09-17 08:48:14 -07:00
Amir Bandeali
6641af2a58 Fix build 2019-09-17 08:48:14 -07:00
Amir Bandeali
de9527ce2f Do not initialize stakingProxy in vault constructors 2019-09-17 08:48:14 -07:00
Amir Bandeali
16ebdfad9a Remove redundant setters and require statements 2019-09-17 08:47:19 -07:00
Amir Bandeali
b70db37b4f Set wethAssetProxy, ethVault, rewardVault, and zrxVault using init pattern 2019-09-17 08:47:19 -07:00
Amir Bandeali
3843c64c40 Update visibility, events, and naming in vaults 2019-09-17 08:45:56 -07:00
Amir Bandeali
1d1dd4b6a2 Do not shadow _ethVault 2019-09-16 22:50:47 -07:00
Amir Bandeali
d3a9ace5fd Fix linting errors 2019-09-16 22:50:47 -07:00
Amir Bandeali
778c57320c Update function visibilities 2019-09-16 22:50:47 -07:00
Amir Bandeali
f98f3660f9 Add back balanceOf getters in vaults, remove public variable getters from inherited interfaces 2019-09-16 22:50:47 -07:00
Amir Bandeali
fd4141e1f3 Fix build 2019-09-16 22:50:11 -07:00
Amir Bandeali
97c107be3e Fix unused stack variable and add missing devdoc comment 2019-09-16 22:50:11 -07:00
Amir Bandeali
2eada9db62 Add IStorage interface 2019-09-16 22:49:25 -07:00
Amir Bandeali
e9362439c3 Make some storage vars public and rename internal vars 2019-09-16 22:48:32 -07:00
Amir Bandeali
a2419ab31d Fix getTotalProtocolFeesThisEpoch by adding weth balance 2019-09-16 22:34:55 -07:00
Amir Bandeali
e589f10e23 Cleanup imports 2019-09-16 22:34:55 -07:00
Greg Hysz
5d84d40a2c Merge pull request #2154 from 0xProject/feature/staking/refCountRewards
Reference counting for rewards, plus unit tests for cumulative rewards tracking
2019-09-16 19:20:55 -07:00
Greg Hysen
43d1d0b217 more explicit sanity checks for computing balance in interval (previously all failed with div-by-zero)
typos
2019-09-16 18:57:21 -07:00
James Towle
0f802d5a1b Merge pull request #2153 from 0xProject/feature/staking/batch-execute
Implement Batch Execute Transaction
2019-09-16 17:20:33 -07:00
Alex Towle
56efde6e34 @0x:contracts-staking Addressed final review comment 2019-09-16 16:59:50 -07:00
Greg Hysen
e224e6cde5 updated changelog 2019-09-16 16:03:40 -07:00
Greg Hysen
e1d51bae73 Tests are passing and ran linter 2019-09-16 16:02:50 -07:00
Greg Hysen
f9163ccc01 Improved readability of API for cumulative rewards 2019-09-16 15:18:08 -07:00
Alex Towle
6353bf545d @0x:contracts-staking Addressed lingering review comments 2019-09-16 10:33:39 -07:00
Greg Hysen
12f0797ace Reference counting for rewards, plus unit tests for cumulative rewards. 2019-09-14 00:04:52 -07:00
mzhu25
c9de423fb8 LibSafeDowncast unit tests (#2143) 2019-09-13 16:09:46 -07:00
Alex Towle
2cd0990c65 @0x:contracts-staking Addressed review feedback by removing simplyProxyCallWithData 2019-09-13 15:41:31 -07:00
Alex Towle
6fd9308e1b @0x:contract-staking Added integration tests for 2019-09-12 18:17:00 -07:00
Alex Towle
1fc57baac1 @0x:contracts-staking Added tests for simpleProxyCallWithData() 2019-09-12 17:38:39 -07:00
Alex Towle
2ed63970d4 @0x:contracts-staking Add a batchExecute function to the staking contracts 2019-09-12 17:12:14 -07:00
James Towle
7ba6c601e5 Merge pull request #2142 from 0xProject/test/staking/lib-proxy
Test/staking/lib proxy
2019-09-12 13:50:32 -07:00
Alex Towle
cc43c5b28c @0x:contracts-staking Cleaned up combinatorial tests 2019-09-12 12:30:25 -07:00
Alex Towle
b7f25ee3b6 @0x:contracts-staking Addressed review comments 2019-09-11 17:16:33 -07:00
Alex Towle
82afdda256 @0x:contracts-staking Fixed compilation errors and ran prettier 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
Alex Towle
036c8fe920 @0x:contracts-staking Fixed style issues in staking RichErrors 2019-09-11 17:11:04 -07:00
Lawrence Forman
b7b125f623 Merge pull request #2131 from 0xProject/feature/staking/hyper-init
Staking: Hyper-Parameters, init() Pattern, Dust Stake
2019-09-10 21:57:04 -04:00
Lawrence Forman
060edf33bd @0x/contracts-staking: Fix compilation error in MixinParams. 2019-09-10 16:30:50 -04:00
Lawrence Forman
656120cd1f @0x/contracts-staking: Rename InvalidParamValue RevertError to InvalidParamValueError. 2019-09-10 15:32:40 -04:00
Lawrence Forman
34acd71835 @0x/order-utils: Rename InvalidParamValue RevertError to InvalidParamValueError. 2019-09-10 15:31:19 -04:00
Lawrence Forman
7eb4bebac3 @0x/contracts-staking: Fix typos. 2019-09-10 00:58:33 -04:00
Lawrence Forman
f45ee486e9 @0x/contracts-staking: Rebase against 3.0 AGAIN AGAIN AGAIN AGAIN AGAIN 2019-09-10 00:45:20 -04:00
Lawrence Forman
3b28c9d5a7 @0x/order-utils: Rename OperatorShareMustBeBetween0And100 to OperatorShareTooLarge. 2019-09-10 00:39:45 -04:00
Lawrence Forman
2ed39cd18d @0x/contracts-staking: Rename Tuned event to ParamsChanged.
`@0x/contracts-staking`: Merge `exchange_fees` unit tests into `protocol_fees` unit tests.
`@0x/contracts-staking`: Remove `ProtocolFeeActor` and any use of it.
`@0x/contracts-staking`: Remove unused constants.
`@0x/contracts-staking`: Move WETH assertion constructor into `MixinDeploymentConstants`.
`@0x/contracts-staking`: Add more unit tests.
2019-09-10 00:32:43 -04:00
Lawrence Forman
d8d791e4f0 @0x/order-utils: Remove redundant InvalidStakeStatusError in registry. 2019-09-10 00:32:43 -04:00
Lawrence Forman
89bd42de04 @0x/contracts-staking: Fix linter errors. 2019-09-10 00:32:43 -04:00
Lawrence Forman
51b460d432 @0x/contracts-staking: Rebase against 3.0 2019-09-10 00:32:43 -04:00
Lawrence Forman
6410366f8b @0x/contracts-staking: Fix contracts formatting.
`@0x/contracts-staking`: Remove typo test suite in `migration.ts`.
`@0x/contracts-staking`: Address minor review comments.
2019-09-10 00:32:43 -04:00
Lawrence Forman
1c2f4906e6 @0x/contracts-exchange: Remove signature-related IStructs structs.
`@0x/contracts-exchange`: Create some `payProtocolFee()` unit tests to test new staking minimum.
2019-09-10 00:32:30 -04:00
Lawrence Forman
bed90fa8ec @0x/contracts-staking: Update changelog. 2019-09-10 00:31:51 -04:00
Lawrence Forman
25787ea806 @0x/contracts-staking: Rename MixinHyperParameters -> MixinParams.
`@0x/contracts-staking`: Move params storage variables into `MixinStorage`.
`@0x/contracts-staking`: Add storage layout tests for new state vars.
`@0x/contracts-staking`: Add more migration tests.
`@0x/contracts-staking`: Add `_initMixinParams()` function that sets up `MixinParams` state.
2019-09-10 00:31:50 -04:00
Lawrence Forman
2a21d87193 @0x-order-utils: Rename InvalidTuningValue -> InvalidParamValue. 2019-09-10 00:31:24 -04:00
Lawrence Forman
7cee17887a @0x/order-utils: Add MxinParamsAlreadyInitialized to StakingRevertErrors.InitializationErrorCode. 2019-09-10 00:31:24 -04:00
Lawrence Forman
0cc94bcf19 @0x/contracts-staking: Add maximumMakersInPool hyper parameter.
`@0x/contracts-staking`: Add assertions against `maximumMakersInPool` and `rewardDelegatedStakeWeight`.
`@0x/contracts-staking`: Rebase against 3.0 (again).
2019-09-10 00:31:24 -04:00
Lawrence Forman
a554ae904f @0x/order-utils: Add InvalidRewardDelegatedStakeWeight and InvalidMaximumMakersInPool to InvalidTuningValueErrorCode. 2019-09-10 00:31:24 -04:00
Lawrence Forman
9dcda6113d @0x/contracts-staking: Rebase against 3.0. 2019-09-10 00:31:24 -04:00
Lawrence Forman
7d50117903 @0x/contract-staking: Refactor out contract attach logic so it's shared between the constructor and attachStakingContract().
`@0x/contract-staking`: Introduce migration tests to test the `init()` pattern.
2019-09-10 00:31:24 -04:00
Lawrence Forman
76c5517739 @0x/contract-staking: Update CHANGELOG.
`@0x/contract-staking`: Add `DEFAULT_HYPER_PARAMETERS` to test constants.
`@0x/contract-staking`: Appease linter gods.
`@0x/contract-staking`: Remove `setCobbDouglasAlpha()` tests.
`@0x/contract-staking`: Add `tune()` tests.
2019-09-10 00:31:24 -04:00
Lawrence Forman
b9d243e70e @0x/order-utils: Add InitializationError, InvalidTuningValue to StakingRevertErrors. 2019-09-10 00:31:24 -04:00
Lawrence Forman
d37679c129 @0x/contracts-test-utils: Add Numberish type. 2019-09-10 00:30:43 -04:00
Lawrence Forman
d01cfee455 @0x/contracts-staking: Add getHyperParameters() to MixinHyperParameters. 2019-09-10 00:30:43 -04:00
Lawrence Forman
182d360302 @0x/contracts-storage: Move init() out of IStaking and into IStorageInit. 2019-09-10 00:30:43 -04:00
Lawrence Forman
0d9069ecfe @0x/contracts-staking: Fix compilation issues.
`@0x/contracts-staking`: Check that `Staking.init()` succeded.
`@0x/contracts-staking`: Flip some functions from `view` to `pure`.
2019-09-10 00:30:43 -04:00
Lawrence Forman
6488f91e6e @0x/contracts-staking: Replace MixinDeploymentConstants with MixinHyperParameters.
`@0x/contracts-staking`: Add `init()` to `Staking` contract.
`@0x/contracts-staking`: Add `_initMixinScheduler()` to `MixinScheduler`.
`@0x/contracts-staking`: Automaticallly call `Staking.init()` in `StakingProxy.attachStakingContract()`.
`@0x/contracts-staking`: Remove `setCobbDouglasAlpha()` in favor of `tune()`.
`@0x/contracts-staking`: Exclude pools with `stake < minimumPoolStake` in `payProtocolFee()`.
2019-09-10 00:30:43 -04:00
mzhu25
70db4d8847 Merge pull request #2113 from 0xProject/feature/contracts-staking/decrease-operator-share
Move pool operator logic to vault and allow operators to decrease operatorShare
2019-09-09 21:08:01 -07:00
Michael Zhu
faa0d83013 remove unnecessary pointer variable 2019-09-09 17:41:18 -07:00
Michael Zhu
6f1f226ed0 Use storage pointer to update Pool structs, test decreaseStakingPoolOperatorShare where newOperatorShare == oldOperatorShare 2019-09-09 17:11:00 -07:00
Michael Zhu
1d6406bbd6 move operator from staking logic to vault, allow operator to decrease operatorShare 2019-09-09 16:29:19 -07:00
mzhu25
91cee9c648 Merge pull request #2129 from 0xProject/features/contracts-staking/rip-staking-wrapper
Remove StakingWrapper
2019-09-09 16:28:35 -07:00
Michael Zhu
6d83b2676e rip staking_wrapper.ts, use wrapped staking proxy pattern instead 2019-09-09 15:47:15 -07:00
James Towle
c21bce9641 Merge pull request #2130 from 0xProject/feature/staking/protocol-fees
Feature/staking/protocol fees
2019-09-09 15:13:33 -07:00
Alex Towle
1d5c175316 @0x:contracts-staking Fixed lingering review comments 2019-09-09 14:27:44 -07:00
Alex Towle
2fdd4e9760 @0x:contracts-staking Addressed some review comments 2019-09-09 10:25:19 -07:00
Amir Bandeali
abd479dc68 Merge pull request #2139 from 0xProject/feat/3.0/optimize-match-orders
Optimize batchMatchOrders, consolidate TransactionSignatureError rich revert
2019-09-08 21:18:02 -07:00
Amir Bandeali
67ef17f929 Consolidate TransactionSignatureError with SignatureError 2019-09-08 18:55:42 -07:00
Amir Bandeali
35bf179b70 Clear compiler warnings 2019-09-07 22:20:47 -07:00
Amir Bandeali
10c62c10aa Use _getOrderHashAndFilledAmount instead of getOrderInfo to reduce sloads 2019-09-07 22:10:46 -07:00
Amir Bandeali
8317628c61 Create internal function that calculates orderHash and orderTakerAssetFilledAmount 2019-09-07 22:10:05 -07:00
Alex Towle
30fee43928 @0x:contracts-staking Added tests for protocol fees 2019-09-07 13:44:04 -07:00
Alex Towle
494dc475c1 @0x:contracts-staking Added WETH support to MixinExchangeFees 2019-09-07 13:41:27 -07:00
mzhu25
3a503c61b3 Merge pull request #2104 from 0xProject/feature/contracts-staking/maker-join-pool
Reimplement Makers joining Pools
2019-09-06 16:35:16 -07:00
Michael Zhu
86a28f0d19 New logic for makers joining pools 2019-09-06 16:09:35 -07:00
Greg Hysz
24af39d4a8 Merge pull request #2133 from 0xProject/feature/exchange-libs/boundaryCheckOnGetStructHash
Sanity check on order offset when hashing
2019-09-06 16:02:32 -07:00
Greg Hysz
97773e3f64 Merge pull request #2128 from 0xProject/feature/staking/ReadOnlyProxy
Read-Only mode in proxy
2019-09-06 15:46:17 -07:00
Greg Hysen
1dc1218bfc Sanity check on order offset when hashing 2019-09-06 15:40:47 -07:00
Greg Hysen
b458026358 Readability improvements ... apparently I still cant spell catastrophe. 2019-09-06 15:09:16 -07:00
Amir Bandeali
b30a33eef5 Merge pull request #2132 from 0xProject/feat/3.0/flexible-market-fills
Remove restrictions on maker/takerAssetData for marketBuy/Sell functions
2019-09-06 15:05:37 -07:00
Amir Bandeali
0e96a1c8ba Remove restrictions that maker/takerAssetData must be the same for each order in marketBuy/Sell functions 2019-09-06 14:34:16 -07:00
Greg Hysz
f477c0fcc2 Merge pull request #2118 from 0xProject/feature/staking/NewMechanicsSolidityOnly-Squashed
New staking mechanics
2019-09-06 14:12:40 -07:00
Greg Hysen
2ad6dd1ee8 appeased solhint 2019-09-05 14:34:36 -07:00
Greg Hysen
87cfe1a8c6 abstracted out delegate calls into their own library 2019-09-05 14:09:13 -07:00
Greg Hysen
d0c6d9cf2d Read-Only mode in proxy 2019-09-05 14:07:02 -07:00
Greg Hysz
fc7f2e7fc6 Merge pull request #2126 from 0xProject/feature/staking/NewMechanicsSolidityOnly-Squashed-Tests-Squashed
Tests for new staking mechanics
2019-09-05 13:19:49 -07:00
Greg Hysen
49baafadc1 updated changelogs 2019-09-05 12:37:54 -07:00
Greg Hysen
24e62feadf Fixed linter 2019-09-05 12:27:44 -07:00
Greg Hysen
67079d96af Got build to work after rebase 2019-09-05 12:27:43 -07:00
Greg Hysen
5ac4c72f1a current -> currentEpochBalance and next -> nextEpochBalance 2019-09-05 12:27:43 -07:00
Greg Hysen
deceed37f3 Stake State -> Status in tests 2019-09-05 12:27:43 -07:00
Greg Hysen
4bc84cd526 Rich reverts in tests plus readability 2019-09-05 12:27:43 -07:00
Greg Hysen
293c428186 Tests for new staking mechanics 2019-09-05 12:27:43 -07:00
Greg Hysen
d1b004ffc1 Some readability plus updated changelogs 2019-09-05 12:26:04 -07:00
Greg Hysen
da83f75a13 Readability Improvements 2019-09-05 11:54:16 -07:00
Greg Hysen
b5be162fa2 Removed frivolous imports to improve readability 2019-09-05 11:50:22 -07:00
Greg Hysen
7e5e2241cb Rich Reverts in new staking mechanics 2019-09-05 11:50:22 -07:00
Greg Hysen
c0cb78bb3f Improving readability of staking 2019-09-05 11:46:50 -07:00
Greg Hysen
eb6ad7d29d New staking mechanics: delay on entry opposed to exit 2019-09-05 11:45:11 -07:00
Lawrence Forman
88e56356c4 Merge pull request #2109 from 0xProject/feature/3.0/staking/math-voodoo
Staking math upgrades
2019-09-05 13:05:25 -04:00
Lawrence Forman
356660ad4f @0x/contracts-staking: Remove redundant "FixedMath" prefix from FixedMath revert errors. 2019-09-04 20:18:55 -04:00
Lawrence Forman
7c3567f5e7 @0x/utils: Remove redundant FixedMath prefix from FixedMath RevertError types. 2019-09-04 20:18:55 -04:00
Lawrence Forman
e9eb3badd9 @0x/contracts-staking: Keep fees not associated with a pool. 2019-09-04 20:18:55 -04:00
Lawrence Forman
9bbbaadcf8 @0x/conracts-staking: Fix idiotic linter error. 2019-09-04 20:18:55 -04:00
Lawrence Forman
19f44fac1e @0x/contracts-staking: Reformulate cobb-douglas to be more efficient.
`@0x/contracts-staking`: Remove some unecessary asserts.
`@0x/contracts-staking`: Fix some broken test assertions.
`@0x/contracts-staking`: Generate better random values in tests.
`@0x/contracts-staking`: Rename `PPM_ONE` constant to `PPM_DENOMINATOR`.
`@0x/contracts-staking`: Minor solidity code improvements.
`@0x/contracts-staking`: Use more constants from `@0x/contracts-test-utils` in tests.
2019-09-04 20:18:55 -04:00
Lawrence Forman
0be2c250ef Commit yarn.lock 2019-09-04 20:18:55 -04: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
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
b78705120e @0x/contracts-utils: Fix failing tests due to RevertError behavior changes. 2019-09-04 20:18:55 -04:00
Lawrence Forman
f601329a47 @0x/utils: Rename length field to len in AuthorizableRevertErrors.IndexOutOfBoundsError. 2019-09-04 20:18:55 -04:00
Lawrence Forman
2b3e7e7ab7 @0x/dev-utils: Remove no longer applicable test case in chai_test.ts. 2019-09-04 20:18:55 -04:00
Lawrence Forman
8d5e28f099 @0x/contracts-staking: Change the way operator stake is computed.
`@0x/contracts-staking`: Denominate pool operator shares in parts-per-million.
`@0x/contracts-staking`: Update tests for new stake computation and higher precision math.
`@0x/contracts-staking`: Add `setCobbDouglasAlpha()` function.
2019-09-04 20:18:55 -04:00
Lawrence Forman
cb1dc92594 @0x/order-utils: Rename OperatorShareMustBeBetween0And100Error RevertError type to InvalidPoolOperatorShareError. 2019-09-04 20:18:55 -04:00
Lawrence Forman
495bf08498 @0x/utils: Update CHANGELOG. 2019-09-04 20:18:55 -04:00
Lawrence Forman
a1a5bdce78 @0x/order-utils: Prettier. 2019-09-04 20:18:55 -04:00
Lawrence Forman
f724212fd7 @0x/utils: Prettier. 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
2e357ffeab @0x/dev-utils: Add total_accounts option to Web3Config. 2019-09-04 20:18:55 -04:00
Lawrence Forman
af10f52acf @0x/contracts-staking: Rebase with 3.0 2019-09-04 20:18:55 -04:00
Lawrence Forman
ed8a6bb97b @0x/contracts-staking: Emit CobbDouglasAlphaChanged event when calling setCobbDouglasAlpha(). 2019-09-04 20:18:55 -04:00
Lawrence Forman
c774b98002 @0x/contracts-staking: Remove unused tslint directives. 2019-09-04 20:18:55 -04:00
Lawrence Forman
9a63bea763 @0x/contracts-staking: Update LibFixedMath ln() and exp() input domains and improve precision.
`@0x/contracts-staking`: Add `_invert()` and `_mulDiv()` to `LibFixedMath`.
`@0x/contracts-staking`: Update `MixinExchangeFees._cobbDouglas()` to work with `LibFixedMath`.
`@0x/contracts-staking`: Add unit and fuzz tests for `_cobbDouglas()` and remaining `LibFixedMath` functions.
2019-09-04 20:18:55 -04:00
Lawrence Forman
0c6a6743ab @0x/contracts-staking: Write LibFixedMath unit tests. 2019-09-04 20:18:55 -04:00
Lawrence Forman
1c37334b18 @0x/contracts-staking: Add a bunch of LibFixedMath unit tests. 2019-09-04 20:18:55 -04:00
Lawrence Forman
7f40665a0e @0x/utils: Fix order of BinOpErrorCodes enum in FixedMathRevertErrors. 2019-09-04 20:18:55 -04:00
Lawrence Forman
b10036444d @0x/order-utils: Add TransactionInvalidContextError to the RevertError registry. 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
f71484c9f0 @0x/order-utils: Add TransactionGasPriceError to error registry. 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
018bcf273f @0x/utils: Fix FixedMathRevertError.FixedMathBinOpError type.
`@0x/utils`: Have Ganache `Error` -> `RevertError` coercion fail if it can't look up the selector.
2019-09-04 20:15:15 -04:00
Lawrence Forman
1a3da4b363 @0x/utils: Fix registering FixedMathSignedValueError twice. 2019-09-04 20:15:15 -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
Lawrence Forman
7b5e3dab17 @0x/contracts-staking: Add rich reverts.
`@0x/utils`: Add `LibFixedMath` `RevertError` types.
`@0x/order-utils`: Add `InvalidCobbDouglasAlphaerror` `RevertError` type.
2019-09-04 20:15:15 -04:00
Lawrence Forman
a09cd03ce6 @0x/contracts-staking: Remove LibFeeMath and just put _cobbDouglas() in MixinExchangeFees.
`@0x/contracts-staking`: Update `LibFixedMath` to existing naming conventions.
`@0x/contracts-staking`: Add `cobbDouglasAlphaNumerator` and `cobbDouglasAlphaDenominator` to `Mixinstorage`.
`@0x/contracts-staking`: Add external `setCobbDouglasAlpha()` function to `MixinExchnageFees`
`@0x/contracts-staking`: Update `_cobbDouglas()` to use the new `LibFixedMath` voodoo.
`@0x/contracts-staking`: In reward calculations, use only delegated stake by pool owner as opposed to both delegated and active stake to compute stake totals.
2019-09-04 20:15:15 -04:00
Lawrence Forman
c1fc454d19 @0x/contracts-staking: Add uintMul() function to LibFixedMath. 2019-09-04 20:15:15 -04:00
Lawrence Forman
93c8284a96 @0x/contracts-staking: Add LibFeeMath library. 2019-09-04 20:15:15 -04:00
Amir Bandeali
e5dcf9063d Merge pull request #2127 from 0xProject/feat/3.0/catch-pay-protocol-fee-err
Wrap `payProtocolFee` with rich revert + reduce codesize
2019-09-04 13:51:19 -07:00
Amir Bandeali
cf35a8032d Update contracts/exchange/contracts/src/MixinProtocolFees.sol
Update comment

Co-Authored-By: James Towle <jalextowle@gmail.com>
2019-09-04 11:34:17 -07:00
Amir Bandeali
88736aa82b Merge pull request #2121 from 0xProject/feat/3.0/codesize
Reduce Exchange codesize
2019-09-03 21:08:50 -07:00
Amir Bandeali
90ac5ec577 Fix tests 2019-09-03 20:11:48 -07:00
Amir Bandeali
d1eb414749 Use new rich reverts where applicable 2019-09-03 20:11:47 -07:00
Amir Bandeali
f792d403e5 Add new rich revert errors 2019-09-03 20:11:47 -07:00
Amir Bandeali
e5706606a0 Create private functions for encoding orders/transactions with their hash to be passed into EIP1271 compliant contract 2019-09-03 20:11:43 -07:00
Amir Bandeali
49725c8c33 Styling and comment updates 2019-09-03 17:52:41 -07:00
Amir Bandeali
dfcc0c6d09 Create _enableAndRefundNonZeroBalance to slightly reduce codesize 2019-09-03 17:52:17 -07:00
Amir Bandeali
d806701d28 Use fromHex instead of doing length -> byte length calculation 2019-09-03 17:51:41 -07:00
Amir Bandeali
3935e661fe Add more writeLength tests 2019-09-03 17:05:32 -07:00
Amir Bandeali
cb8cf1f107 Add back batchFillOrders 2019-09-03 11:06:45 -07:00
Amir Bandeali
ea8669439f Minor styling and naming changes 2019-09-03 09:48:21 -07:00
Amir Bandeali
75a8b1c081 Use same taker numerator/denominator for all math in calculateFillResults 2019-09-03 09:48:16 -07:00
Amir Bandeali
73144fa4d5 Fix _setCurrentContextAddressIfRequired 2019-09-02 20:35:20 -07:00
Amir Bandeali
a6b60f3230 Create _readSignatureType with minimal validation 2019-09-02 20:34:23 -07:00
Amir Bandeali
48dfb3317a Fix tests 2019-09-02 14:36:27 -07:00
Amir Bandeali
b3b0496c49 Fix build and linting errors 2019-09-02 11:41:13 -07:00
Amir Bandeali
e880447714 Refactor EIP1271Wallet and Validator types to use new EIP1271SignatureError 2019-09-02 11:38:52 -07:00
Amir Bandeali
fd4d10e7a4 Create EIP1271SignatureError rich revert 2019-09-02 11:37:39 -07:00
Amir Bandeali
9974e10069 Fix Buffer warning 2019-09-01 19:14:28 -07:00
Amir Bandeali
18b65a61ff Fix build 2019-09-01 19:14:16 -07:00
Amir Bandeali
02a1e17f50 Reuse EIP1271 wallet code with internal function 2019-09-01 18:53:57 -07:00
Amir Bandeali
9a3a302754 Create writeLength function in LibBytes 2019-09-01 18:32:52 -07:00
Amir Bandeali
d131c39e46 Create _setCurrentContextAddressIfRequired function in MixinTransactions 2019-09-01 18:31:46 -07:00
Amir Bandeali
8231e7703e Allow unlimited contract sizes by default 2019-09-01 18:30:33 -07:00
Amir Bandeali
406a78a11a Use internal functions in Refundable modifiers 2019-09-01 17:43:18 -07:00
Amir Bandeali
fe01a150f0 Use internal function in onlyOwner, onlyAuthorized, and nonReentrant modifiers 2019-09-01 15:54:16 -07:00
Amir Bandeali
dd499591e9 Make assetProxies mapping internal (getter function already exists) 2019-09-01 15:13:57 -07:00
Amir Bandeali
c0f1e5f17f Make fillOrderNoThrow internal only, remove batchFillOrders 2019-09-01 12:22:00 -07:00
Amir Bandeali
b888e48a30 Remove getOrdersInfo 2019-09-01 11:24:16 -07:00
Amir Bandeali
8410ee9d2f Remove unnecessary public functions 2019-09-01 11:01:01 -07:00
Amir Bandeali
b7238c702b Increase optimizer runs 2019-09-01 11:00:07 -07:00
Amir Bandeali
a5996b37b2 Merge pull request #2116 from 0xProject/feat/3.0/eip1271-selectors
Add 4 byte ids to `EIP1271Wallet.isValidSignature` data
2019-08-30 13:38:25 -07:00
Amir Bandeali
b20503c5a2 Fix off by 1 error 2019-08-30 11:39:28 -07:00
Amir Bandeali
d0869a8840 Fix linting errors 2019-08-30 11:39:28 -07:00
Amir Bandeali
c156bfc534 Remove TestValidatorWallet DataType 2019-08-30 11:39:28 -07:00
Amir Bandeali
5f8e092c96 Move EIP1271 selectors to their own interface 2019-08-30 11:39:27 -07:00
Amir Bandeali
87c9f9af71 Remove example contracts 2019-08-30 11:37:40 -07:00
Amir Bandeali
65e5ecf49d Encode arguments with selector before passing into EIP1271 isValidSignature 2019-08-30 11:32:22 -07:00
James Towle
63f051a9d2 Merge pull request #2097 from 0xProject/feature/3.0/exchange/protocol-fees
Exchange Protocol Fees
2019-08-30 10:36:18 -07:00
Alex Towle
2c1393fb09 @0x:contracts-exchange Addressed lingering review comments 2019-08-29 23:50:48 -07:00
Alex Towle
dba0d8469d @0x:contracts-exchange Addressed review feedback 2019-08-29 15:20:52 -07:00
Alex Towle
75e6c45285 @0x:contracts-exchange Added the tests for getOrdersInfo back into the exchange 2019-08-28 17:02:43 -07:00
Alex Towle
e64e0d7421 @0x:contracts-exchange Added getOrdersInfo back into the exchange 2019-08-28 16:42:29 -07:00
Alex Towle
13d5a5e2ec @0x:contracts-exchange Added a test to ensure that registerAssetProxy will fail for non-contract proxies 2019-08-28 16:24:36 -07:00
Alex Towle
3432083343 @0x:contracts-staking Updated payProtocolFee trivially to fix the build.
This is not a real to update to `payProtocolFee`. Rather, the interface
was updated to it's finished state. This will be addressed in my next
PR.
2019-08-28 16:15:13 -07:00
Alex Towle
df4282fb34 Fixed issues after rebase 2019-08-28 15:50:23 -07:00
Alex Towle
861aebb2e3 @0x:contracts-exchange Refactored the protocol fee tests and added tests for batchFillOrders 2019-08-28 15:08:40 -07:00
Alex Towle
cc7b8359b4 @0x:contracts-exchange Added tests for matchOrders protocol fees 2019-08-28 15:05:33 -07:00
Alex Towle
dd0d848530 @0x:contracts-exchange Added tests for fillOrder protocol fees 2019-08-28 15:05:33 -07:00
Alex Towle
7f17033ce3 @0x:contracts-exchange Added protocol fees to fillOrders and matchOrders 2019-08-28 15:05:13 -07:00
Alex Towle
3a4e72bb08 @0x:contracts-exchange-libs Added protocol fees to LibFillResults
* This commit also squashed some bugs in the reference functions.
Thankfully, combinatorial testing had our back!
2019-08-28 15:03:32 -07:00
Alex Towle
bf3751fd9e @0x:contracts-exchange Added the MixinProtocolFees contract 2019-08-28 15:03:32 -07:00
Alex Towle
05eb646848 @0x:contracts-utils Added a Refundable contract 2019-08-28 15:01:30 -07:00
Amir Bandeali
5fe231b689 Reorder Cancel event args for consistency 2019-08-28 15:01:30 -07:00
Amir Bandeali
5ee7c2f9dc Reorder Fill event args to get around stack limit 2019-08-28 15:01:30 -07:00
Alex Towle
2c970a0466 @0x:contracts-exchange Added protocol fees to fill order 2019-08-28 15:01:30 -07:00
Alex Towle
c688b11c86 @0x:contracts-exchange-libs Added protocol fees to LibFillResults
* This commit also squashed some bugs in the reference functions.
Thankfully, combinatorial testing had our back!
2019-08-28 15:01:30 -07:00
Alex Towle
749c0354b3 @0x:contracts-staking Added protocol fee functions to IStaking 2019-08-28 14:56:40 -07:00
Alex Towle
415af90ae7 @0x:contracts-exchange Added the MixinStakingManager contract 2019-08-28 14:53:45 -07:00
Alex Towle
365cb161cf @0x:contracts-utils Added a Refundable contract 2019-08-28 14:51:57 -07:00
Amir Bandeali
a9857fa298 Merge pull request #2107 from 0xProject/feat/3.0/staking/remove-duplicate-code
Remove duplicate code from staking contracts
2019-08-28 14:30:37 -07:00
Amir Bandeali
59ae8d4b86 Fix comments in ZrxVault 2019-08-28 13:56:42 -07:00
Amir Bandeali
b81f6ba685 Fix linting error 2019-08-28 12:51:18 -07:00
Amir Bandeali
16c9d00494 Remove redundant function in MixinZrxVault 2019-08-28 11:20:00 -07:00
Amir Bandeali
1a833d9dfb Remove zrxAssetData param to ensure that it is always in sync with zrxToken 2019-08-28 11:06:46 -07:00
Amir Bandeali
bde6278781 Set 100 to PERGENTAGE_DENOMINATOR constant 2019-08-27 23:42:42 -07:00
Amir Bandeali
e7c4d2171f Update contracts to use 256 bit math 2019-08-27 23:42:42 -07:00
Amir Bandeali
3a096ff0b4 Remove 64 and 96 bit LibSafeMath contracts 2019-08-27 23:42:42 -07:00
Amir Bandeali
9feac6708a Add storage layout tests 2019-08-27 23:42:11 -07:00
Amir Bandeali
aabca97b2d Make most constants and storage vars uint256 2019-08-27 23:42:11 -07:00
Amir Bandeali
9fb933fd06 Remove MixinOwnable 2019-08-27 23:42:11 -07:00
Amir Bandeali
df039f05c2 Update contracts to use new SafeMath functions 2019-08-27 23:42:11 -07:00
Amir Bandeali
d1bed5729d Remove LibSafeMath and refactor 6/96 bit versions 2019-08-27 23:42:11 -07:00
mzhu25
c926a586d2 Merge pull request #2103 from 0xProject/feature/contracts-staking/rich-reverts
Staking RichErrors and cleanup
2019-08-26 17:32:05 -07:00
Amir Bandeali
b7397bbb8f Merge pull request #2101 from 0xProject/feat/3.0/cleanup
Revert to old ReentrancyGuard implementation + random cleanup
2019-08-26 17:14:17 -07:00
Michael Zhu
9b957524a5 replace abi.encodeWithSelector calls with bytes constant + other nits 2019-08-26 16:58:56 -07:00
Michael Zhu
078b1af04e Binop -> BinOp 2019-08-26 16:06:31 -07:00
Michael Zhu
6827ebfb78 blockchainTests.only -> blockchainTests 2019-08-26 15:58:31 -07:00
Michael Zhu
1d807abe8b lint 2019-08-26 15:49:09 -07:00
Michael Zhu
2c15b3f9bd remove staking RevertReasons from TS types, ExchangeAlreadyRegisteredError -> ExchangeAddressAlreadyRegisteredError 2019-08-26 15:49:09 -07:00
Michael Zhu
0d5e037081 use mocha extensions in staking tests 2019-08-26 15:49:09 -07:00
Michael Zhu
dbda3a04b2 update tests to use RichErrors 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
Michael Zhu
cd1fc6a1f0 fix typos 2019-08-26 15:49:09 -07:00
Michael Zhu
52ef745f7c run codegen script 2019-08-26 15:49:08 -07:00
Michael Zhu
961b09977f replace requires/reverts with rich errors 2019-08-26 15:49:08 -07:00
Amir Bandeali
df8419cd9e Add back comment on isReentrant function 2019-08-26 14:49:03 -07:00
Amir Bandeali
71acf2bfa7 Remove hard coded gas limits in all tests 2019-08-25 19:00:50 -07:00
Amir Bandeali
1400ceb4e8 Fix Exchange reentrancy tests 2019-08-25 18:29:04 -07:00
Amir Bandeali
793e338dd3 Revert to old ReentrancyGuard implementation 2019-08-25 17:06:52 -07:00
Amir Bandeali
020e7609c3 Add assetProxyId param to AssetProxyExistsError 2019-08-25 17:06:37 -07:00
Amir Bandeali
b1c2f66126 Update variable names in IAssetData 2019-08-25 16:51:37 -07:00
Amir Bandeali
8ef0a59b98 Merge pull request #2084 from 0xProject/feat/3.0/transactionGasPrice
Add `gasPrice` to 0x transactions
2019-08-24 10:13:07 -07:00
Amir Bandeali
798fb183a5 Address remaining PR feedback 2019-08-23 15:14:04 -07:00
Greg Hysz
6bb3992c2f Add files via upload
State transitions for stake.
2019-08-23 11:23:28 -07:00
Amir Bandeali
830d6f726e Use default gasPrice in Forwarder tests 2019-08-23 09:33:05 -07:00
Amir Bandeali
8f8c16bd0e Add more recursion tests 2019-08-23 09:25:09 -07:00
Amir Bandeali
76c0708cf2 Fix config.yml 2019-08-23 08:51:53 -07:00
Amir Bandeali
5e51233b49 Address PR feedback 2019-08-22 17:11:50 -07:00
Amir Bandeali
890bfd18fa Update tests to use new TransactionInvalidContextError 2019-08-22 17:04:15 -07:00
Amir Bandeali
37cc948741 Add TransactionInvalidContextError class 2019-08-22 17:04:15 -07:00
Amir Bandeali
edb923b8bb Use TransactionInvalidContextError in _assertExecutableTransaction 2019-08-22 17:04:15 -07:00
Amir Bandeali
44753bb168 Add TransactionInvalidContextError and remove NO_REENTRANCY errorCode 2019-08-22 17:04:15 -07:00
Amir Bandeali
7b96fa8d76 Add more unit tests 2019-08-22 17:04:15 -07:00
Amir Bandeali
ca35eed955 Add _assertExecutableTransaction unit tests 2019-08-22 17:04:15 -07:00
Amir Bandeali
eb6637afd5 Add public version of _assertExecutableTransaction 2019-08-22 17:04:15 -07:00
Amir Bandeali
a114bbb30e Reduce code duplication in unit tests 2019-08-22 17:04:15 -07:00
Amir Bandeali
9d38bf731f Add transaction gasPrice tests 2019-08-22 17:04:15 -07:00
Amir Bandeali
f32732db1c Add TransactionGasPriceError rich revert class 2019-08-22 17:04:15 -07:00
Amir Bandeali
f41a29ce55 Fix weth tests 2019-08-22 17:04:15 -07:00
Amir Bandeali
2b1e0be4fc Add default gasPrice to web3Wrapper instance and TransactionFactory 2019-08-22 17:04:15 -07:00
Amir Bandeali
23dd711396 Update ZeroExTransaction tests 2019-08-22 17:04:15 -07:00
Amir Bandeali
59369cea2a Update transaction hashing and tests 2019-08-22 17:04:14 -07:00
Amir Bandeali
e6b81a824d Update ZeroExTransaction schema 2019-08-22 17:04:14 -07:00
Amir Bandeali
1dd216b566 Update ZeroExTransaction interface 2019-08-22 17:04:14 -07:00
Amir Bandeali
27e2a76110 Update remaining contracts to use new transaction schema 2019-08-22 17:04:14 -07:00
Amir Bandeali
47da97137f Add _assertExecutableTransaction function and add gasPrice check 2019-08-22 17:04:14 -07:00
Amir Bandeali
2134537bc3 Add TransactionGasPriceError to LibExchangeRichErrors 2019-08-22 17:04:14 -07:00
Amir Bandeali
67f91269ee Add gasPrice to ZeroExTransaction struct 2019-08-22 17:04:14 -07:00
Alex Towle
57338059e1 CI: Split contracts tests up into two seperate jobs to attempt to increase speed 2019-08-22 17:04:14 -07:00
Alex Towle
c1ed836fda CI: Changed the test-contracts-ganache-3.0 to run in stages to avoid the Killed error 2019-08-22 17:03:15 -07:00
Alex Towle
cd147dbc41 @0x:contracts-exchange Fixed issues caused by rebase 2019-08-22 17:01:49 -07:00
Alex Towle
0253bba83b @0x:contracts-exchange Addressed review comments by completely overhauling transaction_unit_tests.ts 2019-08-22 17:01:49 -07:00
Alex Towle
d845b318b9 @0x:contracts-exchange Changed the signature validation stub function to not require state 2019-08-22 17:01:49 -07:00
Alex Towle
4b970905cf @0x:contracts-exchange Removed code written to transactions 2019-08-22 17:01:49 -07:00
Alex Towle
907771f084 @0x:contracts-exchange Added unit tests for batchExecuteTransactions 2019-08-22 17:01:49 -07:00
Alex Towle
1724ecd4c3 @0x:contracts-exchange Added unit tests for executeTransaction 2019-08-22 17:01:48 -07:00
Alex Towle
74b9ad5536 @0x:contracts-exchange Added unit tests for getCurrentContextAddress 2019-08-22 17:01:48 -07:00
mzhu25
4f1525fe27 Merge pull request #1987 from 0xProject/feature/contracts/3.0/remove-forwarder-fee-abstraction
Remove Forwarder fee abstraction and revamp tests
2019-08-22 10:55:10 -07:00
Michael Zhu
4dc7956b56 address greg's comments 2019-08-22 10:29:30 -07:00
mzhu25
453bf4d195 Merge pull request #2087 from 0xProject/fix/3.0/exchange/execute-noop-transfer
remove from != to check and update tests
2019-08-21 17:02:03 -07:00
Greg Hysz
249948e787 Merge pull request #1910 from 0xProject/feature/contracts-staking/first-implementation
[WIP] First Implementation of Staking Contracts (ZEIP 31)
2019-08-21 16:48:04 -07:00
Greg Hysen
c0acc8dfdf Fixed sorting in artifact generation 2019-08-21 16:30:35 -07:00
Michael Zhu
00e87864b1 remove from != to check and update tests 2019-08-21 13:07:59 -07:00
Greg Hysen
697e5df52d Added changelog entries and cleaned up merge 2019-08-21 13:05:11 -07:00
Greg Hysen
ba3cd454ba Fixed linter errors 2019-08-21 13:04:21 -07:00
Greg Hysen
de26925c13 Solidity 0.5.5 -> 0.5.9 2019-08-21 13:04:20 -07:00
Greg Hysen
47e00ff1a7 Renamed MixinTimelockedStake.sol -> MixinTimeLockedStake.sol 2019-08-21 13:04:20 -07:00
Greg Hysen
d106051ee3 CamelCase for timelocks 2019-08-21 13:04:20 -07:00
Greg Hysen
c939fe2287 moved natspec to above contract definition 2019-08-21 13:04:20 -07:00
Greg Hysen
41b372ffe6 Updates from staking PR review 2019-08-21 13:04:20 -07:00
Greg Hysen
5826825d11 Linter fixes 2019-08-21 13:04:20 -07:00
Greg Hysen
a765e47dca Got staking contracts working after rebase 2019-08-21 13:04:20 -07:00
Greg Hysen
de8b032df9 Removed the unused LibRewardsTest 2019-08-21 13:04:20 -07:00
Greg Hysz
f1b1eb3b58 Added contract registry to kill switch diagram 2019-08-21 13:04:20 -07:00
Greg Hysz
1f334d29ae New architecture images for README 2019-08-21 13:04:20 -07:00
Greg Hysz
3279d2a803 updated architecture descriptions 2019-08-21 13:04:19 -07:00
Greg Hysen
cd14d1ef0f ran prettier 2019-08-21 13:04:19 -07:00
Greg Hysen
9eb676fb46 Pinned contracts-multisig dependency on asset-proxy so it will build 2019-08-21 13:04:19 -07:00
Greg Hysen
6c82ebe956 Added more documentation to interfaces 2019-08-21 13:04:19 -07:00
Greg Hysen
3922d02910 Documented libraries and removed unnecessary interface, IMixinScheduler 2019-08-21 13:04:19 -07:00
Greg Hysen
6da70cfa0d Added top-level README to the staking package 2019-08-21 13:04:19 -07:00
Greg Hysen
15c8e06129 Ran contracts:gen 2019-08-21 13:04:19 -07:00
Greg Hysen
93506a4e27 Updated Epoch API for readability + documented Timelock Mixin 2019-08-21 13:04:19 -07:00
Greg Hysen
508e927d63 Removed unnecessary lib 2019-08-21 13:04:19 -07:00
Greg Hysen
ee969261b4 Documentation for MixinVaultCore 2019-08-21 13:04:19 -07:00
Greg Hysen
2a5742c12d Documentation + Events for ZrxVault 2019-08-21 13:04:19 -07:00
Greg Hysen
598d70c6dc Renamed getStakeDelegatedToPool -> getTotalStakeDelegatedToPool for readability 2019-08-21 13:04:19 -07:00
Greg Hysen
a49e47f34b Mixin Zrx Vault is ownable now 2019-08-21 13:04:19 -07:00
Greg Hysen
ad4d869137 Documentation for stake balances mixin 2019-08-21 13:04:19 -07:00
Greg Hysen
4ef86e6128 Adding documentation to delegated stake mixin 2019-08-21 13:04:18 -07:00
Greg Hysen
470036f6cb Working on new directory structure 2019-08-21 13:04:18 -07:00
Greg Hysen
835ab6ddd9 Fixed linearization issue - see https://github.com/hysz/SmartContractLinearizer ! 2019-08-21 13:04:18 -07:00
Greg Hysen
b0b387013c Moved timelock logic into its own contract 2019-08-21 13:04:18 -07:00
Greg Hysen
3e6cae0ca0 Documentation for MixinDelegatedStake 2019-08-21 13:04:18 -07:00
Greg Hysen
93844343de Documented MixinStake.sol 2019-08-21 13:04:18 -07:00
Greg Hysen
42430290d5 Split MixinStake into: MixinStake, MixinDelegatedStake and MixinTimelockedStake 2019-08-21 13:04:18 -07:00
Greg Hysen
ce15b4c678 Fixed linter errors 2019-08-21 13:04:18 -07:00
Greg Hysen
35f4e2fb4f Documented MixinStakingPoolRewardVault and StakingPoolRewardVault 2019-08-21 13:04:18 -07:00
Greg Hysen
501f6cbab9 Fixed linearization issue - see https://github.com/hysz/SmartContractLinearizer ! 2019-08-21 13:04:18 -07:00
Greg Hysen
a724dd98a9 Documented staking pool reward vault mixin 2019-08-21 13:04:18 -07:00
Greg Hysen
d5249425af Added documentation to MixinStakingPoolRewards 2019-08-21 13:04:18 -07:00
Greg Hysen
44c44a2b9c Some renaming pool -> staking pool for readability 2019-08-21 13:04:18 -07:00
Greg Hysen
eb1c48674a Condensed some functions in MixinStakingPools for readability 2019-08-21 13:04:17 -07:00
Greg Hysen
b44ab72557 Added introductory comment for staking pool rewards 2019-08-21 13:04:17 -07:00
Greg Hysen
e6a33dea0e Renamed xxxReward... to StakingPoolReward... 2019-08-21 13:04:17 -07:00
Greg Hysen
217811d0af added maker add/remove events to staking pools 2019-08-21 13:04:17 -07:00
Greg Hysen
ab3246cc71 Cleaned up staking pool mixin 2019-08-21 13:04:17 -07:00
Greg Hysen
829533d501 Renamed MixinFees -> MixinExchangeFees 2019-08-21 13:04:17 -07:00
Greg Hysen
8881118a15 Added event when ownership of contract changes 2019-08-21 13:04:17 -07:00
Greg Hysen
3f2be5b2da Documenting fees + rewards now use weighted stake in denominator of cobb douglas 2019-08-21 13:04:17 -07:00
Greg Hysen
9f1904ad3d Renamed MixinExchange to MixinExchangeManager and added documentation 2019-08-21 13:04:17 -07:00
Greg Hysen
09843c3cf1 Got staking contract building again 2019-08-21 13:04:17 -07:00
Greg Hysen
303279a766 Renamed MixinEpoch -> MixinScheduler 2019-08-21 13:04:17 -07:00
Greg Hysen
f560e7fa96 Renamed approval factory 2019-08-21 13:04:17 -07:00
Greg Hysen
c97c6d1fc2 LibSafeMath96Bit -> LibSafeMath96 2019-08-21 13:04:16 -07:00
Greg Hysen
b53bf051ac LibSafeMath64Bit -> LibSafeMath64 2019-08-21 13:04:16 -07:00
Greg Hysen
d5189e6143 linted contracts 2019-08-21 13:04:16 -07:00
Greg Hysen
a934c71ccd Fixing linter errors 2019-08-21 13:04:16 -07:00
Greg Hysen
5147b6e699 fixing linter errors 2019-08-21 13:04:16 -07:00
Greg Hysen
9294bf40a7 Ran yarn fix 2019-08-21 13:04:16 -07:00
Greg Hysen
a02f96c913 ran prettier 2019-08-21 13:04:16 -07:00
Greg Hysen
b756e723ea Updated dependency ordering using a linearizer script, which is now here: https://github.com/hysz/SmartContractLinearizer 2019-08-21 13:04:16 -07:00
Greg Hysen
8bc1d5fe3e Run all tests 2019-08-21 13:04:16 -07:00
Greg Hysen
180417b581 moved another test to the simulator 2019-08-21 13:04:16 -07:00
Greg Hysen
786655843b check reward balances of operator ocne withdarwn in simulator 2019-08-21 13:04:16 -07:00
Greg Hysen
5e3eeed10f more work on simulator 2019-08-21 13:04:16 -07:00
Greg Hysen
8a2df9cd1f Working on simulation to make it easier to follow the end-to-end tests. Mostly working. 2019-08-21 13:04:16 -07:00
Greg Hysen
74d9891e06 actors for maker / pool operator + comprehensive test cases 2019-08-21 13:04:16 -07:00
Greg Hysen
e0ff859e0d Separated test files out for readability 2019-08-21 13:04:15 -07:00
Greg Hysen
2c7efd0b97 separating out tests for readability 2019-08-21 13:04:15 -07:00
Greg Hysen
99a0835ecc Fixed staker actor assertions 2019-08-21 13:04:15 -07:00
Greg Hysen
0bb227a79b Delegator Actor 2019-08-21 13:04:15 -07:00
Greg Hysen
84e7357960 starting on a delegator actror 2019-08-21 13:04:15 -07:00
Greg Hysen
9d0b94305a deleted old staker test - much code saved! 2019-08-21 13:04:15 -07:00
Greg Hysen
8343105b54 cleaned up staker actor 2019-08-21 13:04:15 -07:00
Greg Hysen
38cad56bf9 Staker Actor 2019-08-21 13:04:15 -07:00
Greg Hysen
8f291c19c3 Use LibSafeMath in ZrxVault instead of util SafeMath 2019-08-21 13:04:15 -07:00
Greg Hysen
9566188d6b Renamed IVault to IZrxVault 2019-08-21 13:04:15 -07:00
Greg Hysen
cae8c2013d Split deployment constants into its own mixin for readability 2019-08-21 13:04:15 -07:00
Greg Hysen
9bc5efe958 Use safemath for epochs 2019-08-21 13:04:15 -07:00
Greg Hysen
b36003896f Renamed LibMath to LibFeeMath 2019-08-21 13:04:15 -07:00
Greg Hysen
4d2ba9f1e6 Replaced any contract-style libraries with real libraries. 2019-08-21 13:04:14 -07:00
Greg Hysen
56184c6f4f Removed Wrapper contracts. Too much sugar. Felt it was less readable. 2019-08-21 13:04:14 -07:00
Greg Hysen
1f64f9eae6 Other contracts packages building with LibEIP721 as a library (rather than a contract) 2019-08-21 13:04:14 -07:00
Greg Hysen
7aeeaae015 Getting other contract libraries to build with LibEIP712 now a regular library 2019-08-21 13:04:14 -07:00
Greg Hysen
03142d82bc added test for trying to put maker in pool when they havent signed the message properly 2019-08-21 13:04:14 -07:00
Greg Hysen
78805b1c39 Updated remaining tests to use maker signatures when adding to pool 2019-08-21 13:04:14 -07:00
Greg Hysen
e1a5ba9864 Pool Management test passing with signatures 2019-08-21 13:04:14 -07:00
Greg Hysen
bc0140ef3a Signature validation for adding makers to a staking pool 2019-08-21 13:04:14 -07:00
Greg Hysen
36b76550e0 Working towards maker signature validation 2019-08-21 13:04:14 -07:00
Greg Hysen
1f2e94b585 Adding signatures for maker acceptance into pool 2019-08-21 13:04:14 -07:00
Greg Hysen
e2a2f932f1 Created sepaerate mixins for interacting with the different vaults 2019-08-21 13:04:14 -07:00
Greg Hysen
6ca2f7e3ac Cleaned up staking contract with wrappers 2019-08-21 13:04:14 -07:00
Greg Hysen
f3309d3651 done tests 2019-08-21 13:04:14 -07:00
Greg Hysen
0b1d955a9f Added some more sanity checks for delegator reward balances 2019-08-21 13:04:13 -07:00
Greg Hysen
fb75fa4e9a Withdraw balances for rewards by operators 2019-08-21 13:04:13 -07:00
Greg Hysen
0ba8690120 Added functions for reward balances to staking API 2019-08-21 13:04:13 -07:00
Greg Hysen
cafa3c827c Updated naming on reward vault 2019-08-21 13:04:13 -07:00
Greg Hysen
bbacce2986 Removed operator from reward vault 2019-08-21 13:04:13 -07:00
Greg Hysen
ead2d26025 Test for delegator payouts when we use Shadow ETH 2019-08-21 13:04:13 -07:00
Greg Hysen
7d89449f2d Got delegation buy-in/payout test working 2019-08-21 13:04:13 -07:00
Greg Hysen
b3d1b6c499 Store separate operator / pool balances in the reward vault. This reduces complexity in the staking contract. 2019-08-21 13:04:13 -07:00
Greg Hysen
7d85e61cc5 Basic payouts to delegators when the pool is empty and they receive 100% of the reward. 2019-08-21 13:04:13 -07:00
Greg Hysen
362a8c8fc5 account for delegated stake when computing payouts. Tests pass 2019-08-21 13:04:13 -07:00
Greg Hysen
6041fb0445 finalizing payouts are correct 2019-08-21 13:04:13 -07:00
Greg Hysen
b2a7e0536e epoch finalization executes at about 25k gas / active maker 2019-08-21 13:04:13 -07:00
Greg Hysen
2d39454ce1 get logs when available, otherwise do not 2019-08-21 13:04:13 -07:00
Greg Hysen
16de8bf26c get logs with tx receipt 2019-08-21 13:04:13 -07:00
Greg Hysen
bb7cecd7c1 all tests passing again 2019-08-21 13:04:13 -07:00
Greg Hysen
8e41cc7651 Finalization with payouts compiles. 2019-08-21 13:04:12 -07:00
Greg Hysen
55238b9669 All tests are passing again. Minor fixes after messing around with different code 2019-08-21 13:04:12 -07:00
Greg Hysen
316ef69074 Adding some tests to the reward vault 2019-08-21 13:04:12 -07:00
Greg Hysen
8c839b5c22 Reward Vault Implementation with wrapper functions. Working on tests. 2019-08-21 13:04:12 -07:00
Greg Hysen
f98e1d75f4 Protocol fees only payable by a valid exchange 2019-08-21 13:04:12 -07:00
Greg Hysen
c57d17dc58 Exchange tracking 2019-08-21 13:04:12 -07:00
Greg Hysen
938f4d2d9d Protocol Fees implemented; some partially implemented code for other features in this commit,. 2019-08-21 13:04:12 -07:00
Greg Hysen
307c38bd16 payFee function 2019-08-21 13:04:12 -07:00
Greg Hysen
202dcfb4c5 Fixed a bug in the nth root that affects speed of computation. Also started playing with retaining decimal places of root computation 2019-08-21 13:04:12 -07:00
Greg Hysen
8dd74bcf82 test for delegating/undelegating 2019-08-21 13:04:12 -07:00
Greg Hysen
07acdc26ff starting a test for delegation 2019-08-21 13:04:12 -07:00
Greg Hysen
de307bf25a Moved constants and storage mixins to immutable directory 2019-08-21 13:04:12 -07:00
Greg Hysen
b6c4f533d2 completed staking test 2019-08-21 13:04:12 -07:00
Greg Hysen
cbf41e6ade Minor bug fixes in staking + tests making progress 2019-08-21 13:04:11 -07:00
Greg Hysen
b1d98a4183 Updated tests for epochs. More robust and helpful for staking tests. 2019-08-21 13:04:11 -07:00
Greg Hysen
30db88d27b test case for epoch management 2019-08-21 13:04:11 -07:00
Greg Hysen
fc9d5dee5e updated wrapper with epoch management 2019-08-21 13:04:11 -07:00
Greg Hysen
bb0ada3f59 adding epoch management 2019-08-21 13:04:11 -07:00
Greg Hysen
804256075e added new staking/delegating/timelock functions to staking wrapper 2019-08-21 13:04:11 -07:00
Greg Hysen
79f28f121b checkpoint - implementing delegating + timelocks 2019-08-21 13:04:11 -07:00
Greg Hysen
717a19a08e moving towards working delegation + timelocks. 2019-08-21 13:04:11 -07:00
Greg Hysen
9c8716da09 delegating logic 2019-08-21 13:04:11 -07:00
Greg Hysen
8293784629 tests for pool management 2019-08-21 13:04:11 -07:00
Greg Hysen
a17f123608 Added ABI decoding of return values to callAsync 2019-08-21 13:04:11 -07:00
Greg Hysen
561fe9c3ea tests for pools - create pool and increment id 2019-08-21 13:04:11 -07:00
Greg Hysen
e645aa1ee5 some methods only callable by pool operator 2019-08-21 13:04:11 -07:00
Greg Hysen
7f86d2c5fa Renamed "Maker Ids" to "Pools" 2019-08-21 13:04:11 -07:00
Greg Hysen
fae14a755f maker registry compiles, untested 2019-08-21 13:04:11 -07:00
Greg Hysen
1c14948f8a Saved 20k gas on cobb douglas computation w binary search 2019-08-21 13:04:10 -07:00
Greg Hysen
6a902eff56 Split Storage Logic + Staking Logic Contracts 2019-08-21 13:04:10 -07:00
Greg Hysen
c6192ea953 adding events for staking 2019-08-21 13:04:10 -07:00
Greg Hysen
36cf4ad304 some refactoring for the staking proxy. Compiles, but no tests yet. 2019-08-21 13:04:10 -07:00
Greg Hysen
bcfabf18bc cobb douglas / simplified / inverse simplified (better results across the board - esp w simplified impls) 2019-08-21 13:04:10 -07:00
Greg Hysen
f15693af1d Much simplified cobb douglas implementation 2019-08-21 13:04:10 -07:00
Greg Hysen
64e42d18e2 works for square roots 2019-08-21 13:04:10 -07:00
Greg Hysen
e2a76c621b working on it 2019-08-21 13:04:10 -07:00
Greg Hysen
19f6a8dcfe decent cobb douglas implementation 2019-08-21 13:04:10 -07:00
Greg Hysen
3c4cfe8aee fixed point nth root. This is what well use for the cobb-douglas function when computing rewards. 2019-08-21 13:04:10 -07:00
Greg Hysen
43173c1aac Run Newtons nth root algorithm after approximating the root 2019-08-21 13:04:10 -07:00
Greg Hysen
95b284d648 Function to compute nth root 2019-08-21 13:04:10 -07:00
Greg Hysen
9787cf8296 hooked up interface to MixinStake 2019-08-21 13:04:10 -07:00
Greg Hysen
93b57445b6 unstaking works 2019-08-21 13:04:10 -07:00
Greg Hysen
c4ca72cf22 staking end-to-end works 2019-08-21 13:04:10 -07:00
Greg Hysen
13d2cca2bc staking looks good, aside from the xfer of zrx 2019-08-21 13:04:10 -07:00
Greg Hysen
7fe8eac511 compiles and deploys 2019-08-21 13:04:10 -07:00
Greg Hysen
c062458188 Writing staking tests 2019-08-21 13:04:09 -07:00
Greg Hysen
3517dd2741 Implemented staking logic and ZRX vault 2019-08-21 13:04:09 -07:00
Lawrence Forman
7407890deb Merge pull request #2075 from 0xProject/feature/3.0/exchange/market-fill-or-kill
Add marketBuy/SellOrdersFillOrKill() to Exchange
2019-08-21 11:24:24 -04:00
Lawrence Forman
e9a4b0758b @0x/contracts-exchange: Remove log decoding in ExchangeWrapper test class in favor of awaitTransactionSuccessAsync. 2019-08-21 10:59:34 -04:00
Lawrence Forman
abf076fc05 @0x/contracts-exchange: Remove unused _getOrderHashes() function from MixinWrapperFUnctions. 2019-08-21 10:59:34 -04:00
Lawrence Forman
c344625d0d @0x/utils: Ran prettier. 2019-08-21 10:59:34 -04:00
Lawrence Forman
14630465dd @0x/order-utils: Add comments to regex parsing code in revert_error.ts. 2019-08-21 10:59:34 -04:00
Lawrence Forman
a497ddfad2 @0x/contracts-exchange: Update CHANGELOG and run prettier. 2019-08-21 10:59:34 -04:00
Lawrence Forman
34f6facdee @0x/contracts-exchange-libs: Update CHANGELOG. 2019-08-21 10:59:34 -04:00
Lawrence Forman
c3bff31cc4 @0x/order-utils: Update CHANGELOG and run prettier. 2019-08-21 10:59:34 -04:00
Lawrence Forman
e4475c08e8 @0x/contracts-exchange: Switch to consolidated IncompleteFillError rich error.
`@0x/contracts-exchange`: Allow `marketSell/BuyOrdersNoThrow` to be destructive to orders again.
2019-08-21 10:59:34 -04:00
Lawrence Forman
75a4d129f7 @0x/contracts-exchange-libs: Consolidate FillOrKill errors into IncompleteFillError. 2019-08-21 10:59:34 -04:00
Lawrence Forman
c659477358 @0x/order-utils: Consolidate FillOrKill errors into IncompleteFillError. 2019-08-21 10:59:34 -04:00
Lawrence Forman
43f38d02ad @0x/contracts-dev-utils: run_mocha package script runs with UNLIMITED_CONTRACT_SIZE=true environment variable. 2019-08-21 10:59:34 -04:00
Lawrence Forman
6b8bc55c74 @0x/contracts-test-utils: web3Wrapper is created with shouldAllowUnlimitedContractSize if UNLIMITED_CONTRACT_SIZE environment variable is set. 2019-08-21 10:59:34 -04:00
Lawrence Forman
0c53e2fe46 @0x/dev-utils: Make ganache's allowUnlimitedCOntractSize option configurable via Web3Config.
`@0x/dev-utils`: Add `UnlimitedContractSize` to `EnvVars`.
2019-08-21 10:59:34 -04:00
Lawrence Forman
edef3bc30e @0x/contracts-exchange: Fix failing wrapper.ts test. 2019-08-21 10:59:34 -04:00
Lawrence Forman
0c7f09b832 ran prettier 2019-08-21 10:59:34 -04:00
Lawrence Forman
34d075ce8c @0x/contracts-exchange: Update marketBuy/SellOrdersNoThrow() to NOT be destructive to the orders.
`@0x/contracts-exchange`: Fix wrapper unit tests to use the actual order hash algorithm, since it can't be overridden anymore.
2019-08-21 10:59:34 -04:00
Lawrence Forman
8c06d660ea Update CHANGELOGs with PR numbers. 2019-08-21 10:59:34 -04:00
Lawrence Forman
748566b4fb @0x/contracts-exchange: Tweak exchangeDataEncoder test utility to work with marketBuy/SellFillOrKill() functions. 2019-08-21 10:59:34 -04:00
Lawrence Forman
fb38867e78 Ran prettier 2019-08-21 10:59:34 -04:00
Lawrence Forman
a2613625c6 @0x/contracts-exchange: Squelch linter errors in LibExchangeRichErrorDecoder. 2019-08-21 10:59:34 -04:00
Lawrence Forman
89f1d54ebc @0x/contracts-dev-utils: Add marketBuy/SellOrdersNoThrow and marketBuy/SellOrdersFillOrKill to LibTransactionDecoder. 2019-08-21 10:59:34 -04:00
Lawrence Forman
740913fa20 @0x/dev-utils: Set allowUnlimitedContractSize option when creating a ganache provider. 2019-08-21 10:59:34 -04:00
Lawrence Forman
fd2a240c9f @0x/contracts-exchange`: Update changelog. 2019-08-21 10:59:34 -04:00
Lawrence Forman
96bef08ac2 @0x/contracts-exchange: Rename marketSellOrders and marketBuyOrders back to marketSellOrdersNoThrow and marketBuyOrdersNoThrow.
`@0x/contracts-exchange`: Introduce new `marketSellOrdersFillOrKill` and `marketBuyOrdersFillOrKill` functions.
`@0x/contracts-exchange`: Add new rich error types: `IncompleteMarketBuyError` and `IncompleteMarketSellError`.
`@0x/contracts-exchange`: Use `abi.decode()` in `LibExchangeRichErrorDecoder` over `LibBytes`.
2019-08-21 10:59:34 -04:00
Lawrence Forman
1698519a6a @0x/contracts-exchange: Overridden functions in ReentrancyTester now return sane values. 2019-08-21 10:59:34 -04:00
Lawrence Forman
d8372f73bc @0x/contracts-exchange-libs: Add new revert types and use abi.decode() instead of LibBytes. 2019-08-21 10:59:34 -04:00
Lawrence Forman
fb6e8a4608 @0x/order-utils: Add takerAssetFillAmount field to IncompleteFillError type.
`@0x/order-utils`: Add `IncompleteMarketSellError` and `IncompleteMarketBuyError` `RevertError` types.
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
Michael Zhu
66f175b659 post-rebase fix 2019-08-20 17:41:26 -07:00
Michael Zhu
755ef35955 prettier 2019-08-20 17:24:59 -07:00
Michael Zhu
b5d6156ffa use mocha extensions 2019-08-20 17:24:59 -07:00
Michael Zhu
8dd8cf8673 might as well change ethValueAdjustment to number too 2019-08-20 17:24:59 -07:00
Michael Zhu
9e46099ced change fractionalNumberOfOrdersToFill to number 2019-08-20 17:24:59 -07:00
Michael Zhu
9f4fe259f9 update some RichErrors and @return directives per comments 2019-08-20 17:24:59 -07:00
Michael Zhu
3c169388e2 refactor + address comments on forwarder mixins 2019-08-20 17:24:59 -07:00
Michael Zhu
b9e75769a3 add tests for partially filled, unfillable orders 2019-08-20 17:24:59 -07:00
Michael Zhu
17a9edd8c3 check order statuses 2019-08-20 17:24:59 -07:00
Michael Zhu
090b83a237 tests for invalid fee assets 2019-08-20 17:24:59 -07:00
Michael Zhu
7796c88be3 add forwarder back to contractsPackages 2019-08-20 17:24:59 -07:00
Michael Zhu
e5ee794895 slipped through from a previous commit 2019-08-20 17:24:59 -07:00
Michael Zhu
2b572cc28f fix lint 2019-08-20 17:24:59 -07:00
Michael Zhu
88544ae0ef fix dependencies 2019-08-20 17:24:59 -07:00
Michael Zhu
146d56be84 use new lib function names 2019-08-20 17:24:59 -07:00
Michael Zhu
1934dddcbe use different maker/taker amounts in tests 2019-08-20 17:24:59 -07:00
Michael Zhu
f1c51bd0db refactor + revert when takerFeeAssetData is neither WETH nor makerAssetData 2019-08-20 17:24:59 -07:00
Michael Zhu
d91fc59a28 change marketSell/marketBuy to return relevant amounts, change marketBuy so that makerAssetBuyAmount == makerAssetAcquiredAmount 2019-08-20 17:24:59 -07:00
Michael Zhu
f8025feda2 update tests to use RevertErrors 2019-08-20 17:24:58 -07:00
Michael Zhu
c9f0c46017 forwarder rich errors second pass 2019-08-20 17:24:58 -07:00
Michael Zhu
5879aeac52 forwarder rich errors first pass 2019-08-20 17:24:58 -07:00
Michael Zhu
c73ae579d3 rebase + fix CI 2019-08-20 17:23:55 -07:00
Michael Zhu
3da55ad836 lint 2019-08-20 17:23:55 -07:00
Michael Zhu
26bfcccedc use ForwarderTestFactory for most forwarder tests + some comments in forwarder_test_factory 2019-08-20 17:23:55 -07:00
Michael Zhu
af6243afb0 handle reverts and ERC721 in ForwarderTestFactory + refactoring 2019-08-20 17:23:55 -07:00
Michael Zhu
673a341626 make approveMakerAssetProxy an external function and update comments 2019-08-20 17:23:55 -07:00
Michael Zhu
a1aee7111a minor fixes 2019-08-20 17:23:55 -07:00
Michael Zhu
688209e272 refactoring and marketBuyTestAsync 2019-08-20 17:23:55 -07:00
Michael Zhu
116945047b forwarder test factory first pass (supports orders with no fees and percentage fees) 2019-08-20 17:23:55 -07:00
Michael Zhu
1b8a9e16e2 slightly restructure contracts to fix bug in the WETH-fee case 2019-08-20 17:23:55 -07:00
Michael Zhu
7ff7e9d2e7 Tests for orders without fees, orders with percentage-based fees (no forwarder fees) 2019-08-20 17:23:55 -07:00
Michael Zhu
15c0d622c9 Update function definitions, require that makerAsset is the same across orders, approve proxy to transfer makerAsset (for percentage-based fees) 2019-08-20 17:23:55 -07:00
Michael Zhu
25087f3c92 Remove fee abstraction from Forwarder contracts (first pass) 2019-08-20 17:23:55 -07:00
Michael Zhu
34be9830af fix imports and inheritance, update tests for forwarder 2019-08-20 17:23:55 -07:00
Amir Bandeali
0fad6a6ec1 Merge pull request #2076 from 0xProject/feat/3.0/truffle-config
Add truffle config file, update copyright dates
2019-08-20 15:12:26 -07:00
Amir Bandeali
02599c0df8 Add truffle artifacts to prettierignore 2019-08-20 14:30:29 -07:00
Amir Bandeali
430d068d78 Add truffle compile to build in CI 2019-08-20 12:57:31 -07:00
Amir Bandeali
f09cadb7b3 Add truffle compile option to contract packages 2019-08-20 12:49:33 -07:00
Amir Bandeali
c366a4bd83 Update copyright dates 2019-08-20 12:49:01 -07:00
Alex Towle
22c8a25a26 Merge branch 'development' into 3.0 2019-08-19 11:13:21 -07:00
F. Eugene Aumson
0ae2d8bab5 sra_client.py: don't test against Python 2.7 (#2071) 2019-08-16 13:32:59 -04:00
F. Eugene Aumson
3e0bd1f02d Run CI in an environment that includes Python, and test generated code (#2072)
* CI: use a docker image that includes Python

So that tests of abi-gen generating Python can exercise the code being
generated.

* CI fix: disable old yarn permission denied hack

Motivated by CI failure of previous commit.

* CI fix: more resources for test-contracts-ganache

Motivated by CI failure of previous commit.

* CI fix: remove hack of permissions for python libs

Fix for previous CI run's failure of test-python.  Apparently we don't
need this in the docker container we've switched to.

* abi-gen/Py: minimum viable test of gen'd code

Ensure the code is parseable by running it through black.

* abi-gen/Py: expand Python linter usage

Make abi-gen filter its output through black, if its available in the
runtime environment.  Accordingly, stop having contract_wrappers.py's
setup.py pre_install run black on copied-over files.

Adds Pylint to the list of linters run against test-cli/output.

* abi-gen: re-enable Solidity linter

It was broken, running seemingly cleanly but not actually reading any
files, because it was targetting the wrong folder.

* abi-gen/test-cli/fixtures/sol: fix linter errors

* abi-gen/test-cli: disable pylint blackisted-name

* abi-gen/Py: rm unused var in contracts w/o methods

Remove unused variable from generated wrapper for contracts without any
methods.
2019-08-16 13:32:31 -04:00
Amir Bandeali
4c78b7d4bb Merge pull request #2055 from 0xProject/feat/3.0/optimizeConstants
Refactor library usage
2019-08-16 07:40:54 -07:00
Fabio B
35fcfb978d Merge pull request #2054 from Arctek/fix/metamask-subprovider-hw
subproviders: Change MetamaskSubprovider eth_sign to personal_sign
2019-08-16 12:08:10 +02:00
Fabio B
c68083cf03 Remove timestamp from latest entry 2019-08-16 12:07:45 +02:00
Amir Bandeali
8402d211bf Update CHANGELOGs 2019-08-15 16:51:50 -07:00
Amir Bandeali
cc3be9448a Move MatchedFillResults constants closer to tests where they are utilized 2019-08-15 16:51:40 -07:00
fabioberger
cfb5119efc Update abi-gen-wrappers 2019-08-16 00:51:00 +02:00
Amir Bandeali
7ac30c5153 Merge branch '3.0' into feat/3.0/optimizeConstants 2019-08-15 15:20:48 -07:00
F. Eugene Aumson
5d53fa5635 contract_wrappers.py: bump version after publish (#2064) 2019-08-15 16:34:31 -04:00
Xianny
38d2b70ba6 Update contract-wrappers everywhere (#2068)
* add validateAndSendTransactionAsync to all wrappers

* remove contract-wrappers from @0x/contracts-extensions

* replace error types in contract-wrappers

* upgrade asset-buyer and asset-swapper to contract-wrappers v11

* update website and 0x.js

* remove calldataOptimizationUtils
2019-08-15 10:53:33 -07:00
Xianny
29d5db16c2 copy artifacts should not use python path anymore (#2070) 2019-08-15 09:50:11 -07:00
Greg Hysz
64bc99101c Merge pull request #2059 from 0xProject/feature/contracts/3.0/fillOrderAssertionWrapper
Fill Order Assertion Wrapper
2019-08-15 00:12:40 +02:00
Greg Hysen
09b5018e65 Readability improvements 2019-08-14 23:45:07 +02:00
Xianny
a8128c5772 Remove order-watcher (#2067)
* remove order-watcher
2019-08-14 14:34:59 -07:00
Amir Bandeali
1dae1d244c Rename hashing functions in LibOrder and LibZeroExTransaction 2019-08-14 13:38:12 -07:00
Amir Bandeali
2da996f493 Hard code chainId in tests 2019-08-14 11:07:28 -07:00
Amir Bandeali
c5d4559300 Remove generate-exchange-selectors script 2019-08-14 11:07:22 -07:00
James Towle
434d027133 Merge pull request #2043 from jalextowle/feature/contracts/3.0/order-matching-unit-tests
MatchOrders Unit Tests
2019-08-14 11:06:52 -07:00
James Towle
f66212ce23 Merge pull request #2051 from jalextowle/feature/3.0/exchange-libs/unit-tests
`@0x:contracts-exchange-libs` Added unit tests to exchange-libs
2019-08-14 10:52:10 -07:00
Alex Towle
6b4e632101 @0x:contracts-exchange Refactored internal.ts so that it is more readable 2019-08-14 10:39:36 -07:00
Joshua Richardson
53a08d00fd Merge branch 'development' of https://github.com/0xProject/0x-monorepo into fix/metamask-subprovider-hw 2019-08-14 12:29:44 +09:30
Joshua Richardson
fccec66463 Removed unrequired ethUtil import 2019-08-14 12:14:30 +09:30
Jacob Evans
bc26e807cd Merge pull request #2060 from 0xProject/feature/dev-utils-contract-wrappers
Added DevUtils Wrappers and migrations
2019-08-14 12:27:25 +10:00
Joshua Richardson
46dc37fb20 Update CHANGELOG.json 2019-08-14 11:40:02 +09:30
Jacob Evans
ccbb8400ee Merge branch 'development' into feature/dev-utils-contract-wrappers 2019-08-14 11:42:18 +10:00
Jacob Evans
5d3d8a5332 Merge pull request #2061 from 0xProject/feature/python/dev-utils-contract-wrapper
Add Python wrapper for DevUtils contract
2019-08-14 11:41:13 +10:00
Alex Towle
0134b2874b @0x:contracts-exchange Addressed remaining review comments 2019-08-13 17:05:38 -07:00
Alex Towle
e2308aabed @0x:contracts-exchange Reduced the code size of internal.ts 2019-08-13 17:04:42 -07:00
Alex Towle
36fac3532c Removed unused reference functions 2019-08-13 17:04:42 -07:00
Alex Towle
327c6e8ac2 Completed the calculateMatchedFillResultsWithMaximalFill tests 2019-08-13 17:04:25 -07:00
Alex Towle
e9d49d96a6 Changed the testing style to be more assertion based rather than reference based to leverage the fixtures from the integration tests 2019-08-13 17:04:25 -07:00
Alex Towle
929bb86a54 Wrote some test cases for assertValidMatch 2019-08-13 17:04:25 -07:00
Alex Towle
f58e28d1be Implemented reference functions and added tests for _calculateCompleteRightFill 2019-08-13 17:04:25 -07:00
Alex Towle
cdabe21e7a Fixed the tests by using the IsolatedExchange 2019-08-13 17:04:25 -07:00
Alex Towle
a7520eeaa8 Wrote some initial test cases for the matchOrders calculate functions 2019-08-13 17:02:00 -07:00
Amir Bandeali
070147db52 Fix build errors 2019-08-13 16:43:55 -07:00
Amir Bandeali
55436510b6 Regenerate boilerplate for exchange-libs package 2019-08-13 16:20:35 -07:00
Amir Bandeali
1aec5e455d Remove coordinator from CI tests 2019-08-13 16:20:35 -07:00
Amir Bandeali
dc31294440 Move LibExchangeRichErrors to exchange-libs package 2019-08-13 16:20:35 -07:00
Amir Bandeali
d3b8070fd6 Fix TestValidatorWallet by using new LibOrder and LibZeroExTransaction hashing 2019-08-13 16:19:48 -07:00
Amir Bandeali
26e4d66163 Remove unimplemented functions from interface 2019-08-13 16:19:48 -07:00
Amir Bandeali
7cfceebeb8 Remove unused ABIEncoderV2 pragma 2019-08-13 16:19:48 -07:00
Amir Bandeali
0e2616f16b Rename _rrevert to rrevert 2019-08-13 16:19:48 -07:00
Amir Bandeali
ccce7e001e Compile all contracts by default, regenerate boilerplate 2019-08-13 16:19:48 -07:00
Amir Bandeali
e91ba07f14 Do not overwrite all contracts identifier in compiler.json 2019-08-13 16:11:57 -07:00
Amir Bandeali
fb7b51d91b Get contracts list from Compiler class to add support for reading all contracts by default 2019-08-13 16:11:57 -07:00
Amir Bandeali
88d055c3db Make function public method of Compiler class 2019-08-13 16:11:57 -07:00
Amir Bandeali
3afce213c0 Add rrevert to safeDiv in LibSafeMath 2019-08-13 16:11:57 -07:00
Amir Bandeali
45f229c531 Move LibEIP712ExchangeDomain tests to own file 2019-08-13 16:11:57 -07:00
Amir Bandeali
d6772b4a0a Fix linting errors 2019-08-13 16:11:57 -07:00
Amir Bandeali
5016d50c2b Move calculateFillResults tests to exchange-libs package 2019-08-13 16:11:09 -07:00
Amir Bandeali
24eaf93db8 Move all exchange-libs tests to separate files 2019-08-13 16:11:09 -07:00
Amir Bandeali
2e519b534d Fix build in OrderValidationUtils 2019-08-13 16:11:09 -07:00
Amir Bandeali
31c2b36039 Fix build errors in exchange package contracts 2019-08-13 16:11:09 -07:00
Amir Bandeali
245956c658 Create test contracts for each exchange lib 2019-08-13 16:11:09 -07:00
Amir Bandeali
0df360c5e8 Fix compile errors 2019-08-13 16:11:09 -07:00
Amir Bandeali
9b786df828 Update test contracts 2019-08-13 16:11:09 -07:00
Amir Bandeali
ae859fa01e Update Exchange contract to use libraries 2019-08-13 16:11:09 -07:00
Amir Bandeali
7eb64eb3dc Update test contracts 2019-08-13 16:09:48 -07:00
Amir Bandeali
f45014f75b Convert LibOrder and LibZeroExTransaction to libraries 2019-08-13 16:09:48 -07:00
Amir Bandeali
74a5c8c23c Simplify LibEIP712ExchangeDomain to be used only for generating domain hash 2019-08-13 16:09:48 -07:00
Amir Bandeali
28e781db15 Convert LibFillResults to library 2019-08-13 16:09:48 -07:00
Amir Bandeali
6ca9d4ee78 Convert LibMath to library 2019-08-13 16:09:48 -07:00
Amir Bandeali
52dcd998c4 Add library implementation of SafeMath 2019-08-13 16:09:48 -07:00
Amir Bandeali
a8cd168345 Cleanup imports 2019-08-13 16:09:48 -07:00
Amir Bandeali
b05a2a90d0 Move FillResults calculations into LibFillResults 2019-08-13 16:09:48 -07:00
Amir Bandeali
242715240b Do not inherit libs 2019-08-13 16:07:07 -07:00
Amir Bandeali
65f17fd76e Make LibEIP712 a library 2019-08-13 16:04:33 -07:00
Amir Bandeali
58ee4447a1 Remove remaining hard coded selectors 2019-08-13 16:04:33 -07:00
Amir Bandeali
d153ac0951 Make remaining functions public 2019-08-13 16:04:33 -07:00
Amir Bandeali
2e97cfa5e5 Remove LibAssetProxyIds and TestLibConstants 2019-08-13 16:04:33 -07:00
Amir Bandeali
7d5276ad11 Remove LibExchangeSelectors.sol 2019-08-13 16:04:33 -07:00
Amir Bandeali
2251e5e418 Optimize LibEIP712 2019-08-13 16:00:19 -07:00
Alex Towle
e4257fb6c7 Addressed review comments and prettified code 2019-08-13 11:06:41 -07:00
Lawrence Forman
f22b03fdb5 Merge pull request #2042 from 0xProject/feature/3.0/exchange/wrapper-tests
Wrapper/Reentrancy unit tests, etc.
2019-08-13 13:55:29 -04:00
F. Eugene Aumson
e045f5f74b contract_wrappers.py: include DevUtils in docs 2019-08-13 12:16:20 -04:00
F. Eugene Aumson
e5c07ff0c5 abi-gen/Py: fix hanging indent for return val doc
The update to the fixture contract's artifact added a bunch of
`internalType` stuff.  I'm not sure where that came from.  Maybe
newly generated by the latest version of solc?
2019-08-13 12:16:20 -04:00
Greg Hysen
dd4541c825 Fill Order Assertion Wrapper 2019-08-13 17:51:40 +02:00
F. Eugene Aumson
cdf0aa27e4 contract_wrappers.py: Merge CHANGELOG from dev
Merge CHANGELOG updates from the development branch, in order to avoid
merge conflicts.
2019-08-13 09:32:31 -04:00
F. Eugene Aumson
88998e6bb7 contract_wrappers.py: add DevUtils wrapper 2019-08-13 09:28:03 -04:00
F. Eugene Aumson
b885dfa606 Fixes for broken tox runs (#2053)
* order_utils.py: git rm package.json

This was used at one time, a long, long time ago, but is no longer used,
and its presence actually causes problems when trying to do, eg
`PKG=@0x/python-contract-wrappers yarn build` from within the
order_utils directory.

* order_utils.py: improve `./setup.py clean`

* python-packages: in tox, test, don't lint

* python-packages: update dev req's to fix tox runs

* contract_wrappers.py: post-publish version bump
2019-08-13 09:18:16 -04:00
Jacob Evans
407495c278 Update packages/migrations/CHANGELOG.json
Co-Authored-By: Fabio B <me@fabioberger.com>
2019-08-13 21:56:07 +10:00
Jacob Evans
ea50a94355 Update Mainnet 2019-08-13 21:40:38 +10:00
Jacob Evans
cb3318972e Merge pull request #2044 from 0xProject/fix/sol-compiler-bin-publish
Remove solc-bin from npm publish
2019-08-13 21:16:32 +10:00
Jacob Evans
c057ad7977 Update CHANGELOG 2019-08-13 14:46:53 +10:00
Jacob Evans
eb21718462 Added DevUtils Wrappers 2019-08-13 14:44:53 +10:00
Lawrence Forman
98f77394ed @0x/contracts-dev-utils: Update OrderValidationUtils for new isValidOrderSignature() semantics. 2019-08-12 19:18:57 -04:00
Lawrence Forman
fc18db10be @0x/contracts-exchange: Add tests for when callback signature types return incorrect data. 2019-08-12 19:10:24 -04:00
Lawrence Forman
9382e2e8c7 @0x/contracts-exchange: Fix bad resultData assertion in fillOrderNoThrow(). 2019-08-12 18:53:40 -04:00
Lawrence Forman
a3b2dbf8e2 @0x/contracts-exchange: Remove redundant new bytes(0) in ReentrancyTester.sol. 2019-08-12 18:32:05 -04:00
Lawrence Forman
6df190edbb @0x/contracts-exchange: Light changes to address PR comments. 2019-08-12 18:20:50 -04:00
Lawrence Forman
5b0b8a9717 @0x/contracts-exchange: Remove explicit signerAddress parameter from many MixinSignatureValidator functions. 2019-08-12 18:10:57 -04:00
Lawrence Forman
a8ddbe4127 @0x/contracts-exchange: Update IWallet for new legacy wallet spec. 2019-08-12 17:30:24 -04:00
James Towle
6e1fdda182 Update contracts/exchange-libs/test/lib_zero_ex_transaction.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-08-12 11:06:01 -07:00
Francesco Agosti
7836e10d8a Merge pull request #2052 from 0xProject/feature/website/adding-oskar
Added Oskar to team page
2019-08-12 10:15:19 -07:00
Francesco Agosti
946a31821d Merge pull request #2050 from 0xProject/feature/website/privacy-policy
Privacy Policy and Terms of Service pages
2019-08-12 10:10:55 -07:00
xianny
92a915f477 fix dependency version check 2019-08-12 09:27:51 -07:00
Jacob Evans
60b458dbfb Merge pull request #2045 from 0xProject/feature/i-voted-tokens
I Voted Tokens
2019-08-12 17:24:07 +10:00
Joshua Richardson
8b13efc89a Fix for MetamaskSubprovider to use personal_sign over manually prefixing eth_sign, so proxied hardware wallets work (Ledger/Trezor). 2019-08-11 02:32:09 +09:30
Lawrence Forman
ca33090793 @0x/contracts-exchange: Add comments to LEGACY_WALLET_MAGIC_VALUE constant in TestValidatorWallet.sol.
`@0x/contracts-exchange`: Remove references to `LibExchangeSelectors` in the Exchange.
2019-08-09 22:15:33 -04:00
Lawrence Forman
e34b390c18 @0x/contracts-exchange-libs: Fix CHANGELOG rebase issues. 2019-08-09 22:15:33 -04:00
Lawrence Forman
370df0d495 @0x/contracts-dev-utils: Prettier.
`@0x/contracts-exchange`: Update reentrancy tests.
`@0x/contracts-exchange`: Add all mutator functions to
`ExchangeFunctions` type.
`@0x/contracts-tes-utils`: Remove unused import.
2019-08-09 22:15:33 -04:00
Lawrence Forman
d4e300d0a4 @0x/contracts-dev-util: Remove references to marketXOrdersNoThrow.
`@0x/contracts-exchange`: Remove references to `marketXOrdersNoThrow`.
2019-08-09 22:15:33 -04:00
Lawrence Forman
c83864af9c @0x/contracts-exchange: Fix broken tests.
`@0x/contracts-test-utils`: Remove unecessary wait timeout in
`LogDecoder`.
2019-08-09 22:15:33 -04:00
Lawrence Forman
14fe3045dc @0x/contracts-exchange-libs: Update CHANGELOG. 2019-08-09 22:15:33 -04:00
Lawrence Forman
5d54e6c951 @0x/contracts-dev-utils: Remove references to 'NoThrow' variants of
`MarketXOrders' functions.
2019-08-09 22:15:33 -04:00
Lawrence Forman
921e78c9e2 Update changelogs 2019-08-09 22:15:33 -04:00
Lawrence Forman
b1778825cb @0x/contracts-exchange: Remove ReentrantERC20Token from compiler
config.
2019-08-09 22:15:33 -04:00
Lawrence Forman
cc8d5ac93a Update changelogs. 2019-08-09 22:15:33 -04:00
Lawrence Forman
1d0dce7366 @0x/contracts-coordinator: Update for marketXOrders name change.
`@0x/contracts-coordinator`: Add `MixinCoordinatorApprovalVerifier.sol` to `.solhintignore` because of `abi.decode` issues.
2019-08-09 22:15:33 -04:00
Lawrence Forman
ae454b0892 @0x/contracts-exchange-libs: Regenerate selectors. 2019-08-09 22:15:33 -04:00
Lawrence Forman
a2234b745c @0x/contracts-exchange: Create semi-automated reentrancy testing.
`@0x/contracts-exchange`: Remove old reentrancy tests.
`@0x/contracts-exchange`: Remove `ReentrantERC20Token` contract.
2019-08-09 22:15:33 -04:00
Lawrence Forman
3dd8dac146 @0x/contracts-exchange: Update Wallet signature type behavior to match v2.1.
`@0x/contracts-exchange`: Add EOA tests to `signature_validator`.
2019-08-09 22:15:33 -04:00
Lawrence Forman
6752fc9fe5 @0x/order-utils: Add ExchangeRevertErrors.SignatureErrorCode.InvalidSigner. 2019-08-09 22:15:33 -04:00
Lawrence Forman
0d05411cd2 @0x/contracts-exchange: Update CHANGELOG, lint, prettify. 2019-08-09 22:15:33 -04:00
Lawrence Forman
7ce65e3cfe @0x/contracts-exchange: Wrap up tests in wrapper_unit_tests. 2019-08-09 22:15:33 -04:00
Lawrence Forman
ea1501abd1 @0x/contracts-exchange: Change how order hashes and signatures are computed for wrapper_unit_tests. 2019-08-09 22:15:33 -04:00
Lawrence Forman
ca28b8f93e @0x/contracts-exchange: Make marketBuy/SellNoThrow the default.
`@0x/contracts-exchange`: Add more `wrapper_unit_tests` tests.
2019-08-09 22:15:33 -04:00
Lawrence Forman
566e74310a @0x/contracts-exchange: Remove assembly from fillOrderNoThrow(). 2019-08-09 22:15:33 -04:00
Lawrence Forman
c18e8ba242 @0x/contracts-exchange: Add more tests to wrapper_unit_tests. 2019-08-09 22:15:33 -04:00
Lawrence Forman
1f3f0dce11 @0x/contracts-exchange: Add fillOrderNoThrow tests to wrapper_unit_tests. 2019-08-09 22:15:33 -04:00
Lawrence Forman
b73008d83d @0x/contracts-exchange: Fix fillOrKillOrder() tests in wrapper_unit_tests. 2019-08-09 22:15:33 -04:00
Lawrence Forman
10a8291391 @0x/contracts-exchange: Add more tests to wrapper_unit_tests. 2019-08-09 22:15:33 -04:00
Lawrence Forman
ab094ab174 @0x/contracts-exchange: Add more tests to wrapper_unit_tests. 2019-08-09 22:15:33 -04:00
Lawrence Forman
29a82f8471 @0x/contracts: Create TestWrapperFunctions contract. 2019-08-09 22:15:33 -04:00
Lawrence Forman
8adfa52ae3 Merge branch 'feature/3.0/exchange/fill-order-unit-tests' into 3.0 2019-08-09 22:06:32 -04:00
Lawrence Forman
18485dd456 @0x/contracts-exchange-libs: Add complementary tests when rounding up and down behavior with isRoundingErrorFloor() and isRoundingerrorCeil(). 2019-08-09 21:07:23 -04:00
Alex Towle
c318b849fe @0x:contracts-exchange-libs Added unit tests to exchange-libs 2019-08-09 17:28:36 -07:00
Chris Kalani
88b625fa15 Added Oskar to team page 2019-08-09 17:28:12 -07:00
Chris Kalani
2cf9c9b7df Added Terms of Service page and footer links 2019-08-09 16:52:09 -07:00
Chris Kalani
d179d6a1a2 Added Privacy Policy Page 2019-08-09 16:17:10 -07:00
F. Eugene Aumson
08502c1eb6 Pre-publish version updates (#2049)
* json_schemas.py: make changelog be rev. chrono.

Change CHANGELOG.md from chronological to reverse chronological.

* json_schemas.py: fix version numbers

It looks like the version number was changed in the past, but the new
version was never published, so corrected that.  Will publish after this
merges into development.

* order_utils.py: pre-publish version bump
2019-08-09 19:15:57 -04:00
F. Eugene Aumson
384cd47416 order_utils.py: mk deprecated a REAL dependency (#2048) 2019-08-09 16:31:51 -04:00
Fabio B
250c46d6a4 Merge pull request #2046 from 0xProject/feature/python/publish-gend-wrappers-and-web3-v5
Pre-publish updates
2019-08-08 23:17:15 +02:00
xianny
f394d7dba9 Publish
- @0x/contracts-asset-proxy@2.2.5
 - @0x/contracts-coordinator@2.0.10
 - @0x/contracts-dev-utils@0.0.7
 - @0x/contracts-erc1155@1.1.12
 - @0x/contracts-erc20@2.2.11
 - @0x/contracts-erc721@2.1.12
 - @0x/contracts-exchange-forwarder@3.0.9
 - @0x/contracts-exchange-libs@3.0.5
 - @0x/contracts-exchange@2.1.11
 - @0x/contracts-extensions@4.0.5
 - @0x/contracts-multisig@3.1.11
 - @0x/contracts-test-utils@3.1.13
 - @0x/contracts-utils@3.2.1
 - 0x.js@6.0.15
 - @0x/abi-gen-templates@2.4.1
 - @0x/abi-gen-wrappers@5.2.0
 - @0x/abi-gen@4.1.0
 - @0x/assert@2.1.3
 - @0x/asset-buyer@6.1.11
 - @0x/asset-swapper@1.0.1
 - @0x/base-contract@5.3.1
 - @0x/connect@5.0.16
 - @0x/contract-addresses@3.0.3
 - @0x/contract-artifacts@2.0.4
 - @0x/contract-wrappers@11.0.0
 - @0x/contracts-gen@1.0.13
 - @0x/dev-utils@2.3.0
 - @0x/fill-scenarios@3.0.16
 - @0x/instant@1.0.28
 - @0x/json-schemas@3.1.13
 - @0x/migrations@4.2.0
 - @0x/monorepo-scripts@1.0.34
 - @0x/order-utils@8.2.5
 - @0x/order-watcher@4.0.17
 - @0x/python-contract-wrappers@1.0.3
 - @0x/sol-compiler@3.1.12
 - @0x/sol-coverage@3.0.9
 - @0x/sol-doc@2.0.16
 - @0x/sol-profiler@3.1.11
 - @0x/sol-trace@2.0.17
 - @0x/sol-tracing-utils@6.0.16
 - @0x/sra-spec@2.0.14
 - @0x/subproviders@5.0.1
 - @0x/testnet-faucets@1.0.84
 - @0x/utils@4.5.0
 - @0x/web3-wrapper@6.0.10
 - @0x/website@0.0.87
2019-08-08 13:58:46 -07:00
xianny
ca595cd8cf Updated CHANGELOGS 2019-08-08 13:58:30 -07:00
F. Eugene Aumson
9ce71739f5 README.md: add 0x-contract-wrappers.py 2019-08-08 16:41:13 -04:00
F. Eugene Aumson
d69da38f7d python-packages: bump version numbers for publish 2019-08-08 16:22:42 -04:00
F. Eugene Aumson
50f69f734f contract_wrappers.py: fix ./setup.py clean 2019-08-08 16:20:24 -04:00
F. Eugene Aumson
fc9c6c5434 contract_addresses.py: update CHANGELOG 2019-08-08 16:19:37 -04:00
F. Eugene Aumson
6e941be1e9 make CHANGELOG be REVERSE chronological 2019-08-08 16:18:32 -04:00
F. Eugene Aumson
9f677150a4 python-packages: add convenience script 2019-08-08 16:15:41 -04:00
F. Eugene Aumson
11e273337f sra_client.py: add PyPI-required metadata 2019-08-08 16:11:37 -04:00
F. Eugene Aumson
ec807120c3 Migrate to Web3.py v5 (#2038)
* Install Py packages in dep. order, not in parallel

Install Python packages in dependency order, not in parallel.

* sra_client.py: Add `./setup.py clean`

* Fix python package dependency ordering...

...and include a script to produce the proper ordering.

* sra_client.py: reformat whitespace in doctest

* contract_wrappers.py: don't auto-import wrappers

This was discovered while minimizing CircleCI steps to dianose a problem
with running the Launch Kit Backend in CircleCI.

These classes should be imported via the
zero_ex.contract_wrappers.exchange and
zero_ex.contract_wrappers.erc20_token modules, respectively.  We
permitted importing them from just zero_ex.contract_wrappers back when
they were the only wrappers we had, but now that we have so many
different contracts being wrapped, this is just another list to keep
manually updated (which, obviously is error prone, since it slipped
through the cracks already), so it's better to just not support this
type of import.

* abi-gen/Py: doc contract method attributes

Without this, generated documentation was not including the class
members that represent the contract methods, rendering the usage
unclear.

* sra_client.py: disable tests in CI

* abi-gen/Py: strip repeated spaces from devdoc

* contract_wrappers.py: gen docs for all wrappers...

...except for the dummy tokens.

* sra_client.py/test: change launch kit docker image

Previously these teses were using 0xorg/launch-kit-ci, but that was a
one-off thing created just for CI, back before there was a regularly
maintained docker image of Launch Kit.

Changed to use 0xorg/launch-kit-backend since it's regularly
maintained/updated.

Because the -backend image is using a different Linux distribution
(Alpine), the commands used to wait for ganache startup also had to
change.

The tag used, 74bcc39, is provisional due to the pending Issue at
https://github.com/0xProject/0x-launch-kit-backend/issues/73 .  When
that issue is resolved, the tag suffix on the imag name should be
removed.

* Migrate from Web3.py 4.x to 5.x

* sra_client.py: checksum address in doctest

Due to problem with launch-kit-backend, documented at
https://github.com/0xProject/0x-launch-kit-backend/issues/73 ,
we need to checksum the makerAddress, in the order retrieved from the
relayer, before filling it, otherwise Web3.py gives this error:

InvalidAddress('Web3.py only accepts checksum addresses. The software
that gave you this non-checksum address should be considered unsafe,
please file it as a bug on their platform. Try using an ENS name
instead. Or, if you must accept lower safety, use
Web3.toChecksumAddress(lower_case_address).',
'0x5409ed021d9299bf6814279a6a1411a7e866a631')

* Update CHANGELOGs

* sra_client.py: make CHANGELOG be REVESE chrono.

Formerly CHANGELOG was in chronological order.  Now it's in reverse
chronological order.

* abi-gen/Py: fix missing space in sanitized devdoc
2019-08-08 14:53:59 -04:00
xianny
a5654debeb pin contract-wrappers to earlier version 2019-08-08 11:48:47 -07:00
xianny
0869c0d8b0 Revert "Updated CHANGELOGS"
This reverts commit b456c3f953.
2019-08-08 11:47:30 -07:00
xianny
b456c3f953 Updated CHANGELOGS 2019-08-08 11:41:38 -07:00
xianny
8297d68166 fix contract-wrappers version 2019-08-08 10:49:03 -07:00
xianny
18ce6797e0 Revert failed publish 2019-08-08 10:02:32 -07:00
xianny
c1009d440e Publish
- @0x/contracts-asset-proxy@2.2.5
 - @0x/contracts-coordinator@2.0.10
 - @0x/contracts-dev-utils@0.0.7
 - @0x/contracts-erc1155@1.1.12
 - @0x/contracts-erc20@2.2.11
 - @0x/contracts-erc721@2.1.12
 - @0x/contracts-exchange-forwarder@3.0.9
 - @0x/contracts-exchange-libs@3.0.5
 - @0x/contracts-exchange@2.1.11
 - @0x/contracts-extensions@4.0.5
 - @0x/contracts-multisig@3.1.11
 - @0x/contracts-test-utils@3.1.13
 - @0x/contracts-utils@3.2.1
 - 0x.js@6.0.15
 - @0x/abi-gen-templates@2.4.1
 - @0x/abi-gen-wrappers@5.2.0
 - @0x/abi-gen@4.1.0
 - @0x/assert@2.1.3
 - @0x/asset-buyer@6.1.11
 - @0x/asset-swapper@1.0.1
 - @0x/base-contract@5.3.1
 - @0x/connect@5.0.16
 - @0x/contract-addresses@3.0.3
 - @0x/contract-artifacts@2.0.4
 - @0x/contract-wrappers@11.0.0
 - @0x/contracts-gen@1.0.13
 - @0x/dev-utils@2.3.0
 - @0x/fill-scenarios@3.0.16
 - @0x/instant@1.0.28
 - @0x/json-schemas@3.1.13
 - @0x/migrations@4.2.0
 - @0x/monorepo-scripts@1.0.34
 - @0x/order-utils@8.2.5
 - @0x/order-watcher@4.0.17
 - @0x/python-contract-wrappers@1.0.3
 - @0x/sol-compiler@3.1.12
 - @0x/sol-coverage@3.0.9
 - @0x/sol-doc@2.0.16
 - @0x/sol-profiler@3.1.11
 - @0x/sol-trace@2.0.17
 - @0x/sol-tracing-utils@6.0.16
 - @0x/sra-spec@2.0.14
 - @0x/subproviders@5.0.1
 - @0x/testnet-faucets@1.0.84
 - @0x/utils@4.5.0
 - @0x/web3-wrapper@6.0.10
 - @0x/website@0.0.87
2019-08-08 09:29:23 -07:00
xianny
89ee6fe6db Updated CHANGELOGS 2019-08-08 09:29:08 -07:00
Lawrence Forman
e3aa76cd09 @0x/contracts-exchange: Light refactoring in
`isolated_fill_order.ts` and `isolated_exchange_wrapper.ts`.
2019-08-08 11:43:55 -04:00
Lawrence Forman
de897d2ebf @0x/contracts-test-utils: Refactor LogDecoder slightly. 2019-08-08 11:43:20 -04:00
Lawrence Forman
08118ec36f @0x/contracts-exchange-libs: Fix coverage hooks.
`@0x/contracts-exchange-libs`: Add explicit tests for
`*getPartialAmount*()` for rounding modes.
2019-08-08 11:41:51 -04:00
Fabio Berger
38a12475bc Update yarn.lock 2019-08-08 08:12:12 -07:00
Fabio Berger
9a800264a2 Update Lerna and fix private package issue 2019-08-08 08:04:58 -07:00
Xianny
8ce390be3c switch @0x/contract-wrappers to generated wrappers (#2037)
* switch @0x/contract-wrappers to generated wrappers

- remove TransactionEncoder
- move TokenUtils to @0x/dev-utils
- detailed changes in #2040
2019-08-08 07:29:30 -07:00
Jacob Evans
cc93532f4f Add Images for I Voted tokens 2019-08-08 14:32:26 +10:00
Jacob Evans
37cc40521c Remove solc-bin from npm publish 2019-08-08 11:51:22 +10:00
F. Eugene Aumson
5ac7ff7084 Generate wrappers for all contracts (#2010)
* abi-gen/Py: fix return type for multi-val returns

Methods that return multiple values were broken in two ways.  One: a
spurious newline was being injected between the return type and the
colon ending the Python method prototype.  Two: the return type was
being generated as just `[TypeA, TypeB]`, whereas it should be
`Tuple[TypeA, TypeB]`.

* abi-gen/Py: fix support for arrays of structs

* abi-gen/Py: FAILING test case nested unrefd struct

When a struct contains another struct, and the inner struct is not
directly referenced by any method interface, wrapper generation is
failing to render a class to represent the inner struct.

This won't fail in CI because at this time CI doesn't run any native
Python tooling to analyze the generated code.  Running mypy locally on
the files in this commit produces the following output:

test-cli/output/python/abi_gen_dummy/__init__.py:76: error: Name 'Tuple0x246f9407' is not defined

This problem affects the generation of wrappers for the DutchAuction
contract.

* abi-gen/Py: fix nested unref'd struct failure

* abi-gen/Py: introduce newlines to quiet linter

When generating contracts with long names (eg
CoordinatorRegistryValidator), the `black` reformatter was introducing
these newlines for us, and it was moving the `# type: ignore` comment in
there such that it no longer was on the line it needed to be on.
Introducing these newlines manually (instead of letting black inject
them) allows the linter directive to stay where it needs to be.

* abi-gen/Py: declare tuples in dependency order

* abi-gen/Py: fix support for overloaded methods

* contract_wrappers.py: pylint: permit 2-char args

By default pylint says that 2 characters is too short for an argument
name, but we have some contract methods with 2-character argument names
(eg `to` in `AssetProxyOwner.getTransactionIds()`), so we want to permit
them.

* contract_wrappers.py: include all contracts

* Update CHANGELOGs

* abi-gen: rename variable

* abi-gen: refine comments

* abi-gen/Py: reword tuple class docstring
2019-08-07 12:44:16 -04:00
Jacob Evans
e682b82ca8 Merge pull request #2021 from 0xProject/feat/1155-staticCall-proxies
1155 static call proxies
2019-08-07 09:34:25 +10:00
Amir Bandeali
f757a9de52 Add devdoc comments to IAssetData 2019-08-06 15:51:59 -07:00
Xianny
7cd1fd0aaa Add devdocs to generated contract wrappers (#2013)
* first pass at including doc comments

* incorporate suggestions for method comments; add devdoc to dummy contract

* better formatting and persist generated docs as circleci build artifacts

* store artifacts properly

* hanging indent for method params
2019-08-06 14:24:08 -07:00
Lawrence Forman
6d502b6898 @0x/contracts-exchange: Use TransactionHelper to call and execute
contract functions.
2019-08-06 15:31:30 -04:00
Lawrence Forman
0eff19f0ff @0x/contracts-test-utils: Add TransactionHelper class.
`@0x/contracts-test-utils`: Add `decodeReceiptLogs()` to `LogDecoder`
class.
2019-08-06 15:31:30 -04:00
Lawrence Forman
b6dfc791d4 @0x/contracts-exchange: Correct test case name. 2019-08-06 15:31:30 -04:00
Lawrence Forman
7002dc63bd @0x/contracts-exchange: Fix typos in comments. 2019-08-06 15:31:30 -04:00
Lawrence Forman
7eedfc201a @0x/contracts-utils: Add testing against reference functions in SafeMath unit tests. 2019-08-06 15:31:30 -04:00
Lawrence Forman
ac38390241 @0x/contracts-utils: Fix failing test due to rebase. 2019-08-06 15:31:30 -04:00
Lawrence Forman
3156f602dd Fix rebase errors 2019-08-06 15:31:30 -04:00
Lawrence Forman
ad25942731 @0x/dev-utils: Appease the linter gods. 2019-08-06 15:31:30 -04:00
Lawrence Forman
fddbfc2d32 Update CHANGELOGs 2019-08-06 15:31:30 -04:00
Lawrence Forman
8c9bdadf66 @0x/contracts-utils: Add unit tests for ReferenceFunctions. 2019-08-06 15:30:59 -04:00
Lawrence Forman
6345faa4a9 `@0x/contracts-exchange-libs: Appease the linter and prettier gods. 2019-08-06 15:30:59 -04:00
Lawrence Forman
4711ce5532 @0x/contracts-exchange: Remove _assertValidFill().
`@0x/contracts-exchange`: Add `_settleOrder()` unit tests.
`@0x/contracts-exchange`: Add explicit tests for
`_calculateFillResults()`.
`@0x/contracts-exchange`: Add overflow tests to `isolated_fill_order`
tests.
`@0x/contracts-exchange`: Add explicit `takerAssetFillAmount = 0` test
to `isolated_fill_order` tests.
2019-08-06 15:30:59 -04:00
Lawrence Forman
293510c087 @0x/contracts-exchange-libs: Add explicit tests for LibMath and LibFillResults functions.
`@0x/contracts-exchange-libs`: Add tests for `ReferenceFunctions`.
2019-08-06 15:30:59 -04:00
Lawrence Forman
a179a6892c @0x/contracts-test-utils: Add ONE_ETHER and MAX_UINT256_ROOT constants. 2019-08-06 15:30:59 -04:00
Lawrence Forman
afb310e90a @0x/contracts-exchange: Update changelog. 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
264b1d69d9 @0x/dev-utils: revertWith mocha extensions now accept Promise-like objects instead of just Promises. 2019-08-06 15:30:59 -04:00
Lawrence Forman
884b1add8e @0x/contracts-exchange-libs: Move in revamped LibFillResults tests from @0x/contracts-exchange. 2019-08-06 15:30:59 -04:00
Lawrence Forman
8c05a92a1e Update changelogs 2019-08-06 15:30:59 -04:00
Lawrence Forman
f791cd3a37 @0x/contracts-exchange-libs: Remove unecessary checks for zero
denominator.
`@0x/contracts-exchange-libs`: `LibMath` tests from `@0x/contracts-exchange` into this package.
`@0x/contracts-exchange-libs`: Adjust logic in reference functions to be
closer to solidity implementation.
2019-08-06 15:30:30 -04:00
Lawrence Forman
4600a656d1 @0x/contracts-test-utils: Update testWithReferenceFunctionAsync() to
support `RevertError`s.
2019-08-06 15:30:30 -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
5a088690b2 @0x/utils: Add SafeMathRevertErrors.SafeMathErrorCodes.Uint256DivisionByZero. 2019-08-06 15:30:30 -04:00
Lawrence Forman
8d26f58dfa @0x/contracts-test-utils: Make testCombinatoriallyWithReferenceFuncAsync not async. 2019-08-06 15:30:30 -04:00
Lawrence Forman
a3cdb63ae1 @0x/contracts-exchange: Rename TestIsolatedExchange to just IsolatedExchange. 2019-08-06 15:30:30 -04:00
Lawrence Forman
9d5b23acd3 @0x/contracts-exchange: Update tests in isolated_fill_order.ts. 2019-08-06 15:30:30 -04:00
Lawrence Forman
41e04c0178 @0x/contracts-exchange: Add a buttload of tests to
`isolated_fill_order.ts`.
2019-08-06 15:30:30 -04:00
Lawrence Forman
abaa0cf3d0 @0x/contracts-test-utils: Move OrderInfo to @0x/types. 2019-08-06 15:30:30 -04:00
Lawrence Forman
8670fbe2ae @0x/types: Add OrderInfo type. 2019-08-06 15:30:30 -04:00
Lawrence Forman
898213bb85 @0x/contracts-exchange: Update tests for moved types. 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
Lawrence Forman
c54d69e5ae @0x/contracts-exchange: Create reference functions test util.
`@0x/contracts-exchange`: Use reference functions to assert fill results
in `isolated_fill_order` tests.
2019-08-06 15:27:39 -04:00
Lawrence Forman
38a1f08413 @0x/contracts-test-utils: Add MAX_UINT256 constant. 2019-08-06 15:27:39 -04:00
Lawrence Forman
e2bd80253b @0x/contracts-exchange: More TestIsolatedExchange rework. 2019-08-06 15:27:39 -04:00
Lawrence Forman
039cc6e28b @0x/contracts-exchange: Allow fetching of balance of multiple assets
in `TestIsolatedExchange` contract.
`@0x/contracts-exchange`: Refactor `IsolatedExchangeWrapper` to be more
extensible.
2019-08-06 15:27:39 -04:00
Lawrence Forman
1030c96eec @0x/contracts-exchange: Create IsolatedExchangeWrapper class. 2019-08-06 15:27:39 -04:00
Lawrence Forman
0851c5ac8e @0x/contracts-exchange: Run prettier. 2019-08-06 15:27:39 -04:00
Lawrence Forman
92d112083e @0x/contracts-test-utils: Add filterLogs() and
`filterLogsToArguments()` helpers.
2019-08-06 15:27:39 -04:00
Lawrence Forman
1e462f5cc0 @0x/contracts-test-utils: Add ADDRESS_LENGTH constant. 2019-08-06 15:27:39 -04:00
Lawrence Forman
d974ee169a @0x/contracts-exchange: Rename TestExchangeIsolated.sol ->
`TestIsolatedExchange.sol`.
`@0x/contracts-exchange`: Automatically track raw asset balances in
`TestIsolatedExchange` contract.
2019-08-06 15:27:39 -04:00
Lawrence Forman
7fb87d4039 @0x/contracts-exchange: Update signature and rich error decoder tests
to use `hexRandom()` and `blockchainTests()`.
2019-08-06 15:27:39 -04:00
Lawrence Forman
fc5963fa3d @0x/contracts-test-utils: Add hexRandom() to hex_utils.ts. 2019-08-06 15:27:39 -04:00
Lawrence Forman
cfa362321d @0x/contracts-exchange: Switch to TestExchangeIsolated contract for
`isolated_fill_order` tests.
2019-08-06 15:27:39 -04:00
Lawrence Forman
72c7157138 @0x/contracts-exchange: Start work on isolated fill order tests. 2019-08-06 15:27:39 -04:00
Amir Bandeali
2f91a12f19 Merge pull request #2019 from jalextowle/feature/contracts/3.0/disallow-address-zero
Disallow Zero address in MixinAuthorizable and Ownable
2019-08-06 10:13:28 -07:00
Amir Bandeali
abe72b7745 Merge pull request #1975 from 0xProject/feat/3.0/removeCancelOrderNoThrow
Use less strict validation in `cancelOrder`, remove `cancelOrderNoThrow`
2019-08-06 10:11:34 -07:00
Jacob Evans
8cd99c5a40 Update Changelog 2019-08-06 17:26:49 +10:00
Jacob Evans
ad83312009 Update @0x/coordinator-server dependency 2019-08-06 09:50:10 +10:00
Jacob Evans
9e3b1fe333 Update to latest Coordinator Config 2019-08-06 09:45:41 +10:00
Jacob Evans
c3f42995f9 Update python addresses 2019-08-06 09:45:41 +10:00
Amir Bandeali
3d3a02c892 Add mainnet StaticCall and ERC1155Proxy addresses 2019-08-06 09:45:41 +10:00
Amir Bandeali
06bec227ad Add authorizedAddresses length check to MAP config tests 2019-08-06 09:45:40 +10:00
Amir Bandeali
5d7803323c Add script that tests deployed contract configs 2019-08-06 09:45:40 +10:00
Jacob Evans
4303f9a025 Add Ganache addresses to contract-addresses 2019-08-06 09:45:40 +10:00
Jacob Evans
fe4c5434fa Update migration 2019-08-06 09:45:40 +10:00
Amir Bandeali
9325bb70c5 Add testnet addresses 2019-08-06 09:45:39 +10:00
Amir Bandeali
b164557165 Add ERC1155Proxy and StaticCallProxy to build 2019-08-06 09:45:39 +10:00
Amir Bandeali
424f984ea8 Add ERC1155Proxy and StaticCallProxy artifacts 2019-08-06 09:45:39 +10:00
Amir Bandeali
e7df9d1754 Update cancelOrder and batchCancelOrders tests 2019-08-05 10:35:25 -07:00
Amir Bandeali
d3ab2b077a Remove cancelOrderNoThrow tests 2019-08-05 10:33:21 -07:00
Amir Bandeali
467a11f4b4 Remove cancelOrderNoThrow and batchCancelOrdersNoThrow 2019-08-05 10:33:21 -07:00
Amir Bandeali
6cb8c1df42 Noop on cancel if order is already unfillable 2019-08-05 10:33:21 -07:00
Alex Towle
3915c7e8f2 Addressed final review comments 2019-08-04 23:45:02 -07:00
Alex Towle
5ba0e0dc54 Updated the structure of the archive directory 2019-08-03 16:33:28 -07:00
David Sun
78c704e3d1 Merge pull request #2032 from 0xProject/feature/asset-swapper/update-comments-info
Update comments for asset-swapper
2019-08-02 13:47:48 -07:00
Alex Towle
9a35e2db77 Ran prettier 2019-08-02 13:46:34 -07:00
Alex Towle
e204a6d1d0 Updated Changelog 2019-08-02 13:46:34 -07:00
Alex Towle
47ab2a1b1d Reverted the asset-proxy back to an older version of Ownable that it was actually deployed with 2019-08-02 13:46:34 -07: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
46f6816511 Updated changelogs and ran prettier 2019-08-02 13:45:12 -07:00
Alex Towle
858ccfa934 Disallow the zero address in MixinAuthorizable 2019-08-02 13:45:12 -07:00
Alex Towle
b4a3218b13 Disallow address zero in Ownable 2019-08-02 13:44:18 -07:00
James Towle
92a4556956 Merge pull request #2020 from jalextowle/feature/contracts/3.0/rewrite-dispatch-transfer-from
Rewrite _dispatchTransferFrom with a Solidity implementation
2019-08-02 13:42:36 -07:00
James Towle
bd42c33daa Merge pull request #2014 from jalextowle/feature/contracts/3.0/utils-unit-tests
Added Unit Tests to Utils
2019-08-02 13:42:14 -07:00
Xianny
50f1a8fbd8 Add test for struct output in abi-gen (typescript) (#2028)
* add TS test for non-empty struct output
2019-08-02 13:34:19 -07:00
David Sun
0f90b7b5da Update comments for asset-swapper 2019-08-02 13:32:45 -07:00
David Sun
bec4384a5d Merge pull request #2030 from 0xProject/feature/website/change-credit-forms
Change modal contact form
2019-08-02 12:41:29 -07:00
David Sun
f361efae5a change modal contact form 2019-08-02 12:33:34 -07:00
Greg Hysz
76ca2116ab Merge pull request #2018 from 0xProject/feature/ContractWrappers/abiEncodeDecodeTxData
Decode Calldata + Return Values in Contract Wrappers
2019-08-02 09:51:01 +02:00
Greg Hysen
33d8646dc5 added start/end test comments to AbiGenDummy for consistency 2019-08-02 09:27:05 +02:00
F. Eugene Aumson
3cb5190bc6 Relax gas estimate expectation in Python doctest 2019-08-01 19:12:08 -04:00
Alex Towle
e1796a9f0f Changed toBN to toBigNumber 2019-08-01 15:39:00 -07:00
Alex Towle
8c5c81fe70 Change all instances of throw to revert in it tests 2019-08-01 15:13:16 -07:00
Alex Towle
bf8fae2025 Update changelog 2019-08-01 14:53:01 -07:00
Alex Towle
7f2b715ceb Rewrite _dispatchTransferFrom with a Solidity implementation 2019-08-01 14:53:00 -07:00
Francesco Agosti
5bba06bef8 Merge pull request #2026 from 0xProject/feature/what_is_0x_video_embed
Add sandwich video to landing page
2019-08-01 14:27:30 -07:00
fragosti
dd3f672a35 Make video wider 2019-08-01 13:56:19 -07:00
fragosti
25ef3b8445 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/what_is_0x_video_embed 2019-08-01 13:43:33 -07:00
Greg Hysen
7eb2d290d8 Ran prettier 2019-08-01 20:25:19 +02:00
Greg Hysen
678762910b Fixed typo in callAsync.handlebars and updated expected output in abi-gen 2019-08-01 19:07:12 +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
92602d33ad removed unnecessary fallback function from abi-gen tests 2019-08-01 19:07:12 +02:00
Greg Hysen
03f04f4bb3 Moved contract wrapper abi tests into abi-gen package 2019-08-01 19:07:12 +02:00
Greg Hysen
0d4dd5ff0d Appeased the linter 2019-08-01 19:05:22 +02:00
Greg Hysen
884864cc58 updated changelogs 2019-08-01 19:05:22 +02:00
Greg Hysen
7c199d83be updated expected output for abi-gen cli tests 2019-08-01 19:00:50 +02:00
Greg Hysen
5b4c29c4bb updated abi-gen-wrappers 2019-08-01 19:00:50 +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
Greg Hysen
db74db622e Added getABIDecodedTransactionData and getABIDecodedReturnData to contract wrappers + test cases 2019-08-01 19:00:50 +02:00
F. Eugene Aumson
57318c0041 Python nested wrapper methods & estimate_gas (#1996)
* git rm unnecessary .gitkeep file

* After all Pytest runs, show short test summary

* abi-gen/Py: facilitate inlining of parameter lists

Effectively, stopped new-lines from being introduced by calls to the
`params` and `typed_params` partials.

* abi-gen: simple Py wrapper test for local dev'ment

* abi-gen/Py: stop gen'ing ValidatorBase

* abi-gen/Py: declare abi() wrapper method in Base

* abi-gen/Py: methods as classes to ease call/sendTx

Represent methods as classes in order to faciliate access to a method's
different operations (call, send_transaction, etc).

* contract_wrappers.py: make Base methods public

Changed some methods on BaseContractWrapper to be public.

* contract_wrappers.py: remove unused method

* contract_wrappers.py: extract method

* abi-gen/Py: inline method

* contract_wrappers.py: fix bug in call()

We were passing transaction parameters through to sendTransaction()
invocations, but not to call() invocations.

* abi-gen/Py: remove `view_only` param to call/tx

Formerly, in the BaseContractWrapper, there was just one function used
for both eth_call and eth_sendTransaction, and you would distinguish
between the two by specifying `view_only=True` when you wanted a call.

This commit defines a method dedicated to executing an eth_call, and
leaves the old method behind, with the `view_only` param removed, to be
used for eth_sendTransaction.

* abi-gen/Py: rename method

* contract_wrappers/Py: simplify web3 func handling

Pass web3 function instance into generated wrapper method class
constructor, rather than having that class obtain it upon each method
call.

Really this is just an elimination of a call to
BaseContractWrapper.contract_instance(), which will be removed
completely in a shortly-upcoming commit.

* contract_wrappers.py: inline method

Inline and remove method BaseContractWrapper.contract_instance().

* contract_wrappers.py: pass Validator to *Method

Pass a ValidatorBase instance into construction of the contract method
classes, *Method, to eliminate another dependency on the containing
contract object, which will be eliminated completely in a
shortly-upcoming commit.

* abi-gen/Py: BaseContractWrapper -> ContractMethod

Change the fundamental thing-to-be-wrapped from the contract to the
method.  Since the named method classes were introduced (in a previous
commit), and since the operations contained within the Base are
predominantly focused on supporting method calls more than anything
else, it makes more intuitive sense to provide a base for the methods
than for the contract.

With this change, the method classes no longer require a contract object
to be passed to their constructors.  The contract members that the
methods were utilizing are now passed directly to the method
constructor.

* contract_wrappers.py: rename module to bases...

...from _base_contract_wrapper.  The old name hasn't made sense since
ValidatorBase was moved into that module, and definitely doesn't make
sense now that the fundamental thing-to-be-wrapped has changed from the
contract to the method.  Also renamed to make it public (removed the
leading underscore) since we're generating code that will depend on it.

* abi-gen/Py: clarify call/sendTx docstrings

* abi-gen/Py: adjust whitespace

* contract_wrappers.py: inline method

* abi-gen/Py: rename class ValidatorBase...

...to just Validator.  It's in the "bases" module, which provides the
context needed in order to know it's a base class

* python-packages: fix silent failures of ./parallel

* contract_wrappers.py: remove private_key support

Having this present was overcomplicating interfaces.  And it was
untested (and not readily working when testing was attempted).  And it
only provided a thin layer of convenience, which a client could easily
code up themselves.

* contract_wrappers.py: inline method

* contract_wrappers.py: rm unused member variables

* contract_wrappers.py: rm unnecessary instance var

* abi-gen/Py: add estimate_gas to gen'd methods

* update CHANGELOG.json
2019-08-01 12:47:52 -04:00
Lawrence Forman
974189045a Merge pull request #2007 from 0xProject/feature/3.0/mocha-blockchain-extensions
Mocha extensions for smart contract tests
2019-08-01 09:43:35 -04:00
fabioberger
4eb0767834 Update deps in private packages 2019-08-01 14:56:23 +02:00
fragosti
92bb7808ce Remove react-modal-video from website types 2019-07-31 17:50:21 -07:00
fragosti
abfe7d1613 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/what_is_0x_video_embed 2019-07-31 17:13:58 -07:00
fragosti
6c72239365 Remove react-modal-video as a dep and use the sass directly 2019-07-31 17:06:10 -07:00
fragosti
8001daad8c Fix linting errors 2019-07-31 16:40:39 -07:00
fragosti
73a38ab4f4 Add sandwich video to landing page 2019-07-31 15:15:55 -07:00
David Sun
281c207921 Publish
- @0x/contracts-asset-proxy@2.2.4
 - @0x/contracts-coordinator@2.0.9
 - @0x/contracts-dev-utils@0.0.6
 - @0x/contracts-exchange-forwarder@3.0.8
 - @0x/contracts-exchange@2.1.10
 - @0x/contracts-extensions@4.0.4
 - @0x/contracts-multisig@3.1.10
2019-07-31 14:14:47 -07:00
David Sun
ae531eef5f Updated CHANGELOGS 2019-07-31 14:14:35 -07:00
David Sun
d8b11238e6 reverted changelog for packages not published 2019-07-31 14:02:18 -07:00
Alex Towle
77feaec444 Fixed lingering review comments 2019-07-31 13:59:33 -07:00
David Sun
d36eb04ae8 Publish
- @0x/contracts-asset-proxy@2.2.4
 - @0x/contracts-coordinator@2.0.9
 - @0x/contracts-dev-utils@0.0.6
 - @0x/contracts-erc1155@1.1.11
 - @0x/contracts-erc20@2.2.10
 - @0x/contracts-erc721@2.1.11
 - @0x/contracts-exchange-forwarder@3.0.8
 - @0x/contracts-exchange-libs@3.0.4
 - @0x/contracts-exchange@2.1.10
 - @0x/contracts-extensions@4.0.4
 - @0x/contracts-multisig@3.1.10
 - @0x/contracts-test-utils@3.1.12
 - @0x/contracts-utils@3.2.0
 - 0x.js@6.0.14
 - @0x/abi-gen-templates@2.4.0
 - @0x/abi-gen-wrappers@5.1.0
 - @0x/abi-gen@3.1.2
 - @0x/assert@2.1.2
 - @0x/asset-buyer@6.1.10
 - @0x/asset-swapper@1.0.0
 - @0x/base-contract@5.3.0
 - @0x/connect@5.0.15
 - @0x/contract-artifacts@2.0.3
 - @0x/contract-wrappers@10.1.0
 - @0x/contracts-gen@1.0.12
 - @0x/dev-utils@2.2.6
 - @0x/fill-scenarios@3.0.15
 - @0x/json-schemas@3.1.12
 - @0x/migrations@4.1.11
 - @0x/order-utils@8.2.4
 - @0x/order-watcher@4.0.16
 - @0x/sol-compiler@3.1.11
 - @0x/sol-coverage@3.0.8
 - @0x/sol-doc@2.0.15
 - @0x/sol-profiler@3.1.10
 - @0x/sol-trace@2.0.16
 - @0x/sol-tracing-utils@6.0.15
 - @0x/sra-spec@2.0.13
 - @0x/subproviders@5.0.0
 - @0x/utils@4.4.2
 - @0x/web3-wrapper@6.0.9
2019-07-31 13:36:00 -07:00
David Sun
b97ba35279 Updated CHANGELOGS 2019-07-31 13:35:49 -07:00
David Sun
46efe92a72 Merge pull request #2025 from 0xProject/feature/asset-swapper/remove-react-deprecated
Removed react-docs from asset_swapper
2019-07-31 10:39:21 -07:00
David Sun
9cc27c7d1b Removed react-docs from asset_swapper 2019-07-31 10:14:31 -07:00
David Sun
7d3396f9c5 Merge pull request #2015 from 0xProject/feature/asset-swapper/bump-to-1.0.0
Version bump for asset-buyer and docs prep 1.0.0
2019-07-30 17:31:31 -07:00
David Sun
918ef13714 details 2019-07-30 16:48:46 -07:00
Alex Towle
e5b6921de9 Updated Changelog 2019-07-30 15:56:31 -07:00
Alex Towle
3ca3a2820d Fixed review comments 2019-07-30 15:53:01 -07:00
Lawrence Forman
9f4933e33d @0x/contracts-test-utils: Make BlockchainContextDefinition interface
more concise.
2019-07-30 16:59:52 -04:00
Lawrence Forman
3cf48a831b @0x/contracts-test-utils: Export a custom describe() instead of
extending Mocha's ambient declarations.
`@0x/contracts-exchange`: Use `describe.optional` instead of
`blockchainTests.optional` in `test/fill_order.ts`.
2019-07-30 16:59:52 -04:00
Lawrence Forman
930b742663 @0x/contracts-test-utils: Fix blockchain environment not being created
with top-level `blockchainTests.resets()` directive.
2019-07-30 16:59:52 -04:00
Lawrence Forman
d3870fed1c @0x/contracts-exchange: Update test/fill_order.ts to use the new
mocha blockchain extensions.
2019-07-30 16:59:52 -04:00
Lawrence Forman
99e242affd @0x/contracts-test-utils: Make blockchainTests() automatically call blockchainLifecycle.startAsync() and blockchainLifecycle.revertAsync() in a before() and after() directive. 2019-07-30 16:59:52 -04:00
Lawrence Forman
9792246970 @0x/contracts-test-utils: Tweak mocha blockchain extensions tests. 2019-07-30 16:59:52 -04:00
Lawrence Forman
020b953166 @0x/contracts-test-utils: Update CHANGELOG. 2019-07-30 16:59:52 -04:00
Lawrence Forman
52aa8e914a @0x/contracts-test-utils: Tweak mocha blockchain extensions tests. 2019-07-30 16:59:52 -04:00
Lawrence Forman
e01eadaecd @0x/contracts-exchange: Add tests and run prettier. 2019-07-30 16:59:52 -04:00
Lawrence Forman
61fc32b7c0 @0x/contracts-test-utils: Add optional modifier to blockchainTests(). 2019-07-30 16:59:52 -04:00
Lawrence Forman
a9c8207bb0 @0x/contracts-test-utils: Pass a more robust BlockchainTestsEnvironment object to blockchainTests() callback. 2019-07-30 16:59:52 -04:00
Lawrence Forman
eac4f172fe @0x/contracts-test-utils: Just do a naked mocha import in mocha_blockchain. 2019-07-30 16:59:52 -04:00
Lawrence Forman
d6271426fd @0x/contracts-test-utils: Rename blockchainTests.reset to blockchainTests.resets. 2019-07-30 16:59:52 -04:00
Lawrence Forman
7e59110049 @0x/contracts-test-utils: Create blockchainTests mocha fixture directive.
`@0x/contracts-test-utils`: Automatically call `chaiSetup.configure()`.
`@0x/contracts-test-utils`: Export `expect` as an alias for `chai.expect`.
2019-07-30 16:59:52 -04:00
David Sun
9d12462893 updated comments in SwapQuoter 2019-07-30 12:25:58 -07:00
James Towle
8cf4fb9adc Update contracts/utils/test/safe_math.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-30 12:08:35 -07:00
James Towle
f044f364cb Update contracts/utils/test/reentrancy_guard.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-30 12:08:35 -07:00
James Towle
4d39892a11 Update contracts/utils/test/ownable.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-30 12:08:35 -07:00
James Towle
bf1ebe8e53 Update contracts/utils/test/ownable.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-30 12:08:35 -07:00
James Towle
77b4f32274 Update contracts/utils/test/ownable.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-30 12:06:35 -07:00
Alex Towle
b2ada13a21 Ran prettier 2019-07-30 12:06:35 -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
David Sun
ed44e16a95 prettier 2019-07-30 10:47:58 -07:00
Amir Bandeali
1634c90179 Merge pull request #2016 from 0xProject/fix/3.0/circleci-workflow-fix-90d1decb8
Fix circleci workflow failing on 3.0 branch
2019-07-30 12:06:28 -05:00
Fabio B
dadab94644 Merge pull request #2004 from 0xProject/fix/githubDepsIssue
Fix react-highlight dep issue
2019-07-30 09:56:43 +02:00
Lawrence Forman
9b5ba6806f @0x/contracts-asset-proxy: Fix broken erc1155_proxy tests.
`@0x/contracts-asset-proxy`: Add `ERC1155Proxy.sol` to .solhintignore.
Fix circleci config to work with 3.0 branch.
2019-07-29 23:47:04 -04:00
Lawrence Forman
4afca6ca8d Fix circleci workflow failing due to test-python being required in config. 2019-07-29 21:54:43 -04:00
David Sun
7ec232a470 bumped version and added to docs 2019-07-29 18:42:24 -07:00
David Sun
dc3569392c updated changelog 2019-07-29 17:07:16 -07:00
David Sun
11999cd407 Merge pull request #2011 from 0xProject/feature/asset-swapper/renaming-to
Asset swapper renaming to -> toAddress
2019-07-29 15:48:31 -07:00
David Sun
f786f8a7f6 renaming to -> toAddress 2019-07-29 14:43:51 -07:00
fabioberger
aab39e6ae0 Use explicit URL form for Github dependencies with commit hash to avoid Yarn caching issue 2019-07-29 22:40:31 +02:00
Fabio B
31d3968649 Merge pull request #1993 from 0xProject/remove/reactDocsAndReactShared
Remove react-docs and react-shared packages
2019-07-29 22:37:52 +02:00
David Sun
2cd0b01019 Merge pull request #2009 from 0xProject/feature/website/remove-zeip-vote-banner
Removed Banner
2019-07-29 11:29:32 -07:00
David Sun
a6bc0db896 removed banner 2019-07-29 11:24:47 -07:00
Greg Hysz
7cba95b523 Merge pull request #1995 from 0xProject/feature/ContractWrappers/decodeLogArgs
Decode log arguments in `awaitTransactionSuccessAsync`
2019-07-29 20:23:36 +02:00
David Sun
1b976130ce Merge pull request #1980 from 0xProject/feature/asset-swapper/add-test-coverage
Add test coverage for asset-swapper
2019-07-29 11:20:36 -07:00
David Sun
e9babc5a94 prettier + lint 2019-07-29 10:52:58 -07:00
David Sun
c8d0ff846c Finished up adding test coverage 2019-07-29 10:52:58 -07:00
David Sun
db1e9769d0 Fixed testing bug 2019-07-29 10:52:58 -07:00
David Sun
4b038b07ed changes for testing 2019-07-29 10:52:58 -07:00
David Sun
4c17c142f9 ground work for forwarder consumer 2019-07-29 10:52:58 -07:00
David Sun
65b2fa13ac added coverage for swap quote calculator 2019-07-29 10:52:58 -07:00
David Sun
c375199daa add affiliate fee utils tests 2019-07-29 10:52:58 -07:00
David Sun
805131cf1e add affiliate fee utils 2019-07-29 10:52:58 -07:00
Greg Hysen
6f64115561 Switched assignment of logDecodeDependenciesAbiOnly for readability and to pass linter 2019-07-29 17:51:56 +02:00
Greg Hysen
0aadb789a5 Fixed linter errors 2019-07-29 16:45:13 +02:00
Greg Hysen
26ee4d626c ran prettier on abi-gen-wrappers 2019-07-29 15:57:59 +02:00
Greg Hysen
a8939d3eda Updated expected typescript output for abi-gen cli tests 2019-07-29 12:28:28 +02:00
Greg Hysen
048e48b03a updated contract wrappers 2019-07-29 12:24:19 +02:00
Greg Hysen
c2f34baee0 Changed artifactDependencies/abiDependencies to logDecodeDependencies + removed lodash depency in contract wrappers 2019-07-29 12:19:35 +02:00
Greg Hysen
8961b476ef fixed typo in a test 2019-07-29 12:19:35 +02:00
Greg Hysen
58e08335b5 Added another test to show what happens when decoding both local and downstream events 2019-07-29 12:19:35 +02:00
Greg Hysen
ea8fc1d93f updated test output from abi-gen to account for changes to deployFrom0xArtifactAsync and deployAsync 2019-07-29 12:19:35 +02:00
Greg Hysen
2968dfb2ae Minor readability improvements 2019-07-29 12:14:37 +02:00
Greg Hysen
24783107ba Updated generated contract wrappers and ran linter 2019-07-29 12:11:58 +02: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
Greg Hysen
88a7d9cca8 Updated changelogs for deployFrom0xArtifactAsync interface change 2019-07-29 12:11:02 +02:00
Greg Hysen
d8cf9d54aa Updated all instances of deployFrom0xArtifactAsync 2019-07-29 12:07:28 +02:00
Greg Hysen
df746c5ff4 Decode log arguments in awaitTransactionSuccessAsync, when ABI is recognized. 2019-07-29 12:04:37 +02:00
Fabio B
aa29526ae4 Merge pull request #2003 from 0xProject/updateLodash
Update lodash
2019-07-29 00:57:16 +02:00
fabioberger
f0b5616aba Use more explicit URL dep pinning to avoid yarn cache issue with Github deps 2019-07-27 16:14:51 +02:00
fabioberger
2eca95df00 Fix version test 2019-07-27 15:35:39 +02:00
fabioberger
f560c2e66a stop exporting removed EthLightwalletSubprovider 2019-07-27 14:52:10 +02:00
fabioberger
5e19496e32 Update as many lodash deps to higher versions 2019-07-27 14:45:20 +02:00
fabioberger
aeadaba005 update publish-release fork again with updated inquirer dep 2019-07-27 14:41:46 +02:00
fabioberger
8dfda9ffdd Update publish-release fork to version with v4 lodash dep 2019-07-27 14:38:05 +02:00
fabioberger
91992bb034 Update ganache-core 2019-07-27 14:37:50 +02:00
fabioberger
34a93857a0 Remove eth-lighwallet subprovider 2019-07-27 14:34:10 +02:00
fabioberger
fbda096aa9 Fix linter errors 2019-07-27 14:13:20 +02:00
fabioberger
24a26aef70 Remove remaining references to react-shared 2019-07-27 14:13:20 +02:00
fabioberger
ec7f9d8a63 Remove react-shared package and fold it into website 2019-07-27 14:13:20 +02:00
fabioberger
cc7dec7a99 Move react-docs into website and delete it as a standalone package 2019-07-27 14:12:57 +02:00
Xianny
46384ce80d Allow generated wrappers to subscribe/unsubscribe to events (#1970)
* Define SubscriptionManager and instantiate in generated wrappers

* expose subscribe/unsubscribe in generated wrappers

* update changelogs

* use SubscriptionManager in `@0x/contract-wrappers`
2019-07-26 16:54:31 -07:00
F. Eugene Aumson
5aeb626045 abi-gen: skip run_mocha on OSX (#2002) 2019-07-26 13:28:32 -04:00
David Sun
d2a27f1a48 Merge pull request #1983 from 0xProject/feature/website/alex-towle
Adding Alex Towle to team page
2019-07-26 09:51:54 -07:00
Fabio B
f07c67202f Merge pull request #1999 from 0xProject/upgradeMocha
Update Mocha & Chokidar Deps
2019-07-26 18:39:54 +02:00
fabioberger
3a3658708a Get all Mocha's on same version and add typings to all packages 2019-07-26 18:05:57 +02:00
fabioberger
f3c5d19246 Update remaining handlebars of deps of deps 2019-07-26 17:42:59 +02:00
fabioberger
c66d8f202a Update Mocha 2019-07-26 17:38:44 +02:00
Fabio B
ec641c171d Merge pull request #1994 from 0xProject/fix/upgradeDeps
Update dependencies
2019-07-26 14:50:57 +02:00
David Sun
773d624365 Merge pull request #1997 from 0xProject/feature/asset-swapper/fix-changelog
Asset-swapper fix changelog
2019-07-25 15:18:18 -07:00
David Sun
25bd97a014 updated changelog 2019-07-25 14:49:34 -07:00
fabioberger
5dd9e28f72 Fix handlebar header callbacks now that the typings changed 2019-07-25 12:24:44 +02:00
fabioberger
cc1ef6f268 Update handlebars dep 2019-07-25 11:42:23 +02:00
fabioberger
967e361da3 Use https for all registry URLs 2019-07-25 11:40:13 +02:00
fabioberger
398097900c Fix test-publish CI test when no packages exist to publish 2019-07-25 11:30:55 +02:00
fabioberger
b86473f3c7 Update yarn.lock 2019-07-24 22:33:27 +02:00
fabioberger
3d361c6b4a Special-case if there are no packages to publish 2019-07-24 22:33:12 +02:00
fabioberger
3346024ea7 Upgrade lerna fork to fix test-publish failure 2019-07-24 22:20:09 +02:00
Fabio B
2fecf6c80b Merge pull request #1982 from 0xProject/fix/enableLerna2FAPrompt
publishing: prompt user for OTP
2019-07-24 20:27:24 +02:00
David Sun
183b4fb7ee Merge pull request #1988 from 0xProject/feature/asset-swapper/optimized-market-sell-output
Added optimization utils for asset-swapper exchange consumer
2019-07-24 11:09:15 -07:00
David Sun
0e2afc5dcb Merge pull request #1985 from 0xProject/feature/asset-swapper/update-changelog
Updated CHANGELOG.json for asset-swapper
2019-07-24 11:04:47 -07:00
David Sun
91aa716c07 prettier and lint 2019-07-24 10:46:22 -07:00
David Sun
9977626de0 Switched NULL_ADDRESS to NULL_BYTES 2019-07-24 10:46:22 -07:00
David Sun
8bb3fb5bb3 added optimization utils 2019-07-24 10:46:22 -07:00
David Sun
6d7adb277e prettier 2019-07-24 10:42:52 -07:00
fabioberger
fef1bd13b5 Add HACK comment about writing cdVersions to a file 2019-07-24 19:38:46 +02:00
fabioberger
910bba9976 Bump Lerna fork version to include change of cdVersions flag to file path and separator to | between package versions 2019-07-24 19:38:46 +02:00
fabioberger
cd2d756717 Use spawn instead of exec so we can intercept any 2FA requests and bubble them to the user 2019-07-24 19:38:46 +02:00
fabioberger
0a47d89963 Use spawn instead of exec so we can bubble up the OTP prompt since OTP is only valid for 30sec, and we might need several 2019-07-24 19:38:46 +02:00
Amir Bandeali
90d1decb87 Fix build errors 2019-07-24 10:26:28 -07:00
fabioberger
65e5b09cd1 Fix outdated versions of monorepo dependencies 2019-07-24 19:23:05 +02:00
Fabio Berger
6f3cee1a1e Publish
- @0x/contracts-asset-proxy@2.2.3
 - @0x/contracts-coordinator@2.0.8
 - @0x/contracts-dev-utils@0.0.5
 - @0x/contracts-erc1155@1.1.10
 - @0x/contracts-erc20@2.2.9
 - @0x/contracts-erc721@2.1.10
 - @0x/contracts-exchange-forwarder@3.0.7
 - @0x/contracts-exchange-libs@3.0.3
 - @0x/contracts-exchange@2.1.9
 - @0x/contracts-extensions@4.0.3
 - @0x/contracts-multisig@3.1.9
 - @0x/contracts-test-utils@3.1.11
 - @0x/contracts-utils@3.1.10
 - 0x.js@6.0.13
 - @0x/abi-gen-templates@2.3.0
 - @0x/abi-gen-wrappers@5.0.3
 - @0x/abi-gen@3.1.1
 - @0x/assert@2.1.1
 - @0x/asset-buyer@6.1.9
 - @0x/asset-swapper@0.0.5
 - @0x/base-contract@5.1.2
 - @0x/connect@5.0.14
 - @0x/contract-artifacts@2.0.2
 - @0x/contract-wrappers@9.1.8
 - @0x/contracts-gen@1.0.11
 - @0x/dev-utils@2.2.5
 - ethereum-types@2.1.4
 - @0x/fill-scenarios@3.0.14
 - @0x/json-schemas@3.1.11
 - @0x/migrations@4.1.10
 - @0x/order-utils@8.2.3
 - @0x/order-watcher@4.0.15
 - @0x/react-docs@2.0.15
 - @0x/react-shared@2.0.15
 - @0x/sol-compiler@3.1.10
 - @0x/sol-coverage@3.0.7
 - @0x/sol-doc@2.0.14
 - @0x/sol-profiler@3.1.9
 - @0x/sol-resolver@2.0.9
 - @0x/sol-trace@2.0.15
 - @0x/sol-tracing-utils@6.0.14
 - @0x/sra-spec@2.0.12
 - @0x/subproviders@4.1.2
 - @0x/types@2.4.1
 - @0x/typescript-typings@4.2.4
 - @0x/utils@4.4.1
 - @0x/web3-wrapper@6.0.8
2019-07-24 01:50:18 -07:00
Fabio Berger
c43d4bbf71 Updated CHANGELOGS 2019-07-24 01:50:00 -07:00
Jacob Evans
b7337410aa Fix Vote router link root 2019-07-24 17:27:46 +10:00
Alex Towle
1d8cb1b107 Addressed lingering review comments 2019-07-23 15:53:26 -07:00
Alex Towle
65e3d9873d Added ERC1155 Aggregation 2019-07-23 15:53:26 -07:00
Alex Towle
50b22c673e Addressed review comments 2019-07-23 15:53:26 -07:00
Alex Towle
4ef8b7f733 Rebased onto 3.0 2019-07-23 15:53:26 -07:00
James Towle
e0ec26255b Fixed lingering issues 2019-07-23 15:53:26 -07:00
James Towle
ffa32f7610 Changed the returndata for batchMatchOrders 2019-07-23 15:53:26 -07:00
James Towle
1c1d257bd9 Addressed lingering review comments 2019-07-23 15:53:26 -07:00
James Towle
5611cb91a0 Adapted tests from matchOrders to test matchOrdersWithMaximalFill 2019-07-23 15:53:26 -07:00
James Towle
e0cff4b74e Updated batchMatchOrders to fix an edge case and added tests 2019-07-23 15:53:26 -07:00
James Towle
c1985e6986 Addessed some review comments 2019-07-23 15:53:26 -07:00
James Towle
416b1aee98 Improved the testing for matchOrders and batchMatchOrders 2019-07-23 15:53:26 -07:00
James Towle
7bb9d8b03a Created a test for case 3 of matchOrdersWithMaximalFill 2019-07-23 15:53:26 -07:00
James Towle
0473c82029 Improved test coverage for batchMatchOrdersWithMaximalFill 2019-07-23 15:53:26 -07:00
James Towle
63bd1a4a22 Ran prettier 2019-07-23 15:53:26 -07:00
James Towle
5a64759c83 Added a reentrancy test for matchOrdersWithMaximalFill 2019-07-23 15:53:26 -07:00
James Towle
0df68a6e06 Added testing for the BatchMatchOrdersError Rich Error 2019-07-23 15:53:26 -07:00
James Towle
29eff3b515 Rebased onto PR #1900 2019-07-23 15:53:26 -07:00
James Towle
073976de10 Split up TestExchangeInternals into two contracts 2019-07-23 15:53:26 -07:00
James Towle
1fe159f432 Polished MixinMatchOrders and removed unimplemented test 2019-07-23 15:53:26 -07:00
James Towle
adad7f4e3f Modified the matchOrders tests to test matchOrdersWithMaximalFill 2019-07-23 15:53:26 -07:00
James Towle
378710533e Implemented matchOrdersWithMaximalFill 2019-07-23 15:53:26 -07:00
James Towle
d966848ef8 Implemented batchMatchOrdersWithMaximalFill 2019-07-23 15:53:26 -07:00
James Towle
d6d613ca37 Added a new test 2019-07-23 15:53:26 -07:00
James Towle
1a385de367 Improved the efficiency of batchMatchOrders 2019-07-23 15:53:25 -07:00
James Towle
73eb56c072 Added RichErrors to batchMatchOrders 2019-07-23 15:53:25 -07:00
James Towle
9651941cce Added getMatchOrdersResultsAsync and getBatchMatchOrdersResultsAsync 2019-07-23 15:53:25 -07:00
James Towle
29be79814f Added a test for partial matching 2019-07-23 15:53:25 -07:00
James Towle
1ea220f44f Removed batchMatchOrdersWithMaximumFill 2019-07-23 15:53:25 -07:00
James Towle
6cf11554de Created tests for batchMatchOrders 2019-07-23 15:53:25 -07:00
James Towle
f289b3112b Implemented batchMatchOrders 2019-07-23 15:53:25 -07:00
James Towle
c61df50167 Updated Changelogs 2019-07-23 15:53:25 -07:00
James Towle
df5ec33330 @0x:contracts-utils Address remaining review comments 2019-07-23 15:53:25 -07:00
James Towle
6384518ee1 @0x:contracts-exchange Updated LibMath to use library rich errors 2019-07-23 15:53:25 -07:00
James Towle
87bf940f89 @0x:contracts-exchange Refactor OrderTransferSimulationUtils 2019-07-23 15:53:25 -07:00
James Towle
53db047a4e @0x:contracts-exchange Eliminated code duplication within LibExchangeRichErrors and IExchangeRichErrors 2019-07-23 15:53:25 -07:00
James Towle
dabef47ce7 @0x:contracts-exchange Updated MixinTransactions to use library RichErrors 2019-07-23 15:53:25 -07:00
James Towle
4de1d69282 @0x:contracts-exchange Updated MixinMatchOrders to use library RichErrors 2019-07-23 15:53:25 -07:00
James Towle
015c35f2b2 @0x:contracts-exchange Updated MixinSignatureValidator to use library RichErrors 2019-07-23 15:53:25 -07:00
James Towle
5a491b2624 @0x:contracts-exchange Updated MixinWrapperFunctions to use library RichErrors 2019-07-23 15:53:25 -07:00
James Towle
3d95817dbe @0x:contracts-exchange Updated MixinAssetProxyDispatcher and MixinExchangeCore to use library RichErrors 2019-07-23 15:53:25 -07:00
James Towle
96ab74dea4 @0x:contracts-utils Refactored utils to exclusively use library RichErrors 2019-07-23 15:53:25 -07:00
James Towle
f937a0b038 @0x:contracts-utils Added RichErrors to ReentrancyGuard 2019-07-23 15:53:25 -07:00
James Towle
da38285046 @0x:contracts-utils Added RichErrors to LibAddressArray 2019-07-23 15:53:25 -07:00
James Towle
d3db2dcfbb @0x:contracts-utils Added RichErrors to LibBytes 2019-07-23 15:53:25 -07:00
Lawrence Forman
c788db785b @0x/contracts-exchange: Use named return values in MixinSignatureValidator.sol 2019-07-23 15:53:25 -07:00
Lawrence Forman
6df41d2562 @0x/contracts-exchange: REALLY make assertValidFill() internal again. 2019-07-23 15:53:25 -07:00
Lawrence Forman
74fb43998e @0x/contracts-exchange: Make assertValidFill() internal again. 2019-07-23 15:53:25 -07:00
Lawrence Forman
c1f8eabd12 @0x/contracts-exchange: Cosmetic changes to contracts. 2019-07-23 15:53:25 -07:00
Lawrence Forman
2f5a1eebe0 @0x/contracts-exchange: Make assertValidFill and calculateMatchedFillResults public 2019-07-23 15:53:25 -07:00
Lawrence Forman
4791c120fe @0x/contracts-exchange: Run contracts:gen 2019-07-23 15:53:24 -07:00
Lawrence Forman
f6d445b553 @0x/order-utils: Update CHANGELOG 2019-07-23 15:53:24 -07:00
Lawrence Forman
db3dd4ae5a @0x/contracts-exchange: Update CHANGELOG 2019-07-23 15:53:24 -07:00
Lawrence Forman
d6ba03916a @0x/contracts-exchange: Update tests for new/consolidated signature types.
`@0x/contracts-exchange`: Update `Whitelist` example for new signature types.
2019-07-23 15:53:24 -07:00
Lawrence Forman
4734acbe61 @0x/contracts-test-utils: Add hexConcat() in hex_utils.ts. 2019-07-23 15:53:24 -07:00
Lawrence Forman
527256b416 @0x/contracts-exchange: Remove isValidOrderSignature() from IWallet. 2019-07-23 15:53:24 -07:00
Lawrence Forman
7a0dc7a364 @0x/contracts-exchange: Add isValidHashSignature() back.
`@0x/contracts-exchange`: Remove references to removed signature types and associated functions.
2019-07-23 15:53:24 -07:00
Lawrence Forman
7f88e8ad6e @0x/order-utils: Remove unused exchange revert errors 2019-07-23 15:53:24 -07:00
Lawrence Forman
c7324121ed @0x/types: Consolidate signature types. 2019-07-23 15:53:24 -07:00
Lawrence Forman
588ca3a315 @0x/contracts-exchange: Fix linearization issues. 2019-07-23 15:53:24 -07:00
Lawrence Forman
eb9b2f355e @0x/contracts-exchange: Consolidate signature types.
`@0x/contracts-exchange`: Fighting with linearization issues.
2019-07-23 15:53:24 -07:00
Lawrence Forman
cf6144599d Fix linter errors 2019-07-23 15:53:24 -07:00
Lawrence Forman
c23bb5e589 @0x/contracts-exchange: Add comments about preserving signatures in MixinSignatureValidator.sol 2019-07-23 15:53:24 -07:00
Lawrence Forman
0eb5c825a5 @0x/contracts-exchange: Refactor out EIP1271_MAGIC_VALUE into a LibEIP1271 contract and inherit from that.
`@0x/contracts-exchange`: Use `LibBytes.readBytes4()` to validate EIP1271 return values and be more permissive of shorter return values.
`@0x/contracts-exchange`: Use `abi.decode()` for `EIP1271OrderWallet` in `TestSignatureValidator.sol`.
`@0x/contracts-exchange`: Correct minor formatting changes in contracts.
2019-07-23 15:53:24 -07:00
Lawrence Forman
5dfb65b084 @0x/contracts-exchange: Fix comments in test/signature_validator.ts 2019-07-23 15:53:24 -07:00
Lawrence Forman
ddbe2acbf5 @0x/contracts-utils: Add LibEIP1271.sol 2019-07-23 15:53:24 -07:00
Lawrence Forman
2ff3735adc Rebase against 3.0 2019-07-23 15:53:24 -07:00
Lawrence Forman
c2752d5931 Update changelogs 2019-07-23 15:53:24 -07:00
Lawrence Forman
309dd7f300 Run prettier/linter 2019-07-23 15:53:24 -07:00
Lawrence Forman
33df11b755 @0x/contracts-exchange: Rename WalletOrderValidator to OrderWallet signature type
`@0x/contracts-exchange`: Rename `SignatureWalletOrderValidatorError` to `SignatureOrderWalletError`
`@0x/contracts-exchange`: Add `IEIP1271Wallet` interface
`@0x/contracts-exchange`: Add `EIP1271Wallet` and `EIP1271OrderWallet` to `SignatureType`
`@0x/contracts-exchange`: Always check `OrderValidator`, `OrderWallet`, `EIP1271OrderWallet` signature types on every fill
`@0x/contracts-exchange`: Add tests for EIP1271 signature types.
`@0x/contracts-exchange`: Update `LibExchangeRichErrorDecoder` for new/renamed Error types.
2019-07-23 15:53:24 -07:00
Lawrence Forman
bd5babf65d @0x/order-utils: Rename SignatureWalletOrderValidatorError to SignatureOrderWalletError RevertError type. 2019-07-23 15:53:24 -07:00
Lawrence Forman
3c07cbde47 @0x/types: Rename WalletOrderValidator to OrderWallet in SignatureType
`@0x/types`: Add `EIP1271Wallet` and `EIP1271OrderWallet` to `SignatureType`
2019-07-23 15:53:24 -07:00
Lawrence Forman
dee5ff852d @0x/contracts-exchange: Have TestValidatorWallet always accept WalletOrderValidator if makerAddress == this.
`@0x/contracts-exchange`: Update tests for repeatable signature validation.
2019-07-23 15:53:24 -07:00
Lawrence Forman
073930004d @0x/order-utils: Add validator field to SignatureOrderValidatorError and SignatureValidatorError RevertError types.
`@0x/order-utils`: Add `SignatureOrderValidatorNotApprovedError` and `SignatureValidatorNotApprovedError` `RevertError` types.
2019-07-23 15:53:24 -07:00
Lawrence Forman
01574c5a87 @0x/contracts-exchange: Update changelog 2019-07-23 15:53:24 -07:00
Lawrence Forman
3a49369e68 @0x/utils: Add toStringTag symbol to RevertError 2019-07-23 15:53:24 -07:00
Lawrence Forman
42f7b7cc19 @0x/contracts-exchange: Always check OrderValidator and WalletOrderValidator signature types on every fill
`@0x/contracts-exchange`: Add `validatorAddress` field to `SignatureValidatorError` and `SignatureOrderValidatorError` rich reverts
`@0x/contracts-exchange`: Add separate `SignatureOrderValidatorNotApprovedError` for `OrderValidator` signatures
`@0x/contracts-exchange`: Consolidate Wallet and Validator test contracts into a single configurable `TestValidatorWallet` contract.
`@0x/contracts-exchange`: Rewrite many tests in `signature_validator.ts` for brevity.
2019-07-23 15:53:24 -07:00
Lawrence Forman
5f8ebc3601 @0x/base-contract: Make PromiseWithTransactionHash fully compatible with regular Promise types.
`@0x/contracts/exchange` Make `OrderValidator` and `WalletOrderValidator` signature types checked for every fill (not just first)'
2019-07-23 15:53:24 -07:00
Lawrence Forman
2e5645108b Update generated wrappers for coordinator and exchange. 2019-07-23 15:53:24 -07:00
Amir Bandeali
d73f7beb2f Fix StaticCallProxy Exchange integration tests 2019-07-23 15:52:20 -07:00
Amir Bandeali
4f6f126952 Fix build 2019-07-23 15:52:20 -07:00
Amir Bandeali
0099cdd6ad Update comments and add a catch-all else in getSimulatedOrderTransferResults function 2019-07-23 15:52:20 -07:00
Amir Bandeali
2b7114b704 Update CHANGELOGs 2019-07-23 15:52:20 -07:00
Amir Bandeali
2041d0d000 Add fillOrder transfer ordering tests 2019-07-23 15:52:20 -07:00
Amir Bandeali
698f313b73 Reorder matchOrder transfers and remove redundant checks 2019-07-23 15:52:20 -07:00
Amir Bandeali
1940458306 Add tests for OrderTransferSimulationUtils 2019-07-23 15:52:20 -07:00
Amir Bandeali
983def2bbd Add OrderTransferSimulationUtils 2019-07-23 15:52:20 -07:00
Amir Bandeali
9213bf47ae Swap ordering of transfers in fills and remove redundant checks 2019-07-23 15:52:20 -07:00
Amir Bandeali
f01743e27c Add tests for simulateTransferFromCalls 2019-07-23 15:52:20 -07:00
Amir Bandeali
9be58972a0 Add MixinTransferSimulator 2019-07-23 15:52:20 -07:00
James Towle
a1a6c3e40c Updated the DivisionByZeroError to not use assembly 2019-07-23 15:52:20 -07:00
James Towle
a2b19a1b9d Updated DivisionByZero error 2019-07-23 15:52:20 -07:00
James Towle
4d1a942e79 Removed unnecessary files and code 2019-07-23 15:52:20 -07:00
James Towle
eb4afa8f2c Update contracts/exchange-libs/contracts/src/interfaces/IMixinLibMathRichErrors.sol
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-23 15:52:20 -07:00
James Towle
468bbea44d Update contracts/exchange-libs/contracts/src/interfaces/IMixinLibMathRichErrors.sol
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-23 15:52:20 -07:00
James Towle
b75aa02b0d Update contracts/exchange/test/internal.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-23 15:52:20 -07:00
James Towle
a39f93bcff Update contracts/exchange/test/internal.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-07-23 15:52:20 -07:00
James Towle
e229d2d59f Updated tests to work with LibMathRichErrors 2019-07-23 15:52:20 -07:00
James Towle
3d58dc2a50 Added RichReverts to exchange-libs 2019-07-23 15:51:43 -07:00
James Towle
0395188aed Updated any remaining contracts using 0.5.5 to 0.5.9 2019-07-23 15:51:43 -07:00
James Towle
4e6dd1b213 Updated the style 2019-07-23 15:51:43 -07:00
James Towle
a46b13967a Refactored the SafeMath errors 2019-07-23 15:51:43 -07:00
James Towle
e916daf5fd Ran yarn prettier 2019-07-23 15:51:43 -07:00
James Towle
fad9dae9bb Fixed the exchange unit tests 2019-07-23 15:51:43 -07:00
James Towle
83bd5f5561 Fixed the last broken test in asset-proxy 2019-07-23 15:51:43 -07:00
James Towle
0ddb9f8923 Added a linting command for slower computers 2019-07-23 15:51:43 -07:00
James Towle
03ea97734c Ran yarn prettier 2019-07-23 15:51:43 -07:00
James Towle
b7adf59ed5 Fixed any lingering style issues 2019-07-23 15:51:43 -07:00
James Towle
666b992c51 Readded Underflow RichErrors to asset-proxy 2019-07-23 15:51:43 -07:00
James Towle
56d5e9c889 Fixed the build issues in exchange 2019-07-23 15:51:43 -07:00
James Towle
aa36ebf4f2 Removed RichErrors from the erc1155 test in Authorizable 2019-07-23 15:51:43 -07:00
James Towle
de60123ec7 Updated the combanatorial tests to use RichErrors 2019-07-23 15:51:43 -07:00
James Towle
cf3790c2f8 Updated the erc1155 tests in asset-proxy to use RichErrors 2019-07-23 15:51:43 -07:00
James Towle
b7bac3abf6 Updated the asset-proxy tests to use RichErrors 2019-07-23 15:51:43 -07:00
James Towle
f4551dd1e5 Updated the exchange tests to use RichErrors 2019-07-23 15:51:43 -07:00
James Towle
b3da4bb5b7 Updated the erc1155 tests to expect RichErrors 2019-07-23 15:51:43 -07:00
James Towle
6e4b6929d2 Added RichErrors to SafeMath 2019-07-23 15:51:43 -07:00
James Towle
a0602c8863 Added RichErrors to Ownable 2019-07-23 15:51:43 -07:00
James Towle
55246c5d87 Removed unnecessary import 2019-07-23 15:51:43 -07:00
James Towle
81ee577407 Updated naming in MixinTransactions 2019-07-23 15:51:43 -07:00
James Towle
55e1045000 Added a comment about inheritance in the exchange 2019-07-23 15:51:43 -07:00
James Towle
fc96df63fd Fixed most of the nits 2019-07-23 15:51:43 -07:00
James Towle
9b787a6bc2 Removed enums from Mixins in the coordinator package 2019-07-23 15:51:43 -07:00
James Towle
201dc7c28d Removed events from the Mixins in asset-proxy 2019-07-23 15:51:43 -07:00
James Towle
5189fa6483 Fixed the inheritance hierarchy 2019-07-23 15:51:43 -07:00
James Towle
1992478cee Updated the mixins 2019-07-23 15:51:43 -07:00
James Towle
5ad6b48289 Refactored into interfaces 2019-07-23 15:51:43 -07:00
James Towle
bbcf83b99d Added a linting command that only runs on contracts 2019-07-23 15:51:43 -07:00
James Towle
9ef55023f2 Removed all mixins/ directories from the repository 2019-07-23 15:51:43 -07:00
Amir Bandeali
f2f81b0f7b Fix dev-utils tests 2019-07-23 15:51:43 -07:00
Amir Bandeali
c22ed861d1 Remove ZRX fees from dev-utils contracts 2019-07-23 15:51:43 -07:00
Amir Bandeali
39bed4d306 temp 2019-07-23 15:51:43 -07:00
Amir Bandeali
949946589f Fix order-utils tests 2019-07-23 15:50:36 -07:00
Amir Bandeali
09d970f056 Update abi-gen-wrappers 2019-07-23 15:50:36 -07:00
James Towle
5813bb9ca8 Updated any remaining contracts using 0.5.5 to 0.5.9 2019-07-23 15:46:16 -07:00
Amir Bandeali
c48ad5c90f Fix outdated comments 2019-07-23 15:46:16 -07:00
Amir Bandeali
4fdc1b3e19 Update CHANGELOGs 2019-07-23 15:46:16 -07:00
Amir Bandeali
dc372a43fe Fix incorrect function call for fillOrderNoThrow test 2019-07-23 15:46:16 -07:00
Amir Bandeali
589b791cd7 Add names to return values and fix breaking transactions tests 2019-07-23 15:46:16 -07:00
Amir Bandeali
564dbea126 Remove formatters and clarify comments about pointing assetData to the same memory location 2019-07-23 15:46:16 -07:00
Amir Bandeali
1bc4bc613e Add return value checks to wrapper tests 2019-07-23 15:46:16 -07:00
Amir Bandeali
11a25cb1ae Return FillResults[] for batch fill methods 2019-07-23 15:46:16 -07:00
Lawrence Forman
d6c1bf691c Reorder event assertions in transactions tests. 2019-07-23 15:46:16 -07:00
Amir Bandeali
e6443a2612 Update CHANGELOGs 2019-07-23 15:46:16 -07:00
Amir Bandeali
d79714a3cf Fix merge conflict remnant 2019-07-23 15:46:15 -07:00
Amir Bandeali
4bb1312cf1 Fix coordinator package build 2019-07-23 15:46:15 -07:00
Amir Bandeali
4e2abcaefa Fix linting errors 2019-07-23 15:46:15 -07:00
Amir Bandeali
d463d4c46b Add transaction expiration tests 2019-07-23 15:46:15 -07:00
Amir Bandeali
435c81da98 Revert if transaction is expired 2019-07-23 15:46:15 -07:00
Amir Bandeali
4f818d55fa Add TransactionExecution log tests 2019-07-23 15:46:15 -07:00
Amir Bandeali
c96a81e319 Fix exchange package build 2019-07-23 15:46:15 -07:00
Amir Bandeali
7cff9ba86a Refactor tests 2019-07-23 15:46:15 -07:00
Amir Bandeali
6ddaa6f52a Add expirationTimeSeconds to ZeroExTransaction schema throughout codebase 2019-07-23 15:46:15 -07:00
Amir Bandeali
238877b627 Log TransactionExecution event when transaction is successfully executed 2019-07-23 15:46:15 -07:00
Lawrence Forman
95e7999e45 @0x/contracts-exchange: Update settlement test simulators to match settlement optimizations in the Exchange. 2019-07-23 15:46:15 -07:00
Lawrence Forman
2f464ee8f0 @0x/contracts-exchange: Fix critical error in fillOrder() and matchOrders() redundant transfer optimization code.
`@0x/contracts-exchange`: Rearrange `Fill` event params to make regular `emit` code work without breaking the stack.
`@0x/contracts-exchange`: Add edge case tests for redundant transfer optimizations.
2019-07-23 15:46:15 -07:00
Lawrence Forman
8fe9883b62 Update contracts/exchange/contracts/src/MixinMatchOrders.sol
`@0x/contracts-exchange`: Minor code change to save an mload.
2019-07-23 15:46:15 -07:00
Lawrence Forman
de896f9159 @0x/contracts-exchange: Remove TODO comment in fill_order_combinatorial_utils.ts. 2019-07-23 15:46:15 -07:00
Lawrence Forman
a2468e8129 @0x/contracts-exchange: Update changelog. 2019-07-23 15:46:15 -07:00
Lawrence Forman
ee89f74afd @0x/contracts-exchange: Avoid redundant transfer in matchOrders() when maker/feeRecipient and takerAssetData/makerFeeAssetData are the same.
`@0x/conracts-exchange`: Disable combinatorial tests by default. Can be run by setting env var `TEST_ALL=1`.
2019-07-23 15:46:15 -07:00
Lawrence Forman
cd08c3e8fa @0x/contracts-exchange: Avoid redundant trasfer in fillOrder() when maker/taker is the same as feeRecipient and the assets match.
`@0x/contracts-exchange`: Swap fill order in `fillOrder()` from maker -> taker to taker -> maker first
2019-07-23 15:46:15 -07:00
Lawrence Forman
9cc8933eec @0x/contracs-test-utils: Increase number of deployed ERC721 and ERC1155 tokens to 2 to fix broken asset-proxy tests. 2019-07-23 15:46:15 -07:00
Lawrence Forman
91c27ff972 @0x/contracts-exchange: Fix build error. 2019-07-23 15:46:15 -07:00
Lawrence Forman
07e3ba014c @0x/contracts-exchange: Fully incorporate ERC1155 and MultiAsset tests into the fillOrder and matchOrders test suites. 2019-07-23 15:46:15 -07:00
Lawrence Forman
57ac0ca6e8 @0x/contracts-test-utils: Reduce number of test token deployments to speed up tests. 2019-07-23 15:46:15 -07:00
Lawrence Forman
816368b1fe @0x/contracts-exchange: Re-eanble all exchange tests.
`@0x/contracts-echange`: Set up 1155 and MAP proxies for `matchOrders()` tests.
2019-07-23 15:46:15 -07:00
Lawrence Forman
85ea291745 @0x/contracts-exchange: Add MultiAssetProxy, ERC1155Fungible, and ERC1155NonFungible combinatorial tests. 2019-07-23 15:46:15 -07:00
Lawrence Forman
741fdfa52e @0x/contracts-erc1155: Add mintKnownFungibleTokensAsync(), isNonFungibleItemAsync(), isFungibleItemAsync(), getOwnerOfAsync(), getBalanceAsync() to Erc1155Wrapper. 2019-07-23 15:46:15 -07:00
Lawrence Forman
348ec5bc3c @0x/contracts-asset-proxy: Add setProxyAllowanceForAllAsync() to ERC1155ProxyWrapper. 2019-07-23 15:45:39 -07:00
Lawrence Forman
df9698ab1f @0x/order-utils: Add ERC1155 to ExchangeTransferSimulator and fix MultiAssetProxy transfer accounting. 2019-07-23 15:45:39 -07:00
Lawrence Forman
c1aead970a Disable staking package from CI. 2019-07-23 15:45:39 -07:00
Lawrence Forman
518f351235 @0x/contracts-exchange: Correct coding convention in match_orders.ts 2019-07-23 15:44:58 -07:00
Lawrence Forman
d79a07e2c4 @0x/contracts-exchange: Fix indentation in matchOrders(). 2019-07-23 15:44:58 -07:00
Lawrence Forman
b636057251 @0x/contracts-exchange-libs: Make EIP712_ORDER_SCHEMA_HASH public. 2019-07-23 15:44:58 -07:00
Lawrence Forman
c692c8f055 @0x/contracts-exchange-libs: Regenerate LibExchangeSelectors.sol 2019-07-23 15:44:58 -07:00
Lawrence Forman
930736060c @0x/abi-gen-templates: Automatically catch and decode ganache revert Errors in transaction methods. 2019-07-23 15:44:58 -07:00
Lawrence Forman
1c8468d248 @0x/contracts-exchange: Use function/event selectors from LibExchangeSelectors.
`@0x/contracts-exchange`: Add memory map comments to `Fill` emit code.
2019-07-23 15:43:23 -07:00
Lawrence Forman
575842eab4 @0x/contracts-exchange-libs: Convert generate-exchange-selectors script to typescript. 2019-07-23 15:43:23 -07:00
Lawrence Forman
f7f55cad43 @0x/contracts-exchange: Removed dependency on OrderValidationUtils. The tests using it didn't really warrant the full validation suite.
`@0x/contracts-test-utils`: Move all the `OrderScenario` related types into the `contracts-exchange` package because no one else is using them.
2019-07-23 15:43:23 -07:00
Lawrence Forman
acd857a8c0 @0x/contracts-asset-proxy: Fix broken proxies test. 2019-07-23 15:43:23 -07:00
Lawrence Forman
53ff248176 @0x/contracts-exchange: Revert internal tests. 2019-07-23 15:43:23 -07:00
Lawrence Forman
3de13967bc @0x/base-contract: Re-wrap StringRevertErrors as plain Errors for backwards compatibility 2019-07-23 15:43:23 -07:00
Lawrence Forman
aebb923c2d @0x/contracts-exchange: Major rework of fill_order_combinatorial_utils.
`@0x/contracts-exchange`: Add more arbitrary fee token tests.
`@0x/contracts-exchange`: Fix broken tests.
2019-07-23 15:43:23 -07:00
Lawrence Forman
76d577a08d @0x/contracts-test-utils: Add more OrderScenario related types. 2019-07-23 15:43:23 -07:00
Lawrence Forman
3fb34a2a83 @0x/contracts-asset-proxy: Make setProxyAllowanceForAll() just accept a ownerAddress and give the proxy full control. 2019-07-23 15:43:23 -07:00
Lawrence Forman
cdb938ea28 @0x/base-contract: Add a method for converting Error types to RevertErrors.
`@0x/abi-gen-templates`: Automatically try to convert `Error`s thrown in `callAsync()` to `RevertError`s.
`@0x/abi-gen-wrappers`: Update generated wrappers.
2019-07-23 15:43:23 -07:00
Lawrence Forman
882dd4597e @0x/dev-utils: Move Error -> RevertError coercion logic to @0x/utils. 2019-07-23 15:27:39 -07:00
Lawrence Forman
409efb8c67 @0x/order-utils: Update RevertError types for new RevertError constructor. 2019-07-23 15:27:39 -07: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
d480f8d82a @0x/web3-wrapper: Let toBaseUnitAmount() accept a number as well as a BigNumber 2019-07-23 15:27:39 -07:00
Lawrence Forman
339fc9ff14 @0x/assert: Add isNumberLike assertion 2019-07-23 15:27:00 -07:00
Lawrence Forman
14167412e0 @0x/contracts-exchange-libs: Make generate-exchange-selectors terminate file with a newline. 2019-07-23 15:26:59 -07:00
Lawrence Forman
7c0f075d1f Update changelogs with PR #s 2019-07-23 15:26:59 -07:00
Lawrence Forman
f4aea76c6e Ran prettier 2019-07-23 15:26:59 -07:00
Lawrence Forman
d263382365 @0x/contracts-coordinator: Fix broken coordinator tests. 2019-07-23 15:26:59 -07:00
Lawrence Forman
2109ed8464 @0x/contracts-exchange-libs: Add generate-exchange-selectors package script to regenerate LibExchangeSelectors from Exchange artifacts. 2019-07-23 15:26:59 -07:00
Lawrence Forman
d11444b983 @0x/contracts-exchange: Fix Exchange Wrappers tests. 2019-07-23 15:26:59 -07:00
Lawrence Forman
0508a45681 @0x/contracts-echange: Fix transactions test bug with ExchangeWrapper example due to deduping. 2019-07-23 15:26:59 -07:00
Lawrence Forman
a5c0b95f8b Update changelogs 2019-07-23 15:26:59 -07:00
Lawrence Forman
f1af12b3b9 Update CI config to blacklist contracts-extensions and contracts-exchange-forwarder. 2019-07-23 15:26:59 -07:00
Lawrence Forman
9d257497bd Ran prettier and fixed linter errors 2019-07-23 15:23:40 -07:00
Lawrence Forman
79f40b4ce0 @0x/contracts-exchange: Enable all exchange tests. 2019-07-23 15:23:40 -07:00
Lawrence Forman
1ab62b7a80 @0x/contracts-exchange: Fix broken match orders tests 2019-07-23 15:23:40 -07:00
Lawrence Forman
d2f10d5834 @0x/contracts-exchange: Allow custom ExchangeWrapper.matchOrders() call in MatchOrdersTester. 2019-07-23 15:23:40 -07:00
Lawrence Forman
c326ec9d1e @0x/contracts-exchange: Rewrote MatchOrderTester class to be simpler and more flexible. 2019-07-23 15:23:40 -07:00
Lawrence Forman
26317d16ff @0x/contracts-exchange: Fix matchOrders() not paying fees if same feeRecipient but different feeAssetDatas. 2019-07-23 15:23:40 -07:00
Lawrence Forman
79b8f85cdf @0x/contracts-test-utils: Remove TransferAmountsByMatchOrders and TransferAmountsLoggedByMatchOrders.
`@0x/contracts-test-utils`: Add `TokenBalancesByOwner` type.
2019-07-23 15:23:40 -07:00
Lawrence Forman
c84a0b8415 @0x/contracts-exchange: Fix matchOrders and signature tests. 2019-07-23 15:23:40 -07:00
Lawrence Forman
be5336d074 @0x/contracts-exchange: Enable all tests. 2019-07-23 15:23:40 -07:00
Lawrence Forman
aecb2efad9 @0x/contracts-exchange: Fix combinatorial fillOrder test bugs.
`@0x/contracts-exchange`: Fix emit `Fill` event code.
2019-07-23 15:23:40 -07:00
Lawrence Forman
3654005c3d @0x/order-utils: Move order expiration check to top in order validation. 2019-07-23 15:23:40 -07:00
Lawrence Forman
d8fd61955c @0x/contracts-test-utils: Increase deployment numbers for dummy tokens. 2019-07-23 15:23:40 -07:00
Lawrence Forman
3381ab5093 @0x/typescript-typings: Add more overloads for ethereumjs-util setLengthLeft, setLengthRight, setLength. 2019-07-23 15:23:40 -07:00
Lawrence Forman
8c2fa64c47 @0x/contracts-exchange: Remove dependency on LibAbiEncoder. 2019-07-23 15:23:40 -07:00
Lawrence Forman
12ae9fced5 @0x/contracts-exchange-forwarder: Remove dependency on LibAbiEncoder. 2019-07-23 15:23:40 -07:00
Lawrence Forman
e3bca7e7e7 @0x/exchange-libs: Remove LibAbiEncoder 2019-07-23 15:23:40 -07:00
Lawrence Forman
bca199e118 @0x/contracts-exchange: Fix Fill emit code. 2019-07-23 15:23:40 -07:00
Lawrence Forman
938ae5f27c @0x/contracts-coordinator: Remove ZRX token from coordinator tests. 2019-07-23 15:23:40 -07:00
Lawrence Forman
8aa3b535f0 @0x/contracts-exchange: Update fill order tests for arbitrary fee tokens. (Still more to do) 2019-07-23 15:23:40 -07:00
Lawrence Forman
f4bf4ee0f2 @0x/contracts-test-utils: Update types for arbitrary fee tokens. 2019-07-23 15:23:40 -07:00
Lawrence Forman
1c1ab3cd87 json-schemas: Update changelog. 2019-07-23 15:23:40 -07:00
Lawrence Forman
f5c215fe65 Update fill-scenarios for ZEIP-28 2019-07-23 15:23:40 -07:00
Lawrence Forman
9952de615a Update order-utils for ZEIP-28 2019-07-23 15:23:40 -07:00
Lawrence Forman
e1c547be98 Remove contract-wrappers contracts-exchange-forwarder and contracts-extensions from contractsPackages in root package.json 2019-07-23 15:23:40 -07:00
Lawrence Forman
7cb6795d40 @0x/contracts-exchange-libs: Add takerFeeAssetData and makerFeeAssetData to Order struct. 2019-07-23 15:23:40 -07:00
Lawrence Forman
a5f4478e20 @0x/contracts-exchange: Remove zrxAssetData from constructor and remove dependency on LibConstants.
`@0x/contracts-exchange`: Update `fillOrder()` and `matchOrders()` to settle arbitrary fees.
`@0x/contracts-exchange`: emit `Fill()` events the hard way to avoid a stack overflow.
2019-07-23 15:23:40 -07:00
Lawrence Forman
94d0db2dba In @0x/order-utils: Fix order hash tests.
In `@0x/contracts-exchange-libs`: Add fee asset datas to `LibOrder` type.
2019-07-23 15:23:40 -07:00
Amir Bandeali
64c596c922 temp 2019-07-23 15:23:40 -07:00
Amir Bandeali
e30b8999d4 Update order utils to use new order schema 2019-07-23 15:23:40 -07:00
Amir Bandeali
2f0ee84b71 Add fee assetData fields to order JSON schema 2019-07-23 15:23:40 -07:00
Amir Bandeali
c570478aaa Add fee assetData fields to OrderWithoutDomain and Order types 2019-07-23 15:23:40 -07:00
Amir Bandeali
051997acb0 Fix linting errors 2019-07-23 15:23:40 -07:00
Amir Bandeali
51ef0e1e6d Add tests for cancelOrderNoThrow and batchCancelOrdersNoThrow 2019-07-23 15:23:40 -07:00
Amir Bandeali
ed0fcf2829 Remove LibAbiEncoder 2019-07-23 15:23:40 -07:00
Amir Bandeali
2ce94b73ad Use build in abi.encode instead of LibAbiEncoder for fillOrderNoThrow 2019-07-23 15:23:40 -07:00
Amir Bandeali
ef96bff6ec Add cancelOrderNoThrow and batchCancelOrdersNoThrow 2019-07-23 15:23:40 -07:00
Greg Hysen
afc888f2ef Updated compiler.json for erc1155 and staking packages, plus removed unnecessary dependencies for staking 2019-07-23 15:23:40 -07:00
Greg Hysen
e823c2af9d Created boilerplate staking package for stake-based liquidity incentives 2019-07-23 15:23:40 -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
0cfcb6aa37 Apply suggestions from code review
Co-Authored-By: abandeali1 <abandeali1@gmail.com>
2019-07-23 15:21:14 -07:00
Amir Bandeali
6b40812e6d Fix incorrect CancelUpTo event args 2019-07-23 15:21:14 -07:00
Amir Bandeali
8af253e9ab Remove accidental recursive function call in TestLibs contract 2019-07-23 15:21:14 -07:00
Amir Bandeali
6763bce627 Add _ to remaining internal/private functions 2019-07-23 15:21:14 -07:00
Amir Bandeali
3217c1e11f Remove unused SafeMath functions 2019-07-23 15:21:14 -07:00
Amir Bandeali
6ce3e18831 Remove deprecated error libs 2019-07-23 15:21:14 -07:00
Amir Bandeali
3e461ac2e5 Rename internal and private functions 2019-07-23 15:21:14 -07:00
Lawrence Forman
25e2baaea7 Fix linter errors. 2019-07-23 15:21:14 -07:00
Lawrence Forman
6696a714f0 Disable test-contracts-geth CI job until our geth docker is updated to constantinople. 2019-07-23 15:21:14 -07:00
Lawrence Forman
46af2ffcea In @0x/contracts-exchange: Merge new transaction tests from rebase. 2019-07-23 15:21:14 -07:00
Lawrence Forman
e5b3a82112 In @0x/contracts-utils and @0x/contracts-exchange: Hardcode rich revert selector constants. 2019-07-23 15:21:14 -07:00
Lawrence Forman
9af51aaca1 Add PRs to changelogs. 2019-07-23 15:21:14 -07:00
Lawrence Forman
3bacf09710 Update changelogs 2019-07-23 15:21:14 -07:00
Lawrence Forman
61bdbd2d74 Rebased against 3.0.
Run prettier/linter.
2019-07-23 15:21:14 -07:00
Lawrence Forman
a1293f160f In @0x/contracts-exchange: Remove only from lib_exchange_rich_error_decoder tests. 2019-07-23 15:21:14 -07:00
Lawrence Forman
847503bff1 In @0x/contracts-exchange: Add more tests for LibExchangeRichErrorDecoder. 2019-07-23 15:21:14 -07:00
Lawrence Forman
576242551f In @0x/contracts-exchange: Add more tests for LibExchangeRichErrorDecoder. 2019-07-23 15:21:14 -07:00
Lawrence Forman
fdb6bee65f In @0x/contracts-exchange: Add tests for LibExchangeRichErrorDecoder. 2019-07-23 15:21:14 -07:00
Lawrence Forman
a2846faa61 Move @0x/rich-reverts-decoder into @0x/contracts-exchange/contracts/src/libs/LibExchangeRichErrorDecoder. 2019-07-23 15:21:14 -07:00
Lawrence Forman
a32544b53a In @0x/contracts-rich-reverts-decoder: Add more decoders. 2019-07-23 15:21:14 -07:00
Lawrence Forman
9b093dab0a In @0x/contracts-rich-reverts: Move to a single contract file. Inherit from @0x/contracts-exchange/.../MExchangeRichErrorTypes.sol. 2019-07-23 15:21:14 -07:00
Lawrence Forman
84d433fa06 Update gitignore to ignore @0x/contracts/rich-reverts-decoder generated artifacts. 2019-07-23 15:21:14 -07:00
Lawrence Forman
e24b8947e0 In @0x/contracts-exchange: Pull types and constants from MExchangeRichErrors into MExchangeRichErrorTypes.
In `@0x/contracts-utils`: Pull types and constants from `MRichErrors` into `MRichErrorTypes`.
2019-07-23 15:21:14 -07:00
Lawrence Forman
7835c6e20c Create @0x/contracts-rich-reverts-decoder. 2019-07-23 15:21:14 -07:00
Lawrence Forman
d942c47f08 In @0x/contracts-exchange: Change parameter order and naming of some rich revert errors.
In `@0x/order-utils`: Change parameter order for `OrderStatusError`.
2019-07-23 15:21:14 -07:00
Lawrence Forman
fdaee1375c In @0x/contracts-exchange: Update tests for rich reverts 2019-07-23 15:21:14 -07:00
Lawrence Forman
d25a510291 In @0x/contracts-exchange: upgrading tests... 2019-07-23 15:21:14 -07:00
Lawrence Forman
0cb8586f68 Unpin coordinator deps.
Update coordinator tests for new tooling.
Remove unecessary `chainId` parameter in `eip712_utils.createCoordinatorApprovalTypeData`
2019-07-23 15:21:14 -07:00
Amir Bandeali
e42a0979bc Add return natspec to all MixinTransaction functions 2019-07-23 15:21:14 -07:00
Amir Bandeali
f1a78682aa Add batch fill method tests 2019-07-23 15:21:14 -07:00
Amir Bandeali
dc4bfde76d Fix linting errors 2019-07-23 15:21:14 -07:00
Amir Bandeali
e717625f86 Add batchExecuteTransactions tests 2019-07-23 15:21:14 -07:00
Amir Bandeali
41444e7ede Refactor transaction tests to iclude more combinations and to cover all revert cases 2019-07-23 15:21:14 -07:00
Amir Bandeali
ac9247195b Don't use exchangeDataEncoder as default for functions that don't involve orders 2019-07-23 15:21:14 -07:00
Amir Bandeali
fc2a59ceaa Update imports in tests 2019-07-23 15:21:13 -07:00
Amir Bandeali
72f4b216c1 Move exchange specific types. constants, and utils into exchange package 2019-07-23 15:21:13 -07:00
Amir Bandeali
d373f5488a Add functions with mutex to ReentrantERC20Token and update IExchange with missing function 2019-07-23 15:19:33 -07:00
Amir Bandeali
24906138c7 Make preSign compatible with executeTransaction 2019-07-23 15:19:33 -07:00
Amir Bandeali
f4b3b69b2f Move constants and exchangeDataEncoder into test-utils package 2019-07-23 15:19:33 -07:00
Amir Bandeali
e80abad19a Add batchExecuteTransaction 2019-07-23 15:18:26 -07:00
Amir Bandeali
c9c228ffdd Add return data to executeTransaction 2019-07-23 15:18:26 -07:00
Amir Bandeali
6fc30d31bf Fix missed conflicts and rebuild 2019-07-23 15:18:26 -07:00
Lawrence Forman
0bcd47b394 Add OrderValidator and WalletOrderValidator signature strategies to Exchange (#1774)
* In `@0x/contracts-exchange`: Add `SignatureType.OrderValidator` support to contracts and refactor signature validation functions.

* In `@0x/types`: Add `SignatureType.OrderValidator` and `RevertReason.InappropriateSignature`.

* In `@0x/contracts-exchange`: Fix contracts and update tests for `SignatureType.OrderValidator`.

* Ran prettier/linter

* Update changelogs

* In `@0x/order-utils`: Add `SignatureOrderValidatorError` to `ExchangeRevertErrors`.

* In `@0x/contracts-exchange`: Add `SignatureOrderValidatorError` rich revert. Fix rebase issues. Rename `IValidator.isValidOrder` to `IValidator.isValidOrderSignature`.

* In `@0x/contracts-exchange`: Add revert test cases for `OrderValidator` signature type.

* In `@0x/order-utils`: Update changelog.

* In `@0x/contracts-exchange`: Split off `SignatureType.OrderValidator` scheme into its own interface and registry.

* In `@0x/types`: Add `SignatureType.WalletOrderValidator`.

* In `@0x/order-utils`: Add `SignatureWalletOrderValidatorError`.

* In `@0x/contracts-exchange`: Add `SignatureType.WalletOrderValidator` support.

* Ran prettier

* In `@0x/types`: Remove `RevertReason.WalletOrderValidator`.

* Update/fix changelogs in `@0x/contracts-exchange`, `@0x/order-utils`, and `@0x/types`.

* In `@0x/contracts-exchange`: Make `isValidOrderSignature` `external` instead of `public`.

* In `@0x/contracts-exchange`: Change `isValidOrderSignature` back to `public` because passing `calldata` to internal functions isn't supported.
2019-07-23 15:18:26 -07:00
Lawrence Forman
c24bb139dd In @0x/contracts-exchange: Change validator/wallet return value test to == 1 instead of != 0. 2019-07-23 15:17:57 -07:00
Lawrence Forman
eb00ff05a8 Ran prettier/linter 2019-07-23 15:17:57 -07:00
Lawrence Forman
a7fe47f295 In @0x/contracts-exchange: Add SignatureWalletError and SignatureValidatorError rich reverts.
In `@0x/contracts-exchange`: Change `AssetProxyTransferError` to accept a `revertData` bytes instead of a `revertReason` string.
In `@0x/contracts-exchange`: Aadd `contracts/test/TestRevertReceiver.sol` for testing that validator/wallet reverts are properly wrapped.
2019-07-23 15:17:57 -07:00
Lawrence Forman
2a6f02c764 In @0x/order-utils: Add SignatureWalletError, SignatureValidatorError to ExchangeRevertErrors. Update AssetProxyTransferError to accept arbitrary errorData bytes instead of a revertReason string. 2019-07-23 15:17:57 -07:00
Amir Bandeali
1b2ff1f9ae Update contracts/exchange/contracts/src/MixinSignatureValidator.sol
Co-Authored-By: dorothy-zbornak <lawrence@0xproject.com>
2019-07-23 15:17:57 -07:00
Lawrence Forman
7de9a36d01 In @0x/contracts-exchange: Fix comments in MixinSignatureValidator.sol. 2019-07-23 15:17:57 -07:00
Lawrence Forman
cfa8796b18 In @0x/contracts-exchange: Fix line count linter error. 2019-07-23 15:17:57 -07:00
Lawrence Forman
3c88ede02c In @0x/order-utils: Add TransactionSignatureError to ExchangeRevertErrors.
In `@0x/contracts-exchange`: Add `TransactionSignatureError`, supplanting `TransactionErrorCodes.BAD_SIGNATURE`, and associated test.
2019-07-23 15:17:57 -07:00
Lawrence Forman
a0223835b8 In @0x/order-utils: Add signerAddress and signature to ExchangeRevertErrors.SignatureError.
In `@0x/contracts-exchange`: Add `signerAddress` and `signature` to `SignatureError` reverts.
2019-07-23 15:17:56 -07:00
Lawrence Forman
ac18359410 Switch order of parameters in some rich reverts for easier dirty parsing. 2019-07-23 15:17:56 -07:00
Lawrence Forman
8194e3d3c5 In @0x/contracts-exchange: More efficient revert string extraction in MixinAssetProxyDispatcher.sol 2019-07-23 15:17:56 -07:00
Lawrence Forman
440c4fe9b9 In @0x/contracts-utils switch from encodePacked to encodeWithSelector in RichErrors.StandardError 2019-07-23 15:17:56 -07:00
Lawrence Forman
e54f5d563f In @0x/contracts-utils add natspec comments RichErrors.StandardError 2019-07-23 15:17:56 -07:00
Lawrence Forman
5781ab5436 Add PRs to changelogs 2019-07-23 15:17:56 -07:00
Lawrence Forman
f8009dbb27 In @0x/contracts-test-utils: Update CHANGELOG 2019-07-23 15:17:56 -07:00
Lawrence Forman
15efe3ae31 Fix linter errors 2019-07-23 15:17:56 -07:00
Lawrence Forman
991348bbbe In @0x/contracts-extensions: Upgrade tests for rich reverts 2019-07-23 15:17:56 -07:00
Lawrence Forman
233336ea16 Ran prettier and linter 2019-07-23 15:17:56 -07:00
Lawrence Forman
20d8c1b51a In @0x/contracts-exchange: Update tests for rich reverts 2019-07-23 15:17:56 -07:00
Lawrence Forman
06499f2155 In @0x/contract-wrappers: Update tests 2019-07-23 15:17:56 -07:00
Lawrence Forman
5b1d9396d7 In @0x/order-utils: Rename Exchange RevertError error codes. 2019-07-23 15:17:56 -07:00
Lawrence Forman
633c5d5938 In @0x/utils add encode() method to RevertError 2019-07-23 15:17:56 -07:00
Lawrence Forman
2e846159a8 In @0x/dev-utils: swap order of equality check in RevertError chai helper from actual.equals(expected) to expected.equals(actual). 2019-07-23 15:17:56 -07:00
Lawrence Forman
4408604c2d In @0x/contracts-exchange: upgrading tests... 2019-07-23 15:17:56 -07:00
Lawrence Forman
15db5c8059 In @0x/contracts-exchange: Fix busted TestAssetProxyDispatcher.sol 2019-07-23 15:17:56 -07:00
Lawrence Forman
53121b1dd4 In @0x/order-utils: add AssetProxyTransferError Exchange RevertError 2019-07-23 15:17:56 -07:00
Lawrence Forman
c36dff6354 In @0x/contracts-exchange: Fix dispatchTransferFrom so it preserves the assetData. 2019-07-23 15:17:56 -07:00
Lawrence Forman
94a91ed5c8 In @0x/dev-utils: Tweak equality assertion failure actual and expected rendering to be more readable 2019-07-23 15:17:56 -07:00
Lawrence Forman
162a812189 In @0x/typescript-typings: Add types for @0x/dev-utils chai helpers in types/@0x.
In `@0x/dev-utils`: remove global typescript types for chai helpers in lieu of defining them in `@0x/typescript-typings`
2019-07-23 15:17:56 -07:00
Lawrence Forman
f06f0785f1 In @0x/contracts-test-utils: Inherit OrderStatus from @0x/types 2019-07-23 15:17:28 -07:00
Lawrence Forman
1aae68c614 In @0x/dev-utils: Break out RevertError helper code into a separate file from chai_setup.ts.
In `@0x/dev-utils`: Add chai support for ganache and geth transaction reverts.
2019-07-23 15:17:28 -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
abb71cd074 In @0x/order-utils: Rename ExchangeErrors to ExchangeRevertErrors. 2019-07-23 15:17:28 -07:00
Lawrence Forman
79cf9156eb In @0x/contracts-test-utils add generatePseudoRandomOrderHash() to orderUtils. 2019-07-23 15:16:49 -07:00
Lawrence Forman
3a6664282c In @0x/contracts-exchange: fix contract bugs introduced by changes 2019-07-23 15:16:49 -07:00
Lawrence Forman
e00ac37cb2 In @0x/dev-utils fix the RevertError chai helper's equal override not passing all arguments to previous handler.
In `@0x/dev-utils` add more `RevertError` chai helper tests for backwards compatibility with `rejectedWith`.
In `@0x/dev-utils` instead of overriding `rejectedWith`, add a new method `revertWith`.
In `@0x/dev-utils` clean up the code for the `RevertError` chai helper.
2019-07-23 15:16:49 -07:00
Lawrence Forman
6583ac9ba1 Make @0x/base-contract _throwIfRevertWithReasonCallResult decode and throw RevertErrors.
Remove no longer necessary dependency on `ethers.js` in `@0x/base-contract`.
2019-07-23 15:16:49 -07:00
Lawrence Forman
42963ea77d Use new RevertError nomenclature.
Tweak `RevertError` coercion in chai helper.
Add more `RevertError` chai helper tests.
2019-07-23 15:15:17 -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
5b25eb4fbd Fix linter errors. 2019-07-23 15:15:17 -07:00
Lawrence Forman
565cc7b3c8 Ran prettier 2019-07-23 15:15:17 -07:00
Lawrence Forman
71dc2690aa Export StandardError from @0x/utils 2019-07-23 15:15:17 -07:00
Lawrence Forman
3accd48ea8 Remove chai plugin dependencies from @0x/contract-test-utils and @0x/order-utils 2019-07-23 15:15:17 -07:00
Lawrence Forman
ed78bde359 Make the chai helper for rich reverts in dev-utils more robust.
Add rich reverts chai helper tests to `dev-utils`
2019-07-23 15:14:52 -07:00
Lawrence Forman
ff1a3ab307 Add Exchange rich revert types to @0x/order-utils 2019-07-23 15:14:13 -07:00
Lawrence Forman
26643a489b Add RichRevertReason type and utilities to @0x/utils 2019-07-23 15:13:26 -07:00
Lawrence Forman
5955a541a3 In order-utils, inherit chaiSetup from @0x/dev-utils 2019-07-23 15:13:26 -07:00
Lawrence Forman
995669cccd In contract-wrappers, inherit chaiSetup from @0x/dev-utils 2019-07-23 15:13:26 -07:00
Lawrence Forman
371dc347cc Inherit chaiSetup from @0x/dev-utils 2019-07-23 15:13:26 -07:00
Lawrence Forman
9a162e5d5c Add RichRevertAbi to etherem-types 2019-07-23 15:13:26 -07:00
Lawrence Forman
9319f362bb Add chaiSetup function wtih rich revert support to @0x/dev-utils 2019-07-23 15:12:33 -07:00
Lawrence Forman
8305168bc4 Add OrderStatus to @0x/types 2019-07-23 15:12:03 -07:00
Lawrence Forman
e8ecbe32ca Convert exchange MixinWrapperFunctions to use rich reverts 2019-07-23 15:10:31 -07:00
Lawrence Forman
bc5c5050fb Convert MixinTransactions to use rich reverts 2019-07-23 15:10:31 -07:00
Lawrence Forman
8a9b9c55ce Convert MixinSignatureValidator to use rich reverts 2019-07-23 15:10:31 -07:00
Lawrence Forman
d40f343d2a Convert MixinMatchOrders to use rich reverts 2019-07-23 15:10:31 -07:00
Lawrence Forman
4954d0a018 Convert MixinExchangeCore to use rich errors. 2019-07-23 15:10:31 -07:00
Lawrence Forman
7232bef07b Change LibRichErrors to just RichErrors.
Fix compilation issues in `exchange`.
2019-07-23 15:10:31 -07:00
Lawrence Forman
7277fb3d93 Convert to use rich reverts 2019-07-23 15:10:31 -07:00
Lawrence Forman
34e0345b29 Reimplementing rich reverts in the contracts. 2019-07-23 15:10:31 -07:00
Amir Bandeali
f094e9118c Fix inconsistent pragma for ABIEncoderV2 2019-07-23 15:10:31 -07:00
Amir Bandeali
63e93d9253 Update CHANGELOGs 2019-07-23 15:10:31 -07:00
Amir Bandeali
2ec0d421f7 Cleanup LibEIP712 domain contracts 2019-07-23 15:09:46 -07:00
Amir Bandeali
8ddc890e10 Refactor BalanceThresholdFilter to use new ITransaction interface 2019-07-23 15:09:46 -07:00
Amir Bandeali
095c899913 Refactor coordinator to use new ITransactions interface 2019-07-23 15:09:46 -07:00
Amir Bandeali
e0d6a3fd1d Refactor executeTransaction to take ZeroExTransaction struct as input 2019-07-23 15:09:46 -07:00
Amir Bandeali
308ff15adc Refactor EIP712 libraries 2019-07-23 15:09:46 -07:00
Lawrence Forman
c195629a77 Update changelogs. 2019-07-23 15:08:58 -07:00
Lawrence Forman
6af5a67a17 Fix import order in contracts/test-utils 2019-07-23 15:08:30 -07:00
Lawrence Forman
0b38289703 Ran prettier 2019-07-23 15:08:30 -07:00
Lawrence Forman
041bf9b54e Rename orderWithoutExchangeAddress -> orderWithoutDomain in contracts/exchange tests. 2019-07-23 15:08:30 -07:00
Lawrence Forman
5a6cf2b690 Rename orderWithoutExchangeAddress -> orderWithoutDomain in contracts/test-utils/.../formatters.ts. 2019-07-23 15:08:30 -07:00
Lawrence Forman
2e44bb6085 Fix removing domain and signature fields from order 2019-07-23 15:08:30 -07:00
Lawrence Forman
b8f056b82f Update coordinator, exchange-forwarder, exchange-libs, exchange, and extensions contract tests to use new order and transaction structure 2019-07-23 15:08:00 -07:00
Lawrence Forman
259b463b73 Update contracts/test-utils to use new Order structure and domain schema. 2019-07-23 15:08:00 -07:00
Lawrence Forman
4aae7348d1 Update fill-scenarios, contract-wrappers, contract-artifacts, abi-gen-wrappers to use new domain schema and Order format. 2019-07-23 15:08:00 -07:00
Lawrence Forman
665942a8c9 Update order-utils package for new Order structure 2019-07-23 15:04:46 -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
55f3322576 Rename eip712domain field in Order and ZeroExTransaction to just domain. 2019-07-23 15:04:46 -07:00
Lawrence Forman
376f068719 Add eip712DomainSchema to json-schemas.
Add required field `domain` to `order` and `zeroExTransaction` schemas.
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
53b1037a33 contracts/exchange-libs/contracts/test/TestLibs now inherits from LibEIP712ExchangeDomain rather than LibEIP712 2019-07-23 15:04:46 -07:00
Lawrence Forman
2b5cd02bd9 Remove deleted coordinator test contracts that accidentally survived the rebase 2019-07-23 15:04:46 -07:00
Lawrence Forman
e5fed57b8b Make contracts/exchange-libs/.../LibEIP712.sol stateless 2019-07-23 15:04:46 -07:00
Lawrence Forman
a0b1f3efa2 Fix typo in exchange-libs test. 2019-07-23 15:04:46 -07:00
Lawrence Forman
f7fb1225d2 Add more LibEIP712 tests to exchange-libs 2019-07-23 15:04:46 -07:00
Lawrence Forman
b380952ff9 Add test to exchange-libs to ensure that a different chainId results in a different order hash. 2019-07-23 15:04:46 -07:00
Lawrence Forman
2524e7eea3 Update changelogs 2019-07-23 15:04:46 -07:00
Lawrence Forman
32460f00f8 Add chainId to order json-schemas tests. 2019-07-23 14:59:31 -07:00
Lawrence Forman
d58d7f457d Update coordinator decodeOrdersFromFillData tests to include chainId 2019-07-23 14:59:31 -07:00
Lawrence Forman
232a43f34f Update contract-wrappers tests. 2019-07-23 14:59:31 -07:00
Lawrence Forman
94f5a039d2 Update migrations for coordinator and exchange contracts. 2019-07-23 14:59:31 -07:00
Lawrence Forman
7a4ae74727 Add chainId to order JSON schema 2019-07-23 14:59:31 -07:00
Lawrence Forman
1295de4c78 Update generated wrappers for coordinator and exchange. 2019-07-23 14:59:31 -07:00
Lawrence Forman
77ed54f64d Ran prettier 2019-07-23 14:58:00 -07:00
Lawrence Forman
e51b425200 Unpin coordinator deps.
Update coordinator tests for new tooling.
Remove unecessary `chainId` parameter in `eip712_utils.createCoordinatorApprovalTypeData`
2019-07-23 14:58:00 -07:00
Lawrence Forman
e6aff19a0c Clearer usage of chainId constants in order-utils tests. 2019-07-23 14:58:00 -07:00
Lawrence Forman
bd06c7b343 Remove lingering invalid calls to OrderStateUtils() 2019-07-23 14:58:00 -07:00
Lawrence Forman
c096eae644 All glory to the linter gods. 2019-07-23 14:58:00 -07:00
Lawrence Forman
f77823ee24 Remove unused chainId variables in signature_utils.ts.
Obey the linter gods.
2019-07-23 14:58:00 -07:00
Lawrence Forman
35f568e346 Update exchange-forwarder tests. 2019-07-23 14:58:00 -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
Lawrence Forman
92fe720ac3 Remove unused LibOrder inheritance from MixinBalanceThresholdFilterCore from /contracts/extensions. 2019-07-23 14:58:00 -07:00
Lawrence Forman
74a9a13564 Unpin @0x/contracts-exchange dependency in /contracts/coordinator.
Split up EIP712 constants and functionality in `/contracts/exchange-libs` across 3, modular contracts.
Make coordinator inherit from the modular EIP712 contracts in `@0x\contracts-exchange`.
2019-07-23 14:58:00 -07:00
Lawrence Forman
7aaef5d807 Fix missing comma in LibEIP712.sol domain schema.
Add `chainId` to constructors for all test contracts deriving from `LibEIP712.sol`
2019-07-23 14:58:00 -07:00
Lawrence Forman
64b4158bad Refactor EIP712 contracts to reduce code duplication. 2019-07-23 14:58:00 -07:00
Lawrence Forman
4bbaa6b41c Update tooling/types to incorporate chainID in domain separators. 2019-07-23 14:58:00 -07:00
Lawrence Forman
964d8171dd Update exchange and coordinator contracts to incorporate chainID in their domain separators. 2019-07-23 14:58:00 -07:00
Lawrence Forman
5b1cbbf157 Fix merge artifact in contracts/exchange/CHANGELOG.json.
Correct changelog for `contracts/exchange-forwarder` after rebase.
2019-07-23 14:58:00 -07:00
Lawrence Forman
db4c29a73c Apply and mask to assembly address instruction in exchange/.../ReentrantERC20Token.sol 2019-07-23 14:58:00 -07:00
Lawrence Forman
4f73008d95 Fix typo in changelog 2019-07-23 14:58:00 -07:00
Lawrence Forman
1b73cb28f1 Update changelog 2019-07-23 14:58:00 -07:00
Lawrence
367c981642 Update changelogs 2019-07-23 14:58:00 -07:00
Lawrence Forman
3d30eb0748 Remove sol-doc from circlci 2019-07-23 14:58:00 -07:00
Lawrence Forman
34ffdad521 Manually build @0x/monorepo-scripts 2019-07-23 14:58:00 -07:00
Lawrence Forman
4f82c0c289 Edit circleci config to omit tests we aren't interested in for 3.0 2019-07-23 14:58:00 -07:00
Lawrence
fd68746dd7 Fix typo in docstring for ReentrantERC20Token.createOrders. 2019-07-23 14:54:24 -07:00
Lawrence
bec7d1265b Fix styling issues in ReentrantERC20Token.
Apply gas golfing suggestions in ReentrantERC20Token.
Describe ERC20 AssetData format in ReentrantERC20Token.
2019-07-23 14:54:24 -07:00
Lawrence
620eb2a3be Shave off an SLOAD op in ReentrancyGuard. 2019-07-23 14:54:24 -07:00
Lawrence
e6971c45c8 Update PRs in changelogs. 2019-07-23 14:54:24 -07:00
Lawrence
961cd0825c Add comment to ReentrantERC20Token about proper testing procedure 2019-07-23 14:54:24 -07:00
Lawrence
a1cb702ecb Update changelogs 2019-07-23 14:54:24 -07:00
Lawrence
befc14c980 Ran linter 2019-07-23 14:52:57 -07:00
Lawrence
ff0ad53c11 Update exchange reentrancy tests to work with lazy reentrancy detection. 2019-07-23 14:52:57 -07:00
Lawrence
cf0e57d7ce Converting tests to support new lazy reentrancy checking. 2019-07-23 14:52:57 -07:00
Lawrence Forman
9883e3ed2e Implement new ReentrancyGuard contract. 2019-07-23 14:52:57 -07:00
David Sun
10b7d7da3f Merge pull request #1984 from 0xProject/feature/website/add-vote-faq
Add FAQ link to vote page
2019-07-23 10:28:50 -07:00
David Sun
97a8c6e5af Updated CHANGELOG.json 2019-07-23 10:27:55 -07:00
David Sun
e69d2bb54a Add FAQ link to vote page 2019-07-23 10:06:39 -07:00
F. Eugene Aumson
ead8099109 Auto-gen Python Exchange wrapper (#1919)
* Rename existing wrapper, to match contract name

* base contract: make member var public

* json_schemas.py: stop storing copies of schemas!

* .gitignore generated erc20_token.py wrapper

* json schemas: allow uppercase digits in address

* existing exchange wrapper: re-order methods

to match method order in Solidity contract, to reduce noise in upcoming
diffs of newly generated code vs. old manually-written code.

* existing exchange wrapper: rename method params

To match contract method param names

* existing exchange wrapper: remove redundant member

* existing exchange wrapper: make signatures bytes

Not strings.

* abi-gen/test-cli: show context on diff failure

* abi-gen-templates/Py: fix broken event interface

Previous changes had removed the `token_address` parameter from all
generated methods, but this instance was missed because there weren't
tests/examples using events for the first contract for which wrappers
were generated (ERC20Token).

* abi-gen: remove unused method parameters

* abi-gen: convert Py method params to snake case

* abi-gen: rewrite Python tuple handling

* python-generated-wrappers: include Exchange

* abi-gen-templates/Py: easy linter fixes

* abi-gen-templates/Py: satisfy docstring linters

* abi-gen-templates/Py: normalize bytes before use

* contract_wrappers.py: replace Exchange w/generated

* contract_wrappers.py: rm manually written Exchange

* contract_wrappers.py/doctest: rename variables

* abi-gen: fix misspelling in docstring

Co-Authored-By: Fabio B <me@fabioberger.com>

* Py docs: error on warning, and test build in CI

* abi-gen: doc Py bytes params as requiring UTF-8

* abi-gen: git mv diff.sh test-cli/

* abi-gen: put Py wrapper in module folder, not file

This leaves space for user-defined additions to the same module, such as
for custom types, as shown herein.

* abi-gen: customizable param validation for Python

* contract_wrappers.py: JSON schema Order validation

* CircleCI Build Artifacts

For abi-gen command-line test output, for generated Python contract
wrappers as output by abi-gen, for generated Python contract wrappers as
reformatted and included in the Python package area, and for the "build"
output folder in each Python package, which includes the generated
documentation.

* CHANGELOG updates for all components

* abi-gen: grammar in comments

Co-Authored-By: Fabio B <me@fabioberger.com>

* abi-gen: CHANGELOG spelling correction

Co-Authored-By: Fabio B <me@fabioberger.com>

* order_utils.py: reverse (chronological) CHANGELOG

* abi-gen-templates: reset CHANGELOG patch version

* CHANGELOGs: use multiple entries where appropriate

* abi-gen: enable devdoc solc output in test-cli

* abi-gen-templates/Py: consolidate return type

* abi-gen/test-cli: non-pure fixture contract method

Added a method to the "dummy" test fixture contract that isn't pure.
All of the other prior method cases were pure.

* abi-gen/Py: fix const methods missing return type

* abi-gen/Py: fix wrong return types on some methods

Specifically, wrapper methods wrapping contract methods that modify
contract state and return no return value.  There was no test case for
this.  Now there is.

* contract_wrappers.py: rm generated code in `clean`

* Parallelize Py monorepo scripts (test, lint, etc)
2019-07-23 12:58:18 -04:00
Chris Kalani
9d455b2bca Adding Alex Towle to team page 2019-07-23 16:19:27 +02:00
Jacob Evans
1e6e74878f Merge pull request #1981 from 0xProject/fix/vote-copy
Update vote copy
2019-07-23 21:03:10 +10:00
Fabio Berger
cbcede3b63 Add missing backslash that is part of registry URL comparison in Lerna 2019-07-23 04:01:17 -07:00
Jacob Evans
98fd731485 Added SVGs for voting 2019-07-23 18:09:10 +10:00
Jacob Evans
9ca319b4ea Update vote copy 2019-07-23 15:25:02 +10:00
Fabio B
ff8fabf49e Merge pull request #1979 from 0xProject/fix/updateLerna
Update Lerna fork to latest version
2019-07-23 00:07:55 +02:00
fabioberger
1e00f68941 Update Lerna version and make necessary changes to accomodate the new version 2019-07-22 23:23:11 +02:00
David Sun
6c79edd3b2 Merge pull request #1978 from 0xProject/feature/website/add-FAQ-annoucement
Add announcement for vote
2019-07-22 14:08:26 -07:00
David Sun
b79bc6bab9 add announcement 2019-07-22 12:45:46 -07:00
Fabio B
c59d886662 Merge pull request #1974 from 0xProject/removeMetacoin
Remove metacoin example from monorepo
2019-07-19 22:02:38 +02:00
fabioberger
e39dce6159 Remove metacoin example from monorepo 2019-07-19 19:38:08 +02:00
Fabio B
620c66fb4c Merge pull request #1972 from 0xProject/fix/deprecateOrderWatcher
Deprecate @0x/order-watcher
2019-07-19 19:35:21 +02:00
F. Eugene Aumson
3af91d54cb Delete pipeline.env.gpg 2019-07-19 13:06:21 -04:00
fabioberger
1fe1bcff98 Stop publishing new order watcher versions to Docker Hub 2019-07-19 17:50:12 +02:00
fabioberger
c58c12c5b3 Add deprecation warnings for @0x/order-watcher 2019-07-19 17:49:57 +02:00
Jacob Evans
1aeea39eb3 Merge pull request #1967 from bstchow/issue-1945-fix
[Issue #1945] Downcase address comparison in private_key_wallet.ts in subproviders module
2019-07-18 10:57:27 +10:00
David Sun
d3fbf020de Merge pull request #1966 from 0xProject/feature/asset-swapper/expanding-options-utils
Added options, features for asset-swapper
2019-07-17 15:43:05 -07:00
David Sun
8ce8bee76f prettier + lint 2019-07-17 15:22:48 -07:00
David Sun
dcf4eb2aaf utils moved to SwapQuoter and polished Doc Strings 2019-07-17 15:12:59 -07:00
David Sun
88ff38eca6 fixed build issues 2019-07-17 13:38:30 -07:00
David Sun
bf0d90d079 added options, features for asset-swapper 2019-07-17 11:56:27 -07:00
Amir Bandeali
c4d9ef9f83 Merge pull request #1964 from 0xProject/feature/contracts/consistentErrorCodes
Update MAP + add validation to assetDataUtils
2019-07-17 11:15:11 -07:00
Xianny
37bce53683 Normalize address inputs to lowercase in generated wrappers (#1951) 2019-07-17 10:13:28 -07:00
Amir Bandeali
05d50b62c9 Update CHANGELOG 2019-07-17 09:37:42 -07:00
Amir Bandeali
eb2fb7f790 Fix linting error 2019-07-17 09:37:42 -07:00
Amir Bandeali
d280ccb3c4 Add better validation to assetDataUtils 2019-07-17 09:37:42 -07:00
Amir Bandeali
a569815840 Fix assetData length check and improve readability 2019-07-17 09:37:42 -07:00
Greg Hysen
9e41c3093b Conforming to error codes in ERC1155 Proxy 2019-07-17 09:37:42 -07:00
Amir Bandeali
9dbc9a8ad9 Merge pull request #1963 from 0xProject/feat/contracts/non-asm-proxies
Implement ERC1155Proxy and StaticCallProxy in Solidity
2019-07-17 09:23:25 -07:00
Jacob Evans
c940157814 Merge pull request #1908 from 0xProject/feature/vote_index_page
Implement the vote index page
2019-07-17 18:27:09 +10:00
Jacob Evans
4f19875a58 Remove commented routes 2019-07-17 15:17:54 +10:00
Jacob Evans
dcbadb2386 Update Vote form 2019-07-17 15:04:33 +10:00
Jacob Evans
405a7b2037 Update dates to 22nd July 2019-07-17 15:04:33 +10:00
Jacob Evans
e69ad24737 Update ZEIP-ID propagation 2019-07-17 15:04:32 +10:00
Jacob Evans
a31056a4ec Fix PR comments 2019-07-17 15:04:32 +10:00
Jacob Evans
d41dddddcd Update subheader copy 2019-07-17 15:04:32 +10:00
Jacob Evans
251ae50d3e Update copy, fetch data 2019-07-17 15:04:32 +10:00
fragosti
4ccd2d4955 Comment out route and replace with redirect 2019-07-17 15:04:31 +10:00
fragosti
dfb79e0998 Remove Zeip type, use zeip id in governance page CTA 2019-07-17 15:04:31 +10:00
fragosti
590055e2ba Fix date formatting 2019-07-17 15:04:31 +10:00
fragosti
f388751a97 Implement the vote index page with routing to voting pages 2019-07-17 15:04:31 +10:00
Amir Bandeali
53136caaa4 Add test for when staticCallTarget is an EOA 2019-07-16 16:00:38 -07:00
David Sun
dd20d8d6de Merge pull request #1959 from 0xProject/feature/asset-swapper/minor-changes
Minor changes to Asset-swapper
2019-07-16 13:05:25 -07:00
Xianny
a977957946 Require compiler field in published artifacts for v3 (#1961) 2019-07-16 12:25:08 -07:00
David Sun
8974fcabe3 Prettier 2019-07-16 11:03:00 -07:00
Brandon Chow
aff8e1e025 Remove the timestamp from subproviders CHANGELOG.json (should be automatically added) and run 'yarn prettier' to format changes. 2019-07-16 09:51:18 -07:00
Amir Bandeali
10d767c5ab Update ERC1155Proxy tests 2019-07-15 22:08:23 -07:00
Amir Bandeali
77484dc69e Implement ERC1155Proxy in Solidity 2019-07-15 22:08:08 -07:00
Amir Bandeali
185e2342d9 Update StaticCallProxy tests 2019-07-15 22:07:31 -07:00
Amir Bandeali
54f4727adc Implement StaticCallProxy in Solidity 2019-07-15 22:07:15 -07:00
Brandon Chow
6e0f982163 Downcase addresses when checking for address equality in signTransactionAsync in the private key subprovider 2019-07-15 18:35:05 -07:00
Brandon Chow
43072ef80d Add test for checksummed addresses being valid inputs for tx origin when calling signTransactionAsync in the private key subprovider 2019-07-15 18:33:33 -07:00
David Sun
7618e63f49 expanded constants 2019-07-15 15:53:06 -07:00
David Sun
542255332d changed market-operation type to enum from literal 2019-07-15 15:29:13 -07:00
David Sun
6d6e7e1468 Merge pull request #1958 from 0xProject/feature/asset-swapper/package-readme.md-update
Updated README.md for asset-swapper
2019-07-15 15:09:01 -07:00
David Sun
0ff88d5c21 fix typo 2019-07-15 14:26:04 -07:00
David Sun
092e35bae3 updated README.md 2019-07-15 14:17:41 -07:00
Fabio Berger
ac82b2622c Publish
- 0x.js@6.0.12
 - @0x/abi-gen-wrappers@5.0.2
 - @0x/asset-buyer@6.1.8
 - @0x/asset-swapper@0.0.4
 - @0x/connect@5.0.13
 - @0x/contract-addresses@3.0.2
 - @0x/contract-wrappers@9.1.7
 - @0x/fill-scenarios@3.0.13
 - @0x/instant@1.0.27
 - @0x/metacoin@0.0.54
 - @0x/migrations@4.1.9
 - @0x/order-utils@8.2.2
 - @0x/order-watcher@4.0.14
 - @0x/testnet-faucets@1.0.83
 - @0x/website@0.0.86
 - @0x/contracts-asset-proxy@2.2.2
 - @0x/contracts-coordinator@2.0.7
 - @0x/contracts-dev-utils@0.0.4
 - @0x/contracts-erc1155@1.1.9
 - @0x/contracts-erc20@2.2.8
 - @0x/contracts-erc721@2.1.9
 - @0x/contracts-exchange@2.1.8
 - @0x/contracts-exchange-forwarder@3.0.6
 - @0x/contracts-exchange-libs@3.0.2
 - @0x/contracts-extensions@4.0.2
 - @0x/contracts-multisig@3.1.8
 - @0x/contracts-test-utils@3.1.10
 - @0x/contracts-utils@3.1.9
2019-07-15 05:23:02 -07:00
Fabio Berger
7197cb57cd Updated CHANGELOGS 2019-07-15 05:22:51 -07:00
Fabio B
030d66cb63 Merge pull request #1955 from 0xProject/feature/contract-addresses/order-validator-2.1
Redeploy OrderValidator on testnets and update addresses
2019-07-15 13:34:34 +02:00
F. Eugene Aumson
d414e6a7c4 0x-contract-addresses.py: changelog for redeploy 2019-07-15 02:26:07 -04:00
Amir Bandeali
30f9c94620 Redeploy OrderValidator on testnets and update addresses 2019-07-13 21:07:52 -07:00
Fabio Berger
b6b618e5ce Publish
- 0x.js@6.0.11
 - @0x/abi-gen@2.1.1
 - @0x/abi-gen-wrappers@5.0.1
 - @0x/asset-buyer@6.1.7
 - @0x/asset-swapper@0.0.3
 - @0x/connect@5.0.12
 - @0x/contract-addresses@3.0.1
 - @0x/contract-wrappers@9.1.6
 - @0x/dev-tools-pages@0.0.29
 - @0x/fill-scenarios@3.0.12
 - @0x/instant@1.0.26
 - @0x/metacoin@0.0.53
 - @0x/migrations@4.1.8
 - @0x/order-utils@8.2.1
 - @0x/order-watcher@4.0.13
 - @0x/python-contract-wrappers@1.0.2
 - @0x/react-docs@2.0.14
 - @0x/react-shared@2.0.14
 - @0x/testnet-faucets@1.0.82
 - @0x/website@0.0.85
 - @0x/contracts-asset-proxy@2.2.1
 - @0x/contracts-coordinator@2.0.6
 - @0x/contracts-dev-utils@0.0.3
 - @0x/contracts-erc1155@1.1.8
 - @0x/contracts-erc20@2.2.7
 - @0x/contracts-erc721@2.1.8
 - @0x/contracts-exchange@2.1.7
 - @0x/contracts-exchange-forwarder@3.0.5
 - @0x/contracts-exchange-libs@3.0.1
 - @0x/contracts-extensions@4.0.1
 - @0x/contracts-multisig@3.1.7
 - @0x/contracts-test-utils@3.1.9
 - @0x/contracts-utils@3.1.8
2019-07-13 13:00:33 -07:00
Fabio Berger
0bb8887027 Updated CHANGELOGS 2019-07-13 13:00:21 -07:00
Fabio B
fabfdd0aa2 Merge pull request #1954 from 0xProject/fix/updateRemainingV2Addresses
Update remaining V2.1 contract address changes
2019-07-13 21:27:36 +02:00
fabioberger
8f8336b344 Fix version issues causing CI to fail 2019-07-13 21:04:16 +02:00
fabioberger
d10659f986 Update remaining V2.1 contract address changes 2019-07-13 20:25:47 +02:00
Fabio Berger
e853555165 Publish
- 0x.js@6.0.10
 - @0x/abi-gen@2.1.0
 - @0x/abi-gen-templates@2.2.1
 - @0x/abi-gen-wrappers@5.0.0
 - @0x/assert@2.1.0
 - @0x/asset-buyer@6.1.6
 - @0x/asset-swapper@0.0.2
 - @0x/base-contract@5.1.1
 - @0x/connect@5.0.11
 - @0x/contract-addresses@3.0.0
 - @0x/contract-artifacts@2.0.1
 - @0x/contract-wrappers@9.1.5
 - @0x/contracts-gen@1.0.10
 - @0x/dev-tools-pages@0.0.28
 - @0x/dev-utils@2.2.4
 - ethereum-types@2.1.3
 - @0x/fill-scenarios@3.0.11
 - @0x/instant@1.0.25
 - @0x/json-schemas@3.0.11
 - @0x/metacoin@0.0.52
 - @0x/migrations@4.1.7
 - @0x/monorepo-scripts@1.0.33
 - @0x/order-utils@8.2.0
 - @0x/order-watcher@4.0.12
 - @0x/python-contract-wrappers@1.0.1
 - @0x/react-docs@2.0.13
 - @0x/react-shared@2.0.13
 - @0x/sol-compiler@3.1.9
 - @0x/sol-coverage@3.0.6
 - @0x/sol-doc@2.0.13
 - @0x/sol-profiler@3.1.8
 - @0x/sol-resolver@2.0.8
 - @0x/sol-trace@2.0.14
 - @0x/sol-tracing-utils@6.0.13
 - @0x/sra-spec@2.0.11
 - @0x/subproviders@4.1.1
 - @0x/testnet-faucets@1.0.81
 - @0x/types@2.4.0
 - @0x/typescript-typings@4.2.3
 - @0x/utils@4.4.0
 - @0x/web3-wrapper@6.0.7
 - @0x/website@0.0.84
 - @0x/contracts-asset-proxy@2.2.0
 - @0x/contracts-coordinator@2.0.5
 - @0x/contracts-dev-utils@0.0.2
 - @0x/contracts-erc1155@1.1.7
 - @0x/contracts-erc20@2.2.6
 - @0x/contracts-erc721@2.1.7
 - @0x/contracts-exchange@2.1.6
 - @0x/contracts-exchange-forwarder@3.0.4
 - @0x/contracts-exchange-libs@3.0.0
 - @0x/contracts-extensions@4.0.0
 - @0x/contracts-multisig@3.1.6
 - @0x/contracts-test-utils@3.1.8
 - @0x/contracts-utils@3.1.7
2019-07-13 01:33:08 -07:00
Fabio Berger
2ce09d73ac Updated CHANGELOGS 2019-07-13 01:32:53 -07:00
Fabio B
14f48a5f4f Merge pull request #1952 from 0xProject/fix/redeployed-2.0-mainnet
Redeployed 2.0 Mainnet
2019-07-13 09:45:59 +02:00
Jacob Evans
8da4e4a830 Redployed 2.0 Mainnet 2019-07-13 16:57:13 +10:00
Xianny
88ae8311c8 Copy dutch auction asset data utils to @0x/order-utils (#1943)
* copy dutch auction assetdata utils to @0x/order-utils

* encode/decode dutch auction asset data using order-utils
2019-07-12 17:27:06 -07:00
David Sun
eabf6a466a Fix abi-gen-wrappers dependencies 2019-07-12 16:35:50 -07:00
David Sun
989f691d06 updated dependencies versioning in package.json 2019-07-12 16:13:05 -07:00
David Sun
52a3dae7cb Merge pull request #1950 from 0xProject/feature/CFL/light-refactor
Asset-swapper method interface change
2019-07-12 15:44:41 -07:00
David Sun
8a6dfacf71 inverted erc and assetdata getSwapQuote naming 2019-07-12 15:30:25 -07:00
Xianny
19ca6c13ad Copy validation methods from ExchangeWrapper to order-utils (#1937) 2019-07-12 15:06:32 -07:00
Fabio Berger
9196f122dd Fix 0x.js version 2019-07-12 14:51:14 -07:00
David Sun
55e3d81c58 updating CHANGELOG.json + package.json 2019-07-12 14:38:19 -07:00
David Sun
80caa16718 Merge pull request #1949 from 0xProject/feature/fix-monorepo-scripts
Fix case in pre-publish write access checks
2019-07-12 14:00:35 -07:00
David Sun
ddc5aaacdb Update condition for readability
Co-Authored-By: Fabio B <me@fabioberger.com>
2019-07-12 13:39:41 -07:00
David Sun
38825865cc prettier 2019-07-12 13:32:27 -07:00
David Sun
157b2efa1d fix to not throw on new packages 2019-07-12 13:16:00 -07:00
F. Eugene Aumson
212a2d229a This one weird trick cuts contract test runtime by over 50% in CI (#1941)
* CI: Collapse each test task to a single wsrun call

* Restore test-rest to invoking wsrun many times
2019-07-12 14:11:53 -04:00
Xianny
ccb89fb26a prettify generated code for easier diffing (#1944) 2019-07-11 16:03:14 -07:00
David Sun
3a0b0c0973 Merge pull request #1939 from 0xProject/CFL
Asset-swapper 0.0.1 merge
2019-07-11 15:42:15 -07:00
David Sun
c159ed9ebb updated changelog 2019-07-11 15:16:45 -07:00
David Sun
e37dbcc273 updated package.json 2019-07-11 15:16:45 -07:00
David Sun
841e660b1f light fixes 2019-07-11 15:16:45 -07:00
David Sun
391aba5f37 updated CHANGELOG.json 2019-07-11 15:16:40 -07:00
David Sun
f5d30f4a07 Update packages/asset-buyer/src/swap_quoter.ts
Co-Authored-By: Jacob Evans <jacob@dekz.net>
2019-07-11 15:15:30 -07:00
David Sun
230cf7dfb7 Update packages/asset-buyer/src/swap_quoter.ts
Co-Authored-By: Jacob Evans <jacob@dekz.net>
2019-07-11 15:15:30 -07:00
David Sun
8734b70f83 updated README.md 2019-07-11 15:15:09 -07:00
David Sun
ff9a2b2d9a fixed docs issues 2019-07-11 15:15:09 -07:00
David Sun
a41dab2922 Commit coverage directory 2019-07-11 15:15:09 -07:00
David Sun
f4504106a1 adding back asset-buyer for legacy support 2019-07-11 15:15:09 -07:00
David Sun
1a5b8041c7 renamed to asset-swapper 2019-07-11 15:15:09 -07:00
David Sun
1e2170f8bb reverting change to abi-gen 2019-07-11 15:15:09 -07:00
David Sun
0a4a973a7f changes to types for doc generation 2019-07-11 15:15:09 -07:00
David Sun
67137cadac made get Consumer private 2019-07-11 15:15:09 -07:00
David Sun
ead4afa06b fixed linting issues 2019-07-11 15:15:09 -07:00
David Sun
e39ef95191 fixed build issues 2019-07-11 15:15:09 -07:00
David Sun
3d7585671f refactored 2019-07-11 15:15:09 -07:00
David Sun
44806106db prettier 2019-07-11 15:15:09 -07:00
David Sun
6a8197a4e8 linting issues 2019-07-11 15:15:09 -07:00
David Sun
4d4b4e0f2b lint + prettier 2019-07-11 15:15:09 -07:00
David Sun
82da33d742 light refactor 2019-07-11 15:15:09 -07:00
David Sun
1c6130a492 fixed market utils 2019-07-11 15:15:09 -07:00
David Sun
dabe5e939f fixed bugs 2019-07-11 15:15:09 -07:00
David Sun
b4ac6d3439 refactored types and market sell operation 2019-07-11 15:15:09 -07:00
David Sun
d0ea74e180 fixed linting issues 2019-07-11 15:15:08 -07:00
David Sun
a5f77f3964 prettier 2019-07-11 15:15:08 -07:00
David Sun
9401bb53e8 added testing for generating swap quotes 2019-07-11 15:15:08 -07:00
David Sun
347c6d02cf upgraded exchange sell with market sell 2019-07-11 15:15:08 -07:00
David Sun
64a0080616 add forwarder logic for market sell 2019-07-11 15:15:08 -07:00
David Sun
288a7d4cea refactored for market sell + buy 2019-07-11 15:15:08 -07:00
David Sun
1207b68f57 added market-sell logic 2019-07-11 15:15:08 -07:00
David Sun
2b82187fe0 expanded swap quoter to create market sell swap quotes 2019-07-11 15:15:08 -07:00
David Sun
3e2dbfc83c added testing to market utils for market sell 2019-07-11 15:15:08 -07:00
David Sun
6691f490bc changes to order utils 2019-07-11 15:15:08 -07:00
David Sun
a7db900e51 added types 2019-07-11 15:15:08 -07:00
David Sun
cfa2a90dae prettier 2019-07-11 15:15:08 -07:00
David Sun
feebb45e9d fixed linting issues 2019-07-11 15:15:08 -07:00
David Sun
13a2f3a330 updated to async 2019-07-11 15:15:08 -07:00
David Sun
1da8801084 switched from arrow functions 2019-07-11 15:15:08 -07:00
David Sun
7a7b17c4f3 fixed naming of utils 2019-07-11 15:15:08 -07:00
David Sun
2afb06de13 refactored forwarder to utilize utils 2019-07-11 15:15:08 -07:00
David Sun
ac771e2865 finished exchange swap quote consumer 2019-07-11 15:15:08 -07:00
David Sun
4b09204936 framework for exchange swap quote consumer 2019-07-11 15:15:08 -07:00
David Sun
e4a5518a7c refactored exchange swap quote consumer 2019-07-11 15:15:08 -07:00
David Sun
e83507ba98 added structure of exchange consumer 2019-07-11 15:15:08 -07:00
David Sun
6e5b77edb2 initial commit of exchange_swap_quote consumer 2019-07-11 15:15:08 -07:00
David Sun
98167da8fa fixing build issues
fixed build issues

prettier
2019-07-11 15:15:08 -07:00
David Sun
11d5fec59b changes on affiliate fee and other changes
bumped version to 7 and added changelog

updated package.json

revert change to package.json

trying this package.json config
2019-07-11 15:15:08 -07:00
David Sun
ed02f4ca88 switching consumer functions to async 2019-07-11 15:15:08 -07:00
David Sun
e7c612971d fixed percentage assertions 2019-07-11 15:15:08 -07:00
David Sun
242a2e21b5 updated comments
added comments to Forwarder Swap Quote Conusmer
2019-07-11 15:15:08 -07:00
David Sun
92a1e5413b change to affiliate fees 2019-07-11 15:15:08 -07:00
David Sun
e1ab9aa690 rewritten test cases for SwapQuoter
fixed testing for swap quoter + setup for consumer testing

added framework for testing consumers

added testing and updated some types
2019-07-11 15:15:08 -07:00
David Sun
222f7e6fd4 addressed reviews and light refactor
added comments to types and refactored some naming
2019-07-11 15:15:08 -07:00
David Sun
59001f827b finished forwarder consumer 2019-07-11 15:15:07 -07:00
David Sun
549bfe98f1 renamed asset-buyer + adding consumers 2019-07-11 15:15:07 -07:00
David Sun
64e3b6f5ee refactored ERC <> ERC for asset-buyer
minor update to interface
2019-07-11 15:15:07 -07:00
David Sun
2fdc0426ff temp fix for CI 2019-07-11 15:15:07 -07:00
F. Eugene Aumson
e6c70fda66 order_utils.py: pin eth-abi version (#1947)
Fixes broken builds due to new release of eth-abi.
2019-07-11 18:08:16 -04:00
Xianny
50da1354f3 Move CLI tests for abi-gen (#1930)
Closes #1925, #1926
2019-07-10 09:19:50 -07:00
Francesco Agosti
e503cacf57 Merge pull request #1916 from 0xProject/feature/website/add-theo
Adding Theo to team page
2019-07-08 13:57:36 -07:00
Fabio B
6a1e0edc78 Fix link to smart contracts 2019-07-08 21:45:40 +02:00
Xianny
048f5c2771 [Multilang] hardcode ABI into abi-gen-wrappers (#1883)
* Export artifacts and addresses from abi-gen-wrappers

* only export addresses, not artifacts

* abi-gen-wrappers no longer accept ContractAbi as constructor param

ABI is now hardcoded when wrapper is generated

* remove unused imports

* remove unused import

* changes after review

* fix method ordering

* update constructor args

* prettier

* statically enumerate ABI properties

* remove abi-gen-wrappers generated-wrappers from prettierignore

* add template for recursive components

* add `indexed` field for EventParameter

* prettier

* update known-good wrappers with ABIs and fix Python ABI loading

* remove generated-artifacts and update gitignore
2019-07-08 12:44:19 -07:00
F. Eugene Aumson
d9378e9a8f First auto-gen'd Python contract wrapper: ERC20 (#1878)
* abi-gen-wrappers: fix half-baked folder rename

* .circleci: give cache more descriptive name

* abi-gen: rename type field. tsName->langLocalName

* contract-artifacts: add devdoc to ERC20Token.json

Artifact changes crafted manually: re-generated artifacts from within
@0x/contracts-erc20, and then copied them into @0x/contract-artifacts,
but only committed the changes that added devdoc.

Modified @0x/contracts-erc20/compiler.json to include devdoc in the
hopes that next time contract-artifacts are re-generated en masse, the
devdoc output will just come along for the ride.

Compiling ERC20 TypeScript wrappers after adding devdoc to the artifacts
revealed some inconsistencies in the types.  ethereum-types'
DevdocOutput REQUIRED many fields which are not always present,
depending the devdoc contents itself.  Relaxing the requirement had some
ramifications.

* abi-gen: Python!

Lots more to come, but so far generating typed methods with some
parameter validation and with reasonable docstrings; enough to make
ERC20 work.

* existing erc20 python wrapper: re-order methods

In order to minimize the diff in the upcoming commit of the
auto-generated version.

* existing erc20 python wrapper: rename method

Rename method _erc20 to _get_contract_instance.

* existing erc20 python wrapper: rename vars

Rename method parameters to match names used in contract methods.

* existing erc20 python wrapper: correction

Contract method `allowance` previously was returning a transaction hash,
but it's a const method, so changed it to return the int that the
underlying method returns.

* contract_wrappers.py: pull in generated code

Custom setup.py command to pull in code previously generated into
../../packages/abi-gen-wrappers/src/generated-wrappers/py.

Changes to existing wrapper code reflect differences between the old,
manually-written wrapper and the new, auto-generated wrapper.

Reconfigured Circle CI to give Python build access to the output of the
TypeScript build, in order to import the generated wrappers from there.

* abi-gen: sanitize docstrings for pycodestyle lint

* abi-gen-templates.py: expose ABI from template

Use ABI given by template, not gotten by name from
zero_ex.contract_artifacts.

Also, expose ABI as a static method.

* py wrappers: contract addr to ctor, not methods

In all Python wrappers (old, manual ones; and new, generated ones), have
client pass the contract address to the wrapper's constructor, rather
than to the individual method calls.

* py wrappers: remove unused param `account_address`

* py wrappers: document use of `private_key`

* Rename file erc20_wrapper.py to erc20_token.py

To match the name of the underlying contract.

* Update CHANGELOG.json's

* git rm erc20_token.py

No need to keep it checked in.  Doing so would require manual overhead
of keeping the generated copy in sync with the generation code, which
may get overlooked and cause confusion for others.  Authoritative source
will be the published package on PyPI.

* abi-gen-templates: tweak CHANGELOG wording

Co-Authored-By: Fabio B <kandinsky454@protonmail.ch>

* Include transaction parameters in const calls too

* Doc contract_address param to gen'd wrapper ctor

* make myself a CODEOWNER of abi-gen*

* rename ids: langLocalName -> languageSpecificName

* Move Python generation to its own packages/ folder

* Stop duplicating contract artifacts in Python pkg!

Thanks to the way we're now using the `./setup.py pre_install`
convention, there's no longer a need to check the artifacts in to the
Python package.

* move py templates BACK to abi-gen-templates

I got a little overzealous in the previous commit that moved ALL the
python stuff into the new packages/python-contract-wrappers folder.

* Update known-good test output: prettify

* add getABIEncodedTransationData to gen'd code

It was added into the template in the following commit, but the
corresponding checked-in generated code was not updated accordingly.

f51c4f9617

* Fix missed instance of languageSpecificName change

* abi-gen: refine pipeline for testing gen'd code

- generate wrappers for test fixture contracts (dummy, etc) not in `yarn
build` but in `yarn test`

- rename folder test/generated-test/generated-wrappers to
test/generated-test/known-good, and stop writing test output to there,
instead writing it to a new test/generated-test/output folder.

- sol-compile test fixture contracts in every test run

- run unit tests separately from tests of generated and built TypeScript
wrappers.  The existing `yarn run_mocha` will run unit tests, and
there's a new `yarn run_contract_wrapper_tests`.

* abi-gen: test Python gen [known test failures]

Also generate TypeScript wrapper test code into a TypeScript folder
(alongside the newly created Python folder).

Known-good code manually corrected (from generated code) to reflect
known problems that still need to be addressed.  Namely:
  - base contract and tx params should be imported from canonical
    package, not relative path. relative path is working for wrapping
    OUR contracts, but would not be usable in a more general
    context.
  - return type missing for some generated methods.

These outstanding problems are currently causing this test to fail.

* fix failing abi-gen test: missing return types

* fix failing abi-gen test: qualify imports

* in py wrapper, simplify base class initialization

per
https://github.com/0xProject/0x-monorepo/pull/1878#discussion_r299248641

* move 3rd party typings to typescript-typings

* make package python-contract-wrappers private

* make Xianny CODEOWNER of base-contract & templates

* abi-gen: clarify --help for --backend

* remove superfluous CHANGELOG entry
2019-07-03 11:01:01 -04:00
Xianny
f77aaaf2e0 Merge pull request #1907 from 0xProject/multilang/add-devdoc
Add devdoc to all contract artifacts
2019-07-02 13:22:04 -07:00
Chris Kalani
380835b151 Added Theo to team page 2019-07-02 12:21:06 -07:00
Xianny
857d91df85 Add dummy contract to test abi-gen-wrappers (#1881) 2019-06-28 15:42:36 -07:00
xianny
cd9a6b0de7 add example devdoc 2019-06-28 13:25:16 -07:00
xianny
86333f4928 add devdocs to all artifacts 2019-06-27 22:00:41 -07:00
F. Eugene Aumson
d1975bd5dd contract-artifacts: add devdoc to ERC20Token.json
Artifact changes crafted manually: re-generated artifacts from within
@0x/contracts-erc20, and then copied them into @0x/contract-artifacts,
but only committed the changes that added devdoc.

Modified @0x/contracts-erc20/compiler.json to include devdoc in the
hopes that next time contract-artifacts are re-generated en masse, the
devdoc output will just come along for the ride.

Compiling ERC20 TypeScript wrappers after adding devdoc to the artifacts
revealed some inconsistencies in the types.  ethereum-types'
DevdocOutput REQUIRED many fields which are not always present,
depending the devdoc contents itself.  Relaxing the requirement had some
ramifications.
2019-06-27 21:08:54 -07:00
David Sun
08b9f27eac Merge pull request #1904 from 0xProject/feature/website/add-dydx-explore
Adding dYdX to Explore page
2019-06-27 10:25:23 -07:00
F. Eugene Aumson
5b2cf8a776 Restore original Python label 2019-06-27 10:03:22 -04:00
F. Eugene Aumson
7394106880 Another attempt at the snake emoji 2019-06-27 09:13:49 -04:00
Chris Kalani
9134a7ae1e Prettier 2019-06-26 17:10:15 -07:00
Chris Kalani
c617e9f483 Adding dYdX to explore page 2019-06-26 17:06:53 -07:00
Xianny
545fcef716 Update autolabeler.yml 2019-06-26 12:42:53 -07:00
David Sun
e20fa3a1bf Merge pull request #1895 from 0xProject/feature/website/new-team-photos-2
Added new team headshots and a couple other small things
2019-06-25 11:32:30 -07:00
Chris Kalani
9d01b47d5b Added better advisor titles 2019-06-25 10:42:03 -07:00
Chris Kalani
fa4c34df41 Removed old StarkDEX announcement link 2019-06-25 10:33:32 -07:00
Chris Kalani
9f8ab4d626 Added new team photos to team page 2019-06-25 10:31:45 -07:00
Alex Browne
1971c9cecd Merge pull request #1879 from 0xProject/remove-albrow-codeowner-contract-tests
Remove @albrow as code owner for contract tests
2019-06-21 11:32:12 -07:00
Amir Bandeali
82f730831d Merge pull request #1863 from 0xProject/feat/contracts/static-call-proxy
Implement StaticCallProxy
2019-06-21 09:18:42 -07:00
Alex Browne
035167e5b7 Remove @albrow as code owner for contract tests 2019-06-20 13:59:17 -07:00
Amir Bandeali
323fb0a965 Bump solidity version pragma for undeployed AssetProxy contracts 2019-06-18 19:52:18 -07:00
Amir Bandeali
45aacf122f Fix StaticCallProxy comment and add sanity checks to TestStaticCallTarget 2019-06-18 19:52:18 -07:00
Amir Bandeali
5dcf7919fc Fix build errors 2019-06-18 19:52:18 -07:00
Amir Bandeali
f15560bd89 Update CHANGELOGs 2019-06-18 19:52:18 -07:00
Amir Bandeali
bf3ae730d6 Add fillOrder tests that use the StaticCallProxy 2019-06-18 19:52:18 -07:00
Amir Bandeali
92ce258bb4 Remove pipeline package from CI build 2019-06-18 19:52:18 -07:00
Amir Bandeali
5810e7df82 Add StaticCallProxy support to LibAssetData 2019-06-18 19:50:59 -07:00
Amir Bandeali
f2cbf4a561 Regenerate abi-gen-wrappers 2019-06-18 19:50:59 -07:00
Amir Bandeali
0c8bb2e675 Add unit tests for StaticCallProxy 2019-06-18 19:50:59 -07:00
Amir Bandeali
f51c4f9617 Allow getABIEncodedTransactionData to be called for read only contract methods 2019-06-18 19:50:59 -07:00
Amir Bandeali
5345f7c983 Add boilerplate for StaticCallProxy 2019-06-18 19:50:59 -07:00
Amir Bandeali
7d9e43b2e1 Add TestStaticCallTarget for testing StaticCallProxy 2019-06-18 19:50:59 -07:00
Amir Bandeali
570c1e1809 Add StaticCallAssetData encoding and decoding 2019-06-18 19:50:59 -07:00
Amir Bandeali
720d335b09 Add StaticCallProxy types and move 1155 method ABI into order-utils 2019-06-18 19:50:59 -07:00
Amir Bandeali
f0ecda1a48 Use more specific revert reason in ERC1155Proxy 2019-06-18 19:50:59 -07:00
Amir Bandeali
4ed111a7d4 Implement StaticCallProxy 2019-06-18 19:50:59 -07:00
Matthew Cadier Kim
fc257523c7 Remove pipeline package
* Remove entire readme for the pipelines package.

* remove pipeline everywhere

* bump circle ci
2019-06-18 17:01:53 -07:00
Xianny
9775f8d83c abi-gen should regenerate contract-wrappers if template files change (#1875) 2019-06-18 16:03:37 -07:00
Xianny
01a1b19556 Prune fields from EthBalanceChecker (#1876)
Remove forbidden fields from EthBalanceChecker
2019-06-18 14:53:26 -07:00
Xianny
bd228034fd Add workflow for copying compiled artifacts to 0x/contract-artifacts (#1842)
The contract artifacts should remain as standard compiler output during development. Fields should only be removed/added prior to being published in `@0x/contract-artifacts`. This PR adds the `yarn transform` script to `@0x/contract-artifacts` to facilitate this. 

Going forward, `abi-gen-templates` will have to support both standard artifacts and modified artifacts if they diverge, since the templates are used for `contract-artifacts`/`abi-gen-wrappers` (modified artifact) *and* development in all the `contracts/*` packages (standard artifact).

This PR makes the following changes to `contract-artifacts`:
- remove `evm.bytecode.linkReferences` from all artifacts
- remove `evm.deployedBytecode` and `sourceTreeHashHex` from Coordinator artifact
- prettify all artifacts (whitespace only changes)
2019-06-17 11:00:53 -07:00
Fabio B
2672a5c59f Merge pull request #1867 from 0xProject/fix/trezorSubprovider
Fix bug in Trezor implementation
2019-06-17 10:18:37 -07:00
Rick Morty
5f383430eb Add CHANGELOG entry 2019-06-15 21:27:09 -07:00
Rick Morty
66ec3e9f4d Hex should be true since the data returned expects it to be hex encoded 2019-06-15 21:23:40 -07:00
Fabio B
c269c427a6 Merge pull request #1865 from 0xProject/feature/ethBalanceChecker
contracts/dev-utils: Add EthBalanceChecker contract to monorepo
2019-06-13 09:37:40 -07:00
Fabio Berger
212855ebd8 Add missing import 2019-06-12 09:29:19 -07:00
Fabio Berger
8f78945a73 Update Python artifact 2019-06-12 09:15:40 -07:00
Fabio Berger
86d50cf597 Remove forbidden fields 2019-06-12 09:10:18 -07:00
Fabio Berger
8986d506a5 Have DevUtils inherit from EthBalanceChecker 2019-06-12 09:08:18 -07:00
Fabio Berger
3d2c945c35 Fix nits in contract 2019-06-12 09:08:04 -07:00
Fabio Berger
8206a3969f Add artifact to Python package 2019-06-11 08:51:51 -07:00
Fabio Berger
43afe67593 Add EthBalanceChecker contract to monorepo 2019-06-11 08:45:15 -07:00
Amir Bandeali
ecf939f8c8 Merge pull request #1848 from 0xProject/feat/contracts/order-validation-fillable-amount
Refactor OrderValidationUtils and create contracts-dev-utils package
2019-06-07 09:11:40 -07:00
Amir Bandeali
f0c4ccfa1e Remove multiple returns from devdoc comments, fix typos 2019-06-07 08:46:52 -07:00
Amir Bandeali
718d48b7d5 Fix linting errors and update CHANGELOGs 2019-06-07 08:46:20 -07:00
Amir Bandeali
d5e88677ae Update tests 2019-06-07 08:46:20 -07:00
Amir Bandeali
b1cfdc7a6a Return 0 balance/allowance if the call would otherwise revert 2019-06-07 08:46:20 -07:00
Amir Bandeali
5c5f815b20 Fix LibAssetData tests 2019-06-07 08:46:20 -07:00
Amir Bandeali
d9edb9675f Add tests for multiAssetData, remove tests for old functions 2019-06-07 08:46:20 -07:00
Amir Bandeali
be6fce5a89 Refactor contracts to only use allowances for AssetProxies (spender is no longer an input) 2019-06-07 08:46:20 -07:00
Amir Bandeali
12afeb30ae Move LibAssetData to DevUtils package 2019-06-07 08:46:20 -07:00
Amir Bandeali
23df406ff0 Fix package.json typos 2019-06-07 08:46:20 -07:00
Amir Bandeali
c9ecef4fc3 Cleanup tests 2019-06-07 08:46:20 -07:00
Amir Bandeali
62f0a867a8 Update CHANGELOGs 2019-06-07 08:46:20 -07:00
Amir Bandeali
f68b8d82e0 Move LibTransactionDecoder to dev-utils package 2019-06-07 08:46:20 -07:00
Amir Bandeali
6b7cb13e9a Move DevUtils contract into its own package 2019-06-07 08:46:19 -07:00
Amir Bandeali
613af6013a Update OrderValidationUtils to return fillableTakerAssetAmount and refactor tests 2019-06-07 08:46:19 -07:00
Amir Bandeali
0db56a781e Cleanup LibAssetData tests 2019-06-07 08:46:19 -07:00
Greg Hysz
fe7674b184 Merge pull request #1837 from 0xProject/fix/contracts/erc1155AssetProxyManualCopyFields
ERC1155 Proxy - Manually Copy Dynamic Fields from Calldata to Memory
2019-06-06 12:20:30 -07:00
Xianny
44a6fe7310 Note on updating contract artifacts (#1853) 2019-06-05 16:59:15 -07:00
Greg Hysen
46690f0c35 Made some comments more readable and fixed some spelling 2019-06-05 15:23:53 -07:00
Greg Hysen
cfc4e345cc ran prettier and updated changelog 2019-06-05 14:22:50 -07:00
Greg Hysen
c68278d824 Additional multiplication overflow checks 2019-06-05 14:09:09 -07:00
Greg Hysen
09600a71cd Added tests to assert that assetData is within the boundaries of calldata 2019-06-05 14:08:25 -07:00
Greg Hysen
d66ba70f5e Updated length to match comment + added explicit test 2019-06-05 14:08:25 -07:00
Greg Hysen
e7c4120d24 Validation checks for the length of asset data 2019-06-05 14:08:25 -07:00
Greg Hysen
1212e534a8 Adds boundary checks when copying dynamic fields (includes tests) 2019-06-05 14:08:25 -07:00
Greg Hysen
899d0f1e42 removed .only for tests 2019-06-05 14:08:25 -07:00
Greg Hysen
dde4ed3754 More readability for 1155 proxy 2019-06-05 14:08:25 -07:00
Greg Hysen
b596e02752 readability cleanup 2019-06-05 14:08:25 -07:00
Greg Hysen
d5afe696da removed .only from tests 2019-06-05 14:08:25 -07:00
Greg Hysen
976be66dee Scale values while copying from calldata 2019-06-05 14:08:25 -07:00
Greg Hysen
98c8a6387a manually copy ids, values, and data fields 2019-06-05 14:08:25 -07:00
Greg Hysen
be1b636e30 Improved readability of ERC1155 Proxy 2019-06-05 14:08:25 -07:00
Greg Hysen
8bae0b81aa Added ERC1155Proxy tests when data overlaps values in asset data 2019-06-05 14:08:25 -07:00
Greg Hysen
7ee19e1306 Added new tests for different lengths of receiver callback data, since we are now appending scaledValues after data. 2019-06-05 14:08:25 -07:00
Greg Hysen
626d0dfa93 Store scaled values and end of calldata in ERC1155 Asset Proxy 2019-06-05 14:08:25 -07:00
Greg Hysz
8453c616a5 Merge pull request #1852 from 0xProject/fix/contracts/expectTransactionFailedAsyncFalsePositives
Fixes false positives in `expectTransactionFailedAsync`
2019-06-05 13:51:59 -07:00
Greg Hysen
56bc2944d0 Fixed false positives in expectTransactionFailedAsync 2019-06-04 18:53:13 -07:00
Amir Bandeali
b2cf701e30 Merge pull request #1850 from 0xProject/removePipelineBuild
Remove pipeline package from build and from CI
2019-06-04 13:20:24 -07:00
Amir Bandeali
9a3b29acb7 Remove pipeline package from build and from CI 2019-06-04 12:58:31 -07:00
Fabio B
85b217f167 Merge pull request #1823 from 0xProject/fix/improveAssertionsAbiGen
Add parameter assertions to abi-gen-wrappers
2019-06-04 19:05:39 +01:00
Fabio Berger
a7700d6c22 Fix tests 2019-06-04 14:38:13 +01:00
Fabio Berger
1e274518dd Remove re-introduced deps 2019-06-04 13:28:13 +01:00
Fabio Berger
f4f8927c79 Update yarn lock 2019-06-04 13:26:35 +01:00
Fabio Berger
60b7890f16 Ensure assertions each get rendered on a new line 2019-06-04 13:26:35 +01:00
Fabio Berger
4d46290ef6 Fix failing tests 2019-06-04 13:26:35 +01:00
Fabio Berger
00f7e2cfc3 Fix linter errors 2019-06-04 13:26:35 +01:00
Fabio Berger
e742708261 Update abi-gen-wrappers 2019-06-04 13:24:29 +01:00
Fabio Berger
8c9de31c5c Add assertions to abi-gen templates and fix tests 2019-06-04 13:19:59 +01:00
Fabio Berger
2bf992f0ac Improve the NOTE in abi-gen utils 2019-06-04 13:18:02 +01:00
Fabio Berger
52a01bcc11 Fix linter errors 2019-06-04 13:18:02 +01:00
Fabio Berger
f250e03c40 Add missing deps 2019-06-04 13:18:01 +01:00
Fabio Berger
75acbfb042 Fi assertion type 2019-06-04 13:18:01 +01:00
Fabio Berger
740fd6f5d9 Rename txData to callData 2019-06-04 13:18:01 +01:00
Fabio Berger
c58306cd49 Add isNumberOrBigNumber assertion 2019-06-04 13:18:01 +01:00
Fabio Berger
985696631c Set liguist-generated to true 2019-06-04 13:18:01 +01:00
Fabio Berger
d8a3d7f920 Fix gitattributes so properly minimizes generate-wrappers in PR review 2019-06-04 13:18:01 +01:00
Fabio Berger
b6b96f0eee Tighten the assertion to hex string 2019-06-04 13:18:01 +01:00
Fabio Berger
3f037ef3cc Add PR number to CHANGELOG entries 2019-06-04 13:18:01 +01:00
Fabio Berger
5c2d3fb3da Update abi-gen-wrappers 2019-06-04 13:18:01 +01:00
Fabio Berger
84d38ea878 Add assertions to abi-gen templates and fix tests 2019-06-04 13:18:01 +01:00
Fabio Berger
6226aa0b23 2019-06-04 13:18:01 +01:00
Fabio Berger
72af35834b Update issue template to instruct submitter to prefix title with package name 2019-06-04 11:52:23 +01:00
David Sun
3019e3817f Merge pull request #1846 from 0xProject/feature/website/starkdex-announcement
Added StarkDEX announcement to homepage
2019-06-03 12:17:02 -07:00
Chris Kalani
da9e90faf0 Added new tab prop to announcement 2019-06-03 11:55:19 -07:00
Chris Kalani
e737395c2b Added StarkDEX announcement to homepage 2019-06-03 11:33:38 -07:00
Fabio B
5a33167594 Merge pull request #1844 from 0xProject/fix/docFixes
website: Doc Fixes
2019-06-03 18:20:09 +01:00
Fabio B
dfb7e50948 Merge pull request #1843 from 0xProject/fix/depSecurityIssues
Fixes the severe security vulnerability warnings on Github
2019-06-03 18:01:58 +01:00
Fabio Berger
b43c9f075c Fix version picker overflow 2019-06-03 12:55:33 +01:00
Fabio Berger
f42ce6adb5 Remove scrollbars onHover behavior as a short-term fix to get cmd-f working for all content on the page 2019-06-03 12:53:16 +01:00
Fabio Berger
bf533bbdbb Remove a bunch of packages from the Docs Home to declutter it a bit 2019-06-03 12:11:20 +01:00
Fabio Berger
9328729c4c Remove devnet mention from metacoin project 2019-06-03 12:02:36 +01:00
Fabio Berger
2e23a044ca Tell users of our Ethereum tools to use with Ganache now that it is supported and given our plans to deprecate devnet 2019-06-03 12:02:24 +01:00
Fabio Berger
691a3a1e72 Fix security vuln by using patched versions of deep-extend 2019-06-03 11:56:42 +01:00
Fabio Berger
fc40f9634b Upgrade tar-fs dep to version without critical security issue 2019-06-03 11:34:59 +01:00
Amir Bandeali
4969441f21 Merge pull request #1835 from 0xProject/feat/contracts/dev-utils
Update OrderValidator and create DevUtils contract
2019-06-01 13:40:10 -07:00
David Sun
d04d50794e Merge pull request #1841 from 0xProject/feature/website/remove-rahul
Removing Rahul from team page
2019-05-31 13:49:57 -07:00
Chris Kalani
5e1fbe34a9 Removed image file 2019-05-31 13:30:50 -07:00
Chris Kalani
2b75829a0c Removing Rahul from team page 2019-05-31 13:29:07 -07:00
Daniel Pyrathon
3b3fd0a3a2 Merge pull request #1803 from 0xProject/instant-callback-done
Added performedCallback attribute for Redux state, and added a hook f…
2019-05-29 14:29:14 -07:00
Daniel Pyrathon
1e4b61008a Merge branch 'development' of github.com:0xProject/0x-monorepo into instant-callback-done 2019-05-29 12:40:20 -07:00
David Sun
ffb71e9fd5 Merge pull request #1840 from 0xProject/fix/website/landing-kit/overflow-issue
Fixed bug with launch kit background
2019-05-29 11:56:54 -07:00
David Sun
c1aeb4bde6 fixing bug with background 2019-05-29 11:53:16 -07:00
David Sun
66bca5cd81 Merge pull request #1822 from 0xProject/feature/website/launch-kit-landing-page
[WIP] Launchkit landing page
2019-05-29 11:49:16 -07:00
F. Eugene Aumson
b68df3a067 Fix static-python-tests (#1839)
* Disable bandit linter on false positive lines

* Shorten docstring to fix linter error
2019-05-29 14:28:17 -04:00
Amir Bandeali
066f3bb646 Return MAX_UINT256 for unlimited allowances in all token standards 2019-05-28 17:01:54 -07:00
David Sun
661c334928 prettier 2019-05-28 12:58:42 -07:00
David Sun
a1895d4157 polished website 2019-05-28 12:58:42 -07:00
David Sun
1e7efe026a committing changes 2019-05-28 12:58:41 -07:00
David Sun
02e7da979a changes to hero 2019-05-28 12:58:41 -07:00
David Sun
bd2839110b Merge pull request #1833 from 0xProject/feature/website/resources-menu
Added Resources dropdown to main nav
2019-05-28 10:05:38 -07:00
Daniel Pyrathon
1bcb2697e7 added prettifier 2019-05-27 19:16:11 -07:00
Daniel Pyrathon
fdb9a664f5 Merge branch 'development' of github.com:0xProject/0x-monorepo into instant-callback-done 2019-05-27 18:54:46 -07:00
Daniel Pyrathon
8099c334c7 Merge branch 'master' of github.com:0xProject/0x-monorepo into instant-callback-done 2019-05-27 18:52:31 -07:00
Daniel Pyrathon
344d28ab78 added prettier 2019-05-27 18:45:08 -07:00
Daniel Pyrathon
5e41168305 removed final bit of performedCallback 2019-05-27 18:35:47 -07:00
Daniel Pyrathon
dd97669cdd removed other legacy code 2019-05-27 18:34:23 -07:00
Daniel Pyrathon
af75581659 removed legacy performedCallback system, and implemented new react-redux system 2019-05-27 18:30:29 -07:00
Amir Bandeali
3c08f5b86a Update CHANGELOGs 2019-05-26 18:00:03 -07:00
Amir Bandeali
7809cad6cb Fix linting errors and warnings 2019-05-26 17:59:53 -07:00
Amir Bandeali
3e59029966 Modify dev utils tests to pass 2019-05-26 17:20:10 -07:00
Amir Bandeali
24249bcb4d Add LibTransactionDecoder to DevUtils 2019-05-26 17:19:45 -07:00
Amir Bandeali
543011c3de Modify batch allowances to take an array of spenders 2019-05-26 17:19:01 -07:00
Amir Bandeali
4d9f2586d9 Remove redundant code, add signature checks to order validations, and create DevUtils contract 2019-05-26 16:15:56 -07:00
Amir Bandeali
7f94ebe362 Add signature validation checks to OrderValidator contract 2019-05-26 15:41:10 -07:00
Amir Bandeali
c9bf1eda54 Small readability and efficiency improvements 2019-05-26 15:33:55 -07:00
Amir Bandeali
2cd4d9004c Create LibAssetProxyIds 2019-05-26 14:39:31 -07:00
Chris Kalani
35cd0319d4 Prettier 2019-05-24 17:50:57 -07:00
Chris Kalani
899030e966 Fixed error, whups 2019-05-24 17:38:04 -07:00
Chris Kalani
15e3944d23 Removed redundant links, fixed linting issues 2019-05-24 17:23:05 -07:00
Chris Kalani
f1fbaedb0f Added Resources dropdown to main nav 2019-05-24 16:09:33 -07:00
Fabio Berger
cf04062a19 Publish
- 0x.js@6.0.10
 - @0x/asset-buyer@6.1.5
 - @0x/connect@5.0.10
 - @0x/contract-wrappers@9.1.4
 - @0x/dev-tools-pages@0.0.27
 - @0x/dev-utils@2.2.3
 - @0x/fill-scenarios@3.0.10
 - @0x/instant@1.0.24
 - @0x/metacoin@0.0.51
 - @0x/migrations@4.1.6
 - @0x/order-utils@8.1.1
 - @0x/order-watcher@4.0.11
 - @0x/pipeline@1.0.21
 - @0x/react-docs@2.0.12
 - @0x/react-shared@2.0.12
 - @0x/sol-compiler@3.1.8
 - @0x/sol-coverage@3.0.5
 - @0x/sol-doc@2.0.12
 - @0x/sol-profiler@3.1.7
 - @0x/sol-trace@2.0.13
 - @0x/sol-tracing-utils@6.0.12
 - @0x/subproviders@4.1.0
 - @0x/testnet-faucets@1.0.80
 - @0x/website@0.0.83
 - @0x/contracts-asset-proxy@2.1.5
 - @0x/contracts-coordinator@2.0.4
 - @0x/contracts-erc1155@1.1.6
 - @0x/contracts-erc20@2.2.5
 - @0x/contracts-erc721@2.1.6
 - @0x/contracts-exchange@2.1.5
 - @0x/contracts-exchange-forwarder@3.0.3
 - @0x/contracts-exchange-libs@2.1.6
 - @0x/contracts-extensions@3.1.5
 - @0x/contracts-multisig@3.1.5
 - @0x/contracts-test-utils@3.1.7
 - @0x/contracts-utils@3.1.6
2019-05-24 16:59:56 +01:00
Fabio Berger
2e922bf7db Updated CHANGELOGS 2019-05-24 16:59:43 +01:00
F. Eugene Aumson
741a731ecb Transaction decoder for Coordinator (#1802)
* Remove unused dependency from erc20/package.json

* Add LibTransactionDecoder

Yet unsupported functions include:
    cancelOrdersUpTo
    executeTransaction
2019-05-24 11:27:53 -04:00
Fabio Berger
91bff1976c Remove react deps from react-highlight in yarn.lock 2019-05-24 14:56:49 +01:00
Fabio B
fad500042a Merge pull request #1830 from 0xProject/feature/fixTrezorInefficiency
subproviders: Fix Trezor subprovider inefficiency
2019-05-24 01:24:40 +01:00
Fabio B
bdb2a01385 Update packages/subproviders/src/subproviders/trezor.ts
Co-Authored-By: Jacob Evans <dekz@dekz.net>
2019-05-24 00:52:33 +01:00
Fabio Berger
f372cd2d13 Add CHANGELOG entry for new Trezor subprovider 2019-05-23 15:52:53 +01:00
Fabio Berger
a435da910f Cache the derived key info since it does not change and currently we request it from the Trezor device for each request 2019-05-23 14:26:15 +01:00
Fabio Berger
f1d96d9673 Fix linter issues 2019-05-23 14:02:55 +01:00
Fabio Berger
45226ee1f6 Update yarn.lock 2019-05-23 14:00:57 +01:00
Fabio B
03b8d29740 Merge pull request #1431 from MarcZenn/feature/subproviders/trezor-subprovider
Feature/subproviders/trezor subprovider
2019-05-23 13:58:34 +01:00
Fabio B
80a4af249f Merge branch 'development' into feature/subproviders/trezor-subprovider 2019-05-23 13:14:09 +01:00
David Sun
900d444946 Merge pull request #1816 from 0xProject/feature/website/add-alex-kroeger
Added Alex Kroeger and removed Leo from team page :(
2019-05-20 10:19:01 -07:00
Fabio B
7ca9393d2d Merge pull request #1820 from 0xProject/fix/updateLaunchKitRepo
website/python-packages: Update 0x-launch-kit repo name to include `-backend`
2019-05-16 21:22:44 -03:00
Fabio Berger
b22d7bb310 Add backend to constant variable name as well 2019-05-16 21:21:54 -03:00
Fabio Berger
c742cdfe5c Update 0x-launch-kit repo name to include -backend 2019-05-16 16:30:48 -03:00
xianny
2d3fe02cd7 Publish
- 0x.js@6.0.9
 - @0x/asset-buyer@6.1.4
 - @0x/connect@5.0.9
 - @0x/contract-wrappers@9.1.3
 - @0x/fill-scenarios@3.0.9
 - @0x/instant@1.0.23
 - @0x/metacoin@0.0.50
 - @0x/migrations@4.1.5
 - @0x/monorepo-scripts@1.0.32
 - @0x/order-utils@8.1.0
 - @0x/order-watcher@4.0.10
 - @0x/pipeline@1.0.20
 - @0x/testnet-faucets@1.0.79
 - @0x/website@0.0.82
 - @0x/contracts-asset-proxy@2.1.4
 - @0x/contracts-coordinator@2.0.3
 - @0x/contracts-erc1155@1.1.5
 - @0x/contracts-erc20@2.2.4
 - @0x/contracts-erc721@2.1.5
 - @0x/contracts-exchange@2.1.4
 - @0x/contracts-exchange-forwarder@3.0.2
 - @0x/contracts-exchange-libs@2.1.5
 - @0x/contracts-extensions@3.1.4
 - @0x/contracts-multisig@3.1.4
 - @0x/contracts-test-utils@3.1.6
 - @0x/contracts-utils@3.1.5
2019-05-15 19:05:54 -04:00
xianny
7d61cb6bac Updated CHANGELOGS 2019-05-15 19:05:44 -04:00
xianny
a804433a7a must run npm with sudo 2019-05-15 18:08:28 -04:00
Xianny
11082320c2 add prepublish check for write permissions for npmjs packages (#1813) 2019-05-15 18:05:56 -04:00
xianny
9f9797b123 remove only flag 2019-05-15 18:02:32 -04:00
Xianny
05d34616b7 fallback to eth_sign if eth_signTypedData fails (#1817)
* fallback to eth_sign if eth_signTypedData fails

lots of wallets/web3providers still don't support the new signing methods
2019-05-15 18:01:55 -04:00
Jacob Evans
c7f474ada1 Merge pull request #1815 from 0xProject/bug/dutchAuctionDecode
Incorrect decode in DutchAuctionWrapper
2019-05-15 10:28:56 +02:00
Chris Kalani
c7328a63d0 Removing Leo's photo from images directory 2019-05-14 16:42:32 -07:00
Chris Kalani
db818794d5 Added Alex Kroeger and removed Leo :( 2019-05-14 16:34:19 -07:00
Jacob Evans
b4b34e4890 Update CHANGELOG 2019-05-14 22:25:30 +02:00
Jacob Evans
eec016380d Commit fix to decode 2019-05-14 19:57:48 +02:00
Jacob Evans
dcab272be0 Add a test for encoding/decoding dutch auction asset data 2019-05-14 19:20:27 +02:00
Fabio Berger
418d033a5c Publish
- 0x.js@6.0.8
 - @0x/asset-buyer@6.1.3
 - @0x/connect@5.0.8
 - @0x/contract-addresses@2.3.3
 - @0x/contract-wrappers@9.1.2
 - @0x/fill-scenarios@3.0.8
 - @0x/instant@1.0.22
 - @0x/metacoin@0.0.49
 - @0x/migrations@4.1.4
 - @0x/order-utils@8.0.2
 - @0x/order-watcher@4.0.9
 - @0x/pipeline@1.0.19
 - @0x/testnet-faucets@1.0.78
 - @0x/website@0.0.81
 - @0x/contracts-asset-proxy@2.1.3
 - @0x/contracts-coordinator@2.0.2
 - @0x/contracts-erc1155@1.1.4
 - @0x/contracts-erc20@2.2.3
 - @0x/contracts-erc721@2.1.4
 - @0x/contracts-exchange@2.1.3
 - @0x/contracts-exchange-forwarder@3.0.1
 - @0x/contracts-exchange-libs@2.1.4
 - @0x/contracts-extensions@3.1.3
 - @0x/contracts-multisig@3.1.3
 - @0x/contracts-test-utils@3.1.5
 - @0x/contracts-utils@3.1.4
2019-05-13 23:14:54 -03:00
Fabio Berger
e7a7713b80 Updated CHANGELOGS 2019-05-13 23:14:30 -03:00
xianny
52a580d845 fix dangling comma 2019-05-13 21:17:25 -04:00
xianny
ea42a0b5f5 version bump 2019-05-13 21:15:38 -04:00
xianny
a0b63da9a6 version bump 2019-05-13 20:57:26 -04:00
Xianny
8d9932fc42 add private key option to migration script (#1811) 2019-05-13 16:32:37 -07:00
Xianny
54be45bedc Update coordinator contracts (#1812)
* update coordinator contracts after redeploying
2019-05-13 16:32:16 -07:00
Jacob Evans
3c9d2a562b Merge pull request #1810 from 0xProject/bug/asset-buyer/remainingTakerAssetAmount
Fix bug where remainingTakerAssetAmount is not converted to BigNumber
2019-05-13 18:53:10 +02:00
Jacob Evans
654bd5175c Add asset-buyer to circleci 2019-05-13 18:19:08 +02:00
Jacob Evans
9db660cd3f Update CHANGELOG 2019-05-13 16:33:29 +02:00
Jacob Evans
9aeadff9bd Check for presence of metadata 2019-05-13 15:38:28 +02:00
Jacob Evans
cd631b789b Commit coverage directory 2019-05-13 13:30:44 +02:00
Jacob Evans
4d98408aaf Fix bug where remainingTakerAssetAmount is not converted to BigNumber 2019-05-13 13:28:59 +02:00
Fabio Berger
490aafba4e Publish
- 0x.js@6.0.7
 - @0x/abi-gen@2.0.10
 - @0x/abi-gen-templates@2.1.0
 - @0x/abi-gen-wrappers@4.3.0
 - @0x/assert@2.0.10
 - @0x/asset-buyer@6.1.1
 - @0x/base-contract@5.1.0
 - @0x/connect@5.0.6
 - @0x/contract-artifacts@1.5.1
 - @0x/contract-wrappers@9.1.0
 - @0x/contracts-gen@1.0.9
 - @0x/dev-tools-pages@0.0.26
 - @0x/dev-utils@2.2.2
 - @0x/fill-scenarios@3.0.6
 - @0x/instant@1.0.21
 - @0x/json-schemas@3.0.10
 - @0x/metacoin@0.0.48
 - @0x/migrations@4.1.2
 - @0x/monorepo-scripts@1.0.31
 - @0x/order-utils@8.0.0
 - @0x/order-watcher@4.0.7
 - @0x/pipeline@1.0.18
 - @0x/react-docs@2.0.11
 - @0x/react-shared@2.0.11
 - @0x/sol-compiler@3.1.7
 - @0x/sol-coverage@3.0.4
 - @0x/sol-doc@2.0.11
 - @0x/sol-profiler@3.1.6
 - @0x/sol-trace@2.0.12
 - @0x/sol-tracing-utils@6.0.11
 - @0x/sra-spec@2.0.10
 - @0x/subproviders@4.0.6
 - @0x/testnet-faucets@1.0.77
 - @0x/utils@4.3.3
 - @0x/web3-wrapper@6.0.6
 - @0x/website@0.0.80
 - @0x/contracts-asset-proxy@2.1.2
 - @0x/contracts-coordinator@2.0.1
 - @0x/contracts-erc1155@1.1.2
 - @0x/contracts-erc20@2.2.1
 - @0x/contracts-erc721@2.1.2
 - @0x/contracts-exchange@2.1.2
 - @0x/contracts-exchange-forwarder@3.0.0
 - @0x/contracts-exchange-libs@2.1.2
 - @0x/contracts-extensions@3.1.2
 - @0x/contracts-multisig@3.1.2
 - @0x/contracts-test-utils@3.1.3
 - @0x/contracts-utils@3.1.2
2019-05-10 14:12:32 -03:00
Fabio Berger
3cd31d49bb Updated CHANGELOGS 2019-05-10 14:12:19 -03:00
Fabio Berger
6dd78b8d35 Update exchange forwarder package version 2019-05-10 13:46:30 -03:00
Jacob Evans
bd51c34098 Merge pull request #1809 from 0xProject/order-watcher-weth-events
OrderWatcher Deposit/Withdraw events
2019-05-10 18:32:31 +02:00
Jacob Evans
0e758fadee Merge changelog entries 2019-05-10 17:53:09 +02:00
Jacob Evans
a67659ff8e Update changelog 2019-05-10 16:37:09 +02:00
Jacob Evans
d1203f90da Revert "Mutate ERC20 ABI to handle WETH Deposit and Withdrawl"
This reverts commit c5f6ebee18.
2019-05-10 16:32:17 +02:00
Jacob Evans
c5f6ebee18 Mutate ERC20 ABI to handle WETH Deposit and Withdrawl 2019-05-10 16:09:09 +02:00
Xianny
41cc5234c4 Add coordinator wrapper (#1792)
* wip first pass at coordinator wrapper

* implement cancels, helper methods, and more unit tests

* pin typeorm version in pipeline

* prettier

* add export to 0x.js

* generate ZeroEx transaction using EIP712

* update Coordinator artifact

* change OrderError -> TypedDataError
2019-05-09 15:48:41 -07:00
Amir Bandeali
c2d3e5f052 Merge pull request #1804 from yxliang01/patch-1
fix.docs(README.md): wrong package name
2019-05-09 10:06:48 -07:00
Jacob Evans
f944b95e32 Added CHANGELOG 2019-05-09 17:26:57 +02:00
Jacob Evans
0a5b919cd9 Add fix for failing test 2019-05-09 16:46:56 +02:00
Jacob Evans
b5f85c11fe Re-enable orderwatcher tests. Add test for WETH withdraw 2019-05-09 16:46:08 +02:00
Greg Hysz
5d44b5e913 Merge pull request #1808 from 0xProject/fix/abiEncoder/typo1
Fixed typo in ABI Encoder error message
2019-05-08 13:27:53 -07:00
Greg Hysen
dd1961d86c updated changelog 2019-05-08 11:22:06 -07:00
Greg Hysen
f3539bf448 fixed typo 2019-05-08 11:22:03 -07:00
David Sun
d831e559f0 Merge pull request #1805 from 0xProject/feature/website/remove-meta-description
Removed default descriptions for website SEO performance
2019-05-07 13:06:15 -07:00
David Sun
cc079660f3 Merge pull request #1800 from 0xProject/feature/website/add-patryk
Added Patryk to the team page
2019-05-07 13:05:58 -07:00
Greg Hysz
4460dac697 Merge pull request #1806 from 0xProject/fix/abiEncoder/multibyteStrings
Support for ABI Encoding multibyte strings (Fixes Issue #1723)
2019-05-07 13:01:53 -07:00
Greg Hysen
31190f921c fixed linter errors 2019-05-07 12:34:05 -07:00
Greg Hysen
22515d8dce updated changelog 2019-05-07 11:59:27 -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
David Sun
95bb2c5504 removed actual meta tags for description 2019-05-06 16:07:01 -07:00
David Sun
0b1262cc4d removed default description 2019-05-06 15:59:55 -07:00
Xiao Liang
f9244f6f7e fix.docs(README.md): wrong package name 2019-05-07 04:14:19 +08:00
Daniel Pyrathon
9dd4ea1584 added prettifying operations on CI 2019-05-06 12:57:20 -07:00
Daniel Pyrathon
9d085cdb61 applied linting 2019-05-03 18:23:07 -07:00
Daniel Pyrathon
f00a2dbc59 added an unsubscribe handler 2019-05-03 18:05:40 -07:00
Daniel Pyrathon
20862d47ab Added performedCallback attribute for Redux state, and added a hook for callback whenever the transaction was successful 2019-05-03 17:27:26 -07:00
Chris Kalani
cfa1bf36de Fixing Greg's placement in the grid 2019-05-02 14:43:22 -07:00
Chris Kalani
c362b33b5a Added Patryk to the team page 2019-05-02 14:33:36 -07:00
F. Eugene Aumson
222a151eff bump versions, after recent publications (#1646)
* bump versions, after recent publications

* Changelog updates and version bumps

* Correct broken URL's in setup.py's

* Correct SRA Client description (append "Client")

* Add convenience script for uninstalling all pkgs

* Add documentation link to SRA Client README.md
2019-04-30 15:56:40 -04:00
Lawrence Forman
d6115cff25 Merge pull request #1797 from 0xProject/feature/abi-gen-templates/awaitTransactionSuccess
Add awaitTransactionSuccessAsync() to generated contract functions.
2019-04-30 14:13:13 -04:00
Lawrence Forman
6459522617 Merge pull request #1799 from 0xProject/fix/contracts/temporarily-disable-useDockerisedSolc
Disable `useDockerisedSolc` for all contracts `compiler.json`s until latest solc docker images are published
2019-04-30 14:12:31 -04:00
Lawrence Forman
16e1f0eea1 Disable useDockerisedSolc for all contracts compiler.jsons until 0.5.8 docker image is released. 2019-04-30 11:01:31 -04:00
F. Eugene Aumson
0564ac1530 Python doc polish (#1757)
* Exercise doctests as a test not as a linter

* Add a contract artifact doctest, and exercise it

* Clean up linter issues

* Change asset data decoding output type

Previously, it was a TypedDict, but that was causing problems.  Sphinx
seems to be broken, such that none of the fields of the class were being
rendered into the doc.

Thinking on it further, I decided that a NamedTuple makes more sense
here anyways, since tuples are immutable and this output value isn't
something someone should ever build or modify.  And, NamedTuple is
getting its fields properly rendered by Sphinx.

* Add type annotations to JSON schemas docs

* Add doc publish metadata file for middlewares pkg

* Improve documentation

Note that none of the changes to .py files impact functionality in any
way, because the changes are restricted to "docstrings", which to the
Python interpreter are simply no-op statements.

However, one caveat to that is that much of these docstring changes DO
affect the functionality of automated test runs, because all of the code
examples (blocks beginning with `>>> `) are "doctests", which are
exercised via the test framework.

The index.rst files are the top-level templates for generating the
documentation, and the "automodule"/"autoclass"/etc statements pull in
the docstrings from the source code.

* correct package name in doc URL

* Move sra_client module into zero_ex namespace

* Add functions to encode asset data to bytes

* Fix: SRA client was deserializing orders weirdly

The generated code was transforming the order structure, from the camel
case field name format in the spec, into the snake case field name
format expected by Python convention.  With this problem in place, the
only way to take an order from a relayer and send it to a contract (for
fill, cancel, etc) was to manually transform the field names, one by
one, into a new structure.

* Fix problem with Web3/JSON order conversion utils

* doctest: maker, trade ZRX for WETH, not vice versa

* Remove redundant test

* Construct order in native Python, not JSON

Then convert it to JSON before sending it to the relayer.

* doctest: simplify asset units

* Add doctests for filling and cancelling

* Minor doctetst copy edits; whitespace

* Rename function, and add optional parameter

* Tweak docstrings on JSON conversion functions.

* Demo asset data decoding to view asset pairs

* Demo selecting an order from the order book

And have taker take it.

* Rename variable

* Abstract ganache from examples

Doing that exposed excessive use of the verbose
NETWORK_TO_ADDRESSES[NetworkId.Ganache] construct, so simplified that,
which ripped into eliminating other temporary variables that had been
used to hold specific contract addresses.

Also cleaned up some misplaced import statements.

* Add missing SRA client doc publication metadata

* Ran prettier on new SRA client doc pub metadata

* Remove local env customizations in doc metadata

* Eliminate temporary variable

* Rename variable

* Show `pip install` in every package's doc

* Doc NetorkID & pagination params as int, not float

* Clean up unmatched parenthesis in docs
2019-04-30 07:44:51 -04:00
Amir Bandeali
b896f82282 Merge pull request #1798 from 0xProject/feat/clean-contracts
Add clean:contracts command to top level package.json
2019-04-29 16:07:45 -07:00
Amir Bandeali
d737d419d9 Add clean:contracts command to top level package.json 2019-04-29 16:06:00 -07:00
F. Eugene Aumson
0de2b6983b Add LibAssetData to contracts/asset-proxy (#1779)
* Stop restarting node unnecesssarily during test

* Add new, empty LibAssetData

* Support encoding & decoding of ERC20 asset data

* Support encoding & decoding of ERC721 asset data

* Support encoding & decoding of ERC1155 asset data

* Support encoding & decoding of multi-asset data

* Support querying ERC20 balance from asset data

* Support querying ERC721 balance from asset data

* Support querying ERC1155 balance from asset data

* Support querying balance from multi-asset data

* Support querying ERC20 allowance from asset data

* Support querying ERC721 allowance from asset data

* Support querying ERC1155 allowance from asset data

* In tests, wait for allowance set before checking

* Introduce temporary variable `assetDataBody`

* Handle edge case in multi-asset balance query

* Support multi-asset allowance query by asset data

* Move variable declaration up for readability.

* Make all solhint-disable's cite specific rules

And move the directives to the ends of lines whenever possible

* Rename query tests to include " by asset data"

* Extract test helper method

* Extract another test helper method

* Support batch queries of allowances & balances

* In LibAssetData.sol, use IERC1155, not ...Mintable

* Rename balance*() return vars: amount -> balance

* Fix bug in ERC721 balance query

Was using method balanceOf(), but needed to be using ownerOf().

getERC721TokenOwner() method lifted from
@0x/extensions/contracts/src/OrderValidator/OrderValidator.sol

* Reuse new en/decoders; avoid abi.decode().

* Start lowest allowance/balance from 0, not MAX_INT

* Properly implement ERC1155 balance querying

* Split lines for readability

* Also check isApprovedForAll in 721 allowance query

* Add neglected division of allowances by amounts

* Rename methods: balanceOf -> getBalance

* Rename methods: allowance -> getAllowance

* Add methods: getBalanceAndAllowance() & batch...()

* Rename return vars: amount -> allowance

* Add devdoc comments

* Rename batchGet* methods to getBatch*

* Remove refactoring relic

* Add revert messages to all require() calls

* Reduce gas usage for ERC1155 asset data decoding

* Don't use dockerized solc for ERC20 contracts

Because they demand solc version 0.4.26, and it seems as though the tag
for that version has been deleted from dockerhub.

Without this, @0x/contracts-erc20 was failing to build.

* Rename batch functions to use plurals

* Skip dockerized solc for contracts needing 0.4.26

I seems as though the tag for that version has been deleted from
dockerhub.

Without this, these contracts were failing to build.

* Make revert reasons follow snake case convention
2019-04-29 15:46:26 -04:00
Lawrence Forman
25628c34ee Add PR numbers to CHANGELOGs 2019-04-28 22:25:12 -04:00
Lawrence Forman
54fdccd397 Ran prettier. 2019-04-28 22:25:12 -04:00
Lawrence Forman
27af4a988d In @0x/abi-gen-wrappers: Regenerate contract wrappers. 2019-04-28 22:25:12 -04:00
Lawrence Forman
fddad131a2 In @0x/base-contract: Expose txHashPromise in PromiseWithTransactionHash.
In `@0x/abi-gen-templates`: Update `awaitTransactionSuccessAsync()` partial to expose `txHashPromise`.
2019-04-28 22:25:12 -04:00
Lawrence Forman
4d493eeebd In @0x/contracts-asset-proxy: Update tests to use contract-built-in awaitTransactionSuccessAsync(). 2019-04-28 22:25:12 -04:00
Lawrence Forman
14c1495a1a In @0x/abi-gen-templates: Make txData parameter optional in awaitTransactionSuccessAsync().
In `@0x/base-contract`: Make `PromiseWithTransactionHash` class compatible with ES5 transpiler.
In `@0x/abi-gen-wrappers`: Regenerate contract wrappers.
2019-04-28 22:25:12 -04:00
Lawrence Forman
49c029ddb3 In @0x/abi-gen-templates: Add txData parameter to awaitTransactionSuccessAsync.
In `@0x/abi-gen-templates`: Regenerate wrappers.
2019-04-28 22:25:12 -04:00
Lawrence Forman
ddbe142c4c In @0x/abi-gen-wrappers: Regenerate contract wrappers. 2019-04-28 22:25:12 -04:00
Lawrence Forman
4710b40e45 In @0x/abi-gen-templates: Add timeoutMs parameter to awaitTransactionSuccessAsync 2019-04-28 22:25:12 -04:00
Lawrence Forman
be0b296769 Fix more linter errors. 2019-04-28 22:25:12 -04:00
Lawrence Forman
0a0ee67740 Fix linter errors. 2019-04-28 22:25:12 -04:00
Lawrence Forman
943d648225 In @0x/abi-gen-wrappers: Regenerate wrappers. 2019-04-28 22:25:12 -04:00
Lawrence Forman
6d835f5cc1 In @0x/abi-gen-templates: Add awaitTransactionSuccessAsync() to transaction template. 2019-04-28 22:25:12 -04:00
Lawrence Forman
a59cd67acf In @0x/base-contract: expose a PromiseWithTransactionHash type. 2019-04-28 22:25:12 -04:00
Lawrence Forman
bbc06be091 Update contracts/exchange-forwarder to 0.5.5 (#1796)
* Cherry-pick updated `@0x/contracts-exchange-forwarder` from `3.0` branch.

* Add PR numbers to changelogs
2019-04-28 22:21:13 -04:00
David Sun
d303e9f347 Merge pull request #1795 from 0xProject/feature/website/new-sitemap.txt
Added new sitemap.txt
2019-04-26 20:03:59 -04:00
David Sun
85ee923d89 added new sitemap.txt 2019-04-26 20:01:55 -04:00
David Sun
fe6ba20ff5 Merge pull request #1788 from 0xProject/feature/website/seo+polish
Updated meta data for website
2019-04-26 16:24:31 -04:00
Fabio B
18acf50b12 Merge pull request #1789 from 0xProject/fix/order-watcher-race-condition
Fix OrderWatcher race-condition bug
2019-04-24 16:09:58 -05:00
Fabio B
509fabb61c Merge pull request #1733 from PaulRBerg/fix/monorepo-scripts/broken-yarn-command
Fix yarn command in monorepo-scripts
2019-04-23 18:19:33 -05:00
Fabio Berger
cc3378b4cd Add CHANGELOG entry 2019-04-23 18:07:12 -05:00
Fabio Berger
8d3ccf333d Fix race-condition bug 2019-04-23 18:05:33 -05:00
David Sun
520919b165 prettier+lint 2019-04-23 18:41:54 -04:00
Francesco Agosti
600b86dd31 Merge pull request #1787 from 0xProject/feature/instant/utility-methods
Export utility methods and data from instant
2019-04-23 13:21:27 -07:00
fragosti
9c3fdd2584 Export utility methods and data from instant 2019-04-23 13:03:31 -07:00
David Sun
73974cd90f added large card variant 2019-04-23 11:12:36 -04:00
David Sun
8a60b3b402 switched metadata for explore page 2019-04-23 11:05:14 -04:00
Francesco Agosti
59ed5ae6b7 Merge pull request #1785 from 0xProject/feature/instant/erc721-screen-support
Add overflow scroll to instant overlay & fix display bug
2019-04-22 20:39:15 -05:00
fragosti
c687385974 Fix token amount bug 2019-04-22 18:21:32 -07:00
fragosti
2f72e15ea7 Add overflow scroll to instant overlay 2019-04-22 18:07:20 -07:00
Brandon Millman
7ea99baeb2 Merge pull request #1781 from 0xProject/feature/website/add-rui-mason
Added Rui and Mason to the team page
2019-04-22 14:21:11 -07:00
Francesco Agosti
14f3d20772 Merge pull request #1768 from 0xProject/feature/instant/erc-721-support
Super MVP ERC 721 in Instant
2019-04-19 18:21:07 -05:00
fragosti
72f51df25f Change 0x site URL 2019-04-19 17:59:37 -05:00
fragosti
a94b58e304 Remove lodash is undefined 2019-04-19 17:57:06 -05:00
fragosti
d327fabf9c Remove empty switch statement in instant 2019-04-19 17:21:06 -05:00
fragosti
9e02888c74 Apply prettier 2019-04-19 17:05:09 -05:00
fragosti
98c9a847f3 Improve index.html 2019-04-19 16:58:42 -05:00
fragosti
a159f4c9d6 Make ERC721 image fitting more flexible 2019-04-19 16:49:37 -05:00
fragosti
b197731ed2 Add back mysterious change because of merge 2019-04-19 12:34:17 -05:00
fragosti
028f54fdf0 Fix linting errors 2019-04-19 12:28:28 -05:00
fragosti
de62a0f8ed Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/erc-721-support 2019-04-19 11:31:52 -05:00
Chris Kalani
a0fcc50a5f Added Rui and Mason to the team page 2019-04-18 11:58:31 -07:00
Brandon Millman
4f186e843c Merge pull request #1777 from 0xProject/feature/website/add-paul-vienhage
Added Paul to team page, updated 2 photos, cleaned up titles
2019-04-15 09:13:52 -07:00
Chris Kalani
df64c20587 Added Paul to team page, updated 2 photos, cleaned up titles 2019-04-12 16:00:24 -07:00
Jacob Evans
c78a602990 Publish
- 0x.js@6.0.6
 - @0x/abi-gen@2.0.9
 - @0x/abi-gen-templates@2.0.2
 - @0x/abi-gen-wrappers@4.2.0
 - @0x/assert@2.0.9
 - @0x/asset-buyer@6.1.0
 - @0x/base-contract@5.0.5
 - @0x/connect@5.0.5
 - @0x/contract-addresses@2.3.1
 - @0x/contract-artifacts@1.5.0
 - @0x/contract-wrappers@9.0.0
 - @0x/contracts-gen@1.0.8
 - @0x/dev-tools-pages@0.0.25
 - @0x/dev-utils@2.2.1
 - ethereum-types@2.1.2
 - @0x/fill-scenarios@3.0.5
 - @0x/instant@1.0.20
 - @0x/json-schemas@3.0.9
 - @0x/metacoin@0.0.47
 - @0x/migrations@4.1.1
 - @0x/monorepo-scripts@1.0.30
 - @0x/order-utils@7.2.0
 - @0x/order-watcher@4.0.6
 - @0x/pipeline@1.0.17
 - @0x/react-docs@2.0.10
 - @0x/react-shared@2.0.10
 - @0x/sol-compiler@3.1.6
 - @0x/sol-coverage@3.0.3
 - @0x/sol-doc@2.0.10
 - @0x/sol-profiler@3.1.5
 - @0x/sol-resolver@2.0.7
 - @0x/sol-trace@2.0.11
 - @0x/sol-tracing-utils@6.0.10
 - @0x/sra-spec@2.0.9
 - @0x/subproviders@4.0.5
 - @0x/testnet-faucets@1.0.76
 - @0x/tslint-config@3.0.1
 - @0x/types@2.2.2
 - @0x/typescript-typings@4.2.2
 - @0x/utils@4.3.1
 - @0x/web3-wrapper@6.0.5
 - @0x/website@0.0.79
 - @0x/contracts-asset-proxy@2.1.1
 - @0x/contracts-coordinator@2.0.0
 - @0x/contracts-erc1155@1.1.1
 - @0x/contracts-erc20@2.2.0
 - @0x/contracts-erc721@2.1.1
 - @0x/contracts-exchange@2.1.1
 - @0x/contracts-exchange-forwarder@2.1.1
 - @0x/contracts-exchange-libs@2.1.1
 - @0x/contracts-extensions@3.1.1
 - @0x/contracts-multisig@3.1.1
 - @0x/contracts-test-utils@3.1.2
 - @0x/contracts-utils@3.1.1
2019-04-11 17:00:06 +01:00
Jacob Evans
0acec57ba9 Updated CHANGELOGS 2019-04-11 16:59:38 +01:00
Xianny
7423028fea Replace lodash with built-ins where possible to reduce bundle size (#1766)
* add tslint rule to disallow lodash.isUndefined

* add tslint rule to disallow lodash.isNull

* apply fixes
2019-04-10 09:36:32 -07:00
David Sun
49d951b7be Merge pull request #1772 from 0xProject/bug/website-photos
Fix bug with photo name url
2019-04-09 23:44:55 -07:00
David Sun
a554c9518d changed photo name url 2019-04-09 23:43:23 -07:00
David Sun
f3c7ba445e Merge pull request #1771 from 0xProject/feature/website/new-team-photos
Website new team photos
2019-04-09 23:30:51 -07:00
David Sun
3abff41385 commiting photos 2019-04-09 23:08:29 -07:00
Ryan Chow
6c36832f0e Stop using deprecated web3.py interface (#1759)
* Refactor contract function call to support web3.py v5.0.0. (backwards compatible with v4)
2019-04-09 09:33:36 -04:00
fragosti
310c18707b Improve index.html 2019-04-05 16:57:13 -07:00
fragosti
422a4a5578 Add image component 2019-04-05 16:44:17 -07:00
fragosti
a995b2e1ae UI presenting NFT a bit more nicely 2019-04-05 16:25:53 -07:00
fragosti
90ad681a9e Extreme MVP of buying a ERC721 works 2019-04-05 15:55:10 -07:00
David Sun
2ff5c39712 Merge pull request #1767 from dave4506/fix/website/bug-sort-menu
Fix for menu z-index for explore
2019-04-05 15:03:13 -07:00
David Sun
ded849fd6d fix for menu z-index 2019-04-05 15:01:07 -07:00
David Sun
02f7064953 Merge pull request #1763 from dave4506/fix/website/flash-css-error
Fix Explore Issues with flash of css + other minor bugs
2019-04-05 14:57:19 -04:00
David Sun
1ddadfce1e added animation to tiles 2019-04-05 11:26:14 -07:00
David Sun
7720e5007c added animations to explore 2019-04-05 11:17:56 -07:00
David Sun
ccfd021796 switched header 'href' to 'to' 2019-04-05 11:17:56 -07:00
F. Eugene Aumson
fdcad84cee Delete merge conflict artifact (#1758) 2019-04-04 18:08:13 -04:00
Alex Browne
ad3e3b8421 Merge pull request #1755 from 0xProject/fix/circleci-yarn-permission-denied
Fix yarn permission denied errors in CircleCI
2019-04-04 13:21:36 -07:00
Jacob Evans
f67b4f8902 Merge pull request #1747 from 0xProject/feature/cut-the-package-fat
Cut the package fat! Part 1: Unwanted files
2019-04-04 14:26:23 +01:00
Jacob Evans
3c0d7319ba Update artifacts and remove top level artifacts 2019-04-04 12:30:41 +01:00
Jacob Evans
7f0aab6ec6 Remove unused deps 2019-04-04 12:30:41 +01:00
Jacob Evans
669578a926 Add contract-artifacts to circleci 2019-04-04 12:30:41 +01:00
Jacob Evans
fa1db64a8e Add a test to keep artifact sizes down 2019-04-04 12:30:41 +01:00
Jacob Evans
7cf60fa927 Remove sourcecode and opcodes from artifacts 2019-04-04 12:30:41 +01:00
Jacob Evans
75a0d3e494 Update all .npmignores 2019-04-04 12:30:41 +01:00
Jacob Evans
a98218ae22 Whitelist npmignore 2019-04-04 12:30:40 +01:00
Jacob Evans
10952e9dc4 Cut the package fat 2019-04-04 12:30:33 +01:00
Alex Browne
b36e23471b Fix yarn permission denied errors in CircleCI 2019-04-03 17:19:58 -07:00
Alex Browne
f45bf1c95b Merge pull request #1754 from 0xProject/fix/skip-geth-tests-ci
Disable Geth tests in CircleCI
2019-04-03 17:06:09 -07:00
Alex Browne
d4db2587aa Disable Geth tests in CircleCI 2019-04-03 16:38:58 -07:00
F. Eugene Aumson
62e6336a7d Fix race condition in CI runs of Python SRA client tests (#1751)
* In CI, don't start Launch Kit til Ganache is ready

* Re-enable Python SRA client tests

* For local testing, await service readiness
2019-04-03 18:22:26 -04:00
F. Eugene Aumson
2d8acd4711 Disable Python SRA tests against Launch Kit (#1750)
These tests have worked multiple times in Circle CI, but now they're not, and it seems to be misbehaving intermittently, so just disabling them for now.
2019-04-02 13:24:27 -04:00
Brandon Millman
d7d95be042 Merge pull request #1745 from 0xProject/fix/website/fix-codesandbox
Fix code sandbox link and 0x.js dep in website
2019-04-01 10:21:17 -07:00
David Sun
e3c97f0681 Merge pull request #1748 from dave4506/fix/website/pixure+bugs
Switched Pixura link
2019-04-01 08:59:20 -04:00
David Sun
1a4fa015b9 switched back to roboto 2019-04-01 08:54:02 -04:00
David Sun
63dacfaac5 switched pixura link 2019-04-01 08:48:46 -04:00
Brandon Millman
f7263ac2c6 Fix 0x.js dep 2019-03-29 16:54:41 -07:00
Brandon Millman
c7d7e1f0e3 Fix codesandbox link 2019-03-29 16:53:13 -07:00
Daniel Pyrathon
9c54b615f5 Merge pull request #1744 from 0xProject/feature/website/moar-Explore-updates
updates explore page
2019-03-29 16:28:02 -07:00
F. Eugene Aumson
69fe1aa981 Remove doctest skip for get_order method (#1743)
* Remove doctest skip for get_order method

* Set ganache env for Launch Kit in Circle CI

* Unpin Launch Kit version used in CI
2019-03-29 18:54:46 -04:00
rsingireddy
bfb3d19e3b fixes by way of yarn prettier 2019-03-29 15:45:49 -07:00
rsingireddy
0b4e62a63e updates explore page 2019-03-29 15:26:44 -07:00
David Sun
5cdbc03e71 Merge pull request #1676 from dave4506/website/feature/explore-page
Explore page
2019-03-28 21:10:57 -04:00
David Sun
16cd6dd25d removed .DS_Store 2019-03-28 20:54:00 -04:00
David Sun
fc71e7f99f updated to svg assets + new description 2019-03-28 20:51:56 -04:00
David Sun
e740380731 added changes for PR 2019-03-28 17:33:26 -04:00
Jacob Evans
f9921d2c91 Merge pull request #1714 from 0xProject/feature/order-utils/one-sided-transfer-validation
Simulate Maker transfer in order validation
2019-03-28 15:10:00 +01:00
Jacob Evans
d8bfc92cc5 Update documentation and changelog 2019-03-28 14:49:22 +01:00
Jacob Evans
1f2214f891 Major bump as this change could break existing orderbooks 2019-03-28 14:19:33 +01:00
Jacob Evans
50835e317f Update CHANGELOG 2019-03-28 14:00:40 +01:00
Jacob Evans
6c8d4dcc1e Allow simulation taker address to be specified 2019-03-28 14:00:40 +01:00
Jacob Evans
85a7efbd61 Change to accept maker amount 2019-03-28 14:00:40 +01:00
Jacob Evans
6b5ef10467 Remove unused imports 2019-03-28 14:00:39 +01:00
Jacob Evans
0bf46bfcb5 Re-use order relevant state 2019-03-28 14:00:39 +01:00
Jacob Evans
8b8dc7ac78 Update jsdoc 2019-03-28 14:00:39 +01:00
Fabio B
a017122c44 Update packages/contract-wrappers/src/types.ts
Co-Authored-By: dekz <dekz@dekz.net>
2019-03-28 14:00:39 +01:00
Fabio B
86a9a892d2 Update packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
Co-Authored-By: dekz <dekz@dekz.net>
2019-03-28 14:00:39 +01:00
Fabio B
f31a141d78 Update packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
Co-Authored-By: dekz <dekz@dekz.net>
2019-03-28 14:00:39 +01:00
Jacob Evans
fa67997424 Move order_utils from asset-buyer to order-utils package 2019-03-28 14:00:39 +01:00
Jacob Evans
a5f06c577d Remove unused pause 2019-03-28 14:00:38 +01:00
Jacob Evans
e575672877 Update CHANGELOGs 2019-03-28 14:00:38 +01:00
Jacob Evans
a34d5b29e8 Return eventually rejectedWith 2019-03-28 14:00:38 +01:00
Jacob Evans
91ec65da1b Await in tests to prevent clash in before blocks 2019-03-28 14:00:38 +01:00
Jacob Evans
ee8d40a66e Add IAssetProxy to python 2019-03-28 14:00:38 +01:00
Jacob Evans
38ac2e80ed Remove unused code 2019-03-28 14:00:38 +01:00
Jacob Evans
8b70762e34 Add a Test for an Untransferrable ERC20 token 2019-03-28 14:00:37 +01:00
Jacob Evans
18c613a611 Update comments 2019-03-28 14:00:37 +01:00
Jacob Evans
957f8c56a1 validateRemainingOrderAmountIsFillable 2019-03-28 14:00:37 +01:00
Jacob Evans
b16446877e only 2019-03-28 14:00:37 +01:00
Jacob Evans
9164d58dc7 Simulate maker transfer in order validation 2019-03-28 14:00:27 +01:00
Francesco Agosti
0beb2f9d3c Merge pull request #1740 from 0xProject/feature/website/add-Lawrence-change-Mel-role-change-Alex-Browne-role
adds lawrence forman to the website. changes mel role and alex browne…
2019-03-27 11:58:34 -07:00
Brandon Millman
ccdd66052a Merge pull request #1737 from 0xProject/feature/instant/update-infura
[instant] Add infura project id via env variables when bundling instant
2019-03-26 19:04:57 -07:00
Brandon Millman
518fd814b6 Merge branch 'development' into feature/website/add-Lawrence-change-Mel-role-change-Alex-Browne-role 2019-03-26 17:23:58 -07:00
rsingireddy
f49bb78dba adds lawrennce picture 2019-03-26 17:13:56 -07:00
rsingireddy
a54aa77d28 adds lawrence forman to the website. changes mel role and alex browne role 2019-03-26 16:51:07 -07:00
Brandon Millman
f85e443c9c Add instant.0x.org to host domains 2019-03-26 16:33:16 -07:00
Alex Browne
399e004e7f Merge pull request #1738 from 0xProject/fix/test-python-ci-failure-launch-kit-needs-pinning
Pin Launch Kit version in test-python CI task
2019-03-26 16:26:07 -07:00
Michael Huang
3099ba71eb New demos for Python packages (#1734)
End-to-end demos of constructing and signing an order and submitting it to a Relayer.  Docs are generated from the code, and include usage examples that are verified through automated testing.
2019-03-26 19:07:04 -04:00
F. Eugene Aumson
951fcf384c pin launch kit version in test-python ci task 2019-03-26 18:00:16 -04:00
Brandon Millman
c750368a3e Add infura project id via env variables when bundling instant 2019-03-26 14:17:57 -07:00
David Sun
3149d86855 lint + prettier 2019-03-26 16:55:10 -04:00
David Sun
3aaf21e34e removed banner and lint + prettier 2019-03-26 16:20:03 -04:00
David Sun
519c375a42 added responsive features 2019-03-26 16:20:03 -04:00
David Sun
3ed2c732bd added announcement banner 2019-03-26 16:20:02 -04:00
David Sun
0aa5550d0f Rearchitected Explore Page + added new features 2019-03-26 16:20:02 -04:00
David Sun
1bc8dd83d3 added settings dropdown 2019-03-26 16:20:02 -04:00
David Sun
c642cd6fed changed to popular 2019-03-26 16:20:01 -04:00
David Sun
f72918362d created most of the page's functionality 2019-03-26 16:20:01 -04:00
Leonid Logvinov
28c4ca73ab Merge pull request #1728 from ochikov/patch-6
Update constants.ts
2019-03-26 14:46:15 +01:00
Michael Huang
a256494ec8 Python contract wrappers (#1721) 2019-03-25 19:25:41 -04:00
Paul Berg
5fd359a64f Fix yarn command 2019-03-25 19:32:07 +00:00
Michael Huang
e043735362 Fix regex validation on numeric inputs (#1731)
* Fix regex validation on numeric inputs
2019-03-25 15:18:58 -04:00
Amir Bandeali
7010b1adb9 Merge pull request #1729 from 0xProject/feat/coordinator/functionVisibility
Modify function visibilities in Coordinator contract
2019-03-25 11:51:23 -07:00
Amir Bandeali
17ff262729 Update CHANGELOG 2019-03-25 10:11:37 -07:00
Amir Bandeali
1c18838cd8 Fix typos and add tests for decodeOrdersFromFillData 2019-03-25 10:11:37 -07:00
Amir Bandeali
55b87ae78d Make decodeOrdersFromFillData oublic and assertValidTransactionOrdersApproval internal 2019-03-25 10:11:37 -07:00
Amir Bandeali
e446e902f3 Remove TestMixins contract 2019-03-25 10:11:37 -07:00
Amir Bandeali
095b52e0b2 Make hashing methods public 2019-03-25 10:11:37 -07:00
Michael Huang
4f25ff6a50 local_message_signer middleware for web3.py (#1713) 2019-03-25 11:25:41 -04:00
ochikov
6242e0aeec Update constants.ts 2019-03-25 00:21:07 +02:00
Francesco Agosti
fde9fc9dd4 Merge pull request #1722 from 0xProject/fix/instant-polling
Unmount Instant when closing
2019-03-22 17:03:16 -07:00
fragosti
c481e42673 Reset yarn.lock 2019-03-22 16:21:02 -07:00
fragosti
5e228d7232 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into fix/instant-polling 2019-03-22 15:03:15 -07:00
fragosti
6b8e40fdc9 Make unrender idempotent 2019-03-22 15:02:12 -07:00
Alex Svanevik
bca44bf9e3 Merge pull request #1684 from 0xProject/pull-github-data
Pull Github data
2019-03-22 18:33:40 +08:00
askeluv
08e49dcf2e Throttling to respect rate limits 2019-03-22 18:15:49 +08:00
Fabio Berger
0f45409b4d Publish
- 0x.js@6.0.5
 - @0x/abi-gen@2.0.8
 - @0x/abi-gen-wrappers@4.1.0
 - @0x/assert@2.0.8
 - @0x/asset-buyer@6.0.5
 - @0x/base-contract@5.0.4
 - @0x/connect@5.0.4
 - @0x/contract-addresses@2.3.0
 - @0x/contract-artifacts@1.4.0
 - @0x/contract-wrappers@8.0.5
 - @0x/contracts-gen@1.0.7
 - @0x/dev-tools-pages@0.0.24
 - @0x/dev-utils@2.2.0
 - @0x/fill-scenarios@3.0.4
 - @0x/instant@1.0.19
 - @0x/json-schemas@3.0.8
 - @0x/metacoin@0.0.46
 - @0x/migrations@4.1.0
 - @0x/monorepo-scripts@1.0.29
 - @0x/order-utils@7.1.1
 - @0x/order-watcher@4.0.5
 - @0x/pipeline@1.0.16
 - @0x/react-docs@2.0.9
 - @0x/react-shared@2.0.9
 - @0x/sol-compiler@3.1.5
 - @0x/sol-coverage@3.0.2
 - @0x/sol-doc@2.0.9
 - @0x/sol-profiler@3.1.4
 - @0x/sol-resolver@2.0.6
 - @0x/sol-trace@2.0.10
 - @0x/sol-tracing-utils@6.0.9
 - @0x/sra-spec@2.0.8
 - @0x/subproviders@4.0.4
 - @0x/testnet-faucets@1.0.75
 - @0x/types@2.2.1
 - @0x/typescript-typings@4.2.1
 - @0x/utils@4.3.0
 - @0x/web3-wrapper@6.0.4
 - @0x/website@0.0.78
 - @0x/contracts-asset-proxy@2.1.0
 - @0x/contracts-coordinator@1.1.0
 - @0x/contracts-erc1155@1.1.0
 - @0x/contracts-erc20@2.1.0
 - @0x/contracts-erc721@2.1.0
 - @0x/contracts-exchange@2.1.0
 - @0x/contracts-exchange-forwarder@2.1.0
 - @0x/contracts-exchange-libs@2.1.0
 - @0x/contracts-extensions@3.1.0
 - @0x/contracts-multisig@3.1.0
 - @0x/contracts-test-utils@3.1.1
 - @0x/contracts-utils@3.1.0
2019-03-21 17:07:20 +01:00
Fabio Berger
5469d3ec13 Updated CHANGELOGS 2019-03-21 17:07:04 +01:00
Fabio B
d12f8410b9 Merge pull request #1689 from 0xProject/addCoordinatorSupport
Add Coordinator contracts support in dev tools
2019-03-21 16:04:19 +01:00
Fabio Berger
704c52d229 Move @0x/contracts-test-utils dependency from devDep to deps to fix publish test 2019-03-21 15:33:47 +01:00
Fabio Berger
7dcdda14f5 modify types 2019-03-21 15:13:39 +01:00
Fabio Berger
0f59256ca7 merge development 2019-03-21 15:04:52 +01:00
Fabio Berger
ddee04e98c Try import instead of const 2019-03-21 14:46:47 +01:00
Steve Klebanoff
50f5002b71 Unmount component when closing 2019-03-21 14:43:31 +01:00
Fabio Berger
e866add4b0 Add artifacts to python packages 2019-03-21 14:33:54 +01:00
Fabio Berger
39b93b88c5 Fix prettier 2019-03-21 14:32:21 +01:00
Fabio Berger
deb7e95567 Revert change 2019-03-21 14:29:26 +01:00
Jacob Evans
91500501ce Merge pull request #1695 from 0xProject/feature/reduce-excess-block-polling
Reduce excess block polling when using Web3ProviderEngine
2019-03-21 13:37:07 +01:00
Jacob Evans
6a1caeb9a1 Update CHANGELOGs 2019-03-21 12:33:09 +01:00
Jacob Evans
cee7803c37 Remove IAssetProxy 2019-03-21 12:02:38 +01:00
Jacob Evans
4e8d0ac7cb Add IAssetProxy to python 2019-03-21 11:52:43 +01:00
Jacob Evans
47bbcb9935 Add HACK explanation 2019-03-21 11:52:43 +01:00
Jacob Evans
c0288c5f26 Fix changelog, remove migrate_testnet 2019-03-21 11:52:28 +01:00
Jacob Evans
18c2013625 Update contract CHANGELOGs 2019-03-21 11:51:53 +01:00
Jacob Evans
548089888d Remove excess web3providernegine polling from contracts 2019-03-21 11:50:19 +01:00
Jacob Evans
180c65cfeb Change all packages to use web3providerengine without excess polling 2019-03-21 11:50:19 +01:00
Jacob Evans
6a28e41bc8 Remove unnecessary type assertion 2019-03-21 11:50:19 +01:00
Jacob Evans
f9ef942a98 Use providerUtils.startProviderEngine to minimize the HACK 2019-03-21 11:50:18 +01:00
Jacob Evans
8272c7a74e Reduce excess block polling when using Web3ProviderEngine 2019-03-21 11:49:26 +01:00
Amir Bandeali
4e745489db Merge pull request #1720 from 0xProject/fix/remove-tec
Remove TEC package artifacts
2019-03-20 14:01:39 -07:00
Amir Bandeali
fc2625a0c0 Remove TEC package artifacts 2019-03-20 13:28:37 -07:00
Amir Bandeali
d0e43ebaf1 Merge pull request #1712 from merklejerk/fix/feature/contracts/LibAddressArray-tests
Fix LibAddressArray.indexOf() and add LibAddressArray tests.
2019-03-20 11:38:08 -07:00
Fabio Berger
879805e316 merge development 2019-03-20 17:07:02 +01:00
Fabio Berger
6845d2e0ef Add coordinator artifacts to python package 2019-03-20 16:56:08 +01:00
Fabio Berger
542d1c1c41 In-line the declaration 2019-03-20 16:27:13 +01:00
Greg Hysen
31568e7abb Merge pull request #1716 from 0xProject/contracts-asset-proxy/updateProxyId
ERC1155 ProxyId - ERC1155Token -> ERC1155Assets
2019-03-20 08:12:58 -07:00
Lawrence
4b2488b124 Ran prettier. 2019-03-20 10:58:25 -04:00
Leonid Logvinov
d4c37ecfa3 Publish
- 0x.js@6.0.4
 - @0x/abi-gen@2.0.7
 - @0x/abi-gen-wrappers@4.0.3
 - @0x/assert@2.0.7
 - @0x/asset-buyer@6.0.4
 - @0x/base-contract@5.0.3
 - @0x/connect@5.0.3
 - @0x/contract-addresses@2.2.3
 - @0x/contract-wrappers@8.0.4
 - @0x/contracts-gen@1.0.6
 - @0x/dev-tools-pages@0.0.23
 - @0x/dev-utils@2.1.4
 - ethereum-types@2.1.1
 - @0x/fill-scenarios@3.0.3
 - @0x/instant@1.0.18
 - @0x/json-schemas@3.0.7
 - @0x/metacoin@0.0.45
 - @0x/migrations@4.0.4
 - @0x/monorepo-scripts@1.0.28
 - @0x/order-utils@7.1.0
 - @0x/order-watcher@4.0.4
 - @0x/pipeline@1.0.15
 - @0x/react-docs@2.0.8
 - @0x/react-shared@2.0.8
 - @0x/sol-compiler@3.1.4
 - @0x/sol-coverage@3.0.1
 - @0x/sol-doc@2.0.8
 - @0x/sol-profiler@3.1.3
 - @0x/sol-resolver@2.0.5
 - @0x/sol-trace@2.0.9
 - @0x/sol-tracing-utils@6.0.8
 - @0x/sra-spec@2.0.7
 - @0x/subproviders@4.0.3
 - @0x/testnet-faucets@1.0.74
 - @0x/types@2.2.0
 - @0x/typescript-typings@4.2.0
 - @0x/utils@4.2.3
 - @0x/web3-wrapper@6.0.3
 - @0x/website@0.0.77
 - @0x/contracts-asset-proxy@2.0.0
 - @0x/contracts-coordinator@1.0.0
 - @0x/contracts-erc1155@1.0.1
 - @0x/contracts-erc20@2.0.0
 - @0x/contracts-erc721@2.0.0
 - @0x/contracts-exchange@2.0.0
 - @0x/contracts-exchange-forwarder@2.0.0
 - @0x/contracts-exchange-libs@2.0.0
 - @0x/contracts-extensions@3.0.0
 - @0x/contracts-multisig@3.0.0
 - @0x/contracts-test-utils@3.1.0
 - @0x/contracts-utils@3.0.0
2019-03-20 15:26:54 +01:00
Leonid Logvinov
3f9fd7c060 Updated CHANGELOGS 2019-03-20 15:26:43 +01:00
Lawrence
6ed1412bdd Remove unnecessary copy operation in TestLibAddressArray.testAppendRealloc().
Test explicitly for newly allocated address in LibAddressArray "append" tests.
2019-03-20 10:19:46 -04:00
Lawrence
78b9a45158 Add PR#s to changelogs. 2019-03-20 10:19:46 -04:00
Lawrence
b8925baa88 Add unit tests for contracts/utils/LibAddressArray.
Fix `LibAddressArray.indexOf` returning wrong index.
2019-03-20 10:19:46 -04:00
Lawrence
87fd3f2a82 Add RevertReason.InvalidFreeMemoryPtr to packages/types. 2019-03-20 10:19:46 -04:00
Leonid Logvinov
0490ef5900 Merge pull request #1719 from 0xProject/feature/update-soliidty-parser-antlr
Update solidity-parser-antlr
2019-03-20 15:15:11 +01:00
Fabio Berger
8af164dbd2 Attempt to fix type issue 2019-03-20 15:05:21 +01:00
Fabio Berger
c994afbf3c Fix Pylint 2019-03-20 15:02:49 +01:00
Leonid Logvinov
fa36c91bd6 Remove legacy entries from AST Visitor 2019-03-20 14:50:26 +01:00
Fabio Berger
843caf86fb merge development 2019-03-20 14:32:26 +01:00
Leonid Logvinov
5b8f294aaf Update solidity-parser-antlr 2019-03-20 14:31:51 +01:00
Fabio Berger
44eef5b0e0 Fix comment 2019-03-20 14:31:10 +01:00
Fabio B
aad75840d4 Merge pull request #1718 from 0xProject/orderWatcher/fixRaceCondition
Fix race-condition in Order-watcher
2019-03-20 14:19:39 +01:00
Fabio Berger
31faef7030 Add changelog entry 2019-03-20 14:19:25 +01:00
Fabio Berger
941877a05a Fix linter 2019-03-20 13:48:59 +01:00
Fabio B
4fd4c1e8e1 Merge pull request #1717 from ochikov/fix-documentation
Fix documentation typos
2019-03-20 13:47:29 +01:00
Fabio Berger
7cd27cd9c8 Make sure we reset blockchain state 2019-03-20 13:31:55 +01:00
Fabio Berger
54dbef2b4f Add semaphore around event callbacks that all modify shared state 2019-03-20 13:31:35 +01:00
Ognyan Chikov
05424c9f33 Fix documentation typos 2019-03-20 11:37:38 +02:00
askeluv
346c6fc590 Deal with failing Github API for issues 2019-03-20 12:41:56 +08:00
Greg Hysen
7ed3afe9f0 Updated function signature for ERC1155 ProxyId - ERC1155Token -> ERC1155Assets 2019-03-19 15:35:08 -07:00
Greg Hysen
d29ed6cd49 Merge pull request #1715 from 0xProject/update/contract-wrappers/dutchAuctionMainnetAddress
Added Dutch Auction mainnet address to contract-addresses package
2019-03-19 15:18:34 -07:00
Greg Hysen
8c3abf3473 Updated changelog 2019-03-19 15:03:43 -07:00
Greg Hysen
384114d3c7 Added Dutch Auction address on mainnet to contract-addresses package 2019-03-19 15:01:24 -07:00
Greg Hysen
e8be5a0a8f Merge pull request #1673 from 0xProject/feature/contracts/erc1155ProxyIntegrationTests-2
Exchange & Proxy Integration Tests - ERC1155
2019-03-19 11:00:56 -07:00
Greg Hysen
98c6fa10e6 Added 1explicit ERC1555Poxy testsfor cwhen receiver allback data is NULLL (0x) 2019-03-19 09:37:16 -07:00
Greg Hysen
30d0bdec07 Updated changelog and yarn.lock 2019-03-19 09:37:16 -07:00
Greg Hysen
7024f29865 updated changelogs 2019-03-19 09:36:12 -07:00
Greg Hysen
29ebed9514 Added ERC1155 artifacts to log decoder for exchange wrapper 2019-03-19 09:36:11 -07:00
Greg Hysen
c0260bc44a rebased against development 2019-03-19 09:36:11 -07:00
Greg Hysen
6992bff0e0 Ran prettier & linter 2019-03-19 09:36:11 -07:00
Greg Hysen
6957e6e8f7 ERC1155 integration tests with MultiAssetProxy 2019-03-19 09:36:11 -07:00
Greg Hysen
31dbca7efc More integration tests for ERC1155 <> Multi Asset Proxy encoding / decoding 2019-03-19 09:36:11 -07:00
Greg Hysen
82b6dad1ba Exchange Integration Tests 2019-03-19 09:36:11 -07:00
Greg Hysen
5063c17e6b ERC1155 Asset Data tests + types 2019-03-19 09:36:11 -07:00
Amir Bandeali
3fff3d9c60 Merge pull request #1707 from 0xProject/fix/update-ganache
Change `evmVersion` to `constantinople` for contract compilation
2019-03-19 08:23:12 -07:00
Fabio Berger
2fbe0aed32 Fix Python tests 2019-03-19 14:53:43 +01:00
Alex Svanevik
3bdc1802cb Merge branch 'development' into pull-github-data 2019-03-19 14:31:31 +08:00
Francesco Agosti
2675833b0d Merge pull request #1709 from 0xProject/feature/website/add-Daniel
adds daniel pyrahon to website
2019-03-18 14:53:49 -07:00
fragosti
939a5b477a Run linter 2019-03-18 14:51:51 -07:00
Rahul Singireddy
dc57e7a5b3 adds daniel pyrahon to website 2019-03-18 14:19:27 -07:00
Amir Bandeali
a401b8f475 Fix web3wrapper node version test 2019-03-18 13:07:34 -07:00
Amir Bandeali
b008fabdac Change petersburg to constantinople 2019-03-18 13:07:34 -07:00
Amir Bandeali
caf286b8cb Update CHANGELOGs 2019-03-18 13:07:34 -07:00
Amir Bandeali
aea278c022 Update evmVersion to petersburg 2019-03-18 13:07:34 -07:00
Amir Bandeali
4e20fe1602 Update ganache-core to 2.5.3 2019-03-18 13:07:34 -07:00
Fabio Berger
849ca58228 Fix PR number 2019-03-18 20:40:29 +01:00
Fabio Berger
9991fca2e5 Add changelog entry for contract-addressesa 2019-03-18 20:39:02 +01:00
Fabio Berger
9c7bdcfeef Add testnet and mainnet coordinator and coordinatorRegistry addresses 2019-03-18 20:37:01 +01:00
Fabio Berger
b5463d522b Add PR numbers 2019-03-18 17:30:10 +01:00
Fabio Berger
af0d830103 Update coordinator wrapper 2019-03-18 17:20:58 +01:00
Fabio Berger
d4187dffa3 Add createCoordinatorApprovalTypedData method to order-utils and use in Coordinator tests 2019-03-18 17:20:51 +01:00
Fabio Berger
a7f06f2be5 Update coordinator abi-gen-wrapper 2019-03-18 16:44:11 +01:00
Fabio Berger
7ff7d1a185 Merge branch 'development' into addCoordinatorSupport
* development:
  Fix order-watcher version
2019-03-18 12:00:18 +01:00
Fabio Berger
d3ab612a89 Fix order-watcher version 2019-03-18 11:59:56 +01:00
Fabio Berger
e3bc80e027 Merge branch 'development' into addCoordinatorSupport
* development: (93 commits)
  Linting
  Copied MixinAssetProxyDispatcher from exchange
  Added deployed contract packages to readme (and link to top-level readme)
  Bumped version of ERC1155Proxy to 0.5.5 + merged ERC20Proxy/ERC721Proxy/MultiAssetProxy dependencies into base contract files
  Make credits program participants 1 row
  Correct comment in `hashEIP712Message()` in `LibEIP712Domai.sol`. Merge janky changelog notes in `types` package. Correct changelog note in `coordinator` changelog.
  Add PR numbers to changelogs.
  additional zero outcome tests
  renamed perUnitValue to valueMultiplier
  added test for amount=0
  Adjusted changelog version since nothing has been published during this PR
  Added calldatacopy comment
  Do not revert if value or amount are zero. Only if amount is non-zero and there is an overflow.
  updated comment for calldatacopy
  yarn.lock for erc1155 proxy
  added exports for 1155 proxy
  Renamed tokenIds -> ids, tokenValues -> values, callbackData -> data to be consistent with the ERC1155 reference implementation.
  Rebased against development
  Ran prettier
  Updated changelogs and documentation for erc1155 proxy
  ...
2019-03-18 11:20:22 +01:00
Alex Svanevik
a8720806f1 Merge pull request #1702 from 0xProject/fix/pipeline/replace-edps-endpoint
Changed EDPS endpoint to a 0x AWS one
2019-03-18 18:09:31 +08:00
askeluv
5aac4c2e5d Linting 2019-03-18 17:36:19 +08:00
Amir Bandeali
6fa645aab9 Merge pull request #1705 from merklejerk/feature/contracts/coordinator-tx-eip712-mixed-domains
Separate domains for Coordinator transactions and approvals
2019-03-16 16:21:01 -07:00
Greg Hysen
842ea4645b Merge pull request #1701 from 0xProject/feature/contracts/erc1155ProxySolidity055
Upgrade asset-proxy package to solidity 0.5.5
2019-03-15 21:32:57 -07:00
Greg Hysen
e1cfbcd4f6 Copied MixinAssetProxyDispatcher from exchange 2019-03-15 21:16:21 -07:00
Greg Hysen
6f17ff55fa Added deployed contract packages to readme (and link to top-level readme) 2019-03-15 21:16:18 -07:00
Greg Hysen
d88af4dfa6 Bumped version of ERC1155Proxy to 0.5.5 + merged ERC20Proxy/ERC721Proxy/MultiAssetProxy dependencies into base contract files 2019-03-15 19:02:24 -07:00
fragosti
bb0ba21e92 Merge https://github.com/0xProject/0x-monorepo into development 2019-03-15 16:48:41 -07:00
fragosti
f0753c8e58 Make credits program participants 1 row 2019-03-15 16:48:18 -07:00
Lawrence Forman
4c55004b08 Correct comment in hashEIP712Message() in LibEIP712Domai.sol.
Merge janky changelog notes in `types` package.
Correct changelog note in `coordinator` changelog.
2019-03-15 19:23:56 -04:00
Lawrence Forman
ae24119c09 Merge branch 'development' into feature/contracts/coordinator-tx-eip712-mixed-domains 2019-03-15 19:10:44 -04:00
Lawrence Forman
b8753d8f20 Add PR numbers to changelogs. 2019-03-15 18:29:26 -04:00
Greg Hysen
bab368b956 Merge pull request #1661 from 0xProject/feature/contracts/erc1155Proxy-4
ERC1155 Asset Proxy
2019-03-15 15:25:55 -07:00
Greg Hysen
22bc1fb21e additional zero outcome tests 2019-03-15 15:05:52 -07:00
Greg Hysen
63ba764de8 renamed perUnitValue to valueMultiplier 2019-03-15 15:05:52 -07:00
Greg Hysen
6a7530d741 added test for amount=0 2019-03-15 15:05:52 -07:00
Greg Hysen
eb9bf7c4f9 Adjusted changelog version since nothing has been published during this PR 2019-03-15 15:05:52 -07:00
Greg Hysen
b6571d0ca3 Added calldatacopy comment 2019-03-15 15:05:52 -07:00
Greg Hysen
9207d1c680 Do not revert if value or amount are zero. Only if amount is non-zero and there is an overflow. 2019-03-15 15:05:52 -07:00
Greg Hysen
f783c9bb25 updated comment for calldatacopy 2019-03-15 15:05:52 -07:00
Greg Hysen
df5786deda yarn.lock for erc1155 proxy 2019-03-15 15:05:51 -07:00
Greg Hysen
de971e6c46 added exports for 1155 proxy 2019-03-15 15:05:02 -07:00
Greg Hysen
2a6ed0c96e Renamed tokenIds -> ids, tokenValues -> values, callbackData -> data to be consistent with the ERC1155 reference implementation. 2019-03-15 15:05:02 -07:00
Greg Hysen
9ec380777a Rebased against development 2019-03-15 15:05:02 -07:00
Greg Hysen
8916d0d367 Ran prettier 2019-03-15 15:05:02 -07:00
Greg Hysen
1e5648111e Updated changelogs and documentation for erc1155 proxy 2019-03-15 15:05:02 -07:00
Greg Hysen
ae51cfe8b9 Added method descriptions to erc1155 proxy wrapper 2019-03-15 15:05:02 -07:00
Greg Hysen
05ef250ab4 Ran prettier & linter 2019-03-15 15:05:02 -07:00
Greg Hysen
38e4871f32 Moved transferFrom with/without logs into ERC1155 Proxy Wrapper 2019-03-15 15:05:02 -07:00
Greg Hysen
a86ba7af2e moved transferFrom into ERC1155 Proxy Wrapper 2019-03-15 15:05:02 -07:00
Greg Hysen
5704afc54c ERC1155 Asset Data tests + types 2019-03-15 15:05:02 -07:00
Greg Hysen
55c4fc9aca Ran prettier / linter 2019-03-15 15:05:02 -07:00
Greg Hysen
888c17353b Renamed erc1155token to erc1155Contract in proxy tests 2019-03-15 15:05:02 -07:00
Greg Hysen
054c0e91a3 removed erc1155 proxy tests from general proxy test file 2019-03-15 15:05:02 -07:00
Greg Hysen
4dfb610eba updated erc1155 proxy tests and moved to their own test file 2019-03-15 15:05:02 -07:00
Greg Hysen
008eb8dd8b cleaning up erc1155 proxy tests 2019-03-15 15:05:02 -07:00
Greg Hysen
2882c4bb89 test with several tokens erc1155 proxy 2019-03-15 15:05:02 -07:00
Greg Hysen
4473851f5b Remaining tests for erc1155 proxy 2019-03-15 15:05:02 -07:00
Greg Hysen
15d9e2d3d5 Split ERC1155 Asset Proxy from ERC1155 POC implementation - squashed 2019-03-15 15:05:02 -07:00
Greg Hysen
d5d9df383e Added remaining erc1155 revert reasons to types package 2019-03-15 15:05:02 -07:00
Greg Hysen
243a04b756 tests for allowance approvals on erc1155 2019-03-15 15:05:02 -07:00
Greg Hysen
b77dcbd39b bumped revision verson for types package 2019-03-15 15:05:02 -07:00
Lawrence Forman
ad5d4bdfc5 Unexport constants from order-utils.
Directly grab the EIP712 constants from the `order-utils` package in `/contracts/coordinator/test/util/hash_utils`.
Update changelogs.
2019-03-15 18:01:43 -04:00
Lawrence Forman
54c17b0068 Ran prettier & linter.
Updated CHANGELOGs.
2019-03-15 17:32:36 -04:00
Lawrence Forman
616907eff8 Update coordinator tests to comply with mixed EIP712 domains. 2019-03-15 16:52:18 -04:00
Lawrence Forman
afaabb3673 Move Coordinator EIP712 constants from contracts/test-utils to packages/order-utils.
Export `constants` from `packages/types`.
Add `SignatureInvalid` to `RevertReason` in `packages/types`.
2019-03-15 16:52:18 -04:00
Lawrence Forman
1c1f625352 Add SignatureType.Invalid to Coordinator.
`LibEIP712Domain.sol` can now produce hashes for both Coordinator and Exchange data through `hashEIP712CoordinatorMessage()` and `hashEIP712ExchangeMessage()`.
Coordinator now only uses its own domain for approval hashes, and the Exchange's domain for transaction hashes.
2019-03-15 16:52:18 -04:00
fragosti
d3f45d2148 Remove facebook from credits page 2019-03-15 11:30:36 -07:00
Xianny
7326dbd108 add greenhouse (#1690) 2019-03-15 10:37:52 -07:00
F. Eugene Aumson
4bf311a282 Enable cryptokitties data from nonfungible.com (#1680)
* enable cryptokitties

    Recall that nonfungible.com sent us an initial data dump so that we
    wouldn't have to pull everything from the API. And recall that we're
    storing that initial dump on S3. Finally, recall that the cryptokitties
    data was particularly voluminous (~1GB), which doesn't easily transfer to
    and from S3.

    These changes provide a CLI script to partition that data (or any such data
    from nonfungible.com) into a set of smaller files; and a scraping script
    that seamlessly recombines those partitions for loading into the database.

* add chainbreakers, chibifighters & mlbcryptobaseball
2019-03-15 10:50:59 -04:00
F. Eugene Aumson
7f5a3f12ca Relay failures through command line interface (#1700)
* Relay failures through command line interface
2019-03-15 10:38:21 -04:00
askeluv
6a9b71466d Changed endpoint to an AWS one + added increased timeout 2019-03-15 15:52:32 +08:00
Amir Bandeali
70e550a25f Merge pull request #1698 from ochikov/patch-3
Update constants.ts
2019-03-14 20:25:54 -07:00
ochikov
1328882ab6 Update constants.ts 2019-03-14 18:12:50 +02:00
Jacob Evans
b378a0608d Merge pull request #1692 from 0xProject/fix/order-watcher/1550
Fix error where object could be undefined given an approval event
2019-03-14 11:30:54 +01:00
Jacob Evans
e28c6d6f9c Add a regression test for #1550 2019-03-14 10:45:20 +01:00
Jacob Evans
f57f29e426 Update changelog 2019-03-14 10:12:13 +01:00
Jacob Evans
f2857452e3 Fix error were object could be undefined given an approval event 2019-03-14 10:12:03 +01:00
Amir Bandeali
af04c294b9 Merge pull request #1693 from 0xProject/fix/contracts/unpinVersions
Unpin Solidity versions for contracts that are not deployed
2019-03-13 22:34:31 -07:00
Amir Bandeali
65c8630534 Unpin Solidity versions for contracts that are not deployed 2019-03-13 16:53:22 -07:00
askeluv
095882d016 Added Github issue entity 2019-03-13 16:30:10 +08:00
askeluv
1693506f80 name -> full_name + fixed error message for missing access token 2019-03-13 11:47:42 +08:00
Greg Hysen
667c22169f Merge pull request #1657 from 0xProject/feature/contracts/erc1155MinimalImplementation
erc1155 minimal implementation
2019-03-12 12:51:43 -07:00
Greg Hysen
c53edf6bd9 0.5.3 -> 0.5.5 in erc1155 contracts 2019-03-12 11:39:00 -07:00
Greg Hysen
b601220845 Updated package.json dependencies 2019-03-12 11:09:39 -07:00
Greg Hysen
e77a608f45 Got build working on erc1155 2019-03-11 19:07:58 -07:00
Amir Bandeali
2822e77716 Merge pull request #1682 from 0xProject/feat/contracts/solidity0.5.5
Upgrade contracts to Solidity 0.5.5
2019-03-11 17:06:28 -07:00
Greg Hysen
98227928af Added Address.sol for isContract checks to contracts-utils package 2019-03-11 16:12:31 -07:00
Greg Hysen
430afbdc80 Replaced SafeMath in ERC1155 package with the version in contracts-utils 2019-03-11 16:06:18 -07:00
Greg Hysen
dfdb48ce7d Updated README and circleci for erc1155 package 2019-03-11 15:00:41 -07:00
Greg Hysen
257d1b2b52 Set evm version to byzantium to avoid using unsupported opcodes in solidity 0.5.5 2019-03-11 15:00:41 -07:00
Greg Hysen
07200437b6 style improvements for erc1155 basic implementation 2019-03-11 15:00:41 -07:00
Greg Hysen
ebfa00d555 Added remaining erc1155 revert reasons to types package 2019-03-11 15:00:41 -07:00
Greg Hysen
421f555d57 Ran prettier 2019-03-11 14:59:58 -07:00
Greg Hysen
4b60d941cc erc1155 wrapper improvements - handle minting for mutliple addresses at once + more revert reasons 2019-03-11 14:59:58 -07:00
Greg Hysen
60d24ada62 tests for allowance approvals on erc1155 2019-03-11 14:59:58 -07:00
Greg Hysen
a1c121e2fe ignore erc1155 artifacts and wrappers for prettier 2019-03-11 14:59:58 -07:00
Greg Hysen
b3775a3ca5 more style cleanup of erc1155 basic implementation 2019-03-11 14:59:58 -07:00
Greg Hysen
5d36c97a46 Added license to utils 2019-03-11 14:59:58 -07:00
Greg Hysen
4bdd412c15 added pr to changelogs 2019-03-11 14:59:58 -07:00
Greg Hysen
46e3bcd6b9 cleaned up reference implementation revert reasons 2019-03-11 14:59:58 -07:00
Greg Hysen
68a85ddf90 removed unnecessary solhintignore 2019-03-11 14:59:58 -07:00
Greg Hysen
6eba9273cb bumped revision verson for types package 2019-03-11 14:59:58 -07:00
Greg Hysen
9de151cc14 ran prettier 2019-03-11 14:55:45 -07:00
Greg Hysen
b8c9a5dd1f renamed contracts::lib -> contracts::utils 2019-03-11 14:55:45 -07:00
Greg Hysen
4dfb3507c4 updated compiler.json 2019-03-11 14:55:45 -07:00
Greg Hysen
0cac2d407b Cleanup 2019-03-11 14:55:45 -07:00
Greg Hysen
b3106cd932 Removed DummyERC1155Token 2019-03-11 14:55:45 -07:00
Greg Hysen
c4a467fa96 Ran lint-contracts 2019-03-11 14:55:45 -07:00
Greg Hysen
cf7afbe7f6 ran linter 2019-03-11 14:55:45 -07:00
Greg Hysen
a8d58aeac4 ran prettier 2019-03-11 14:55:45 -07:00
Greg Hysen
28209e9413 cleaning 2019-03-11 14:55:45 -07:00
Greg Hysen
68ed56f2d9 some cleanup 2019-03-11 14:55:45 -07:00
Greg Hysen
0c03747807 Basic ERC1155 wrapper 2019-03-11 14:55:45 -07:00
Greg Hysen
dfe7ecbb5b Added erc1155 package to top-level package.json 2019-03-11 14:55:45 -07:00
Greg Hysen
3039d8edfa Ran prettier 2019-03-11 14:55:45 -07:00
Greg Hysen
7c850cc082 Basic ERC1155 Implementation. Derived from reference implementation, with bug fixes. 2019-03-11 14:55:45 -07:00
Alex Browne
0e07ee3d81 Merge pull request #1683 from 0xProject/feature/pipeline-entities-documentation
Add documentation for some pipeline entities
2019-03-11 11:55:43 -07:00
Amir Bandeali
14b820f2c1 Merge pull request #1685 from merklejerk/fix/order-watcher/websocket-1.0.25
Upgrade to websocket@^1.0.26 to fix broken tests
2019-03-11 11:08:28 -07:00
Fabio Berger
9366fa3b45 Add CHANGELOG entries 2019-03-11 15:29:26 +01:00
Fabio Berger
d356e9e65f Add deploying Coordinator contracts to migration script 2019-03-11 14:38:51 +01:00
Fabio Berger
230ebffd0e Generate Coordinator contract wrappers and add to abi-gen-wrappers package 2019-03-11 14:38:35 +01:00
Fabio Berger
5eedc1edca Add Coordinator contracts to contract-artifacts package 2019-03-11 14:38:00 +01:00
Fabio Berger
fa6db9411b Remove unused file 2019-03-11 13:07:38 +01:00
askeluv
b88e42a52d Prettier 2019-03-11 14:33:17 +08:00
askeluv
8d1b27d130 Added entity tests 2019-03-11 14:31:51 +08:00
askeluv
1148d37102 Added comparison details to forks vs main branch 2019-03-11 14:10:08 +08:00
askeluv
88704ce417 Prettier 2019-03-08 20:07:26 +08:00
askeluv
9f69d2cb76 Third entity: Github fork 2019-03-08 20:04:03 +08:00
Lawrence
644f54bfba Update connect package as well because it was also asking for websocket@^1.0.25. 2019-03-08 02:20:23 -08:00
Lawrence
755c4da8cc Add PR 2019-03-08 01:39:45 -08:00
Lawrence
483c77fba8 Remove websocket@1.0.25 entry from yarn.lock so yarn installs websocket@^1.0.26.
Update order-watcher's websocket dependency from ^1.0.25 (broken on some node architectures) to ^1.0.26.
2019-03-08 01:26:28 -08:00
askeluv
55fd71c5e1 Second entity: Github pull request 2019-03-08 14:37:36 +08:00
askeluv
1991bd437f First entity: Github repo 2019-03-08 12:32:21 +08:00
Amir Bandeali
22af796302 Cleanup 2019-03-07 19:36:26 -08:00
Alex Browne
a70931ffbf Add documentation for some pipeline entities. 2019-03-07 18:28:57 -08:00
Amir Bandeali
2f7dd177c1 Update CHANGELOGs 2019-03-07 15:17:56 -08:00
Amir Bandeali
d35a053efd Update remaining contract Solidity versions to 0.5.5 2019-03-07 15:17:51 -08:00
Amir Bandeali
87cc1f9415 Update TEC solidity versions 2019-03-07 14:57:13 -08:00
Amir Bandeali
e7bb524362 Update dependencies and update solc types 2019-03-07 14:57:13 -08:00
Amir Bandeali
9e03e1c742 Merge pull request #1668 from 0xProject/feat/contracts/tec-txorigin-check
Add tx.origin to TEC approvals
2019-03-07 14:55:32 -08:00
Greg Hysen
6fbfcef1fa Merge pull request #1681 from 0xProject/update/codeowners
Updated codeowners
2019-03-07 14:29:57 -08:00
Amir Bandeali
9471510086 Optimize LibAddressArray and update CHANGELOG 2019-03-07 14:29:06 -08:00
Greg Hysen
56320468fd Updated codeowners 2019-03-07 14:16:08 -08:00
Amir Bandeali
53a70bbffb Change InvalidSender err to invalidOrigin 2019-03-07 13:58:50 -08:00
David Sun
4f2e547bd6 Merge pull request #1679 from dave4506/feature/website/add-ethFinex
Add svg file for ethfinex to website
2019-03-07 12:39:52 -08:00
David Sun
af82fa7b62 fixed row issues 2019-03-07 12:35:52 -08:00
Greg Hysen
6bd1a5ab80 Merge pull request #1675 from 0xProject/feature/contracts/TECRegistry-2
Coordinator Registry
2019-03-07 11:49:49 -08:00
Greg Hysen
93568f6fd0 Coordinator Registry + tests 2019-03-07 11:32:18 -08:00
David Sun
1a3bf81c19 linted + prettier 2019-03-07 11:21:30 -08:00
David Sun
2eeabe3998 add svg file for ethfinex 2019-03-07 11:08:25 -08:00
Amir Bandeali
b1d86a7a2d Update yarn.lock 2019-03-07 11:06:17 -08:00
Amir Bandeali
6cfc9ba47b Use != instead of < in loops 2019-03-07 10:56:12 -08:00
Amir Bandeali
350474540b Optimize for loops in LibAddressArray 2019-03-07 10:56:12 -08:00
Amir Bandeali
1136e58de7 Add txOrigin to approvals 2019-03-07 10:56:12 -08:00
Amir Bandeali
558ce4713c Optimize approval hashing 2019-03-07 10:34:10 -08:00
Amir Bandeali
69c6f50dfb Optimize transaction hashing 2019-03-07 10:30:17 -08:00
Greg Hysen
babe01321c Merge pull request #1677 from 0xProject/update/contracts/tecToCoordinator
Rename TEC to Coordinator in contracts
2019-03-07 10:28:47 -08:00
Greg Hysen
ff61dc4391 Updated coordinator name in package.json 2019-03-07 10:13:44 -08:00
Greg Hysen
4da6ede9d0 More tec -> coordinator changes 2019-03-07 10:11:15 -08:00
Greg Hysen
0b1bab873e Updated contracts-tec to contracts-coordinator in package.json 2019-03-07 09:47:59 -08:00
Greg Hysen
6c60341ce8 Changed coordinator domain name to "0x Protocol Coordinator" 2019-03-07 09:28:29 -08:00
Greg Hysen
e1c1878130 Ran linter 2019-03-07 09:11:26 -08:00
Greg Hysen
fea5a39740 Ran prettier 2019-03-07 08:57:30 -08:00
Greg Hysen
9f2221a885 Updated gitignore 2019-03-07 08:37:41 -08:00
Greg Hysen
977cd2505e updated constants for TEC to Coordinator rename 2019-03-07 08:34:11 -08:00
Greg Hysen
e3f85a7c0f Updated README for coordinator package 2019-03-07 08:34:11 -08:00
Greg Hysen
d81339722e Updated CHANGELOG for coordinator package 2019-03-07 08:34:11 -08:00
Greg Hysen
f5c09e02de Remaining TEC -> Coordinator renaming 2019-03-07 08:33:22 -08:00
Greg Hysen
5e102526ec Renamed tec package to coordinator package 2019-03-07 08:33:22 -08:00
Greg Hysen
3c2efd4b67 Rename TEC to Coordinator in contracts 2019-03-07 08:33:22 -08:00
Greg Hysen
7bb93a7c32 Merge pull request #1678 from 0xProject/fix/contracts/solidityUpgradeFix
Fix contracts after Solidity 0.5.5 update
2019-03-07 08:13:01 -08:00
Greg Hysen
ac8f4ae2f9 updated changelogs of contracts packages 2019-03-06 15:45:18 -08:00
Greg Hysen
1ff49188b1 Set evm version to byzantium to avoid using unsupported opcodes in solidity 0.5.5 2019-03-06 15:10:11 -08:00
David Sun
2c329023c2 Merge pull request #1666 from dave4506/feature/website/update-states
Updated stats on website
2019-03-03 18:49:24 -08:00
David Sun
4457a300bf updated 2019-03-03 18:48:37 -08:00
Leonid Logvinov
397496aff0 Publish
- 0x.js@6.0.3
 - @0x/abi-gen@2.0.6
 - @0x/abi-gen-wrappers@4.0.2
 - @0x/assert@2.0.6
 - @0x/asset-buyer@6.0.3
 - @0x/base-contract@5.0.2
 - @0x/connect@5.0.2
 - @0x/contract-wrappers@8.0.3
 - @0x/contracts-gen@1.0.5
 - @0x/dev-tools-pages@0.0.22
 - @0x/dev-utils@2.1.3
 - @0x/fill-scenarios@3.0.2
 - @0x/instant@1.0.17
 - @0x/json-schemas@3.0.6
 - @0x/metacoin@0.0.44
 - @0x/migrations@4.0.3
 - @0x/monorepo-scripts@1.0.27
 - @0x/order-utils@7.0.2
 - @0x/order-watcher@4.0.3
 - @0x/pipeline@1.0.14
 - @0x/react-docs@2.0.7
 - @0x/react-shared@2.0.7
 - @0x/sol-compiler@3.1.3
 - @0x/sol-coverage@3.0.0
 - @0x/sol-doc@2.0.7
 - @0x/sol-profiler@3.1.2
 - @0x/sol-trace@2.0.8
 - @0x/sol-tracing-utils@6.0.7
 - @0x/sra-spec@2.0.6
 - @0x/subproviders@4.0.2
 - @0x/testnet-faucets@1.0.73
 - @0x/utils@4.2.2
 - @0x/web3-wrapper@6.0.2
 - @0x/website@0.0.76
 - @0x/contracts-asset-proxy@1.0.9
 - @0x/contracts-erc20@1.0.9
 - @0x/contracts-erc721@1.0.9
 - @0x/contracts-exchange@1.0.9
 - @0x/contracts-exchange-forwarder@1.0.9
 - @0x/contracts-exchange-libs@1.1.3
 - @0x/contracts-extensions@2.0.8
 - @0x/contracts-multisig@2.0.8
 - @0x/contracts-tec@0.0.4
 - @0x/contracts-test-utils@3.0.8
 - @0x/contracts-utils@2.0.8
2019-03-01 14:34:26 -08:00
Leonid Logvinov
7458fe0d81 Updated CHANGELOGS 2019-03-01 14:34:15 -08:00
Leonid Logvinov
453c81f634 Merge pull request #1663 from 0xProject/fix/sol-profiler
Sol profiler improvements and bug fixes
2019-03-01 14:19:41 -08:00
Leonid Logvinov
eebce4b54d Fix linter errors 2019-03-01 13:59:56 -08:00
Fabio B
f7976e18f1 Update packages/sol-profiler/src/profiler_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-03-01 13:46:47 -08:00
Fabio B
d951fe9988 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-03-01 13:46:42 -08:00
Fabio B
fd4da78075 Update packages/sol-profiler/src/profiler_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-03-01 13:46:35 -08:00
Fabio B
a025ae3f54 Update packages/sol-profiler/src/profiler_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-03-01 13:46:27 -08:00
Jacob Evans
a75ba0d903 Merge pull request #1662 from 0xProject/bug/move-contracts-test-utils
Move contracts-test-utils to dev dependencies
2019-03-01 10:35:59 -05:00
Alex Svanevik
99318ae2ba Merge pull request #1658 from 0xProject/fix/pipeline/edps-rate-limiting
Added bottleneck for EDPS to deal with rate-limiting
2019-03-01 18:11:18 +08:00
Leonid Logvinov
8369bcb605 Fix linter issues 2019-02-28 22:37:32 -08:00
askeluv
338cc69034 Removed logging 2019-03-01 14:33:19 +08:00
Leonid Logvinov
4526c52fe8 Add PR numbers 2019-02-28 20:23:24 -08:00
Leonid Logvinov
81f9bda502 Add CHANGELOG entries 2019-02-28 20:19:47 -08:00
Leonid Logvinov
46bc5463ca Change the way we access the stack in traces 2019-02-28 20:19:05 -08:00
Leonid Logvinov
bb346537ba Make sol-profiler faster 2019-02-28 20:18:44 -08:00
F. Eugene Aumson
3b5f0d5c30 Adapt to Bloxy API change (#1659)
* Adapt to Bloxy API change

We were using the `days` parameter, but that's no longer available in
the API, so our fetching of previous days (before "today") was broken.

This change gets rid of the concept of "days", and uses the API's new
`from_date` and `till_date` parameters to fetch previous days' trades.

The change to the query in `getLastSeenTimestampAsync()` was necessary
because it was returning a string (despite the `as Array<{ tx_timestamp:
number }>` cast), which was later causing problems trying to pass that
value into `new Date()`.  It worked before because we were doing some
math operations on it (multiplying it by some numbers), so coercion was
saving us.  With the change from a raw query to a `typeorm` call, the
`numberToBigIntTransformer` specified in the `DexTrade` entity is now
doing the proper type conversion for us.

The new `MAX_DAYS` constant in `pull_competing_dex_trades.ts` is
necessary in order to avoid trying to pull data all the way back to 1969
:D, which induces the API to return an HTTP 503.

* Increase trades per query to match current API doc

This is needed in order to be able to pull more than a handful of days
of data at a time (at least, with the script the way its currently
written).
2019-02-28 20:28:00 -05:00
Leonid Logvinov
808ce969d9 Fix a bug with OpCode gas costs being incorrect or NaN 2019-02-28 16:53:59 -08:00
Leonid Logvinov
16f8339f3c Add HEX_BASE to constants 2019-02-28 16:52:18 -08:00
Leonid Logvinov
25d68c3904 Add opCodeToGasCost and opCodeToParamToStackOffset to constants 2019-02-28 16:51:29 -08:00
Leonid Logvinov
77ad8e1a80 Fix a bug when TruffleArtifactAdapter wasn't correctly parsing solc config in the pre 5.0 version of trufle 2019-02-28 16:46:08 -08:00
Jacob Evans
9e8c18075a Move fill-scenarios to devDependecies 2019-02-28 17:48:40 -05:00
Jacob Evans
4278cdfd29 Add CHANGELOG 2019-02-28 17:32:08 -05:00
Jacob Evans
142c2bd0f0 Move contracts-test-utils to dev dependencies 2019-02-28 16:50:23 -05:00
Jacob Evans
13ee8686bb Merge pull request #1660 from 0xProject/bug/log-utils-process
Check for process in browser environments
2019-02-28 16:45:54 -05:00
Jacob Evans
5c06df2635 Update changelog PR 2019-02-28 15:43:07 -05:00
Jacob Evans
d69bf76341 Update CHANGELOG 2019-02-28 15:28:09 -05:00
Jacob Evans
d0d1b295b4 Check for process in browser environments 2019-02-28 15:26:07 -05:00
askeluv
e450191548 Added bottleneck to deal with rate-limiting 2019-02-28 13:08:09 +08:00
Francesco Agosti
3aee83f3d8 Merge pull request #1633 from 0xProject/feature/pipeline/concepts-schema-and-radar-depth-table
[pipeline] Add concepts schema and radar orderbook USD price concept
2019-02-27 20:40:00 -08:00
fragosti
3610a2bc8d Run linter 2019-02-27 20:23:10 -08:00
fragosti
ab559d4620 Include new test path in package.json 2019-02-27 20:11:48 -08:00
fragosti
15d308d4c5 Remove isCli method 2019-02-27 19:34:35 -08:00
Alex Svanevik
e7ea66afb5 Merge pull request #1629 from 0xProject/etherscan-exchange-transactions
Pull exchange contract transactions from Etherscan
2019-02-28 08:30:05 +08:00
David Sun
d9a1d8bde6 Merge pull request #1655 from 0xProject/feature/extensions-page-freds-jank-pr-mirror
Feature/extensions page freds jank pr mirror
2019-02-27 16:38:41 -05:00
Leonid Logvinov
9ac4486403 Merge pull request #1656 from 0xProject/fix/1635
Allow project specific coverage ignore paths by specifying `config.ignoreFilesGlobs`
2019-02-27 13:35:11 -08:00
David Sun
428afabaa3 disabling lint for prettier 2019-02-27 16:21:00 -05:00
Leonid Logvinov
9162189fa6 Add PR numbers 2019-02-27 13:09:30 -08:00
Leonid Logvinov
154ca9b760 Merge branch 'development' into fix/1635 2019-02-27 13:09:04 -08:00
Leonid Logvinov
9fcead3973 Fix the docs 2019-02-27 13:07:03 -08:00
Leonid Logvinov
2fd9d0359c Ignore node_modules, test and interfaces coverage in contracts 2019-02-27 13:06:54 -08:00
Leonid Logvinov
4cf9e030a2 Add ignoreFilesGlobs config option to sol-coverage 2019-02-27 13:06:30 -08:00
David Sun
5570d14179 fixed build issues 2019-02-27 16:05:48 -05:00
David Sun
fd3c546994 changed links 2019-02-27 15:54:09 -05:00
Leonid Logvinov
e81ae05df9 Publish
- 0x.js@6.0.2
 - @0x/asset-buyer@6.0.2
 - @0x/contract-wrappers@8.0.2
 - @0x/instant@1.0.16
 - @0x/metacoin@0.0.43
 - @0x/migrations@4.0.2
 - @0x/order-watcher@4.0.2
 - @0x/pipeline@1.0.13
 - @0x/sol-compiler@3.1.2
 - @0x/sol-coverage@2.0.6
 - @0x/sol-doc@2.0.6
 - @0x/sol-profiler@3.1.1
 - @0x/sol-trace@2.0.7
 - @0x/sol-tracing-utils@6.0.6
 - @0x/testnet-faucets@1.0.72
 - @0x/website@0.0.75
 - @0x/contracts-asset-proxy@1.0.8
 - @0x/contracts-erc20@1.0.8
 - @0x/contracts-erc721@1.0.8
 - @0x/contracts-exchange@1.0.8
 - @0x/contracts-exchange-forwarder@1.0.8
 - @0x/contracts-exchange-libs@1.1.2
 - @0x/contracts-extensions@2.0.7
 - @0x/contracts-multisig@2.0.7
 - @0x/contracts-tec@0.0.3
 - @0x/contracts-test-utils@3.0.7
 - @0x/contracts-utils@2.0.7
2019-02-27 12:45:19 -08:00
Leonid Logvinov
cb394f3a1c Updated CHANGELOGS 2019-02-27 12:45:09 -08:00
David Sun
03ed057ff6 fixed linting + prettier issues 2019-02-27 15:34:24 -05:00
Leonid Logvinov
807290ff38 Merge pull request #1654 from 0xProject/fix/truffle-config-parsing
Fix a bug when TruffleArtifactAdapter was incorrectly parsing the truffle config of the newest version
2019-02-27 12:29:05 -08:00
Leonid Logvinov
40a4b4fa7a Add an explanatory comment 2019-02-27 12:28:41 -08:00
Leonid Logvinov
b7d2ad3651 Merge pull request #1653 from 0xProject/fix/remove-redundant-log
Remove redundant logging from sol-compiler
2019-02-27 12:26:45 -08:00
David Sun
faac286f70 fixed links 2019-02-27 15:21:07 -05:00
David Sun
c6c7f6f907 added title for extensions 2019-02-27 15:01:59 -05:00
fragosti
ccd0da58cb fix build errors 2019-02-27 11:34:04 -08:00
Francesco Agosti
500e5f1b5d Merge pull request #1630 from bakkenbaeck/website-updates
[WIP] Extensions page and tweaks to website
2019-02-27 11:09:57 -08:00
Fred Carlsen
ebb6177271 Update link to whitelist filter 2019-02-27 10:49:41 +01:00
Fred Carlsen
951c256980 Remove redundant fragment 2019-02-27 10:47:59 +01:00
Fred Carlsen
a134ef03dd Update illustrations and copy 2019-02-27 10:45:39 +01:00
Leonid Logvinov
f21a9d16d0 Fix a bug when TruffleArtifactAdapter was incorrectly parsing the truffle config of the newest version 2019-02-26 16:16:44 -08:00
fragosti
42c3bb00ec move to using require.main === module 2019-02-26 16:05:20 -08:00
Leonid Logvinov
0d0fcfe49a Remove redundant logging from sol-compiler 2019-02-26 15:03:06 -08:00
Leonid Logvinov
3f0db92be6 Fix prettier 2019-02-26 14:50:34 -08:00
Leonid Logvinov
ec24c79da1 Publish
- 0x.js@6.0.1
 - @0x/abi-gen@2.0.5
 - @0x/abi-gen-wrappers@4.0.1
 - @0x/assert@2.0.5
 - @0x/asset-buyer@6.0.1
 - @0x/base-contract@5.0.1
 - @0x/connect@5.0.1
 - @0x/contract-wrappers@8.0.1
 - @0x/contracts-gen@1.0.4
 - @0x/dev-tools-pages@0.0.21
 - @0x/dev-utils@2.1.2
 - @0x/fill-scenarios@3.0.1
 - @0x/instant@1.0.15
 - @0x/json-schemas@3.0.5
 - @0x/metacoin@0.0.42
 - @0x/migrations@4.0.1
 - @0x/monorepo-scripts@1.0.26
 - @0x/order-utils@7.0.1
 - @0x/order-watcher@4.0.1
 - @0x/pipeline@1.0.12
 - @0x/react-docs@2.0.6
 - @0x/react-shared@2.0.6
 - @0x/sol-compiler@3.1.1
 - @0x/sol-coverage@2.0.5
 - @0x/sol-doc@2.0.5
 - @0x/sol-profiler@3.1.0
 - @0x/sol-resolver@2.0.4
 - @0x/sol-trace@2.0.6
 - @0x/sol-tracing-utils@6.0.5
 - @0x/sra-spec@2.0.5
 - @0x/subproviders@4.0.1
 - @0x/testnet-faucets@1.0.71
 - @0x/types@2.1.1
 - @0x/utils@4.2.1
 - @0x/web3-wrapper@6.0.1
 - @0x/website@0.0.74
 - @0x/contracts-asset-proxy@1.0.7
 - @0x/contracts-erc20@1.0.7
 - @0x/contracts-erc721@1.0.7
 - @0x/contracts-exchange@1.0.7
 - @0x/contracts-exchange-forwarder@1.0.7
 - @0x/contracts-exchange-libs@1.1.1
 - @0x/contracts-extensions@2.0.6
 - @0x/contracts-multisig@2.0.6
 - @0x/contracts-tec@0.0.2
 - @0x/contracts-test-utils@3.0.6
 - @0x/contracts-utils@2.0.6
2019-02-26 14:45:52 -08:00
Leonid Logvinov
f5fffbea04 Updated CHANGELOGS 2019-02-26 14:45:42 -08:00
Amir Bandeali
fb0a2ef248 Merge pull request #1545 from 0xProject/feat/contracts/tec
TEC MVP
2019-02-26 14:24:30 -08:00
Leonid Logvinov
240f482e8e Merge pull request #1652 from 0xProject/fix/sol-compiler-settings
Fix a bug when combining sol-compiler settings from different sources
2019-02-26 14:15:37 -08:00
Leonid Logvinov
885031d3ce Add PR number 2019-02-26 14:15:23 -08:00
fragosti
eb212de70e run linter and add doc string 2019-02-26 14:05:18 -08:00
Amir Bandeali
68323d6def Fix geth tests 2019-02-26 14:00:21 -08:00
Leonid Logvinov
7c492071f1 Merge pull request #1647 from 0xProject/feature/sol-profiler-ganache
Sol-profiler ganache
2019-02-26 13:53:55 -08:00
fragosti
8fbdef2a1d Make job look at last timestamp, fix tests 2019-02-26 13:52:18 -08:00
Leonid Logvinov
8f64784781 Fix a bug when combining sol-compiler settings from different sources 2019-02-26 13:50:45 -08:00
David Sun
1bd6095c60 Merge pull request #1651 from dave4506/fix/website/add-temporary-seo
Added temporary metadata
2019-02-26 16:38:59 -05:00
David Sun
e133a5f0f3 added temporary metadata 2019-02-26 16:38:09 -05:00
Amir Bandeali
b47886416e Unpin deps when unnecessary 2019-02-26 13:29:18 -08:00
Amir Bandeali
c522d611d1 Fix typos 2019-02-26 13:29:18 -08:00
Amir Bandeali
f6d9b6b7aa Remove unused deps 2019-02-26 13:29:18 -08:00
Amir Bandeali
1de6bca12d Add TEC integration tests 2019-02-26 13:29:18 -08:00
Amir Bandeali
2de9b862d8 Add more verification test cases 2019-02-26 13:29:18 -08:00
Amir Bandeali
3c649df3df simplify approval verification logic 2019-02-26 13:29:18 -08:00
Amir Bandeali
9bf38d9e4d Add 'contains' function to LibAddressArray 2019-02-26 13:29:18 -08:00
Amir Bandeali
dee40f038d Add more approval verification tests 2019-02-26 13:29:18 -08:00
Amir Bandeali
d0aa907418 Add TEC revert reasons 2019-02-26 13:29:18 -08:00
Amir Bandeali
8dbdffc9b4 Fix abi decoding of 0x transaction data 2019-02-26 13:29:17 -08:00
Amir Bandeali
f409780455 Add ApprovalFactory class 2019-02-26 13:29:17 -08:00
Amir Bandeali
bebcd99b3b Add signature validator tests 2019-02-26 13:29:17 -08:00
Amir Bandeali
99aeaddf42 Make internal functions public 2019-02-26 13:29:17 -08:00
Amir Bandeali
793398216f Update deps versions 2019-02-26 13:29:17 -08:00
Amir Bandeali
b353ed3157 Update deps versions 2019-02-26 13:29:17 -08:00
Amir Bandeali
8637212a17 temp 2019-02-26 13:29:17 -08:00
Amir Bandeali
c42ce38e1c Bump dep versions 2019-02-26 13:29:17 -08:00
Amir Bandeali
76d228a603 Bump solidity version 2019-02-26 13:29:17 -08:00
Amir Bandeali
5cb52faa10 Do not verify orders with a null senderAddress 2019-02-26 13:29:17 -08:00
Amir Bandeali
e67e822845 Add tests for hashing libs 2019-02-26 13:29:17 -08:00
Amir Bandeali
a52686ca3b Fix README typos 2019-02-26 13:29:17 -08:00
Amir Bandeali
7a1e6cccfd Add public wrappers for libs 2019-02-26 13:29:17 -08:00
Amir Bandeali
1166b6c2fb Do not check approvals for orders where sender == feeRecipient 2019-02-26 13:29:17 -08:00
Amir Bandeali
7a6693694c Update README 2019-02-26 13:29:17 -08:00
Amir Bandeali
6ed423d1af Make all cancels permissionless 2019-02-26 13:29:17 -08:00
Amir Bandeali
8b69444602 Add tec package to relevant files 2019-02-26 13:29:17 -08:00
Amir Bandeali
7de5e8d9c8 Update READMEs 2019-02-26 13:29:17 -08:00
Amir Bandeali
844e3d1934 Implement TEC MVP 2019-02-26 13:29:17 -08:00
Amir Bandeali
9eafbbc0ae Update solidity versions of relevant contracts 2019-02-26 13:29:17 -08:00
Amir Bandeali
74677e3d54 Rename getTransactionHex to getTransactionHashHex for clarity 2019-02-26 13:29:17 -08:00
Amir Bandeali
57f4638742 Update CHANGELOGs 2019-02-26 13:29:17 -08:00
Amir Bandeali
c7a32f2d56 Update dep versions 2019-02-26 13:29:17 -08:00
Leonid Logvinov
d2dc64aa2d Rename idx to index 2019-02-26 13:25:26 -08:00
Fabio B
edb2a34c51 Update packages/sol-tracing-utils/src/utils.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-26 13:13:56 -08:00
Leonid Logvinov
dbd9b1c5c4 Add CHANGELOG entry 2019-02-26 11:00:37 -08:00
Leonid Logvinov
c3b758845d Refactor structLogs normalization to handle ganache 2019-02-26 10:55:58 -08:00
Leonid Logvinov
4d770549fc Fix stack content reporting in custom JS tracer 2019-02-26 10:55:40 -08:00
Leonid Logvinov
a67674bae1 Fix memory cost computing 2019-02-26 10:54:54 -08:00
Leonid Logvinov
462a61da73 Move structLogs normalization right after we fetch the trace 2019-02-26 10:54:00 -08:00
Leonid Logvinov
ae8a7f6320 Remove ganache profiling warning 2019-02-26 10:50:14 -08:00
Leonid Logvinov
a23c6a0996 Fix linter issues 2019-02-26 10:03:42 -08:00
Fred Carlsen
e6594cecce Fix jumping part of animated hero logo 2019-02-26 12:41:09 +01:00
askeluv
85ed5d27f5 Bumped up timeout to 4 mins 2019-02-26 19:37:59 +08:00
askeluv
6ac9e11245 Linting 2019-02-26 11:46:21 +08:00
askeluv
9fbd809344 Improved testing - added fixtures 2019-02-26 11:42:53 +08:00
David Sun
63a098d757 Merge pull request #1643 from dave4506/feature/remove-website-vote
Removed announcement
2019-02-25 20:23:18 -05:00
David Sun
b68d9ed672 removed announcement 2019-02-25 20:21:49 -05:00
Leonid Logvinov
5934eb0559 Publish
- 0x.js@6.0.0
 - @0x/abi-gen@2.0.4
 - @0x/abi-gen-templates@2.0.1
 - @0x/abi-gen-wrappers@4.0.0
 - @0x/assert@2.0.4
 - @0x/asset-buyer@6.0.0
 - @0x/base-contract@5.0.0
 - @0x/connect@5.0.0
 - @0x/contract-addresses@2.2.2
 - @0x/contract-wrappers@8.0.0
 - @0x/contracts-gen@1.0.3
 - @0x/dev-tools-pages@0.0.20
 - @0x/dev-utils@2.1.1
 - ethereum-types@2.1.0
 - @0x/fill-scenarios@3.0.0
 - @0x/instant@1.0.14
 - @0x/json-schemas@3.0.4
 - @0x/metacoin@0.0.41
 - @0x/migrations@4.0.0
 - @0x/monorepo-scripts@1.0.25
 - @0x/order-utils@7.0.0
 - @0x/order-watcher@4.0.0
 - @0x/pipeline@1.0.11
 - @0x/react-docs@2.0.5
 - @0x/react-shared@2.0.5
 - @0x/sol-compiler@3.1.0
 - @0x/sol-coverage@2.0.4
 - @0x/sol-doc@2.0.4
 - @0x/sol-profiler@3.0.0
 - @0x/sol-resolver@2.0.3
 - @0x/sol-trace@2.0.5
 - @0x/sol-tracing-utils@6.0.4
 - @0x/sra-spec@2.0.4
 - @0x/subproviders@4.0.0
 - @0x/testnet-faucets@1.0.70
 - @0x/types@2.1.0
 - @0x/typescript-typings@4.1.0
 - @0x/utils@4.2.0
 - @0x/web3-wrapper@6.0.0
 - @0x/website@0.0.73
 - @0x/contracts-asset-proxy@1.0.6
 - @0x/contracts-erc20@1.0.6
 - @0x/contracts-erc721@1.0.6
 - @0x/contracts-exchange@1.0.6
 - @0x/contracts-exchange-forwarder@1.0.6
 - @0x/contracts-exchange-libs@1.1.0
 - @0x/contracts-extensions@2.0.5
 - @0x/contracts-multisig@2.0.5
 - @0x/contracts-test-utils@3.0.5
 - @0x/contracts-utils@2.0.5
2019-02-25 13:35:29 -08:00
Leonid Logvinov
b998d719a6 Updated CHANGELOGS 2019-02-25 13:35:17 -08:00
Leonid Logvinov
33832244cf Merge pull request #1638 from 0xProject/feature/sol-profiler-improvements
Sol profiler improvements
2019-02-25 13:19:51 -08:00
Fabio B
df8ea3b65c Merge pull request #1641 from 0xProject/fixAddresses
Fix OrderValidator and Forwarder addresses in Python package
2019-02-25 15:57:21 -05:00
Leonid Logvinov
7067d4a499 Fix prettier 2019-02-25 12:53:42 -08:00
Leonid Logvinov
3e764eafd9 Use contracts-test-utils in metacoin 2019-02-25 12:52:21 -08:00
Leonid Logvinov
4169a41eda Rename traceInfo.data to traceInfo.dataIfExists 2019-02-25 12:40:10 -08:00
Leonid Logvinov
379eab19ad FIx CHANGELOGs 2019-02-25 12:35:57 -08:00
Fabio B
6cba1f3b61 Update packages/sol-profiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-25 12:34:18 -08:00
Fabio B
5dad2404d3 Update packages/ethereum-types/src/index.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-25 12:33:58 -08:00
Fabio B
a1b20eea2c Update packages/ethereum-types/src/index.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-25 12:33:50 -08:00
Fabio Berger
af075e7b8b Fix OrderValidator and Forwarder addresses in Python package 2019-02-25 15:05:18 -05:00
Amir Bandeali
ef0a699919 Merge pull request #1604 from 0xProject/feat/exchange-libs/solc5.0
Update exchange-libs and utils Solidity versions + bugfix
2019-02-25 10:29:52 -08:00
Amir Bandeali
8279ef0e05 Add more slice tests 2019-02-25 10:12:59 -08:00
Amir Bandeali
c1cee8e951 Run lerna link before building 2019-02-25 09:59:25 -08:00
Amir Bandeali
4c17373311 Update dep versions 2019-02-25 09:59:25 -08:00
Amir Bandeali
c20972de3f Update CHANGELOGs 2019-02-25 09:59:25 -08:00
Amir Bandeali
64401f1031 Fix bug in slice functions that disallow slicing the last byte of a byte array 2019-02-25 09:59:25 -08:00
Amir Bandeali
1f895d0f27 Make constants internal 2019-02-25 09:59:25 -08:00
Amir Bandeali
5aa8ea10c3 Upgrade solc version to 0.5.3 for exchange-libs and utils 2019-02-25 09:59:25 -08:00
Fred Carlsen
cf65d4a909 Prettier fixes 2019-02-25 15:32:57 +01:00
Fred Carlsen
079f627b34 Fix linting issues 2019-02-25 15:29:24 +01:00
Fred Carlsen
f6c6cbc343 Constrain icon size to container 2019-02-25 15:22:48 +01:00
Fred Carlsen
c6cdea77b6 Fix website errors related to props/children 2019-02-25 15:22:35 +01:00
Jacob Evans
b1fd3429ae Merge pull request #1639 from 0xProject/vote/zeip-23-pst-end-date
Change vote end date to end on PST 25/02/2019
2019-02-24 12:29:07 -08:00
Jacob Evans
dc161ef08d Change vote end date to end on PST 25/02/2019 2019-02-24 12:01:45 -08:00
Leonid Logvinov
9502e789b3 Move constants up 2019-02-22 19:47:29 -08:00
Leonid Logvinov
a71aed0233 Run prettier 2019-02-22 18:16:38 -08:00
Leonid Logvinov
eda8dc278b Remove excesive exports 2019-02-22 18:01:19 -08:00
Leonid Logvinov
23a7ffb167 Fix linter 2019-02-22 17:35:14 -08:00
Leonid Logvinov
ab11aaa694 Export ContractAbi from sol-tracing-utils 2019-02-22 16:58:57 -08:00
Leonid Logvinov
83b5a2709d Remove commented code 2019-02-22 16:57:50 -08:00
Leonid Logvinov
f67f94fd6b Rename logHeader to header 2019-02-22 16:28:04 -08:00
Leonid Logvinov
4e8ae037bb Add PR numbers 2019-02-22 16:23:04 -08:00
Leonid Logvinov
04d8f46ff3 Major sol-profiler overhaul 2019-02-22 16:16:03 -08:00
fragosti
3191de68b8 Fix typo in query 2019-02-22 16:13:48 -08:00
Leonid Logvinov
047de370d6 Add logUtils.table and logUtils.header 2019-02-22 16:12:34 -08:00
Leonid Logvinov
e21dc5f026 Add all existing opcodes to OpCode 2019-02-22 16:06:55 -08:00
fragosti
f3da56773e Run prettier 2019-02-22 12:02:58 -08:00
fragosti
5197758579 Add missing file 2019-02-22 10:36:30 -08:00
Fred Carlsen
d48af7c4c2 Add icons 2019-02-22 13:42:17 +01:00
Fred Carlsen
bbafe0fc46 Add link to extensions in footer 2019-02-22 13:27:18 +01:00
Fred Carlsen
9a91f917e0 Tweak cards + add links 2019-02-22 13:03:30 +01:00
Fred Carlsen
1f681f02ae More cleanup 2019-02-22 11:23:55 +01:00
Fred Carlsen
778a86e7eb Fix linting issues 2019-02-22 11:18:04 +01:00
Fabio B
78da033441 Merge pull request #1627 from 0xProject/supportEIP1193Providers
Support EIP1193 provider interface
2019-02-21 20:26:25 -08:00
askeluv
6eb923d22f Throw error when API key is missing + use response in parser test 2019-02-22 11:21:33 +08:00
fragosti
e602afcd5f add documentation 2019-02-21 18:24:11 -08:00
askeluv
bf1115d417 Backfills automatically + prettier 2019-02-22 09:45:25 +08:00
Fabio Berger
b51038b9e7 Merge branch 'development' into supportEIP1193Providers
* development:
  Demonstrate calling contracts with tuple arrays (#1615)
  removed default meta tags in public/index.html
  fixed linting issue
  updated documentTitle component
  added metadata for pages (incomplete)
  fixed title comment-out
  removed react-document-title in favor of using react-helmet for consistency and bug fix
2019-02-21 16:45:00 -08:00
Fabio Berger
44e0b58c66 Fix migration exported types 2019-02-21 16:44:38 -08:00
Fabio Berger
3f7d5274a2 Fix version 2019-02-21 16:29:50 -08:00
Fabio Berger
c8f5f6045e Fix CI failures 2019-02-21 16:27:38 -08:00
F. Eugene Aumson
6bcc2064a2 Demonstrate calling contracts with tuple arrays (#1615) 2019-02-21 16:24:54 -08:00
Fabio Berger
3f9872d8b3 Remove getZeroExProvider method since it can be confusing 2019-02-21 16:07:23 -08:00
Fabio Berger
5814cd5fae Export supportedProvider in interface since this package is also used by external devs 2019-02-21 16:04:11 -08:00
Fabio Berger
44f8c7c548 Add TODO about consolidating type checks 2019-02-21 16:03:51 -08:00
Fabio Berger
c2549308fe Remove superfluous standardization 2019-02-21 16:00:44 -08:00
Fabio Berger
cf1a3bf4e7 Fix node types version in monorepo-scripts since it's used in test-installation and the latest version has a bug 2019-02-21 15:58:02 -08:00
fragosti
f5d668af31 Add radar_orderbook_usd_prices concept 2019-02-21 15:45:36 -08:00
Fabio Berger
b7bd4e5c51 Try fixing publish ci failure 2019-02-21 15:26:35 -08:00
fragosti
62373f969c Add concepts migrations 2019-02-21 12:51:27 -08:00
David Sun
ceb651fdd1 Merge pull request #1631 from dave4506/fix/website/remove-deplicate-meta-tags
Removed default meta tags in public/index.html
2019-02-21 10:43:40 -05:00
David Sun
8fa0f4a232 removed default meta tags in public/index.html 2019-02-21 10:20:29 -05:00
Fred Carlsen
30f2e3b606 Remove placeholder extensions 2019-02-21 13:49:35 +01:00
Fred Carlsen
7d3d997083 Merge remote-tracking branch 'upstream/development' into website-updates 2019-02-21 13:45:40 +01:00
Fred Carlsen
3955e2c84a Tweak padding 2019-02-21 13:43:47 +01:00
Fred Carlsen
6a6c41df26 Tweak extensions width 2019-02-21 13:42:03 +01:00
Fred Carlsen
1dfd2aec50 Tweak banner 2019-02-21 13:41:33 +01:00
askeluv
8885f543ae Pull exchange contract transactions from Etherscan 2019-02-21 20:37:55 +08:00
Fred Carlsen
8804e6c2ca Tweak banner 2019-02-21 11:17:01 +01:00
Fred Carlsen
88b7c214f7 Add extensions page 2019-02-21 11:16:52 +01:00
David Sun
297f3da5db Merge pull request #1626 from dave4506/fix/website/document-title-consistency-issue
Fix bug with document titles + add rich metadata for documents
2019-02-20 23:42:41 -05:00
David Sun
ec4d634677 fixed linting issue 2019-02-20 23:24:05 -05:00
David Sun
0ddec99704 updated documentTitle component 2019-02-20 23:08:04 -05:00
Fabio Berger
64cec1de3b Major version bump packages with modified exported type definitions 2019-02-20 18:07:01 -08:00
Fabio Berger
fdaf5d1fc8 Merge branch 'development' into supportEIP1193Providers
* development:
  Add constraint name to down phase as well
  Give the constraint an explicit name of token_orderbook_snapshots_pkey
  Remove comments
  Fix inconsistently named constraint
2019-02-20 18:01:23 -08:00
Fabio Berger
6baf71dca5 Make deprecation notice a warning message if used 2019-02-20 18:00:43 -08:00
Fabio Berger
9d75a72a02 Add back test 2019-02-20 17:59:53 -08:00
Francesco Agosti
4bf66d6a63 Merge pull request #1628 from 0xProject/fix/pipeline/fix-test-db-incorrectly-named-constraint
Fix inconsistently named constraint in migration
2019-02-20 17:17:16 -08:00
fragosti
8d9a550107 Add constraint name to down phase as well 2019-02-20 17:01:02 -08:00
fragosti
a076278026 Give the constraint an explicit name of token_orderbook_snapshots_pkey 2019-02-20 16:37:44 -08:00
fragosti
998dac44ee Remove comments 2019-02-20 16:09:33 -08:00
fragosti
871e81bd71 Fix inconsistently named constraint 2019-02-20 16:03:29 -08:00
Fabio Berger
d892d16b51 Merge branch 'development' into supportEIP1193Providers
* development: (37 commits)
  Factor out redundant source param in parse order functions
  Fix marquee typo
  Throw error if cannot find error in table
  Integrate one-time dump and API for nonfungible.com (#1603)
  Change optional text props to mandatory in LedgerSignNote
  Add radar_orders parseRadarOrder test
  Add parser test for Radar orderbook parsing
  Moved calculateSlippage from parsers to transformers
  Show greater than less than when minority has a vote
  Prettier
  Recieved -> Received
  Fix style for address table
  Hide ledger sign note on error
  Revert broken formatting
  Added ledger sign notification
  Fix bug in ledger address selector where provider does not exist.
  fix null column constraint issue
  Add parsing radar order test
  Rename migration to what it is called on prod and qa
  Fix type bug around Radar response
  ...
2019-02-20 14:52:58 -08:00
Fabio Berger
4cbf2781e5 Fix types so docs render 2019-02-20 14:31:40 -08:00
Fabio Berger
69653b1c7c Fix yarn.lock 2019-02-20 14:31:31 -08:00
Francesco Agosti
39390865da Merge pull request #1612 from 0xProject/feature/pipeline/add-radar
[pipeline] Add Radar orders and maker_address column to token_orderbook_snapshots
2019-02-20 14:17:42 -08:00
fragosti
4952cd5afb Factor out redundant source param in parse order functions 2019-02-20 13:45:14 -08:00
Fabio Berger
e86df96bfe Fix doc gen 2019-02-20 13:20:32 -08:00
fragosti
ef5195db90 Fix marquee typo 2019-02-20 11:43:32 -08:00
fragosti
bc7e62db9f Throw error if cannot find error in table 2019-02-20 11:40:49 -08:00
Fred Carlsen
9a7ccc20e8 Add new 404 page 2019-02-20 16:41:42 +01:00
Alex Svanevik
154e7a6a8a Merge pull request #1601 from askeluv/feature/pipeline/edps-slippage
Slippage calculations from Ethereum DEX Prices Service (EDPS)
2019-02-20 22:51:23 +08:00
Fabio Berger
ba56019f2d Add missing exported types 2019-02-19 23:59:12 -08:00
Fabio Berger
31d289c504 Add type import 2019-02-19 23:56:28 -08:00
Fabio Berger
a42b22966a Standardize bowser deps 2019-02-19 23:41:30 -08:00
Fabio Berger
17db62d463 Standardize web3-provider-engine deps 2019-02-19 23:40:45 -08:00
Fabio Berger
d6d40ea839 Improve commenty 2019-02-19 23:38:58 -08:00
Fabio Berger
eca8410dbb Update CHANGELOGs 2019-02-19 23:38:53 -08:00
Fabio Berger
eb3a530e6c Fix website build 2019-02-19 23:20:38 -08:00
Fabio Berger
26e17074c2 Fix linter issues 2019-02-19 23:09:26 -08:00
Fabio Berger
6b775628d5 Prettier fixes 2019-02-19 22:48:09 -08:00
Fabio Berger
13eb9103a7 Add back support for Web3@1.0-beta-37 and below 2019-02-19 22:48:02 -08:00
Fabio Berger
1fa82c1077 Fix up missing Provider interfaces and refactor providerUtils.standardizeOrThrow() 2019-02-19 22:34:31 -08:00
David Sun
426190181b added metadata for pages (incomplete) 2019-02-19 23:33:48 -05:00
F. Eugene Aumson
1232a9a03d Integrate one-time dump and API for nonfungible.com (#1603)
* Add script for pulling NFT trade data from nonfungible.com

* corrections for current state of API

* change data model to match data source

* change primary key

* pull data from initial dump first, then API

* pull all supported NFT's, not just cryptokitties

* disable problematic data sources

* rename function to satisfy linter

* Rename table to nonfungible_dot_com_trades

* rename parser module to nonfungible_dot_com from non_fungible_dot_com, for consistency

* correct mistaken reference to Bloxy

* rename NonfungibleDotComTrade to ...TradeResponse

* `NftTrade` -> `NonfungibleDotComTrade`

* rename files to match prior object renaming

* use fetchAsync instead of axios

* improve fetchAsync error message: include URL

* avoid non-null contraints in API trades too, not just for trades from the one-time dump

* disable mythereum publisher
2019-02-19 19:07:42 -08:00
Jacob Evans
e643c13292 Merge pull request #1622 from 0xProject/fix/governance-ledger-provider
[Governance] Ledger address selector ZRX balance
2019-02-19 17:52:42 -08:00
Jacob Evans
522736e367 Change optional text props to mandatory in LedgerSignNote 2019-02-19 17:34:06 -08:00
fragosti
12fd9c29f0 Add radar_orders parseRadarOrder test 2019-02-19 17:19:12 -08:00
fragosti
0c871b67ca Add parser test for Radar orderbook parsing 2019-02-19 16:58:11 -08:00
askeluv
379e828fc1 Moved calculateSlippage from parsers to transformers 2019-02-20 08:55:21 +08:00
Fabio Berger
fe1e8575ea Fix comments 2019-02-19 16:35:14 -08:00
Fabio Berger
8f14099adc Put all Web3.js provider interfaces next to eachother 2019-02-19 16:17:14 -08:00
Fabio Berger
852c1396ae Fix comments 2019-02-19 16:16:56 -08:00
Fabio Berger
b0f9195b57 merge development 2019-02-19 16:02:41 -08:00
Fabio Berger
98236736e0 Fix remaining Provider to SupportedProvider type 2019-02-19 15:25:47 -08:00
Jacob Evans
8b93a2816c Show greater than less than when minority has a vote 2019-02-19 14:53:18 -08:00
Leonid Logvinov
76d8a991c0 Merge pull request #1625 from 0xProject/feature/sol-compiler-offline
Sol-compiler offline mode
2019-02-19 14:21:09 -08:00
Leonid Logvinov
9186af1433 Fix a PR number 2019-02-19 14:20:13 -08:00
Alex Browne
6a473f4c57 Merge pull request #1617 from 0xProject/fix/devnet-readme-dockerhub
Update README for devnet
2019-02-19 13:47:46 -08:00
Alex Browne
42224ab534 Update README.md 2019-02-19 13:46:48 -08:00
Fabio Berger
20bcf09459 Modify providerUtils such that it simply guarentees a common sendAsync method but does not create a new instance since website depends on other properties being available 2019-02-19 13:25:57 -08:00
David Sun
5d1dd536e9 fixed title comment-out 2019-02-19 16:13:26 -05:00
David Sun
169b8807f7 removed react-document-title in favor of using react-helmet for consistency and bug fix 2019-02-19 16:10:35 -05:00
Jacob Evans
5acdab849e Prettier 2019-02-19 13:09:05 -08:00
Fabio Berger
2417084145 Rename public interface provider to supportedProvider and our internal provider to Provider 2019-02-19 12:47:01 -08:00
Jacob Evans
c16e62b5bf Recieved -> Received 2019-02-19 11:28:09 -08:00
Leonid Logvinov
6fa7d90f1f Define offlineMode as false in all smart contracts packages 2019-02-19 10:38:24 -08:00
Leonid Logvinov
1a3fd0227d Implement sol-compiler offline mode 2019-02-19 10:35:52 -08:00
Steve Klebanoff
2259b7dfcf Merge pull request #1624 from 0xProject/fix/instant-svg
[instant] Reset svg style
2019-02-19 10:08:47 -08:00
Steve Klebanoff
33fd70d0e1 reset svg because etherscan has a global svg style 2019-02-19 09:40:25 -08:00
Jacob Evans
fc906bcaae Governance tweaks 2019-02-19 09:23:28 -08:00
Jacob Evans
184e111e39 Fix style for address table 2019-02-19 09:12:29 -08:00
Fred Carlsen
ab62f50f5c Hide ledger sign note on error 2019-02-19 15:53:07 +01:00
Fred Carlsen
3eac854356 Revert broken formatting 2019-02-19 15:20:47 +01:00
Fred Carlsen
f7892cd86b Merge remote-tracking branch 'upstream/development' into governance-tweaks 2019-02-19 13:32:43 +01:00
Fred Carlsen
6e0260385c Added ledger sign notification 2019-02-19 13:32:25 +01:00
Jacob Evans
44300dabb0 Fix bug in ledger address selector where provider does not exist.
This can happen in browsers without metamask or a injected provider
2019-02-18 20:04:55 -08:00
David Sun
580c3038c8 Merge pull request #1621 from dave4506/fix/website/announcement-spacing
Added padding fix to announcements
2019-02-18 21:45:02 -05:00
David Sun
2a9175e964 added padding fix 2019-02-18 20:55:27 -05:00
Fabio Berger
5db20bbbe8 Add support for EIP1193 providers and clean up provider standardization logic 2019-02-18 15:12:29 -08:00
David Sun
ae144dff39 Merge pull request #1619 from dave4506/feature/website/add-banner-component
Adding announcement component for hero (for vote)
2019-02-18 09:13:57 -05:00
Jacob Evans
9f533efc92 Merge pull request #1620 from 0xProject/governance-vote-updates
Governance vote updates
2019-02-18 00:53:14 -08:00
Jacob Evans
76e15c4166 Yarn lock update 2019-02-18 00:41:36 -08:00
Jacob Evans
62bb2daf16 Add og-zeip23 for social sharing 2019-02-18 00:14:05 -08:00
Jacob Evans
59e292030a Update I voted badge svg 2019-02-18 00:08:55 -08:00
Jacob Evans
533fc7e444 Remove unused input 2019-02-17 23:31:02 -08:00
Jacob Evans
e5c5338eb6 Add governance to the footer 2019-02-17 23:29:47 -08:00
Jacob Evans
9463acb131 Update copy of Risk 2019-02-17 23:12:22 -08:00
Jacob Evans
e69749350b Update the formatting of ZRX (showing whole ZRX) 2019-02-17 23:09:45 -08:00
Jacob Evans
42749187ff Update copy on the banner 2019-02-17 22:51:42 -08:00
Jacob Evans
d5c2038d58 Update copy on the governance page 2019-02-17 22:24:38 -08:00
Jacob Evans
5843a61c9f Remove rounding (up) in total balance string 2019-02-17 22:16:56 -08:00
Jacob Evans
ecde2c9d7f Add todos for cleanup on duplicated code. Fix styling and typo 2019-02-17 21:53:25 -08:00
Jacob Evans
abd597c7a6 Update ZEIP from strings to numbers 2019-02-17 18:24:48 -08:00
Jacob Evans
b35e1d350b Remove unused 2019-02-17 13:26:27 -08:00
Jacob Evans
918399458d Submit the voting comment 2019-02-17 13:24:27 -08:00
Jacob Evans
72d9b7028b Handle Coinbase wallet inconsitency 2019-02-17 13:06:29 -08:00
Jacob Evans
ed9790c840 Vote: Added instant. Updated failure modes 2019-02-17 12:22:29 -08:00
Fred Carlsen
fd04bc4820 Fix linting errors 2019-02-17 12:22:29 -08:00
Fred Carlsen
58a213b7f9 Prevent overflowing content on error modal 2019-02-17 12:22:29 -08:00
Fred Carlsen
7f8bbfb4bd Fallback from EIP712 when signing 2019-02-17 12:22:29 -08:00
Fred Carlsen
8a3e64b3cd Update tally when user votes 2019-02-17 12:22:29 -08:00
Fred Carlsen
572de86d06 Add error modal 2019-02-17 12:22:28 -08:00
Fred Carlsen
88c33fa4d4 Add default color to icons 2019-02-17 12:22:28 -08:00
Jacob Evans
ee1c6a1ce1 Update copy
Co-Authored-By: sjelfull <fred@sjelfull.no>
2019-02-17 12:22:28 -08:00
Jacob Evans
09e90bea8b Update proposal title
Co-Authored-By: sjelfull <fred@sjelfull.no>
2019-02-17 12:22:28 -08:00
Fred Carlsen
bf758412c1 Import SignatureType from @0x/types 2019-02-17 12:22:28 -08:00
Fred Carlsen
0bbbf5b431 Fix no tally to prevent rounding 2019-02-17 12:22:27 -08:00
Fred Carlsen
87b2236cfb Cleanup 2019-02-17 12:22:27 -08:00
Fred Carlsen
855d2bb87f Add suffix to const name 2019-02-17 12:22:27 -08:00
Fred Carlsen
13b54a3b4d Remove Kovan prefix 2019-02-17 12:22:27 -08:00
Fred Carlsen
5d24ef4849 Remove web3 types 2019-02-17 12:22:27 -08:00
Fred Carlsen
b2da451e8d Tweak tabel formating of addres table 2019-02-17 12:22:27 -08:00
Fred Carlsen
139b66fa76 Format more links 2019-02-17 12:22:26 -08:00
Fred Carlsen
390ed5d7f1 Fix countdown and format in locale aware date 2019-02-17 12:22:26 -08:00
Fred Carlsen
16b5fb6b56 Fix countdown 2019-02-17 12:22:26 -08:00
Fred Carlsen
6205d6c885 Fix linting errors 2019-02-17 12:22:26 -08:00
Fred Carlsen
e5ea65da82 Cleanup unused parts 2019-02-17 12:22:12 -08:00
Fred Carlsen
9caa5feff5 Add derivation path change 2019-02-17 12:22:11 -08:00
Fred Carlsen
7f616356d2 Reset to voting screen when done 2019-02-17 12:21:40 -08:00
Fred Carlsen
155b5dd42f Tweak whitespace 2019-02-17 12:21:40 -08:00
Fred Carlsen
41aaf428bf Cleanup 2019-02-17 12:21:40 -08:00
Fred Carlsen
a17cdf33ea Fire onvoted callback 2019-02-17 12:21:39 -08:00
Fred Carlsen
3d5e879d5f Fix tally 2019-02-17 12:21:39 -08:00
Fred Carlsen
1a73ad3a32 Fix React errors on modal 2019-02-17 12:21:39 -08:00
Fred Carlsen
abb5e7cd39 Fix key on links 2019-02-17 12:21:39 -08:00
Fred Carlsen
cdae6de52e Lint 2019-02-17 12:21:39 -08:00
Fred Carlsen
910fe77ca3 Fix error 2019-02-17 12:21:39 -08:00
Fred Carlsen
b9a93c82d7 Linting fixes 2019-02-17 12:21:38 -08:00
Fred Carlsen
1c040bd616 Rename variable 2019-02-17 12:21:38 -08:00
Fred Carlsen
166c537938 Show balance on confirmation step 2019-02-17 12:21:38 -08:00
Fred Carlsen
79c8de5fd0 Update tally endpoint 2019-02-17 12:21:38 -08:00
Fred Carlsen
7e6d2102a5 Remove back button 2019-02-17 12:21:37 -08:00
Fred Carlsen
4f7d6132fc Remove python code 2019-02-17 12:21:37 -08:00
Fred Carlsen
b7fcc70cd9 Prettier + close button 2019-02-17 12:21:37 -08:00
Fred Carlsen
43ad27931c Update content base 2019-02-17 12:21:37 -08:00
Fred Carlsen
68dc3f75eb Use AWS endpoint when deployed 2019-02-17 12:21:37 -08:00
Fred Carlsen
e67eb6d5b4 Set strong to bold fontweight 2019-02-17 12:21:37 -08:00
Fred Carlsen
2e060bc85f Initial governance commit 2019-02-17 12:21:36 -08:00
Fred Carlsen
22f80e4b19 Fix type 2019-02-17 12:20:09 -08:00
Fred Carlsen
1ef434f95e WIP governance page 2019-02-17 12:20:08 -08:00
Tristan King
5676702da6 Add initial v0x backend and test frontend 2019-02-17 12:19:32 -08:00
David Sun
2fe0539600 added spacing + mobile changes 2019-02-16 22:34:50 -05:00
David Sun
13df5adecd added announcement component 2019-02-15 13:24:28 -05:00
fragosti
f33f808dc7 fix null column constraint issue 2019-02-14 17:17:35 -08:00
Francesco Agosti
82ed9ef25e Merge pull request #1618 from dave4506/bug/website/credit-leads-fix
Fix for credit lead form data
2019-02-14 17:15:23 -08:00
David Sun
0aa26d791d fix for credit lead form data 2019-02-14 20:14:37 -05:00
Alex Browne
255f278f5e Update README for devnet 2019-02-14 16:57:02 -08:00
Leonid Logvinov
1c76f9a0ff Merge pull request #1616 from 0xProject/feature/devnode-ws
Add WS endpoint to devnode
2019-02-15 01:47:29 +01:00
Leonid Logvinov
9a308e25a3 Add WS endpoint to devnode 2019-02-14 16:41:24 -08:00
David Sun
4b52f8c823 Merge pull request #1610 from dave4506/feature/website/infrastructure-deals
Infrastructure deals page
2019-02-14 18:21:09 -05:00
fragosti
8f7145f80a Add parsing radar order test 2019-02-14 15:07:09 -08:00
David Sun
eb17f053f7 Merged latest development to branch 2019-02-14 16:22:18 -05:00
David Sun
304e714331 changes to spacing 2019-02-14 16:02:39 -05:00
David Sun
525685f942 fixed code styling 2019-02-14 15:51:48 -05:00
David Sun
e2477b66c6 added polish to copy and mobile bugs 2019-02-14 15:36:58 -05:00
fragosti
58d51e039c Rename migration to what it is called on prod and qa 2019-02-14 10:45:48 -08:00
fragosti
cb5b5167fc Fix type bug around Radar response 2019-02-14 10:40:10 -08:00
fragosti
7d68378c3c Fix volume calculation bug 2019-02-14 09:40:38 -08:00
fragosti
87da6a947d Have migration to maker_address column working 2019-02-14 09:22:50 -08:00
askeluv
0e644da6ac Fixed linting issues 2019-02-14 17:39:12 +08:00
askeluv
d61a7c360e Self-hosted EDPS 2019-02-14 17:12:31 +08:00
askeluv
ab286d851d Changed Maps to EdpsWrappers 2019-02-14 15:30:58 +08:00
fragosti
e8b60ab292 Use remainingFillableAmount instead of maker/takerAssetAmount for amount field for Radar orders 2019-02-13 13:41:20 -08:00
fragosti
1cb7e70b42 increment MAX_PER_PAGE to 10000 2019-02-13 13:31:45 -08:00
Francesco Agosti
25b9c22845 Merge pull request #1614 from 0xProject/feature/website/faux-vote-page
Add vote placeholder page
2019-02-13 12:26:12 -08:00
fragosti
47166104fa run linter 2019-02-13 12:01:53 -08:00
fragosti
d0e0622058 PR feedback 2019-02-13 11:38:39 -08:00
fragosti
87c75a1e43 Add vote placeholder page 2019-02-13 11:25:18 -08:00
fragosti
d1cc08f1d9 Attempt to add maker_address token_orderbook_snapshots 2019-02-13 11:03:40 -08:00
David Sun
6619626486 changed dogfood s3 bucket and fixed linting issues 2019-02-13 12:14:13 -05:00
David Sun
1681ba090c changed check box 2019-02-13 11:35:05 -05:00
askeluv
c36e1ad056 Changes made as per comments - still have two minor things to fix 2019-02-13 20:23:07 +08:00
fragosti
d79c7f70be fix linting error 2019-02-12 14:58:05 -08:00
fragosti
b7eb2e4746 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/pipeline/add-radar 2019-02-12 14:56:02 -08:00
fragosti
4db9b8b0e3 Add script for pulling radar orderbook 2019-02-12 14:49:32 -08:00
fragosti
f3a537d5c2 Add radar parser 2019-02-12 14:35:50 -08:00
David Sun
6a704b8a77 Merge pull request #1611 from dave4506/feature/website/add-forum-link-footer
Added forum link
2019-02-12 17:32:25 -05:00
David Sun
df896877f8 added forum link 2019-02-12 17:24:57 -05:00
David Sun
3cb2d3dfff adding free credits page (incomplete) 2019-02-12 16:58:55 -05:00
fragosti
d5f5e79661 Add radar data source 2019-02-12 10:41:47 -08:00
askeluv
82dffe9d0e Added remaining tests + fixed linting issues 2019-02-12 19:34:05 +08:00
askeluv
d7825dd7db Added test for entity 2019-02-12 16:06:53 +08:00
askeluv
c0a2f429b6 Added saving to database 2019-02-12 12:30:10 +08:00
Fabio Berger
e909faa3ef Publish
- 0x.js@5.0.0
 - @0x/abi-gen@2.0.3
 - @0x/abi-gen-wrappers@3.0.3
 - @0x/assert@2.0.3
 - @0x/asset-buyer@5.0.4
 - @0x/base-contract@4.0.3
 - @0x/connect@4.0.4
 - @0x/contract-wrappers@7.1.0
 - @0x/contracts-gen@1.0.2
 - @0x/dev-tools-pages@0.0.19
 - @0x/dev-utils@2.1.0
 - @0x/fill-scenarios@2.0.4
 - @0x/instant@1.0.13
 - @0x/json-schemas@3.0.3
 - @0x/metacoin@0.0.40
 - @0x/migrations@3.0.4
 - @0x/monorepo-scripts@1.0.24
 - @0x/order-utils@6.1.0
 - @0x/order-watcher@3.0.4
 - @0x/pipeline@1.0.10
 - @0x/react-docs@2.0.4
 - @0x/react-shared@2.0.4
 - @0x/sol-compiler@3.0.3
 - @0x/sol-coverage@2.0.3
 - @0x/sol-doc@2.0.3
 - @0x/sol-profiler@2.0.4
 - @0x/sol-trace@2.0.4
 - @0x/sol-tracing-utils@6.0.3
 - @0x/sra-spec@2.0.3
 - @0x/subproviders@3.0.3
 - @0x/testnet-faucets@1.0.69
 - @0x/utils@4.1.0
 - @0x/web3-wrapper@5.0.0
 - @0x/website@0.0.72
 - @0x/contracts-asset-proxy@1.0.5
 - @0x/contracts-erc20@1.0.5
 - @0x/contracts-erc721@1.0.5
 - @0x/contracts-exchange@1.0.5
 - @0x/contracts-exchange-forwarder@1.0.5
 - @0x/contracts-exchange-libs@1.0.5
 - @0x/contracts-extensions@2.0.4
 - @0x/contracts-multisig@2.0.4
 - @0x/contracts-test-utils@3.0.4
 - @0x/contracts-utils@2.0.4
2019-02-09 18:44:40 +00:00
Fabio Berger
28d9fdf798 Updated CHANGELOGS 2019-02-09 18:44:28 +00:00
Fabio Berger
e9bfc44b90 Remove react deps from highlight 2019-02-09 17:28:52 +00:00
Fabio B
2a772b71f1 Merge pull request #1569 from 0xProject/feature/utils/decodeArbitrary0xCalldata
0x Transaction Data Decoder
2019-02-09 14:29:20 +00:00
Greg Hysen
233869ed80 updated changelog.json for 0x.js / order-utils / web3-wrapper 2019-02-08 17:12:58 -08:00
Greg Hysen
a9aaae7f97 Deduped random value generation from salt generation 2019-02-08 17:12:58 -08:00
Greg Hysen
500b4940a3 Improvements and conventions in utils package + abi decoder 2019-02-08 17:12:54 -08:00
Greg Hysen
6d0dc47157 updated changelog for contract wrappers 2019-02-08 16:25:30 -08:00
Greg Hysen
56e7e7d644 updated exports for contract wrappers 2019-02-08 16:25:30 -08:00
Greg Hysen
93c128ee21 Added exports for doc generation 2019-02-08 16:25:30 -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
6bde77bb57 fix doc generation in contract-wrappers 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
63f41df327 started writing tests for zeroex tx decoder 2019-02-08 16:25:30 -08:00
Greg Hysen
171618d32b Added comments for transaction decoder 2019-02-08 16:25:30 -08:00
Greg Hysen
f7b58e7f64 moved ZeroExTransactionDecoder into contract wrappers 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
8fc3a6b828 Expanding search parameters for transaction decoder 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
David Sun
8c8cab9309 added page [WIP] still 2019-02-08 18:06:58 -05:00
F. Eugene Aumson
629a8d6328 Add migration to fix exchange events primary keys (#1593)
* Add migration to fix exchange events primary key

* correct comment: "foreign key" -> "primary key"

* Refine hack to handle only the expected error

* Add tx hash to erc20 approval events primary key
2019-02-08 13:21:41 -05:00
Fabio B
ffdaec9f9f Merge pull request #1602 from 0xProject/feat/allow_using_existing_ganache_snapshot
Allow using Web3Factory in-process Ganache with existing snapshot
2019-02-08 17:49:33 +00:00
Fabio Berger
c794153221 Add CHANGELOG entry 2019-02-08 13:22:11 +00:00
Fabio Berger
d01837f42c Allow using Web3Factory in-process Ganache with existing snapshot 2019-02-08 13:19:47 +00:00
askeluv
7ad4cb0078 [WIP] Slippage calculations from Ethereum DEX Prices Service (EDPS) 2019-02-08 18:54:38 +08:00
David Sun
ffd8349889 Merge pull request #1581 from dave4506/feature/instant/bignumber-coerce-type
Big number input to Instant coercion to version utilized by 0x packages
2019-02-07 21:06:43 -05:00
David Sun
f3716fd813 fixed config orderSource assignment 2019-02-07 20:41:37 -05:00
Greg Hysen
1170cf1896 Merge pull request #1592 from 0xProject/feature/abiEncoder/simplifiedSigParsing
Simplified signature parsing + signature tests
2019-02-07 15:18:37 -08:00
Greg Hysen
b9ee9d2bd5 replaced typeof with _.isString 2019-02-07 15:01:29 -08:00
Greg Hysen
21c3f75efc Changelog for utils package 2019-02-07 15:01:29 -08:00
Greg Hysen
eb5f7e36e9 Signature parsing tests 2019-02-07 15:00:07 -08:00
Greg Hysen
4079563f5d More robust/simple signature parsing, using a parse tree 2019-02-07 15:00:07 -08:00
David Sun
6dabed5938 updated order coercion utils architecture and testing 2019-02-07 16:45:56 -05:00
Fabio B
3939d516e6 Merge pull request #1586 from 0xProject/addAnalyticsToDevToolsPages
Add Heap and Google analytics to Dev Tools Pages
2019-02-07 21:18:41 +00:00
Fabio Berger
5aba9d698b Only include analytics on production builds 2019-02-07 14:54:12 +00:00
Fabio Berger
3dd652e7cf Merge branch 'development' into addAnalyticsToDevToolsPages
* development: (51 commits)
  Publish
  Updated CHANGELOGS
  Updated CHANGELOGS
  Update packages/sol-compiler/CHANGELOG.json
  Update packages/sol-compiler/CHANGELOG.json
  Move from devDep to dep
  Fix linter
  Update CHANGELOG
  Re-run yarn since fails again on first run
  Add PR numbers
  Omit remapping in compiler settings equality checks
  Omit remapping in compiler settings equality checks
  Fix a bug when ast and legacyAST were not present in the artifacts even if requested
  Update yarn.lock
  Remove the bin_paths and fetch the solidity release list from github repo
  Remove postinstall hack
  Fix the undefined opts bug
  Fix sol-compiler bug with remappings causing smart recompilation to now work
  re-add postinstall hack
  Fix deps versions
  ...
2019-02-07 14:28:24 +00:00
Leonid Logvinov
f003298ce4 Publish
- 0x.js@4.0.3
 - @0x/abi-gen@2.0.2
 - @0x/abi-gen-wrappers@3.0.2
 - @0x/assert@2.0.2
 - @0x/asset-buyer@5.0.3
 - @0x/base-contract@4.0.2
 - @0x/connect@4.0.3
 - @0x/contract-wrappers@7.0.2
 - @0x/contracts-gen@1.0.1
 - @0x/dev-tools-pages@0.0.18
 - @0x/dev-utils@2.0.2
 - @0x/fill-scenarios@2.0.3
 - @0x/instant@1.0.12
 - @0x/json-schemas@3.0.2
 - @0x/metacoin@0.0.39
 - @0x/migrations@3.0.3
 - @0x/monorepo-scripts@1.0.23
 - @0x/order-utils@6.0.1
 - @0x/order-watcher@3.0.3
 - @0x/pipeline@1.0.9
 - @0x/react-docs@2.0.3
 - @0x/react-shared@2.0.3
 - @0x/sol-compiler@3.0.2
 - @0x/sol-coverage@2.0.2
 - @0x/sol-doc@2.0.2
 - @0x/sol-profiler@2.0.3
 - @0x/sol-resolver@2.0.2
 - @0x/sol-trace@2.0.3
 - @0x/sol-tracing-utils@6.0.2
 - @0x/sra-spec@2.0.2
 - @0x/subproviders@3.0.2
 - @0x/testnet-faucets@1.0.68
 - @0x/types@2.0.2
 - @0x/utils@4.0.3
 - @0x/web3-wrapper@4.0.2
 - @0x/website@0.0.71
 - @0x/contracts-asset-proxy@1.0.4
 - @0x/contracts-erc20@1.0.4
 - @0x/contracts-erc721@1.0.4
 - @0x/contracts-exchange@1.0.4
 - @0x/contracts-exchange-forwarder@1.0.4
 - @0x/contracts-exchange-libs@1.0.4
 - @0x/contracts-extensions@2.0.3
 - @0x/contracts-multisig@2.0.3
 - @0x/contracts-test-utils@3.0.3
 - @0x/contracts-utils@2.0.3
2019-02-07 15:02:05 +01:00
Leonid Logvinov
5f5ee0041f Updated CHANGELOGS 2019-02-07 15:01:53 +01:00
Leonid Logvinov
88497ddc52 Updated CHANGELOGS 2019-02-07 14:42:20 +01:00
Fabio B
e921d5ec13 Merge pull request #1589 from 0xProject/feat/lock-contract-deps
Lock dep versions in contracts packages (again)
2019-02-07 13:28:57 +00:00
Leonid Logvinov
c55974a485 Merge pull request #1596 from 0xProject/fix/sol-compiler-args
Sol-compiler bug fixes
2019-02-07 14:18:55 +01:00
Fabio B
2ff0f545f5 Update packages/sol-compiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-07 14:17:41 +01:00
Fabio B
7f2a011c3e Update packages/sol-compiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-07 14:17:23 +01:00
Fabio Berger
8af9a38c8e Move from devDep to dep 2019-02-07 13:07:36 +00:00
Leonid Logvinov
b54bafe1c5 Fix linter 2019-02-07 13:35:50 +01:00
Fabio Berger
7a9ff3846e Merge development 2019-02-07 12:33:44 +00:00
Leonid Logvinov
53fe08a348 Update CHANGELOG 2019-02-07 13:30:00 +01:00
Fabio Berger
f118e86cfe Re-run yarn since fails again on first run 2019-02-07 12:29:05 +00:00
Leonid Logvinov
2e60d5341e Add PR numbers 2019-02-07 13:24:57 +01:00
Leonid Logvinov
2ef3af0003 Omit remapping in compiler settings equality checks 2019-02-07 13:20:21 +01:00
Leonid Logvinov
2b7699c26a Omit remapping in compiler settings equality checks 2019-02-07 13:20:03 +01:00
Leonid Logvinov
d567c58d3b Fix a bug when ast and legacyAST were not present in the artifacts even if requested 2019-02-07 13:10:08 +01:00
Fabio Berger
bede3d7e29 Update yarn.lock 2019-02-07 12:01:57 +00:00
Leonid Logvinov
64d6dae672 Remove the bin_paths and fetch the solidity release list from github repo 2019-02-07 12:58:46 +01:00
Fabio Berger
b001fe2b08 Remove postinstall hack 2019-02-07 11:58:06 +00:00
Leonid Logvinov
c20285dd36 Fix the undefined opts bug 2019-02-07 12:30:54 +01:00
Leonid Logvinov
7e19c944b9 Merge pull request #1575 from 0xProject/feature/contracts-gen
Contracts generator
2019-02-07 12:23:00 +01:00
Leonid Logvinov
fd4d3cff88 Fix sol-compiler bug with remappings causing smart recompilation to now work 2019-02-07 12:13:24 +01:00
Fabio Berger
5ff646ca8e re-add postinstall hack 2019-02-07 10:53:14 +00:00
Leonid Logvinov
88432a5e67 Fix deps versions 2019-02-07 11:49:59 +01:00
Leonid Logvinov
7519d60fb7 Fix linter issues 2019-02-07 11:29:04 +01:00
Leonid Logvinov
de23428069 Merge development 2019-02-07 11:15:37 +01:00
Amir Bandeali
9089bf2c5f Lock dep versions in contracts packages 2019-02-06 21:10:35 -08:00
Fabio Berger
2a344e26cc Publish
- 0x.js@4.0.2
 - @0x/asset-buyer@5.0.2
 - @0x/connect@4.0.2
 - @0x/contract-wrappers@7.0.1
 - @0x/dev-tools-pages@0.0.17
 - @0x/fill-scenarios@2.0.2
 - @0x/instant@1.0.11
 - @0x/migrations@3.0.2
 - @0x/monorepo-scripts@1.0.22
 - @0x/order-utils@6.0.0
 - @0x/order-watcher@3.0.2
 - @0x/pipeline@1.0.8
 - @0x/react-docs@2.0.2
 - @0x/react-shared@2.0.2
 - @0x/testnet-faucets@1.0.67
 - @0x/website@0.0.70
 - @0x/contracts-asset-proxy@1.0.3
 - @0x/contracts-erc20@1.0.3
 - @0x/contracts-erc721@1.0.3
 - @0x/contracts-exchange@1.0.3
 - @0x/contracts-exchange-forwarder@1.0.3
 - @0x/contracts-exchange-libs@1.0.3
 - @0x/contracts-extensions@2.0.2
 - @0x/contracts-multisig@2.0.2
 - @0x/contracts-test-utils@3.0.2
 - @0x/contracts-utils@2.0.2
2019-02-07 01:53:15 +00:00
Fabio Berger
af26403a86 Updated CHANGELOGS 2019-02-07 01:53:02 +00:00
Fabio B
3af6c8fe1d Merge pull request #1595 from 0xProject/fix-order-utils-doc-rendering
Stop exporting EIP712 schemas
2019-02-07 01:24:32 +00:00
Fabio Berger
b883b183a6 Stop exporting EIP712 schemas 2019-02-07 01:03:43 +00:00
Fabio Berger
ac58ace8cf Add CHANGELOG entry about faux publish of contract packages 2019-02-07 00:16:39 +00:00
Fabio Berger
a50eefc44e Fix paragraph rendering on wiki 2019-02-06 14:08:45 +00:00
Fabio Berger
dbb3c5e32b Publish
- 0x.js@4.0.1
 - @0x/abi-gen@2.0.1
 - @0x/abi-gen-wrappers@3.0.1
 - @0x/assert@2.0.1
 - @0x/asset-buyer@5.0.1
 - @0x/base-contract@4.0.1
 - @0x/connect@4.0.1
 - @0x/contract-wrappers@7.0.0
 - @0x/dev-tools-pages@0.0.16
 - @0x/dev-utils@2.0.1
 - @0x/fill-scenarios@2.0.1
 - @0x/instant@1.0.10
 - @0x/json-schemas@3.0.1
 - @0x/metacoin@0.0.38
 - @0x/migrations@3.0.1
 - @0x/monorepo-scripts@1.0.21
 - @0x/order-utils@5.0.0
 - @0x/order-watcher@3.0.1
 - @0x/pipeline@1.0.7
 - @0x/react-docs@2.0.1
 - @0x/react-shared@2.0.1
 - @0x/sol-compiler@3.0.1
 - @0x/sol-coverage@2.0.1
 - @0x/sol-doc@2.0.1
 - @0x/sol-profiler@2.0.2
 - @0x/sol-resolver@2.0.1
 - @0x/sol-trace@2.0.2
 - @0x/sol-tracing-utils@6.0.1
 - @0x/sra-spec@2.0.1
 - @0x/subproviders@3.0.1
 - @0x/testnet-faucets@1.0.66
 - @0x/types@2.0.1
 - @0x/utils@4.0.2
 - @0x/web3-wrapper@4.0.1
 - @0x/website@0.0.69
 - @0x/contracts-asset-proxy@1.0.2
 - @0x/contracts-erc20@1.0.2
 - @0x/contracts-erc721@1.0.2
 - @0x/contracts-exchange@1.0.2
 - @0x/contracts-exchange-forwarder@1.0.2
 - @0x/contracts-exchange-libs@1.0.2
 - @0x/contracts-extensions@2.0.1
 - @0x/contracts-multisig@2.0.1
 - @0x/contracts-test-utils@3.0.1
 - @0x/contracts-utils@2.0.1
2019-02-06 11:41:24 +00:00
Fabio Berger
265df31750 Updated CHANGELOGS 2019-02-06 11:41:12 +00:00
Fabio Berger
9bbe56df0b Fix react-highlight dep 2019-02-06 11:24:40 +00:00
Fabio Berger
879c795fc4 Fix react-highlight dep 2019-02-06 11:07:16 +00:00
Fabio B
8b5bb97537 Merge pull request #1587 from 0xProject/fix/abiEncoder/DefaultTypesOnNullInput
Handle ABI decoding NULL for all data types
2019-02-06 10:23:21 +00:00
Greg Hysen
3d7a635543 Added NULL decoding tests for return values 2019-02-05 21:33:07 -08:00
Greg Hysen
b3ae9e6e25 updated changelog for utils 2019-02-05 19:18:00 -08:00
Greg Hysen
023ea5b3a1 Ran prettier + linter 2019-02-05 18:10:17 -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
2326dcdb12 Handle NULL input for all data types 2019-02-05 17:30:54 -08:00
David Sun
d95af455f1 added coercion util functions 2019-02-05 16:46:51 -05:00
Fabio Berger
8de955f3d8 Add Heap and Google analytics to Dev Tools Pages 2019-02-05 21:34:29 +00:00
Amir Bandeali
b5eb47f609 Merge pull request #1576 from 0xProject/feat/transaction-hash
Add transactionHashUtils to order-utils package
2019-02-05 10:03:30 -08:00
Amir Bandeali
af4ed0f39c Update python JSON schema for 0x transactions 2019-02-05 09:26:03 -08:00
Amir Bandeali
eac254f925 Fix outdated comments and make verifyingContractAddress a required part of the 0x tx schema 2019-02-05 09:26:03 -08:00
Amir Bandeali
8246dec843 Rename getTransactionHex to getTransactionHashHex for clarity 2019-02-05 09:26:03 -08:00
Amir Bandeali
4514da0646 Update CHANGELOGs 2019-02-05 09:26:03 -08:00
Amir Bandeali
9abd6f5695 Allow custom domains in eip712Utils 2019-02-05 09:23:09 -08:00
Amir Bandeali
a394967268 Use new transaction schema throughout monorepo 2019-02-05 09:23:09 -08:00
Amir Bandeali
c7c4cb9bc6 Add transaction hash utils 2019-02-05 09:23:09 -08:00
Amir Bandeali
1ada679663 Update ZeroExTransactionSchema 2019-02-05 09:23:09 -08:00
Amir Bandeali
9552676783 Add schema validation to getOrderHashBuff 2019-02-05 09:23:09 -08:00
Fabio B
69c7c03fb3 Merge pull request #1580 from 0xProject/fix/preSignedSignatureBug
Fix preSigned signature bug in SignatureUtils
2019-02-05 14:36:06 +00:00
Fabio Berger
224a58bdf2 Fix dep version 2019-02-05 14:19:48 +00:00
Fabio Berger
98427b715d Merge branch 'fix/preSignedSignatureBug' of github.com:0xProject/0x-monorepo into fix/preSignedSignatureBug
* 'fix/preSignedSignatureBug' of github.com:0xProject/0x-monorepo:
  Update packages/order-utils/CHANGELOG.json
2019-02-05 13:57:40 +00:00
Fabio Berger
a8078aa151 merge development 2019-02-05 13:55:05 +00:00
Leonid Logvinov
7b583cecb2 Publish
- 0x.js@4.0.0
 - @0x/abi-gen@2.0.0
 - @0x/abi-gen-templates@2.0.0
 - @0x/abi-gen-wrappers@3.0.0
 - @0x/assert@2.0.0
 - @0x/asset-buyer@5.0.0
 - @0x/base-contract@4.0.0
 - @0x/connect@4.0.0
 - @0x/contract-addresses@2.2.1
 - @0x/contract-wrappers@6.0.1
 - @0x/dev-tools-pages@0.0.15
 - @0x/dev-utils@2.0.0
 - ethereum-types@2.0.0
 - @0x/fill-scenarios@2.0.0
 - @0x/instant@1.0.9
 - @0x/json-schemas@3.0.0
 - @0x/metacoin@0.0.37
 - @0x/migrations@3.0.0
 - @0x/monorepo-scripts@1.0.20
 - @0x/order-utils@4.0.0
 - @0x/order-watcher@3.0.0
 - @0x/pipeline@1.0.6
 - @0x/react-docs@2.0.0
 - @0x/react-shared@2.0.0
 - @0x/sol-compiler@3.0.0
 - @0x/sol-coverage@2.0.0
 - @0x/sol-doc@2.0.0
 - @0x/sol-profiler@2.0.1
 - @0x/sol-resolver@2.0.0
 - @0x/sol-trace@2.0.1
 - @0x/sol-tracing-utils@6.0.0
 - @0x/sra-spec@2.0.0
 - @0x/subproviders@3.0.0
 - @0x/testnet-faucets@1.0.65
 - @0x/tslint-config@3.0.0
 - @0x/types@2.0.0
 - @0x/typescript-typings@4.0.0
 - @0x/utils@4.0.1
 - @0x/web3-wrapper@4.0.0
 - @0x/website@0.0.68
 - @0x/contracts-asset-proxy@1.0.1
 - @0x/contracts-erc20@1.0.1
 - @0x/contracts-erc721@1.0.1
 - @0x/contracts-exchange@1.0.1
 - @0x/contracts-exchange-forwarder@1.0.1
 - @0x/contracts-exchange-libs@1.0.1
 - @0x/contracts-extensions@2.0.0
 - @0x/contracts-multisig@2.0.0
 - @0x/contracts-test-utils@3.0.0
 - @0x/contracts-utils@2.0.0
2019-02-05 14:50:16 +01:00
Leonid Logvinov
f3d9520db2 Updated CHANGELOGS 2019-02-05 14:50:02 +01:00
Leonid Logvinov
9de4bf1225 Fix contracts-utils versions 2019-02-05 14:29:17 +01:00
Leonid Logvinov
3cb6744369 Update packages/order-utils/CHANGELOG.json
Co-Authored-By: fabioberger <kandinsky454@protonmail.ch>
2019-02-05 13:14:31 +00:00
Fabio Berger
e021460f03 Remove .only 2019-02-05 13:09:23 +00:00
Fabio Berger
0a93f3346f All CHANGELOG entry 2019-02-05 13:07:50 +00:00
Fabio Berger
332cc14dcd Add preSigned isValidSignature test for success case using smart contract & TS implementation 2019-02-05 13:07:40 +00:00
Leonid Logvinov
52e287fc7d Fix CHANGELOGs 2019-02-05 13:57:38 +01:00
Fabio Berger
7885b2e3f8 Fix test 2019-02-05 12:56:04 +00:00
Leonid Logvinov
e6683e46cc Add CHANGELOG entries to sol-tracing-utils 2019-02-05 13:47:27 +01:00
Fabio Berger
2447c72a5c Fix heap out of memory issue 2019-02-05 12:09:13 +00:00
Leonid Logvinov
4febabd3e7 Merge pull request #1583 from reserve-protocol/development
Fix default gas limit for fake txs in TraceCollectionSubprovider
2019-02-05 12:28:05 +01:00
Leonid Logvinov
4b4bfee1bc Merge pull request #1584 from reserve-protocol/patch
Hook eth_sendRawTransaction in addition to eth_sendTransaction
2019-02-05 12:26:58 +01:00
Fabio Berger
d7c9d73349 Merge branch 'development' into fix/preSignedSignatureBug
* development:
  update error msg for dependency version check
  CI test for dependencies to have the same version (#1556)
  Add missing comma
  Decode NULL as false
  Update blog link to not be /latest, and use constant in mobile nav
2019-02-05 11:16:45 +00:00
xianny
09a5b6e7a3 update error msg for dependency version check 2019-02-05 19:05:45 +08:00
Xianny
703aa38a17 CI test for dependencies to have the same version (#1556)
* add failing CI for dependencies with multiple versions

* update dependencies

* increase bundlewatch maxsize for 0x.js
2019-02-05 18:58:30 +08:00
Fabio B
b2f35057a5 Merge pull request #1582 from 0xProject/fix/utils/abiDecodeNullAsFalse
Decode NULL as False in Abi Encoder
2019-02-05 10:32:00 +00:00
Fabio Berger
a3198b7df8 Add missing comma 2019-02-05 09:33:16 +00:00
Greg Hysen
db900d180c Decode NULL as false 2019-02-04 16:32:14 -08:00
Jeremy Schlatter
3d2ed57c08 Hook eth_sendRawTransaction in addition to eth_sendTransaction 2019-02-04 14:33:13 -08:00
Jeremy Schlatter
d0b0c4a917 Fix default gas limit for fake txs in TraceCollectionSubprovider
This hex string is required to be prefixed with '0x'. If it does not have that
prefix, then the call to unmarshalTxData below will fail with:

	BigNumber Error: new BigNumber() not a number: 5b8d80

This default value is overridden if the incoming call already has a gas
estimate, in which case the parse error above does not happen. This is probably
why the error wasn't previously noticed.
2019-02-04 13:22:36 -08:00
Fabio Berger
a1bf5e8261 Merge branch 'development' into fix/preSignedSignatureBug
* development:
  Nit fixes to pipeline README
  fix typo
2019-02-04 19:33:08 +00:00
Steve Klebanoff
74293d5bc8 Merge pull request #1536 from 0xProject/fix/website/blog-link
[website] Change blog link
2019-02-04 08:59:03 -08:00
David Sun
59f48d6d57 working on big number coercion function 2019-02-04 11:19:18 -05:00
Fabio Berger
50cad8d260 Nit fixes to pipeline README 2019-02-04 16:04:19 +00:00
Fabio Berger
52f22aad81 Write failing preSign unit test 2019-02-04 16:03:48 +00:00
Fabio Berger
c03e24e10b Fix bug where passing in signerAddress instead of exchangeAddress 2019-02-04 16:03:25 +00:00
Fabio B
995a2ef8a0 Merge pull request #1567 from jeremyschlatter/patch-1
fix typo
2019-02-04 14:30:45 +00:00
Leonid Logvinov
4d75681357 Add @0x/types dependency 2019-02-04 13:11:20 +01:00
Leonid Logvinov
1a88eac9c7 Make the banner more visible 2019-02-04 13:00:15 +01:00
Leonid Logvinov
47357ddec8 Remove redundant dependencies 2019-02-04 12:58:19 +01:00
Fabio B
129ae3a737 Update packages/contracts-gen/src/index.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-04 12:56:18 +01:00
Fabio B
31d1390039 Update packages/contracts-gen/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-04 12:52:36 +01:00
Leonid Logvinov
6943bbcacb Temp 2019-02-04 10:38:02 +01:00
Francesco Agosti
1d3fff32a2 Merge pull request #1559 from 0xProject/feature/pipeline/fix-missing-dex-trades
[pipeline] Fix missing DEX Trades from Bloxy
2019-02-01 18:30:57 -08:00
Amir Bandeali
069c9fd4a6 Merge pull request #1568 from smithki/fix/contract-wrappers/wrong-default-address-for-order-validator-wrapper
Use correct "orderValidator" address in OrderValidatorWrapper constructor
2019-02-01 16:04:30 -08:00
fragosti
4f3cab4213 add row deletion step to migration 2019-02-01 15:50:04 -08:00
Fabio Berger
42c13ecafa Remove DDEX library from developer tools list 2019-02-01 20:12:43 +00:00
dave4506
70158c3a99 Merge pull request #1572 from dave4506/fix/instant/input-bug-firefox
Removed number selector for firefox inputs
2019-02-01 14:15:21 -05:00
Leonid Logvinov
ae8d2ae2cb Merge pull request #1542 from 0xProject/feature/solc-docker
Implement docker as another backend for sol-compiler
2019-02-01 19:58:29 +01:00
Leonid Logvinov
79adf5cec6 Merge development 2019-02-01 19:08:56 +01:00
David Sun
26d44a5392 ran prettier on codebase 2019-02-01 12:07:21 -05:00
David Sun
149f8bc9b3 removed number selector for firefox inputs 2019-01-31 21:12:13 -05:00
dave4506
78bdc2d6b4 Merge pull request #1552 from dave4506/feature/portal/fix-highlight-state-back-to-relayers
Added a highlight state to back button
2019-01-31 19:23:49 -05:00
David Sun
c9facdf825 changed button to medium blue 2019-01-31 18:56:31 -05:00
dave4506
4986a2f940 Merge pull request #1548 from dave4506/fix/website/market-making-svg-consistency
Fixed market making website svg consistency issues
2019-01-31 17:45:10 -05:00
Ian K Smith
9fd372da51 Add CHANGELOG.json entry 2019-01-31 15:04:22 -07:00
Ian K Smith
68194fde0a Use correct "orderValidator" address in order_validator_wrapper ctor 2019-01-31 14:55:06 -07:00
dave4506
155e73dc70 Merge pull request #1551 from dave4506/feature/instant/add-usdc
Added USDC support to instant
2019-01-31 16:37:14 -05:00
Jeremy Schlatter
76a1ff7c40 fix typo 2019-01-31 12:35:26 -08:00
Jacob Evans
da357f7599 Merge pull request #1533 from 0xProject/migrations/consolidate-owner-default
Remove owner from migrations
2019-01-31 16:24:11 +10:00
fragosti
4efe941937 remove extra quotes from google-site-verification 2019-01-30 17:22:33 -08:00
Francesco Agosti
612d2dbde1 Merge pull request #1563 from 0xProject/feature/website/fix-typos-add-metatag
[website] Fix website typos and add metatag
2019-01-30 16:24:57 -08:00
fragosti
0c9369bf04 fix typo 2019-01-30 15:31:34 -08:00
fragosti
94043380bb add site verification tag 2019-01-30 15:29:42 -08:00
fragosti
96e880d170 fix typos on landing 2019-01-30 15:28:55 -08:00
F. Eugene Aumson
3d8caa4694 Fix hang in Python CI test runs (#1560) 2019-01-30 15:51:59 -05:00
fragosti
4996ae8d9d run linter 2019-01-30 10:30:50 -08:00
fragosti
7b4a0d4f8a fix bloxy datasource getDexTradesAsync to allow for tx_hash repetitions in dedupe logic 2019-01-30 10:28:06 -08:00
fragosti
c2ad95fd94 update types to adhere to new dex trades and bloxy api format 2019-01-30 10:12:15 -08:00
fragosti
5ad2e9d6b6 write migration to add trade_index primary key to dex_trades 2019-01-30 10:06:04 -08:00
fragosti
8bac655dc1 Stop omitting trades because of duplicate tx hashes 2019-01-30 09:39:59 -08:00
Francesco Agosti
e29f130285 Merge pull request #1546 from dave4506/fix/change-asset-unavail-tokens-unavail
Changed error message from "Assets Unavailable" to "Tokens Unavailable"
2019-01-30 09:23:25 -08:00
Leonid Logvinov
f9d4afd713 Merge pull request #1558 from 0xProject/fix/sol-tracing-errors
Improve error messages when unable to find bytecode
2019-01-30 14:25:50 +01:00
Fabio B
d6b6f1e7d9 Update packages/sol-trace/src/revert_trace_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-30 14:25:43 +01:00
Leonid Logvinov
ea5e78b217 Improve error messages when unable to find bytecode 2019-01-30 14:12:31 +01:00
Leonid Logvinov
c9a7ef18dc Merge pull request #1557 from 0xProject/fix/sol-cov/property-range-of-null
Fix the `cannot read property range of null` bug
2019-01-30 14:11:53 +01:00
Leonid Logvinov
e23f90e41c Fix the cannot read property range of null bug 2019-01-30 14:04:19 +01:00
Leonid Logvinov
e1244648e0 Rename dependencyNameToPackagePath to dependencyNameToPath 2019-01-30 13:11:18 +01:00
Leonid Logvinov
8d72e253c8 Add a comment 2019-01-30 13:11:18 +01:00
Leonid Logvinov
33ed6a7c06 Remove + concatenation 2019-01-30 13:11:18 +01:00
Leonid Logvinov
c82a4a5760 Fail fast 2019-01-30 13:11:18 +01:00
Fabio B
445a629016 Update packages/sol-compiler/src/utils/compiler.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-30 13:08:10 +01:00
Fabio B
be7daae91a Update packages/ethereum-types/src/index.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-30 13:03:30 +01:00
David Sun
ba645692b0 updated svg asset 2019-01-29 16:19:00 -05:00
Leonid Logvinov
08f541535b Fix naming 2019-01-28 17:37:15 +01:00
Leonid Logvinov
3520d2584e Add 'useDockerisedSolc' to new packages 2019-01-28 17:27:53 +01:00
Leonid Logvinov
141ac0ca0b Merge development 2019-01-28 17:26:13 +01:00
Leonid Logvinov
0c12128f64 Temp CI 2019-01-28 17:24:44 +01:00
David Sun
1e939591ae added USDC as an option 2019-01-26 19:26:40 -05:00
Francesco Agosti
25e42c0ad4 Merge pull request #1549 from 0xProject/justinbarry-0x-monorepo-mirror
[instant] [mirror] Output Chrome 41 compatible version of 0x instant
2019-01-25 09:22:11 -08:00
Francesco Agosti
1c032a103d Merge pull request #1508 from justinbarry/development
Output Chrome 41 compatible version of 0x instant
2019-01-25 08:51:33 -08:00
Amir Bandeali
e0022cd98c Merge pull request #1547 from 0xProject/feat/contracts/lock-dependencies
Lock versions of all dependencies that are contracts packages
2019-01-24 19:47:56 -08:00
David Sun
68dbf8b2a7 added new svg assets and modified svg code to fix transparency 2019-01-24 22:31:16 -05:00
fragosti
a9ca1f3174 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into development 2019-01-24 17:35:25 -08:00
Amir Bandeali
bcff25c996 Lock versions of all dependencies that are contracts packages 2019-01-24 13:47:02 -08:00
David Sun
e272f8e1d9 changed error message 2019-01-24 15:44:42 -05:00
fragosti
5b06595a6b Merge branch 'development' of https://github.com/0xProject/0x-monorepo into development 2019-01-24 12:05:44 -08:00
fragosti
44aafe4d78 feat: add Marc to website 2019-01-24 12:05:22 -08:00
Steve Klebanoff
92cbff67d1 Merge pull request #1543 from 0xProject/fix/asset-buyer-test
[asset-buyer] Fix test (assetData string)
2019-01-23 15:33:05 -08:00
Steve Klebanoff
2166f57750 Assert that assetData is a string before we try to decode it 2019-01-23 12:51:26 -08:00
Francesco Agosti
726a52f3ee 0xproject -> 0x.org 2019-01-23 12:35:00 -08:00
Francesco Agosti
64424deb41 Update README.md 2019-01-23 12:33:10 -08:00
Amir Bandeali
69025da2dc Merge pull request #1539 from 0xProject/feat/contracts/split-packages
Split/rename/combine packages
2019-01-23 12:22:26 -08:00
Amir Bandeali
09cb3b7d50 Merge branch 'development' into feat/contracts/split-packages 2019-01-23 10:49:10 -08:00
Amir Bandeali
8566bb551b Fix geth tests in circleci config 2019-01-23 09:51:02 -08:00
Amir Bandeali
f631c2da06 Update package.json versions 2019-01-23 09:49:02 -08:00
Leonid Logvinov
19064f8cbb Add -setup_remote_docker to CI build steps 2019-01-23 17:09:54 +01:00
Leonid Logvinov
de36670bdc Make workspace path in NPMResolver optional 2019-01-23 17:02:02 +01:00
Leonid Logvinov
e8d68dc07f Implement docker as another backend for sol-compiler 2019-01-23 16:54:27 +01:00
Amir Bandeali
f81149ac2b Update all contract CHANGELOGs 2019-01-22 18:06:26 -08:00
Alex Browne
ef928aff31 Merge pull request #1537 from nitper/patch-1
[fix] allow devnet rpc to listen on any vhost
2019-01-22 16:24:29 -08:00
Jacob Evans
6f090a2fda Improve CHANGELOG 2019-01-23 11:11:32 +11:00
Benjamin
c690364ec6 Add docker-compose basic config (#1538)
Add docker-compose.yml config for 0x-devnet package. This can be expanded upon in future if necessary.
2019-01-22 15:23:11 -08:00
Leonid Logvinov
cc48433575 Merge pull request #1535 from 0xProject/feature/sol-tracing-monorepo-fixes
Sol tracing fixes
2019-01-22 23:35:31 +01:00
Amir Bandeali
fe1ef930ad Update DEPLOYS and READMEs within each package 2019-01-22 13:37:14 -08:00
Leonid Logvinov
8ce885089e Change strings to numbers in CHANGELOGs 2019-01-22 21:23:58 +01:00
Leonid Logvinov
3e910c0e03 Refactor out isInterfaceContract 2019-01-22 21:20:02 +01:00
Leonid Logvinov
7c47c52fac Fix a typo 2019-01-22 21:11:55 +01:00
nitper
744fa22f01 allow devnet rpc to listen on any vhost
geth's default value for `--rpcvhosts` is `localhost`, which does not work when trying to use the devnet in certain environments such as `docker-compose` or `gitlab-ci`
2019-01-22 14:14:12 -05:00
Steve Klebanoff
b3f996595f Update blog link to not be /latest, and use constant in mobile nav 2019-01-22 08:48:05 -08:00
Fabio B
148f12a753 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:37 +01:00
Fabio B
aedd6503d1 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:32 +01:00
Fabio B
c3ecbd3063 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:24 +01:00
Fabio B
3297b5ea34 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:17 +01:00
Fabio B
19f929761b Update packages/sol-tracing-utils/src/collect_coverage_entries.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:05 +01:00
Fabio B
d8890a03bb Update packages/sol-profiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 13:29:22 +01:00
Fabio B
4a6bdfae23 Update contracts/utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 13:29:07 +01:00
Leonid Logvinov
7015fc4dbc Fix tests 2019-01-22 13:02:16 +01:00
Amir Bandeali
ab4d4a69ec Update root tsconfig packages 2019-01-21 22:39:51 -08:00
Amir Bandeali
efbfd08aa0 Separate forwarder into own package 2019-01-21 21:41:22 -08:00
Amir Bandeali
f9c29c3e74 Cleanup package.json files 2019-01-21 21:41:21 -08:00
Amir Bandeali
0758f231e2 Split tokens package into erc20 and erc721 2019-01-21 21:41:21 -08:00
Amir Bandeali
9fa8619590 Move contents of examples and interfaces packages into corresponding packages 2019-01-21 21:41:21 -08:00
Amir Bandeali
174daa97c3 Add commands for building and testing all contracts 2019-01-21 21:41:21 -08:00
Amir Bandeali
43de20930b Update remaining pachages 2019-01-21 21:41:21 -08:00
Amir Bandeali
4a4c26a2e3 Split protocol package into exchange, asset-proxy, and multisig 2019-01-21 21:41:21 -08:00
Amir Bandeali
e2fe907de0 Rename libs to exchange-libs 2019-01-21 21:41:21 -08:00
Amir Bandeali
f9986a6342 Move LibAddressArray to utils package 2019-01-21 21:41:21 -08:00
Fabio B
8d367a09fe Merge pull request #1527 from 0xProject/improvements/website/dev_home
Add Python tools section to Dev Home and add missing Python packages
2019-01-21 18:26:23 +01:00
Leonid Logvinov
7e60138e9d Fix imports in TestContracts and testLibBytes to be relative. This way they show up correctly in coverage reports 2019-01-21 16:37:50 +01:00
Leonid Logvinov
e5c4390489 Fix a bug when some parts of the profiling report were missing because of the coverage ignore lines 2019-01-21 16:32:12 +01:00
Fabio Berger
dabcd2cf47 Fix linter issue 2019-01-21 16:14:17 +01:00
Leonid Logvinov
61910f264c Print reasonable warnings on bytecode collisions 2019-01-21 15:55:06 +01:00
Leonid Logvinov
ddb0e29253 SolCompilerArtifactAdapter now doesn't return the ContractData for interfaces 2019-01-21 15:52:37 +01:00
Leonid Logvinov
9d9ab2f1ee Cache bytecode lookup 2019-01-21 15:44:08 +01:00
Leonid Logvinov
ce65ac0c1c SolCompilerArtifactsAdapter now uses SolResolver under the hood which allows to resolve NPM dependencies properly 2019-01-21 15:28:39 +01:00
Jacob Evans
98203bcc8c Convert from to lower case.
fixes #1490
2019-01-21 16:02:20 +11:00
Jacob Evans
bee48d1d43 Remove partial type for TxData txDefaults 2019-01-21 15:52:39 +11:00
Jacob Evans
ebbb4df227 Remove owner from migrations 2019-01-21 15:16:16 +11:00
Fabio Berger
da7c969eeb Add entry for contract demo package 2019-01-18 22:41:55 +01:00
Fabio Berger
310d981990 Link all Python packages to Pypi 2019-01-18 22:37:13 +01:00
Fabio Berger
6275b7ba3b Remove .py suffix 2019-01-18 22:35:04 +01:00
Fabio Berger
b22a6b4e09 Create Python tools section and add missing Python packages to it 2019-01-18 13:12:19 +01:00
Leonid Logvinov
b5fd3c72a0 Merge pull request #1518 from 0xProject/feature/new-ganache
Update ganache version
2019-01-18 13:07:32 +01:00
Leonid Logvinov
bf65332763 Merge branch 'development' into feature/new-ganache 2019-01-18 13:07:19 +01:00
Leonid Logvinov
3973dec994 Merge pull request #1517 from 0xProject/feature/bignumber-8.0
Bignumber 8.0
2019-01-18 13:06:08 +01:00
Leonid Logvinov
c8212f1d4d Merge branch 'development' into feature/bignumber-8.0 2019-01-18 12:53:04 +01:00
Leonid Logvinov
e6fe728bcb Merge development 2019-01-18 12:46:16 +01:00
Fabio Berger
bef30e4209 Update footer 2019-01-18 12:36:48 +01:00
Fabio B
6c7f4c13fa Update packages/web3-wrapper/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-18 12:32:49 +01:00
Fabio B
662049914a Update packages/subproviders/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-18 12:32:41 +01:00
Greg Hysen
d7a5190d52 Merge pull request #1519 from hosyvietanh/patch-1
Allow matching of uint80 in evm_data_type
2019-01-18 01:07:28 -08:00
Steve Klebanoff
2b64661c61 Merge pull request #1512 from 0xProject/feature/instant/asset-buyer-check-liquidity
[instant] [asset-buyer] Helper methods for checking liquidity
2019-01-17 16:01:36 -08:00
Steve Klebanoff
9c29eecc30 Merge pull request #1525 from 0xProject/fix/dev-tools-pages-package
[dev-tools-pages] Remove dangling comma from package.json
2019-01-17 15:27:43 -08:00
Steve Klebanoff
25b58108bc remove dangling comma 2019-01-17 15:00:12 -08:00
Steve Klebanoff
fbde36d27b remove dangling comma 2019-01-17 14:56:44 -08:00
Steve Klebanoff
02b7a43909 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-17 13:29:46 -08:00
Fabio Berger
e1e531a2a4 Remove react-snap from dev-tools-pages since it was messing up links on rendering pages 2019-01-17 20:59:39 +01:00
Fabio Berger
f6edf27856 Add hiring pitch to footer 2019-01-17 20:12:33 +01:00
Leonid Logvinov
277e09d061 Merge pull request #1524 from 0xProject/feature/istanbul-geth
Add notes about istanbul and Geth to website docs
2019-01-17 20:00:28 +01:00
Leonid Logvinov
1c9fb5f65f Add notes about istanbul and Geth to website docs 2019-01-17 19:59:35 +01:00
Fabio Berger
c29539aaf2 Add missing .png 2019-01-17 19:43:20 +01:00
Brandon Millman
4143baa27a Merge pull request #1523 from 0xProject/fix/react-shared/react-highlight-dep
[react-shared] Change react-highlight dep to reference fork by branch instead of commit
2019-01-17 10:26:26 -08:00
Leonid Logvinov
5816279d68 Publish
- 0x.js@3.0.3
 - @0x/asset-buyer@4.0.2
 - @0x/contract-wrappers@5.0.1
 - @0x/dev-tools-pages@0.0.14
 - @0x/instant@1.0.8
 - @0x/metacoin@0.0.36
 - @0x/monorepo-scripts@1.0.19
 - @0x/order-watcher@2.4.3
 - @0x/sol-coverage@1.0.3
 - @0x/sol-profiler@1.0.3
 - @0x/sol-trace@1.0.3
 - @0x/sol-tracing-utils@4.0.1
 - @0x/testnet-faucets@1.0.64
 - @0x/website@0.0.67
 - @0x/contracts-examples@1.0.6
 - @0x/contracts-extensions@1.2.3
 - @0x/contracts-interfaces@1.0.6
 - @0x/contracts-libs@1.0.6
 - @0x/contracts-multisig@1.0.6
 - @0x/contracts-protocol@2.2.3
 - @0x/contracts-test-utils@2.0.1
 - @0x/contracts-tokens@1.0.6
 - @0x/contracts-utils@1.0.6
2019-01-17 19:07:37 +01:00
Leonid Logvinov
0d877a8076 Updated CHANGELOGS 2019-01-17 19:07:25 +01:00
Brandon Millman
7b266bc762 Change react-highlight dep to reference fork by branch instead of commit 2019-01-17 10:03:23 -08:00
Fabio Berger
0e6aea856f http to https 2019-01-17 16:58:15 +01:00
Fabio B
e31d17ef79 Merge pull request #1509 from 0xProject/fix/dev-tools-pages/finalTouches
Dev Tools Pages - Final Touches
2019-01-17 16:56:01 +01:00
Fabio Berger
7b2a9ba698 Fix linter errors 2019-01-17 16:38:30 +01:00
Fabio Berger
87d08b0af6 Update yarn.lock 2019-01-17 16:24:11 +01:00
Fabio Berger
e68c5d5517 Enable "copy" button on all code snippets that should be copy-able 2019-01-17 16:24:03 +01:00
Leonid Logvinov
c09825660c Increase the Buffer size when fetching tags 2019-01-17 16:14:19 +01:00
Fabio Berger
293e937291 Merge branch 'development' into fix/dev-tools-pages/finalTouches
* development: (22 commits)
  Fix linter
  Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
  Update packages/sol-tracing-utils/CHANGELOG.json
  Update packages/sol-tracing-utils/CHANGELOG.json
  Add PR numbers
  Fix/simplify handling of revert trace snippets
  Fix a bug when TraceCollectionSubprovider was hanging on the fake Geth snapshot transaction
  Fix a bug when a custom Geth tracer didn't return stack entries for DELEGATECALL
  Revert devnet mining period from 1 to 0
  update team info, add brent
  Publish
  Updated CHANGELOGS
  Add commented-out pre-publish checks
  Add additional check to make sure user was added to our DockerHub org
  Update test for required amountAvailableToFill
  Add actual error message thrown
  Flag order-watcher as having a Docker image to publish
  Add publish to DockerHub step to publish flow
  Flesh out postpublish configs in packageJSON type
  Add pre-publish check to ensure publisher is logged in to docker cmdline
  ...
2019-01-17 15:59:00 +01:00
Fabio Berger
fe2f97dabd Add link to Truffle starter project 2019-01-17 15:58:41 +01:00
Leonid Logvinov
0b23aaca26 Merge pull request #1521 from 0xProject/feature/dev-tools-pre-release-fixes
0x Dev tools pre-release fixes
2019-01-17 15:53:17 +01:00
Leonid Logvinov
d92dc47df8 Last touches 2019-01-17 15:44:34 +01:00
Leonid Logvinov
8b69d918a9 Fix linter 2019-01-17 15:38:09 +01:00
Fabio Berger
3b79754b7a Remove incorrect section of docs 2019-01-17 15:37:43 +01:00
Fabio B
92ec4f5772 Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-17 15:06:42 +01:00
Fabio B
8528660f50 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-17 15:06:35 +01:00
Fabio B
edd4370cdb Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-17 15:06:29 +01:00
Leonid Logvinov
69aa1c2e91 Add PR numbers 2019-01-17 14:40:11 +01:00
Leonid Logvinov
fcdd0de9ee Fix/simplify handling of revert trace snippets 2019-01-17 14:37:15 +01:00
Leonid Logvinov
4c5bde1b54 Fix a bug when TraceCollectionSubprovider was hanging on the fake Geth snapshot transaction 2019-01-17 14:36:23 +01:00
Leonid Logvinov
83f77a2d56 Fix a bug when a custom Geth tracer didn't return stack entries for DELEGATECALL 2019-01-17 14:28:16 +01:00
Leonid Logvinov
cdac2d210e Revert devnet mining period from 1 to 0 2019-01-17 14:23:03 +01:00
Fabio Berger
737941e8c7 Add call-to-action docs button at end of instructions again 2019-01-17 13:29:47 +01:00
Fabio Berger
a873872cc7 Open 0x.org on different tab 2019-01-17 13:03:18 +01:00
Fabio Berger
56b8fd2074 Add fonts 2019-01-17 12:55:14 +01:00
Fabio Berger
b2ea4f6aaf Update requirement sections 2019-01-17 12:53:09 +01:00
hosyvietanh
ca5b024e03 Allow matching of uint80 in evm_data_type 2019-01-17 11:07:50 +07:00
Steve Klebanoff
92f5ad4f15 Use more specific helper method decodeAssetDataOrThrow 2019-01-16 17:12:08 -08:00
Steve Klebanoff
ff8250cd35 change helper method to return a boolean 2019-01-16 15:45:01 -08:00
Steve Klebanoff
466ec6b22a Change LiquidityForAssetData to return a BigNumber instead of a number to avoid losing precision 2019-01-16 14:16:49 -08:00
fragosti
beaf0a4a8a update team info, add brent 2019-01-16 11:33:57 -08:00
Fabio Berger
6871f36dad Update 0x url 2019-01-16 18:44:52 +01:00
Steve Klebanoff
a587718443 export type instead of interface for more succinct syntax 2019-01-16 09:41:12 -08:00
Steve Klebanoff
444250520a Clarify boolean variable name 2019-01-16 09:40:36 -08:00
Steve Klebanoff
bd5850f390 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-16 09:38:38 -08:00
Steve Klebanoff
ce1c2eeab7 Remove accidental import 2019-01-16 09:37:10 -08:00
Fabio B
b08d6c3b4d Merge pull request #1510 from 0xProject/feature/monorepo-scripts/publishToDockerHub
Add DockerHub Publishing Step to Publish Flow
2019-01-16 18:35:55 +01:00
Steve Klebanoff
f269bc28cf Add PR number and fix description 2019-01-15 14:00:00 -08:00
Steve Klebanoff
af63934d2c Export types and add additional documentation 2019-01-15 13:57:31 -08:00
Steve Klebanoff
39816bef8f Merge pull request #1511 from 0xProject/fix/asset-buyer/zero-amount-available-test
Fix expectedAmountAvailableToFill  test
2019-01-15 13:04:55 -08:00
Steve Klebanoff
600b44c962 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-15 10:43:55 -08:00
Steve Klebanoff
7a2b312d64 Merge branch 'development' into fix/asset-buyer/zero-amount-available-test 2019-01-15 10:38:23 -08:00
Leonid Logvinov
7d166dc7da Fix prettier 2019-01-15 17:34:44 +01:00
Leonid Logvinov
0720b8487c Fix a build issue 2019-01-15 17:13:20 +01:00
Leonid Logvinov
4404f92b38 Add CHANGELOG entries 2019-01-15 17:05:51 +01:00
Leonid Logvinov
0a27979464 Convert address strings to lower case before parsing them as BigNumbers 2019-01-15 16:25:26 +01:00
Leonid Logvinov
a3cb722469 Fix a bug when we didn't call isNaN function and assumed it's a property 2019-01-15 16:25:26 +01:00
Leonid Logvinov
2cca2d70d7 Add a throw reason in tests 2019-01-15 16:25:26 +01:00
Leonid Logvinov
17f313658d Add a NAN check when parsing BigNumber candidate 2019-01-15 16:25:26 +01:00
Leonid Logvinov
d304c062eb Convert address strings to lower case before parsing them as BigNumbers 2019-01-15 16:25:26 +01:00
Leonid Logvinov
3eef888e25 Update yarn.lock 2019-01-15 16:25:26 +01:00
Leonid Logvinov
20eab4257a Upgrade chai-bignumber 2019-01-15 16:25:25 +01:00
Leonid Logvinov
665dd0813e Remove unused imports 2019-01-15 16:25:25 +01:00
Leonid Logvinov
e84232cce8 Use new check for isBigNumber 2019-01-15 16:25:25 +01:00
Leonid Logvinov
de78d6a8ad Fix isBigNumber check for the new version 2019-01-15 16:25:25 +01:00
Leonid Logvinov
a085654aba Fix linting error 2019-01-15 16:25:25 +01:00
Leonid Logvinov
61c88455f4 Apply prettier 2019-01-15 16:25:25 +01:00
Leonid Logvinov
a084bbbed8 Rename cmp to comparedTo 2019-01-15 16:25:25 +01:00
Leonid Logvinov
eb393f0a66 Upgrade chai-bignumber 2019-01-15 16:25:25 +01:00
Leonid Logvinov
c3afc13dd6 Upgrade bignumber.js version 2019-01-15 16:25:24 +01:00
Leonid Logvinov
08b865d25b Add CHANGELOG entries 2019-01-15 16:19:28 +01:00
Leonid Logvinov
9932240a4d Merge branch 'development' into feature/new-ganache 2019-01-15 15:33:55 +01:00
Leonid Logvinov
f570f80674 Publish
- 0x.js@3.0.2
 - @0x/abi-gen@1.0.22
 - @0x/abi-gen-templates@1.0.2
 - @0x/abi-gen-wrappers@2.2.0
 - @0x/assert@1.0.23
 - @0x/asset-buyer@4.0.1
 - @0x/base-contract@3.0.13
 - @0x/connect@3.0.13
 - @0x/contract-addresses@2.2.0
 - @0x/contract-artifacts@1.3.0
 - @0x/contract-wrappers@5.0.0
 - @0x/dev-tools-pages@0.0.13
 - @0x/dev-utils@1.0.24
 - ethereum-types@1.1.6
 - @0x/fill-scenarios@1.1.2
 - @0x/instant@1.0.7
 - @0x/json-schemas@2.1.7
 - @0x/metacoin@0.0.35
 - @0x/migrations@2.4.0
 - @0x/monorepo-scripts@1.0.18
 - @0x/order-utils@3.1.2
 - @0x/order-watcher@2.4.2
 - @0x/pipeline@1.0.5
 - @0x/react-docs@1.0.25
 - @0x/react-shared@1.1.2
 - @0x/sol-compiler@2.0.2
 - @0x/sol-coverage@1.0.2
 - @0x/sol-doc@1.0.14
 - @0x/sol-profiler@1.0.2
 - @0x/sol-resolver@1.2.3
 - @0x/sol-trace@1.0.2
 - @0x/sol-tracing-utils@4.0.0
 - @0x/sra-spec@1.0.16
 - @0x/subproviders@2.1.11
 - @0x/testnet-faucets@1.0.63
 - @0x/tslint-config@2.0.2
 - @0x/types@1.5.2
 - @0x/typescript-typings@3.0.8
 - @0x/utils@3.0.1
 - @0x/web3-wrapper@3.2.4
 - @0x/website@0.0.66
 - @0x/contracts-examples@1.0.5
 - @0x/contracts-extensions@1.2.2
 - @0x/contracts-interfaces@1.0.5
 - @0x/contracts-libs@1.0.5
 - @0x/contracts-multisig@1.0.5
 - @0x/contracts-protocol@2.2.2
 - @0x/contracts-test-utils@2.0.0
 - @0x/contracts-tokens@1.0.5
 - @0x/contracts-utils@1.0.5
2019-01-15 15:21:53 +01:00
Leonid Logvinov
dbae6ec165 Updated CHANGELOGS 2019-01-15 15:21:42 +01:00
Fabio Berger
7c37d10d1f Merge branch 'development' into feature/monorepo-scripts/publishToDockerHub
* development: (87 commits)
  Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
  Make mapping namings direct
  Remove unused tslint disable
  Revert "Remove logAsyncErrors hack"
  Remove logAsyncErrors hack
  Refactor logAsyncErrors to follow our conventions
  Export Sources and SourceCodes out of tracing utils
  Replace console.log with logUtils.log (#1515)
  strict decoding of return values using generics
  makerAssetFillAmount -> takerAssetFillAmount
  Ran prettier
  Linter
  Fix build after rebase
  Style cleanup for Compressed Calldata in Contract Wrappers PR
  Use simpler `_.find` to locate fillOrderBai
  Updated dutch auction wrapper
  Added back abi-gen-wrappers
  Renamed signatureParser.ts to signature_parser.ts
  Renamed decode rule `structsAsObjects` to `shouldConvertStructsToObjects`
  circle build failed. New commit to resubmit job.
  ...
2019-01-15 15:13:24 +01:00
Fabio Berger
ae147e615a Merge branch 'development' into fix/dev-tools-pages/finalTouches
* development: (87 commits)
  Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
  Make mapping namings direct
  Remove unused tslint disable
  Revert "Remove logAsyncErrors hack"
  Remove logAsyncErrors hack
  Refactor logAsyncErrors to follow our conventions
  Export Sources and SourceCodes out of tracing utils
  Replace console.log with logUtils.log (#1515)
  strict decoding of return values using generics
  makerAssetFillAmount -> takerAssetFillAmount
  Ran prettier
  Linter
  Fix build after rebase
  Style cleanup for Compressed Calldata in Contract Wrappers PR
  Use simpler `_.find` to locate fillOrderBai
  Updated dutch auction wrapper
  Added back abi-gen-wrappers
  Renamed signatureParser.ts to signature_parser.ts
  Renamed decode rule `structsAsObjects` to `shouldConvertStructsToObjects`
  circle build failed. New commit to resubmit job.
  ...
2019-01-15 15:10:50 +01:00
Leonid Logvinov
18084588ea Merge pull request #1498 from 0xProject/fix/sol-cov
Sol tracing fixes
2019-01-15 14:45:02 +01:00
Fabio B
64d99dc07c Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-15 14:44:52 +01:00
Leonid Logvinov
91b57793c2 Update ganache version 2019-01-15 14:44:43 +01:00
Leonid Logvinov
63a63543be Make mapping namings direct 2019-01-15 13:37:10 +01:00
Leonid Logvinov
75a4bbc5f2 Remove unused tslint disable 2019-01-15 12:09:48 +01:00
Leonid Logvinov
c2ec4174b7 Revert "Remove logAsyncErrors hack"
This reverts commit 7ea274b731.
2019-01-15 12:09:17 +01:00
Leonid Logvinov
7ea274b731 Remove logAsyncErrors hack 2019-01-15 11:55:06 +01:00
Leonid Logvinov
d9675ad6d3 Refactor logAsyncErrors to follow our conventions 2019-01-15 11:48:04 +01:00
Leonid Logvinov
a8e32d8c87 Export Sources and SourceCodes out of tracing utils 2019-01-15 11:34:31 +01:00
Jacob Evans
16a2cf7be6 Merge pull request #1503 from 0xProject/feature/multi-asset-proxy-migration
Add MultiAssetProxy Migration
2019-01-15 13:27:07 +11:00
Jacob Evans
b4621f6a69 Merge pull request #1514 from 0xProject/bug/exchange-wrapper-matchOrders
Remove optimization from matchOrdersAsync in Exchange wrapper
2019-01-15 13:23:45 +11:00
F. Eugene Aumson
c859788fde Replace console.log with logUtils.log (#1515) 2019-01-14 18:21:12 -05:00
Greg Hysen
1c25d8e997 Merge pull request #1475 from 0xProject/feature/monorepo/useNewAbiEncoder
Use Compressed Calldata in Contract Wrappers
2019-01-14 11:48:17 -08:00
Francesco Agosti
fc89b97818 Merge pull request #1516 from 0xProject/fix/website/update-react-highlight
[website] Update react-highlight dep in website to latest commit
2019-01-14 11:33:35 -08:00
MarcZenn
1bff790628 removed implicit cached accounts dependency 2019-01-14 11:03:33 -08:00
Greg Hysen
b0817854e8 strict decoding of return values using generics 2019-01-14 10:49:44 -08:00
Greg Hysen
1907ecc02e makerAssetFillAmount -> takerAssetFillAmount 2019-01-14 10:49:44 -08:00
Greg Hysen
cf2dee60dc Ran prettier 2019-01-14 10:49:44 -08:00
Greg Hysen
80aa2884a3 Linter 2019-01-14 10:49:44 -08:00
Greg Hysen
3a28eb1c6a Fix build after rebase 2019-01-14 10:49:44 -08:00
Greg Hysen
82a44559f6 Style cleanup for Compressed Calldata in Contract Wrappers PR 2019-01-14 10:49:44 -08:00
Greg Hysen
892be49b98 Use simpler _.find to locate fillOrderBai 2019-01-14 10:49:44 -08:00
Greg Hysen
1cbc03ae43 Updated dutch auction wrapper 2019-01-14 10:49:44 -08:00
Greg Hysen
1c9a49cd08 Added back abi-gen-wrappers 2019-01-14 10:49:44 -08:00
Greg Hysen
4f53335db0 Renamed signatureParser.ts to signature_parser.ts 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
6892f929fb circle build failed. New commit to resubmit job. 2019-01-14 10:49:44 -08:00
Greg Hysen
f39c03191c Ran linter 2019-01-14 10:49:44 -08:00
Greg Hysen
05adb38a09 Removed console log from handlebars 2019-01-14 10:49:44 -08:00
Greg Hysen
f73c68ee61 Created an interface for abi decoded fillOrder data 2019-01-14 10:49:44 -08:00
Greg Hysen
33f3405226 let -> const in callAsync 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
6d832deb62 Decodes revert reason as array to appease Geth 2019-01-14 10:49:44 -08:00
Greg Hysen
0b6c9c8468 Ran prettier 2019-01-14 10:49:44 -08:00
Greg Hysen
d1fd4421be Use string argument encoding with new encoder 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
Greg Hysen
f8684d6a77 All contract tests working with new abi encoder 2019-01-14 10:49:44 -08:00
Greg Hysen
e4551c8f60 Works for almost all tests 2019-01-14 10:49:44 -08:00
Greg Hysen
2f1454e90e Working for almost every test 2019-01-14 10:49:29 -08:00
Greg Hysen
b89f986949 Ensure that addresses are lower case 2019-01-14 10:49:29 -08:00
Greg Hysen
285fb3dead Progress 2019-01-14 10:49:29 -08:00
Brandon Millman
923234eed1 Update react-highlight dep in website to latest commit 2019-01-14 10:44:23 -08:00
Fabio Berger
affd617054 Add commented-out pre-publish checks 2019-01-14 16:05:56 +01:00
Fabio Berger
84163517c6 Add additional check to make sure user was added to our DockerHub org 2019-01-14 15:24:00 +01:00
Leonid Logvinov
83b46cbf71 Rename mappins to have a direct naming scheme instead of a reverse one 2019-01-14 14:52:00 +01:00
Leonid Logvinov
4689309857 Add SourceCodes and Sources types 2019-01-14 14:43:14 +01:00
Leonid Logvinov
02543fdd0c Add a link to tracing examples 2019-01-14 14:43:14 +01:00
Fabio B
1f7179b178 Update packages/sol-tracing-utils/src/source_maps.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-14 14:29:01 +01:00
Fabio B
e14f1646d6 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-14 13:54:50 +01:00
Fabio B
caba2faa92 Update packages/sol-tracing-utils/src/trace_info_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-14 13:52:26 +01:00
Fabio B
ed3b89f005 Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-14 13:51:10 +01:00
Fabio B
1c279f97ce Update packages/sol-tracing-utils/src/source_maps.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-14 13:51:01 +01:00
Fabio B
b41bcd80ef Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-14 13:50:53 +01:00
Fabio B
45d70dd30b Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-14 13:50:45 +01:00
Leonid Logvinov
4b9648c7c9 Apply prettier 2019-01-14 13:13:45 +01:00
Leonid Logvinov
092a851bb3 Use custom JS tracer only if the node is geth 2019-01-14 12:53:14 +01:00
Leonid Logvinov
bd71f4a480 Add CHANGELOG entries 2019-01-14 12:46:37 +01:00
Leonid Logvinov
bf183af9a4 Merge development 2019-01-14 12:17:12 +01:00
Leonid Logvinov
2b8f0d887a Fix linter 2019-01-14 12:16:00 +01:00
Leonid Logvinov
2581bc93e5 Fix the bug with incorrect source maps parsing by changing contract data from an array to a mapping 2019-01-14 12:04:08 +01:00
Leonid Logvinov
8b62783f48 Add utils.isRangeEqual to sol-profiler 2019-01-14 11:50:05 +01:00
Leonid Logvinov
2345a3bdfe Add assembly statements to AST Visitor 2019-01-14 11:40:05 +01:00
Leonid Logvinov
ab5cd8f938 Use a custom JS tracer 2019-01-14 11:39:38 +01:00
Jacob Evans
b108b1119a Update prettier changelogs 2019-01-14 10:10:39 +11:00
Jacob Evans
b5420fde52 Update contract addresses 2019-01-14 10:09:12 +11:00
Jacob Evans
dc58c60841 Update hardcoded token addresses 2019-01-12 18:50:05 +11:00
Jacob Evans
043fb3f460 Group similar setup transactions 2019-01-12 18:50:05 +11:00
Jacob Evans
34cce04c43 Register ERC20/721 into MAP 2019-01-12 18:50:04 +11:00
Jacob Evans
6aae0c5b78 chore(python-packages): add MAP to python-packages 2019-01-12 18:50:04 +11:00
Jacob Evans
c15406173a chore(changelogs): Update changelogs with PR 2019-01-12 18:50:04 +11:00
Jacob Evans
e3b3f82c8c feature(migrations): Add MultiAssetProxy Migration 2019-01-12 18:49:16 +11:00
Jacob Evans
007a2d7deb Remove matchOrders optimization 2019-01-12 12:07:37 +11:00
Jacob Evans
5da40ab45e Prettier 2019-01-12 11:07:48 +11:00
Jacob Evans
54a1fd87db Update PR number 2019-01-12 10:27:48 +11:00
Francesco Agosti
797d7c7878 Merge pull request #1513 from 0xProject/fix/website/multiple-react-dom-versions-et-al
[website] Fix multiple react dom versions and layout issue
2019-01-11 15:23:51 -08:00
Jacob Evans
507c47c42c bug(exchange-wrapper): matchOrdersAsync input param mutation 2019-01-12 10:22:13 +11:00
fragosti
7fcdfe5de5 Revert "hack: force redux and redux-devtools to work for build"
This reverts commit 500d8fc86b.
2019-01-11 12:53:32 -08:00
fragosti
22b1c48c89 upgrade react in react-docs and react-shared, install dependencies in website that are mysteriously missing 2019-01-11 12:49:38 -08:00
fragosti
2197a531e3 Revert "fix: make version consisten for react, react-dom and styled-components'"
This reverts commit 89c5d657a7.
2019-01-11 12:22:13 -08:00
fragosti
4799b68972 feat: upgrade styled-components and remove ununsed basscss import 2019-01-11 12:00:02 -08:00
fragosti
500d8fc86b hack: force redux and redux-devtools to work for build 2019-01-11 11:57:26 -08:00
fragosti
89c5d657a7 fix: make version consisten for react, react-dom and styled-components' 2019-01-11 11:56:48 -08:00
fragosti
bc44774116 fix: use basscss from css file instead of module 2019-01-11 11:50:35 -08:00
Steve Klebanoff
8a8a5332d7 prettier changelog 2019-01-11 10:38:52 -08:00
Xianny
943c378309 Implement tslint enum-naming to enforce PascalCase on enum members (#1474) 2019-01-11 10:04:30 -08:00
Steve Klebanoff
8d3bbb8213 Disable promise-function-async for mocking async functions 2019-01-11 09:32:28 -08:00
Steve Klebanoff
a5e7ce9e1a Move calculateLiquidity to helper function 2019-01-11 09:28:51 -08:00
Steve Klebanoff
64a78149aa Update test for required amountAvailableToFill 2019-01-11 09:20:59 -08:00
Fabio Berger
cf3787edbb Publish
- 0x.js@3.0.1
 - @0x/abi-gen@1.0.21
 - @0x/abi-gen-wrappers@2.1.1
 - @0x/assert@1.0.22
 - @0x/asset-buyer@4.0.0
 - @0x/base-contract@3.0.12
 - @0x/connect@3.0.12
 - @0x/contract-wrappers@4.2.1
 - @0x/dev-tools-pages@0.0.12
 - @0x/dev-utils@1.0.23
 - ethereum-types@1.1.5
 - @0x/fill-scenarios@1.1.1
 - @0x/instant@1.0.6
 - @0x/json-schemas@2.1.6
 - @0x/metacoin@0.0.34
 - @0x/migrations@2.3.1
 - @0x/monorepo-scripts@1.0.17
 - @0x/order-utils@3.1.1
 - @0x/order-watcher@2.4.1
 - @0x/pipeline@1.0.4
 - @0x/react-docs@1.0.24
 - @0x/react-shared@1.1.1
 - @0x/sol-compiler@2.0.1
 - @0x/sol-coverage@1.0.1
 - @0x/sol-doc@1.0.13
 - @0x/sol-profiler@1.0.1
 - @0x/sol-resolver@1.2.2
 - @0x/sol-trace@1.0.1
 - @0x/sol-tracing-utils@3.0.0
 - @0x/sra-spec@1.0.15
 - @0x/subproviders@2.1.10
 - @0x/testnet-faucets@1.0.62
 - @0x/tslint-config@2.0.1
 - @0x/types@1.5.1
 - @0x/typescript-typings@3.0.7
 - @0x/utils@3.0.0
 - @0x/web3-wrapper@3.2.3
 - @0x/website@0.0.65
 - @0x/contracts-examples@1.0.4
 - @0x/contracts-extensions@1.2.1
 - @0x/contracts-interfaces@1.0.4
 - @0x/contracts-libs@1.0.4
 - @0x/contracts-multisig@1.0.4
 - @0x/contracts-protocol@2.2.1
 - @0x/contracts-test-utils@1.0.4
 - @0x/contracts-tokens@1.0.4
 - @0x/contracts-utils@1.0.4
2019-01-11 18:04:43 +01:00
Fabio Berger
89429c54a7 Updated CHANGELOGS 2019-01-11 18:04:33 +01:00
Steve Klebanoff
dbaed69d77 Add new version to CHANGELOG 2019-01-11 08:59:07 -08:00
Steve Klebanoff
faee751395 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-11 08:53:15 -08:00
Steve Klebanoff
742e5e039d getLiquidityForAssetDataAsync helper method, and fix to assetBuyer to check for eth token in asset pairs 2019-01-11 08:14:57 -08:00
Fabio Berger
98579300c1 merge development 2019-01-11 17:14:12 +01:00
Fabio Berger
96ff5eef64 merge development 2019-01-11 17:12:55 +01:00
Fabio Berger
7f5a2c972b Add actual error message thrown 2019-01-11 16:55:37 +01:00
Fabio Berger
dad6404c7f Flag order-watcher as having a Docker image to publish 2019-01-11 16:52:28 +01:00
Fabio Berger
6dcf40f570 Add publish to DockerHub step to publish flow 2019-01-11 16:52:15 +01:00
Fabio Berger
43b0422804 Flesh out postpublish configs in packageJSON type 2019-01-11 16:51:54 +01:00
Fabio Berger
55ce0d9d17 Add pre-publish check to ensure publisher is logged in to docker cmdline 2019-01-11 16:50:41 +01:00
Fabio Berger
895460aea3 Update yarn.lock 2019-01-11 14:29:09 +01:00
Fabio Berger
7956127b29 Ensure the process exits 2019-01-11 14:29:02 +01:00
Fabio Berger
6fb2721294 Fix copy and links 2019-01-11 14:20:56 +01:00
Fabio Berger
ebb10e6604 Remove unused import 2019-01-11 14:15:24 +01:00
Fabio Berger
db878f4a7b Fix title and og tags for sol-coverage 2019-01-11 14:15:15 +01:00
Leonid Logvinov
bb992458a3 Revert CHANGELOG changes 2019-01-11 11:29:39 +01:00
Leonid Logvinov
66add14ca5 Remove generated wrappers 2019-01-11 11:28:44 +01:00
Leonid Logvinov
0b38513c3f Remove generated artifacts 2019-01-11 11:28:08 +01:00
Remco Bloemen
d9ac5b611a Generate blocks at interval for truffle 2019-01-11 11:26:38 +01:00
Remco Bloemen
e1b99b5e2f Use tracer for debug traces 2019-01-11 11:26:38 +01:00
Remco Bloemen
7af0818dff Capture errors in next callbacks 2019-01-11 11:26:38 +01:00
Remco Bloemen
296b3d6311 Throw error when source location is missing 2019-01-11 11:26:38 +01:00
Remco Bloemen
4d03c3035c Fix typo 2019-01-11 11:26:38 +01:00
Remco Bloemen
27c4d2522b Add tracer params type 2019-01-11 11:26:37 +01:00
Fabio Berger
4dbd3ea902 Re-add changelog for 0x.js 2019-01-11 11:26:37 +01:00
Fabio B
2cf57a48dd Merge pull request #1500 from 0xProject/update-prettier-version
Update prettier to version ^1.15.3
2019-01-11 11:18:18 +01:00
Alex Browne
a091b2c19d Rebase and re-apply prettier 2019-01-10 17:44:35 -08:00
Alex Browne
89e398fa39 Update prettier to version ^1.15.3 2019-01-10 17:41:13 -08:00
Steve Klebanoff
1192314510 Add helper functions and expose to umd object 2019-01-10 16:13:16 -08:00
Fabio Berger
583e690b7a Merge branch 'development' into fix/dev-tools-pages/finalTouches
* development: (49 commits)
  upgrade to ddex api v3 (#1507)
  Add new deployment related instructions to pipeline README (#1499)
  feature: implement logging and friendly wallet name for Opera
  Fix prettier
  Add missing dependencies
  Remove second yarn call
  Add .gitkeep
  Rename sol-trace-based-tools-common to sol-tracing-utils
  Update packages/sol-trace/README.md
  Update packages/sol-trace/CHANGELOG.json
  Update packages/sol-trace-based-tools-common/src/source_maps.ts
  Update packages/sol-trace-based-tools-common/CHANGELOG.json
  Update packages/sol-profiler/CHANGELOG.json
  Update packages/sol-coverage/CHANGELOG.json
  Update packages/monorepo-scripts/src/test_installation.ts
  chore: changelog update
  fix: account for undefined errors in promisify, not only null
  Clean up docs before publish
  In README's, don't mention non-existent tests (#1497)
  fix: use getBackendBaseUrl instead of hardcoded string
  ...
2019-01-11 00:47:57 +01:00
Fabio Berger
a516b00a03 Fix footer links 2019-01-11 00:45:26 +01:00
Steve Klebanoff
841ad8757c Add LiquidityRequestOpts type 2019-01-10 15:40:55 -08:00
Steve Klebanoff
127bd4bf9d Getting rid of unused params and adding documentation 2019-01-10 15:38:41 -08:00
Justin Barry
a8c3b4126e Output Chrome 41 compatible version of 0x instant
This is important for SEO as Googlebot is still using Chrome 41 to crawl
thick clients.
2019-01-10 14:25:50 -08:00
Steve Klebanoff
2360b8282f rename tokensAvailableInUnitAmount to tokensAvailableInBaseUnits and use test helpers 2019-01-10 14:00:16 -08:00
Steve Klebanoff
0dade8624c Adding more test coverage 2019-01-10 13:51:02 -08:00
Steve Klebanoff
a9fad77eb4 Implement liquidity checking w/ testing 2019-01-10 13:41:28 -08:00
Xianny
a5b7a35160 upgrade to ddex api v3 (#1507) 2019-01-10 13:07:52 -08:00
Alex Browne
53fc860d61 Add new deployment related instructions to pipeline README (#1499)
* Add new deployment related instructions to pipeline README

* Apply prettier

* Respond to PR feedback
2019-01-10 13:04:34 -08:00
Fabio Berger
dc20429bca Add deployment commands for the Dev tools pages 2019-01-10 20:14:51 +01:00
Francesco Agosti
749312c0e8 Merge pull request #1506 from 0xProject/feature/instant/opera-followups
[instant] Implement logging and friendly wallet name for Opera
2019-01-10 10:48:06 -08:00
fragosti
ffd14ab2f2 feature: implement logging and friendly wallet name for Opera 2019-01-10 09:47:46 -08:00
Francesco Agosti
bf332d578c Merge pull request #1501 from 0xProject/fix/utils/promisify-not-accounting-for-undefined-error
[utils] account for undefined errors in promisify, not only null (and fix instant in Opera)
2019-01-10 09:33:22 -08:00
Leonid Logvinov
6c22594882 Merge pull request #1492 from 0xProject/feature/sol-cov-sol-profiler-sol-trace-divorce
Refactor out sol-cov, sol-profiler and sol-trace into their separate packages
2019-01-10 14:35:13 +01:00
Leonid Logvinov
b8e3829fdb Fix prettier 2019-01-10 14:05:29 +01:00
Leonid Logvinov
c317a69e7e Add missing dependencies 2019-01-10 13:33:56 +01:00
Leonid Logvinov
4c60d59123 Remove second yarn call 2019-01-10 11:57:18 +01:00
Leonid Logvinov
cee2954245 Merge development 2019-01-10 11:56:15 +01:00
Leonid Logvinov
a8d9263062 Add .gitkeep 2019-01-10 11:42:50 +01:00
Leonid Logvinov
7ae9e79235 Rename sol-trace-based-tools-common to sol-tracing-utils 2019-01-10 11:21:05 +01:00
Fabio B
15c9479ebe Update packages/sol-trace/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-10 11:15:34 +01:00
Fabio B
03dea585b4 Update packages/sol-trace/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-10 11:15:26 +01:00
Fabio B
d7df402c42 Update packages/sol-trace-based-tools-common/src/source_maps.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-10 11:15:19 +01:00
Fabio B
052ed21e9c Update packages/sol-trace-based-tools-common/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-10 11:12:08 +01:00
Fabio B
36504646f9 Update packages/sol-profiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-10 11:11:52 +01:00
Fabio B
60cdbbccae Update packages/sol-coverage/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-10 11:11:43 +01:00
Fabio B
420333e3c3 Update packages/monorepo-scripts/src/test_installation.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-10 11:11:23 +01:00
fragosti
b639843115 chore: changelog update 2019-01-09 18:31:23 -08:00
fragosti
7a114a6ef1 fix: account for undefined errors in promisify, not only null 2019-01-09 18:26:18 -08:00
Steve Klebanoff
686f27a96f Merge pull request #1482 from 0xProject/feature/monorepo/release-notes
[monorepo-scripts] Automatically alert new release to Discord
2019-01-09 16:49:12 -08:00
Steve Klebanoff
6487fae113 Merge pull request #1437 from 0xProject/feature/instant/tell-amount-available
[instant] Tell user how much of an asset is available
2019-01-09 16:29:11 -08:00
Francesco Agosti
87c287a5e2 Merge pull request #1489 from 0xProject/fix/website/0x-org-endpoints
[website] Audit and fix 0x.org migration URLs
2019-01-09 12:03:28 -08:00
F. Eugene Aumson
e39ef60775 Clean up docs before publish 2019-01-09 12:12:20 -05:00
Steve Klebanoff
fb3605026e Merge branch 'development' into feature/instant/tell-amount-available 2019-01-09 08:54:55 -08:00
Fabio Berger
241be6de30 Rename sol-cov to sol-coverage, fix links 2019-01-09 17:30:34 +01:00
Fabio Berger
589b535b91 Add docLink 2019-01-09 17:30:01 +01:00
Fabio Berger
eb6b07e804 Update yarn.lock 2019-01-09 17:29:13 +01:00
F. Eugene Aumson
5b8c9122a2 In README's, don't mention non-existent tests (#1497) 2019-01-09 11:02:58 -05:00
Fabio B
08d0ff48c3 Merge pull request #1249 from bakkenbaeck/dev-tools-pages
Dev tools pages
2019-01-09 16:22:59 +01:00
F. Eugene Aumson
aa5af04447 Python contract demo, with lots of refactoring (#1485)
* Refine Order for Web3 compat. & add conversions

Changed some of the fields in the Order class so that it can be passed
to our contracts via Web3.

Added conversion utilities so that an Order can be easily converted to
and from a JSON-compatible dict (specifically by encoding/decoding the
`bytes` fields), to facilitate validation against the JSON schema.

Also modified JSON order schema to accept integers in addition to
stringified integers.

* Fixes for json_schemas

Has-types indicator file, py.typed, was not being included in package.

Schemas were not being properly gathered into package installation.

* Add test/demo of Exchange.getOrderInfo()

* web3 bug workaround

* Fix problem packaging contract artifacts

* Move contract addresses to their own package

* Move contract artifacts to their own package

* Add scripts to install, test & lint all components

* prettierignore files in local python dev env

* Correct missing coverage analysis for sra_client

* CI cache lint: don't save, re-use from test-python

* tag hacks as hacks

* correct merge mistake

* remove local strip_0x() in favor of eth_utils

* remove json schemas from old order_utils location

* correct merge mistake

* doctest json schemas via command-line, not code
2019-01-09 09:58:29 -05:00
Leonid Logvinov
39786c3ad5 Merge development 2019-01-09 15:19:59 +01:00
Fabio Berger
5b7eff217e Publish
- 0x.js@3.0.0
 - @0x/abi-gen@1.0.20
 - @0x/abi-gen-wrappers@2.1.0
 - @0x/assert@1.0.21
 - @0x/asset-buyer@3.0.5
 - @0x/base-contract@3.0.11
 - @0x/connect@3.0.11
 - @0x/contract-addresses@2.1.0
 - @0x/contract-artifacts@1.2.0
 - @0x/contract-wrappers@4.2.0
 - @0x/dev-tools-pages@0.0.11
 - @0x/dev-utils@1.0.22
 - @0x/fill-scenarios@1.1.0
 - @0x/instant@1.0.5
 - @0x/json-schemas@2.1.5
 - @0x/metacoin@0.0.33
 - @0x/migrations@2.3.0
 - @0x/monorepo-scripts@1.0.16
 - @0x/order-utils@3.1.0
 - @0x/order-watcher@2.4.0
 - @0x/pipeline@1.0.3
 - @0x/react-docs@1.0.23
 - @0x/react-shared@1.1.0
 - @0x/sol-compiler@2.0.0
 - @0x/sol-cov@2.1.17
 - @0x/sol-doc@1.0.12
 - @0x/sol-resolver@1.2.1
 - @0x/sra-spec@1.0.14
 - @0x/subproviders@2.1.9
 - @0x/testnet-faucets@1.0.61
 - @0x/types@1.5.0
 - @0x/utils@2.1.1
 - @0x/web3-wrapper@3.2.2
 - @0x/website@0.0.64
 - @0x/contracts-examples@1.0.3
 - @0x/contracts-extensions@1.2.0
 - @0x/contracts-interfaces@1.0.3
 - @0x/contracts-libs@1.0.3
 - @0x/contracts-multisig@1.0.3
 - @0x/contracts-protocol@2.2.0
 - @0x/contracts-test-utils@1.0.3
 - @0x/contracts-tokens@1.0.3
 - @0x/contracts-utils@1.0.3
2019-01-09 14:44:17 +01:00
Fabio Berger
0a6ead90d9 Updated CHANGELOGS 2019-01-09 14:44:03 +01:00
Leonid Logvinov
7f2727236d Pin @types/styled-components versions 2019-01-09 14:39:19 +01:00
Leonid Logvinov
d6644ed035 Add yarn.lock changes 2019-01-09 13:45:34 +01:00
Leonid Logvinov
a2eede2ec9 Remove accidentally commited files 2019-01-09 13:45:23 +01:00
Leonid Logvinov
2fa4ed1fb7 Merge pull request #1496 from 0xProject/feature/solc-5.0
Solc 5.0 support in sol-compiler
2019-01-09 13:22:20 +01:00
Leonid Logvinov
3733a29ee2 Add CHENGELOG entrie 2019-01-09 12:46:51 +01:00
Leonid Logvinov
62b5eef4a0 Update sol-compiler binPaths to include the newest solidity 2019-01-09 12:36:05 +01:00
Leonid Logvinov
377d6367e0 Update solc used by sol-compiler 2019-01-09 12:35:35 +01:00
Leonid Logvinov
a3b364dbdf Remove contracts dependency on solc 2019-01-09 12:34:45 +01:00
Leonid Logvinov
ea14913b41 Merge development 2019-01-09 12:02:25 +01:00
Fabio B
5dd55491b8 Merge pull request #1494 from 0xProject/feature/order-watcher/dockerize
Dockerize OrderWatcher WS Server
2019-01-09 11:27:22 +01:00
Fabio Berger
28aa12691e rename method 2019-01-09 11:06:15 +01:00
Leonid Logvinov
5868c91cfb Fix static tests 2019-01-09 10:54:32 +01:00
Leonid Logvinov
fd034cc1e4 Remove redundant semicolons 2019-01-09 10:21:58 +01:00
Jacob Evans
c1bf2754a8 Merge pull request #1439 from 0xProject/migrations/docker-image
Add Docker image and Snapshot commands for migrations
2019-01-09 12:55:42 +11:00
Chris Kalani
c388e6d2b8 Update README.md 2019-01-08 17:15:20 -08:00
Chris Kalani
622fa951ca Update README.md
Fixing logo
2019-01-08 17:13:04 -08:00
fragosti
d00dd07435 fix: use getBackendBaseUrl instead of hardcoded string 2019-01-08 16:45:35 -08:00
Xianny
27fc640a9e fetch and save copper (#1472)
Fetch and save Copper CRM
2019-01-08 13:50:51 -08:00
F. Eugene Aumson
4689f20b86 Move json_schemas to its own package (#1435)
* Move zero_ex.json_schemas to its own package

* Support ALL the schemas

* Stop installing packages as editable

* HACK: cp files because CircleCI isn't

* Add example usage to sra_client README

* Tweak special case: only strip Schema as suffix

* Correct doc titles

* Clarify what kind of support ticket was raised.

* Correct inconsistencies in JSON schema names

In both ref ID's and file names.

* Add entry point for validation of JSON strings
2019-01-08 14:28:32 -05:00
Fabio Berger
de927d7207 Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Remove beta note from asset-buyer
2019-01-08 20:16:48 +01:00
Fabio Berger
93121892d6 Fix typo 2019-01-08 20:16:34 +01:00
fragosti
16fc2c3776 fix: use new forum URL 2019-01-08 10:34:40 -08:00
Francesco Agosti
c3a7cbc57d Merge pull request #1493 from 0xProject/fix/asset-buyer/no-longer-beta
[asset-buyer] Remove beta note from asset-buyer
2019-01-08 18:33:53 +00:00
Fabio Berger
0cfeea7c8c Remove stray console 2019-01-08 17:15:05 +01:00
Leonid Logvinov
82f29c395a Fix the circleci image 2019-01-08 17:14:06 +01:00
Fabio Berger
e2df4b355b Add assertions to catch trying to add undefined schemas 2019-01-08 17:07:10 +01:00
Leonid Logvinov
03248244ff Bump up the chunk size 2019-01-08 17:03:42 +01:00
Steve Klebanoff
74ed0f4134 Remove beta note from asset-buyer 2019-01-08 08:02:33 -08:00
Leonid Logvinov
f05d2906e8 Split installation tests in chunks of 10 to not run out of memory 2019-01-08 16:00:05 +01:00
Fabio Berger
5e39eae84e Fixx request payload and expected responses 2019-01-08 15:37:50 +01:00
Fabio Berger
0ea8669552 Fixx OrderWatcher WS tests so they are completely independent from one another 2019-01-08 15:37:14 +01:00
Leonid Logvinov
2c974b5f3f Refactor out sol-cov, sol-profiler and sol-trace into their separate packages 2019-01-08 14:48:06 +01:00
Fabio Berger
1631031fa7 Merge branch 'development' into feature/order-watcher/dockerize
* development: (898 commits)
  Fixed merge conflict from development
  Ran prettier
  Doc generation working for changes by dutch auction wrapper
  added changelog entry for monorepo-scripts
  Hide dutch auction wrapper from docs -- hopefully this will prevent the "must export Web3Wrapper" error from doc generation
  relaxed version on contract-extension dependencies
  Added NetworkID 50 address for dutch auction wrapper
  removed manual updte of package.json version
  export dutch auction wrapper types from 0x.js
  Export dutch auction wrapper in 0x.js
  ran prettier
  Minor documentation updates to dutch auction wrapper
  `afterAuctionDetails` -> `auctionDetails`
  Added @todo for including dutch auction addresses once deployed
  Ran prettier & linter
  Removed redundant assignment
  removed needless newline on contract-wrappers changelog
  removed timestamp from changelog for abi-gen-wrappers
  added dutch auction address for testnets
  removed .only
  ...
2019-01-08 14:30:38 +01:00
Fabio Berger
0bcb81d3a9 Create server entry point and Dockerfile for OrderWatcher 2019-01-08 14:29:45 +01:00
fragosti
f412c36e23 fix: use old forum URL for now 2019-01-07 17:36:14 -08:00
fragosti
eae255b0ff chore: point to 0x.org website-api 2019-01-07 17:19:36 -08:00
fragosti
1f0f2076a9 fix: CORS issue by accessing 0x geth nodes through 0x.org endpoint 2019-01-07 17:09:36 -08:00
Greg Hysen
0ac36cef28 Merge pull request #1465 from 0xProject/feature/contracts/dutchAuctionWrapper
Dutch Auction Wrapper
2019-01-07 17:16:06 -07:00
Greg Hysen
04db7f0fae Fixed merge conflict from development 2019-01-07 15:50:48 -08:00
Greg Hysen
e39ae0350b Ran prettier 2019-01-07 15:50:48 -08:00
Greg Hysen
d0a0673694 Doc generation working for changes by dutch auction wrapper 2019-01-07 15:50:48 -08:00
Greg Hysen
3c62815fe3 added changelog entry for monorepo-scripts 2019-01-07 15:50:48 -08:00
Greg Hysen
37b6858869 Hide dutch auction wrapper from docs -- hopefully this will prevent the "must export Web3Wrapper" error from doc generation 2019-01-07 15:50:48 -08:00
Greg Hysen
641685a41e relaxed version on contract-extension dependencies 2019-01-07 15:50:48 -08:00
Greg Hysen
7ad23ef6dc Added NetworkID 50 address for dutch auction wrapper 2019-01-07 15:50:48 -08:00
Greg Hysen
5f2a7cb78f removed manual updte of package.json version 2019-01-07 15:50:48 -08:00
Greg Hysen
edb989fbf3 export dutch auction wrapper types from 0x.js 2019-01-07 15:50:48 -08:00
Greg Hysen
ff0093460d Export dutch auction wrapper in 0x.js 2019-01-07 15:50:48 -08:00
Greg Hysen
a00e416a19 ran prettier 2019-01-07 15:50:48 -08:00
Greg Hysen
77a2ca1ddc Minor documentation updates to dutch auction wrapper 2019-01-07 15:50:48 -08:00
Greg Hysen
61a3368826 afterAuctionDetails -> auctionDetails 2019-01-07 15:50:48 -08:00
Greg Hysen
55e3774480 Added @todo for including dutch auction addresses once deployed 2019-01-07 15:50:48 -08:00
Greg Hysen
c6ab380685 Ran prettier & linter 2019-01-07 15:50:48 -08:00
Greg Hysen
d6467d707f Removed redundant assignment 2019-01-07 15:50:48 -08:00
Greg Hysen
0893614859 removed needless newline on contract-wrappers changelog 2019-01-07 15:50:48 -08:00
Greg Hysen
dc940d692f removed timestamp from changelog for abi-gen-wrappers 2019-01-07 15:50:48 -08:00
Greg Hysen
e83a108c52 added dutch auction address for testnets 2019-01-07 15:50:48 -08:00
Greg Hysen
bbd4828340 removed .only 2019-01-07 15:50:48 -08:00
Greg Hysen
6de3a33f36 updated relevant changelogs 2019-01-07 15:50:48 -08:00
Greg Hysen
06139cbfe5 Added dutch auction utils to contract-wrappers 2019-01-07 15:50:48 -08:00
Greg Hysen
cb1bfa0f97 ran prettier + added changelog entry for contract wrappers 2019-01-07 15:50:48 -08:00
Greg Hysen
b249a50d8f ran prettier 2019-01-07 15:50:48 -08:00
Greg Hysen
0432212a34 dutch wrapper tests working 2019-01-07 15:50:48 -08:00
Greg Hysen
7203ca90cf all dutchie wrapper tests passing 2019-01-07 15:50:48 -08:00
Greg Hysen
5da748a062 Progress on dutch auction wrapper. Need to add auction data decoding to it. 2019-01-07 15:50:48 -08:00
Greg Hysen
09afee55ed Removed unnecessary fields from dutch auction artifacts 2019-01-07 15:50:48 -08:00
Greg Hysen
43b648e7dc Dutch wrapper 2019-01-07 15:50:48 -08:00
Greg Hysen
89fcbec43b changed name for confusion 2019-01-07 15:50:48 -08:00
Greg Hysen
c850046ea0 Dutch Auction Contract Wrapper 2019-01-07 15:50:48 -08:00
Alex Browne
7dda953bc9 Optimize SQL queries in pull_missing_blocks (#1458)
* Optimize SQL queries in pull_missing_blocks

* Update comment in pull_missing_blocks
2019-01-07 15:04:00 -08:00
Brandon Millman
b8f3fa9c8c chore(website): update copy on market making page 2019-01-07 13:21:42 -08:00
Brandon Millman
42e04012df fix(website): fix some copy on the market maker page 2019-01-07 13:03:45 -08:00
Brandon Millman
17f0878707 Merge pull request #1487 from 0xProject/feature/website/market-maker-page
[website] Add market making grant program page
2019-01-07 12:41:10 -08:00
Brandon Millman
e4bb6a4652 chore(website): fix linter 2019-01-07 12:19:21 -08:00
Amir Bandeali
3cdb85606a Merge pull request #1363 from 0xProject/feat/order-utils/abiEncoder
Add MAP support to order-utils, order-watcher, and types
2019-01-07 11:30:00 -08:00
Amir Bandeali
fd37e88bdb Use enums in pipeline 2019-01-07 11:11:19 -08:00
Amir Bandeali
24564b986d Minimize unnecessary type assertions 2019-01-07 10:31:11 -08:00
Amir Bandeali
a91bc415ed Fix linting errors 2019-01-07 10:31:11 -08:00
Amir Bandeali
ccdb81ac40 Add tests for MAP in order watcher 2019-01-07 10:31:11 -08:00
Amir Bandeali
d7f9e3f0a0 Do not export AssetData in 0x.js 2019-01-07 10:31:11 -08:00
Amir Bandeali
5720589515 Add tests for recursive MAP decoding 2019-01-07 10:31:11 -08:00
Amir Bandeali
70508f52a1 Update CHANGELOGs 2019-01-07 10:31:11 -08:00
Amir Bandeali
b90c3196a3 FIx linting errors 2019-01-07 10:31:11 -08:00
Amir Bandeali
1dda10b4f3 Add recursive MultiAsset decoding, store first address in pipeline 2019-01-07 10:31:11 -08:00
Amir Bandeali
0fba0b1a1b feat: Add balance and allowance checks for MultiAssetProxy 2019-01-07 10:31:11 -08:00
Amir Bandeali
df4f3d9eac feat: Add fields to OrderRelevantState and change AssetData to SingleAssetData 2019-01-07 10:31:11 -08:00
Amir Bandeali
de4916ccb8 Add individual balances and allowances to OrderRelevantState 2019-01-07 10:31:11 -08:00
Amir Bandeali
b797a45d4a Do not attempt to parse tokenAddress if decoding data from multiAssetProxy 2019-01-07 10:31:11 -08:00
Amir Bandeali
eeb07d76fc Fix transferFrom to work with MAP 2019-01-07 10:31:11 -08:00
Amir Bandeali
0abace337c Rename functions 2019-01-07 10:31:11 -08:00
Amir Bandeali
c6ff77bdd8 Add prefix to names of properties in EncodingRules and DecodingRules 2019-01-07 10:31:11 -08:00
Amir Bandeali
492e0ae345 feat: Export MultiAssetData in types 2019-01-07 10:31:11 -08:00
Amir Bandeali
8549252a2c Fix decoding and add tests 2019-01-07 10:31:11 -08:00
Amir Bandeali
aae32037da Run linter 2019-01-07 10:31:11 -08:00
Amir Bandeali
46359c098b Add support for MAP in fill-scenarios 2019-01-07 10:31:11 -08:00
Amir Bandeali
fc71d87d2b Update CHANGELOG 2019-01-07 10:31:11 -08:00
Amir Bandeali
67dfe6030c feat: Add support for MultiAssetProxy 2019-01-07 10:31:11 -08:00
Amir Bandeali
19e93440b3 fix: Add error message if assetProxyId is not ERC20 or ERC721 2019-01-07 10:31:11 -08:00
Amir Bandeali
0cb5209266 Add length check to MultiAsset encoding 2019-01-07 10:31:11 -08:00
Amir Bandeali
1553b366da Update CHANGELOGs 2019-01-07 10:31:11 -08:00
Amir Bandeali
d957cd5344 Use assetDataUtils instead of IAssetData for encoding MultiAsset values 2019-01-07 10:31:11 -08:00
Amir Bandeali
354f7053dc Use new AbiEncoder, add logic for encoding/decoding MultiAsset assetData 2019-01-07 10:31:11 -08:00
Amir Bandeali
4d5fcf8985 feat: Add MultiAsset types 2019-01-07 10:31:11 -08:00
Steve Klebanoff
80f1fe1373 Merge branch 'feature/monorepo/release-notes' of github.com:0xProject/0x-monorepo into feature/monorepo/release-notes 2019-01-07 09:45:21 -08:00
Steve Klebanoff
571bc736e5 Make error message less scary 2019-01-07 09:45:04 -08:00
Fabio B
99016cc5a6 Use explicit undefined check
Co-Authored-By: steveklebanoff <steve@0xproject.com>
2019-01-07 09:43:35 -08:00
Steve Klebanoff
71c9b2f718 Merge pull request #1484 from 0xProject/fix/sra-spec/title-tag
[sra-spec] Add title tag
2019-01-07 09:40:39 -08:00
Brandon Millman
79863d830e chore(website): update market making page copy 2019-01-06 21:40:39 -08:00
Brandon Millman
59ec243c26 feat(website): add contact us hero action to market maker page 2019-01-06 21:40:14 -08:00
Brandon Millman
5e8da70eae feat(website): implement market maker form 2019-01-06 20:45:46 -08:00
Brandon Millman
99b6ca5b4f feat(website): Add support for copper forms in the offers 2019-01-04 10:00:41 -08:00
Brandon Millman
4e4de07e69 feat(website): add link underneath the first feature in market maker page 2019-01-04 09:44:25 -08:00
Brandon Millman
1b65efb38c feat(website): update market maker page copy and links 2019-01-04 09:24:59 -08:00
Brandon Millman
ed0e6181bd feat(website): add market making section to developers dropdown 2019-01-04 09:09:34 -08:00
Steve Klebanoff
f1a7efc97e Return void and throw error instead of logging and returning boolean 2019-01-04 09:01:13 -08:00
Steve Klebanoff
442de09bbe Add async suffix 2019-01-04 08:54:44 -08:00
Steve Klebanoff
76dde294f1 Add PR number 2019-01-04 07:54:01 -08:00
Steve Klebanoff
4dded13259 fix(sra-spec): Add title tag 2019-01-04 07:47:41 -08:00
Brandon Millman
c82393d763 feature(website): add market making page 2019-01-03 16:18:33 -08:00
Steve Klebanoff
2111ea159e Merge pull request #1481 from 0xProject/fix/instant/dropdown-color
[instant] Dropdown hover 10% of primary color
2019-01-03 09:07:57 -08:00
Francesco Agosti
c1150824dc Merge pull request #1480 from 0xProject/feature/instant/performance-boost
[instant] No more laggy input
2019-01-03 13:36:18 +01:00
Steve Klebanoff
edb3a61387 Merge branch 'development' into feature/instant/tell-amount-available 2019-01-02 16:56:49 -08:00
Steve Klebanoff
89f67b9bec take out no-longer necessary test 2019-01-02 16:56:28 -08:00
Steve Klebanoff
9131ca1562 Use constant 2019-01-02 15:22:07 -08:00
Steve Klebanoff
92d45a19d1 await alerting discord 2019-01-02 15:19:38 -08:00
Steve Klebanoff
65af195054 Merge branch 'development' into feature/monorepo/release-notes 2019-01-02 15:17:26 -08:00
Steve Klebanoff
9f47f90c6e remove unused export 2019-01-02 15:16:45 -08:00
Steve Klebanoff
472f89bd3d feat(monorepo-scripts): Alert to discord when new publish happens 2019-01-02 14:46:31 -08:00
Steve Klebanoff
c62d862967 fix(instant): Dropdown hover should be 10% of primary color 2019-01-02 10:58:41 -08:00
fragosti
1ceb3c9664 feat: unmount the token selector when its not displaying 2019-01-02 19:07:02 +01:00
fragosti
4252a760f0 feat: dont re-render the token selector on every input change 2019-01-02 16:55:29 +01:00
fragosti
5721b25c3a feat: give all stateless components a displayName or make them private 2019-01-02 16:08:15 +01:00
fragosti
586a8ba8e7 feat: use PureComponent instead of Component 2019-01-02 16:01:40 +01:00
Francesco Agosti
1ddf1087dd Merge pull request #1470 from 0xProject/feature/website/0x-org-cleanup
[website] Remove @next dir, remove unused files.
2019-01-02 15:13:14 +01:00
Jacob Evans
72a56db5ab chore(python-packages): Change docker command in setup.py 2019-01-02 15:03:09 +11:00
MarcZenn
0010ca3e03 updated error msg 2018-12-31 11:21:47 -08:00
MarcZenn
9edb5dae88 passing network id to constructor 2018-12-31 11:12:25 -08:00
MarcZenn
85b49096dc first requested changes 2018-12-31 11:04:19 -08:00
Jacob Evans
646e856b51 Python ganache snapshot 2.2.2 2018-12-29 10:20:42 +11:00
F. Eugene Aumson
e62e61bf71 Add entry point for validation of JSON strings 2018-12-28 15:28:30 -05:00
F. Eugene Aumson
a3eab71908 Correct inconsistencies in JSON schema names
In both ref ID's and file names.
2018-12-28 15:08:15 -05:00
fragosti
dbbd0c5c92 feat: use kovan.0xproject.com instead of kovan.0x.org 2018-12-27 12:07:14 +01:00
fragosti
dc6d6024dc fix: merge conflict 2018-12-27 12:00:20 +01:00
Jacob Evans
9d5d0dbe14 Readme, read snapshot name from package.json 2018-12-27 12:45:29 +11:00
Steve Klebanoff
febf3489ba Merge pull request #1476 from 0xProject/fix/website/build-errors
[website] Fix duplicate props which made ci build break
2018-12-25 11:19:27 -08:00
Steve Klebanoff
cfb200e793 fix(website): Fix bad merge 2018-12-24 13:08:35 -08:00
Jacob Evans
2b7875571d Dockerfile defaults to latest 2018-12-24 13:22:39 +11:00
Jacob Evans
0a1701eac9 Copy latest published version to 0x_ganache_snapshot-latest.zip 2018-12-24 13:20:50 +11:00
Jacob Evans
bcd20081d3 Use new bucket, bind on 0.0.0.0 2018-12-24 13:14:16 +11:00
Steve Klebanoff
f17fe381bf Merge branch 'development' into feature/instant/tell-amount-available 2018-12-21 16:30:00 -08:00
Steve Klebanoff
26977f6408 Fix var name and use floor instead of .round(0, ROUND_DOWN) 2018-12-21 16:29:53 -08:00
Steve Klebanoff
c8c8219c05 Make amountAvailableToFill required 2018-12-21 16:26:07 -08:00
Steve Klebanoff
92150b78fc Merge pull request #1469 from 0xProject/fix/website/job-openings
[website] Tweak job listings
2018-12-21 16:11:56 -08:00
Steve Klebanoff
e144ebbb93 Merge branch 'development' into feature/instant/tell-amount-available 2018-12-21 14:57:16 -08:00
fragosti
c31f527116 fix: remove --json flag from build 2018-12-20 16:57:57 -08:00
fragosti
e68c67a01d feat: move over @next images as well, selectively delete 2018-12-20 16:39:31 -08:00
fragosti
ea781b8850 feat: remove unused files 2018-12-20 16:32:00 -08:00
fragosti
ba7c8d9244 feat: make project build by adding back old footer component 2018-12-20 16:28:19 -08:00
fragosti
a67b34700e feat: remove @next directory from all imports 2018-12-20 16:03:06 -08:00
fragosti
abdf91c691 feat: move all @next files to non @next directory 2018-12-20 16:01:53 -08:00
Brandon Millman
9b540fd8e5 Merge pull request #1434 from 0xProject/fix/instant/signature-denied
[instant] fix signature denial error message and add trust wallet detection
2018-12-20 15:35:26 -08:00
Steve Klebanoff
5ec1ae5f7f Merge pull request #1467 from 0xProject/fix/website/remove-placeholders
[website] Don't show placeholder text on contact page
2018-12-20 15:27:47 -08:00
Steve Klebanoff
bed5b275e4 Merge pull request #1466 from 0xProject/feature/website/remove-ts-warnings
[website] Fix TS errors
2018-12-20 15:27:27 -08:00
Brandon Millman
56af9b2aab Merge branch 'development' into fix/instant/signature-denied
* development: (914 commits)
  Unfix compiler version except for top level contracts
  Move OrderValidator to extensions
  Update CHANGELOG
  Remove assembly version of matchOrders
  Add getOrderInfo check before calling fillOrder
  Update comments and hard code function selector constants
  Fix build after rebase
  update comments
  Fix build and add back tests
  Update dependency paths
  Add OrderMatcher tests
  feat: Add OrderMatcher contract that takes spread in multiple assets by calling `matchOrders` followed by `fillOrder`
  Update CHANGELOG
  Use more efficient equality checks
  Add note about input validation
  Use more efficient check for overflow
  Check if amount == 0 before doing division
  Reapply prettier
  New relayers
  feat(sra_client.py): Test deployed pkg via tox
  ...
2018-12-20 15:21:28 -08:00
Steve Klebanoff
01e7850cd3 fix(website): Cleanup jobs section 2018-12-20 15:13:09 -08:00
Brandon Millman
b399aa25aa feat(instant): add new event for unknown buy errors 2018-12-20 15:05:54 -08:00
Amir Bandeali
0a84ee7488 Merge pull request #1468 from 0xProject/feature/contracts/unfix-compiler-version
Unfix Solidity compiler version except for top level contracts
2018-12-20 14:54:30 -08:00
Brandon Millman
7c7085c932 feature(contract-wrappers): add support for Trust Wallet signature denial errors when trying to sense signature denial from a provider 2018-12-20 14:45:06 -08:00
Brandon Millman
bbe9862aa6 fix(instant): add analytics to unknown error on executeBuyAsync 2018-12-20 14:43:14 -08:00
F. Eugene Aumson
7e12ae1bfc Clarify what kind of support ticket was raised. 2018-12-20 17:34:14 -05:00
Brandon Millman
080c6d3146 fix(instant): catch unknown errors from executeBuyAsync, report them and show could not submit transaction 2018-12-20 14:32:11 -08:00
Brandon Millman
2effc3e267 fix(instant): use isTrust property to determine if provider is trust wallet 2018-12-20 14:10:29 -08:00
Steve Klebanoff
970e670467 make percentage 100% 2018-12-20 14:07:04 -08:00
Steve Klebanoff
36240de897 give more space to job title and change apply link 2018-12-20 14:03:29 -08:00
Steve Klebanoff
e4e1c82ad2 Merge pull request #1463 from 0xProject/feature/website/new-logos
[website] Add new relayers
2018-12-20 13:20:20 -08:00
Amir Bandeali
9b521aeef5 Unfix compiler version except for top level contracts 2018-12-20 11:37:29 -08:00
Steve Klebanoff
1fa93fc8ce Merge pull request #1462 from bakkenbaeck/feature/website/0x-org
[website] Fixes
2018-12-20 11:17:42 -08:00
Amir Bandeali
12177270df Merge pull request #1464 from 0xProject/feature/contracts-extensions/orderValidator
Move OrderValidator to extensions
2018-12-20 10:49:15 -08:00
Steve Klebanoff
d20ed2247f Remove using label as placeholder 2018-12-20 10:46:57 -08:00
Amir Bandeali
f7fd9789ba Move OrderValidator to extensions 2018-12-20 10:27:39 -08:00
Steve Klebanoff
75ba724c28 Merge branch 'development' into feature/website/new-logos 2018-12-20 10:22:29 -08:00
Amir Bandeali
bc3093e635 Merge pull request #1117 from 0xProject/feature/contracts/orderMatcher
Implement OrderMatcher
2018-12-20 10:15:35 -08:00
Steve Klebanoff
5d3d596909 Don't allow compiling with errors 2018-12-20 10:12:45 -08:00
Steve Klebanoff
5b4d4d5537 Declare imported package which doesn't have types 2018-12-20 10:06:57 -08:00
Steve Klebanoff
521679c87c Fix types 2018-12-20 09:56:48 -08:00
Amir Bandeali
2a9e03b61e Merge pull request #1455 from 0xProject/fix/contracts/MAPupdates
Add validation to MAP
2018-12-20 09:56:06 -08:00
Steve Klebanoff
fb003903c7 Fix types 2018-12-20 09:21:29 -08:00
Amir Bandeali
fbfb6eb45e Update CHANGELOG 2018-12-20 09:13:36 -08:00
Amir Bandeali
58be23ac97 Remove assembly version of matchOrders 2018-12-20 09:13:36 -08:00
Amir Bandeali
90fcf59a32 Add getOrderInfo check before calling fillOrder 2018-12-20 09:13:36 -08:00
Amir Bandeali
e74b24bbdb Update comments and hard code function selector constants 2018-12-20 09:13:36 -08:00
Amir Bandeali
6b5b8fe8e0 Fix build after rebase 2018-12-20 09:13:36 -08:00
Amir Bandeali
0a5ecec3e2 update comments 2018-12-20 09:13:36 -08:00
Amir Bandeali
b6f4c5c7da Fix build and add back tests 2018-12-20 09:13:36 -08:00
Amir Bandeali
a6ec2a8c54 Update dependency paths 2018-12-20 09:13:36 -08:00
Amir Bandeali
2fa8b8d1d0 Add OrderMatcher tests 2018-12-20 09:13:36 -08:00
Amir Bandeali
b786836db6 feat: Add OrderMatcher contract that takes spread in multiple assets by calling matchOrders followed by fillOrder 2018-12-20 09:13:36 -08:00
Amir Bandeali
8e5f0f9c5c Update CHANGELOG 2018-12-20 09:11:30 -08:00
Amir Bandeali
99e32869e6 Use more efficient equality checks 2018-12-20 09:11:30 -08:00
Amir Bandeali
04729c44b4 Add note about input validation 2018-12-20 09:11:30 -08:00
Amir Bandeali
2a2260de45 Use more efficient check for overflow 2018-12-20 09:11:30 -08:00
Amir Bandeali
a7c3996627 Check if amount == 0 before doing division 2018-12-20 09:11:30 -08:00
Steve Klebanoff
6dbcdad1ff Fix TS error w/ children on portal 2018-12-20 09:03:30 -08:00
Steve Klebanoff
f94bdc496a Rename props and fix router types 2018-12-20 08:59:13 -08:00
Steve Klebanoff
97369c969c Fix StyledCommunityLink props 2018-12-20 08:28:58 -08:00
Steve Klebanoff
72e68c43e3 remove unused file 2018-12-19 15:58:05 -08:00
Steve Klebanoff
473537e6e7 remove unused instant pages 2018-12-19 15:56:12 -08:00
Fred Carlsen
ca3e0b26c6 Reapply prettier 2018-12-20 00:24:28 +01:00
Steve Klebanoff
2716374b25 New relayers 2018-12-19 15:23:42 -08:00
F. Eugene Aumson
ace968a4fc feat(sra_client.py): Test deployed pkg via tox 2018-12-19 18:18:44 -05:00
Fred Carlsen
e6f3693813 Disable fee slider when no address is put in 2018-12-20 00:16:39 +01:00
Fred Carlsen
531ed54961 Fix page titles 2018-12-20 00:06:39 +01:00
Fred Carlsen
5eb316f5d8 Merge remote-tracking branch 'upstream/feature/website/0x-org' into feature/website/0x-org
# Conflicts:
#	packages/website/ts/@next/components/button.tsx
#	packages/website/ts/@next/components/definition.tsx
#	packages/website/ts/@next/components/hero.tsx
#	packages/website/ts/@next/components/sections/landing/about.tsx
#	packages/website/ts/@next/pages/market_maker.tsx
2018-12-19 23:59:07 +01:00
Steve Klebanoff
97e21106e5 Merge pull request #1448 from 0xProject/feature/website/0x-org
[website][react-shared][instant] 0x org
2018-12-19 10:04:41 -08:00
Fabio B
6e4cb0246c Merge pull request #1453 from 0xProject/addUnenforcedConventions
Add unenforced coding rules to CONTRIBUTING.md
2018-12-19 17:29:02 +00:00
Steve Klebanoff
125a940560 Merge branch 'development' into feature/website/0x-org 2018-12-19 08:19:36 -08:00
Steve Klebanoff
a7f847bf3e Merge pull request #1457 from 0xProject/feature/website/0x-org-linting
[website] 0x org linting and prettier
2018-12-19 08:18:17 -08:00
Leonid Logvinov
b3978b641c Merge pull request #1461 from 0xProject/feature/sol-compiler-watch
Sol-compiler watch mode
2018-12-19 16:52:49 +01:00
Fabio Berger
94dc272335 Merge branch 'development' into addUnenforcedConventions
* development: (92 commits)
  Add missing CHANGELOG entry for OrderWatcher WS interface
  Bump up stale to close to 30 days
  Move onMessageAsync outside of tests and add comments
  Fix WS tests to remove race-condition and be more specific about the message expected
  Add temporary console.log to test failing on CI
  Make @0x/contracts-test-utils a dependency instead of a devDependency
  Fix test-publish failure in contracts packages
  Fixed solhint errors
  Added documentation to `LibAddressArray.append` and switched `if` to `require` smt
  Updated changelogs for new contracts
  Added `gas` field so tests pass on Geth;
  Added Changelog for new Extensions
  Updated comment `Execute fillOrder` -> `Execute exchange function`
  Explicit returns
  Prettier / Linter on contracts + TS
  Refactoring balance threshold filter
  Moved exchange calldata functions to separate mixin
  Less Assembly. More Solidity. Less Efficiency. More Readability.
  Run all tests for extensions
  Cleaned up tests for balance threshold filter
  ...
2018-12-19 15:17:46 +00:00
Fabio B
d456710441 Update packages/sol-compiler/src/compiler.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-19 15:57:30 +01:00
Fabio B
e886ef8c4b Update packages/sol-compiler/src/utils/compiler.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-19 15:57:19 +01:00
Leonid Logvinov
86a9375d04 Run prettier 2018-12-19 15:41:49 +01:00
Leonid Logvinov
f832e035da Run prettier 2018-12-19 15:41:49 +01:00
Leonid Logvinov
5656605355 Describe regexes 2018-12-19 15:41:49 +01:00
Leonid Logvinov
5c4a992b87 Add a NOTE comment 2018-12-19 15:41:49 +01:00
Leonid Logvinov
0abf1c71f6 Add a comment for SpyResolver 2018-12-19 15:41:49 +01:00
Leonid Logvinov
85be2fbf19 Move logWithTime to logUtils 2018-12-19 15:41:49 +01:00
Fabio B
69de1d05ef Update packages/sol-compiler/src/compiler.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-19 15:41:49 +01:00
Leonid Logvinov
237014e823 Disable linter no a hanging promise with a comment 2018-12-19 15:41:49 +01:00
Leonid Logvinov
85a8c6160f Mark the field as readonly 2018-12-19 15:41:49 +01:00
Leonid Logvinov
e2535027e9 Remove unused variables 2018-12-19 15:41:49 +01:00
Leonid Logvinov
87d157b805 Move logWithTime function to utils 2018-12-19 15:41:49 +01:00
Leonid Logvinov
56d48758d3 Add PR numbers 2018-12-19 15:41:49 +01:00
Leonid Logvinov
abfb358250 Add the sol-compiler watch command to all packages 2018-12-19 15:41:49 +01:00
Leonid Logvinov
657b698e1e Add sol-compiler watch mode 2018-12-19 15:41:48 +01:00
Leonid Logvinov
8ddf925a8f Add SpyResolver 2018-12-19 15:41:48 +01:00
Leonid Logvinov
c8eaa63cce Add to type in sol-resolver 2018-12-19 15:41:48 +01:00
Leonid Logvinov
b2edd84b0e Add missing contract libs to compiler.json config 2018-12-19 15:41:48 +01:00
Leonid Logvinov
bc27ee0deb Add includes section to typescript-typings package.json 2018-12-19 15:41:48 +01:00
Leonid Logvinov
c5632490f2 Refactor most of the sol-compiler methods into helper functions in utils and make resolver pluggable into them 2018-12-19 15:41:48 +01:00
Fabio B
89ea7b2a2d Merge pull request #1429 from 0xProject/website/addPySRA
Add Python SRA client to Developer home
2018-12-19 14:40:46 +00:00
Fabio Berger
b3bcd726b8 fix prettier 2018-12-19 14:19:37 +00:00
Fabio Berger
293dadc22a Merge branch 'development' into website/addPySRA
* development: (141 commits)
  Add missing CHANGELOG entry for OrderWatcher WS interface
  Bump up stale to close to 30 days
  Move onMessageAsync outside of tests and add comments
  Fix WS tests to remove race-condition and be more specific about the message expected
  Add temporary console.log to test failing on CI
  Make @0x/contracts-test-utils a dependency instead of a devDependency
  Fix test-publish failure in contracts packages
  Fixed solhint errors
  Added documentation to `LibAddressArray.append` and switched `if` to `require` smt
  Updated changelogs for new contracts
  Added `gas` field so tests pass on Geth;
  Added Changelog for new Extensions
  Updated comment `Execute fillOrder` -> `Execute exchange function`
  Explicit returns
  Prettier / Linter on contracts + TS
  Refactoring balance threshold filter
  Moved exchange calldata functions to separate mixin
  Less Assembly. More Solidity. Less Efficiency. More Readability.
  Run all tests for extensions
  Cleaned up tests for balance threshold filter
  ...
2018-12-19 14:16:35 +00:00
Fabio Berger
040b402b6d Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Move onMessageAsync outside of tests and add comments
  Fix WS tests to remove race-condition and be more specific about the message expected
  Add temporary console.log to test failing on CI
  Remove unused file
  Fix file name
  Consolidate use of isVerbose in orderWatcherConfig
  Add isVerbose option to enable/disable logging
  Fix schemas and tests
  Move OrderWatcher Websocket schemas to json-schemas and convert to JSON so that they are language agnostic
  Improve our compliance to the JSON RPC spec
  remove unused instance variable
  Ensure fileName matches class name, fix broadcast
  Respond to CR
  Respond to CR
  WIP: OrderWatcher WebSocket
2018-12-19 13:21:16 +00:00
Fabio Berger
5c24596d81 Add missing CHANGELOG entry for OrderWatcher WS interface 2018-12-19 13:21:06 +00:00
Fabio B
552007cafb Merge pull request #1427 from 0xProject/features/orderwatcher_ws
OrderWatcher WebSocket Server
2018-12-19 13:19:22 +00:00
Fabio Berger
d2ef88f638 Merge branch 'development' into features/orderwatcher_ws
* development: (74 commits)
  Bump up stale to close to 30 days
  Make @0x/contracts-test-utils a dependency instead of a devDependency
  Fix test-publish failure in contracts packages
  Fixed solhint errors
  Added documentation to `LibAddressArray.append` and switched `if` to `require` smt
  Updated changelogs for new contracts
  Added `gas` field so tests pass on Geth;
  Added Changelog for new Extensions
  Updated comment `Execute fillOrder` -> `Execute exchange function`
  Explicit returns
  Prettier / Linter on contracts + TS
  Refactoring balance threshold filter
  Moved exchange calldata functions to separate mixin
  Less Assembly. More Solidity. Less Efficiency. More Readability.
  Run all tests for extensions
  Cleaned up tests for balance threshold filter
  Removed deprecated README + comments
  removed unnecessary log
  removed `only` from tests
  solhint fixes
  ...
2018-12-19 13:05:59 +00:00
Fabio Berger
bce7ae78bc Bump up stale to close to 30 days 2018-12-19 13:05:47 +00:00
Fabio Berger
90ee70db23 Move onMessageAsync outside of tests and add comments 2018-12-19 12:49:51 +00:00
Fabio Berger
84c8b83694 Fix WS tests to remove race-condition and be more specific about the message expected 2018-12-19 12:18:53 +00:00
Leonid Logvinov
112724d881 Merge pull request #1459 from 0xProject/fix/contracts-test-publish
Fix test-publish failure in contracts packages
2018-12-19 12:15:22 +01:00
Fabio Berger
e2510ed28f Add temporary console.log to test failing on CI 2018-12-19 10:44:32 +00:00
Alex Browne
768e1d541c Make @0x/contracts-test-utils a dependency instead of a devDependency 2018-12-18 18:22:54 -08:00
Alex Browne
a650d695ce Fix test-publish failure in contracts packages 2018-12-18 16:26:10 -08:00
Steve Klebanoff
0eef07307e Declare interface and make isNoBorder optional 2018-12-18 14:49:30 -08:00
Steve Klebanoff
d69b3a0244 Type definition so TS knows it has defaultProps 2018-12-18 14:49:09 -08:00
Steve Klebanoff
fa5acd07b0 Move Hero to bottom, give interface explicit names 2018-12-18 14:36:46 -08:00
Steve Klebanoff
fa612fe173 Linting 2018-12-18 14:19:28 -08:00
Steve Klebanoff
e10b30886f includeEmpty -> shouldIncludeEmpty 2018-12-18 14:11:29 -08:00
Steve Klebanoff
441b5ac6f1 Get rid of unused import 2018-12-18 14:08:06 -08:00
Steve Klebanoff
96a8762704 Move imports and put action into var 2018-12-18 14:07:59 -08:00
Steve Klebanoff
09eac39040 Move imports 2018-12-18 14:07:53 -08:00
Steve Klebanoff
b96236cdb3 Remove comments 2018-12-18 13:57:26 -08:00
Steve Klebanoff
f6525efe95 Not assigning to variable because we never used the variable 2018-12-18 13:57:19 -08:00
Steve Klebanoff
9728267eac Removing unused interface 2018-12-18 13:57:03 -08:00
Steve Klebanoff
f097259266 Removing unused imports 2018-12-18 13:56:53 -08:00
Greg Hysen
38346a9aae Merge pull request #1383 from 0xProject/feature/contracts/balanceThresholdFilter
Balance Threshold Filter
2018-12-18 13:56:18 -08:00
Greg Hysen
ca0ab38521 Fixed solhint errors 2018-12-18 13:36:05 -08:00
Greg Hysen
d2a4fd5706 Added documentation to LibAddressArray.append and switched if to require smt 2018-12-18 13:36:05 -08:00
Greg Hysen
afe200c4e1 Updated changelogs for new contracts 2018-12-18 13:36:05 -08:00
Greg Hysen
00f5b94d0a Added gas field so tests pass on Geth; 2018-12-18 13:36:05 -08:00
Greg Hysen
1de92659ee Added Changelog for new Extensions 2018-12-18 13:36:05 -08:00
Greg Hysen
25722d8154 Updated comment Execute fillOrder -> Execute exchange function 2018-12-18 13:36:05 -08:00
Greg Hysen
bb4ce9b3ad Explicit returns 2018-12-18 13:36:05 -08:00
Greg Hysen
b524ac7af2 Prettier / Linter on contracts + TS 2018-12-18 13:36:05 -08:00
Greg Hysen
dea6f35b04 Refactoring balance threshold filter 2018-12-18 13:36:05 -08:00
Greg Hysen
f3a2e3b6f3 Moved exchange calldata functions to separate mixin 2018-12-18 13:36:05 -08:00
Greg Hysen
f91781a060 Less Assembly. More Solidity. Less Efficiency. More Readability. 2018-12-18 13:36:05 -08:00
Greg Hysen
22fd23643c Run all tests for extensions 2018-12-18 13:36:05 -08:00
Greg Hysen
a1266a3341 Cleaned up tests for balance threshold filter 2018-12-18 13:36:05 -08:00
Greg Hysen
34ff7fae9c Removed deprecated README + comments 2018-12-18 13:36:05 -08:00
Greg Hysen
d45c13bfa8 removed unnecessary log 2018-12-18 13:36:05 -08:00
Greg Hysen
dccca95c2c removed only from tests 2018-12-18 13:36:05 -08:00
Greg Hysen
fc684ad063 solhint fixes 2018-12-18 13:36:05 -08:00
Greg Hysen
6a0f5f39ee Prettier / Linter fixes for TS 2018-12-18 13:36:05 -08:00
Greg Hysen
4417c76b13 Ported Balance Threshold Filter to new contract directory structure 2018-12-18 13:36:05 -08:00
Greg Hysen
8799f9bb90 Test for ERC20 balance threshold 2018-12-18 13:36:05 -08:00
Greg Hysen
6d673ac942 Exchange Selectors - sorted 2018-12-18 13:36:05 -08:00
Greg Hysen
8d6219296a Removed Yes Token - its no longer needed to test Balance Threshold Filter 2018-12-18 13:36:05 -08:00
Greg Hysen
cb9ec18f96 Tests finished for balance threshold wrapper 2018-12-18 13:36:05 -08:00
Greg Hysen
1883f4d272 matchOrders test cases for balance threshold filter contract 2018-12-18 13:36:05 -08:00
Greg Hysen
93b9c251ed Tests for MatchOrders 2018-12-18 13:36:05 -08:00
Greg Hysen
3ad72d96f4 Tests for marketBuy invariants 2018-12-18 13:36:05 -08:00
Greg Hysen
4f977aa51d marketSellNoThrow tests 2018-12-18 13:36:05 -08:00
Greg Hysen
a2df428afb tests for marketSellOrders 2018-12-18 13:36:05 -08:00
Greg Hysen
e45a0ffdbf All tests running so far 2018-12-18 13:36:05 -08:00
Greg Hysen
51355209a2 Tests for batchFill variants 2018-12-18 13:36:05 -08:00
Greg Hysen
4b0d01ad72 tests for batchFillOrdes 2018-12-18 13:36:05 -08:00
Greg Hysen
a655f4b193 tests for fillOrder variants 2018-12-18 13:36:05 -08:00
Greg Hysen
7af2c751dc fillOrder tests with new wrapper 2018-12-18 13:36:05 -08:00
Greg Hysen
d882133e44 Wrappers for balance threshold filter + updated some tests to use the wrapper 2018-12-18 13:36:05 -08:00
Greg Hysen
7e7880aea0 Conformed to hex format for constructing offsets 2018-12-18 13:36:05 -08:00
Greg Hysen
18f028fb08 Removed unnecessary note 2018-12-18 13:36:05 -08:00
Greg Hysen
14c97b3ec3 Include threshold balance in constructor of BalanceThresholdFilter contract 2018-12-18 13:36:05 -08:00
Greg Hysen
58a382d9b6 Function Documentation 2018-12-18 13:36:05 -08:00
Greg Hysen
2be9b1ff08 Updated Balance Threshold Filter to use mixin pattern 2018-12-18 13:36:05 -08:00
Greg Hysen
1cdd82178f ComplianceForwarder renamed to BalanceThresholdFilter 2018-12-18 13:36:05 -08:00
Greg Hysen
dbf1de2e69 Revert reasons for balance threshold filter 2018-12-18 13:36:05 -08:00
Greg Hysen
ba986432ec Some comments 2018-12-18 13:36:05 -08:00
Greg Hysen
3bb147b0f1 Documented inline assembly functions 2018-12-18 13:36:05 -08:00
Greg Hysen
0556defa58 working on batch fills. Compliance part is finished. 2018-12-18 13:36:05 -08:00
Greg Hysen
4217d0cd7d cleanup 2018-12-18 13:36:05 -08:00
Greg Hysen
5863a29a91 cleaning 2018-12-18 13:36:05 -08:00
Greg Hysen
df0de07184 cleaning 2018-12-18 13:36:05 -08:00
Greg Hysen
28a5ed6a9a cleaning 2018-12-18 13:36:05 -08:00
Greg Hysen
c040ad0850 cleaning 2018-12-18 13:36:05 -08:00
Greg Hysen
8007ef6c0b cleaning I 2018-12-18 13:36:05 -08:00
Greg Hysen
a332c5e5c2 Code to validate addresses from order arrays 2018-12-18 13:36:05 -08:00
Greg Hysen
bab7569ed9 Refactoring asm 2018-12-18 13:36:05 -08:00
Greg Hysen
16bd0ce7ec generalized KYC extension passing all tests 2018-12-18 13:36:05 -08:00
Greg Hysen
61a906e9e7 Abstract address validation in asm 2018-12-18 13:36:05 -08:00
Greg Hysen
8c9d48477d Exchange selector contract - autogenerated 2018-12-18 13:36:05 -08:00
Greg Hysen
9f68ac7bbe Making progress on generalized forwarder 2018-12-18 13:36:05 -08:00
Greg Hysen
4e341582ae Extract makerAddress in assembly 2018-12-18 13:36:05 -08:00
Greg Hysen
37a1271af2 fillOrder -> executeTransaction rename 2018-12-18 13:36:05 -08:00
Greg Hysen
743c4c36eb Removed unnecessary comments in compliant forwarder 2018-12-18 13:36:05 -08:00
Greg Hysen
3f7bd24250 Wrapped up tests for compliant forwarder 2018-12-18 13:36:05 -08:00
Greg Hysen
33e41dd500 More tests + require instead of revert in compliance contract 2018-12-18 13:36:05 -08:00
Greg Hysen
989b5b0a98 Ran linter 2018-12-18 13:36:05 -08:00
Greg Hysen
a4ab038aa8 Ran prettier 2018-12-18 13:36:05 -08:00
Greg Hysen
e81f92bffa End-to-end test for compliant forwarder - works 2018-12-18 13:36:05 -08:00
Greg Hysen
003075a8a5 WIP - Tests for compliant forwarder 2018-12-18 13:36:05 -08:00
Greg Hysen
b4aca370de Writing tests for Compliant Forwarder 2018-12-18 13:36:05 -08:00
Greg Hysen
c854c99f20 template for Compliant Forwarder tests 2018-12-18 13:36:05 -08:00
Greg Hysen
0e0e05e0e0 Compile Compliant Forwarder contract 2018-12-18 13:36:04 -08:00
Greg Hysen
88595718c3 Yes Compliance Token 2018-12-18 13:36:04 -08:00
Greg Hysen
f104d91595 Broken commit -- saving current state of getting wyre compliance token contract setup 2018-12-18 13:36:04 -08:00
Greg Hysen
07c1a0121f Untested - Compliant Forwarder with Wyre "Yes Compliance" Token 2018-12-18 13:36:04 -08:00
Steve Klebanoff
67521da5c1 useAnchorTag -> shouldUseAnchorTag 2018-12-18 13:29:21 -08:00
Steve Klebanoff
9bd71aeeff run prettier on website 2018-12-18 13:24:53 -08:00
Steve Klebanoff
59d7efa78a Merge pull request #1456 from 0xProject/feature/website/0x-org-bb-fixes-rebase
[website] Bakken & Baeck 0x.org website fixes
2018-12-18 13:19:32 -08:00
Fred Carlsen
102b7154e0 Remove community and market maker route 2018-12-18 13:03:54 -08:00
Fred Carlsen
abbb6793cc Added routes 2018-12-18 13:03:51 -08:00
Fred Carlsen
7b117081d3 Added community and market maker routes 2018-12-18 13:03:47 -08:00
Fred Carlsen
342ecae34d Left-align hero on mobile 2018-12-18 13:03:42 -08:00
Fred Carlsen
b40551e2df Change cursor on dropdown triggers 2018-12-18 13:03:39 -08:00
Fred Carlsen
ffa57c3703 Tweak market maker 2018-12-18 13:03:35 -08:00
Fred Carlsen
630ecb98e1 Mobile tweaks 2018-12-18 13:03:30 -08:00
Fred Carlsen
ae27695d25 Prevent overflow on instant page 2018-12-18 13:03:25 -08:00
Steve Klebanoff
45d8b522f4 Merge branch 'development' into feature/website/0x-org 2018-12-18 12:49:22 -08:00
Fred Carlsen
aa5c2c249d Remove community and market maker route 2018-12-18 18:35:15 +01:00
Fred Carlsen
1ae9eedf9f Merge remote-tracking branch 'upstream/development' into feature/website/0x-org 2018-12-18 18:33:54 +01:00
Fabio Berger
622b9f662e Merge branch 'development' into features/orderwatcher_ws
* development: (107 commits)
  Fix OrderWatcher title to fix sidebar top
  Fix version picker so it doesn't overflow onto two lines
  Fix bug in pull_missing_blocks with incorrect start block (#1438)
  Pull approval events for ZRX and DAI (#1430)
  fix semicolon and apply prettier
  Fix dex order quote/base asset assigning (#1432)
  Apply prettier
  Publish
  Updated CHANGELOGS
  Rename contracts CHANGELOGs to DEPLOYs
  Move Forwarder CHANGELOG entries to extensions CHANGELOG
  Make contracts packages not private
  Publish
  Updated CHANGELOGS
  Show @ price in light grey
  Updated CHANGELOGS
  typeof -> isString
  add special case to scrape OHLCV for eth/usd (#1428)
  run linter
  simplify scaling input logic
  ...
2018-12-18 16:59:15 +00:00
Fabio Berger
e295eeb893 Remove unused file 2018-12-18 16:25:26 +00:00
Fabio Berger
67df5a433d Fix OrderWatcher title to fix sidebar top 2018-12-18 15:32:11 +00:00
Fabio Berger
18e55830b5 Fix version picker so it doesn't overflow onto two lines 2018-12-18 15:31:58 +00:00
Fabio Berger
7664f6a4fd Add unenforced coding rules to CONTRIBUTING.md 2018-12-18 14:46:21 +00:00
Fred Carlsen
cf553f2afe Added routes 2018-12-18 14:30:38 +01:00
Fred Carlsen
6cc0e6d55c Added community and market maker routes 2018-12-18 14:30:33 +01:00
Fred Carlsen
a6628cd363 Left-align hero on mobile 2018-12-18 14:30:10 +01:00
Fred Carlsen
6271133350 Change cursor on dropdown triggers 2018-12-18 14:08:35 +01:00
Fred Carlsen
55589698cf Tweak market maker 2018-12-18 14:05:10 +01:00
Fred Carlsen
ee0a226c43 Mobile tweaks 2018-12-18 14:04:44 +01:00
Fred Carlsen
d760b355ec Prevent overflow on instant page 2018-12-18 14:03:40 +01:00
Brandon Millman
4c9bdcd787 fix(website): fix broken copper form post link 2018-12-17 17:47:59 -08:00
Francesco Agosti
b7a8c871d2 Merge pull request #1452 from 0xProject/feature/website/0x-org-flawless
[website] 0x org flawless
2018-12-17 17:25:11 -08:00
fragosti
230236d4d7 fix: uppercase K 2018-12-17 17:24:46 -08:00
fragosti
2372925347 feat: update stats 2018-12-17 17:23:10 -08:00
Steve Klebanoff
df48539d41 Merge pull request #1449 from 0xProject/feature/website/0x-org-steve-links
[website] 0x.org Launch Kit and Ecosystem links
2018-12-17 17:15:43 -08:00
fragosti
90a1947c88 feat: make 0x.org #flawless 2018-12-17 17:13:34 -08:00
Alex Browne
44d9cc53b8 Fix bug in pull_missing_blocks with incorrect start block (#1438) 2018-12-17 17:07:22 -08:00
Steve Klebanoff
293e099cb3 Merge pull request #1451 from 0xProject/feature/website/0x-org-hide-links
[website] 0x.org Remove unused paths
2018-12-17 17:00:56 -08:00
Steve Klebanoff
e34aa4d859 Fix link 2018-12-17 17:00:06 -08:00
Steve Klebanoff
50110b3725 Merge branch 'feature/website/0x-org' into feature/website/0x-org-steve-links 2018-12-17 16:57:21 -08:00
Steve Klebanoff
e5815538e4 Use constants 2018-12-17 16:56:00 -08:00
Francesco Agosti
4fbc544b16 Merge pull request #1450 from 0xProject/feature/website/0x-org-about
[website] 0x org about
2018-12-17 16:53:20 -08:00
Steve Klebanoff
0aa7cbac92 Merge branch 'feature/website/0x-org' into feature/website/0x-org-hide-links 2018-12-17 16:37:55 -08:00
Steve Klebanoff
8b24b7c57c Remove community and market-maker URLs 2018-12-17 16:36:24 -08:00
Francesco Agosti
ed4573fe2c Merge pull request #1447 from 0xProject/feature/website/0x-org-jank-links
[website] Fix 0x org jank links
2018-12-17 16:33:57 -08:00
fragosti
7468be8f17 feat: redirect careers to jobs 2018-12-17 16:32:58 -08:00
fragosti
0dcada8e06 feat: add links to press page 2018-12-17 16:28:18 -08:00
fragosti
b255edc577 feat: remove download our presskit copy 2018-12-17 16:26:22 -08:00
fragosti
4ac1db1247 feat: add press mailto link 2018-12-17 16:25:22 -08:00
Steve Klebanoff
2c24cff950 Link homepage to Why#cases 2018-12-17 16:23:44 -08:00
fragosti
2107285a00 fix: use new AboutPageLayout API everywhere 2018-12-17 16:22:50 -08:00
Steve Klebanoff
095cec4342 Per Matt's sugestion change personalized to dedicated 2018-12-17 16:21:29 -08:00
fragosti
53529439c5 feat: update job titles 2018-12-17 16:20:49 -08:00
fragosti
3cf9cf98dc fix: mission and values link to new tab and not append 2018-12-17 16:19:43 -08:00
Steve Klebanoff
43cc7b6626 Ecosystem links 2018-12-17 16:14:30 -08:00
Steve Klebanoff
5defa94902 Prettify ecosystem 2018-12-17 16:09:55 -08:00
fragosti
e0116da559 feat: link to mission and values 2018-12-17 16:09:51 -08:00
Steve Klebanoff
c385627030 Capitalize K in Launch Kit 2018-12-17 16:02:25 -08:00
Steve Klebanoff
031eb8d6a0 Prettify dropdown 2018-12-17 16:02:16 -08:00
Steve Klebanoff
c5f85a365b Allow banner to open in new window 2018-12-17 16:01:21 -08:00
fragosti
a6fa15c94a feat: add react-shared release notes 2018-12-17 16:01:01 -08:00
Steve Klebanoff
14767f1a51 Prettify banner 2018-12-17 15:58:27 -08:00
Steve Klebanoff
d34d8cac5d Remove unused target 2018-12-17 15:58:05 -08:00
Steve Klebanoff
1e0aa55368 Merge branch 'feature/website/0x-org' into feature/website/0x-org-steve-links 2018-12-17 15:54:16 -08:00
fragosti
bb691aa4ed feat: more blog url fixes 2018-12-17 15:48:17 -08:00
fragosti
64e84a3510 feat: fix blog link 2018-12-17 15:39:22 -08:00
Steve Klebanoff
62f5c58d83 fragment and launchkit url 2018-12-17 15:39:02 -08:00
fragosti
4cf3172c90 feat: final footer polish 2018-12-17 15:34:21 -08:00
fragosti
8452c05952 Merge branch 'feature/website/0x-org' of https://github.com/0xProject/0x-monorepo into feature/website/0x-org-jank-links 2018-12-17 15:27:15 -08:00
Steve Klebanoff
8925317c95 Merge pull request #1444 from 0xProject/feature/website/0x-org-instant-config
[website] 0x.org Instant
2018-12-17 15:24:30 -08:00
Steve Klebanoff
248a3998cf prettify launch kit 2018-12-17 15:15:37 -08:00
fragosti
be3142a96a feat: fix footer links 2018-12-17 15:12:54 -08:00
Steve Klebanoff
4626921bb6 Merge pull request #1445 from 0xProject/feature/0x-org-stats
[website] 0x.org stats
2018-12-17 15:12:05 -08:00
Steve Klebanoff
2593f1b8d7 Merge pull request #1442 from 0xProject/feature/website/0x-org-analytics
[website] 0x.org: Allow manual triggering of error, and report newsletter errors to Rollbar
2018-12-17 15:11:35 -08:00
Brandon Millman
4e80c395b1 Merge pull request #1443 from 0xProject/feature/website/0x-org-portal-updated
[0x.org] fix portal
2018-12-17 14:50:36 -08:00
Steve Klebanoff
1f59c99532 total stats 2018-12-17 14:42:08 -08:00
fragosti
a77e5a1a12 feat: fix links in navbar and dropdown 2018-12-17 14:37:34 -08:00
Steve Klebanoff
35f7dd71e9 prettify about page 2018-12-17 14:37:18 -08:00
Brandon Millman
c4036d7d0f fix(website): update Animation component for styled components v4 2018-12-17 14:31:14 -08:00
Steve Klebanoff
6e0d622a15 Open all new instant links in new window 2018-12-17 14:17:36 -08:00
Steve Klebanoff
0e8f0d1d53 Fix URLs 2018-12-17 13:59:12 -08:00
Steve Klebanoff
c126d01fe3 Conditional getStartedClick working on features list 2018-12-17 13:44:19 -08:00
Steve Klebanoff
6d66476d35 Action takes in useAnchorTag 2018-12-17 13:44:08 -08:00
Steve Klebanoff
039b95c8c1 Janky but didn't want to mess anything else up, send in useAnchorTag boolean to force using anchortag 2018-12-17 13:43:37 -08:00
Brandon Millman
30ccddf0d5 Merge pull request #1441 from 0xProject/feature/website/0x-org-jobs-update
[0x.org] update jobs page to load positions from greenhouse
2018-12-17 13:40:54 -08:00
Steve Klebanoff
024e503657 Prettify button.tsx 2018-12-17 13:37:05 -08:00
Steve Klebanoff
37e5a8a8b7 Prettify file 2018-12-17 13:29:46 -08:00
Steve Klebanoff
592c171557 Custom getStartedLink based on screen size 2018-12-17 13:29:39 -08:00
fragosti
9df0ae90bc feat: use react-shared Link component 2018-12-17 13:28:49 -08:00
Steve Klebanoff
33e06fdf40 Run prettifier 2018-12-17 13:16:19 -08:00
fragosti
cce07acf9a feat: update developer dropdown links 2018-12-17 13:14:49 -08:00
Steve Klebanoff
d32f77ebb9 Add includeEmpty option 2018-12-17 13:01:15 -08:00
Steve Klebanoff
35cb769456 prettify file 2018-12-17 12:57:59 -08:00
Brandon Millman
9fdd6e56a7 fix(website): redirect /jobs to /about/jobs 2018-12-17 12:21:37 -08:00
Brandon Millman
2a0ba501e0 feature(website): implement loading jobs from greenhouse in jobs page 2018-12-17 12:21:36 -08:00
Brandon Millman
90d4a2b590 chore(website): yarn lock 2018-12-17 12:21:36 -08:00
Brandon Millman
f7581d60da fix(website): fix mis-replaced website api backend links 2018-12-17 12:21:03 -08:00
Steve Klebanoff
2cc03216bd manually trigger error and also send in newsletter errors 2018-12-17 12:00:15 -08:00
Steve Klebanoff
cd4e679db7 apply prettier 2018-12-17 11:58:49 -08:00
Alex Browne
28713bdb38 Pull approval events for ZRX and DAI (#1430) 2018-12-17 11:36:03 -08:00
Francesco Agosti
c0b469fdd9 Merge pull request #1440 from bakkenbaeck/feature/website/0x-org
Feature/website/0x org
2018-12-17 11:21:53 -08:00
Ezekiel Aquino
47db165afc Fixes hamburger icon bgcolor, jobs link 2018-12-17 19:56:10 +01:00
Fred Carlsen
f95401ad33 Add definition 2018-12-17 19:46:10 +01:00
Fred Carlsen
5209729eb1 Increase header tolerances 2018-12-17 19:39:37 +01:00
Fred Carlsen
31bbb0696c Show errors from serverside 2018-12-17 19:26:04 +01:00
Fred Carlsen
6ab8415198 Update community page 2018-12-17 19:26:04 +01:00
Fred Carlsen
5a6b538a13 Add community links 2018-12-17 19:26:03 +01:00
Fred Carlsen
42e63b32e3 Replace share image 2018-12-17 19:26:03 +01:00
Ezekiel Aquino
072c80f475 Removes content transform on mobile nav toggle 2018-12-17 18:30:00 +01:00
Ezekiel Aquino
fb623cf63b Untoggles nav on headroom unpin 2018-12-17 18:23:40 +01:00
Ezekiel Aquino
5e4defefb0 Adds headroom instead for toggling nav visibility 2018-12-17 18:06:58 +01:00
Fred Carlsen
8d76053210 Fix default margin 2018-12-17 18:04:51 +01:00
Fred Carlsen
b7d8362fb1 Update lock file 2018-12-17 18:04:36 +01:00
Fred Carlsen
73e8563413 Fix about intros 2018-12-17 18:03:50 +01:00
Ezekiel Aquino
312d864936 Fixes mobile nav overflow on mobile 2018-12-17 17:31:06 +01:00
Fred Carlsen
67caa377a4 Added Community page 2018-12-17 16:01:29 +01:00
Fred Carlsen
8234bd5409 Add def for react-scrollable-anchor 2018-12-17 16:01:16 +01:00
Fred Carlsen
3b8598b54b Prepare banner for light theme 2018-12-17 16:01:06 +01:00
Fred Carlsen
934d3b5d79 Tweak banner border on mobile 2018-12-17 14:32:05 +01:00
Fred Carlsen
5932589776 Fix cta links 2018-12-17 14:20:53 +01:00
Fred Carlsen
19e65965c8 Add market maker page 2018-12-17 14:19:10 +01:00
Fred Carlsen
8490c31fb7 Tweak configurator 2018-12-17 14:03:14 +01:00
Fred Carlsen
f242c4206f Update long term impact icon 2018-12-17 13:32:36 +01:00
Fred Carlsen
88240f6401 Fix liquidity source change 2018-12-17 13:31:41 +01:00
Fred Carlsen
7065a098e3 Update og image 2018-12-17 13:27:00 +01:00
Ezekiel Aquino
6fc80cd776 Fixes scrollable anchors in why page 2018-12-17 12:05:05 +01:00
Fred Carlsen
4611c65aa3 Fix wrong icon name 2018-12-17 11:57:05 +01:00
Fred Carlsen
d6866a6dae Adjust thick stroked svgs 2018-12-17 11:57:05 +01:00
Ezekiel Aquino
68be8ef861 Fix footer link hover states 2018-12-17 11:51:35 +01:00
Ezekiel Aquino
0c298b7be4 Fixes mobile button layout for Definition component 2018-12-17 11:48:32 +01:00
Ezekiel Aquino
6eb8256555 Resolves font flicker on route change
- Adds formular css to globally linked css
2018-12-17 11:42:00 +01:00
Fred Carlsen
240e3558fa Update client list + logos 2018-12-17 11:38:47 +01:00
Fred Carlsen
8988650c8b Fix newsletter input color in light theme 2018-12-17 11:30:11 +01:00
Fred Carlsen
28bad6567b Fix launch kit link 2018-12-17 11:19:59 +01:00
Fred Carlsen
1be948bd55 Fix stray tag 2018-12-17 11:17:24 +01:00
Fred Carlsen
c2b355c25e Fix typo 2018-12-17 11:16:31 +01:00
Fred Carlsen
d12e881e62 Fix homepage icon 2018-12-17 11:15:32 +01:00
Fred Carlsen
85edc297f6 Fix mobile links 2018-12-17 11:14:43 +01:00
Fred Carlsen
96d89ddade Fix portal link 2018-12-17 11:07:00 +01:00
Fred Carlsen
5b4b4123e5 Fix mobile nav placement 2018-12-17 11:04:24 +01:00
Jacob Evans
2a577e0475 Add Docker image and Snapshot commands 2018-12-17 15:44:24 +11:00
Fabio Berger
6382f98608 Fix file name 2018-12-16 18:05:20 -08:00
Fabio Berger
a12b9e82f6 Consolidate use of isVerbose in orderWatcherConfig 2018-12-16 18:00:23 -08:00
Fabio Berger
5d0e715d9a Add isVerbose option to enable/disable logging 2018-12-16 17:46:28 -08:00
Fabio Berger
896c8d17c1 Fix schemas and tests 2018-12-16 17:31:38 -08:00
Fabio Berger
ee4185ab46 Move OrderWatcher Websocket schemas to json-schemas and convert to JSON so that they are language agnostic 2018-12-16 16:52:37 -08:00
Fabio Berger
7661cfc85e Improve our compliance to the JSON RPC spec 2018-12-16 16:21:27 -08:00
Fabio Berger
f510f9df99 remove unused instance variable 2018-12-15 21:34:56 -08:00
Fabio Berger
7cafe396de Ensure fileName matches class name, fix broadcast 2018-12-15 21:34:35 -08:00
kao
6bb2ef9238 Respond to CR 2018-12-15 01:25:23 -08:00
Steve Klebanoff
737d1dc54d Merge pull request #1424 from 0xProject/feature/instant/usd-eth-toggle
[instant] ETH/USD toggle
2018-12-14 17:33:56 -08:00
Steve Klebanoff
aa9aa1f58a more documentation 2018-12-14 17:05:52 -08:00
fragosti
9b4d1a1e38 feat: update prod deploy destination 2018-12-14 16:37:19 -08:00
F. Eugene Aumson
c6815bddac Correct doc titles 2018-12-14 16:22:58 -08:00
Steve Klebanoff
2e2e157fc8 Fix for asset-buyer documentation 2018-12-14 16:20:45 -08:00
F. Eugene Aumson
6639201fdb Tweak special case: only strip Schema as suffix 2018-12-14 16:11:00 -08:00
F. Eugene Aumson
57ac2f28a4 Add example usage to sra_client README 2018-12-14 16:08:57 -08:00
Steve Klebanoff
8c5ff663a9 Merge branch 'development' into feature/instant/usd-eth-toggle 2018-12-14 15:58:34 -08:00
Steve Klebanoff
67422db4bd fix semicolon and apply prettier 2018-12-14 15:58:23 -08:00
Steve Klebanoff
219902a169 rename boolean var 2018-12-14 15:55:52 -08:00
Steve Klebanoff
ab10119c5a one more test for undefined 2018-12-14 15:34:45 -08:00
Steve Klebanoff
5981823ac1 Update asset-buyer changelog describing error change 2018-12-14 15:34:45 -08:00
Steve Klebanoff
69054d85e8 Only send in amountAvailableToFill if it's a non-zero amount, add additional tests and nest, and put error into its own file 2018-12-14 15:34:45 -08:00
Steve Klebanoff
3e596f6a8c Nesting errors 2018-12-14 15:34:45 -08:00
Steve Klebanoff
c3884dfa32 More tests for assetBuyerErrorMessage 2018-12-14 15:34:45 -08:00
Steve Klebanoff
a3d93d17cd Factor in slippage amount in InsufficientAssetLiquidityError error, and show in instant 2018-12-14 15:34:45 -08:00
Steve Klebanoff
c6c45095a8 feat(asset-buyer): Custom InsufficientAssetLiquidityError error
BREAKING CHANGE: A custom InsufficientAssetLiquidityError error is now raised when there is insufficient liquidity
2018-12-14 15:34:45 -08:00
Brandon Millman
7d5388edee chore(website): yarn lock 2018-12-14 14:46:30 -08:00
Brandon Millman
51b1cab72a fix(website) replace 0xproject.com with 0x.org 2018-12-14 14:46:05 -08:00
Brandon Millman
e3dcb7107b Merge pull request #1375 from bakkenbaeck/website
[WIP] Website
2018-12-14 14:42:55 -08:00
Fred Carlsen
f7ceb4cf58 Fix logo link 2018-12-14 23:38:21 +01:00
Fred Carlsen
e53f28c570 Merge remote-tracking branch 'upstream/development' into website
# Conflicts:
#	.gitignore
#	README.md
#	contracts/core/CHANGELOG.json
#	contracts/examples/package.json
#	contracts/extensions/package.json
#	contracts/interfaces/package.json
#	contracts/libs/package.json
#	contracts/multisig/package.json
#	contracts/protocol/CHANGELOG.json
#	contracts/protocol/DEPLOYS.json
#	contracts/protocol/package.json
#	contracts/test-utils/CHANGELOG.json
#	contracts/test-utils/CHANGELOG.md
#	contracts/test-utils/package.json
#	contracts/tokens/CHANGELOG.json
#	contracts/tokens/package.json
#	contracts/utils/package.json
#	packages/0x.js/CHANGELOG.json
#	packages/0x.js/CHANGELOG.md
#	packages/0x.js/package.json
#	packages/abi-gen-wrappers/CHANGELOG.json
#	packages/abi-gen-wrappers/CHANGELOG.md
#	packages/abi-gen-wrappers/package.json
#	packages/abi-gen/CHANGELOG.json
#	packages/abi-gen/CHANGELOG.md
#	packages/abi-gen/package.json
#	packages/assert/CHANGELOG.json
#	packages/assert/CHANGELOG.md
#	packages/assert/package.json
#	packages/asset-buyer/CHANGELOG.md
#	packages/asset-buyer/package.json
#	packages/base-contract/CHANGELOG.json
#	packages/base-contract/CHANGELOG.md
#	packages/base-contract/package.json
#	packages/connect/CHANGELOG.json
#	packages/connect/CHANGELOG.md
#	packages/connect/package.json
#	packages/contract-wrappers/CHANGELOG.json
#	packages/contract-wrappers/CHANGELOG.md
#	packages/contract-wrappers/package.json
#	packages/dev-tools-pages/package.json
#	packages/dev-utils/CHANGELOG.json
#	packages/dev-utils/CHANGELOG.md
#	packages/dev-utils/package.json
#	packages/ethereum-types/CHANGELOG.json
#	packages/ethereum-types/CHANGELOG.md
#	packages/ethereum-types/package.json
#	packages/fill-scenarios/CHANGELOG.json
#	packages/fill-scenarios/CHANGELOG.md
#	packages/fill-scenarios/package.json
#	packages/instant/package.json
#	packages/instant/src/types.ts
#	packages/json-schemas/CHANGELOG.json
#	packages/json-schemas/CHANGELOG.md
#	packages/json-schemas/package.json
#	packages/metacoin/package.json
#	packages/migrations/CHANGELOG.json
#	packages/migrations/CHANGELOG.md
#	packages/migrations/package.json
#	packages/order-utils/CHANGELOG.json
#	packages/order-utils/CHANGELOG.md
#	packages/order-utils/package.json
#	packages/order-watcher/CHANGELOG.json
#	packages/order-watcher/CHANGELOG.md
#	packages/order-watcher/package.json
#	packages/pipeline/package.json
#	packages/pipeline/src/ormconfig.ts
#	packages/pipeline/src/parsers/ddex_orders/index.ts
#	packages/pipeline/src/parsers/oasis_orders/index.ts
#	packages/pipeline/src/parsers/paradex_orders/index.ts
#	packages/pipeline/src/parsers/token_metadata/index.ts
#	packages/pipeline/src/scripts/pull_competing_dex_trades.ts
#	packages/pipeline/src/scripts/pull_ddex_orderbook_snapshots.ts
#	packages/pipeline/src/scripts/pull_idex_orderbook_snapshots.ts
#	packages/pipeline/src/scripts/pull_missing_blocks.ts
#	packages/pipeline/src/scripts/pull_oasis_orderbook_snapshots.ts
#	packages/pipeline/src/scripts/pull_paradex_orderbook_snapshots.ts
#	packages/pipeline/src/scripts/pull_trusted_tokens.ts
#	packages/pipeline/src/scripts/update_relayer_info.ts
#	packages/pipeline/src/utils/get_ohlcv_trading_pairs.ts
#	packages/pipeline/src/utils/index.ts
#	packages/pipeline/test/parsers/ddex_orders/index_test.ts
#	packages/pipeline/test/parsers/oasis_orders/index_test.ts
#	packages/pipeline/test/parsers/paradex_orders/index_test.ts
#	packages/react-docs/CHANGELOG.json
#	packages/react-docs/CHANGELOG.md
#	packages/react-docs/package.json
#	packages/react-shared/CHANGELOG.json
#	packages/react-shared/CHANGELOG.md
#	packages/react-shared/package.json
#	packages/sol-compiler/CHANGELOG.md
#	packages/sol-compiler/package.json
#	packages/sol-cov/CHANGELOG.json
#	packages/sol-cov/CHANGELOG.md
#	packages/sol-cov/package.json
#	packages/sol-doc/CHANGELOG.json
#	packages/sol-doc/CHANGELOG.md
#	packages/sol-doc/package.json
#	packages/sol-resolver/CHANGELOG.md
#	packages/sol-resolver/package.json
#	packages/sra-spec/CHANGELOG.json
#	packages/sra-spec/CHANGELOG.md
#	packages/sra-spec/package.json
#	packages/subproviders/CHANGELOG.json
#	packages/subproviders/CHANGELOG.md
#	packages/subproviders/package.json
#	packages/testnet-faucets/package.json
#	packages/types/CHANGELOG.md
#	packages/types/package.json
#	packages/typescript-typings/CHANGELOG.json
#	packages/typescript-typings/CHANGELOG.md
#	packages/typescript-typings/package.json
#	packages/utils/CHANGELOG.json
#	packages/utils/CHANGELOG.md
#	packages/utils/package.json
#	packages/web3-wrapper/CHANGELOG.json
#	packages/web3-wrapper/CHANGELOG.md
#	packages/web3-wrapper/package.json
#	packages/website/package.json
#	packages/website/public/index.html
#	packages/website/ts/pages/instant/fee_percentage_slider.tsx
#	yarn.lock
2018-12-14 23:24:08 +01:00
Fred Carlsen
5c083ba16b Add id prop 2018-12-14 23:16:59 +01:00
Fred Carlsen
4d5bfb5cc2 Jump down to configurator 2018-12-14 23:16:54 +01:00
Fred Carlsen
2adeed38d8 Fix default heading size 2018-12-14 23:16:44 +01:00
Brandon Millman
21a193e516 feature(instant): add trust wallet detection 2018-12-14 14:10:15 -08:00
Brandon Millman
926fcb296f fix(instant): treat executeBuyQuote errors as signature denials 2018-12-14 14:06:24 -08:00
Fred Carlsen
f6f441cbe6 Update routes 2018-12-14 23:03:51 +01:00
Fred Carlsen
b9fa158092 Update links and routes 2018-12-14 23:03:45 +01:00
F. Eugene Aumson
210840444d HACK: cp files because CircleCI isn't 2018-12-14 13:53:21 -08:00
F. Eugene Aumson
d92e143a7e Stop installing packages as editable 2018-12-14 13:53:21 -08:00
F. Eugene Aumson
087469f1f3 Support ALL the schemas 2018-12-14 13:53:21 -08:00
F. Eugene Aumson
b6c8126589 Move zero_ex.json_schemas to its own package 2018-12-14 13:53:15 -08:00
Fred Carlsen
8570616d97 Update links 2018-12-14 22:39:04 +01:00
Fred Carlsen
373ebdbe38 Copy fixes 2018-12-14 22:38:43 +01:00
Fred Carlsen
a1410409ff Add contact modal to pages with contact link 2018-12-14 22:37:01 +01:00
Fred Carlsen
32eab3acff Fix modal submit 2018-12-14 21:56:12 +01:00
kao
d9b5884834 Respond to CR 2018-12-14 12:52:55 -08:00
Fred Carlsen
76a4468b85 Change chapter link 2018-12-14 21:51:09 +01:00
Fred Carlsen
361dc29338 Fix xianny 2018-12-14 21:50:59 +01:00
Fred Carlsen
dbdd2fb7d0 Tweak modal confirmatino 2018-12-14 21:42:25 +01:00
Fred Carlsen
b07892bb48 Type fixes 2018-12-14 21:33:08 +01:00
zkao
6d45beccad Fix dex order quote/base asset assigning (#1432) 2018-12-14 12:15:35 -08:00
Fred Carlsen
f0581285d0 Type fixes 2018-12-14 20:53:29 +01:00
Fred Carlsen
04d4e797aa Type fixes 2018-12-14 20:41:50 +01:00
Fred Carlsen
ceddc01985 Type fixes 2018-12-14 20:20:27 +01:00
Fred Carlsen
1955c846f2 Fixes 2018-12-14 19:51:39 +01:00
Francesco Agosti
1efde6f59b Merge pull request #1415 from 0xProject/feature/instant/mobile-numeric-keyboard
[instant] Change input to number input, and simplify ScalingInput
2018-12-14 10:50:32 -08:00
Fred Carlsen
6af0cf87e1 Tweak mission 2018-12-14 19:19:50 +01:00
Fred Carlsen
101fd78cb2 Finish tweaking team 2018-12-14 19:19:50 +01:00
Leonid Logvinov
91d432aa56 Apply prettier 2018-12-14 10:14:09 -08:00
Ezekiel Aquino
dde2baf204 Cleanup 2018-12-14 18:57:49 +01:00
Ezekiel Aquino
96cb278cae Cleanup 2018-12-14 18:56:53 +01:00
Ezekiel Aquino
51777ed61d Cleanup ecosystem 2018-12-14 18:54:31 +01:00
Ezekiel Aquino
2b4c557a3f Cleanup select 2018-12-14 18:53:43 +01:00
Ezekiel Aquino
84321c41f3 Cleanup configurator 2018-12-14 18:52:38 +01:00
Ezekiel Aquino
f9dfecaf13 Cleanup 2018-12-14 18:50:09 +01:00
Ezekiel Aquino
d1f73da675 Cleanup 2018-12-14 18:49:08 +01:00
Ezekiel Aquino
94c7bf47db More Cleanup 2018-12-14 18:47:09 +01:00
Fred Carlsen
4e8d653f1f Add links to ecosystem 2018-12-14 18:15:07 +01:00
Fred Carlsen
c5b63ca441 Misc typing 2018-12-14 18:05:50 +01:00
Fred Carlsen
ea668d1376 Add missing colors 2018-12-14 18:05:50 +01:00
Fred Carlsen
086c70bcdc Change ecosystem route 2018-12-14 18:05:50 +01:00
Fred Carlsen
461c7efc26 Link ecosystem 2018-12-14 18:05:50 +01:00
Fred Carlsen
c145349af0 Replace launch kit icon 2018-12-14 18:05:49 +01:00
Fred Carlsen
df445eb53c Declare missing types 2018-12-14 18:05:49 +01:00
Fred Carlsen
eadad19cb5 Mobile tweaks jobs table 2018-12-14 18:05:49 +01:00
Fred Carlsen
d410c44b07 Add icon 2018-12-14 18:05:49 +01:00
Ezekiel Aquino
9fa9a30c4d More lint cleanup 2018-12-14 17:50:27 +01:00
Ezekiel Aquino
bdc8f9aa2a Cleanup 2018-12-14 17:43:56 +01:00
Ezekiel Aquino
6db28c5300 Fix mobile nav hamburger open state 2018-12-14 16:06:06 +01:00
Ezekiel Aquino
0dc9fc4ef7 More animation tweaks 2018-12-14 15:38:56 +01:00
Ezekiel Aquino
41ec26c927 cta boxes hover state 2018-12-14 15:36:42 +01:00
Ezekiel Aquino
51def6ee6b Adds mask to get in touch anim 2018-12-14 15:28:00 +01:00
Fred Carlsen
377b87071a Tweak configurator code width 2018-12-14 15:22:27 +01:00
Fred Carlsen
1782418f92 Fix borders on why page 2018-12-14 15:22:27 +01:00
Fred Carlsen
f3f78f63ec Fix hero landing 2018-12-14 15:22:27 +01:00
Fred Carlsen
a2cb815454 Misc feedbackTweak jobs page 2018-12-14 15:22:27 +01:00
Fred Carlsen
ef200b1ce6 Copy updates 2018-12-14 15:22:27 +01:00
Ezekiel Aquino
f6c173a97e Edits animation 2018-12-14 15:02:01 +01:00
Ezekiel Aquino
ef403108fb Edits CTA landing section 2018-12-14 14:59:35 +01:00
Fred Carlsen
8a06dccbbf Tweak launch kit 2018-12-14 14:01:33 +01:00
Fred Carlsen
4590d07e7f Tweak launch kit + add icons 2018-12-14 14:01:33 +01:00
Fred Carlsen
ba89429aec Tweak definition 2018-12-14 14:00:26 +01:00
Ezekiel Aquino
ee38031696 Fixes borders in why page sections 2018-12-14 13:47:40 +01:00
Ezekiel Aquino
8948029dd7 REplaces links as navlinks in header 2018-12-14 13:32:18 +01:00
Ezekiel Aquino
e78ddd4d5a Slight tweak to landing animation 2018-12-14 13:30:36 +01:00
Ezekiel Aquino
f179dc3ca7 Hide extensions from product menu 2018-12-14 13:28:24 +01:00
Ezekiel Aquino
166a6c85fd Slower instant transition, high res images 2018-12-14 13:27:47 +01:00
Ezekiel Aquino
c7c07a7c01 Landing page animation delay 2018-12-14 13:17:23 +01:00
Ezekiel Aquino
f083cafcc7 Scrolls doc to top/ensures overfow on document on route change 2018-12-14 13:01:31 +01:00
Ezekiel Aquino
fab3a90d5a Adds mission office photo 2018-12-14 12:55:22 +01:00
Fred Carlsen
a04c54b4d8 Delete old launch kit 2018-12-14 12:49:59 +01:00
Fred Carlsen
388c7afb50 Added launch kit page 2018-12-14 12:49:59 +01:00
Fred Carlsen
51f2711796 Add hero icon size 2018-12-14 12:49:59 +01:00
Fred Carlsen
907aa7a844 Fix typedef 2018-12-14 12:49:59 +01:00
Fred Carlsen
9695be13c3 Update olafs pic 2018-12-14 12:49:59 +01:00
Ezekiel Aquino
f452fc5bc7 Resolves some sitewrap warnings [TO DO] 2018-12-14 11:49:32 +01:00
Fred Carlsen
106df4cdaf Linting fix 2018-12-14 11:41:05 +01:00
Fred Carlsen
ed6d83c0a7 Linting error 2018-12-14 11:38:32 +01:00
Fred Carlsen
66480ccb1e Linting fixes 2018-12-14 11:34:14 +01:00
Ezekiel Aquino
7a10f03496 Removes button / link outlines globally 2018-12-14 11:15:19 +01:00
Ezekiel Aquino
64c168eafc Hides mobile nav on desktop, adds flexwrap maxwidth 2018-12-14 11:10:01 +01:00
Leonid Logvinov
44e516ac65 Publish
- @0x/contracts-examples@1.0.2
 - @0x/contracts-extensions@1.0.2
 - @0x/contracts-interfaces@1.0.2
 - @0x/contracts-libs@1.0.2
 - @0x/contracts-multisig@1.0.2
 - @0x/contracts-protocol@2.1.59
 - @0x/contracts-tokens@1.0.2
 - @0x/contracts-utils@1.0.2
2018-12-13 14:58:57 -08:00
Leonid Logvinov
d018f6d9cc Updated CHANGELOGS 2018-12-13 14:58:48 -08:00
Leonid Logvinov
d5e15b05fb Rename contracts CHANGELOGs to DEPLOYs 2018-12-13 14:49:58 -08:00
Leonid Logvinov
59fad5845c Move Forwarder CHANGELOG entries to extensions CHANGELOG 2018-12-13 14:43:40 -08:00
Leonid Logvinov
545101f7a5 Make contracts packages not private 2018-12-13 14:36:34 -08:00
Leonid Logvinov
2abd8fe4ee Publish
- 0x.js@2.0.8
 - @0x/abi-gen@1.0.19
 - @0x/abi-gen-wrappers@2.0.2
 - @0x/assert@1.0.20
 - @0x/asset-buyer@3.0.4
 - @0x/base-contract@3.0.10
 - @0x/connect@3.0.10
 - @0x/contract-wrappers@4.1.3
 - @0x/dev-tools-pages@0.0.10
 - @0x/dev-utils@1.0.21
 - ethereum-types@1.1.4
 - @0x/fill-scenarios@1.0.16
 - @0x/instant@1.0.4
 - @0x/json-schemas@2.1.4
 - @0x/metacoin@0.0.32
 - @0x/migrations@2.2.2
 - @0x/order-utils@3.0.7
 - @0x/order-watcher@2.2.8
 - @0x/pipeline@1.0.2
 - @0x/react-docs@1.0.22
 - @0x/react-shared@1.0.25
 - @0x/sol-compiler@1.1.16
 - @0x/sol-cov@2.1.16
 - @0x/sol-doc@1.0.11
 - @0x/sol-resolver@1.1.1
 - @0x/sra-spec@1.0.13
 - @0x/subproviders@2.1.8
 - @0x/testnet-faucets@1.0.60
 - @0x/tslint-config@2.0.0
 - @0x/types@1.4.1
 - @0x/typescript-typings@3.0.6
 - @0x/utils@2.0.8
 - @0x/web3-wrapper@3.2.1
 - @0x/website@0.0.63
 - @0x/contracts-examples@1.0.1
 - @0x/contracts-extensions@1.0.1
 - @0x/contracts-interfaces@1.0.1
 - @0x/contracts-libs@1.0.1
 - @0x/contracts-multisig@1.0.1
 - @0x/contracts-protocol@2.1.58
 - @0x/contracts-test-utils@1.0.2
 - @0x/contracts-tokens@1.0.1
 - @0x/contracts-utils@1.0.1
2018-12-13 14:28:27 -08:00
Leonid Logvinov
3c578cfda9 Updated CHANGELOGS 2018-12-13 14:28:17 -08:00
Steve Klebanoff
6878705676 Show @ price in light grey 2018-12-13 14:27:27 -08:00
Leonid Logvinov
597b2f38f5 Updated CHANGELOGS 2018-12-13 14:04:56 -08:00
Steve Klebanoff
9697d66b66 typeof -> isString 2018-12-13 13:31:30 -08:00
Xianny
8906c30f37 add special case to scrape OHLCV for eth/usd (#1428) 2018-12-13 13:13:28 -08:00
fragosti
9cd859a68a run linter 2018-12-13 13:03:45 -08:00
fragosti
33c6e40b70 simplify scaling input logic 2018-12-13 12:45:38 -08:00
Brandon Millman
5744a7f61b Merge pull request #1418 from 0xProject/feature/website/integrate-instant-docs-track
[website] add 0x Instant as a track in the docs
2018-12-13 11:43:02 -08:00
F. Eugene Aumson
f9a6c45a03 fix(sra_client.py): Fix version badge in README
* Correct Python SRA client version badge

* Fix spacing for prettier
2018-12-13 11:36:28 -08:00
Leonid Logvinov
f8e84260b5 Bump contracts-test-utils version to match the one on npm 2018-12-13 11:33:55 -08:00
Leonid Logvinov
5a45bc5e7b Revert version bump to unpublished contracts packages 2018-12-13 11:10:24 -08:00
Brandon Millman
80f03ef987 fix(website): update copy of instant track in dev home 2018-12-13 11:00:54 -08:00
Fred Carlsen
e48887bc6f Tweak slider 2018-12-13 19:40:17 +01:00
Fred Carlsen
52272cd290 Hide configurator on smaller screens 2018-12-13 19:40:17 +01:00
Ezekiel Aquino
ac1786585e [WIP] cleanup, typing 2018-12-13 18:44:18 +01:00
Ezekiel Aquino
f4a95c295c WIP Begin cleanup, adds mediaquery component 2018-12-13 18:23:12 +01:00
Fred Carlsen
142d29ba57 Tweak padding 2018-12-13 17:48:58 +01:00
Fred Carlsen
d84c740274 Tweak margin on banner 2018-12-13 17:41:21 +01:00
Fred Carlsen
1c413e632b Styled configurator 2018-12-13 17:38:32 +01:00
Steve Klebanoff
9a1d2c055e Fix SectionHeaderProps 2018-12-13 08:31:40 -08:00
Ezekiel Aquino
803086da57 Cleans up as much as old layout 2018-12-13 17:27:40 +01:00
Ezekiel Aquino
2a242e357f Removes line-height normal on buttons because it messes with alignment 2018-12-13 16:51:53 +01:00
Ezekiel Aquino
1647400a49 Just forces that header button to behave 2018-12-13 16:50:19 +01:00
Ezekiel Aquino
41a8dd3e28 Fix missed Link 2018-12-13 16:41:42 +01:00
Ezekiel Aquino
81690d1ce5 Removes <Link> component, clean up Button.tsx 2018-12-13 16:39:19 +01:00
Fred Carlsen
f846e2f6e0 Cleanup 2018-12-13 16:08:44 +01:00
Fred Carlsen
bfc8a3ccee Tweak slides on mobile 2018-12-13 16:03:03 +01:00
Fred Carlsen
daf334a588 Links on mobile 2018-12-13 16:02:51 +01:00
Fred Carlsen
4d0c59649e Add smoother transitions on slider 2018-12-13 14:49:27 +01:00
Fred Carlsen
a1737f8d93 Feedback from harry 2018-12-13 14:47:15 +01:00
Fred Carlsen
455f244ec5 Hook up newsletter form to api 2018-12-13 13:56:25 +01:00
Fred Carlsen
6f7e27bd7f Tweak z-index 2018-12-13 13:53:10 +01:00
Ezekiel Aquino
ea57367473 Switches client logos 2018-12-13 13:51:25 +01:00
Ezekiel Aquino
088c471b78 Switches landing page icons 2018-12-13 13:39:33 +01:00
Fred Carlsen
9fda63cf74 Mobile tweaks to contactm modal 2018-12-13 13:36:01 +01:00
Fred Carlsen
4cf900631c Update icon and copy 2018-12-13 13:36:01 +01:00
Fred Carlsen
fed79b2fde Update icons 2018-12-13 13:36:01 +01:00
Ezekiel Aquino
d2e29fb081 Refactors mobile nav, theming 2018-12-13 13:18:51 +01:00
Ezekiel Aquino
b4b1d54e49 WIP refactor mobileNavMenu 2018-12-13 12:33:45 +01:00
Ezekiel Aquino
a852a4077d Increase figure font size in landing page stats 2018-12-13 11:53:00 +01:00
Fred Carlsen
1c0bf710a4 Add types 2018-12-13 11:38:03 +01:00
Fred Carlsen
f4e9103b6f Add advisors 2018-12-13 11:37:32 +01:00
Fred Carlsen
f8e95ae483 Added full team 2018-12-13 11:34:24 +01:00
Ezekiel Aquino
70df5a0a17 About pages wrapwidths 2018-12-13 11:26:52 +01:00
Ezekiel Aquino
79dac62646 WIP hero page animation test 2018-12-13 11:03:48 +01:00
Ezekiel Aquino
5bd185e831 Adds images in instant page 2018-12-13 10:54:18 +01:00
kao
687749460d WIP: OrderWatcher WebSocket
Currently incomplete. Main challenge is to figure out how to test
a client + server setup in the single-threaded javascript environment.
2018-12-12 22:39:07 -08:00
MarcZenn
a7eaa10220 remove trezor-connect module 2018-12-12 19:05:23 -08:00
MarcZenn
5a46ce55b6 prettier again 2018-12-12 18:32:30 -08:00
MarcZenn
dbebbecab1 restore CI builds 2018-12-12 18:20:30 -08:00
Steve Klebanoff
193cd67d6b A little bit of scaling logic for not cutting off text 2018-12-12 17:43:27 -08:00
Steve Klebanoff
8d54772389 show < 0.00001 ETH when amount gets really small 2018-12-12 17:35:04 -08:00
Steve Klebanoff
0f8acedf02 Merge pull request #1410 from 0xProject/fix/instant/zero-quote
[instant] Don't update heartbeat if amount is 0
2018-12-12 17:34:42 -08:00
Fabio Berger
ddf3bb7c04 Add Python SRA client to Developer home 2018-12-12 17:26:54 -08:00
Alex Browne
3a8f3e01b6 Fix bug that occurs when token metadata decimals is undefined. (#1426)
* Fix bug that occurs when token metadata decimals is undefined.

* move toBigNumberOrNull to utils
2018-12-12 16:49:01 -08:00
Steve Klebanoff
167a3fbc11 Use BN equals and call function 2018-12-12 15:57:28 -08:00
Leonid Logvinov
f9d436cd21 Merge pull request #1425 from 0xProject/feature/async-suffix
Check for an Async suffix in functions, not just methods.
2018-12-12 15:54:00 -08:00
Steve Klebanoff
2e7d363f2c Use helper function to check for error 2018-12-12 15:46:46 -08:00
Leonid Logvinov
1534505652 Fix linter errors 2018-12-12 15:32:41 -08:00
MarcZenn
c7593e66bf ran prettier 2018-12-12 15:02:41 -08:00
MarcZenn
d52dc69279 init trezor subprovider w/ trezor connect client api 2018-12-12 14:42:36 -08:00
Steve Klebanoff
9e5e1f568b show as <$0.01 when less than a cent in USD, and also show 1 significant digit if rounded amount is 0 2018-12-12 14:25:56 -08:00
Steve Klebanoff
65579c0236 Abstract SectionHeader and make 12px per Chris's comment and figma design 2018-12-12 13:43:08 -08:00
Ezekiel Aquino
be045dad9b Edits landing page animation 2018-12-12 20:37:11 +01:00
Ezekiel Aquino
885c22676b Tests landing page animation WIP 2018-12-12 20:34:12 +01:00
Leonid Logvinov
a1186f052d Add PR number 2018-12-12 11:02:51 -08:00
Leonid Logvinov
0e76d66f24 Fix linter errors 2018-12-12 10:59:31 -08:00
Leonid Logvinov
2b523a36c5 Check functions Async suffix 2018-12-12 10:54:49 -08:00
Fred Carlsen
723dd2bcde WIP configurator 2018-12-12 19:45:36 +01:00
Ezekiel Aquino
a900593c88 Tests transition in instant 2018-12-12 19:11:55 +01:00
Steve Klebanoff
756dc1e95e Linting 2018-12-12 10:07:45 -08:00
Steve Klebanoff
68faaaba5f Analytics events for ETH/USD toggle and failure to fetch eth usd price 2018-12-12 10:04:23 -08:00
Ezekiel Aquino
48fdb567cb Adds a bit more whitespace to that scroll image 2018-12-12 19:01:58 +01:00
Ezekiel Aquino
bd5a0616c4 Whitespace on instant image thing, other changes 2018-12-12 18:59:47 +01:00
Steve Klebanoff
0690e68a83 Change base currency to ETH if we can't get USD price 2018-12-12 09:54:06 -08:00
Steve Klebanoff
fb99b5ce9d Show error when fetching usd prices 2018-12-12 09:51:15 -08:00
Steve Klebanoff
aa8dfa88e1 Make primary value in total cost bold 2018-12-12 09:37:39 -08:00
Steve Klebanoff
99941972a3 Small clean up 2018-12-12 09:29:23 -08:00
Steve Klebanoff
8a5609718a Refactor BaseCurrencyChoice to be done in helper function 2018-12-12 09:26:00 -08:00
Steve Klebanoff
aeefdeaef7 Remove unused util 2018-12-12 09:25:48 -08:00
Fred Carlsen
7b4e536e86 Add more profile pics 2018-12-12 18:20:30 +01:00
Fabio Berger
52f733626e Update the a newer version of our Lerna fork with CI fixx 2018-12-12 18:20:30 +01:00
Alex Browne
c8c68fb75a Make pull_missing_blocks script consider all events with block numbers (#1420) 2018-12-12 18:20:29 +01:00
Alex Browne
1364880812 Fix project references for contracts packages (#1419)
- Removed /packages/contracts
- Removed /contracts/core
- Added `yarn build:ts` to CI tests
- Added each contracts "project" to root tsconfig.json
2018-12-12 18:20:29 +01:00
F. Eugene Aumson
ddc1f34c30 feat(sra_client.py)
* Code generation scripts

* Generated code

* Change test config to hit 0x-launch-kit

* Ran prettier on generated code

* First test case, of get_asset_pairs()

* Use launch kit docker image to faciliate CI tests

* Fix markdown rendering for GitHub and PyPI

* Add URL for PyPI to link back to GitHub

* Add one-line package description to README.md

* Remove git_push.sh

* Remove unimplemented tests

* Add sra_client to top-level README package list

* Remove repeated-everywhere long description

* Add shorcuts for publishing

* Remove TypeScript examples
2018-12-12 18:20:29 +01:00
Leonid Logvinov
cdca07d829 Remove accidentally commited files 2018-12-12 18:20:29 +01:00
zkao
59b7e25389 track idex orderbook snapshots (#1397)
* Track Idex and Oasis Orderbook Snapshots
2018-12-12 18:20:29 +01:00
Fabio Berger
87ab8f036c Publish
- 0x.js@2.0.7
 - @0x/abi-gen@1.0.18
 - @0x/abi-gen-wrappers@2.0.1
 - @0x/assert@1.0.19
 - @0x/asset-buyer@3.0.3
 - @0x/base-contract@3.0.9
 - @0x/connect@3.0.9
 - @0x/contract-wrappers@4.1.2
 - @0x/dev-tools-pages@0.0.9
 - @0x/dev-utils@1.0.20
 - ethereum-types@1.1.3
 - @0x/fill-scenarios@1.0.15
 - @0x/instant@1.0.3
 - @0x/json-schemas@2.1.3
 - @0x/metacoin@0.0.31
 - @0x/migrations@2.2.1
 - @0x/monorepo-scripts@1.0.15
 - @0x/order-utils@3.0.6
 - @0x/order-watcher@2.2.7
 - @0x/pipeline@1.0.1
 - @0x/react-docs@1.0.21
 - @0x/react-shared@1.0.24
 - @0x/sol-compiler@1.1.15
 - @0x/sol-cov@2.1.15
 - @0x/sol-doc@1.0.10
 - @0x/sol-resolver@1.1.0
 - @0x/sra-spec@1.0.12
 - @0x/subproviders@2.1.7
 - @0x/testnet-faucets@1.0.59
 - @0x/types@1.4.0
 - @0x/typescript-typings@3.0.5
 - @0x/utils@2.0.7
 - @0x/web3-wrapper@3.2.0
 - @0x/website@0.0.62
 - @0x/contracts-examples@1.0.1
 - @0x/contracts-extensions@1.0.1
 - @0x/contracts-interfaces@1.0.1
 - @0x/contracts-libs@1.0.1
 - @0x/contracts-multisig@1.0.1
 - @0x/contracts-protocol@2.1.57
 - @0x/contracts-test-utils@1.0.1
 - @0x/contracts-tokens@1.0.1
 - @0x/contracts-utils@1.0.1
2018-12-12 18:20:29 +01:00
Fabio Berger
b151b6fe69 Updated CHANGELOGS 2018-12-12 18:19:40 +01:00
Alex Browne
8f911206f7 Refactor event scraping and add support for scraping ERC20 approval events (#1401)
* Refactor event scraping and add support for scraping ERC20 approval events

* Add tests for data_sources/contract-wrappers/utils
2018-12-12 18:19:40 +01:00
F. Eugene Aumson
3496725db6 fix(order_utils.py): Remove stale comment 2018-12-12 18:19:40 +01:00
Leonid Logvinov
ed588decc6 Move OrderValidator to the protocol package 2018-12-12 18:19:39 +01:00
Leonid Logvinov
50e0336018 Revert accidental change 2018-12-12 18:19:39 +01:00
Fabio B
d07e6cb1d6 Update contracts/examples/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-12 18:19:39 +01:00
Brandon Millman
ca86f18e7d Add link to rexrelay integration example in instant README 2018-12-12 18:19:39 +01:00
Brandon Millman
72e94b3307 chore: fix typo in instant README 2018-12-12 18:19:39 +01:00
Brandon Millman
7c33c91d59 chore: remove extra newline 2018-12-12 18:19:39 +01:00
Brandon Millman
0f1197c14b Update instant README with more integration links 2018-12-12 18:19:39 +01:00
Brandon Millman
4858c0c484 Fix typo in top level README 2018-12-12 18:19:39 +01:00
Brandon Millman
5865b4848d Update top level README packages list with instant 2018-12-12 18:19:39 +01:00
Leonid Logvinov
c9af7dc9e5 Revert access changes 2018-12-12 18:19:39 +01:00
Brandon Millman
6e023e6ea3 Update instant README 2018-12-12 18:19:33 +01:00
Fabio Berger
9176e1f53b Add CHANGELOG entry 2018-12-12 18:19:33 +01:00
Fabio Berger
0dbe2a91a8 Actually pass the signature, not the signature index to a wallet contract's isValidSignature call 2018-12-12 18:19:33 +01:00
Leonid Logvinov
8afac3a92c Re-use solhint configuration 2018-12-12 18:19:33 +01:00
Leonid Logvinov
07a0170f34 Change contracts publish config 2018-12-12 18:19:33 +01:00
Xianny
1dc67b2874 perform null check on token metadata (#1412) 2018-12-12 18:19:33 +01:00
Leonid Logvinov
f09e577885 Updated CHANGELOGS 2018-12-12 18:19:33 +01:00
Leonid Logvinov
2c58b8a886 Rename core package to protocol 2018-12-12 18:19:33 +01:00
Leonid Logvinov
cb53cd05e6 Add coreArtifacts to forwarder wrapper 2018-12-12 18:19:32 +01:00
Leonid Logvinov
982d59d45d Combine duplicate imports 2018-12-12 18:19:32 +01:00
xianny
b76a14d51d change to camelCase 2018-12-12 18:19:32 +01:00
Leonid Logvinov
e8231767ec Refactor our extensions package 2018-12-12 18:19:32 +01:00
Brandon Millman
2b7dabeb6e fix(instant): hide loaders when no token or buy amount is chosen 2018-12-12 18:19:32 +01:00
Leonid Logvinov
dde3a0366b Refactor out examples 2018-12-12 18:19:32 +01:00
Steve Klebanoff
8e071db074 Don't throw error if can't find icon for token 2018-12-12 18:19:31 +01:00
kao
93422eab55 Implement prefer-template tslint rule 2018-12-12 18:19:31 +01:00
fragosti
74e07b63de feat: only use display name from provider in ui 2018-12-12 18:19:31 +01:00
fragosti
7dd0b3a5da feat: refactor provider name and displayName logic 2018-12-12 18:19:31 +01:00
fragosti
b59f20482e feat: log walletDisplayName to Heap 2018-12-12 18:19:31 +01:00
xianny
98aa7a2c54 lint: remove unused variable 2018-12-12 18:19:31 +01:00
Fabio Berger
7527c61af5 Fix linter 2018-12-12 18:19:31 +01:00
xianny
bc6492e352 refresh rate limit every second instead of every minute 2018-12-12 18:19:31 +01:00
xianny
5c4a2461b8 cleanup: stray import, rename variable 2018-12-12 18:19:31 +01:00
xianny
183edee4ac query CC with larger batch size 2018-12-12 18:19:31 +01:00
Fabio Berger
c513082071 Add PR number 2018-12-12 18:19:26 +01:00
Fabio Berger
23a6dfac3c Remove excess commas 2018-12-12 18:19:26 +01:00
Fabio Berger
e368106932 fix: txData returned so that value and gasPrice are BigNumbers to avoid precision errors 2018-12-12 18:19:26 +01:00
Fabio Berger
785981ce58 Update yarn.lock 2018-12-12 18:19:26 +01:00
Fabio B
60bbb9b520 Update contracts/interfaces/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-12 18:19:26 +01:00
xianny
fb81570678 rename variable and define default in only 1 location 2018-12-12 18:19:26 +01:00
xianny
56b82bbc8b upgrade throttling code 2018-12-12 18:19:26 +01:00
fragosti
05217bb1a2 feat: change color of doctype tag in configurator 2018-12-12 18:19:26 +01:00
Fabio Berger
075fa315e7 Switch out whitepaper with 0x protocol specification 2018-12-12 18:19:26 +01:00
Fabio Berger
fc5f0c9863 Switch out RocketChat icon with Discord icon 2018-12-12 18:19:25 +01:00
fragosti
13e89d027c feat: disable slider when no affiliate info 2018-12-12 18:19:25 +01:00
Leonid Logvinov
ea8f35b743 Refactor out tokens from core contracts package 2018-12-12 18:19:06 +01:00
Leonid Logvinov
9365a3bc75 Refactor our protocol interfaces into @0x/contracts-interfaces 2018-12-12 18:19:06 +01:00
Alex Browne
363095f2fe Change type of transactions.gas_used and gas_price to BigNumber/numeric 2018-12-12 18:19:01 +01:00
Alex Browne
b57b6c04cc Fix prettier 2018-12-12 18:19:00 +01:00
Alex Browne
e1d77d6e10 Address PR feedback 2018-12-12 18:18:56 +01:00
Xianny
da51f6e56f pull OHLCV records from Crypto Compare (#1349)
* [WIP] pull OHLCV records from Crypto Compare

* lint

* refactor to pull logic out of script and into modules

* add entity test for ohlcv_external entity

* implement rate limit and chronological backfill for ohlcv

* add unit tests; cleanup variable names

* Fetch OHLCV pairs params from events table

* better method names

* fix outdated test

* lint

* Clean up after review

* oops

* fix failing test

* better filtering of most recent records

* fix bug when generating pairs

* fix default earliest backfill date

* fix bug with retrieving backfill time

* prettier
2018-12-12 18:18:37 +01:00
Alex Browne
5d0f82c3c6 Introduce framework for running basic tests for entities (#1344)
* Introduce framework for running basic tests for entities

* Add pipeline tests to CircleCI config

* Make pipeline tests more configurable and fix CircleCI config

* Add coverage dir to pipeline package

* Add basic tests for all exchange event entities

* Add tests for remaining entities

* Create separate test scripts in package.json and add new info to README

* Update db_setup.ts to revert migrations even if you are using docker

* Automatically pull the postgres image if needed

* Add comment about why NumberToBigIntTransformer is needed
2018-12-12 18:17:51 +01:00
Jake Ellowitz
1878a0c4b0 updating comment for 0x trusted tokens 2018-12-12 18:17:33 +01:00
Jake Ellowitz
b538fabdef metadata and trusted sources in same raw table 2018-12-12 18:17:26 +01:00
Jake Ellowitz
01716e0d51 Pull token metadata re trusted tokens 2018-12-12 18:17:13 +01:00
Alex Browne
7cd3f3cead Add script for pulling missing block data 2018-12-12 18:17:05 +01:00
Alex Browne
9d9b5edc9c Add support for pulling Cancel and CancelUpTo events 2018-12-12 18:16:55 +01:00
Alex Browne
09a0ca659e Add transactionHash to CancelUpToEvent and CancelEvent entities 2018-12-12 18:16:50 +01:00
Alex Browne
1d189d112e Add homepage_url to relayers 2018-12-12 18:16:46 +01:00
Alex Browne
829b7cb712 Change some column types from varchar to numeric 2018-12-12 18:16:21 +01:00
Alex Browne
fb8267d85e Rename taker and maker amounts in sra_orders 2018-12-12 18:16:08 +01:00
Alex Browne
d842078997 Implement scraping sra orders from radar relay 2018-12-12 18:16:08 +01:00
Alex Browne
7f574949a4 Update schema for sra_orders 2018-12-12 18:15:56 +01:00
Jake Ellowitz
caeb59a9ae Pointing entities to raw schema
Fix linter issues
2018-12-12 18:15:56 +01:00
Jake Ellowitz
ea95de7d9d Mapping dev schema to initial migration 2018-12-12 18:15:56 +01:00
Alex Browne
52f2ee6e79 Configure linter with --format stylish and fix linter errors 2018-12-12 18:15:50 +01:00
Steve Klebanoff
ad3d20b342 Default to USD 2018-12-12 09:15:18 -08:00
Alex Browne
4fa4f13813 Rename Transaction.ts to transaction.ts
Rename Relayer.ts to relayer.ts

Rename Block.ts to block.ts
2018-12-12 18:15:10 +01:00
Alex Browne
f5f01c0c3e Add better error handling for immediately invoked async functions 2018-12-12 18:15:10 +01:00
Steve Klebanoff
3b9e8e669f Refactor OrderDetails to use private instance methods 2018-12-12 09:14:25 -08:00
Alex Browne
99d90bb665 Rename table and column names 2018-12-12 18:14:08 +01:00
Alex Browne
9d8c423b98 Reorganize entities. Make scripts work from any directory. 2018-12-12 18:14:08 +01:00
Alex Browne
d24b2a5a69 Split index.ts into multiple scripts in scripts/ and detect last known block when pulling events 2018-12-12 18:14:01 +01:00
Alex Browne
aa63632fff Remove unused function parameter in index.ts script 2018-12-12 18:13:46 +01:00
Alex Browne
d86f5c4fbd Use bigint for gasUsed and gasPrice in Transaction 2018-12-12 18:13:46 +01:00
Alex Browne
0a69752d20 Update relayer code to use new relayer-registry format 2018-12-12 18:13:46 +01:00
Alex Browne
f6ebdd1a3f Implement fetching and parsing relayer info 2018-12-12 18:13:26 +01:00
Alex Browne
e2f222b08f Implement support for getting and parsing blocks and transactions 2018-12-12 18:13:11 +01:00
Alex Browne
50924d62cb chore: Fix tslint config. 2018-12-12 18:12:53 +01:00
Alex Browne
da5e8b09d9 Fix bugs in merge_v2_events script and disable verbose logging 2018-12-12 18:12:53 +01:00
Alex Browne
fff1e2cfa7 Rename index.ts -> merge_v2_events 2018-12-12 18:12:43 +01:00
Alex Browne
1544e5ed9f Update script to work with existing v1 pipeline data 2018-12-12 18:12:43 +01:00
Alex Browne
4912affbe8 Update pipeline to use new @0x npm org for imports 2018-12-12 18:12:36 +01:00
Alex Browne
c52ab47185 Update to use ContractWrappers + Infura instead of Etherscan 2018-12-12 18:12:30 +01:00
Alex Browne
f082a3f768 Rebase and update to use new modularized artifacts 2018-12-12 18:12:24 +01:00
Alex Browne
27c229a146 Add tests for SRA order conversion 2018-12-12 18:12:18 +01:00
Alex Browne
43c2b81604 Re-add missing tests 2018-12-12 18:12:18 +01:00
Alex Browne
2a133f2c55 Add soruceUrl to SraOrder entity 2018-12-12 18:12:18 +01:00
Alex Browne
4570bc2729 Add preliminary support for scraping orders from SRA endpoints (no pagination, only RR support for now) 2018-12-12 18:12:18 +01:00
Alex Browne
8702a35467 For event entities, rename address -> contractAddress and make it a primary key 2018-12-12 18:12:11 +01:00
Alex Browne
07f80500fa Implement scraping and parsing exchange CancelUpTo events 2018-12-12 18:12:11 +01:00
Alex Browne
97fc4257a0 Use multi-primary keys for event and filter null logIndexes 2018-12-12 18:12:11 +01:00
Alex Browne
25f1b7701f Implement scraping and parsing exchange cancel events 2018-12-12 18:12:11 +01:00
Alex Browne
6b889aeeed Make event parsing more functional and less class-based 2018-12-12 18:12:06 +01:00
Alex Browne
8e0dcb204f Re-organize event parsing and decoding 2018-12-12 18:12:06 +01:00
Alex Browne
0dc000183a Add support for decoding asset data 2018-12-12 18:12:06 +01:00
Alex Browne
90e1028d2f Add typeorm and begin inserting database records 2018-12-12 18:12:01 +01:00
Alex Browne
ed3737c1f1 Make contractAbi a parameter of getContractEventsAsync 2018-12-12 18:11:53 +01:00
Alex Browne
c9dc69bed6 Add tests for etherscan events 2018-12-12 18:11:53 +01:00
Alex Browne
cd7e41bd5b Restructure pipeline package. Create data-sources dir 2018-12-12 18:11:53 +01:00
Alex Browne
c46d2f8f9d Remove old code. Create function for getting contract events via etherscan 2018-12-12 18:11:52 +01:00
Alex Browne
eb1317a59a Rebase pipeline branch off development 2018-12-12 18:11:46 +01:00
Ezekiel Aquino
98325e1cfb Tests animations on about page headers 2018-12-12 17:39:45 +01:00
Fred Carlsen
356b7df534 Fix link line height 2018-12-12 17:36:36 +01:00
Ezekiel Aquino
2340813149 Tests addAnimation method 2018-12-12 17:27:24 +01:00
Steve Klebanoff
8923817b2f Move header to helper 2018-12-12 08:25:20 -08:00
Steve Klebanoff
7aacf1f5a4 Render OrderDetailsRow directly 2018-12-12 08:23:40 -08:00
Ezekiel Aquino
405667fa83 tries out some transitions 2018-12-12 17:20:00 +01:00
Fred Carlsen
0a3162915f Add checkmark 2018-12-12 17:15:51 +01:00
Fred Carlsen
8bcbb64a01 Fix full width slider 2018-12-12 17:15:51 +01:00
Fred Carlsen
ceafe5ed84 Fix jobs link 2018-12-12 17:15:50 +01:00
Fred Carlsen
f788fea095 Fix bg on banner button 2018-12-12 17:15:50 +01:00
Fred Carlsen
88094002d3 Fix border on button 2018-12-12 17:15:50 +01:00
Fred Carlsen
e57a5a6f82 Update team page with pics so far 2018-12-12 17:15:50 +01:00
Ezekiel Aquino
d1ceb2e561 Adds themed footer styling 2018-12-12 17:03:32 +01:00
Ezekiel Aquino
ec2bb616e1 Adds margin to textwrap in definition to have padding when scaled to narrow screen widths 2018-12-12 16:58:16 +01:00
Ezekiel Aquino
bf56a2c7c4 Header mobile styling 2018-12-12 16:47:12 +01:00
Ezekiel Aquino
52b9f4ef3b Increase footer padding-top 2018-12-12 16:18:24 +01:00
Ezekiel Aquino
7845fdbd9c introduces wrapwidth to section component 2018-12-12 16:13:25 +01:00
Fred Carlsen
6d2da94f8a Fix header link active state 2018-12-12 16:06:48 +01:00
Fred Carlsen
20deb01e01 Remove trailing whitespace 2018-12-12 16:06:48 +01:00
Ezekiel Aquino
3d9fc6c865 Removes wrap width on mobile 2018-12-12 16:04:00 +01:00
Ezekiel Aquino
1d5473eece Fixes fullwidth sections 2018-12-12 16:02:43 +01:00
Fred Carlsen
4b4db3802a Add esc support 2018-12-12 15:51:51 +01:00
Fred Carlsen
5eeb848974 Add interface 2018-12-12 15:50:02 +01:00
Fred Carlsen
5df789bd05 Added contact modal 2018-12-12 15:50:01 +01:00
Fred Carlsen
74959cf354 Fix lodash import 2018-12-12 15:49:23 +01:00
Fred Carlsen
39ceff3d6e Type fixes 2018-12-12 15:49:23 +01:00
Ezekiel Aquino
fa501e9c93 Edits jobs page, wip current openings 2018-12-12 15:45:52 +01:00
Ezekiel Aquino
94c90cc49a Cleanup press page, siteWrap 2018-12-12 15:19:11 +01:00
Ezekiel Aquino
d8e03b87d6 Team page grid responsive style 2018-12-12 15:06:37 +01:00
Ezekiel Aquino
f06c17cccc Edits team page 2018-12-12 15:00:03 +01:00
Ezekiel Aquino
ffff1d5fff Edits aboutLayout, mission.tsx 2018-12-12 14:50:31 +01:00
Ezekiel Aquino
fa389f18cd Fix section/wrap overflows 2018-12-12 14:30:54 +01:00
Ezekiel Aquino
7d5aeacb1c Fix banner linting 2018-12-12 14:29:37 +01:00
Ezekiel Aquino
0df51c37d1 Edits banner, types newlayout 2018-12-12 14:28:33 +01:00
Ezekiel Aquino
bb2581612a Adds more types to newLayout 2018-12-12 13:55:12 +01:00
Ezekiel Aquino
3844ce9b60 Types newlayout, cleans up instant 2018-12-12 13:51:40 +01:00
Ezekiel Aquino
0c5fa5892c Fixes fullwidth prop on new layout section 2018-12-12 13:43:06 +01:00
Ezekiel Aquino
b04a9b9296 Re-adds icon in rebased instant page 2018-12-12 13:38:00 +01:00
Ezekiel Aquino
2bf831132a Fixes icons in rebase (why) 2018-12-12 13:35:44 +01:00
Fred Carlsen
6e62b108a9 Added a bunch of types 2018-12-12 13:32:42 +01:00
Fred Carlsen
6262e06afd Remove old dropdown 2018-12-12 13:32:42 +01:00
Ezekiel Aquino
b1f4bb722d More layout changes 2018-12-12 13:32:42 +01:00
Ezekiel Aquino
c5db8f25d3 WIP 2018-12-12 13:32:20 +01:00
Fred Carlsen
965b1ff32f Remove import 2018-12-12 13:24:06 +01:00
Fred Carlsen
7f7403cf72 Remove old loop 2018-12-12 13:08:58 +01:00
Fred Carlsen
088ca6ce7c Added a bunch of types 2018-12-12 13:08:52 +01:00
Fred Carlsen
5df160ffb9 Remove old dropdown 2018-12-12 13:08:31 +01:00
Fred Carlsen
80efe70247 WIP mobile slider 2018-12-12 12:46:30 +01:00
Fred Carlsen
6c4c666d9b WIP mobile slider 2018-12-12 12:35:22 +01:00
Fred Carlsen
1175a18ccc Add content and images to why 2018-12-12 12:06:12 +01:00
Fred Carlsen
19f662c196 Add icons to 0x instant 2018-12-12 12:00:23 +01:00
Fabio B
78a6d23659 Merge pull request #1422 from 0xProject/fix/ci/lernaIssue
CI Lerna Fix
2018-12-11 18:20:45 -08:00
Fabio Berger
f4dc8b12f7 Update the a newer version of our Lerna fork with CI fixx 2018-12-11 17:50:25 -08:00
Alex Browne
5cff911035 Make pull_missing_blocks script consider all events with block numbers (#1420) 2018-12-11 17:31:16 -08:00
Alex Browne
b3fa0c8dac Fix project references for contracts packages (#1419)
- Removed /packages/contracts
- Removed /contracts/core
- Added `yarn build:ts` to CI tests
- Added each contracts "project" to root tsconfig.json
2018-12-11 17:09:00 -08:00
Steve Klebanoff
5f7ed71937 Delete old interface and rename BaseCurrencyChoice 2018-12-11 17:06:27 -08:00
Steve Klebanoff
b1a73f5c74 Refactor out custom components 2018-12-11 17:03:07 -08:00
MarcZenn
1c65fa212d restore unit tests 2018-12-11 16:59:25 -08:00
F. Eugene Aumson
318e7d5b57 feat(sra_client.py)
* Code generation scripts

* Generated code

* Change test config to hit 0x-launch-kit

* Ran prettier on generated code

* First test case, of get_asset_pairs()

* Use launch kit docker image to faciliate CI tests

* Fix markdown rendering for GitHub and PyPI

* Add URL for PyPI to link back to GitHub

* Add one-line package description to README.md

* Remove git_push.sh

* Remove unimplemented tests

* Add sra_client to top-level README package list

* Remove repeated-everywhere long description

* Add shorcuts for publishing

* Remove TypeScript examples
2018-12-11 16:57:53 -08:00
Leonid Logvinov
a939433bd2 Remove accidentally commited files 2018-12-11 16:54:07 -08:00
zkao
42be1a429f track idex orderbook snapshots (#1397)
* Track Idex and Oasis Orderbook Snapshots
2018-12-11 15:48:54 -08:00
Fabio Berger
96b8100a78 Publish
- 0x.js@2.0.7
 - @0x/abi-gen@1.0.18
 - @0x/abi-gen-wrappers@2.0.1
 - @0x/assert@1.0.19
 - @0x/asset-buyer@3.0.3
 - @0x/base-contract@3.0.9
 - @0x/connect@3.0.9
 - @0x/contract-wrappers@4.1.2
 - @0x/dev-tools-pages@0.0.9
 - @0x/dev-utils@1.0.20
 - ethereum-types@1.1.3
 - @0x/fill-scenarios@1.0.15
 - @0x/instant@1.0.3
 - @0x/json-schemas@2.1.3
 - @0x/metacoin@0.0.31
 - @0x/migrations@2.2.1
 - @0x/monorepo-scripts@1.0.15
 - @0x/order-utils@3.0.6
 - @0x/order-watcher@2.2.7
 - @0x/pipeline@1.0.1
 - @0x/react-docs@1.0.21
 - @0x/react-shared@1.0.24
 - @0x/sol-compiler@1.1.15
 - @0x/sol-cov@2.1.15
 - @0x/sol-doc@1.0.10
 - @0x/sol-resolver@1.1.0
 - @0x/sra-spec@1.0.12
 - @0x/subproviders@2.1.7
 - @0x/testnet-faucets@1.0.59
 - @0x/types@1.4.0
 - @0x/typescript-typings@3.0.5
 - @0x/utils@2.0.7
 - @0x/web3-wrapper@3.2.0
 - @0x/website@0.0.62
 - @0x/contracts-examples@1.0.1
 - @0x/contracts-extensions@1.0.1
 - @0x/contracts-interfaces@1.0.1
 - @0x/contracts-libs@1.0.1
 - @0x/contracts-multisig@1.0.1
 - @0x/contracts-protocol@2.1.57
 - @0x/contracts-test-utils@1.0.1
 - @0x/contracts-tokens@1.0.1
 - @0x/contracts-utils@1.0.1
2018-12-11 15:38:43 -08:00
Fabio Berger
e2b0c4d116 Updated CHANGELOGS 2018-12-11 15:38:32 -08:00
Alex Browne
b4cdb14b9b Refactor event scraping and add support for scraping ERC20 approval events (#1401)
* Refactor event scraping and add support for scraping ERC20 approval events

* Add tests for data_sources/contract-wrappers/utils
2018-12-11 15:16:05 -08:00
Steve Klebanoff
ee7d6fb3af Show as 0 when selected 2018-12-11 14:55:32 -08:00
Steve Klebanoff
286474ca76 Remove unused component 2018-12-11 14:43:07 -08:00
Steve Klebanoff
5cbe04acab feat(instant): ETH/USD toggle 2018-12-11 14:37:45 -08:00
Fred Carlsen
585c789124 Tweak slider 2018-12-11 23:01:26 +01:00
F. Eugene Aumson
d37680610b fix(order_utils.py): Remove stale comment 2018-12-11 12:39:19 -08:00
Leonid Logvinov
e6c1c2a658 Merge pull request #1413 from 0xProject/feature/contracts-monorepo-7
Contracts monorepo 7
2018-12-11 10:04:17 -08:00
Leonid Logvinov
36736f82d4 Move OrderValidator to the protocol package 2018-12-11 09:44:39 -08:00
Leonid Logvinov
7b72b0c762 Revert accidental change 2018-12-11 09:32:44 -08:00
Fabio B
184acd874e Update contracts/examples/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-11 09:31:00 -08:00
Fred Carlsen
8a761ce2bc Lint 2018-12-11 17:18:58 +01:00
Fred Carlsen
bc8981cbb2 Added team data + image placeholder 2018-12-11 17:18:58 +01:00
Ezekiel Aquino
26c9cd3cb2 dropdown z-index 2018-12-11 17:02:29 +01:00
Ezekiel Aquino
25f66f96b6 Removes headroom 2018-12-11 17:00:44 +01:00
Ezekiel Aquino
0948ed7a87 WIP Adds infinite scroll image on instant page 2018-12-11 16:42:46 +01:00
Ezekiel Aquino
bc64c9566c Header changes, mobile alignments 2018-12-11 16:18:27 +01:00
Fred Carlsen
d068956b69 Adjust h4 heading weight 2018-12-11 16:11:08 +01:00
Fred Carlsen
1e5bc143be Add slider mockup 2018-12-11 16:11:08 +01:00
Fred Carlsen
ec72a4b68c Rename form file 2018-12-11 16:11:08 +01:00
Ezekiel Aquino
1f4af537c0 Button transitions 2018-12-11 15:46:16 +01:00
Ezekiel Aquino
91c4191985 Edits mobile aligment 2018-12-11 15:21:19 +01:00
Ezekiel Aquino
1d6e66d937 Change header button color based on theme 2018-12-11 15:16:59 +01:00
Ezekiel Aquino
79d31895fb Removes overflow-x on document 2018-12-11 15:12:31 +01:00
Ezekiel Aquino
1d4d254496 Cleanup about pages 2018-12-11 15:09:46 +01:00
Ezekiel Aquino
528d882ec4 Creates about page wrapper component, clean up 2018-12-11 14:54:19 +01:00
Fred Carlsen
2471d4098f Add missing keys 2018-12-11 14:40:55 +01:00
Fred Carlsen
33b36eaf07 Add keys to chapters 2018-12-11 14:35:17 +01:00
Fred Carlsen
27bf0d8a16 Add form handler 2018-12-11 14:35:17 +01:00
Fred Carlsen
b5372ade3c Adjust heading weight 2018-12-11 14:35:16 +01:00
Fabio B
eec9957831 Merge pull request #1414 from 0xProject/fix/signature-utils/walletSignature
[order-utils] Fix Wallet Signature Verification
2018-12-11 05:22:26 -08:00
Ezekiel Aquino
1b7c9b0775 WIP about pages 2018-12-11 14:21:41 +01:00
Ezekiel Aquino
a4d9434290 Dropdown menu theming 2018-12-11 13:33:51 +01:00
Fred Carlsen
e001988dbe Pull in image from children 2018-12-11 12:55:58 +01:00
Fred Carlsen
54c9709bf0 Added image loop 2018-12-11 12:55:58 +01:00
Fred Carlsen
cc0fb833fe Fix keys 2018-12-11 12:55:58 +01:00
Ezekiel Aquino
96ebad7568 Fix layout, Adds button hovers 2018-12-11 12:26:51 +01:00
Ezekiel Aquino
3fb74be4ba WIP Header styling, hidden on mobile 2018-12-11 12:18:36 +01:00
Ezekiel Aquino
86acca5e1c WIP dropdown menus 2018-12-11 12:11:22 +01:00
Ezekiel Aquino
cb2b45bf04 Loop through products dropdown data 2018-12-11 10:59:37 +01:00
Ezekiel Aquino
3652b8270a Clean up header 2018-12-11 10:48:28 +01:00
Ezekiel Aquino
0a05ef36a6 Cleanup header 2018-12-11 10:47:48 +01:00
Ezekiel Aquino
11c864e20d Adds intermediate large heading size 2018-12-11 10:33:48 +01:00
Brandon Millman
c46870d296 feature(website): add 0x Instant as a track in the docs 2018-12-10 19:31:45 -08:00
fragosti
6e54514013 feat: change input to number input 2018-12-10 17:30:32 -08:00
Brandon Millman
4200064eab Add link to rexrelay integration example in instant README 2018-12-10 16:11:08 -08:00
Leonid Logvinov
e72742f1f7 Merge branch 'development' into feature/contracts-monorepo-7 2018-12-10 16:10:49 -08:00
Brandon Millman
253bf4df6a chore: fix typo in instant README 2018-12-10 16:08:23 -08:00
Brandon Millman
dbc4417b19 chore: remove extra newline 2018-12-10 16:07:16 -08:00
Brandon Millman
74bbebeb01 Update instant README with more integration links 2018-12-10 16:06:26 -08:00
Brandon Millman
40c0eebd38 Fix typo in top level README 2018-12-10 15:54:30 -08:00
Brandon Millman
5d6fabf528 Update top level README packages list with instant 2018-12-10 15:52:43 -08:00
Leonid Logvinov
928b253c81 Revert access changes 2018-12-10 15:47:13 -08:00
Leonid Logvinov
b4c7f4f57f Upgrade solhint version 2018-12-10 15:46:45 -08:00
Brandon Millman
fc09968062 Update instant README 2018-12-10 15:36:04 -08:00
Fabio Berger
89755fe3c2 Add CHANGELOG entry 2018-12-10 15:33:37 -08:00
Fabio Berger
8fd7a9e1f5 Actually pass the signature, not the signature index to a wallet contract's isValidSignature call 2018-12-10 15:31:59 -08:00
Leonid Logvinov
5e6d1779cb Re-use solhint configuration 2018-12-10 15:24:11 -08:00
Leonid Logvinov
c580f4ddcb Change contracts publish config 2018-12-10 15:13:36 -08:00
Xianny
7be2dab9d5 perform null check on token metadata (#1412) 2018-12-10 15:08:13 -08:00
Leonid Logvinov
86f1697934 Updated CHANGELOGS 2018-12-10 15:06:05 -08:00
Francesco Agosti
d578b4959d Merge pull request #1404 from 0xProject/feature/instant/better-provider-fallback
[instant] Refactor provider name and provider display name logic, log the display name
2018-12-10 14:50:28 -08:00
Leonid Logvinov
9f5eeed309 Rename core package to protocol 2018-12-10 14:44:49 -08:00
Leonid Logvinov
14ea4ee1d3 Add coreArtifacts to forwarder wrapper 2018-12-10 14:29:15 -08:00
Leonid Logvinov
6d523835ae Combine duplicate imports 2018-12-10 11:38:03 -08:00
Ezekiel Aquino
e18be3160e WIP dropdown header 2018-12-10 20:02:48 +01:00
Xianny
02e14f88d2 Fix/pipeline/ohlcv ratelimit (#1403)
Use time-based throttling and increase batch size of CC query
2018-12-10 11:01:35 -08:00
xianny
096c4c8f2b change to camelCase 2018-12-10 10:57:36 -08:00
Brandon Millman
d050a1bd53 Merge pull request #1411 from 0xProject/fix/instant/hide-loaders
[instant] Hide loaders when no token or buy amount is chosen
2018-12-10 10:54:08 -08:00
Leonid Logvinov
924c2705b2 Refactor our extensions package 2018-12-10 10:53:25 -08:00
Fabio B
6c86cc8ab8 Merge pull request #1405 from 0xProject/tslint-changes
Implement prefer-template tslint rule
2018-12-10 18:29:17 +00:00
Fred Carlsen
6ef5f28f81 Remove padding for now 2018-12-10 19:19:38 +01:00
Brandon Millman
dc21c79f2b fix(instant): hide loaders when no token or buy amount is chosen 2018-12-10 10:17:41 -08:00
Ezekiel Aquino
beffcd990c WIP Updates dropdown menus 2018-12-10 19:13:52 +01:00
Leonid Logvinov
b88ff0a19f Refactor out examples 2018-12-10 10:01:38 -08:00
Steve Klebanoff
8d93413a5d Merge pull request #1409 from 0xProject/fix/instant/custom-erc20
[instant] Don't throw error if can't find icon for token
2018-12-10 09:55:44 -08:00
Ezekiel Aquino
c622498e50 Edits footer styling 2018-12-10 18:20:08 +01:00
Steve Klebanoff
a0ea0415dd fix(instant): Don't update heartbeat if amount is 0 2018-12-10 09:16:15 -08:00
Leonid Logvinov
a39e0f13be Merge pull request #1388 from 0xProject/feature/contracts-monorepo-6
Contracts monorepo 6
2018-12-10 18:09:59 +01:00
Leonid Logvinov
190d9244cc Merge pull request #1385 from 0xProject/feature/contracts-monorepo-5
Refactor our protocol interfaces into `@0x/contracts-interfaces`
2018-12-10 18:09:33 +01:00
Ezekiel Aquino
d56df4fdaf Optical margin adjustment to landing page 2018-12-10 18:08:55 +01:00
Ezekiel Aquino
7226944dfd Weightier headers, switches icons in mission page 2018-12-10 18:01:57 +01:00
Steve Klebanoff
9d8ab43f91 Don't throw error if can't find icon for token 2018-12-10 09:00:05 -08:00
Ezekiel Aquino
7aee687e6b Updates margins in why, change link component 2018-12-10 17:56:04 +01:00
Fred Carlsen
4138c580bc Add bundle analyzer 2018-12-10 17:51:52 +01:00
Fred Carlsen
a3f12cd4de Add missing separator 2018-12-10 17:51:27 +01:00
Fred Carlsen
a208cba4e8 Add lazyloading + banner 2018-12-10 17:51:27 +01:00
Ezekiel Aquino
8d0b6702c0 Edits why page, removes zenscroll 2018-12-10 17:38:23 +01:00
Ezekiel Aquino
9abd1b79e1 More visual tweaks to instant page 2018-12-10 16:46:53 +01:00
Ezekiel Aquino
bd725eee86 Starts refining isntant page 2018-12-10 16:38:03 +01:00
Fred Carlsen
88c18bd2e6 Update lock file 2018-12-10 16:30:41 +01:00
Fred Carlsen
9dc32c2bca Tweaks 2018-12-10 16:30:41 +01:00
Ezekiel Aquino
bdd287559c Mobile styling on why page 2018-12-10 16:19:12 +01:00
Ezekiel Aquino
194f785939 Refinements to Why page 2018-12-10 16:07:36 +01:00
Fred Carlsen
086568bddf Remove unnecessary dep 2018-12-10 15:55:44 +01:00
Fred Carlsen
3506c0e501 Refactor press highlgihts 2018-12-10 15:55:28 +01:00
Fred Carlsen
93eb31f7a0 Add separator to mission 2018-12-10 15:43:31 +01:00
Fred Carlsen
934117bfe4 Refactor positions 2018-12-10 15:43:31 +01:00
Fred Carlsen
7c33f94836 Mute paragraphs by default 2018-12-10 15:43:31 +01:00
Fred Carlsen
74d0eb40c5 Add links to jobs 2018-12-10 15:43:31 +01:00
Ezekiel Aquino
23987c0fa1 Adds initial scrollto methods in why page, adds stickywrap 2018-12-10 15:30:31 +01:00
Fred Carlsen
cc1b71651d Add active styling to chapter link 2018-12-10 15:20:09 +01:00
Fred Carlsen
5e1892f383 Add padding to banner 2018-12-10 15:20:09 +01:00
Ezekiel Aquino
93d1f2255e Refines footer, newsletterForm 2018-12-10 15:00:35 +01:00
Fred Carlsen
727ced0684 Tweak banner 2018-12-10 14:49:12 +01:00
Fred Carlsen
0ff13edb58 Tweak icons on why 2018-12-10 14:49:12 +01:00
Fred Carlsen
0341ced3f3 Add link to mission 2018-12-10 14:49:12 +01:00
Fred Carlsen
4f6c95b0ca Remove unneeded props 2018-12-10 14:49:12 +01:00
Fred Carlsen
c4ee6836fa Correct icon interface 2018-12-10 14:49:12 +01:00
Ezekiel Aquino
55ed406746 Use defined paddings 2018-12-10 14:26:32 +01:00
Ezekiel Aquino
f93e77e77c Refines landingpage 2018-12-10 14:12:38 +01:00
Fred Carlsen
3ac6da7db1 Added banner 2018-12-10 13:38:06 +01:00
Fred Carlsen
3e93442a43 Remove borderColor prop 2018-12-10 13:38:05 +01:00
Fred Carlsen
a617c801bc Add arrow to link 2018-12-10 13:38:05 +01:00
Ezekiel Aquino
7d9ab27b9d Divides landing into section components, cleanup 2018-12-10 13:11:31 +01:00
Ezekiel Aquino
c686c241c0 Removes percentage paddings on mobile 2018-12-10 12:14:25 +01:00
Ezekiel Aquino
a1889e2a23 Replaces icons in landing, text styling 2018-12-10 12:12:43 +01:00
Ezekiel Aquino
37a1483359 Adds withArrow button 2018-12-10 12:07:08 +01:00
Ezekiel Aquino
80811c9cca Async load icons, adds margins 2018-12-10 11:53:01 +01:00
Fred Carlsen
14d342c3e0 Bind dev server to 0.0.0.0 2018-12-10 11:35:53 +01:00
Fred Carlsen
394105b860 Add options to svg loader 2018-12-10 11:35:53 +01:00
Fred Carlsen
1752aa63da Comment out bg on code 2018-12-10 11:35:53 +01:00
Ezekiel Aquino
9636fd1b76 Adds size definition to Icon 2018-12-10 11:23:54 +01:00
Ezekiel Aquino
16f69ad718 Refactors <Icon> 2018-12-10 11:22:00 +01:00
Fred Carlsen
03ca825639 Cleanup 2018-12-10 11:19:42 +01:00
Fred Carlsen
c995586063 WIP mobile header + developer dropdown 2018-12-10 11:19:20 +01:00
Fred Carlsen
8dd738629a Added global link color to theme 2018-12-10 11:05:16 +01:00
Fabio B
a286228b20 Merge pull request #1402 from 0xProject/web3-wrapper/numberBigNumberMixup
Fix `value` and `gasPrice` precision bug by returning them as BigNumbers
2018-12-08 21:57:06 +00:00
kao
f14603ca4d Implement prefer-template tslint rule 2018-12-07 17:06:52 -08:00
fragosti
4e33d2b481 feat: only use display name from provider in ui 2018-12-07 12:21:06 -08:00
fragosti
b74b4eb053 feat: refactor provider name and displayName logic 2018-12-07 11:29:37 -08:00
fragosti
57dc5b6fc0 feat: log walletDisplayName to Heap 2018-12-07 11:14:01 -08:00
xianny
5febb595e9 lint: remove unused variable 2018-12-07 10:03:17 -08:00
MarcZenn
be88eb00f8 clean up 2018-12-07 10:02:35 -08:00
Fabio Berger
1a44d86c59 Fix linter 2018-12-07 17:55:38 +00:00
xianny
2bea70a0a6 refresh rate limit every second instead of every minute 2018-12-07 09:53:49 -08:00
xianny
41f90c697b cleanup: stray import, rename variable 2018-12-07 09:48:26 -08:00
xianny
7d2b5a28e3 Merge branch 'fix/pipeline/ohlcv-ratelimit' of github.com:0xProject/0x-monorepo into fix/pipeline/ohlcv-ratelimit
Rebased onto development
2018-12-07 09:44:24 -08:00
xianny
7b1471ffe8 query CC with larger batch size 2018-12-07 09:43:55 -08:00
xianny
8b3b4d983f rename variable and define default in only 1 location 2018-12-07 09:43:55 -08:00
xianny
ac971685b3 upgrade throttling code 2018-12-07 09:43:55 -08:00
Fabio Berger
4034eb7655 Add PR number 2018-12-07 15:30:36 +00:00
Fabio Berger
ccd8d4ac30 Remove excess commas 2018-12-07 15:25:07 +00:00
Fabio Berger
84f1d1107a fix: txData returned so that value and gasPrice are BigNumbers to avoid precision errors 2018-12-07 15:24:01 +00:00
marcmartinez
65c60f5386 [WIP] trezor subprovider 2018-12-07 07:06:40 -08:00
Fabio Berger
c0637a744b Update yarn.lock 2018-12-07 14:48:13 +00:00
Fred Carlsen
701ea77a79 Mobile tweaks 2018-12-07 13:51:45 +01:00
Fred Carlsen
b68f3eb772 Break heading on why properly 2018-12-07 13:48:10 +01:00
Fred Carlsen
47e8bc8e43 Add viewbox to icons 2018-12-07 12:43:47 +01:00
Fabio B
51b1de041e Update contracts/interfaces/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-07 11:11:36 +01:00
Fred Carlsen
eb137cf576 Mobile tweaks 2018-12-07 11:00:34 +01:00
xianny
897ba6591d rename variable and define default in only 1 location 2018-12-06 13:20:08 -08:00
xianny
10eb819c75 upgrade throttling code 2018-12-06 12:07:55 -08:00
Francesco Agosti
aa4fcebdc7 Merge pull request #1399 from 0xProject/feature/website/disable-slider-if-no-address-configurator
[website] Disable slider when no affiliate info
2018-12-06 12:02:25 -08:00
fragosti
ac166ce32e feat: change color of doctype tag in configurator 2018-12-06 11:47:02 -08:00
Fred Carlsen
f88ff698a4 Remove hardcoded min-width
This breaks smaller viewports than 355px. Should be handled in a local scope by css, not global inline styles.
2018-12-06 15:11:18 +01:00
Fabio Berger
dcad94df4c Switch out whitepaper with 0x protocol specification 2018-12-06 14:10:35 +00:00
Fabio Berger
a699a12161 Switch out RocketChat icon with Discord icon 2018-12-06 13:28:03 +00:00
Fred Carlsen
49a1f84e16 Slash the zeroes 2018-12-06 13:29:20 +01:00
Fred Carlsen
23675b4901 Update lock file 2018-12-06 13:19:33 +01:00
Fred Carlsen
950c56d7b8 Migrate away from injectGlobal 2018-12-06 13:19:24 +01:00
Fred Carlsen
4b166828b8 Import configurator in new instant page 2018-12-06 13:19:00 +01:00
fragosti
c1698aa634 fix: add comma to affiliateInfo config in configurator 2018-12-06 12:06:35 +01:00
Steve Klebanoff
ae6f7cc454 feat(instant): More aggressive error reporting 2018-12-06 12:06:35 +01:00
fragosti
506c736d4f fix: remove target=_blank from instant link 2018-12-06 12:06:35 +01:00
Xianny
0dbb866918 Fix/pipeline/ohlcv (#1393)
The OHLCV script in data pipeline quits early when we get no data from Crypto Compare. Sometimes Crypto Compare gives us a valid empty response (e.g. when we query for way back in time) and we need to just continue. This adds better filtering for the types of Crypto Compare responses to detect when we should continue and when we should really quit.
2018-12-06 12:06:35 +01:00
fragosti
e82f807d7c feat: change New notification to point to instant 2018-12-06 12:06:35 +01:00
fragosti
b586ecdf92 chore: run prettier 2018-12-06 12:06:35 +01:00
fragosti
ff8029402d fix: ensure copy button is above code 2018-12-06 12:06:35 +01:00
fragosti
92361ae811 feat: notify user they've copied to clipboard on copy 2018-12-06 12:06:35 +01:00
fragosti
cba8dc8a75 chore: make default fee percentage in configurator 0 2018-12-06 12:06:35 +01:00
Alex Browne
ef1e5eacbd Fix RadarRelay timestamps (#1391)
* Fixing rr timestamps

* Apply prettier
2018-12-06 12:06:35 +01:00
fragosti
7ba47c47bb feat: lowercase keys in additionalAssetMetaDataMap 2018-12-06 12:06:35 +01:00
fragosti
f8f3a3b3cc chore: add coingecko css example to externall.css 2018-12-06 12:06:35 +01:00
fragosti
b6e79fd9e0 fix: call toLowerCase in asset creation logic 2018-12-06 12:06:35 +01:00
fragosti
b39f511755 fix: input placeholder css specificity increase 2018-12-06 12:06:35 +01:00
Steve Klebanoff
43d1f61d28 Takeout console.log 2018-12-06 12:06:35 +01:00
Steve Klebanoff
37e3f481dd Only include localhost in host domains if in development mode 2018-12-06 12:06:35 +01:00
Steve Klebanoff
5acf053f8b Use dotenv in development 2018-12-06 12:06:35 +01:00
Fabio Berger
b3038787ea Replace Rocket.chat with Discord 2018-12-06 12:06:35 +01:00
Fabio Berger
b9305f6ab7 Fix mixed up chinese translations 2018-12-06 12:06:35 +01:00
Alex Browne
21cbf05362 Change type of transactions.gas_used and gas_price to BigNumber/numeric 2018-12-06 12:06:35 +01:00
Alex Browne
a3718803a0 Fix prettier 2018-12-06 12:06:35 +01:00
Alex Browne
6742142ca5 Address PR feedback 2018-12-06 12:06:35 +01:00
Fabio B
b7e06a2282 Use a string template in packages/pipeline/src/scripts/pull_missing_events.ts
Co-Authored-By: albrow <stephenalexbrowne@gmail.com>
2018-12-06 12:06:35 +01:00
Fabio B
4c65bbbb8f Fix typo in packages/pipeline/src/parsers/bloxy/index.ts
Co-Authored-By: albrow <stephenalexbrowne@gmail.com>
2018-12-06 12:06:35 +01:00
fragosti
105da3f814 chore: run linter 2018-12-06 12:06:35 +01:00
Alex Browne
4a5b72a5ab Fix linter 2018-12-06 12:06:35 +01:00
fragosti
2d6c46b83c feat: add copy code feature 2018-12-06 12:06:35 +01:00
Xianny
6f5787b2c4 pull OHLCV records from Crypto Compare (#1349)
* [WIP] pull OHLCV records from Crypto Compare

* lint

* refactor to pull logic out of script and into modules

* add entity test for ohlcv_external entity

* implement rate limit and chronological backfill for ohlcv

* add unit tests; cleanup variable names

* Fetch OHLCV pairs params from events table

* better method names

* fix outdated test

* lint

* Clean up after review

* oops

* fix failing test

* better filtering of most recent records

* fix bug when generating pairs

* fix default earliest backfill date

* fix bug with retrieving backfill time

* prettier
2018-12-06 12:06:34 +01:00
zkao
f96711bac3 Token_orderbook_snapshots for Ddex and Paradex(#1354)
* Implements the TokenOrderbookSnapshot Table

* Scripts, Data Sources and Entities to pull Ddex and Paradex API data.
2018-12-06 12:05:38 +01:00
Alex Browne
ddd246a945 Add script for parsing competing dex trades from Bloxy (#1355) 2018-12-06 12:05:38 +01:00
Alex Browne
d14d38dabd Introduce framework for running basic tests for entities (#1344)
* Introduce framework for running basic tests for entities

* Add pipeline tests to CircleCI config

* Make pipeline tests more configurable and fix CircleCI config

* Add coverage dir to pipeline package

* Add basic tests for all exchange event entities

* Add tests for remaining entities

* Create separate test scripts in package.json and add new info to README

* Update db_setup.ts to revert migrations even if you are using docker

* Automatically pull the postgres image if needed

* Add comment about why NumberToBigIntTransformer is needed
2018-12-06 12:05:38 +01:00
Alex Browne
3ca876c574 [pipeline] Add additional documentation to the README (#1328) 2018-12-06 12:04:25 +01:00
Alex Browne
6d2f4b91a9 Reduce number of blocks per query in pull_missing_events 2018-12-06 12:04:25 +01:00
Jake Ellowitz
6739261a7e updating comment for 0x trusted tokens 2018-12-06 12:04:25 +01:00
Jake Ellowitz
72c45d9ea9 metadata and trusted sources in same raw table 2018-12-06 12:04:25 +01:00
Jake Ellowitz
75df8a0e8b Pull token metadata re trusted tokens 2018-12-06 12:04:25 +01:00
Alex Browne
f3c28afedd Add script for pulling missing block data 2018-12-06 12:04:25 +01:00
Alex Browne
80ab797d3a Check for special characters in table name in pull_missing_events 2018-12-06 12:04:25 +01:00
Alex Browne
d6dff5f86a Add support for pulling Cancel and CancelUpTo events 2018-12-06 12:04:25 +01:00
Alex Browne
4a715c30fd Add transactionHash to CancelUpToEvent and CancelEvent entities 2018-12-06 12:04:25 +01:00
Alex Browne
65bb8bdb5e Optimize database operations in pull_missing_events script 2018-12-06 12:04:25 +01:00
Alex Browne
5237e9c2ed Add homepage_url to relayers 2018-12-06 12:04:25 +01:00
Alex Browne
6bab2f70b9 Add workaround for broken save method 2018-12-06 12:04:25 +01:00
Alex Browne
a0a41b1b5d Fix chunk size in pull_missing_events 2018-12-06 12:04:25 +01:00
Alex Browne
f07dc5ae6d Use built-in chunk feature of TypeORM save method 2018-12-06 12:04:25 +01:00
Alex Browne
8cb6c2b51b Change some column types from varchar to numeric 2018-12-06 12:04:25 +01:00
Alex Browne
1f87bd8cf6 Add raw schema prefix to query in pull_missing_events 2018-12-06 12:04:25 +01:00
Alex Browne
a2aeca7b66 Rename taker and maker amounts in sra_orders 2018-12-06 12:04:25 +01:00
Alex Browne
e394c4fe1d Implement scraping sra orders from radar relay 2018-12-06 12:04:25 +01:00
Alex Browne
5c655eeda7 Preliminary work for adding RR order book scraping 2018-12-06 12:04:25 +01:00
Alex Browne
d932448563 Update schema for sra_orders 2018-12-06 12:04:25 +01:00
Jake Ellowitz
7f782b6af0 Pointing entities to raw schema
Fix linter issues
2018-12-06 12:04:25 +01:00
Jake Ellowitz
a3f4264790 Mapping dev schema to initial migration 2018-12-06 12:04:25 +01:00
Alex Browne
b818a62d74 Configure linter with --format stylish and fix linter errors 2018-12-06 12:04:25 +01:00
Alex Browne
e69cdfb7b5 Configure TypeORM for migrations. Add new package.json scripts. 2018-12-06 12:04:25 +01:00
Alex Browne
45da317e15 Rename Transaction.ts to transaction.ts
Rename Relayer.ts to relayer.ts

Rename Block.ts to block.ts
2018-12-06 12:04:25 +01:00
Alex Browne
c21cf55b86 Add better error handling for immediately invoked async functions 2018-12-06 12:04:25 +01:00
Alex Browne
2dfdc19c9e Rename table and column names 2018-12-06 12:04:25 +01:00
Alex Browne
012134001a Reorganize entities. Make scripts work from any directory. 2018-12-06 12:04:24 +01:00
Alex Browne
0f869b0545 Split index.ts into multiple scripts in scripts/ and detect last known block when pulling events 2018-12-06 12:04:24 +01:00
Alex Browne
774971c98c Remove unused function parameter in index.ts script 2018-12-06 12:04:24 +01:00
Alex Browne
25b6e7092f Use bigint for gasUsed and gasPrice in Transaction 2018-12-06 12:04:24 +01:00
Alex Browne
62412b8551 Update relayer code to use new relayer-registry format 2018-12-06 12:04:24 +01:00
Alex Browne
374d513090 Remove outdated info from README 2018-12-06 12:04:24 +01:00
Alex Browne
a72463dbdb Add build:ci to pipeline package.json 2018-12-06 12:04:24 +01:00
Alex Browne
b159d4e0ec Implement fetching and parsing relayer info 2018-12-06 12:04:24 +01:00
Alex Browne
1402a3dfae Implement support for getting and parsing blocks and transactions 2018-12-06 12:04:24 +01:00
Alex Browne
64865bc10f chore: Fix tslint config. 2018-12-06 12:04:24 +01:00
Alex Browne
ef00ac6f51 Fix bugs in merge_v2_events script and disable verbose logging 2018-12-06 12:04:24 +01:00
Alex Browne
7a7c66b0ec Enable verbose logging 2018-12-06 12:04:24 +01:00
Alex Browne
0166c29625 Rename index.ts -> merge_v2_events 2018-12-06 12:04:24 +01:00
Alex Browne
9c35d53694 Update script to work with existing v1 pipeline data 2018-12-06 12:04:24 +01:00
Alex Browne
8701f9a7b0 Update pipeline to use new @0x npm org for imports 2018-12-06 12:04:24 +01:00
Alex Browne
427c2cd164 Update to use ContractWrappers + Infura instead of Etherscan 2018-12-06 12:04:24 +01:00
Alex Browne
8c0dfc1936 Rebase and update to use new modularized artifacts 2018-12-06 12:04:24 +01:00
Alex Browne
392e89fcbb Add tests for SRA order conversion 2018-12-06 12:04:24 +01:00
Alex Browne
44c1947740 Re-add missing tests 2018-12-06 12:04:24 +01:00
Alex Browne
5719eb28f7 Add soruceUrl to SraOrder entity 2018-12-06 12:04:24 +01:00
Alex Browne
ce7027d11f Add preliminary support for scraping orders from SRA endpoints (no pagination, only RR support for now) 2018-12-06 12:04:24 +01:00
Alex Browne
3ba98e2192 For event entities, rename address -> contractAddress and make it a primary key 2018-12-06 12:04:24 +01:00
Alex Browne
1ae3592e45 Implement scraping and parsing exchange CancelUpTo events 2018-12-06 12:04:24 +01:00
Alex Browne
dc04d025af Use multi-primary keys for event and filter null logIndexes 2018-12-06 12:04:24 +01:00
Alex Browne
5262d3b1f2 Implement scraping and parsing exchange cancel events 2018-12-06 12:04:24 +01:00
Alex Browne
7d9afce13b Make event parsing more functional and less class-based 2018-12-06 12:04:24 +01:00
Alex Browne
c99b71f354 Re-organize event parsing and decoding 2018-12-06 12:04:24 +01:00
Alex Browne
0133bec07d Add support for decoding asset data 2018-12-06 12:04:24 +01:00
Alex Browne
bd7bde9bb0 Add typeorm and begin inserting database records 2018-12-06 12:04:23 +01:00
Alex Browne
a6e5d126c3 Make contractAbi a parameter of getContractEventsAsync 2018-12-06 12:03:11 +01:00
Alex Browne
8e7ea4695b Add tests for etherscan events 2018-12-06 12:03:11 +01:00
Alex Browne
cc5ea80aa3 Restructure pipeline package. Create data-sources dir 2018-12-06 12:03:11 +01:00
Alex Browne
d1026a64ba Remove old code. Create function for getting contract events via etherscan 2018-12-06 12:03:11 +01:00
Alex Browne
dda44500c5 Rebase pipeline branch off development 2018-12-06 12:01:16 +01:00
fragosti
7b81bd831f fix: instant linting issues 2018-12-06 11:59:27 +01:00
fragosti
44312478fa chore: fix linter issues 2018-12-06 11:58:38 +01:00
fragosti
92f56c63ac chore: remove shark relay from possible SRA endpoints 2018-12-06 11:58:38 +01:00
fragosti
3d69063bf6 hack: make min-height of line-number container 98% to prevent scrollbar from appearing in code demo 2018-12-06 11:58:38 +01:00
fragosti
4e03c754e7 fix: use WebsitePaths type and update wiki link to new link 2018-12-06 11:58:38 +01:00
fragosti
87eaa91410 fix: reset available tokens when sra endpoint is changed 2018-12-06 11:58:38 +01:00
fragosti
8f5c92b143 fix: make select box-shadow darker 2018-12-06 11:58:38 +01:00
fragosti
77cc1a95bb fix: do not show select all if no tokens are available 2018-12-06 11:58:37 +01:00
fragosti
27cb0386a3 feat: update configurator snippet to actually work if copy and pasted 2018-12-06 11:58:37 +01:00
fragosti
42d6284cf7 fix: change liquiditySource to orderSource 2018-12-06 11:58:37 +01:00
fragosti
893e9f2731 feat: update relayer list 2018-12-06 11:58:37 +01:00
fragosti
7a6339ae38 polish: make configurator inputs look more like mocks 2018-12-06 11:58:37 +01:00
fragosti
fbb27b1fb2 feat: fetch asset meta data from the asset meta data map 2018-12-06 11:58:37 +01:00
fragosti
7f8dc8bb1b fix: address to lowercase and explore the docs leads to correct wiki 2018-12-06 11:58:37 +01:00
fragosti
c47b42d7c1 feat: create more dank slider 2018-12-06 11:58:37 +01:00
fragosti
3bdcf7857f feat: make (optional) label inline 2018-12-06 11:56:11 +01:00
fragosti
80a25e4b38 feat: add fee percentage slider 2018-12-06 11:56:11 +01:00
fragosti
4d7e5b4e5d feat: add fee percentage slier 2018-12-06 11:56:11 +01:00
fragosti
659ae0dcca feat: implement basic feeRecipient address in config generator 2018-12-06 11:56:11 +01:00
fragosti
7a52168cd8 fix: use correct styles even when syntax highlighter component removes classnames on second render 2018-12-06 11:56:11 +01:00
fragosti
566953d5e1 feat: implement code generation 2018-12-06 11:56:11 +01:00
fragosti
a849af8a48 feat: implement multi token select component 2018-12-06 11:56:11 +01:00
fragosti
cc235aac38 feat: implement available token fetching 2018-12-06 11:56:11 +01:00
fragosti
ec24bf8401 feat: add MultiSelect component skeleton 2018-12-06 11:56:11 +01:00
fragosti
9ebb096025 feat: add Select component and use for configurator 2018-12-06 11:56:11 +01:00
fragosti
f8b925c9ad feat: move instant base config to types file 2018-12-06 11:56:11 +01:00
fragosti
a20d547814 feat: implement configurator layout 2018-12-06 11:53:46 +01:00
fragosti
3dcb874e08 feat: factor out ActionLink component from features 2018-12-06 11:53:46 +01:00
fragosti
6b952c4236 feat: improve styling of code demo component 2018-12-06 11:53:46 +01:00
fragosti
9e1a94266e feat: have basic code syntax highlighting working 2018-12-06 11:53:46 +01:00
fragosti
179f093c26 feat: disable slider when no affiliate info 2018-12-05 23:33:04 -08:00
fragosti
6438241144 fix: add comma to affiliateInfo config in configurator 2018-12-05 23:08:18 -08:00
Steve Klebanoff
c185618224 Merge pull request #1398 from 0xProject/feature/instant/more-error-reporting
[instant] More aggressive error reporting
2018-12-05 20:11:23 -08:00
Steve Klebanoff
b0e7b82dd9 feat(instant): More aggressive error reporting 2018-12-05 17:50:23 -08:00
fragosti
cae0e02bc6 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into development 2018-12-05 16:18:45 -08:00
fragosti
83c1b7aec5 fix: remove target=_blank from instant link 2018-12-05 16:18:34 -08:00
Xianny
78d0ab1aa2 Fix/pipeline/ohlcv (#1393)
The OHLCV script in data pipeline quits early when we get no data from Crypto Compare. Sometimes Crypto Compare gives us a valid empty response (e.g. when we query for way back in time) and we need to just continue. This adds better filtering for the types of Crypto Compare responses to detect when we should continue and when we should really quit.
2018-12-05 16:05:06 -08:00
Francesco Agosti
21122f0137 Merge pull request #1369 from 0xProject/feature/website/instant-configurator
[website][instant] Instant configurator
2018-12-05 15:44:54 -08:00
fragosti
c282c2fcc4 feat: change New notification to point to instant 2018-12-05 15:26:27 -08:00
Steve Klebanoff
e6acc0416a Merge pull request #1389 from 0xProject/fix/instant-rollbar-localhost
[instant] Don't report localhost errors to Rollbar
2018-12-05 13:48:54 -08:00
fragosti
ea6547cb75 chore: run prettier 2018-12-05 13:04:42 -08:00
Francesco Agosti
e839e698f9 Merge pull request #1392 from 0xProject/fix/instant/pre-release-hotfixes
[instant] CSS leakage and non-lowercase defaultAssetData fix
2018-12-05 12:45:16 -08:00
fragosti
b7603bef19 fix: ensure copy button is above code 2018-12-05 12:44:23 -08:00
fragosti
fb221e4ca9 feat: notify user they've copied to clipboard on copy 2018-12-05 12:41:57 -08:00
fragosti
1f8c09779d chore: make default fee percentage in configurator 0 2018-12-05 12:34:24 -08:00
fragosti
f9e73d2a6f Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/instant-configurator 2018-12-05 12:33:34 -08:00
Alex Browne
08eb0b91b6 Fix RadarRelay timestamps (#1391)
* Fixing rr timestamps

* Apply prettier
2018-12-05 12:27:32 -08:00
fragosti
f2c5a8e2f1 feat: lowercase keys in additionalAssetMetaDataMap 2018-12-05 12:16:55 -08:00
fragosti
55ebf405a0 chore: add coingecko css example to externall.css 2018-12-05 11:56:54 -08:00
fragosti
92d4c1d09e fix: call toLowerCase in asset creation logic 2018-12-05 11:52:27 -08:00
fragosti
3454bbfd65 fix: input placeholder css specificity increase 2018-12-05 11:39:10 -08:00
Alex Browne
b2dd5495bc Merge pull request #1377 from 0xProject/feature/pipeline-cleanup-mega-rebase
Merge all pipeline code into development
2018-12-05 11:08:19 -08:00
Steve Klebanoff
69d4e330cf Takeout console.log 2018-12-05 10:17:18 -08:00
Steve Klebanoff
9eff857416 Only include localhost in host domains if in development mode 2018-12-05 09:45:34 -08:00
Steve Klebanoff
37dbb4d06f Use dotenv in development 2018-12-05 09:45:23 -08:00
Ezekiel Aquino
a9895c55f9 [WIP] Adds paragraph sizes 2018-12-05 18:07:28 +01:00
Ezekiel Aquino
682b0dd8f4 Implements desktop/mobile font sizing 2018-12-05 17:20:44 +01:00
Fabio B
72a30260d8 Merge pull request #1387 from 0xProject/switchRocketChatForDiscord
Switch all website links from RocketChat for Discord
2018-12-05 15:30:26 +00:00
Fred Carlsen
00dbddc1aa Merge remote-tracking branch 'upstream/development' into website
# Conflicts:
#	packages/website/package.json
#	packages/website/ts/style/colors.ts
2018-12-05 16:15:44 +01:00
Leonid Logvinov
a365ab11d2 Refactor out tokens from core contracts package 2018-12-05 15:21:03 +01:00
Leonid Logvinov
48021a227f Refactor our protocol interfaces into @0x/contracts-interfaces 2018-12-05 13:13:35 +01:00
Fabio Berger
0a618f6f4d Replace Rocket.chat with Discord 2018-12-05 11:46:28 +00:00
Fabio Berger
d0b2ee7fc1 Fix mixed up chinese translations 2018-12-05 11:35:38 +00:00
Leonid Logvinov
b411e2250a Merge pull request #1384 from 0xProject/feature/contracts-monorepo-3
Contracts monorepo 4 feat
2018-12-05 09:39:10 +01:00
Jacob Evans
740b73276f chore: Remove increaseTimeAsync from DutchAuction.
Dutch auctions can be made in the past so we do not need to artificially increase time
2018-12-05 18:13:48 +11:00
Alex Browne
e0348f9c04 Change type of transactions.gas_used and gas_price to BigNumber/numeric 2018-12-04 20:20:49 -08:00
Alex Browne
2e704ac01a Fix prettier 2018-12-04 20:08:32 -08:00
Alex Browne
00f86ca0f7 Address PR feedback 2018-12-04 20:04:08 -08:00
Fabio B
549f5e4655 Use a string template in packages/pipeline/src/scripts/pull_missing_events.ts
Co-Authored-By: albrow <stephenalexbrowne@gmail.com>
2018-12-04 19:56:23 -08:00
Fabio B
ebdc539da7 Fix typo in packages/pipeline/src/parsers/bloxy/index.ts
Co-Authored-By: albrow <stephenalexbrowne@gmail.com>
2018-12-04 19:31:19 -08:00
Steve Klebanoff
2f50cca480 Merge pull request #1382 from 0xProject/fix/instant/center-powered-by
[instant] Center powered by and change to text to Connect
2018-12-04 17:41:42 -08:00
Brandon Millman
0a944244cf Merge pull request #1379 from 0xProject/fix/instant/overlay-color
[instant] add stable class name to overlay close button and adjust overlay color
2018-12-04 17:37:53 -08:00
Steve Klebanoff
9aff0dfed0 Merge pull request #1381 from 0xProject/feature/magic-input-error
[instant] Magic input to trigger error for production Rollbar testing
2018-12-04 17:26:04 -08:00
Steve Klebanoff
40ac4509ca Wallet prompt tweaks per Chris's comment 2018-12-04 17:24:34 -08:00
Steve Klebanoff
4e7031e96d Merge pull request #1371 from 0xProject/feature/instant/log-decimals-and-add-event-properties
feat(instant): More event properties for tracking
2018-12-04 17:20:58 -08:00
Steve Klebanoff
0af1bf11c8 Use git sha and npm version from constants 2018-12-04 17:11:58 -08:00
Steve Klebanoff
d579ba1eda Please unlock -> Click to connect 2018-12-04 16:45:09 -08:00
Steve Klebanoff
f327d7b4d9 fix(instant): center powered by 0x svg 2018-12-04 16:41:47 -08:00
Steve Klebanoff
04226106a2 ethBalanceInUnitAmount -> lastEthBalanceInUnitAmount 2018-12-04 16:33:49 -08:00
Steve Klebanoff
a138ee7e83 Add GIT_SHA and NPM_VERSION constants, report git and npm version in error 2018-12-04 16:10:56 -08:00
Steve Klebanoff
1cc043d7a9 feat(instant): input to trigger error for rollbar testing 2018-12-04 15:58:36 -08:00
Steve Klebanoff
a8a6baf964 Merge pull request #1380 from 0xProject/instant/fix/heap-analytics-id-prod
[instant] Ensure build process receives build arguments
2018-12-04 15:58:13 -08:00
Francesco Agosti
243a099858 Merge pull request #1376 from 0xProject/feature/instant/padding-spacing-polish
[instant] Reduce vertical padding in instant
2018-12-04 15:53:46 -08:00
fragosti
5c29b918df chore: run linter 2018-12-04 15:45:23 -08:00
Brandon Millman
feb715a08b fix(instant): remove extra container around the button 2018-12-04 15:44:48 -08:00
Steve Klebanoff
1b4c477ddb Ensure build process receives build arguments
See https://github.com/entropitor/dotenv-cli/issues/8
2018-12-04 15:42:56 -08:00
Brandon Millman
8b659dbd77 feat(instant): give a stable class name to the close button on the overlay 2018-12-04 15:36:51 -08:00
Alex Browne
8721d4ed7a Fix linter 2018-12-04 15:23:15 -08:00
Brandon Millman
14ad091e83 fix(instant): lighten the overlay color to 0.7 opacity from 0.9 2018-12-04 15:20:26 -08:00
fragosti
ce013489ec feat: add copy code feature 2018-12-04 14:30:31 -08:00
Xianny
8c21a700ba pull OHLCV records from Crypto Compare (#1349)
* [WIP] pull OHLCV records from Crypto Compare

* lint

* refactor to pull logic out of script and into modules

* add entity test for ohlcv_external entity

* implement rate limit and chronological backfill for ohlcv

* add unit tests; cleanup variable names

* Fetch OHLCV pairs params from events table

* better method names

* fix outdated test

* lint

* Clean up after review

* oops

* fix failing test

* better filtering of most recent records

* fix bug when generating pairs

* fix default earliest backfill date

* fix bug with retrieving backfill time

* prettier
2018-12-04 14:26:03 -08:00
zkao
87ffa5d7ab Token_orderbook_snapshots for Ddex and Paradex(#1354)
* Implements the TokenOrderbookSnapshot Table

* Scripts, Data Sources and Entities to pull Ddex and Paradex API data.
2018-12-04 14:25:42 -08:00
Alex Browne
7198b441e0 Add script for parsing competing dex trades from Bloxy (#1355) 2018-12-04 14:25:42 -08:00
Alex Browne
3d211c415b Introduce framework for running basic tests for entities (#1344)
* Introduce framework for running basic tests for entities

* Add pipeline tests to CircleCI config

* Make pipeline tests more configurable and fix CircleCI config

* Add coverage dir to pipeline package

* Add basic tests for all exchange event entities

* Add tests for remaining entities

* Create separate test scripts in package.json and add new info to README

* Update db_setup.ts to revert migrations even if you are using docker

* Automatically pull the postgres image if needed

* Add comment about why NumberToBigIntTransformer is needed
2018-12-04 14:25:38 -08:00
Alex Browne
4061731245 [pipeline] Add additional documentation to the README (#1328) 2018-12-04 14:24:48 -08:00
Alex Browne
96fdb9b766 Reduce number of blocks per query in pull_missing_events 2018-12-04 14:24:48 -08:00
Jake Ellowitz
1aa3f9d69f updating comment for 0x trusted tokens 2018-12-04 14:24:48 -08:00
Jake Ellowitz
dea89c4e22 metadata and trusted sources in same raw table 2018-12-04 14:24:48 -08:00
Jake Ellowitz
c6af5131b0 Pull token metadata re trusted tokens 2018-12-04 14:24:48 -08:00
Alex Browne
9986717671 Add script for pulling missing block data 2018-12-04 14:24:48 -08:00
Alex Browne
5cad2ad174 Check for special characters in table name in pull_missing_events 2018-12-04 14:24:48 -08:00
Alex Browne
24fd2d9730 Add support for pulling Cancel and CancelUpTo events 2018-12-04 14:24:48 -08:00
Alex Browne
0397ff8b22 Add transactionHash to CancelUpToEvent and CancelEvent entities 2018-12-04 14:24:48 -08:00
Alex Browne
1a25862086 Optimize database operations in pull_missing_events script 2018-12-04 14:24:48 -08:00
Alex Browne
b771020f88 Add homepage_url to relayers 2018-12-04 14:24:48 -08:00
Alex Browne
b42cf0c797 Add workaround for broken save method 2018-12-04 14:24:48 -08:00
Alex Browne
8076333795 Fix chunk size in pull_missing_events 2018-12-04 14:24:48 -08:00
Alex Browne
b0a2c10e11 Use built-in chunk feature of TypeORM save method 2018-12-04 14:24:48 -08:00
Alex Browne
303bbc42f4 Change some column types from varchar to numeric 2018-12-04 14:24:48 -08:00
Alex Browne
10e93bb01f Add raw schema prefix to query in pull_missing_events 2018-12-04 14:24:48 -08:00
Alex Browne
a948305e7a Rename taker and maker amounts in sra_orders 2018-12-04 14:24:48 -08:00
Alex Browne
26280e4aba Implement scraping sra orders from radar relay 2018-12-04 14:24:48 -08:00
Alex Browne
55bbe1954b Preliminary work for adding RR order book scraping 2018-12-04 14:24:48 -08:00
Alex Browne
2cbb82eb04 Update schema for sra_orders 2018-12-04 14:24:48 -08:00
Jake Ellowitz
96134003e1 Pointing entities to raw schema
Fix linter issues
2018-12-04 14:25:00 -08:00
Jake Ellowitz
599a3f9b96 Mapping dev schema to initial migration 2018-12-04 14:24:48 -08:00
Alex Browne
688d277b30 Configure linter with --format stylish and fix linter errors 2018-12-04 14:24:48 -08:00
Alex Browne
329c68f610 Configure TypeORM for migrations. Add new package.json scripts. 2018-12-04 14:24:48 -08:00
Alex Browne
6fb333f200 Rename Transaction.ts to transaction.ts
Rename Relayer.ts to relayer.ts

Rename Block.ts to block.ts
2018-12-04 14:24:55 -08:00
Alex Browne
410a924495 Add better error handling for immediately invoked async functions 2018-12-04 14:24:48 -08:00
Alex Browne
53cc9e9bed Rename table and column names 2018-12-04 14:24:48 -08:00
Alex Browne
ccad046eb6 Reorganize entities. Make scripts work from any directory. 2018-12-04 14:24:48 -08:00
Alex Browne
954c3b9272 Split index.ts into multiple scripts in scripts/ and detect last known block when pulling events 2018-12-04 14:24:48 -08:00
Alex Browne
9cb89725c9 Remove unused function parameter in index.ts script 2018-12-04 14:24:48 -08:00
Alex Browne
830d0f3b21 Use bigint for gasUsed and gasPrice in Transaction 2018-12-04 14:24:48 -08:00
Alex Browne
8248fbb231 Update relayer code to use new relayer-registry format 2018-12-04 14:24:48 -08:00
Alex Browne
dca2a4e9c2 Remove outdated info from README 2018-12-04 14:24:48 -08:00
Alex Browne
21d4807206 Add build:ci to pipeline package.json 2018-12-04 14:24:48 -08:00
Alex Browne
5e22a862b7 Implement fetching and parsing relayer info 2018-12-04 14:24:48 -08:00
Alex Browne
bb440b683a Implement support for getting and parsing blocks and transactions 2018-12-04 14:24:48 -08:00
Alex Browne
d959b3e234 chore: Fix tslint config. 2018-12-04 14:24:49 -08:00
Alex Browne
aeff948c9a Fix bugs in merge_v2_events script and disable verbose logging 2018-12-04 14:24:48 -08:00
Alex Browne
7945d2ea62 Enable verbose logging 2018-12-04 14:24:48 -08:00
Alex Browne
af2546bc58 Rename index.ts -> merge_v2_events 2018-12-04 14:24:48 -08:00
Alex Browne
3a19faa5ff Update script to work with existing v1 pipeline data 2018-12-04 14:24:48 -08:00
Alex Browne
bbe1a843ef Update pipeline to use new @0x npm org for imports 2018-12-04 14:24:48 -08:00
Alex Browne
91e7485ecc Update to use ContractWrappers + Infura instead of Etherscan 2018-12-04 14:24:44 -08:00
Alex Browne
6c00dd6f39 Rebase and update to use new modularized artifacts 2018-12-04 14:24:06 -08:00
Alex Browne
ada78d140b Add tests for SRA order conversion 2018-12-04 14:24:06 -08:00
Alex Browne
6aca4e8272 Re-add missing tests 2018-12-04 14:24:06 -08:00
Alex Browne
dd093daf91 Add soruceUrl to SraOrder entity 2018-12-04 14:24:06 -08:00
Alex Browne
9ab55ccec0 Add preliminary support for scraping orders from SRA endpoints (no pagination, only RR support for now) 2018-12-04 14:24:06 -08:00
Alex Browne
71a015f2aa For event entities, rename address -> contractAddress and make it a primary key 2018-12-04 14:24:06 -08:00
Alex Browne
b0de2a388f Implement scraping and parsing exchange CancelUpTo events 2018-12-04 14:24:06 -08:00
Alex Browne
40610830da Use multi-primary keys for event and filter null logIndexes 2018-12-04 14:24:06 -08:00
Alex Browne
60bc27c616 Implement scraping and parsing exchange cancel events 2018-12-04 14:24:06 -08:00
Alex Browne
2207f09ce2 Make event parsing more functional and less class-based 2018-12-04 14:24:06 -08:00
Alex Browne
fe523e1f3f Re-organize event parsing and decoding 2018-12-04 14:24:06 -08:00
Alex Browne
9e9104578c Add support for decoding asset data 2018-12-04 14:24:06 -08:00
Alex Browne
4e6919a6e5 Add typeorm and begin inserting database records 2018-12-04 14:24:03 -08:00
Alex Browne
d71fa65359 Make contractAbi a parameter of getContractEventsAsync 2018-12-04 14:23:32 -08:00
Alex Browne
75d3f24835 Add tests for etherscan events 2018-12-04 14:23:32 -08:00
Alex Browne
2b7f94c00f Restructure pipeline package. Create data-sources dir 2018-12-04 14:23:32 -08:00
Alex Browne
cd73a047ef Remove old code. Create function for getting contract events via etherscan 2018-12-04 14:23:29 -08:00
Alex Browne
57e7119c0d Rebase pipeline branch off development 2018-12-04 14:21:42 -08:00
fragosti
8ad114c5e5 fix: instant linting issues 2018-12-04 14:11:28 -08:00
fragosti
340493a0b1 polish: reduce vertical padding in instant 2018-12-04 13:36:47 -08:00
fragosti
01e1e5ac3b chore: fix linter issues 2018-12-04 12:59:16 -08:00
fragosti
cb9f7a0664 chore: remove shark relay from possible SRA endpoints 2018-12-04 12:53:09 -08:00
fragosti
3e4b77757e hack: make min-height of line-number container 98% to prevent scrollbar from appearing in code demo 2018-12-04 12:49:37 -08:00
fragosti
110d05f645 fix: use WebsitePaths type and update wiki link to new link 2018-12-04 12:43:39 -08:00
fragosti
36f22ba069 fix: reset available tokens when sra endpoint is changed 2018-12-04 12:23:25 -08:00
fragosti
b7d804e949 fix: make select box-shadow darker 2018-12-04 11:26:51 -08:00
fragosti
f576f78b4a fix: do not show select all if no tokens are available 2018-12-04 11:22:49 -08:00
fragosti
dfe5752411 feat: update configurator snippet to actually work if copy and pasted 2018-12-04 10:58:43 -08:00
Leonid Logvinov
b1a8a5521e Merge pull request #1374 from 0xProject/feature/contracts-monorepo-4
Contracts monorepo 4
2018-12-04 17:22:25 +01:00
Leonid Logvinov
323195f4ad De-nest libs contracts 2018-12-04 17:18:10 +01:00
Leonid Logvinov
c43ba6b3c7 Merge pull request #1373 from 0xProject/feature/contracts-monorepo-3
Contracts monorepo III
2018-12-04 17:05:57 +01:00
Ezekiel Aquino
b552c2bd0c Cleanup 2018-12-04 17:00:30 +01:00
Ezekiel Aquino
ae9614ba36 Fixes Link component to user ReactRouterLink 2018-12-04 16:47:58 +01:00
Ezekiel Aquino
871ec6cfbc Adds sa bit of polish to landing page 2018-12-04 16:41:01 +01:00
Ezekiel Aquino
3c7dca37f5 Adds padding prop to text elements 2018-12-04 16:30:12 +01:00
Leonid Logvinov
8d0192c1eb Enable libs tests on CI 2018-12-04 16:07:59 +01:00
Leonid Logvinov
ac5a3fae9b Import TestLibs contract from @0x/contracts-libs 2018-12-04 16:07:59 +01:00
Leonid Logvinov
9e01f4c9a3 Refactor out libs into @0x/contracts-libs 2018-12-04 16:07:59 +01:00
Ezekiel Aquino
8acb25f577 Refactors buttons/links/header 2018-12-04 15:45:04 +01:00
Ezekiel Aquino
eec40080a0 Refactors Button component 2018-12-04 15:17:33 +01:00
Leonid Logvinov
18489161c6 Add missing dependency 2018-12-04 15:03:50 +01:00
Ezekiel Aquino
4da419cf75 Fixes all lint issues, cleanup 2018-12-04 14:58:37 +01:00
Leonid Logvinov
d63576f495 Fix homepage link 2018-12-04 14:49:01 +01:00
Leonid Logvinov
f0213f9a8e Enable contract utils tests 2018-12-04 14:42:18 +01:00
Leonid Logvinov
e8d0aff333 Refactor @0x/contracts-utils from @0x/contracts-core 2018-12-04 14:41:18 +01:00
Leonid Logvinov
79f5e36edb Merge pull request #1311 from 0xProject/feature/contracts-monorepo-2
Contracts monorepo II
2018-12-04 13:53:15 +01:00
Leonid Logvinov
a872763413 Fix calldata related linter errors 2018-12-04 13:45:19 +01:00
Leonid Logvinov
55ebb04f03 Add missing dependency 2018-12-04 13:41:17 +01:00
Leonid Logvinov
6d312f0230 Fix merge conflict 2018-12-04 13:25:37 +01:00
Leonid Logvinov
240a8a50d3 Merge branch 'development' into feature/contracts-monorepo-2 2018-12-04 12:42:28 +01:00
Leonid Logvinov
672a4b93ba Don't start the provider by default 2018-12-04 12:10:03 +01:00
fragosti
ea4155e5fa fix: change liquiditySource to orderSource 2018-12-03 18:00:30 -08:00
fragosti
d12b99883b Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/instant-configurator 2018-12-03 17:52:44 -08:00
fragosti
1498e013d0 feat: update relayer list 2018-12-03 17:52:35 -08:00
Jacob Evans
a1e985a1ca Merge pull request #1225 from 0xProject/feature/contracts/dutch-auction
Implement Basic Dutch Auction
2018-12-04 12:44:19 +11:00
fragosti
cd44dc7beb polish: make configurator inputs look more like mocks 2018-12-03 17:37:32 -08:00
fragosti
db21ae3af1 feat: fetch asset meta data from the asset meta data map 2018-12-03 17:29:31 -08:00
Brandon Millman
8c146ce231 Merge pull request #1372 from 0xProject/fix/instant/single-asset
[instant] render token selector when only one asset is available
2018-12-03 17:08:32 -08:00
Steve Klebanoff
703cea6173 Merge pull request #1370 from 0xProject/feature/instant/explicitly-enable-heap-dev
[instant] Must explicitly specify when want to send to heap when developing
2018-12-03 16:52:06 -08:00
fragosti
1ce84f9bb2 fix: address to lowercase and explore the docs leads to correct wiki 2018-12-03 16:51:55 -08:00
fragosti
48bfe92740 feat: create more dank slider 2018-12-03 16:47:52 -08:00
Brandon Millman
e592b27f77 fix(instant): render token selector when only one asset is available 2018-12-03 16:36:27 -08:00
Steve Klebanoff
1107b84949 updating .env example 2018-12-03 16:10:13 -08:00
Steve Klebanoff
7a03df946d feat(instant): Add eth balance, eth address, token symbol and decimals to event properties 2018-12-03 16:01:37 -08:00
fragosti
d8a3fc0be0 feat: make (optional) label inline 2018-12-03 15:07:24 -08:00
Brandon Millman
2601d16efb Merge pull request #1367 from 0xProject/fix/instant/dai
[asset-buyer][instant] support DAI in instant
2018-12-03 15:07:23 -08:00
Jacob Evans
098a531de8 chore: Move to new structure 2018-12-04 09:58:37 +11:00
Steve Klebanoff
239116eec4 feat(instant): have to use INSTANT_HEAP_FORCE_DEVELOPMENT to report to heap in development 2018-12-03 14:53:25 -08:00
fragosti
e966641d14 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/instant-configurator 2018-12-03 14:51:55 -08:00
Francesco Agosti
e9fe7dcf54 Merge pull request #1353 from 0xProject/feature/website/instant-marketing
[website] instant marketing page shell
2018-12-03 14:51:27 -08:00
fragosti
7086bd32ee Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/instant-configurator 2018-12-03 14:48:15 -08:00
fragosti
50bfbda79a feat: add fee percentage slider 2018-12-03 14:30:38 -08:00
Steve Klebanoff
50df67e751 Merge pull request #1295 from 0xProject/feature/instant/rollbar-env
[instant] Rollbar
2018-12-03 14:24:58 -08:00
Jacob Evans
247266b969 chore: SafeMath and if statement in getAuctionDetails 2018-12-04 09:14:00 +11:00
Jacob Evans
0bffc3d10e chore: Add RevertReasons for DutchAuction. Test revert reasons 2018-12-04 09:14:00 +11:00
Jacob Evans
a882a39937 chore: Use SafeMath where possible 2018-12-04 09:13:59 +11:00
Jacob Evans
6b1fea602e chore: Clean up documentation 2018-12-04 09:13:59 +11:00
Jacob Evans
afa24aa122 chore: Work around for Ganache timestamp bug 2018-12-04 09:13:59 +11:00
Jacob Evans
a5eb1bcc20 chore: Return excess to buyer 2018-12-04 09:13:59 +11:00
Jacob Evans
54aaee8e42 chore: update documentation 2018-12-04 09:13:59 +11:00
Jacob Evans
7934d77def chore: taker address and zrx fee test 2018-12-04 09:13:58 +11:00
Jacob Evans
cb8601676d chore: Rename price to amount. Encode parameters in makerAssetData 2018-12-04 09:13:58 +11:00
Jacob Evans
98d9a9c648 chore: time movement for geth 2018-12-04 09:13:58 +11:00
Jacob Evans
da8c27c286 feat: Dutch Auction 2018-12-04 09:13:58 +11:00
fragosti
de1c296d28 feat: add fee percentage slier 2018-12-03 12:54:29 -08:00
Brandon Millman
f076cdb832 Merge pull request #1365 from 0xProject/fix/instant/token-selector
[instant] various polish items
2018-12-03 12:48:42 -08:00
fragosti
a192b309f3 feat: implement basic feeRecipient address in config generator 2018-12-03 12:24:37 -08:00
Brandon Millman
c52d48d4db fix(instant): remove screenshot from dev index.html 2018-12-03 10:47:40 -08:00
Brandon Millman
5edc3bfd33 feat(instant): update DAI token color 2018-12-03 10:43:03 -08:00
Brandon Millman
cd4241fac8 fix(asset-buyer): update SRA order provider to include DAI 2018-12-03 10:42:25 -08:00
Francesco Agosti
3662ab2524 Merge pull request #1364 from 0xProject/feature/instant/allow-env-vars-in-env-file
[instant] Add dotenv to make env dependencies more explicit
2018-12-03 10:32:51 -08:00
Brandon Millman
57986c0e1e Merge pull request #1366 from 0xProject/feature/instant/provider-name
[instant] provide a custom wallet display name option
2018-12-03 09:56:10 -08:00
Fred Carlsen
5bf7b9b8f3 Added ecosystem page 2018-12-03 16:13:39 +01:00
Fred Carlsen
950dae0437 Added launch kit 2018-12-03 16:01:06 +01:00
Fred Carlsen
05ef537de0 Adjust team lists 2018-12-03 15:36:33 +01:00
Fred Carlsen
68d7ce1968 Add map to jobs 2018-12-03 15:31:30 +01:00
Fred Carlsen
59eca8d748 ADd content to jobs 2018-12-03 15:31:22 +01:00
Fred Carlsen
06304b30c9 Tweak line heights 2018-12-03 15:31:17 +01:00
Fred Carlsen
03962352df Updated sublinks on about 2018-12-03 14:43:43 +01:00
Fred Carlsen
1c03c9168b Added press logo 2018-12-03 14:43:26 +01:00
Fred Carlsen
b6be92e40b Updated press content 2018-12-03 14:43:19 +01:00
Fred Carlsen
06d4abf1ba Adjust thumb 2018-12-03 14:31:47 +01:00
Fred Carlsen
9349e50bb4 Add skeleton for team, press, jobs 2018-12-03 14:29:36 +01:00
Fred Carlsen
bf672272ce Update boolean values 2018-12-03 14:29:22 +01:00
Fred Carlsen
b9fbb3a725 Add color to interface 2018-12-03 14:28:49 +01:00
Fred Carlsen
64d52e2113 Misc fixes to layout 2018-12-03 14:28:42 +01:00
Fred Carlsen
e0475ce84e Added project logos 2018-12-03 14:00:54 +01:00
Leonid Logvinov
1785769916 Refactour out the contracts testing options into a separate markdown file 2018-12-03 13:50:11 +01:00
Leonid Logvinov
c5e43f8da5 Use lodash _.startsWith 2018-12-03 13:40:06 +01:00
Leonid Logvinov
8a42cea978 Remove contracts package authors from package.json 2018-12-03 13:38:46 +01:00
Fabio B
8c69a8f1fb Update packages/sol-resolver/src/resolvers/npm_resolver.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-03 13:35:57 +01:00
Fabio B
9194537085 Update packages/sol-resolver/src/resolvers/npm_resolver.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-03 13:35:03 +01:00
Fabio B
91397bf8a5 Update packages/sol-compiler/src/compiler.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-03 13:34:55 +01:00
Fabio B
a355001d13 Update packages/sol-compiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-03 13:34:45 +01:00
Fabio B
a6046bd5bb Update contracts/multisig/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-12-03 13:34:21 +01:00
Leonid Logvinov
7e4f2c6bdc Move more devDependencies of contracts-tst-utils to dependencies 2018-12-03 13:30:57 +01:00
Leonid Logvinov
958f4aa8e8 Update contracts-test-utils README 2018-12-03 13:22:08 +01:00
Leonid Logvinov
74dac18e47 Make chai-as-promised a dependency 2018-12-03 13:19:48 +01:00
Leonid Logvinov
bcb4808c96 Make sol-cov a dependency of @0x/contracts/test-utils 2018-12-03 13:09:15 +01:00
Fred Carlsen
64c5181c14 Lint fix 2018-12-03 12:51:51 +01:00
Leonid Logvinov
754be75dbf Fix hardcoded path in release notes fetching 2018-12-03 12:48:53 +01:00
Ezekiel Aquino
6f333f2b55 Fix isFullWidth type declaration in layout 2018-12-03 12:21:57 +01:00
Ezekiel Aquino
7f77347ea4 Changes boolean props to follow is[Property] syntax 2018-12-03 12:19:50 +01:00
Leonid Logvinov
5d70fe053d Rename contract_templates to abi-gen-templates 2018-12-03 12:15:53 +01:00
Leonid Logvinov
8fda11ec3a Update yarn.lock 2018-12-03 12:09:29 +01:00
Leonid Logvinov
a5b6ce6114 Fix merge conflict 2018-12-03 12:09:29 +01:00
Leonid Logvinov
0d3fb79c05 Remove unused dependencies 2018-12-03 12:09:29 +01:00
Leonid Logvinov
e70d897282 Fix package description 2018-12-03 12:09:29 +01:00
Leonid Logvinov
c638823373 Fix a typo in a prettierignore 2018-12-03 12:09:29 +01:00
Leonid Logvinov
f8399fee2f Clean up READMEs 2018-12-03 12:09:29 +01:00
Leonid Logvinov
52e63effea Remove .solhintignore 2018-12-03 12:09:29 +01:00
Leonid Logvinov
a219a8c911 Remove CHANGELOG entries 2018-12-03 12:09:29 +01:00
Leonid Logvinov
de39ec3c97 Remove duplicates combinatorial utils from core contracts 2018-12-03 12:09:28 +01:00
Leonid Logvinov
665a855548 Ignore generated files in multisig contracts 2018-12-03 12:09:28 +01:00
Leonid Logvinov
91d2cbfa0a Run both core and multisig contracts tests on CI 2018-12-03 12:09:28 +01:00
Leonid Logvinov
68b0f71d26 Fix linter issues 2018-12-03 12:09:28 +01:00
Leonid Logvinov
91c89d90a5 Use assetProxyOwner instead of the multisig in the core contracts tests 2018-12-03 12:09:28 +01:00
Leonid Logvinov
980e3cb82f Remove multisig contracts from the core list of contracts 2018-12-03 12:09:28 +01:00
Leonid Logvinov
eefb1cfe5d Fix an issue when we tried to append base contracts path to absolute imports (NPM) in sol-compiler 2018-12-03 12:09:28 +01:00
Leonid Logvinov
5b0746a8ef Add support for scoped packages resolving to NPMResoler 2018-12-03 12:09:28 +01:00
Leonid Logvinov
0faa8b3231 Refactor contracts-core into contracts-multisig, contracts-core and contracts-test-utils 2018-12-03 12:09:28 +01:00
Leonid Logvinov
450c72035f Replace packages/contracts with contracts/core 2018-12-03 12:09:28 +01:00
Leonid Logvinov
5a16e78b54 Merge pull request #1310 from 0xProject/feature/contracts-monorepo
Contracts monorepo I
2018-12-03 12:07:41 +01:00
Leonid Logvinov
6d0c71ef30 Move MultiAssetProxy to the contracts monorepo 2018-12-03 11:52:21 +01:00
Leonid Logvinov
e015f470dd Remove generated files 2018-12-03 11:33:05 +01:00
Leonid Logvinov
d142413745 Rename calldata to callData because solhint doesn't like calldata (probably reserved keyword) and goes nuts 2018-12-03 11:33:04 +01:00
Leonid Logvinov
e339e1182d Update yarn.lock 2018-12-03 11:31:54 +01:00
Leonid Logvinov
9bee3eba76 Add contracts to yarn workspaces 2018-12-03 11:31:54 +01:00
Leonid Logvinov
866c946b92 Replace packages/contracts with contracts/core 2018-12-03 11:31:54 +01:00
Leonid Logvinov
8f9a246f48 Add contracts/* to monorepo routes 2018-12-03 11:31:54 +01:00
Leonid Logvinov
4668b0732c Move packages/contracts to contracts/core 2018-12-03 11:31:53 +01:00
Ezekiel Aquino
9ed30fbcca Adds note to layout section 2018-12-03 11:24:22 +01:00
Ezekiel Aquino
1fab30ef80 A bit of formatting, centeres instant text 2018-12-03 11:15:34 +01:00
Ezekiel Aquino
62eba1e820 Uses layout elems in header 2018-12-03 11:10:33 +01:00
Ezekiel Aquino
78703ab370 Some comments and cleanup 2018-12-03 10:54:48 +01:00
Brandon Millman
f4e0f74a6d feat(instant): provide a custom wallet display name 2018-12-01 01:15:01 -08:00
Brandon Millman
6f44944ffd fix(instant): darken overlay color 2018-12-01 00:47:07 -08:00
Brandon Millman
074944247d feat(instant): add token symbol to buy button text 2018-12-01 00:22:09 -08:00
Brandon Millman
593ed12d91 fix(instant): update zrx icon 2018-12-01 00:06:36 -08:00
Brandon Millman
c0f4a35cfd fix(instant): DGD and DGX colors 2018-12-01 00:04:57 -08:00
Brandon Millman
800016b430 fix(instant) various token selector fixes 2018-12-01 00:03:07 -08:00
fragosti
937235c4fd feat: add dotenv to make env dependencies more explicit 2018-11-30 16:26:19 -08:00
fragosti
4b6ac96a8d fix: use correct styles even when syntax highlighter component removes classnames on second render 2018-11-30 16:01:16 -08:00
Francesco Agosti
502e9c7be4 Merge pull request #1362 from 0xProject/fix/instant/push-to-history-broken-when-no-onpopstate
[instant] Fix push to history issue on second full render of instant
2018-11-30 16:00:30 -08:00
Steve Klebanoff
91b0fd9517 Fix variable name 2018-11-30 14:19:07 -08:00
Steve Klebanoff
6a3f295b1f Take out https:// prefix 2018-11-30 14:16:49 -08:00
Steve Klebanoff
d9b4b0e0f3 Merge branch 'development' into feature/instant/rollbar-env 2018-11-30 14:16:02 -08:00
Steve Klebanoff
c342940b5d get rid of double private def 2018-11-30 14:09:51 -08:00
Steve Klebanoff
b19700221f update with new CDN 2018-11-30 14:09:43 -08:00
Steve Klebanoff
ef041d1603 Merge branch 'feature/instant/prod-env-switches-cdn' into feature/instant/rollbar-env 2018-11-30 14:09:23 -08:00
fragosti
e47dd4a83e chore: lint 2018-11-30 13:47:47 -08:00
fragosti
9ebe8d63c8 fix: push to history edge case for second render where onpopstate is not defined on first render 2018-11-30 13:34:03 -08:00
Steve Klebanoff
94d81bd562 Merge pull request #1359 from 0xProject/feature/instant/prod-env-switches-cdn
[instant] CDN-approach to identifying environments
2018-11-30 13:12:06 -08:00
Steve Klebanoff
34b2f4736e removing unused references 2018-11-30 12:58:42 -08:00
Steve Klebanoff
f8daacc19a Merge pull request #1342 from 0xProject/feature/instant/misc-close-analytics
[instant] Close and View Transaction analytics events
2018-11-30 12:52:06 -08:00
Steve Klebanoff
d77efb611e Remove env var check for INSTANT_HEAP_ANALYTICS_ID_PRODUCTION since this is only needed on discharge 2018-11-30 12:49:07 -08:00
Steve Klebanoff
de8dcf9a72 takeout console.log 2018-11-30 12:47:16 -08:00
Steve Klebanoff
12d34707b7 Merge branch 'development' into feature/instant/prod-env-switches-cdn 2018-11-30 12:47:05 -08:00
Steve Klebanoff
ab631060a0 cdn -> dischargeTarget, and report to heap 2018-11-30 12:42:40 -08:00
Francesco Agosti
f496096ce1 Merge pull request #1348 from 0xProject/feature/instant/cdn-setup
[instant] Remove commonjs bundle, productionize UMD bundle
2018-11-30 12:36:22 -08:00
fragosti
fc2055cd93 feat: remove instant from project references 2018-11-30 12:26:59 -08:00
Francesco Agosti
ca22d87290 Merge pull request #1351 from 0xProject/fix/instant/instant-bounces-on-error
[instant] Fix instant bouncing around / height changes, don't allow labels to wrap
2018-11-30 12:19:54 -08:00
fragosti
d6ba7298d4 chore: deploy_live -> deploy_production 2018-11-30 11:59:59 -08:00
fragosti
ea11e8c62d Merge branch 'development' of https://github.com/0xProject/0x-monorepo into fix/instant/instant-bounces-on-error 2018-11-30 11:58:05 -08:00
fragosti
a7fc5975c1 feat: update tsconfig 2018-11-30 11:28:26 -08:00
fragosti
09813cb1d8 fix: address PR feedback 2018-11-30 11:20:07 -08:00
fragosti
9e69257b0d feat: implement code generation 2018-11-30 11:08:49 -08:00
fragosti
e65096ee7a feat: implement multi token select component 2018-11-30 10:25:36 -08:00
Daniel Pyrathon
a1d4aa66bc feat(order_utils.py): schema resolver cache (#1317)
* Implemented basic functionality for using cache layer of LocalRefResolver

* Use `importlib` instead of `imp`, since it's been deprecated. Legacy `load_module()` reloads modules even if they are already imported, causing tests to fail when run in non-deterministic ordering, so we replace it with `import_module()`
2018-11-30 12:59:37 -05:00
Steve Klebanoff
6c941eebea add missing import from merge 2018-11-30 08:40:25 -08:00
Ezekiel Aquino
435d9e47e3 ThemeProvider 2018-11-30 17:07:51 +01:00
Ezekiel Aquino
5c12e664a9 WIP themeprovider 2018-11-30 16:25:54 +01:00
Fred Carlsen
46422ff783 Linting 2018-11-30 16:04:13 +01:00
Fred Carlsen
3a13286585 Added about / mission 2018-11-30 16:04:13 +01:00
Fred Carlsen
c98c8b1ded Prevent compiler from stopping on ts warning 2018-11-30 16:04:12 +01:00
Fred Carlsen
de0b5772bf Linting 2018-11-30 16:04:12 +01:00
Fred Carlsen
dbf62ae205 Correct font-weight for heading 2018-11-30 16:04:12 +01:00
Ezekiel Aquino
7962e4050c Breakpoint on padding 2018-11-30 15:23:26 +01:00
Ezekiel Aquino
6bf9889429 Types return on layout methods 2018-11-30 15:11:09 +01:00
Fred Carlsen
7f8b9ef1f7 Add cta 2018-11-30 15:09:57 +01:00
Fred Carlsen
e91fffd005 Make buttons align 2018-11-30 15:09:57 +01:00
Fred Carlsen
7314fd7252 Link products to 0x instant for now 2018-11-30 15:09:57 +01:00
Fred Carlsen
247a69aaec Added 0x instant skeleton 2018-11-30 15:09:57 +01:00
Fred Carlsen
d78ac3f157 Fix icon warnings 2018-11-30 15:09:57 +01:00
Fred Carlsen
315584ef51 Contain images 2018-11-30 15:09:57 +01:00
Ezekiel Aquino
57e539ed41 Allows margin to be passed variable integers as values, adds comments 2018-11-30 15:07:42 +01:00
Ezekiel Aquino
db1babd5be Makes ts happy with running a function on an optional property value 2018-11-30 14:56:19 +01:00
Ezekiel Aquino
bb63c5c86f Adds proposal for padding prop on Wrappers 2018-11-30 14:55:13 +01:00
Ezekiel Aquino
82d6f2150b Adds wrapGrid, bit of cleanup 2018-11-30 14:35:17 +01:00
Ezekiel Aquino
5f177108d1 Cleanup 2018-11-30 14:19:23 +01:00
Ezekiel Aquino
46aa446a61 Just fixes those warnings on icons 2018-11-30 14:19:23 +01:00
Fred Carlsen
0883f7087b Remove double reference 2018-11-30 14:18:11 +01:00
Fred Carlsen
e782262572 Add route links to header 2018-11-30 14:17:02 +01:00
Ezekiel Aquino
2ba14d656e Some cleanup, reindent 2018-11-30 14:13:31 +01:00
Ezekiel Aquino
0c2848c418 Adds ts caching 2018-11-30 14:04:39 +01:00
Ezekiel Aquino
47ef28f88f Adds awcache to gitignore 2018-11-30 14:04:39 +01:00
Fred Carlsen
e81bd1b7f0 Speed up ts loading with cache 2018-11-30 13:57:33 +01:00
Fred Carlsen
929eb45699 Linting 2018-11-30 13:36:01 +01:00
Fred Carlsen
4456ba0f6a Fix tag 2018-11-30 13:10:15 +01:00
Fred Carlsen
d6329a83d5 Linting errors 2018-11-30 13:08:36 +01:00
Ezekiel Aquino
203baa4541 Replaces Text elements in why route 2018-11-30 12:28:56 +01:00
Ezekiel Aquino
e13406cbf4 Just makes it render 2018-11-30 12:15:20 +01:00
Ezekiel Aquino
df213ac0d5 Text and landing 2018-11-30 12:13:24 +01:00
Fred Carlsen
4d7db045e9 Tweak text 2018-11-30 12:05:56 +01:00
Fred Carlsen
849b744185 Linting + typing 2018-11-30 12:05:51 +01:00
Fred Carlsen
7161e8fed9 Tweak submit position 2018-11-30 12:05:40 +01:00
Fred Carlsen
1105d76861 Linting format 2018-11-30 12:05:31 +01:00
Fred Carlsen
9b6d738ab1 Tweak global styles 2018-11-30 12:05:21 +01:00
Fred Carlsen
d586c1f67a Added coin icon 2018-11-30 12:05:14 +01:00
Fred Carlsen
fff4dd7e94 Export svgs as typed pure components 2018-11-30 12:05:08 +01:00
Fred Carlsen
c2d9585150 Linter fixes 2018-11-30 10:47:26 +01:00
Fred Carlsen
3586dde480 Started on why 0x 2018-11-30 09:58:20 +01:00
Fred Carlsen
d6b92e5786 Add center prop to text 2018-11-30 09:58:20 +01:00
Fred Carlsen
ab24dcc290 Hide trade button on mobile 2018-11-30 09:58:20 +01:00
Fred Carlsen
189920eab9 Added newsletter form to footer 2018-11-30 09:58:20 +01:00
Fred Carlsen
83499176d9 Adjust global font size 2018-11-30 09:58:20 +01:00
Fred Carlsen
5294c31997 Format styles 2018-11-30 09:58:20 +01:00
fragosti
f1354632a1 feat: implement available token fetching 2018-11-29 18:42:25 -08:00
fragosti
7fe27e903b feat: add MultiSelect component skeleton 2018-11-29 17:21:53 -08:00
fragosti
f80768cae0 feat: add Select component and use for configurator 2018-11-29 15:57:35 -08:00
Steve Klebanoff
702dbbae54 Merge branch 'development' into feature/instant/misc-close-analytics 2018-11-29 15:45:35 -08:00
Steve Klebanoff
fc3641b499 Merge pull request #1343 from 0xProject/feature/instant/quote-analytics
[instant] Quote analytics
2018-11-29 15:44:07 -08:00
Steve Klebanoff
e59d47eac8 Take out old --env 2018-11-29 15:32:05 -08:00
Steve Klebanoff
d99bdcf036 cdn approach to identifyign environments 2018-11-29 15:13:55 -08:00
Steve Klebanoff
4616c51e19 Fix build command 2018-11-29 14:36:05 -08:00
Steve Klebanoff
d4c439b277 Merge pull request #1345 from 0xProject/fix/instant/progress-bar-bg
[instant] Progress bar background
2018-11-29 14:34:14 -08:00
fragosti
0af07bcf49 feat: move instant base config to types file 2018-11-29 14:10:12 -08:00
fragosti
a41dfa9ae0 feat: implement configurator layout 2018-11-29 13:45:40 -08:00
fragosti
09e2157639 feat: factor out ActionLink component from features 2018-11-29 13:45:29 -08:00
fragosti
6f394128d4 feat: improve styling of code demo component 2018-11-29 13:01:41 -08:00
Steve Klebanoff
bd03df8af0 feat(instant): Cleaner config-specific setup 2018-11-29 12:05:20 -08:00
fragosti
ea61c7a5db feat: have basic code syntax highlighting working 2018-11-29 11:23:16 -08:00
Amir Bandeali
a864328ecf Merge pull request #1303 from 0xProject/feature/contracts/optimizedAbiEncoder
Optimized ABI Encoder
2018-11-29 10:06:04 -08:00
Steve Klebanoff
2b87d20290 Set .env in builds, and update profile to use 0xproject 2018-11-29 09:55:30 -08:00
Fabio Berger
b68273e592 Fix import export so that it works with doc gen 2018-11-29 17:30:21 +00:00
Steve Klebanoff
5c66f9117f assetAmount -> assetBuyAmount 2018-11-29 08:19:39 -08:00
Steve Klebanoff
64e2b91482 Merge pull request #1346 from 0xProject/fix/instant/token-selector-hover
[instant] Half opacity on clickable text hover
2018-11-29 08:16:34 -08:00
Steve Klebanoff
ecc417069d Merge pull request #1347 from 0xProject/fix/instant/input-react-warning
[instant] Fix uncontrolled input warning for token selector
2018-11-29 08:15:33 -08:00
Ezekiel Aquino
b461147389 Adds buttonWrapper 2018-11-29 15:51:27 +01:00
Ezekiel Aquino
1d0d4ca147 Removes text-decoration on buttons 2018-11-29 15:46:12 +01:00
Ezekiel Aquino
2103d5c3ed Cleans up Button 2018-11-29 15:45:30 +01:00
Fred Carlsen
a21bca7cf4 Cleanup button component 2018-11-29 15:34:26 +01:00
Fred Carlsen
200da7d22c Fix type def 2018-11-29 15:26:21 +01:00
Ezekiel Aquino
a114cf5c2e Introduces WrapCentered 2018-11-29 15:17:00 +01:00
Ezekiel Aquino
4bc5881e9a Tests flush width sections 2018-11-29 15:08:24 +01:00
Ezekiel Aquino
a9d413728e Ooops fixes that 2018-11-29 14:59:20 +01:00
Ezekiel Aquino
e10d34cdfc Enables fullwidth sections. As in edge-to-edge 2018-11-29 14:58:30 +01:00
Ezekiel Aquino
96b9ffc847 Adds fullWidth prop to sections 2018-11-29 14:52:13 +01:00
Fred Carlsen
9d850cea14 Updated text 2018-11-29 14:39:07 +01:00
Ezekiel Aquino
0e7329bcec Tweaks button 2018-11-29 14:36:35 +01:00
Ezekiel Aquino
b564f090f9 Edits button.js 2018-11-29 14:34:06 +01:00
Ezekiel Aquino
ec099dd009 Adds notes to button 2018-11-29 14:33:27 +01:00
Fred Carlsen
0577a0dbc5 Remove export of interface 2018-11-29 14:26:52 +01:00
Fred Carlsen
1bba985124 Add text and illustrations for home 2018-11-29 14:18:19 +01:00
Fred Carlsen
8bcb5b00ba Add transparent button 2018-11-29 14:18:04 +01:00
Fred Carlsen
d0fa615f32 Add transparent button 2018-11-29 13:31:04 +01:00
Fred Carlsen
ef6cffd9d9 Fix linting and typing errors in footer 2018-11-29 11:48:47 +01:00
Fred Carlsen
aa4234a38c WIP landing and button changes 2018-11-29 10:55:34 +01:00
Ezekiel Aquino
9b794c00ea Quick test responsive cols 2018-11-29 09:58:08 +01:00
Ezekiel Aquino
03289293c3 Fixes interface syntax 2018-11-29 09:33:06 +01:00
Ezekiel Aquino
0736ba7159 Adds key to mapped footer elems 2018-11-29 09:23:19 +01:00
Ezekiel Aquino
44ac385e8b Make dev layout guidelines less obtrusive 2018-11-29 09:12:12 +01:00
Ezekiel Aquino
512b483b6f Refactors footer to use layout system 2018-11-29 09:06:39 +01:00
Ezekiel Aquino
5a9755da9b Fix colwidth layout calc 2018-11-29 08:53:25 +01:00
Ezekiel Aquino
be39c5ba99 Moves content wrap to layout.tsx 2018-11-29 08:52:13 +01:00
Ezekiel Aquino
0c5b645e86 Edits column width calc method 2018-11-29 08:46:49 +01:00
Greg Hysen
bcb2af2861 Ran prettier 2018-11-28 17:30:02 -08:00
Francesco Agosti
906bba7d75 Merge pull request #1352 from 0xProject/fix/instant/token-symbol-size
[instant] Notify of the used font size for re-renders of scaling input
2018-11-28 17:06:33 -08:00
Greg Hysen
b15531fe68 Changelog for ABI Encoder 2018-11-28 16:40:03 -08:00
fragosti
42e83ae643 fix: add clarification to NOTE in README 2018-11-28 16:39:27 -08:00
fragosti
b55f7aef7f feat: add URL to other parts of README 2018-11-28 16:38:21 -08:00
Greg Hysen
04503200e5 Linter / Prettier 2018-11-28 16:38:11 -08:00
Greg Hysen
2da7cadefa Explicit imports for calldata 2018-11-28 16:38:11 -08:00
Greg Hysen
b8ea322541 Explicit imports for abstract data types. 2018-11-28 16:38:11 -08:00
Greg Hysen
a172ab158e Explicit imports for EVM Data Types 2018-11-28 16:38:11 -08:00
Greg Hysen
5c13353fb2 Optimize calldata by default. 2018-11-28 16:38:11 -08:00
Greg Hysen
d6645b8a91 Explicit encoding rules in tests. 2018-11-28 16:38:11 -08:00
Greg Hysen
029b8d5950 Changed constants to an exported enum; this is 0x convention 2018-11-28 16:38:11 -08:00
Greg Hysen
14c094d050 Use SolidityTypes from ethereum-types package. 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
e7bdf4717d Fixed build error: was using this instead of class name to reference a static function that used to be an instance method. 2018-11-28 16:38:11 -08:00
Greg Hysen
f479212410 Style cleanup. Improved wording of some error messages. 2018-11-28 16:38:11 -08:00
Greg Hysen
ffb8b0a619 Changed remaining instances of implicit bool casts to explicit lodash calls 2018-11-28 16:38:11 -08:00
Greg Hysen
1f693ea121 Changed from <string>.startsWith to _.startsWith 2018-11-28 16:38:11 -08:00
Greg Hysen
3f545da9f8 Switched implicit conversions to explicit lodash calls 2018-11-28 16:38:11 -08:00
Greg Hysen
f31d4ddffd Replaced null/undefined checks with lodash 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
ad1b5af4e5 Ran prettier 2018-11-28 16:38:11 -08:00
Greg Hysen
feb551a02e Comments to Set datatype 2018-11-28 16:38:11 -08:00
Greg Hysen
a8d707b462 Linter on Calldata 2018-11-28 16:38:11 -08:00
Greg Hysen
3bf5a4e83f Moved some consts outside of a loop 2018-11-28 16:38:11 -08:00
Greg Hysen
50344fa24a Added inline documentation for Calldata class 2018-11-28 16:38:11 -08:00
Greg Hysen
bab1c92c70 Linter for Calldata Block Iterator 2018-11-28 16:38:11 -08:00
Greg Hysen
8f73f53c95 Moved calldata iterator logic into its own iterator clas 2018-11-28 16:38:11 -08:00
Greg Hysen
9a51af46ee Payload -> Blob, Dependent -> Pointer, Member -> Set 2018-11-28 16:38:11 -08:00
Greg Hysen
bb4d02e413 Comments for Address 2018-11-28 16:38:11 -08:00
Greg Hysen
22ce3e2e29 Comments for Array 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
ebaf9dd275 Removed abstract Number class. 2018-11-28 16:38:11 -08:00
Greg Hysen
d2d89adbdd Abstracted out encoding/decoding of numeric values into its own utility. Could be useful elsewhere. 2018-11-28 16:38:11 -08:00
Greg Hysen
58a2dfbc4d Final rounds on evm data types 2018-11-28 16:38:11 -08:00
Greg Hysen
173fc1dcef Moved encoder selector check into DataType 2018-11-28 16:38:11 -08:00
Greg Hysen
dd8bb6d08b Made default encoding/decoding rules global to all modules in encoder 2018-11-28 16:38:11 -08:00
Greg Hysen
dc7092e1eb Removed mapDataItemToDataType from Factory. Now its just ::create() 2018-11-28 16:38:11 -08:00
Greg Hysen
c638151b73 Some minor cleanup in ABI Encoder 2018-11-28 16:38:11 -08:00
Greg Hysen
978a58105c Prepended front to function names in Queue 2018-11-28 16:38:11 -08:00
Greg Hysen
dcc439c2e3 Ran prettier 2018-11-28 16:38:11 -08:00
Greg Hysen
a895dacd4e moved abi encoder constants into utils dir 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
fee67326ad Merge above 2018-11-28 16:38:11 -08:00
Greg Hysen
a47901370b Ran prettier 2018-11-28 16:38:11 -08:00
Greg Hysen
d4d917f350 Ran prettier 2018-11-28 16:38:11 -08:00
Greg Hysen
aed8b083b5 Split Calldata into multiple files - 1 class per file 2018-11-28 16:38:11 -08:00
Greg Hysen
e6ab6f38ba Split EVM data types and factory 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
29d63cdf97 Fixed linter errors in package.json 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
0ed1819143 Fixed linter errors on evm_data_types 2018-11-28 16:38:11 -08:00
Greg Hysen
406b5739be Fixed linter errors on data_type.ts 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
0f7abcd59b Moved global constants to separate file 2018-11-28 16:38:11 -08:00
Greg Hysen
2164b34bf9 Ran linter on Calldata 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
0c0bcb44d3 All 71 tests passing. Both for function encoding and individual types. 2018-11-28 16:38:10 -08:00
Greg Hysen
b213cb3974 Temporary change for testing functions 2018-11-28 16:38:10 -08:00
Greg Hysen
5b187935dc tests for String 2018-11-28 16:38:10 -08:00
Greg Hysen
d70d07366f Tests for Static Bytes 2018-11-28 16:38:10 -08:00
Greg Hysen
9a0bd05c4c Unsigned Integers 2018-11-28 16:38:10 -08:00
Greg Hysen
666075a87e Tests for Integer (tested 256 / 32 bit integers) 2018-11-28 16:38:10 -08:00
Greg Hysen
b28f26916f Tests for Bool 2018-11-28 16:38:10 -08:00
Greg Hysen
a2ad15be0d Tests for Address 2018-11-28 16:38:10 -08:00
Greg Hysen
a630312074 Tests for Tuple 2018-11-28 16:38:10 -08:00
Greg Hysen
bc538c71fc Tests - Encode/Decode Array 2018-11-28 16:38:10 -08:00
Greg Hysen
880540f4b8 Fixed issue with decoding negative ints with width < 256 2018-11-28 16:38:10 -08:00
Greg Hysen
8a8b904a29 Use new ABI Encoder for contracts 2018-11-28 16:38:10 -08:00
Greg Hysen
ebd4dbc6c6 Exports AbiEncoder as 1 unit 2018-11-28 16:38:10 -08:00
Greg Hysen
1f9ea7ed1b Removed unnecessary imports from abi encoder tets 2018-11-28 16:38:10 -08:00
Greg Hysen
5b0d554f7b Moved Abi Encoder into utils package 2018-11-28 16:38:10 -08:00
Greg Hysen
71c050375b Restructured to use index.ts for easier imports by client 2018-11-28 16:38:10 -08:00
Greg Hysen
1f22ce6061 Removed config.ts 2018-11-28 16:38:10 -08:00
Greg Hysen
3ae434c31e Adding optimizer tests 2018-11-28 16:38:10 -08:00
Greg Hysen
063871e549 removed old log messages 2018-11-28 16:38:10 -08:00
Greg Hysen
2d2255e9af Cleaner interface for encoding/decoding. Moved encode/decode parameters into a struct. 2018-11-28 16:38:10 -08:00
Greg Hysen
93e967c3b3 Some tests 2018-11-28 16:38:10 -08:00
Greg Hysen
b71577cc52 More robust implementation for optimizer 2018-11-28 16:38:10 -08:00
Greg Hysen
27cb966991 Alias now points to dependency, not pointer 2018-11-28 16:38:10 -08:00
Greg Hysen
457cb1dc84 optimizer works for basic case 2018-11-28 16:38:10 -08:00
Greg Hysen
7c733662e2 Annotated calldata (draft). 2018-11-28 16:38:10 -08:00
Greg Hysen
52474a0b8e decoding with objects as structs works 2018-11-28 16:38:10 -08:00
Greg Hysen
2a6b358717 Decoder works for uints with width less than 256 2018-11-28 16:38:10 -08:00
Greg Hysen
c5d252ba4a decoding works for most cases 2018-11-28 16:38:10 -08:00
Greg Hysen
9b1f56c968 Decoding works for some basic typs 2018-11-28 16:38:10 -08:00
Greg Hysen
13d456fda1 removed old code 2018-11-28 16:38:10 -08:00
Greg Hysen
a9e3d489d6 Tests for nested tuples -- couldnt test because not supported by reference ABI encoder 2018-11-28 16:38:10 -08:00
Greg Hysen
707a93e9f9 Refactor passing all regression tests 2018-11-28 16:38:10 -08:00
Greg Hysen
bb7dd23738 passing 18 tests 2018-11-28 16:38:10 -08:00
Greg Hysen
59206c387e Works for types with default widths 2018-11-28 16:38:10 -08:00
Greg Hysen
20f1526c7d arrays working 2018-11-28 16:38:10 -08:00
Greg Hysen
addfe85f08 passing tests slowly but surely 2018-11-28 16:38:10 -08:00
Greg Hysen
58177060a4 works for simple case 2018-11-28 16:38:10 -08:00
Greg Hysen
3027e6bc0d resolved issue with value.greaterThan 2018-11-28 16:38:10 -08:00
Greg Hysen
41e01e9806 making progress on basic example 2018-11-28 16:38:10 -08:00
Greg Hysen
0835cf0ea2 Refactor Builds! 2018-11-28 16:38:10 -08:00
Greg Hysen
1f7fbcf52c Should build? TBD! 2018-11-28 16:38:10 -08:00
Greg Hysen
2802aed79c refactored implementation done but not tested 2018-11-28 16:38:10 -08:00
Greg Hysen
78498b7019 Initial port -- wont compile yet 2018-11-28 16:38:10 -08:00
Greg Hysen
1ca23b35ab complex type tesst 2018-11-28 16:38:10 -08:00
Greg Hysen
8b91727364 types with default widths 2018-11-28 16:38:10 -08:00
Greg Hysen
8f61f6d0f9 Arrays of tuples 2018-11-28 16:38:10 -08:00
Greg Hysen
180d1ca63a multidimensional arrays with dynamic objects 2018-11-28 16:38:10 -08:00
Greg Hysen
e59669c949 multidimensional arrays with static type 2018-11-28 16:38:10 -08:00
Greg Hysen
687e6ccdd3 Got the crazy ABI working 2018-11-28 16:38:10 -08:00
Greg Hysen
3bc45395cc static vs dynamic tuple differentatiion 2018-11-28 16:38:10 -08:00
Greg Hysen
e95aa617b6 All existing ABI tests passing 2018-11-28 16:38:10 -08:00
Greg Hysen
637ab1076a ABI Encoding for all combinations of arrays 2018-11-28 16:38:10 -08:00
Greg Hysen
a13099bde3 hack for static arrays 2018-11-28 16:38:10 -08:00
Greg Hysen
1600820dea static array abi tests 2018-11-28 16:38:10 -08:00
Greg Hysen
993c5f4b4a Another passing simple Abi 2 2018-11-28 16:38:10 -08:00
Greg Hysen
af27dd6fe4 tests for tuple 2018-11-28 16:38:10 -08:00
Greg Hysen
02f37fa2d9 Works for encoding arrays 2018-11-28 16:38:10 -08:00
Greg Hysen
2b4febe337 switched from depth-first to breadth-first param binding 2018-11-28 16:38:10 -08:00
Greg Hysen
9f35096fa9 corrected selector for Array 2018-11-28 16:38:10 -08:00
Greg Hysen
39fa26b2f3 arrays with dynamic size 2018-11-28 16:38:10 -08:00
Greg Hysen
7de7fe7823 Array of basic types works 2018-11-28 16:38:10 -08:00
Greg Hysen
5053c19599 constructor for an Array + a test -- appears to work 2018-11-28 16:38:10 -08:00
Greg Hysen
f35cf03030 implemented bytes (dynamic) 2018-11-28 16:38:10 -08:00
Greg Hysen
91a08b9fdd Static bytes tests 2018-11-28 16:38:10 -08:00
Greg Hysen
cef254fa8c tests for unsigned integer 2018-11-28 16:38:10 -08:00
Greg Hysen
e2b115a15c refactored UInt/Int 2018-11-28 16:38:10 -08:00
Greg Hysen
f6cf3de1c4 Implemented int 2018-11-28 16:38:10 -08:00
Greg Hysen
ef5ba0375a Implemented bool type 2018-11-28 16:38:10 -08:00
Greg Hysen
dfa9e435af Implemented Address 2018-11-28 16:38:10 -08:00
Greg Hysen
fc0e7b1132 cleaner bind 2018-11-28 16:38:10 -08:00
Greg Hysen
b99252baae ABI encodes some basic types correctly 2018-11-28 16:38:10 -08:00
Greg Hysen
7196046e2f Prints full ABI encoding for subset of types, with off by factor of 2 for offsets 2018-11-28 16:38:10 -08:00
Greg Hysen
96bcc7e332 Going towards first calldata impl 2018-11-28 16:38:10 -08:00
Greg Hysen
d5dbd8cd68 tests for String 2018-11-28 16:38:10 -08:00
Greg Hysen
bce62056d9 cleaner name/type for pointer 2018-11-28 16:38:10 -08:00
Greg Hysen
331cca37e2 works for assigning value to uint 2018-11-28 16:38:10 -08:00
Greg Hysen
a1cff862c9 Fixed width parsing for UINT 2018-11-28 16:38:10 -08:00
Greg Hysen
79126f3b4a renamed 2018-11-28 16:38:10 -08:00
Greg Hysen
77d6594ecb Plugging away at encoder 2018-11-28 16:38:10 -08:00
fragosti
7625935222 feat: write version info directly to exported object 2018-11-28 16:36:52 -08:00
Brandon Millman
0f01e31cc3 feat(website): implement rest of links 2018-11-28 14:59:23 -08:00
Amir Bandeali
1eb19ca1ec Merge pull request #1224 from 0xProject/feature/contracts/multiAssetProxy
Implement MultiAssetProxy
2018-11-28 14:33:07 -08:00
Steve Klebanoff
6222c952c3 Merge branch 'development' into feature/instant/quote-analytics 2018-11-28 14:25:42 -08:00
Steve Klebanoff
b9c983b4d6 Use base unit value 2018-11-28 14:24:02 -08:00
Steve Klebanoff
208ee935c8 Move fetch origin out of options 2018-11-28 14:17:26 -08:00
Steve Klebanoff
ec01893e9c fetchedVia -> fetchOrigin 2018-11-28 14:11:53 -08:00
Steve Klebanoff
f4cc14f438 QuoteFetchedVia -> QuoteFetchOrigin 2018-11-28 14:11:06 -08:00
Steve Klebanoff
e5b09ba2fd Merge pull request #1341 from 0xProject/feature/instant/install-analytics
[instant] Install Wallet analytic events
2018-11-28 14:01:07 -08:00
Steve Klebanoff
105dcd73e4 fix(instant): Progress bar background color should be 10% primary color 2018-11-28 13:58:41 -08:00
Brandon Millman
63cb312c7f feat(website): implement link directly to configure 2018-11-28 13:46:41 -08:00
fragosti
85d1dba1ef fix: notify of the used font size for re-renders of scaling input 2018-11-28 13:35:38 -08:00
Brandon Millman
e1c237a8e4 feat(website): optionally show configurator 2018-11-28 13:25:53 -08:00
Brandon Millman
9608d6fc71 feature(website): add configurator shell 2018-11-28 13:23:28 -08:00
fragosti
7479a7db58 fix: dont allow price labels to wrap 2018-11-28 13:16:09 -08:00
fragosti
6e3378d79f fix: instant height change on loading state change 2018-11-28 13:09:19 -08:00
fragosti
1375d694ac fix: instant error no longer makes instant move 2018-11-28 13:09:05 -08:00
Brandon Millman
045336042f fix(website): instant marketing page need more background color 2018-11-28 12:57:07 -08:00
Brandon Millman
0a1425d8d8 fix(website): instant marketing page shadows 2018-11-28 12:52:01 -08:00
Brandon Millman
7daf995e0d fix(website): change instant marketing page styling to non mono font except the 0 in 0x 2018-11-28 11:10:17 -08:00
fragosti
8b05db3510 feat: add deploy_live command 2018-11-28 11:07:32 -08:00
Brandon Millman
c2fd6745ee chore(website): random fixes for mobile optimization 2018-11-28 10:59:54 -08:00
Brandon Millman
a747abcb73 feat(website): add extra assets for instant marketing page 2018-11-28 10:59:54 -08:00
Brandon Millman
92a4b09b05 feat(website): fix screenshots in marketing page for small screens 2018-11-28 10:59:54 -08:00
Brandon Millman
6c76731408 feat(website): need more section for instant marketing page 2018-11-28 10:59:54 -08:00
Brandon Millman
3d88b7f289 feature(website): add links to instant marketing page 2018-11-28 10:59:54 -08:00
Brandon Millman
d3e6f78fdb fix(website): update instant page CTA font 2018-11-28 10:59:54 -08:00
Brandon Millman
16ddd21a5f feat(website): instant features section 2018-11-28 10:59:54 -08:00
Brandon Millman
6c43fa8f72 feat(website): add screenshots to instant page 2018-11-28 10:59:54 -08:00
Brandon Millman
8a4e5dfb68 feat(website): implement introducing 0x instant header 2018-11-28 10:59:54 -08:00
Brandon Millman
f83c4c51c7 feat(website): add header and footer to instant page 2018-11-28 10:59:54 -08:00
Brandon Millman
7a726e2740 feat(website): scaffolding for instant page 2018-11-28 10:59:54 -08:00
fragosti
5415d1589e feat: write version info to window 2018-11-28 10:58:41 -08:00
Steve Klebanoff
3c000e70e3 Linting 2018-11-28 10:48:38 -08:00
Steve Klebanoff
06b2f12b10 fix(instant): Fix uncontrolled input warning for token selector 2018-11-28 10:38:24 -08:00
Steve Klebanoff
1b23c430fc fix(instant): Half opacity instead of darkening on hover for clickable text 2018-11-28 10:25:04 -08:00
Steve Klebanoff
ca894935f2 Take out asset name and data as we can use the selected event properties 2018-11-28 10:07:11 -08:00
Fred Carlsen
23bfad6c40 Add index to list 2018-11-28 18:25:49 +01:00
Fred Carlsen
850c441c70 Start on text component 2018-11-28 18:25:40 +01:00
Fabio B
53f8e1b3b4 Add troubleshooting section to dev-utils section 2018-11-28 16:56:48 +00:00
Fred Carlsen
dc434bdff0 Left align logo 2018-11-28 17:52:14 +01:00
Fred Carlsen
0afd490aec Linting errors 2018-11-28 17:51:34 +01:00
Fred Carlsen
c8520c45cb Fix linting errors 2018-11-28 17:49:48 +01:00
Fred Carlsen
ec6b47ded0 Add footer 2018-11-28 17:46:43 +01:00
Ezekiel Aquino
36d94b894a Test with max widths 2018-11-28 17:43:27 +01:00
Ezekiel Aquino
a18a11da92 Adds section margins 2018-11-28 17:35:13 +01:00
Ezekiel Aquino
4bad973877 Samples full width wraps 2018-11-28 17:32:27 +01:00
Ezekiel Aquino
38e12c2405 [WIP] Proposed layout modules 2018-11-28 17:29:12 +01:00
Fred Carlsen
f9a7cc94e1 Fix key in loop 2018-11-28 17:11:17 +01:00
Fred Carlsen
3382077768 Add bgColor and removePadding props to container 2018-11-28 17:08:59 +01:00
Fred Carlsen
b9cbc87882 Change bg color 2018-11-28 17:08:41 +01:00
Fred Carlsen
d05d5ac10d Fix linting errors 2018-11-28 16:35:59 +01:00
Fred Carlsen
a1fe30e210 Tweak links in header 2018-11-28 16:33:10 +01:00
Fred Carlsen
56ca19dc9b Add ehader 2018-11-28 16:26:56 +01:00
Fred Carlsen
969674a5ce Add container and button 2018-11-28 16:26:42 +01:00
Fred Carlsen
d2a418b368 Fix font references 2018-11-28 16:26:05 +01:00
Fred Carlsen
081859f334 Ignore osx metadata files 2018-11-28 15:21:11 +01:00
Fred Carlsen
1cc06dd9e6 Fix type error in Text component 2018-11-28 15:19:00 +01:00
Fred Carlsen
d642082058 Add styled-component types 2018-11-28 15:19:00 +01:00
Ezekiel Aquino
d3aebd0b79 Renames font-files, adds font-face declaration in globalStyles 2018-11-28 15:02:46 +01:00
Ezekiel Aquino
7b90f095ff Adds very basic SiteWrap and global styling 2018-11-28 14:45:26 +01:00
Ezekiel Aquino
df6c1ae059 Updates styled-components, react typings 2018-11-28 14:45:26 +01:00
Fred Carlsen
5578c70cd6 WIP button 2018-11-28 14:04:38 +01:00
Ezekiel Aquino
3e2c93f5a0 Adds initial /next route to index.tsx 2018-11-28 13:42:02 +01:00
Fred Carlsen
471a4e981a Add @next folder structure 2018-11-28 13:33:46 +01:00
Fred Carlsen
6b4112527f Add svg loader 2018-11-28 13:17:48 +01:00
Fred Carlsen
3a9f8a7296 Add Formular font and normalize 2018-11-28 13:17:00 +01:00
Fred Carlsen
bbb3e5afcc Add brand colors 2018-11-28 13:13:27 +01:00
Jacob Evans
4861e48059 Publish
- 0x.js@2.0.6
 - @0x/abi-gen-templates@1.0.1
 - @0x/abi-gen-wrappers@2.0.0
 - @0x/asset-buyer@3.0.2
 - @0x/base-contract@3.0.8
 - @0x/connect@3.0.8
 - @0x/contract-addresses@2.0.0
 - @0x/contract-artifacts@1.1.2
 - @0x/contract-wrappers@4.1.1
 - contracts@2.1.56
 - @0x/dev-tools-pages@0.0.8
 - @0x/dev-utils@1.0.19
 - @0x/fill-scenarios@1.0.14
 - @0x/instant@1.0.2
 - @0x/metacoin@0.0.30
 - @0x/migrations@2.2.0
 - @0x/order-utils@3.0.4
 - @0x/order-watcher@2.2.6
 - @0x/react-docs@1.0.20
 - @0x/react-shared@1.0.23
 - @0x/sol-compiler@1.1.14
 - @0x/sol-cov@2.1.14
 - @0x/sol-doc@1.0.9
 - @0x/subproviders@2.1.6
 - @0x/testnet-faucets@1.0.58
 - @0x/web3-wrapper@3.1.6
 - @0x/website@0.0.61
2018-11-28 21:49:55 +11:00
Jacob Evans
c0b9214138 Updated CHANGELOGS 2018-11-28 21:49:26 +11:00
Jacob Evans
9266df43a4 chore: Add Ganache to NetworkId enum 2018-11-28 20:08:34 +11:00
Jacob Evans
dac0bee95c Merge pull request #1318 from 0xProject/bug/testnets/rinkeby-exchange
[testnet][contract-addresses] Rinkeby and Ganache
2018-11-28 16:06:44 +11:00
Amir Bandeali
708f4e9bb8 Update CHANGELOG 2018-11-27 16:09:51 -08:00
Amir Bandeali
0b9e9eb0e4 Don't load assetProxy if currentProxyid is equal to the last seen proxyid 2018-11-27 16:09:51 -08:00
Amir Bandeali
743c43f768 Add Exchange tests with MultiAsset orders 2018-11-27 16:09:51 -08:00
Amir Bandeali
7b51eddc03 Fix linting errors 2018-11-27 16:09:51 -08:00
Amir Bandeali
6f92f0a7b5 Add more tests for MAP 2018-11-27 16:09:51 -08:00
Amir Bandeali
b773d5e592 feat: Add and revert reasons 2018-11-27 16:09:51 -08:00
Amir Bandeali
a0bc97b589 Add initial MultiAssetProxy tests 2018-11-27 16:09:51 -08:00
Amir Bandeali
d146e15ff3 Fix async loops in erc721Wrapper 2018-11-27 16:09:51 -08:00
Amir Bandeali
037e63ab49 Factor offsets into calldata locations 2018-11-27 16:09:51 -08:00
Amir Bandeali
8b80d28029 feat: Implement MultiAssetProxy 2018-11-27 16:09:51 -08:00
Steve Klebanoff
d3739488ae Tracking quote errors 2018-11-27 15:28:38 -08:00
Jacob Evans
494adedeef chore: Update CHANGELOG 2018-11-28 10:17:15 +11:00
Jacob Evans
f0ed0c6a35 chore: Redeploy Rinkeby using testnet Exchange contract. Add Ganache contract addresses back 2018-11-28 10:17:09 +11:00
Steve Klebanoff
c5d6b925e4 feat(instant): Quote fetch tracking 2018-11-27 15:13:32 -08:00
Steve Klebanoff
856f4b473b feat(instant): Close and View Transaction analytics events 2018-11-27 14:14:30 -08:00
Steve Klebanoff
b95d73d176 Merge branch 'development' into feature/instant/install-analytics 2018-11-27 13:34:19 -08:00
Steve Klebanoff
462a5face9 feat(instant): Install Wallet analytics 2018-11-27 13:33:34 -08:00
Steve Klebanoff
47a87e57f1 Merge pull request #1335 from 0xProject/feature/instant/dropdown-analytics
[instant] Add analytics events for payment dropdown
2018-11-27 13:31:02 -08:00
F. Eugene Aumson
768c28f328 fix(order_utils.py): unpin pylint version (#1337)
The version was pinned in order to work around a bug in pylint.  That
bug has been fixed and released.
2018-11-27 14:49:28 -05:00
Steve Klebanoff
b50187f59c Track install wallet clicked 2018-11-27 11:25:51 -08:00
Steve Klebanoff
96a46bcb4b Merge branch 'development' into feature/instant/dropdown-analytics 2018-11-27 11:10:20 -08:00
Steve Klebanoff
4653e4c011 Merge pull request #1336 from 0xProject/fix/instant/clipboard
[instant] Fix copy to clipboard
2018-11-27 10:48:26 -08:00
Brandon Millman
372a242ea2 Merge pull request #1327 from 0xProject/feature/instant/events-buy
[instant] Add buy events to instant
2018-11-27 10:46:10 -08:00
Steve Klebanoff
fb1893626f Merge pull request #1330 from 0xProject/feature/instant/stable-css-classes
[instant] Add stable CSS classes
2018-11-27 10:42:05 -08:00
Steve Klebanoff
5fd837cc4f Merge branch 'development' into feature/instant/dropdown-analytics 2018-11-27 10:38:26 -08:00
Steve Klebanoff
435e62a94d fix(instant): Fix copy to clipboard 2018-11-27 10:32:54 -08:00
Brandon Millman
598db72523 Merge branch 'development' into feature/instant/events-buy
* development:
  Make explicit functions
  Linting
  Fix props
  Set selected asset to none
  Track numberAvailableAssets, selectedAssetName, selectedAssetData event properties
  Fix dupe merge issue
  feat(instant): Event tracking for token selector
  Token selector searched
  Token Selector open, closed, chose
2018-11-27 10:29:45 -08:00
Steve Klebanoff
4ebc561986 Merge branch 'development' into feature/instant/stable-css-classes 2018-11-27 10:24:12 -08:00
Steve Klebanoff
d23fd23e91 Merge pull request #1329 from 0xProject/feature/instant/token-picker-events
[instant] Token Selector events
2018-11-27 10:23:28 -08:00
Brandon Millman
6e2523625f feat(instant): change event properties to ms times instead of unix timestamps 2018-11-27 10:17:59 -08:00
Steve Klebanoff
23274f9b48 Merge branch 'development' into feature/instant/token-picker-events 2018-11-27 10:10:22 -08:00
Brandon Millman
7efa71eaf6 Merge branch 'development' into feature/instant/events-buy
* development:
  fix(instant): make package private
  Add stale bot config
2018-11-27 10:06:39 -08:00
Steve Klebanoff
9c27feeff6 Make explicit functions 2018-11-27 10:00:21 -08:00
Steve Klebanoff
be787a0fd1 feat(instant): Add analytics events for payment dropdown 2018-11-27 09:50:56 -08:00
Steve Klebanoff
ee5b6ad77f Linting 2018-11-27 09:16:26 -08:00
Steve Klebanoff
e08fb72cf1 Use constants 2018-11-27 09:01:49 -08:00
Fred Carlsen
9b0020a884 Merge remote-tracking branch 'upstream/development' into website 2018-11-27 16:19:36 +01:00
Fred Carlsen
ec12e46e3f Add fix for assertion error to devserver config 2018-11-27 15:40:37 +01:00
Leonid Logvinov
fdc4a4e5fa Merge pull request #1325 from 0xProject/feature/stale
Add stale bot config
2018-11-27 13:21:43 +01:00
Brandon Millman
ef2c5159dd fix(instant): make package private 2018-11-27 01:20:09 -08:00
Brandon Millman
f0f991245c Merge branch 'development' into feature/instant/events-buy
* development:
  fix: add --exclude-missing flag to yarn clean command
  Update CHANGELOG
  fix: remove getApproved check from OrderValidator since approval is removed after a single transfer
  Add comment
  Force scaling input component to rerender when a different asset is chosen
  Send in explicit props
  feat(instant): Add more event properties to heap
  Move out generating of event properties, and send in orderSource
  autofocus -> hasAutoFocus
  fix(instant): Right align amounts
  fix(instant): Autofocus text amount input
2018-11-26 23:11:05 -08:00
Brandon Millman
d3b0162dc9 feat(instant): add expectedEndTimeUnix and actualEndTimeUnix to buy events 2018-11-26 23:08:20 -08:00
Steve Klebanoff
f3d08c13eb Add stable CSS classes 2018-11-26 17:13:35 -08:00
Amir Bandeali
10cc46779e Merge pull request #1149 from 0xProject/fix/contracts/orderValidator
fix: remove getApproved check from OrderValidator
2018-11-26 17:06:10 -08:00
Steve Klebanoff
80a53aedf2 Fix props 2018-11-26 16:53:50 -08:00
Steve Klebanoff
1b96867df8 Merge pull request #1294 from 0xProject/feature/header-tweaks
[instant] Header tweaks
2018-11-26 16:01:04 -08:00
Steve Klebanoff
0192127e5d Set selected asset to none 2018-11-26 15:53:39 -08:00
Steve Klebanoff
7610130f73 Track numberAvailableAssets, selectedAssetName, selectedAssetData event properties 2018-11-26 15:51:40 -08:00
Amir Bandeali
218c0d9f51 Merge pull request #1326 from 0xProject/fix/yarnClean
fix: add --exclude-missing flag to yarn clean command
2018-11-26 15:29:43 -08:00
Steve Klebanoff
d5898a3a05 Fix dupe merge issue 2018-11-26 15:12:51 -08:00
Steve Klebanoff
b055055253 Merge branch 'development' into feature/instant/token-picker-events 2018-11-26 15:11:16 -08:00
Steve Klebanoff
6e3d70af56 Merge pull request #1299 from 0xProject/feature/instant/open-close-events
[instant] Add more event properties
2018-11-26 15:10:50 -08:00
Steve Klebanoff
ae570dba05 feat(instant): Event tracking for token selector 2018-11-26 15:04:02 -08:00
Brandon Millman
2795849dd3 feat(instant): add buyQuote properties to buy events 2018-11-26 14:49:50 -08:00
Brandon Millman
fad48b8b6c feat(instant): add txHash to relevant buy events 2018-11-26 14:48:07 -08:00
Brandon Millman
685d83d6d0 feat(instant): implement buy events without associated properties 2018-11-26 14:48:07 -08:00
fragosti
35d8525f55 feat: update README to reflect lack of commonjs module 2018-11-26 17:37:21 -05:00
fragosti
faf80f8595 feat: make package private 2018-11-26 17:37:03 -05:00
Steve Klebanoff
9206f2d288 Token selector searched 2018-11-26 13:27:40 -08:00
Steve Klebanoff
2fec7613c4 Token Selector open, closed, chose 2018-11-26 13:20:16 -08:00
Amir Bandeali
2f026cd1b6 fix: add --exclude-missing flag to yarn clean command 2018-11-26 13:11:30 -08:00
Steve Klebanoff
6eec84d21b Merge branch 'development' into feature/instant/open-close-events 2018-11-26 13:07:02 -08:00
Steve Klebanoff
5f6a5e28e7 Merge branch 'development' into feature/header-tweaks 2018-11-26 13:06:36 -08:00
fragosti
825911ed89 feat: Add Xianny to about page 2018-11-26 13:15:32 -05:00
Leonid Logvinov
a72d418ddb Add stale bot config 2018-11-26 19:07:55 +01:00
Amir Bandeali
cf5fd8ff42 Update CHANGELOG 2018-11-26 09:47:55 -08:00
Amir Bandeali
994c6032bb fix: remove getApproved check from OrderValidator since approval is removed after a single transfer 2018-11-26 09:45:38 -08:00
Steve Klebanoff
271adcdb7e Merge branch 'development' into feature/instant/rollbar-env 2018-11-26 09:18:48 -08:00
Steve Klebanoff
717a3bce8c EMBEDDED_DOMAINS -> HOST_DOMAINS 2018-11-26 09:12:51 -08:00
Steve Klebanoff
1494a70bad Merge branch 'development' into feature/instant/open-close-events 2018-11-26 09:02:16 -08:00
Fabio B
6d565f4bff Merge pull request #1324 from 0xProject/addCommandLineInterfaceToMigrations
Add CLI interface to @0x/migrations
2018-11-26 16:14:16 +00:00
Fabio Berger
c6592148a7 Rename node-endpoint to rpc-url for clarity 2018-11-26 15:57:49 +00:00
Fabio Berger
6e39f11db1 Merge branch 'development' into addCommandLineInterfaceToMigrations
* development:
  fix(order_utils.py): work aroud pylint bug (#1322)
2018-11-26 15:18:41 +00:00
F. Eugene Aumson
ee86cd1dcc fix(order_utils.py): work aroud pylint bug (#1322) 2018-11-26 10:18:02 -05:00
Fabio Berger
420a677828 merge development 2018-11-26 15:08:57 +00:00
Fabio Berger
9da43878b1 Add CHANGELOG entry to migrations 2018-11-26 15:04:27 +00:00
Fabio Berger
527f074e59 Fix typo 2018-11-26 15:03:58 +00:00
Fabio Berger
eefd9d9dd2 Add command-line interface to @0x/migrations 2018-11-26 14:59:27 +00:00
Leonid Logvinov
2648f5ba65 Merge pull request #1323 from 0xProject/feature/contributing-autolabeler
Remove the instruction to prefix PRs with package name from PULL_REQUEST_TEMPLATE.md
2018-11-26 15:54:50 +01:00
Leonid Logvinov
1b45aa5974 Remove the instruction to prefix PRs with package name from a/PULL_REQUEST_TEMPLATE.md 2018-11-26 15:52:04 +01:00
Leonid Logvinov
dcf19e5226 Merge pull request #1320 from 0xProject/feature/autolabeler
Add autolabeler config
2018-11-26 15:42:48 +01:00
Leonid Logvinov
c5c852f54f Add autolabeler config 2018-11-26 15:38:18 +01:00
Leonid Logvinov
7b15217694 Merge pull request #1305 from 0xProject/feature/contract-templates
[@0x/contract-templates] Make contract-templates an npm package
2018-11-26 14:12:13 +01:00
Leonid Logvinov
8caded1d1d Merge pull request #1319 from 0xProject/revert-1312-feature/build-fix-instant
Revert "[@0x/instant] Fix CI build broken by instant installation tests"
2018-11-26 14:11:04 +01:00
Leonid Logvinov
ebc3116909 Revert "[@0x/instant] Fix CI build broken by instant installation tests" 2018-11-26 14:09:24 +01:00
Leonid Logvinov
387d7199d1 Merge pull request #1312 from 0xProject/feature/build-fix-instant
[@0x/instant] Fix CI build broken by instant installation tests
2018-11-26 14:00:25 +01:00
Jacob Evans
dc965da64e Merge pull request #1309 from 0xProject/bug/contract-artifacts/testnet-exchange
[contract-artifacts] Use Testnet Exchange artifact
2018-11-26 21:23:19 +11:00
Jacob Evans
1d83d99d87 Merge pull request #1308 from 0xProject/bug/web3-wrapper/unmarshall-parity-receipt
[web3-wrapper] Only unmarshall receipt if blockNumber present
2018-11-26 21:21:36 +11:00
Jacob Evans
09a683557b chore: Update CHANGELOGS use mainnet ZRX amount in Forwarder. 2018-11-26 09:57:43 +11:00
Jacob Evans
99e92a346b chore: Fund forwarder in migrations 2018-11-26 09:37:31 +11:00
Leonid Logvinov
9ddd45e2c6 Rename contract-templates to abi-gen-templates 2018-11-23 15:22:16 +01:00
Leonid Logvinov
0c0a1db114 Fix the lerna paremeter name from cdVersions to cd-versions 2018-11-23 14:51:21 +01:00
Leonid Logvinov
b1474973cd Copy assets in referenced in instant on commonjs build 2018-11-23 14:48:49 +01:00
Jacob Evans
f0f6b26c3b bug: Use Testnet Exchange over mainnet 2018-11-23 18:17:51 +11:00
Jacob Evans
03b3b80a65 bug: Only unmarshall receipt if blockNumber present.
https://github.com/paritytech/parity-ethereum/issues/1180
Parity can return a pending transaction receipt with a number of null values
2018-11-23 15:31:00 +11:00
Leonid Logvinov
06cc66005c Make contract-templates an npm package 2018-11-22 14:48:15 +01:00
Steve Klebanoff
b0792a85a4 Add comment 2018-11-21 14:33:12 -08:00
Francesco Agosti
a5359df002 Merge pull request #1281 from 0xProject/feature/instant/push-to-history
[instant] Close/open Instant on correct history changes. Provide option to disable.
2018-11-21 17:24:48 -05:00
Steve Klebanoff
10c9d0b723 Force scaling input component to rerender when a different asset is chosen 2018-11-21 14:24:13 -08:00
Brandon Millman
5c81f07d46 Merge pull request #1300 from 0xProject/feature/instant/events-account
[instant] Implement account related events
2018-11-21 14:20:01 -08:00
Steve Klebanoff
0adc8f5053 Merge branch 'development' into feature/header-tweaks 2018-11-21 14:14:27 -08:00
Brandon Millman
804de89796 chore(instant): revert usage of event properties 2018-11-21 13:52:55 -08:00
Fabio Berger
83a043e639 Merge branch 'development'
* development: (81 commits)
  Publish
  Updated CHANGELOGS
  print out error message and stack
  immediately return the patch incremented version if no changelog entries exist
  Put python package above TS/JS packages
  Reduce title size
  reduce text side in README
  Improve top-level README
  Fix prettier
  remove unused flag
  Add CHANGELOG entry
  Fix additional comments
  Improve comments
  Add migrations, contract-addresses and contract-artifacts to Developers home
  Create migrations doc reference page
  Add additional CHANGELOG to types package
  Add CHANGELOG entry
  Fix prettier
  Fix `SimpleContractArtifact` type
  Update abi-gen-wrappers
  ...
2018-11-21 21:19:31 +00:00
Steve Klebanoff
c6ae7b8d3f Host whitelist so we don't get errors from embedded site 2018-11-21 13:19:26 -08:00
Brandon Millman
6604e2db20 chore(instant): refactor usage of event properties in heap 2018-11-21 13:16:34 -08:00
Fabio Berger
f46a49fd13 Publish
- 0x.js@2.0.5
 - @0x/abi-gen@1.0.17
 - @0x/abi-gen-wrappers@1.1.0
 - @0x/assert@1.0.18
 - @0x/asset-buyer@3.0.1
 - @0x/base-contract@3.0.7
 - @0x/connect@3.0.7
 - @0x/contract-addresses@1.2.0
 - @0x/contract-wrappers@4.1.0
 - contracts@2.1.55
 - @0x/dev-tools-pages@0.0.7
 - @0x/dev-utils@1.0.18
 - @0x/fill-scenarios@1.0.13
 - @0x/instant@1.0.1
 - @0x/json-schemas@2.1.2
 - @0x/metacoin@0.0.29
 - @0x/migrations@2.1.0
 - @0x/monorepo-scripts@1.0.14
 - @0x/order-utils@3.0.3
 - @0x/order-watcher@2.2.5
 - @0x/react-docs@1.0.19
 - @0x/react-shared@1.0.22
 - @0x/sol-compiler@1.1.13
 - @0x/sol-cov@2.1.13
 - @0x/sol-doc@1.0.8
 - @0x/sol-resolver@1.0.17
 - @0x/sra-spec@1.0.11
 - @0x/subproviders@2.1.5
 - @0x/testnet-faucets@1.0.57
 - @0x/types@1.3.0
 - @0x/utils@2.0.6
 - @0x/web3-wrapper@3.1.5
 - @0x/website@0.0.60
2018-11-21 21:09:47 +00:00
Fabio Berger
707af1ec58 Updated CHANGELOGS 2018-11-21 21:09:37 +00:00
Brandon Millman
31d1b4ba67 chore(instant): refactor account tracking logic in middleware to be more readable 2018-11-21 12:30:52 -08:00
Steve Klebanoff
d750225554 Send in explicit props 2018-11-21 11:10:17 -08:00
Steve Klebanoff
93672c01af Linting 2018-11-21 10:54:10 -08:00
Steve Klebanoff
921d9d7ed5 Merge branch 'development' into feature/instant/rollbar-env 2018-11-21 10:47:31 -08:00
Steve Klebanoff
b2e1be5cfe Better env var names for source map plugin 2018-11-21 10:44:50 -08:00
Steve Klebanoff
95a80a0e75 Shorter validateRollbarPresence logic 2018-11-21 10:35:53 -08:00
Steve Klebanoff
e2a16f3f33 Use ROLLBAR_ENABLED constant, and change ROLLBAR_ENVIRONMENT to INSTANT_ENVIRONMENT 2018-11-21 10:25:10 -08:00
fragosti
ed91c6c874 fix: multiple render and closes edge case for onpopstate render 2018-11-21 12:44:28 -05:00
Steve Klebanoff
70c9908249 Report when cant update balance 2018-11-21 09:43:01 -08:00
Steve Klebanoff
ffa2f4554b Takeout redundant check, and make function name more clear 2018-11-21 09:41:44 -08:00
Steve Klebanoff
22a3124662 Move rollbar setup into function, move setting up into provider 2018-11-21 09:35:24 -08:00
Fabio Berger
68c15de890 print out error message and stack 2018-11-21 17:27:40 +00:00
Fabio Berger
71d15a68c1 immediately return the patch incremented version if no changelog entries exist 2018-11-21 17:27:27 +00:00
Steve Klebanoff
35b5051148 Always report unexpected errors. Move error message generation into helper function, and add tests 2018-11-21 09:23:19 -08:00
Fabio B
3273117888 Merge pull request #1301 from 0xProject/feature/migrationsDocRef
Add Migrations Doc Ref
2018-11-21 17:06:32 +00:00
Fabio Berger
8ea2eb9102 Put python package above TS/JS packages 2018-11-21 17:05:11 +00:00
fragosti
b494a4a4db chore: clean up index.umd.ts a bit 2018-11-21 11:55:32 -05:00
fragosti
e0beb7fb38 feat: add more to instant dev env 2018-11-21 11:42:07 -05:00
fragosti
fc123871ad Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/push-to-history 2018-11-21 10:43:36 -05:00
Fabio Berger
f27fef0295 Reduce title size 2018-11-21 15:17:04 +00:00
Fabio Berger
36974a9557 reduce text side in README 2018-11-21 15:16:26 +00:00
Fabio Berger
584dc6217d Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Add additional CHANGELOG to types package
  Add CHANGELOG entry
  Fix prettier
  Fix `SimpleContractArtifact` type
  Update abi-gen-wrappers
  Add @0x/types to dependencies of `@0x/abi-gen-wrappers`
  Allow a `SimpleContractArtifact` to be passed into `deployFrom0xArtifactAsync`
  Update issue template
  fix(instant): Use new valid svg image for instant
  isDisabled -> isInputDisabled
  Allow user to select other token on success
  fix: do not use document on import
  fix(instant): Don't allow changing of assets when order processing
  fix: npmignore file ignoring index.d.ts
  fix: specify new location of index.js in package.json
  feat: fix instant build and add to project references
  chore: make instant public
2018-11-21 15:14:26 +00:00
Fabio Berger
edf07d9b5b Improve top-level README 2018-11-21 15:13:58 +00:00
Francesco Agosti
f66b695a47 Merge pull request #1283 from 0xProject/feature/instant/make-instant-public-and-fix-publishing
[instant] Make package public and fix publishing
2018-11-21 06:38:21 -08:00
Fabio Berger
61b3305af3 Fix prettier 2018-11-21 13:26:58 +00:00
August Skare
21d9783ef8 fix puppeteer options for react-snap 2018-11-21 14:09:47 +01:00
Fabio Berger
e2b3c98d25 remove unused flag 2018-11-21 11:56:45 +00:00
Fabio Berger
39429dde68 Add CHANGELOG entry 2018-11-21 11:54:24 +00:00
Fabio Berger
baf69a60eb Fix additional comments 2018-11-21 11:53:50 +00:00
Fabio Berger
a90be44c9f Improve comments 2018-11-21 11:48:07 +00:00
Fabio Berger
fb7ac81945 Add migrations, contract-addresses and contract-artifacts to Developers home 2018-11-21 11:47:45 +00:00
Fabio Berger
db26ca977f Create migrations doc reference page 2018-11-21 11:47:24 +00:00
August Skare
89ce87f9f1 fix casing for entries in webpack 2018-11-21 12:36:58 +01:00
Fabio B
a8803431b3 Merge pull request #1298 from 0xProject/fix/artifact-type-error
Fix Artifact Interface Type Issue
2018-11-21 11:16:26 +00:00
Fabio Berger
2821bac3a3 Add additional CHANGELOG to types package 2018-11-21 10:44:20 +00:00
Fabio Berger
716168132a Add CHANGELOG entry 2018-11-21 10:39:10 +00:00
August Skare
592e1a3e6f Merge branch 'development' into dev-tools-pages 2018-11-21 08:19:29 +01:00
Brandon Millman
351e0e6f5f feat(instant): implement account related events 2018-11-20 22:38:49 -08:00
Fabio Berger
0244d04a55 Fix prettier 2018-11-21 00:11:25 +00:00
Fabio Berger
895281989c Fix SimpleContractArtifact type 2018-11-20 23:43:05 +00:00
Fabio Berger
21f39079c8 Update abi-gen-wrappers 2018-11-20 23:42:35 +00:00
Fabio Berger
c2ebcfb023 Add @0x/types to dependencies of @0x/abi-gen-wrappers 2018-11-20 23:15:53 +00:00
Steve Klebanoff
15f05733be Merge pull request #1290 from 0xProject/fix/instant/disable-token-picker
[instant] Don't allow changing of assets when order in progress
2018-11-20 15:08:27 -08:00
Steve Klebanoff
7741edbbcc Merge pull request #1296 from 0xProject/fix/instant/svg-warning
[instant] Replace "Powered By 0x" svg
2018-11-20 15:08:07 -08:00
Steve Klebanoff
1593b94aac feat(instant): Add more event properties to heap 2018-11-20 15:07:37 -08:00
Fabio Berger
4b64d8c3aa Allow a SimpleContractArtifact to be passed into deployFrom0xArtifactAsync 2018-11-20 23:06:46 +00:00
Steve Klebanoff
6124d80c89 Move out generating of event properties, and send in orderSource 2018-11-20 14:59:23 -08:00
Fabio Berger
48aec9ef47 Update issue template 2018-11-20 22:38:36 +00:00
Steve Klebanoff
1a7b167f63 fix(instant): Use new valid svg image for instant 2018-11-20 14:23:55 -08:00
Steve Klebanoff
b7eb2e887d isDisabled -> isInputDisabled 2018-11-20 13:59:09 -08:00
Steve Klebanoff
094aabfcee Linting 2018-11-20 13:28:28 -08:00
Steve Klebanoff
eca63b1a58 Merge branch 'development' into feature/header-tweaks 2018-11-20 13:26:00 -08:00
Steve Klebanoff
f5db4be521 Ensure we publish Instant with rollbar settings 2018-11-20 13:19:16 -08:00
Steve Klebanoff
d79c754a5b TODO note 2018-11-20 13:18:53 -08:00
Steve Klebanoff
934570d12f Explicit error reporting 2018-11-20 13:18:47 -08:00
Steve Klebanoff
748e3c0c53 Force source maps on staging and dogfood 2018-11-20 13:14:20 -08:00
Steve Klebanoff
728617fed2 feat(instant): Report errors to rollbar 2018-11-20 12:06:10 -08:00
Steve Klebanoff
05d45e7146 Use sourcemap loader 2018-11-20 12:05:48 -08:00
Steve Klebanoff
d2dd5f93d2 Introduce rollbar plugin 2018-11-20 11:39:31 -08:00
Steve Klebanoff
ac1ffe53df Send in rollbar environment 2018-11-20 11:21:16 -08:00
Steve Klebanoff
2bda6dd719 autofocus -> hasAutoFocus 2018-11-20 10:36:23 -08:00
Steve Klebanoff
cd4600b081 fix(instant): Right align amounts 2018-11-20 10:20:16 -08:00
Steve Klebanoff
83f4fa92a5 fix(instant): Autofocus text amount input 2018-11-20 10:19:59 -08:00
Steve Klebanoff
7ad5dbc59d Allow user to select other token on success 2018-11-20 09:51:14 -08:00
Steve Klebanoff
ba41fc9275 Merge pull request #1272 from 0xProject/feature/instant/heap
[instant] Base heap integration
2018-11-20 09:23:34 -08:00
Steve Klebanoff
36e888c3a5 Merge pull request #1287 from 0xProject/feature/instant/add-powered-by
[instant] Add "Powered By 0x"
2018-11-20 09:05:28 -08:00
Leonid Logvinov
6939182348 Merge pull request #1292 from 0xProject/feature/nonce-tx-opts
Add `nonce` to `TxOpts`
2018-11-20 16:54:36 +01:00
Fabio B
7a38a196ad Update packages/contract-wrappers/src/types.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-11-20 16:42:49 +01:00
Fabio B
0c91bf1415 Update packages/contract-wrappers/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-11-20 16:32:34 +01:00
Leonid Logvinov
e1bc3f3f2d Add nonce to TxOpts 2018-11-20 15:59:33 +01:00
August Skare
99176c2d54 comment for commented BundleAnalyzerPlugin webpack plugin 2018-11-20 15:41:39 +01:00
Leonid Logvinov
e5cfc94cd2 Merge pull request #1291 from 0xProject/feature/web3-unmarshalling
[@0x/web3-wrapper] Properly unmarshall `TransactionReceiptRPC` to `TransactionReceipt`
2018-11-20 15:37:48 +01:00
August Skare
ad0083dfa0 fix type for svg icon in footer 2018-11-20 15:30:49 +01:00
August Skare
6919409c2b typedef for context data 2018-11-20 15:28:18 +01:00
August Skare
f360b2edd6 fix import order 2018-11-20 15:27:56 +01:00
Leonid Logvinov
22cfdd9f0b Properly unmarshall TransactionReceiptRPC to TransactionReceipt 2018-11-20 15:22:06 +01:00
August Skare
339ec3e8eb uniq export names for animations 2018-11-20 15:18:09 +01:00
August Skare
b0c22a222e use lodash.map insted of array.map 2018-11-20 15:15:17 +01:00
August Skare
ea18050589 use lodash isUndefined function 2018-11-20 15:10:59 +01:00
Steve Klebanoff
0ba34f587c Import via TS 2018-11-19 17:12:32 -08:00
Steve Klebanoff
e86982bd41 Add ability to import SVGs in TS 2018-11-19 17:12:21 -08:00
fragosti
6de499459c fix: do not use document on import 2018-11-19 17:10:47 -08:00
Steve Klebanoff
3169b72406 fix(instant): Don't allow changing of assets when order processing 2018-11-19 17:04:15 -08:00
Steve Klebanoff
db6b2cbb05 Fix linting 2018-11-19 16:38:56 -08:00
Steve Klebanoff
a1b7f0ad83 Use anchor instead of Text 2018-11-19 16:36:51 -08:00
fragosti
b62fbd0b13 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/push-to-history 2018-11-19 16:30:11 -08:00
Steve Klebanoff
578a46c57f feat(instant): Add powered by 0x image 2018-11-19 16:28:40 -08:00
fragosti
9ab55fd07d fix: npmignore file ignoring index.d.ts 2018-11-19 16:22:05 -08:00
Steve Klebanoff
497385818b Check for instant heap production credentials in pre-publish step 2018-11-19 15:38:09 -08:00
Steve Klebanoff
c30ae762bf Merge branch 'development' into feature/instant/heap 2018-11-19 14:48:36 -08:00
Brandon Millman
953f8c119b Merge pull request #1276 from 0xProject/test/instant/bundle-size
[asset-buyer][instant] downgrade lodash to be consistent with the rest of 0x packages
2018-11-19 12:44:06 -08:00
Brandon Millman
6119bd3115 Merge pull request #1271 from 0xProject/feature/instant/icons
[instant] Add icons to token selector
2018-11-19 12:41:50 -08:00
Steve Klebanoff
1880c7c27d Linting: rename variable 2018-11-19 12:14:27 -08:00
Steve Klebanoff
8772d91699 Get heap analytics id from ENV variable 2018-11-19 12:02:31 -08:00
Brandon Millman
9b725a645d feat(instant): support custom iconUrls 2018-11-19 10:12:40 -08:00
Steve Klebanoff
2bfd03e64f Change disabled analytics name, add assertion, and always set 2018-11-19 09:54:59 -08:00
Steve Klebanoff
e23f90b82c No need to explicit send in NODE_ENV 2018-11-19 09:48:34 -08:00
Steve Klebanoff
0648e270fe Merge branch 'development' into feature/instant/heap 2018-11-19 09:47:58 -08:00
Brandon Millman
3d6711bd38 Merge branch 'development' into feature/instant/icons
* development: (37 commits)
  Add 0x-order-utils.py library to developers home
  Fixes to CONTRIBUTING.md
  Improve our CONTRIBUTING.md instructions
  fix(order_utils.py): publish docs to S3, not RTD (#1264)
  fix: make instant package private
  feat: refer to map file in postpublish configs
  feat: add new bundle name to bundle watch
  fix: tslint ignore rule in wrong place
  Update blog post feature
  Fix disclaimer on mobile
  Add smart contract docs to Developer Home
  Add Apache license link
  Fix capitalization in title
  Remove excess semi-colon
  Point directly to README for docs link
  Update icons
  Update LICENSE
  Fix disclaimer
  Add blogpost URL
  Add disclaimer
  ...
2018-11-19 09:32:39 -08:00
Fabio Berger
99541f89f7 Add 0x-order-utils.py library to developers home 2018-11-19 17:07:18 +00:00
August Skare
117726c6d8 fix imports after renaming 2018-11-19 17:35:22 +01:00
August Skare
31d07fdac8 rename all files and directories to lowercase 2018-11-19 17:27:00 +01:00
Fabio Berger
4cb138ab37 Fixes to CONTRIBUTING.md 2018-11-19 14:34:21 +00:00
Fabio Berger
8b8e277b75 Improve our CONTRIBUTING.md instructions 2018-11-19 14:28:10 +00:00
August Skare
881655bb57 separate component for inlinecode component 2018-11-19 15:18:07 +01:00
August Skare
38949f7ea4 added missing ; 2018-11-19 15:14:01 +01:00
August Skare
8d3e6f77b7 cleand up code component 2018-11-19 15:13:52 +01:00
August Skare
5865d1f62c strict check for children in contentblock 2018-11-19 14:56:40 +01:00
Fabio Berger
8175192f60 Merge branch 'development'
* development: (957 commits)
  fix(order_utils.py): publish docs to S3, not RTD (#1264)
  fix: make instant package private
  feat: refer to map file in postpublish configs
  feat: add new bundle name to bundle watch
  fix: tslint ignore rule in wrong place
  Update blog post feature
  Fix disclaimer on mobile
  Add smart contract docs to Developer Home
  Add Apache license link
  Fix capitalization in title
  Remove excess semi-colon
  Point directly to README for docs link
  Update icons
  Update LICENSE
  Fix disclaimer
  Add blogpost URL
  Add disclaimer
  Add launch kit to Developer home list of tools
  feat: Deploy contracts to Rinkeby
  fix: fix exceeds block gas limit error
  ...
2018-11-19 12:49:16 +00:00
August Skare
e2607980eb type function call for Container in Animation class 2018-11-19 09:57:18 +01:00
August Skare
f519f5744e remove new-lines between methods in classes 2018-11-19 09:55:03 +01:00
August Skare
fa24ec1a04 clean up tabs component 2018-11-19 09:50:19 +01:00
August Skare
6e1014a647 remove unnecessary children in Interface 2018-11-19 09:47:34 +01:00
August Skare
0b46f44ad3 fix typings for components in header 2018-11-19 09:32:53 +01:00
August Skare
b811b51af9 use styled-components theme in logo insted of color prop 2018-11-19 09:15:50 +01:00
August Skare
b88e2c5483 removed unused prop def from footer component 2018-11-19 09:07:05 +01:00
August Skare
cd333e0977 rename copied to didCopy in Code state 2018-11-19 09:05:22 +01:00
August Skare
62706d83c4 remove constructor from Code component 2018-11-19 09:04:00 +01:00
August Skare
284252e7a4 less verbose tslint disable rule 2018-11-19 08:56:59 +01:00
August Skare
3ad857be6c fix timeout type in animation component 2018-11-19 08:53:25 +01:00
Jacob Evans
94de441de7 Merge pull request #1278 from 0xProject/feature/contract-addresses/rinkeby
Deploy contracts to Rinkeby
2018-11-19 11:29:09 +11:00
F. Eugene Aumson
43443d6057 fix(order_utils.py): publish docs to S3, not RTD (#1264)
Publishing to readthedocs.io (RTD) wasn't working, for various reasons.

Changed to publish docs to S3.
2018-11-17 07:07:25 -05:00
fragosti
4caacc78a1 fix: specify new location of index.js in package.json 2018-11-16 18:05:32 -08:00
fragosti
302d172aad feat: fix instant build and add to project references 2018-11-16 17:50:47 -08:00
fragosti
21046e4349 chore: make instant public 2018-11-16 17:19:09 -08:00
Francesco Agosti
9914f7edef Merge pull request #1282 from 0xProject/fix/instant/release-notes-bug
[instant] (temporarily) make instant private
2018-11-16 17:17:48 -08:00
fragosti
1426145946 fix: make instant package private 2018-11-16 17:06:06 -08:00
fragosti
6fe4aef6f7 feat: refer to map file in postpublish configs 2018-11-16 17:05:11 -08:00
Steve Klebanoff
3f0d94c838 Add way to disable via props 2018-11-16 16:44:23 -08:00
fragosti
9384c507ac feat: add isInstantRendered check to safeguard against double renders and double removes 2018-11-16 16:33:02 -08:00
Steve Klebanoff
097bfe581d Better way of reporting Fallback provider 2018-11-16 16:21:38 -08:00
fragosti
ac942faa25 chore: use lodash where relevant 2018-11-16 16:14:10 -08:00
fragosti
654c13df8a fix: bug where we did not call onClose config 2018-11-16 16:07:37 -08:00
fragosti
6e2fbcdb3e feat: add URL override param 2018-11-16 15:58:41 -08:00
fragosti
51dce30088 feat: add assert for shouldDisablePushToHistory 2018-11-16 15:48:55 -08:00
fragosti
a4f6cd21bd feat: be more specific with callback name 2018-11-16 15:45:02 -08:00
Steve Klebanoff
1564415e5d Specify fallback web3 provider in analytics 2018-11-16 15:41:54 -08:00
fragosti
9a53a29b1f feat: allow integrator to disable pushstate logic 2018-11-16 15:41:21 -08:00
Steve Klebanoff
83a6d7b97d Remove old function 2018-11-16 15:29:59 -08:00
Steve Klebanoff
e8be70da10 Widget -> Instant 2018-11-16 15:29:07 -08:00
Steve Klebanoff
4d7bd15334 Trigger Wallet Ready when address changed 2018-11-16 15:25:29 -08:00
fragosti
f7914af9c5 feat: rename props to config 2018-11-16 15:23:44 -08:00
fragosti
848193074a feat: close and open instant based on history changes 2018-11-16 15:21:04 -08:00
Steve Klebanoff
31ffa65f59 Getting rid of unused function, and using track prefix 2018-11-16 15:06:11 -08:00
Steve Klebanoff
21ae0c46e1 Move ip import back 2018-11-16 14:51:57 -08:00
Francesco Agosti
d64bc28ba6 Merge pull request #1275 from 0xProject/feature/instant/productionize-publish-flow
[instant] Productionize publish flow
2018-11-16 11:47:58 -08:00
fragosti
b6e6607c46 feat: add new bundle name to bundle watch 2018-11-16 11:32:05 -08:00
fragosti
d8c6b36cff fix: tslint ignore rule in wrong place 2018-11-16 11:18:17 -08:00
Fabio Berger
e00c41ad88 Update blog post feature 2018-11-16 18:59:17 +00:00
Steve Klebanoff
9c182fe6e4 Merge branch 'development' into feature/instant/heap 2018-11-16 10:26:01 -08:00
Steve Klebanoff
cbcb954c30 Disable tslint for unused function so we can include this for future tracking events 2018-11-16 10:21:51 -08:00
Steve Klebanoff
42565869a4 Report on git sha and npm version of build 2018-11-16 10:19:16 -08:00
Steve Klebanoff
85a99203d0 null -> undefined 2018-11-16 10:14:42 -08:00
Steve Klebanoff
988bb398bc Add initials to TODO note 2018-11-16 10:14:00 -08:00
Steve Klebanoff
ed62271cda Take out old TODO 2018-11-16 10:13:32 -08:00
Steve Klebanoff
74254636b4 Remove unused import 2018-11-16 10:11:00 -08:00
Steve Klebanoff
db7f74f99f Switch heap id on environment, and make sure app id is what we expect 2018-11-16 10:10:55 -08:00
Steve Klebanoff
45a1899ead Add access to environment variables 2018-11-16 10:10:43 -08:00
Fabio Berger
1626e284cd Fix disclaimer on mobile 2018-11-16 18:00:53 +00:00
Fabio Berger
c5d208c90e Add smart contract docs to Developer Home 2018-11-16 17:44:52 +00:00
Fabio Berger
a3ccd42093 Add Apache license link 2018-11-16 17:38:39 +00:00
Fabio Berger
cb3e7b4120 Fix capitalization in title 2018-11-16 17:38:30 +00:00
Fabio Berger
7e58f21a74 Remove excess semi-colon 2018-11-16 17:33:25 +00:00
Steve Klebanoff
3add465edb We may not know num available assets available when wallet ready, so not trackin there 2018-11-16 09:20:44 -08:00
Steve Klebanoff
df71dba8ed Make user and event properties more specific 2018-11-16 09:16:20 -08:00
Fabio Berger
5c4ad3505a Point directly to README for docs link 2018-11-16 17:02:09 +00:00
Steve Klebanoff
37d60dc39e Typesafe analytic actions 2018-11-16 08:51:41 -08:00
August Skare
7fec2f630c fixed base link styling color 2018-11-16 16:18:03 +01:00
Fabio B
59c473dc33 Merge pull request #1253 from 0xProject/launchKitLanding
0x Launch kit landing page
2018-11-16 15:04:34 +00:00
Fabio Berger
5f9c7d8cfa Update icons 2018-11-16 14:43:59 +00:00
Leonid Logvinov
9a6bc4f05f Update LICENSE 2018-11-16 15:41:13 +01:00
Fabio Berger
ef860c5a58 Fix disclaimer 2018-11-16 14:39:32 +00:00
Fabio Berger
d19a9acd6b Add blogpost URL 2018-11-16 14:30:42 +00:00
Fabio Berger
416fec7a97 Add disclaimer 2018-11-16 14:27:11 +00:00
Fabio Berger
25d0b1e6e5 Merge branch 'development' into launchKitLanding
* development: (110 commits)
  fix: fix exceeds block gas limit error
  chore(instant): fix lint error
  fix: remove unused vars
  Send in affiliate info as option
  Have heartbeat update not trigger errors
  fix: remove redundant handler
  feat: make onUnlockWalletClick different based on ON
  chore: remove wallet panel content for mobile
  feat: use blue for wallet prompt on mobile
  feat: use stable version of bowser
  fix: add http to external url string
  feat: make onUnlockWalletClick different based on ON
  chore: remove wallet panel content for mobile
  feat: use blue for wallet prompt on mobile
  feat: use stable version of bowser
  feat: expose webpack-dev-server content to local network
  fix(website): remove node env definition from webpack
  fix(website): currentProvider called on undefined
  chore: update yarn lock
  feat: use capital values for enums
  ...
2018-11-16 13:52:20 +00:00
Fabio Berger
e36fc4e6ae Add launch kit to Developer home list of tools 2018-11-16 13:51:09 +00:00
August Skare
c081081448 Merge branch 'development' into dev-tools-pages 2018-11-16 11:28:24 +01:00
Jacob Evans
0a5364ff35 feat: Deploy contracts to Rinkeby 2018-11-16 21:20:48 +11:00
August Skare
54bd7df900 fix linting + code syntax for statless components 2018-11-16 11:05:30 +01:00
August Skare
5afef5fe82 update styled-component and styled-component typings 2018-11-16 11:04:55 +01:00
Jacob Evans
cabb7432b9 Merge pull request #1277 from akfork/hotfix/fix-ganache-gas-limit
[ganache]: fix exceeds block gas limit error
2018-11-16 20:36:42 +11:00
Akagi201
9726c375af fix: fix exceeds block gas limit error 2018-11-16 17:10:37 +08:00
Brandon Millman
f582cc327b fix(instant): change lodash version to the same as other 0x packages 2018-11-15 19:08:24 -08:00
Brandon Millman
7534c0f19e fix(asset-buyer): change lodash version to the same as other 0x packages 2018-11-15 19:07:43 -08:00
Brandon Millman
004e197863 feat(instant): add icons to token selector 2018-11-15 18:54:17 -08:00
Brandon Millman
ae1fb97794 chore(instant): fix lint error 2018-11-15 18:00:59 -08:00
fragosti
79397d4b15 fix: remove private config line 2018-11-15 16:52:25 -08:00
fragosti
b7fd0ee74c Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/productionize-publish-flow 2018-11-15 16:44:19 -08:00
fragosti
3931202d4a fix: remove unused vars 2018-11-15 16:43:53 -08:00
fragosti
2cf3d4ff83 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/productionize-publish-flow 2018-11-15 16:42:24 -08:00
fragosti
bc14ae5d8b chore: run linter 2018-11-15 16:39:36 -08:00
fragosti
d4a8cd1f1c feat: change version to 1.0.0 2018-11-15 16:29:06 -08:00
fragosti
e9b298931a chore: update gitignore 2018-11-15 16:25:31 -08:00
fragosti
f8681a7780 fix: deploy commands 2018-11-15 16:20:06 -08:00
fragosti
fb3c2e1fb0 feat: rename bundle to instant.js and move build to umd dir 2018-11-15 16:13:35 -08:00
fragosti
9adfd1f323 feat: add npmignore 2018-11-15 15:38:19 -08:00
Steve Klebanoff
8c96720080 Merge pull request #1273 from 0xProject/fix/instant/heartbeat-errors
[instant] Don't show errors from heartbeat buy quote calls
2018-11-15 15:29:22 -08:00
fragosti
d0609d7131 feat: change webpack config and make instant public 2018-11-15 15:22:44 -08:00
Steve Klebanoff
33a156d9b5 Send in affiliate info as option 2018-11-15 15:12:43 -08:00
Fabio Berger
20e3a22d5d fix linter issue 2018-11-15 22:58:57 +00:00
Francesco Agosti
312dfb9572 Merge pull request #1266 from 0xProject/feature/instant/fix-mobile-specific-content
[instant] Fix mobile specific content
2018-11-15 14:35:13 -08:00
Steve Klebanoff
447b0f91f9 Have heartbeat update not trigger errors 2018-11-15 14:20:19 -08:00
Steve Klebanoff
ed26f5af98 Move variable assignments around to be more clear 2018-11-15 13:54:35 -08:00
Fabio Berger
28d105a1af Add support for responsive left 2018-11-15 20:47:34 +00:00
Fabio Berger
fd4a782bdd Update call-to-action links 2018-11-15 20:47:11 +00:00
fragosti
587739f8e1 Merge branch 'feature/instant/fix-mobile-specific-content' of https://github.com/0xProject/0x-monorepo into feature/instant/fix-mobile-specific-content 2018-11-15 12:44:54 -08:00
fragosti
4da574560d fix: remove redundant handler 2018-11-15 12:41:49 -08:00
fragosti
f9e0123986 feat: make onUnlockWalletClick different based on ON 2018-11-15 12:41:49 -08:00
fragosti
f4cc152cfb chore: remove wallet panel content for mobile 2018-11-15 12:41:49 -08:00
fragosti
29747a0487 feat: use blue for wallet prompt on mobile 2018-11-15 12:41:49 -08:00
fragosti
b01db9141b feat: use stable version of bowser 2018-11-15 12:41:49 -08:00
Steve Klebanoff
71aeb7cddc Linting 2018-11-15 11:35:47 -08:00
Francesco Agosti
34d86647bf Merge pull request #1265 from 0xProject/feature/instant/expose-webpack-dev-server
[instant ] Expose webpack-dev-server content to local network
2018-11-15 11:34:17 -08:00
Steve Klebanoff
a8863ac85e Take out console.logs 2018-11-15 11:33:04 -08:00
Steve Klebanoff
ca9bb45327 Move where we track widget opened, and report on networkId and providerName 2018-11-15 11:29:11 -08:00
Steve Klebanoff
450814ad80 Introduce ANALYTICS_ENABLED constant 2018-11-15 11:28:44 -08:00
Steve Klebanoff
0a38bf8fd6 Report ETH in units 2018-11-15 11:24:48 -08:00
Steve Klebanoff
2e61050a22 Use pure functions instead of class 2018-11-15 10:48:20 -08:00
Brandon Millman
1dd903ddcc Merge pull request #1263 from 0xProject/fix/website/node-env
[website] Fix currentProvider called on undefined and NODE_ENV production warning
2018-11-15 10:46:53 -08:00
Steve Klebanoff
61f227e123 feat(instant): Heap middleware and first tracking events 2018-11-15 10:43:42 -08:00
fragosti
633d17ffde fix: add http to external url string 2018-11-15 09:41:20 -08:00
Steve Klebanoff
20ed4fbbd4 First pass on widget version of heap 2018-11-15 08:19:58 -08:00
fragosti
39bb855a9c feat: make onUnlockWalletClick different based on ON 2018-11-14 16:27:27 -08:00
fragosti
b2a26ef21a chore: remove wallet panel content for mobile 2018-11-14 16:18:16 -08:00
fragosti
d895b0296f feat: use blue for wallet prompt on mobile 2018-11-14 16:15:29 -08:00
fragosti
b45167422b feat: use stable version of bowser 2018-11-14 16:00:03 -08:00
fragosti
8e81b0680f feat: expose webpack-dev-server content to local network 2018-11-14 15:48:25 -08:00
Brandon Millman
408bbdb52e fix(website): remove node env definition from webpack 2018-11-14 15:25:40 -08:00
Brandon Millman
f2a6feff29 fix(website): currentProvider called on undefined 2018-11-14 15:25:40 -08:00
Brandon Millman
7ccf9cd48e chore: update yarn lock 2018-11-14 15:25:40 -08:00
Francesco Agosti
8afcba7ba1 Merge pull request #1257 from 0xProject/feature/instant/different-install-wallet-copy-for-mobile
[instant] Adapt content to operating system, browser and provider type
2018-11-14 15:20:49 -08:00
Brandon Millman
2eef766aff Merge pull request #1258 from 0xProject/fix/instant/contract-call
[instant] Catch errors coming from calls to the orderValidator contract
2018-11-14 15:20:31 -08:00
fragosti
fe23bf9e51 feat: use capital values for enums 2018-11-14 14:54:41 -08:00
fragosti
1aae112d0e Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/different-install-wallet-copy-for-mobile 2018-11-14 14:39:23 -08:00
Brandon Millman
504f4d9eb9 fix(instant): fix tabIndex attribute error 2018-11-14 14:02:34 -08:00
F. Eugene Aumson
daf5719f08 fix(order_utils.py): lazy load contract artifacts (#1262) 2018-11-14 17:00:41 -05:00
Brandon Millman
e9754b4c08 Merge pull request #1261 from 0xProject/fix/instant/erc20-picker-list
[instant] Fix a bunch of low hanging bugs
2018-11-14 13:30:17 -08:00
Brandon Millman
adce627888 fix(instant): match token search on prefix 2018-11-14 10:00:18 -08:00
Brandon Millman
7688037fb8 fix(instant): border radius 2018-11-14 10:00:18 -08:00
Brandon Millman
997912a8f8 fix(instant): fix tabbing into erc20 token selector 2018-11-14 10:00:18 -08:00
F. Eugene Aumson
b961cb1952 fix(order_utils.py): validate order w/json schema (#1260) 2018-11-14 12:56:31 -05:00
F. Eugene Aumson
e1d64def20 feat(order_utils.py): sign_hash() (#1254)
Also moved is_valid_signature() into main package module, for
simplicity.

Also consolidated a handul of in-line pylint disable directives into the
.pylintrc config file.
2018-11-14 10:41:52 -05:00
Leonid Logvinov
fe1b7f15e8 Publish
- 0x.js@2.0.4
 - @0x/abi-gen@1.0.16
 - @0x/abi-gen-wrappers@1.0.5
 - @0x/assert@1.0.17
 - @0x/asset-buyer@3.0.0
 - @0x/base-contract@3.0.6
 - @0x/connect@3.0.6
 - @0x/contract-wrappers@4.0.2
 - contracts@2.1.54
 - @0x/dev-tools-pages@0.0.6
 - @0x/dev-utils@1.0.17
 - @0x/fill-scenarios@1.0.12
 - @0x/instant@0.0.7
 - @0x/json-schemas@2.1.1
 - @0x/metacoin@0.0.28
 - @0x/migrations@2.0.4
 - @0x/order-utils@3.0.2
 - @0x/order-watcher@2.2.4
 - @0x/react-docs@1.0.18
 - @0x/react-shared@1.0.21
 - @0x/sol-compiler@1.1.12
 - @0x/sol-cov@2.1.12
 - @0x/sol-doc@1.0.7
 - @0x/sra-spec@1.0.10
 - @0x/subproviders@2.1.4
 - @0x/testnet-faucets@1.0.56
 - @0x/utils@2.0.5
 - @0x/web3-wrapper@3.1.4
 - @0x/website@0.0.59
2018-11-14 16:16:46 +01:00
Leonid Logvinov
3f647c259a Updated CHANGELOGS 2018-11-14 16:16:32 +01:00
Leonid Logvinov
06dcf24496 Merge pull request #1259 from 0xProject/feature/ow-zrx-bug
[@0x/order-watcher] Fix a bug in an order removal when maker token is ZRX
2018-11-14 16:04:25 +01:00
Leonid Logvinov
77c77631e1 Add a comment 2018-11-14 16:03:19 +01:00
Leonid Logvinov
b0e9f58033 Fix a bug in an order-watcher order removal when maker token is ZRX 2018-11-14 15:41:58 +01:00
fragosti
80e7e84a06 fix: do not remove payment dropdown when confirmation pending 2018-11-13 19:49:06 -08:00
fragosti
15105cde0f refactor: move wallet panel content os switching logic into two methods 2018-11-13 19:44:31 -08:00
fragosti
921ef90a14 feat: dont show payment dropdown content on mobile 2018-11-13 19:34:34 -08:00
fragosti
1a1caa1ca2 feat: center title label with circle 2018-11-13 18:04:44 -08:00
Brandon Millman
af6aa2df93 fix(instant): catch errors coming from calls to the orderValidator contract 2018-11-13 18:03:09 -08:00
fragosti
fe1746c7ac chore: remove unused import 2018-11-13 17:50:15 -08:00
fragosti
d19c8ae9b1 feat: add coinbase wallet app logo to wallet prompt 2018-11-13 17:46:58 -08:00
fragosti
84215f75e0 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/different-install-wallet-copy-for-mobile 2018-11-13 17:31:54 -08:00
Francesco Agosti
4fc457b78b Merge pull request #1242 from 0xProject/feature/instant/metamask-connect-flow
[instant] Install/Unlock MetaMask, connect PaymentDropdown to redux state
2018-11-13 17:31:38 -08:00
fragosti
2f6b1273aa Merge branch 'feature/instant/metamask-connect-flow' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-13 17:12:51 -08:00
fragosti
da9de70bbc Merge https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-13 17:09:58 -08:00
fragosti
35bfd493e8 feat: display the correct provider type and change unlock / install prompt content 2018-11-13 17:08:11 -08:00
Steve Klebanoff
b174a891bc Merge pull request #1255 from 0xProject/feature/instant/metamask-connect-flow-input-fix
[instant] Fix input bug
2018-11-13 16:19:15 -08:00
Steve Klebanoff
bb79a5e324 linting 2018-11-13 15:18:29 -08:00
Steve Klebanoff
9e0c232a73 Remove ConnectedZeroExInstantContainer, introduce ConnectedBuyOrderProgressOrPaymentMethod 2018-11-13 15:07:21 -08:00
Brandon Millman
e02dc13805 Merge pull request #1252 from 0xProject/fix/asset-buyer/price-per-token
[asset-buyer][instant] Fix incorrect token prices for non 18-decimal tokens
2018-11-13 14:35:09 -08:00
fragosti
c8b2a975f4 feat: change install wallet panel content based on browser and os 2018-11-13 14:30:27 -08:00
Brandon Millman
820ab062a6 chore(instant): fix prettier 2018-11-13 14:18:19 -08:00
F. Eugene Aumson
7b4f63a39c feat(order_utils.py) generate_order_hash_hex() (#1234) 2018-11-13 16:30:12 -05:00
fragosti
8a64599ca5 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/different-install-wallet-copy-for-mobile 2018-11-13 13:00:52 -08:00
Fabio Berger
9b1ec5baaa Move benefits to language files and fix copy 2018-11-13 21:00:37 +01:00
Brandon Millman
3a3fe0e69a Merge branch 'development' into fix/asset-buyer/price-per-token
* development:
  Publish
  Updated CHANGELOGS
  Fix a bug when undefined was been tried to convert to an array
  feat(instant): add extra asset metadata
  chore: fix linter error
  Improve logo spacing
  fix: lowercase supplied address before comparing with derived addresses (which are not checksummed)
  Remove unused instance variable
  update yarn.lock
  Increase logo size
  Replace remaining scroll-links with Link component
  Adjust paddin
  Fix menuItem background colors depending on the context
  Remove "Home" menu item, instead make different parts of logo link to different sections of the website
  Rename tutorial to match verb structure
  chore: Make `External exports` clickable on sidebar
  style: reduce border size on version dropdown
  style: make line-height of sidebar title 26px, make sure still bottom aligned with version picker
  Update yarn.lock
  style: remove small gap under topbar
2018-11-13 11:38:20 -08:00
Fabio B
5c21d3f6af Merge pull request #1244 from 0xProject/developerSectionNits
Remaining Developer Section Design Nits
2018-11-13 20:36:48 +01:00
Brandon Millman
baba78f545 chore(asset-buyer): update changelog to major version bump 2018-11-13 11:36:19 -08:00
fragosti
f03afe6f1b Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-13 10:46:19 -08:00
fragosti
bed134c1da chore: PR feedback 2018-11-13 10:37:42 -08:00
fragosti
d36cf58b82 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-13 10:37:27 -08:00
Brandon Millman
5527de62ff chore(instant): update selectedAssetAmount in the redux state to be named selectedAssetUnitAmount 2018-11-13 10:29:21 -08:00
Fabio Berger
954fe3f549 update yarn.lock 2018-11-13 17:14:21 +01:00
Fabio Berger
4a444591c1 Implement 0x launch kit landing page 2018-11-13 17:14:13 +01:00
August Skare
0c222f9890 Merge branch 'development' into dev-tools-pages 2018-11-13 10:14:04 +01:00
August Skare
e43988aa44 Merge branch 'development' into dev-tools-pages 2018-11-13 09:52:41 +01:00
Brandon Millman
e8afc66a5a chore(asset-buyer): update changelog 2018-11-12 20:51:37 -08:00
Brandon Millman
49a9345bf4 feat(instant): calculate per unit eth amount to populate OrderDetails component 2018-11-12 20:50:28 -08:00
Brandon Millman
d73faf1b81 fix(asset-buyer): output assetEthAmount instead of ethPerAssetPrice in BuyQuoteInfos 2018-11-12 20:50:27 -08:00
fragosti
0c6110b736 chore: run linter 2018-11-12 18:50:18 -08:00
fragosti
2da258f5be feat: use Omit type to improve type defitions in some containers 2018-11-12 18:48:20 -08:00
fragosti
e9bf7206bd chore: remove unused constant 2018-11-12 18:34:45 -08:00
fragosti
2b4dcb419e fix: rename handler creator name 2018-11-12 17:48:13 -08:00
fragosti
c67632dff5 feat: make all button fontsizes 16px by default 2018-11-12 17:42:56 -08:00
fragosti
01b36b4949 fix: remove requirement of default case in all switch statements 2018-11-12 17:30:28 -08:00
fragosti
711b307e6c feat: prevent eth balance blink 2018-11-12 17:09:28 -08:00
fragosti
1ab19a7c23 Merge branch 'feature/instant/asset-data-map' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-12 15:11:36 -08:00
fragosti
7068f7b4d1 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-12 15:10:46 -08:00
fragosti
79f0324abc feat: integrate wallet flow with heartbeat and other branches 2018-11-12 13:30:47 -08:00
Fabio Berger
a4a46dc076 chore: fix linter error 2018-11-12 13:50:23 +01:00
Fabio Berger
0d565fe32f Improve logo spacing 2018-11-12 13:27:14 +01:00
August Skare
ee91f56bbe remove unused dependecies 2018-11-12 08:24:21 +01:00
Fabio Berger
498be7ac41 update yarn.lock 2018-11-11 22:11:40 +01:00
Fabio Berger
0391f93490 merge development 2018-11-11 22:11:10 +01:00
Fabio Berger
399a7d5fec Increase logo size 2018-11-11 22:07:58 +01:00
Fabio Berger
0d201173ef Replace remaining scroll-links with Link component 2018-11-11 17:51:00 +01:00
Fabio Berger
2d43f312c8 Adjust paddin 2018-11-11 16:50:08 +01:00
Fabio Berger
1ec8a4115f Fix menuItem background colors depending on the context 2018-11-11 16:48:31 +01:00
Fabio Berger
753b33aec5 Remove "Home" menu item, instead make different parts of logo link to different sections of the website 2018-11-11 15:31:52 +01:00
Fabio Berger
7626d1d6fe Rename tutorial to match verb structure 2018-11-11 14:54:07 +01:00
fragosti
a8a1ea92a6 fix: no longer refer to error account state 2018-11-09 16:30:38 -08:00
fragosti
ff027ee36a Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-09 16:22:36 -08:00
fragosti
ba292ead45 fix: set all button font sizes in buy flow to 16px 2018-11-09 16:20:39 -08:00
fragosti
5355f3c538 fix: remove unused ProgressBar from BuyOrderProgress and fix issue where payment method is not shown for pending metamask confirmation 2018-11-09 16:16:04 -08:00
fragosti
478330c12d fix: minimize height difference between different states 2018-11-09 16:06:58 -08:00
fragosti
b1376059d3 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-09 15:43:03 -08:00
fragosti
2bba01c664 feat: toggle wallet connection color 2018-11-09 15:40:02 -08:00
fragosti
433fb3597d feat: refactor button styles and add href to Text 2018-11-09 15:26:57 -08:00
fragosti
7460f2796a feat: add more info section to the metamask panel 2018-11-09 15:11:47 -08:00
fragosti
7249cc7b49 feat: allow href prop on button 2018-11-09 15:08:01 -08:00
fragosti
b598827708 feat: implement basic StandardModalContent with accompanying InstallWalletPanelContent 2018-11-09 14:57:29 -08:00
fragosti
128abb39dd feat: add padding to close icon to increase tap area 2018-11-09 14:21:41 -08:00
fragosti
79a533940e feat: open metamask sliding panel if locked on click 2018-11-09 14:20:14 -08:00
fragosti
3a51bd1e69 feat: create connect metamask 2018-11-09 13:56:04 -08:00
fragosti
3f1f19e344 feat: connect payment method to state and display different content based on account state 2018-11-09 13:41:32 -08:00
fragosti
3aa831ad77 feat: add account payment method container 2018-11-09 13:29:28 -08:00
fragosti
3fd667b3be feat: make zero ex instant container switch between progress and payment 2018-11-09 13:23:01 -08:00
fragosti
fa7bd072d0 feat: refactor progress bar code to expose static progress bar 2018-11-09 13:19:59 -08:00
fragosti
daa011f7cb feat: implement CurrentStandardSlidingPanel and put it in the main container 2018-11-09 11:15:32 -08:00
fragosti
239eada7d9 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-09 10:34:14 -08:00
fragosti
a50f0ca997 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow 2018-11-08 17:38:46 -08:00
fragosti
39ae21d693 feat: allow panel children to fill entire content / remove title from panel component 2018-11-08 16:58:44 -08:00
fragosti
fc138cd73d feat: add metamask logo 2018-11-08 16:40:21 -08:00
fragosti
990d510d05 feat: add lock icon 2018-11-08 16:40:21 -08:00
August Skare
52b49fee24 better positioning of hero animation 2018-11-07 13:08:08 +01:00
August Skare
31f096248d lower deboune on animation resize 2018-11-07 13:01:53 +01:00
August Skare
d91c41b29c fix alignment on list bullest 2018-11-07 12:45:25 +01:00
August Skare
c27a2b64ef visual tweaks in code component 2018-11-07 12:39:47 +01:00
August Skare
fdaffb67e8 styling adjustment in uniq components 2018-11-07 12:39:33 +01:00
August Skare
d32bf15b69 align 0x logo in footer 2018-11-07 10:19:33 +01:00
August Skare
7536648f7a right align icons in trace component 2018-11-07 10:16:13 +01:00
August Skare
eb2fa8e4af more spacing on footer items 2018-11-07 10:13:49 +01:00
August Skare
5d3d2736f5 break compiler cards on an earlier breakpoint 2018-11-07 09:51:42 +01:00
August Skare
0574794496 new og images 2018-11-07 09:48:49 +01:00
August Skare
3a23e795ac new hero animation using bodymovin and lottie 2018-11-07 09:48:10 +01:00
August Skare
2dfca078fd copy changes 2018-11-07 09:10:25 +01:00
August Skare
9006e8fced fix issues in code element 2018-11-06 14:39:48 +01:00
August Skare
6b8f8580d8 fix large button on small screens 2018-11-06 14:33:31 +01:00
August Skare
eb9d802146 rename pesudo element in code gutter 2018-10-30 09:07:25 +01:00
August Skare
6b11ca6c1d fix code highlighting with ... 2018-10-30 09:05:52 +01:00
August Skare
4c8178fc30 remove outline on buttons 2018-10-30 08:42:32 +01:00
August Skare
4616d6f59d button tweaks 2018-10-30 08:39:24 +01:00
August Skare
5cb944fe1b optional copy button in code component 2018-10-30 08:27:31 +01:00
August Skare
50c4909f22 change footer copy 2018-10-30 08:24:14 +01:00
August Skare
dd8b9bf987 fix link to 0x in header 2018-10-30 08:21:39 +01:00
August Skare
0e3cd82348 Fixes/august (#12)
* fix button dimensions

* fix footer hover color

* breakout in trace component

* fix padding on button on small screens

* fix title with content on small screens

* sizing adjustment in intro component

* intro component adjustments

* container size adjustments

* meta og images

* fixed gutter size

* trace component fix + breakout fix

* show copy button if touch device

* responsive hero animation
2018-10-29 08:15:20 +00:00
August Skare
3d4041ecd3 Feature/feedbacktweaks (#11)
* Fix typo

* Fix 1px line showing in middle of divs

* Increase inline code padding by 2px

* Make masonry block not full width on screens larger than mobile

* Align list items

* Change button text to copied if it's been copied
2018-10-29 08:13:03 +00:00
Fabio Berger
81fb8d614f chore: Make External exports clickable on sidebar 2018-10-26 17:19:53 +02:00
Fabio Berger
3e75daafa1 style: reduce border size on version dropdown 2018-10-26 14:01:15 +02:00
Fabio Berger
6696aa46ee style: make line-height of sidebar title 26px, make sure still bottom aligned with version picker 2018-10-26 14:01:00 +02:00
Fabio Berger
14a9770d57 Update yarn.lock 2018-10-26 13:52:39 +02:00
Fabio Berger
b8d2cc1221 style: remove small gap under topbar 2018-10-26 13:52:29 +02:00
August Skare
89e439c521 update content in tabs 2018-10-26 09:59:10 +02:00
August Skare
0f97771d5a fix props drilling to far down 2018-10-26 09:33:30 +02:00
August Skare
74f0515370 alernate prop on inlinecode component 2018-10-26 09:23:09 +02:00
August Skare
f17c7e4a22 fix button position in code component 2018-10-26 08:50:20 +02:00
August Skare
5fe98c816d fix scrollbars in code components 2018-10-26 08:48:17 +02:00
August Skare
f75cfd8aa4 fixed links in footer 2018-10-26 08:44:27 +02:00
August Skare
7577d96671 new hover styling 2018-10-26 08:38:10 +02:00
August Skare
58f5b6d0ad new favicons 2018-10-26 08:29:21 +02:00
August Skare
a11348ce6b fix line-height in lead component 2018-10-26 08:24:44 +02:00
August Skare
a4825d8748 center logo text 2018-10-26 08:22:29 +02:00
August Skare
e3c0363db1 update codeblock in trace component 2018-10-26 08:18:04 +02:00
August Skare
3fdc6e5e47 text color in trace component 2018-10-26 08:15:43 +02:00
August Skare
2ef8204ab4 14px fontsize on code 2018-10-26 08:13:04 +02:00
August Skare
72b4ee76fb update text color on dark background 2018-10-26 08:10:31 +02:00
August Skare
3901380ffb update content on copiler page 2018-10-26 08:08:40 +02:00
August Skare
fb24a18f3f fix dom elements type in intro 2018-10-25 14:15:47 +02:00
August Skare
1899493ca8 breakpoint on medium in intro component 2018-10-25 14:15:47 +02:00
August Skare
1581ced6ec add json support to highlight 2018-10-25 14:15:47 +02:00
Megan Pearson
5e8f53c7b7 Updates intro component 2018-10-25 14:15:47 +02:00
Megan Pearson
370d15ed1d Merge remote-tracking branch 'origin/dev-tools-pages' into dev-tools-pages 2018-10-25 14:12:17 +02:00
Megan Pearson
43b792f307 Fixed typos 2018-10-25 14:12:01 +02:00
Megan Pearson
b844126516 Updates intro component (#10)
* Updates intro component

* Remove unused Inner

* Use Breakout component in Intro
2018-10-25 13:04:50 +01:00
August Skare
43e55a963b Feature/syntaxhighlighting (#9)
* wip code highlighting of lines

* Implements gutter component

* WIP: Profiler with gutter

* cleaned up highlight code

* Removes before content for gutter styling

* Styles gutter

* Add correct Profiler code content

* Adds color variable for gutter gray

* refactor code component width gutter and diffing
2018-10-25 12:19:56 +01:00
Megan Pearson
9cf055c159 Add highlighter.js; basic styling for .diff classes; Start of code block in cov 2018-10-25 13:13:00 +02:00
Megan Pearson
16b5157078 Updates Intro Component to use IntroBody and IntroAside 2018-10-25 13:12:38 +02:00
August Skare
1ae9f68db8 Content (#7)
* optional children in List component

* added real content to trace page

* added real content to cov page

* add support for json highlighting

* real content on compiler page

* real content on profiler page

* remove unused import

* remove list from compiler page

* wrap code components in pages with breakout component

* fix font size on text

* fix typo
2018-10-25 12:10:35 +01:00
August Skare
e5d3e3b33a Feature/tweaks (#8)
* show copy button on focs

* change base link styling

* text-decoration underline on basic links

* basic hover and focus styles on button and tabs

* add links in footer

* change breakpoints vars

* medium breakpoint on footer
2018-10-25 10:54:53 +01:00
August Skare
1c8ea1336e Feature/animations (#6)
* test animation

* test two part video

* new video test

* replace videos with gifs

* rename videos folder to images

* sol-cov gifs

* renames variables

* compiler gif

* change in hero srcset

* better positioning of hero image
2018-10-25 10:50:09 +01:00
August Skare
a4de585feb Feature/colors (#5)
* fix color variables

* rename link var to type
2018-10-23 12:34:35 +01:00
Megan Pearson
e624759bc7 Merge pull request #4 from bakkenbaeck/feature/moreresponsive
Feature/moreresponsive
2018-10-23 10:18:12 +02:00
August Skare
0836ab370e Update margin-bottom
Co-Authored-By: mepearso <megan.e.pearson@gmail.com>
2018-10-23 10:17:48 +02:00
Megan Pearson
66848ef80f Responsive Compiler 2018-10-23 09:59:09 +02:00
Megan Pearson
f0b9365ca9 Responsive intro, again 2018-10-23 09:59:09 +02:00
Megan Pearson
614ca51cb1 Adds wide prop for full width sections 2018-10-23 09:58:34 +02:00
Megan Pearson
f31f9eb24e Implements Lead typography 2018-10-23 09:57:53 +02:00
Megan Pearson
bc029df082 Merge branch 'feature/variables' into dev-tools-pages 2018-10-22 17:05:27 +02:00
Megan Pearson
63b53acd48 Merge branch 'dev-tools-pages' into feature/variables 2018-10-22 14:28:05 +02:00
Megan Pearson
50eee9a657 Merge branch 'feature/alternate-main' into dev-tools-pages 2018-10-22 14:11:20 +02:00
Megan Pearson
917952bc2a Remove unused imports 2018-10-22 14:04:23 +02:00
August Skare
00afb2440d remove contentBlock from content component 2018-10-22 13:27:49 +02:00
August Skare
8cf720986e rename Main to Content 2018-10-22 13:27:49 +02:00
August Skare
97c54f84f0 remove container from all pages 2018-10-22 13:27:49 +02:00
August Skare
e485a98143 support dark alternative of Main component 2018-10-22 13:27:49 +02:00
Megan Pearson
1e29f2875d Remove font size adjustment for small screens from Beta 2018-10-22 13:27:35 +02:00
Megan Pearson
61cd36cc96 Responsive footer 2018-10-22 13:27:35 +02:00
Megan Pearson
a9b4c1cba8 Responsive font sizes in typography and globalstyles 2018-10-22 13:27:35 +02:00
Megan Pearson
5187017f21 Responsive trace 2018-10-22 13:27:35 +02:00
Megan Pearson
73ea2dac6d Responsive header 2018-10-22 13:27:35 +02:00
Megan Pearson
e9232bf070 Exports media breakpoints 2018-10-22 13:27:35 +02:00
Megan Pearson
ee3538262d Changed name of export to colors and updates components 2018-10-22 13:27:35 +02:00
Megan Pearson
47b281b754 Implements color variables and updates components 2018-10-22 13:27:35 +02:00
Megan Pearson
dfa03feb43 Responsive Intro 2018-10-22 11:55:02 +02:00
Megan Pearson
49beb6b7a3 Add light prop to code 2018-10-22 09:53:58 +02:00
Megan Pearson
6066db8f42 Responsive list 2018-10-22 09:53:22 +02:00
August Skare
68c1818139 breakout container for small screens 2018-10-22 09:20:54 +02:00
August Skare
12087b6b70 ligt theme on code 2018-10-22 09:11:37 +02:00
August Skare
15a3c234c5 dont shrink icons in trace component 2018-10-22 09:05:07 +02:00
August Skare
bf7443c985 button styling on small screens 2018-10-22 09:02:59 +02:00
August Skare
6c39d498c2 code fontsize on small screens 2018-10-22 08:52:21 +02:00
August Skare
cacb8acf76 hero spacing adjustment on small screen 2018-10-22 08:46:46 +02:00
August Skare
c1082b9b08 spacing adjustments on contentblock and main components 2018-10-22 08:40:38 +02:00
August Skare
d3c5c68296 remove padding on Trace component on small breakpoint 2018-10-22 08:40:07 +02:00
August Skare
39fd3fd866 spacing adjustment in footer 2018-10-22 08:29:41 +02:00
August Skare
7ed95d3954 don't shrink icons in footer 2018-10-22 08:27:41 +02:00
August Skare
4dc91c86ae keep fonts folder in git 2018-10-22 08:21:34 +02:00
August Skare
7d7f54c751 Feature/build step (#2)
* BundleAnalyzerPlugin

* lazy load highlight.js

* seperate bundles for each page

* prerender apps to html on build

* preload important font files

* dont prerender code copy button

* fix woff2 variant of font

* added missing doctype

* remove metatags component
2018-10-19 16:05:09 +02:00
August Skare
580e574c84 Feature/build step (#2)
* BundleAnalyzerPlugin

* lazy load highlight.js

* seperate bundles for each page

* prerender apps to html on build

* preload important font files

* dont prerender code copy button

* fix woff2 variant of font

* added missing doctype

* remove metatags component
2018-10-19 15:02:15 +01:00
Megan Pearson
736e1717fa Merge branch 'feature/responsive' into feature/variables 2018-10-19 15:36:38 +02:00
Megan Pearson
d6ac1a4f78 Remove font size adjustment for small screens from Beta 2018-10-19 15:32:02 +02:00
Megan Pearson
8a7c61c6f4 Responsive footer 2018-10-19 15:31:26 +02:00
Megan Pearson
9a024fdacf Responsive font sizes in typography and globalstyles 2018-10-19 14:30:38 +02:00
Megan Pearson
135a623b1f Responsive trace 2018-10-19 14:29:59 +02:00
Megan Pearson
ba0b9b259f Responsive header 2018-10-19 11:59:03 +02:00
Megan Pearson
45a24738b5 Exports media breakpoints 2018-10-19 11:33:41 +02:00
Megan Pearson
585ca203b0 Changed name of export to colors and updates components 2018-10-19 11:32:59 +02:00
Megan Pearson
561f441a5b Implements color variables and updates components 2018-10-19 09:37:14 +02:00
August Skare
30f7f83573 added trace component to trace view 2018-10-18 15:25:08 +02:00
August Skare
97646571a1 tweaking header and hero position and sizing 2018-10-18 14:09:02 +02:00
August Skare
ac60d45969 compiler component in compiler view 2018-10-18 14:08:46 +02:00
August Skare
afa52e280c intro component on cov view 2018-10-18 13:59:16 +02:00
August Skare
c57c9752a2 intro component in profiler view 2018-10-18 13:58:07 +02:00
August Skare
b158a6d722 initial commit 2018-10-18 13:28:44 +02:00
August Skare
c616b53c9c update react and styled-components 2018-10-15 13:40:49 +02:00
Leonid Logvinov
7d2c975d73 Merge branch 'development' 2018-10-09 13:13:10 +02:00
Brandon Millman
e5153737d8 Merge branch 'development'
* development: (939 commits)
  Add asset-buyer to published packages section in README
  Publish
  Updated CHANGELOGS
  Update BuyQuote interface
  force re-build
  Add website build to instructions
  Revert format and re-add changes
  Build website in parallel with other tests since no other test relies on it being built to run
  Add back sourceMap support for both dev/prod
  Upgrade webpack
  Add missing default options
  Remove unused constants
  Add fee order with a takerFee
  Add additional order factory methods and refactor test to use them
  Add comments about buy quote calculation
  Update CHANGELOG
  Fix linter
  Add additional test for slippage
  Add buy_quote_calculator_test
  Add 0x Instant to bundle analysis
  ...
2018-10-04 16:06:05 -07:00
Alex Browne
88766a02c7 Merge branch 'development' 2018-08-13 18:42:09 -07:00
Fabio Berger
8162394797 Merge branch 'development'
* development: (175 commits)
  small README fixes
  Update docs list in README
  Add manual postpublish command to all public packages and update CHANGELOG.json
  Fix postpublish util to ignore namespace
  Fix release notes bug
  Should print out `lerna publish` stdout so we can see if anything went wrong
  Publish
  Updated CHANGELOGS
  Generate CHANGELOG.json files
  Fix hasty find/replace
  Default to 4sp
  Update moment, no longer need separate moment types
  Move prettify command to utils and also call it on CHANGELOG.md
  Add prettier run on generated CHANGELOG.json and fix scripts
  Remove semi-colons from monorepo-scripts package.json
  Get rid of ; in top-level package.json
  Fix TSLint error
  Make dry-run configurable from top-level package.json
  Improve naming
  Run prettier, update deployer CHANGELOG
  ...
2018-04-02 21:23:07 +09:00
Fabio Berger
fd001186dd Merge branch 'development'
* development:
  Update deployer version since manual re-publish
  Add new entry into CHANGELOG
  Fix bad merge
  Update yarn.lock
  Change title
  Add Blake and Zach to About page
  Re-size Jacob and Tom's images
  WIP
  Fix bad merge
  Fix yarn.lock
  Fix quotation marks
  Update README and CHANGELOG
  Add scaffolding for sra-report collection unit tests
2018-03-20 11:11:07 +00:00
Fabio Berger
128fef8838 Merge branch 'master' of github.com:0xProject/0x-monorepo
* 'master' of github.com:0xProject/0x-monorepo:
2018-03-19 01:18:01 +01:00
Fabio Berger
1e25a0654a Merge branch 'development'
* development:
  Manually publish 0x.js back to a working state
  Publish
  Publish
  Fix 0x.js assets
  Remove assets from connect and _bundles from packages that don't generate the folder
  Publish
  Fix packages that aren't working as expected
2018-03-19 01:17:37 +01:00
Fabio Berger
82b0ff6008 Merge branch 'development'
* development: (269 commits)
  Make new packages default to public on publish
  Add new public packages to top-level README
  Update top-level package.json
  Fix incorrect new versions
  Fix path to assets
  Publish
  Updated CHANGELOGS
  Fix quotation marks
  Add a complex test for ast visitor
  Move opcodes to constants
  Fix issue with bundling subproviders for the browser by ignoring the `ganache-core` dependency
  Add changelog entry about pragma addition
  Add pragma above command-line script
  Add tests for sol-cov
  Updated CHANGELOGs
  Add SignedOrder, Order, and ECSignature types to the types package
  Keep console.log in monorepo-scripts
  Enable coverage for all other packages with tests
  Fix parallel coverage results reporting
  Fix linter issuesx
  ...
2018-03-18 20:14:02 +01:00
Brandon Millman
ca7c3630f9 Merge branch 'development'
* development: (114 commits)
  Prettier sra-report README
  Add new packages to top level README
  Updated @0xproject/utils in top level package.json
  Publish
  Updated CHANGELOGs
  Detail tests in the README
  Add support for ropsten and rinkeby
  Fix yarn.lock
  Update list of packages and organize them alphabetically
  Fix prettier issues
  Add support for going back to previous hashes via the browser back button to wiki
  Scroll to previous hashed elements when user clicks back button
  Add back strict null checks to react-shared package and fix issues
  remove ability to have implicit dependencies and add missing deps
  update license
  remove no-implicit-this
  Add example & screenshot to npmignore
  Remove `;` to be nice to windows users
  Use unencoded @ symbol, browser will fix
  Fix external type links
  ...
2018-03-08 10:47:23 -08:00
Brandon Millman
260bb8218f Merge branch 'master' of github.com:0xProject/0x-monorepo
* 'master' of github.com:0xProject/0x-monorepo: (171 commits)
  Fix bugs in postpublish_utils.js
  Update @0xproject/utils in top-level package.json
  Changelog tweaks
  Publish
  Updated CHANGELOGS
  Fix typo
  Add PR number to changelog entry
  Add changelog update to subproviders package
  Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` and add tests
  Remove unnecessary type assertion
  Fix comments
  Add comments
  Don't need any external packages for 0x connect docs yet
  Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc
  Fix styling
  Make prettier ignore postpublish_utils
  Update yarn.lock
  Update yarn.lock
  Update all mentions of the repo name being `0x.js` to `0x-monorepo`
  Add hack comment
  ...
2018-03-08 10:47:13 -08:00
Fabio Berger
a691de7d55 Merge branch 'development'
* development:
  Fix bugs in postpublish_utils.js
2018-03-05 06:13:18 +01:00
Fabio Berger
5674c484e2 Merge branch 'development'
* development: (175 commits)
  Update @0xproject/utils in top-level package.json
  Changelog tweaks
  Publish
  Updated CHANGELOGS
  Fix typo
  Add PR number to changelog entry
  Add changelog update to subproviders package
  Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` and add tests
  Remove unnecessary type assertion
  Fix comments
  Add comments
  Don't need any external packages for 0x connect docs yet
  Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc
  Fix styling
  Make prettier ignore postpublish_utils
  Update yarn.lock
  Update yarn.lock
  Update all mentions of the repo name being `0x.js` to `0x-monorepo`
  Add hack comment
  Add comment about typeDoc versions
  ...
2018-03-04 19:38:55 +01:00
Brandon Millman
9286dc284c Merge branch 'development'
* development:
  Publish
  Updated CHANGELOGs
  Do not JSON parse empty reponse
  Fix incorrect comment on WebSocketOrderbookChannel constructor
  Fix broken postpublish script in connect
2018-02-16 23:00:54 -07:00
Brandon Millman
624b71bd39 Merge branch 'development'
* development: (45 commits)
  Updated top level @0xproject/utils dependency
  Publish
  Updated CHANGELOGs
  Add an enforced minimum for the heartbeat interval
  Add Rinkeby network to smart contract docs
  Updated CHANGELOG
  Add configurable heartbeat to WebSocketOrderbookChannel
  remove hard-coded color
  Remove section links until they go somewhere
  Add more padding on top of section title
  Add hack comment explaining param count short-cut
  replace repeated conditionals with variable
  Remove unneeded props
  use const over hard-coding
  uncomment dev logic
  Re-design docs pages
  Add icons for all doc pages
  Re-designed Wiki and half-redesigned docs pages
  Prettier fixes
  Rename variables
  ...
2018-02-16 10:01:01 -07:00
Fabio Berger
b7ea605a3b Merge branch 'development'
* development: (57 commits)
  Update utils in top-level package.json
  Publish
  Fix version in CHANGELOG
  Update changelog version
  Fix changelog version
  Fix changelogs
  Add `yarn-error.log` to all .npmignore
  Add PR number to CHANGELOGs
  ignore all files starting with dots in all sub-packages
  Remove top level .npmignore
  Add npmignore to web3-wrapper and update CHANGELOG
  Add npmignore and remove .gitignore
  Add npmignore to utils and update CHANGELOG
  Add npmignore to types and update CHANGELOG
  cleanup npmignorex
  Add npmignore to subproviders and update CHANGELOG
  Add npmignore to json-schemas and update CHANGELOG
  Add npmignore to dev-utils and update CHANGELOG
  Add npmignore to deployer along with a changelog
  Add tslint.json to deployer package and fix all tslint issues
  ...
2018-02-09 16:36:13 -08:00
Brandon Millman
489a787de8 Merge branch 'development'
* development: (199 commits)
  Update @0xproject/utils version in top level package.json
  Publish
  Update CHANGELOGs
  Fix wiki styling
  Prettier
  Addressed review comments
  Update Subprovider README
  Fix Remco's github name in CODEOWNERS
  Only show faucet error if not on a testnet
  Organize async task queues by network
  Fix ABI error message
  Move isTestNetwork into utils and also check it from showing ZRX request button
  Stop using definite assignment assertion cause prettier doesn't handle that
  Special-case ZRXToken snake case conversion
  Fix linter errors
  Generate contract wrappers on pre-build
  Add missing async
  Remove noImplicitThis
  Tslint disable no-consecutive-blank-lines in generated files
  Change compiled sources in contracts
  ...
2018-02-07 13:37:53 -08:00
Fabio Berger
84150036ed Merge branch 'development'
* development: (78 commits)
  Publish
  Add PR number
  Add config file specifically in prettier command and fix files
  Fix prettier
  Fix prettier
  Add shouldAddPersonalMessagePrefix param to signOrderHashAsync instead of trying to infer whether to add it or not from the nodeVersion
  Publish
  Move @0xproject/types to dependencies
  Updated web3-typescript-typings changelog
  Fixed getTransactionReceipt not returning null
  Run prettier
  Update changelog
  Add Rinkeby addresses to artifacts
  Fix bad merge on package.json
  Respond to GH comments and add /info endpoint
  Publish
  Update yarn.lock
  Update the CHANGELOG
  Fix the bug making it impossible to specify the custom ZRX address
  Change package name to @0xproject/testnet-faucets
  ...
2018-01-30 13:59:47 +01:00
Brandon Millman
619123720c Merge branch 'development'
* development: (31 commits)
  Publish
  Update CHANGELOG
  Fix the typos
  Added PR number to web3 typings changelog
  Update the CHANGELOG
  Fix fillOrdersUpTo balances validation
  Add a regression test for fillUpToValidation
  Fix web3 typing defaultAccount not allowing `undefined`
  Sort packages alphabetically in README
  Add postpublish scripts
  Return after checking for an error and add an explanatory comment
  Stop appending /v0 to HttpClient api endpoint urls
  Add chai-as-promised-typescript-typings
  Remove redundant type refs
  Improve HttpClient errors
  Add web3-typescript-typings and chai-as-promised-typescript-typings to the main monorepo
  Import chai-as-promised-typescript-typings
  Fix @bmilman linkedin link
  Add new team photos
  Add a CHANGELOG to a website
  ...
2018-01-17 22:49:31 -08:00
Leonid Logvinov
cc98ff9fe6 Merge branch 'development' 2018-01-11 13:17:12 +01:00
Leonid Logvinov
39d159f38c Merge branch 'development' 2017-12-20 17:25:03 +01:00
Leonid Logvinov
ca8eb90cec Merge branch 'development' 2017-12-15 16:07:05 +01:00
Leonid Logvinov
f8e3e28d85 Merge branch 'development' 2017-12-14 17:52:23 +01:00
Leonid Logvinov
4d868489bd Merge branch 'development' 2017-12-13 16:06:31 +01:00
Brandon Millman
b06f09f6af Merge branch 'development'
* development: (115 commits)
  Publish
  Add scope to abi-gen dependency in 0x.js
  Add @0xproject scope to abi-gen package name
  Add yarn install to lerna:publish command
  Make contracts package private
  Update connect changelog
  remove console.log
  Update README.md
  Fix unit test
  Add missing params
  Debug CircleCi failure
  Update yarn.lock
  Inline network module
  Add todo
  Stop supporting different file extensions in abi-gen
  Refactor networkId out of web3Wrapper
  Update connect types in preperation for publishing
  Add link to random id generator
  Remove `prebuild` command and add `test:circleci`
  Make sure we don't pass empty maker into getOrderHashHex
  ...
2017-12-08 14:21:59 -08:00
Brandon Millman
bf00f5f945 Merge branch 'development'
* development: (156 commits)
  Publish
  Update CHANGELOG.md
  Redeclare Order, SignedOrder, and ECSignature types in connect, remove 0x.js dependency
  Add SignedOrder and TokenTradeInfo to public interface and fix a HttpClient comment
  Add TokenTradeInfo to public types
  Rename @0xproject/connect to 0x Connect
  Rename packageName to displayName for clarity
  Fix phantom `Contracts` section issue
  Add 0x Connect to footer
  Update 0x.js to 0.27.1
  Fix connect documentation introduction and installation wording
  Lock the 0x.js version used in website
  rename for clarity
  remove unused code
  Add 0x Connect Docs to the menu and topBar
  Add connect docs
  Add subPackageName and get rid of hard-coded 0x.js in sourceLink
  Publish
  Refactor the topLevel documentation react components for 0x.js and Smart contracts into a single component
  Export TransactionOpts type
  ...
2017-11-29 12:55:34 -08:00
Brandon Millman
6ceb6cc301 Merge branch 'development'
* development: (143 commits)
  Fix connect CHANGELOG version
  Publish
  Fix npm auth issues
  Revert "Publish"
  Publish
  Add actual version to CHANGELOG
  Add blockchainLifecycle management to the ExpirationWatcher test
  Update connect CHANGELOG.md in preperation for publishing
  Add TODO comment before BigNumber.config() call
  Prepare connect package for publishing
  Last renames
  Refactor while condition
  Fix tests
  Fix a typo in  postpublish utils tags -> tag
  Publish
  Revert "Publish"
  Publish
  Add instanceOf assertion
  Rename toDecimal to hexToDecimal
  Add PR numbers
  ...
2017-11-22 15:23:27 -08:00
Fabio Berger
00a6afaa8e Re-add changelog for 0x.js 2017-11-13 16:27:43 -05:00
3077 changed files with 309248 additions and 102481 deletions

View File

@@ -4,95 +4,128 @@ jobs:
build:
resource_class: medium+
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
environment:
CONTRACTS_COMMIT_HASH: '9ed05f5'
working_directory: ~/repo
steps:
- checkout
- run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV
# HACK(feuGeneA): commented out this hack as we're changing
# from a circleci-maintained container to a different
# container, and this hack may not apply anymore, as
# suggested by the non-existance of `/home/circleci/.bashrc`
# when running the command below.
# - run:
# # HACK(albrow): Without this, yarn commands will sometimes
# # fail with a "permission denied" error.
# name: Set npm path
# command: npm set prefix=/home/circleci/npm && echo 'export PATH=$HOME/circleci/npm/bin:$PATH' >> /home/circleci/.bashrc
- run:
name: install-yarn
command: sudo npm install --global yarn@1.9.4
command: npm install --force --global yarn@1.17.0
- run:
name: yarn
command: yarn --frozen-lockfile install || yarn --frozen-lockfile install
- run: yarn build:ci:no_website
command: yarn --frozen-lockfile --ignore-engines install || yarn --frozen-lockfile --ignore-engines install
- setup_remote_docker
- run: yarn build:ci
- run: yarn build:ts
- save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo
build-website:
- store_artifacts:
path: ~/repo/packages/abi-gen/test-cli/output
- store_artifacts:
path: ~/repo/packages/contract-wrappers/generated_docs
test-exchange-ganache:
resource_class: medium+
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: cd packages/website && yarn build:prod
test-contracts-ganache:
- run: yarn wsrun test:circleci @0x/contracts-exchange
test-integrations-ganache:
resource_class: medium+
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci contracts
test-contracts-geth:
- run: yarn wsrun test:circleci @0x/contracts-integrations
test-contracts-staking-ganache:
resource_class: medium+
docker:
- image: circleci/node:9
- image: 0xorg/devnet
- image: nikolaik/python-nodejs:python3.7-nodejs8
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
# HACK(albrow): we need to sleep 10 seconds to ensure the devnet is
# initialized
- run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts
- run: yarn wsrun test:circleci @0x/contracts-staking
test-contracts-rest-ganache:
resource_class: medium+
docker:
- image: nikolaik/python-nodejs:python3.7-nodejs8
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0x/contracts-multisig @0x/contracts-utils @0x/contracts-exchange-libs @0x/contracts-erc20 @0x/contracts-erc721 @0x/contracts-erc1155 @0x/contracts-asset-proxy @0x/contracts-exchange-forwarder @0x/contracts-coordinator @0x/contracts-erc20-bridge-sampler @0x/contracts-broker @0x/contracts-zero-ex
test-publish:
resource_class: medium+
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
- image: 0xorg/verdaccio
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:publish:circleci
- run:
command: yarn test:publish:circleci
no_output_timeout: 1800
- store_artifacts:
path: ~/.npm/_logs
test-doc-generation:
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:generate_docs:circleci
- run:
command: yarn test:generate_docs:circleci
no_output_timeout: 1200
test-rest:
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0x/contracts-test-utils
- run: yarn wsrun test:circleci @0x/abi-gen
- run: yarn wsrun test:circleci @0x/asset-swapper
- run: yarn wsrun test:circleci @0x/contract-artifacts
- run: yarn wsrun test:circleci @0x/assert
- run: yarn wsrun test:circleci @0x/base-contract
- run: yarn wsrun test:circleci @0x/connect
- run: yarn wsrun test:circleci @0x/contract-wrappers
- run: yarn wsrun test:circleci @0x/contract-wrappers-test
- run: yarn wsrun test:circleci @0x/dev-utils
- run: yarn wsrun test:circleci @0x/json-schemas
- run: yarn wsrun test:circleci @0x/metacoin
- run: yarn wsrun test:circleci @0x/order-utils
- run: yarn wsrun test:circleci @0x/order-watcher
- run: yarn wsrun test:circleci @0x/orderbook
- run: yarn wsrun test:circleci @0x/sol-compiler
- run: yarn wsrun test:circleci @0x/sol-cov
- run: yarn wsrun test:circleci @0x/sol-tracing-utils
- run: yarn wsrun test:circleci @0x/sol-doc
- run: yarn wsrun test:circleci @0x/subproviders
- run: yarn wsrun test:circleci @0x/web3-wrapper
@@ -106,6 +139,10 @@ jobs:
key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/assert/coverage/lcov.info
- save_cache:
key: coverage-asset-swapper-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/asset-swapper/coverage/lcov.info
- save_cache:
key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }}
paths:
@@ -115,9 +152,9 @@ jobs:
paths:
- ~/repo/packages/connect/coverage/lcov.info
- save_cache:
key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }}
key: coverage-contract-wrappers-test-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/contract-wrappers/coverage/lcov.info
- ~/repo/packages/contract-wrappers-test/coverage/lcov.info
- save_cache:
key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
@@ -126,26 +163,18 @@ jobs:
key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/json-schemas/coverage/lcov.info
- save_cache:
key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/metacoin/coverage/lcov.info
- save_cache:
key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/order-utils/coverage/lcov.info
- save_cache:
key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/order-watcher/coverage/lcov.info
- save_cache:
key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/sol-compiler/coverage/lcov.info
- save_cache:
key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }}
key: coverage-sol-tracing-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/sol-cov/coverage/lcov.info
- ~/repo/packages/sol-tracing-utils/coverage/lcov.info
- save_cache:
key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
paths:
@@ -161,55 +190,112 @@ jobs:
test-python:
working_directory: ~/repo
docker:
- image: circleci/python
- image: 0xorg/ganache-cli
- image: nikolaik/python-nodejs:python3.7-nodejs8
- image: 0xorg/ganache-cli:6.0.0
environment:
VERSION: '6.0.0'
- image: 0xorg/mesh:0xV3
environment:
ETHEREUM_RPC_URL: 'http://localhost:8545'
ETHEREUM_CHAIN_ID: '1337'
VERBOSITY: 5
BLOCK_POLLING_INTERVAL: '50ms'
ETHEREUM_RPC_MAX_REQUESTS_PER_24_HR_UTC: '1778000'
command: |
ganache-cli --gasLimit 10000000 --noVMErrorsOnRPCResponse --db /snapshot --noVMErrorsOnRPCResponse -p 8545 --networkId 50 -m "concert load couple harbor equip island argue ramp clarify fence smart topic"
sh -c "waitForGanache () { until printf 'POST /\r\nContent-Length: 26\r\n\r\n{\"method\":\"net_listening\"}' | nc localhost 8545 | grep true; do continue; done }; waitForGanache && ./mesh"
- image: 0xorg/launch-kit-backend:v3
environment:
RPC_URL: 'http://localhost:8545'
CHAIN_ID: 1337
WHITELIST_ALL_TOKENS: True
FEE_RECIPIENT: '0x0000000000000000000000000000000000000001'
MAKER_FEE_UNIT_AMOUNT: 0
TAKER_FEE_UNIT_AMOUNT: 0
MESH_ENDPOINT: 'ws://localhost:60557'
command: |
sh -c "waitForMesh () { sleep 30; }; waitForMesh && node_modules/.bin/forever ts/lib/index.js"
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
- restore_cache:
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
key: installed-py-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
command: |
cd python-packages/order_utils
cd python-packages
python -m ensurepip
python -m pip install -e .[dev]
./pre_install
./install
- save_cache:
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
key: installed-py-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- '/usr/local/bin'
- '/usr/local/lib/python3.7/site-packages'
- '.eggs'
- '.mypy_cache'
- '.pytest_cache'
- '.tox'
- run:
command: |
cd python-packages/order_utils
coverage run setup.py test
cd python-packages
./parallel coverage run setup.py test
./build_docs
- run:
command: |
# copy generated wrappers into contract_wrappers/build,
# JUST so CircleCI will persist them as build artifacts.
cd python-packages/contract_wrappers/src/zero_ex
for i in contract_wrappers/[^__]*/; do mkdir -p ../../build/$i; cp $i/__init__.py ../../build/$i; done
- save_cache:
key: coverage-python-contract-addresses-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/python-packages/contract_addresses/.coverage
- save_cache:
key: coverage-python-contract-artifacts-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/python-packages/contract_artifacts/.coverage
- save_cache:
key: coverage-python-contract-demo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/python-packages/contract_demo/.coverage
- save_cache:
key: coverage-python-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/python-packages/json_schemas/.coverage
- save_cache:
key: coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/python-packages/order_utils/.coverage
- save_cache:
key: coverage-python-sra-client-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/python-packages/sra_client/.coverage
- store_artifacts:
path: ~/repo/python-packages/contract_addresses/build
- store_artifacts:
path: ~/repo/python-packages/contract_artifacts/build
- store_artifacts:
path: ~/repo/python-packages/contract_wrappers/build
- store_artifacts:
path: ~/repo/python-packages/json_schemas/build
- store_artifacts:
path: ~/repo/python-packages/middlewares/build
- store_artifacts:
path: ~/repo/python-packages/order_utils/build
- store_artifacts:
path: ~/repo/python-packages/sra_client/build
test-rest-python:
working_directory: ~/repo
docker:
- image: circleci/python
- image: nikolaik/python-nodejs:python3.7-nodejs8
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
- restore_cache:
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
key: installed-py-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- run:
command: |
cd python-packages/order_utils
python -m ensurepip
python -m pip install -e .[dev]
python -m pip install .
- save_cache:
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
key: installed-py-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- '/usr/local/bin'
- '/usr/local/lib/python3.7/site-packages'
@@ -224,42 +310,39 @@ jobs:
static-tests-python:
working_directory: ~/repo
docker:
- image: circleci/python
- image: nikolaik/python-nodejs:python3.7-nodejs8
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
- restore_cache:
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
key: installed-py-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run:
command: |
cd python-packages/order_utils
python -m ensurepip
python -m pip install -e .[dev]
- save_cache:
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- '/usr/local/bin'
- '/usr/local/lib/python3.7/site-packages'
- run:
command: |
cd python-packages/order_utils
python setup.py lint
cd python-packages
./pre_install
./install
./lint
static-tests:
resource_class: large
working_directory: ~/repo
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn lerna run lint
- run: yarn prettier:ci
- run: yarn deps_versions:ci
- run: yarn diff_md_docs:ci
- run: cd packages/0x.js && yarn build:umd:prod
- run: yarn bundlewatch
submit-coverage:
docker:
- image: circleci/node:9
- image: nikolaik/python-nodejs:python3.7-nodejs8
working_directory: ~/repo
steps:
- restore_cache:
@@ -271,6 +354,9 @@ jobs:
- restore_cache:
keys:
- coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-asset-swapper-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }}
@@ -279,28 +365,22 @@ jobs:
- coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }}
- coverage-contract-wrappers-test-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }}
- coverage-sol-tracing-utils-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
@@ -313,6 +393,21 @@ jobs:
- restore_cache:
keys:
- coverage-contracts-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-python-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-python-contract-addresses-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-python-contract-artifacts-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-python-contract-demo-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-python-sra-client-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }}
@@ -322,13 +417,16 @@ workflows:
main:
jobs:
- build
- build-website:
- test-exchange-ganache:
requires:
- build
- test-contracts-ganache:
- test-integrations-ganache:
requires:
- build
- test-contracts-geth:
- test-contracts-staking-ganache:
requires:
- build
- test-contracts-rest-ganache:
requires:
- build
- test-rest:
@@ -345,9 +443,16 @@ workflows:
- build
- submit-coverage:
requires:
- test-contracts-rest-ganache
- test-contracts-staking-ganache
- test-exchange-ganache
- test-rest
- test-python
- test-python
- static-tests-python
- static-tests
- test-python:
requires:
- build
- static-tests-python:
requires:
- build
# skip python tox run for now, as we don't yet have multiple test environments to support.
#- test-rest-python
# - test-rest-python

7
.gitattributes vendored
View File

@@ -1,7 +1,8 @@
*.sol linguist-language=Solidity
# Automatically collapse generated files in GitHub.
*.svg linguist-generated
packages/contract-artifacts/artifacts/*json linguist-generated
packages/abi-gen-wrappers/wrappers/*.ts liguist-generated
*.svg linguist-generated=true
packages/contract-artifacts/artifacts/*json linguist-generated=true
packages/abi-gen-wrappers/src/generated-wrappers/*.ts linguist-generated=true
packages/contract-wrappers/src/generated-wrappers/*.ts linguist-generated=true

33
.github/autolabeler.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
python: ['python-packages']
contracts: ['contracts']
@0x/sol-doc: ['packages/sol-doc']
@0x/sol-resolver: ['packages/sol-resolver']
@0x/contracts-gen: ['packages/contracts-gen']
@0x/sra-spec: ['packages/sra-spec']
@0x/subproviders: ['packages/subproviders']
@0x/contract-addresses: ['packages/contract-addresses']
@0x/migrations: ['packages/migrations']
@0x/web3-wrapper: ['packages/web3-wrapper']
@0x/sol-compiler: ['packages/sol-compiler']
@0x/types: ['packages/types']
@0x/instant: ['packages/instant']
@0x/abi-gen-templates: ['packages/abi-gen-templates']
@0x/abi-gen: ['packages/abi-gen']
@0x/sol-coverage: ['packages/sol-coverage']
@0x/sol-profiler: ['packages/sol-profiler']
@0x/sol-trace: ['packages/sol-trace']
@0x/sol-tracing-utils: ['packages/sol-tracing-utils']
@0x/utils: ['packages/utils']
@0x/tslint-config: ['packages/tslint-config']
@0x/asset-swapper: ['packages/asset-swapper']
@0x/order-utils: ['packages/order-utils']
@0x/assert: ['packages/assert']
@0x/base-contract: ['packages/base-contract']
@0x/typescript-typings: ['packages/typescript-typings']
0x.js: ['packages/0x.js']
@0x/contract-artifacts: ['packages/contract-artifacts']
@0x/dev-utils: ['packages/dev-utils']
@0x/contract-wrappers: ['packages/contract-wrappers']
@0x/json-schemas: ['packages/json-schemas']
@0x/ethereum-types: ['ethereum-types']
@0x/connect: ['packages/connect']

19
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been automatically closed because no activity occured in 7 days after being marked as stale. If it's still relevant - feel free to reopen. Thank you
for your contributions.

126
.gitignore vendored
View File

@@ -11,6 +11,10 @@ pids
*.seed
*.pid.lock
# SQLite database files
*.db
*.sqlite
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
@@ -36,9 +40,12 @@ build/Release
node_modules/
jspm_packages/
# Typescript v1 declaration files
# TypeScript v1 declaration files
typings/
# NVM config
.nvmrc
# Optional npm cache directory
.npm
.npmrc
@@ -71,29 +78,102 @@ TODO.md
# VSCode file
.vscode
packages/website/public/bundle*
packages/dev-tools-pages/public/bundle*
packages/react-docs/example/public/bundle*
# server cli
packages/testnet-faucets/server/
# generated contract artifacts/
packages/contracts/generated-artifacts/
packages/sol-cov/test/fixtures/artifacts/
packages/metacoin/artifacts/
contracts/broker/generated-artifacts/
contracts/broker/test/generated-artifacts/
contracts/erc20-bridge-sampler/generated-artifacts/
contracts/erc20-bridge-sampler/test/generated-artifacts/
contracts/integrations/generated-artifacts/
contracts/integrations/test/generated-artifacts/
contracts/staking/generated-artifacts/
contracts/staking/test/generated-artifacts/
contracts/coordinator/generated-artifacts/
contracts/coordinator/test/generated-artifacts/
contracts/exchange/generated-artifacts/
contracts/exchange/test/generated-artifacts/
contracts/asset-proxy/generated-artifacts/
contracts/asset-proxy/test/generated-artifacts/
contracts/multisig/generated-artifacts/
contracts/multisig/test/generated-artifacts/
contracts/utils/generated-artifacts/
contracts/utils/test/generated-artifacts/
contracts/exchange-libs/generated-artifacts/
contracts/exchange-libs/test/generated-artifacts/
contracts/erc20/generated-artifacts/
contracts/erc20/test/generated-artifacts/
contracts/erc721/generated-artifacts/
contracts/erc721/test/generated-artifacts/
contracts/erc1155/generated-artifacts/
contracts/erc1155/test/generated-artifacts/
contracts/extensions/generated-artifacts/
contracts/extensions/test/generated-artifacts/
contracts/exchange-forwarder/generated-artifacts/
contracts/exchange-forwarder/test/generated-artifacts/
contracts/dev-utils/generated-artifacts/
contracts/dev-utils/test/generated-artifacts/
contracts/zero-ex/generated-artifacts/
contracts/zero-ex/test/generated-artifacts/
packages/sol-tracing-utils/test/fixtures/artifacts/
python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/
# generated truffle contract artifacts/
contracts/broker/build/
contracts/erc20-bridge-sampler/build/
contracts/staking/build/
contracts/coordinator/build/
contracts/exchange/build/
contracts/asset-proxy/build/
contracts/multisig/build/
contracts/utils/build/
contracts/exchange-libs/build/
contracts/erc20/build/
contracts/erc721/build/
contracts/erc1155/build/
contracts/extensions/build/
contracts/exchange-forwarder/build/
contracts/dev-utils/build/
# generated contract wrappers
packages/abi-gen-wrappers/wrappers
packages/contracts/generated-wrappers/
packages/metacoin/src/contract_wrappers
contracts/broker/generated-wrappers/
contracts/broker/test/generated-wrappers/
packages/python-contract-wrappers/generated/
contracts/erc20-bridge-sampler/generated-wrappers/
contracts/erc20-bridge-sampler/test/generated-wrappers/
contracts/integrations/generated-wrappers/
contracts/integrations/test/generated-wrappers/
contracts/staking/generated-wrappers/
contracts/staking/test/generated-wrappers/
contracts/coordinator/generated-wrappers/
contracts/coordinator/test/generated-wrappers/
contracts/exchange/generated-wrappers/
contracts/exchange/test/generated-wrappers/
contracts/asset-proxy/generated-wrappers/
contracts/asset-proxy/test/generated-wrappers/
contracts/multisig/generated-wrappers/
contracts/multisig/test/generated-wrappers/
contracts/utils/generated-wrappers/
contracts/utils/test/generated-wrappers/
contracts/exchange-libs/generated-wrappers/
contracts/exchange-libs/test/generated-wrappers/
contracts/erc20/generated-wrappers/
contracts/erc20/test/generated-wrappers/
contracts/erc721/generated-wrappers/
contracts/erc721/test/generated-wrappers/
contracts/erc1155/generated-wrappers/
contracts/erc1155/test/generated-wrappers/
contracts/extensions/generated-wrappers/
contracts/extensions/test/generated-wrappers/
contracts/exchange-forwarder/generated-wrappers/
contracts/exchange-forwarder/test/generated-wrappers/
contracts/dev-utils/generated-wrappers/
contracts/dev-utils/test/generated-wrappers/
contracts/zero-ex/generated-wrappers/
contracts/zero-ex/test/generated-wrappers/
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/*/__init__.py
# solc-bin in sol-compiler
packages/sol-compiler/solc_bin/
# Monorepo scripts
packages/*/scripts/
# python stuff
.eggs
.mypy_cache
@@ -103,3 +183,15 @@ python-packages/*/dist
__pycache__
python-packages/*/src/*.egg-info
python-packages/*/.coverage
# python keeps package-local copies of json schemas and contract addresses
python-packages/json_schemas/src/zero_ex/json_schemas/schemas
python-packages/contract_addresses/src/zero_ex/contract_addresses/addresses.json
# Doc README copy
packages/*/docs/README.md
.DS_Store
# the snapshot that gets built for migrations sure does have a ton of files
packages/migrations/0x_ganache_snapshot*

View File

@@ -1,14 +1,98 @@
lib
.nyc_output
/packages/contracts/generated-wrappers
/packages/contracts/generated-artifacts
/packages/abi-gen-wrappers/src/generated-wrappers
/packages/contract-artifacts/artifacts
/python-packages/order_utils/src/zero_ex/contract_artifacts/artifacts
/contracts/broker/generated-wrappers
/contracts/broker/test/generated-wrappers
/contracts/broker/generated-artifacts
/contracts/broker/test/generated-artifacts
/contracts/integrations/generated-wrappers
/contracts/integrations/test/generated-wrappers
/contracts/integrations/generated-artifacts
/contracts/integrations/test/generated-artifacts
/contracts/staking/generated-wrappers
/contracts/staking/test/generated-wrappers
/contracts/staking/generated-artifacts
/contracts/staking/test/generated-artifacts
/contracts/coordinator/generated-wrappers
/contracts/coordinator/test/generated-wrappers
/contracts/coordinator/generated-artifacts
/contracts/coordinator/test/generated-artifacts
/contracts/exchange/generated-wrappers
/contracts/exchange/test/generated-wrappers
/contracts/exchange/generated-artifacts
/contracts/exchange/test/generated-artifacts
/contracts/asset-proxy/generated-wrappers
/contracts/asset-proxy/test/generated-wrappers
/contracts/asset-proxy/generated-artifacts
/contracts/asset-proxy/test/generated-artifacts
/contracts/multisig/generated-wrappers
/contracts/multisig/test/generated-wrappers
/contracts/multisig/generated-artifacts
/contracts/multisig/test/generated-artifacts
/contracts/utils/generated-wrappers
/contracts/utils/test/generated-wrappers
/contracts/utils/generated-artifacts
/contracts/utils/test/generated-artifacts
/contracts/exchange-libs/generated-wrappers
/contracts/exchange-libs/test/generated-wrappers
/contracts/exchange-libs/generated-artifacts
/contracts/exchange-libs/test/generated-artifacts
/contracts/erc20/generated-wrappers
/contracts/erc20/test/generated-wrappers
/contracts/erc20/generated-artifacts
/contracts/erc20/test/generated-artifacts
/contracts/erc20-bridge-sampler/generated-wrappers
/contracts/erc20-bridge-sampler/test/generated-wrappers
/contracts/erc20-bridge-sampler/generated-artifacts
/contracts/erc20-bridge-sampler/test/generated-artifacts
/contracts/erc721/generated-wrappers
/contracts/erc721/test/generated-wrappers
/contracts/erc721/generated-artifacts
/contracts/erc721/test/generated-artifacts
/contracts/erc1155/generated-wrappers
/contracts/erc1155/test/generated-wrappers
/contracts/erc1155/generated-artifacts
/contracts/erc1155/test/generated-artifacts
/contracts/extensions/generated-wrappers
/contracts/extensions/test/generated-wrappers
/contracts/extensions/generated-artifacts
/contracts/extensions/test/generated-artifacts
/contracts/exchange-forwarder/generated-wrappers
/contracts/exchange-forwarder/test/generated-wrappers
/contracts/exchange-forwarder/generated-artifacts
/contracts/exchange-forwarder/test/generated-artifacts
/contracts/dev-utils/generated-wrappers
/contracts/dev-utils/test/generated-wrappers
/contracts/dev-utils/generated-artifacts
/contracts/dev-utils/test/generated-artifacts
/contracts/zero-ex/generated-wrappers
/contracts/zero-ex/test/generated-wrappers
/contracts/zero-ex/generated-artifacts
/contracts/zero-ex/test/generated-artifacts
/contracts/staking/build/
/contracts/coordinator/build/
/contracts/exchange/build/
/contracts/asset-proxy/build/
/contracts/multisig/build/
/contracts/utils/build/
/contracts/exchange-libs/build/
/contracts/erc20/build/
/contracts/erc721/build/
/contracts/erc1155/build/
/contracts/extensions/build/
/contracts/exchange-forwarder/build/
/contracts/dev-utils/build/
/packages/abi-gen/test-cli/output
/packages/json-schemas/schemas
/packages/metacoin/src/contract_wrappers
/packages/metacoin/artifacts
/python-packages/json_schemas/src/zero_ex/json_schemas/schemas
/packages/sra-spec/public/
package.json
scripts/postpublish_utils.js
packages/sol-cov/test/fixtures/artifacts
packages/sol-coverage/test/fixtures/artifacts
.pytest_cache
.mypy_cache
.tox
packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json
packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json
packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json
packages/*/docs
*.sol

View File

@@ -1,6 +1,6 @@
{
"tabWidth": 4,
"printWidth": 120,
"trailingComma": all,
"singleQuote": true
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "all"
}

View File

@@ -5,31 +5,34 @@
# https://git-scm.com/docs/gitignore#_pattern_format
# Website
packages/asset-buyer/ @BMillman19 @fragosti @steveklebanoff
packages/instant/ @BMillman19 @fragosti @steveklebanoff
packages/website/ @BMillman19 @fragosti @fabioberger @steveklebanoff
packages/asset-swapper/ @BMillman19 @fragosti @dave4506
packages/instant/ @BMillman19 @fragosti @dave4506
# Dev tools & setup
.circleci/ @LogvinovLeon
packages/abi-gen/ @LogvinovLeon
packages/base-contract/ @LogvinovLeon
packages/abi-gen/ @feuGeneA
packages/base-contract/ @xianny
packages/connect/ @fragosti
packages/contract_templates/ @LogvinovLeon
packages/contract-addresses/ @albrow
packages/contract-artifacts/ @albrow
packages/abi-gen-templates/ @feuGeneA @xianny
packages/contract-addresses/ @abandeali1
packages/contract-artifacts/ @abandeali1
packages/dev-utils/ @LogvinovLeon @fabioberger
packages/devnet/ @albrow
packages/ethereum-types/ @LogvinovLeon
packages/metacoin/ @LogvinovLeon
packages/monorepo-scripts/ @fabioberger
packages/order-utils/ @fabioberger @LogvinovLeon
packages/python-contract-wrappers/ @feuGeneA
packages/sol-compiler/ @LogvinovLeon
packages/sol-cov/ @LogvinovLeon
packages/sol-coverage/ @LogvinovLeon
packages/sol-profiler/ @LogvinovLeon
packages/sol-trace/ @LogvinovLeon
packages/sol-tracing-utils/ @LogvinovLeon
packages/sol-resolver/ @LogvinovLeon
packages/subproviders/ @fabioberger @dekz
packages/verdaccio/ @albrow
packages/web3-wrapper/ @LogvinovLeon @fabioberger
python-packages/ @feuGeneA
packages/utils/ @hysz
# Protocol/smart contracts
packages/contracts/test/ @albrow
contracts/ @abandeali1 @hysz

View File

@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities

View File

@@ -1,61 +1,105 @@
## 0x Contribution Guide
Thank you for your interest in contributing to 0x protocol! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!
We welcome contributions from anyone on the internet and are grateful for even the smallest contributions. This document will help get you setup to start contributing back to 0x.
### How to contribute
### Getting started
If you'd like to contribute to 0x protocol, please fork the repo, fix, commit and send a pull request against the `development` branch for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check with a core dev first on [our RocketChat #dev channel](http://chat.0xproject.com) to ensure those changes are in-line with the general philosophy of the project and/or to get some early feedback which can make both your efforts easier as well as our review and merge procedures quick and simple.
1. Fork `0xproject/0x-monorepo`
2. Clone your fork
3. Follow the [installation & build steps](https://github.com/0xProject/0x-monorepo#install-dependencies) in the repo's top-level README.
4. Setup the recommended [Development Tooling](#development-tooling).
5. Open a PR with the `[WIP]` flag against the `development` branch and describe the change you are intending to undertake in the PR description. (see [our branch naming conventions](#branch-structure))
We encourage a “PR early” approach so create the PR as early as possible even without the fix/feature ready, so that devs and other contributors know you have picked up the issue. These early PRs should indicate an 'in progress' status by adding the '[WIP]' prefix to the PR title. Please make sure your contributions adhere to our coding guidelines:
Before removing the `[WIP]` tag and submitting the PR for review, make sure:
* Pull requests adding features or refactoring should be opened against the `development` branch
* Pull requests fixing bugs in the latest release version should be opened again the `master` branch
* Write [good commit messages](https://chris.beams.io/posts/git-commit/)
- It passes our linter checks (`yarn lint`)
- It is properly formatted with Prettier (`yarn prettier`)
- It passes our continuous integration tests (See: [Enabling code coverage checks on your fork](#enabling-code-coverage-checks-on-your-fork) for instructions on getting the `submit-coverage` test to pass on forks)
- You've created/updated the corresponding [CHANGELOG](#CHANGELOGs) entries.
- Your changes have sufficient test coverage (e.g regression tests have been added for bug fixes)
### Code quality
### Branch structure
Because 0x.js is used by multiple relayers in production and their businesses depend on it, we strive for exceptional code quality. Please follow the existing code standards and conventions. `tslint` and `prettier` (described below) will help you.
We have two main branches:
If you're adding functionality, please also add tests and make sure they pass. We have an automatic coverage reporting tool, so we'll see it if they are missing ;)
If you're adding a new public function/member, make sure you document it with Java doc-style comments. We use typedoc to generate [awesome documentation](https://0xproject.com/docs/0xjs) from the comments within our source code.
- `master` represents the most recently released (published on npm) version of the codebase.
- `development` represents the current development state of the codebase.
If the sub-package you are modifying has a `CHANGELOG.md` file, make sure to add an entry in it for the change made to the package. For published packages, only changes that modify the public interface or behavior of the package need a CHANGELOG entry.
ALL PRs should be opened against `development`.
#### Enabling code coverage checks on your fork
Branch names should be prefixed with `fix`, `feature` or `refactor`.
If you simply fork the repo and then create a PR sourced from it, your PR will fail its test coverage check. This is because the 0x CircleCI configuration sets the `COVERALLS_REPO_TOKEN` environment variable to the token for 0xProject/0x-monorepo, but when running the check against your fork the token needs to match the repo that is your fork, rather than the 0x repo.
- e.g `fix/missing-import`
- If the PR only edits a single package, add it's name too
- e.g `fix/subproviders/missing-import`
To facilitate this check, after creating your fork, but before creating the branch for your PR, do the following:
### CHANGELOGs
1. Log in to [coveralls.io](https://coveralls.io/), go to Add Repos, and enable your fork. Then go to the settings for that repo, and copy the Repo Token identifier.
2. Log in to [CircleCI](https://circleci.com/login), go to Add Projects, click the Set Up Project button corresponding to your fork, and then click Start Building. (Aside from step 3 below, no actual set up is needed, since it will use the `.circleci/config.yml` file in 0x-monorepo, so you can ignore all of the instruction/explanation given on the page with the Start Building button.)
3. In CircleCI, configure your project to add an Environment Variable, with name `COVERALLS_REPO_TOKEN`, and for the value paste in the Repo Token you copied in step 1.
At 0x we use [Semantic Versioning](http://semver.org/) for all our published packages. If a change you make corresponds to a semver bump, you must modify the package's `CHANGELOG.json` file accordingly.
Now, when you push to your branch, CircleCI will automatically run all of the checks in your own instance, and the coverage check will work since it has the proper Repo Token, and the PR will magically refer to your own checks rather than running them in the 0x CircleCI instance.
Each CHANGELOG entry that corresponds to a published package will have a `timestamp`. If no entry exists without a `timestamp`, you must first create a new one:
### Styleguide
```
{
"version": "1.0.1", <- The updated package version
"changes": [
{
"note": "", <- Describe your change
"PR": 100 <- Your PR number
}
]
},
```
We use [TSLint](https://palantir.github.io/tslint/) with [custom configs](https://github.com/0xProject/0x-monorepo/tree/development/packages/tslint-config) to keep our code style consistent.
If an entry without a `timestamp` already exists, this means other changes have been introduced by other collaborators since the last publish. Add your changes to the list of notes and adjust the version if your PR introduces a greater semver change (i.e current changes required a patch bump, but your changes require a major version bump).
To lint your code just run: `yarn lint`
### Development Tooling
We also use [Prettier](https://prettier.io/) to auto-format our code. Be sure to either add a [text editor integration](https://prettier.io/docs/en/editors.html) or a [pre-commit hook](https://prettier.io/docs/en/precommit.html) to properly format your code changes.
We strongly recommend you use the [VSCode](https://code.visualstudio.com/) text editor since most of our code is written in TypeScript and it offers amazing support for the language.
#### Linter
We use [TSLint](https://palantir.github.io/tslint/) with [custom configs](https://github.com/0xProject/0x-monorepo/tree/development/packages/tslint-config) to keep our code-style consistent.
Use `yarn:lint` to lint the entire monorepo, and `PKG={PACKAGE_NAME} yarn lint` to lint a specific package.
If you want to change a rule, or add a custom rule, please make these changes to our [tslint-config](https://github.com/0xProject/0x-monorepo/tree/development/packages/tslint-config) package. All other packages have it as a dependency.
Integrate it into your text editor:
- VSCode: [vscode-tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint)
- Atom: [linter-tslint](https://atom.io/packages/linter-tslint)
#### Auto-formatter
We use [Prettier](https://prettier.io/) to auto-format our code. Be sure to either add a [text editor integration](https://prettier.io/docs/en/editors.html) or a [pre-commit hook](https://prettier.io/docs/en/precommit.html) to properly format your code changes.
If using the Atom text editor, we recommend you install the following packages:
* [atom-typescript](https://atom.io/packages/atom-typescript)
* [linter-tslint](https://atom.io/packages/linter-tslint)
* [prettier-atom](https://atom.io/packages/prettier-atom)
* [language-ethereum](https://atom.io/packages/language-ethereum)
- VSCode: [prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- Atom: [prettier-atom](https://atom.io/packages/prettier-atom)
Our CI will also run TSLint and Prettier as a part of the test run when you submit your PR. Make sure that the CI tests pass for your contribution.
## Unenforced coding conventions
### Branch structure & versioning
A few of our coding conventions are not yet enforced by the linter/auto-formatter. Be careful to follow these conventions in your PR's.
We use [semantic versioning](http://semver.org/), but before a package reaches v1.0.0 all breaking changes as well as new features will be minor version bumps.
1. Unused anonymous function parameters should be named with an underscore + number (e.g \_1, \_2, etc...)
1. There should be a new-line between methods in a class and between test cases.
1. If a string literal has the same value in two or more places, it should be a single constant referenced in both places.
1. Do not import from a project's `index.ts` (e.g import { Token } from '../src';). Always import from the source file itself.
1. Generic error variables should be named `err` instead of `e` or `error`.
1. If you _must_ cast a variable to any - try to type it back as fast as possible. (e.g., `const cw = ((zeroEx as any)._contractWrappers as ContractWrappers);`). This ensures subsequent code is type-safe.
1. Our enum conventions coincide with the recommended TypeScript conventions, using capitalized keys, and all-caps snake-case values. Eg `GetStats = 'GET_STATS'`
1. All public, exported methods/functions/classes must have associated Javadoc-style comments.
We have two main branches: `master` and `development`.
### Fix `submit-coverage` CI failure
`master` represents the most recent released (published on npm) version.
If you simply fork the repo and then create a PR from it, your PR will fail the `submit-coverage` check on CI. This is because the 0x CircleCI configuration sets the `COVERALLS_REPO_TOKEN` environment variable to the token for `0xProject/0x-monorepo`, but when running the check against your fork the token needs to match your repo's name `your-username/0x-monorepo`.
`development` represents the development state and is a default branch to which you will submit a PR. We use this structure so that we can push hotfixes to the currently released version without needing to publish all the changes made towards the next release. If a hotfix is implemented on `master`, it is back-ported to `development`.
To facilitate this check, after creating your fork, but before creating the branch for your PR, do the following:
1. Log in to [coveralls.io](https://coveralls.io/), go to `Add Repos`, and enable your fork. Then go to the settings for that repo, and copy the `Repo Token` identifier.
2. Log in to [CircleCI](https://circleci.com/login), go to `Add Projects`, click the `Set Up Project` button corresponding to your fork, and then click `Start Building`. (Aside from step 3 below, no actual set up is needed, since it will use the `.circleci/config.yml` file in 0x-monorepo, so you can ignore all of the instruction/explanation given on the page with the `Start Building` button.)
3. In CircleCI, configure your project to add an environment variable, with name `COVERALLS_REPO_TOKEN`, and for the value paste in the `Repo Token` you copied in step 1.
Now, when you push to your branch, CircleCI will automatically run all of the checks in your own instance, and the coverage check will work since it has the proper `Repo Token`, and the PR will magically refer to your own checks rather than running them in the 0x CircleCI instance.

View File

@@ -2,7 +2,7 @@
<!--- Before submitting please check to see if this issue was already reported -->
<!--- Provide a general summary of the issue in the Title above -->
<!--- Prefix your issue title with the package name it relates to (e.g., `0x.js: ` or `general:`) -->
## Expected Behavior
@@ -46,10 +46,14 @@
<!--- Include as many relevant details about the environment you experienced the bug in -->
| Package | Version |
| ------------------: | :------ |
| `0x.js` | 0.25.0 |
| `Exchange Contract` | v1 |
| Package | Version |
| ------: | :------ |
<!-- For example:
| `0x.js` | 2.0.4 |
| `Exchange Contract` | v2 |
-->
| Network |
| ------- |

View File

@@ -1,4 +1,4 @@
Copyright 2017 ZeroEx Inc.
Copyright 2017 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

View File

@@ -20,8 +20,7 @@
<!--- The following points should be used to indicate the progress of your PR. Put an `x` in all the boxes that apply right now, and come back over time and check them off as you make progress. If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
* [ ] Prefix PR title with `[WIP]` if necessary.
* [ ] Prefix PR title with bracketed package name(s) corresponding to the changed package(s). For example: `[sol-cov] Fixed bug`.
* [ ] Add tests to cover changes as needed.
* [ ] Update documentation as needed.
* [ ] Add new entries to the relevant CHANGELOG.jsons.
- [ ] Prefix PR title with `[WIP]` if necessary.
- [ ] Add tests to cover changes as needed.
- [ ] Update documentation as needed.
- [ ] Add new entries to the relevant CHANGELOG.jsons.

161
README.md
View File

@@ -1,81 +1,106 @@
<img src="https://github.com/0xProject/branding/blob/master/0x_Black_CMYK.png" width="200px" >
<img src="https://github.com/0xProject/branding/blob/master/0x%20Logo/PNG/0x-Logo-Black.png" width="150px" >
---
[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. A full description of the protocol may be found in our [whitepaper][whitepaper-url].
[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. For more information on how it works, check out the [0x protocol specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
This repository is a monorepo including the 0x protocol smart contracts and numerous developer tools. Each public sub-package is independently published to NPM.
If you're developing on 0x now or are interested in using 0x infrastructure in the future, please join our [developer mailing list][dev-mailing-list-url] for updates.
[website-url]: https://0xproject.com
[whitepaper-url]: https://0xproject.com/pdfs/0x_white_paper.pdf
[dev-mailing-list-url]: http://eepurl.com/dx4cPf
[website-url]: https://0x.org
[![CircleCI](https://circleci.com/gh/0xProject/0x-monorepo.svg?style=svg&circle-token=61bf7cd8c9b4e11b132089dfcffdd1be277d1e0c)](https://circleci.com/gh/0xProject/0x-monorepo)
[![Coverage Status](https://coveralls.io/repos/github/0xProject/0x-monorepo/badge.svg?branch=development)](https://coveralls.io/github/0xProject/0x-monorepo?branch=development)
[![Discord](https://img.shields.io/badge/chat-rocket.chat-yellow.svg?style=flat)](https://chat.0xproject.com)
[![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Discord](https://img.shields.io/badge/chat-discord.chat-yellow.svg?style=flat)](https://discordapp.com/invite/d3FTX3M)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
### Published Packages
## Packages
| Package | Version | Description |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol |
| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0x/abi-gen-wrappers`](/packages/abi-gen-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen-wrappers.svg)](https://www.npmjs.com/package/@0x/abi-gen-wrappers) | Low-level 0x smart contract wrappers generated using @0x/abi-gen |
| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages |
| [`@0x/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0x/asset-buyer.svg)](https://www.npmjs.com/package/@0x/asset-buyer) | Convenience package for discovering and buying assets with Ether |
| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | A Javascript library for interacting with the Standard Relayer API |
| [`@0x/contract-addresses`](/packages/contract-addresses) | [![npm](https://img.shields.io/npm/v/@0x/contract-addresses.svg)](https://www.npmjs.com/package/@0x/contract-addresses) | Used to get known addresses of deployed 0x contracts |
| [`@0x/contract-artifacts`](/packages/contract-artifacts) | [![npm](https://img.shields.io/npm/v/@0x/contract-artifacts.svg)](https://www.npmjs.com/package/@0x/contract-artifacts) | 0x smart contract compilation artifacts |
| [`@0x/contract-wrappers`](/packages/contract-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/contract-wrappers.svg)](https://www.npmjs.com/package/@0x/contract-wrappers) | Smart TS wrappers for 0x smart contracts |
| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x projects and packages |
| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generation |
| [`@0x/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0x/json-schemas.svg)](https://www.npmjs.com/package/@0x/json-schemas) | 0x-related json schemas |
| [`@0x/migrations`](/packages/migrations) | [![npm](https://img.shields.io/npm/v/@0x/migrations.svg)](https://www.npmjs.com/package/@0x/migrations) | 0x smart contract migrations |
| [`@0x/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0x/order-utils.svg)](https://www.npmjs.com/package/@0x/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders |
| [`@0x/order-watcher`](/packages/order-watcher) | [![npm](https://img.shields.io/npm/v/@0x/order-watcher.svg)](https://www.npmjs.com/package/@0x/order-watcher) | An order watcher daemon that watches for order validity |
| [`@0x/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0x/react-docs.svg)](https://www.npmjs.com/package/@0x/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON |
| [`@0x/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0x/react-shared.svg)](https://www.npmjs.com/package/@0x/react-shared) | 0x shared react components |
| [`@0x/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-compiler.svg)](https://www.npmjs.com/package/@0x/sol-compiler) | A thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties |
| [`@0x/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0x/sol-cov.svg)](https://www.npmjs.com/package/@0x/sol-cov) | Solidity test coverage tool |
| [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator |
| [`@0x/sol-resolver`](/packages/sol-resolver) | [![npm](https://img.shields.io/npm/v/@0x/sol-resolver.svg)](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies |
| [`@0x/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0x/sra-spec.svg)](https://www.npmjs.com/package/@0x/sra-spec) | OpenAPI specification for the standard relayer API |
| [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Useful web3 subproviders (e.g. LedgerSubprovider) |
| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom 0x development TSLint rules |
| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations |
| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages |
| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities |
| [`@0x/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0x/web3-wrapper.svg)](https://www.npmjs.com/package/@0x/web3-wrapper) | Web3 wrapper |
Visit our [developer portal](https://0x.org/docs/tools/order-utils) for a comprehensive list of core & community maintained packages. All packages maintained with this monorepo are listed below.
### Private Packages
### Python Packages
| Package | Description |
| -------------------------------------------------------- | ---------------------------------------------------------------- |
| [`@0x/contracts`](/packages/contracts) | 0x solidity smart contracts & tests |
| [`@0x/react-docs-example`](/packages/react-docs-example) | Example documentation site created with `@0x/react-docs` |
| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
| [`@0x/website`](/packages/website) | 0x website & Portal DApp |
| Package | Version | Description |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [`0x-contract-addresses`](/python-packages/contract_addresses) | [![PyPI](https://img.shields.io/pypi/v/0x-contract-addresses.svg)](https://pypi.org/project/0x-contract-addresses/) | A tiny utility library for getting known deployed contract addresses for a particular network |
| [`0x-contract-artifacts`](/python-packages/contract_artifacts) | [![PyPI](https://img.shields.io/pypi/v/0x-contract-artifacts.svg)](https://pypi.org/project/0x-contract-artifacts/) | 0x smart contract compilation artifacts |
| [`0x-contract-wrappers`](/python-packages/contract_wrappers) | [![PyPI](https://img.shields.io/pypi/v/0x-contract-wrappers.svg)](https://pypi.org/project/0x-contract-wrappers/) | 0x smart contract wrappers |
| [`0x-json-schemas`](/python-packages/json_schemas) | [![PyPI](https://img.shields.io/pypi/v/0x-json-schemas.svg)](https://pypi.org/project/0x-json-schemas/) | 0x-related JSON schemas |
| [`0x-order-utils`](/python-packages/order_utils) | [![PyPI](https://img.shields.io/pypi/v/0x-order-utils.svg)](https://pypi.org/project/0x-order-utils/) | A set of utilities for generating, parsing, signing and validating 0x orders |
| [`0x-sra-client`](/python-packages/sra_client) | [![PyPI](https://img.shields.io/pypi/v/0x-sra-client.svg)](https://pypi.org/project/0x-sra-client/) | A Python client for interacting with servers conforming to the Standard Relayer API specification |
### Solidity Packages
These packages are all under development. See [/contracts/README.md](/contracts/README.md) for a list of deployed packages.
| Package | Version | Description |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@0x/contracts-asset-proxy`](/contracts/asset-proxy) | [![npm](https://img.shields.io/npm/v/@0x/contracts-asset-proxy.svg)](https://www.npmjs.com/package/@0x/contracts-asset-proxy) | [`AssetProxy`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxy) contracts used within the protocol |
| [`@0x/contracts-erc20`](/contracts/erc20) | [![npm](https://img.shields.io/npm/v/@0x/contracts-erc20.svg)](https://www.npmjs.com/package/@0x/contracts-erc20) | Implementations of various ERC20 tokens |
| [`@0x/contracts-erc721`](/contracts/erc721) | [![npm](https://img.shields.io/npm/v/@0x/contracts-erc721.svg)](https://www.npmjs.com/package/@0x/contracts-erc721) | Implementations of various ERC721 tokens |
| [`@0x/contracts-erc1155`](/contracts/erc1155) | [![npm](https://img.shields.io/npm/v/@0x/contracts-erc1155.svg)](https://www.npmjs.com/package/@0x/contracts-erc1155) | Implementations of various ERC1155 tokens |
| [`@0x/contracts-exchange`](/contracts/exchange) | [![npm](https://img.shields.io/npm/v/@0x/contracts-exchange.svg)](https://www.npmjs.com/package/@0x/contracts-exchange) | The [`Exchange`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#exchange) contract used for settling trades within the protocol |
| [`@0x/contracts-exchange-forwarder`](/contracts/exchange-forwarder) | [![npm](https://img.shields.io/npm/v/@0x/contracts-exchange-forwarder.svg)](https://www.npmjs.com/package/@0x/contracts-exchange-forwarder) | A [`Forwarder`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md) contract used to simplify UX for interacting with the protocol |
| [`@0x/contracts-exchange-libs`](/contracts/exchange-libs) | [![npm](https://img.shields.io/npm/v/@0x/contracts-exchange-libs.svg)](https://www.npmjs.com/package/@0x/contracts-exchange-libs) | Protocol specific libraries used within the [`Exchange`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#exchange) contract |
| [`@0x/contracts-extensions`](/contracts/extensions) | [![npm](https://img.shields.io/npm/v/@0x/contracts-extensions.svg)](https://www.npmjs.com/package/@0x/contracts-extensions) | Contracts that interact with and extend the functionality of the core protocol |
| [`@0x/contracts-multisig`](/contracts/multisig) | [![npm](https://img.shields.io/npm/v/@0x/contracts-multisig.svg)](https://www.npmjs.com/package/@0x/contracts-multisig) | Various implementations of multisignature wallets, including the [`AssetProxyOwner`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxyowner) contract that has permissions to upgrade the protocol |
| [`@0x/contracts-test-utils`](/contracts/test-utils) | [![npm](https://img.shields.io/npm/v/@0x/contracts-test-utils.svg)](https://www.npmjs.com/package/@0x/contracts-test-utils) | TypeScript/Javascript shared utilities used for testing contracts |
| [`@0x/contracts-utils`](/contracts/utils) | [![npm](https://img.shields.io/npm/v/@0x/contracts-utils.svg)](https://www.npmjs.com/package/@0x/contracts-utils) | Generic libraries and utilities used throughout all of the contracts |
| [`@0x/contracts-coordinator`](/contracts/coordinator) | [![npm](https://img.shields.io/npm/v/@0x/contracts-coordinator.svg)](https://www.npmjs.com/package/@0x/contracts-coordinator) | A contract that allows users to execute 0x transactions with permission from a Coordinator |
| [`@0x/contracts-dev-utils`](/contracts/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/contracts-dev-utils.svg)](https://www.npmjs.com/package/@0x/contracts-dev-utils) | A contract contains utility functions for developers (such as validating many orders using a single eth_call) |
| [`@0x/contracts-staking`](/contracts/staking) | [![npm](https://img.shields.io/npm/v/@0x/contracts-staking.svg)](https://www.npmjs.com/package/@0x/contracts-staking) | Implements the stake-based liquidity incentives defined by [`ZEIP-31`](https://github.com/0xProject/ZEIPs/issues/31) |
### TypeScript/Javascript Packages
#### 0x-specific packages
| Package | Version | Description |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | An aggregate package combining many smaller utility packages for interacting with the 0x protocol |
| [`@0x/contract-addresses`](/packages/contract-addresses) | [![npm](https://img.shields.io/npm/v/@0x/contract-addresses.svg)](https://www.npmjs.com/package/@0x/contract-addresses) | A tiny utility library for getting known deployed contract addresses for a particular network. |
| [`@0x/contract-wrappers`](/packages/contract-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/contract-wrappers.svg)](https://www.npmjs.com/package/@0x/contract-wrappers) | JS/TS wrappers for interacting with the 0x smart contracts |
| [`@0x/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0x/order-utils.svg)](https://www.npmjs.com/package/@0x/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders |
| [`@0x/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0x/json-schemas.svg)](https://www.npmjs.com/package/@0x/json-schemas) | 0x-related JSON schemas | |
| [`@0x/migrations`](/packages/migrations) | [![npm](https://img.shields.io/npm/v/@0x/migrations.svg)](https://www.npmjs.com/package/@0x/migrations) | Migration tool for deploying 0x smart contracts on private testnets |
| [`@0x/contract-artifacts`](/packages/contract-artifacts) | [![npm](https://img.shields.io/npm/v/@0x/contract-artifacts.svg)](https://www.npmjs.com/package/@0x/contract-artifacts) | 0x smart contract compilation artifacts | |
| [`@0x/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0x/sra-spec.svg)](https://www.npmjs.com/package/@0x/sra-spec) | OpenAPI specification for the Standard Relayer API |
| [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | An HTTP/WS client for interacting with the Standard Relayer API |
| [`@0x/asset-swapper`](/packages/asset-swapper) | [![npm](https://img.shields.io/npm/v/@0x/asset-swapper.svg)](https://www.npmjs.com/package/@0x/asset-swapper) | Convenience package for discovering and performing swaps for any ERC20 Assets |
#### Ethereum tooling
| Package | Version | Description |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@0x/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0x/web3-wrapper.svg)](https://www.npmjs.com/package/@0x/web3-wrapper) | An Ethereum JSON RPC client |
| [`@0x/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-compiler.svg)](https://www.npmjs.com/package/@0x/sol-compiler) | A wrapper around solc-js that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more. |
| [`@0x/sol-coverage`](/packages/sol-coverage) | [![npm](https://img.shields.io/npm/v/@0x/sol-coverage.svg)](https://www.npmjs.com/package/@0x/sol-coverage) | A solidity test coverage tool |
| [`@0x/sol-profiler`](/packages/sol-profiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-profiler.svg)](https://www.npmjs.com/package/@0x/sol-profiler) | A solidity gas cost profiler |
| [`@0x/sol-trace`](/packages/sol-trace) | [![npm](https://img.shields.io/npm/v/@0x/sol-trace.svg)](https://www.npmjs.com/package/@0x/sol-trace) | A solidity stack trace tool |
| [`@0x/sol-resolver`](/packages/sol-resolver) | [![npm](https://img.shields.io/npm/v/@0x/sol-resolver.svg)](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies |
| [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Web3 provider middlewares (e.g. LedgerSubprovider) |
| [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator |
#### Utilities
| Package | Version | Description |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom TSLint rules used by the 0x core team |
| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations |
| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages |
| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities |
| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages |
| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x packages |
#### Private Packages
| Package | Description |
| ---------------------------------- | -------------------------------------------------------------------------------- |
| [`@0x/instant`](/packages/instant) | A free and flexible way to offer simple crypto purchasing in any app or website. |
## Usage
Dedicated documentation pages:
* [0x.js Library](https://0xproject.com/docs/0xjs)
* [0x Connect](https://0xproject.com/docs/connect)
* [Smart contracts](https://0xproject.com/docs/contracts)
* [Subproviders](https://0xproject.com/docs/subproviders)
* [Sol Compiler](https://0xproject.com/docs/sol-compiler)
* [Web3-wrapper](https://0xproject.com/docs/web3-wrapper)
* [JSON-schemas](https://0xproject.com/docs/json-schemas)
* [Sol-cov](https://0xproject.com/docs/sol-cov)
* [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md)
Node version >= 6.12 is required.
Node version 6.x or 8.x is required.
Most of the packages require additional typings for external dependencies.
You can include those by prepending the `@0x/typescript-typings` package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config.
@@ -104,6 +129,8 @@ Then install dependencies
yarn install
```
You will also need to have Python 3 installed, in order to build and run the tests of `abi-gen`'s command-line interface, which is integrated with the yarn build, yarn test, and yarn lint commands described below. More specifically, your local pip should resolve to the Python 3 version of pip, not a Python 2.x version.
### Build
To build all packages:
@@ -118,6 +145,12 @@ To build a specific package:
PKG=@0x/web3-wrapper yarn build
```
To build all contracts packages:
```bash
yarn build:contracts
```
### Watch
To re-build all packages on change:
@@ -190,3 +223,9 @@ Run a specific package's test:
```bash
PKG=@0x/web3-wrapper yarn test
```
Run all contracts packages tests:
```bash
yarn test:contracts
```

View File

@@ -5,6 +5,7 @@
"avoid-tx-origin": "warn",
"bracket-align": false,
"code-complexity": false,
"compiler-fixed": false,
"const-name-snakecase": "error",
"expression-indent": "error",
"function-max-lines": false,

16
contracts/README.md Normal file
View File

@@ -0,0 +1,16 @@
#### Deployed Contract Packages
| Contract | Package | Version | Git Tag |
| --------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| AssetProxyOwner | [`@0x/contracts-multisig`](/contracts/multisig) | [v1.0.2](https://www.npmjs.com/package/@0x/contracts-multisig/v/1.0.2) | [@0x/contracts-multisig@1.0.2](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-multisig@1.0.2) |
| ERC20Proxy | [`@0x/contracts-asset-proxy`](/contracts/asset-proxy) | [v1.0.1](https://www.npmjs.com/package/@0x/contracts-asset-proxy/v/1.0.1) | [@0x/contracts-asset-proxy@1.0.1](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-asset-proxy@1.0.1) |
| ERC721Proxy | [`@0x/contracts-asset-proxy`](/contracts/asset-proxy) | [v1.0.1](https://www.npmjs.com/package/@0x/contracts-asset-proxy/v/1.0.1) | [@0x/contracts-asset-proxy@1.0.1](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-asset-proxy@1.0.1) |
| Exchange | [`@0x/contracts-exchange`](/contracts/exchange) | [v1.0.1](https://www.npmjs.com/package/@0x/contracts-exchange/v/1.0.1) | [@0x/contracts-exchange@1.0.1](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-exchange@1.0.1) |
| DutchAuction | [`@0x/contracts-extensions`](/contracts/extensions) | [v1.0.2](https://www.npmjs.com/package/@0x/contracts-extensions/v/1.0.2) | [@0x/contracts-extensions@1.0.2](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-extensions@1.0.2) |
| Forwarder | [`@0x/contracts-exchange-forwarder`](/contracts/exchange-forwarder) | [v1.0.1](https://www.npmjs.com/package/@0x/contracts-exchange-forwarder/v/1.0.1) | [@0x/contracts-exchange-forwarder@1.0.1](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-exchange-forwarder@1.0.1) |
| MultiAssetProxy | [`@0x/contracts-asset-proxy`](/contracts/asset-proxy) | [v1.0.1](https://www.npmjs.com/package/@0x/contracts-asset-proxy/v/1.0.1) | [@0x/contracts-asset-proxy@1.0.1](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-asset-proxy@1.0.1) |
| ZRXToken | [`@0x/contracts-erc20`](/contracts/erc20) | [v1.0.1](https://www.npmjs.com/package/@0x/contracts-erc20/v/1.0.1) | [@0x/contracts-erc20@1.0.1](https://github.com/0xProject/0x-monorepo/releases/tag/@0x/contracts-erc20@1.0.1) |
#### Development
Building solidity files will update the contract artifact in `{package-name}/generated-artifacts/{contract}.json`, but does not automatically update the `contract-artifacts` or `contract-wrappers` packages, which are generated from the artifact JSON. See `contract-artifacts/README.md` for instructions on updating these packages.

48
contracts/TESTING.md Normal file
View File

@@ -0,0 +1,48 @@
# Contracts testing options
## Revert stack traces
If you want to see helpful stack traces (incl. line number, code snippet) for smart contract reverts, run the tests with:
```
yarn test:trace
```
**Note:** This currently slows down the test runs and is therefore not enabled by default.
## Backing Ethereum node
By default, our tests run against an in-process [Ganache](https://github.com/trufflesuite/ganache-core) instance. In order to run the tests against [Geth](https://github.com/ethereum/go-ethereum), first follow the instructions in the README for the devnet package to start the devnet Geth node. Then run:
```bash
TEST_PROVIDER=geth yarn test
```
## Code coverage
In order to see the Solidity code coverage output generated by `@0x/sol-coverage`, run:
```
yarn test:coverage
```
## Gas profiler
In order to profile the gas costs for a specific smart contract call/transaction, you can run the tests in `profiler` mode.
**Note:** Traces emitted by ganache have incorrect gas costs so we recommend using Geth for profiling.
```
TEST_PROVIDER=geth yarn test:profiler
```
You'll see a warning that you need to explicitly enable and disable the profiler before and after the block of code you want to profile.
```typescript
import { profiler } from './utils/profiler';
profiler.start();
// Some call to a smart contract
profiler.stop();
```
Without explicitly starting and stopping the profiler, the profiler output will be too busy, and therefore unusable.

View File

@@ -0,0 +1,10 @@
# Blacklist all files
.*
*
# Whitelist lib
!lib/**/*
# Whitelist Solidity contracts
!contracts/src/**/*
# Blacklist tests in lib
/lib/test/*
# Package specific ignore

View File

@@ -0,0 +1,2 @@
# solhint can't parse `abi.decode` syntax.
contracts/src/ERC1155Proxy.sol

View File

@@ -0,0 +1,590 @@
[
{
"version": "3.4.0",
"changes": [
{
"note": "Fix instability with DFB.",
"pr": 2616
},
{
"note": "Add `BalancerBridge`",
"pr": 2613
}
],
"timestamp": 1594788383
},
{
"version": "3.3.0",
"changes": [
{
"note": "Use `LibERC20Token.approveIfBelow()` in DEX bridges for for approvals.",
"pr": 2512
},
{
"note": "Emit `ERC20BridgeTransfer` events in bridges.",
"pr": 2512
},
{
"note": "Change names of `ERC20BridgeTransfer` args to be less ambiguous.",
"pr": 2524
},
{
"note": "Added `MixinGasToken` allowing Gas Tokens to be freed",
"pr": 2523
},
{
"note": "Add `DexForwaderBridge` bridge contract.",
"pr": 2525
},
{
"note": "Add `UniswapV2Bridge` bridge contract.",
"pr": 2590
},
{
"note": "Add Gas Token freeing to `DexForwarderBridge` contract.",
"pr": 2536
}
],
"timestamp": 1592969527
},
{
"timestamp": 1583220306,
"version": "3.2.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1582837861,
"version": "3.2.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1582677073,
"version": "3.2.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1582623685,
"version": "3.2.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1581748629,
"version": "3.2.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.2.0",
"changes": [
{
"note": "Add more types and functions to `IDydx`",
"pr": 2466
},
{
"note": "Rename `DydxBrigeAction.accountId` to `DydxBridgeAction.accountIdx`",
"pr": 2466
},
{
"note": "Fix broken tests.",
"pr": 2462
},
{
"note": "Remove dependency on `@0x/contracts-dev-utils`",
"pr": 2462
},
{
"note": "Add asset data decoding functions",
"pr": 2462
},
{
"note": "Add `setOperators()` to `IDydx`",
"pr": 2462
}
],
"timestamp": 1581204851
},
{
"timestamp": 1580988106,
"version": "3.1.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1580811564,
"version": "3.1.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1579682890,
"version": "3.1.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.1.0",
"changes": [
{
"note": "Integration tests for DydxBridge with ERC20BridgeProxy.",
"pr": 2401
},
{
"note": "Fix `UniswapBridge` token -> token transfer call.",
"pr": 2412
},
{
"note": "Fix `KyberBridge` incorrect `minConversionRate` calculation.",
"pr": 2412
}
],
"timestamp": 1578272714
},
{
"timestamp": 1576540892,
"version": "3.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1575931811,
"version": "3.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.0.0",
"changes": [
{
"note": "Implement `KyberBridge`.",
"pr": 2352
},
{
"note": "Drastically reduced bundle size by adding .npmignore, only exporting specific artifacts/wrappers/utils",
"pr": 2330
},
{
"note": "ERC20Wrapper and ERC1155ProxyWrapper constructors now require an instance of DevUtilsContract",
"pr": 2034
},
{
"note": "Disallow the zero address from being made an authorized address in MixinAuthorizable, and created an archive directory that includes an old version of Ownable",
"pr": 2019
},
{
"note": "Remove `LibAssetProxyIds` contract",
"pr": 2055
},
{
"note": "Compile and export all contracts, artifacts, and wrappers by default",
"pr": 2055
},
{
"note": "Remove unused dependency on IAuthorizable in IAssetProxy",
"pr": 1910
},
{
"note": "Add `ERC20BridgeProxy`",
"pr": 2220
},
{
"note": "Add `Eth2DaiBridge`",
"pr": 2221
},
{
"note": "Add `UniswapBridge`",
"pr": 2233
},
{
"note": "Replaced `SafeMath` with `LibSafeMath`",
"pr": 2254
}
],
"timestamp": 1575296764
},
{
"version": "2.3.0-beta.4",
"changes": [
{
"note": "Implement `KyberBridge`.",
"pr": 2352
},
{
"note": "Implement `DydxBridge`.",
"pr": 2365
}
],
"timestamp": 1575290197
},
{
"version": "2.3.0-beta.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1574238768
},
{
"version": "2.3.0-beta.2",
"changes": [
{
"note": "Drastically reduced bundle size by adding .npmignore, only exporting specific artifacts/wrappers/utils",
"pr": 2330
}
],
"timestamp": 1574030254
},
{
"version": "2.3.0-beta.1",
"changes": [
{
"note": "ERC20Wrapper and ERC1155ProxyWrapper constructors now require an instance of DevUtilsContract",
"pr": 2034
}
],
"timestamp": 1573159180
},
{
"version": "2.3.0-beta.0",
"changes": [
{
"note": "Disallow the zero address from being made an authorized address in MixinAuthorizable, and created an archive directory that includes an old version of Ownable",
"pr": 2019
},
{
"note": "Remove `LibAssetProxyIds` contract",
"pr": 2055
},
{
"note": "Compile and export all contracts, artifacts, and wrappers by default",
"pr": 2055
},
{
"note": "Remove unused dependency on IAuthorizable in IAssetProxy",
"pr": 1910
},
{
"note": "Add `ERC20BridgeProxy`",
"pr": 2220
},
{
"note": "Add `Eth2DaiBridge`",
"pr": 2221
},
{
"note": "Add `UniswapBridge`",
"pr": 2233
},
{
"note": "Replaced `SafeMath` with `LibSafeMath`",
"pr": 2254
}
],
"timestamp": 1570135330
},
{
"timestamp": 1568744790,
"version": "2.2.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1567521715,
"version": "2.2.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1566446343,
"version": "2.2.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1565296576,
"version": "2.2.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.2.4",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564607468
},
{
"timestamp": 1563957393,
"version": "2.2.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1563193019,
"version": "2.2.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1563047529,
"version": "2.2.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.2.0",
"changes": [
{
"note": "Add `LibAssetProxyIds` contract",
"pr": 1835
},
{
"note": "Updated ERC1155 Asset Proxy. Less optimization. More explicit handling of edge cases.",
"pr": 1852
},
{
"note": "Implement StaticCallProxy",
"pr": 1863
}
],
"timestamp": 1563006338
},
{
"timestamp": 1558712885,
"version": "2.1.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1557961111,
"version": "2.1.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1557799313,
"version": "2.1.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.1.2",
"changes": [
{
"note": "Update tests to use contract-built-in `awaitTransactionSuccessAsync`",
"pr": 1797
},
{
"note": "Make `ERC721Wrapper.setApprovalForAll()` take an owner address instead of a token ID",
"pr": 1819
},
{
"note": "Automatically set unlimited proxy allowances in `ERC721.setBalancesAndAllowancesAsync()`",
"pr": 1819
},
{
"note": "Add `setProxyAllowanceForAllAsync()` to `ERC1155ProxyWrapper`.",
"pr": 1819
}
],
"timestamp": 1557507213
},
{
"version": "2.1.1",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1554997931
},
{
"version": "2.1.0",
"changes": [
{
"note": "Run Web3ProviderEngine without excess block polling",
"pr": 1695
}
],
"timestamp": 1553183790
},
{
"version": "2.0.0",
"changes": [
{
"note": "Do not reexport external dependencies",
"pr": 1682
},
{
"note": "Add ERC1155Proxy",
"pr": 1661
},
{
"note": "Bumped solidity version to ^0.5.5",
"pr": 1701
},
{
"note": "Integration testing for ERC1155Proxy",
"pr": 1673
}
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,
"version": "1.0.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1551299797,
"version": "1.0.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1551220833,
"version": "1.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1551130135,
"version": "1.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549733923,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "1.0.3",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549373905,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.0",
"changes": [
{
"note": "Move all AssetProxy contracts out of contracts-protocol to new package",
"pr": 1539
}
]
}
]

View File

@@ -0,0 +1,230 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v3.4.0 - _July 15, 2020_
* Fix instability with DFB. (#2616)
* Add `BalancerBridge` (#2613)
## v3.3.0 - _June 24, 2020_
* Use `LibERC20Token.approveIfBelow()` in DEX bridges for for approvals. (#2512)
* Emit `ERC20BridgeTransfer` events in bridges. (#2512)
* Change names of `ERC20BridgeTransfer` args to be less ambiguous. (#2524)
* Added `MixinGasToken` allowing Gas Tokens to be freed (#2523)
* Add `DexForwaderBridge` bridge contract. (#2525)
* Add `UniswapV2Bridge` bridge contract. (#2590)
* Add Gas Token freeing to `DexForwarderBridge` contract. (#2536)
## v3.2.5 - _March 3, 2020_
* Dependencies updated
## v3.2.4 - _February 27, 2020_
* Dependencies updated
## v3.2.3 - _February 26, 2020_
* Dependencies updated
## v3.2.2 - _February 25, 2020_
* Dependencies updated
## v3.2.1 - _February 15, 2020_
* Dependencies updated
## v3.2.0 - _February 8, 2020_
* Add more types and functions to `IDydx` (#2466)
* Rename `DydxBrigeAction.accountId` to `DydxBridgeAction.accountIdx` (#2466)
* Fix broken tests. (#2462)
* Remove dependency on `@0x/contracts-dev-utils` (#2462)
* Add asset data decoding functions (#2462)
* Add `setOperators()` to `IDydx` (#2462)
## v3.1.3 - _February 6, 2020_
* Dependencies updated
## v3.1.2 - _February 4, 2020_
* Dependencies updated
## v3.1.1 - _January 22, 2020_
* Dependencies updated
## v3.1.0 - _January 6, 2020_
* Integration tests for DydxBridge with ERC20BridgeProxy. (#2401)
* Fix `UniswapBridge` token -> token transfer call. (#2412)
* Fix `KyberBridge` incorrect `minConversionRate` calculation. (#2412)
## v3.0.2 - _December 17, 2019_
* Dependencies updated
## v3.0.1 - _December 9, 2019_
* Dependencies updated
## v3.0.0 - _December 2, 2019_
* Implement `KyberBridge`. (#2352)
* Drastically reduced bundle size by adding .npmignore, only exporting specific artifacts/wrappers/utils (#2330)
* ERC20Wrapper and ERC1155ProxyWrapper constructors now require an instance of DevUtilsContract (#2034)
* Disallow the zero address from being made an authorized address in MixinAuthorizable, and created an archive directory that includes an old version of Ownable (#2019)
* Remove `LibAssetProxyIds` contract (#2055)
* Compile and export all contracts, artifacts, and wrappers by default (#2055)
* Remove unused dependency on IAuthorizable in IAssetProxy (#1910)
* Add `ERC20BridgeProxy` (#2220)
* Add `Eth2DaiBridge` (#2221)
* Add `UniswapBridge` (#2233)
* Replaced `SafeMath` with `LibSafeMath` (#2254)
## v2.3.0-beta.4 - _December 2, 2019_
* Implement `KyberBridge`. (#2352)
* Implement `DydxBridge`. (#2365)
## v2.3.0-beta.3 - _November 20, 2019_
* Dependencies updated
## v2.3.0-beta.2 - _November 17, 2019_
* Drastically reduced bundle size by adding .npmignore, only exporting specific artifacts/wrappers/utils (#2330)
## v2.3.0-beta.1 - _November 7, 2019_
* ERC20Wrapper and ERC1155ProxyWrapper constructors now require an instance of DevUtilsContract (#2034)
## v2.3.0-beta.0 - _October 3, 2019_
* Disallow the zero address from being made an authorized address in MixinAuthorizable, and created an archive directory that includes an old version of Ownable (#2019)
* Remove `LibAssetProxyIds` contract (#2055)
* Compile and export all contracts, artifacts, and wrappers by default (#2055)
* Remove unused dependency on IAuthorizable in IAssetProxy (#1910)
* Add `ERC20BridgeProxy` (#2220)
* Add `Eth2DaiBridge` (#2221)
* Add `UniswapBridge` (#2233)
* Replaced `SafeMath` with `LibSafeMath` (#2254)
## v2.2.8 - _September 17, 2019_
* Dependencies updated
## v2.2.7 - _September 3, 2019_
* Dependencies updated
## v2.2.6 - _August 22, 2019_
* Dependencies updated
## v2.2.5 - _August 8, 2019_
* Dependencies updated
## v2.2.4 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v2.2.3 - _July 24, 2019_
* Dependencies updated
## v2.2.2 - _July 15, 2019_
* Dependencies updated
## v2.2.1 - _July 13, 2019_
* Dependencies updated
## v2.2.0 - _July 13, 2019_
* Add `LibAssetProxyIds` contract (#1835)
* Updated ERC1155 Asset Proxy. Less optimization. More explicit handling of edge cases. (#1852)
* Implement StaticCallProxy (#1863)
## v2.1.5 - _May 24, 2019_
* Dependencies updated
## v2.1.4 - _May 15, 2019_
* Dependencies updated
## v2.1.3 - _May 14, 2019_
* Dependencies updated
## v2.1.2 - _May 10, 2019_
* Update tests to use contract-built-in `awaitTransactionSuccessAsync` (#1797)
* Make `ERC721Wrapper.setApprovalForAll()` take an owner address instead of a token ID (#1819)
* Automatically set unlimited proxy allowances in `ERC721.setBalancesAndAllowancesAsync()` (#1819)
* Add `setProxyAllowanceForAllAsync()` to `ERC1155ProxyWrapper`. (#1819)
## v2.1.1 - _April 11, 2019_
* Dependencies updated
## v2.1.0 - _March 21, 2019_
* Run Web3ProviderEngine without excess block polling (#1695)
## v2.0.0 - _March 20, 2019_
* Do not reexport external dependencies (#1682)
* Add ERC1155Proxy (#1661)
* Bumped solidity version to ^0.5.5 (#1701)
* Integration testing for ERC1155Proxy (#1673)
## v1.0.9 - _March 1, 2019_
* Dependencies updated
## v1.0.8 - _February 27, 2019_
* Dependencies updated
## v1.0.7 - _February 26, 2019_
* Dependencies updated
## v1.0.6 - _February 25, 2019_
* Dependencies updated
## v1.0.5 - _February 9, 2019_
* Dependencies updated
## v1.0.4 - _February 7, 2019_
* Dependencies updated
## v1.0.3 - _February 7, 2019_
* Fake publish to enable pinning
## v1.0.2 - _February 6, 2019_
* Dependencies updated
## v1.0.1 - _February 5, 2019_
* Dependencies updated
## v1.0.0 - _Invalid date_
* Move all AssetProxy contracts out of contracts-protocol to new package (#1539)

View File

@@ -0,0 +1,47 @@
[
{
"name": "MultiAssetProxy",
"version": "1.0.0",
"changes": [
{
"note": "Add MultiAssetProxy implementation",
"pr": 1224,
"networks": {
"3": "0xab8fbd189c569ccdee3a4d929bb7f557be4028f6",
"4": "0xb34cde0ad3a83d04abebc0b66e75196f22216621",
"42": "0xf6313a772c222f51c28f2304c0703b8cf5428fd8"
}
}
]
},
{
"name": "ERC20Proxy",
"version": "1.0.0",
"changes": [
{
"note": "protocol v2 deploy",
"networks": {
"1": "0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
"3": "0xb1408f4c245a23c31b98d2c626777d4c0d766caa",
"4": "0x3e809c563c15a295e832e37053798ddc8d6c8dab",
"42": "0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e"
}
}
]
},
{
"name": "ERC721Proxy",
"version": "1.0.0",
"changes": [
{
"note": "protocol v2 deploy",
"networks": {
"1": "0x208e41fb445f1bb1b6780d58356e81405f3e6127",
"3": "0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4",
"4": "0x8e1ff02637cb5e39f2fa36c14706aa348b065b09",
"42": "0x2a9127c745688a165106c11cd4d647d2220af821"
}
}
]
}
]

View File

@@ -0,0 +1,73 @@
## AssetProxy
This package contains the implementations of all of the [`AssetProxy`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxy) contracts available within the 0x protocol. These contracts are responsible for decoding the `assetData` sent to them and performing the actual transfer of assets. Addresses of the deployed contracts can be found in this 0x [guide](https://0x.org/docs/guides/0x-cheat-sheet) or the [DEPLOYS](./DEPLOYS.json) file within this package.
## Installation
**Install**
```bash
npm install @0x/contracts-asset-proxy --save
```
## Bug bounty
A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0x.org/docs/guides/bug-bounty-program).
## Contributing
We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=@0x/contracts-asset-proxy yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0x/contracts-asset-proxy yarn watch
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```
#### Testing options
Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).

View File

@@ -0,0 +1,27 @@
{
"artifactsDir": "./test/generated-artifacts",
"contractsDir": "./contracts",
"useDockerisedSolc": false,
"isOfflineMode": false,
"shouldSaveStandardInput": true,
"compilerSettings": {
"evmVersion": "istanbul",
"optimizer": {
"enabled": true,
"runs": 1000000,
"details": { "yul": true, "deduplicate": true, "cse": true, "constantOptimizer": true }
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap"
]
}
}
}
}

View File

@@ -0,0 +1,172 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "../archive/Ownable.sol";
import "../src/interfaces/IAssetProxy.sol";
import "../src/interfaces/IAssetProxyDispatcher.sol";
contract MixinAssetProxyDispatcher is
Ownable,
IAssetProxyDispatcher
{
// Mapping from Asset Proxy Id's to their respective Asset Proxy
mapping (bytes4 => address) public assetProxies;
/// @dev Registers an asset proxy to its asset proxy id.
/// Once an asset proxy is registered, it cannot be unregistered.
/// @param assetProxy Address of new asset proxy to register.
function registerAssetProxy(address assetProxy)
external
onlyOwner
{
// Ensure that no asset proxy exists with current id.
bytes4 assetProxyId = IAssetProxy(assetProxy).getProxyId();
address currentAssetProxy = assetProxies[assetProxyId];
require(
currentAssetProxy == address(0),
"ASSET_PROXY_ALREADY_EXISTS"
);
// Add asset proxy and log registration.
assetProxies[assetProxyId] = assetProxy;
emit AssetProxyRegistered(
assetProxyId,
assetProxy
);
}
/// @dev Gets an asset proxy.
/// @param assetProxyId Id of the asset proxy.
/// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered.
function getAssetProxy(bytes4 assetProxyId)
external
view
returns (address)
{
return assetProxies[assetProxyId];
}
/// @dev Forwards arguments to assetProxy and calls `transferFrom`. Either succeeds or throws.
/// @param assetData Byte array encoded for the asset.
/// @param from Address to transfer token from.
/// @param to Address to transfer token to.
/// @param amount Amount of token to transfer.
function _dispatchTransferFrom(
bytes memory assetData,
address from,
address to,
uint256 amount
)
internal
{
// Do nothing if no amount should be transferred.
if (amount > 0 && from != to) {
// Ensure assetData length is valid
require(
assetData.length > 3,
"LENGTH_GREATER_THAN_3_REQUIRED"
);
// Lookup assetProxy. We do not use `LibBytes.readBytes4` for gas efficiency reasons.
bytes4 assetProxyId;
assembly {
assetProxyId := and(mload(
add(assetData, 32)),
0xFFFFFFFF00000000000000000000000000000000000000000000000000000000
)
}
address assetProxy = assetProxies[assetProxyId];
// Ensure that assetProxy exists
require(
assetProxy != address(0),
"ASSET_PROXY_DOES_NOT_EXIST"
);
// We construct calldata for the `assetProxy.transferFrom` ABI.
// The layout of this calldata is in the table below.
//
// | Area | Offset | Length | Contents |
// | -------- |--------|---------|-------------------------------------------- |
// | Header | 0 | 4 | function selector |
// | Params | | 4 * 32 | function parameters: |
// | | 4 | | 1. offset to assetData (*) |
// | | 36 | | 2. from |
// | | 68 | | 3. to |
// | | 100 | | 4. amount |
// | Data | | | assetData: |
// | | 132 | 32 | assetData Length |
// | | 164 | ** | assetData Contents |
assembly {
/////// Setup State ///////
// `cdStart` is the start of the calldata for `assetProxy.transferFrom` (equal to free memory ptr).
let cdStart := mload(64)
// `dataAreaLength` is the total number of words needed to store `assetData`
// As-per the ABI spec, this value is padded up to the nearest multiple of 32,
// and includes 32-bytes for length.
let dataAreaLength := and(add(mload(assetData), 63), 0xFFFFFFFFFFFE0)
// `cdEnd` is the end of the calldata for `assetProxy.transferFrom`.
let cdEnd := add(cdStart, add(132, dataAreaLength))
/////// Setup Header Area ///////
// This area holds the 4-byte `transferFromSelector`.
// bytes4(keccak256("transferFrom(bytes,address,address,uint256)")) = 0xa85e59e4
mstore(cdStart, 0xa85e59e400000000000000000000000000000000000000000000000000000000)
/////// Setup Params Area ///////
// Each parameter is padded to 32-bytes. The entire Params Area is 128 bytes.
// Notes:
// 1. The offset to `assetData` is the length of the Params Area (128 bytes).
// 2. A 20-byte mask is applied to addresses to zero-out the unused bytes.
mstore(add(cdStart, 4), 128)
mstore(add(cdStart, 36), and(from, 0xffffffffffffffffffffffffffffffffffffffff))
mstore(add(cdStart, 68), and(to, 0xffffffffffffffffffffffffffffffffffffffff))
mstore(add(cdStart, 100), amount)
/////// Setup Data Area ///////
// This area holds `assetData`.
let dataArea := add(cdStart, 132)
// solhint-disable-next-line no-empty-blocks
for {} lt(dataArea, cdEnd) {} {
mstore(dataArea, mload(assetData))
dataArea := add(dataArea, 32)
assetData := add(assetData, 32)
}
/////// Call `assetProxy.transferFrom` using the constructed calldata ///////
let success := call(
gas, // forward all gas
assetProxy, // call address of asset proxy
0, // don't send any ETH
cdStart, // pointer to start of input
sub(cdEnd, cdStart), // length of input
cdStart, // write output over input
512 // reserve 512 bytes for output
)
if iszero(success) {
revert(cdStart, returndatasize())
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
/*
Copyright 2018 ZeroEx Intl.
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -16,15 +16,15 @@
*/
pragma solidity 0.4.24;
pragma solidity ^0.5.9;
import "../../utils/Ownable/Ownable.sol";
import "./mixins/MAuthorizable.sol";
import "../archive/Ownable.sol";
import "../src/interfaces/IAuthorizable.sol";
contract MixinAuthorizable is
Ownable,
MAuthorizable
IAuthorizable
{
/// @dev Only authorized addresses can invoke functions with this modifier.
modifier onlyAuthorized {

View File

@@ -0,0 +1,33 @@
pragma solidity ^0.5.9;
import "@0x/contracts-utils/contracts/src/interfaces/IOwnable.sol";
contract Ownable is
IOwnable
{
address public owner;
constructor ()
public
{
owner = msg.sender;
}
modifier onlyOwner() {
require(
msg.sender == owner,
"ONLY_CONTRACT_OWNER"
);
_;
}
function transferOwnership(address newOwner)
public
onlyOwner
{
if (newOwner != address(0)) {
owner = newOwner;
}
}
}

View File

@@ -0,0 +1,97 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
import "@0x/contracts-erc1155/contracts/src/interfaces/IERC1155.sol";
import "../archive/MixinAuthorizable.sol";
import "./interfaces/IAssetProxy.sol";
contract ERC1155Proxy is
MixinAuthorizable,
IAssetProxy
{
using LibBytes for bytes;
using LibSafeMath for uint256;
// Id of this proxy.
bytes4 constant internal PROXY_ID = bytes4(keccak256("ERC1155Assets(address,uint256[],uint256[],bytes)"));
/// @dev Transfers batch of ERC1155 assets. Either succeeds or throws.
/// @param assetData Byte array encoded with ERC1155 token address, array of ids, array of values, and callback data.
/// @param from Address to transfer assets from.
/// @param to Address to transfer assets to.
/// @param amount Amount that will be multiplied with each element of `assetData.values` to scale the
/// values that will be transferred.
function transferFrom(
bytes calldata assetData,
address from,
address to,
uint256 amount
)
external
onlyAuthorized
{
// Decode params from `assetData`
// solhint-disable indent
(
address erc1155TokenAddress,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) = abi.decode(
assetData.sliceDestructive(4, assetData.length),
(address, uint256[], uint256[], bytes)
);
// solhint-enable indent
// Scale values up by `amount`
uint256 length = values.length;
uint256[] memory scaledValues = new uint256[](length);
for (uint256 i = 0; i != length; i++) {
// We write the scaled values to an unused location in memory in order
// to avoid copying over `ids` or `data`. This is possible if they are
// identical to `values` and the offsets for each are pointing to the
// same location in the ABI encoded calldata.
scaledValues[i] = values[i].safeMul(amount);
}
// Execute `safeBatchTransferFrom` call
// Either succeeds or throws
IERC1155(erc1155TokenAddress).safeBatchTransferFrom(
from,
to,
ids,
scaledValues,
data
);
}
/// @dev Gets the proxy id associated with the proxy address.
/// @return Proxy id.
function getProxyId()
external
pure
returns (bytes4)
{
return PROXY_ID;
}
}

View File

@@ -0,0 +1,126 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
import "@0x/contracts-utils/contracts/src/Authorizable.sol";
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "./interfaces/IAssetProxy.sol";
import "./interfaces/IERC20Bridge.sol";
contract ERC20BridgeProxy is
IAssetProxy,
Authorizable
{
using LibBytes for bytes;
using LibSafeMath for uint256;
// @dev Id of this proxy. Also the result of a successful bridge call.
// bytes4(keccak256("ERC20Bridge(address,address,bytes)"))
bytes4 constant private PROXY_ID = 0xdc1600f3;
/// @dev Calls a bridge contract to transfer `amount` of ERC20 from `from`
/// to `to`. Asserts that the balance of `to` has increased by `amount`.
/// @param assetData Abi-encoded data for this asset proxy encoded as:
/// abi.encodeWithSelector(
/// bytes4 PROXY_ID,
/// address tokenAddress,
/// address bridgeAddress,
/// bytes bridgeData
/// )
/// @param from Address to transfer asset from.
/// @param to Address to transfer asset to.
/// @param amount Amount of asset to transfer.
function transferFrom(
bytes calldata assetData,
address from,
address to,
uint256 amount
)
external
onlyAuthorized
{
// Extract asset data fields.
(
address tokenAddress,
address bridgeAddress,
bytes memory bridgeData
) = abi.decode(
assetData.sliceDestructive(4, assetData.length),
(address, address, bytes)
);
// Remember the balance of `to` before calling the bridge.
uint256 balanceBefore = balanceOf(tokenAddress, to);
// Call the bridge, who should transfer `amount` of `tokenAddress` to
// `to`.
bytes4 success = IERC20Bridge(bridgeAddress).bridgeTransferFrom(
tokenAddress,
from,
to,
amount,
bridgeData
);
// Bridge must return the proxy ID to indicate success.
require(success == PROXY_ID, "BRIDGE_FAILED");
// Ensure that the balance of `to` has increased by at least `amount`.
require(
balanceBefore.safeAdd(amount) <= balanceOf(tokenAddress, to),
"BRIDGE_UNDERPAY"
);
}
/// @dev Gets the proxy id associated with this asset proxy.
/// @return proxyId The proxy id.
function getProxyId()
external
pure
returns (bytes4 proxyId)
{
return PROXY_ID;
}
/// @dev Retrieves the balance of `owner` for this asset.
/// @return balance The balance of the ERC20 token being transferred by this
/// asset proxy.
function balanceOf(bytes calldata assetData, address owner)
external
view
returns (uint256 balance)
{
(address tokenAddress) = abi.decode(
assetData.sliceDestructive(4, assetData.length),
(address)
);
return balanceOf(tokenAddress, owner);
}
/// @dev Retrieves the balance of `owner` given an ERC20 address.
/// @return balance The balance of the ERC20 token for `owner`.
function balanceOf(address tokenAddress, address owner)
private
view
returns (uint256 balance)
{
return IERC20Token(tokenAddress).balanceOf(owner);
}
}

View File

@@ -1,6 +1,6 @@
/*
Copyright 2018 ZeroEx Intl.
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -16,9 +16,9 @@
*/
pragma solidity 0.4.24;
pragma solidity ^0.5.9;
import "./MixinAuthorizable.sol";
import "../archive/MixinAuthorizable.sol";
contract ERC20Proxy is
@@ -26,9 +26,9 @@ contract ERC20Proxy is
{
// Id of this proxy.
bytes4 constant internal PROXY_ID = bytes4(keccak256("ERC20Token(address)"));
// solhint-disable-next-line payable-fallback
function ()
function ()
external
{
assembly {
@@ -117,13 +117,13 @@ contract ERC20Proxy is
// * The "token address" is offset 32+4=36 bytes into "assetData" (tables 1 & 2).
// [tokenOffset = assetDataOffsetFromHeader + 36 = calldataload(4) + 4 + 36]
let token := calldataload(add(calldataload(4), 40))
/////// Setup Header Area ///////
// This area holds the 4-byte `transferFrom` selector.
// Any trailing data in transferFromSelector will be
// overwritten in the next `mstore` call.
mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
/////// Setup Params Area ///////
// We copy the fields `from`, `to` and `amount` in bulk
// from our own calldata to the new calldata.
@@ -147,7 +147,7 @@ contract ERC20Proxy is
// If the token does return data, we require that it is a single
// nonzero 32 bytes value.
// So the transfer succeeded if the call succeeded and either
// returned nothing, or returned a non-zero 32 byte value.
// returned nothing, or returned a non-zero 32 byte value.
success := and(success, or(
iszero(returndatasize),
and(
@@ -158,7 +158,7 @@ contract ERC20Proxy is
if success {
return(0, 0)
}
// Revert with `Error("TRANSFER_FAILED")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)

View File

@@ -1,6 +1,6 @@
/*
Copyright 2018 ZeroEx Intl.
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -16,9 +16,9 @@
*/
pragma solidity 0.4.24;
pragma solidity ^0.5.9;
import "./MixinAuthorizable.sol";
import "../archive/MixinAuthorizable.sol";
contract ERC721Proxy is
@@ -28,7 +28,7 @@ contract ERC721Proxy is
bytes4 constant internal PROXY_ID = bytes4(keccak256("ERC721Token(address,uint256)"));
// solhint-disable-next-line payable-fallback
function ()
function ()
external
{
assembly {
@@ -93,10 +93,10 @@ contract ERC721Proxy is
// | Params | | 2 * 32 | function parameters: |
// | | 4 | 12 + 20 | 1. token address |
// | | 36 | | 2. tokenId |
// We construct calldata for the `token.transferFrom` ABI.
// The layout of this calldata is in the table below.
//
//
// | Area | Offset | Length | Contents |
// |----------|--------|---------|-------------------------------------|
// | Header | 0 | 4 | function selector |
@@ -121,7 +121,7 @@ contract ERC721Proxy is
// Any trailing data in transferFromSelector will be
// overwritten in the next `mstore` call.
mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
/////// Setup Params Area ///////
// We copy the fields `from` and `to` in bulk
// from our own calldata to the new calldata.
@@ -145,7 +145,7 @@ contract ERC721Proxy is
if success {
return(0, 0)
}
// Revert with `Error("TRANSFER_FAILED")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)

View File

@@ -0,0 +1,335 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "../archive/MixinAssetProxyDispatcher.sol";
import "../archive/MixinAuthorizable.sol";
contract MultiAssetProxy is
MixinAssetProxyDispatcher,
MixinAuthorizable
{
// Id of this proxy.
bytes4 constant internal PROXY_ID = bytes4(keccak256("MultiAsset(uint256[],bytes[])"));
// solhint-disable-next-line payable-fallback
function ()
external
{
// NOTE: The below assembly assumes that clients do some input validation and that the input is properly encoded according to the AbiV2 specification.
// It is technically possible for inputs with very large lengths and offsets to cause overflows. However, this would make the calldata prohibitively
// expensive and we therefore do not check for overflows in these scenarios.
assembly {
// The first 4 bytes of calldata holds the function selector
let selector := and(calldataload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)
// `transferFrom` will be called with the following parameters:
// assetData Encoded byte array.
// from Address to transfer asset from.
// to Address to transfer asset to.
// amount Amount of asset to transfer.
// bytes4(keccak256("transferFrom(bytes,address,address,uint256)")) = 0xa85e59e4
if eq(selector, 0xa85e59e400000000000000000000000000000000000000000000000000000000) {
// To lookup a value in a mapping, we load from the storage location keccak256(k, p),
// where k is the key left padded to 32 bytes and p is the storage slot
mstore(0, caller)
mstore(32, authorized_slot)
// Revert if authorized[msg.sender] == false
if iszero(sload(keccak256(0, 64))) {
// Revert with `Error("SENDER_NOT_AUTHORIZED")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(64, 0x0000001553454e4445525f4e4f545f415554484f52495a454400000000000000)
mstore(96, 0)
revert(0, 100)
}
// `transferFrom`.
// The function is marked `external`, so no abi decoding is done for
// us. Instead, we expect the `calldata` memory to contain the
// following:
//
// | Area | Offset | Length | Contents |
// |----------|--------|---------|-------------------------------------|
// | Header | 0 | 4 | function selector |
// | Params | | 4 * 32 | function parameters: |
// | | 4 | | 1. offset to assetData (*) |
// | | 36 | | 2. from |
// | | 68 | | 3. to |
// | | 100 | | 4. amount |
// | Data | | | assetData: |
// | | 132 | 32 | assetData Length |
// | | 164 | ** | assetData Contents |
//
// (*): offset is computed from start of function parameters, so offset
// by an additional 4 bytes in the calldata.
//
// (**): see table below to compute length of assetData Contents
//
// WARNING: The ABIv2 specification allows additional padding between
// the Params and Data section. This will result in a larger
// offset to assetData.
// Load offset to `assetData`
let assetDataOffset := add(calldataload(4), 4)
// Load length in bytes of `assetData`
let assetDataLength := calldataload(assetDataOffset)
// Asset data itself is encoded as follows:
//
// | Area | Offset | Length | Contents |
// |----------|-------------|---------|-------------------------------------|
// | Header | 0 | 4 | assetProxyId |
// | Params | | 2 * 32 | function parameters: |
// | | 4 | | 1. offset to amounts (*) |
// | | 36 | | 2. offset to nestedAssetData (*) |
// | Data | | | amounts: |
// | | 68 | 32 | amounts Length |
// | | 100 | a | amounts Contents |
// | | | | nestedAssetData: |
// | | 100 + a | 32 | nestedAssetData Length |
// | | 132 + a | b | nestedAssetData Contents (offsets) |
// | | 132 + a + b | | nestedAssetData[0, ..., len] |
// Assert that the length of asset data:
// 1. Must be at least 68 bytes (see table above)
// 2. Must be a multiple of 32 (excluding the 4-byte selector)
if or(lt(assetDataLength, 68), mod(sub(assetDataLength, 4), 32)) {
// Revert with `Error("INVALID_ASSET_DATA_LENGTH")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(64, 0x00000019494e56414c49445f41535345545f444154415f4c454e475448000000)
mstore(96, 0)
revert(0, 100)
}
// End of asset data in calldata
// assetDataOffset
// + 32 (assetData len)
let assetDataEnd := add(assetDataOffset, add(assetDataLength, 32))
if gt(assetDataEnd, calldatasize()) {
// Revert with `Error("INVALID_ASSET_DATA_END")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(64, 0x00000016494e56414c49445f41535345545f444154415f454e44000000000000)
mstore(96, 0)
revert(0, 100)
}
// In order to find the offset to `amounts`, we must add:
// assetDataOffset
// + 32 (assetData len)
// + 4 (assetProxyId)
let amountsOffset := calldataload(add(assetDataOffset, 36))
// In order to find the offset to `nestedAssetData`, we must add:
// assetDataOffset
// + 32 (assetData len)
// + 4 (assetProxyId)
// + 32 (amounts offset)
let nestedAssetDataOffset := calldataload(add(assetDataOffset, 68))
// In order to find the start of the `amounts` contents, we must add:
// assetDataOffset
// + 32 (assetData len)
// + 4 (assetProxyId)
// + amountsOffset
// + 32 (amounts len)
let amountsContentsStart := add(assetDataOffset, add(amountsOffset, 68))
// Load number of elements in `amounts`
let amountsLen := calldataload(sub(amountsContentsStart, 32))
// In order to find the start of the `nestedAssetData` contents, we must add:
// assetDataOffset
// + 32 (assetData len)
// + 4 (assetProxyId)
// + nestedAssetDataOffset
// + 32 (nestedAssetData len)
let nestedAssetDataContentsStart := add(assetDataOffset, add(nestedAssetDataOffset, 68))
// Load number of elements in `nestedAssetData`
let nestedAssetDataLen := calldataload(sub(nestedAssetDataContentsStart, 32))
// Revert if number of elements in `amounts` differs from number of elements in `nestedAssetData`
if sub(amountsLen, nestedAssetDataLen) {
// Revert with `Error("LENGTH_MISMATCH")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(64, 0x0000000f4c454e4754485f4d49534d4154434800000000000000000000000000)
mstore(96, 0)
revert(0, 100)
}
// Copy `transferFrom` selector, offset to `assetData`, `from`, and `to` from calldata to memory
calldatacopy(
0, // memory can safely be overwritten from beginning
0, // start of calldata
100 // length of selector (4) and 3 params (32 * 3)
)
// Overwrite existing offset to `assetData` with our own
mstore(4, 128)
// Load `amount`
let amount := calldataload(100)
// Calculate number of bytes in `amounts` contents
let amountsByteLen := mul(amountsLen, 32)
// Initialize `assetProxyId` and `assetProxy` to 0
let assetProxyId := 0
let assetProxy := 0
// Loop through `amounts` and `nestedAssetData`, calling `transferFrom` for each respective element
for {let i := 0} lt(i, amountsByteLen) {i := add(i, 32)} {
// Calculate the total amount
let amountsElement := calldataload(add(amountsContentsStart, i))
let totalAmount := mul(amountsElement, amount)
// Revert if `amount` != 0 and multiplication resulted in an overflow
if iszero(or(
iszero(amount),
eq(div(totalAmount, amount), amountsElement)
)) {
// Revert with `Error("UINT256_OVERFLOW")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(64, 0x0000001055494e543235365f4f564552464c4f57000000000000000000000000)
mstore(96, 0)
revert(0, 100)
}
// Write `totalAmount` to memory
mstore(100, totalAmount)
// Load offset to `nestedAssetData[i]`
let nestedAssetDataElementOffset := calldataload(add(nestedAssetDataContentsStart, i))
// In order to find the start of the `nestedAssetData[i]` contents, we must add:
// assetDataOffset
// + 32 (assetData len)
// + 4 (assetProxyId)
// + nestedAssetDataOffset
// + 32 (nestedAssetData len)
// + nestedAssetDataElementOffset
// + 32 (nestedAssetDataElement len)
let nestedAssetDataElementContentsStart := add(
assetDataOffset,
add(
nestedAssetDataOffset,
add(nestedAssetDataElementOffset, 100)
)
)
// Load length of `nestedAssetData[i]`
let nestedAssetDataElementLenStart := sub(nestedAssetDataElementContentsStart, 32)
let nestedAssetDataElementLen := calldataload(nestedAssetDataElementLenStart)
// Revert if the `nestedAssetData` does not contain a 4 byte `assetProxyId`
if lt(nestedAssetDataElementLen, 4) {
// Revert with `Error("LENGTH_GREATER_THAN_3_REQUIRED")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(64, 0x0000001e4c454e4754485f475245415445525f5448414e5f335f524551554952)
mstore(96, 0x4544000000000000000000000000000000000000000000000000000000000000)
revert(0, 100)
}
// Load AssetProxy id
let currentAssetProxyId := and(
calldataload(nestedAssetDataElementContentsStart),
0xffffffff00000000000000000000000000000000000000000000000000000000
)
// Only load `assetProxy` if `currentAssetProxyId` does not equal `assetProxyId`
// We do not need to check if `currentAssetProxyId` is 0 since `assetProxy` is also initialized to 0
if sub(currentAssetProxyId, assetProxyId) {
// Update `assetProxyId`
assetProxyId := currentAssetProxyId
// To lookup a value in a mapping, we load from the storage location keccak256(k, p),
// where k is the key left padded to 32 bytes and p is the storage slot
mstore(132, assetProxyId)
mstore(164, assetProxies_slot)
assetProxy := sload(keccak256(132, 64))
}
// Revert if AssetProxy with given id does not exist
if iszero(assetProxy) {
// Revert with `Error("ASSET_PROXY_DOES_NOT_EXIST")`
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(64, 0x0000001a41535345545f50524f58595f444f45535f4e4f545f45584953540000)
mstore(96, 0)
revert(0, 100)
}
// Copy `nestedAssetData[i]` from calldata to memory
calldatacopy(
132, // memory slot after `amounts[i]`
nestedAssetDataElementLenStart, // location of `nestedAssetData[i]` in calldata
add(nestedAssetDataElementLen, 32) // `nestedAssetData[i].length` plus 32 byte length
)
// call `assetProxy.transferFrom`
let success := call(
gas, // forward all gas
assetProxy, // call address of asset proxy
0, // don't send any ETH
0, // pointer to start of input
add(164, nestedAssetDataElementLen), // length of input
0, // write output over memory that won't be reused
0 // don't copy output to memory
)
// Revert with reason given by AssetProxy if `transferFrom` call failed
if iszero(success) {
returndatacopy(
0, // copy to memory at 0
0, // copy from return data at 0
returndatasize() // copy all return data
)
revert(0, returndatasize())
}
}
// Return if no `transferFrom` calls reverted
return(0, 0)
}
// Revert if undefined function is called
revert(0, 0)
}
}
/// @dev Gets the proxy id associated with the proxy address.
/// @return Proxy id.
function getProxyId()
external
pure
returns (bytes4)
{
return PROXY_ID;
}
}

View File

@@ -0,0 +1,83 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
// solhint-disable no-unused-vars
contract StaticCallProxy {
using LibBytes for bytes;
// Id of this proxy.
bytes4 constant internal PROXY_ID = bytes4(keccak256("StaticCall(address,bytes,bytes32)"));
/// @dev Makes a staticcall to a target address and verifies that the data returned matches the expected return data.
/// @param assetData Byte array encoded with staticCallTarget, staticCallData, and expectedCallResultHash
/// @param from This value is ignored.
/// @param to This value is ignored.
/// @param amount This value is ignored.
function transferFrom(
bytes calldata assetData,
address from,
address to,
uint256 amount
)
external
view
{
// Decode params from `assetData`
(
address staticCallTarget,
bytes memory staticCallData,
bytes32 expectedReturnDataHash
) = abi.decode(
assetData.sliceDestructive(4, assetData.length),
(address, bytes, bytes32)
);
// Execute staticcall
(bool success, bytes memory returnData) = staticCallTarget.staticcall(staticCallData);
// Revert with returned data if staticcall is unsuccessful
if (!success) {
assembly {
revert(add(returnData, 32), mload(returnData))
}
}
// Revert if hash of return data is not as expected
bytes32 returnDataHash = keccak256(returnData);
require(
expectedReturnDataHash == returnDataHash,
"UNEXPECTED_STATIC_CALL_RESULT"
);
}
/// @dev Gets the proxy id associated with the proxy address.
/// @return Proxy id.
function getProxyId()
external
pure
returns (bytes4)
{
return PROXY_ID;
}
}

View File

@@ -0,0 +1,103 @@
/*
Copyright 2020 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-erc20/contracts/src/LibERC20Token.sol";
import "@0x/contracts-exchange-libs/contracts/src/IWallet.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "../interfaces/IERC20Bridge.sol";
import "../interfaces/IBalancerPool.sol";
contract BalancerBridge is
IERC20Bridge,
IWallet,
DeploymentConstants
{
/// @dev Callback for `IERC20Bridge`. Tries to buy `amount` of
/// `toTokenAddress` tokens by selling the entirety of the `fromTokenAddress`
/// token encoded in the bridge data, then transfers the bought
/// tokens to `to`.
/// @param toTokenAddress The token to buy and transfer to `to`.
/// @param from The maker (this contract).
/// @param to The recipient of the bought tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to buy.
/// @param bridgeData The abi-encoded addresses of the "from" token and Balancer pool.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address toTokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
returns (bytes4 success)
{
// Decode the bridge data.
(address fromTokenAddress, address poolAddress) = abi.decode(
bridgeData,
(address, address)
);
require(toTokenAddress != fromTokenAddress, "BalancerBridge/INVALID_PAIR");
uint256 fromTokenBalance = IERC20Token(fromTokenAddress).balanceOf(address(this));
// Grant an allowance to the exchange to spend `fromTokenAddress` token.
LibERC20Token.approveIfBelow(fromTokenAddress, poolAddress, fromTokenBalance);
// Sell all of this contract's `fromTokenAddress` token balance.
(uint256 boughtAmount,) = IBalancerPool(poolAddress).swapExactAmountIn(
fromTokenAddress, // tokenIn
fromTokenBalance, // tokenAmountIn
toTokenAddress, // tokenOut
amount, // minAmountOut
uint256(-1) // maxPrice
);
// Transfer the converted `toToken`s to `to`.
LibERC20Token.transfer(toTokenAddress, to, boughtAmount);
emit ERC20BridgeTransfer(
fromTokenAddress,
toTokenAddress,
fromTokenBalance,
boughtAmount,
from,
to
);
return BRIDGE_SUCCESS;
}
/// @dev `SignatureType.Wallet` callback, so that this bridge can be the maker
/// and sign for itself in orders. Always succeeds.
/// @return magicValue Magic success bytes, always.
function isValidSignature(
bytes32,
bytes calldata
)
external
view
returns (bytes4 magicValue)
{
return LEGACY_WALLET_MAGIC_VALUE;
}
}

View File

@@ -0,0 +1,75 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "../interfaces/IERC20Bridge.sol";
import "../interfaces/IChai.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
// solhint-disable space-after-comma
contract ChaiBridge is
IERC20Bridge,
DeploymentConstants
{
/// @dev Withdraws `amount` of `from` address's Dai from the Chai contract.
/// Transfers `amount` of Dai to `to` address.
/// @param from Address to transfer asset from.
/// @param to Address to transfer asset to.
/// @param amount Amount of asset to transfer.
/// @return success The magic bytes `0xdc1600f3` if successful.
function bridgeTransferFrom(
address /* tokenAddress */,
address from,
address to,
uint256 amount,
bytes calldata /* bridgeData */
)
external
returns (bytes4 success)
{
// Ensure that only the `ERC20BridgeProxy` can call this function.
require(
msg.sender == _getERC20BridgeProxyAddress(),
"ChaiBridge/ONLY_CALLABLE_BY_ERC20_BRIDGE_PROXY"
);
// Withdraw `from` address's Dai.
// NOTE: This contract must be approved to spend Chai on behalf of `from`.
bytes memory drawCalldata = abi.encodeWithSelector(
IChai(address(0)).draw.selector,
from,
amount
);
(bool success,) = _getChaiAddress().call(drawCalldata);
require(
success,
"ChaiBridge/DRAW_DAI_FAILED"
);
// Transfer Dai to `to`
// This will never fail if the `draw` call was successful
IERC20Token(_getDaiAddress()).transfer(to, amount);
return BRIDGE_SUCCESS;
}
}

View File

@@ -0,0 +1,128 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-erc20/contracts/src/LibERC20Token.sol";
import "@0x/contracts-exchange-libs/contracts/src/IWallet.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "../interfaces/IERC20Bridge.sol";
import "../interfaces/ICurve.sol";
import "./MixinGasToken.sol";
// solhint-disable not-rely-on-time
// solhint-disable space-after-comma
contract CurveBridge is
IERC20Bridge,
IWallet,
DeploymentConstants,
MixinGasToken
{
struct CurveBridgeData {
address curveAddress;
int128 fromCoinIdx;
int128 toCoinIdx;
int128 version;
}
/// @dev Callback for `ICurve`. Tries to buy `amount` of
/// `toTokenAddress` tokens by selling the entirety of the opposing asset
/// (DAI, USDC) to the Curve contract, then transfers the bought
/// tokens to `to`.
/// @param toTokenAddress The token to give to `to` (i.e DAI, USDC, USDT).
/// @param from The maker (this contract).
/// @param to The recipient of the bought tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to buy.
/// @param bridgeData The abi-encoeded "from" token address.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address toTokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
freesGasTokensFromCollector
returns (bytes4 success)
{
// Decode the bridge data to get the Curve metadata.
CurveBridgeData memory data = abi.decode(bridgeData, (CurveBridgeData));
address fromTokenAddress = ICurve(data.curveAddress).underlying_coins(data.fromCoinIdx);
require(toTokenAddress != fromTokenAddress, "CurveBridge/INVALID_PAIR");
uint256 fromTokenBalance = IERC20Token(fromTokenAddress).balanceOf(address(this));
// Grant an allowance to the exchange to spend `fromTokenAddress` token.
LibERC20Token.approveIfBelow(fromTokenAddress, data.curveAddress, fromTokenBalance);
// Try to sell all of this contract's `fromTokenAddress` token balance.
if (data.version == 0) {
ICurve(data.curveAddress).exchange_underlying(
data.fromCoinIdx,
data.toCoinIdx,
// dx
fromTokenBalance,
// min dy
amount,
// expires
block.timestamp + 1
);
} else {
ICurve(data.curveAddress).exchange_underlying(
data.fromCoinIdx,
data.toCoinIdx,
// dx
fromTokenBalance,
// min dy
amount
);
}
uint256 toTokenBalance = IERC20Token(toTokenAddress).balanceOf(address(this));
// Transfer the converted `toToken`s to `to`.
LibERC20Token.transfer(toTokenAddress, to, toTokenBalance);
emit ERC20BridgeTransfer(
fromTokenAddress,
toTokenAddress,
fromTokenBalance,
toTokenBalance,
from,
to
);
return BRIDGE_SUCCESS;
}
/// @dev `SignatureType.Wallet` callback, so that this bridge can be the maker
/// and sign for itself in orders. Always succeeds.
/// @return magicValue Magic success bytes, always.
function isValidSignature(
bytes32,
bytes calldata
)
external
view
returns (bytes4 magicValue)
{
return LEGACY_WALLET_MAGIC_VALUE;
}
}

View File

@@ -0,0 +1,200 @@
/*
Copyright 2020 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-erc20/contracts/src/LibERC20Token.sol";
import "@0x/contracts-exchange-libs/contracts/src/IWallet.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
import "../interfaces/IERC20Bridge.sol";
import "./MixinGasToken.sol";
// solhint-disable space-after-comma, indent
contract DexForwarderBridge is
IERC20Bridge,
IWallet,
DeploymentConstants,
MixinGasToken
{
using LibSafeMath for uint256;
/// @dev Data needed to reconstruct a bridge call.
struct BridgeCall {
address target;
uint256 inputTokenAmount;
uint256 outputTokenAmount;
bytes bridgeData;
}
/// @dev Intermediate state variables used by `bridgeTransferFrom()`, in
/// struct form to get around stack limits.
struct TransferFromState {
address inputToken;
uint256 initialInputTokenBalance;
uint256 callInputTokenAmount;
uint256 callOutputTokenAmount;
uint256 totalInputTokenSold;
BridgeCall[] calls;
}
/// @dev Spends this contract's entire balance of input tokens by forwarding
/// them to other bridges. Reverts if the entire balance is not spent.
/// @param outputToken The token being bought.
/// @param to The recipient of the bought tokens.
/// @param bridgeData The abi-encoded input token address.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address outputToken,
address /* from */,
address to,
uint256 /* amount */,
bytes calldata bridgeData
)
external
freesGasTokensFromCollector
returns (bytes4 success)
{
require(
msg.sender == _getERC20BridgeProxyAddress(),
"DexForwarderBridge/SENDER_NOT_AUTHORIZED"
);
TransferFromState memory state;
(
state.inputToken,
state.calls
) = abi.decode(bridgeData, (address, BridgeCall[]));
state.initialInputTokenBalance =
IERC20Token(state.inputToken).balanceOf(address(this));
for (uint256 i = 0; i < state.calls.length; ++i) {
// Stop if the we've sold all our input tokens.
if (state.totalInputTokenSold >= state.initialInputTokenBalance) {
break;
}
// Compute token amounts.
state.callInputTokenAmount = LibSafeMath.min256(
state.calls[i].inputTokenAmount,
state.initialInputTokenBalance.safeSub(state.totalInputTokenSold)
);
state.callOutputTokenAmount = LibMath.getPartialAmountFloor(
state.callInputTokenAmount,
state.calls[i].inputTokenAmount,
state.calls[i].outputTokenAmount
);
// Execute the call in a new context so we can recoup transferred
// funds by reverting.
(bool didSucceed, ) = address(this)
.call(abi.encodeWithSelector(
this.executeBridgeCall.selector,
state.calls[i].target,
to,
state.inputToken,
outputToken,
state.callInputTokenAmount,
state.callOutputTokenAmount,
state.calls[i].bridgeData
));
if (didSucceed) {
// Increase the amount of tokens sold.
state.totalInputTokenSold = state.totalInputTokenSold.safeAdd(
state.callInputTokenAmount
);
}
}
// Always succeed.
return BRIDGE_SUCCESS;
}
/// @dev Transfers `inputToken` token to a bridge contract then calls
/// its `bridgeTransferFrom()`. This is executed in separate context
/// so we can revert the transfer on error. This can only be called
// by this contract itself.
/// @param bridge The bridge contract.
/// @param to The recipient of `outputToken` tokens.
/// @param inputToken The input token.
/// @param outputToken The output token.
/// @param inputTokenAmount The amount of input tokens to transfer to `bridge`.
/// @param outputTokenAmount The amount of expected output tokens to be sent
/// to `to` by `bridge`.
function executeBridgeCall(
address bridge,
address to,
address inputToken,
address outputToken,
uint256 inputTokenAmount,
uint256 outputTokenAmount,
bytes calldata bridgeData
)
external
{
// Must be called through `bridgeTransferFrom()`.
require(msg.sender == address(this), "DexForwarderBridge/ONLY_SELF");
// `bridge` must not be this contract.
require(bridge != address(this));
// Get the starting balance of output tokens for `to`.
uint256 initialRecipientBalance = IERC20Token(outputToken).balanceOf(to);
// Transfer input tokens to the bridge.
LibERC20Token.transfer(inputToken, bridge, inputTokenAmount);
// Call the bridge.
(bool didSucceed, bytes memory resultData) =
bridge.call(abi.encodeWithSelector(
IERC20Bridge(0).bridgeTransferFrom.selector,
outputToken,
bridge,
to,
outputTokenAmount,
bridgeData
));
// Revert if the call failed or not enough tokens were bought.
// This will also undo the token transfer.
require(
didSucceed
&& resultData.length == 32
&& LibBytes.readBytes32(resultData, 0) == bytes32(BRIDGE_SUCCESS)
&& IERC20Token(outputToken).balanceOf(to).safeSub(initialRecipientBalance) >= outputTokenAmount
);
}
/// @dev `SignatureType.Wallet` callback, so that this bridge can be the maker
/// and sign for itself in orders. Always succeeds.
/// @return magicValue Magic success bytes, always.
function isValidSignature(
bytes32,
bytes calldata
)
external
view
returns (bytes4 magicValue)
{
return LEGACY_WALLET_MAGIC_VALUE;
}
}

View File

@@ -0,0 +1,242 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol";
import "../interfaces/IERC20Bridge.sol";
import "../interfaces/IDydxBridge.sol";
import "../interfaces/IDydx.sol";
contract DydxBridge is
IERC20Bridge,
IDydxBridge,
DeploymentConstants
{
using LibSafeMath for uint256;
/// @dev Callback for `IERC20Bridge`. Deposits or withdraws tokens from a dydx account.
/// Notes:
/// 1. This bridge must be set as an operator of the input dydx account.
/// 2. This function may only be called in the context of the 0x Exchange.
/// 3. The maker or taker of the 0x order must be the dydx account owner.
/// 4. Deposits into dydx are made from the `from` address.
/// 5. Withdrawals from dydx are made to the `to` address.
/// 6. Calling this function must always withdraw at least `amount`,
/// otherwise the `ERC20Bridge` will revert.
/// @param from The sender of the tokens and owner of the dydx account.
/// @param to The recipient of the tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to deposit or withdraw.
/// @param encodedBridgeData An abi-encoded `BridgeData` struct.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address, /* toTokenAddress */
address from,
address to,
uint256 amount,
bytes calldata encodedBridgeData
)
external
returns (bytes4 success)
{
// Ensure that only the `ERC20BridgeProxy` can call this function.
require(
msg.sender == _getERC20BridgeProxyAddress(),
"DydxBridge/ONLY_CALLABLE_BY_ERC20_BRIDGE_PROXY"
);
// Decode bridge data.
(BridgeData memory bridgeData) = abi.decode(encodedBridgeData, (BridgeData));
// The dydx accounts are owned by the `from` address.
IDydx.AccountInfo[] memory accounts = _createAccounts(from, bridgeData);
// Create dydx actions to run on the dydx accounts.
IDydx.ActionArgs[] memory actions = _createActions(
from,
to,
amount,
bridgeData
);
// Run operation. This will revert on failure.
IDydx(_getDydxAddress()).operate(accounts, actions);
return BRIDGE_SUCCESS;
}
/// @dev Creates an array of accounts for dydx to operate on.
/// All accounts must belong to the same owner.
/// @param accountOwner Owner of the dydx account.
/// @param bridgeData A `BridgeData` struct.
function _createAccounts(
address accountOwner,
BridgeData memory bridgeData
)
internal
returns (IDydx.AccountInfo[] memory accounts)
{
uint256[] memory accountNumbers = bridgeData.accountNumbers;
uint256 nAccounts = accountNumbers.length;
accounts = new IDydx.AccountInfo[](nAccounts);
for (uint256 i = 0; i < nAccounts; ++i) {
accounts[i] = IDydx.AccountInfo({
owner: accountOwner,
number: accountNumbers[i]
});
}
}
/// @dev Creates an array of actions to carry out on dydx.
/// @param depositFrom Deposit value from this address (owner of the dydx account).
/// @param withdrawTo Withdraw value to this address.
/// @param amount The amount of value available to operate on.
/// @param bridgeData A `BridgeData` struct.
function _createActions(
address depositFrom,
address withdrawTo,
uint256 amount,
BridgeData memory bridgeData
)
internal
returns (IDydx.ActionArgs[] memory actions)
{
BridgeAction[] memory bridgeActions = bridgeData.actions;
uint256 nBridgeActions = bridgeActions.length;
actions = new IDydx.ActionArgs[](nBridgeActions);
for (uint256 i = 0; i < nBridgeActions; ++i) {
// Cache current bridge action.
BridgeAction memory bridgeAction = bridgeActions[i];
// Scale amount, if conversion rate is set.
uint256 scaledAmount;
if (bridgeAction.conversionRateDenominator > 0) {
scaledAmount = LibMath.safeGetPartialAmountFloor(
bridgeAction.conversionRateNumerator,
bridgeAction.conversionRateDenominator,
amount
);
} else {
scaledAmount = amount;
}
// Construct dydx action.
if (bridgeAction.actionType == BridgeActionType.Deposit) {
// Deposit tokens from the account owner into their dydx account.
actions[i] = _createDepositAction(
depositFrom,
scaledAmount,
bridgeAction
);
} else if (bridgeAction.actionType == BridgeActionType.Withdraw) {
// Withdraw tokens from dydx to the `otherAccount`.
actions[i] = _createWithdrawAction(
withdrawTo,
scaledAmount,
bridgeAction
);
} else {
// If all values in the `Action` enum are handled then this
// revert is unreachable: Solidity will revert when casting
// from `uint8` to `Action`.
revert("DydxBridge/UNRECOGNIZED_BRIDGE_ACTION");
}
}
}
/// @dev Returns a dydx `DepositAction`.
/// @param depositFrom Deposit tokens from this address who is also the account owner.
/// @param amount of tokens to deposit.
/// @param bridgeAction A `BridgeAction` struct.
/// @return depositAction The encoded dydx action.
function _createDepositAction(
address depositFrom,
uint256 amount,
BridgeAction memory bridgeAction
)
internal
pure
returns (
IDydx.ActionArgs memory depositAction
)
{
// Create dydx amount.
IDydx.AssetAmount memory dydxAmount = IDydx.AssetAmount({
sign: true, // true if positive.
denomination: IDydx.AssetDenomination.Wei, // Wei => actual token amount held in account.
ref: IDydx.AssetReference.Delta, // Delta => a relative amount.
value: amount // amount to deposit.
});
// Create dydx deposit action.
depositAction = IDydx.ActionArgs({
actionType: IDydx.ActionType.Deposit, // deposit tokens.
amount: dydxAmount, // amount to deposit.
accountIdx: bridgeAction.accountIdx, // index in the `accounts` when calling `operate`.
primaryMarketId: bridgeAction.marketId, // indicates which token to deposit.
otherAddress: depositFrom, // deposit from the account owner.
// unused parameters
secondaryMarketId: 0,
otherAccountIdx: 0,
data: hex''
});
}
/// @dev Returns a dydx `WithdrawAction`.
/// @param withdrawTo Withdraw tokens to this address.
/// @param amount of tokens to withdraw.
/// @param bridgeAction A `BridgeAction` struct.
/// @return withdrawAction The encoded dydx action.
function _createWithdrawAction(
address withdrawTo,
uint256 amount,
BridgeAction memory bridgeAction
)
internal
pure
returns (
IDydx.ActionArgs memory withdrawAction
)
{
// Create dydx amount.
IDydx.AssetAmount memory amountToWithdraw = IDydx.AssetAmount({
sign: false, // false if negative.
denomination: IDydx.AssetDenomination.Wei, // Wei => actual token amount held in account.
ref: IDydx.AssetReference.Delta, // Delta => a relative amount.
value: amount // amount to withdraw.
});
// Create withdraw action.
withdrawAction = IDydx.ActionArgs({
actionType: IDydx.ActionType.Withdraw, // withdraw tokens.
amount: amountToWithdraw, // amount to withdraw.
accountIdx: bridgeAction.accountIdx, // index in the `accounts` when calling `operate`.
primaryMarketId: bridgeAction.marketId, // indicates which token to withdraw.
otherAddress: withdrawTo, // withdraw tokens to this address.
// unused parameters
secondaryMarketId: 0,
otherAccountIdx: 0,
data: hex''
});
}
}

View File

@@ -0,0 +1,98 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-erc20/contracts/src/LibERC20Token.sol";
import "@0x/contracts-exchange-libs/contracts/src/IWallet.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "../interfaces/IERC20Bridge.sol";
import "../interfaces/IEth2Dai.sol";
// solhint-disable space-after-comma
contract Eth2DaiBridge is
IERC20Bridge,
IWallet,
DeploymentConstants
{
/// @dev Callback for `IERC20Bridge`. Tries to buy `amount` of
/// `toTokenAddress` tokens by selling the entirety of the opposing asset
/// (DAI or WETH) to the Eth2Dai contract, then transfers the bought
/// tokens to `to`.
/// @param toTokenAddress The token to give to `to` (either DAI or WETH).
/// @param from The maker (this contract).
/// @param to The recipient of the bought tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to buy.
/// @param bridgeData The abi-encoeded "from" token address.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address toTokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
returns (bytes4 success)
{
// Decode the bridge data to get the `fromTokenAddress`.
(address fromTokenAddress) = abi.decode(bridgeData, (address));
IEth2Dai exchange = IEth2Dai(_getEth2DaiAddress());
uint256 fromTokenBalance = IERC20Token(fromTokenAddress).balanceOf(address(this));
// Grant an allowance to the exchange to spend `fromTokenAddress` token.
LibERC20Token.approveIfBelow(fromTokenAddress, address(exchange), fromTokenBalance);
// Try to sell all of this contract's `fromTokenAddress` token balance.
uint256 boughtAmount = exchange.sellAllAmount(
fromTokenAddress,
fromTokenBalance,
toTokenAddress,
amount
);
// Transfer the converted `toToken`s to `to`.
LibERC20Token.transfer(toTokenAddress, to, boughtAmount);
emit ERC20BridgeTransfer(
fromTokenAddress,
toTokenAddress,
fromTokenBalance,
boughtAmount,
from,
to
);
return BRIDGE_SUCCESS;
}
/// @dev `SignatureType.Wallet` callback, so that this bridge can be the maker
/// and sign for itself in orders. Always succeeds.
/// @return magicValue Magic success bytes, always.
function isValidSignature(
bytes32,
bytes calldata
)
external
view
returns (bytes4 magicValue)
{
return LEGACY_WALLET_MAGIC_VALUE;
}
}

View File

@@ -0,0 +1,176 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-erc20/contracts/src/interfaces/IEtherToken.sol";
import "@0x/contracts-erc20/contracts/src/LibERC20Token.sol";
import "@0x/contracts-exchange-libs/contracts/src/IWallet.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
import "../interfaces/IERC20Bridge.sol";
import "../interfaces/IKyberNetworkProxy.sol";
// solhint-disable space-after-comma
contract KyberBridge is
IERC20Bridge,
IWallet,
DeploymentConstants
{
using LibSafeMath for uint256;
// @dev Structure used internally to get around stack limits.
struct TradeState {
IKyberNetworkProxy kyber;
IEtherToken weth;
address fromTokenAddress;
uint256 fromTokenBalance;
uint256 payableAmount;
uint256 conversionRate;
}
/// @dev Kyber ETH pseudo-address.
address constant public KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
/// @dev `bridgeTransferFrom()` failure result.
bytes4 constant private BRIDGE_FAILED = 0x0;
/// @dev Precision of Kyber rates.
uint256 constant private KYBER_RATE_BASE = 10 ** 18;
// solhint-disable no-empty-blocks
/// @dev Payable fallback to receive ETH from Kyber.
function ()
external
payable
{}
/// @dev Callback for `IKyberBridge`. Tries to buy `amount` of
/// `toTokenAddress` tokens by selling the entirety of the opposing asset
/// to the `KyberNetworkProxy` contract, then transfers the bought
/// tokens to `to`.
/// @param toTokenAddress The token to give to `to`.
/// @param from The maker (this contract).
/// @param to The recipient of the bought tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to buy.
/// @param bridgeData The abi-encoeded "from" token address.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address toTokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
returns (bytes4 success)
{
TradeState memory state;
state.kyber = IKyberNetworkProxy(_getKyberNetworkProxyAddress());
state.weth = IEtherToken(_getWethAddress());
// Decode the bridge data to get the `fromTokenAddress`.
(state.fromTokenAddress) = abi.decode(bridgeData, (address));
// Query the balance of "from" tokens.
state.fromTokenBalance = IERC20Token(state.fromTokenAddress).balanceOf(address(this));
if (state.fromTokenBalance == 0) {
// Return failure if no input tokens.
return BRIDGE_FAILED;
}
// Compute the conversion rate, expressed in 18 decimals.
// The sequential notation is to get around stack limits.
state.conversionRate = KYBER_RATE_BASE;
state.conversionRate = state.conversionRate.safeMul(amount);
state.conversionRate = state.conversionRate.safeMul(
10 ** uint256(LibERC20Token.decimals(state.fromTokenAddress))
);
state.conversionRate = state.conversionRate.safeDiv(state.fromTokenBalance);
state.conversionRate = state.conversionRate.safeDiv(
10 ** uint256(LibERC20Token.decimals(toTokenAddress))
);
if (state.fromTokenAddress == toTokenAddress) {
// Just transfer the tokens if they're the same.
LibERC20Token.transfer(state.fromTokenAddress, to, state.fromTokenBalance);
return BRIDGE_SUCCESS;
} else if (state.fromTokenAddress != address(state.weth)) {
// If the input token is not WETH, grant an allowance to the exchange
// to spend them.
LibERC20Token.approveIfBelow(
state.fromTokenAddress,
address(state.kyber),
state.fromTokenBalance
);
} else {
// If the input token is WETH, unwrap it and attach it to the call.
state.fromTokenAddress = KYBER_ETH_ADDRESS;
state.payableAmount = state.fromTokenBalance;
state.weth.withdraw(state.fromTokenBalance);
}
bool isToTokenWeth = toTokenAddress == address(state.weth);
// Try to sell all of this contract's input token balance through
// `KyberNetworkProxy.trade()`.
uint256 boughtAmount = state.kyber.trade.value(state.payableAmount)(
// Input token.
state.fromTokenAddress,
// Sell amount.
state.fromTokenBalance,
// Output token.
isToTokenWeth ? KYBER_ETH_ADDRESS : toTokenAddress,
// Transfer to this contract if converting to ETH, otherwise
// transfer directly to the recipient.
isToTokenWeth ? address(uint160(address(this))) : address(uint160(to)),
// Buy as much as possible.
uint256(-1),
// Compute the minimum conversion rate, which is expressed in units with
// 18 decimal places.
state.conversionRate,
// No affiliate address.
address(0)
);
// Wrap ETH output and transfer to recipient.
if (isToTokenWeth) {
state.weth.deposit.value(boughtAmount)();
state.weth.transfer(to, boughtAmount);
}
emit ERC20BridgeTransfer(
state.fromTokenAddress == KYBER_ETH_ADDRESS ? address(state.weth) : state.fromTokenAddress,
toTokenAddress,
state.fromTokenBalance,
boughtAmount,
from,
to
);
return BRIDGE_SUCCESS;
}
/// @dev `SignatureType.Wallet` callback, so that this bridge can be the maker
/// and sign for itself in orders. Always succeeds.
/// @return magicValue Magic success bytes, always.
function isValidSignature(
bytes32,
bytes calldata
)
external
view
returns (bytes4 magicValue)
{
return LEGACY_WALLET_MAGIC_VALUE;
}
}

View File

@@ -0,0 +1,55 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.16;
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "../interfaces/IGasToken.sol";
contract MixinGasToken is
DeploymentConstants
{
/// @dev Frees gas tokens based on the amount of gas consumed in the function
modifier freesGasTokens {
uint256 gasBefore = gasleft();
_;
IGasToken gst = IGasToken(_getGstAddress());
if (address(gst) != address(0)) {
// (gasUsed + FREE_BASE) / (2 * REIMBURSE - FREE_TOKEN)
// 14154 24000 6870
uint256 value = (gasBefore - gasleft() + 14154) / 41130;
gst.freeUpTo(value);
}
}
/// @dev Frees gas tokens using the balance of `from`. Amount freed is based
/// on the gas consumed in the function
modifier freesGasTokensFromCollector() {
uint256 gasBefore = gasleft();
_;
IGasToken gst = IGasToken(_getGstAddress());
if (address(gst) != address(0)) {
// (gasUsed + FREE_BASE) / (2 * REIMBURSE - FREE_TOKEN)
// 14154 24000 6870
uint256 value = (gasBefore - gasleft() + 14154) / 41130;
gst.freeFromUpTo(_getGstCollectorAddress(), value);
}
}
}

View File

@@ -0,0 +1,220 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-erc20/contracts/src/interfaces/IEtherToken.sol";
import "@0x/contracts-erc20/contracts/src/LibERC20Token.sol";
import "@0x/contracts-exchange-libs/contracts/src/IWallet.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "../interfaces/IUniswapExchangeFactory.sol";
import "../interfaces/IUniswapExchange.sol";
import "../interfaces/IERC20Bridge.sol";
// solhint-disable space-after-comma
// solhint-disable not-rely-on-time
contract UniswapBridge is
IERC20Bridge,
IWallet,
DeploymentConstants
{
// Struct to hold `bridgeTransferFrom()` local variables in memory and to avoid
// stack overflows.
struct TransferState {
IUniswapExchange exchange;
uint256 fromTokenBalance;
IEtherToken weth;
uint256 boughtAmount;
}
// solhint-disable no-empty-blocks
/// @dev Payable fallback to receive ETH from uniswap.
function ()
external
payable
{}
/// @dev Callback for `IERC20Bridge`. Tries to buy `amount` of
/// `toTokenAddress` tokens by selling the entirety of the `fromTokenAddress`
/// token encoded in the bridge data.
/// @param toTokenAddress The token to buy and transfer to `to`.
/// @param from The maker (this contract).
/// @param to The recipient of the bought tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to buy.
/// @param bridgeData The abi-encoded "from" token address.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address toTokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
returns (bytes4 success)
{
// State memory object to avoid stack overflows.
TransferState memory state;
// Decode the bridge data to get the `fromTokenAddress`.
(address fromTokenAddress) = abi.decode(bridgeData, (address));
// Just transfer the tokens if they're the same.
if (fromTokenAddress == toTokenAddress) {
LibERC20Token.transfer(fromTokenAddress, to, amount);
return BRIDGE_SUCCESS;
}
// Get the exchange for the token pair.
state.exchange = _getUniswapExchangeForTokenPair(
fromTokenAddress,
toTokenAddress
);
// Get our balance of `fromTokenAddress` token.
state.fromTokenBalance = IERC20Token(fromTokenAddress).balanceOf(address(this));
// Get the weth contract.
state.weth = IEtherToken(_getWethAddress());
// Convert from WETH to a token.
if (fromTokenAddress == address(state.weth)) {
// Unwrap the WETH.
state.weth.withdraw(state.fromTokenBalance);
// Buy as much of `toTokenAddress` token with ETH as possible and
// transfer it to `to`.
state.boughtAmount = state.exchange.ethToTokenTransferInput.value(state.fromTokenBalance)(
// Minimum buy amount.
amount,
// Expires after this block.
block.timestamp,
// Recipient is `to`.
to
);
// Convert from a token to WETH.
} else if (toTokenAddress == address(state.weth)) {
// Grant the exchange an allowance.
_grantExchangeAllowance(state.exchange, fromTokenAddress, state.fromTokenBalance);
// Buy as much ETH with `fromTokenAddress` token as possible.
state.boughtAmount = state.exchange.tokenToEthSwapInput(
// Sell all tokens we hold.
state.fromTokenBalance,
// Minimum buy amount.
amount,
// Expires after this block.
block.timestamp
);
// Wrap the ETH.
state.weth.deposit.value(state.boughtAmount)();
// Transfer the WETH to `to`.
IEtherToken(toTokenAddress).transfer(to, state.boughtAmount);
// Convert from one token to another.
} else {
// Grant the exchange an allowance.
_grantExchangeAllowance(state.exchange, fromTokenAddress, state.fromTokenBalance);
// Buy as much `toTokenAddress` token with `fromTokenAddress` token
// and transfer it to `to`.
state.boughtAmount = state.exchange.tokenToTokenTransferInput(
// Sell all tokens we hold.
state.fromTokenBalance,
// Minimum buy amount.
amount,
// Must buy at least 1 intermediate ETH.
1,
// Expires after this block.
block.timestamp,
// Recipient is `to`.
to,
// Convert to `toTokenAddress`.
toTokenAddress
);
}
emit ERC20BridgeTransfer(
fromTokenAddress,
toTokenAddress,
state.fromTokenBalance,
state.boughtAmount,
from,
to
);
return BRIDGE_SUCCESS;
}
/// @dev `SignatureType.Wallet` callback, so that this bridge can be the maker
/// and sign for itself in orders. Always succeeds.
/// @return magicValue Success bytes, always.
function isValidSignature(
bytes32,
bytes calldata
)
external
view
returns (bytes4 magicValue)
{
return LEGACY_WALLET_MAGIC_VALUE;
}
/// @dev Grants an unlimited allowance to the exchange for its token
/// on behalf of this contract.
/// @param exchange The Uniswap token exchange.
/// @param tokenAddress The token address for the exchange.
/// @param minimumAllowance The minimum necessary allowance.
function _grantExchangeAllowance(
IUniswapExchange exchange,
address tokenAddress,
uint256 minimumAllowance
)
private
{
LibERC20Token.approveIfBelow(
tokenAddress,
address(exchange),
minimumAllowance
);
}
/// @dev Retrieves the uniswap exchange for a given token pair.
/// In the case of a WETH-token exchange, this will be the non-WETH token.
/// In th ecase of a token-token exchange, this will be the first token.
/// @param fromTokenAddress The address of the token we are converting from.
/// @param toTokenAddress The address of the token we are converting to.
/// @return exchange The uniswap exchange.
function _getUniswapExchangeForTokenPair(
address fromTokenAddress,
address toTokenAddress
)
private
view
returns (IUniswapExchange exchange)
{
address exchangeTokenAddress = fromTokenAddress;
// Whichever isn't WETH is the exchange token.
if (fromTokenAddress == _getWethAddress()) {
exchangeTokenAddress = toTokenAddress;
}
exchange = IUniswapExchange(
IUniswapExchangeFactory(_getUniswapExchangeFactoryAddress())
.getExchange(exchangeTokenAddress)
);
require(address(exchange) != address(0), "NO_UNISWAP_EXCHANGE_FOR_TOKEN");
return exchange;
}
}

View File

@@ -0,0 +1,135 @@
/*
Copyright 2020 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-erc20/contracts/src/interfaces/IEtherToken.sol";
import "@0x/contracts-erc20/contracts/src/LibERC20Token.sol";
import "@0x/contracts-exchange-libs/contracts/src/IWallet.sol";
import "@0x/contracts-utils/contracts/src/LibAddressArray.sol";
import "@0x/contracts-utils/contracts/src/DeploymentConstants.sol";
import "../interfaces/IUniswapV2Router01.sol";
import "../interfaces/IERC20Bridge.sol";
// solhint-disable space-after-comma
// solhint-disable not-rely-on-time
contract UniswapV2Bridge is
IERC20Bridge,
IWallet,
DeploymentConstants
{
struct TransferState {
address[] path;
uint256 fromTokenBalance;
}
/// @dev Callback for `IERC20Bridge`. Tries to buy `amount` of
/// `toTokenAddress` tokens by selling the entirety of the `fromTokenAddress`
/// token encoded in the bridge data.
/// @param toTokenAddress The token to buy and transfer to `to`.
/// @param from The maker (this contract).
/// @param to The recipient of the bought tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to buy.
/// @param bridgeData The abi-encoded path of token addresses. Last element must be toTokenAddress
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address toTokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
returns (bytes4 success)
{
// hold variables to get around stack depth limitations
TransferState memory state;
// Decode the bridge data to get the `fromTokenAddress`.
// solhint-disable indent
state.path = abi.decode(bridgeData, (address[]));
// solhint-enable indent
require(state.path.length >= 2, "UniswapV2Bridge/PATH_LENGTH_MUST_BE_AT_LEAST_TWO");
require(state.path[state.path.length - 1] == toTokenAddress, "UniswapV2Bridge/LAST_ELEMENT_OF_PATH_MUST_MATCH_OUTPUT_TOKEN");
// Just transfer the tokens if they're the same.
if (state.path[0] == toTokenAddress) {
LibERC20Token.transfer(state.path[0], to, amount);
return BRIDGE_SUCCESS;
}
// Get our balance of `fromTokenAddress` token.
state.fromTokenBalance = IERC20Token(state.path[0]).balanceOf(address(this));
// Grant the Uniswap router an allowance.
LibERC20Token.approveIfBelow(
state.path[0],
_getUniswapV2Router01Address(),
state.fromTokenBalance
);
// Buy as much `toTokenAddress` token with `fromTokenAddress` token
// and transfer it to `to`.
IUniswapV2Router01 router = IUniswapV2Router01(_getUniswapV2Router01Address());
uint[] memory amounts = router.swapExactTokensForTokens(
// Sell all tokens we hold.
state.fromTokenBalance,
// Minimum buy amount.
amount,
// Convert `fromTokenAddress` to `toTokenAddress`.
state.path,
// Recipient is `to`.
to,
// Expires after this block.
block.timestamp
);
emit ERC20BridgeTransfer(
// input token
state.path[0],
// output token
toTokenAddress,
// input token amount
state.fromTokenBalance,
// output token amount
amounts[amounts.length - 1],
from,
to
);
return BRIDGE_SUCCESS;
}
/// @dev `SignatureType.Wallet` callback, so that this bridge can be the maker
/// and sign for itself in orders. Always succeeds.
/// @return magicValue Success bytes, always.
function isValidSignature(
bytes32,
bytes calldata
)
external
view
returns (bytes4 magicValue)
{
return LEGACY_WALLET_MAGIC_VALUE;
}
}

View File

@@ -0,0 +1,88 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// solhint-disable
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
// @dev Interface of the asset proxy's assetData.
// The asset proxies take an ABI encoded `bytes assetData` as argument.
// This argument is ABI encoded as one of the methods of this interface.
interface IAssetData {
/// @dev Function signature for encoding ERC20 assetData.
/// @param tokenAddress Address of ERC20Token contract.
function ERC20Token(address tokenAddress)
external;
/// @dev Function signature for encoding ERC721 assetData.
/// @param tokenAddress Address of ERC721 token contract.
/// @param tokenId Id of ERC721 token to be transferred.
function ERC721Token(
address tokenAddress,
uint256 tokenId
)
external;
/// @dev Function signature for encoding ERC1155 assetData.
/// @param tokenAddress Address of ERC1155 token contract.
/// @param tokenIds Array of ids of tokens to be transferred.
/// @param values Array of values that correspond to each token id to be transferred.
/// Note that each value will be multiplied by the amount being filled in the order before transferring.
/// @param callbackData Extra data to be passed to receiver's `onERC1155Received` callback function.
function ERC1155Assets(
address tokenAddress,
uint256[] calldata tokenIds,
uint256[] calldata values,
bytes calldata callbackData
)
external;
/// @dev Function signature for encoding MultiAsset assetData.
/// @param values Array of amounts that correspond to each asset to be transferred.
/// Note that each value will be multiplied by the amount being filled in the order before transferring.
/// @param nestedAssetData Array of assetData fields that will be be dispatched to their correspnding AssetProxy contract.
function MultiAsset(
uint256[] calldata values,
bytes[] calldata nestedAssetData
)
external;
/// @dev Function signature for encoding StaticCall assetData.
/// @param staticCallTargetAddress Address that will execute the staticcall.
/// @param staticCallData Data that will be executed via staticcall on the staticCallTargetAddress.
/// @param expectedReturnDataHash Keccak-256 hash of the expected staticcall return data.
function StaticCall(
address staticCallTargetAddress,
bytes calldata staticCallData,
bytes32 expectedReturnDataHash
)
external;
/// @dev Function signature for encoding ERC20Bridge assetData.
/// @param tokenAddress Address of token to transfer.
/// @param bridgeAddress Address of the bridge contract.
/// @param bridgeData Arbitrary data to be passed to the bridge contract.
function ERC20Bridge(
address tokenAddress,
address bridgeAddress,
bytes calldata bridgeData
)
external;
}

View File

@@ -0,0 +1,43 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
contract IAssetProxy {
/// @dev Transfers assets. Either succeeds or throws.
/// @param assetData Byte array encoded for the respective asset proxy.
/// @param from Address to transfer asset from.
/// @param to Address to transfer asset to.
/// @param amount Amount of asset to transfer.
function transferFrom(
bytes calldata assetData,
address from,
address to,
uint256 amount
)
external;
/// @dev Gets the proxy id associated with the proxy address.
/// @return Proxy id.
function getProxyId()
external
pure
returns (bytes4);
}

View File

@@ -0,0 +1,43 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
contract IAssetProxyDispatcher {
// Logs registration of new asset proxy
event AssetProxyRegistered(
bytes4 id, // Id of new registered AssetProxy.
address assetProxy // Address of new registered AssetProxy.
);
/// @dev Registers an asset proxy to its asset proxy id.
/// Once an asset proxy is registered, it cannot be unregistered.
/// @param assetProxy Address of new asset proxy to register.
function registerAssetProxy(address assetProxy)
external;
/// @dev Gets an asset proxy.
/// @param assetProxyId Id of the asset proxy.
/// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered.
function getAssetProxy(bytes4 assetProxyId)
external
view
returns (address);
}

View File

@@ -0,0 +1,64 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "@0x/contracts-utils/contracts/src/interfaces/IOwnable.sol";
contract IAuthorizable is
IOwnable
{
// Event logged when a new address is authorized.
event AuthorizedAddressAdded(
address indexed target,
address indexed caller
);
// Event logged when a currently authorized address is unauthorized.
event AuthorizedAddressRemoved(
address indexed target,
address indexed caller
);
/// @dev Authorizes an address.
/// @param target Address to authorize.
function addAuthorizedAddress(address target)
external;
/// @dev Removes authorizion of an address.
/// @param target Address to remove authorization from.
function removeAuthorizedAddress(address target)
external;
/// @dev Removes authorizion of an address.
/// @param target Address to remove authorization from.
/// @param index Index of target in authorities array.
function removeAuthorizedAddressAtIndex(
address target,
uint256 index
)
external;
/// @dev Gets all authorized addresses.
/// @return Array of authorized addresses.
function getAuthorizedAddresses()
external
view
returns (address[] memory);
}

View File

@@ -0,0 +1,39 @@
/*
Copyright 2020 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
interface IBalancerPool {
/// @dev Sell `tokenAmountIn` of `tokenIn` and receive `tokenOut`.
/// @param tokenIn The token being sold
/// @param tokenAmountIn The amount of `tokenIn` to sell.
/// @param tokenOut The token being bought.
/// @param minAmountOut The minimum amount of `tokenOut` to buy.
/// @param maxPrice The maximum value for `spotPriceAfter`.
/// @return tokenAmountOut The amount of `tokenOut` bought.
/// @return spotPriceAfter The new marginal spot price of the given
/// token pair for this pool.
function swapExactAmountIn(
address tokenIn,
uint tokenAmountIn,
address tokenOut,
uint minAmountOut,
uint maxPrice
) external returns (uint tokenAmountOut, uint spotPriceAfter);
}

View File

@@ -0,0 +1,66 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
contract PotLike {
function chi() external returns (uint256);
function rho() external returns (uint256);
function drip() external returns (uint256);
function join(uint256) external;
function exit(uint256) external;
}
// The actual Chai contract can be found here: https://github.com/dapphub/chai
contract IChai is
IERC20Token
{
/// @dev Withdraws Dai owned by `src`
/// @param src Address that owns Dai.
/// @param wad Amount of Dai to withdraw.
function draw(
address src,
uint256 wad
)
external;
/// @dev Queries Dai balance of Chai holder.
/// @param usr Address of Chai holder.
/// @return Dai balance.
function dai(address usr)
external
returns (uint256);
/// @dev Queries the Pot contract used by the Chai contract.
function pot()
external
returns (PotLike);
/// @dev Deposits Dai in exchange for Chai
/// @param dst Address to receive Chai.
/// @param wad Amount of Dai to deposit.
function join(
address dst,
uint256 wad
)
external;
}

View File

@@ -0,0 +1,86 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
// solhint-disable func-name-mixedcase
interface ICurve {
/// @dev Sell `sellAmount` of `fromToken` token and receive `toToken` token.
/// This function exists on early versions of Curve (USDC/DAI)
/// @param i The token index being sold.
/// @param j The token index being bought.
/// @param sellAmount The amount of token being bought.
/// @param minBuyAmount The minimum buy amount of the token being bought.
/// @param deadline The time in seconds when this operation should expire.
function exchange_underlying(
int128 i,
int128 j,
uint256 sellAmount,
uint256 minBuyAmount,
uint256 deadline
)
external;
/// @dev Sell `sellAmount` of `fromToken` token and receive `toToken` token.
/// This function exists on later versions of Curve (USDC/DAI/USDT)
/// @param i The token index being sold.
/// @param j The token index being bought.
/// @param sellAmount The amount of token being bought.
/// @param minBuyAmount The minimum buy amount of the token being bought.
function exchange_underlying(
int128 i,
int128 j,
uint256 sellAmount,
uint256 minBuyAmount
)
external;
/// @dev Get the amount of `toToken` by selling `sellAmount` of `fromToken`
/// @param i The token index being sold.
/// @param j The token index being bought.
/// @param sellAmount The amount of token being bought.
function get_dy_underlying(
int128 i,
int128 j,
uint256 sellAmount
)
external
returns (uint256 dy);
/// @dev Get the amount of `fromToken` by buying `buyAmount` of `toToken`
/// @param i The token index being sold.
/// @param j The token index being bought.
/// @param buyAmount The amount of token being bought.
function get_dx_underlying(
int128 i,
int128 j,
uint256 buyAmount
)
external
returns (uint256 dx);
/// @dev Get the underlying token address from the token index
/// @param i The token index.
function underlying_coins(
int128 i
)
external
returns (address tokenAddress);
}

View File

@@ -0,0 +1,192 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
interface IDydx {
/// @dev Represents the unique key that specifies an account
struct AccountInfo {
address owner; // The address that owns the account
uint256 number; // A nonce that allows a single address to control many accounts
}
enum ActionType {
Deposit, // supply tokens
Withdraw, // borrow tokens
Transfer, // transfer balance between accounts
Buy, // buy an amount of some token (externally)
Sell, // sell an amount of some token (externally)
Trade, // trade tokens against another account
Liquidate, // liquidate an undercollateralized or expiring account
Vaporize, // use excess tokens to zero-out a completely negative account
Call // send arbitrary data to an address
}
/// @dev Arguments that are passed to Solo in an ordered list as part of a single operation.
/// Each ActionArgs has an actionType which specifies which action struct that this data will be
/// parsed into before being processed.
struct ActionArgs {
ActionType actionType;
uint256 accountIdx;
AssetAmount amount;
uint256 primaryMarketId;
uint256 secondaryMarketId;
address otherAddress;
uint256 otherAccountIdx;
bytes data;
}
enum AssetDenomination {
Wei, // the amount is denominated in wei
Par // the amount is denominated in par
}
enum AssetReference {
Delta, // the amount is given as a delta from the current value
Target // the amount is given as an exact number to end up at
}
struct AssetAmount {
bool sign; // true if positive
AssetDenomination denomination;
AssetReference ref;
uint256 value;
}
struct D256 {
uint256 value;
}
struct Value {
uint256 value;
}
struct Price {
uint256 value;
}
struct OperatorArg {
address operator;
bool trusted;
}
/// @dev The global risk parameters that govern the health and security of the system
struct RiskParams {
// Required ratio of over-collateralization
D256 marginRatio;
// Percentage penalty incurred by liquidated accounts
D256 liquidationSpread;
// Percentage of the borrower's interest fee that gets passed to the suppliers
D256 earningsRate;
// The minimum absolute borrow value of an account
// There must be sufficient incentivize to liquidate undercollateralized accounts
Value minBorrowedValue;
}
/// @dev The main entry-point to Solo that allows users and contracts to manage accounts.
/// Take one or more actions on one or more accounts. The msg.sender must be the owner or
/// operator of all accounts except for those being liquidated, vaporized, or traded with.
/// One call to operate() is considered a singular "operation". Account collateralization is
/// ensured only after the completion of the entire operation.
/// @param accounts A list of all accounts that will be used in this operation. Cannot contain
/// duplicates. In each action, the relevant account will be referred-to by its
/// index in the list.
/// @param actions An ordered list of all actions that will be taken in this operation. The
/// actions will be processed in order.
function operate(
AccountInfo[] calldata accounts,
ActionArgs[] calldata actions
)
external;
// @dev Approves/disapproves any number of operators. An operator is an external address that has the
// same permissions to manipulate an account as the owner of the account. Operators are simply
// addresses and therefore may either be externally-owned Ethereum accounts OR smart contracts.
// Operators are also able to act as AutoTrader contracts on behalf of the account owner if the
// operator is a smart contract and implements the IAutoTrader interface.
// @param args A list of OperatorArgs which have an address and a boolean. The boolean value
// denotes whether to approve (true) or revoke approval (false) for that address.
function setOperators(OperatorArg[] calldata args) external;
/// @dev Return true if a particular address is approved as an operator for an owner's accounts.
/// Approved operators can act on the accounts of the owner as if it were the operator's own.
/// @param owner The owner of the accounts
/// @param operator The possible operator
/// @return isLocalOperator True if operator is approved for owner's accounts
function getIsLocalOperator(
address owner,
address operator
)
external
view
returns (bool isLocalOperator);
/// @dev Get the ERC20 token address for a market.
/// @param marketId The market to query
/// @return tokenAddress The token address
function getMarketTokenAddress(
uint256 marketId
)
external
view
returns (address tokenAddress);
/// @dev Get all risk parameters in a single struct.
/// @return riskParams All global risk parameters
function getRiskParams()
external
view
returns (RiskParams memory riskParams);
/// @dev Get the price of the token for a market.
/// @param marketId The market to query
/// @return price The price of each atomic unit of the token
function getMarketPrice(
uint256 marketId
)
external
view
returns (Price memory price);
/// @dev Get the margin premium for a market. A margin premium makes it so that any positions that
/// include the market require a higher collateralization to avoid being liquidated.
/// @param marketId The market to query
/// @return premium The market's margin premium
function getMarketMarginPremium(uint256 marketId)
external
view
returns (D256 memory premium);
/// @dev Get the total supplied and total borrowed values of an account adjusted by the marginPremium
/// of each market. Supplied values are divided by (1 + marginPremium) for each market and
/// borrowed values are multiplied by (1 + marginPremium) for each market. Comparing these
/// adjusted values gives the margin-ratio of the account which will be compared to the global
/// margin-ratio when determining if the account can be liquidated.
/// @param account The account to query
/// @return supplyValue The supplied value of the account (adjusted for marginPremium)
/// @return borrowValue The borrowed value of the account (adjusted for marginPremium)
function getAdjustedAccountValues(
AccountInfo calldata account
)
external
view
returns (Value memory supplyValue, Value memory borrowValue);
}

View File

@@ -0,0 +1,42 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
interface IDydxBridge {
/// @dev This is the subset of `IDydx.ActionType` that are supported by the bridge.
enum BridgeActionType {
Deposit, // Deposit tokens into dydx account.
Withdraw // Withdraw tokens from dydx account.
}
struct BridgeAction {
BridgeActionType actionType; // Action to run on dydx account.
uint256 accountIdx; // Index in `BridgeData.accountNumbers` for this action.
uint256 marketId; // Market to operate on.
uint256 conversionRateNumerator; // Optional. If set, transfer amount is scaled by (conversionRateNumerator/conversionRateDenominator).
uint256 conversionRateDenominator; // Optional. If set, transfer amount is scaled by (conversionRateNumerator/conversionRateDenominator).
}
struct BridgeData {
uint256[] accountNumbers; // Account number used to identify the owner's specific account.
BridgeAction[] actions; // Actions to carry out on the owner's accounts.
}
}

View File

@@ -0,0 +1,59 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
contract IERC20Bridge {
/// @dev Result of a successful bridge call.
bytes4 constant internal BRIDGE_SUCCESS = 0xdc1600f3;
/// @dev Emitted when a trade occurs.
/// @param inputToken The token the bridge is converting from.
/// @param outputToken The token the bridge is converting to.
/// @param inputTokenAmount Amount of input token.
/// @param outputTokenAmount Amount of output token.
/// @param from The `from` address in `bridgeTransferFrom()`
/// @param to The `to` address in `bridgeTransferFrom()`
event ERC20BridgeTransfer(
address inputToken,
address outputToken,
uint256 inputTokenAmount,
uint256 outputTokenAmount,
address from,
address to
);
/// @dev Transfers `amount` of the ERC20 `tokenAddress` from `from` to `to`.
/// @param tokenAddress The address of the ERC20 token to transfer.
/// @param from Address to transfer asset from.
/// @param to Address to transfer asset to.
/// @param amount Amount of asset to transfer.
/// @param bridgeData Arbitrary asset data needed by the bridge contract.
/// @return success The magic bytes `0xdc1600f3` if successful.
function bridgeTransferFrom(
address tokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
returns (bytes4 success);
}

View File

@@ -0,0 +1,38 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
interface IEth2Dai {
/// @dev Sell `sellAmount` of `fromToken` token and receive `toToken` token.
/// @param fromToken The token being sold.
/// @param sellAmount The amount of `fromToken` token being sold.
/// @param toToken The token being bought.
/// @param minFillAmount Minimum amount of `toToken` token to buy.
/// @return fillAmount Amount of `toToken` bought.
function sellAllAmount(
address fromToken,
uint256 sellAmount,
address toToken,
uint256 minFillAmount
)
external
returns (uint256 fillAmount);
}

View File

@@ -0,0 +1,40 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.15;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
contract IGasToken is IERC20Token {
/// @dev Frees up to `value` sub-tokens
/// @param value The amount of tokens to free
/// @return How many tokens were freed
function freeUpTo(uint256 value) external returns (uint256 freed);
/// @dev Frees up to `value` sub-tokens owned by `from`
/// @param from The owner of tokens to spend
/// @param value The amount of tokens to free
/// @return How many tokens were freed
function freeFromUpTo(address from, uint256 value) external returns (uint256 freed);
/// @dev Mints `value` amount of tokens
/// @param value The amount of tokens to mint
function mint(uint256 value) external;
}

View File

@@ -0,0 +1,46 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
interface IKyberNetworkProxy {
/// @dev Sells `sellTokenAddress` tokens for `buyTokenAddress` tokens.
/// @param sellTokenAddress Token to sell.
/// @param sellAmount Amount of tokens to sell.
/// @param buyTokenAddress Token to buy.
/// @param recipientAddress Address to send bought tokens to.
/// @param maxBuyTokenAmount A limit on the amount of tokens to buy.
/// @param minConversionRate The minimal conversion rate. If actual rate
/// is lower, trade is canceled.
/// @param walletId The wallet ID to send part of the fees
/// @return boughtAmount Amount of tokens bought.
function trade(
address sellTokenAddress,
uint256 sellAmount,
address buyTokenAddress,
address payable recipientAddress,
uint256 maxBuyTokenAmount,
uint256 minConversionRate,
address walletId
)
external
payable
returns(uint256 boughtAmount);
}

View File

@@ -0,0 +1,70 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
interface IUniswapExchange {
/// @dev Buys at least `minTokensBought` tokens with ETH and transfer them
/// to `recipient`.
/// @param minTokensBought The minimum number of tokens to buy.
/// @param deadline Time when this order expires.
/// @param recipient Who to transfer the tokens to.
/// @return tokensBought Amount of tokens bought.
function ethToTokenTransferInput(
uint256 minTokensBought,
uint256 deadline,
address recipient
)
external
payable
returns (uint256 tokensBought);
/// @dev Buys at least `minEthBought` ETH with tokens.
/// @param tokensSold Amount of tokens to sell.
/// @param minEthBought The minimum amount of ETH to buy.
/// @param deadline Time when this order expires.
/// @return ethBought Amount of tokens bought.
function tokenToEthSwapInput(
uint256 tokensSold,
uint256 minEthBought,
uint256 deadline
)
external
returns (uint256 ethBought);
/// @dev Buys at least `minTokensBought` tokens with the exchange token
/// and transfer them to `recipient`.
/// @param minTokensBought The minimum number of tokens to buy.
/// @param minEthBought The minimum amount of intermediate ETH to buy.
/// @param deadline Time when this order expires.
/// @param recipient Who to transfer the tokens to.
/// @param toTokenAddress The token being bought.
/// @return tokensBought Amount of tokens bought.
function tokenToTokenTransferInput(
uint256 tokensSold,
uint256 minTokensBought,
uint256 minEthBought,
uint256 deadline,
address recipient,
address toTokenAddress
)
external
returns (uint256 tokensBought);
}

View File

@@ -0,0 +1,32 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "./IUniswapExchange.sol";
interface IUniswapExchangeFactory {
/// @dev Get the exchange for a token.
/// @param tokenAddress The address of the token contract.
function getExchange(address tokenAddress)
external
view
returns (address);
}

View File

@@ -0,0 +1,40 @@
/*
Copyright 2020 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
interface IUniswapV2Router01 {
/// @dev Swaps an exact amount of input tokens for as many output tokens as possible, along the route determined by the path.
/// The first element of path is the input token, the last is the output token, and any intermediate elements represent
/// intermediate pairs to trade through (if, for example, a direct pair does not exist).
/// @param amountIn The amount of input tokens to send.
/// @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.
/// @param path An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
/// @param to Recipient of the output tokens.
/// @param deadline Unix timestamp after which the transaction will revert.
/// @return amounts The input token amount and all subsequent output token amounts.
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}

View File

@@ -0,0 +1,80 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "../src/bridges/ChaiBridge.sol";
import "@0x/contracts-erc20/contracts/src/ERC20Token.sol";
contract TestChaiDai is
ERC20Token
{
address private constant ALWAYS_REVERT_ADDRESS = address(1);
function draw(
address from,
uint256 amount
)
external
{
if (from == ALWAYS_REVERT_ADDRESS) {
revert();
}
balances[msg.sender] += amount;
}
}
contract TestChaiBridge is
ChaiBridge
{
address public testChaiDai;
address private constant ALWAYS_REVERT_ADDRESS = address(1);
constructor()
public
{
testChaiDai = address(new TestChaiDai());
}
function _getDaiAddress()
internal
view
returns (address)
{
return testChaiDai;
}
function _getChaiAddress()
internal
view
returns (address)
{
return testChaiDai;
}
function _getERC20BridgeProxyAddress()
internal
view
returns (address)
{
return msg.sender == ALWAYS_REVERT_ADDRESS ? address(0) : msg.sender;
}
}

View File

@@ -0,0 +1,244 @@
/*
Copyright 2020 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "../src/bridges/DexForwarderBridge.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
interface ITestDexForwarderBridge {
event BridgeTransferFromCalled(
address caller,
uint256 inputTokenBalance,
address inputToken,
address outputToken,
address from,
address to,
uint256 amount
);
event TokenTransferCalled(
address from,
address to,
uint256 amount
);
function emitBridgeTransferFromCalled(
address caller,
uint256 inputTokenBalance,
address inputToken,
address outputToken,
address from,
address to,
uint256 amount
) external;
function emitTokenTransferCalled(
address from,
address to,
uint256 amount
) external;
}
interface ITestDexForwarderBridgeTestToken {
function transfer(address to, uint256 amount)
external
returns (bool);
function mint(address to, uint256 amount)
external;
function balanceOf(address owner) external view returns (uint256);
}
contract TestDexForwarderBridgeTestBridge {
bytes4 private _returnCode;
string private _revertError;
uint256 private _transferAmount;
ITestDexForwarderBridge private _testContract;
constructor(bytes4 returnCode, string memory revertError) public {
_testContract = ITestDexForwarderBridge(msg.sender);
_returnCode = returnCode;
_revertError = revertError;
}
function setTransferAmount(uint256 amount) external {
_transferAmount = amount;
}
function bridgeTransferFrom(
address outputToken,
address from,
address to,
uint256 amount,
bytes memory bridgeData
)
public
returns (bytes4 success)
{
if (bytes(_revertError).length != 0) {
revert(_revertError);
}
address inputToken = abi.decode(bridgeData, (address));
_testContract.emitBridgeTransferFromCalled(
msg.sender,
ITestDexForwarderBridgeTestToken(inputToken).balanceOf(address(this)),
inputToken,
outputToken,
from,
to,
amount
);
ITestDexForwarderBridgeTestToken(outputToken).mint(to, _transferAmount);
return _returnCode;
}
}
contract TestDexForwarderBridgeTestToken {
using LibSafeMath for uint256;
mapping(address => uint256) public balanceOf;
ITestDexForwarderBridge private _testContract;
constructor() public {
_testContract = ITestDexForwarderBridge(msg.sender);
}
function transfer(address to, uint256 amount)
external
returns (bool)
{
balanceOf[msg.sender] = balanceOf[msg.sender].safeSub(amount);
balanceOf[to] = balanceOf[to].safeAdd(amount);
_testContract.emitTokenTransferCalled(msg.sender, to, amount);
return true;
}
function mint(address owner, uint256 amount)
external
{
balanceOf[owner] = balanceOf[owner].safeAdd(amount);
}
function setBalance(address owner, uint256 amount)
external
{
balanceOf[owner] = amount;
}
}
contract TestDexForwarderBridge is
ITestDexForwarderBridge,
DexForwarderBridge
{
address private AUTHORIZED_ADDRESS; // solhint-disable-line var-name-mixedcase
function setAuthorized(address authorized)
public
{
AUTHORIZED_ADDRESS = authorized;
}
function createBridge(
bytes4 returnCode,
string memory revertError
)
public
returns (address bridge)
{
return address(new TestDexForwarderBridgeTestBridge(returnCode, revertError));
}
function createToken() public returns (address token) {
return address(new TestDexForwarderBridgeTestToken());
}
function setTokenBalance(address token, address owner, uint256 amount) public {
TestDexForwarderBridgeTestToken(token).setBalance(owner, amount);
}
function setBridgeTransferAmount(address bridge, uint256 amount) public {
TestDexForwarderBridgeTestBridge(bridge).setTransferAmount(amount);
}
function emitBridgeTransferFromCalled(
address caller,
uint256 inputTokenBalance,
address inputToken,
address outputToken,
address from,
address to,
uint256 amount
)
public
{
emit BridgeTransferFromCalled(
caller,
inputTokenBalance,
inputToken,
outputToken,
from,
to,
amount
);
}
function emitTokenTransferCalled(
address from,
address to,
uint256 amount
)
public
{
emit TokenTransferCalled(
from,
to,
amount
);
}
function balanceOf(address token, address owner) public view returns (uint256) {
return TestDexForwarderBridgeTestToken(token).balanceOf(owner);
}
function _getGstAddress()
internal
view
returns (address gst)
{
return address(0);
}
function _getERC20BridgeProxyAddress()
internal
view
returns (address erc20BridgeProxyAddress)
{
return AUTHORIZED_ADDRESS;
}
}

View File

@@ -0,0 +1,246 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "../src/bridges/DydxBridge.sol";
// solhint-disable no-empty-blocks
contract TestDydxBridgeToken {
uint256 private constant INIT_HOLDER_BALANCE = 10 * 10**18; // 10 tokens
mapping (address => uint256) private _balances;
/// @dev Sets initial balance of token holders.
constructor(address[] memory holders)
public
{
for (uint256 i = 0; i != holders.length; ++i) {
_balances[holders[i]] = INIT_HOLDER_BALANCE;
}
_balances[msg.sender] = INIT_HOLDER_BALANCE;
}
/// @dev Basic transferFrom implementation.
function transferFrom(address from, address to, uint256 amount)
external
returns (bool)
{
if (_balances[from] < amount || _balances[to] + amount < _balances[to]) {
return false;
}
_balances[from] -= amount;
_balances[to] += amount;
return true;
}
/// @dev Returns balance of `holder`.
function balanceOf(address holder)
external
view
returns (uint256)
{
return _balances[holder];
}
}
// solhint-disable space-after-comma
contract TestDydxBridge is
IDydx,
DydxBridge
{
address private constant ALWAYS_REVERT_ADDRESS = address(1);
address private _testTokenAddress;
bool private _shouldRevertOnOperate;
event OperateAccount(
address owner,
uint256 number
);
event OperateAction(
ActionType actionType,
uint256 accountIdx,
bool amountSign,
AssetDenomination amountDenomination,
AssetReference amountRef,
uint256 amountValue,
uint256 primaryMarketId,
uint256 secondaryMarketId,
address otherAddress,
uint256 otherAccountId,
bytes data
);
constructor(address[] memory holders)
public
{
// Deploy a test token. This represents the asset being deposited/withdrawn from dydx.
_testTokenAddress = address(new TestDydxBridgeToken(holders));
}
/// @dev Simulates `operate` in dydx contract.
/// Emits events so that arguments can be validated client-side.
function operate(
AccountInfo[] calldata accounts,
ActionArgs[] calldata actions
)
external
{
if (_shouldRevertOnOperate) {
revert("TestDydxBridge/SHOULD_REVERT_ON_OPERATE");
}
for (uint i = 0; i < accounts.length; ++i) {
emit OperateAccount(
accounts[i].owner,
accounts[i].number
);
}
for (uint i = 0; i < actions.length; ++i) {
emit OperateAction(
actions[i].actionType,
actions[i].accountIdx,
actions[i].amount.sign,
actions[i].amount.denomination,
actions[i].amount.ref,
actions[i].amount.value,
actions[i].primaryMarketId,
actions[i].secondaryMarketId,
actions[i].otherAddress,
actions[i].otherAccountIdx,
actions[i].data
);
if (actions[i].actionType == IDydx.ActionType.Withdraw) {
require(
IERC20Token(_testTokenAddress).transferFrom(
address(this),
actions[i].otherAddress,
actions[i].amount.value
),
"TestDydxBridge/WITHDRAW_FAILED"
);
} else if (actions[i].actionType == IDydx.ActionType.Deposit) {
require(
IERC20Token(_testTokenAddress).transferFrom(
actions[i].otherAddress,
address(this),
actions[i].amount.value
),
"TestDydxBridge/DEPOSIT_FAILED"
);
} else {
revert("TestDydxBridge/UNSUPPORTED_ACTION");
}
}
}
/// @dev If `true` then subsequent calls to `operate` will revert.
function setRevertOnOperate(bool shouldRevert)
external
{
_shouldRevertOnOperate = shouldRevert;
}
/// @dev Returns test token.
function getTestToken()
external
returns (address)
{
return _testTokenAddress;
}
/// @dev Unused.
function setOperators(OperatorArg[] calldata args) external {}
/// @dev Unused.
function getIsLocalOperator(
address owner,
address operator
)
external
view
returns (bool isLocalOperator)
{}
/// @dev Unused.
function getMarketTokenAddress(
uint256 marketId
)
external
view
returns (address tokenAddress)
{}
/// @dev Unused.
function getRiskParams()
external
view
returns (RiskParams memory riskParams)
{}
/// @dev Unsused.
function getMarketPrice(
uint256 marketId
)
external
view
returns (Price memory price)
{}
/// @dev Unsused
function getMarketMarginPremium(uint256 marketId)
external
view
returns (IDydx.D256 memory premium)
{}
/// @dev Unused.
function getAdjustedAccountValues(
AccountInfo calldata account
)
external
view
returns (Value memory supplyValue, Value memory borrowValue)
{}
/// @dev overrides `_getDydxAddress()` from `DeploymentConstants` to return this address.
function _getDydxAddress()
internal
view
returns (address)
{
return address(this);
}
/// @dev overrides `_getERC20BridgeProxyAddress()` from `DeploymentConstants` for testing.
function _getERC20BridgeProxyAddress()
internal
view
returns (address)
{
return msg.sender == ALWAYS_REVERT_ADDRESS ? address(0) : msg.sender;
}
}

View File

@@ -0,0 +1,108 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "../src/interfaces/IERC20Bridge.sol";
/// @dev Test bridge token
contract TestERC20BridgeToken {
mapping (address => uint256) private _balances;
function addBalance(address owner, int256 amount)
external
{
setBalance(owner, uint256(int256(balanceOf(owner)) + amount));
}
function setBalance(address owner, uint256 balance)
public
{
_balances[owner] = balance;
}
function balanceOf(address owner)
public
view
returns (uint256)
{
return _balances[owner];
}
}
/// @dev Test bridge contract.
contract TestERC20Bridge is
IERC20Bridge
{
TestERC20BridgeToken public testToken;
event BridgeWithdrawTo(
address tokenAddress,
address from,
address to,
uint256 amount,
bytes bridgeData
);
constructor() public {
testToken = new TestERC20BridgeToken();
}
function setTestTokenBalance(address owner, uint256 balance)
external
{
testToken.setBalance(owner, balance);
}
function bridgeTransferFrom(
address tokenAddress,
address from,
address to,
uint256 amount,
bytes calldata bridgeData
)
external
returns (bytes4)
{
emit BridgeWithdrawTo(
tokenAddress,
from,
to,
amount,
bridgeData
);
// Unpack the bridgeData.
(
int256 transferAmount,
bytes memory revertData,
bytes memory returnData
) = abi.decode(bridgeData, (int256, bytes, bytes));
// If `revertData` is set, revert.
if (revertData.length != 0) {
assembly { revert(add(revertData, 0x20), mload(revertData)) }
}
// Increase `to`'s balance by `transferAmount`.
TestERC20BridgeToken(tokenAddress).addBalance(to, transferAmount);
// Return `returnData`.
assembly { return(add(returnData, 0x20), mload(returnData)) }
}
}

View File

@@ -0,0 +1,206 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "../src/bridges/Eth2DaiBridge.sol";
import "../src/interfaces/IEth2Dai.sol";
// solhint-disable no-simple-event-func-name
contract TestEvents {
event TokenTransfer(
address token,
address from,
address to,
uint256 amount
);
event TokenApprove(
address token,
address spender,
uint256 allowance
);
function raiseTokenTransfer(
address from,
address to,
uint256 amount
)
external
{
emit TokenTransfer(
msg.sender,
from,
to,
amount
);
}
function raiseTokenApprove(address spender, uint256 allowance)
external
{
emit TokenApprove(msg.sender, spender, allowance);
}
}
/// @dev A minimalist ERC20 token.
contract TestToken {
mapping (address => uint256) public balances;
string private _nextTransferRevertReason;
bytes private _nextTransferReturnData;
/// @dev Just calls `raiseTokenTransfer()` on the caller.
function transfer(address to, uint256 amount)
external
returns (bool)
{
TestEvents(msg.sender).raiseTokenTransfer(msg.sender, to, amount);
if (bytes(_nextTransferRevertReason).length != 0) {
revert(_nextTransferRevertReason);
}
bytes memory returnData = _nextTransferReturnData;
assembly { return(add(returnData, 0x20), mload(returnData)) }
}
/// @dev Set the balance for `owner`.
function setBalance(address owner, uint256 balance)
external
{
balances[owner] = balance;
}
/// @dev Set the behavior of the `transfer()` call.
function setTransferBehavior(
string calldata revertReason,
bytes calldata returnData
)
external
{
_nextTransferRevertReason = revertReason;
_nextTransferReturnData = returnData;
}
/// @dev Just calls `raiseTokenApprove()` on the caller.
function approve(address spender, uint256 allowance)
external
returns (bool)
{
TestEvents(msg.sender).raiseTokenApprove(spender, allowance);
return true;
}
function allowance(address, address) external view returns (uint256) {
return 0;
}
/// @dev Retrieve the balance for `owner`.
function balanceOf(address owner)
external
view
returns (uint256)
{
return balances[owner];
}
}
/// @dev Eth2DaiBridge overridden to mock tokens and
/// implement IEth2Dai.
contract TestEth2DaiBridge is
TestEvents,
IEth2Dai,
Eth2DaiBridge
{
event SellAllAmount(
address sellToken,
uint256 sellTokenAmount,
address buyToken,
uint256 minimumFillAmount
);
mapping (address => TestToken) public testTokens;
string private _nextRevertReason;
uint256 private _nextFillAmount;
/// @dev Create a token and set this contract's balance.
function createToken(uint256 balance)
external
returns (address tokenAddress)
{
TestToken token = new TestToken();
testTokens[address(token)] = token;
token.setBalance(address(this), balance);
return address(token);
}
/// @dev Set the behavior for `IEth2Dai.sellAllAmount()`.
function setFillBehavior(string calldata revertReason, uint256 fillAmount)
external
{
_nextRevertReason = revertReason;
_nextFillAmount = fillAmount;
}
/// @dev Set the behavior of a token's `transfer()`.
function setTransferBehavior(
address tokenAddress,
string calldata revertReason,
bytes calldata returnData
)
external
{
testTokens[tokenAddress].setTransferBehavior(revertReason, returnData);
}
/// @dev Implementation of `IEth2Dai.sellAllAmount()`
function sellAllAmount(
address sellTokenAddress,
uint256 sellTokenAmount,
address buyTokenAddress,
uint256 minimumFillAmount
)
external
returns (uint256 fillAmount)
{
emit SellAllAmount(
sellTokenAddress,
sellTokenAmount,
buyTokenAddress,
minimumFillAmount
);
if (bytes(_nextRevertReason).length != 0) {
revert(_nextRevertReason);
}
return _nextFillAmount;
}
// @dev This contract will double as the Eth2Dai contract.
function _getEth2DaiAddress()
internal
view
returns (address)
{
return address(this);
}
}

View File

@@ -0,0 +1,328 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "../src/bridges/KyberBridge.sol";
import "../src/interfaces/IKyberNetworkProxy.sol";
// solhint-disable no-simple-event-func-name
interface ITestContract {
function wethWithdraw(
address payable ownerAddress,
uint256 amount
)
external;
function wethDeposit(
address ownerAddress
)
external
payable;
function tokenTransfer(
address ownerAddress,
address recipientAddress,
uint256 amount
)
external
returns (bool success);
function tokenApprove(
address ownerAddress,
address spenderAddress,
uint256 allowance
)
external
returns (bool success);
function tokenBalanceOf(
address ownerAddress
)
external
view
returns (uint256 balance);
}
/// @dev A minimalist ERC20/WETH token.
contract TestToken {
uint8 public decimals;
ITestContract private _testContract;
constructor(uint8 decimals_) public {
decimals = decimals_;
_testContract = ITestContract(msg.sender);
}
function approve(address spender, uint256 allowance)
external
returns (bool)
{
return _testContract.tokenApprove(
msg.sender,
spender,
allowance
);
}
function transfer(address recipient, uint256 amount)
external
returns (bool)
{
return _testContract.tokenTransfer(
msg.sender,
recipient,
amount
);
}
function withdraw(uint256 amount)
external
{
return _testContract.wethWithdraw(msg.sender, amount);
}
function deposit()
external
payable
{
return _testContract.wethDeposit.value(msg.value)(msg.sender);
}
function allowance(address, address) external view returns (uint256) {
return 0;
}
function balanceOf(address owner)
external
view
returns (uint256)
{
return _testContract.tokenBalanceOf(owner);
}
}
/// @dev KyberBridge overridden to mock tokens and implement IKyberBridge.
contract TestKyberBridge is
KyberBridge,
ITestContract,
IKyberNetworkProxy
{
event KyberBridgeTrade(
uint256 msgValue,
address sellTokenAddress,
uint256 sellAmount,
address buyTokenAddress,
address payable recipientAddress,
uint256 maxBuyTokenAmount,
uint256 minConversionRate,
address walletId
);
event KyberBridgeWethWithdraw(
address ownerAddress,
uint256 amount
);
event KyberBridgeWethDeposit(
uint256 msgValue,
address ownerAddress,
uint256 amount
);
event KyberBridgeTokenApprove(
address tokenAddress,
address ownerAddress,
address spenderAddress,
uint256 allowance
);
event KyberBridgeTokenTransfer(
address tokenAddress,
address ownerAddress,
address recipientAddress,
uint256 amount
);
IEtherToken public weth;
mapping (address => mapping (address => uint256)) private _tokenBalances;
uint256 private _nextFillAmount;
constructor() public {
weth = IEtherToken(address(new TestToken(18)));
}
/// @dev Implementation of `IKyberNetworkProxy.trade()`
function trade(
address sellTokenAddress,
uint256 sellAmount,
address buyTokenAddress,
address payable recipientAddress,
uint256 maxBuyTokenAmount,
uint256 minConversionRate,
address walletId
)
external
payable
returns(uint256 boughtAmount)
{
emit KyberBridgeTrade(
msg.value,
sellTokenAddress,
sellAmount,
buyTokenAddress,
recipientAddress,
maxBuyTokenAmount,
minConversionRate,
walletId
);
return _nextFillAmount;
}
function createToken(uint8 decimals)
external
returns (address tokenAddress)
{
return address(new TestToken(decimals));
}
function setNextFillAmount(uint256 amount)
external
payable
{
if (msg.value != 0) {
require(amount == msg.value, "VALUE_AMOUNT_MISMATCH");
grantTokensTo(address(weth), address(this), msg.value);
}
_nextFillAmount = amount;
}
function wethDeposit(
address ownerAddress
)
external
payable
{
require(msg.sender == address(weth), "ONLY_WETH");
grantTokensTo(address(weth), ownerAddress, msg.value);
emit KyberBridgeWethDeposit(
msg.value,
ownerAddress,
msg.value
);
}
function wethWithdraw(
address payable ownerAddress,
uint256 amount
)
external
{
require(msg.sender == address(weth), "ONLY_WETH");
_tokenBalances[address(weth)][ownerAddress] -= amount;
ownerAddress.transfer(amount);
emit KyberBridgeWethWithdraw(
ownerAddress,
amount
);
}
function tokenApprove(
address ownerAddress,
address spenderAddress,
uint256 allowance
)
external
returns (bool success)
{
emit KyberBridgeTokenApprove(
msg.sender,
ownerAddress,
spenderAddress,
allowance
);
return true;
}
function tokenTransfer(
address ownerAddress,
address recipientAddress,
uint256 amount
)
external
returns (bool success)
{
_tokenBalances[msg.sender][ownerAddress] -= amount;
_tokenBalances[msg.sender][recipientAddress] += amount;
emit KyberBridgeTokenTransfer(
msg.sender,
ownerAddress,
recipientAddress,
amount
);
return true;
}
function tokenBalanceOf(
address ownerAddress
)
external
view
returns (uint256 balance)
{
return _tokenBalances[msg.sender][ownerAddress];
}
function grantTokensTo(address tokenAddress, address ownerAddress, uint256 amount)
public
payable
{
_tokenBalances[tokenAddress][ownerAddress] += amount;
if (tokenAddress != address(weth)) {
// Send back ether if not WETH.
msg.sender.transfer(msg.value);
} else {
require(msg.value == amount, "VALUE_AMOUNT_MISMATCH");
}
}
// @dev overridden to point to this contract.
function _getKyberNetworkProxyAddress()
internal
view
returns (address)
{
return address(this);
}
// @dev overridden to point to test WETH.
function _getWethAddress()
internal
view
returns (address)
{
return address(weth);
}
}

View File

@@ -0,0 +1,82 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
contract TestStaticCallTarget {
using LibBytes for bytes;
uint256 internal _state;
function updateState()
external
{
_state++;
}
function assertEvenNumber(uint256 target)
external
pure
{
require(
target % 2 == 0,
"TARGET_NOT_EVEN"
);
}
function isOddNumber(uint256 target)
external
pure
returns (bool isOdd)
{
isOdd = target % 2 == 1;
return isOdd;
}
function noInputFunction()
external
pure
{
assert(msg.data.length == 4 && msg.data.readBytes4(0) == bytes4(keccak256("noInputFunction()")));
}
function dynamicInputFunction(bytes calldata a)
external
pure
{
bytes memory abiEncodedData = abi.encodeWithSignature("dynamicInputFunction(bytes)", a);
assert(msg.data.equals(abiEncodedData));
}
function returnComplexType(uint256 a, uint256 b)
external
view
returns (bytes memory result)
{
result = abi.encodePacked(
address(this),
a,
b
);
return result;
}
}

View File

@@ -0,0 +1,436 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
import "../src/bridges/UniswapBridge.sol";
import "../src/interfaces/IUniswapExchangeFactory.sol";
import "../src/interfaces/IUniswapExchange.sol";
// solhint-disable no-simple-event-func-name
contract TestEventsRaiser {
event TokenTransfer(
address token,
address from,
address to,
uint256 amount
);
event TokenApprove(
address spender,
uint256 allowance
);
event WethDeposit(
uint256 amount
);
event WethWithdraw(
uint256 amount
);
event EthToTokenTransferInput(
address exchange,
uint256 minTokensBought,
uint256 deadline,
address recipient
);
event TokenToEthSwapInput(
address exchange,
uint256 tokensSold,
uint256 minEthBought,
uint256 deadline
);
event TokenToTokenTransferInput(
address exchange,
uint256 tokensSold,
uint256 minTokensBought,
uint256 minEthBought,
uint256 deadline,
address recipient,
address toTokenAddress
);
function raiseEthToTokenTransferInput(
uint256 minTokensBought,
uint256 deadline,
address recipient
)
external
{
emit EthToTokenTransferInput(
msg.sender,
minTokensBought,
deadline,
recipient
);
}
function raiseTokenToEthSwapInput(
uint256 tokensSold,
uint256 minEthBought,
uint256 deadline
)
external
{
emit TokenToEthSwapInput(
msg.sender,
tokensSold,
minEthBought,
deadline
);
}
function raiseTokenToTokenTransferInput(
uint256 tokensSold,
uint256 minTokensBought,
uint256 minEthBought,
uint256 deadline,
address recipient,
address toTokenAddress
)
external
{
emit TokenToTokenTransferInput(
msg.sender,
tokensSold,
minTokensBought,
minEthBought,
deadline,
recipient,
toTokenAddress
);
}
function raiseTokenTransfer(
address from,
address to,
uint256 amount
)
external
{
emit TokenTransfer(
msg.sender,
from,
to,
amount
);
}
function raiseTokenApprove(address spender, uint256 allowance)
external
{
emit TokenApprove(spender, allowance);
}
function raiseWethDeposit(uint256 amount)
external
{
emit WethDeposit(amount);
}
function raiseWethWithdraw(uint256 amount)
external
{
emit WethWithdraw(amount);
}
}
/// @dev A minimalist ERC20/WETH token.
contract TestToken {
using LibSafeMath for uint256;
mapping (address => uint256) public balances;
string private _nextRevertReason;
/// @dev Set the balance for `owner`.
function setBalance(address owner)
external
payable
{
balances[owner] = msg.value;
}
/// @dev Set the revert reason for `transfer()`,
/// `deposit()`, and `withdraw()`.
function setRevertReason(string calldata reason)
external
{
_nextRevertReason = reason;
}
/// @dev Just calls `raiseTokenTransfer()` on the caller.
function transfer(address to, uint256 amount)
external
returns (bool)
{
_revertIfReasonExists();
TestEventsRaiser(msg.sender).raiseTokenTransfer(msg.sender, to, amount);
return true;
}
/// @dev Just calls `raiseTokenApprove()` on the caller.
function approve(address spender, uint256 allowance)
external
returns (bool)
{
TestEventsRaiser(msg.sender).raiseTokenApprove(spender, allowance);
return true;
}
/// @dev `IWETH.deposit()` that increases balances and calls
/// `raiseWethDeposit()` on the caller.
function deposit()
external
payable
{
_revertIfReasonExists();
balances[msg.sender] += balances[msg.sender].safeAdd(msg.value);
TestEventsRaiser(msg.sender).raiseWethDeposit(msg.value);
}
/// @dev `IWETH.withdraw()` that just reduces balances and calls
/// `raiseWethWithdraw()` on the caller.
function withdraw(uint256 amount)
external
{
_revertIfReasonExists();
balances[msg.sender] = balances[msg.sender].safeSub(amount);
msg.sender.transfer(amount);
TestEventsRaiser(msg.sender).raiseWethWithdraw(amount);
}
function allowance(address, address) external view returns (uint256) {
return 0;
}
/// @dev Retrieve the balance for `owner`.
function balanceOf(address owner)
external
view
returns (uint256)
{
return balances[owner];
}
function _revertIfReasonExists()
private
view
{
if (bytes(_nextRevertReason).length != 0) {
revert(_nextRevertReason);
}
}
}
contract TestExchange is
IUniswapExchange
{
address public tokenAddress;
string private _nextRevertReason;
constructor(address _tokenAddress) public {
tokenAddress = _tokenAddress;
}
function setFillBehavior(
string calldata revertReason
)
external
payable
{
_nextRevertReason = revertReason;
}
function ethToTokenTransferInput(
uint256 minTokensBought,
uint256 deadline,
address recipient
)
external
payable
returns (uint256 tokensBought)
{
TestEventsRaiser(msg.sender).raiseEthToTokenTransferInput(
minTokensBought,
deadline,
recipient
);
_revertIfReasonExists();
return address(this).balance;
}
function tokenToEthSwapInput(
uint256 tokensSold,
uint256 minEthBought,
uint256 deadline
)
external
returns (uint256 ethBought)
{
TestEventsRaiser(msg.sender).raiseTokenToEthSwapInput(
tokensSold,
minEthBought,
deadline
);
_revertIfReasonExists();
uint256 fillAmount = address(this).balance;
msg.sender.transfer(fillAmount);
return fillAmount;
}
function tokenToTokenTransferInput(
uint256 tokensSold,
uint256 minTokensBought,
uint256 minEthBought,
uint256 deadline,
address recipient,
address toTokenAddress
)
external
returns (uint256 tokensBought)
{
TestEventsRaiser(msg.sender).raiseTokenToTokenTransferInput(
tokensSold,
minTokensBought,
minEthBought,
deadline,
recipient,
toTokenAddress
);
_revertIfReasonExists();
return address(this).balance;
}
function toTokenAddress()
external
view
returns (address _tokenAddress)
{
return tokenAddress;
}
function _revertIfReasonExists()
private
view
{
if (bytes(_nextRevertReason).length != 0) {
revert(_nextRevertReason);
}
}
}
/// @dev UniswapBridge overridden to mock tokens and implement IUniswapExchangeFactory.
contract TestUniswapBridge is
IUniswapExchangeFactory,
TestEventsRaiser,
UniswapBridge
{
TestToken public wethToken;
// Token address to TestToken instance.
mapping (address => TestToken) private _testTokens;
// Token address to TestExchange instance.
mapping (address => TestExchange) private _testExchanges;
constructor() public {
wethToken = new TestToken();
_testTokens[address(wethToken)] = wethToken;
}
/// @dev Sets the balance of this contract for an existing token.
/// The wei attached will be the balance.
function setTokenBalance(address tokenAddress)
external
payable
{
TestToken token = _testTokens[tokenAddress];
token.deposit.value(msg.value)();
}
/// @dev Sets the revert reason for an existing token.
function setTokenRevertReason(address tokenAddress, string calldata revertReason)
external
{
TestToken token = _testTokens[tokenAddress];
token.setRevertReason(revertReason);
}
/// @dev Create a token and exchange (if they don't exist) for a new token
/// and sets the exchange revert and fill behavior. The wei attached
/// will be the fill amount for the exchange.
/// @param tokenAddress The token address. If zero, one will be created.
/// @param revertReason The revert reason for exchange operations.
function createTokenAndExchange(
address tokenAddress,
string calldata revertReason
)
external
payable
returns (TestToken token, TestExchange exchange)
{
token = TestToken(tokenAddress);
if (tokenAddress == address(0)) {
token = new TestToken();
}
_testTokens[address(token)] = token;
exchange = _testExchanges[address(token)];
if (address(exchange) == address(0)) {
_testExchanges[address(token)] = exchange = new TestExchange(address(token));
}
exchange.setFillBehavior.value(msg.value)(revertReason);
return (token, exchange);
}
/// @dev `IUniswapExchangeFactory.getExchange`
function getExchange(address tokenAddress)
external
view
returns (address)
{
return address(_testExchanges[tokenAddress]);
}
// @dev Use `wethToken`.
function _getWethAddress()
internal
view
returns (address)
{
return address(wethToken);
}
// @dev This contract will double as the Uniswap contract.
function _getUniswapExchangeFactoryAddress()
internal
view
returns (address)
{
return address(this);
}
}

View File

@@ -0,0 +1,253 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
import "@0x/contracts-utils/contracts/src/LibAddressArray.sol";
import "../src/bridges/UniswapV2Bridge.sol";
import "../src/interfaces/IUniswapV2Router01.sol";
contract TestEventsRaiser {
event TokenTransfer(
address token,
address from,
address to,
uint256 amount
);
event TokenApprove(
address spender,
uint256 allowance
);
event SwapExactTokensForTokensInput(
uint amountIn,
uint amountOutMin,
address toTokenAddress,
address to,
uint deadline
);
function raiseTokenTransfer(
address from,
address to,
uint256 amount
)
external
{
emit TokenTransfer(
msg.sender,
from,
to,
amount
);
}
function raiseTokenApprove(address spender, uint256 allowance) external {
emit TokenApprove(spender, allowance);
}
function raiseSwapExactTokensForTokensInput(
uint amountIn,
uint amountOutMin,
address toTokenAddress,
address to,
uint deadline
) external
{
emit SwapExactTokensForTokensInput(
amountIn,
amountOutMin,
toTokenAddress,
to,
deadline
);
}
}
/// @dev A minimalist ERC20 token.
contract TestToken {
using LibSafeMath for uint256;
mapping (address => uint256) public balances;
string private _nextRevertReason;
/// @dev Set the balance for `owner`.
function setBalance(address owner, uint256 balance)
external
payable
{
balances[owner] = balance;
}
/// @dev Just emits a TokenTransfer event on the caller
function transfer(address to, uint256 amount)
external
returns (bool)
{
TestEventsRaiser(msg.sender).raiseTokenTransfer(msg.sender, to, amount);
return true;
}
/// @dev Just emits a TokenApprove event on the caller
function approve(address spender, uint256 allowance)
external
returns (bool)
{
TestEventsRaiser(msg.sender).raiseTokenApprove(spender, allowance);
return true;
}
function allowance(address, address) external view returns (uint256) {
return 0;
}
/// @dev Retrieve the balance for `owner`.
function balanceOf(address owner)
external
view
returns (uint256)
{
return balances[owner];
}
}
/// @dev Mock the UniswapV2Router01 contract
contract TestRouter is
IUniswapV2Router01
{
string private _nextRevertReason;
/// @dev Set the revert reason for `swapExactTokensForTokens`.
function setRevertReason(string calldata reason)
external
{
_nextRevertReason = reason;
}
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts)
{
_revertIfReasonExists();
amounts = new uint[](path.length);
amounts[0] = amountIn;
amounts[amounts.length - 1] = amountOutMin;
TestEventsRaiser(msg.sender).raiseSwapExactTokensForTokensInput(
// tokens sold
amountIn,
// tokens bought
amountOutMin,
// output token (toTokenAddress)
path[path.length - 1],
// recipient
to,
// deadline
deadline
);
}
function _revertIfReasonExists()
private
view
{
if (bytes(_nextRevertReason).length != 0) {
revert(_nextRevertReason);
}
}
}
/// @dev UniswapV2Bridge overridden to mock tokens and Uniswap router
contract TestUniswapV2Bridge is
UniswapV2Bridge,
TestEventsRaiser
{
// Token address to TestToken instance.
mapping (address => TestToken) private _testTokens;
// TestRouter instance.
TestRouter private _testRouter;
constructor() public {
_testRouter = new TestRouter();
}
function setRouterRevertReason(string calldata revertReason)
external
{
_testRouter.setRevertReason(revertReason);
}
/// @dev Sets the balance of this contract for an existing token.
/// The wei attached will be the balance.
function setTokenBalance(address tokenAddress, uint256 balance)
external
{
TestToken token = _testTokens[tokenAddress];
token.setBalance(address(this), balance);
}
/// @dev Create a new token
/// @param tokenAddress The token address. If zero, one will be created.
function createToken(
address tokenAddress
)
external
returns (TestToken token)
{
token = TestToken(tokenAddress);
if (tokenAddress == address(0)) {
token = new TestToken();
}
_testTokens[address(token)] = token;
return token;
}
function getRouterAddress()
external
view
returns (address)
{
return address(_testRouter);
}
function _getUniswapV2Router01Address()
internal
view
returns (address)
{
return address(_testRouter);
}
}

View File

@@ -0,0 +1,99 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "3.4.0",
"engines": {
"node": ">=6.12"
},
"description": "Smart contract components of 0x protocol",
"main": "lib/src/index.js",
"directories": {
"test": "test"
},
"scripts": {
"build": "yarn pre_build && tsc -b",
"build:ci": "yarn build",
"pre_build": "run-s compile contracts:gen generate_contract_wrappers contracts:copy",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
"test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
"test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
"compile": "sol-compiler",
"watch": "sol-compiler -w",
"clean": "shx rm -rf lib test/generated-artifacts test/generated-wrappers generated-artifacts generated-wrappers",
"generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output test/generated-wrappers --backend ethers",
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./test/generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude ./test/generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
"fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./test/generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude ./test/generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
"coverage:report:text": "istanbul report text",
"coverage:report:html": "istanbul report html && open coverage/index.html",
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen generate",
"contracts:copy": "contracts-gen copy",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol",
"compile:truffle": "truffle compile",
"docs:md": "ts-doc-gen --sourceDir='$PROJECT_FILES' --output=$MD_FILE_DIR --fileExtension=mdx --tsconfig=./typedoc-tsconfig.json",
"docs:json": "typedoc --excludePrivate --excludeExternals --excludeProtected --ignoreCompilerErrors --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"abis": "./test/generated-artifacts/@(BalancerBridge|ChaiBridge|CurveBridge|DexForwarderBridge|DydxBridge|ERC1155Proxy|ERC20BridgeProxy|ERC20Proxy|ERC721Proxy|Eth2DaiBridge|IAssetData|IAssetProxy|IAssetProxyDispatcher|IAuthorizable|IBalancerPool|IChai|ICurve|IDydx|IDydxBridge|IERC20Bridge|IEth2Dai|IGasToken|IKyberNetworkProxy|IUniswapExchange|IUniswapExchangeFactory|IUniswapV2Router01|KyberBridge|MixinAssetProxyDispatcher|MixinAuthorizable|MixinGasToken|MultiAssetProxy|Ownable|StaticCallProxy|TestChaiBridge|TestDexForwarderBridge|TestDydxBridge|TestERC20Bridge|TestEth2DaiBridge|TestKyberBridge|TestStaticCallTarget|TestUniswapBridge|TestUniswapV2Bridge|UniswapBridge|UniswapV2Bridge).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
"devDependencies": {
"@0x/abi-gen": "^5.3.1",
"@0x/contract-wrappers": "^13.8.0",
"@0x/contracts-gen": "^2.0.10",
"@0x/contracts-test-utils": "^5.3.4",
"@0x/contracts-utils": "^4.5.1",
"@0x/dev-utils": "^3.3.0",
"@0x/sol-compiler": "^4.1.1",
"@0x/ts-doc-gen": "^0.0.22",
"@0x/tslint-config": "^4.1.0",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"ethereumjs-util": "^5.1.1",
"make-promises-safe": "^1.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
"truffle": "^5.0.32",
"tslint": "5.11.0",
"typedoc": "^0.15.0",
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^6.2.3",
"@0x/contracts-erc1155": "^2.1.7",
"@0x/contracts-erc20": "^3.2.1",
"@0x/contracts-erc721": "^3.1.7",
"@0x/contracts-exchange-libs": "^4.3.7",
"@0x/order-utils": "^10.3.0",
"@0x/types": "^3.2.0",
"@0x/typescript-typings": "^5.1.1",
"@0x/utils": "^5.5.1",
"@0x/web3-wrapper": "^7.2.0",
"ethereum-types": "^3.2.0",
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"
},
"gitHead": "4f91bfd907996b2f4dd383778b50c479c2602b56"
}

View File

@@ -0,0 +1,97 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as BalancerBridge from '../generated-artifacts/BalancerBridge.json';
import * as ChaiBridge from '../generated-artifacts/ChaiBridge.json';
import * as CurveBridge from '../generated-artifacts/CurveBridge.json';
import * as DexForwarderBridge from '../generated-artifacts/DexForwarderBridge.json';
import * as DydxBridge from '../generated-artifacts/DydxBridge.json';
import * as ERC1155Proxy from '../generated-artifacts/ERC1155Proxy.json';
import * as ERC20BridgeProxy from '../generated-artifacts/ERC20BridgeProxy.json';
import * as ERC20Proxy from '../generated-artifacts/ERC20Proxy.json';
import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
import * as Eth2DaiBridge from '../generated-artifacts/Eth2DaiBridge.json';
import * as IAssetData from '../generated-artifacts/IAssetData.json';
import * as IAssetProxy from '../generated-artifacts/IAssetProxy.json';
import * as IAssetProxyDispatcher from '../generated-artifacts/IAssetProxyDispatcher.json';
import * as IAuthorizable from '../generated-artifacts/IAuthorizable.json';
import * as IBalancerPool from '../generated-artifacts/IBalancerPool.json';
import * as IChai from '../generated-artifacts/IChai.json';
import * as ICurve from '../generated-artifacts/ICurve.json';
import * as IDydx from '../generated-artifacts/IDydx.json';
import * as IDydxBridge from '../generated-artifacts/IDydxBridge.json';
import * as IERC20Bridge from '../generated-artifacts/IERC20Bridge.json';
import * as IEth2Dai from '../generated-artifacts/IEth2Dai.json';
import * as IGasToken from '../generated-artifacts/IGasToken.json';
import * as IKyberNetworkProxy from '../generated-artifacts/IKyberNetworkProxy.json';
import * as IUniswapExchange from '../generated-artifacts/IUniswapExchange.json';
import * as IUniswapExchangeFactory from '../generated-artifacts/IUniswapExchangeFactory.json';
import * as IUniswapV2Router01 from '../generated-artifacts/IUniswapV2Router01.json';
import * as KyberBridge from '../generated-artifacts/KyberBridge.json';
import * as MixinAssetProxyDispatcher from '../generated-artifacts/MixinAssetProxyDispatcher.json';
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
import * as MixinGasToken from '../generated-artifacts/MixinGasToken.json';
import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
import * as Ownable from '../generated-artifacts/Ownable.json';
import * as StaticCallProxy from '../generated-artifacts/StaticCallProxy.json';
import * as TestChaiBridge from '../generated-artifacts/TestChaiBridge.json';
import * as TestDexForwarderBridge from '../generated-artifacts/TestDexForwarderBridge.json';
import * as TestDydxBridge from '../generated-artifacts/TestDydxBridge.json';
import * as TestERC20Bridge from '../generated-artifacts/TestERC20Bridge.json';
import * as TestEth2DaiBridge from '../generated-artifacts/TestEth2DaiBridge.json';
import * as TestKyberBridge from '../generated-artifacts/TestKyberBridge.json';
import * as TestStaticCallTarget from '../generated-artifacts/TestStaticCallTarget.json';
import * as TestUniswapBridge from '../generated-artifacts/TestUniswapBridge.json';
import * as TestUniswapV2Bridge from '../generated-artifacts/TestUniswapV2Bridge.json';
import * as UniswapBridge from '../generated-artifacts/UniswapBridge.json';
import * as UniswapV2Bridge from '../generated-artifacts/UniswapV2Bridge.json';
export const artifacts = {
MixinAssetProxyDispatcher: MixinAssetProxyDispatcher as ContractArtifact,
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
Ownable: Ownable as ContractArtifact,
ERC1155Proxy: ERC1155Proxy as ContractArtifact,
ERC20BridgeProxy: ERC20BridgeProxy as ContractArtifact,
ERC20Proxy: ERC20Proxy as ContractArtifact,
ERC721Proxy: ERC721Proxy as ContractArtifact,
MultiAssetProxy: MultiAssetProxy as ContractArtifact,
StaticCallProxy: StaticCallProxy as ContractArtifact,
BalancerBridge: BalancerBridge as ContractArtifact,
ChaiBridge: ChaiBridge as ContractArtifact,
CurveBridge: CurveBridge as ContractArtifact,
DexForwarderBridge: DexForwarderBridge as ContractArtifact,
DydxBridge: DydxBridge as ContractArtifact,
Eth2DaiBridge: Eth2DaiBridge as ContractArtifact,
KyberBridge: KyberBridge as ContractArtifact,
MixinGasToken: MixinGasToken as ContractArtifact,
UniswapBridge: UniswapBridge as ContractArtifact,
UniswapV2Bridge: UniswapV2Bridge as ContractArtifact,
IAssetData: IAssetData as ContractArtifact,
IAssetProxy: IAssetProxy as ContractArtifact,
IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
IAuthorizable: IAuthorizable as ContractArtifact,
IBalancerPool: IBalancerPool as ContractArtifact,
IChai: IChai as ContractArtifact,
ICurve: ICurve as ContractArtifact,
IDydx: IDydx as ContractArtifact,
IDydxBridge: IDydxBridge as ContractArtifact,
IERC20Bridge: IERC20Bridge as ContractArtifact,
IEth2Dai: IEth2Dai as ContractArtifact,
IGasToken: IGasToken as ContractArtifact,
IKyberNetworkProxy: IKyberNetworkProxy as ContractArtifact,
IUniswapExchange: IUniswapExchange as ContractArtifact,
IUniswapExchangeFactory: IUniswapExchangeFactory as ContractArtifact,
IUniswapV2Router01: IUniswapV2Router01 as ContractArtifact,
TestChaiBridge: TestChaiBridge as ContractArtifact,
TestDexForwarderBridge: TestDexForwarderBridge as ContractArtifact,
TestDydxBridge: TestDydxBridge as ContractArtifact,
TestERC20Bridge: TestERC20Bridge as ContractArtifact,
TestEth2DaiBridge: TestEth2DaiBridge as ContractArtifact,
TestKyberBridge: TestKyberBridge as ContractArtifact,
TestStaticCallTarget: TestStaticCallTarget as ContractArtifact,
TestUniswapBridge: TestUniswapBridge as ContractArtifact,
TestUniswapV2Bridge: TestUniswapV2Bridge as ContractArtifact,
};

View File

@@ -0,0 +1,112 @@
import { AssetProxyId } from '@0x/types';
import { BigNumber, hexUtils } from '@0x/utils';
import { IAssetDataContract } from './wrappers';
const assetDataIface = new IAssetDataContract('0x0000000000000000000000000000000000000000', { isEIP1193: true } as any);
/**
* Get the proxy ID from encoded asset data.
*/
export function getAssetDataProxyId(encoded: string): AssetProxyId {
// tslint:disable-next-line: no-unnecessary-type-assertion
return hexUtils.slice(encoded, 0, 4) as AssetProxyId;
}
/**
* Decode ERC20 asset data.
*/
export function decodeERC20AssetData(encoded: string): string {
return assetDataIface.getABIDecodedTransactionData<string>('ERC20Token', encoded);
}
/**
* Decode ERC721 asset data.
*/
export function decodeERC721AssetData(encoded: string): [string, BigNumber] {
return assetDataIface.getABIDecodedTransactionData<[string, BigNumber]>('ERC721Token', encoded);
}
/**
* Decode ERC1155 asset data.
*/
export function decodeERC1155AssetData(encoded: string): [string, BigNumber[], BigNumber[], string] {
return assetDataIface.getABIDecodedTransactionData<[string, BigNumber[], BigNumber[], string]>(
'ERC1155Assets',
encoded,
);
}
/**
* Decode MultiAsset asset data.
*/
export function decodeMultiAssetData(encoded: string): [BigNumber[], string[]] {
return assetDataIface.getABIDecodedTransactionData<[BigNumber[], string[]]>('MultiAsset', encoded);
}
/**
* Decode StaticCall asset data.
*/
export function decodeStaticCallAssetData(encoded: string): [string, string, string] {
return assetDataIface.getABIDecodedTransactionData<[string, string, string]>('StaticCall', encoded);
}
/**
* Decode ERC20Bridge asset data.
*/
export function decodeERC20BridgeAssetData(encoded: string): [string, string, string] {
return assetDataIface.getABIDecodedTransactionData<[string, string, string]>('ERC20Bridge', encoded);
}
/**
* Encode ERC20 asset data.
*/
export function encodeERC20AssetData(tokenAddress: string): string {
return assetDataIface.ERC20Token(tokenAddress).getABIEncodedTransactionData();
}
/**
* Encode ERC721 asset data.
*/
export function encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber): string {
return assetDataIface.ERC721Token(tokenAddress, tokenId).getABIEncodedTransactionData();
}
/**
* Encode ERC1155 asset data.
*/
export function encodeERC1155AssetData(
tokenAddress: string,
tokenIds: BigNumber[],
values: BigNumber[],
callbackData: string,
): string {
return assetDataIface.ERC1155Assets(tokenAddress, tokenIds, values, callbackData).getABIEncodedTransactionData();
}
/**
* Encode MultiAsset asset data.
*/
export function encodeMultiAssetData(values: BigNumber[], nestedAssetData: string[]): string {
return assetDataIface.MultiAsset(values, nestedAssetData).getABIEncodedTransactionData();
}
/**
* Encode StaticCall asset data.
*/
export function encodeStaticCallAssetData(
staticCallTargetAddress: string,
staticCallData: string,
expectedReturnDataHash: string,
): string {
return assetDataIface
.StaticCall(staticCallTargetAddress, staticCallData, expectedReturnDataHash)
.getABIEncodedTransactionData();
}
/**
* Encode ERC20Bridge asset data.
*/
export function encodeERC20BridgeAssetData(tokenAddress: string, bridgeAddress: string, bridgeData: string): string {
return assetDataIface.ERC20Bridge(tokenAddress, bridgeAddress, bridgeData).getABIEncodedTransactionData();
}

View File

@@ -0,0 +1,27 @@
import { AbiEncoder, BigNumber } from '@0x/utils';
export interface DexForwarderBridgeCall {
target: string;
inputTokenAmount: BigNumber;
outputTokenAmount: BigNumber;
bridgeData: string;
}
export interface DexForwaderBridgeData {
inputToken: string;
calls: DexForwarderBridgeCall[];
}
export const dexForwarderBridgeDataEncoder = AbiEncoder.create([
{ name: 'inputToken', type: 'address' },
{
name: 'calls',
type: 'tuple[]',
components: [
{ name: 'target', type: 'address' },
{ name: 'inputTokenAmount', type: 'uint256' },
{ name: 'outputTokenAmount', type: 'uint256' },
{ name: 'bridgeData', type: 'bytes' },
],
},
]);

View File

@@ -0,0 +1,40 @@
import { AbiEncoder, BigNumber } from '@0x/utils';
export enum DydxBridgeActionType {
Deposit,
Withdraw,
}
export interface DydxBridgeAction {
actionType: DydxBridgeActionType;
accountIdx: BigNumber;
marketId: BigNumber;
conversionRateNumerator: BigNumber;
conversionRateDenominator: BigNumber;
}
export interface DydxBridgeData {
accountNumbers: BigNumber[];
actions: DydxBridgeAction[];
}
export const dydxBridgeDataEncoder = AbiEncoder.create([
{
name: 'bridgeData',
type: 'tuple',
components: [
{ name: 'accountNumbers', type: 'uint256[]' },
{
name: 'actions',
type: 'tuple[]',
components: [
{ name: 'actionType', type: 'uint8' },
{ name: 'accountIdx', type: 'uint256' },
{ name: 'marketId', type: 'uint256' },
{ name: 'conversionRateNumerator', type: 'uint256' },
{ name: 'conversionRateDenominator', type: 'uint256' },
],
},
],
},
]);

View File

@@ -0,0 +1,410 @@
import { artifacts as erc1155Artifacts, ERC1155MintableContract, Erc1155Wrapper } from '@0x/contracts-erc1155';
import {
constants,
ERC1155FungibleHoldingsByOwner,
ERC1155HoldingsByOwner,
ERC1155NonFungibleHoldingsByOwner,
LogDecoder,
txDefaults,
} from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import { ERC1155ProxyContract, IAssetDataContract, IAssetProxyContract } from './wrappers';
export class ERC1155ProxyWrapper {
private readonly _tokenOwnerAddresses: string[];
private readonly _fungibleTokenIds: string[];
private readonly _nonFungibleTokenIds: string[];
private readonly _nfts: Array<{ id: BigNumber; tokenId: BigNumber }>;
private readonly _contractOwnerAddress: string;
private readonly _web3Wrapper: Web3Wrapper;
private readonly _provider: Provider;
private readonly _logDecoder: LogDecoder;
private readonly _dummyTokenWrappers: Erc1155Wrapper[];
private readonly _assetProxyInterface: IAssetProxyContract;
private readonly _assetDataInterface: IAssetDataContract;
private _proxyContract?: ERC1155ProxyContract;
private _proxyIdIfExists?: string;
private _initialTokenIdsByOwner: ERC1155HoldingsByOwner = { fungible: {}, nonFungible: {} };
constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
this._web3Wrapper = new Web3Wrapper(provider);
this._provider = provider;
const allArtifacts = _.merge(artifacts, erc1155Artifacts);
this._logDecoder = new LogDecoder(this._web3Wrapper, allArtifacts);
this._dummyTokenWrappers = [];
this._assetProxyInterface = new IAssetProxyContract(constants.NULL_ADDRESS, provider);
this._assetDataInterface = new IAssetDataContract(constants.NULL_ADDRESS, provider);
this._tokenOwnerAddresses = tokenOwnerAddresses;
this._contractOwnerAddress = contractOwnerAddress;
this._fungibleTokenIds = [];
this._nonFungibleTokenIds = [];
this._nfts = [];
}
/**
* @dev Deploys dummy ERC1155 contracts
* @return An array of ERC1155 wrappers; one for each deployed contract.
*/
public async deployDummyContractsAsync(): Promise<Erc1155Wrapper[]> {
// tslint:disable-next-line:no-unused-variable
for (const i of _.times(constants.NUM_DUMMY_ERC1155_CONTRACTS_TO_DEPLOY)) {
const erc1155Contract = await ERC1155MintableContract.deployFrom0xArtifactAsync(
erc1155Artifacts.ERC1155Mintable,
this._provider,
txDefaults,
artifacts,
);
const erc1155Wrapper = new Erc1155Wrapper(erc1155Contract, this._contractOwnerAddress);
this._dummyTokenWrappers.push(erc1155Wrapper);
}
return this._dummyTokenWrappers;
}
/**
* @dev Deploys the ERC1155 proxy
* @return Deployed ERC1155 proxy contract instance
*/
public async deployProxyAsync(): Promise<ERC1155ProxyContract> {
this._proxyContract = await ERC1155ProxyContract.deployFrom0xArtifactAsync(
artifacts.ERC1155Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId().callAsync();
return this._proxyContract;
}
/**
* @dev Gets the ERC1155 proxy id
*/
public getProxyId(): string {
this._validateProxyContractExistsOrThrow();
return this._proxyIdIfExists as string;
}
/**
* @dev generates abi-encoded tx data for transferring erc1155 fungible/non-fungible tokens.
* @param from source address
* @param to destination address
* @param contractAddress address of erc155 contract
* @param tokensToTransfer array of erc1155 tokens to transfer
* @param valuesToTransfer array of corresponding values for each erc1155 token to transfer
* @param valueMultiplier each value in `valuesToTransfer` is multiplied by this
* @param receiverCallbackData callback data if `to` is a contract
* @param authorizedSender sender of `transferFrom` transaction
* @param extraData extra data to append to `transferFrom` transaction. Optional.
* @return abi encoded tx data.
*/
public async getTransferFromAbiEncodedTxDataAsync(
from: string,
to: string,
contractAddress: string,
tokensToTransfer: BigNumber[],
valuesToTransfer: BigNumber[],
valueMultiplier: BigNumber,
receiverCallbackData: string,
authorizedSender: string,
assetData_?: string,
): Promise<string> {
this._validateProxyContractExistsOrThrow();
const assetData =
assetData_ === undefined
? this._assetDataInterface
.ERC1155Assets(contractAddress, tokensToTransfer, valuesToTransfer, receiverCallbackData)
.getABIEncodedTransactionData()
: assetData_;
const data = this._assetProxyInterface
.transferFrom(assetData, from, to, valueMultiplier)
.getABIEncodedTransactionData();
return data;
}
/**
* @dev transfers erc1155 fungible/non-fungible tokens.
* @param txData: abi-encoded tx data
* @param authorizedSender sender of `transferFrom` transaction
*/
public async transferFromRawAsync(
txData: string,
authorizedSender: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._web3Wrapper.sendTransactionAsync({
to: (this._proxyContract as ERC1155ProxyContract).address,
data: txData,
from: authorizedSender,
gas: 300000,
});
const txReceipt = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return txReceipt;
}
/**
* @dev transfers erc1155 fungible/non-fungible tokens.
* @param from source address
* @param to destination address
* @param contractAddress address of erc155 contract
* @param tokensToTransfer array of erc1155 tokens to transfer
* @param valuesToTransfer array of corresponding values for each erc1155 token to transfer
* @param valueMultiplier each value in `valuesToTransfer` is multiplied by this
* @param receiverCallbackData callback data if `to` is a contract
* @param authorizedSender sender of `transferFrom` transaction
* @param extraData extra data to append to `transferFrom` transaction. Optional.
* @return tranasction hash.
*/
public async transferFromAsync(
from: string,
to: string,
contractAddress: string,
tokensToTransfer: BigNumber[],
valuesToTransfer: BigNumber[],
valueMultiplier: BigNumber,
receiverCallbackData: string,
authorizedSender: string,
assetData_?: string,
): Promise<TransactionReceiptWithDecodedLogs> {
this._validateProxyContractExistsOrThrow();
const assetData =
assetData_ === undefined
? this._assetDataInterface
.ERC1155Assets(contractAddress, tokensToTransfer, valuesToTransfer, receiverCallbackData)
.getABIEncodedTransactionData()
: assetData_;
const data = this._assetProxyInterface
.transferFrom(assetData, from, to, valueMultiplier)
.getABIEncodedTransactionData();
const txHash = await this._web3Wrapper.sendTransactionAsync({
to: (this._proxyContract as ERC1155ProxyContract).address,
data,
from: authorizedSender,
gas: 300000,
});
const txReceipt = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return txReceipt;
}
/**
* @dev For each deployed ERC1155 contract, this function mints a set of fungible/non-fungible
* tokens for each token owner address (`_tokenOwnerAddresses`).
* @return Balances of each token owner, across all ERC1155 contracts and tokens.
*/
public async setBalancesAndAllowancesAsync(): Promise<ERC1155HoldingsByOwner> {
this._validateDummyTokenContractsExistOrThrow();
this._validateProxyContractExistsOrThrow();
this._initialTokenIdsByOwner = {
fungible: {},
nonFungible: {},
};
const fungibleHoldingsByOwner: ERC1155FungibleHoldingsByOwner = {};
const nonFungibleHoldingsByOwner: ERC1155NonFungibleHoldingsByOwner = {};
// Set balances accordingly
for (const dummyWrapper of this._dummyTokenWrappers) {
const dummyAddress = dummyWrapper.getContract().address;
// tslint:disable-next-line:no-unused-variable
for (const i of _.times(constants.NUM_ERC1155_FUNGIBLE_TOKENS_MINT)) {
// Create a fungible token
const tokenId = await dummyWrapper.mintFungibleTokensAsync(
this._tokenOwnerAddresses,
constants.INITIAL_ERC1155_FUNGIBLE_BALANCE,
);
const tokenIdAsString = tokenId.toString();
this._fungibleTokenIds.push(tokenIdAsString);
// Mint tokens for each owner for this token
for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
// tslint:disable-next-line:no-unused-variable
if (fungibleHoldingsByOwner[tokenOwnerAddress] === undefined) {
fungibleHoldingsByOwner[tokenOwnerAddress] = {};
}
if (fungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress] === undefined) {
fungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress] = {};
}
fungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress][tokenIdAsString] =
constants.INITIAL_ERC1155_FUNGIBLE_BALANCE;
await dummyWrapper.setApprovalForAllAsync(
tokenOwnerAddress,
(this._proxyContract as ERC1155ProxyContract).address,
true,
);
}
}
// Non-fungible tokens
// tslint:disable-next-line:no-unused-variable
for (const j of _.times(constants.NUM_ERC1155_NONFUNGIBLE_TOKENS_MINT)) {
const [tokenId, nftIds] = await dummyWrapper.mintNonFungibleTokensAsync(this._tokenOwnerAddresses);
const tokenIdAsString = tokenId.toString();
this._nonFungibleTokenIds.push(tokenIdAsString);
_.each(this._tokenOwnerAddresses, async (tokenOwnerAddress: string, i: number) => {
if (nonFungibleHoldingsByOwner[tokenOwnerAddress] === undefined) {
nonFungibleHoldingsByOwner[tokenOwnerAddress] = {};
}
if (nonFungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress] === undefined) {
nonFungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress] = {};
}
if (nonFungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress][tokenIdAsString] === undefined) {
nonFungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress][tokenIdAsString] = [];
}
this._nfts.push({ id: nftIds[i], tokenId });
nonFungibleHoldingsByOwner[tokenOwnerAddress][dummyAddress][tokenIdAsString].push(nftIds[i]);
await dummyWrapper.setApprovalForAllAsync(
tokenOwnerAddress,
(this._proxyContract as ERC1155ProxyContract).address,
true,
);
});
}
}
this._initialTokenIdsByOwner = {
fungible: fungibleHoldingsByOwner,
nonFungible: nonFungibleHoldingsByOwner,
};
return this._initialTokenIdsByOwner;
}
/**
* @dev For each deployed ERC1155 contract, this function quieries the set of fungible/non-fungible
* tokens for each token owner address (`_tokenOwnerAddresses`).
* @return Balances of each token owner, across all ERC1155 contracts and tokens.
*/
public async getBalancesAsync(): Promise<ERC1155HoldingsByOwner> {
this._validateDummyTokenContractsExistOrThrow();
this._validateBalancesAndAllowancesSetOrThrow();
const tokenHoldingsByOwner: ERC1155FungibleHoldingsByOwner = {};
const nonFungibleHoldingsByOwner: ERC1155NonFungibleHoldingsByOwner = {};
for (const dummyTokenWrapper of this._dummyTokenWrappers) {
const tokenContract = dummyTokenWrapper.getContract();
const tokenAddress = tokenContract.address;
// Construct batch balance call
const tokenOwners: string[] = [];
const tokenIds: BigNumber[] = [];
for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
for (const tokenId of this._fungibleTokenIds) {
tokenOwners.push(tokenOwnerAddress);
tokenIds.push(new BigNumber(tokenId));
}
for (const nft of this._nfts) {
tokenOwners.push(tokenOwnerAddress);
tokenIds.push(nft.id);
}
}
const balances = await dummyTokenWrapper.getBalancesAsync(tokenOwners, tokenIds);
// Parse out balances into fungible / non-fungible token holdings
let i = 0;
for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
// Fungible tokens
for (const tokenId of this._fungibleTokenIds) {
if (tokenHoldingsByOwner[tokenOwnerAddress] === undefined) {
tokenHoldingsByOwner[tokenOwnerAddress] = {};
}
if (tokenHoldingsByOwner[tokenOwnerAddress][tokenAddress] === undefined) {
tokenHoldingsByOwner[tokenOwnerAddress][tokenAddress] = {};
}
tokenHoldingsByOwner[tokenOwnerAddress][tokenAddress][tokenId] = balances[i++];
}
// Non-fungible tokens
for (const nft of this._nfts) {
if (nonFungibleHoldingsByOwner[tokenOwnerAddress] === undefined) {
nonFungibleHoldingsByOwner[tokenOwnerAddress] = {};
}
if (nonFungibleHoldingsByOwner[tokenOwnerAddress][tokenAddress] === undefined) {
nonFungibleHoldingsByOwner[tokenOwnerAddress][tokenAddress] = {};
}
if (
nonFungibleHoldingsByOwner[tokenOwnerAddress][tokenAddress][nft.tokenId.toString()] ===
undefined
) {
nonFungibleHoldingsByOwner[tokenOwnerAddress][tokenAddress][nft.tokenId.toString()] = [];
}
const isOwner = balances[i++];
if (isOwner.isEqualTo(1)) {
nonFungibleHoldingsByOwner[tokenOwnerAddress][tokenAddress][nft.tokenId.toString()].push(
nft.id,
);
}
}
}
}
const holdingsByOwner = {
fungible: tokenHoldingsByOwner,
nonFungible: nonFungibleHoldingsByOwner,
};
return holdingsByOwner;
}
/**
* @dev Set the approval for the proxy on behalf of `userAddress` .
* @param userAddress owner of ERC1155 tokens.
* @param contractAddress address of ERC1155 contract.
* @param isApproved Whether to approve the proxy for all or not.
*/
public async setProxyAllowanceForAllAsync(
userAddress: string,
contractAddress: string,
isApproved: boolean,
): Promise<void> {
this._validateProxyContractExistsOrThrow();
const tokenWrapper = this.getContractWrapper(contractAddress);
const operator = (this._proxyContract as ERC1155ProxyContract).address;
await tokenWrapper.setApprovalForAllAsync(userAddress, operator, isApproved);
}
/**
* @dev Checks if proxy is approved to transfer tokens on behalf of `userAddress`.
* @param userAddress owner of ERC1155 tokens.
* @param contractAddress address of ERC1155 contract.
* @return True iff the proxy is approved for all. False otherwise.
*/
public async isProxyApprovedForAllAsync(userAddress: string, contractAddress: string): Promise<boolean> {
this._validateProxyContractExistsOrThrow();
const tokenContract = this._getContractFromAddress(contractAddress);
const operator = (this._proxyContract as ERC1155ProxyContract).address;
const didApproveAll = await tokenContract.isApprovedForAll(userAddress, operator).callAsync();
return didApproveAll;
}
public getFungibleTokenIds(): BigNumber[] {
const fungibleTokenIds = _.map(this._fungibleTokenIds, (tokenIdAsString: string) => {
return new BigNumber(tokenIdAsString);
});
return fungibleTokenIds;
}
public getNonFungibleTokenIds(): BigNumber[] {
const nonFungibleTokenIds = _.map(this._nonFungibleTokenIds, (tokenIdAsString: string) => {
return new BigNumber(tokenIdAsString);
});
return nonFungibleTokenIds;
}
public getTokenOwnerAddresses(): string[] {
return this._tokenOwnerAddresses;
}
public getContractWrapper(contractAddress: string): Erc1155Wrapper {
const tokenWrapper = _.find(this._dummyTokenWrappers, (wrapper: Erc1155Wrapper) => {
return wrapper.getContract().address === contractAddress;
});
if (tokenWrapper === undefined) {
throw new Error(`Contract: ${contractAddress} was not deployed through ERC1155ProxyWrapper`);
}
return tokenWrapper;
}
private _getContractFromAddress(tokenAddress: string): ERC1155MintableContract {
const tokenContractIfExists = _.find(this._dummyTokenWrappers, c => c.getContract().address === tokenAddress);
if (tokenContractIfExists === undefined) {
throw new Error(`Token: ${tokenAddress} was not deployed through ERC1155ProxyWrapper`);
}
return tokenContractIfExists.getContract();
}
private _validateDummyTokenContractsExistOrThrow(): void {
if (this._dummyTokenWrappers === undefined) {
throw new Error('Dummy ERC1155 tokens not yet deployed, please call "deployDummyTokensAsync"');
}
}
private _validateProxyContractExistsOrThrow(): void {
if (this._proxyContract === undefined) {
throw new Error('ERC1155 proxy contract not yet deployed, please call "deployProxyAsync"');
}
}
private _validateBalancesAndAllowancesSetOrThrow(): void {
if (
_.keys(this._initialTokenIdsByOwner.fungible).length === 0 ||
_.keys(this._initialTokenIdsByOwner.nonFungible).length === 0
) {
throw new Error(
'Dummy ERC1155 balances and allowances not yet set, please call "setBalancesAndAllowancesAsync"',
);
}
}
}

View File

@@ -0,0 +1,164 @@
import { artifacts as erc20Artifacts, DummyERC20TokenContract } from '@0x/contracts-erc20';
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';
import { ZeroExProvider } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import { ERC20ProxyContract, IAssetDataContract } from './wrappers';
export class ERC20Wrapper {
private readonly _tokenOwnerAddresses: string[];
private readonly _contractOwnerAddress: string;
private readonly _provider: ZeroExProvider;
private readonly _dummyTokenContracts: DummyERC20TokenContract[];
private readonly _assetDataInterface: IAssetDataContract;
private _proxyContract?: ERC20ProxyContract;
private _proxyIdIfExists?: string;
/**
* Instanitates an ERC20Wrapper
* @param provider Web3 provider to use for all JSON RPC requests
* @param tokenOwnerAddresses Addresses that we want to endow as owners for dummy ERC20 tokens
* @param contractOwnerAddress Desired owner of the contract
* Instance of ERC20Wrapper
*/
constructor(provider: ZeroExProvider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
this._dummyTokenContracts = [];
this._provider = provider;
this._tokenOwnerAddresses = tokenOwnerAddresses;
this._contractOwnerAddress = contractOwnerAddress;
this._assetDataInterface = new IAssetDataContract(constants.NULL_ADDRESS, provider);
}
public async deployDummyTokensAsync(
numberToDeploy: number,
decimals: BigNumber,
): Promise<DummyERC20TokenContract[]> {
for (let i = 0; i < numberToDeploy; i++) {
this._dummyTokenContracts.push(
await DummyERC20TokenContract.deployFrom0xArtifactAsync(
erc20Artifacts.DummyERC20Token,
this._provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
decimals,
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
),
);
}
return this._dummyTokenContracts;
}
public async deployProxyAsync(): Promise<ERC20ProxyContract> {
this._proxyContract = await ERC20ProxyContract.deployFrom0xArtifactAsync(
artifacts.ERC20Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId().callAsync();
return this._proxyContract;
}
public getProxyId(): string {
this._validateProxyContractExistsOrThrow();
return this._proxyIdIfExists as string;
}
public async setBalancesAndAllowancesAsync(): Promise<void> {
this._validateDummyTokenContractsExistOrThrow();
this._validateProxyContractExistsOrThrow();
for (const dummyTokenContract of this._dummyTokenContracts) {
for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
await dummyTokenContract
.setBalance(tokenOwnerAddress, constants.INITIAL_ERC20_BALANCE)
.awaitTransactionSuccessAsync({ from: this._contractOwnerAddress });
await dummyTokenContract
.approve((this._proxyContract as ERC20ProxyContract).address, constants.INITIAL_ERC20_ALLOWANCE)
.awaitTransactionSuccessAsync({ from: tokenOwnerAddress });
}
}
}
public async getBalanceAsync(userAddress: string, assetData: string): Promise<BigNumber> {
const tokenContract = await this._getTokenContractFromAssetDataAsync(assetData);
const balance = new BigNumber(await tokenContract.balanceOf(userAddress).callAsync());
return balance;
}
public async setBalanceAsync(userAddress: string, assetData: string, amount: BigNumber): Promise<void> {
const tokenContract = await this._getTokenContractFromAssetDataAsync(assetData);
await tokenContract
.setBalance(userAddress, amount)
.awaitTransactionSuccessAsync(
{ from: this._contractOwnerAddress },
{ pollingIntervalMs: constants.AWAIT_TRANSACTION_MINED_MS },
);
}
public async getProxyAllowanceAsync(userAddress: string, assetData: string): Promise<BigNumber> {
const tokenContract = await this._getTokenContractFromAssetDataAsync(assetData);
const proxyAddress = (this._proxyContract as ERC20ProxyContract).address;
const allowance = new BigNumber(await tokenContract.allowance(userAddress, proxyAddress).callAsync());
return allowance;
}
public async setAllowanceAsync(userAddress: string, assetData: string, amount: BigNumber): Promise<void> {
const tokenContract = await this._getTokenContractFromAssetDataAsync(assetData);
const proxyAddress = (this._proxyContract as ERC20ProxyContract).address;
await tokenContract.approve(proxyAddress, amount).awaitTransactionSuccessAsync({ from: userAddress });
}
public async getBalancesAsync(): Promise<ERC20BalancesByOwner> {
this._validateDummyTokenContractsExistOrThrow();
const balancesByOwner: ERC20BalancesByOwner = {};
const balances: BigNumber[] = [];
const balanceInfo: Array<{ tokenOwnerAddress: string; tokenAddress: string }> = [];
for (const dummyTokenContract of this._dummyTokenContracts) {
for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
balances.push(await dummyTokenContract.balanceOf(tokenOwnerAddress).callAsync());
balanceInfo.push({
tokenOwnerAddress,
tokenAddress: dummyTokenContract.address,
});
}
}
_.forEach(balances, (balance, balanceIndex) => {
const tokenAddress = balanceInfo[balanceIndex].tokenAddress;
const tokenOwnerAddress = balanceInfo[balanceIndex].tokenOwnerAddress;
if (balancesByOwner[tokenOwnerAddress] === undefined) {
balancesByOwner[tokenOwnerAddress] = {};
}
const wrappedBalance = new BigNumber(balance);
balancesByOwner[tokenOwnerAddress][tokenAddress] = wrappedBalance;
});
return balancesByOwner;
}
public addDummyTokenContract(dummy: DummyERC20TokenContract): void {
if (this._dummyTokenContracts !== undefined) {
this._dummyTokenContracts.push(dummy);
}
}
public addTokenOwnerAddress(address: string): void {
this._tokenOwnerAddresses.push(address);
}
public getTokenOwnerAddresses(): string[] {
return this._tokenOwnerAddresses;
}
public getTokenAddresses(): string[] {
const tokenAddresses = _.map(this._dummyTokenContracts, dummyTokenContract => dummyTokenContract.address);
return tokenAddresses;
}
private async _getTokenContractFromAssetDataAsync(assetData: string): Promise<DummyERC20TokenContract> {
const tokenAddress = this._assetDataInterface.getABIDecodedTransactionData<string>('ERC20Token', assetData); // tslint:disable-line:no-unused-variable
const tokenContractIfExists = _.find(this._dummyTokenContracts, c => c.address === tokenAddress);
if (tokenContractIfExists === undefined) {
throw new Error(`Token: ${tokenAddress} was not deployed through ERC20Wrapper`);
}
return tokenContractIfExists;
}
private _validateDummyTokenContractsExistOrThrow(): void {
if (this._dummyTokenContracts === undefined) {
throw new Error('Dummy ERC20 tokens not yet deployed, please call "deployDummyTokensAsync"');
}
}
private _validateProxyContractExistsOrThrow(): void {
if (this._proxyContract === undefined) {
throw new Error('ERC20 proxy contract not yet deployed, please call "deployProxyAsync"');
}
}
}

View File

@@ -0,0 +1,220 @@
import { artifacts as erc721Artifacts, DummyERC721TokenContract } from '@0x/contracts-erc721';
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
import { generatePseudoRandomSalt } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import { ZeroExProvider } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import { ERC721ProxyContract } from './wrappers';
export class ERC721Wrapper {
private readonly _tokenOwnerAddresses: string[];
private readonly _contractOwnerAddress: string;
private readonly _provider: ZeroExProvider;
private readonly _dummyTokenContracts: DummyERC721TokenContract[];
private _proxyContract?: ERC721ProxyContract;
private _proxyIdIfExists?: string;
private _initialTokenIdsByOwner: ERC721TokenIdsByOwner = {};
constructor(provider: ZeroExProvider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
this._provider = provider;
this._dummyTokenContracts = [];
this._tokenOwnerAddresses = tokenOwnerAddresses;
this._contractOwnerAddress = contractOwnerAddress;
}
public async deployDummyTokensAsync(): Promise<DummyERC721TokenContract[]> {
// tslint:disable-next-line:no-unused-variable
for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
this._dummyTokenContracts.push(
await DummyERC721TokenContract.deployFrom0xArtifactAsync(
erc721Artifacts.DummyERC721Token,
this._provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
),
);
}
return this._dummyTokenContracts;
}
public async deployProxyAsync(): Promise<ERC721ProxyContract> {
this._proxyContract = await ERC721ProxyContract.deployFrom0xArtifactAsync(
artifacts.ERC721Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId().callAsync();
return this._proxyContract;
}
public getProxyId(): string {
this._validateProxyContractExistsOrThrow();
return this._proxyIdIfExists as string;
}
public async setBalancesAndAllowancesAsync(): Promise<void> {
this._validateDummyTokenContractsExistOrThrow();
this._validateProxyContractExistsOrThrow();
this._initialTokenIdsByOwner = {};
for (const dummyTokenContract of this._dummyTokenContracts) {
for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
// tslint:disable-next-line:no-unused-variable
for (const i of _.times(constants.NUM_ERC721_TOKENS_TO_MINT)) {
const tokenId = generatePseudoRandomSalt();
await this.mintAsync(dummyTokenContract.address, tokenId, tokenOwnerAddress);
if (this._initialTokenIdsByOwner[tokenOwnerAddress] === undefined) {
this._initialTokenIdsByOwner[tokenOwnerAddress] = {
[dummyTokenContract.address]: [],
};
}
if (this._initialTokenIdsByOwner[tokenOwnerAddress][dummyTokenContract.address] === undefined) {
this._initialTokenIdsByOwner[tokenOwnerAddress][dummyTokenContract.address] = [];
}
this._initialTokenIdsByOwner[tokenOwnerAddress][dummyTokenContract.address].push(tokenId);
await this.approveProxyForAllAsync(dummyTokenContract.address, tokenOwnerAddress, true);
}
}
}
}
public async doesTokenExistAsync(tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const owner = await tokenContract.ownerOf(tokenId).callAsync();
const doesExist = owner !== constants.NULL_ADDRESS;
return doesExist;
}
public async approveProxyAsync(tokenAddress: string, tokenId: BigNumber): Promise<void> {
const proxyAddress = (this._proxyContract as ERC721ProxyContract).address;
await this.approveAsync(proxyAddress, tokenAddress, tokenId);
}
public async approveProxyForAllAsync(
tokenAddress: string,
ownerAddress: string,
isApproved: boolean,
): Promise<void> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const proxyAddress = (this._proxyContract as ERC721ProxyContract).address;
await tokenContract.setApprovalForAll(proxyAddress, isApproved).awaitTransactionSuccessAsync({
from: ownerAddress,
});
}
public async approveAsync(to: string, tokenAddress: string, tokenId: BigNumber): Promise<void> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const tokenOwner = await this.ownerOfAsync(tokenAddress, tokenId);
await tokenContract.approve(to, tokenId).awaitTransactionSuccessAsync({ from: tokenOwner });
}
public async transferFromAsync(
tokenAddress: string,
tokenId: BigNumber,
currentOwner: string,
userAddress: string,
): Promise<void> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
await tokenContract.transferFrom(currentOwner, userAddress, tokenId).awaitTransactionSuccessAsync({
from: currentOwner,
});
}
public async mintAsync(tokenAddress: string, tokenId: BigNumber, userAddress: string): Promise<void> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
await tokenContract.mint(userAddress, tokenId).awaitTransactionSuccessAsync({
from: this._contractOwnerAddress,
});
}
public async burnAsync(tokenAddress: string, tokenId: BigNumber, owner: string): Promise<void> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
await tokenContract.burn(owner, tokenId).awaitTransactionSuccessAsync({ from: this._contractOwnerAddress });
}
public async ownerOfAsync(tokenAddress: string, tokenId: BigNumber): Promise<string> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const owner = await tokenContract.ownerOf(tokenId).callAsync();
return owner;
}
public async isOwnerAsync(userAddress: string, tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const tokenOwner = await tokenContract.ownerOf(tokenId).callAsync();
const isOwner = tokenOwner === userAddress;
return isOwner;
}
public async isProxyApprovedForAllAsync(userAddress: string, tokenAddress: string): Promise<boolean> {
this._validateProxyContractExistsOrThrow();
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const operator = (this._proxyContract as ERC721ProxyContract).address;
const didApproveAll = await tokenContract.isApprovedForAll(userAddress, operator).callAsync();
return didApproveAll;
}
public async isProxyApprovedAsync(tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
this._validateProxyContractExistsOrThrow();
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const approvedAddress = await tokenContract.getApproved(tokenId).callAsync();
const proxyAddress = (this._proxyContract as ERC721ProxyContract).address;
const isProxyAnApprovedOperator = approvedAddress === proxyAddress;
return isProxyAnApprovedOperator;
}
public async getBalancesAsync(): Promise<ERC721TokenIdsByOwner> {
this._validateDummyTokenContractsExistOrThrow();
this._validateBalancesAndAllowancesSetOrThrow();
const tokenIdsByOwner: ERC721TokenIdsByOwner = {};
const tokenOwnerAddresses: string[] = [];
const tokenInfo: Array<{ tokenId: BigNumber; tokenAddress: string }> = [];
for (const dummyTokenContract of this._dummyTokenContracts) {
for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
const initialTokenOwnerIds = this._initialTokenIdsByOwner[tokenOwnerAddress][
dummyTokenContract.address
];
for (const tokenId of initialTokenOwnerIds) {
tokenOwnerAddresses.push(await dummyTokenContract.ownerOf(tokenId).callAsync());
tokenInfo.push({
tokenId,
tokenAddress: dummyTokenContract.address,
});
}
}
}
_.forEach(tokenOwnerAddresses, (tokenOwnerAddress, ownerIndex) => {
const tokenAddress = tokenInfo[ownerIndex].tokenAddress;
const tokenId = tokenInfo[ownerIndex].tokenId;
if (tokenIdsByOwner[tokenOwnerAddress] === undefined) {
tokenIdsByOwner[tokenOwnerAddress] = {
[tokenAddress]: [],
};
}
if (tokenIdsByOwner[tokenOwnerAddress][tokenAddress] === undefined) {
tokenIdsByOwner[tokenOwnerAddress][tokenAddress] = [];
}
tokenIdsByOwner[tokenOwnerAddress][tokenAddress].push(tokenId);
});
return tokenIdsByOwner;
}
public getTokenOwnerAddresses(): string[] {
return this._tokenOwnerAddresses;
}
public getTokenAddresses(): string[] {
const tokenAddresses = _.map(this._dummyTokenContracts, dummyTokenContract => dummyTokenContract.address);
return tokenAddresses;
}
private _getTokenContractFromAssetData(tokenAddress: string): DummyERC721TokenContract {
const tokenContractIfExists = _.find(this._dummyTokenContracts, c => c.address === tokenAddress);
if (tokenContractIfExists === undefined) {
throw new Error(`Token: ${tokenAddress} was not deployed through ERC20Wrapper`);
}
return tokenContractIfExists;
}
private _validateDummyTokenContractsExistOrThrow(): void {
if (this._dummyTokenContracts === undefined) {
throw new Error('Dummy ERC721 tokens not yet deployed, please call "deployDummyTokensAsync"');
}
}
private _validateProxyContractExistsOrThrow(): void {
if (this._proxyContract === undefined) {
throw new Error('ERC721 proxy contract not yet deployed, please call "deployProxyAsync"');
}
}
private _validateBalancesAndAllowancesSetOrThrow(): void {
if (_.keys(this._initialTokenIdsByOwner).length === 0) {
throw new Error(
'Dummy ERC721 balances and allowances not yet set, please call "setBalancesAndAllowancesAsync"',
);
}
}
}

View File

@@ -0,0 +1,92 @@
export { artifacts } from './artifacts';
export {
BalancerBridgeContract,
ChaiBridgeContract,
ERC1155ProxyContract,
ERC20BridgeProxyContract,
ERC20ProxyContract,
ERC721ProxyContract,
Eth2DaiBridgeContract,
DydxBridgeContract,
IAssetDataContract,
IAssetProxyContract,
IChaiContract,
IDydxContract,
KyberBridgeContract,
MultiAssetProxyContract,
StaticCallProxyContract,
TestDydxBridgeContract,
TestStaticCallTargetContract,
UniswapBridgeContract,
} from './wrappers';
export { ERC20Wrapper } from './erc20_wrapper';
export { ERC721Wrapper } from './erc721_wrapper';
export { ERC1155ProxyWrapper } from './erc1155_proxy_wrapper';
export { ERC1155MintableContract, Erc1155Wrapper } from '@0x/contracts-erc1155';
export { DummyERC20TokenContract } from '@0x/contracts-erc20';
export { DummyERC721TokenContract } from '@0x/contracts-erc721';
export { AssetProxyId } from '@0x/types';
export {
ERC1155HoldingsByOwner,
ERC20BalancesByOwner,
ERC721TokenIdsByOwner,
ERC1155FungibleHoldingsByOwner,
ERC1155NonFungibleHoldingsByOwner,
} from '@0x/contracts-test-utils';
export {
TransactionReceiptWithDecodedLogs,
Provider,
ZeroExProvider,
JSONRPCRequestPayload,
JSONRPCErrorCallback,
TransactionReceiptStatus,
JSONRPCResponsePayload,
JSONRPCResponseError,
ContractArtifact,
ContractChains,
CompilerOpts,
StandardContractOutput,
CompilerSettings,
ContractChainData,
ContractAbi,
DevdocOutput,
EvmOutput,
CompilerSettingsMetadata,
OptimizerSettings,
OutputField,
ParamDescription,
EvmBytecodeOutput,
EvmBytecodeOutputLinkReferences,
AbiDefinition,
FunctionAbi,
EventAbi,
RevertErrorAbi,
EventParameter,
DataItem,
MethodAbi,
ConstructorAbi,
FallbackAbi,
ConstructorStateMutability,
TupleDataItem,
StateMutability,
} from 'ethereum-types';
export {
decodeERC1155AssetData,
decodeERC20AssetData,
decodeERC20BridgeAssetData,
decodeERC721AssetData,
decodeMultiAssetData,
decodeStaticCallAssetData,
encodeERC1155AssetData,
encodeERC20AssetData,
encodeERC20BridgeAssetData,
encodeERC721AssetData,
encodeMultiAssetData,
encodeStaticCallAssetData,
getAssetDataProxyId,
} from './asset_data';
export * from './dydx_bridge_encoder';
export * from './dex_forwarder_bridge';

View File

@@ -0,0 +1,49 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/balancer_bridge';
export * from '../generated-wrappers/chai_bridge';
export * from '../generated-wrappers/curve_bridge';
export * from '../generated-wrappers/dex_forwarder_bridge';
export * from '../generated-wrappers/dydx_bridge';
export * from '../generated-wrappers/erc1155_proxy';
export * from '../generated-wrappers/erc20_bridge_proxy';
export * from '../generated-wrappers/erc20_proxy';
export * from '../generated-wrappers/erc721_proxy';
export * from '../generated-wrappers/eth2_dai_bridge';
export * from '../generated-wrappers/i_asset_data';
export * from '../generated-wrappers/i_asset_proxy';
export * from '../generated-wrappers/i_asset_proxy_dispatcher';
export * from '../generated-wrappers/i_authorizable';
export * from '../generated-wrappers/i_balancer_pool';
export * from '../generated-wrappers/i_chai';
export * from '../generated-wrappers/i_curve';
export * from '../generated-wrappers/i_dydx';
export * from '../generated-wrappers/i_dydx_bridge';
export * from '../generated-wrappers/i_erc20_bridge';
export * from '../generated-wrappers/i_eth2_dai';
export * from '../generated-wrappers/i_gas_token';
export * from '../generated-wrappers/i_kyber_network_proxy';
export * from '../generated-wrappers/i_uniswap_exchange';
export * from '../generated-wrappers/i_uniswap_exchange_factory';
export * from '../generated-wrappers/i_uniswap_v2_router01';
export * from '../generated-wrappers/kyber_bridge';
export * from '../generated-wrappers/mixin_asset_proxy_dispatcher';
export * from '../generated-wrappers/mixin_authorizable';
export * from '../generated-wrappers/mixin_gas_token';
export * from '../generated-wrappers/multi_asset_proxy';
export * from '../generated-wrappers/ownable';
export * from '../generated-wrappers/static_call_proxy';
export * from '../generated-wrappers/test_chai_bridge';
export * from '../generated-wrappers/test_dex_forwarder_bridge';
export * from '../generated-wrappers/test_dydx_bridge';
export * from '../generated-wrappers/test_erc20_bridge';
export * from '../generated-wrappers/test_eth2_dai_bridge';
export * from '../generated-wrappers/test_kyber_bridge';
export * from '../generated-wrappers/test_static_call_target';
export * from '../generated-wrappers/test_uniswap_bridge';
export * from '../generated-wrappers/test_uniswap_v2_bridge';
export * from '../generated-wrappers/uniswap_bridge';
export * from '../generated-wrappers/uniswap_v2_bridge';

View File

@@ -0,0 +1,97 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as BalancerBridge from '../test/generated-artifacts/BalancerBridge.json';
import * as ChaiBridge from '../test/generated-artifacts/ChaiBridge.json';
import * as CurveBridge from '../test/generated-artifacts/CurveBridge.json';
import * as DexForwarderBridge from '../test/generated-artifacts/DexForwarderBridge.json';
import * as DydxBridge from '../test/generated-artifacts/DydxBridge.json';
import * as ERC1155Proxy from '../test/generated-artifacts/ERC1155Proxy.json';
import * as ERC20BridgeProxy from '../test/generated-artifacts/ERC20BridgeProxy.json';
import * as ERC20Proxy from '../test/generated-artifacts/ERC20Proxy.json';
import * as ERC721Proxy from '../test/generated-artifacts/ERC721Proxy.json';
import * as Eth2DaiBridge from '../test/generated-artifacts/Eth2DaiBridge.json';
import * as IAssetData from '../test/generated-artifacts/IAssetData.json';
import * as IAssetProxy from '../test/generated-artifacts/IAssetProxy.json';
import * as IAssetProxyDispatcher from '../test/generated-artifacts/IAssetProxyDispatcher.json';
import * as IAuthorizable from '../test/generated-artifacts/IAuthorizable.json';
import * as IBalancerPool from '../test/generated-artifacts/IBalancerPool.json';
import * as IChai from '../test/generated-artifacts/IChai.json';
import * as ICurve from '../test/generated-artifacts/ICurve.json';
import * as IDydx from '../test/generated-artifacts/IDydx.json';
import * as IDydxBridge from '../test/generated-artifacts/IDydxBridge.json';
import * as IERC20Bridge from '../test/generated-artifacts/IERC20Bridge.json';
import * as IEth2Dai from '../test/generated-artifacts/IEth2Dai.json';
import * as IGasToken from '../test/generated-artifacts/IGasToken.json';
import * as IKyberNetworkProxy from '../test/generated-artifacts/IKyberNetworkProxy.json';
import * as IUniswapExchange from '../test/generated-artifacts/IUniswapExchange.json';
import * as IUniswapExchangeFactory from '../test/generated-artifacts/IUniswapExchangeFactory.json';
import * as IUniswapV2Router01 from '../test/generated-artifacts/IUniswapV2Router01.json';
import * as KyberBridge from '../test/generated-artifacts/KyberBridge.json';
import * as MixinAssetProxyDispatcher from '../test/generated-artifacts/MixinAssetProxyDispatcher.json';
import * as MixinAuthorizable from '../test/generated-artifacts/MixinAuthorizable.json';
import * as MixinGasToken from '../test/generated-artifacts/MixinGasToken.json';
import * as MultiAssetProxy from '../test/generated-artifacts/MultiAssetProxy.json';
import * as Ownable from '../test/generated-artifacts/Ownable.json';
import * as StaticCallProxy from '../test/generated-artifacts/StaticCallProxy.json';
import * as TestChaiBridge from '../test/generated-artifacts/TestChaiBridge.json';
import * as TestDexForwarderBridge from '../test/generated-artifacts/TestDexForwarderBridge.json';
import * as TestDydxBridge from '../test/generated-artifacts/TestDydxBridge.json';
import * as TestERC20Bridge from '../test/generated-artifacts/TestERC20Bridge.json';
import * as TestEth2DaiBridge from '../test/generated-artifacts/TestEth2DaiBridge.json';
import * as TestKyberBridge from '../test/generated-artifacts/TestKyberBridge.json';
import * as TestStaticCallTarget from '../test/generated-artifacts/TestStaticCallTarget.json';
import * as TestUniswapBridge from '../test/generated-artifacts/TestUniswapBridge.json';
import * as TestUniswapV2Bridge from '../test/generated-artifacts/TestUniswapV2Bridge.json';
import * as UniswapBridge from '../test/generated-artifacts/UniswapBridge.json';
import * as UniswapV2Bridge from '../test/generated-artifacts/UniswapV2Bridge.json';
export const artifacts = {
MixinAssetProxyDispatcher: MixinAssetProxyDispatcher as ContractArtifact,
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
Ownable: Ownable as ContractArtifact,
ERC1155Proxy: ERC1155Proxy as ContractArtifact,
ERC20BridgeProxy: ERC20BridgeProxy as ContractArtifact,
ERC20Proxy: ERC20Proxy as ContractArtifact,
ERC721Proxy: ERC721Proxy as ContractArtifact,
MultiAssetProxy: MultiAssetProxy as ContractArtifact,
StaticCallProxy: StaticCallProxy as ContractArtifact,
BalancerBridge: BalancerBridge as ContractArtifact,
ChaiBridge: ChaiBridge as ContractArtifact,
CurveBridge: CurveBridge as ContractArtifact,
DexForwarderBridge: DexForwarderBridge as ContractArtifact,
DydxBridge: DydxBridge as ContractArtifact,
Eth2DaiBridge: Eth2DaiBridge as ContractArtifact,
KyberBridge: KyberBridge as ContractArtifact,
MixinGasToken: MixinGasToken as ContractArtifact,
UniswapBridge: UniswapBridge as ContractArtifact,
UniswapV2Bridge: UniswapV2Bridge as ContractArtifact,
IAssetData: IAssetData as ContractArtifact,
IAssetProxy: IAssetProxy as ContractArtifact,
IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
IAuthorizable: IAuthorizable as ContractArtifact,
IBalancerPool: IBalancerPool as ContractArtifact,
IChai: IChai as ContractArtifact,
ICurve: ICurve as ContractArtifact,
IDydx: IDydx as ContractArtifact,
IDydxBridge: IDydxBridge as ContractArtifact,
IERC20Bridge: IERC20Bridge as ContractArtifact,
IEth2Dai: IEth2Dai as ContractArtifact,
IGasToken: IGasToken as ContractArtifact,
IKyberNetworkProxy: IKyberNetworkProxy as ContractArtifact,
IUniswapExchange: IUniswapExchange as ContractArtifact,
IUniswapExchangeFactory: IUniswapExchangeFactory as ContractArtifact,
IUniswapV2Router01: IUniswapV2Router01 as ContractArtifact,
TestChaiBridge: TestChaiBridge as ContractArtifact,
TestDexForwarderBridge: TestDexForwarderBridge as ContractArtifact,
TestDydxBridge: TestDydxBridge as ContractArtifact,
TestERC20Bridge: TestERC20Bridge as ContractArtifact,
TestEth2DaiBridge: TestEth2DaiBridge as ContractArtifact,
TestKyberBridge: TestKyberBridge as ContractArtifact,
TestStaticCallTarget: TestStaticCallTarget as ContractArtifact,
TestUniswapBridge: TestUniswapBridge as ContractArtifact,
TestUniswapV2Bridge: TestUniswapV2Bridge as ContractArtifact,
};

View File

@@ -0,0 +1,128 @@
import { blockchainTests, expect, provider, txDefaults, web3Wrapper } from '@0x/contracts-test-utils';
import { RevertReason } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { artifacts } from './artifacts';
import { MixinAuthorizableContract } from './wrappers';
blockchainTests.resets('Authorizable', () => {
let owner: string;
let notOwner: string;
let address: string;
let authorizable: MixinAuthorizableContract;
before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
[owner, address, notOwner] = accounts.slice(0, 3);
authorizable = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
artifacts.MixinAuthorizable,
provider,
txDefaults,
artifacts,
);
});
describe('addAuthorizedAddress', () => {
it('should revert if not called by owner', async () => {
const tx = authorizable.addAuthorizedAddress(notOwner).sendTransactionAsync({ from: notOwner });
return expect(tx).to.revertWith(RevertReason.OnlyContractOwner);
});
it('should allow owner to add an authorized address', async () => {
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const isAuthorized = await authorizable.authorized(address).callAsync();
expect(isAuthorized).to.be.true();
});
it('should revert if owner attempts to authorize a duplicate address', async () => {
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const tx = authorizable.addAuthorizedAddress(address).sendTransactionAsync({ from: owner });
return expect(tx).to.revertWith(RevertReason.TargetAlreadyAuthorized);
});
});
describe('removeAuthorizedAddress', () => {
it('should revert if not called by owner', async () => {
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const tx = authorizable.removeAuthorizedAddress(address).sendTransactionAsync({ from: notOwner });
return expect(tx).to.revertWith(RevertReason.OnlyContractOwner);
});
it('should allow owner to remove an authorized address', async () => {
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
await authorizable.removeAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const isAuthorized = await authorizable.authorized(address).callAsync();
expect(isAuthorized).to.be.false();
});
it('should revert if owner attempts to remove an address that is not authorized', async () => {
const tx = authorizable.removeAuthorizedAddress(address).sendTransactionAsync({ from: owner });
return expect(tx).to.revertWith(RevertReason.TargetNotAuthorized);
});
});
describe('removeAuthorizedAddressAtIndex', () => {
it('should revert if not called by owner', async () => {
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const index = new BigNumber(0);
const tx = authorizable
.removeAuthorizedAddressAtIndex(address, index)
.sendTransactionAsync({ from: notOwner });
return expect(tx).to.revertWith(RevertReason.OnlyContractOwner);
});
it('should revert if index is >= authorities.length', async () => {
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const index = new BigNumber(1);
const tx = authorizable
.removeAuthorizedAddressAtIndex(address, index)
.sendTransactionAsync({ from: owner });
return expect(tx).to.revertWith(RevertReason.IndexOutOfBounds);
});
it('should revert if owner attempts to remove an address that is not authorized', async () => {
const index = new BigNumber(0);
const tx = authorizable
.removeAuthorizedAddressAtIndex(address, index)
.sendTransactionAsync({ from: owner });
return expect(tx).to.revertWith(RevertReason.TargetNotAuthorized);
});
it('should revert if address at index does not match target', async () => {
const address1 = address;
const address2 = notOwner;
await authorizable.addAuthorizedAddress(address1).awaitTransactionSuccessAsync({ from: owner });
await authorizable.addAuthorizedAddress(address2).awaitTransactionSuccessAsync({ from: owner });
const address1Index = new BigNumber(0);
const tx = authorizable
.removeAuthorizedAddressAtIndex(address2, address1Index)
.sendTransactionAsync({ from: owner });
return expect(tx).to.revertWith(RevertReason.AuthorizedAddressMismatch);
});
it('should allow owner to remove an authorized address', async () => {
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const index = new BigNumber(0);
await authorizable.removeAuthorizedAddressAtIndex(address, index).awaitTransactionSuccessAsync({
from: owner,
});
const isAuthorized = await authorizable.authorized(address).callAsync();
expect(isAuthorized).to.be.false();
});
});
describe('getAuthorizedAddresses', () => {
it('should return all authorized addresses', async () => {
const initial = await authorizable.getAuthorizedAddresses().callAsync();
expect(initial).to.have.length(0);
await authorizable.addAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const afterAdd = await authorizable.getAuthorizedAddresses().callAsync();
expect(afterAdd).to.have.length(1);
expect(afterAdd).to.include(address);
await authorizable.removeAuthorizedAddress(address).awaitTransactionSuccessAsync({ from: owner });
const afterRemove = await authorizable.getAuthorizedAddresses().callAsync();
expect(afterRemove).to.have.length(0);
});
});
});

View File

@@ -0,0 +1,60 @@
import { ERC20TokenContract } from '@0x/contracts-erc20';
import { blockchainTests, constants, expect, randomAddress } from '@0x/contracts-test-utils';
import { AssetProxyId, RevertReason } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { artifacts } from './artifacts';
import { TestChaiBridgeContract } from './wrappers';
blockchainTests.resets('ChaiBridge unit tests', env => {
let chaiBridgeContract: TestChaiBridgeContract;
let testDaiContract: ERC20TokenContract;
let fromAddress: string;
let toAddress: string;
const alwaysRevertAddress = '0x0000000000000000000000000000000000000001';
const amount = new BigNumber(1);
before(async () => {
[fromAddress, toAddress] = await env.getAccountAddressesAsync();
chaiBridgeContract = await TestChaiBridgeContract.deployFrom0xArtifactAsync(
artifacts.TestChaiBridge,
env.provider,
env.txDefaults,
artifacts,
);
const testChaiDaiAddress = await chaiBridgeContract.testChaiDai().callAsync();
testDaiContract = new ERC20TokenContract(testChaiDaiAddress, env.provider, env.txDefaults);
});
describe('bridgeTransferFrom()', () => {
it('fails if not called by ERC20BridgeProxy', async () => {
return expect(
chaiBridgeContract
.bridgeTransferFrom(randomAddress(), fromAddress, toAddress, amount, constants.NULL_BYTES)
.awaitTransactionSuccessAsync({ from: alwaysRevertAddress }),
).to.revertWith(RevertReason.ChaiBridgeOnlyCallableByErc20BridgeProxy);
});
it('returns magic bytes upon success', async () => {
const magicBytes = await chaiBridgeContract
.bridgeTransferFrom(randomAddress(), fromAddress, toAddress, amount, constants.NULL_BYTES)
.callAsync();
expect(magicBytes).to.eq(AssetProxyId.ERC20Bridge);
});
it('should increase the Dai balance of `toAddress` by `amount` if successful', async () => {
const initialBalance = await testDaiContract.balanceOf(toAddress).callAsync();
await chaiBridgeContract
.bridgeTransferFrom(randomAddress(), fromAddress, toAddress, amount, constants.NULL_BYTES)
.awaitTransactionSuccessAsync();
const endBalance = await testDaiContract.balanceOf(toAddress).callAsync();
expect(endBalance).to.bignumber.eq(initialBalance.plus(amount));
});
it('fails if the `chai.draw` call fails', async () => {
return expect(
chaiBridgeContract
.bridgeTransferFrom(randomAddress(), alwaysRevertAddress, toAddress, amount, constants.NULL_BYTES)
.awaitTransactionSuccessAsync(),
).to.revertWith(RevertReason.ChaiBridgeDrawDaiFailed);
});
});
});

View File

@@ -0,0 +1,354 @@
import { ContractTxFunctionObj } from '@0x/contract-wrappers';
import {
blockchainTests,
constants,
expect,
filterLogsToArguments,
getRandomInteger,
randomAddress,
shortZip,
} from '@0x/contracts-test-utils';
import { BigNumber, hexUtils, NULL_ADDRESS } from '@0x/utils';
import { DecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { DexForwarderBridgeCall, dexForwarderBridgeDataEncoder } from '../src/dex_forwarder_bridge';
import { artifacts } from './artifacts';
import {
TestDexForwarderBridgeBridgeTransferFromCalledEventArgs as BtfCalledEventArgs,
TestDexForwarderBridgeContract,
TestDexForwarderBridgeEvents as TestEvents,
} from './wrappers';
const { ZERO_AMOUNT } = constants;
blockchainTests.resets('DexForwarderBridge unit tests', env => {
let testContract: TestDexForwarderBridgeContract;
let inputToken: string;
let outputToken: string;
const BRIDGE_SUCCESS = '0xdc1600f3';
const BRIDGE_FAILURE = '0xffffffff';
const BRIDGE_REVERT_ERROR = 'oopsie';
const NOT_AUTHORIZED_REVERT = 'DexForwarderBridge/SENDER_NOT_AUTHORIZED';
const DEFAULTS = {
toAddress: randomAddress(),
};
before(async () => {
testContract = await TestDexForwarderBridgeContract.deployFrom0xArtifactAsync(
artifacts.TestDexForwarderBridge,
env.provider,
env.txDefaults,
artifacts,
);
// Create test tokens.
[inputToken, outputToken] = [
await callAndTransactAsync(testContract.createToken()),
await callAndTransactAsync(testContract.createToken()),
];
await callAndTransactAsync(testContract.setAuthorized(env.txDefaults.from as string));
});
async function callAndTransactAsync<TResult>(fnCall: ContractTxFunctionObj<TResult>): Promise<TResult> {
const result = await fnCall.callAsync();
await fnCall.awaitTransactionSuccessAsync({}, { shouldValidate: false });
return result;
}
function getRandomBridgeCall(
bridgeAddress: string,
fields: Partial<DexForwarderBridgeCall> = {},
): DexForwarderBridgeCall {
return {
target: bridgeAddress,
inputTokenAmount: getRandomInteger(1, '100e18'),
outputTokenAmount: getRandomInteger(1, '100e18'),
bridgeData: hexUtils.leftPad(inputToken),
...fields,
};
}
describe('bridgeTransferFrom()', () => {
let goodBridgeCalls: DexForwarderBridgeCall[];
let revertingBridgeCall: DexForwarderBridgeCall;
let failingBridgeCall: DexForwarderBridgeCall;
let allBridgeCalls: DexForwarderBridgeCall[];
let totalFillableOutputAmount: BigNumber;
let totalFillableInputAmount: BigNumber;
let recipientOutputBalance: BigNumber;
beforeEach(async () => {
goodBridgeCalls = [];
for (let i = 0; i < 4; ++i) {
goodBridgeCalls.push(await createBridgeCallAsync({ returnCode: BRIDGE_SUCCESS }));
}
revertingBridgeCall = await createBridgeCallAsync({ revertError: BRIDGE_REVERT_ERROR });
failingBridgeCall = await createBridgeCallAsync({ returnCode: BRIDGE_FAILURE });
allBridgeCalls = _.shuffle([failingBridgeCall, revertingBridgeCall, ...goodBridgeCalls]);
totalFillableInputAmount = BigNumber.sum(...goodBridgeCalls.map(c => c.inputTokenAmount));
totalFillableOutputAmount = BigNumber.sum(...goodBridgeCalls.map(c => c.outputTokenAmount));
// Grant the taker some output tokens.
await testContract.setTokenBalance(
outputToken,
DEFAULTS.toAddress,
(recipientOutputBalance = getRandomInteger(1, '100e18')),
);
});
async function setForwarderInputBalanceAsync(amount: BigNumber): Promise<void> {
await testContract
.setTokenBalance(inputToken, testContract.address, amount)
.awaitTransactionSuccessAsync({}, { shouldValidate: false });
}
async function createBridgeCallAsync(
opts: Partial<{
returnCode: string;
revertError: string;
callFields: Partial<DexForwarderBridgeCall>;
outputFillAmount: BigNumber;
}>,
): Promise<DexForwarderBridgeCall> {
const { returnCode, revertError, callFields, outputFillAmount } = {
returnCode: BRIDGE_SUCCESS,
revertError: '',
...opts,
};
const bridge = await callAndTransactAsync(testContract.createBridge(returnCode, revertError));
const call = getRandomBridgeCall(bridge, callFields);
await testContract
.setBridgeTransferAmount(call.target, outputFillAmount || call.outputTokenAmount)
.awaitTransactionSuccessAsync({}, { shouldValidate: false });
return call;
}
async function callBridgeTransferFromAsync(opts: {
bridgeData: string;
sellAmount?: BigNumber;
buyAmount?: BigNumber;
}): Promise<DecodedLogs> {
// Fund the forwarder with input tokens to sell.
await setForwarderInputBalanceAsync(opts.sellAmount || totalFillableInputAmount);
const call = testContract.bridgeTransferFrom(
outputToken,
testContract.address,
DEFAULTS.toAddress,
opts.buyAmount || totalFillableOutputAmount,
opts.bridgeData,
);
const returnCode = await call.callAsync();
if (returnCode !== BRIDGE_SUCCESS) {
throw new Error('Expected BRIDGE_SUCCESS');
}
const receipt = await call.awaitTransactionSuccessAsync({}, { shouldValidate: false });
// tslint:disable-next-line: no-unnecessary-type-assertion
return receipt.logs as DecodedLogs;
}
it('succeeds with no bridge calls and no input balance', async () => {
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls: [],
});
await callBridgeTransferFromAsync({ bridgeData, sellAmount: ZERO_AMOUNT });
});
it('succeeds with bridge calls and no input balance', async () => {
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls: allBridgeCalls,
});
await callBridgeTransferFromAsync({ bridgeData, sellAmount: ZERO_AMOUNT });
});
it('succeeds with no bridge calls and an input balance', async () => {
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls: [],
});
await callBridgeTransferFromAsync({
bridgeData,
sellAmount: new BigNumber(1),
});
});
it('succeeds if entire input token balance is not consumed', async () => {
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls: allBridgeCalls,
});
await callBridgeTransferFromAsync({
bridgeData,
sellAmount: totalFillableInputAmount.plus(1),
});
});
it('fails if not authorized', async () => {
const calls = goodBridgeCalls.slice(0, 1);
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
await callAndTransactAsync(testContract.setAuthorized(NULL_ADDRESS));
return expect(callBridgeTransferFromAsync({ bridgeData, sellAmount: new BigNumber(1) })).to.revertWith(
NOT_AUTHORIZED_REVERT,
);
});
it('succeeds with one bridge call', async () => {
const calls = goodBridgeCalls.slice(0, 1);
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
await callBridgeTransferFromAsync({ bridgeData, sellAmount: calls[0].inputTokenAmount });
});
it('succeeds with many bridge calls', async () => {
const calls = goodBridgeCalls;
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
await callBridgeTransferFromAsync({ bridgeData });
});
it('swallows a failing bridge call', async () => {
const calls = _.shuffle([...goodBridgeCalls, failingBridgeCall]);
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
await callBridgeTransferFromAsync({ bridgeData });
});
it('consumes input tokens for output tokens', async () => {
const calls = allBridgeCalls;
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
await callBridgeTransferFromAsync({ bridgeData });
const currentBridgeInputBalance = await testContract
.balanceOf(inputToken, testContract.address)
.callAsync();
expect(currentBridgeInputBalance).to.bignumber.eq(0);
const currentRecipientOutputBalance = await testContract
.balanceOf(outputToken, DEFAULTS.toAddress)
.callAsync();
expect(currentRecipientOutputBalance).to.bignumber.eq(totalFillableOutputAmount);
});
it("transfers only up to each call's input amount to each bridge", async () => {
const calls = goodBridgeCalls;
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
const logs = await callBridgeTransferFromAsync({ bridgeData });
const btfs = filterLogsToArguments<BtfCalledEventArgs>(logs, TestEvents.BridgeTransferFromCalled);
for (const [call, btf] of shortZip(goodBridgeCalls, btfs)) {
expect(btf.inputTokenBalance).to.bignumber.eq(call.inputTokenAmount);
}
});
it('transfers only up to outstanding sell amount to each bridge', async () => {
// Prepend an extra bridge call.
const calls = [
await createBridgeCallAsync({
callFields: {
inputTokenAmount: new BigNumber(1),
outputTokenAmount: new BigNumber(1),
},
}),
...goodBridgeCalls,
];
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
const logs = await callBridgeTransferFromAsync({ bridgeData });
const btfs = filterLogsToArguments<BtfCalledEventArgs>(logs, TestEvents.BridgeTransferFromCalled);
expect(btfs).to.be.length(goodBridgeCalls.length + 1);
// The last call will receive 1 less token.
const lastCall = calls.slice(-1)[0];
const lastBtf = btfs.slice(-1)[0];
expect(lastBtf.inputTokenBalance).to.bignumber.eq(lastCall.inputTokenAmount.minus(1));
});
it('recoups funds from a bridge that fails', async () => {
// Prepend a call that will take the whole input amount but will
// fail.
const badCall = await createBridgeCallAsync({
callFields: { inputTokenAmount: totalFillableInputAmount },
returnCode: BRIDGE_FAILURE,
});
const calls = [badCall, ...goodBridgeCalls];
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
const logs = await callBridgeTransferFromAsync({ bridgeData });
const btfs = filterLogsToArguments<BtfCalledEventArgs>(logs, TestEvents.BridgeTransferFromCalled);
expect(btfs).to.be.length(goodBridgeCalls.length);
});
it('recoups funds from a bridge that reverts', async () => {
// Prepend a call that will take the whole input amount but will
// revert.
const badCall = await createBridgeCallAsync({
callFields: { inputTokenAmount: totalFillableInputAmount },
revertError: BRIDGE_REVERT_ERROR,
});
const calls = [badCall, ...goodBridgeCalls];
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
const logs = await callBridgeTransferFromAsync({ bridgeData });
const btfs = filterLogsToArguments<BtfCalledEventArgs>(logs, TestEvents.BridgeTransferFromCalled);
expect(btfs).to.be.length(goodBridgeCalls.length);
});
it('recoups funds from a bridge that under-pays', async () => {
// Prepend a call that will take the whole input amount but will
// underpay the output amount..
const badCall = await createBridgeCallAsync({
callFields: {
inputTokenAmount: totalFillableInputAmount,
outputTokenAmount: new BigNumber(2),
},
outputFillAmount: new BigNumber(1),
});
const calls = [badCall, ...goodBridgeCalls];
const bridgeData = dexForwarderBridgeDataEncoder.encode({
inputToken,
calls,
});
const logs = await callBridgeTransferFromAsync({ bridgeData });
const btfs = filterLogsToArguments<BtfCalledEventArgs>(logs, TestEvents.BridgeTransferFromCalled);
expect(btfs).to.be.length(goodBridgeCalls.length);
});
});
describe('executeBridgeCall()', () => {
it('cannot be called externally', async () => {
return expect(
testContract
.executeBridgeCall(
randomAddress(),
randomAddress(),
randomAddress(),
randomAddress(),
new BigNumber(1),
new BigNumber(1),
constants.NULL_BYTES,
)
.callAsync(),
).to.revertWith('DexForwarderBridge/ONLY_SELF');
});
});
});

View File

@@ -0,0 +1,399 @@
import { LibMathRevertErrors } from '@0x/contracts-exchange-libs';
import { blockchainTests, constants, expect, verifyEventsFromLogs } from '@0x/contracts-test-utils';
import { AssetProxyId, RevertReason } from '@0x/types';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { DydxBridgeActionType, DydxBridgeData, dydxBridgeDataEncoder } from '../src/dydx_bridge_encoder';
import { ERC20BridgeProxyContract, IAssetDataContract } from '../src/wrappers';
import { artifacts } from './artifacts';
import { TestDydxBridgeContract, TestDydxBridgeEvents } from './wrappers';
blockchainTests.resets('DydxBridge unit tests', env => {
const defaultAccountNumber = new BigNumber(1);
const marketId = new BigNumber(2);
const defaultAmount = new BigNumber(4);
const notAuthorized = '0x0000000000000000000000000000000000000001';
const defaultDepositAction = {
actionType: DydxBridgeActionType.Deposit,
accountIdx: constants.ZERO_AMOUNT,
marketId,
conversionRateNumerator: constants.ZERO_AMOUNT,
conversionRateDenominator: constants.ZERO_AMOUNT,
};
const defaultWithdrawAction = {
actionType: DydxBridgeActionType.Withdraw,
accountIdx: constants.ZERO_AMOUNT,
marketId,
conversionRateNumerator: constants.ZERO_AMOUNT,
conversionRateDenominator: constants.ZERO_AMOUNT,
};
let testContract: TestDydxBridgeContract;
let testProxyContract: ERC20BridgeProxyContract;
let assetDataEncoder: IAssetDataContract;
let owner: string;
let authorized: string;
let accountOwner: string;
let receiver: string;
before(async () => {
// Get accounts
const accounts = await env.web3Wrapper.getAvailableAddressesAsync();
[owner, authorized, accountOwner, receiver] = accounts;
// Deploy dydx bridge
testContract = await TestDydxBridgeContract.deployFrom0xArtifactAsync(
artifacts.TestDydxBridge,
env.provider,
env.txDefaults,
artifacts,
[accountOwner, receiver],
);
// Deploy test erc20 bridge proxy
testProxyContract = await ERC20BridgeProxyContract.deployFrom0xArtifactAsync(
artifacts.ERC20BridgeProxy,
env.provider,
env.txDefaults,
artifacts,
);
await testProxyContract.addAuthorizedAddress(authorized).awaitTransactionSuccessAsync({ from: owner });
// Setup asset data encoder
assetDataEncoder = new IAssetDataContract(constants.NULL_ADDRESS, env.provider);
});
describe('bridgeTransferFrom()', () => {
const callBridgeTransferFrom = async (
from: string,
to: string,
amount: BigNumber,
bridgeData: DydxBridgeData,
sender: string,
): Promise<string> => {
const returnValue = await testContract
.bridgeTransferFrom(
constants.NULL_ADDRESS,
from,
to,
amount,
dydxBridgeDataEncoder.encode({ bridgeData }),
)
.callAsync({ from: sender });
return returnValue;
};
const executeBridgeTransferFromAndVerifyEvents = async (
from: string,
to: string,
amount: BigNumber,
bridgeData: DydxBridgeData,
sender: string,
): Promise<void> => {
// Execute transaction.
const txReceipt = await testContract
.bridgeTransferFrom(
constants.NULL_ADDRESS,
from,
to,
amount,
dydxBridgeDataEncoder.encode({ bridgeData }),
)
.awaitTransactionSuccessAsync({ from: sender });
// Verify `OperateAccount` event.
const expectedOperateAccountEvents = [];
for (const accountNumber of bridgeData.accountNumbers) {
expectedOperateAccountEvents.push({
owner: accountOwner,
number: accountNumber,
});
}
verifyEventsFromLogs(txReceipt.logs, expectedOperateAccountEvents, TestDydxBridgeEvents.OperateAccount);
// Verify `OperateAction` event.
const weiDenomination = 0;
const deltaAmountRef = 0;
const expectedOperateActionEvents = [];
for (const action of bridgeData.actions) {
expectedOperateActionEvents.push({
actionType: action.actionType as number,
accountIdx: action.accountIdx,
amountSign: action.actionType === DydxBridgeActionType.Deposit ? true : false,
amountDenomination: weiDenomination,
amountRef: deltaAmountRef,
amountValue: action.conversionRateDenominator.gt(0)
? amount
.times(action.conversionRateNumerator)
.dividedToIntegerBy(action.conversionRateDenominator)
: amount,
primaryMarketId: marketId,
secondaryMarketId: constants.ZERO_AMOUNT,
otherAddress: action.actionType === DydxBridgeActionType.Deposit ? from : to,
otherAccountId: constants.ZERO_AMOUNT,
data: '0x',
});
}
verifyEventsFromLogs(txReceipt.logs, expectedOperateActionEvents, TestDydxBridgeEvents.OperateAction);
};
it('succeeds when calling with zero amount', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultDepositAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
constants.ZERO_AMOUNT,
bridgeData,
authorized,
);
});
it('succeeds when calling with no accounts', async () => {
const bridgeData = {
accountNumbers: [],
actions: [defaultDepositAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when calling with no actions', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when calling `operate` with the `deposit` action and a single account', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultDepositAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when calling `operate` with the `deposit` action and multiple accounts', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber, defaultAccountNumber.plus(1)],
actions: [defaultDepositAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when calling `operate` with the `withdraw` action and a single account', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultWithdrawAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when calling `operate` with the `withdraw` action and multiple accounts', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber, defaultAccountNumber.plus(1)],
actions: [defaultWithdrawAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when calling `operate` with the `deposit` action and multiple accounts', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber, defaultAccountNumber.plus(1)],
actions: [defaultWithdrawAction, defaultDepositAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when calling `operate` with multiple actions under a single account', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultWithdrawAction, defaultDepositAction],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when scaling the `amount` to deposit', async () => {
const conversionRateNumerator = new BigNumber(1);
const conversionRateDenominator = new BigNumber(2);
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [
defaultWithdrawAction,
{
...defaultDepositAction,
conversionRateNumerator,
conversionRateDenominator,
},
],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('succeeds when scaling the `amount` to withdraw', async () => {
const conversionRateNumerator = new BigNumber(1);
const conversionRateDenominator = new BigNumber(2);
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [
defaultDepositAction,
{
...defaultWithdrawAction,
conversionRateNumerator,
conversionRateDenominator,
},
],
};
await executeBridgeTransferFromAndVerifyEvents(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
});
it('reverts if not called by the ERC20 Bridge Proxy', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultDepositAction],
};
const callBridgeTransferFromPromise = callBridgeTransferFrom(
accountOwner,
receiver,
defaultAmount,
bridgeData,
notAuthorized,
);
const expectedError = RevertReason.DydxBridgeOnlyCallableByErc20BridgeProxy;
return expect(callBridgeTransferFromPromise).to.revertWith(expectedError);
});
it('should return magic bytes if call succeeds', async () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultDepositAction],
};
const returnValue = await callBridgeTransferFrom(
accountOwner,
receiver,
defaultAmount,
bridgeData,
authorized,
);
expect(returnValue).to.equal(AssetProxyId.ERC20Bridge);
});
it('should revert when `Operate` reverts', async () => {
// Set revert flag.
await testContract.setRevertOnOperate(true).awaitTransactionSuccessAsync();
// Execute transfer.
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultDepositAction],
};
const tx = callBridgeTransferFrom(accountOwner, receiver, defaultAmount, bridgeData, authorized);
const expectedError = 'TestDydxBridge/SHOULD_REVERT_ON_OPERATE';
return expect(tx).to.revertWith(expectedError);
});
it('should revert when there is a rounding error', async () => {
// Setup a rounding error
const conversionRateNumerator = new BigNumber(5318);
const conversionRateDenominator = new BigNumber(47958);
const amount = new BigNumber(9000);
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [
defaultDepositAction,
{
...defaultWithdrawAction,
conversionRateNumerator,
conversionRateDenominator,
},
],
};
// Execute transfer and assert error.
const tx = callBridgeTransferFrom(accountOwner, receiver, amount, bridgeData, authorized);
const expectedError = new LibMathRevertErrors.RoundingError(
conversionRateNumerator,
conversionRateDenominator,
amount,
);
return expect(tx).to.revertWith(expectedError);
});
});
describe('ERC20BridgeProxy.transferFrom()', () => {
const bridgeData = {
accountNumbers: [defaultAccountNumber],
actions: [defaultWithdrawAction],
};
let assetData: string;
before(async () => {
const testTokenAddress = await testContract.getTestToken().callAsync();
assetData = assetDataEncoder
.ERC20Bridge(testTokenAddress, testContract.address, dydxBridgeDataEncoder.encode({ bridgeData }))
.getABIEncodedTransactionData();
});
it('should succeed if `bridgeTransferFrom` succeeds', async () => {
await testProxyContract
.transferFrom(assetData, accountOwner, receiver, defaultAmount)
.awaitTransactionSuccessAsync({ from: authorized });
});
it('should revert if `bridgeTransferFrom` reverts', async () => {
// Set revert flag.
await testContract.setRevertOnOperate(true).awaitTransactionSuccessAsync();
const tx = testProxyContract
.transferFrom(assetData, accountOwner, receiver, defaultAmount)
.awaitTransactionSuccessAsync({ from: authorized });
const expectedError = 'TestDydxBridge/SHOULD_REVERT_ON_OPERATE';
return expect(tx).to.revertWith(expectedError);
});
});
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,287 @@
import {
blockchainTests,
constants,
expect,
getRandomInteger,
Numberish,
randomAddress,
} from '@0x/contracts-test-utils';
import { AuthorizableRevertErrors } from '@0x/contracts-utils';
import { AssetProxyId } from '@0x/types';
import { AbiEncoder, BigNumber, hexUtils, StringRevertError } from '@0x/utils';
import { DecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import { ERC20BridgeProxyContract, TestERC20BridgeContract } from './wrappers';
blockchainTests.resets('ERC20BridgeProxy unit tests', env => {
const PROXY_ID = AssetProxyId.ERC20Bridge;
const BRIDGE_SUCCESS_RETURN_DATA = hexUtils.rightPad(PROXY_ID);
let owner: string;
let badCaller: string;
let assetProxy: ERC20BridgeProxyContract;
let bridgeContract: TestERC20BridgeContract;
let testTokenAddress: string;
before(async () => {
[owner, badCaller] = await env.getAccountAddressesAsync();
assetProxy = await ERC20BridgeProxyContract.deployFrom0xArtifactAsync(
artifacts.ERC20BridgeProxy,
env.provider,
env.txDefaults,
artifacts,
);
bridgeContract = await TestERC20BridgeContract.deployFrom0xArtifactAsync(
artifacts.TestERC20Bridge,
env.provider,
env.txDefaults,
artifacts,
);
testTokenAddress = await bridgeContract.testToken().callAsync();
await assetProxy.addAuthorizedAddress(owner).awaitTransactionSuccessAsync();
});
interface AssetDataOpts {
tokenAddress: string;
bridgeAddress: string;
bridgeData: BridgeDataOpts;
}
interface BridgeDataOpts {
transferAmount: Numberish;
revertError?: string;
returnData: string;
}
function createAssetData(opts?: Partial<AssetDataOpts>): AssetDataOpts {
return _.merge(
{
tokenAddress: testTokenAddress,
bridgeAddress: bridgeContract.address,
bridgeData: createBridgeData(),
},
opts,
);
}
function createBridgeData(opts?: Partial<BridgeDataOpts>): BridgeDataOpts {
return _.merge(
{
transferAmount: constants.ZERO_AMOUNT,
returnData: BRIDGE_SUCCESS_RETURN_DATA,
},
opts,
);
}
function encodeAssetData(opts: AssetDataOpts): string {
const encoder = AbiEncoder.createMethod('ERC20BridgeProxy', [
{ name: 'tokenAddress', type: 'address' },
{ name: 'bridgeAddress', type: 'address' },
{ name: 'bridgeData', type: 'bytes' },
]);
return encoder.encode([opts.tokenAddress, opts.bridgeAddress, encodeBridgeData(opts.bridgeData)]);
}
function encodeBridgeData(opts: BridgeDataOpts): string {
const encoder = AbiEncoder.create([
{ name: 'transferAmount', type: 'int256' },
{ name: 'revertData', type: 'bytes' },
{ name: 'returnData', type: 'bytes' },
]);
const revertErrorBytes =
opts.revertError !== undefined ? new StringRevertError(opts.revertError).encode() : '0x';
return encoder.encode([new BigNumber(opts.transferAmount), revertErrorBytes, opts.returnData]);
}
async function setTestTokenBalanceAsync(_owner: string, balance: Numberish): Promise<void> {
await bridgeContract.setTestTokenBalance(_owner, new BigNumber(balance)).awaitTransactionSuccessAsync();
}
describe('transferFrom()', () => {
interface TransferFromOpts {
assetData: AssetDataOpts;
from: string;
to: string;
amount: Numberish;
}
function createTransferFromOpts(opts?: Partial<TransferFromOpts>): TransferFromOpts {
const transferAmount = _.get(opts, ['amount'], getRandomInteger(1, 100e18)) as BigNumber;
return _.merge(
{
assetData: createAssetData({
bridgeData: createBridgeData({
transferAmount,
}),
}),
from: randomAddress(),
to: randomAddress(),
amount: transferAmount,
},
opts,
);
}
async function transferFromAsync(opts?: Partial<TransferFromOpts>, caller?: string): Promise<DecodedLogs> {
const _opts = createTransferFromOpts(opts);
const { logs } = await assetProxy
.transferFrom(encodeAssetData(_opts.assetData), _opts.from, _opts.to, new BigNumber(_opts.amount))
.awaitTransactionSuccessAsync({ from: caller });
return (logs as any) as DecodedLogs;
}
it('succeeds if the bridge succeeds and balance increases by `amount`', async () => {
const tx = transferFromAsync();
return expect(tx).to.be.fulfilled('');
});
it('succeeds if balance increases more than `amount`', async () => {
const amount = getRandomInteger(1, 100e18);
const tx = transferFromAsync({
amount,
assetData: createAssetData({
bridgeData: createBridgeData({
transferAmount: amount.plus(1),
}),
}),
});
return expect(tx).to.be.fulfilled('');
});
it('passes the correct arguments to the bridge contract', async () => {
const opts = createTransferFromOpts();
const logs = await transferFromAsync(opts);
expect(logs.length).to.eq(1);
const args = logs[0].args;
expect(args.tokenAddress).to.eq(opts.assetData.tokenAddress);
expect(args.from).to.eq(opts.from);
expect(args.to).to.eq(opts.to);
expect(args.amount).to.bignumber.eq(opts.amount);
expect(args.bridgeData).to.eq(encodeBridgeData(opts.assetData.bridgeData));
});
it('fails if not called by an authorized address', async () => {
const tx = transferFromAsync({}, badCaller);
return expect(tx).to.revertWith(new AuthorizableRevertErrors.SenderNotAuthorizedError(badCaller));
});
it('fails if asset data is truncated', async () => {
const opts = createTransferFromOpts();
const truncatedAssetData = hexUtils.slice(encodeAssetData(opts.assetData), 0, -1);
const tx = assetProxy
.transferFrom(truncatedAssetData, opts.from, opts.to, new BigNumber(opts.amount))
.awaitTransactionSuccessAsync();
return expect(tx).to.be.rejected();
});
it('fails if bridge returns nothing', async () => {
const tx = transferFromAsync({
assetData: createAssetData({
bridgeData: createBridgeData({
returnData: '0x',
}),
}),
});
// This will actually revert when the AP tries to decode the return
// value.
return expect(tx).to.be.rejected();
});
it('fails if bridge returns true', async () => {
const tx = transferFromAsync({
assetData: createAssetData({
bridgeData: createBridgeData({
returnData: hexUtils.leftPad('0x1'),
}),
}),
});
// This will actually revert when the AP tries to decode the return
// value.
return expect(tx).to.be.rejected();
});
it('fails if bridge returns 0x1', async () => {
const tx = transferFromAsync({
assetData: createAssetData({
bridgeData: createBridgeData({
returnData: hexUtils.rightPad('0x1'),
}),
}),
});
return expect(tx).to.revertWith('BRIDGE_FAILED');
});
it('fails if bridge is an EOA', async () => {
const tx = transferFromAsync({
assetData: createAssetData({
bridgeAddress: randomAddress(),
}),
});
// This will actually revert when the AP tries to decode the return
// value.
return expect(tx).to.be.rejected();
});
it('fails if bridge reverts', async () => {
const revertError = 'FOOBAR';
const tx = transferFromAsync({
assetData: createAssetData({
bridgeData: createBridgeData({
revertError,
}),
}),
});
return expect(tx).to.revertWith(revertError);
});
it('fails if balance of `to` increases by less than `amount`', async () => {
const amount = getRandomInteger(1, 100e18);
const tx = transferFromAsync({
amount,
assetData: createAssetData({
bridgeData: createBridgeData({
transferAmount: amount.minus(1),
}),
}),
});
return expect(tx).to.revertWith('BRIDGE_UNDERPAY');
});
it('fails if balance of `to` decreases', async () => {
const toAddress = randomAddress();
await setTestTokenBalanceAsync(toAddress, 1e18);
const tx = transferFromAsync({
to: toAddress,
assetData: createAssetData({
bridgeData: createBridgeData({
transferAmount: -1,
}),
}),
});
return expect(tx).to.revertWith('BRIDGE_UNDERPAY');
});
});
describe('balanceOf()', () => {
it('retrieves the balance of the encoded token', async () => {
const _owner = randomAddress();
const balance = getRandomInteger(1, 100e18);
await bridgeContract.setTestTokenBalance(_owner, balance).awaitTransactionSuccessAsync();
const assetData = createAssetData({
tokenAddress: testTokenAddress,
});
const actualBalance = await assetProxy.balanceOf(encodeAssetData(assetData), _owner).callAsync();
expect(actualBalance).to.bignumber.eq(balance);
});
});
describe('getProxyId()', () => {
it('returns the correct proxy ID', async () => {
const proxyId = await assetProxy.getProxyId().callAsync();
expect(proxyId).to.eq(PROXY_ID);
});
});
});

View File

@@ -0,0 +1,191 @@
import {
blockchainTests,
constants,
expect,
filterLogsToArguments,
getRandomInteger,
Numberish,
randomAddress,
} from '@0x/contracts-test-utils';
import { AssetProxyId } from '@0x/types';
import { BigNumber, hexUtils, RawRevertError } from '@0x/utils';
import { DecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import {
TestEth2DaiBridgeContract,
TestEth2DaiBridgeEvents,
TestEth2DaiBridgeSellAllAmountEventArgs,
TestEth2DaiBridgeTokenApproveEventArgs,
TestEth2DaiBridgeTokenTransferEventArgs,
} from './wrappers';
blockchainTests.resets('Eth2DaiBridge unit tests', env => {
let testContract: TestEth2DaiBridgeContract;
before(async () => {
testContract = await TestEth2DaiBridgeContract.deployFrom0xArtifactAsync(
artifacts.TestEth2DaiBridge,
env.provider,
env.txDefaults,
artifacts,
);
});
describe('isValidSignature()', () => {
it('returns success bytes', async () => {
const LEGACY_WALLET_MAGIC_VALUE = '0xb0671381';
const result = await testContract
.isValidSignature(hexUtils.random(), hexUtils.random(_.random(0, 32)))
.callAsync();
expect(result).to.eq(LEGACY_WALLET_MAGIC_VALUE);
});
});
describe('bridgeTransferFrom()', () => {
interface WithdrawToOpts {
toTokenAddress?: string;
fromTokenAddress?: string;
toAddress: string;
amount: Numberish;
fromTokenBalance: Numberish;
revertReason: string;
fillAmount: Numberish;
toTokentransferRevertReason: string;
toTokenTransferReturnData: string;
}
interface WithdrawToResult {
opts: WithdrawToOpts;
result: string;
logs: DecodedLogs;
}
function createWithdrawToOpts(opts?: Partial<WithdrawToOpts>): WithdrawToOpts {
return {
toAddress: randomAddress(),
amount: getRandomInteger(1, 100e18),
revertReason: '',
fillAmount: getRandomInteger(1, 100e18),
fromTokenBalance: getRandomInteger(1, 100e18),
toTokentransferRevertReason: '',
toTokenTransferReturnData: hexUtils.leftPad(1),
...opts,
};
}
async function withdrawToAsync(opts?: Partial<WithdrawToOpts>): Promise<WithdrawToResult> {
const _opts = createWithdrawToOpts(opts);
// Set the fill behavior.
await testContract
.setFillBehavior(_opts.revertReason, new BigNumber(_opts.fillAmount))
.awaitTransactionSuccessAsync();
// Create tokens and balances.
if (_opts.fromTokenAddress === undefined) {
const createTokenFn = testContract.createToken(new BigNumber(_opts.fromTokenBalance));
_opts.fromTokenAddress = await createTokenFn.callAsync();
await createTokenFn.awaitTransactionSuccessAsync();
}
if (_opts.toTokenAddress === undefined) {
const createTokenFn = testContract.createToken(constants.ZERO_AMOUNT);
_opts.toTokenAddress = await createTokenFn.callAsync();
await createTokenFn.awaitTransactionSuccessAsync();
}
// Set the transfer behavior of `toTokenAddress`.
await testContract
.setTransferBehavior(
_opts.toTokenAddress,
_opts.toTokentransferRevertReason,
_opts.toTokenTransferReturnData,
)
.awaitTransactionSuccessAsync();
// Call bridgeTransferFrom().
const bridgeTransferFromFn = testContract.bridgeTransferFrom(
// "to" token address
_opts.toTokenAddress,
// Random from address.
randomAddress(),
// To address.
_opts.toAddress,
new BigNumber(_opts.amount),
// ABI-encode the "from" token address as the bridge data.
hexUtils.leftPad(_opts.fromTokenAddress as string),
);
const result = await bridgeTransferFromFn.callAsync();
const { logs } = await bridgeTransferFromFn.awaitTransactionSuccessAsync();
return {
opts: _opts,
result,
logs: (logs as any) as DecodedLogs,
};
}
it('returns magic bytes on success', async () => {
const BRIDGE_SUCCESS_RETURN_DATA = AssetProxyId.ERC20Bridge;
const { result } = await withdrawToAsync();
expect(result).to.eq(BRIDGE_SUCCESS_RETURN_DATA);
});
it('calls `Eth2Dai.sellAllAmount()`', async () => {
const { opts, logs } = await withdrawToAsync();
const transfers = filterLogsToArguments<TestEth2DaiBridgeSellAllAmountEventArgs>(
logs,
TestEth2DaiBridgeEvents.SellAllAmount,
);
expect(transfers.length).to.eq(1);
expect(transfers[0].sellToken).to.eq(opts.fromTokenAddress);
expect(transfers[0].buyToken).to.eq(opts.toTokenAddress);
expect(transfers[0].sellTokenAmount).to.bignumber.eq(opts.fromTokenBalance);
expect(transfers[0].minimumFillAmount).to.bignumber.eq(opts.amount);
});
it('sets an unlimited allowance on the `fromTokenAddress` token', async () => {
const { opts, logs } = await withdrawToAsync();
const approvals = filterLogsToArguments<TestEth2DaiBridgeTokenApproveEventArgs>(
logs,
TestEth2DaiBridgeEvents.TokenApprove,
);
expect(approvals.length).to.eq(1);
expect(approvals[0].token).to.eq(opts.fromTokenAddress);
expect(approvals[0].spender).to.eq(testContract.address);
expect(approvals[0].allowance).to.bignumber.eq(constants.MAX_UINT256);
});
it('transfers filled amount to `to`', async () => {
const { opts, logs } = await withdrawToAsync();
const transfers = filterLogsToArguments<TestEth2DaiBridgeTokenTransferEventArgs>(
logs,
TestEth2DaiBridgeEvents.TokenTransfer,
);
expect(transfers.length).to.eq(1);
expect(transfers[0].token).to.eq(opts.toTokenAddress);
expect(transfers[0].from).to.eq(testContract.address);
expect(transfers[0].to).to.eq(opts.toAddress);
expect(transfers[0].amount).to.bignumber.eq(opts.fillAmount);
});
it('fails if `Eth2Dai.sellAllAmount()` reverts', async () => {
const opts = createWithdrawToOpts({ revertReason: 'FOOBAR' });
const tx = withdrawToAsync(opts);
return expect(tx).to.revertWith(opts.revertReason);
});
it('fails if `toTokenAddress.transfer()` reverts', async () => {
const opts = createWithdrawToOpts({ toTokentransferRevertReason: 'FOOBAR' });
const tx = withdrawToAsync(opts);
return expect(tx).to.revertWith(opts.toTokentransferRevertReason);
});
it('fails if `toTokenAddress.transfer()` returns false', async () => {
const opts = createWithdrawToOpts({ toTokenTransferReturnData: hexUtils.leftPad(0) });
const tx = withdrawToAsync(opts);
return expect(tx).to.revertWith(new RawRevertError(hexUtils.leftPad(0)));
});
it('succeeds if `toTokenAddress.transfer()` returns true', async () => {
await withdrawToAsync({ toTokenTransferReturnData: hexUtils.leftPad(1) });
});
});
});

View File

@@ -0,0 +1,19 @@
import { env, EnvVars } from '@0x/dev-utils';
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';
before('start web3 provider', () => {
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
await coverageSubprovider.writeCoverageAsync();
}
if (env.parseBoolean(EnvVars.SolidityProfiler)) {
const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
await profilerSubprovider.writeProfilerOutputAsync();
}
provider.stop();
});

View File

@@ -0,0 +1,283 @@
import {
blockchainTests,
constants,
expect,
getRandomInteger,
getRandomPortion,
randomAddress,
verifyEventsFromLogs,
} from '@0x/contracts-test-utils';
import { AssetProxyId } from '@0x/types';
import { BigNumber, hexUtils } from '@0x/utils';
import { DecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import { TestKyberBridgeContract, TestKyberBridgeEvents } from './wrappers';
blockchainTests.resets('KyberBridge unit tests', env => {
const KYBER_ETH_ADDRESS = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';
const FROM_TOKEN_DECIMALS = 6;
const TO_TOKEN_DECIMALS = 18;
const FROM_TOKEN_BASE = new BigNumber(10).pow(FROM_TOKEN_DECIMALS);
const TO_TOKEN_BASE = new BigNumber(10).pow(TO_TOKEN_DECIMALS);
const WETH_BASE = new BigNumber(10).pow(18);
const KYBER_RATE_BASE = WETH_BASE;
let testContract: TestKyberBridgeContract;
before(async () => {
testContract = await TestKyberBridgeContract.deployFrom0xArtifactAsync(
artifacts.TestKyberBridge,
env.provider,
env.txDefaults,
artifacts,
);
});
describe('isValidSignature()', () => {
it('returns success bytes', async () => {
const LEGACY_WALLET_MAGIC_VALUE = '0xb0671381';
const result = await testContract
.isValidSignature(hexUtils.random(), hexUtils.random(_.random(0, 32)))
.callAsync();
expect(result).to.eq(LEGACY_WALLET_MAGIC_VALUE);
});
});
describe('bridgeTransferFrom()', () => {
let fromTokenAddress: string;
let toTokenAddress: string;
let wethAddress: string;
before(async () => {
wethAddress = await testContract.weth().callAsync();
fromTokenAddress = await testContract.createToken(FROM_TOKEN_DECIMALS).callAsync();
await testContract.createToken(FROM_TOKEN_DECIMALS).awaitTransactionSuccessAsync();
toTokenAddress = await testContract.createToken(TO_TOKEN_DECIMALS).callAsync();
await testContract.createToken(TO_TOKEN_DECIMALS).awaitTransactionSuccessAsync();
});
const STATIC_KYBER_TRADE_ARGS = {
maxBuyTokenAmount: constants.MAX_UINT256,
walletId: constants.NULL_ADDRESS,
};
interface TransferFromOpts {
toTokenAddress: string;
fromTokenAddress: string;
toAddress: string;
// Amount to pass into `bridgeTransferFrom()`
amount: BigNumber;
// Amount to convert in `trade()`.
fillAmount: BigNumber;
// Token balance of the bridge.
fromTokenBalance: BigNumber;
}
interface TransferFromResult {
opts: TransferFromOpts;
result: string;
logs: DecodedLogs;
}
function createTransferFromOpts(opts?: Partial<TransferFromOpts>): TransferFromOpts {
const amount = getRandomInteger(1, TO_TOKEN_BASE.times(100));
return {
fromTokenAddress,
toTokenAddress,
amount,
toAddress: randomAddress(),
fillAmount: getRandomPortion(amount),
fromTokenBalance: getRandomInteger(1, FROM_TOKEN_BASE.times(100)),
...opts,
};
}
async function withdrawToAsync(opts?: Partial<TransferFromOpts>): Promise<TransferFromResult> {
const _opts = createTransferFromOpts(opts);
// Fund the contract with input tokens.
await testContract
.grantTokensTo(_opts.fromTokenAddress, testContract.address, _opts.fromTokenBalance)
.awaitTransactionSuccessAsync({ value: _opts.fromTokenBalance });
// Fund the contract with output tokens.
await testContract.setNextFillAmount(_opts.fillAmount).awaitTransactionSuccessAsync({
value: _opts.toTokenAddress === wethAddress ? _opts.fillAmount : constants.ZERO_AMOUNT,
});
// Call bridgeTransferFrom().
const bridgeTransferFromFn = testContract.bridgeTransferFrom(
// Output token
_opts.toTokenAddress,
// Random maker address.
randomAddress(),
// Recipient address.
_opts.toAddress,
// Transfer amount.
_opts.amount,
// ABI-encode the input token address as the bridge data.
hexUtils.leftPad(_opts.fromTokenAddress),
);
const result = await bridgeTransferFromFn.callAsync();
const { logs } = await bridgeTransferFromFn.awaitTransactionSuccessAsync();
return {
opts: _opts,
result,
logs: (logs as any) as DecodedLogs,
};
}
function getMinimumConversionRate(opts: TransferFromOpts): BigNumber {
const fromBase = opts.fromTokenAddress === wethAddress ? WETH_BASE : FROM_TOKEN_BASE;
const toBase = opts.toTokenAddress === wethAddress ? WETH_BASE : TO_TOKEN_BASE;
return opts.amount
.div(toBase)
.div(opts.fromTokenBalance.div(fromBase))
.times(KYBER_RATE_BASE)
.integerValue(BigNumber.ROUND_DOWN);
}
it('returns magic bytes on success', async () => {
const BRIDGE_SUCCESS_RETURN_DATA = AssetProxyId.ERC20Bridge;
const { result } = await withdrawToAsync();
expect(result).to.eq(BRIDGE_SUCCESS_RETURN_DATA);
});
it('can trade token -> token', async () => {
const { opts, logs } = await withdrawToAsync();
verifyEventsFromLogs(
logs,
[
{
sellTokenAddress: opts.fromTokenAddress,
buyTokenAddress: opts.toTokenAddress,
sellAmount: opts.fromTokenBalance,
recipientAddress: opts.toAddress,
minConversionRate: getMinimumConversionRate(opts),
msgValue: constants.ZERO_AMOUNT,
...STATIC_KYBER_TRADE_ARGS,
},
],
TestKyberBridgeEvents.KyberBridgeTrade,
);
});
it('can trade token -> ETH', async () => {
const { opts, logs } = await withdrawToAsync({
toTokenAddress: wethAddress,
});
verifyEventsFromLogs(
logs,
[
{
sellTokenAddress: opts.fromTokenAddress,
buyTokenAddress: KYBER_ETH_ADDRESS,
sellAmount: opts.fromTokenBalance,
recipientAddress: testContract.address,
minConversionRate: getMinimumConversionRate(opts),
msgValue: constants.ZERO_AMOUNT,
...STATIC_KYBER_TRADE_ARGS,
},
],
TestKyberBridgeEvents.KyberBridgeTrade,
);
});
it('can trade ETH -> token', async () => {
const { opts, logs } = await withdrawToAsync({
fromTokenAddress: wethAddress,
});
verifyEventsFromLogs(
logs,
[
{
sellTokenAddress: KYBER_ETH_ADDRESS,
buyTokenAddress: opts.toTokenAddress,
sellAmount: opts.fromTokenBalance,
recipientAddress: opts.toAddress,
minConversionRate: getMinimumConversionRate(opts),
msgValue: opts.fromTokenBalance,
...STATIC_KYBER_TRADE_ARGS,
},
],
TestKyberBridgeEvents.KyberBridgeTrade,
);
});
it('does nothing if bridge has no token balance', async () => {
const { logs } = await withdrawToAsync({
fromTokenBalance: constants.ZERO_AMOUNT,
});
expect(logs).to.be.length(0);
});
it('only transfers the token if trading the same token', async () => {
const { opts, logs } = await withdrawToAsync({
toTokenAddress: fromTokenAddress,
});
verifyEventsFromLogs(
logs,
[
{
tokenAddress: fromTokenAddress,
ownerAddress: testContract.address,
recipientAddress: opts.toAddress,
amount: opts.fromTokenBalance,
},
],
TestKyberBridgeEvents.KyberBridgeTokenTransfer,
);
});
it('grants Kyber an allowance when selling non-WETH', async () => {
const { opts, logs } = await withdrawToAsync();
verifyEventsFromLogs(
logs,
[
{
tokenAddress: opts.fromTokenAddress,
ownerAddress: testContract.address,
spenderAddress: testContract.address,
allowance: constants.MAX_UINT256,
},
],
TestKyberBridgeEvents.KyberBridgeTokenApprove,
);
});
it('does not grant Kyber an allowance when selling WETH', async () => {
const { logs } = await withdrawToAsync({
fromTokenAddress: wethAddress,
});
verifyEventsFromLogs(logs, [], TestKyberBridgeEvents.KyberBridgeTokenApprove);
});
it('withdraws WETH and passes it to Kyber when selling WETH', async () => {
const { opts, logs } = await withdrawToAsync({
fromTokenAddress: wethAddress,
});
expect(logs[0].event).to.eq(TestKyberBridgeEvents.KyberBridgeWethWithdraw);
expect(logs[0].args).to.deep.eq({
ownerAddress: testContract.address,
amount: opts.fromTokenBalance,
});
expect(logs[1].event).to.eq(TestKyberBridgeEvents.KyberBridgeTrade);
expect(logs[1].args.msgValue).to.bignumber.eq(opts.fromTokenBalance);
});
it('wraps WETH and transfers it to the recipient when buyng WETH', async () => {
const { opts, logs } = await withdrawToAsync({
toTokenAddress: wethAddress,
});
expect(logs[0].event).to.eq(TestKyberBridgeEvents.KyberBridgeTokenApprove);
expect(logs[0].args.tokenAddress).to.eq(opts.fromTokenAddress);
expect(logs[1].event).to.eq(TestKyberBridgeEvents.KyberBridgeTrade);
expect(logs[1].args.recipientAddress).to.eq(testContract.address);
expect(logs[2].event).to.eq(TestKyberBridgeEvents.KyberBridgeWethDeposit);
expect(logs[2].args).to.deep.eq({
msgValue: opts.fillAmount,
ownerAddress: testContract.address,
amount: opts.fillAmount,
});
});
});
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,245 @@
import {
chaiSetup,
constants,
expectTransactionFailedWithoutReasonAsync,
provider,
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { AssetProxyId, RevertReason } from '@0x/types';
import { AbiEncoder, BigNumber } from '@0x/utils';
import * as chai from 'chai';
import * as ethUtil from 'ethereumjs-util';
import { artifacts } from './artifacts';
import {
IAssetDataContract,
IAssetProxyContract,
StaticCallProxyContract,
TestStaticCallTargetContract,
} from './wrappers';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
describe('StaticCallProxy', () => {
const amount = constants.ZERO_AMOUNT;
let fromAddress: string;
let toAddress: string;
let assetDataInterface: IAssetDataContract;
let staticCallProxy: IAssetProxyContract;
let staticCallTarget: TestStaticCallTargetContract;
before(async () => {
await blockchainLifecycle.startAsync();
});
after(async () => {
await blockchainLifecycle.revertAsync();
});
before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
[fromAddress, toAddress] = accounts.slice(0, 2);
const staticCallProxyWithoutTransferFrom = await StaticCallProxyContract.deployFrom0xArtifactAsync(
artifacts.StaticCallProxy,
provider,
txDefaults,
artifacts,
);
assetDataInterface = new IAssetDataContract(constants.NULL_ADDRESS, provider);
staticCallProxy = new IAssetProxyContract(
staticCallProxyWithoutTransferFrom.address,
provider,
txDefaults,
{},
StaticCallProxyContract.deployedBytecode,
);
staticCallTarget = await TestStaticCallTargetContract.deployFrom0xArtifactAsync(
artifacts.TestStaticCallTarget,
provider,
txDefaults,
artifacts,
);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();
});
afterEach(async () => {
await blockchainLifecycle.revertAsync();
});
describe('general', () => {
it('should revert if undefined function is called', async () => {
const undefinedSelector = '0x01020304';
await expectTransactionFailedWithoutReasonAsync(
web3Wrapper.sendTransactionAsync({
from: fromAddress,
to: staticCallProxy.address,
value: constants.ZERO_AMOUNT,
data: undefinedSelector,
}),
);
});
it('should have an id of 0xc339d10a', async () => {
const proxyId = await staticCallProxy.getProxyId().callAsync();
const expectedProxyId = AssetProxyId.StaticCall;
expect(proxyId).to.equal(expectedProxyId);
});
});
describe('transferFrom', () => {
it('should revert if assetData lies outside the bounds of calldata', async () => {
const staticCallData = staticCallTarget.noInputFunction().getABIEncodedTransactionData();
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
const txData = staticCallProxy
.transferFrom(assetData, fromAddress, toAddress, amount)
.getABIEncodedTransactionData();
const offsetToAssetData = '0000000000000000000000000000000000000000000000000000000000000080';
const txDataEndBuffer = ethUtil.toBuffer((txData.length - 2) / 2 - 4);
const paddedTxDataEndBuffer = ethUtil.setLengthLeft(txDataEndBuffer, 32);
const invalidOffsetToAssetData = ethUtil.bufferToHex(paddedTxDataEndBuffer).slice(2);
const newAssetData = '0000000000000000000000000000000000000000000000000000000000000304';
const badTxData = `${txData.replace(offsetToAssetData, invalidOffsetToAssetData)}${newAssetData}`;
await expectTransactionFailedWithoutReasonAsync(
web3Wrapper.sendTransactionAsync({
to: staticCallProxy.address,
from: fromAddress,
data: badTxData,
}),
);
});
it('should revert if the length of assetData is less than 100 bytes', async () => {
const staticCallData = constants.NULL_BYTES;
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData()
.slice(0, -128);
const assetDataByteLen = (assetData.length - 2) / 2;
expect((assetDataByteLen - 4) % 32).to.equal(0);
await expectTransactionFailedWithoutReasonAsync(
staticCallProxy.transferFrom(assetData, fromAddress, toAddress, amount).sendTransactionAsync(),
);
});
it('should revert if the offset to `staticCallData` points to outside of assetData', async () => {
const staticCallData = staticCallTarget.noInputFunction().getABIEncodedTransactionData();
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
const offsetToStaticCallData = '0000000000000000000000000000000000000000000000000000000000000060';
const assetDataEndBuffer = ethUtil.toBuffer((assetData.length - 2) / 2 - 4);
const paddedAssetDataEndBuffer = ethUtil.setLengthLeft(assetDataEndBuffer, 32);
const invalidOffsetToStaticCallData = ethUtil.bufferToHex(paddedAssetDataEndBuffer).slice(2);
const newStaticCallData = '0000000000000000000000000000000000000000000000000000000000000304';
const badAssetData = `${assetData.replace(
offsetToStaticCallData,
invalidOffsetToStaticCallData,
)}${newStaticCallData}`;
await expectTransactionFailedWithoutReasonAsync(
staticCallProxy.transferFrom(badAssetData, fromAddress, toAddress, amount).sendTransactionAsync(),
);
});
it('should revert if the callTarget attempts to write to state', async () => {
const staticCallData = staticCallTarget.updateState().getABIEncodedTransactionData();
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
await expectTransactionFailedWithoutReasonAsync(
staticCallProxy.transferFrom(assetData, fromAddress, toAddress, amount).sendTransactionAsync(),
);
});
it('should revert with data provided by the callTarget if the staticcall reverts', async () => {
const staticCallData = staticCallTarget.assertEvenNumber(new BigNumber(1)).getABIEncodedTransactionData();
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
return expect(
staticCallProxy.transferFrom(assetData, fromAddress, toAddress, amount).awaitTransactionSuccessAsync(),
).to.revertWith(RevertReason.TargetNotEven);
});
it('should revert if the hash of the output is different than expected expected', async () => {
const staticCallData = staticCallTarget.isOddNumber(new BigNumber(0)).getABIEncodedTransactionData();
const trueAsBuffer = ethUtil.toBuffer('0x0000000000000000000000000000000000000000000000000000000000000001');
const expectedResultHash = ethUtil.bufferToHex(ethUtil.sha3(trueAsBuffer));
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
return expect(
staticCallProxy.transferFrom(assetData, fromAddress, toAddress, amount).awaitTransactionSuccessAsync(),
).to.revertWith(RevertReason.UnexpectedStaticCallResult);
});
it('should be successful if a function call with no inputs and no outputs is successful', async () => {
const staticCallData = staticCallTarget.noInputFunction().getABIEncodedTransactionData();
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
await staticCallProxy
.transferFrom(assetData, fromAddress, toAddress, amount)
.awaitTransactionSuccessAsync();
});
it('should be successful if the staticCallTarget is not a contract and no return value is expected', async () => {
const staticCallData = '0x0102030405060708';
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(toAddress, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
await staticCallProxy
.transferFrom(assetData, fromAddress, toAddress, amount)
.awaitTransactionSuccessAsync();
});
it('should be successful if a function call with one static input returns the correct value', async () => {
const staticCallData = staticCallTarget.isOddNumber(new BigNumber(1)).getABIEncodedTransactionData();
const trueAsBuffer = ethUtil.toBuffer('0x0000000000000000000000000000000000000000000000000000000000000001');
const expectedResultHash = ethUtil.bufferToHex(ethUtil.sha3(trueAsBuffer));
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
await staticCallProxy
.transferFrom(assetData, fromAddress, toAddress, amount)
.awaitTransactionSuccessAsync();
});
it('should be successful if a function with one dynamic input is successful', async () => {
const dynamicInput = '0x0102030405060708';
const staticCallData = staticCallTarget.dynamicInputFunction(dynamicInput).getABIEncodedTransactionData();
const expectedResultHash = constants.KECCAK256_NULL;
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
await staticCallProxy
.transferFrom(assetData, fromAddress, toAddress, amount)
.awaitTransactionSuccessAsync();
});
it('should be successful if a function call returns a complex type', async () => {
const a = new BigNumber(1);
const b = new BigNumber(2);
const staticCallData = staticCallTarget.returnComplexType(a, b).getABIEncodedTransactionData();
const abiEncoder = new AbiEncoder.DynamicBytes({
name: '',
type: 'bytes',
});
const aHex = '0000000000000000000000000000000000000000000000000000000000000001';
const bHex = '0000000000000000000000000000000000000000000000000000000000000002';
const expectedResults = `${staticCallTarget.address}${aHex}${bHex}`;
const offset = '0000000000000000000000000000000000000000000000000000000000000020';
const encodedExpectedResultWithOffset = `0x${offset}${abiEncoder.encode(expectedResults).slice(2)}`;
const expectedResultHash = ethUtil.bufferToHex(
ethUtil.sha3(ethUtil.toBuffer(encodedExpectedResultWithOffset)),
);
const assetData = assetDataInterface
.StaticCall(staticCallTarget.address, staticCallData, expectedResultHash)
.getABIEncodedTransactionData();
await staticCallProxy
.transferFrom(assetData, fromAddress, toAddress, amount)
.awaitTransactionSuccessAsync();
});
});
});

View File

@@ -0,0 +1,370 @@
import {
blockchainTests,
constants,
expect,
filterLogs,
filterLogsToArguments,
getRandomInteger,
Numberish,
randomAddress,
} from '@0x/contracts-test-utils';
import { AssetProxyId } from '@0x/types';
import { BigNumber, hexUtils } from '@0x/utils';
import { DecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import {
TestUniswapBridgeContract,
TestUniswapBridgeEthToTokenTransferInputEventArgs as EthToTokenTransferInputArgs,
TestUniswapBridgeEvents as ContractEvents,
TestUniswapBridgeTokenApproveEventArgs as TokenApproveArgs,
TestUniswapBridgeTokenToEthSwapInputEventArgs as TokenToEthSwapInputArgs,
TestUniswapBridgeTokenToTokenTransferInputEventArgs as TokenToTokenTransferInputArgs,
TestUniswapBridgeTokenTransferEventArgs as TokenTransferArgs,
TestUniswapBridgeWethDepositEventArgs as WethDepositArgs,
TestUniswapBridgeWethWithdrawEventArgs as WethWithdrawArgs,
} from './wrappers';
blockchainTests.resets('UniswapBridge unit tests', env => {
let testContract: TestUniswapBridgeContract;
let wethTokenAddress: string;
before(async () => {
testContract = await TestUniswapBridgeContract.deployFrom0xArtifactAsync(
artifacts.TestUniswapBridge,
env.provider,
env.txDefaults,
artifacts,
);
wethTokenAddress = await testContract.wethToken().callAsync();
});
describe('isValidSignature()', () => {
it('returns success bytes', async () => {
const LEGACY_WALLET_MAGIC_VALUE = '0xb0671381';
const result = await testContract
.isValidSignature(hexUtils.random(), hexUtils.random(_.random(0, 32)))
.callAsync();
expect(result).to.eq(LEGACY_WALLET_MAGIC_VALUE);
});
});
describe('bridgeTransferFrom()', () => {
interface WithdrawToOpts {
fromTokenAddress: string;
toTokenAddress: string;
fromTokenBalance: Numberish;
toAddress: string;
amount: Numberish;
exchangeRevertReason: string;
exchangeFillAmount: Numberish;
toTokenRevertReason: string;
fromTokenRevertReason: string;
}
function createWithdrawToOpts(opts?: Partial<WithdrawToOpts>): WithdrawToOpts {
return {
fromTokenAddress: constants.NULL_ADDRESS,
toTokenAddress: constants.NULL_ADDRESS,
fromTokenBalance: getRandomInteger(1, 1e18),
toAddress: randomAddress(),
amount: getRandomInteger(1, 1e18),
exchangeRevertReason: '',
exchangeFillAmount: getRandomInteger(1, 1e18),
toTokenRevertReason: '',
fromTokenRevertReason: '',
...opts,
};
}
interface WithdrawToResult {
opts: WithdrawToOpts;
result: string;
logs: DecodedLogs;
blockTime: number;
}
async function withdrawToAsync(opts?: Partial<WithdrawToOpts>): Promise<WithdrawToResult> {
const _opts = createWithdrawToOpts(opts);
const callData = { value: new BigNumber(_opts.exchangeFillAmount) };
// Create the "from" token and exchange.
const createFromTokenFn = testContract.createTokenAndExchange(
_opts.fromTokenAddress,
_opts.exchangeRevertReason,
);
[_opts.fromTokenAddress] = await createFromTokenFn.callAsync(callData);
await createFromTokenFn.awaitTransactionSuccessAsync(callData);
// Create the "to" token and exchange.
const createToTokenFn = testContract.createTokenAndExchange(
_opts.toTokenAddress,
_opts.exchangeRevertReason,
);
[_opts.toTokenAddress] = await createToTokenFn.callAsync(callData);
await createToTokenFn.awaitTransactionSuccessAsync(callData);
await testContract
.setTokenRevertReason(_opts.toTokenAddress, _opts.toTokenRevertReason)
.awaitTransactionSuccessAsync();
await testContract
.setTokenRevertReason(_opts.fromTokenAddress, _opts.fromTokenRevertReason)
.awaitTransactionSuccessAsync();
// Set the token balance for the token we're converting from.
await testContract.setTokenBalance(_opts.fromTokenAddress).awaitTransactionSuccessAsync({
value: new BigNumber(_opts.fromTokenBalance),
});
// Call bridgeTransferFrom().
const bridgeTransferFromFn = testContract.bridgeTransferFrom(
// The "to" token address.
_opts.toTokenAddress,
// The "from" address.
randomAddress(),
// The "to" address.
_opts.toAddress,
// The amount to transfer to "to"
new BigNumber(_opts.amount),
// ABI-encoded "from" token address.
hexUtils.leftPad(_opts.fromTokenAddress),
);
const result = await bridgeTransferFromFn.callAsync();
const receipt = await bridgeTransferFromFn.awaitTransactionSuccessAsync();
return {
opts: _opts,
result,
logs: (receipt.logs as any) as DecodedLogs,
blockTime: await env.web3Wrapper.getBlockTimestampAsync(receipt.blockNumber),
};
}
async function getExchangeForTokenAsync(tokenAddress: string): Promise<string> {
return testContract.getExchange(tokenAddress).callAsync();
}
it('returns magic bytes on success', async () => {
const { result } = await withdrawToAsync();
expect(result).to.eq(AssetProxyId.ERC20Bridge);
});
it('just transfers tokens to `to` if the same tokens are in play', async () => {
const createTokenFn = await testContract.createTokenAndExchange(constants.NULL_ADDRESS, '');
const [tokenAddress] = await createTokenFn.callAsync();
await createTokenFn.awaitTransactionSuccessAsync();
const { opts, result, logs } = await withdrawToAsync({
fromTokenAddress: tokenAddress,
toTokenAddress: tokenAddress,
});
expect(result).to.eq(AssetProxyId.ERC20Bridge);
const transfers = filterLogsToArguments<TokenTransferArgs>(logs, ContractEvents.TokenTransfer);
expect(transfers.length).to.eq(1);
expect(transfers[0].token).to.eq(tokenAddress);
expect(transfers[0].from).to.eq(testContract.address);
expect(transfers[0].to).to.eq(opts.toAddress);
expect(transfers[0].amount).to.bignumber.eq(opts.amount);
});
describe('token -> token', () => {
it('calls `IUniswapExchange.tokenToTokenTransferInput()', async () => {
const { opts, logs, blockTime } = await withdrawToAsync();
const exchangeAddress = await getExchangeForTokenAsync(opts.fromTokenAddress);
const calls = filterLogsToArguments<TokenToTokenTransferInputArgs>(
logs,
ContractEvents.TokenToTokenTransferInput,
);
expect(calls.length).to.eq(1);
expect(calls[0].exchange).to.eq(exchangeAddress);
expect(calls[0].tokensSold).to.bignumber.eq(opts.fromTokenBalance);
expect(calls[0].minTokensBought).to.bignumber.eq(opts.amount);
expect(calls[0].minEthBought).to.bignumber.eq(1);
expect(calls[0].deadline).to.bignumber.eq(blockTime);
expect(calls[0].recipient).to.eq(opts.toAddress);
expect(calls[0].toTokenAddress).to.eq(opts.toTokenAddress);
});
it('sets allowance for "from" token', async () => {
const { opts, logs } = await withdrawToAsync();
const approvals = filterLogsToArguments<TokenApproveArgs>(logs, ContractEvents.TokenApprove);
const exchangeAddress = await getExchangeForTokenAsync(opts.fromTokenAddress);
expect(approvals.length).to.eq(1);
expect(approvals[0].spender).to.eq(exchangeAddress);
expect(approvals[0].allowance).to.bignumber.eq(constants.MAX_UINT256);
});
it('sets allowance for "from" token on subsequent calls', async () => {
const { opts } = await withdrawToAsync();
const { logs } = await withdrawToAsync(opts);
const approvals = filterLogsToArguments<TokenApproveArgs>(logs, ContractEvents.TokenApprove);
const exchangeAddress = await getExchangeForTokenAsync(opts.fromTokenAddress);
expect(approvals.length).to.eq(1);
expect(approvals[0].spender).to.eq(exchangeAddress);
expect(approvals[0].allowance).to.bignumber.eq(constants.MAX_UINT256);
});
it('fails if "from" token does not exist', async () => {
const tx = testContract
.bridgeTransferFrom(
randomAddress(),
randomAddress(),
randomAddress(),
getRandomInteger(1, 1e18),
hexUtils.leftPad(randomAddress()),
)
.awaitTransactionSuccessAsync();
return expect(tx).to.eventually.be.rejectedWith('NO_UNISWAP_EXCHANGE_FOR_TOKEN');
});
it('fails if the exchange fails', async () => {
const revertReason = 'FOOBAR';
const tx = withdrawToAsync({
exchangeRevertReason: revertReason,
});
return expect(tx).to.eventually.be.rejectedWith(revertReason);
});
});
describe('token -> ETH', () => {
it('calls `IUniswapExchange.tokenToEthSwapInput()`, `WETH.deposit()`, then `transfer()`', async () => {
const { opts, logs, blockTime } = await withdrawToAsync({
toTokenAddress: wethTokenAddress,
});
const exchangeAddress = await getExchangeForTokenAsync(opts.fromTokenAddress);
let calls: any = filterLogs<TokenToEthSwapInputArgs>(logs, ContractEvents.TokenToEthSwapInput);
expect(calls.length).to.eq(1);
expect(calls[0].args.exchange).to.eq(exchangeAddress);
expect(calls[0].args.tokensSold).to.bignumber.eq(opts.fromTokenBalance);
expect(calls[0].args.minEthBought).to.bignumber.eq(opts.amount);
expect(calls[0].args.deadline).to.bignumber.eq(blockTime);
calls = filterLogs<WethDepositArgs>(
logs.slice(calls[0].logIndex as number),
ContractEvents.WethDeposit,
);
expect(calls.length).to.eq(1);
expect(calls[0].args.amount).to.bignumber.eq(opts.exchangeFillAmount);
calls = filterLogs<TokenTransferArgs>(
logs.slice(calls[0].logIndex as number),
ContractEvents.TokenTransfer,
);
expect(calls.length).to.eq(1);
expect(calls[0].args.token).to.eq(opts.toTokenAddress);
expect(calls[0].args.from).to.eq(testContract.address);
expect(calls[0].args.to).to.eq(opts.toAddress);
expect(calls[0].args.amount).to.bignumber.eq(opts.exchangeFillAmount);
});
it('sets allowance for "from" token', async () => {
const { opts, logs } = await withdrawToAsync({
toTokenAddress: wethTokenAddress,
});
const transfers = filterLogsToArguments<TokenApproveArgs>(logs, ContractEvents.TokenApprove);
const exchangeAddress = await getExchangeForTokenAsync(opts.fromTokenAddress);
expect(transfers.length).to.eq(1);
expect(transfers[0].spender).to.eq(exchangeAddress);
expect(transfers[0].allowance).to.bignumber.eq(constants.MAX_UINT256);
});
it('sets allowance for "from" token on subsequent calls', async () => {
const { opts } = await withdrawToAsync({
toTokenAddress: wethTokenAddress,
});
const { logs } = await withdrawToAsync(opts);
const approvals = filterLogsToArguments<TokenApproveArgs>(logs, ContractEvents.TokenApprove);
const exchangeAddress = await getExchangeForTokenAsync(opts.fromTokenAddress);
expect(approvals.length).to.eq(1);
expect(approvals[0].spender).to.eq(exchangeAddress);
expect(approvals[0].allowance).to.bignumber.eq(constants.MAX_UINT256);
});
it('fails if "from" token does not exist', async () => {
const tx = testContract
.bridgeTransferFrom(
randomAddress(),
randomAddress(),
randomAddress(),
getRandomInteger(1, 1e18),
hexUtils.leftPad(wethTokenAddress),
)
.awaitTransactionSuccessAsync();
return expect(tx).to.eventually.be.rejectedWith('NO_UNISWAP_EXCHANGE_FOR_TOKEN');
});
it('fails if `WETH.deposit()` fails', async () => {
const revertReason = 'FOOBAR';
const tx = withdrawToAsync({
toTokenAddress: wethTokenAddress,
toTokenRevertReason: revertReason,
});
return expect(tx).to.eventually.be.rejectedWith(revertReason);
});
it('fails if the exchange fails', async () => {
const revertReason = 'FOOBAR';
const tx = withdrawToAsync({
toTokenAddress: wethTokenAddress,
exchangeRevertReason: revertReason,
});
return expect(tx).to.eventually.be.rejectedWith(revertReason);
});
});
describe('ETH -> token', () => {
it('calls `WETH.withdraw()`, then `IUniswapExchange.ethToTokenTransferInput()`', async () => {
const { opts, logs, blockTime } = await withdrawToAsync({
fromTokenAddress: wethTokenAddress,
});
const exchangeAddress = await getExchangeForTokenAsync(opts.toTokenAddress);
let calls: any = filterLogs<WethWithdrawArgs>(logs, ContractEvents.WethWithdraw);
expect(calls.length).to.eq(1);
expect(calls[0].args.amount).to.bignumber.eq(opts.fromTokenBalance);
calls = filterLogs<EthToTokenTransferInputArgs>(
logs.slice(calls[0].logIndex as number),
ContractEvents.EthToTokenTransferInput,
);
expect(calls.length).to.eq(1);
expect(calls[0].args.exchange).to.eq(exchangeAddress);
expect(calls[0].args.minTokensBought).to.bignumber.eq(opts.amount);
expect(calls[0].args.deadline).to.bignumber.eq(blockTime);
expect(calls[0].args.recipient).to.eq(opts.toAddress);
});
it('does not set any allowance', async () => {
const { logs } = await withdrawToAsync({
fromTokenAddress: wethTokenAddress,
});
const approvals = filterLogsToArguments<TokenApproveArgs>(logs, ContractEvents.TokenApprove);
expect(approvals).to.be.empty('');
});
it('fails if "to" token does not exist', async () => {
const tx = testContract
.bridgeTransferFrom(
wethTokenAddress,
randomAddress(),
randomAddress(),
getRandomInteger(1, 1e18),
hexUtils.leftPad(randomAddress()),
)
.awaitTransactionSuccessAsync();
return expect(tx).to.eventually.be.rejectedWith('NO_UNISWAP_EXCHANGE_FOR_TOKEN');
});
it('fails if the `WETH.withdraw()` fails', async () => {
const revertReason = 'FOOBAR';
const tx = withdrawToAsync({
fromTokenAddress: wethTokenAddress,
fromTokenRevertReason: revertReason,
});
return expect(tx).to.eventually.be.rejectedWith(revertReason);
});
it('fails if the exchange fails', async () => {
const revertReason = 'FOOBAR';
const tx = withdrawToAsync({
fromTokenAddress: wethTokenAddress,
exchangeRevertReason: revertReason,
});
return expect(tx).to.eventually.be.rejectedWith(revertReason);
});
});
});
});

View File

@@ -0,0 +1,216 @@
import {
blockchainTests,
constants,
expect,
filterLogsToArguments,
getRandomInteger,
randomAddress,
} from '@0x/contracts-test-utils';
import { AssetProxyId } from '@0x/types';
import { AbiEncoder, BigNumber, hexUtils } from '@0x/utils';
import { DecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from './artifacts';
import {
TestUniswapV2BridgeContract,
TestUniswapV2BridgeEvents as ContractEvents,
TestUniswapV2BridgeSwapExactTokensForTokensInputEventArgs as SwapExactTokensForTokensArgs,
TestUniswapV2BridgeTokenApproveEventArgs as TokenApproveArgs,
TestUniswapV2BridgeTokenTransferEventArgs as TokenTransferArgs,
} from './wrappers';
blockchainTests.resets('UniswapV2 unit tests', env => {
const FROM_TOKEN_DECIMALS = 6;
const TO_TOKEN_DECIMALS = 18;
const FROM_TOKEN_BASE = new BigNumber(10).pow(FROM_TOKEN_DECIMALS);
const TO_TOKEN_BASE = new BigNumber(10).pow(TO_TOKEN_DECIMALS);
let testContract: TestUniswapV2BridgeContract;
before(async () => {
testContract = await TestUniswapV2BridgeContract.deployFrom0xArtifactAsync(
artifacts.TestUniswapV2Bridge,
env.provider,
env.txDefaults,
artifacts,
);
});
describe('isValidSignature()', () => {
it('returns success bytes', async () => {
const LEGACY_WALLET_MAGIC_VALUE = '0xb0671381';
const result = await testContract
.isValidSignature(hexUtils.random(), hexUtils.random(_.random(0, 32)))
.callAsync();
expect(result).to.eq(LEGACY_WALLET_MAGIC_VALUE);
});
});
describe('bridgeTransferFrom()', () => {
interface TransferFromOpts {
tokenAddressesPath: string[];
toAddress: string;
// Amount to pass into `bridgeTransferFrom()`
amount: BigNumber;
// Token balance of the bridge.
fromTokenBalance: BigNumber;
// Router reverts with this reason
routerRevertReason: string;
}
interface TransferFromResult {
opts: TransferFromOpts;
result: string;
logs: DecodedLogs;
blocktime: number;
}
function createTransferFromOpts(opts?: Partial<TransferFromOpts>): TransferFromOpts {
const amount = getRandomInteger(1, TO_TOKEN_BASE.times(100));
return {
tokenAddressesPath: Array(2).fill(constants.NULL_ADDRESS),
amount,
toAddress: randomAddress(),
fromTokenBalance: getRandomInteger(1, FROM_TOKEN_BASE.times(100)),
routerRevertReason: '',
...opts,
};
}
const bridgeDataEncoder = AbiEncoder.create('(address[])');
async function transferFromAsync(opts?: Partial<TransferFromOpts>): Promise<TransferFromResult> {
const _opts = createTransferFromOpts(opts);
for (let i = 0; i < _opts.tokenAddressesPath.length; i++) {
const createFromTokenFn = testContract.createToken(_opts.tokenAddressesPath[i]);
_opts.tokenAddressesPath[i] = await createFromTokenFn.callAsync();
await createFromTokenFn.awaitTransactionSuccessAsync();
}
// Set the token balance for the token we're converting from.
await testContract
.setTokenBalance(_opts.tokenAddressesPath[0], _opts.fromTokenBalance)
.awaitTransactionSuccessAsync();
// Set revert reason for the router.
await testContract.setRouterRevertReason(_opts.routerRevertReason).awaitTransactionSuccessAsync();
// Call bridgeTransferFrom().
const bridgeTransferFromFn = testContract.bridgeTransferFrom(
// Output token
_opts.tokenAddressesPath[_opts.tokenAddressesPath.length - 1],
// Random maker address.
randomAddress(),
// Recipient address.
_opts.toAddress,
// Transfer amount.
_opts.amount,
// ABI-encode the input token address as the bridge data. // FIXME
bridgeDataEncoder.encode([_opts.tokenAddressesPath]),
);
const result = await bridgeTransferFromFn.callAsync();
const receipt = await bridgeTransferFromFn.awaitTransactionSuccessAsync();
return {
opts: _opts,
result,
logs: (receipt.logs as any) as DecodedLogs,
blocktime: await env.web3Wrapper.getBlockTimestampAsync(receipt.blockNumber),
};
}
it('returns magic bytes on success', async () => {
const { result } = await transferFromAsync();
expect(result).to.eq(AssetProxyId.ERC20Bridge);
});
it('performs transfer when both tokens are the same', async () => {
const createTokenFn = testContract.createToken(constants.NULL_ADDRESS);
const tokenAddress = await createTokenFn.callAsync();
await createTokenFn.awaitTransactionSuccessAsync();
const { opts, result, logs } = await transferFromAsync({
tokenAddressesPath: [tokenAddress, tokenAddress],
});
expect(result).to.eq(AssetProxyId.ERC20Bridge, 'asset proxy id');
const transfers = filterLogsToArguments<TokenTransferArgs>(logs, ContractEvents.TokenTransfer);
expect(transfers.length).to.eq(1);
expect(transfers[0].token).to.eq(tokenAddress, 'input token address');
expect(transfers[0].from).to.eq(testContract.address);
expect(transfers[0].to).to.eq(opts.toAddress, 'recipient address');
expect(transfers[0].amount).to.bignumber.eq(opts.amount, 'amount');
});
describe('token -> token', async () => {
it('calls UniswapV2Router01.swapExactTokensForTokens()', async () => {
const { opts, result, logs, blocktime } = await transferFromAsync();
expect(result).to.eq(AssetProxyId.ERC20Bridge, 'asset proxy id');
const transfers = filterLogsToArguments<SwapExactTokensForTokensArgs>(
logs,
ContractEvents.SwapExactTokensForTokensInput,
);
expect(transfers.length).to.eq(1);
expect(transfers[0].toTokenAddress).to.eq(
opts.tokenAddressesPath[opts.tokenAddressesPath.length - 1],
'output token address',
);
expect(transfers[0].to).to.eq(opts.toAddress, 'recipient address');
expect(transfers[0].amountIn).to.bignumber.eq(opts.fromTokenBalance, 'input token amount');
expect(transfers[0].amountOutMin).to.bignumber.eq(opts.amount, 'output token amount');
expect(transfers[0].deadline).to.bignumber.eq(blocktime, 'deadline');
});
it('sets allowance for "from" token', async () => {
const { logs } = await transferFromAsync();
const approvals = filterLogsToArguments<TokenApproveArgs>(logs, ContractEvents.TokenApprove);
const routerAddress = await testContract.getRouterAddress().callAsync();
expect(approvals.length).to.eq(1);
expect(approvals[0].spender).to.eq(routerAddress);
expect(approvals[0].allowance).to.bignumber.eq(constants.MAX_UINT256);
});
it('sets allowance for "from" token on subsequent calls', async () => {
const { opts } = await transferFromAsync();
const { logs } = await transferFromAsync(opts);
const approvals = filterLogsToArguments<TokenApproveArgs>(logs, ContractEvents.TokenApprove);
const routerAddress = await testContract.getRouterAddress().callAsync();
expect(approvals.length).to.eq(1);
expect(approvals[0].spender).to.eq(routerAddress);
expect(approvals[0].allowance).to.bignumber.eq(constants.MAX_UINT256);
});
it('fails if the router fails', async () => {
const revertReason = 'FOOBAR';
const tx = transferFromAsync({
routerRevertReason: revertReason,
});
return expect(tx).to.eventually.be.rejectedWith(revertReason);
});
});
describe('token -> token -> token', async () => {
it('calls UniswapV2Router01.swapExactTokensForTokens()', async () => {
const { opts, result, logs, blocktime } = await transferFromAsync({
tokenAddressesPath: Array(3).fill(constants.NULL_ADDRESS),
});
expect(result).to.eq(AssetProxyId.ERC20Bridge, 'asset proxy id');
const transfers = filterLogsToArguments<SwapExactTokensForTokensArgs>(
logs,
ContractEvents.SwapExactTokensForTokensInput,
);
expect(transfers.length).to.eq(1);
expect(transfers[0].toTokenAddress).to.eq(
opts.tokenAddressesPath[opts.tokenAddressesPath.length - 1],
'output token address',
);
expect(transfers[0].to).to.eq(opts.toAddress, 'recipient address');
expect(transfers[0].amountIn).to.bignumber.eq(opts.fromTokenBalance, 'input token amount');
expect(transfers[0].amountOutMin).to.bignumber.eq(opts.amount, 'output token amount');
expect(transfers[0].deadline).to.bignumber.eq(blocktime, 'deadline');
});
});
});
});

View File

@@ -0,0 +1,49 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../test/generated-wrappers/balancer_bridge';
export * from '../test/generated-wrappers/chai_bridge';
export * from '../test/generated-wrappers/curve_bridge';
export * from '../test/generated-wrappers/dex_forwarder_bridge';
export * from '../test/generated-wrappers/dydx_bridge';
export * from '../test/generated-wrappers/erc1155_proxy';
export * from '../test/generated-wrappers/erc20_bridge_proxy';
export * from '../test/generated-wrappers/erc20_proxy';
export * from '../test/generated-wrappers/erc721_proxy';
export * from '../test/generated-wrappers/eth2_dai_bridge';
export * from '../test/generated-wrappers/i_asset_data';
export * from '../test/generated-wrappers/i_asset_proxy';
export * from '../test/generated-wrappers/i_asset_proxy_dispatcher';
export * from '../test/generated-wrappers/i_authorizable';
export * from '../test/generated-wrappers/i_balancer_pool';
export * from '../test/generated-wrappers/i_chai';
export * from '../test/generated-wrappers/i_curve';
export * from '../test/generated-wrappers/i_dydx';
export * from '../test/generated-wrappers/i_dydx_bridge';
export * from '../test/generated-wrappers/i_erc20_bridge';
export * from '../test/generated-wrappers/i_eth2_dai';
export * from '../test/generated-wrappers/i_gas_token';
export * from '../test/generated-wrappers/i_kyber_network_proxy';
export * from '../test/generated-wrappers/i_uniswap_exchange';
export * from '../test/generated-wrappers/i_uniswap_exchange_factory';
export * from '../test/generated-wrappers/i_uniswap_v2_router01';
export * from '../test/generated-wrappers/kyber_bridge';
export * from '../test/generated-wrappers/mixin_asset_proxy_dispatcher';
export * from '../test/generated-wrappers/mixin_authorizable';
export * from '../test/generated-wrappers/mixin_gas_token';
export * from '../test/generated-wrappers/multi_asset_proxy';
export * from '../test/generated-wrappers/ownable';
export * from '../test/generated-wrappers/static_call_proxy';
export * from '../test/generated-wrappers/test_chai_bridge';
export * from '../test/generated-wrappers/test_dex_forwarder_bridge';
export * from '../test/generated-wrappers/test_dydx_bridge';
export * from '../test/generated-wrappers/test_erc20_bridge';
export * from '../test/generated-wrappers/test_eth2_dai_bridge';
export * from '../test/generated-wrappers/test_kyber_bridge';
export * from '../test/generated-wrappers/test_static_call_target';
export * from '../test/generated-wrappers/test_uniswap_bridge';
export * from '../test/generated-wrappers/test_uniswap_v2_bridge';
export * from '../test/generated-wrappers/uniswap_bridge';
export * from '../test/generated-wrappers/uniswap_v2_bridge';

View File

@@ -0,0 +1,96 @@
/**
* Use this file to configure your truffle project. It's seeded with some
* common settings for different networks and features like migrations,
* compilation and testing. Uncomment the ones you need or modify
* them to suit your project as necessary.
*
* More information about configuration can be found at:
*
* truffleframework.com/docs/advanced/configuration
*
* To deploy via Infura you'll need a wallet provider (like truffle-hdwallet-provider)
* to sign your transactions before they're sent to a remote public node. Infura accounts
* are available for free at: infura.io/register.
*
* You'll also need a mnemonic - the twelve word phrase the wallet uses to generate
* public/private key pairs. If you're publishing your code to GitHub make sure you load this
* phrase from a file you've .gitignored so it doesn't accidentally become public.
*
*/
// const HDWalletProvider = require('truffle-hdwallet-provider');
// const infuraKey = "fj4jll3k.....";
//
// const fs = require('fs');
// const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
/**
* Networks define how you connect to your ethereum client and let you set the
* defaults web3 uses to send transactions. If you don't specify one truffle
* will spin up a development blockchain for you on port 9545 when you
* run `develop` or `test`. You can ask a truffle command to use a specific
* network from the command line, e.g
*
* $ truffle test --network <network-name>
*/
networks: {
// Useful for testing. The `development` name is special - truffle uses it by default
// if it's defined here and no other network is specified at the command line.
// You should run a client (like ganache-cli, geth or parity) in a separate terminal
// tab if you use this network and you must also set the `host`, `port` and `network_id`
// options below to some value.
//
// development: {
// host: "127.0.0.1", // Localhost (default: none)
// port: 8545, // Standard Ethereum port (default: none)
// network_id: "*", // Any network (default: none)
// },
// Another network with more advanced options...
// advanced: {
// port: 8777, // Custom port
// network_id: 1342, // Custom network
// gas: 8500000, // Gas sent with each transaction (default: ~6700000)
// gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei)
// from: <address>, // Account to send txs from (default: accounts[0])
// websockets: true // Enable EventEmitter interface for web3 (default: false)
// },
// Useful for deploying to a public network.
// NB: It's important to wrap the provider as a function.
// ropsten: {
// provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`),
// network_id: 3, // Ropsten's id
// gas: 5500000, // Ropsten has a lower block limit than mainnet
// confirmations: 2, // # of confs to wait between deployments. (default: 0)
// timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
// skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
// },
// Useful for private networks
// private: {
// provider: () => new HDWalletProvider(mnemonic, `https://network.io`),
// network_id: 2111, // This network is yours, in the cloud.
// production: true // Treats this network as if it was a public net. (default: false)
// }
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
version: '0.5.9',
settings: {
evmVersion: 'istanbul',
optimizer: {
enabled: true,
runs: 1000000,
details: { yul: true, deduplicate: true, cse: true, constantOptimizer: true },
},
},
},
},
};

View File

@@ -0,0 +1,96 @@
{
"extends": "../../tsconfig",
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"generated-artifacts/BalancerBridge.json",
"generated-artifacts/ChaiBridge.json",
"generated-artifacts/CurveBridge.json",
"generated-artifacts/DexForwarderBridge.json",
"generated-artifacts/DydxBridge.json",
"generated-artifacts/ERC1155Proxy.json",
"generated-artifacts/ERC20BridgeProxy.json",
"generated-artifacts/ERC20Proxy.json",
"generated-artifacts/ERC721Proxy.json",
"generated-artifacts/Eth2DaiBridge.json",
"generated-artifacts/IAssetData.json",
"generated-artifacts/IAssetProxy.json",
"generated-artifacts/IAssetProxyDispatcher.json",
"generated-artifacts/IAuthorizable.json",
"generated-artifacts/IBalancerPool.json",
"generated-artifacts/IChai.json",
"generated-artifacts/ICurve.json",
"generated-artifacts/IDydx.json",
"generated-artifacts/IDydxBridge.json",
"generated-artifacts/IERC20Bridge.json",
"generated-artifacts/IEth2Dai.json",
"generated-artifacts/IGasToken.json",
"generated-artifacts/IKyberNetworkProxy.json",
"generated-artifacts/IUniswapExchange.json",
"generated-artifacts/IUniswapExchangeFactory.json",
"generated-artifacts/IUniswapV2Router01.json",
"generated-artifacts/KyberBridge.json",
"generated-artifacts/MixinAssetProxyDispatcher.json",
"generated-artifacts/MixinAuthorizable.json",
"generated-artifacts/MixinGasToken.json",
"generated-artifacts/MultiAssetProxy.json",
"generated-artifacts/Ownable.json",
"generated-artifacts/StaticCallProxy.json",
"generated-artifacts/TestChaiBridge.json",
"generated-artifacts/TestDexForwarderBridge.json",
"generated-artifacts/TestDydxBridge.json",
"generated-artifacts/TestERC20Bridge.json",
"generated-artifacts/TestEth2DaiBridge.json",
"generated-artifacts/TestKyberBridge.json",
"generated-artifacts/TestStaticCallTarget.json",
"generated-artifacts/TestUniswapBridge.json",
"generated-artifacts/TestUniswapV2Bridge.json",
"generated-artifacts/UniswapBridge.json",
"generated-artifacts/UniswapV2Bridge.json",
"test/generated-artifacts/BalancerBridge.json",
"test/generated-artifacts/ChaiBridge.json",
"test/generated-artifacts/CurveBridge.json",
"test/generated-artifacts/DexForwarderBridge.json",
"test/generated-artifacts/DydxBridge.json",
"test/generated-artifacts/ERC1155Proxy.json",
"test/generated-artifacts/ERC20BridgeProxy.json",
"test/generated-artifacts/ERC20Proxy.json",
"test/generated-artifacts/ERC721Proxy.json",
"test/generated-artifacts/Eth2DaiBridge.json",
"test/generated-artifacts/IAssetData.json",
"test/generated-artifacts/IAssetProxy.json",
"test/generated-artifacts/IAssetProxyDispatcher.json",
"test/generated-artifacts/IAuthorizable.json",
"test/generated-artifacts/IBalancerPool.json",
"test/generated-artifacts/IChai.json",
"test/generated-artifacts/ICurve.json",
"test/generated-artifacts/IDydx.json",
"test/generated-artifacts/IDydxBridge.json",
"test/generated-artifacts/IERC20Bridge.json",
"test/generated-artifacts/IEth2Dai.json",
"test/generated-artifacts/IGasToken.json",
"test/generated-artifacts/IKyberNetworkProxy.json",
"test/generated-artifacts/IUniswapExchange.json",
"test/generated-artifacts/IUniswapExchangeFactory.json",
"test/generated-artifacts/IUniswapV2Router01.json",
"test/generated-artifacts/KyberBridge.json",
"test/generated-artifacts/MixinAssetProxyDispatcher.json",
"test/generated-artifacts/MixinAuthorizable.json",
"test/generated-artifacts/MixinGasToken.json",
"test/generated-artifacts/MultiAssetProxy.json",
"test/generated-artifacts/Ownable.json",
"test/generated-artifacts/StaticCallProxy.json",
"test/generated-artifacts/TestChaiBridge.json",
"test/generated-artifacts/TestDexForwarderBridge.json",
"test/generated-artifacts/TestDydxBridge.json",
"test/generated-artifacts/TestERC20Bridge.json",
"test/generated-artifacts/TestEth2DaiBridge.json",
"test/generated-artifacts/TestKyberBridge.json",
"test/generated-artifacts/TestStaticCallTarget.json",
"test/generated-artifacts/TestUniswapBridge.json",
"test/generated-artifacts/TestUniswapV2Bridge.json",
"test/generated-artifacts/UniswapBridge.json",
"test/generated-artifacts/UniswapV2Bridge.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -0,0 +1,10 @@
# Blacklist all files
.*
*
# Whitelist lib
!lib/**/*
# Whitelist Solidity contracts
!contracts/src/**/*
# Blacklist tests in lib
/lib/test/*
# Package specific ignore

View File

@@ -0,0 +1,94 @@
[
{
"timestamp": 1594788383,
"version": "1.1.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.1.5",
"changes": [
{
"note": "Fix broken tests.",
"pr": 2591
}
],
"timestamp": 1592969527
},
{
"timestamp": 1583220306,
"version": "1.1.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1582837861,
"version": "1.1.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1582677073,
"version": "1.1.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1582623685,
"version": "1.1.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.1.0",
"changes": [
{
"note": "Added decoders for broker data",
"pr": 2484
}
],
"timestamp": 1581748629
},
{
"timestamp": 1581204851,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1580988106,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.0",
"changes": [
{
"note": "Created package",
"pr": "2455"
}
]
}
]

View File

@@ -0,0 +1,46 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.1.6 - _July 15, 2020_
* Dependencies updated
## v1.1.5 - _June 24, 2020_
* Fix broken tests. (#2591)
## v1.1.4 - _March 3, 2020_
* Dependencies updated
## v1.1.3 - _February 27, 2020_
* Dependencies updated
## v1.1.2 - _February 26, 2020_
* Dependencies updated
## v1.1.1 - _February 25, 2020_
* Dependencies updated
## v1.1.0 - _February 15, 2020_
* Added decoders for broker data (#2484)
## v1.0.2 - _February 8, 2020_
* Dependencies updated
## v1.0.1 - _February 6, 2020_
* Dependencies updated
## v1.0.0 - _Invalid date_
* Created package (#2455)

Some files were not shown because too many files have changed in this diff Show More