Compare commits

...

1977 Commits

Author SHA1 Message Date
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
Leonid Logvinov
597b2f38f5 Updated CHANGELOGS 2018-12-13 14:04:56 -08:00
Xianny
8906c30f37 add special case to scrape OHLCV for eth/usd (#1428) 2018-12-13 13:13:28 -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
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
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
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
Leonid Logvinov
1534505652 Fix linter errors 2018-12-12 15:32:41 -08: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
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
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
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
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
Brandon Millman
c46870d296 feature(website): add 0x Instant as a track in the docs 2018-12-10 19:31:45 -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
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
Brandon Millman
dc21c79f2b fix(instant): hide loaders when no token or buy amount is chosen 2018-12-10 10:17:41 -08: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
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
Steve Klebanoff
9d8ab43f91 Don't throw error if can't find icon for token 2018-12-10 09:00:05 -08: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
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
Fabio Berger
c0637a744b Update yarn.lock 2018-12-07 14:48:13 +00: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
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
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
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
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
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
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
Leonid Logvinov
18489161c6 Add missing dependency 2018-12-04 15:03:50 +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
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
Leonid Logvinov
754be75dbf Fix hardcoded path in release notes fetching 2018-12-03 12:48:53 +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
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
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
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
Fabio B
53f8e1b3b4 Add troubleshooting section to dev-utils section 2018-11-28 16:56:48 +00: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
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
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
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
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
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
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
Leonid Logvinov
22cfdd9f0b Properly unmarshall TransactionReceiptRPC to TransactionReceipt 2018-11-20 15:22:06 +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
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
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
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
Jacob Evans
0a5364ff35 feat: Deploy contracts to Rinkeby 2018-11-16 21:20:48 +11: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
Leonid Logvinov
a824264da2 Publish
- 0x.js@2.0.3
 - @0x/abi-gen-wrappers@1.0.4
 - @0x/asset-buyer@2.2.2
 - @0x/base-contract@3.0.5
 - @0x/connect@3.0.5
 - @0x/contract-wrappers@4.0.1
 - contracts@2.1.53
 - @0x/dev-tools-pages@0.0.5
 - @0x/dev-utils@1.0.16
 - @0x/fill-scenarios@1.0.11
 - @0x/instant@0.0.6
 - @0x/metacoin@0.0.27
 - @0x/migrations@2.0.3
 - @0x/order-utils@3.0.1
 - @0x/order-watcher@2.2.3
 - @0x/react-docs@1.0.17
 - @0x/react-shared@1.0.20
 - @0x/sol-compiler@1.1.11
 - @0x/sol-cov@2.1.11
 - @0x/sol-doc@1.0.6
 - @0x/subproviders@2.1.3
 - @0x/testnet-faucets@1.0.55
 - @0x/web3-wrapper@3.1.3
 - @0x/website@0.0.58
2018-11-13 19:41:43 +01:00
Leonid Logvinov
a66c03aa21 Updated CHANGELOGS 2018-11-13 19:41:25 +01: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
Leonid Logvinov
11f0bebd7f Fix a bug when undefined was been tried to convert to an array 2018-11-13 19:27:44 +01: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
Fabio B
3fb29041b0 Merge pull request #1248 from 0xProject/fixLowercaseAddressBug
Fix lowercase address bug in LedgerSubprovider and MnemonicSubprovider
2018-11-13 15:03:30 +01:00
Brandon Millman
161a935003 Merge pull request #1251 from 0xProject/feature/instant/asset-data-map
[instant] Add extra asset metadata
2018-11-12 21:48:34 -08: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
Brandon Millman
b82148ea60 feat(instant): add extra asset metadata 2018-11-12 13:26:09 -08:00
Fabio B
add1cfd261 Merge pull request #1227 from WyseNynja/patch-1
[web3-wrapper] start jsonRpcRequestId at 1, not 0
2018-11-12 20:43:00 +01:00
Bryan Stitt
cdf78494d5 Update CHANGELOG.json 2018-11-12 09:12:59 -08:00
Bryan Stitt
789f573452 Merge branch 'development' into patch-1 2018-11-12 09:10:40 -08:00
Bryan Stitt
22f217807d Update CHANGELOG.json 2018-11-12 09:08:23 -08:00
Fabio B
08797392e0 Update packages/order-watcher/CHANGELOG.json
Co-Authored-By: WyseNynja <bryan@stitthappens.com>
2018-11-12 09:08:02 -08:00
Leonid Logvinov
853c77dc09 Update packages/order-watcher/CHANGELOG.json
Co-Authored-By: WyseNynja <bryan@stitthappens.com>
2018-11-12 09:07:54 -08:00
Leonid Logvinov
0ebbbdfca4 Publish
- 0x.js@2.0.2
 - @0x/abi-gen-wrappers@1.0.3
 - @0x/assert@1.0.16
 - @0x/asset-buyer@2.2.1
 - @0x/base-contract@3.0.4
 - @0x/connect@3.0.4
 - @0x/contract-wrappers@4.0.0
 - contracts@2.1.52
 - @0x/dev-tools-pages@0.0.4
 - @0x/dev-utils@1.0.15
 - @0x/fill-scenarios@1.0.10
 - @0x/instant@0.0.5
 - @0x/json-schemas@2.1.0
 - @0x/metacoin@0.0.26
 - @0x/migrations@2.0.2
 - @0x/order-utils@3.0.0
 - @0x/order-watcher@2.2.2
 - @0x/react-docs@1.0.16
 - @0x/react-shared@1.0.19
 - @0x/sol-compiler@1.1.10
 - @0x/sol-cov@2.1.10
 - @0x/sol-doc@1.0.5
 - @0x/sra-spec@1.0.9
 - @0x/subproviders@2.1.2
 - @0x/testnet-faucets@1.0.54
 - @0x/web3-wrapper@3.1.2
 - @0x/website@0.0.57
2018-11-12 14:30:26 +01:00
Leonid Logvinov
085d34834b Updated CHANGELOGS 2018-11-12 14:30:14 +01:00
Leonid Logvinov
b866ce787c Merge pull request #1250 from 0xProject/feature/json-schemas-connect
Move @0x/connect schemas to @0x/json-schemas
2018-11-12 14:04:28 +01:00
Leonid Logvinov
4d5bc8b8ee Fix static tests 2018-11-12 13:54:38 +01:00
Leonid Logvinov
7f013515e7 Add PR number 2018-11-12 13:53:39 +01:00
Fabio Berger
a4a46dc076 chore: fix linter error 2018-11-12 13:50:23 +01:00
Leonid Logvinov
33dbdb0184 Move connect schemas to JSON Schemas 2018-11-12 13:44:24 +01:00
Fabio Berger
0d565fe32f Improve logo spacing 2018-11-12 13:27:14 +01:00
Fabio Berger
320460feb9 fix: lowercase supplied address before comparing with derived addresses (which are not checksummed) 2018-11-12 13:21:25 +01:00
Fabio Berger
dbce3f8935 Remove unused instance variable 2018-11-12 13:20:41 +01:00
Fabio B
c41622c20a Merge pull request #1235 from 0xProject/fixOrderValidation
[order-utils] Fix order validation method
2018-11-12 12:17:27 +01:00
Fabio Berger
348556a544 Add fixes affecting the public interface to the CHANGELOGs 2018-11-12 12:07:19 +01:00
Fabio Berger
6fa6579c31 Use correctly formatted signature so that it rejects with the expected reason and not because the signature is mal-formatted 2018-11-12 11:57:54 +01:00
Fabio B
6f61268514 Merge pull request #1246 from 0xProject/bug/web3-wrapper/eth-call-null
[web3-wrapper] Throws when contract returns null
2018-11-12 10:42:28 +01:00
Fabio Berger
8efc6c2112 Remove unnecessary conversion to BigNumber 2018-11-12 10:25:33 +01:00
Fabio Berger
b21c1bea46 Use rejectedWith 2018-11-12 10:23:42 +01:00
Fabio Berger
fd7ba3ecea Use RevertReason when possible 2018-11-12 10:22:22 +01:00
Fabio Berger
8aeb18bcc3 rename param 2018-11-12 10:22:03 +01:00
Brandon Millman
9e4a594eb1 Merge pull request #1238 from 0xProject/fix/website/code-splitting
[website] Fix code splitting
2018-11-11 21:21:36 -08:00
Brandon Millman
3b421ef796 fix(website): fix code splitting 2018-11-11 20:58:47 -08:00
Jacob Evans
e0c4f58970 bug(web3-wrapper): throws when contract returns null 2018-11-12 13:55:46 +11:00
Amir Bandeali
df8fd36c94 Merge pull request #1241 from 0xProject/feature/contracts/changelogs
Add CHANGELOG.json to contracts package
2018-11-11 15:57:21 -08:00
Bryan Stitt
76b3caa124 Update CHANGELOG.json 2018-11-11 15:13:42 -08:00
Bryan Stitt
0101cd73aa Merge branch 'development' into patch-1 2018-11-11 15:13:09 -08:00
Bryan Stitt
6ef628613e update changelog 2018-11-11 15:09:59 -08:00
Amir Bandeali
bc960fe8f8 Add CHANGELOG comment to README 2018-11-11 14:57:24 -08:00
Amir Bandeali
517c620397 Add CHANGELOG.json 2018-11-11 14:57:24 -08: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
Fabio Berger
d3592d362e address linter errors 2018-11-11 13:02:45 +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
Brandon Millman
397b4e2890 Merge pull request #1239 from 0xProject/feature/instant/privacy-mode
[instant] Handle privacy mode in wallets
2018-11-09 16:21:32 -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
Brandon Millman
38896c9358 feat(instant): handle privacy mode in wallets 2018-11-09 16:04:29 -08:00
Steve Klebanoff
26cbe7ae66 Merge pull request #1237 from 0xProject/feature/instant/buy-quote-heartbeat
[instant] Heartbeats for account info and buy quotes
2018-11-09 16:02:09 -08:00
Steve Klebanoff
fd83ca2cb8 linting 2018-11-09 15:52:25 -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
Steve Klebanoff
4072076965 Don't start heartbeat if no account 2018-11-09 15:40:13 -08:00
fragosti
2bba01c664 feat: toggle wallet connection color 2018-11-09 15:40:02 -08:00
Steve Klebanoff
93054ae52b Lodash noop 2018-11-09 15:28:29 -08:00
Steve Klebanoff
5c1b1a1203 Using built in intervalUtils instead of rolling own 2018-11-09 15:28:08 -08:00
fragosti
433fb3597d feat: refactor button styles and add href to Text 2018-11-09 15:26:57 -08:00
Steve Klebanoff
acb7e876b2 Update account more frequently 2018-11-09 15:19:16 -08:00
Steve Klebanoff
2c585bfbdc feat(instant): Dismissible overlay error messages
Adds dismissible overlay to error messages on mobile
2018-11-09 15:15:57 -08:00
Fabio Berger
1f0ac47bd9 Move signature validation into OrderValidationUtils.validateOrderFillableOrThrowAsync 2018-11-10 00:14:48 +01: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
Fabio Berger
773cf3cd14 Merge branch 'development' into fixOrderValidation
* development: (25 commits)
  Publish
  Updated CHANGELOGS
  fix(instant): fix bug where we potentially fetch balance for the wrong account
  fix: Lock Ledger hw-transport to 4.24.0
  fix: wrong prop names used
  chore: PR feedback
  fix: broken features because of merge
  fix: remove default props, fix lint problems
  chore: convert payment method to stateless component
  feat: add boxShadow on dropdown hover
  fix: various style issues
  fix: remove all:initial rule from all div based ui compoennts
  fix: token selector scrolling container height
  chore(instant): fix lint errors
  feat(instant): fetch balance at startup
  feat(instant): fetch account address at startup and drive account state changes
  chore: cleanup
  fix: restore button to previous state
  feat: implement copy-to-clipboard
  feat: add MetaMask sign, refactor Circle
  ...
2018-11-09 23:20:06 +01:00
Fabio Berger
53d0f5b98e Revert comment change 2018-11-09 23:15:34 +01: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
Steve Klebanoff
cc8debe53b Linting and renaming variables 2018-11-09 11:39:36 -08:00
Steve Klebanoff
36b8c9c5dd Use interface like named parameters here 2018-11-09 11:28:08 -08:00
Steve Klebanoff
474db7c18d Emulate named parameters with interface 2018-11-09 11:22:46 -08:00
fragosti
daa011f7cb feat: implement CurrentStandardSlidingPanel and put it in the main container 2018-11-09 11:15:32 -08:00
Steve Klebanoff
39657b633b Make sure we only update price when they are not in the middle of an order 2018-11-09 11:04:44 -08:00
Steve Klebanoff
2e8f74abce Use existing functions instead of writing our own 2018-11-09 10:40:47 -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
Steve Klebanoff
df91d34315 Merge branch 'development' into feature/instant/buy-quote-heartbeat 2018-11-09 10:06:22 -08:00
Fabio Berger
3980bf39a9 Keep more helpful error messages, and stop swallowing errors when returning contract error 2018-11-09 18:50:25 +01:00
Jacob Evans
b4a11de097 Publish
- 0x.js@2.0.1
 - @0x/abi-gen@1.0.15
 - @0x/abi-gen-wrappers@1.0.2
 - @0x/assert@1.0.15
 - @0x/asset-buyer@2.2.0
 - @0x/base-contract@3.0.3
 - @0x/connect@3.0.3
 - @0x/contract-addresses@1.1.0
 - @0x/contract-artifacts@1.1.0
 - @0x/contract-wrappers@3.0.1
 - contracts@2.1.51
 - @0x/dev-tools-pages@0.0.3
 - @0x/dev-utils@1.0.14
 - ethereum-types@1.1.2
 - @0x/fill-scenarios@1.0.9
 - @0x/instant@0.0.4
 - @0x/json-schemas@2.0.1
 - @0x/metacoin@0.0.25
 - @0x/migrations@2.0.1
 - @0x/monorepo-scripts@1.0.13
 - @0x/order-utils@2.0.1
 - @0x/order-watcher@2.2.1
 - @0x/react-docs@1.0.15
 - @0x/react-shared@1.0.18
 - @0x/sol-compiler@1.1.9
 - @0x/sol-cov@2.1.9
 - @0x/sol-doc@1.0.4
 - @0x/sol-resolver@1.0.16
 - @0x/sra-spec@1.0.8
 - @0x/subproviders@2.1.1
 - @0x/testnet-faucets@1.0.53
 - @0x/tslint-config@1.0.10
 - @0x/types@1.2.1
 - @0x/typescript-typings@3.0.4
 - @0x/utils@2.0.4
 - @0x/web3-wrapper@3.1.1
 - @0x/website@0.0.56
2018-11-09 16:28:52 +11:00
Jacob Evans
a22d78e273 Updated CHANGELOGS 2018-11-09 16:28:35 +11: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
Brandon Millman
12bc6f5d58 Merge pull request #1232 from 0xProject/feature/instant/account-state-change
[instant] Request account address and balance at mount
2018-11-08 17:35:54 -08:00
Brandon Millman
b147cd8885 fix(instant): fix bug where we potentially fetch balance for the wrong account 2018-11-08 17:22:21 -08:00
Steve Klebanoff
d703c13f8e Variable name cleanup 2018-11-08 17:21:17 -08:00
Steve Klebanoff
3dacc6157b Remove unneeded Promise.resolve 2018-11-08 17:20:15 -08:00
Steve Klebanoff
fd12bdbbd5 Remove old TODO 2018-11-08 17:13:33 -08:00
Steve Klebanoff
297a62fe80 move files around and rename 2018-11-08 17:13:22 -08:00
Steve Klebanoff
1e39d56cf7 wip: BuyQuote heartbeat 2018-11-08 17:09:26 -08:00
Jacob Evans
ca6f99da61 Merge pull request #1236 from 0xProject/fix/subproviders/lock-ledger-4.24.0
[subproviders] Lock Ledger hw-transport to 4.24.0
2018-11-09 12:00:17 +11:00
fragosti
39ae21d693 feat: allow panel children to fill entire content / remove title from panel component 2018-11-08 16:58:44 -08:00
Steve Klebanoff
e45b6c7e98 Make heartbeat more generic 2018-11-08 16:54:45 -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
Francesco Agosti
3eac119399 Merge pull request #1230 from 0xProject/feature/instant/dropdown-ui
[instant] Dropdown Component Skeleton
2018-11-08 16:29:34 -08:00
Jacob Evans
8755737344 fix: Lock Ledger hw-transport to 4.24.0 2018-11-09 11:28:53 +11:00
fragosti
cd44470a29 fix: wrong prop names used 2018-11-08 16:15:57 -08:00
Steve Klebanoff
dd4d3b10cf wip: abstract out updating buy quote 2018-11-08 16:14:00 -08:00
Brandon Millman
211163b372 Merge branch 'development' into feature/instant/account-state-change
* development:
  [instant] Viewport specific errors (#1228)
  Added more comments
  Include wholeNumberSchema in sra-spec schemas
  chore(instant): fix linter
  Fix isNode
  fix(instant): update buy quote at start up in the case of default amount
  fix: apply css reset to overlay as well
  fix(website): turn off production flag when building locally
  chore: linter
  fix: progress bar
  fix: use fontSize prop in button
  feat: make instant resistant to external styles
  feat: add faux externall css file
  Add upstream issue
  Use const require instead of import
  Fix tslint issues
  Use detect-node
  Set curstom inspect printer in BigNumber
2018-11-08 16:09:38 -08:00
fragosti
f44c5b2292 chore: PR feedback 2018-11-08 16:08:20 -08:00
fragosti
5d74421e43 fix: broken features because of merge 2018-11-08 15:53:21 -08:00
Fabio Berger
eb5f514d25 Merge branch 'development' into fixOrderValidation
* development: (51 commits)
  [instant] Viewport specific errors (#1228)
  Added more comments
  Include wholeNumberSchema in sra-spec schemas
  chore(instant): fix linter
  Fix isNode
  fix(instant): update buy quote at start up in the case of default amount
  chore(instant): increase max bundle size for bundle watch
  Small code review tweaks
  fix: apply css reset to overlay as well
  fix(website): turn off production flag when building locally
  feat(instant): add Account to the ProviderState
  feat(instant): fallback to an empty wallet provider when none is injected
  [order_utils.py] is_signature_valid, via Exchange contract (#1216)
  chore: linter
  fix: progress bar
  fix: use fontSize prop in button
  feat: make instant resistant to external styles
  chore(instant): update OrderState enum to follow capitalization conventions
  feat: add faux externall css file
  Take out unneeded conditionals
  ...
2018-11-09 00:46:32 +01:00
Fabio Berger
57318a6ef2 Remove unused validateFillOrKill method 2018-11-09 00:46:07 +01:00
Fabio Berger
857a35d4f7 Fix validateOrderFillableOrThrowAsync method so it also checks order signature, cancelled, cancelledUpTo, and throws helpful error messages 2018-11-09 00:45:48 +01:00
fragosti
4f4d901eca Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/dropdown-ui 2018-11-08 15:42:46 -08:00
fragosti
6a84877f9a fix: remove default props, fix lint problems 2018-11-08 15:39:30 -08:00
Steve Klebanoff
117e2f583f [instant] Viewport specific errors (#1228)
feat(instant): Shows different error animation based on viewport
2018-11-08 15:37:56 -08:00
fragosti
b074fe2de5 chore: convert payment method to stateless component 2018-11-08 15:34:53 -08:00
fragosti
3dad385533 feat: add boxShadow on dropdown hover 2018-11-08 15:33:32 -08:00
fragosti
15a12cfa22 fix: various style issues 2018-11-08 15:29:18 -08:00
Remco Bloemen
c448a409c1 Merge pull request #977 from 0xProject/feature/utils/prettybignum
Set custom inspect printer in BigNumber
2018-11-09 00:27:53 +01:00
Remco Bloemen
dfef33bc41 Added more comments 2018-11-09 00:19:11 +01:00
fragosti
27ea271842 fix: remove all:initial rule from all div based ui compoennts 2018-11-08 15:10:32 -08:00
fragosti
316f3e2e76 fix: token selector scrolling container height 2018-11-08 15:04:03 -08:00
Steve Klebanoff
624f5cee8d linting 2018-11-08 15:01:59 -08:00
Steve Klebanoff
7acaae37a9 feat(instant): Heartbeat for updating account info 2018-11-08 14:57:39 -08:00
Remco Bloemen
fd73c17db1 Merge remote-tracking branch 'origin/development' into feature/utils/prettybignum 2018-11-08 23:49:10 +01:00
Fabio Berger
689f8f1fbc Include wholeNumberSchema in sra-spec schemas 2018-11-08 23:48:19 +01:00
Brandon Millman
5ffd20214c Merge pull request #1231 from 0xProject/fix/instant/default-amount-quote
[instant] Update buy quote at start up in the case of default amount
2018-11-08 14:28:22 -08:00
fragosti
3395b8d095 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/dropdown-ui 2018-11-08 11:25:25 -08:00
Francesco Agosti
b388d54962 Merge pull request #1220 from 0xProject/feature/instant/prevent-css-leakage
[instant] Prevent CSS leakage
2018-11-08 11:19:51 -08:00
fragosti
c27194a357 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/prevent-css-leakage 2018-11-08 11:04:16 -08:00
Brandon Millman
8493d619b4 chore(instant): fix linter 2018-11-08 10:34:36 -08:00
Brandon Millman
adcfe51190 Merge pull request #1226 from 0xProject/fix/website/build-time
[website] Turn off production flag when building locally
2018-11-08 10:10:44 -08:00
Remco Bloemen
d71362af99 Merge remote-tracking branch 'origin/development' into feature/utils/prettybignum 2018-11-08 18:32:40 +01:00
Remco Bloemen
a5665a6875 Fix isNode 2018-11-08 18:31:22 +01:00
Brandon Millman
7a99b2099d fix(instant): update buy quote at start up in the case of default amount 2018-11-08 00:18:04 -08:00
Brandon Millman
c84e163edb chore(instant): fix lint errors 2018-11-07 23:43:37 -08:00
Brandon Millman
cde192df0d feat(instant): fetch balance at startup 2018-11-07 23:41:25 -08:00
Brandon Millman
d0c009adff feat(instant): fetch account address at startup and drive account state changes 2018-11-07 23:41:25 -08:00
Brandon Millman
f6abc007ff Merge pull request #1221 from 0xProject/feature/instant/fallback-provider
[instant] Ensure we always have a provider from initial state
2018-11-07 23:40:43 -08:00
fragosti
88eb642aa5 chore: cleanup 2018-11-07 22:21:51 -08:00
fragosti
8b09286173 fix: restore button to previous state 2018-11-07 22:17:27 -08:00
fragosti
bfe708533f Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/dropdown-ui 2018-11-07 22:14:00 -08:00
fragosti
d7742029c7 feat: implement copy-to-clipboard 2018-11-07 22:08:40 -08:00
fragosti
1151371e57 feat: add MetaMask sign, refactor Circle 2018-11-07 21:54:26 -08:00
fragosti
ecb92a44bc feat: create PaymentMethodDropdown 2018-11-07 21:38:54 -08:00
fragosti
f7642c06f0 chore: remove unused props 2018-11-07 21:05:07 -08:00
fragosti
94d1e427c1 fix: height of token selector overflow div 2018-11-07 20:57:57 -08:00
fragosti
4181a040b5 feat: refactor out overlay component and use it to implement click-outside 2018-11-07 20:53:25 -08:00
fragosti
c0d8ceca82 feat: implement basic dropdown component 2018-11-07 20:30:45 -08:00
Steve Klebanoff
771f8a6a6c Merge pull request #1219 from 0xProject/feature/instant/mobile-full-bleed
[instant] Mobile full view
2018-11-07 17:40:35 -08:00
Brandon Millman
54b51830d0 chore(instant): increase max bundle size for bundle watch 2018-11-07 17:16:41 -08:00
Bryan Stitt
801004be66 start jsonRpcRequestId at 1, not 0
I'm trying to use the 0x-watcher against a parity websocket rpc and getting an error that I think is the same as https://github.com/ethereum/web3.js/issues/1967
2018-11-07 16:39:07 -08:00
Steve Klebanoff
c6e7ad5a53 Small code review tweaks 2018-11-07 16:06:41 -08:00
fragosti
6d5f65b77e fix: apply css reset to overlay as well 2018-11-07 15:42:48 -08:00
Brandon Millman
370452238f fix(website): turn off production flag when building locally 2018-11-07 15:41:05 -08:00
Brandon Millman
28df5bfd94 feat(instant): add Account to the ProviderState 2018-11-07 14:25:23 -08:00
fragosti
eb8f7b0ef5 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/prevent-css-leakage 2018-11-07 10:58:39 -08:00
Brandon Millman
dfbf10c94b feat(instant): fallback to an empty wallet provider when none is injected 2018-11-07 09:32:49 -08:00
F. Eugene Aumson
95b2898b9c [order_utils.py] is_signature_valid, via Exchange contract (#1216)
First support for signature validation, done via Exchange contract's
isValidSignature() method.
2018-11-07 11:20:46 -05:00
Brandon Millman
094f710662 Merge pull request #1217 from 0xProject/fix/asset-buyer/lower-default-expiry-buffer
[asset-buyer] Lower default expiryBuffer from 5 minutes to 2 minutes
2018-11-06 22:53:09 -08:00
fragosti
d1186e08b4 chore: linter 2018-11-06 16:31:52 -08:00
fragosti
cab71fd4d1 fix: progress bar 2018-11-06 16:16:01 -08:00
fragosti
4cf6fbc6a3 fix: use fontSize prop in button 2018-11-06 16:05:12 -08:00
fragosti
10da1e24e1 feat: make instant resistant to external styles 2018-11-06 15:59:16 -08:00
Brandon Millman
c30dca6961 chore(instant): update OrderState enum to follow capitalization conventions 2018-11-06 15:42:54 -08:00
fragosti
42c441fafa feat: add faux externall css file 2018-11-06 15:12:25 -08:00
Steve Klebanoff
6861cd7462 Take out unneeded conditionals 2018-11-06 15:09:00 -08:00
Steve Klebanoff
d59027f0bc remove unused dependecny 2018-11-06 15:02:44 -08:00
Steve Klebanoff
d1444f228d remove unused import 2018-11-06 14:57:15 -08:00
Steve Klebanoff
9cc7090e28 remove old comment 2018-11-06 14:56:42 -08:00
Steve Klebanoff
a73522e7f1 Merge branch 'development' into feature/instant/mobile-full-bleed 2018-11-06 14:54:36 -08:00
Steve Klebanoff
d941901e32 Hide X when small 2018-11-06 14:26:15 -08:00
Steve Klebanoff
eb3fda059a Fix mobile view of selecting assets 2018-11-06 14:21:23 -08:00
Brandon Millman
0823bd24d6 fix(asset-buyer): lower default expiryBuffer from 5 minutes to 2 minutes 2018-11-06 14:08:30 -08:00
Steve Klebanoff
897c15fd28 Get rid of unused properties 2018-11-06 14:07:55 -08:00
Steve Klebanoff
006a13448f new MediaChoice approach for setting conditional css properties 2018-11-06 14:05:49 -08:00
Steve Klebanoff
88c7d907fa better function definiton 2018-11-06 13:56:29 -08:00
Steve Klebanoff
e8814ecbe7 proof of concept working 2018-11-06 13:52:16 -08:00
Steve Klebanoff
f90486c99c wip: mediachoice experiment 2018-11-06 11:34:04 -08:00
Steve Klebanoff
a2bc62b17a feat(instant): when on mobile, show mobile specific styling that takes up whole screen 2018-11-06 10:26:39 -08:00
Francesco Agosti
ce4081bb18 Merge pull request #1210 from 0xProject/feature/instant/beta-bucket
[instant] Break up deploy into deploy-dogfood and deploy-staging
2018-11-06 09:37:04 -08:00
Francesco Agosti
b7a111366b Merge pull request #1213 from 0xProject/feature/instant/more-testnet-liquidity
[instant] Add GNT and MKR testnet orders, fix typo
2018-11-06 09:36:40 -08:00
Steve Klebanoff
f6487122d1 Putting back in old heights as not necessary for full bleed 2018-11-06 09:26:45 -08:00
Steve Klebanoff
7c9d47451b Merge pull request #1211 from 0xProject/chore/import-ui-directly
[instant] chore: Import UI components directly
2018-11-06 08:30:31 -08:00
Brandon Millman
8b06b36274 chore(instant): fix lint error 2018-11-05 23:56:54 -08:00
Steve Klebanoff
188e317504 wip: height 100% 2018-11-05 17:23:09 -08:00
Steve Klebanoff
ecae3f9c48 wip: full display of mobile hard coded 2018-11-05 17:19:37 -08:00
fragosti
543ff7739a fix: remove unused import 2018-11-05 16:58:54 -08:00
fragosti
18d24f8db1 chore: move to underscores 2018-11-05 16:47:52 -08:00
fragosti
58a65d0ed9 chore: clarify a comment 2018-11-05 16:43:35 -08:00
fragosti
338594d3e5 feat: add GNT and MKR testnet orders, fix typo 2018-11-05 16:37:49 -08:00
Steve Klebanoff
e4f9ae6ad5 fix(instant): fix provided orders 2018-11-05 16:29:44 -08:00
Steve Klebanoff
7e2acb6e7e add extra space 2018-11-05 13:35:23 -08:00
Steve Klebanoff
04e70df330 remove unused import 2018-11-05 10:06:22 -08:00
Steve Klebanoff
eb46570a38 chore(instant): import UI components directly 2018-11-05 09:42:22 -08:00
fragosti
bb9c21fb14 chore: prettier and linter 2018-11-02 17:26:04 -07:00
fragosti
245fa95424 fix: typo in README 2018-11-02 17:16:49 -07:00
fragosti
16fa0fdda1 feat: break up deploy into deploy-dogfood and deploy-staging 2018-11-02 17:12:33 -07:00
Francesco Agosti
66261102de Merge pull request #1204 from 0xProject/feature/instant/maker-asset-datas-interface
[instant] Add `availableAssetDatas` to render method, fetch from asset-buyer if not specified, implement basic token selection
2018-11-02 16:26:16 -07:00
fragosti
6748c36b03 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/maker-asset-datas-interface 2018-11-02 15:51:42 -07:00
Steve Klebanoff
d0f20a4fd5 Merge pull request #1206 from 0xProject/fix/instant/decimal-fields-scaling-amount-input-bn
[instant] Fix decimal input issues on instant
2018-11-02 15:45:58 -07:00
Steve Klebanoff
f5c7a3c26a linting 2018-11-02 15:34:44 -07:00
Steve Klebanoff
cfa748e206 Merge branch 'development' into fix/instant/decimal-fields-scaling-amount-input-bn 2018-11-02 15:34:37 -07:00
Steve Klebanoff
8284f9c2ba Use generic Maybe 2018-11-02 15:33:00 -07:00
Brandon Millman
18fef7ade4 Merge pull request #1209 from 0xProject/feature/instant/optional-provider
[instant] Provide optional provider API, fallback to injected provider
2018-11-02 15:17:04 -07:00
Brandon Millman
5fc2483be7 feat(instant): pass in provider through props, fallback to injected provider 2018-11-02 14:39:12 -07:00
fragosti
d5521ea5e0 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/maker-asset-datas-interface 2018-11-02 14:38:18 -07:00
fragosti
cc4ccda623 chore: address PR comments 2018-11-02 14:21:04 -07:00
Steve Klebanoff
389665d3a1 linting 2018-11-02 13:30:34 -07:00
Steve Klebanoff
d160792923 Merge branch 'development' into fix/instant/decimal-fields-scaling-amount-input-bn 2018-11-02 13:28:52 -07:00
fragosti
819ba14303 fix: change assetdatas for OMG and REP to be all lower case, make MKR blue 2018-11-02 13:26:59 -07:00
Steve Klebanoff
b0f2ab45e9 onChange -> onAmountChange 2018-11-02 13:25:59 -07:00
Steve Klebanoff
620f439816 Move MaybeBigNumber functions into helper 2018-11-02 13:22:10 -07:00
Steve Klebanoff
6a57a7b5be Merge pull request #1208 from 0xProject/fix/instant/zero-NaN
[instant] Fix NaN issue with zero input
2018-11-02 13:12:25 -07:00
fragosti
1f3055c1bc feat: reset input after token selection 2018-11-02 13:03:10 -07:00
Brandon Millman
ec83a1d9e7 Merge pull request #1207 from 0xProject/feature/instant/affiliate-fee
[instant][asset-buyer] Implement affiliateInfo prop
2018-11-02 12:43:53 -07:00
Brandon Millman
b895b855cb feat(instant): add affiliateInfo overrides to dev url 2018-11-02 12:03:15 -07:00
Steve Klebanoff
a770ea56ea fix(instant): dont get buy quote for zero value 2018-11-02 11:48:59 -07:00
Brandon Millman
5e66cc8a40 feat(instant): implement affiliateFeeInfo prop 2018-11-02 10:57:24 -07:00
Brandon Millman
4fda2a2d04 fix(asset-buyer): fix default values being overriden and incorrect fee rounding 2018-11-02 09:59:17 -07:00
Steve Klebanoff
e7e9c2a2eb Merge branch 'development' into feature/instant/simulated-progress-bar 2018-11-02 09:43:11 -07:00
fragosti
7619bc4f13 fix: dont include assetData in render options 2018-11-01 19:01:56 -07:00
fragosti
515b8712a1 chore: prettier and linter 2018-11-01 18:59:28 -07:00
fragosti
e2ff7b7c84 feat: add basic token search functionality 2018-11-01 18:55:37 -07:00
fragosti
209b2c9dcb feat: improve position of close X in token selector 2018-11-01 18:38:25 -07:00
fragosti
cdaa1407da feat: implement search bar UI 2018-11-01 18:36:34 -07:00
fragosti
92706a4b43 feat: add name param to all ERC20AssetMetaData 2018-11-01 17:59:51 -07:00
fragosti
ab245fe7de feat: implement basic token selection UI 2018-11-01 17:52:15 -07:00
Steve Klebanoff
f5623632d8 Have ScalingAmountInput trigger onChange with MaybeBigNumber and keep string value as state 2018-11-01 17:29:59 -07:00
fragosti
7de33c5dd9 feat: implement panel title and close 2018-11-01 16:52:31 -07:00
fragosti
180f176716 feat: use withTheme to use ColorOption to color Icon 2018-11-01 16:41:08 -07:00
Steve Klebanoff
a2e1bf0e62 Getting rid of BigNumberInput in favor of BigNumber 2018-11-01 16:32:14 -07:00
fragosti
ad96e953ce feat: use new Icon component functionality 2018-11-01 16:16:54 -07:00
fragosti
695d1453ac Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/maker-asset-datas-interface 2018-11-01 16:13:43 -07:00
Brandon Millman
7c30fd4b2d Merge pull request #1205 from 0xProject/feature/instant/render-overlay
[instant] Dismissible overlay
2018-11-01 15:38:02 -07:00
Francesco Agosti
5573b092a9 Merge pull request #1203 from 0xProject/feature/instant/token-selection-panel
[instant][asset-buyer] Add more assetMetaData and expose new asset-buyer API: `getAvailableAssetDatasAsync`
2018-11-01 15:36:39 -07:00
Brandon Millman
d16499da4e Remove alternate hover styling from button and move into icon component 2018-11-01 15:25:34 -07:00
fragosti
c50c4a4669 fix: make maxPerPage for the SRA getAvailableMakerAssetDatasAsync call a local var 2018-11-01 15:11:03 -07:00
fragosti
32de4862ba Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/token-selection-panel 2018-11-01 15:01:05 -07:00
Steve Klebanoff
f341626e29 Merge branch 'development' into feature/instant/simulated-progress-bar 2018-11-01 14:33:43 -07:00
Brandon Millman
c2645b26b4 feat(instant): add interactive overlay presentation to umd bundle 2018-11-01 14:15:30 -07:00
fragosti
ce19ec207b fix: remove assetData from default params 2018-11-01 14:14:39 -07:00
Steve Klebanoff
7858dafce4 linting: moving order of imports 2018-11-01 14:14:00 -07:00
Francesco Agosti
0955feb023 Merge pull request #1201 from 0xProject/feature/instant/basic-token-modal
[instant] Add `Select Token` mode, animation abstractions, and basic token selection panel
2018-11-01 13:57:29 -07:00
fragosti
9fd931f799 feat: better handle errors in async fetches 2018-11-01 13:49:09 -07:00
fragosti
57fba86154 chore: remove unneeded optional syntax 2018-11-01 13:40:23 -07:00
fragosti
0a3af4eb22 chore: add clarification to _generateSelectAssetClickHandler 2018-11-01 13:38:12 -07:00
fragosti
7fc1a88680 fix: better name method 2018-11-01 13:34:23 -07:00
fragosti
9f5f31d39f feat: add asserts for new API additions 2018-11-01 13:24:32 -07:00
fragosti
bda9d4c1b0 feat: auto-close panel when a token is selected 2018-11-01 13:16:48 -07:00
fragosti
b55ba3a318 feat: add states to the erc20 input for no assets or only 1 asset 2018-11-01 13:10:51 -07:00
Steve Klebanoff
dc655fd903 Better styling of estimated time 2018-11-01 12:08:48 -07:00
Steve Klebanoff
82b6a81a22 removing unused imports 2018-11-01 11:35:53 -07:00
Steve Klebanoff
f9d13cd43a Move file to new file to reflect the new export name 2018-11-01 11:32:18 -07:00
Steve Klebanoff
771e01162d Rename export 2018-11-01 11:30:13 -07:00
Steve Klebanoff
61a1a0be97 Move BuyOrderProgress to its own component 2018-11-01 11:29:33 -07:00
Steve Klebanoff
3430896eb7 Remove old TODO 2018-11-01 11:17:41 -07:00
Steve Klebanoff
cd79a2fad1 Use new constants 2018-11-01 11:15:34 -07:00
Steve Klebanoff
f82d16a5b0 Use primary color instead of black 2018-11-01 11:15:07 -07:00
Steve Klebanoff
9990f8720c maxWidth -> toWidth, and make from and to width consistent units 2018-11-01 10:50:37 -07:00
Steve Klebanoff
544ddd44a0 Getting rid of TimedProgress state 2018-11-01 10:46:34 -07:00
Steve Klebanoff
66b485c7d4 Minor cleanup
Don't export beginningState, and updating prop name in comment
2018-11-01 10:04:04 -07:00
Steve Klebanoff
9ef6f82a95 Take out old ended variable 2018-11-01 09:59:37 -07:00
Steve Klebanoff
a148db5022 Fix test name 2018-11-01 09:52:34 -07:00
Steve Klebanoff
f9a38fcb32 ended -> hasEnded 2018-11-01 09:51:27 -07:00
fragosti
3f918622bc feat: implement basic erc20 token selector 2018-10-31 19:50:37 -07:00
fragosti
6091ee732d feat: modify public API to allow for passing in available assets, or fetch assets from SRA 2018-10-31 19:21:06 -07:00
Steve Klebanoff
906909e33f Rename to SelectedAssetProgress 2018-10-31 16:54:52 -07:00
Steve Klebanoff
d192a7d466 Removing old extra param 2018-10-31 16:49:52 -07:00
Steve Klebanoff
096f9decee Removing old simulated progress bar, and adding documentation to TimedProgressBar 2018-10-31 16:49:41 -07:00
Steve Klebanoff
ae84dac463 WIP of new timedprogressbar using CSS animations 2018-10-31 16:46:24 -07:00
fragosti
8c33692560 chore: add to changelog 2018-10-31 15:58:21 -07:00
Francesco Agosti
44a34ee541 Merge pull request #1197 from 0xProject/feature/instant/add-new-order-and-rep
[instant] Add REP to assetMetaDataMap and add it to provided orders
2018-10-31 15:56:28 -07:00
fragosti
76f88a0a62 feat: expose new getAvailableAssetDatasAsync API
BREAKING CHANGE: the `OrderProvider` now requires a new method `getAvailableMakerAssetDatasAsync` and the `StandardRelayerAPIOrderProvider` requires the network id at init.
2018-10-31 15:40:30 -07:00
Brandon Millman
c1defba429 Merge pull request #1199 from 0xProject/feature/website/metmask-breaking-change
[website] Prepare website for breaking MetaMask change for EIP 1102
2018-10-31 14:26:21 -07:00
fragosti
c1ad1d203d chore: remove unused import 2018-10-31 14:15:03 -07:00
fragosti
3061afdafb feat: add more asestMetaDatas 2018-10-31 14:14:12 -07:00
fragosti
59ad2b75c1 chore: remove unused import 2018-10-31 13:29:20 -07:00
fragosti
935e5da78e Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/basic-token-modal 2018-10-31 13:15:13 -07:00
fragosti
28ded5d02d fix: address PR comments 2018-10-31 12:18:03 -07:00
fragosti
27258fe3d4 chore: address PR feedback 2018-10-31 11:55:48 -07:00
Steve Klebanoff
ad0129fa02 Revert "Remove default in state reducer"
This reverts commit cc2719492d.
2018-10-31 11:31:55 -07:00
Steve Klebanoff
5911879639 Merge branch 'development' into feature/instant/simulated-progress-bar 2018-10-31 11:06:14 -07:00
Steve Klebanoff
cc2719492d Remove default in state reducer
This allows us to ensure that we explicitly handle every action type
2018-10-31 09:25:18 -07:00
Steve Klebanoff
d675547208 Explicit actions for setting different order states
This allows us to dispatch updates with less syntax, and allows us to not have to send in progress info when setting failure and success
2018-10-31 09:14:50 -07:00
Steve Klebanoff
d938ba4606 Remove unused import 2018-10-31 08:37:21 -07:00
Steve Klebanoff
9a5b52036b Tick less often, and let CSS style the transition 2018-10-31 08:14:44 -07:00
Steve Klebanoff
229f11f164 Nice formatting of displayed time 2018-10-30 20:18:21 -07:00
fragosti
91f8487947 feat: implement sliding panel 2018-10-30 16:57:42 -07:00
Steve Klebanoff
0e1e9b27f6 Takeout unneeded div 2018-10-30 16:45:04 -07:00
Steve Klebanoff
9787d1085d Get rid of old demo 2018-10-30 16:43:58 -07:00
Steve Klebanoff
1c0569cfc6 Use simulated progress bar for txn 2018-10-30 16:40:51 -07:00
Steve Klebanoff
9cc82308e5 Always return estimated time, just use default if not known 2018-10-30 16:39:52 -07:00
Steve Klebanoff
5d6fde356a Merge pull request #1198 from 0xProject/feature/instant/gas-estimate
[instant] Gas price estimate
2018-10-30 15:58:18 -07:00
Steve Klebanoff
96fcbeaba6 Showing time 2018-10-30 15:55:53 -07:00
Steve Klebanoff
d21487d0c0 Show estimated time 2018-10-30 15:47:35 -07:00
Steve Klebanoff
dc90136529 Remove old files 2018-10-30 15:43:38 -07:00
Steve Klebanoff
abaa39a5e2 Simulated Progress component working 2018-10-30 15:39:58 -07:00
fragosti
4456c3ee14 feat: allow for flexible position in position animation component 2018-10-30 15:32:43 -07:00
fragosti
a49bf353f8 feat: refactor animation code 2018-10-30 15:21:58 -07:00
Steve Klebanoff
05f059492b WIP: beginning of simulated progress bar component 2018-10-30 14:48:09 -07:00
Steve Klebanoff
13b41c976b Placeholder for estimated time 2018-10-30 13:51:18 -07:00
Steve Klebanoff
bcb633e5cb Making prettier 2018-10-30 13:34:47 -07:00
Steve Klebanoff
05b74ba1c8 Dispatching progress 2018-10-30 13:27:28 -07:00
Brandon Millman
a918e7099d fix(website): prepare website for breaking MetaMask change for eip 1102 2018-10-30 12:50:54 -07:00
Steve Klebanoff
12dad41143 Remove old TODO 2018-10-30 10:58:47 -07:00
Steve Klebanoff
9a0595a607 Rename functions and get rid of old unused function 2018-10-30 10:58:39 -07:00
Steve Klebanoff
37405038e8 Stall at 95 percent 2018-10-30 10:56:11 -07:00
Steve Klebanoff
25039a036c WIP: Progress ticker with finishing 2018-10-30 10:18:00 -07:00
Steve Klebanoff
728f70f51b store estimated time in Ms on state 2018-10-29 20:08:46 -07:00
Steve Klebanoff
f9eba65aee return estimated state 2018-10-29 20:06:31 -07:00
fragosti
d0a0af5130 feat: add 'Select Token' UI to asset amount input 2018-10-29 18:38:23 -07:00
fragosti
4cba70f32e feat: add chevron icon and add it to asset amount input 2018-10-29 17:48:17 -07:00
Steve Klebanoff
5901ee7e96 Move tslint disable line 2018-10-29 17:18:56 -07:00
Steve Klebanoff
09ee7d84f7 Add comment and use constant 2018-10-29 17:17:04 -07:00
Steve Klebanoff
2ad2644b6b Use polyfilled fetch from utils 2018-10-29 17:11:15 -07:00
Steve Klebanoff
30454fe467 async suffix and use polyfill fetch util 2018-10-29 17:11:02 -07:00
fragosti
475698ed92 feat: add basic panel component and other small improvements 2018-10-29 17:02:46 -07:00
Steve Klebanoff
274e4b3bcd Introduce constants for eth gas station and coinbase 2018-10-29 16:53:18 -07:00
Steve Klebanoff
a49fc27042 Comment for warming up cache 2018-10-29 16:49:13 -07:00
fragosti
17f024056a chore: add changelog 2018-10-29 15:50:54 -07:00
fragosti
10e6c3cd90 feat: remove isValidProvided orders validation 2018-10-29 15:48:45 -07:00
Steve Klebanoff
cd419edf69 linting 2018-10-29 15:37:30 -07:00
fragosti
ac72df4188 chore: remove console log 2018-10-29 15:30:25 -07:00
Steve Klebanoff
9610ada446 Use constant that exists now 2018-10-29 15:23:16 -07:00
Steve Klebanoff
8ab8c27998 gas price estimator 2018-10-29 15:21:30 -07:00
Brandon Millman
48ff13e3e2 Merge pull request #1196 from 0xProject/feature/instant/default-gas-price
[instant] Add default gasPrice of 6 gwei to transactions
2018-10-29 15:17:29 -07:00
Brandon Millman
25ca3d4c29 feat(instant): add default gasPrice of 6 gwei to transactions 2018-10-29 13:18:53 -07:00
fragosti
02a975dde4 feat: add augur provided order 2018-10-29 13:17:16 -07:00
Brandon Millman
aeec8f47ef feat(instant): add default gasPrice of 6 gwei to transactions 2018-10-29 12:52:32 -07:00
Brandon Millman
fdf9e860de Merge pull request #1187 from 0xProject/feature/instant/fixed-orders-in-render-method
[instant] Add ability to toggle render settings through URL, flash error on incorrect network, provided liquidity
2018-10-29 10:58:11 -07:00
Brandon Millman
3f35239b27 fix(instant): fix spelling error and BigNumber gte operation 2018-10-29 10:40:11 -07:00
Brandon Millman
aab9bedd7f Merge branch 'development' into feature/instant/fixed-orders-in-render-method
* development:
  Has Sufficient Funds/Balance -> Has Sufficient ETH
  When transaction too low, treat as validation error. also modify callback: errorMessage could be AssetBuyError as well
  onPendingValidation -> onValidationPending
  linting
  Simpler way of validaitng has enough eth
  questionmark syntax instead of '| undefined'
  Validate enough ETH when user clicks buy
  acccount for no address
  move funct into util
  move imports
  yarn.lock changes
  feat(instant): Show message if user doesn't have enough ETH
  ethDecimals -> ETH_DECIMALS
2018-10-29 10:37:56 -07:00
Steve Klebanoff
4e4291eccd Merge pull request #1193 from 0xProject/feature/not-enough-eth
[instant] Not enough ETH error message
2018-10-29 10:12:44 -07:00
Steve Klebanoff
7ed44f7b2f Has Sufficient Funds/Balance -> Has Sufficient ETH 2018-10-29 09:07:40 -07:00
Steve Klebanoff
8288e8cce9 When transaction too low, treat as validation error. also modify callback: errorMessage could be AssetBuyError as well 2018-10-29 09:03:39 -07:00
Steve Klebanoff
1bb7a28690 onPendingValidation -> onValidationPending 2018-10-29 08:56:49 -07:00
Brandon Millman
8d1689073b Merge branch 'development' into feature/instant/fixed-orders-in-render-method
* development:
  fix(instant): refactor some props to use isDisabled instead of disabled
  linting imports
  feat(instant): Disable input when processing
  Add back debounce
  Make doesBuyQuoteMatchState in reducer less strict
  fix(instant): prevent outdated quote requests from overriding the correct quote
  selected asset buy order state button -> selected asset buy order state buttons
  buy order state button -> buy order state buttons
  feat(order_utils.py): ERC721 asset data codec (#1186)
  Add note about tslint false positive
  tsx -> ts
  Get BuyOrderState one big connected component, and let user view failure
  Show View Transaction button on failure, and allow setting of width for Try Again button and View Txn button
  Added string to constants
  chore: Update contract-wrappers CHANGELOG.json
  fix(contract-wrappers): Fix tslint errors that were lingering due to misconfiguration
  chore: Add --format stylish to tslint
2018-10-28 19:07:53 -07:00
Steve Klebanoff
3052c8d303 linting 2018-10-26 19:55:42 -07:00
Steve Klebanoff
ff295daa5c Simpler way of validaitng has enough eth 2018-10-26 19:53:15 -07:00
Steve Klebanoff
bb307a55d3 questionmark syntax instead of '| undefined' 2018-10-26 19:23:42 -07:00
Steve Klebanoff
ae6202ed3d Merge pull request #1194 from 0xProject/feature/instant/input-to-fixed
[instant] Disable input when processing
2018-10-26 19:22:26 -07:00
Brandon Millman
0e55f76db8 fix(instant): refactor some props to use isDisabled instead of disabled 2018-10-26 16:24:16 -07:00
Steve Klebanoff
667b1e03dd Validate enough ETH when user clicks buy 2018-10-26 15:51:23 -07:00
Brandon Millman
4f5ab1a72d Refactor error handling such that errorMessage lives on the top level state 2018-10-26 15:45:17 -07:00
Steve Klebanoff
6ad8ac6a48 Merge branch 'development' into feature/not-enough-eth 2018-10-26 15:34:51 -07:00
Steve Klebanoff
86febc3cce acccount for no address 2018-10-26 15:34:35 -07:00
Steve Klebanoff
e73fceaa20 Merge pull request #1189 from 0xProject/feature/instant/txn-failure
[instant] View txn on failure
2018-10-26 15:33:56 -07:00
Steve Klebanoff
cacfcc291a linting imports 2018-10-26 15:22:28 -07:00
Steve Klebanoff
e1ae551560 move funct into util 2018-10-26 15:20:04 -07:00
Steve Klebanoff
476cbbb6cb move imports 2018-10-26 15:03:56 -07:00
Steve Klebanoff
1880c34ce0 feat(instant): Disable input when processing 2018-10-26 13:46:14 -07:00
Alex Browne
cc7321cb5b Merge pull request #1178 from 0xProject/fix/linter-improvements
Add --format stylish to tslint and fix linter errors in contract-wrappers.
2018-10-26 13:34:21 -07:00
Brandon Millman
ae64fc15e0 Merge pull request #1188 from 0xProject/fix/instant/quote-race-conditions
[instant] Make sure quote updates are consistent with the current state
2018-10-26 13:24:04 -07:00
Brandon Millman
6f4dbc71f2 Add back debounce 2018-10-26 13:11:47 -07:00
Brandon Millman
4bd4ff46cf Make doesBuyQuoteMatchState in reducer less strict 2018-10-26 13:10:15 -07:00
Brandon Millman
edfb56de6c fix(instant): prevent outdated quote requests from overriding the correct quote 2018-10-26 13:10:15 -07:00
Steve Klebanoff
03007e420c selected asset buy order state button -> selected asset buy order state buttons 2018-10-26 12:54:44 -07:00
Steve Klebanoff
7fa1f25e06 buy order state button -> buy order state buttons 2018-10-26 12:53:04 -07:00
Steve Klebanoff
341d7b3407 yarn.lock changes 2018-10-26 12:48:56 -07:00
Steve Klebanoff
9be4c47499 Merge branch 'development' into feature/not-enough-eth 2018-10-26 12:47:24 -07:00
Steve Klebanoff
9512978de9 feat(instant): Show message if user doesn't have enough ETH 2018-10-26 12:43:44 -07:00
Steve Klebanoff
ffecba21f4 ethDecimals -> ETH_DECIMALS 2018-10-26 12:43:08 -07:00
F. Eugene Aumson
af91a56a55 feat(order_utils.py): ERC721 asset data codec (#1186) 2018-10-26 15:13:42 -04:00
fragosti
51da5311b5 fix: init BigNumberInput not BigNumber when initializing state 2018-10-26 11:47:46 -07:00
fragosti
a414dc9b83 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/fixed-orders-in-render-method 2018-10-26 11:41:09 -07:00
F. Eugene Aumson
0f63071696 fix(order_utils.py): tweaks for first publish (#1185) 2018-10-26 14:27:57 -04:00
fragosti
951a5271e1 fix: justify error message left 2018-10-26 11:22:14 -07:00
Francesco Agosti
4c5b26db18 Merge pull request #1175 from 0xProject/feature/instant/input-fees-rounding
[instant] Create a ScalingInput component and use it in the amount input and upgrade to styled-components v4
2018-10-26 11:14:00 -07:00
Alex Browne
e1306f55ed Add note about tslint false positive 2018-10-26 10:52:12 -07:00
Amir Bandeali
d2bf23de71 Merge pull request #1192 from 0xProject/feature/contract-addresses/updateForwarder
Feature/contract addresses/update forwarder
2018-10-26 10:34:33 -07:00
fragosti
3206e1528b feat: add assertions to render method 2018-10-26 10:24:50 -07:00
Steve Klebanoff
68182fb6c4 tsx -> ts 2018-10-26 09:17:40 -07:00
Amir Bandeali
80711eafeb Update CHANGELOGs 2018-10-26 09:14:06 -07:00
Amir Bandeali
cbe595af54 feat: update addresses for Forwarder 2018-10-26 09:08:15 -07:00
Amir Bandeali
dcae27c1a4 feat: update artifact for Forwarder 2018-10-26 09:08:15 -07:00
Fabio Berger
81fb8d614f chore: Make External exports clickable on sidebar 2018-10-26 17:19:53 +02:00
Fabio Berger
3e8d9510ec Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  fix(website): round makerAssetToken amount in FillOrder component
2018-10-26 14:39:05 +02:00
Fabio Berger
a3d4482c4a Update yarn.lock 2018-10-26 14:38:57 +02:00
Kadinsky
1c5745dbd9 Merge pull request #1190 from 0xProject/fix/website/fill-order-rounding
[website] Round makerAssetToken amount in FillOrder component
2018-10-26 14:37:02 +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
Brandon Millman
22d0c76bf1 fix(website): round makerAssetToken amount in FillOrder component 2018-10-25 22:49:47 -07:00
fragosti
30809e646b Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/input-fees-rounding 2018-10-25 18:57:30 -07:00
fragosti
27d9e516e1 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/fixed-orders-in-render-method 2018-10-25 18:53:22 -07:00
fragosti
948d62200a feat: change network to networkId 2018-10-25 18:53:16 -07:00
Steve Klebanoff
39f92e4c95 Get BuyOrderState one big connected component, and let user view failure 2018-10-25 18:46:33 -07:00
fragosti
d5d99b9d2e chore: dont override toString of BigNumber and other PR feedback 2018-10-25 18:35:06 -07:00
Steve Klebanoff
4a96dbe085 Merge pull request #1184 from 0xProject/feature/instant/view-processings-txn
[instant] View Processing Transaction
2018-10-25 15:51:05 -07:00
Steve Klebanoff
ced4c893ba Show View Transaction button on failure, and allow setting of width for Try Again button and View Txn button 2018-10-25 15:42:35 -07:00
fragosti
a2d09a68b0 chore: add to asset-buyer changelog.json 2018-10-25 15:03:30 -07:00
fragosti
98cf046b4c revert: change to contract-addresses 2018-10-25 14:57:08 -07:00
Steve Klebanoff
e3510f3bcf Merge branch 'feature/instant/view-processings-txn' into feature/instant/txn-failure 2018-10-25 14:54:19 -07:00
Steve Klebanoff
89e59cca28 cleanup code 2018-10-25 14:48:59 -07:00
fragosti
0515a914e0 fix: dont fail for mainnet assetData and non-mainnet network 2018-10-25 14:48:37 -07:00
Steve Klebanoff
f04eba7773 Added string to constants 2018-10-25 14:46:30 -07:00
Steve Klebanoff
cd06c0e913 Added string to constants 2018-10-25 14:44:25 -07:00
fragosti
23b1656692 feat: support defaultAssetBuyAmount setting 2018-10-25 14:37:34 -07:00
fragosti
d06b40bd8a chore: use parseInt instead of + 2018-10-25 14:23:31 -07:00
fragosti
de18fa0069 chore: remove console log 2018-10-25 14:20:59 -07:00
fragosti
1a10715fcb feat: flash an error if the wrong network is detected 2018-10-25 14:19:40 -07:00
Steve Klebanoff
062187f28d better type names 2018-10-25 13:58:32 -07:00
Steve Klebanoff
e55d8802e1 Rework OrderState to have more simple definition 2018-10-25 13:53:35 -07:00
Steve Klebanoff
3adc6b6daa Making failure txHash required 2018-10-25 13:36:45 -07:00
Steve Klebanoff
c5e8bb1763 txnHash -> txHash 2018-10-25 13:32:37 -07:00
Steve Klebanoff
acefeff5f0 new try/catch pattern and new prop names per code review feedback 2018-10-25 13:18:17 -07:00
fragosti
2a1c2a55ed feat: supply render options from URL 2018-10-25 11:43:53 -07:00
Steve Klebanoff
45d828e154 take out unused imports 2018-10-25 09:25:49 -07:00
Steve Klebanoff
dc3b867b35 Take out old TODO 2018-10-25 09:22:49 -07:00
Steve Klebanoff
b7f4062ac8 feat(instant): Be able to view transaction when transaction is in progress 2018-10-24 16:17:01 -07:00
Steve Klebanoff
73f5ea2906 Associate txnhash with processing state 2018-10-24 16:04:09 -07:00
Alex Browne
11bc10a3ae Merge pull request #1151 from 0xProject/fix-update-migrations-readme
Update migrations README.
2018-10-24 14:51:36 -07:00
Alex Browne
e45ce4c167 Merge pull request #1182 from 0xProject/albrow-codeowners
Add albrow to CODEOWNERS
2018-10-24 14:45:26 -07:00
Brandon Millman
85b7362073 Merge pull request #1176 from 0xProject/fix/asset-buyer/rounding-errors
[asset-buyer] Fix calculation for ETH and ZRX amount to cover orders
2018-10-24 14:30:18 -07:00
fragosti
46a8aad87a feat: no longer require separate orders and feeOrders args in getAssetBuyerForProvidedOrders
BREAKING_CHANGE: `getAssetBuyerForProvidedOrders` factory function now takes 3 args instead of 4
2018-10-24 14:12:24 -07:00
fragosti
ab2759f431 chore: update comments 2018-10-24 13:47:00 -07:00
fragosti
379f7c7883 chore: use alternate syntax for styled 2018-10-24 13:44:00 -07:00
fragosti
c7a063ca47 fix: weird linting error that depends on types 2018-10-24 13:38:28 -07:00
Steve Klebanoff
db3ad83ebc Introduce new OrderProcessState 2018-10-24 13:24:35 -07:00
Steve Klebanoff
979527a5ee Merge pull request #1180 from 0xProject/feature/instant/metamask-denial
[instant]Message when signature denied
2018-10-24 13:22:04 -07:00
fragosti
2d9c961d4f feat: change to increasing input width by a constant amount per additional character 2018-10-24 13:05:52 -07:00
fragosti
11f7f2d29f Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/input-fees-rounding 2018-10-24 12:57:25 -07:00
fragosti
c5554fe30c chore: run linter 2018-10-24 12:57:20 -07:00
fragosti
6da6540c03 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/input-fees-rounding 2018-10-24 12:56:11 -07:00
Steve Klebanoff
059868e994 Merge pull request #1179 from 0xProject/feature/instant/processing-state
[instant] Success and Processing state
2018-10-24 12:53:18 -07:00
fragosti
f89b314a94 fix: address PR feedback 2018-10-24 12:52:32 -07:00
Alex Browne
06ba26a6d3 Merge pull request #1181 from snario/patch-1
Update README.md
2018-10-24 12:43:38 -07:00
Alex Browne
e50decfa8a Add albrow to CODEOWNERS 2018-10-24 12:41:43 -07:00
Liam Horne
78fb43f59c Update README.md 2018-10-24 15:23:44 -04:00
Steve Klebanoff
09f0bf7f00 Get rid of react-shared as a dependency, write own etherscanUtil 2018-10-24 11:50:05 -07:00
Steve Klebanoff
05ce8aa124 feat: Message when denying signing transaction 2018-10-24 10:42:52 -07:00
Steve Klebanoff
ce5bc3c1c9 Message when signature denied 2018-10-24 10:38:56 -07:00
Steve Klebanoff
33d8044f02 bumping up max bundle size for now (introducing react-shared added a lot), will optimize later 2018-10-24 09:55:13 -07:00
Steve Klebanoff
fefb64442a Get rid of unused import 2018-10-24 09:04:10 -07:00
Steve Klebanoff
119c4e2dc6 Revert "commiting addtl changes to yarn.lock from running yarn"
This reverts commit c1f9f2e8d9.
2018-10-24 08:48:19 -07:00
Steve Klebanoff
c1f9f2e8d9 commiting addtl changes to yarn.lock from running yarn 2018-10-24 08:47:39 -07:00
Steve Klebanoff
38f47a380b Merge branch 'development' into feature/instant/processing-state 2018-10-24 08:46:58 -07:00
Steve Klebanoff
8635f8d732 Merge pull request #1170 from 0xProject/feature/instant/failure-state
[instant] Failure state
2018-10-24 08:38:03 -07:00
fragosti
47737d4d0f feat: cover more token symbol edge cases 2018-10-23 20:05:43 -07:00
Alex Browne
b737313d16 chore: Update contract-wrappers CHANGELOG.json 2018-10-23 18:36:15 -07:00
Alex Browne
9c26334eff fix(contract-wrappers): Fix tslint errors that were lingering due to misconfiguration 2018-10-23 18:30:58 -07:00
Alex Browne
2c04ee3f5e chore: Add --format stylish to tslint 2018-10-23 18:30:11 -07:00
Steve Klebanoff
4df8e60f42 rename container 2018-10-23 17:36:25 -07:00
Steve Klebanoff
df7a1bd8de rename action to resetAmount 2018-10-23 17:32:32 -07:00
Steve Klebanoff
657ae0cf57 null -> undefined 2018-10-23 17:32:20 -07:00
Steve Klebanoff
d43f89fa0a move buy order state to its own component 2018-10-23 17:28:27 -07:00
fragosti
2e184f081e feat: add title attribute to label 2018-10-23 17:17:10 -07:00
Steve Klebanoff
3cd9f40e63 Merge branch 'development' into feature/instant/failure-state 2018-10-23 17:15:23 -07:00
fragosti
8e501e5ec7 feat: add formatted symbol for asset uitl 2018-10-23 17:08:34 -07:00
Steve Klebanoff
4c4286ac66 feat(instant): Procesing and Success states 2018-10-23 17:06:45 -07:00
Francesco Agosti
4a72dc6c6f Merge pull request #1159 from 0xProject/feature/instant/beta-render-et-al
[instant] Pass in liquiditySource, assetData and other settings from render
2018-10-23 17:00:54 -07:00
fragosti
7ccfa8a8af feat: support half-written decimal numbers in BigNumberInput 2018-10-23 16:59:31 -07:00
fragosti
751b87af96 fix: remove unused callback info 2018-10-23 16:28:08 -07:00
Alex Browne
2110ac32b7 Merge pull request #1177 from 0xProject/fix/web3-wrapper-transaction-type
Make getTransactionByHashAsync return the correct type
2018-10-23 16:25:51 -07:00
Alex Browne
c2e8390d21 chore: Fix linter 2018-10-23 16:12:48 -07:00
Alex Browne
075f3c9bfe chore(web3-wrapper): Update CHANGELOG.json 2018-10-23 16:00:40 -07:00
Alex Browne
6027e275b1 fix(web3-wrapper): Make getTransactionByHashAsync return the correct type 2018-10-23 15:56:20 -07:00
fragosti
a5edb0b421 polish: improve scaling significantly 2018-10-23 15:54:18 -07:00
Brandon Millman
da54fc3296 chore(asset-buyer): fix lint errors 2018-10-23 15:32:55 -07:00
fragosti
053e147afc fix: remove the concept of initial with from scaling input and remove phase 2018-10-23 15:19:01 -07:00
fragosti
f0c79473bd fix: dont allow heading to change height when input size changes 2018-10-23 15:01:22 -07:00
fragosti
864f89c535 chore: incorportate pr feedback 2018-10-23 14:13:06 -07:00
Brandon Millman
4db33ba2b3 feat(asset-buyer): update buyQuoteCalculator to match rounding behavior in contracts 2018-10-23 14:06:21 -07:00
Brandon Millman
37f87ab267 Merge pull request #1147 from 0xProject/feature/asset-buyer/signing-request-error
[asset-buyer][contract-wrappers] Throw SignatureRequestDenied and TransactionValueTooLow errors from AssetBuyer
2018-10-23 10:33:33 -07:00
Amir Bandeali
104b2ed759 Merge pull request #1162 from 0xProject/fix/contracts/forwarderRounding
[WIP] Round up for Market Buys in Forwarding Contract.
2018-10-23 10:31:06 -07:00
Amir Bandeali
56953320b3 Run prettier and linter 2018-10-23 10:07:48 -07:00
Brandon Millman
af2bf053bc feat(contract-wrappers): relax requirement for throwing ContractWrappersError.SignatureRequestDenied 2018-10-23 10:02:00 -07:00
Brandon Millman
117ee19370 feat(asset-buyer): throw SignatureRequestDenied and TransactionValueTooLow errors when executing buy 2018-10-23 10:02:00 -07:00
Brandon Millman
dcd428a4a2 feat(monorepo-scripts): add ForwarderWrapperError to IGNORED_EXCESSIVE_TYPES in docGenConfigs 2018-10-23 10:01:46 -07:00
Greg Hysen
e086c7b8e6 Round up for Market Buys in Forwarding Contract. Includes new test cases + regression testing. 2018-10-23 09:56:03 -07:00
F. Eugene Aumson
1f0c7f8fbe feat(order_utils.py): ERC20 asset data encoding and decoding
In addition to the ERC20 codec, also:

Stopped ignoring type errors on 3rd party imports, by including
interface stubs for them;
Removed the unimplemented signature-utils module, which was just a
stand-in when the python project support was first put in place.

https://github.com/0xProject/0x-monorepo/pull/1144
2018-10-23 12:08:16 -04:00
Brandon Millman
b75fe10c79 feat(contract-wrappers): export ForwarderWrapperError and ContractWrapperError.SignatureRequestDenied 2018-10-22 22:44:13 -07:00
fragosti
b7a5e40c62 chore: run linter 2018-10-22 17:56:50 -07:00
fragosti
28f0deb3eb chore: final adjustments 2018-10-22 17:42:28 -07:00
fragosti
bdf623dab5 chore: refactor ScalingInput 2018-10-22 16:54:08 -07:00
fragosti
921492e818 feature: reduce font size by a percentage instead of a constant 2018-10-22 16:45:48 -07:00
Steve Klebanoff
194cbc3ba9 Make icon a bit better 2018-10-22 15:57:16 -07:00
Brandon Millman
1ba207f1fe fix(website): asset-buyer usage documentation formatting 2018-10-22 15:33:55 -07:00
fragosti
c5014af7fe chore: run linter 2018-10-22 15:27:35 -07:00
Steve Klebanoff
579a49ba91 Placing order button 2018-10-22 14:28:22 -07:00
Steve Klebanoff
071f9a5a73 Spinner: change prop names and fix svg props 2018-10-22 14:28:02 -07:00
Steve Klebanoff
4bf1ca0d17 Making SecondaryButton accept children instead of text prop 2018-10-22 14:27:38 -07:00
fragosti
5e67756037 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/beta-render-et-al 2018-10-22 14:26:35 -07:00
fragosti
48e4452a04 feat: add tests for assetUtils 2018-10-22 14:20:20 -07:00
Kadinsky
be97eebe02 Merge pull request #1173 from 0xProject/fixSchemaBug
Fix number schema bug
2018-10-22 23:01:30 +02:00
fragosti
37c5165319 feat: add asset tests 2018-10-22 14:01:08 -07:00
fragosti
15ed3b35df chore: change order of code to be clearer 2018-10-22 13:50:08 -07:00
Brandon Millman
19f9649e74 Merge pull request #1174 from 0xProject/fix/website/kovan
[website] Fix broken order signing on portal and broken loading on kovan
2018-10-22 13:49:52 -07:00
Steve Klebanoff
d52a04e725 Spinner no longer wobbly 2018-10-22 13:18:37 -07:00
Steve Klebanoff
daf447361f WIP: spinner 2018-10-22 13:11:29 -07:00
Brandon Millman
1a3b1607b1 fix(website): create correct subprovider for metamask 2018-10-22 10:56:39 -07:00
Brandon Millman
2bb53d5b1d fix(website): do not fetch balances for empty tokens 2018-10-22 10:56:11 -07:00
Brandon Millman
38eaacdd44 Update yarn.lock 2018-10-22 10:55:34 -07:00
fragosti
77a4d7e2b7 feat: have basic scaling amount input working 2018-10-22 10:50:25 -07:00
Fabio Berger
dbf75a43c3 Add wholeNumberSchema test 2018-10-21 20:31:35 +02:00
Fabio Berger
39c7f3dc88 chore: fix file name 2018-10-21 20:30:53 +02:00
Fabio Berger
01f82ddf78 chore: Add whole number to next json-schema doc md section 2018-10-21 20:24:38 +02:00
Fabio Berger
24b5b35a74 chore: link to schemas at a particular commit so it doesn't change when they are updated 2018-10-21 20:22:51 +02:00
Fabio Berger
4dfbc6747e Fix links 2018-10-21 20:08:22 +02:00
Fabio Berger
528ae4376e revert unrelated change 2018-10-21 19:27:42 +02:00
Fabio Berger
e0149618f3 Add changelog 2018-10-21 19:26:06 +02:00
Fabio Berger
632d7b6fc1 fix: improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal numbers 2018-10-21 19:24:19 +02:00
Fabio Berger
b9dccf9da3 chore: add whole number schema 2018-10-21 19:20:36 +02:00
Fabio Berger
7e24c04c0b fix: Update address to ZRX token to newly deployed 'mintable' ZRX token on Kovan/Ropsten 2018-10-20 15:01:29 +01:00
Steve Klebanoff
a766d78706 Remove hack fix 2018-10-19 16:41:39 -07:00
Steve Klebanoff
bf0a4bd91b feat(instant): Add failure state and icon 2018-10-19 16:41:39 -07:00
Steve Klebanoff
51779fec38 linting 2018-10-19 16:11:01 -07:00
Steve Klebanoff
ac2d93ab22 Small refacotor of icons or amounts part 2018-10-19 16:06:42 -07:00
Steve Klebanoff
092d010c2d Render failure icon 2018-10-19 15:57:11 -07:00
Steve Klebanoff
30b0770993 Merge branch 'feature/instant/beta-render-et-al' into feature/instant/failure-state 2018-10-19 15:40:44 -07:00
fragosti
a017f5e385 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/beta-render-et-al 2018-10-19 15:01:54 -07:00
fragosti
6510454337 feat: add scaling input component 2018-10-19 14:58:12 -07:00
Steve Klebanoff
d2766d7ced Selected Asset button 2018-10-19 14:49:38 -07:00
Steve Klebanoff
6c79a858df WIP: clear buy quote working 2018-10-19 13:51:57 -07:00
fragosti
f06541ec94 fix: animation component typing 2018-10-19 13:46:31 -07:00
fragosti
d5105b5c9f feat: user better syntax for defining ui components 2018-10-19 13:45:12 -07:00
Steve Klebanoff
17b282b1d7 wip: retry button 2018-10-19 13:42:42 -07:00
fragosti
43ad2fe23b feat: upgrade to styled-components v4 2018-10-19 13:34:42 -07:00
Amir Bandeali
2c308c0f4c Merge pull request #1168 from 0xProject/feature/contracts/updateReadme
Update links, remove 1.0 from contracts README
2018-10-19 13:29:04 -07:00
Amir Bandeali
d8001e696e Update links, remove 1.0 from README 2018-10-19 13:12:25 -07:00
Steve Klebanoff
aeb607d485 Merge pull request #1161 from 0xProject/feature/instant/order-details-loading-state
[instant] Order details loading state
2018-10-19 12:28:52 -07:00
Steve Klebanoff
c070142dc0 linting 2018-10-19 12:08:33 -07:00
Steve Klebanoff
6f80c7e6d9 arrow function syntax so no need to bind 2018-10-19 12:05:57 -07:00
Steve Klebanoff
48dd9569f7 Icon component for Instant 2018-10-19 11:58:52 -07:00
Kadinsky
c66e2f6704 Merge pull request #1164 from 0xProject/additionalDevFixes
Additional Developer Section Fixes
2018-10-19 19:47:58 +01:00
Fabio Berger
b49e5c76e4 Use em for all 2018-10-19 19:38:20 +01:00
Fabio Berger
ce4da870d7 chore: use Text 2018-10-19 19:38:12 +01:00
Steve Klebanoff
6588cf919e dont export PlainPlaceholder 2018-10-19 10:34:44 -07:00
Steve Klebanoff
2f4e498a09 Refactor to make placeholder logic more straightforward 2018-10-19 10:32:37 -07:00
Steve Klebanoff
66465816ca Getting rid of displayName, and rename usdSection -> _renderUsdSection 2018-10-19 10:19:48 -07:00
Fabio Berger
bce9031868 chore: use colors module 2018-10-19 17:44:49 +01:00
fragosti
100f446031 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/beta-render-et-al 2018-10-19 09:44:47 -07:00
Fabio Berger
0de654bbd5 fix: scroll lag on doc reference and wiki pages by using react-scroll spy and only updating the sidebar menu items whose active state had changed 2018-10-19 17:40:55 +01:00
Francesco Agosti
eb3a4d2fab Merge pull request #1148 from 0xProject/feature/instant/discharge
[instant] Create dogfood url and deployment workflow
2018-10-19 09:38:36 -07:00
fragosti
48f1e6057c chore: run linter 2018-10-19 09:23:58 -07:00
Fabio Berger
d129c922ed Use media module 2018-10-19 17:22:33 +01:00
fragosti
6f2217570f Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/discharge 2018-10-19 09:19:37 -07:00
Fabio Berger
90ba8e0e8d Remove unused listeners 2018-10-19 17:09:13 +01:00
Leonid Logvinov
669ea191a5 Merge pull request #1165 from 0xProject/fix/release-notes-versions
Fix the package versions in release notes
2018-10-19 15:44:52 +02:00
Leonid Logvinov
3f2b6482c3 Fix the package versions in release notes 2018-10-19 15:36:46 +02:00
Fabio Berger
16ba01cd2e chore: fix dropdown bug on Firefox and reduced duplicate code 2018-10-19 14:05:37 +01:00
Fabio Berger
7282e3ce03 style: Switch out homepage image with improved one from Ben 2018-10-19 14:04:17 +01:00
Fabio Berger
977e20edc3 style: make sure sideBar bottom padding is on scrollable content, not container 2018-10-19 13:27:16 +01:00
Kadinsky
17643d98aa Merge pull request #1163 from 0xProject/devSectionFixes
Developer Section Fixes
2018-10-19 12:34:26 +01:00
Fabio Berger
724f3b9cf7 Improve sidebar logic to handle MS Edge, Firefox differences between Windows & Mac 2018-10-19 12:25:31 +01:00
Fabio Berger
a7a17c85dc chore: improve sidebar scroll 2018-10-19 11:48:15 +01:00
Fabio Berger
7742df8614 chore: Replace state with styled-components for hover detection 2018-10-19 11:27:42 +01:00
Fabio Berger
26cd5ec149 style: accomodate different scrollbar widths on Firefox vs. Chrome/Safari 2018-10-19 10:46:55 +01:00
Fabio Berger
da0c5dd9d3 chore: Fix scroll issue by bumping version and installing from new branch 2018-10-19 10:35:34 +01:00
Fabio Berger
a60cf44d45 style: fix doc reference package name capitalization 2018-10-19 10:16:01 +01:00
Fabio Berger
62f219ea74 Merge branch 'development' into devSectionFixes
* development:
  chore: Update list of published packages in top-level README
2018-10-19 10:09:23 +01:00
Fabio Berger
c26b3f5dfc copy: consistently name ERCdEX with correct capitalization 2018-10-19 10:05:19 +01:00
Fabio Berger
0eb9769cd4 Switch tutorial descriptions 2018-10-19 10:00:30 +01:00
Fabio Berger
eca862f818 copy: Networked liquidity -> shared liquidity 2018-10-19 09:56:34 +01:00
Fabio Berger
3f43f9bb4c fix: Make sure page scrollable on mobile 2018-10-19 09:44:52 +01:00
Fabio Berger
ee6bb229e0 Don't show topBar menu items in sidebar on wiki 2018-10-19 09:44:27 +01:00
fragosti
f3a6800306 fix: dont force NFTs to uppercase their name 2018-10-18 18:08:49 -07:00
fragosti
7bc2df5602 feat: add network to state and use it where relevant 2018-10-18 17:42:32 -07:00
Steve Klebanoff
1737411ab7 Show order failed messaging when order fails 2018-10-18 17:16:28 -07:00
fragosti
7a8adf9db5 feat: use color from metaData instead of default primaryColor 2018-10-18 16:35:59 -07:00
fragosti
ad6dc8e891 fix: refactor ZeroExInstant state creation logic and fix bug 2018-10-18 16:04:51 -07:00
fragosti
44635f34f0 fix: error test undefined case 2018-10-18 15:54:53 -07:00
fragosti
b4fb6b5ff3 fix: add error message and move more logic to assetUtils 2018-10-18 15:48:35 -07:00
fragosti
c87e68f833 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/beta-render-et-al 2018-10-18 15:42:33 -07:00
Steve Klebanoff
ff1f0a9678 undefined -> null to follow convention 2018-10-18 15:33:14 -07:00
Steve Klebanoff
aa0e07b058 pulsating -> isPulsating 2018-10-18 15:33:14 -07:00
Steve Klebanoff
a42347a776 Allow more than 1 class per file
Felt silly that refactoring a component defined as a function to a class with a helper function caused a tslint violation
2018-10-18 15:33:14 -07:00
Steve Klebanoff
8ff5e19269 Move USD section into helper function 2018-10-18 15:33:14 -07:00
Steve Klebanoff
8a6e077664 feat(instant): Indicate that order details section is loading by having pulsing placeholder 2018-10-18 15:32:32 -07:00
Alex Browne
f9d8610383 Merge pull request #1160 from 0xProject/fix/published-packages-list
Update list of published packages in top-level README
2018-10-18 13:50:55 -07:00
Steve Klebanoff
b4af27dd44 Moved LatestErrorDisplay to types file and gave generic name 2018-10-18 13:48:28 -07:00
Steve Klebanoff
9aa6753823 Rename update function to set function since it doesnt take a parameter 2018-10-18 13:42:59 -07:00
Steve Klebanoff
94ace00e0c fix camel casing of updateBuyOrderState 2018-10-18 13:38:04 -07:00
Steve Klebanoff
12b6877aeb Pulsating holder element showing, even if amount is empty 2018-10-18 13:31:11 -07:00
Kadinsky
65d85ca500 Merge pull request #1158 from 0xProject/docSectionFixes
Update Doc Ref Markdown Sections
2018-10-18 21:15:31 +01:00
Alex Browne
3f0059d4bb chore: Update list of published packages in top-level README 2018-10-18 13:10:49 -07:00
Steve Klebanoff
4b348e1e60 quoteState -> quoteRequestState 2018-10-18 11:09:23 -07:00
fragosti
a764dfa789 feat: MVP of passing in sraApiUrl, assetData and other settings from render method 2018-10-18 10:43:41 -07:00
Fabio Berger
c2038eae5b Merge branch 'development' into docSectionFixes
* development:
  Remove 0x.js -> monorepo-scripts dependency
  Don't attempt publishing if no packages need it
2018-10-18 17:42:24 +01:00
Fabio Berger
c4ae91c7c5 Update doc ref markdown sections 2018-10-18 17:31:38 +01:00
Leonid Logvinov
857eb95ac0 Merge pull request #1157 from 0xProject/feature/fix-monorepo-scripts
Don't attempt publishing if no packages need it
2018-10-18 16:39:00 +02:00
Leonid Logvinov
4fd3f12aeb Remove 0x.js -> monorepo-scripts dependency 2018-10-18 16:25:13 +02:00
Leonid Logvinov
a7336d3c65 Don't attempt publishing if no packages need it 2018-10-18 16:16:27 +02:00
Leonid Logvinov
8b62b350b1 Publish
- 0x.js@2.0.0
 - @0x/abi-gen@1.0.14
 - @0x/abi-gen-wrappers@1.0.1
 - @0x/assert@1.0.14
 - @0x/asset-buyer@2.1.0
 - @0x/base-contract@3.0.2
 - @0x/connect@3.0.2
 - @0x/contract-addresses@1.0.1
 - @0x/contract-artifacts@1.0.1
 - @0x/contract-wrappers@3.0.0
 - contracts@2.1.50
 - @0x/dev-tools-pages@0.0.2
 - @0x/dev-utils@1.0.13
 - ethereum-types@1.1.1
 - @0x/fill-scenarios@1.0.8
 - @0x/instant@0.0.3
 - @0x/json-schemas@2.0.0
 - @0x/metacoin@0.0.24
 - @0x/migrations@2.0.0
 - @0x/monorepo-scripts@1.0.12
 - @0x/order-utils@2.0.0
 - @0x/order-watcher@2.2.0
 - @0x/react-docs@1.0.14
 - @0x/react-shared@1.0.17
 - @0x/sol-compiler@1.1.8
 - @0x/sol-cov@2.1.8
 - @0x/sol-doc@1.0.3
 - @0x/sol-resolver@1.0.15
 - @0x/sra-spec@1.0.7
 - @0x/subproviders@2.1.0
 - @0x/testnet-faucets@1.0.52
 - @0x/tslint-config@1.0.9
 - @0x/types@1.2.0
 - @0x/typescript-typings@3.0.3
 - @0x/utils@2.0.3
 - @0x/web3-wrapper@3.1.0
 - @0x/website@0.0.55
2018-10-18 16:03:00 +02:00
Leonid Logvinov
71d1e6b0ec Updated CHANGELOGS 2018-10-18 16:02:49 +02:00
Leonid Logvinov
7e49db2301 Fix ethereum-types versions 2018-10-18 15:52:32 +02:00
Leonid Logvinov
4b95e3d684 Merge pull request #1156 from 0xProject/feature/0x/npm-domain
Move package org from 0xproject to 0x
2018-10-18 15:46:33 +02:00
Leonid Logvinov
392d339443 Add index signature to FakeTokenRegistry 2018-10-18 15:37:22 +02:00
Leonid Logvinov
ece76e5874 Fix prettier issues 2018-10-18 15:27:07 +02:00
Fabio Berger
8cb6d99f17 chore: update yarn.lock 2018-10-18 14:18:39 +01:00
Fabio Berger
ac377490dc chore: add missing import 2018-10-18 14:09:02 +01:00
Fabio Berger
058c887353 chore: missing converts 2018-10-18 14:08:26 +01:00
Fabio Berger
0affc7682f chore: fix imports 2018-10-18 14:06:12 +01:00
Fabio Berger
1c68bdabaa chore: fix dep 2018-10-18 14:03:09 +01:00
Fabio Berger
683c6f22af chore: add missing imports 2018-10-18 14:03:00 +01:00
Fabio Berger
8c6de7f69d chore: replace @0xproject with @0x in .tsx files 2018-10-18 13:59:40 +01:00
Fabio Berger
4bf50a0496 update outdated package and tsconfig issue 2018-10-18 13:59:21 +01:00
Fabio Berger
745d368130 Remove old 0x.js from website 2018-10-18 13:50:03 +01:00
Jacob Evans
aa4a474e1d chore: update ethers import in utils 2018-10-18 23:11:56 +11:00
Jacob Evans
ff99f84f15 chore: update yarn.lock 2018-10-18 22:51:59 +11:00
Jacob Evans
10ff723287 chore: change abi-gen-wrappers ethereum-types version 2018-10-18 22:31:06 +11:00
Jacob Evans
56ef712d26 chore: change circleci config from 0xproject to 0x 2018-10-18 22:31:06 +11:00
Jacob Evans
2735fb4fa6 chore: change README.md from 0xproject to 0x 2018-10-18 22:30:09 +11:00
Jacob Evans
88c929a408 chore: change tslint.json from 0xproject to 0x 2018-10-18 22:28:38 +11:00
Jacob Evans
9f924e459c chore: change package org from 0xproject to 0x 2018-10-18 22:27:31 +11:00
Leonid Logvinov
9e8bca69a8 Merge pull request #1155 from 0xProject/feature/RIP-sra-report
Remove sra-report
2018-10-18 13:24:49 +02:00
Kadinsky
325af82217 Merge pull request #1154 from 0xProject/dev-section-redesign
[BASE_BRANCH] Developer section redesign
2018-10-18 12:20:50 +01:00
Leonid Logvinov
f8876ab60b Remove sra-report 2018-10-18 13:15:39 +02:00
Kadinsky
47dc384ea3 Merge pull request #1140 from 0xProject/reSkinReferenceDocs
Move Doc Reference Pages & Wiki into Developer Section of Website
2018-10-18 12:14:32 +01:00
Leonid Logvinov
f74080fe0d Fix prettier 2018-10-18 13:06:09 +02:00
Fabio Berger
e7c6f2a357 Add styled-components dep 2018-10-18 12:04:19 +01:00
Fabio Berger
56cb2470cc chore: fix up asset-buyer doc and add to Dev Home 2018-10-18 12:01:01 +01:00
Leonid Logvinov
ea65fa4f65 Merge pull request #1153 from 0xProject/feature/enable-linter
Enable linter on generated abi-gen wrappers
2018-10-18 12:48:53 +02:00
Leonid Logvinov
d5daa68703 Enable linter on generated abi-gen wrappers 2018-10-18 12:46:06 +02:00
Fabio Berger
28863f9a6f merge dev-section-redesign 2018-10-18 11:36:41 +01:00
Fabio Berger
cdd650d0eb merge development 2018-10-18 11:35:07 +01:00
Kadinsky
bd8ba14bf4 Merge pull request #1152 from 0xProject/feature/website/hide-v1-volume
[website] Add expanded and minimized display types to relayer grid
2018-10-18 11:32:07 +01:00
Fabio Berger
6ab6a9aa2b Update react-scroll hash to avoid collision with older, unfixed branch 2018-10-18 11:28:48 +01:00
Kadinsky
d0df074721 Merge pull request #1142 from 0xProject/feature/instant/asset-buyer-errors
[instant] Asset buyer errors
2018-10-18 11:12:24 +01:00
Fabio Berger
612e8db930 Update changelogs for unpublished packages 2018-10-18 10:39:37 +01:00
Jacob Evans
376034ac7e Update changelog entries for unpublished packages 2018-10-18 20:03:22 +11:00
Brandon Millman
95775dca1f feat(website): add expanded and minimized display types to relayer grid 2018-10-18 00:10:33 -07:00
Alex Browne
9f61735f94 fix(migrations): Update README.md.
Removed older v1 and v2-testnet-beta scripts from the README.
2018-10-17 17:36:18 -07:00
Jacob Evans
86aa5f9643 Merge pull request #1150 from 0xProject/fix/publishing/doc-gen-order-utils-constant
fix(order-utils): remove constants export
2018-10-18 11:20:19 +11:00
Jacob Evans
02cf99fa36 fix(order-utils): remove constants export 2018-10-18 11:07:00 +11:00
Steve Klebanoff
6ea386a7af selectedAssetBuyState -> buyOrderState 2018-10-17 16:50:21 -07:00
Steve Klebanoff
1d38b75d6f fix type 2018-10-17 16:49:57 -07:00
Steve Klebanoff
01b98c3ed0 ReactNode as default for formatters, and show bold dash 2018-10-17 16:46:01 -07:00
Steve Klebanoff
6cf8d57aee add concept of quoteState 2018-10-17 16:41:35 -07:00
Steve Klebanoff
7b43cd14b3 error test 2018-10-17 14:44:40 -07:00
Steve Klebanoff
f2f7598c0e asset data util tests 2018-10-17 14:44:40 -07:00
Steve Klebanoff
ae4f1a093a handle other errors 2018-10-17 14:44:40 -07:00
Steve Klebanoff
2b495a7935 bigger emoji 2018-10-17 14:44:40 -07:00
Steve Klebanoff
155858de6e creating big error util file per francescos comment in PR 2018-10-17 14:44:40 -07:00
Steve Klebanoff
d052342df7 use lodash isUndefined per PR comment 2018-10-17 14:44:40 -07:00
Steve Klebanoff
32fa1bcc38 export assetDataUtil big obj 2018-10-17 14:44:40 -07:00
Steve Klebanoff
187bbc7fc1 latestErrorDismissed -> latestErrorDisplay enum 2018-10-17 14:44:40 -07:00
Steve Klebanoff
d46b288733 use redux dev tools from package 2018-10-17 14:44:40 -07:00
Steve Klebanoff
dfc5d7d860 get rid of unused marginLeft and marginRight props 2018-10-17 14:44:39 -07:00
Steve Klebanoff
1d07949087 linting, removing unused imports 2018-10-17 14:44:39 -07:00
Steve Klebanoff
db77cd10c5 feat(instant): Handle AssetBuyer errors 2018-10-17 14:44:39 -07:00
Steve Klebanoff
f36352be47 move z-index setting to zero instant container, and add ability for zindex to be set on container 2018-10-17 14:44:39 -07:00
Steve Klebanoff
18c9907d6f feat(instant): add sliding error 2018-10-17 14:44:39 -07:00
fragosti
91ca80b248 prettify discharge file 2018-10-17 14:01:32 -07:00
fragosti
59743d32da feat: create dogfood url and deployment workflow 2018-10-17 13:44:13 -07:00
Fabio Berger
ac68f8db44 refactor: fix anchor so it doesn't keep re-rendering the anchor icon 2018-10-17 20:18:28 +01:00
Kadinsky
5ec4b27200 Merge pull request #1145 from 0xProject/refactorSchemasToJSON
Move json-schema schemas to JSON files
2018-10-17 19:01:29 +01:00
Brandon Millman
b2012bf161 Merge pull request #1139 from 0xProject/feature/website/asset-buyer-docs
[asset-buyer][monorepo-scripts][website] Add asset-buyer documentation
2018-10-17 10:57:57 -07:00
Brandon Millman
81505ba56c Fix duplicate BuyQuoteInfo 2018-10-17 10:44:25 -07:00
Brandon Millman
75e3b44d9e Update asset-buyer usage wording 2018-10-17 10:33:05 -07:00
Brandon Millman
84057934c6 Merge branch 'development' into feature/website/asset-buyer-docs
* development: (31 commits)
  Update CODEOWNERS
  Update CODEOWNERS
  Update CODEOWNERS
  Add leo to CODEOWNERS on some packages
  fix(monorepo-scripts): Format date as UTC not local time.
  Bump max bundle size for instant
  fix: dont use enum string as type as typedoc gets confused
  feat: export AssetData from order-utils
  feat: export AssetData from utils
  chore: temporarily increase the bundle size for instant
  Remove order-utils from dependencies
  Run tests on circle CI
  Add tests for format and use toFixed instead of round for usd
  Remove expiry buffer seconds option from AssetBuyer init
  Add ts-optchain and use it instead of lodash get
  Hide USD price when ETH-USD price is not available
  Rename OrderDetailsRow to EthAmountRow
  fix: add Steve's github account to about page, and capitalize AppFolio correctly
  Put boundNoop in a util file
  Add tnxHash to buy button callbacks
  ...
2018-10-17 10:30:29 -07:00
Fabio Berger
bdae4ba2a2 chore: tslint fix 2018-10-17 18:23:06 +01:00
Fabio Berger
87fabbb943 chore: Fix remaining necessary casts 2018-10-17 17:36:21 +01:00
Fabio Berger
a31f3b542f Add necessary cast 2018-10-17 17:18:00 +01:00
Fabio Berger
f7de26f65c chore: make abi type prop always of type string to fix TypeDoc issue related to reading in artifacts from JSON files 2018-10-17 17:13:32 +01:00
Fabio Berger
852f50d1a0 chore: Re-cast to EventAbi after checking the the type is set to 'event' 2018-10-17 17:09:35 +01:00
Fabio Berger
f3f97896ed chore: add resolveJsonModule to TypeDoc tsconfig.json 2018-10-17 16:18:51 +01:00
Fabio Berger
7c87d2e38b chore: Update TypeDoc to 0.13.0 (supports TS v3.1) 2018-10-17 16:18:28 +01:00
Fabio Berger
03b20eed29 nit: remove todo 2018-10-17 15:58:10 +01:00
Fabio Berger
4d275cc591 nit: don't init scrolledToId 2018-10-17 15:55:05 +01:00
Fabio Berger
e18f66e5b7 nit: use styled-component instead of react-state for onHover 2018-10-17 15:53:28 +01:00
Fabio Berger
4ca89fc9f1 nit: use ObjectMap 2018-10-17 15:53:01 +01:00
Fabio Berger
f2e5a9635b chore: make linter ignore json schemas 2018-10-17 15:33:50 +01:00
Leonid Logvinov
c767404ad0 Merge pull request #1146 from 0xProject/feature/codeowners
Add leo to CODEOWNERS on some packages
2018-10-17 16:25:31 +02:00
Kadinsky
492df3108c Update CODEOWNERS 2018-10-17 16:25:17 +02:00
Kadinsky
7db53cf92c Update CODEOWNERS 2018-10-17 16:25:10 +02:00
Kadinsky
7fab0a5a86 Update CODEOWNERS 2018-10-17 16:25:05 +02:00
Fabio Berger
41bb38a776 Merge branch 'refactorSchemasToJSON' of github.com:0xProject/0x-monorepo into refactorSchemasToJSON
* 'refactorSchemasToJSON' of github.com:0xProject/0x-monorepo:
  chore: remove schemas from include section
2018-10-17 14:22:23 +01:00
Fabio Berger
b7d7c5f38b chore: Add json schemas to prettier ignore 2018-10-17 14:20:49 +01:00
Leonid Logvinov
0ecaa90ffd Add leo to CODEOWNERS on some packages 2018-10-17 15:15:04 +02:00
Leonid Logvinov
abc00b05c3 chore: remove schemas from include section 2018-10-17 14:04:01 +01:00
Fabio Berger
d87643fdfa Update schemas markdown section for v2 docs 2018-10-17 14:02:38 +01:00
Fabio Berger
bd00f1279b Add CHANGELOG entry 2018-10-17 13:54:27 +01:00
Fabio Berger
9176e535aa Fix sra-spec & connect 2018-10-17 13:52:43 +01:00
Fabio Berger
7d9009bb96 Convert all schemas to json files, so it's easier for devs in other languages to use it 2018-10-17 13:28:26 +01:00
Jacob Evans
78e6063d92 Merge pull request #1143 from 0xProject/fix/monorepo-scripts/changelog-utc
[monorepo-scripts] Format changelog dates as UTC timezone +0:00
2018-10-17 20:34:10 +11:00
Jacob Evans
0013bafc62 fix(monorepo-scripts): Format date as UTC not local time.
Down under is in the future and causes many conflicts when formatting the timestamp in the local context. All previous releases jumped a day ahead. By setting this to UTC we will have consistent formatted dates in the changelogs no matter where one publishes from.

npm-cli-login fails on node 10 as a deprecation in node 9 has finished. This package appears to be unmaintained so we now have a fork with a fix
2018-10-17 14:25:02 +11:00
Francesco Agosti
336e456984 Merge pull request #1131 from 0xProject/feature/instant/move-features-over-from-zrx-buyer
[instant][types][order-utils][asset-buyer] Move over and clean up features from zrx-buyer
2018-10-16 18:18:41 -07:00
fragosti
32beeae2f0 Bump max bundle size for instant 2018-10-16 18:03:13 -07:00
fragosti
eda0b3e693 fix: dont use enum string as type as typedoc gets confused 2018-10-16 17:48:25 -07:00
Steve Klebanoff
35b001b081 Merge pull request #1138 from 0xProject/feature/add-steves-github
[website] Add Steve's github
2018-10-16 17:42:06 -07:00
fragosti
8ba65346d4 feat: export AssetData from order-utils 2018-10-16 17:00:53 -07:00
fragosti
009b5b575c feat: export AssetData from utils 2018-10-16 17:00:18 -07:00
fragosti
d2adbc3647 chore: temporarily increase the bundle size for instant 2018-10-16 16:59:53 -07:00
fragosti
6a89935e3b Remove order-utils from dependencies 2018-10-16 16:58:21 -07:00
Fabio Berger
62f4bb2117 chore: Add topBar menu in wiki mobile sidebar menu 2018-10-17 00:55:47 +01:00
Fabio Berger
ce43724bd4 chore: Rename "Documentation" to "Docs" in mobile menu 2018-10-17 00:39:55 +01:00
Fabio Berger
18c31a3bc0 chore: Add topBar menu items to mobile drawer 2018-10-17 00:37:56 +01:00
fragosti
c328616330 Run tests on circle CI 2018-10-16 16:20:23 -07:00
fragosti
2610868589 Add tests for format and use toFixed instead of round for usd 2018-10-16 16:13:23 -07:00
Fabio Berger
fdefa5952c chore: componentize the sidebar header 2018-10-16 23:25:51 +01:00
Fabio Berger
7f2636fd05 chore: Add missing responsive classes 2018-10-16 22:34:00 +01:00
Fabio Berger
fb7d0b9d0b chore: Fix logo on mobile topBar 2018-10-16 22:09:04 +01:00
fragosti
dbf5be6c21 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/move-features-over-from-zrx-buyer 2018-10-16 11:15:17 -07:00
Brandon Millman
aa1085c8f3 feat(website): add asset-buyer documentation 2018-10-16 10:00:49 -07:00
Brandon Millman
55be070dcf feat(monorepo-scripts): add AssetBuyer to CLASSES_WITH_HIDDEN_CONSTRUCTORS 2018-10-16 10:00:49 -07:00
Brandon Millman
2c286ad897 feat(monorepo-scripts): add AssetBuyerError to IGNORED_EXCESSIVE_TYPES 2018-10-16 10:00:49 -07:00
Brandon Millman
4976b34738 feat(asset-buyer): add missing types to public interface 2018-10-16 10:00:49 -07:00
Brandon Millman
7aab4d10de feat(asset-buyer): add hooks for documentation 2018-10-16 10:00:41 -07:00
Fabio Berger
2305109170 chore: fix linter 2018-10-16 17:42:58 +01:00
Fabio Berger
9bae3e51d9 chore: initalize _urlIntervalCheckId 2018-10-16 17:09:17 +01:00
Fabio Berger
c84c92663d Merge branch 'dev-section-redesign' into reSkinReferenceDocs
* dev-section-redesign: (87 commits)
  Added note about restriction on `testDirectory`
  fix(dev-utils): Make chai a dev dependency since exported interface depends on it
  Add changelog entries
  fix(subproviders): make web3-provider-engine types a 'dependency' so it's available to users of the library
  fix(sra-spec): make @loopback/openapi-v3-types a 'dependency' so it's available to users of the library
  fix(sol-cov): make @types/solidity-parser-antlr a 'dependency' so it's available to users of the library
  fix(dev-utils): make web3-provider-engine types a 'dependency' so it's available to users of the library
  fix(0x.js): make web3-provider-engine types a 'dependency' so it's available to users of the library
  fix(monorepo-scripts): Move the creation of the `.installation-test` directory OUTSIDE of the monorepo root, so that the installed packages can't reference the hoisted node_modules folder
  Remove ContractNotFound errors in contract-wrappers
  Update prettierignore
  Update website to use the new unsubscribeAll method in contract-wrappers
  In abi-gen-wrappers, ./wrappers -> ./src/generated-wrappers
  In contract-wrappers, remove setProvider and add unsubscribeAll method.
  take out explicit children definition in props
  Update json-schemas for contract-wrappers
  Add OrThrow suffix to getContractAddressesForNetwork
  remove unused import
  Update CHANGELOG.json for all changed packages
  Remove ContractAddresses from packages/types (mistake after rebase)
  ...
2018-10-16 16:59:02 +01:00
Fabio Berger
c333d093b5 merge development 2018-10-16 16:58:24 +01:00
Fabio Berger
55a3bc8cb6 chore: don't use Container in react-shared, react-docs yet 2018-10-16 16:43:43 +01:00
Fabio Berger
e6e883e05a chore: remove unused prop 2018-10-16 16:38:59 +01:00
Fabio Berger
17fb4d5b57 chore: Remove unused prop 2018-10-16 16:38:05 +01:00
Fabio Berger
05f7b73307 chore: convert to stateless component 2018-10-16 16:36:06 +01:00
Fabio Berger
bf51728466 chore: simplify 2018-10-16 16:35:55 +01:00
Fabio Berger
6ad98420a0 style: improve menu & logo alignment 2018-10-16 16:12:26 +01:00
Fabio Berger
afe6181757 chore: Implement newest topBar 2018-10-16 15:53:24 +01:00
Fabio Berger
ce68e20e82 chore: remove unused imports 2018-10-16 15:41:58 +01:00
Fabio Berger
f35156517d chore: get menu onHover darken back 2018-10-16 15:35:56 +01:00
Fabio Berger
72f5719b34 Added note about restriction on testDirectory 2018-10-16 15:17:49 +01:00
Fabio Berger
be45a30851 chore: change landing "build on 0x" to link to developer home, not 0x.js docs 2018-10-16 14:36:26 +01:00
Fabio Berger
13f8801e08 chore: remove wiki from main website topBar 2018-10-16 14:35:55 +01:00
Fabio Berger
ad235912d7 chore: Replace FAQ with Developer home in footer 2018-10-16 14:35:33 +01:00
Fabio Berger
6ff35172d6 Replace sandbox with wiki in developer popover 2018-10-16 14:35:10 +01:00
Kadinsky
e624587050 Merge pull request #1105 from 0xProject/feature/contracts-artifacts-re-org
Reorganize and modularize generated contract wrappers and artifacts
2018-10-16 14:21:46 +01:00
Fabio Berger
5938e8a52d fix(dev-utils): Make chai a dev dependency since exported interface depends on it 2018-10-16 13:55:13 +01:00
Fabio Berger
fca5260eb1 Add changelog entries 2018-10-16 13:33:30 +01:00
Fabio Berger
021041165a fix(subproviders): make web3-provider-engine types a 'dependency' so it's available to users of the library 2018-10-16 13:26:44 +01:00
Fabio Berger
6c9277867d fix(sra-spec): make @loopback/openapi-v3-types a 'dependency' so it's available to users of the library 2018-10-16 13:26:09 +01:00
Fabio Berger
75b0781969 fix(sol-cov): make @types/solidity-parser-antlr a 'dependency' so it's available to users of the library 2018-10-16 13:25:26 +01:00
Fabio Berger
eab88cbe7c fix(dev-utils): make web3-provider-engine types a 'dependency' so it's available to users of the library 2018-10-16 13:24:47 +01:00
Fabio Berger
2e56e2cc05 fix(0x.js): make web3-provider-engine types a 'dependency' so it's available to users of the library 2018-10-16 13:24:24 +01:00
Fabio Berger
8cffe65047 fix(monorepo-scripts): Move the creation of the .installation-test directory OUTSIDE of the monorepo root, so that the installed packages can't reference the hoisted node_modules folder 2018-10-16 13:22:15 +01:00
Alex Browne
5bdfad9b41 Remove ContractNotFound errors in contract-wrappers 2018-10-16 00:23:43 -07:00
Alex Browne
3c5812c5d2 Update prettierignore 2018-10-16 00:00:22 -07:00
fragosti
d268e19124 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/move-features-over-from-zrx-buyer 2018-10-15 18:53:15 -07:00
fragosti
875f621f20 Remove expiry buffer seconds option from AssetBuyer init 2018-10-15 18:13:09 -07:00
fragosti
f2e5fd8846 Add ts-optchain and use it instead of lodash get 2018-10-15 18:07:19 -07:00
Alex Browne
5509bf5aeb Update website to use the new unsubscribeAll method in contract-wrappers 2018-10-15 18:04:29 -07:00
Alex Browne
2c63909d5d In abi-gen-wrappers, ./wrappers -> ./src/generated-wrappers 2018-10-15 17:50:13 -07:00
fragosti
18667d739c Hide USD price when ETH-USD price is not available 2018-10-15 17:39:52 -07:00
Alex Browne
6f8e98e537 In contract-wrappers, remove setProvider and add unsubscribeAll method. 2018-10-15 17:35:25 -07:00
fragosti
fa18db84d9 Rename OrderDetailsRow to EthAmountRow 2018-10-15 17:33:27 -07:00
Steve Klebanoff
05bf7a8280 Merge pull request #1135 from 0xProject/feature/instant-sliding-error
[instant] Generic sliding error component
2018-10-15 17:30:39 -07:00
Steve Klebanoff
f8edef66e4 fix: add Steve's github account to about page, and capitalize AppFolio correctly 2018-10-15 17:22:15 -07:00
Steve Klebanoff
b0a2cacd82 take out explicit children definition in props 2018-10-15 17:11:43 -07:00
Alex Browne
e093864bff Update json-schemas for contract-wrappers 2018-10-15 17:09:35 -07:00
fragosti
ac3bfdfe5f Put boundNoop in a util file 2018-10-15 17:06:28 -07:00
fragosti
fcf3451448 Add tnxHash to buy button callbacks 2018-10-15 17:06:06 -07:00
Alex Browne
38b146c395 Add OrThrow suffix to getContractAddressesForNetwork 2018-10-15 14:22:48 -07:00
fragosti
43f8f2abbd feat: add changelog entries for changed packages 2018-10-15 14:20:31 -07:00
Fabio Berger
fb0e0473de chore: move wiki to Developers section 2018-10-15 22:18:44 +01:00
Steve Klebanoff
45ff83d852 remove unused import 2018-10-15 14:15:58 -07:00
Alex Browne
e3af06ab10 Update CHANGELOG.json for all changed packages 2018-10-15 14:11:20 -07:00
fragosti
e7130af6a9 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/move-features-over-from-zrx-buyer 2018-10-15 14:11:05 -07:00
Alex Browne
be1a597250 Remove ContractAddresses from packages/types (mistake after rebase) 2018-10-15 14:10:31 -07:00
Steve Klebanoff
f13d061dd2 move z-index setting to zero instant container, and add ability for zindex to be set on container 2018-10-15 14:04:53 -07:00
Alex Browne
00db096d2e Fix bug introduced during rebase 2018-10-15 13:44:21 -07:00
Steve Klebanoff
7325e16698 get rid of unused marginLeft and marginRight props 2018-10-15 13:41:36 -07:00
Steve Klebanoff
14b47f3a9f better private function syntax 2018-10-15 13:39:00 -07:00
Alex Browne
f0e4837983 Fix failing doc generation tests 2018-10-15 13:38:59 -07:00
Alex Browne
003ab1e5b3 Fix linter errors in contract-wrappers 2018-10-15 13:38:59 -07:00
Alex Browne
24673be1cd Add resolveJsonModule: true to test_installation.ts 2018-10-15 13:38:59 -07:00
Alex Browne
7a6cace1ec Create CHANGELOG.json for three new packages 2018-10-15 13:38:59 -07:00
Alex Browne
8dc73d3d85 Add README.md for each new package 2018-10-15 13:38:59 -07:00
Alex Browne
d76d8abc1d Update .gitignore and .prettierignore 2018-10-15 13:38:59 -07:00
Alex Browne
c83dec22c9 Improve error handling for unknown network ids in contract-wrappers 2018-10-15 13:38:59 -07:00
Alex Browne
974ec23ecd Apply various PR feedback 2018-10-15 13:38:33 -07:00
Alex Browne
68f150eff2 Remove as any hack from artifacts in contracts package 2018-10-15 13:38:33 -07:00
Alex Browne
0e1cd9784b Use contractAddresses directly in revert_validation_test.ts 2018-10-15 13:38:33 -07:00
Alex Browne
6d79e30266 Update .gitattributes 2018-10-15 13:38:33 -07:00
Alex Browne
1e9ea09f08 Introduce new contract-addresses package and use it everywhere 2018-10-15 13:38:33 -07:00
Alex Browne
fa346d9461 Remove networks/addresses from contract-artifacts package 2018-10-15 13:37:57 -07:00
Alex Browne
33e65c322e Remove unused abi-gen dependencies 2018-10-15 13:37:57 -07:00
Alex Browne
770cf52933 Remove unused copyfiles dependencies 2018-10-15 13:37:57 -07:00
Alex Browne
1b8b2c0b9b Appease linter 2018-10-15 13:37:57 -07:00
Alex Browne
6c8fb370dc Update order-watcher to use new migrations functions 2018-10-15 13:37:57 -07:00
Alex Browne
a48e0a08bf Add new runMigrationsOnce method to migrations. Update contract-wrappers to use it. 2018-10-15 13:37:57 -07:00
Alex Browne
ecdd6e3303 Fix linter errors in contract-wrappers 2018-10-15 13:37:57 -07:00
Alex Browne
17c6661e2d Cleanup migrations and contracts package. Make contracts private again. 2018-10-15 13:37:57 -07:00
Alex Browne
141121004c Remove generated artifacts in the contracts package 2018-10-15 13:37:57 -07:00
Alex Browne
3af7d1ad02 Add missing dependency to abi-gen-wrappers 2018-10-15 13:37:56 -07:00
Alex Browne
255da32d29 Update testnet-faucets and website to work with new artifacts and abi-gen wrappers 2018-10-15 13:37:56 -07:00
Alex Browne
29063cab18 update order-watcher to use new artifacts and abi-gen wrappers packages 2018-10-15 13:37:56 -07:00
Alex Browne
3da032fb24 update asset-buyer to use new artifacts and abi-gen wrappers packages 2018-10-15 13:36:59 -07:00
Alex Browne
d0b37fcab5 update fill-scenarios to use new artifacts and abi-gen wrappers packages 2018-10-15 13:36:59 -07:00
Alex Browne
57d9fcf9e5 update order-utils to use new artifacts and abi-gen wrappers packages 2018-10-15 13:36:59 -07:00
Alex Browne
2bd7b0f66b update contract_wrappers to use new artifacts and abi-gen wrappers packages 2018-10-15 13:36:59 -07:00
Alex Browne
8f0ceaf1d8 Create abi-gen-wrappers package 2018-10-15 13:36:59 -07:00
Alex Browne
1da3604351 Create contract-artifacts package (needed to solve dependency cycle) 2018-10-15 13:36:59 -07:00
Alex Browne
3a7bb97ad1 Remove artifacts from migrations package and update contract-wrappers accordingly 2018-10-15 13:36:59 -07:00
Alex Browne
2aa73fc839 Add generated contract wrappers in contracts package to gitignore 2018-10-15 13:36:10 -07:00
Alex Browne
33335a6791 Automatically collapse contract artifacts by adding them to .gitattributes 2018-10-15 13:36:10 -07:00
Alex Browne
5b1b423b5e Change @0xproject/contracts version number back to 2.1.48 2018-10-15 13:36:10 -07:00
Alex Browne
90f5e4d197 Update .prettierignore 2018-10-15 13:36:09 -07:00
Alex Browne
026ad1f9a1 Update contract-wrappers package to use new contracts package for generated files 2018-10-15 13:36:09 -07:00
Alex Browne
81c4887241 Move generated contract wrappers and artifacts into contracts package 2018-10-15 13:36:09 -07:00
Steve Klebanoff
20d60e2368 dont need constructor just to set state
git status
2018-10-15 13:33:30 -07:00
Steve Klebanoff
58ad7d7caf change to ? syntax instead of number | undefined 2018-10-15 13:15:02 -07:00
Steve Klebanoff
af49514397 suggestions from code review: renaming timeoutNumber to timeoutId, sharing interface, renaming component 2018-10-15 13:12:52 -07:00
Steve Klebanoff
2aa4761d6d add semicolons 2018-10-15 10:28:26 -07:00
Brandon Millman
83a36aff3f feat: update CODEOWNERS for asset-buyer, instant, and website 2018-10-15 09:58:03 -07:00
Fabio Berger
8b8c958203 chore: fix padding issue 2018-10-15 17:46:42 +01:00
Fabio Berger
6bf27ac57f chore: replace Github with Wiki in topBar and refactor so can display internal & external links 2018-10-15 17:43:45 +01:00
Fabio Berger
ce151f630d feat: highlighted sidebar as you scroll on doc reference pages 2018-10-15 17:35:40 +01:00
Fabio Berger
96d145f54f chore: Remove unused state 2018-10-15 16:49:46 +01:00
Fabio Berger
c9a0c7872d Chore: Only render one sidebar at a time 2018-10-15 16:48:39 +01:00
Fabio Berger
a5e435d831 fix: menu item overflow issue 2018-10-15 12:58:09 +01:00
Fabio Berger
6ada38248e chore: improve rendering of sidebar top section on mobile 2018-10-15 12:49:47 +01:00
Fabio Berger
40512ea608 chore: Export Stats from types, not indirectly from OrderWatcher 2018-10-15 12:38:02 +01:00
Fabio Berger
60208091a4 chore: fix missed class rename 2018-10-15 12:35:38 +01:00
Fabio Berger
29437c5761 chore: Export stats type from 0x.js 2018-10-15 12:26:23 +01:00
Kadinsky
79db7147a4 Merge pull request #1118 from BEcorp/development
[order-watcher] Public function getStats
2018-10-15 12:25:24 +01:00
Fabio Berger
b3a323efa1 fix: Nested a tag warning in console by not rendering a tags within type definition popovers 2018-10-15 12:20:30 +01:00
Fabio Berger
bf9af95654 chore: improve colors 2018-10-15 11:57:16 +01:00
Fabio Berger
eee0640b07 chore: many small stylistic changes 2018-10-15 11:27:56 +01:00
Fabio Berger
4298da118f chore: improve styling of sidebar 2018-10-15 11:23:02 +01:00
Fabio Berger
bd763ebb34 chore: fix key issue 2018-10-15 11:22:22 +01:00
Fabio Berger
3fbf9c4285 chore: round border of code snippets 2018-10-15 11:22:00 +01:00
Brandon Millman
23fb8dab13 Merge pull request #1134 from 0xProject/feature/contract-wrappers/forwarder-wrapper-validation
[contract-wrappers] Add optional validation to the forwarder wrapper
2018-10-14 23:39:53 -07:00
Fabio Berger
9b1f765ced chore: only show sidebar once docs have loaded 2018-10-13 17:11:47 +01:00
Fabio Berger
d85daab967 fix: Dropdown component so that re-clicking the activeNode when dropdown is open, closes it 2018-10-13 17:09:46 +01:00
Fabio Berger
11941b08b6 Fix sidebar top so long titles display correctly 2018-10-13 17:09:04 +01:00
Fabio Berger
6f77b90836 Chore: remove unused imports 2018-10-13 16:32:36 +01:00
Fabio Berger
2b2f5d6169 Fix: Make width variable 2018-10-13 16:32:26 +01:00
Fabio Berger
1d30a2f91d Remove doc menus from main topBar 2018-10-13 16:29:24 +01:00
Fabio Berger
6baadc746e Implement new version dropdown and remove it from nestedTopBar 2018-10-13 16:29:14 +01:00
Andrew Maurer
69e9dbd683 Merge branch 'development' into development 2018-10-13 11:09:50 -04:00
Fabio Berger
e0e011eb66 Fix sidebar shifting onHover due to scrollbar width 2018-10-13 15:10:25 +01:00
amaurer
dc56ce4549 Exported Stats in OW package 2018-10-13 08:47:37 -04:00
Steve Klebanoff
0aef2c8ade feat(instant): add sliding error 2018-10-12 16:26:26 -07:00
Steve Klebanoff
7102a23b0a feat: add Steve to team page 2018-10-12 16:26:26 -07:00
fragosti
f39541436a feat: model asset meta data and add dynamic assetData state 2018-10-12 16:11:30 -07:00
fragosti
ccf021b8bf feat: use new AssetData type from types package 2018-10-12 14:52:42 -07:00
fragosti
025614a7fd feat: Add AssetData type as union of ERC721AssetData and ERC20AssetData 2018-10-12 14:52:18 -07:00
Brandon Millman
22abd1dfcf feat(contract-wrappers): add optional validation to the forwarder wrapper
Similar to the approach taken in exchange wrapper, make a call to an rpc
node in order to simulate the transaction before actually sending the
transaction. The decorator will parse revert reasons and other types of
errors into canonical errors that a consumer of the library expects when
interacting with a contract wrapper.
2018-10-12 14:42:31 -07:00
F. Eugene Aumson
a424c2adfa fix: linter 2018-10-12 16:05:41 -04:00
F. Eugene Aumson
55f9348d0a fix: use python's extsplit, not manual splicing 2018-10-12 16:00:45 -04:00
F. Eugene Aumson
2afa38c927 feat(python/order_utils): project stub
An empty project, with respect to functionality, but one configured with
a test framework, linters, CI integration, etc.

https://app.asana.com/0/836857747873847/839549782781239/f
2018-10-12 15:50:48 -04:00
F. Eugene Aumson
92fd0a9d24 feat: project stub for python order utilities
An empty project, with respect to functionality, but one configured with
a test framework, linters, CI integration, etc.

https://app.asana.com/0/836857747873847/839549782781239/f
2018-10-12 15:31:19 -04:00
Fabio Berger
a5eb346dd1 fix: Remove unnecessary onClick prop from NestedSidebar, since one can listen to container element onClick 2018-10-12 19:44:51 +01:00
Fabio Berger
a4604cb2f2 Pass down sidebar instead of sectionNameToLinks 2018-10-12 19:44:18 +01:00
Kadinsky
11033c78f5 Merge pull request #1132 from 0xProject/removeRollbarUMD
fix(website): replace Rollbar UMD with regular npm package
2018-10-12 20:13:11 +02:00
fragosti
f3391e1250 feat: make redux actions type-sage 2018-10-12 11:00:36 -07:00
fragosti
09c5ae4e65 feat: have coinbase API return BigNumber for eth-usd price endpoint 2018-10-12 09:55:33 -07:00
amaurer
cd04a21e29 Fixes per converstaion, stats interface to pub 2018-10-12 11:55:31 -04:00
Fabio Berger
3ca9439481 Make all doc reference pages responsive 2018-10-12 17:42:41 +02:00
Fabio Berger
36f202f7b4 Improve loading 2018-10-12 16:38:25 +02:00
Fabio Berger
a86ca6257f If sidebar menu item links to internal page, no longer open in new tab 2018-10-12 15:59:23 +02:00
Fabio Berger
16386bc99e Add Getting starter sidebar header 2018-10-12 15:55:00 +02:00
Fabio Berger
de20ef1a49 Refactor Home so that Dev section chrome is reusable across pages 2018-10-12 15:54:44 +02:00
fragosti
03b235bb42 feat: populate order details with information from worst buy quote 2018-10-11 17:35:22 -07:00
fragosti
1c92ae0ed0 fix: export BuyQuoteInfo from asset-buyer 2018-10-11 17:34:43 -07:00
fragosti
0edd9b32ba feat: debounce the fetching of new quotes 2018-10-11 15:35:39 -07:00
fragosti
63652df3b9 feat: adjust amount input width 2018-10-11 15:05:20 -07:00
Steve Klebanoff
5c76c8586d Merge pull request #1128 from 0xProject/feature/add-steve-to-team
[website] add Steve to team page
2018-10-11 12:41:32 -07:00
Alex Browne
f3cba233ad Use medium+ resource class for build-website (#1129) 2018-10-11 11:27:28 -07:00
Fabio Berger
dcdc411ab7 chore: update yarn.lock 2018-10-11 14:58:39 +02:00
Fabio Berger
7f217dcb3c style: Make width of developer section same as rest of website (1064px) 2018-10-11 14:58:29 +02:00
Fabio Berger
295a8c760a merge dev-section-redesign 2018-10-11 14:25:47 +02:00
Fabio Berger
1cfcc82ea9 Merge branch 'development' into dev-section-redesign
* development: (62 commits)
  Fix linter error
  Upgrade ethereum-types
  Lint and update deps
  Be more explicit with falsiness
  Add type to cssRuleIfExists
  Fix issue where we throw if non-numeric characters are used in input
  Upgrade to more recent types, fix yarn.lock
  [fix]: [testnet-faucet] Exit 1 on build fail
  Explains tools we want them to use
  Add note about button
  Add dev-tools-pages bundles to gitignore
  Improve README
  Fix button and center
  Increase max bundle size for instant
  Add stuff
  Initial project scaffolding
  Change tslint config to remove conflicts with prettier
  fix: [testnet-faucet] Signing of orders
  Update the CHANGELOG
  Add comments for expiryBuffer
  ...
2018-10-11 14:23:45 +02:00
Fabio Berger
a1a0d120be Update yarn.lock 2018-10-11 14:19:25 +02:00
Fabio Berger
2e3624d888 fix(website): replace Rollbar UMD with regular npm package 2018-10-11 13:57:07 +02:00
Fabio Berger
9b147f1495 fix(website): remove deadzone between "Developers" menu item and dropdown so it never closes when hovering between the two 2018-10-11 13:49:56 +02:00
Fabio Berger
636ce6331b fix(website): Avoid hover activated dropdown from closing when activeNode is clicked 2018-10-11 13:33:49 +02:00
Leonid Logvinov
8941b6cee5 Merge pull request #1125 from 0xProject/feature/starter-dev-tools-pages
Initial project scaffolding for dev tools pages
2018-10-11 12:44:00 +02:00
Leonid Logvinov
e4351789d2 Fix linter error 2018-10-11 12:23:19 +02:00
fragosti
19f61906d3 feat: Move over features from zrx-buyer 2018-10-10 18:28:12 -07:00
Francesco Agosti
a5a033c359 Merge pull request #1114 from 0xProject/feature/instant/redux-styles-container
[instant] Add styles and redux to instant
2018-10-10 18:27:54 -07:00
fragosti
50442c3ebb Upgrade ethereum-types 2018-10-10 17:25:17 -07:00
fragosti
9fe88b2146 Lint and update deps 2018-10-10 17:14:17 -07:00
fragosti
c8e7d225ca Be more explicit with falsiness 2018-10-10 16:55:59 -07:00
fragosti
0aa7bfab0d Add type to cssRuleIfExists 2018-10-10 16:48:27 -07:00
fragosti
7bc9cd8c94 Fix issue where we throw if non-numeric characters are used in input 2018-10-10 16:43:55 -07:00
fragosti
0a3c543d5d Upgrade to more recent types, fix yarn.lock 2018-10-10 16:31:14 -07:00
Jacob Evans
01ccd8ff1a [fix]: [testnet-faucet] Exit 1 on build fail
If we detect any compilation errors then exit with 1
2018-10-11 09:56:49 +11:00
Steve Klebanoff
f73e6a75b1 feat: add Steve to team page 2018-10-10 15:21:41 -07:00
Fabio Berger
a300a451c8 Explains tools we want them to use 2018-10-10 22:50:20 +02:00
Fabio Berger
2a95d3269d Add note about button 2018-10-10 22:44:03 +02:00
Fabio Berger
c8fd1ae05c Add dev-tools-pages bundles to gitignore 2018-10-10 22:40:56 +02:00
Fabio Berger
19a657c38b Improve README 2018-10-10 22:40:14 +02:00
Fabio Berger
7418932432 Fix button and center 2018-10-10 22:31:18 +02:00
fragosti
aec0dd3835 Increase max bundle size for instant 2018-10-10 10:38:04 -07:00
Fabio Berger
fb882b0c77 Add stuff 2018-10-10 17:22:31 +02:00
Leonid Logvinov
6c0d317380 Initial project scaffolding 2018-10-10 16:20:14 +02:00
Fabio Berger
0fd158ac64 Replace Rollbar UMD with regular import 2018-10-10 16:06:32 +02:00
fragosti
a165f5d25b Change tslint config to remove conflicts with prettier 2018-10-09 18:41:31 -07:00
fragosti
2bd8cbb80c Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/redux-styles-container 2018-10-09 18:25:14 -07:00
Brandon Millman
afb34da729 Merge pull request #1116 from 0xProject/feature/asset-buyer/api-tweaks
[asset-buyer] Fix order expiration calc bug and expose gas options to executeBuyQuote
2018-10-09 18:15:33 -07:00
Jacob Evans
402089db4e fix: [testnet-faucet] Signing of orders
Signing of orders changed in order-utils but forgot to update testnet faucet
2018-10-10 11:31:27 +11:00
Brandon Millman
8155d311af Merge branch 'development' into feature/asset-buyer/api-tweaks
* development:
  Define bundlewatch.ci.repoBranchBase
  Stop accesing ethers private methods
  Fix merge conflicts
  Fix ethers build issue
  Upgrade ethers.js version
  Fix branch name
  Add max sizes
  Use bundlewatch instead of bundlesize
  Move Metamask Error to OrderErrors
  Update the exported types for the packages which touch RPC providers
  Throw and handle errors from Providers.
  Clarifies use of schemas outside of Javascript/TypeScript.
  Detect MM on signature validation failure.
  Return SignedOrder from signing utils.
  Update 0x.js Changelog
  Add eth_signTypedData support to our wallet subproviders
  Move SignTypedData to utils package
  Introduce Metamask Subprovider.
  Expose eth_signTypedData functionality for order signing
2018-10-09 17:04:54 -07:00
Brandon Millman
cd8e6d9cdf Update the CHANGELOG 2018-10-09 16:36:19 -07:00
Brandon Millman
f2fdb6e47d Add comments for expiryBuffer 2018-10-09 14:28:54 -07:00
fragosti
941448d65c Fix empty input bug 2018-10-09 12:11:12 -07:00
fragosti
764f402eb9 Center 0x instant 2018-10-09 12:00:55 -07:00
Leonid Logvinov
bd06ebde8d Merge pull request #1122 from 0xProject/feature/new-ethers
Upgrade ethers.js version
2018-10-09 16:28:44 +02:00
Leonid Logvinov
fbd7115500 Define bundlewatch.ci.repoBranchBase 2018-10-09 16:11:29 +02:00
Leonid Logvinov
f93774f855 Stop accesing ethers private methods 2018-10-09 16:01:34 +02:00
Leonid Logvinov
d21e6f3aaf Fix merge conflicts 2018-10-09 16:01:34 +02:00
Leonid Logvinov
22160df2d2 Fix ethers build issue 2018-10-09 16:01:34 +02:00
Leonid Logvinov
31ee8870b8 Upgrade ethers.js version 2018-10-09 16:01:34 +02:00
Leonid Logvinov
9876f6cc34 Merge pull request #1123 from 0xProject/feature/artifacts
Use bundlewatch instead of bundlesize
2018-10-09 16:01:14 +02:00
Leonid Logvinov
6f600029a2 Fix branch name 2018-10-09 14:57:14 +02:00
Leonid Logvinov
1bc4d47663 Add max sizes 2018-10-09 14:29:40 +02:00
Leonid Logvinov
6bfe7d7b7e Use bundlewatch instead of bundlesize 2018-10-09 14:15:52 +02:00
Jacob Evans
024bcf492d Merge pull request #1102 from 0xProject/feature/0x.js/eip712-sign-typed-data
[0x.js][order-utils][web3-wrapper] Expose eth_signTypedData functionality for order signing
2018-10-09 21:17:11 +11:00
Jacob Evans
75b9e63919 Move Metamask Error to OrderErrors 2018-10-09 20:58:30 +11:00
Fabio Berger
6c9f7839c3 Merge branch 'development' into dev-section-redesign
* development:
  Clarifies use of schemas outside of Javascript/TypeScript.
  Fix typo
  Add asset-buyer to published packages section in README
  Publish
  Updated CHANGELOGS
  Update BuyQuote interface
  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
2018-10-09 11:42:35 +02:00
Jacob Evans
7f554303b4 Update the exported types for the packages which touch RPC providers 2018-10-09 20:29:41 +11:00
Jacob Evans
9e8031d5e3 Throw and handle errors from Providers.
In web3 wrapper when a response contains an error field we throw this rather than return response.result which is often undefined.
In Signature Utils we handle the error thrown when a user rejects the signing dialogue to prevent double signing.
Exposed the ZeroExTransaction JSON schema.
In Website only use the MetamaskSubprovider if we can detect the provider is Metamask
2018-10-09 19:01:36 +11:00
Fabio Berger
3ac9dac4f0 Merge pull request #1121 from nebkor/development
Clarifies use of schemas outside of Javascript/TypeScript.
2018-10-09 08:50:21 +02:00
Fabio Berger
9654397b29 Merge pull request #1103 from 0xProject/doc-overview-page
Implement Developer Home
2018-10-08 19:12:52 +01:00
Joe Ardent
34c00eaeb3 Clarifies use of schemas outside of Javascript/TypeScript. 2018-10-07 21:28:11 -07:00
Jacob Evans
e1236a4846 Detect MM on signature validation failure.
Report a developer friendly error in this event to educate them on the compatability wrapper MetamaskSubprovider
2018-10-08 11:13:04 +11:00
amaurer
e5192507ab Fixed accidental carriage return removal in index.ts 2018-10-07 12:31:51 -04:00
amaurer
2e1222556f Changed getWatchedOrders to getStats and returns Stats object 2018-10-07 12:24:42 -04:00
amaurer
9171f9ec60 Fix lint issues 2018-10-06 11:04:48 -04:00
amaurer
d0fed1ae46 Fixed linting issue 2018-10-06 10:43:36 -04:00
amaurer
ee0f2e46ee Update order-watcher changelog 2018-10-06 10:32:07 -04:00
amaurer
c833b4f494 Added comments to new getWatchCounts function 2018-10-06 10:23:16 -04:00
amaurer
bd3f101ab8 Added orderWatchCount to return total count of orders watched. 2018-10-06 10:06:34 -04:00
Brandon Millman
f9f8e06c1c Fix incorrect affiliate fee calculations and associated tests 2018-10-05 15:42:19 -07:00
Brandon Millman
cb1311ecc5 Increase default expiryBufferSeconds from 15 to 300 (5 minutes) 2018-10-05 15:25:54 -07:00
Brandon Millman
9ba00a1077 Add comments for gasPrice and gasLimit 2018-10-05 15:24:11 -07:00
fragosti
405234133b Fix order expiration calc bug and expose gas options to executeBuyQuote 2018-10-05 13:40:26 -07:00
Fabio Berger
6cc9631ef6 remove unused import 2018-10-05 17:58:54 +01:00
Fabio Berger
2966ab12e0 Move valid-url import to react-shared 2018-10-05 17:58:34 +01:00
Fabio Berger
3ce665eeab Fix comment 2018-10-05 17:58:22 +01:00
Fabio Berger
03bfc7dd40 Fix liinter 2018-10-05 17:34:46 +01:00
Fabio Berger
a5d0066d00 Convert TutorialButton to styled component 2018-10-05 17:28:03 +01:00
Fabio Berger
df7210163a Convert more divs to containers and text components 2018-10-05 15:33:15 +01:00
Fabio Berger
ded6742ddd remove inline style 2018-10-05 15:06:59 +01:00
Fabio Berger
fa6bd34899 Remove type prop and instead infer it from the value of to 2018-10-05 14:55:28 +01:00
Fabio Berger
5f2cd33da0 Remove style prop from Link 2018-10-05 13:54:37 +01:00
Fabio Berger
e0355a2e39 Rename scroll container 2018-10-05 12:03:15 +01:00
Fabio Berger
f7aee9c7a9 Remove containerId option and throw if passing in shouldOpenInNewTab with type ReactScroll 2018-10-05 12:00:24 +01:00
Fabio Berger
e7de4b953f Apply props to all link variants when possible 2018-10-05 11:51:52 +01:00
Fabio Berger
d98de363eb Render paragraphs with spans so we don't get margin added 2018-10-05 11:46:35 +01:00
Fabio Berger
055763cceb Fix bug where wiki links in dev dropdown weren't working when on the wiki 2018-10-05 11:13:33 +01:00
Fabio Berger
60ba8d57d4 Fix react warning 2018-10-05 10:13:19 +01:00
Jacob Evans
75d274f330 Return SignedOrder from signing utils.
Create a helper back in EIP712Utils for code cleanup.
Moved constants in order-utils into the constants object
2018-10-05 17:12:17 +10:00
fragosti
d7b6d8222f Apply linter 2018-10-04 19:32:33 -07:00
fragosti
1eb8d17ce3 Create SelectedAssetInputAmount 2018-10-04 19:24:10 -07:00
Jacob Evans
6e462b7dba Update 0x.js Changelog 2018-10-05 12:03:01 +10:00
Jacob Evans
3e2fe40a11 Add eth_signTypedData support to our wallet subproviders 2018-10-05 12:02:09 +10:00
Jacob Evans
2a82ff48c0 Move SignTypedData to utils package 2018-10-05 12:00:41 +10:00
Jacob Evans
07926ded6e Introduce Metamask Subprovider.
MM has a number of inconsistencies with other providers when implementing the JSON RPC interface. This subprovider wraps those nuances so they do not leak into the rest of our code
2018-10-05 12:00:41 +10:00
Jacob Evans
adcfaa2e80 Expose eth_signTypedData functionality for order signing 2018-10-05 11:59:24 +10:00
fragosti
c5084f023a Add Input and AmountInput component 2018-10-04 18:57:40 -07:00
fragosti
bf0437324d Add border radios 2018-10-04 18:06:19 -07:00
fragosti
1001dfcc30 Add box shadow and default box-sizing: border-box to container 2018-10-04 18:02:42 -07:00
fragosti
98f8c77494 Add BuyButton and other small improvement 2018-10-04 17:48:10 -07:00
fragosti
d9b7aa2e4b Add faux order details section 2018-10-04 17:22:36 -07:00
fragosti
0cfe5637c0 Create zrx instant container heading 2018-10-04 16:27:04 -07:00
Brandon Millman
119f8c9449 Fix typo 2018-10-04 16:25:30 -07:00
Brandon Millman
b04b649ec0 Add asset-buyer to published packages section in README 2018-10-04 16:03:16 -07:00
fragosti
e2220a939f Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/redux-styles-container 2018-10-04 16:00:10 -07:00
fragosti
831b4a1193 apply prettier 2018-10-04 15:57:48 -07:00
fragosti
d2e4a150d9 Fix currupted yarn lock file 2018-10-04 15:47:19 -07:00
fragosti
00eb3211c9 Remove deps we probably dont need 2018-10-04 15:20:06 -07:00
fragosti
1e3ab76e9a Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/redux-styles-container 2018-10-04 15:03:14 -07:00
fragosti
ba2ba628e8 Fix linting problems 2018-10-04 15:02:06 -07:00
fragosti
a8b01fedb1 Improve utilities and try to use them in simple form component 2018-10-04 14:59:07 -07:00
fragosti
85c34b17aa Add Flex and Container component 2018-10-04 14:04:56 -07:00
Fabio Berger
85045267fe remove stray logs 2018-10-04 19:26:50 +01:00
Fabio Berger
c9bfb86960 merge base branch 2018-10-04 19:03:01 +01:00
Fabio Berger
3991e66a58 merge developmemnt 2018-10-04 18:59:55 +01:00
fragosti
4b8348da8c Add some ui components 2018-10-03 16:20:39 -07:00
fragosti
48e7aa6e77 Add Inter UI font 2018-10-03 15:16:59 -07:00
fragosti
15f20cc18e Add redux to 0x instant 2018-10-03 14:28:07 -07:00
fragosti
700b7068a1 Add styled-components with theme 2018-10-03 14:08:08 -07:00
Fabio Berger
d0b2b4d0aa Convert more divs to Containers 2018-10-03 19:00:59 +01:00
Fabio Berger
4184c5db85 Use Container and Text where possible 2018-10-03 17:30:23 +01:00
Fabio Berger
7197f26494 rename for clarity 2018-10-03 17:25:23 +01:00
Fabio Berger
46764c2d3f Fix linter 2018-10-03 17:23:43 +01:00
Fabio Berger
a7955c0964 Remove todo 2018-10-03 17:19:39 +01:00
Fabio Berger
1bef42cdcb Improve comment 2018-10-03 17:17:16 +01:00
Fabio Berger
8d6bffa96c Use nestedSidebarMenu component for Dev home 2018-10-03 17:03:05 +01:00
Fabio Berger
72b1c60f39 Fix nit 2018-10-03 16:44:18 +01:00
Fabio Berger
751e8eafe4 Remove stray console.log 2018-10-03 16:41:44 +01:00
Fabio Berger
437612f8b8 Use same Link UI component for react-scroll links 2018-10-03 16:37:59 +01:00
Fabio Berger
ab855cdd1c remove stray console 2018-10-03 14:43:25 +01:00
Fabio Berger
688325491f Make whole bottom bar clickable not just the text 2018-10-03 14:37:49 +01:00
Fabio Berger
6d8427a024 Don't make opening links in new tab a default 2018-10-03 14:26:30 +01:00
Fabio Berger
80a6e6fe8d Decrease size of section descriptions 2018-10-03 14:26:16 +01:00
Fabio Berger
55d61b0dc7 Add border underneath logo while user is scrolling 2018-10-03 12:14:22 +01:00
Fabio Berger
f13c482161 Align logo and menu 2018-10-03 11:43:17 +01:00
Fabio Berger
188564a343 Add padding to bottom of scroll area 2018-10-03 11:28:56 +01:00
Fabio Berger
773220f840 Fix link 2018-10-03 11:27:28 +01:00
Fabio Berger
0c80fea821 Make tutorial buttons also open in a new tab 2018-10-03 10:52:48 +01:00
Fabio Berger
4fb7b35153 Convert remaining Links to new UI component 2018-10-03 10:52:37 +01:00
Fabio Berger
c07412a992 Use new Link UI component everywhere, and add complementary ALink type 2018-10-02 20:10:59 +01:00
Fabio Berger
0c99680396 Improve mobile padding 2018-10-02 10:51:41 +01:00
Fabio Berger
91afc37d2a Fix hovering 2018-10-02 10:30:44 +01:00
Fabio Berger
b79e3eaec6 Simplify helper methods 2018-10-02 09:15:41 +01:00
Fabio Berger
94766cbe19 Use colors module 2018-10-02 09:15:33 +01:00
Fabio Berger
d435341f9b Use container instead of div 2018-10-02 09:11:50 +01:00
Fabio Berger
c42b340042 Move more copy to translation files 2018-10-02 09:07:53 +01:00
Fabio Berger
3a9791e794 Make menuSubsectionsBySection optional 2018-10-01 22:26:06 +01:00
Fabio Berger
0d57ed6c93 Rename for clarity 2018-10-01 22:25:45 +01:00
Fabio Berger
457ed57d70 Move constants before configs and add TODO comment 2018-10-01 22:08:59 +01:00
Fabio Berger
67a2359014 Add comment about link component 2018-10-01 22:07:03 +01:00
Fabio Berger
136ef38277 Move colors to colors.ts file 2018-10-01 22:04:21 +01:00
Fabio Berger
42f6842844 Fix bug where button wouldn't be highlighted after hitting browser back button despite the cursor resting above it 2018-10-01 22:04:06 +01:00
Fabio Berger
8daf2df6e6 Prefer basscss over style 2018-10-01 22:03:23 +01:00
Fabio Berger
6a33c4685e Further shorten description 2018-10-01 22:02:57 +01:00
Fabio Berger
0febb085c5 Fix linter 2018-10-01 16:29:29 +01:00
Fabio Berger
011cadc1ff Disable max file size tslint rule for types file 2018-10-01 16:21:51 +01:00
Fabio Berger
733bb28c1c Fix bug where main content scrollbar wasn't showing up after navigating back in browser history via keyboard shortcut 2018-10-01 14:45:28 +01:00
Fabio Berger
3d1c2cb296 Fix incorrect merge errors 2018-10-01 13:49:43 +01:00
Fabio Berger
c7371cc048 Hide .svg file contents from PR review diff 2018-10-01 13:31:07 +01:00
Fabio Berger
7fdde15a5d Revert command name 2018-10-01 13:28:33 +01:00
Fabio Berger
8651b7bc25 fix merge 2018-10-01 13:16:00 +01:00
Fabio Berger
e7ab9938ce merge 2018-10-01 13:11:27 +01:00
Fabio Berger
9c6bb4245d Merge branch 'dev-section-redesign' into doc-overview-page
* dev-section-redesign:
  Publish
  Updated CHANGELOGS
  Un-nest the interface to fix the doc rendering
2018-10-01 13:08:06 +01:00
Fabio Berger
d4089a1794 Update react-scroll to include fix of using history.replaceState instead of history.pushState 2018-10-01 12:53:31 +01:00
Fabio Berger
822b848dd7 Rename website yarn watch_without_deps to yarn dev 2018-09-28 18:44:34 +01:00
Fabio Berger
2bf05193b4 Convert package descriptions to markdown and linkify them 2018-09-28 15:48:16 +01:00
Fabio Berger
b865492137 Fix minor scrolling issue 2018-09-28 15:28:29 +01:00
Fabio Berger
4d23cf85b9 Add mobile menu to overview page 2018-09-28 15:17:28 +01:00
Fabio Berger
54f535b375 Add back ability to listen for menu click events from the sidebar 2018-09-28 15:16:17 +01:00
Fabio Berger
155a4a8f06 Add sidebar menu, proper scrolling and mobile-optimize 2018-09-28 14:28:39 +01:00
Fabio Berger
12cfa6b450 Make sidebar menu item formatting optional so package names (with hyphens) render properly 2018-09-28 14:28:06 +01:00
Fabio Berger
10bd255e9d Shorten tutorial descriptions 2018-09-28 14:27:12 +01:00
Fabio Berger
e664768890 Import ObjectMap from types now that it's moved 2018-09-28 13:32:04 +01:00
Fabio Berger
ba7de7204d merge development 2018-09-28 12:08:12 +01:00
Fabio Berger
f3ad64aa1c Move more text over to translation files 2018-09-26 14:52:58 +01:00
Fabio Berger
d8c68b000b Implement dev home 2018-09-26 13:38:22 +01:00
Fabio Berger
a8d8f90d23 Fix logo to link to docs home 2018-09-26 13:37:58 +01:00
Fabio Berger
ac1005b5a8 Use new link component in Developer dropdown 2018-09-26 13:37:46 +01:00
Fabio Berger
a9b4027dc4 Create a link ui component that abstracts away interval vs. internal links 2018-09-26 13:37:25 +01:00
Fabio Berger
3504e875cc Move /docs endpoint before longer ones so doesn't overtake other doc endpoints 2018-09-26 13:35:41 +01:00
Fabio Berger
ce51edcf80 Implement new responsive, dev section header and home scaffolding 2018-09-17 16:55:22 +01:00
Fabio Berger
fe38adfa08 Merge pull request #1027 from 0xProject/dev-dropdown
New Topbar Developers Dropdown
2018-09-17 15:36:59 +01:00
Fabio Berger
92ee7c2194 Use Container instead of div 2018-09-17 15:09:31 +01:00
Fabio Berger
e6511c9c05 Fix linter 2018-08-29 17:45:51 +01:00
Fabio Berger
60ef45722c Remove temporary borders 2018-08-28 17:18:48 +01:00
Fabio Berger
61bfbb86e1 Implement dev topbar 2018-08-28 17:18:40 +01:00
Fabio Berger
bc8cc35d18 Fix prettier 2018-08-28 17:13:29 +01:00
Fabio Berger
4a524a5f27 Merge branch 'dev-dropdown' into doc-overview-page
* dev-dropdown:
  Update to latest react-shared
  Use translation helper
  Use generatic ObjectMap type
  fix(contracts): Catch cases where the actual error differs from the expected error (#1032)
  Add clarifying comments
  Remove redundant mstores from fillOrderNoThrow
  fix(contracts): Use correct error message for division by zero
2018-08-28 16:04:02 +01:00
Fabio Berger
ee1e50a722 Swap out link 2018-08-28 16:03:27 +01:00
Fabio Berger
ca0567ad09 Begin implementing doc home page 2018-08-28 16:03:18 +01:00
Fabio Berger
9fd46c7900 Update to latest react-shared 2018-08-28 15:52:41 +01:00
Fabio Berger
4a40edbbb7 Merge branch 'development' into dev-dropdown
* development:
  fix(contracts): Catch cases where the actual error differs from the expected error (#1032)
  Add clarifying comments
  Remove redundant mstores from fillOrderNoThrow
  fix(contracts): Use correct error message for division by zero
2018-08-28 11:19:20 +01:00
Fabio Berger
2997ba208f Use translation helper 2018-08-28 11:19:12 +01:00
Fabio Berger
cc2000e776 Use generatic ObjectMap type 2018-08-28 11:19:01 +01:00
Fabio Berger
b8241c0f80 Merge branch 'development' into dev-dropdown
* development: (120 commits)
  Exit with non-error code at end of publishRelease
  Publish
  Updated CHANGELOGS
  Fix prettier
  Update changelog files for RC packages
  Skip doc generation for local publishes since we test this in a separate CI test
  Fix typo
  Use absolute path
  Run yarn a second time if the first fails
  Try relative to root dir
  Fix command
  Move md files to lib folder during build
  Change exit code to failure
  Fix sra-spec `main` and `types` in package.json
  Actual relative path
  Try relative path
  Issue #1025 BlockParam unroll
  Fix command
  Move md files to lib folder during build
  Fix sra-spec `main` and `types` in package.json
  ...
2018-08-27 15:28:57 +01:00
Fabio Berger
fe7a8be98c Move colors to colors module 2018-08-27 12:30:30 +01:00
Fabio Berger
925d5aa09b Add developers dropdown to topBar 2018-08-27 12:17:33 +01:00
Fabio Berger
a26237da66 Implement Developers dropdown 2018-08-27 12:17:23 +01:00
Fabio Berger
791eae24c0 Add ability to specify styling to popover container 2018-08-27 12:16:58 +01:00
Fabio Berger
e10561b4a5 Fix translation capitalizations to not capitalize single letters with sentences (i.e 'a' in 'Build a Relayer') 2018-08-27 12:16:29 +01:00
Fabio Berger
e718123478 Add missing translations needed for dev dropdown 2018-08-27 12:13:20 +01:00
Remco Bloemen
e40a4addc9 Add upstream issue 2018-08-21 15:00:13 -07:00
Remco Bloemen
ad0fe2f079 Use const require instead of import 2018-08-21 14:45:14 -07:00
Remco Bloemen
9b4f5dfdda Fix tslint issues 2018-08-21 14:32:31 -07:00
Remco Bloemen
71a61a4dc3 Use detect-node 2018-08-21 14:28:21 -07:00
Remco Bloemen
1053aed74d Set curstom inspect printer in BigNumber 2018-08-21 14:14:22 -07:00
1562 changed files with 65506 additions and 65596 deletions

View File

@@ -1,264 +1,398 @@
version: 2
jobs:
build:
resource_class: medium+
docker:
- image: circleci/node:9
environment:
CONTRACTS_COMMIT_HASH: '9ed05f5'
working_directory: ~/repo
steps:
- checkout
- run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV
- run:
name: install-yarn
command: sudo npm install --global yarn@1.9.4
- run:
name: yarn
command: yarn --frozen-lockfile install || yarn --frozen-lockfile install
- run: yarn build:ci:no_website
- save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo
build-website:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: cd packages/website && yarn build
test-contracts-ganache:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci contracts
test-contracts-geth:
docker:
- image: circleci/node:9
- image: 0xorg/devnet
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
test-publish:
resource_class: medium+
docker:
- image: circleci/node:9
- image: 0xorg/verdaccio
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:publish:circleci
test-doc-generation:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:generate_docs:circleci
test-rest:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0xproject/abi-gen
- run: yarn wsrun test:circleci @0xproject/assert
- run: yarn wsrun test:circleci @0xproject/base-contract
- run: yarn wsrun test:circleci @0xproject/connect
- run: yarn wsrun test:circleci @0xproject/contract-wrappers
- run: yarn wsrun test:circleci @0xproject/dev-utils
- run: yarn wsrun test:circleci @0xproject/json-schemas
- run: yarn wsrun test:circleci @0xproject/metacoin
- run: yarn wsrun test:circleci @0xproject/order-utils
- run: yarn wsrun test:circleci @0xproject/order-watcher
- run: yarn wsrun test:circleci @0xproject/sol-compiler
- run: yarn wsrun test:circleci @0xproject/sol-cov
- run: yarn wsrun test:circleci @0xproject/sol-doc
- run: yarn wsrun test:circleci @0xproject/sra-report
- run: yarn wsrun test:circleci @0xproject/subproviders
- run: yarn wsrun test:circleci @0xproject/web3-wrapper
- run: yarn wsrun test:circleci @0xproject/utils
- save_cache:
key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/abi-gen/coverage/lcov.info
- save_cache:
key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/assert/coverage/lcov.info
- save_cache:
key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/base-contract/coverage/lcov.info
- save_cache:
key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/connect/coverage/lcov.info
- save_cache:
key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/contract-wrappers/coverage/lcov.info
- save_cache:
key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/dev-utils/coverage/lcov.info
- save_cache:
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 }}
paths:
- ~/repo/packages/sol-cov/coverage/lcov.info
- save_cache:
key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/sol-doc/coverage/lcov.info
- save_cache:
key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/sra-report/coverage/lcov.info
- save_cache:
key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/subproviders/coverage/lcov.info
- save_cache:
key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/web3-wrapper/coverage/lcov.info
static-tests:
working_directory: ~/repo
docker:
- image: circleci/node:9
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn lerna run lint
- run: yarn prettier:ci
- run: cd packages/0x.js && yarn build:umd:prod
- run: yarn bundlesize
submit-coverage:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-contract-wrappers-{{ .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 }}
- restore_cache:
keys:
- coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-contracts-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn report_coverage
build:
resource_class: medium+
docker:
- image: circleci/node:9
environment:
CONTRACTS_COMMIT_HASH: '9ed05f5'
working_directory: ~/repo
steps:
- checkout
- run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV
- run:
name: install-yarn
command: sudo npm install --global yarn@1.9.4
- run:
name: yarn
command: yarn --frozen-lockfile install || yarn --frozen-lockfile install
- run: yarn build:ci:no_website
- run: yarn build:ts
- save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo
build-website:
resource_class: medium+
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: cd packages/website && yarn build:prod
test-contracts-ganache:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0x/contracts-multisig
- run: yarn wsrun test:circleci @0x/contracts-utils
- run: yarn wsrun test:circleci @0x/contracts-libs
- run: yarn wsrun test:circleci @0x/contracts-tokens
- run: yarn wsrun test:circleci @0x/contracts-extensions
- run: yarn wsrun test:circleci @0x/contracts-protocol
test-contracts-geth:
docker:
- image: circleci/node:9
- image: 0xorg/devnet
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 @0x/contracts-multisig
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-utils
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-libs
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-tokens
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-extensions
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-protocol
test-publish:
resource_class: medium+
docker:
- image: circleci/node:9
- image: 0xorg/verdaccio
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:publish:circleci
test-doc-generation:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn test:generate_docs:circleci
test-pipeline:
docker:
- image: circleci/node:9
- image: postgres:11-alpine
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: ZEROEX_DATA_PIPELINE_TEST_DB_URL='postgresql://postgres@localhost/postgres' yarn wsrun test:circleci @0x/pipeline
- save_cache:
key: coverage-pipeline-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/pipeline/coverage/lcov.info
test-rest:
docker:
- image: circleci/node:9
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/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/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/sol-compiler
- run: yarn wsrun test:circleci @0x/sol-cov
- run: yarn wsrun test:circleci @0x/sol-doc
- run: yarn wsrun test:circleci @0x/subproviders
- run: yarn wsrun test:circleci @0x/web3-wrapper
- run: yarn wsrun test:circleci @0x/utils
- run: yarn wsrun test:circleci @0x/instant
- save_cache:
key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/abi-gen/coverage/lcov.info
- save_cache:
key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/assert/coverage/lcov.info
- save_cache:
key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/base-contract/coverage/lcov.info
- save_cache:
key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/connect/coverage/lcov.info
- save_cache:
key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/contract-wrappers/coverage/lcov.info
- save_cache:
key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/dev-utils/coverage/lcov.info
- save_cache:
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 }}
paths:
- ~/repo/packages/sol-cov/coverage/lcov.info
- save_cache:
key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/sol-doc/coverage/lcov.info
- save_cache:
key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/subproviders/coverage/lcov.info
- save_cache:
key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/web3-wrapper/coverage/lcov.info
test-python:
working_directory: ~/repo
docker:
- image: circleci/python
- image: 0xorg/ganache-cli
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"
- image: 0xorg/launch-kit-ci
command: |
yarn start:ts -p 3000:3000
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 }}
- run:
command: |
cd python-packages/order_utils
python -m ensurepip
python -m pip install -e .[dev]
- run:
command: |
cd python-packages/sra_client
python -m ensurepip
python -m pip install -e .
- save_cache:
key: deps9-{{ .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
- run:
command: |
cd python-packages/sra_client
coverage run setup.py test
- 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
test-rest-python:
working_directory: ~/repo
docker:
- image: circleci/python
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 }}
- 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'
- '.eggs'
- '.mypy_cache'
- '.pytest_cache'
- '.tox'
- run:
command: |
cd python-packages/order_utils
tox
static-tests-python:
working_directory: ~/repo
docker:
- image: circleci/python
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 }}
- 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
static-tests:
working_directory: ~/repo
docker:
- image: circleci/node:9
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn lerna run lint
- run: yarn prettier:ci
- run: cd packages/0x.js && yarn build:umd:prod
- run: yarn bundlewatch
submit-coverage:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-contract-wrappers-{{ .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 }}
- restore_cache:
keys:
- coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-contracts-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn report_coverage
workflows:
version: 2
main:
jobs:
- build
- build-website:
requires:
version: 2
main:
jobs:
- build
- test-contracts-ganache:
requires:
- build
- test-contracts-geth:
requires:
- build
- test-rest:
requires:
- build
- static-tests:
requires:
- build
- test-publish:
requires:
- build
- test-doc-generation:
requires:
- build
- submit-coverage:
requires:
- test-rest
- build-website:
requires:
- build
- test-contracts-ganache:
requires:
- build
- test-contracts-geth:
requires:
- build
- test-pipeline:
requires:
- build
- test-rest:
requires:
- build
- static-tests:
requires:
- build
- test-publish:
requires:
- build
- test-doc-generation:
requires:
- build
- submit-coverage:
requires:
- test-rest
- test-python
- test-python
- static-tests-python
# skip python tox run for now, as we don't yet have multiple test environments to support.
#- test-rest-python

6
.gitattributes vendored
View File

@@ -1 +1,7 @@
*.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

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

@@ -0,0 +1,39 @@
python: ['python-packages']
contracts: ['contracts']
sol-doc: ['packages/sol-doc']
sol-resolver: ['packages/sol-resolver']
sra-spec: ['packages/sra-spec']
subproviders: ['packages/subproviders']
contract-addresses: ['packages/contract-addresses']
migrations: ['packages/migrations']
web3-wrapper: ['packages/web3-wrapper']
sol-compiler: ['packages/sol-compiler']
types: ['packages/types']
instant: ['packages/instant']
abi-gen-templates: ['packages/abi-gen-templates']
abi-gen: ['packages/abi-gen']
website: ['packages/website']
sol-cov: ['packages/sol-cov']
utils: ['packages/utils']
tslint-config: ['packages/tslint-config']
asset-buyer: ['packages/asset-buyer']
order-watcher: ['packages/order-watcher']
react-docs: ['packages/react-docs']
order-utils: ['packages/order-utils']
react-shared: ['packages/react-shared']
assert: ['packages/assert']
base-contract: ['packages/base-contract']
typescript-typings: ['packages/typescript-typings']
0x.js: ['packages/0x.js']
abi-gen-wrappers: ['packages/abi-gen-wrappers']
metacoin: ['packages/metacoin']
contract-artifacts: ['packages/contract-artifacts']
dev-utils: ['packages/dev-utils']
contract-wrappers: ['packages/contract-wrappers']
json-schemas: ['packages/json-schemas']
ethereum-types: ['ethereum-types']
connect: ['packages/connect']
fill-scenarios: ['packages/fill-scenarios']
dev-tools-pages: ['packages/dev-tools-pages']
testnet-faucets: ['packages/testnet-faucets']
monorepo-scripts: ['packages/monorepo-scripts']

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: 7
# 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.

53
.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
@@ -72,39 +76,48 @@ TODO.md
.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/
contracts/protocol/generated-artifacts/
contracts/multisig/generated-artifacts/
contracts/utils/generated-artifacts/
contracts/libs/generated-artifacts/
contracts/interfaces/generated-artifacts/
contracts/tokens/generated-artifacts/
contracts/examples/generated-artifacts/
contracts/extensions/generated-artifacts/
packages/sol-cov/test/fixtures/artifacts/
packages/metacoin/artifacts/
packages/order-watcher/test/artifacts/
packages/contract-wrappers/test/artifacts/
packages/contract-wrappers/src/artifacts/
packages/order-watcher/src/artifacts/
packages/0x.js/src/artifacts/
packages/order-utils/src/artifacts/
# unstable generated contract artifacts:
packages/migrations/artifacts/development/
# generated contract watcher
packages/0x.js/src/generated_contract_wrappers/
packages/contracts/generated_contract_wrappers/
packages/contract-wrappers/src/contract_wrappers/generated/
# generated contract wrappers
packages/abi-gen-wrappers/wrappers
contracts/protocol/generated-wrappers/
contracts/multisig/generated-wrappers/
contracts/utils/generated-wrappers/
contracts/libs/generated-wrappers/
contracts/interfaces/generated-wrappers/
contracts/tokens/generated-wrappers/
contracts/examples/generated-wrappers/
contracts/extensions/generated-wrappers/
packages/metacoin/src/contract_wrappers
packages/fill-scenarios/src/generated_contract_wrappers/
packages/order-watcher/src/generated_contract_wrappers/
packages/order-utils/src/generated_contract_wrappers/
packages/migrations/src/1.0.0/contract_wrappers
packages/migrations/src/2.0.0-testnet/contract_wrappers
packages/migrations/src/2.0.0/contract_wrappers
packages/migrations/src/development/contract_wrappers
# solc-bin in sol-compiler
packages/sol-compiler/solc_bin/
# Monorepo scripts
packages/*/scripts/
# python stuff
.eggs
.mypy_cache
.tox
python-packages/*/build
python-packages/*/dist
__pycache__
python-packages/*/src/*.egg-info
python-packages/*/.coverage

View File

@@ -1,27 +1,29 @@
lib
.nyc_output
/packages/contract-wrappers/src/contract_wrappers/generated/
/contracts/protocol/generated-wrappers
/contracts/protocol/generated-artifacts
/contracts/multisig/generated-wrappers
/contracts/multisig/generated-artifacts
/contracts/utils/generated-wrappers
/contracts/utils/generated-artifacts
/contracts/libs/generated-wrappers
/contracts/libs/generated-artifacts
/contracts/interfaces/generated-wrappers
/contracts/interfaces/generated-artifacts
/contracts/tokens/generated-wrappers
/contracts/tokens/generated-artifacts
/contracts/examples/generated-wrappers
/contracts/examples/generated-artifacts
/contracts/extensions/generated-wrappers
/contracts/extensions/generated-artifacts
/packages/abi-gen-wrappers/src/generated-wrappers
/packages/contract-artifacts/artifacts
/python-packages/order_utils/src/zero_ex/contract_artifacts/artifacts
/packages/json-schemas/schemas
/python-packages/order_utils/src/zero_ex/json_schemas/schemas
/packages/metacoin/src/contract_wrappers
/packages/0x.js/src/generated_contract_wrappers/
/packages/contracts/generated_contract_wrappers/
/packages/fill-scenarios/src/generated_contract_wrappers/
/packages/order-watcher/src/generated_contract_wrappers/
/packages/order-utils/src/generated_contract_wrappers/
/packages/migrations/src/1.0.0/contract_wrappers
/packages/migrations/src/2.0.0-testnet/contract_wrappers
/packages/migrations/src/2.0.0/contract_wrappers
/packages/0x.js/src/artifacts
/packages/contracts/src/artifacts
/packages/contract-wrappers/src/artifacts
/packages/order-watcher/src/artifacts
/packages/metacoin/artifacts
/packages/sra-spec/public/
/packages/contract-wrappers/test/artifacts
/packages/order-watcher/test/artifacts
/packages/migrations/artifacts/1.0.0
/packages/migrations/artifacts/2.0.0-testnet
/packages/migrations/artifacts/2.0.0
/packages/migrations/artifacts/development
package.json
scripts/postpublish_utils.js
packages/sol-cov/test/fixtures/artifacts

View File

@@ -5,4 +5,31 @@
# https://git-scm.com/docs/gitignore#_pattern_format
# Website
packages/website/ @BMillman19 @fragosti
packages/asset-buyer/ @BMillman19 @fragosti @steveklebanoff
packages/instant/ @BMillman19 @fragosti @steveklebanoff
packages/website/ @BMillman19 @fragosti @fabioberger @steveklebanoff
# Dev tools & setup
.circleci/ @LogvinovLeon
packages/abi-gen/ @LogvinovLeon
packages/base-contract/ @LogvinovLeon
packages/connect/ @fragosti
packages/abi-gen-templates/ @LogvinovLeon
packages/contract-addresses/ @albrow
packages/contract-artifacts/ @albrow
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/sol-compiler/ @LogvinovLeon
packages/sol-cov/ @LogvinovLeon
packages/sol-resolver/ @LogvinovLeon
packages/subproviders/ @fabioberger @dekz
packages/verdaccio/ @albrow
packages/web3-wrapper/ @LogvinovLeon @fabioberger
python-packages/ @feuGeneA
# Protocol/smart contracts
contracts/core/test/ @albrow

View File

@@ -1,61 +1,92 @@
## 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/broken-wiki-link`
* If the PR only edits a single package, add it's name too
* e.g `fix/website/broken-wiki-link`
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.
## Fix `submit-coverage` CI failure
### Branch structure & versioning
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`.
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.
To facilitate this check, after creating your fork, but before creating the branch for your PR, do the following:
We have two main branches: `master` and `development`.
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.
`master` represents the most recent released (published on npm) version.
`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`.
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

@@ -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

@@ -21,7 +21,6 @@
<!--- 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.

121
README.md
View File

@@ -2,7 +2,7 @@
---
[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.
@@ -18,62 +18,81 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t
[![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)
[![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 |
| [`@0xproject/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0xproject/abi-gen.svg)](https://www.npmjs.com/package/@0xproject/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0xproject/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0xproject/assert.svg)](https://www.npmjs.com/package/@0xproject/assert) | Type and schema assertions used by our packages |
| [`@0xproject/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0xproject/base-contract.svg)](https://www.npmjs.com/package/@0xproject/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0xproject/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0xproject/connect.svg)](https://www.npmjs.com/package/@0xproject/connect) | A Javascript library for interacting with the Standard Relayer API |
| [`@0xproject/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0xproject/dev-utils.svg)](https://www.npmjs.com/package/@0xproject/dev-utils) | Dev utils to be shared across 0x projects and packages |
| [`@0xproject/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0xproject/json-schemas.svg)](https://www.npmjs.com/package/@0xproject/json-schemas) | 0x-related json schemas |
| [`@0xproject/monorepo-scripts`](/packages/monorepo-scripts) | [![npm](https://img.shields.io/npm/v/@0xproject/monorepo-scripts.svg)](https://www.npmjs.com/package/@0xproject/monorepo-scripts) | Monorepo scripts |
| [`@0xproject/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0xproject/order-utils.svg)](https://www.npmjs.com/package/@0xproject/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders. |
| [`@0xproject/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0xproject/react-docs.svg)](https://www.npmjs.com/package/@0xproject/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON |
| [`@0xproject/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0xproject/react-shared.svg)](https://www.npmjs.com/package/@0xproject/react-shared) | 0x shared react components |
| [`@0xproject/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-compiler.svg)](https://www.npmjs.com/package/@0xproject/sol-compiler) | A thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties. |
| [`@0xproject/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-cov.svg)](https://www.npmjs.com/package/@0xproject/sol-cov) | Solidity test coverage tool |
| [`@0xproject/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-spec.svg)](https://www.npmjs.com/package/@0xproject/sra-spec) | OpenAPI specification for the standard relayer API |
| [`@0xproject/sra-report`](/packages/sra-report) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-report.svg)](https://www.npmjs.com/package/@0xproject/sra-report) | Generate reports for standard relayer API compliance |
| [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) |
| [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules |
| [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations |
| [`@0xproject/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0xproject/typescript-typings.svg)](https://www.npmjs.com/package/@0xproject/typescript-typings) | Repository of types for external packages |
| [`@0xproject/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0xproject/utils.svg)](https://www.npmjs.com/package/@0xproject/utils) | Shared utilities |
| [`@0xproject/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0xproject/web3-wrapper.svg)](https://www.npmjs.com/package/@0xproject/web3-wrapper) | Web3 wrapper |
Visit our [developer portal](https://0xproject.com/docs/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 |
| --------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`@0xproject/contracts`](/packages/contracts) | 0x solidity smart contracts & tests |
| [`@0xproject/react-docs-example`](/packages/react-docs-example) | Example documentation site created with `@0xproject/react-docs` |
| [`@0xproject/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
| [`@0xproject/website`](/packages/website) | 0x website & Portal DApp |
| Package | Version | Description |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [`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 |
### 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/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/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/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/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-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 |
#### 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-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0x/sol-cov.svg)](https://www.npmjs.com/package/@0x/sol-cov) | A solidity test coverage 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/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 & sol-doc 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/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 |
| [`@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 generator |
#### Private Packages
| Package | Description |
| -------------------------------------------------- | -------------------------------------------------------------------------------- |
| [`@0x/contracts`](/contracts/core) | 0x protocol solidity smart contracts & tests |
| [`@0x/instant`](/packages/instant) | A free and flexible way to offer simple crypto purchasing in any app or website. |
| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
| [`@0x/website`](/packages/website) | 0x 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.
Most of the packages require additional typings for external dependencies.
You can include those by prepending the `@0xproject/typescript-typings` package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config.
You can include those by prepending the `@0x/typescript-typings` package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config.
```json
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
```
## Contributing
@@ -86,6 +105,10 @@ We strongly recommend that the community help us make improvements and determine
Make sure you are using Yarn v1.9.4. To install using brew:
```bash
brew install yarn@1.9.4
```
Then install dependencies
```bash
@@ -103,7 +126,7 @@ yarn build
To build a specific package:
```bash
PKG=@0xproject/web3-wrapper yarn build
PKG=@0x/web3-wrapper yarn build
```
### Watch
@@ -120,7 +143,7 @@ To watch a specific package and all it's dependent packages:
PKG=[NPM_PACKAGE_NAME] yarn watch
e.g
PKG=@0xproject/web3-wrapper yarn watch
PKG=@0x/web3-wrapper yarn watch
```
### Clean
@@ -176,5 +199,5 @@ yarn test
Run a specific package's test:
```bash
PKG=@0xproject/web3-wrapper yarn test
PKG=@0x/web3-wrapper yarn test
```

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-cov`, 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,11 @@
[
{
"timestamp": 1544741676,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
}
]

View File

@@ -0,0 +1,10 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.0.2 - _December 13, 2018_
* Dependencies updated

View File

@@ -0,0 +1,56 @@
## Contract examples
Example smart contracts that interact with 0x protocol.
## Usage
Contracts can be found in the [contracts](./contracts) directory.
This package contains example implementations of contracts that interact with the protocol but are _not_ intended for use in production. Examples include [filter](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#filter-contracts) contracts, a [Wallet](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#wallet) contract, and a [Validator](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#validator) contract, among others.
## 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-examples yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0x/contracts-examples yarn watch
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```

View File

@@ -0,0 +1,22 @@
{
"artifactsDir": "./generated-artifacts",
"contractsDir": "./contracts",
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap"
]
}
}
},
"contracts": ["ExchangeWrapper", "Validator", "Wallet", "Whitelist"]
}

View File

@@ -19,8 +19,8 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../../protocol/Exchange/interfaces/IExchange.sol";
import "../../protocol/Exchange/libs/LibOrder.sol";
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
contract ExchangeWrapper {

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../../protocol/Exchange/interfaces/IValidator.sol";
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IValidator.sol";
contract Validator is

View File

@@ -18,8 +18,8 @@
pragma solidity 0.4.24;
import "../../protocol/Exchange/interfaces/IWallet.sol";
import "../../utils/LibBytes/LibBytes.sol";
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IWallet.sol";
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
contract Wallet is

View File

@@ -19,9 +19,9 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../../protocol/Exchange/interfaces/IExchange.sol";
import "../../protocol/Exchange/libs/LibOrder.sol";
import "../../utils/Ownable/Ownable.sol";
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
contract Whitelist is

View File

@@ -0,0 +1,82 @@
{
"name": "@0x/contracts-examples",
"version": "1.0.2",
"engines": {
"node": ">=6.12"
},
"description": "Smart contract examples 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 generate_contract_wrappers",
"compile": "sol-compiler --contracts-dir contracts",
"clean": "shx rm -rf lib generated-artifacts generated-wrappers",
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(ExchangeWrapper|Validator|Wallet|Whitelist).json"
},
"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/examples/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.19",
"@0x/contracts-test-utils": "^1.0.2",
"@0x/dev-utils": "^1.0.21",
"@0x/sol-compiler": "^1.1.16",
"@0x/sol-cov": "^2.1.16",
"@0x/subproviders": "^2.1.8",
"@0x/tslint-config": "^2.0.0",
"@types/bn.js": "^4.11.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
"@types/yargs": "^10.0.0",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^2.0.1",
"dirty-chai": "^2.0.1",
"ethereumjs-abi": "0.6.5",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solc": "^0.4.24",
"solhint": "^1.4.1",
"tslint": "5.11.0",
"typescript": "3.0.1",
"yargs": "^10.0.3"
},
"dependencies": {
"@0x/base-contract": "^3.0.10",
"@0x/contracts-interfaces": "^1.0.2",
"@0x/contracts-libs": "^1.0.2",
"@0x/contracts-multisig": "^1.0.2",
"@0x/contracts-tokens": "^1.0.2",
"@0x/contracts-utils": "^1.0.2",
"@0x/order-utils": "^3.0.7",
"@0x/types": "^1.4.1",
"@0x/typescript-typings": "^3.0.6",
"@0x/utils": "^2.0.8",
"@0x/web3-wrapper": "^3.2.1",
"@types/js-combinatorics": "^0.5.29",
"bn.js": "^4.11.8",
"ethereum-types": "^1.1.4",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.5"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,13 @@
import { ContractArtifact } from 'ethereum-types';
import * as ExchangeWrapper from '../../generated-artifacts/ExchangeWrapper.json';
import * as Validator from '../../generated-artifacts/Validator.json';
import * as Wallet from '../../generated-artifacts/Wallet.json';
import * as Whitelist from '../../generated-artifacts/Whitelist.json';
export const artifacts = {
ExchangeWrapper: ExchangeWrapper as ContractArtifact,
Validator: Validator as ContractArtifact,
Wallet: Wallet as ContractArtifact,
Whitelist: Whitelist as ContractArtifact,
};

View File

@@ -0,0 +1,2 @@
export * from './artifacts';
export * from './wrappers';

View File

@@ -0,0 +1,4 @@
export * from '../../generated-wrappers/exchange_wrapper';
export * from '../../generated-wrappers/validator';
export * from '../../generated-wrappers/wallet';
export * from '../../generated-wrappers/whitelist';

View File

@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/ExchangeWrapper.json",
"./generated-artifacts/Validator.json",
"./generated-artifacts/Wallet.json",
"./generated-artifacts/Whitelist.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,5 +1,5 @@
{
"extends": ["@0xproject/tslint-config"],
"extends": ["@0x/tslint-config"],
"rules": {
"custom-no-magic-numbers": false
}

View File

@@ -0,0 +1,11 @@
[
{
"timestamp": 1544741676,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
}
]

View File

@@ -0,0 +1,10 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.0.2 - _December 13, 2018_
* Dependencies updated

View File

@@ -0,0 +1,31 @@
[
{
"name": "Forwarder",
"version": "1.1.0",
"changes": [
{
"note": "Round up when calculating remaining amounts in marketBuy functions",
"pr": 1162,
"networks": {
"1": "0x5468a1dc173652ee28d249c271fa9933144746b1",
"3": "0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
"42": "0x17992e4ffb22730138e4b62aaa6367fa9d3699a6"
}
}
]
},
{
"name": "Forwarder",
"version": "1.0.0",
"changes": [
{
"note": "protocol v2 deploy",
"networks": {
"1": "0x7afc2d5107af94c462a194d2c21b5bdd238709d6",
"3": "0x3983e204b12b3c02fb0638caf2cd406a62e0ead3",
"42": "0xd85e2fa7e7e252b27b01bf0d65c946959d2f45b8"
}
}
]
}
]

View File

@@ -0,0 +1,69 @@
## Contract extensions
Smart contracts that implement extensions for the 0x protocol.
## Usage
Contract extensions of the protocol can be found in the [contracts](./contracts) directory. This directory contains contracts that interact with the 2.0.0 contracts and will be used in production, such as the [Forwarder](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md) contract.
## Bug bounty
A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
## 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-extensions yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0x/contracts-extensions 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

@@ -1,5 +1,6 @@
{
"contractsDir": "../contracts/src/",
"artifactsDir": "./generated-artifacts",
"contractsDir": "./contracts",
"compilerSettings": {
"optimizer": {
"enabled": true,
@@ -16,5 +17,6 @@
]
}
}
}
},
"contracts": ["DutchAuction", "Forwarder"]
}

View File

@@ -0,0 +1,205 @@
/*
Copyright 2018 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.4.24;
pragma experimental ABIEncoderV2;
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
contract DutchAuction is
SafeMath
{
using LibBytes for bytes;
// solhint-disable var-name-mixedcase
IExchange internal EXCHANGE;
struct AuctionDetails {
uint256 beginTimeSeconds; // Auction begin unix timestamp: sellOrder.makerAssetData
uint256 endTimeSeconds; // Auction end unix timestamp: sellOrder.expiryTimeSeconds
uint256 beginAmount; // Auction begin amount: sellOrder.makerAssetData
uint256 endAmount; // Auction end amount: sellOrder.takerAssetAmount
uint256 currentAmount; // Calculated amount given block.timestamp
uint256 currentTimeSeconds; // block.timestamp
}
constructor (address _exchange)
public
{
EXCHANGE = IExchange(_exchange);
}
/// @dev Matches the buy and sell orders at an amount given the following: the current block time, the auction
/// start time and the auction begin amount. The sell order is a an order at the lowest amount
/// at the end of the auction. Excess from the match is transferred to the seller.
/// Over time the price moves from beginAmount to endAmount given the current block.timestamp.
/// sellOrder.expiryTimeSeconds is the end time of the auction.
/// sellOrder.takerAssetAmount is the end amount of the auction (lowest possible amount).
/// sellOrder.makerAssetData is the ABI encoded Asset Proxy data with the following data appended
/// buyOrder.makerAssetData is the buyers bid on the auction, must meet the amount for the current block timestamp
/// (uint256 beginTimeSeconds, uint256 beginAmount).
/// This function reverts in the following scenarios:
/// * Auction has not started (auctionDetails.currentTimeSeconds < auctionDetails.beginTimeSeconds)
/// * Auction has expired (auctionDetails.endTimeSeconds < auctionDetails.currentTimeSeconds)
/// * Amount is invalid: Buy order amount is too low (buyOrder.makerAssetAmount < auctionDetails.currentAmount)
/// * Amount is invalid: Invalid begin amount (auctionDetails.beginAmount > auctionDetails.endAmount)
/// * Any failure in the 0x Match Orders
/// @param buyOrder The Buyer's order. This order is for the current expected price of the auction.
/// @param sellOrder The Seller's order. This order is for the lowest amount (at the end of the auction).
/// @param buySignature Proof that order was created by the buyer.
/// @param sellSignature Proof that order was created by the seller.
/// @return matchedFillResults amounts filled and fees paid by maker and taker of matched orders.
function matchOrders(
LibOrder.Order memory buyOrder,
LibOrder.Order memory sellOrder,
bytes memory buySignature,
bytes memory sellSignature
)
public
returns (LibFillResults.MatchedFillResults memory matchedFillResults)
{
AuctionDetails memory auctionDetails = getAuctionDetails(sellOrder);
// Ensure the auction has not yet started
require(
auctionDetails.currentTimeSeconds >= auctionDetails.beginTimeSeconds,
"AUCTION_NOT_STARTED"
);
// Ensure the auction has not expired. This will fail later in 0x but we can save gas by failing early
require(
sellOrder.expirationTimeSeconds > auctionDetails.currentTimeSeconds,
"AUCTION_EXPIRED"
);
// Validate the buyer amount is greater than the current auction amount
require(
buyOrder.makerAssetAmount >= auctionDetails.currentAmount,
"INVALID_AMOUNT"
);
// Match orders, maximally filling `buyOrder`
matchedFillResults = EXCHANGE.matchOrders(
buyOrder,
sellOrder,
buySignature,
sellSignature
);
// The difference in sellOrder.takerAssetAmount and current amount is given as spread to the matcher
// This may include additional spread from the buyOrder.makerAssetAmount and the currentAmount.
// e.g currentAmount is 30, sellOrder.takerAssetAmount is 10 and buyOrder.makerAssetamount is 40.
// 10 (40-30) is returned to the buyer, 20 (30-10) sent to the seller and 10 has previously
// been transferred to the seller during matchOrders
uint256 leftMakerAssetSpreadAmount = matchedFillResults.leftMakerAssetSpreadAmount;
if (leftMakerAssetSpreadAmount > 0) {
// ERC20 Asset data itself is encoded as follows:
//
// | Area | Offset | Length | Contents |
// |----------|--------|---------|-------------------------------------|
// | Header | 0 | 4 | function selector |
// | Params | | 1 * 32 | function parameters: |
// | | 4 | 12 | 1. token address padding |
// | | 16 | 20 | 2. token address |
bytes memory assetData = sellOrder.takerAssetData;
address token = assetData.readAddress(16);
// Calculate the excess from the buy order. This can occur if the buyer sends in a higher
// amount than the calculated current amount
uint256 buyerExcessAmount = safeSub(buyOrder.makerAssetAmount, auctionDetails.currentAmount);
uint256 sellerExcessAmount = safeSub(leftMakerAssetSpreadAmount, buyerExcessAmount);
// Return the difference between auctionDetails.currentAmount and sellOrder.takerAssetAmount
// to the seller
if (sellerExcessAmount > 0) {
IERC20Token(token).transfer(sellOrder.makerAddress, sellerExcessAmount);
}
// Return the difference between buyOrder.makerAssetAmount and auctionDetails.currentAmount
// to the buyer
if (buyerExcessAmount > 0) {
IERC20Token(token).transfer(buyOrder.makerAddress, buyerExcessAmount);
}
}
return matchedFillResults;
}
/// @dev Calculates the Auction Details for the given order
/// @param order The sell order
/// @return AuctionDetails
function getAuctionDetails(
LibOrder.Order memory order
)
public
returns (AuctionDetails memory auctionDetails)
{
uint256 makerAssetDataLength = order.makerAssetData.length;
// It is unknown the encoded data of makerAssetData, we assume the last 64 bytes
// are the Auction Details encoding.
// Auction Details is encoded as follows:
//
// | Area | Offset | Length | Contents |
// |----------|--------|---------|-------------------------------------|
// | Params | | 2 * 32 | parameters: |
// | | -64 | 32 | 1. auction begin unix timestamp |
// | | -32 | 32 | 2. auction begin begin amount |
// ERC20 asset data length is 4+32, 64 for auction details results in min length 100
require(
makerAssetDataLength >= 100,
"INVALID_ASSET_DATA"
);
uint256 auctionBeginTimeSeconds = order.makerAssetData.readUint256(makerAssetDataLength - 64);
uint256 auctionBeginAmount = order.makerAssetData.readUint256(makerAssetDataLength - 32);
// Ensure the auction has a valid begin time
require(
order.expirationTimeSeconds > auctionBeginTimeSeconds,
"INVALID_BEGIN_TIME"
);
uint256 auctionDurationSeconds = order.expirationTimeSeconds-auctionBeginTimeSeconds;
// Ensure the auction goes from high to low
uint256 minAmount = order.takerAssetAmount;
require(
auctionBeginAmount > minAmount,
"INVALID_AMOUNT"
);
uint256 amountDelta = auctionBeginAmount-minAmount;
// solhint-disable-next-line not-rely-on-time
uint256 timestamp = block.timestamp;
auctionDetails.beginTimeSeconds = auctionBeginTimeSeconds;
auctionDetails.endTimeSeconds = order.expirationTimeSeconds;
auctionDetails.beginAmount = auctionBeginAmount;
auctionDetails.endAmount = minAmount;
auctionDetails.currentTimeSeconds = timestamp;
uint256 remainingDurationSeconds = order.expirationTimeSeconds-timestamp;
if (timestamp < auctionBeginTimeSeconds) {
// If the auction has not yet begun the current amount is the auctionBeginAmount
auctionDetails.currentAmount = auctionBeginAmount;
} else if (timestamp >= order.expirationTimeSeconds) {
// If the auction has ended the current amount is the minAmount.
// Auction end time is guaranteed by 0x Exchange due to the order expiration
auctionDetails.currentAmount = minAmount;
} else {
auctionDetails.currentAmount = safeAdd(
minAmount,
safeDiv(
safeMul(remainingDurationSeconds, amountDelta),
auctionDurationSeconds
)
);
}
return auctionDetails;
}
}

View File

@@ -18,10 +18,10 @@
pragma solidity 0.4.24;
import "../../utils/LibBytes/LibBytes.sol";
import "../../utils/Ownable/Ownable.sol";
import "../../tokens/ERC20Token/IERC20Token.sol";
import "../../tokens/ERC721Token/IERC721Token.sol";
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
import "@0x/contracts-tokens/contracts/tokens/ERC721Token/IERC721Token.sol";
import "./libs/LibConstants.sol";
import "./mixins/MAssets.sol";

View File

@@ -21,10 +21,10 @@ pragma experimental ABIEncoderV2;
import "./libs/LibConstants.sol";
import "./mixins/MExchangeWrapper.sol";
import "../../protocol/Exchange/libs/LibAbiEncoder.sol";
import "../../protocol/Exchange/libs/LibOrder.sol";
import "../../protocol/Exchange/libs/LibFillResults.sol";
import "../../protocol/Exchange/libs/LibMath.sol";
import "@0x/contracts-libs/contracts/libs/LibAbiEncoder.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibMath.sol";
contract MixinExchangeWrapper is
@@ -155,8 +155,10 @@ contract MixinExchangeWrapper is
uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
// Convert the remaining amount of makerAsset to buy into remaining amount
// of takerAsset to sell, assuming entire amount can be sold in the current order
uint256 remainingTakerAssetFillAmount = getPartialAmountFloor(
// of takerAsset to sell, assuming entire amount can be sold in the current order.
// We round up because the exchange rate computed by fillOrder rounds in favor
// of the Maker. In this case we want to overestimate the amount of takerAsset.
uint256 remainingTakerAssetFillAmount = getPartialAmountCeil(
orders[i].takerAssetAmount,
orders[i].makerAssetAmount,
remainingMakerAssetFillAmount
@@ -224,7 +226,9 @@ contract MixinExchangeWrapper is
// Convert the remaining amount of ZRX to buy into remaining amount
// of WETH to sell, assuming entire amount can be sold in the current order.
uint256 remainingWethSellAmount = getPartialAmountFloor(
// We round up because the exchange rate computed by fillOrder rounds in favor
// of the Maker. In this case we want to overestimate the amount of takerAsset.
uint256 remainingWethSellAmount = getPartialAmountCeil(
orders[i].takerAssetAmount,
safeSub(orders[i].makerAssetAmount, orders[i].takerFee), // our exchange rate after fees
remainingZrxBuyAmount
@@ -233,7 +237,7 @@ contract MixinExchangeWrapper is
// Attempt to sell the remaining amount of WETH.
FillResults memory singleFillResult = fillOrderNoThrow(
orders[i],
safeAdd(remainingWethSellAmount, 1), // we add 1 wei to the fill amount to make up for rounding errors
remainingWethSellAmount,
signatures[i]
);

View File

@@ -24,10 +24,10 @@ import "./mixins/MWeth.sol";
import "./mixins/MAssets.sol";
import "./mixins/MExchangeWrapper.sol";
import "./interfaces/IForwarderCore.sol";
import "../../utils/LibBytes/LibBytes.sol";
import "../../protocol/Exchange/libs/LibOrder.sol";
import "../../protocol/Exchange/libs/LibFillResults.sol";
import "../../protocol/Exchange/libs/LibMath.sol";
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibMath.sol";
contract MixinForwarderCore is

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../../protocol/Exchange/libs/LibMath.sol";
import "@0x/contracts-libs/contracts/libs/LibMath.sol";
import "./libs/LibConstants.sol";
import "./mixins/MWeth.sol";

View File

@@ -19,8 +19,8 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../../../protocol/Exchange/libs/LibOrder.sol";
import "../../../protocol/Exchange/libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
contract IForwarderCore {

View File

@@ -18,10 +18,10 @@
pragma solidity 0.4.24;
import "../../../utils/LibBytes/LibBytes.sol";
import "../../../protocol/Exchange/interfaces/IExchange.sol";
import "../../../tokens/EtherToken/IEtherToken.sol";
import "../../../tokens/ERC20Token/IERC20Token.sol";
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
import "@0x/contracts-tokens/contracts/tokens/EtherToken/IEtherToken.sol";
import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
contract LibConstants {

View File

@@ -19,8 +19,8 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../../../protocol/Exchange/libs/LibOrder.sol";
import "../../../protocol/Exchange/libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
contract MExchangeWrapper {

View File

@@ -0,0 +1,93 @@
{
"name": "@0x/contracts-extensions",
"version": "1.0.2",
"engines": {
"node": ">=6.12"
},
"description": "Smart contract extensions 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 generate_contract_wrappers",
"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 --contracts-dir contracts",
"clean": "shx rm -rf lib generated-artifacts generated-wrappers",
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./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",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(DutchAuction|Forwarder).json"
},
"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/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.19",
"@0x/contracts-test-utils": "^1.0.2",
"@0x/dev-utils": "^1.0.21",
"@0x/sol-compiler": "^1.1.16",
"@0x/sol-cov": "^2.1.16",
"@0x/subproviders": "^2.1.8",
"@0x/tslint-config": "^2.0.0",
"@types/bn.js": "^4.11.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
"@types/yargs": "^10.0.0",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^2.0.1",
"dirty-chai": "^2.0.1",
"ethereumjs-abi": "0.6.5",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solc": "^0.4.24",
"solhint": "^1.4.1",
"tslint": "5.11.0",
"typescript": "3.0.1",
"yargs": "^10.0.3"
},
"dependencies": {
"@0x/base-contract": "^3.0.10",
"@0x/contracts-interfaces": "^1.0.2",
"@0x/contracts-libs": "^1.0.2",
"@0x/contracts-protocol": "^2.1.59",
"@0x/contracts-tokens": "^1.0.2",
"@0x/contracts-utils": "^1.0.2",
"@0x/order-utils": "^3.0.7",
"@0x/types": "^1.4.1",
"@0x/typescript-typings": "^3.0.6",
"@0x/utils": "^2.0.8",
"@0x/web3-wrapper": "^3.2.1",
"@types/js-combinatorics": "^0.5.29",
"bn.js": "^4.11.8",
"ethereum-types": "^1.1.4",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.5"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,9 @@
import { ContractArtifact } from 'ethereum-types';
import * as DutchAuction from '../../generated-artifacts/DutchAuction.json';
import * as Forwarder from '../../generated-artifacts/Forwarder.json';
export const artifacts = {
DutchAuction: DutchAuction as ContractArtifact,
Forwarder: Forwarder as ContractArtifact,
};

View File

@@ -0,0 +1,2 @@
export * from './artifacts';
export * from './wrappers';

View File

@@ -0,0 +1,2 @@
export * from '../../generated-wrappers/dutch_auction';
export * from '../../generated-wrappers/forwarder';

View File

@@ -0,0 +1,458 @@
import {
artifacts as protocolArtifacts,
ERC20Wrapper,
ERC721Wrapper,
ExchangeContract,
ExchangeWrapper,
} from '@0x/contracts-protocol';
import {
chaiSetup,
constants,
ContractName,
ERC20BalancesByOwner,
expectTransactionFailedAsync,
getLatestBlockTimestampAsync,
OrderFactory,
provider,
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
import {
artifacts as tokensArtifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
WETH9Contract,
} from '@0x/contracts-tokens';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
import { RevertReason, SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import ethAbi = require('ethereumjs-abi');
import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash';
import { DutchAuctionContract } from '../../generated-wrappers/dutch_auction';
import { artifacts } from '../../src/artifacts';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
const DECIMALS_DEFAULT = 18;
describe(ContractName.DutchAuction, () => {
let makerAddress: string;
let owner: string;
let takerAddress: string;
let feeRecipientAddress: string;
let defaultMakerAssetAddress: string;
let zrxToken: DummyERC20TokenContract;
let erc20TokenA: DummyERC20TokenContract;
let erc721Token: DummyERC721TokenContract;
let dutchAuctionContract: DutchAuctionContract;
let wethContract: WETH9Contract;
let sellerOrderFactory: OrderFactory;
let buyerOrderFactory: OrderFactory;
let erc20Wrapper: ERC20Wrapper;
let erc20Balances: ERC20BalancesByOwner;
let currentBlockTimestamp: number;
let auctionBeginTimeSeconds: BigNumber;
let auctionEndTimeSeconds: BigNumber;
let auctionBeginAmount: BigNumber;
let auctionEndAmount: BigNumber;
let sellOrder: SignedOrder;
let buyOrder: SignedOrder;
let erc721MakerAssetIds: BigNumber[];
const tenMinutesInSeconds = 10 * 60;
function extendMakerAssetData(makerAssetData: string, beginTimeSeconds: BigNumber, beginAmount: BigNumber): string {
return ethUtil.bufferToHex(
Buffer.concat([
ethUtil.toBuffer(makerAssetData),
ethUtil.toBuffer(
(ethAbi as any).rawEncode(
['uint256', 'uint256'],
[beginTimeSeconds.toString(), beginAmount.toString()],
),
),
]),
);
}
before(async () => {
await blockchainLifecycle.startAsync();
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = accounts);
erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
const numDummyErc20ToDeploy = 2;
[erc20TokenA, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
numDummyErc20ToDeploy,
constants.DUMMY_TOKEN_DECIMALS,
);
const erc20Proxy = await erc20Wrapper.deployProxyAsync();
await erc20Wrapper.setBalancesAndAllowancesAsync();
const erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
[erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
const erc721Proxy = await erc721Wrapper.deployProxyAsync();
await erc721Wrapper.setBalancesAndAllowancesAsync();
const erc721Balances = await erc721Wrapper.getBalancesAsync();
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(tokensArtifacts.WETH9, provider, txDefaults);
erc20Wrapper.addDummyTokenContract(wethContract as any);
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
protocolArtifacts.Exchange,
provider,
txDefaults,
zrxAssetData,
);
const exchangeWrapper = new ExchangeWrapper(exchangeInstance, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
from: owner,
});
await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
from: owner,
});
const dutchAuctionInstance = await DutchAuctionContract.deployFrom0xArtifactAsync(
artifacts.DutchAuction,
provider,
txDefaults,
exchangeInstance.address,
);
dutchAuctionContract = new DutchAuctionContract(
dutchAuctionInstance.abi,
dutchAuctionInstance.address,
provider,
);
defaultMakerAssetAddress = erc20TokenA.address;
const defaultTakerAssetAddress = wethContract.address;
// Set up taker WETH balance and allowance
await web3Wrapper.awaitTransactionSuccessAsync(
await wethContract.deposit.sendTransactionAsync({
from: takerAddress,
value: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), DECIMALS_DEFAULT),
}),
);
await web3Wrapper.awaitTransactionSuccessAsync(
await wethContract.approve.sendTransactionAsync(
erc20Proxy.address,
constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
{ from: takerAddress },
),
);
web3Wrapper.abiDecoder.addABI(exchangeInstance.abi);
web3Wrapper.abiDecoder.addABI(zrxToken.abi);
erc20Wrapper.addTokenOwnerAddress(dutchAuctionContract.address);
currentBlockTimestamp = await getLatestBlockTimestampAsync();
// Default auction begins 10 minutes ago
auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp).minus(tenMinutesInSeconds);
// Default auction ends 10 from now
auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp).plus(tenMinutesInSeconds);
auctionBeginAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(10), DECIMALS_DEFAULT);
auctionEndAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT);
// Default sell order and buy order are exact mirrors
const sellerDefaultOrderParams = {
salt: generatePseudoRandomSalt(),
exchangeAddress: exchangeInstance.address,
makerAddress,
feeRecipientAddress,
// taker address or sender address should be set to the ducth auction contract
takerAddress: dutchAuctionContract.address,
makerAssetData: extendMakerAssetData(
assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
auctionBeginTimeSeconds,
auctionBeginAmount,
),
takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), DECIMALS_DEFAULT),
takerAssetAmount: auctionEndAmount,
expirationTimeSeconds: auctionEndTimeSeconds,
makerFee: constants.ZERO_AMOUNT,
takerFee: constants.ZERO_AMOUNT,
};
// Default buy order is for the auction begin price
const buyerDefaultOrderParams = {
...sellerDefaultOrderParams,
makerAddress: takerAddress,
makerAssetData: sellerDefaultOrderParams.takerAssetData,
takerAssetData: sellerDefaultOrderParams.makerAssetData,
makerAssetAmount: auctionBeginAmount,
takerAssetAmount: sellerDefaultOrderParams.makerAssetAmount,
};
const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
const takerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(takerAddress)];
sellerOrderFactory = new OrderFactory(makerPrivateKey, sellerDefaultOrderParams);
buyerOrderFactory = new OrderFactory(takerPrivateKey, buyerDefaultOrderParams);
});
after(async () => {
await blockchainLifecycle.revertAsync();
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();
erc20Balances = await erc20Wrapper.getBalancesAsync();
sellOrder = await sellerOrderFactory.newSignedOrderAsync();
buyOrder = await buyerOrderFactory.newSignedOrderAsync();
});
afterEach(async () => {
await blockchainLifecycle.revertAsync();
});
describe('matchOrders', () => {
it('should be worth the begin price at the begining of the auction', async () => {
auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp + 2);
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
makerAssetData: extendMakerAssetData(
assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
auctionBeginTimeSeconds,
auctionBeginAmount,
),
});
const auctionDetails = await dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
expect(auctionDetails.currentAmount).to.be.bignumber.equal(auctionBeginAmount);
expect(auctionDetails.beginAmount).to.be.bignumber.equal(auctionBeginAmount);
});
it('should be be worth the end price at the end of the auction', async () => {
auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds * 2);
auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds);
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
makerAssetData: extendMakerAssetData(
assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
auctionBeginTimeSeconds,
auctionBeginAmount,
),
expirationTimeSeconds: auctionEndTimeSeconds,
});
const auctionDetails = await dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
expect(auctionDetails.currentAmount).to.be.bignumber.equal(auctionEndAmount);
expect(auctionDetails.beginAmount).to.be.bignumber.equal(auctionBeginAmount);
});
it('should match orders at current amount and send excess to buyer', async () => {
const beforeAuctionDetails = await dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
buyOrder = await buyerOrderFactory.newSignedOrderAsync({
makerAssetAmount: beforeAuctionDetails.currentAmount.times(2),
});
await web3Wrapper.awaitTransactionSuccessAsync(
await dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
),
);
const afterAuctionDetails = await dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
const newBalances = await erc20Wrapper.getBalancesAsync();
expect(newBalances[dutchAuctionContract.address][wethContract.address]).to.be.bignumber.equal(
constants.ZERO_AMOUNT,
);
// HACK gte used here due to a bug in ganache where the timestamp can change
// between multiple calls to the same block. Which can move the amount in our case
// ref: https://github.com/trufflesuite/ganache-core/issues/111
expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
);
expect(newBalances[takerAddress][wethContract.address]).to.be.bignumber.gte(
erc20Balances[takerAddress][wethContract.address].minus(beforeAuctionDetails.currentAmount),
);
});
it('maker fees on sellOrder are paid to the fee receipient', async () => {
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
makerFee: new BigNumber(1),
});
const txHash = await dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
);
await web3Wrapper.awaitTransactionSuccessAsync(txHash);
const afterAuctionDetails = await dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
const newBalances = await erc20Wrapper.getBalancesAsync();
expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
);
expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[feeRecipientAddress][zrxToken.address].plus(sellOrder.makerFee),
);
});
it('maker fees on buyOrder are paid to the fee receipient', async () => {
buyOrder = await buyerOrderFactory.newSignedOrderAsync({
makerFee: new BigNumber(1),
});
const txHash = await dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
);
await web3Wrapper.awaitTransactionSuccessAsync(txHash);
const newBalances = await erc20Wrapper.getBalancesAsync();
const afterAuctionDetails = await dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
);
expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[feeRecipientAddress][zrxToken.address].plus(buyOrder.makerFee),
);
});
it('should revert when auction expires', async () => {
auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds * 2);
auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds);
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
expirationTimeSeconds: auctionEndTimeSeconds,
makerAssetData: extendMakerAssetData(
assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
auctionBeginTimeSeconds,
auctionBeginAmount,
),
});
return expectTransactionFailedAsync(
dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
),
RevertReason.AuctionExpired,
);
});
it('cannot be filled for less than the current price', async () => {
buyOrder = await buyerOrderFactory.newSignedOrderAsync({
makerAssetAmount: sellOrder.takerAssetAmount,
});
return expectTransactionFailedAsync(
dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
),
RevertReason.AuctionInvalidAmount,
);
});
it('auction begin amount must be higher than final amount ', async () => {
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
takerAssetAmount: auctionBeginAmount.plus(1),
});
return expectTransactionFailedAsync(
dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
),
RevertReason.AuctionInvalidAmount,
);
});
it('begin time is less than end time', async () => {
auctionBeginTimeSeconds = new BigNumber(auctionEndTimeSeconds).plus(tenMinutesInSeconds);
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
expirationTimeSeconds: auctionEndTimeSeconds,
makerAssetData: extendMakerAssetData(
assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
auctionBeginTimeSeconds,
auctionBeginAmount,
),
});
return expectTransactionFailedAsync(
dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
),
RevertReason.AuctionInvalidBeginTime,
);
});
it('asset data contains auction parameters', async () => {
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
});
return expectTransactionFailedAsync(
dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
),
RevertReason.InvalidAssetData,
);
});
describe('ERC721', () => {
it('should match orders when ERC721', async () => {
const makerAssetId = erc721MakerAssetIds[0];
sellOrder = await sellerOrderFactory.newSignedOrderAsync({
makerAssetAmount: new BigNumber(1),
makerAssetData: extendMakerAssetData(
assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
auctionBeginTimeSeconds,
auctionBeginAmount,
),
});
buyOrder = await buyerOrderFactory.newSignedOrderAsync({
takerAssetAmount: new BigNumber(1),
takerAssetData: sellOrder.makerAssetData,
});
await web3Wrapper.awaitTransactionSuccessAsync(
await dutchAuctionContract.matchOrders.sendTransactionAsync(
buyOrder,
sellOrder,
buyOrder.signature,
sellOrder.signature,
{
from: takerAddress,
},
),
);
const afterAuctionDetails = await dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
const newBalances = await erc20Wrapper.getBalancesAsync();
// HACK gte used here due to a bug in ganache where the timestamp can change
// between multiple calls to the same block. Which can move the amount in our case
// ref: https://github.com/trufflesuite/ganache-core/issues/111
expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
);
const newOwner = await erc721Token.ownerOf.callAsync(makerAssetId);
expect(newOwner).to.be.bignumber.equal(takerAddress);
});
});
});
});

View File

@@ -1,31 +1,41 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { assetDataUtils } from '@0xproject/order-utils';
import { RevertReason, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import {
artifacts as protocolArtifacts,
ERC20Wrapper,
ERC721Wrapper,
ExchangeContract,
ExchangeWrapper,
} from '@0x/contracts-protocol';
import {
chaiSetup,
constants,
ContractName,
ERC20BalancesByOwner,
expectContractCreationFailedAsync,
expectTransactionFailedAsync,
OrderFactory,
provider,
sendTransactionResult,
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
import {
artifacts as tokenArtifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
WETH9Contract,
} from '@0x/contracts-tokens';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { assetDataUtils } from '@0x/order-utils';
import { RevertReason, SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { DummyERC20TokenContract } from '../../generated_contract_wrappers/dummy_erc20_token';
import { DummyERC721TokenContract } from '../../generated_contract_wrappers/dummy_erc721_token';
import { ExchangeContract } from '../../generated_contract_wrappers/exchange';
import { ForwarderContract } from '../../generated_contract_wrappers/forwarder';
import { WETH9Contract } from '../../generated_contract_wrappers/weth9';
import { artifacts } from '../utils/artifacts';
import {
expectContractCreationFailedAsync,
expectTransactionFailedAsync,
sendTransactionResult,
} from '../utils/assertions';
import { chaiSetup } from '../utils/chai_setup';
import { constants } from '../utils/constants';
import { ERC20Wrapper } from '../utils/erc20_wrapper';
import { ERC721Wrapper } from '../utils/erc721_wrapper';
import { ExchangeWrapper } from '../utils/exchange_wrapper';
import { ForwarderContract } from '../../generated-wrappers/forwarder';
import { artifacts } from '../../src/artifacts';
import { ForwarderWrapper } from '../utils/forwarder_wrapper';
import { OrderFactory } from '../utils/order_factory';
import { ContractName, ERC20BalancesByOwner } from '../utils/types';
import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -45,6 +55,7 @@ describe(ContractName.Forwarder, () => {
let weth: DummyERC20TokenContract;
let zrxToken: DummyERC20TokenContract;
let erc20TokenA: DummyERC20TokenContract;
let erc721Token: DummyERC721TokenContract;
let forwarderContract: ForwarderContract;
let wethContract: WETH9Contract;
@@ -77,7 +88,6 @@ describe(ContractName.Forwarder, () => {
erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
const numDummyErc20ToDeploy = 3;
let erc20TokenA;
[erc20TokenA, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
numDummyErc20ToDeploy,
constants.DUMMY_TOKEN_DECIMALS,
@@ -91,14 +101,14 @@ describe(ContractName.Forwarder, () => {
const erc721Balances = await erc721Wrapper.getBalancesAsync();
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.EtherToken, provider, txDefaults);
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(tokenArtifacts.WETH9, provider, txDefaults);
weth = new DummyERC20TokenContract(wethContract.abi, wethContract.address, provider);
erc20Wrapper.addDummyTokenContract(weth);
wethAssetData = assetDataUtils.encodeERC20AssetData(wethContract.address);
zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
artifacts.Exchange,
protocolArtifacts.Exchange,
provider,
txDefaults,
zrxAssetData,
@@ -169,7 +179,7 @@ describe(ContractName.Forwarder, () => {
describe('constructor', () => {
it('should revert if assetProxy is unregistered', async () => {
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
artifacts.Exchange,
protocolArtifacts.Exchange,
provider,
txDefaults,
zrxAssetData,
@@ -902,6 +912,269 @@ describe(ContractName.Forwarder, () => {
);
expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
it('Should buy slightly greater MakerAsset when exchange rate is rounded', async () => {
// The 0x Protocol contracts round the exchange rate in favor of the Maker.
// In this case, the taker must round up how much they're going to spend, which
// in turn increases the amount of MakerAsset being purchased.
// Example:
// The taker wants to buy 5 units of the MakerAsset at a rate of 3M/2T.
// For every 2 units of TakerAsset, the taker will receive 3 units of MakerAsset.
// To purchase 5 units, the taker must spend 10/3 = 3.33 units of TakerAssset.
// However, the Taker can only spend whole units.
// Spending floor(10/3) = 3 units will yield a profit of Floor(3*3/2) = Floor(4.5) = 4 units of MakerAsset.
// Spending ceil(10/3) = 4 units will yield a profit of Floor(4*3/2) = 6 units of MakerAsset.
//
// The forwarding contract will opt for the second option, which overbuys, to ensure the taker
// receives at least the amount of MakerAsset they requested.
//
// Construct test case using values from example above
orderWithoutFee = await orderFactory.newSignedOrderAsync({
makerAssetAmount: new BigNumber('30'),
takerAssetAmount: new BigNumber('20'),
makerAssetData: assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
makerFee: new BigNumber(0),
takerFee: new BigNumber(0),
});
const ordersWithoutFee = [orderWithoutFee];
const feeOrders: SignedOrder[] = [];
const desiredMakerAssetFillAmount = new BigNumber('5');
const makerAssetFillAmount = new BigNumber('6');
const ethValue = new BigNumber('4');
// Execute test case
tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
ordersWithoutFee,
feeOrders,
desiredMakerAssetFillAmount,
{
value: ethValue,
from: takerAddress,
},
);
// Fetch end balances and construct expected outputs
const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
const newBalances = await erc20Wrapper.getBalancesAsync();
const primaryTakerAssetFillAmount = ethValue;
const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
// Validate test case
expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
);
expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
);
expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
);
expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
constants.ZERO_AMOUNT,
);
expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
it('Should buy slightly greater MakerAsset when exchange rate is rounded, and MakerAsset is ZRX', async () => {
// See the test case above for a detailed description of this case.
// The difference here is that the MakerAsset is ZRX. We expect the same result as above,
// but this tests a different code path.
//
// Construct test case using values from example above
orderWithoutFee = await orderFactory.newSignedOrderAsync({
makerAssetAmount: new BigNumber('30'),
takerAssetAmount: new BigNumber('20'),
makerAssetData: zrxAssetData,
takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
makerFee: new BigNumber(0),
takerFee: new BigNumber(0),
});
const ordersWithoutFee = [orderWithoutFee];
const feeOrders: SignedOrder[] = [];
const desiredMakerAssetFillAmount = new BigNumber('5');
const makerAssetFillAmount = new BigNumber('6');
const ethValue = new BigNumber('4');
// Execute test case
tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
ordersWithoutFee,
feeOrders,
desiredMakerAssetFillAmount,
{
value: ethValue,
from: takerAddress,
},
);
// Fetch end balances and construct expected outputs
const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
const newBalances = await erc20Wrapper.getBalancesAsync();
const primaryTakerAssetFillAmount = ethValue;
const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
// Validate test case
expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFillAmount),
);
expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[takerAddress][zrxToken.address].plus(makerAssetFillAmount),
);
expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
);
expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
it('Should buy slightly greater MakerAsset when exchange rate is rounded (Regression Test)', async () => {
// Order taken from a transaction on mainnet that failed due to a rounding error.
orderWithoutFee = await orderFactory.newSignedOrderAsync({
makerAssetAmount: new BigNumber('268166666666666666666'),
takerAssetAmount: new BigNumber('219090625878836371'),
makerAssetData: assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
makerFee: new BigNumber(0),
takerFee: new BigNumber(0),
});
const ordersWithoutFee = [orderWithoutFee];
const feeOrders: SignedOrder[] = [];
// The taker will receive more than the desired amount of makerAsset due to rounding
const desiredMakerAssetFillAmount = new BigNumber('5000000000000000000');
const ethValue = new BigNumber('4084971271824171');
const makerAssetFillAmount = ethValue
.times(orderWithoutFee.makerAssetAmount)
.dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
// Execute test case
tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
ordersWithoutFee,
feeOrders,
desiredMakerAssetFillAmount,
{
value: ethValue,
from: takerAddress,
},
);
// Fetch end balances and construct expected outputs
const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
const newBalances = await erc20Wrapper.getBalancesAsync();
const primaryTakerAssetFillAmount = ethValue;
const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
// Validate test case
expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
);
expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
);
expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
);
expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
constants.ZERO_AMOUNT,
);
expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
it('Should buy slightly greater MakerAsset when exchange rate is rounded, and MakerAsset is ZRX (Regression Test)', async () => {
// Order taken from a transaction on mainnet that failed due to a rounding error.
orderWithoutFee = await orderFactory.newSignedOrderAsync({
makerAssetAmount: new BigNumber('268166666666666666666'),
takerAssetAmount: new BigNumber('219090625878836371'),
makerAssetData: zrxAssetData,
takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
makerFee: new BigNumber(0),
takerFee: new BigNumber(0),
});
const ordersWithoutFee = [orderWithoutFee];
const feeOrders: SignedOrder[] = [];
// The taker will receive more than the desired amount of makerAsset due to rounding
const desiredMakerAssetFillAmount = new BigNumber('5000000000000000000');
const ethValue = new BigNumber('4084971271824171');
const makerAssetFillAmount = ethValue
.times(orderWithoutFee.makerAssetAmount)
.dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
// Execute test case
tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
ordersWithoutFee,
feeOrders,
desiredMakerAssetFillAmount,
{
value: ethValue,
from: takerAddress,
},
);
// Fetch end balances and construct expected outputs
const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
const newBalances = await erc20Wrapper.getBalancesAsync();
const primaryTakerAssetFillAmount = ethValue;
const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
// Validate test case
expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFillAmount),
);
expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[takerAddress][zrxToken.address].plus(makerAssetFillAmount),
);
expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
);
expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
it('Should buy correct MakerAsset when exchange rate is NOT rounded, and MakerAsset is ZRX (Regression Test)', async () => {
// An extra unit of TakerAsset was sent to the exchange contract to account for rounding errors, in Forwarder v1.
// Specifically, the takerFillAmount was calculated using Floor(desiredMakerAmount * exchangeRate) + 1
// We have since changed this to be Ceil(desiredMakerAmount * exchangeRate)
// These calculations produce different results when `desiredMakerAmount * exchangeRate` is an integer.
//
// This test verifies that `ceil` is sufficient:
// Let TakerAssetAmount = MakerAssetAmount * 2
// -> exchangeRate = TakerAssetAmount / MakerAssetAmount = (2*MakerAssetAmount)/MakerAssetAmount = 2
// .: desiredMakerAmount * exchangeRate is an integer.
//
// Construct test case using values from example above
orderWithoutFee = await orderFactory.newSignedOrderAsync({
makerAssetAmount: new BigNumber('30'),
takerAssetAmount: new BigNumber('60'),
makerAssetData: zrxAssetData,
takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
makerFee: new BigNumber(0),
takerFee: new BigNumber(0),
});
const ordersWithoutFee = [orderWithoutFee];
const feeOrders: SignedOrder[] = [];
const makerAssetFillAmount = new BigNumber('5');
const ethValue = new BigNumber('10');
// Execute test case
tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
value: ethValue,
from: takerAddress,
});
// Fetch end balances and construct expected outputs
const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
const newBalances = await erc20Wrapper.getBalancesAsync();
const primaryTakerAssetFillAmount = ethValue;
const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
// Validate test case
expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFillAmount),
);
expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
erc20Balances[takerAddress][zrxToken.address].plus(makerAssetFillAmount),
);
expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
);
expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
});
describe('marketBuyOrdersWithEth with extra fees', () => {
it('should buy an asset and send fee to feeRecipient', async () => {

View File

@@ -0,0 +1,17 @@
import { env, EnvVars } from '@0x/dev-utils';
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
before('start web3 provider', () => {
provider.start();
});
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

@@ -1,15 +1,14 @@
import { SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { artifacts as protocolArtifacts } from '@0x/contracts-protocol';
import { constants, formatters, LogDecoder, MarketSellOrders } from '@0x/contracts-test-utils';
import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider, TransactionReceiptWithDecodedLogs, TxDataPayable } from 'ethereum-types';
import * as _ from 'lodash';
import { ForwarderContract } from '../../generated_contract_wrappers/forwarder';
import { constants } from './constants';
import { formatters } from './formatters';
import { LogDecoder } from './log_decoder';
import { MarketSellOrders } from './types';
import { ForwarderContract } from '../../generated-wrappers/forwarder';
import { artifacts } from '../../src/artifacts';
export class ForwarderWrapper {
private readonly _web3Wrapper: Web3Wrapper;
@@ -26,9 +25,12 @@ export class ForwarderWrapper {
_.forEach(feeOrders, feeOrder => {
const feeAvailable = feeOrder.makerAssetAmount.minus(feeOrder.takerFee);
if (!remainingFeeAmount.isZero() && feeAvailable.gt(remainingFeeAmount)) {
wethAmount = wethAmount
.plus(feeOrder.takerAssetAmount.times(remainingFeeAmount).dividedToIntegerBy(feeAvailable))
.plus(1);
wethAmount = wethAmount.plus(
feeOrder.takerAssetAmount
.times(remainingFeeAmount)
.dividedBy(feeAvailable)
.ceil(),
);
remainingFeeAmount = new BigNumber(0);
} else if (!remainingFeeAmount.isZero()) {
wethAmount = wethAmount.plus(feeOrder.takerAssetAmount);
@@ -58,7 +60,11 @@ export class ForwarderWrapper {
constructor(contractInstance: ForwarderContract, provider: Provider) {
this._forwarderContract = contractInstance;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper);
this._logDecoder = new LogDecoder(this._web3Wrapper, {
...artifacts,
...tokensArtifacts,
...protocolArtifacts,
});
}
public async marketSellOrdersWithEthAsync(
orders: SignedOrder[],

View File

@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": ["./generated-artifacts/DutchAuction.json", "./generated-artifacts/Forwarder.json"],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -0,0 +1,6 @@
{
"extends": ["@0x/tslint-config"],
"rules": {
"custom-no-magic-numbers": false
}
}

View File

@@ -0,0 +1,11 @@
[
{
"timestamp": 1544741676,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
}
]

View File

@@ -0,0 +1,10 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.0.2 - _December 13, 2018_
* Dependencies updated

View File

@@ -0,0 +1,72 @@
## Contract interfaces
Smart contract interfaces of the 0x protocol.
## Usage
Contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
* [protocol](./contracts/protocol)
* This directory contains the contract interfaces that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
## Bug bounty
A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
## 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-interfaces yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0x/contracts-interfaces 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,35 @@
{
"artifactsDir": "./generated-artifacts",
"contractsDir": "./contracts",
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap"
]
}
}
},
"contracts": [
"IAssetData",
"IAssetProxy",
"IAuthorizable",
"IAssetProxyDispatcher",
"IExchange",
"IExchangeCore",
"IMatchOrders",
"ISignatureValidator",
"ITransactions",
"IValidator",
"IWallet",
"IWrapperFunctions"
]
}

View File

@@ -18,6 +18,7 @@
// solhint-disable
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
// @dev Interface of the asset proxy's assetData.
@@ -26,15 +27,18 @@ pragma solidity 0.4.24;
interface IAssetData {
function ERC20Token(address tokenContract)
external
pure;
external;
function ERC721Token(
address tokenContract,
uint256 tokenId,
bytes receiverData
uint256 tokenId
)
external
pure;
external;
function MultiAsset(
uint256[] amounts,
bytes[] nestedAssetData
)
external;
}

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../../../utils/Ownable/IOwnable.sol";
import "@0x/contracts-utils/contracts/utils/Ownable/IOwnable.sol";
contract IAuthorizable is

View File

@@ -19,8 +19,8 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../libs/LibOrder.sol";
import "../libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
contract IExchangeCore {

View File

@@ -18,8 +18,8 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../libs/LibOrder.sol";
import "../libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
contract IMatchOrders {

View File

@@ -19,8 +19,8 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../libs/LibOrder.sol";
import "../libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
contract IWrapperFunctions {

View File

@@ -0,0 +1,56 @@
{
"name": "@0x/contracts-interfaces",
"version": "1.0.2",
"engines": {
"node": ">=6.12"
},
"description": "Smart contract interfaces of 0x protocol",
"main": "lib/src/index.js",
"scripts": {
"build": "yarn pre_build && tsc -b",
"build:ci": "yarn build",
"pre_build": "run-s compile generate_contract_wrappers",
"compile": "sol-compiler --contracts-dir contracts",
"clean": "shx rm -rf lib generated-artifacts generated-wrappers",
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(IAssetData|IAssetProxy|IAuthorizable|IAssetProxyDispatcher|IExchange|IExchangeCore|IMatchOrders|ISignatureValidator|ITransactions|IValidator|IWallet|IWrapperFunctions).json"
},
"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/interfaces/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.19",
"@0x/sol-compiler": "^1.1.16",
"@0x/tslint-config": "^2.0.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
"tslint": "5.11.0",
"typescript": "3.0.1",
"yargs": "^10.0.3"
},
"dependencies": {
"@0x/base-contract": "^3.0.10",
"@0x/contracts-libs": "^1.0.2",
"@0x/contracts-utils": "^1.0.2",
"@0x/types": "^1.4.1",
"@0x/typescript-typings": "^3.0.6",
"@0x/utils": "^2.0.8",
"@0x/web3-wrapper": "^3.2.1",
"ethereum-types": "^1.1.4",
"lodash": "^4.17.5"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,29 @@
import { ContractArtifact } from 'ethereum-types';
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 IExchange from '../../generated-artifacts/IExchange.json';
import * as IExchangeCore from '../../generated-artifacts/IExchangeCore.json';
import * as IMatchOrders from '../../generated-artifacts/IMatchOrders.json';
import * as ISignatureValidator from '../../generated-artifacts/ISignatureValidator.json';
import * as ITransactions from '../../generated-artifacts/ITransactions.json';
import * as IValidator from '../../generated-artifacts/IValidator.json';
import * as IWallet from '../../generated-artifacts/IWallet.json';
import * as IWrapperFunctions from '../../generated-artifacts/IWrapperFunctions.json';
export const artifacts = {
IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
IAuthorizable: IAuthorizable as ContractArtifact,
IExchange: IExchange as ContractArtifact,
IExchangeCore: IExchangeCore as ContractArtifact,
IMatchOrders: IMatchOrders as ContractArtifact,
ISignatureValidator: ISignatureValidator as ContractArtifact,
ITransactions: ITransactions as ContractArtifact,
IWrapperFunctions: IWrapperFunctions as ContractArtifact,
IAssetData: IAssetData as ContractArtifact,
IAssetProxy: IAssetProxy as ContractArtifact,
IValidator: IValidator as ContractArtifact,
IWallet: IWallet as ContractArtifact,
};

View File

@@ -0,0 +1,2 @@
export * from './artifacts';
export * from './wrappers';

View File

@@ -0,0 +1,12 @@
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_exchange';
export * from '../../generated-wrappers/i_exchange_core';
export * from '../../generated-wrappers/i_match_orders';
export * from '../../generated-wrappers/i_signature_validator';
export * from '../../generated-wrappers/i_transactions';
export * from '../../generated-wrappers/i_authorizable';
export * from '../../generated-wrappers/i_wrapper_functions';
export * from '../../generated-wrappers/i_validator';
export * from '../../generated-wrappers/i_wallet';

View File

@@ -0,0 +1,24 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"include": ["./src/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/IAssetData.json",
"./generated-artifacts/IAssetProxy.json",
"./generated-artifacts/IAuthorizable.json",
"./generated-artifacts/IAssetProxyDispatcher.json",
"./generated-artifacts/IExchange.json",
"./generated-artifacts/IExchangeCore.json",
"./generated-artifacts/IMatchOrders.json",
"./generated-artifacts/ISignatureValidator.json",
"./generated-artifacts/ITransactions.json",
"./generated-artifacts/IValidator.json",
"./generated-artifacts/IWallet.json",
"./generated-artifacts/IWrapperFunctions.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -0,0 +1,6 @@
{
"extends": ["@0x/tslint-config"],
"rules": {
"custom-no-magic-numbers": false
}
}

View File

@@ -0,0 +1,11 @@
[
{
"timestamp": 1544741676,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
}
]

View File

@@ -0,0 +1,10 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.0.2 - _December 13, 2018_
* Dependencies updated

70
contracts/libs/README.md Normal file
View File

@@ -0,0 +1,70 @@
## Contracts libs
Smart contracts libs used in the 0x protocol.
## Usage
Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
* [libs](./contracts/protocol)
* This directory contains the libs.
* [test](./contracts/test)
* This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
## 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-libs yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0x/contracts-libs 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,22 @@
{
"artifactsDir": "./generated-artifacts",
"contractsDir": "./contracts",
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap"
]
}
}
},
"contracts": ["TestLibs", "LibOrder", "LibMath", "LibFillResults", "LibAbiEncoder", "LibEIP712"]
}

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../../../utils/SafeMath/SafeMath.sol";
import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
contract LibFillResults is

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../../../utils/SafeMath/SafeMath.sol";
import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
contract LibMath is

View File

@@ -19,10 +19,10 @@
pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;
import "../../protocol/Exchange/libs/LibMath.sol";
import "../../protocol/Exchange/libs/LibOrder.sol";
import "../../protocol/Exchange/libs/LibFillResults.sol";
import "../../protocol/Exchange/libs/LibAbiEncoder.sol";
import "../../libs/LibMath.sol";
import "../../libs/LibOrder.sol";
import "../../libs/LibFillResults.sol";
import "../../libs/LibAbiEncoder.sol";
contract TestLibs is

View File

@@ -0,0 +1,90 @@
{
"name": "@0x/contracts-libs",
"version": "1.0.2",
"engines": {
"node": ">=6.12"
},
"description": "Smart contract libs 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 generate_contract_wrappers",
"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 --contracts-dir contracts",
"clean": "shx rm -rf lib generated-artifacts generated-wrappers",
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./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",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(LibMath|LibOrder|LibFillResults|LibAbiEncoder|TestLibs|LibEIP712).json"
},
"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/libs/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.19",
"@0x/contracts-test-utils": "^1.0.2",
"@0x/dev-utils": "^1.0.21",
"@0x/sol-compiler": "^1.1.16",
"@0x/sol-cov": "^2.1.16",
"@0x/subproviders": "^2.1.8",
"@0x/tslint-config": "^2.0.0",
"@types/bn.js": "^4.11.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
"@types/yargs": "^10.0.0",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^2.0.1",
"dirty-chai": "^2.0.1",
"ethereumjs-abi": "0.6.5",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solc": "^0.4.24",
"solhint": "^1.4.1",
"tslint": "5.11.0",
"typescript": "3.0.1",
"yargs": "^10.0.3"
},
"dependencies": {
"@0x/base-contract": "^3.0.10",
"@0x/contracts-multisig": "^1.0.2",
"@0x/contracts-utils": "^1.0.2",
"@0x/order-utils": "^3.0.7",
"@0x/types": "^1.4.1",
"@0x/typescript-typings": "^3.0.6",
"@0x/utils": "^2.0.8",
"@0x/web3-wrapper": "^3.2.1",
"@types/js-combinatorics": "^0.5.29",
"bn.js": "^4.11.8",
"ethereum-types": "^1.1.4",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.5"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,17 @@
import { ContractArtifact } from 'ethereum-types';
import * as LibAbiEncoder from '../../generated-artifacts/LibAbiEncoder.json';
import * as LibEIP721 from '../../generated-artifacts/LibEIP712.json';
import * as LibFillResults from '../../generated-artifacts/LibFillResults.json';
import * as LibMath from '../../generated-artifacts/LibMath.json';
import * as LibOrder from '../../generated-artifacts/LibOrder.json';
import * as TestLibs from '../../generated-artifacts/TestLibs.json';
export const artifacts = {
TestLibs: TestLibs as ContractArtifact,
LibAbiEncoder: LibAbiEncoder as ContractArtifact,
LibFillResults: LibFillResults as ContractArtifact,
LibMath: LibMath as ContractArtifact,
LibOrder: LibOrder as ContractArtifact,
LibEIP721: LibEIP721 as ContractArtifact,
};

View File

@@ -0,0 +1,2 @@
export * from './artifacts';
export * from './wrappers';

View File

@@ -0,0 +1,6 @@
export * from '../../generated-wrappers/test_libs';
export * from '../../generated-wrappers/lib_abi_encoder';
export * from '../../generated-wrappers/lib_fill_results';
export * from '../../generated-wrappers/lib_math';
export * from '../../generated-wrappers/lib_order';
export * from '../../generated-wrappers/lib_e_i_p712';

View File

@@ -1,17 +1,20 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { assetDataUtils, eip712Utils, orderHashUtils } from '@0xproject/order-utils';
import { SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import {
addressUtils,
chaiSetup,
constants,
OrderFactory,
provider,
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import { TestConstantsContract } from '../../generated_contract_wrappers/test_constants';
import { TestLibsContract } from '../../generated_contract_wrappers/test_libs';
import { addressUtils } from '../utils/address_utils';
import { artifacts } from '../utils/artifacts';
import { chaiSetup } from '../utils/chai_setup';
import { constants } from '../utils/constants';
import { OrderFactory } from '../utils/order_factory';
import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper';
import { TestLibsContract } from '../../generated-wrappers/test_libs';
import { artifacts } from '../../src/artifacts';
chaiSetup.configure();
const expect = chai.expect;
@@ -22,7 +25,6 @@ describe('Exchange libs', () => {
let signedOrder: SignedOrder;
let orderFactory: OrderFactory;
let libs: TestLibsContract;
let testConstants: TestConstantsContract;
before(async () => {
await blockchainLifecycle.startAsync();
@@ -34,11 +36,6 @@ describe('Exchange libs', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const makerAddress = accounts[0];
libs = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
testConstants = await TestConstantsContract.deployFrom0xArtifactAsync(
artifacts.TestConstants,
provider,
txDefaults,
);
const defaultOrderParams = {
...constants.STATIC_ORDER_PARAMS,
@@ -58,15 +55,6 @@ describe('Exchange libs', () => {
afterEach(async () => {
await blockchainLifecycle.revertAsync();
});
describe('LibConstants', () => {
describe('ZRX_ASSET_DATA', () => {
it('should have the correct ZRX_ASSET_DATA', async () => {
const isValid = await testConstants.assertValidZrxAssetData.callAsync();
expect(isValid).to.be.equal(true);
});
});
});
// Note(albrow): These tests are designed to be supplemental to the
// combinatorial tests in test/exchange/internal. They test specific edge
// cases that are not covered by the combinatorial tests.
@@ -126,22 +114,6 @@ describe('Exchange libs', () => {
});
describe('LibOrder', () => {
describe('getOrderSchema', () => {
it('should output the correct order schema hash', async () => {
const orderSchema = await libs.getOrderSchemaHash.callAsync();
const schemaHashBuffer = orderHashUtils._getOrderSchemaBuffer();
const schemaHashHex = `0x${schemaHashBuffer.toString('hex')}`;
expect(schemaHashHex).to.be.equal(orderSchema);
});
});
describe('getDomainSeparatorSchema', () => {
it('should output the correct domain separator schema hash', async () => {
const domainSeparatorSchema = await libs.getDomainSeparatorSchemaHash.callAsync();
const domainSchemaBuffer = eip712Utils._getDomainSeparatorSchemaBuffer();
const schemaHashHex = `0x${domainSchemaBuffer.toString('hex')}`;
expect(schemaHashHex).to.be.equal(domainSeparatorSchema);
});
});
describe('getOrderHash', () => {
it('should output the correct orderHash', async () => {
signedOrder = await orderFactory.newSignedOrderAsync();

View File

@@ -0,0 +1,17 @@
import { env, EnvVars } from '@0x/dev-utils';
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
before('start web3 provider', () => {
provider.start();
});
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,18 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/TestLibs.json",
"./generated-artifacts/LibOrder.json",
"./generated-artifacts/LibFillResults.json",
"./generated-artifacts/LibAbiEncoder.json",
"./generated-artifacts/LibEIP712.json",
"./generated-artifacts/LibMath.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -0,0 +1,6 @@
{
"extends": ["@0x/tslint-config"],
"rules": {
"custom-no-magic-numbers": false
}
}

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