Compare commits

..

3899 Commits

Author SHA1 Message Date
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
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
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
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
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
Fabio Berger
4b64d8c3aa Allow a SimpleContractArtifact to be passed into deployFrom0xArtifactAsync 2018-11-20 23:06:46 +00: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
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
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
Steve Klebanoff
097bfe581d Better way of reporting Fallback provider 2018-11-16 16:21:38 -08:00
Steve Klebanoff
1564415e5d Specify fallback web3 provider in analytics 2018-11-16 15:41:54 -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
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
Brandon Millman
b5d88079d9 Publish
- 0x.js@1.0.8
 - @0xproject/abi-gen@1.0.13
 - @0xproject/assert@1.0.13
 - @0xproject/asset-buyer@2.0.0
 - @0xproject/base-contract@3.0.1
 - @0xproject/connect@3.0.1
 - @0xproject/contract-wrappers@2.0.2
 - contracts@2.1.49
 - @0xproject/dev-utils@1.0.12
 - ethereum-types@1.0.11
 - @0xproject/fill-scenarios@1.0.7
 - @0xproject/instant@0.0.2
 - @0xproject/json-schemas@1.0.7
 - @0xproject/metacoin@0.0.23
 - @0xproject/migrations@1.0.14
 - @0xproject/monorepo-scripts@1.0.11
 - @0xproject/order-utils@1.0.7
 - @0xproject/order-watcher@2.1.1
 - @0xproject/react-docs@1.0.13
 - @0xproject/react-shared@1.0.15
 - @0xproject/sol-compiler@1.1.7
 - @0xproject/sol-cov@2.1.7
 - @0xproject/sol-doc@1.0.2
 - @0xproject/sol-resolver@1.0.14
 - @0xproject/sra-report@1.0.13
 - @0xproject/sra-spec@1.0.6
 - @0xproject/subproviders@2.0.7
 - @0xproject/testnet-faucets@1.0.51
 - @0xproject/tslint-config@1.0.8
 - @0xproject/types@1.1.4
 - @0xproject/typescript-typings@3.0.2
 - @0xproject/utils@2.0.2
 - @0xproject/web3-wrapper@3.0.3
 - @0xproject/website@0.0.54
2018-10-04 15:52:06 -07:00
Brandon Millman
266440f7c3 Updated CHANGELOGS 2018-10-04 15:51:56 -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
Brandon Millman
ab28e6af35 Merge pull request #1113 from 0xProject/feature/asset-buyer/tests
[asset-buyer] Rework min / max rate calc and add tests
2018-10-04 14:49:25 -07:00
Brandon Millman
63d97f4c88 Update BuyQuote interface 2018-10-04 14:37:34 -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
Fabio Berger
2da7626b53 Merge pull request #1115 from 0xProject/upgradeWebpack
Upgrade Webpack
2018-10-04 18:30:54 +01:00
Fabio Berger
98db4b1543 force re-build 2018-10-04 16:46:12 +01:00
Fabio Berger
bc067baf0d Add website build to instructions 2018-10-04 16:44:54 +01:00
Fabio Berger
3624c63a46 Revert format and re-add changes 2018-10-04 16:43:52 +01:00
Fabio Berger
08ba4ffd61 Build website in parallel with other tests since no other test relies on it being built to run 2018-10-04 16:35:30 +01:00
Fabio Berger
d5379ab320 Add back sourceMap support for both dev/prod 2018-10-04 15:58:50 +01:00
Fabio Berger
c613b6741d Upgrade webpack 2018-10-04 15:47:43 +01:00
Brandon Millman
4394036e34 Add missing default options 2018-10-03 23:46:07 -07:00
Brandon Millman
a7a007435c Remove unused constants 2018-10-03 23:23:53 -07:00
Brandon Millman
24e0fbd7b9 Add fee order with a takerFee 2018-10-03 23:22:38 -07:00
Brandon Millman
059162a90a Add additional order factory methods and refactor test to use them 2018-10-03 23:22:13 -07:00
Brandon Millman
250a9a4809 Add comments about buy quote calculation 2018-10-03 22:54:32 -07:00
fragosti
4b8348da8c Add some ui components 2018-10-03 16:20:39 -07:00
Francesco Agosti
f7917cfa65 Merge pull request #1112 from 0xProject/feature/instant/umd-upload-and-bundle-size
Add 0x Instant to bundle analysis
2018-10-03 15:17:55 -07:00
fragosti
48e7aa6e77 Add Inter UI font 2018-10-03 15:16:59 -07:00
Brandon Millman
10f54893ef Update CHANGELOG 2018-10-03 14:59:06 -07:00
Brandon Millman
93736c1567 Fix linter 2018-10-03 14:52:44 -07:00
Brandon Millman
260db053fe Add additional test for slippage 2018-10-03 14:51:24 -07:00
Brandon Millman
57b4396193 Add buy_quote_calculator_test 2018-10-03 14:51:24 -07:00
F. Eugene Aumson
a21cf0ad83 Merge pull request #1108 from 0xProject/bug/every-artifact-has-every-source
fix(sol-compiler): persist artifacts with only relevant sources
2018-10-03 17:44:50 -04: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
fragosti
748091c768 Add 0x Instant to bundle analysis 2018-10-03 12:19:41 -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
F. Eugene Aumson
f614a2425f fix: comment need for sourceCodes pruning 2018-10-03 10:57:37 -04:00
F. Eugene Aumson
39a336ca6d fix: use original source ID's from compiler output
Previously, was generating fresh source ID's but per @LogvinovLeon 's
comment (cited below) that will likely break existing source code
mappings.

Changed to use the original source code mapping ID's that were generated
by the compiler

https://app.asana.com/0/684263176955174/842516551768097/f
https://github.com/0xProject/0x-monorepo/pull/1108
https://github.com/0xProject/0x-monorepo/pull/1108#pullrequestreview-161059063
2018-10-03 10:44:19 -04: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
Alex Browne
37c55302e7 Fix some small bugs in compiler.ts 2018-10-02 17:29:47 -07:00
Francesco Agosti
bce43a0050 Merge pull request #1109 from 0xProject/feature/instant/init
[instant] Initialize the package with dev environment and tests etc..
2018-10-02 17:07:23 -07:00
Brandon Millman
678deccfca Merge pull request #1086 from 0xProject/feature/asset-buyer/improve-asset-buyer-manager
[asset-buyer] Improve API and README
2018-10-02 17:07:12 -07:00
fragosti
81b08c0339 Fix typo in build:ci 2018-10-02 16:34:19 -07:00
Brandon Millman
efe173e4f7 Update README 2018-10-02 16:30:46 -07:00
fragosti
cca12b7170 Make package private 2018-10-02 16:27:21 -07:00
fragosti
49e494ab8d Ignore bundles in public dir 2018-10-02 16:24:07 -07:00
Brandon Millman
42083e1408 Fix linter errors 2018-10-02 16:23:54 -07:00
fragosti
3cd7253f7b Add to README 2018-10-02 16:17:44 -07:00
Brandon Millman
343b922ec1 Merge branch 'development' into feature/asset-buyer/improve-asset-buyer-manager
* development: (178 commits)
  Change cache key back to repo from repo-built
  Change the lint command back
  Merge build & install
  Remove deps cache all together
  Cache all nested node_modules directories
  Explicitly specify yarn cache folder
  Ignore linter issues
  Fix linter issue
  Separate deps and built caches
  Build tslint rules before running linter
  Cache yarn cache directory without node modules
  Run linter before prettier as it fails more often
  Add yarn cache path
  Split CI install and build steps
  Move bundle-size out of static tests and don't wait for a build with static tests
  Introduce a build:ci command that doesn't build webpack bundles
  Measure only one bundle size as they're the same
  Fix linter errors
  Fix no_website CI builds
  Check bundle size on CI
  ...
2018-10-02 16:13:16 -07:00
Brandon Millman
6deb027bdf Clean up interfaces and exports 2018-10-02 16:10:41 -07:00
fragosti
ad56c9ea78 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/init 2018-10-02 16:10:15 -07:00
fragosti
dde918e9a0 Add public dir 2018-10-02 16:06:25 -07:00
fragosti
8990b92dd6 Add build:ci command 2018-10-02 16:02:35 -07:00
Brandon Millman
75679835a7 Remove static methods to retrieve assetDatas from SRA 2018-10-02 15:52:27 -07:00
fragosti
2540660262 Add dev environment 2018-10-02 15:48:00 -07:00
Brandon Millman
75d6970e6c Add AssetUnavailable error 2018-10-02 15:44:11 -07:00
F. Eugene Aumson
98c1952956 fix: persist artifacts with only relevant sources
https://github.com/0xProject/0x-monorepo/pull/1108
https://app.asana.com/0/684263176955174/842516551768097/f
2018-10-02 17:50:58 -04:00
Brandon Millman
b3a868da0e Merge AssetBuyer and AssetBuyerManager 2018-10-02 13:54:57 -07:00
fragosti
20f18c3054 Clean up package json 2018-10-02 13:34:32 -07:00
fragosti
a64bee9f83 Tests are working with coverage 2018-10-02 13:29:14 -07:00
Fabio Berger
c07412a992 Use new Link UI component everywhere, and add complementary ALink type 2018-10-02 20:10:59 +01:00
Leonid Logvinov
f1ecb8c5cb Merge pull request #1104 from 0xProject/feature/bundlesize
Bundle size reporting
2018-10-02 15:29:49 +02:00
Leonid Logvinov
a4153144db Change cache key back to repo from repo-built 2018-10-02 15:09:25 +02:00
Leonid Logvinov
d6e0dc4bd2 Change the lint command back 2018-10-02 15:09:25 +02:00
Leonid Logvinov
fed7e0c858 Merge build & install 2018-10-02 15:09:25 +02:00
Leonid Logvinov
8ee34c49a9 Remove deps cache all together 2018-10-02 15:09:25 +02:00
Leonid Logvinov
194a5de564 Cache all nested node_modules directories 2018-10-02 15:09:25 +02:00
Leonid Logvinov
cc7710abd2 Explicitly specify yarn cache folder 2018-10-02 15:09:25 +02:00
Leonid Logvinov
10f3ee32a4 Ignore linter issues 2018-10-02 15:09:25 +02:00
Leonid Logvinov
8c985eb579 Fix linter issue 2018-10-02 15:09:24 +02:00
Leonid Logvinov
3a93c8a6e0 Separate deps and built caches 2018-10-02 15:09:24 +02:00
Leonid Logvinov
86cc98b245 Build tslint rules before running linter 2018-10-02 15:09:24 +02:00
Leonid Logvinov
ddc0813d90 Cache yarn cache directory without node modules 2018-10-02 15:09:24 +02:00
Leonid Logvinov
a02e6c0441 Run linter before prettier as it fails more often 2018-10-02 15:09:24 +02:00
Leonid Logvinov
52ac84335c Add yarn cache path 2018-10-02 15:09:24 +02:00
Leonid Logvinov
97616eb8e4 Split CI install and build steps 2018-10-02 15:09:24 +02:00
Leonid Logvinov
9e3d1cd63d Move bundle-size out of static tests and don't wait for a build with static tests 2018-10-02 15:09:24 +02:00
Leonid Logvinov
f4e4eef48e Introduce a build:ci command that doesn't build webpack bundles 2018-10-02 15:09:24 +02:00
Leonid Logvinov
16720d4fc7 Measure only one bundle size as they're the same 2018-10-02 15:09:24 +02:00
Leonid Logvinov
f884cc826f Fix linter errors 2018-10-02 15:09:23 +02:00
Leonid Logvinov
1059acf56f Fix no_website CI builds 2018-10-02 15:09:23 +02:00
Leonid Logvinov
c3be851c18 Check bundle size on CI 2018-10-02 15:09:23 +02:00
Leonid Logvinov
00051ae5bb Add a command to run bundle size reporter 2018-10-02 15:09:23 +02:00
Leonid Logvinov
9ad4a135d2 Merge pull request #1106 from 0xProject/feature/postpublish-cleanup
Update package.json versions to match the npm ones
2018-10-02 15:08:43 +02:00
Leonid Logvinov
f80faf0b48 Update package.json versions to match the npm ones 2018-10-02 14:45:16 +02:00
Leonid Logvinov
8b7888b736 Updated CHANGELOGS 2018-10-02 12:37:34 +02:00
Leonid Logvinov
a9ec51ac10 Remove 0x.js bundles from .npmignore 2018-10-02 12:13:38 +02: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
Brandon Millman
c1fb0d7fdf Add Jason to website 2018-10-01 11:52:49 -07:00
Fabio Berger
67e689158f Add missing yarn.lock changes 2018-10-01 17:53:30 +01:00
Fabio Berger
dbbf04bc7d Fix bug in sol-doc 2018-10-01 17:53:19 +01:00
Fabio Berger
bad6761e13 Merge pull request #1099 from 0xProject/solidityDocRefImprovements
Solidity Doc Improvements
2018-10-01 16:37:44 +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
6ffdc318e7 Disable max file line count tslint rule for types file 2018-10-01 16:10:22 +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
de7470d936 merge development 2018-09-30 07:31:34 +01:00
Fabio Berger
b9eb2b3918 Add test that structs are documented in separate section 2018-09-29 14:22:49 +01:00
Fabio Berger
2b6a9911f5 Add test for methodSignature gen for methods with param/return structs 2018-09-29 14:22:33 +01:00
Fabio Berger
005b7a55e8 Fix tests 2018-09-29 14:22:05 +01:00
Fabio Berger
ac14dd2b29 Publish
- 0x.js@1.0.7
 - @0xproject/abi-gen@1.0.12
 - @0xproject/assert@1.0.12
 - @0xproject/asset-buyer@1.0.2
 - @0xproject/base-contract@3.0.0
 - @0xproject/connect@3.0.0
 - @0xproject/contract-wrappers@2.0.1
 - contracts@2.1.48
 - @0xproject/dev-utils@1.0.11
 - ethereum-types@1.0.9
 - @0xproject/fill-scenarios@1.0.6
 - @0xproject/json-schemas@1.0.5
 - @0xproject/metacoin@0.0.22
 - @0xproject/migrations@1.0.13
 - @0xproject/monorepo-scripts@1.0.10
 - @0xproject/order-utils@1.0.6
 - @0xproject/order-watcher@2.1.0
 - @0xproject/react-docs@1.0.12
 - @0xproject/react-shared@1.0.13
 - @0xproject/sol-compiler@1.1.6
 - @0xproject/sol-cov@2.1.6
 - @0xproject/sol-doc@1.0.1
 - @0xproject/sol-resolver@1.0.12
 - @0xproject/sra-report@1.0.12
 - @0xproject/sra-spec@1.0.5
 - @0xproject/subproviders@2.0.6
 - @0xproject/testnet-faucets@1.0.50
 - @0xproject/types@1.1.2
 - @0xproject/typescript-typings@3.0.0
 - @0xproject/utils@2.0.0
 - @0xproject/web3-wrapper@3.0.2
 - @0xproject/website@0.0.53
2018-09-28 19:16:07 +01:00
Fabio Berger
c354129b6f Updated CHANGELOGS 2018-09-28 19:15:38 +01:00
Fabio Berger
c7e26cd448 Un-nest the interface to fix the doc rendering 2018-09-28 18:59:28 +01:00
Fabio Berger
822b848dd7 Rename website yarn watch_without_deps to yarn dev 2018-09-28 18:44:34 +01:00
Fabio Berger
033340e304 Fix typo 2018-09-28 18:38:10 +01:00
Fabio Berger
9ae60d0abe Export class instead of function 2018-09-28 17:20:24 +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
fragosti
2471e10346 Have React setup with basic build working 2018-09-28 13:09:16 +02:00
Fabio Berger
ba7de7204d merge development 2018-09-28 12:08:12 +01:00
Fabio Berger
005a2e12ba Fix badge alignment 2018-09-28 11:33:30 +01:00
Fabio Berger
6dff24906e Fix network badges for V1 and add them for V2 2018-09-28 11:05:13 +01:00
Fabio Berger
398b292636 Add more basic types 2018-09-28 11:04:51 +01:00
Fabio Berger
545472a38f Fix section headers 2018-09-28 10:50:55 +01:00
Fabio Berger
28f5cd0641 Only add Stucts section if there are any 2018-09-28 10:30:24 +01:00
Fabio Berger
144561c53b Fix missing devdoc comments in output by fixing improper encoding of methodSignatures 2018-09-28 10:28:57 +01:00
Jacob Evans
a737cfa004 Merge pull request #1090 from 0xProject/bug/contract-wrappers/handle-revert-with-reason
[contract-wrappers] Test revert with reason when decoding call result
2018-09-28 00:21:15 +00:00
Jacob Evans
21f6072186 Handle revert with reason when decoding call result
We use in-process ganache which throws on an RPC error. This means all of our tests get a nice revert error thrown when testing against ganache. This is not possible with RPC providers and a revert with reason result is returned. Our callAsync doesn't handle this and attempts to decode the revert with reason error log as a successful log, which results in an error while decoding.

This only works with our fork of ethers https://github.com/ethers-io/ethers.js/pull/188 and will need to be re-worked when updating to Ethers.js 4
2018-09-28 09:59:58 +10:00
Alex Browne
94badedad4 Remove yarn postinstall hack (#1098) 2018-09-27 15:34:01 -07:00
Fabio Berger
8531f52456 Switch over remaining usage of sections.types for typeSectionName 2018-09-27 23:32:29 +01:00
Fabio Berger
092b184f45 Fix linter 2018-09-27 23:30:11 +01:00
Fabio Berger
b2ff7bda02 Explain cast to any 2018-09-27 23:24:05 +01:00
Fabio Berger
e0ff3484cf Improve switch case 2018-09-27 23:20:21 +01:00
Fabio Berger
95e84aae49 Improve comment 2018-09-27 23:18:32 +01:00
Fabio Berger
338b7d2ec0 Alphabetize 2018-09-27 23:16:55 +01:00
Fabio Berger
37ab789e84 Remove excessive type 2018-09-27 23:14:34 +01:00
Fabio Berger
957af23a64 Include structs section so that we can render struct params/return values properly with a popover 2018-09-27 23:02:12 +01:00
Fabio Berger
d4077ae970 Fix linter 2018-09-27 23:01:12 +01:00
Fabio Berger
17d4b467d4 Only show arguments if the params are named (i.e not generated getters) 2018-09-27 23:00:25 +01:00
Fabio Berger
ac878d8fdb Improve keys 2018-09-27 23:00:01 +01:00
Fabio Berger
ac04dbf7e4 Re-use interface component for rendering structs but label it differently 2018-09-27 19:50:02 +01:00
Fabio Berger
cfddea931d Make sure basic solidity types are colored orange 2018-09-27 19:49:07 +01:00
Fabio Berger
a6672e0190 Don't render colon for auto-generated getters 2018-09-27 19:43:10 +01:00
Fabio Berger
5347bf587f Render fallback functions better 2018-09-27 18:55:01 +01:00
Fabio Berger
63ffdb3895 Improve key 2018-09-27 18:52:51 +01:00
Fabio Berger
e7b1374f23 Fix dropdown menu item so it says "0x smart contracts" not "smart contract" 2018-09-27 18:52:37 +01:00
Fabio Berger
ceff5c9c2b Rename for clarity 2018-09-27 18:52:14 +01:00
Fabio Berger
dddfe8ae50 Add typeSectionName to docsInfo so we don't use hard-coded "Types" 2018-09-27 18:51:30 +01:00
Fabio Berger
c0498944c3 Add more robust key 2018-09-27 18:40:38 +01:00
Fabio Berger
5cc11912a7 Pull in only contracts we want rendered on the doc page 2018-09-27 18:39:27 +01:00
Leonid Logvinov
bf3795d2ac Merge pull request #1097 from 0xProject/feature/export-expiration-watcher
Export ExpirationWatcher from OrderWatcher
2018-09-27 12:53:36 +02:00
Leonid Logvinov
bc48bc99c3 Add PR number 2018-09-27 12:53:05 +02:00
Leonid Logvinov
51bfd1ca5e Export ExpirationWatcher from OrderWatcher 2018-09-27 12:48:48 +02:00
Leonid Logvinov
9160cd4983 Merge pull request #1069 from 0xProject/feature/ts-ethers
Upgrade to TS version of ethers
2018-09-27 12:47:00 +02:00
Fabio Berger
c55a419178 Split _genMethodDoc into it and _genFallbackDoc for clarity. Add isFallback boolean 2018-09-27 10:57:42 +01:00
Leonid Logvinov
63d79faa85 Fix linter errors 2018-09-27 11:51:11 +02:00
Fabio Berger
70e412e375 Merge pull request #1096 from 0xProject/fixIsValidECSignature
Add address normalization to isValidECSignature method
2018-09-27 10:29:18 +01:00
Leonid Logvinov
a51919db0e Remove ethers.js carret as it's a beta version 2018-09-27 11:24:03 +02:00
Leonid Logvinov
60971be35a Throw revert reasons from contract wrappers 2018-09-27 11:21:47 +02:00
Leonid Logvinov
cb99ebf78a Throw revert reasons from contract wrappers 2018-09-27 11:21:39 +02:00
Fabio Berger
6f02a3f40d Fix PR nr 2018-09-27 10:05:04 +01:00
Fabio Berger
0591f1d32a Add address normalization to isValidECSignature method 2018-09-27 10:03:54 +01:00
Fabio Berger
1402119c84 Remove RC version warnings 2018-09-26 22:48:30 +01:00
Francesco Agosti
a162281529 Merge pull request #1094 from 0xProject/feature/website/coinbase-wallet-portal-fixes-and-clay-title
[website] Use coinbase wallet instead of Toshi, fix portal layout, update Clay's title
2018-09-26 18:20:06 +02:00
F. Eugene Aumson
8c18a8fefc Merge pull request #1093 from feuGeneA/sol-doc-fixes
[sol-doc] fixes
2018-09-26 12:16:33 -04:00
fragosti
48f6452c3b remove items-center classname 2018-09-26 17:58:48 +02:00
fragosti
bd002caadd Change clay to Ecosystem Development Lead 2018-09-26 17:56:09 +02:00
fragosti
d6090921a8 Update everything to Coinbase Wallet instead of Toshi 2018-09-26 17:55:40 +02:00
Francesco Agosti
78a693e092 Merge pull request #1088 from 0xProject/fix/website/relayers-column
[website] When number of relayers is less than number of columns, reduce column…
2018-09-26 17:40:12 +02:00
F. Eugene Aumson
3f61d27656 fix: add bin file for sol-doc cli 2018-09-26 11:28:53 -04:00
F. Eugene Aumson
30525d15f4 Merge pull request #1004 from feuGeneA/sol-doc
[ethereum-types, react-docs, sol-compiler, sol-doc, types, typescript-typings, website] Add new Solidity documentation generation utility
2018-09-26 10:15:53 -04:00
Fabio Berger
f3ad64aa1c Move more text over to translation files 2018-09-26 14:52:58 +01:00
Francesco Agosti
c429409ed7 Merge pull request #1091 from 0xProject/feature/sra-spec/order-config-to-post-and-other-bugs
[connect][sra-spec] Update sra-spec and connect to have /order_config be a POST and other small improvements
2018-09-26 15:34:26 +02:00
F. Eugene Aumson
2bdaa58d71 fix: use latest versions of @0xproject packages 2018-09-26 09:22:06 -04:00
F. Eugene Aumson
75826fd559 Merge remote-tracking branch 'upstream/development' into sol-doc 2018-09-26 09:19:02 -04:00
F. Eugene Aumson
0ce6f03ed5 fix: disable tslint max-file-line-count...
before, tslint was saying "ERROR:
/home/gene/0x-monorepo/packages/types/src/index.ts[598, 2]: This file
has 599 lines, which exceeds the maximum of 500 lines allowed. Consider
breaking this file up into smaller parts."

https://github.com/0xProject/0x-monorepo/pull/1004#issuecomment-424704651
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-26 09:14:28 -04:00
Leonid Logvinov
5d73eebf6a Merge branch 'development' into feature/ts-ethers 2018-09-26 14:55:52 +02:00
Fabio Berger
13aa98f0f3 Merge pull request #1092 from 0xProject/addFlagToPublishReleases
Add Flag to publish releases command-line tool
2018-09-26 13:50:08 +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
4a94f8b1ca Merge branch 'development' into addFlagToPublishReleases
* development:
  Add weijie and rahul
  Change news link
2018-09-26 13:18:20 +01:00
Fabio Berger
f8532b3f51 Typo 2018-09-26 13:15:42 +01:00
Fabio Berger
b244f3e2c0 Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Add weijie and rahul
  Change news link
2018-09-26 13:14:23 +01:00
Fabio Berger
f33ecfd2fc Support passing in package names into publish_release_notes command-line for when publishing must be done manually 2018-09-26 13:11:12 +01:00
fragosti
f15751d800 Add to changelog 2018-09-26 14:06:53 +02:00
fragosti
e5e439adb9 Change /order_config endpoint to POST 2018-09-26 14:01:51 +02:00
fragosti
2d8f423cee Update examples 2018-09-26 13:57:41 +02:00
fragosti
5905fdb73b Fix erroneous ERC721 proxy id 2018-09-26 13:22:39 +02:00
fragosti
4ed9323804 Fix development flow 2018-09-26 13:19:01 +02:00
Francesco Agosti
d77c6e13b0 Merge pull request #1089 from 0xProject/feature/website/new-hires-sept-v2-announcement
[website] new hires and 0x v2 news link
2018-09-25 23:04:12 +02:00
fragosti
4e10f2c6f2 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/new-hires-sept-v2-announcement 2018-09-25 23:02:33 +02:00
F. Eugene Aumson
d3edb9721c Merge remote-tracking branch 'upstream/development' into sol-doc 2018-09-25 16:34:44 -04:00
Fabio Berger
1b35a6e3b5 Publish
- 0x.js@1.0.6
 - @0xproject/abi-gen@1.0.11
 - @0xproject/assert@1.0.11
 - @0xproject/asset-buyer@1.0.1
 - @0xproject/base-contract@2.0.5
 - @0xproject/connect@2.0.4
 - @0xproject/contract-wrappers@2.0.0
 - contracts@2.1.47
 - @0xproject/dev-utils@1.0.10
 - ethereum-types@1.0.8
 - @0xproject/fill-scenarios@1.0.5
 - @0xproject/json-schemas@1.0.4
 - @0xproject/metacoin@0.0.21
 - @0xproject/migrations@1.0.12
 - @0xproject/order-utils@1.0.5
 - @0xproject/order-watcher@2.0.0
 - @0xproject/react-docs@1.0.11
 - @0xproject/react-shared@1.0.12
 - @0xproject/sol-compiler@1.1.5
 - @0xproject/sol-cov@2.1.5
 - @0xproject/sol-resolver@1.0.11
 - @0xproject/sra-report@1.0.11
 - @0xproject/sra-spec@1.0.4
 - @0xproject/subproviders@2.0.5
 - @0xproject/testnet-faucets@1.0.49
 - @0xproject/types@1.1.1
 - @0xproject/typescript-typings@2.0.2
 - @0xproject/utils@1.0.11
 - @0xproject/web3-wrapper@3.0.1
 - @0xproject/website@0.0.52
2018-09-25 21:34:14 +01:00
Fabio Berger
900a8aee76 Updated CHANGELOGS 2018-09-25 21:33:55 +01:00
F. Eugene Aumson
de9f5d350f fix: call out a HACK in comments
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r220010054
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 16:31:40 -04:00
F. Eugene Aumson
e45f0b0eaf fix: update smart contract doc intros
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r220009790
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r220009909
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 16:31:40 -04:00
F. Eugene Aumson
2e7b218f40 fix: comments
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219990314
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r220007992
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 16:31:40 -04:00
F. Eugene Aumson
7fbfd9ccd9 fix: print error and exit process; don't re-throw
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219979003
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 16:31:40 -04:00
F. Eugene Aumson
1db5ff617f fix: split line for readability
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219978696
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 16:31:40 -04:00
F. Eugene Aumson
ac5376a1ca fix: rename JSON_TABWIDTH to JSON_TAB_WIDTH
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219977842
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 16:31:39 -04:00
F. Eugene Aumson
600ffd93a6 fix: use latest versions of @0xproject packages
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219977747
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 16:31:26 -04:00
fragosti
22597674d2 Add weijie and rahul 2018-09-25 22:29:16 +02:00
Fabio Berger
adf5acd5c4 Update yarn.lock 2018-09-25 21:23:06 +01:00
fragosti
055bcb52f8 Change news link 2018-09-25 22:04:12 +02:00
F. Eugene Aumson
6174267f69 fix: explain why tslint rule is disabled
https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219976511
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 15:51:32 -04:00
F. Eugene Aumson
e8c8d3e722 fix: rename SupportedDocJson field to SolDoc
from Solidity

https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219976199
https://github.com/0xProject/0x-monorepo/pull/1004
2018-09-25 15:51:03 -04:00
Brandon Millman
d20f713fad When number of relayers is less than number of columns, reduce column number to number of relayers 2018-09-25 21:08:32 +02:00
Fabio Berger
b40861747b Properly render function generic types that don't extend another type 2018-09-25 17:34:22 +01:00
Fabio Berger
b73df28454 Merge pull request #1087 from 0xProject/addTxHashToOrderState
Add transactionHash to OrderState and emit it from OrderWatcher
2018-09-25 16:37:24 +01:00
Fabio Berger
5afc739397 Add changelog entry 2018-09-25 16:37:08 +01:00
Fabio Berger
9eecf3683b Add transactionHash to OrderState and emit it from OrderWatcher subscription 2018-09-25 16:10:13 +01:00
Fabio Berger
7570f3db51 Merge pull request #1080 from 0xProject/upgradeBlockstream
Fix dropped events issue in Order-watcher and Contract-wrappers subscriptions
2018-09-25 14:59:37 +01:00
fragosti
04dd4ce6d1 Add to CHANGELOG 2018-09-25 14:10:38 +02:00
Fabio Berger
977d55c61b merge development 2018-09-25 13:07:14 +01:00
fragosti
ebe731ea86 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/asset-buyer/improve-asset-buyer-manager 2018-09-25 14:06:07 +02:00
fragosti
b853f04972 Make package public again, but add warning 2018-09-25 14:01:16 +02:00
fragosti
49cdd85b1d Add AssetBuyerManager to README 2018-09-25 13:58:48 +02:00
fragosti
47f8b5d6fc Use options object convention everywhere, and make package private 2018-09-25 13:55:07 +02:00
Leonid Logvinov
78ef98c27c Publish
- 0x.js@1.0.5
 - @0xproject/abi-gen@1.0.10
 - @0xproject/assert@1.0.10
 - @0xproject/asset-buyer@1.0.0
 - @0xproject/base-contract@2.0.4
 - @0xproject/connect@2.0.3
 - @0xproject/contract-wrappers@1.0.5
 - contracts@2.1.46
 - @0xproject/dev-utils@1.0.9
 - @0xproject/fill-scenarios@1.0.4
 - @0xproject/json-schemas@1.0.3
 - @0xproject/metacoin@0.0.20
 - @0xproject/migrations@1.0.11
 - @0xproject/order-utils@1.0.4
 - @0xproject/order-watcher@1.0.5
 - @0xproject/react-docs@1.0.10
 - @0xproject/react-shared@1.0.11
 - @0xproject/sol-compiler@1.1.4
 - @0xproject/sol-cov@2.1.4
 - @0xproject/sol-resolver@1.0.10
 - @0xproject/sra-report@1.0.10
 - @0xproject/sra-spec@1.0.3
 - @0xproject/subproviders@2.0.4
 - @0xproject/testnet-faucets@1.0.48
 - @0xproject/types@1.1.0
 - @0xproject/utils@1.0.10
 - @0xproject/web3-wrapper@3.0.0
 - @0xproject/website@0.0.51
2018-09-25 13:48:55 +02:00
Leonid Logvinov
411813d8d9 Updated CHANGELOGS 2018-09-25 13:48:44 +02:00
Leonid Logvinov
64f41259eb Merge pull request #1085 from 0xProject/feature/export-sra-types
[sra-types] Move SRA types from @0xproject/connect to @0xproject/types
2018-09-25 13:36:47 +02:00
Fabio Berger
fc3acec669 Fix lint issues 2018-09-25 12:32:20 +01:00
Leonid Logvinov
b85db17e75 Move SRA types from @0xproject/connect to @0xproject/sra-types 2018-09-25 13:12:12 +02:00
Fabio Berger
a05530f821 Fix prettier 2018-09-25 12:06:37 +01:00
Fabio Berger
173b36c54c Fix prettier 2018-09-25 12:06:28 +01:00
Fabio Berger
55ca971186 Decode logs received from blockstream 2018-09-25 12:05:44 +01:00
Fabio Berger
284930eb58 Add missing type 2018-09-25 11:30:27 +01:00
Fabio Berger
902691e289 Update changelogs 2018-09-25 11:29:36 +01:00
Fabio Berger
0afe55f2ff Refactor blockstream integration to use the proper callback method interface 2018-09-25 11:20:09 +01:00
Fabio Berger
21910a7129 Add entry about newly exposed method 2018-09-25 11:02:49 +01:00
Fabio Berger
9c89d1e99b Expose method to send raw JSON RPC payloads 2018-09-25 10:45:11 +01:00
Alex Browne
408f573188 Use the 0xorg DockerHub account instead of albrow (#1084) 2018-09-24 14:31:26 -07:00
F. Eugene Aumson
574270d061 fix: increase mocha timeout value
prior CI runs were failing because of this.
2018-09-24 17:17:28 -04:00
F. Eugene Aumson
9af5e3ba8e fix: add CHANGELOG.json 2018-09-24 17:17:19 -04:00
fragosti
89033e01e8 Provide convenience methods on AssetBuyerManager 2018-09-24 23:14:07 +02:00
Alex Browne
6f2ab23bd0 Feature/custom verdaccio dockerfile (#1083)
Create custom verdaccio docker image
2018-09-24 13:54:25 -07:00
fragosti
264b25c58d Rename StandardRelayerAPIAssetBuyerManager to just AssetBuyerManager and generalize it 2018-09-24 22:21:25 +02:00
F. Eugene Aumson
2116548eed Merge remote-tracking branch 'upstream/development' into sol-doc 2018-09-24 13:30:37 -04:00
F. Eugene Aumson
57fca16d7b fix: use contract name for constructor method name
and for its return value
2018-09-24 13:24:03 -04:00
F. Eugene Aumson
a900255820 fix: document indexed event arguments 2018-09-24 13:05:35 -04:00
F. Eugene Aumson
bd7565ceda fix: save v1 contract doc/deploy commands
For posterity, save commands needed to use sol-doc to generate and
deploy documentation objects for v1 contracts.
2018-09-24 12:36:26 -04:00
F. Eugene Aumson
880cd6e440 fix: document return value's type, not its name 2018-09-24 12:29:02 -04:00
Francesco Agosti
b830c28d83 Merge pull request #1037 from 0xProject/feature/forwarder-helper/sra-and-rpc
[asset-buyer] Create new AssetBuyer class
2018-09-24 17:47:59 +02:00
Francesco Agosti
4a316571ff Merge pull request #1073 from 0xProject/fix/website/signing-order-validation-bug
[website] Fix order creation and fill flow in Portal
2018-09-24 17:23:13 +02:00
Fabio Berger
5e1a2bd972 Merge development 2018-09-24 15:53:34 +01:00
Fabio Berger
fc33eacd2c Merge pull request #1082 from 0xProject/fixGetBlocks
Fix block fetch error if block not found
2018-09-24 15:49:58 +01:00
fragosti
748a8a8ae3 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into fix/website/signing-order-validation-bug 2018-09-24 16:48:47 +02:00
Fabio Berger
7516959c9f Add comments for clarity 2018-09-24 15:14:14 +01:00
Fabio Berger
311b925919 Add to doc comment why a block might not be returned to the caller 2018-09-24 15:14:07 +01:00
Fabio Berger
5d88a56452 Add PR nr 2018-09-24 15:11:29 +01:00
Fabio Berger
ebddf82819 Add CHANGELOG entry for change to getBlockAsync 2018-09-24 15:02:47 +01:00
Fabio Berger
d0448c2bbd Fix bug where if block wasn't found, getBlockAsync would throw. Now it returns undefined 2018-09-24 15:02:06 +01:00
fragosti
d8d1c98a40 Upgrade all deps 2018-09-24 15:53:34 +02:00
fragosti
f49b231e91 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/forwarder-helper/sra-and-rpc 2018-09-24 15:45:06 +02:00
fragosti
7a43e19116 Improve README 2018-09-24 15:43:02 +02:00
fragosti
e4b664bafa Add expiry buffer 2018-09-24 13:17:38 +02:00
F. Eugene Aumson
98d06d6d25 BREAKING CHANGE: document contracts from sol-doc
Change website to accept smart contract documentation in the format
generated by sol-doc rather than that generated by Doxity.
2018-09-22 11:29:27 -04:00
F. Eugene Aumson
9f0dfb1e1a feat: make sol-doc only document what's requested
if a list of contracts-to-document is passed into sol-doc, then the
output should only contain documentation for the contracts requested.

if an empty/undefined list is passed, then it should document all
contracts that were found.
2018-09-22 10:55:46 -04:00
F. Eugene Aumson
37cb18e1da fix: rename variable 2018-09-22 10:21:27 -04:00
F. Eugene Aumson
3e5d427d4e feat: add sol-doc command-line interface
modified sol-compiler to output progress/warning/error/etc messages to
stderr rather than stdout, so that sol-doc can put its output (and
nothing else) to stdout.

for posterity, added sol-doc cli usage as npm scripts to package.json.
2018-09-22 10:14:49 -04:00
Fabio Berger
8bce407aec Add order-utils to README list 2018-09-21 17:36:05 +01:00
fragosti
7a5376621f Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/forwarder-helper/sra-and-rpc 2018-09-21 17:20:48 +02:00
Leonid Logvinov
29f6adc2ed Publish
- 0x.js@1.0.4
 - @0xproject/abi-gen@1.0.9
 - @0xproject/assert@1.0.9
 - @0xproject/base-contract@2.0.3
 - @0xproject/connect@2.0.2
 - @0xproject/contract-wrappers@1.0.4
 - contracts@2.1.45
 - @0xproject/dev-utils@1.0.8
 - ethereum-types@1.0.7
 - @0xproject/fill-scenarios@1.0.3
 - @0xproject/forwarder-helper@1.0.4
 - @0xproject/json-schemas@1.0.2
 - @0xproject/metacoin@0.0.19
 - @0xproject/migrations@1.0.10
 - @0xproject/monorepo-scripts@1.0.9
 - @0xproject/order-utils@1.0.3
 - @0xproject/order-watcher@1.0.4
 - @0xproject/react-docs@1.0.9
 - @0xproject/react-shared@1.0.10
 - @0xproject/sol-compiler@1.1.3
 - @0xproject/sol-cov@2.1.3
 - @0xproject/sol-resolver@1.0.9
 - @0xproject/sra-report@1.0.9
 - @0xproject/sra-spec@1.0.2
 - @0xproject/subproviders@2.0.3
 - @0xproject/testnet-faucets@1.0.47
 - @0xproject/types@1.0.2
 - @0xproject/typescript-typings@2.0.1
 - @0xproject/utils@1.0.9
 - @0xproject/web3-wrapper@2.0.3
 - @0xproject/website@0.0.50
2018-09-21 16:59:27 +02:00
Leonid Logvinov
5446de6308 Updated CHANGELOGS 2018-09-21 16:59:16 +02:00
fragosti
5e84e9689f Small typos 2018-09-21 16:53:18 +02:00
Leonid Logvinov
9540db2aad Merge pull request #1081 from 0xProject/fix/node-types-unpin
Don't depend on a specific version of node types
2018-09-21 16:45:03 +02:00
Leonid Logvinov
7dd28d6fab Don't depend on a specific version of node types 2018-09-21 16:37:20 +02:00
fragosti
1bfaefb240 Add order provider response validation 2018-09-21 16:24:45 +02:00
fragosti
c48cf3ab3b Make asset buyer map private 2018-09-21 16:03:47 +02:00
fragosti
c64dcec772 More renaming 2018-09-21 15:58:04 +02:00
Fabio Berger
45dc2be083 Fix prettier 2018-09-21 14:53:25 +01:00
Fabio Berger
31f6fc065f Add changelog entries 2018-09-21 14:24:50 +01:00
fragosti
8dea48ebef Renamed orderFetcherResponseProcessor to orderProviderResponseProcessoer 2018-09-21 15:21:44 +02:00
fragosti
97150cf55f Add labels to TODOs 2018-09-21 14:56:54 +02:00
Fabio Berger
b0484eafe3 Upgrade blockstream to version that supports fetching logs by blockHash, fixing reliability issues 2018-09-21 13:46:10 +01:00
Fabio Berger
1b799e98e8 Add blockHash to FilterObject now that EIP234 is supported 2018-09-21 13:45:06 +01:00
Fabio Berger
e6840c60c7 Add assertion that one cannot specify both blockHash & fromBlock/toBlock to getLogsAsync 2018-09-21 13:43:06 +01:00
Fabio Berger
ba59879e7f Merge pull request #1079 from 0xProject/fixAwaitTxMined
Fix awaitTransactionMinedAsync for new Parity version
2018-09-21 11:36:58 +01:00
Leonid Logvinov
f3deabccf4 Add CHANGELOG entries 2018-09-21 12:10:25 +02:00
Leonid Logvinov
393f9e5a29 Fix the way we detect BN's 2018-09-21 12:05:13 +02:00
Fabio Berger
c10807c4e3 Add PR number 2018-09-21 11:04:30 +01:00
Fabio Berger
4e8ec2359d Also make sure the transactionReceipt contains a blockNumber when checking if a transaction has been mined. 2018-09-21 10:56:31 +01:00
Leonid Logvinov
79cf6969f9 Fix linter issue 2018-09-21 11:48:06 +02:00
Leonid Logvinov
3167bfde1a Remove unused import 2018-09-21 11:47:30 +02:00
Fabio Berger
cbd72b6e3d Merge pull request #1077 from PhABC/patch-1
[ethereum-types] Add BigNumber[] in ContractEventArg Type Definition
2018-09-21 00:01:25 +01:00
fragosti
fcca63a2dc Move some logic to order utils 2018-09-20 23:39:55 +02:00
Philippe Castonguay
90e28220fa Set ContractEventArg type definition to any 2018-09-20 16:19:08 -04:00
fragosti
35c324f67c Add utility to get assetDatas 2018-09-20 19:00:23 +02:00
F. Eugene Aumson
301e491952 Merge remote-tracking branch 'upstream/development' into sol-doc 2018-09-20 12:51:30 -04:00
fragosti
03e18ff7c6 Rename OrderFetcher to OrderProvider and other small improvements 2018-09-20 15:10:15 +02:00
fragosti
d23487bda9 Update descriptions for methods on AssetBuyer 2018-09-20 14:27:20 +02:00
fragosti
3238925aa4 Add better description to README 2018-09-20 14:09:11 +02:00
Philippe Castonguay
abd308455a Add BigNumber[] support in ContractEventArg
Currently, my contract has events that take a BigNumber array and typescript complains that ContractEventArg does not support this.
2018-09-19 20:17:00 -04:00
fragosti
a44f77a838 Implement StandardRelayerAPIAssetBuyerManager 2018-09-19 18:38:50 +02:00
Leonid Logvinov
5b6c91bb3f Fixes for the breaking changes in ethers 2018-09-19 17:56:23 +02:00
Leonid Logvinov
6701ec68bd Upgrade contract_templates to work with ethers 4.0 2018-09-19 17:56:23 +02:00
Leonid Logvinov
7b259c3f4c Remove types for ethers.js 2018-09-19 17:56:23 +02:00
Leonid Logvinov
ecbdf5f12b Upgrade to TS version of ethers 2018-09-19 17:56:23 +02:00
Fabio Berger
3e70ab015b Publish
- 0x.js@1.0.3
 - @0xproject/connect@2.0.1
 - @0xproject/contract-wrappers@1.0.3
 - contracts@2.1.44
 - @0xproject/fill-scenarios@1.0.2
 - @0xproject/forwarder-helper@1.0.3
 - @0xproject/migrations@1.0.9
 - @0xproject/order-utils@1.0.2
 - @0xproject/order-watcher@1.0.3
 - @0xproject/testnet-faucets@1.0.46
 - @0xproject/website@0.0.49
2018-09-19 16:13:24 +01:00
Fabio Berger
dab7f1a739 Updated CHANGELOGS 2018-09-19 16:13:15 +01:00
Fabio Berger
f6438725eb Update changelog entries 2018-09-19 15:59:17 +01:00
fragosti
a03b1d4d6c Move ObjectMap to shared types 2018-09-19 16:48:57 +02:00
fragosti
14345ab24e Rename forceOrderRefresh to shouldForceOrderRefresh 2018-09-19 16:02:52 +02:00
fragosti
60e2dfdbda Calculate min and max rates in buy quote 2018-09-19 15:58:30 +02:00
Fabio Berger
83ffbd05be Merge pull request #1074 from 0xProject/reduceBundleSizes
Reduce published packages bundle sizes
2018-09-19 14:50:01 +01:00
Fabio Berger
88be6b5e0d Add back in evm.bytecode.object since it's needed to generate contract-wrappers 2018-09-19 13:55:09 +01:00
Fabio Berger
aa47f85f48 Make higher-order packages copy over trimmed down artifacts 2018-09-19 12:57:45 +01:00
Fabio Berger
fec9c8f1c6 Create trimmed artifacts of v2 contracts 2018-09-19 12:53:00 +01:00
fragosti
93f7e33f6a Add isValidPercentage assert 2018-09-19 00:57:05 +02:00
fragosti
fd4b4f8f82 Make ForwaderWrapper take in a number for feePercentage instead of BigNumber 2018-09-18 23:56:07 +02:00
fragosti
0003666050 make the slippage percentage customizable by integrator 2018-09-18 16:42:52 +02:00
fragosti
b947609ff1 Restrict orders field of AssetBuyerOrdersAndFillableAmounts to SignedOrder for consistency 2018-09-18 16:26:50 +02:00
fragosti
38afd108f8 Fix order expired bug 2018-09-18 16:07:47 +02:00
fragosti
65f709d50a Move all constants to own file 2018-09-18 16:07:08 +02:00
fragosti
f5dbf212e3 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/forwarder-helper/sra-and-rpc 2018-09-18 15:58:47 +02:00
fragosti
f6e1bf78c8 Add yarn.lock 2018-09-18 14:33:47 +02:00
fragosti
950f279508 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into fix/website/signing-order-validation-bug 2018-09-18 14:15:31 +02:00
fragosti
e46807c28b Fix order creation and fill flow in Portal 2018-09-18 13:55:31 +02:00
Fabio Berger
e2559798df Publish
- 0x.js@1.0.2
 - @0xproject/contract-wrappers@1.0.2
 - @0xproject/forwarder-helper@1.0.2
 - @0xproject/migrations@1.0.8
 - @0xproject/order-watcher@1.0.2
 - @0xproject/testnet-faucets@1.0.45
 - @0xproject/website@0.0.48
2018-09-18 11:18:28 +01:00
Fabio Berger
ccc18620bf Updated CHANGELOGS 2018-09-18 11:18:19 +01:00
Fabio Berger
febe00db4f Merge pull request #1072 from 0xProject/addMissingEtherTokenConfig
Add missing mainnet addresses to ZRXToken & WETH artifacts
2018-09-18 11:05:28 +01:00
Fabio Berger
6f36048a8e Add CHANGELOG entries about bug fix 2018-09-18 10:43:18 +01:00
Fabio Berger
2457ecb7e7 Add missing mainnet addresses to ZRXToken & WETH artifacts 2018-09-18 10:29:27 +01:00
F. Eugene Aumson
30622631ff use Array.join rather than string concatenation 2018-09-17 19:31:47 -04:00
F. Eugene Aumson
4bab402e95 doc constructors as returning a Reference...
...not an Intrinsic
2018-09-17 19:31:45 -04:00
F. Eugene Aumson
91de15d50e remove stale comments 2018-09-17 19:31:42 -04:00
F. Eugene Aumson
d40a670d0b add newline to delimit interface declaration 2018-09-17 19:31:40 -04:00
F. Eugene Aumson
4ade674ada test multiple return values from a solidity method 2018-09-17 19:31:37 -04:00
F. Eugene Aumson
401ef2edef minorly tweak comments 2018-09-17 19:31:34 -04:00
F. Eugene Aumson
9201273939 add and test support for return comment 2018-09-17 19:31:32 -04:00
F. Eugene Aumson
5b07669bd0 add and test support for fallback functions 2018-09-17 19:31:30 -04:00
F. Eugene Aumson
3c7155afb0 test all the natspec stuff we use in our contracts 2018-09-17 19:31:23 -04:00
Jacob Evans
2378747570 Merge pull request #1063 from 0xProject/feature/0x.js/update-readme-import
0xjs README/website docs update
2018-09-17 23:59:27 +02:00
F. Eugene Aumson
a75981da14 test w/&w/out devdoc content in contract 2018-09-17 17:49:14 -04:00
F. Eugene Aumson
d5f964b58e test w/&w/out passing in contractsToCompile 2018-09-17 17:49:03 -04:00
Jacob Evans
2df569b727 Folder 1.0.0 -> 1.0.1 2018-09-17 21:33:50 +00:00
Jacob Evans
65aecc0024 Rename to v1->v0 v2->v1 2018-09-17 23:23:27 +02: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
074082ec94 Fix forwarder package.json 2018-09-17 12:53:05 +01:00
Fabio Berger
6b9f0af828 Add 0x.js 2.0.0 async and installation sections 2018-09-17 12:52:25 +01:00
Fabio Berger
bfabf765e3 Update decoration error 2018-09-17 12:52:12 +01:00
Fabio Berger
e74f736eff Update 0x.js README 2018-09-17 12:52:04 +01:00
Fabio Berger
45483557a5 Remove doc commands from forwarder-helper package for now 2018-09-17 12:45:27 +01:00
Brandon Millman
a22d2dc7ee Add factory method for specific assetData to buy and add comments 2018-09-15 15:05:27 +02:00
Brandon Millman
9ec2b5a2d5 Add factory method on AssetBuyer for specific token address 2018-09-15 14:53:04 +02:00
Brandon Millman
af40989f5f Add factory method on AssetBuyer for provided orders 2018-09-15 14:47:44 +02:00
Brandon Millman
d57619b5db Export the order fetchers 2018-09-15 14:16:08 +02:00
Brandon Millman
c692115cdc Fix lint errors 2018-09-15 14:14:55 +02:00
Brandon Millman
dfe58e4975 Delete old test 2018-09-15 14:14:55 +02:00
Brandon Millman
4e59be9afc Implement ProvidedOrderFetcher 2018-09-15 14:14:55 +02:00
Brandon Millman
190bf2599c Implement StandardRelayerAPIOrderFetcher 2018-09-15 14:14:55 +02:00
Brandon Millman
f1a22e9bd7 Flesh out the AssetBuyer class 2018-09-15 14:14:48 +02:00
Brandon Millman
7b46cef83d Create initial AssetBuyer class 2018-09-15 14:14:48 +02:00
Brandon Millman
8da7d39998 Update readme, changelog, and package.json with rename 2018-09-15 14:14:48 +02:00
Brandon Millman
91702bbae2 Move packages/forwarder-helper into packages/asset-buyer 2018-09-15 14:14:48 +02:00
Brandon Millman
90674d9038 Various clean up 2018-09-15 14:14:48 +02:00
Brandon Millman
c0a14a4a41 Catch standard relayer api errors 2018-09-15 14:14:48 +02:00
Brandon Millman
8d6132736b Remove taker address as param and filter out non-open orders 2018-09-15 14:14:48 +02:00
Brandon Millman
8687b9533c Add getForwarderHelperForMakerAssetDataAsync method to forwarderHelperFactory 2018-09-15 14:14:48 +02:00
Alex Browne
07942a7aec Merge pull request #1061 from 0xProject/feature/ci-resource-classes
Bump CircleCI resource class for build and test-publish
2018-09-13 14:49:11 +02:00
Jacob Evans
3d1b7c10e8 Remove note about RC versions 2018-09-13 14:32:46 +02:00
Jacob Evans
cf46d2c704 0xjs README/website docs update 2018-09-13 13:58:05 +02:00
Alex Browne
4434856add Bump CircleCI resource class for build and test-publish 2018-09-12 17:23:11 +02:00
fragosti
52d511df21 Change Davids description 2018-09-12 11:53:11 +02:00
fragosti
50f58f9121 Add images for David Sacks and Gene 2018-09-12 11:48:03 +02:00
fragosti
7a20c7b946 Fix David Sacks links 2018-09-12 11:46:42 +02:00
fragosti
ce0e60ed84 Merge branch 'feature/website/add-gene' into development 2018-09-12 11:43:16 +02:00
fragosti
4ad0a6c7b7 Add david sacks 2018-09-12 11:42:58 +02:00
fragosti
b8d8651e43 Add Gene info to website 2018-09-12 11:16:13 +02:00
F. Eugene Aumson
cbb5a425df Merge branch 'development' into sol-doc 2018-09-11 19:00:11 -04:00
Francesco Agosti
45b68832aa Merge pull request #1064 from 0xProject/patch/website/new-token-addresses
[website] Fix minting for new tokens on testnets
2018-09-07 16:12:50 +02:00
fragosti
6dfcaaf889 Clear localstorage 2018-09-07 13:12:53 +02:00
fragosti
8131c5d6bc Fix minting for new tokens on testnets 2018-09-07 13:05:11 +02:00
Amir Bandeali
df5779b6d1 Link bug bounty section to wiki 2018-09-05 12:10:39 -07:00
Amir Bandeali
4a5a0c8c78 Update README with directory structure and bug bounty 2018-09-05 11:37:48 -07:00
Jacob Evans
b3a17624c8 Merge pull request #1060 from 0xProject/feature/testnet-faucets/v2
[testnet-faucets] update to v2
2018-09-05 18:33:50 +01:00
Jacob Evans
e63841a604 Check token exists for network for user params 2018-09-05 18:11:57 +01:00
Jacob Evans
7ec95e8c29 Remove unused name and symbol 2018-09-05 16:04:52 +01:00
Jacob Evans
b217495465 Floor expiration time 2018-09-05 15:57:40 +01:00
Jacob Evans
db6ddc0c4b [testnet-faucets] update to v2 2018-09-05 15:13:21 +01:00
Fabio Berger
174b360593 Publish
- 0x.js@1.0.1
 - @0xproject/abi-gen@1.0.8
 - @0xproject/assert@1.0.8
 - @0xproject/base-contract@2.0.2
 - @0xproject/connect@2.0.0
 - @0xproject/contract-wrappers@1.0.1
 - contracts@2.1.43
 - @0xproject/dev-utils@1.0.7
 - ethereum-types@1.0.6
 - @0xproject/fill-scenarios@1.0.1
 - @0xproject/forwarder-helper@1.0.1
 - @0xproject/json-schemas@1.0.1
 - @0xproject/metacoin@0.0.18
 - @0xproject/migrations@1.0.7
 - @0xproject/monorepo-scripts@1.0.8
 - @0xproject/order-utils@1.0.1
 - @0xproject/order-watcher@1.0.1
 - @0xproject/react-docs@1.0.8
 - @0xproject/react-shared@1.0.9
 - @0xproject/sol-compiler@1.1.2
 - @0xproject/sol-cov@2.1.2
 - @0xproject/sol-resolver@1.0.8
 - @0xproject/sra-report@1.0.8
 - @0xproject/sra-spec@1.0.1
 - @0xproject/subproviders@2.0.2
 - @0xproject/testnet-faucets@1.0.44
 - @0xproject/tslint-config@1.0.7
 - @0xproject/types@1.0.1
 - @0xproject/typescript-typings@2.0.0
 - @0xproject/utils@1.0.8
 - @0xproject/web3-wrapper@2.0.2
 - @0xproject/website@0.0.47
2018-09-05 11:16:45 +01:00
Fabio Berger
481a752e70 Updated CHANGELOGS 2018-09-05 11:16:34 +01:00
Fabio Berger
38acdfd632 Update CHANGELOG's to publish non-RC versions 2018-09-05 11:06:11 +01:00
Francesco Agosti
561e525778 Merge pull request #1058 from 0xProject/fix/connect/use-big-number-in-requests
[connect] Use BigNumber instead of string where appropriate in OrderConfigRequest
2018-09-04 17:25:51 -07:00
fragosti
69eb820d0d Change orderConfig from POST to GET like in spec 2018-09-04 15:49:30 -07:00
Alex Browne
447f16fc4f Merge pull request #1057 from 0xProject/deployment/copy-testnet-artifacts
Remove/rename/update all artifacts in preparation for v2 launch
2018-09-04 18:31:48 -04:00
Alex Browne
1769609245 Update order-watcher/package.json 2018-09-04 18:17:51 -04:00
Alex Browne
e1dcdac1bb add packages/sol-cov/test/fixtures/artifacts to .prettierignore 2018-09-04 18:14:59 -04:00
Alex Browne
9d45d19c80 More small artifacts updates/changes 2018-09-04 18:10:23 -04:00
Alex Browne
9858bb0ce4 Fix bug in contracts tests 2018-09-04 18:10:13 -04:00
fragosti
a3527a77a6 Add to CHANGELOG 2018-09-04 14:49:39 -07:00
fragosti
33a45fa739 Use BigNumber instead of string where appropriate in OrderConfigRequest 2018-09-04 14:44:56 -07:00
Alex Browne
e70882a657 More small chnages/bug fixes 2018-09-04 17:22:22 -04:00
Alex Browne
e456332da7 Rename and update some artifact locations 2018-09-04 16:47:28 -04:00
Alex Browne
4ed84c5dc5 Rename 2.0.0-beta-testnet to 2.0.0-testnet 2018-09-04 16:11:17 -04:00
Alex Browne
2fe3f40be9 Add missing testnet addresses to 2.0.0-mainnet artifacts 2018-09-04 16:09:59 -04:00
Alex Browne
44bfdb718f Copy artifacts from 2.0.0-beta-testnet that do not appear in 2.0.0-mainnet 2018-09-04 16:09:44 -04:00
Alex Browne
3524efc41c Merge pull request #1055 from 0xProject/deployment/2.0.0-beta-testnet/ropsten
Ropsten/Kovan Contract deployment
2018-09-04 15:54:48 -04:00
Francesco Agosti
01210c291c Merge pull request #1044 from 0xProject/feature/website/update-portal-v2
[website] Update portal for v2
2018-09-04 12:37:53 -07:00
Jacob Evans
192d4b4dbf Merge branch 'deployment/2.0.0-beta-testnet/ropsten' of github.com:0xProject/0x-monorepo into deployment/2.0.0-beta-testnet/ropsten 2018-09-04 20:32:43 +01:00
Jacob Evans
68246fc335 Revert Forwarder address for Ganache 2018-09-04 20:29:01 +01:00
Fabio Berger
7ef86636aa merge development 2018-09-04 20:26:02 +01:00
Fabio Berger
a5859c6cee Merge pull request #1038 from 0xProject/feature/contracts/mainnetMigrations
Mainnet migrations
2018-09-04 20:23:48 +01:00
Fabio Berger
3463903d02 Merge branch 'deployment/2.0.0-beta-testnet/ropsten' of github.com:0xProject/0x-monorepo into deployment/2.0.0-beta-testnet/ropsten
* 'deployment/2.0.0-beta-testnet/ropsten' of github.com:0xProject/0x-monorepo:
  Revert the exchange address change
  Tslint magic-number
2018-09-04 20:22:32 +01:00
Jacob Evans
4b0f1a8431 Remove Rinkeby from Exchange.json 2018-09-04 20:21:50 +01:00
Jacob Evans
603e8aa671 Revert the exchange address change 2018-09-04 20:18:23 +01:00
fragosti
6eb980abe2 Add to changelog 2018-09-04 12:11:17 -07:00
fragosti
46b168e10f Run linter 2018-09-04 12:09:24 -07:00
Jacob Evans
508e6ccf89 Tslint magic-number 2018-09-04 19:57:05 +01:00
fragosti
a173c5fc38 Merge branch 'feature/website/update-portal-v2' of https://github.com/0xProject/0x-monorepo into feature/website/update-portal-v2 2018-09-04 11:55:42 -07:00
fragosti
f5237f7971 Use order parser utils from order utils 2018-09-04 11:55:08 -07:00
Amir Bandeali
6f7a5d00e6 Update prettierignore 2018-09-04 11:47:26 -07:00
Fabio Berger
4061723863 merge back weth9 2018-09-04 19:42:54 +01:00
Jacob Evans
ab1b52ba87 Ropsten/Kovan Contract deployment 2018-09-04 19:41:05 +01:00
Fabio Berger
16e94ecb40 Merge branch 'deployment/2.0.0-beta-testnet/ropsten' of github.com:0xProject/0x-monorepo into deployment/2.0.0-beta-testnet/ropsten
* 'deployment/2.0.0-beta-testnet/ropsten' of github.com:0xProject/0x-monorepo:
  Ropsten/Kovan Contract deployment
2018-09-04 19:35:48 +01:00
Jacob Evans
6bb2c5877c Ropsten/Kovan Contract deployment 2018-09-04 19:29:40 +01:00
fragosti
a14450f367 Add order parsers to order-util 2018-09-04 11:22:31 -07:00
Amir Bandeali
85df313a7a Update mainnet artifacts 2018-09-04 11:07:56 -07:00
Amir Bandeali
66ed6b9b88 Update mainnet configs 2018-09-04 11:07:56 -07:00
Amir Bandeali
9304d09da6 Add mainnet migrations 2018-09-04 11:07:56 -07:00
fragosti
e61dbbb6cf Merge https://github.com/0xProject/0x-monorepo into feature/website/update-portal-v2 2018-09-04 10:53:18 -07:00
Fabio Berger
1690f59857 Remove unused imports and console.log 2018-09-04 18:42:50 +01:00
Fabio Berger
c916dd6ebb Add back order validation logic 2018-09-04 18:39:53 +01:00
Fabio Berger
8a683b8541 Fix imports 2018-09-04 18:37:41 +01:00
Fabio Berger
4883b8be10 remove console log 2018-09-04 18:37:33 +01:00
Fabio Berger
51760f9bdd merge development 2018-09-04 18:37:24 +01:00
Fabio Berger
6a619a4084 Merge pull request #1054 from 0xProject/addValidationMethods
Temporarily Add Back Validation Methods
2018-09-04 18:04:03 +01:00
Jacob Evans
feeafa193a Ropsten/Kovan Contract deployment 2018-09-04 18:01:21 +01:00
Fabio Berger
8d8528996a Export abstract fetchers 2018-09-04 17:44:27 +01:00
Amir Bandeali
965d609829 Merge pull request #1050 from 0xProject/refactor/contracts/multisig
Update MultiSig and add more tests
2018-09-04 09:12:16 -07:00
Leonid Logvinov
a52714bcf3 Merge pull request #1052 from 0xProject/feature/remove-types
[typescript-typings] Remove types that were moved to DefinitelyTyped
2018-09-04 17:54:54 +02:00
Fabio Berger
bbfd7647a8 Export missing type 2018-09-04 16:52:21 +01:00
Fabio Berger
0aba5a3be4 Merge branch 'development' into addValidationMethods
* development:
  Remove unused imports
2018-09-04 16:51:27 +01:00
Fabio Berger
61bf5864a8 Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Remove unused imports
2018-09-04 16:51:15 +01:00
Fabio Berger
56847a53f4 Add PR nr 2018-09-04 16:41:43 +01:00
Fabio Berger
8324ab3af7 Update yarn.lock 2018-09-04 16:27:26 +01:00
Fabio Berger
d496a7585c Add validateFillOrderThrowIfInvalidAsync and validateOrderFillableOrThrowAsync to ExchangeWrapper 2018-09-04 16:27:16 +01:00
Fabio Berger
8d7f2a993a Import fetchers from contract-wrappers 2018-09-04 16:24:01 +01:00
Fabio Berger
ed786f3e8f Export fetchers from contract-wrappers 2018-09-04 16:23:29 +01:00
Fabio Berger
539c243733 Move fetchers to contract-wrappers 2018-09-04 16:23:02 +01:00
Leonid Logvinov
40e0c829b3 Fix the version 2018-09-04 17:06:09 +02:00
Amir Bandeali
e34b1f2f8b Remove TODOs that will not be addressed 2018-09-04 07:57:47 -07:00
Amir Bandeali
f6b6619c08 Fix geth tests 2018-09-04 07:57:47 -07:00
Amir Bandeali
e480e08aa4 Add test for external_call visibility 2018-09-04 07:57:47 -07:00
Amir Bandeali
652cf7a976 Add MultiSigWalletWithTimeLock revert reasons to tests 2018-09-04 07:57:47 -07:00
Amir Bandeali
7a8ab6fbe8 Update MultiSigWalletWithTimeLock to 0.4.24 2018-09-04 07:57:47 -07:00
Amir Bandeali
9deec8ec35 Add more tests for MultiSigWalletWithTimeLock 2018-09-04 07:57:47 -07:00
Amir Bandeali
3f1586045c Add test for executeRemoveAuthorizedAddressAtIndex when called by non-owner 2018-09-04 07:57:47 -07:00
Amir Bandeali
ada5563b1f Update to most recent multisig 2018-09-04 07:57:47 -07:00
Leonid Logvinov
6b41a570a5 Change doc gen configs 2018-09-04 16:36:18 +02:00
Leonid Logvinov
cebf6bfb34 Move types used in public interfaces to dependencies 2018-09-04 16:36:18 +02:00
Leonid Logvinov
47a1b48ad8 Add temporarily missing web3-provider-engine types in website 2018-09-04 16:36:18 +02:00
Leonid Logvinov
ef82a9d2a6 Add CHANGELOG entry 2018-09-04 16:36:18 +02:00
Leonid Logvinov
ba6351841d Add temporarily missing web3-provider-engine types in subproviders 2018-09-04 16:36:18 +02:00
Leonid Logvinov
cdc786a1e3 Remove types for web3-provider-engine from typescript-typings 2018-09-04 16:36:18 +02:00
Leonid Logvinov
3ea137a78f Remove types for eth-lightwallet from typescript-typings 2018-09-04 16:36:18 +02:00
Leonid Logvinov
b525ccc825 Remove types for detect-node from typescript-typings 2018-09-04 16:36:18 +02:00
Leonid Logvinov
77acbdd3ea Remove types for ganache-core from typescript-typings 2018-09-04 16:36:18 +02:00
Leonid Logvinov
c13190ceab Remove types for newman from typescript-typings 2018-09-04 16:36:18 +02:00
Leonid Logvinov
78d4fc59a5 Merge pull request #1053 from 0xProject/fix/linter_issues
[website] Remove unused imports
2018-09-04 16:35:54 +02:00
Leonid Logvinov
f9e86c057d Remove unused imports 2018-09-04 16:08:35 +02:00
Amir Bandeali
1d8e133a30 Merge pull request #1051 from 0xProject/fix/contracts/style
Apply styling fixes to contracts
2018-09-03 21:22:03 -07:00
Amir Bandeali
99fbf384fd Apply styling fixes 2018-09-03 20:55:37 -07:00
Amir Bandeali
cb4fcf4de7 Revert in Forwarder constructor if ERC20 proxy isn't registered 2018-09-03 20:35:00 -07:00
F. Eugene Aumson
800dd5fb4f ammend generated docs with solc's devdoc output 2018-08-31 16:18:17 -04:00
F. Eugene Aumson
3dc4eb4421 rename 2 variables 2018-08-31 15:28:12 -04:00
F. Eugene Aumson
75664b6651 make postinstall symlink hack cross platform 2018-08-31 11:49:14 -04:00
F. Eugene Aumson
327b4ba554 satisfy linter 2018-08-31 11:18:43 -04:00
F. Eugene Aumson
50b725c687 introduce named vars to clarify return statements 2018-08-31 09:33:26 -04:00
F. Eugene Aumson
72419816a8 Merge remote-tracking branch 'upstream/development' into sol-doc 2018-08-31 09:22:05 -04:00
F. Eugene Aumson
9a4e6da02f enable sol-doc tests in circleci 2018-08-31 09:15:41 -04:00
F. Eugene Aumson
823b6c4d7d transform solc's ABI output into doc types 2018-08-31 09:12:27 -04:00
Brandon Millman
675964dc5c Merge pull request #1048 from 0xProject/feature/website/patch-v2-landing
[website] Final tweaks for landing page
2018-08-30 17:26:47 -07:00
Brandon Millman
6432f85eb0 Wording change for first benefit 2018-08-30 17:14:17 -07:00
Francesco Agosti
66eef758c6 Merge pull request #1047 from 0xProject/feature/re-add-no-unused-variables
Re-add no-unused-variable tslint rule
2018-08-30 15:38:21 -07:00
Brandon Millman
c64f0ba34b Tweaks to benefits and use cases 2018-08-30 15:26:03 -07:00
Brandon Millman
6deffb6b28 Update yarn lock 2018-08-30 15:19:33 -07:00
Greg Hysen
5802713801 Merge pull request #1046 from 0xProject/fix/contracts/roundingFeeTestsMatchOrders
Test cases for rounding fees in matchOrders
2018-08-30 14:27:01 -07:00
Brandon Millman
11df29fa8e Update exchange ABI for decoding logs 2018-08-30 14:23:09 -07:00
Brandon Millman
f4a41e80b8 Remove LogError legacy stuff 2018-08-30 14:04:55 -07:00
Brandon Millman
5c655b55d3 Update comment for validation 2018-08-30 14:01:04 -07:00
Brandon Millman
63c15b6f4f Remove commented out block 2018-08-30 14:00:10 -07:00
Brandon Millman
4f2bc29744 Remove cancel check 2018-08-30 13:59:42 -07:00
fragosti
2cac431c41 Final tweaks for landing page 2018-08-30 13:53:30 -07:00
fragosti
80b7a7842c run prettier 2018-08-30 13:47:33 -07:00
Brandon Millman
8c7cec9822 Merge pull request #1040 from 0xProject/feature/website/v2-tweaks
[website] Landing page tweaks for v2 launch
2018-08-30 13:46:37 -07:00
Brandon Millman
971a4087d2 Update yarn lock 2018-08-30 13:36:44 -07:00
Brandon Millman
660e670d38 Update generate and fill order flows 2018-08-30 13:36:44 -07:00
Brandon Millman
052824f4e3 Token registry from old 0x version 2018-08-30 13:36:44 -07:00
fragosti
1d5ef4d0ca Fix unused vars for react-shared and website 2018-08-30 13:28:07 -07:00
Brandon Millman
a6440b94f4 Fix import 2018-08-30 13:24:24 -07:00
Brandon Millman
01685b7622 Fix contract not deployed on network bug in ContractWrapper class 2018-08-30 13:24:24 -07:00
Brandon Millman
397fefa8d7 Update typings version 2018-08-30 13:24:24 -07:00
Brandon Millman
82a01ef020 Initial changes for v2 portal 2018-08-30 13:24:24 -07:00
Brandon Millman
a224ce347e Revert whats new text 2018-08-30 13:21:07 -07:00
Amir Bandeali
81ba2a8411 Merge pull request #1045 from 0xProject/feature/contracts/cancelOrderInternal
Add cancelOrderInternal, use within batchCancelOrders
2018-08-30 13:07:51 -07:00
Amir Bandeali
a6e8b28da5 Merge pull request #1043 from 0xProject/feature/contracts/edgeCaseTests
Add edge case tests
2018-08-30 13:07:19 -07:00
Brandon Millman
e90dbf66f3 Add new exchange everywhere graphic 2018-08-30 12:29:47 -07:00
Greg Hysen
0be2219beb Test cases for rounding fees in matchOrders 2018-08-30 12:23:11 -07:00
Amir Bandeali
09b4d5e0e4 Add cancelOrderInternal, use within batchCancelOrders 2018-08-30 12:10:24 -07:00
Brandon Millman
60f1bcf51f Remove unused render methods in landing page 2018-08-30 12:09:54 -07:00
Brandon Millman
431ac3b401 Update yarn lock 2018-08-30 12:05:29 -07:00
Francesco Agosti
50781bd77a Merge pull request #1042 from 0xProject/feature/website/v2-tweaks-fra
[website] Add rotating text to landing header and careers button to topbar
2018-08-30 11:55:28 -07:00
fragosti
c3361bb86e Remove conflict strings 2018-08-30 11:52:08 -07:00
fragosti
fd5ad69c26 Add careers page to top bar 2018-08-30 11:49:27 -07:00
fragosti
b1f97a27f3 Final tweaks 2018-08-30 11:49:27 -07:00
fragosti
febddcb356 Remove redundant import 2018-08-30 11:49:27 -07:00
fragosti
74d5af34eb Add TypedText component and use it on landing page 2018-08-30 11:49:27 -07:00
fragosti
365890291f Add generic title changes 2018-08-30 11:48:49 -07:00
Brandon Millman
0368de701f Added todo comments for missing items 2018-08-30 11:44:09 -07:00
Brandon Millman
f5e7b7e7e0 Add title header to use cases section 2018-08-30 11:39:25 -07:00
Brandon Millman
038c21324e Make hero image responsive 2018-08-30 11:39:25 -07:00
Brandon Millman
5d008ee83e Update what's new styling 2018-08-30 11:39:25 -07:00
F. Eugene Aumson
8d122006ba move export to top of file 2018-08-30 12:34:27 -04:00
F. Eugene Aumson
0e45497acb rename variables 2018-08-30 12:28:09 -04:00
Amir Bandeali
d0f6933980 Add tests for token that returns >32 bytes 2018-08-30 09:27:28 -07:00
Amir Bandeali
14793f30b5 Add more proxy tests 2018-08-30 09:27:28 -07:00
Amir Bandeali
86319291e3 Update used addresses for authorizable tests 2018-08-30 09:27:28 -07:00
Amir Bandeali
afa2dd7374 Add test for fillOrder and dispatchTransferFrom where maker == taker 2018-08-30 09:26:44 -07:00
F. Eugene Aumson
fe7a62ba9a add named var to make if condition more readable 2018-08-30 12:02:46 -04:00
F. Eugene Aumson
b88a56e6b7 reduce proximity b/w instantiation and use of var 2018-08-30 12:02:46 -04:00
F. Eugene Aumson
297cbd996d remove unnecessary class SolidityDocFormat 2018-08-30 12:02:42 -04:00
F. Eugene Aumson
f55234b4a0 comment public interface 2018-08-30 11:30:43 -04:00
F. Eugene Aumson
f76c88c549 remove unused constructor parameter 2018-08-30 11:24:41 -04:00
F. Eugene Aumson
863966787f dev-depend on @0xproject/tslint-config 2018-08-30 10:43:43 -04:00
F. Eugene Aumson
7ed31d2fba correct package.json's privacy specification 2018-08-30 10:43:43 -04:00
F. Eugene Aumson
6273339f7c add named references for returned objects 2018-08-30 10:43:43 -04:00
F. Eugene Aumson
29f2ae605e re-word comment: 'construction' -> 'instantiation' 2018-08-30 10:43:43 -04:00
F. Eugene Aumson
6450844d7f rename method _addHexPrefixes 2018-08-30 10:43:43 -04:00
F. Eugene Aumson
9834395a48 remove mistaken TODO 2018-08-30 10:43:43 -04:00
F. Eugene Aumson
f429032eef move shared doc types from react-docs to @0x/types 2018-08-30 10:43:36 -04:00
F. Eugene Aumson
5088b7f23c hack postinstall to correct types package symlink
yarn is not doing this properly :( even on v1.9.4.
confirmed with @albrow .
2018-08-30 10:08:35 -04:00
fragosti
1312e4caf2 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/v2-tweaks 2018-08-29 16:39:25 -07:00
Amir Bandeali
eb4517d737 Merge pull request #1041 from 0xProject/refactor/contracts/assetProxyOwnerVersion
Update AssetProxyOwner to 0.4.24, remove redundant code
2018-08-29 15:57:53 -07:00
Amir Bandeali
d80701c277 Fix geth tests 2018-08-29 15:35:09 -07:00
Amir Bandeali
bf3ab1127d Remove unused imports 2018-08-29 14:42:42 -07:00
Amir Bandeali
dcb12b6ad6 Update AssetProxyOwner to 0.4.24 2018-08-29 14:12:10 -07:00
Francesco Agosti
f87420a776 Merge pull request #1023 from 0xProject/website/feature/react-16
[website] Upgrade all the things to React 16
2018-08-29 14:04:17 -07:00
Greg Hysen
6cedf5362b Merge pull request #1039 from 0xProject/fix/contracts/audit2Fixes
Fixes as-per Audit for LibBytes + ERC20 Proxy Comments
2018-08-29 13:53:49 -07:00
Greg Hysen
aa833ef074 Typos in LibBytes tests 2018-08-29 13:26:46 -07:00
Greg Hysen
5f1c9cfee5 Reverted syntax used by readBytes4 in AssetProxyOwner to be compatible with Solidity v0.4.10 2018-08-29 13:15:40 -07:00
Greg Hysen
62b93cf2eb More tests for LibBytes 2018-08-29 13:14:51 -07:00
Brandon Millman
b1c5f6e8f1 Update use cases section 2018-08-29 12:45:24 -07:00
Brandon Millman
3bc9b309f6 Update tokenization section 2018-08-29 12:45:24 -07:00
Brandon Millman
6924a2b681 Update benefits 2018-08-29 12:45:24 -07:00
Brandon Millman
d93d4c34f5 Update whats new 2018-08-29 12:45:24 -07:00
Brandon Millman
557267477e Add new header image 2018-08-29 12:45:16 -07:00
Brandon Millman
b9f7979e91 Replace projects section with relayers 2018-08-29 12:45:15 -07:00
Greg Hysen
8c803ab232 Updated comments for ERC20 proxy to clarify how we load the token address from calldata (3.18 from audit) 2018-08-29 12:25:06 -07:00
F. Eugene Aumson
28246abec3 remove unneeded entries from doc gen config 2018-08-29 15:23:32 -04:00
fragosti
422e5e4dd7 Apply prettier 2018-08-29 11:57:52 -07:00
fragosti
2aea820d89 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into website/feature/react-16 2018-08-29 11:42:44 -07:00
Greg Hysen
1c3b2b7141 Updated readBytes4 to match spec + added unit tests. These are 3.5/3.6 from audit 2018-08-29 11:39:52 -07:00
Alex Browne
e7d5ceb9c5 feat: Add support for TypeScript project references (#991)
* Update all package.json and tsconfig.json

* fix(contracts): Make test/utils/web3_wrapper.ts compatible with project refs

* Fix webpack config for 0x.js

* Fix linter errors by adding rootDir to tsconfig.json as needed

* Add build:ts and watch:ts commands to package.json

* Update sra-spec to work with project references

* Update tsconfig.json with latest new/removed packages

* Add TypeScript as devDependency at root

* Add missing rootDir to forwarder-helper package

* Use a separate tsconfig file for typedoc

* Fix linter errors

* Apply PR feedback (add comments)

* Fix 0x.js tsconfig
2018-08-29 11:15:30 -07:00
Fabio Berger
e6511c9c05 Fix linter 2018-08-29 17:45:51 +01:00
F. Eugene Aumson
a1959df911 add devdoc support to solc typings, and use it 2018-08-29 08:51:01 -04:00
F. Eugene Aumson
775d1efd46 add package sol-doc 2018-08-29 08:50:55 -04:00
fragosti
68af0e9eb7 Change VersionDropDown to use material-ui 3 2018-08-28 18:08:06 -07:00
fragosti
a18d0f6229 Upgrade version of react-shared in website 2018-08-28 17:49:15 -07:00
fragosti
031807df9c Upgrade react-copy-to-clipboard 2018-08-28 15:52:09 -07:00
fragosti
72710be04b Remove react-tap-event-plugin from react-shared 2018-08-28 15:37:20 -07:00
fragosti
ac135d55d3 Upgrade material ui in react-docs 2018-08-28 15:32:15 -07:00
fragosti
1d55e94659 Update lockfile 2018-08-28 15:27:24 -07:00
fragosti
86284f1c7e Merge branch 'development' of https://github.com/0xProject/0x-monorepo into website/feature/react-16 2018-08-28 15:25:08 -07:00
fragosti
61a4ae7fc4 Update material-ui in react-shared 2018-08-28 15:15:54 -07:00
fragosti
55fab3d98f Revert "Simplify dropdown component"
This reverts commit 91a9014a50.
2018-08-28 15:07:29 -07:00
fragosti
de11b62e30 Revert "Have new Popover component working in React 16"
This reverts commit 5785ec0713.
2018-08-28 15:07:28 -07:00
fragosti
8e14e65b60 Revert "Enable hovering state for dropdown"
This reverts commit ac1640140c.
2018-08-28 15:07:24 -07:00
fragosti
2d1d14d2e4 Upgrade material ui to 0.20.0 2018-08-28 15:04:34 -07:00
Brandon Millman
f44644ad90 Merge pull request #1022 from 0xProject/feature/contract-wrappers/order-validator
[contract-wrappers] Write wrapper for OrderValidator contract
2018-08-28 14:20:57 -07:00
fragosti
ac1640140c Enable hovering state for dropdown 2018-08-28 13:53:49 -07:00
Greg Hysen
1402a0aa22 Merge pull request #1036 from 0xProject/fix/contracts/calculateFillResults
Making rounding consistent in calculateFillResults
2018-08-28 13:51:38 -07:00
Amir Bandeali
f225f9e7c8 Making rounding consistent in calculateFillResults 2018-08-28 13:25:05 -07:00
Amir Bandeali
14fdb71a71 safeGetPartialAmount (#1035)
* Added Test "Should transfer correct amounts when left order is fully filled and values pass isRoundingErrorCeil but fail isRoundingErrorFloor"

* Added RoundingError exception to reference function for getPartialAmount

* Added RoundingError exception to reference function for getPartialAmount

* Added isRoundingErrorCeil to getPartialAmountCeil reference funtion

* Computed new values  for "Should give right maker a better buy price when correct price is not integral" that does not have a rounding error

* Almost all tests for match orders are passing after adding isRoundingErrorCeil check

* WIP commit: Added rounding error checks to getPartialAmount

* WIP commit: Added rounding error checks to getPartialAmount

* Use safe versions of getPartialAmount

* Update Exchange internals tests

* Run linter

* Found new values for "Should transfer correct amounts when right order fill amount deviates from amount derived by `Exchange.fillOrder`"

* Fixed merge conflicts

* Run all tests

* Cleaned up some comments on match Orders tests

* Fix tests for geth
2018-08-28 13:00:49 -07:00
Brandon Millman
9c4c4fb19a Export missing types and add OrderValidatorWrapper to hidden constructors 2018-08-28 12:03:21 -07:00
F. Eugene Aumson
849e203812 add interface to return compiler output...
...rather than persisting it to the filesystem.
2018-08-28 14:24:26 -04:00
F. Eugene Aumson
80ed724f3a rename var compiledData to compiledContract 2018-08-28 14:24:26 -04:00
F. Eugene Aumson
5c056b57b7 extract method _getContractNamesToCompile() 2018-08-28 14:24:26 -04:00
F. Eugene Aumson
4779ebfd20 split method 2018-08-28 14:24:26 -04: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
fragosti
5785ec0713 Have new Popover component working in React 16 2018-08-27 18:29:35 -07:00
Alex Browne
2eab0e30b7 fix(contracts): Catch cases where the actual error differs from the expected error (#1032)
* Catch cases where the actual error differs from the expected error

* Add tests for testWithReferenceFuncAsync

* Small style and comment fixes
2018-08-27 16:07:38 -07:00
Brandon Millman
2c846ff145 Add OrderValidatorWrapper to public interface 2018-08-27 16:06:34 -07:00
Brandon Millman
ca0dfc6610 Add contract-wrappers changelog entry for OrderValidatorWrapper 2018-08-27 13:57:48 -07:00
Brandon Millman
0fd44ee2c1 Fix broken test 2018-08-27 13:53:51 -07:00
Brandon Millman
7271fc0bab Add getBalancesAndAllowances to wrapper 2018-08-27 13:49:44 -07:00
Brandon Millman
6c039bbeb1 Update OrderValidator artifact to include getBalancesAndAllowances function 2018-08-27 13:43:19 -07:00
Brandon Millman
38e6d26145 Add params to all function comments 2018-08-27 13:31:12 -07:00
Brandon Millman
b0f210dea9 Add getERC721Owner to wrapper 2018-08-27 13:21:14 -07:00
Brandon Millman
f7469080f9 Update getOrdersAndTradersInfo to return an array instead 2018-08-27 13:21:10 -07:00
Amir Bandeali
fb5ea5d99f Merge pull request #1030 from 0xProject/fix/contracts/forwarderFillOrderNoThrow
Remove redundant mstores from fillOrderNoThrow
2018-08-27 13:07:57 -07:00
Brandon Millman
be2f4cbdca Add getBalanceAndAllowance to wrapper 2018-08-27 13:04:54 -07:00
Brandon Millman
68f2dc11b4 Add getTraderInfo and getTradersInfo to wrapper 2018-08-27 13:04:54 -07:00
Brandon Millman
d6c670dfcb Add getOrderAndTraderInfoAsync to wrapper 2018-08-27 13:04:54 -07:00
Brandon Millman
0736c41357 Add test for order validator 2018-08-27 13:04:54 -07:00
Brandon Millman
898bd75a18 Remove some unused variables in forwarder wrapper test 2018-08-27 13:04:54 -07:00
Brandon Millman
260313a6ae Initial OrderValidator wrapper 2018-08-27 13:04:54 -07:00
Amir Bandeali
6a99bfa68e Add clarifying comments 2018-08-27 12:01:58 -07:00
Amir Bandeali
f60adbdd72 Remove redundant mstores from fillOrderNoThrow 2018-08-27 11:54:20 -07:00
Alex Browne
1be310cef4 Merge pull request #1031 from 0xProject/fix/internal-tests-division-by-zero-assertion
Use correct error message for division by zero
2018-08-27 11:48:47 -07:00
Alex Browne
ff4f86f1d6 fix(contracts): Use correct error message for division by zero 2018-08-27 11:19:25 -07: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
f4a4fefe42 Exit with non-error code at end of publishRelease 2018-08-27 15:02:12 +01:00
Fabio Berger
00a4fa5f7c Publish
- 0x.js@1.0.1-rc.6
 - @0xproject/abi-gen@1.0.7
 - @0xproject/assert@1.0.7
 - @0xproject/base-contract@2.0.1
 - @0xproject/connect@2.0.0-rc.2
 - @0xproject/contract-wrappers@1.0.1-rc.5
 - contracts@2.1.42
 - @0xproject/dev-utils@1.0.6
 - @0xproject/fill-scenarios@1.0.1-rc.5
 - @0xproject/forwarder-helper@1.0.1-rc.2
 - @0xproject/json-schemas@1.0.1-rc.6
 - @0xproject/metacoin@0.0.17
 - @0xproject/migrations@1.0.6
 - @0xproject/monorepo-scripts@1.0.7
 - @0xproject/order-utils@1.0.1-rc.6
 - @0xproject/order-watcher@1.0.1-rc.5
 - @0xproject/react-docs@1.0.7
 - @0xproject/react-shared@1.0.8
 - @0xproject/sol-compiler@1.1.1
 - @0xproject/sol-cov@2.1.1
 - @0xproject/sol-resolver@1.0.7
 - @0xproject/sra-report@1.0.7
 - @0xproject/sra-spec@1.0.1-rc.6
 - @0xproject/subproviders@2.0.1
 - @0xproject/testnet-faucets@1.0.43
 - @0xproject/types@1.0.1-rc.6
 - @0xproject/utils@1.0.7
 - @0xproject/web3-wrapper@2.0.1
 - @0xproject/website@0.0.46
2018-08-27 14:48:24 +01:00
Fabio Berger
4475fefd07 Updated CHANGELOGS 2018-08-27 14:47:56 +01:00
Fabio Berger
cd08a9c121 Fix prettier 2018-08-27 13:43:29 +01:00
Fabio Berger
b0c4eb8333 Update changelog files for RC packages 2018-08-27 13:16:31 +01:00
Fabio Berger
368dbda8f0 Merge pull request #1028 from 0xProject/fix-ci
Fix `test_publish` CI Test
2018-08-27 13:09:11 +01:00
Fabio Berger
bc4149683e Skip doc generation for local publishes since we test this in a separate CI test 2018-08-27 12:39:10 +01:00
Fabio Berger
6174d9ebb7 Fix typo 2018-08-27 12:34:34 +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
Fabio Berger
e4fc8a8414 Use absolute path 2018-08-27 12:05:55 +01:00
Fabio Berger
907972c466 Merge branch 'development' into fix-ci
* development:
  Run yarn a second time if the first fails
2018-08-27 11:43:35 +01:00
Fabio Berger
49f5fe635f Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Run yarn a second time if the first fails
2018-08-27 11:43:22 +01:00
Fabio Berger
77290c1efa Run yarn a second time if the first fails 2018-08-27 10:51:38 +01:00
Fabio Berger
4ac43a9fd2 Try relative to root dir 2018-08-27 10:38:06 +01:00
Fabio Berger
cc77d1dd49 merge development 2018-08-27 10:35:16 +01:00
Fabio Berger
51161784e8 Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Fix command
  Move md files to lib folder during build
  Change exit code to failure
  Fix sra-spec `main` and `types` in package.json
  Issue #1025 BlockParam unroll
  fix: Use yarn version 1.9.4 on CI
2018-08-27 10:34:45 +01:00
Fabio Berger
cb7660fbe7 Merge pull request #1009 from 0xProject/fix/ci-yarn-1.9.4
fix: Use yarn version 1.9.4 on CI
2018-08-27 10:33:02 +01:00
Fabio Berger
82e51b8787 Fix command 2018-08-27 10:15:27 +01:00
Fabio Berger
fffa96bba7 Move md files to lib folder during build 2018-08-27 10:15:13 +01:00
Fabio Berger
e6cb2e0fcd Change exit code to failure 2018-08-27 10:14:43 +01:00
Fabio Berger
38abeaed9c Fix sra-spec main and types in package.json 2018-08-27 10:13:17 +01:00
Fabio Berger
90c9e3496a Actual relative path 2018-08-27 10:10:07 +01:00
Fabio Berger
9fc8a6e214 Try relative path 2018-08-27 10:09:51 +01:00
Fabio Berger
9df87a199a Merge pull request #1026 from 0xProject/fix/contract-wrappers/block-param-literal
[contract_templates] Issue #1025 BlockParam unroll
2018-08-27 10:07:06 +01:00
Jacob Evans
7e9ba50502 Issue #1025 BlockParam unroll
BlockParam unrolls into number | BlockParamLiteral, though BlockParamLiteral does not get imported. This results in type build errors in downstream projects where tslint checks libs
2018-08-27 15:59:43 +10:00
Fabio Berger
41559c39b9 Fix command 2018-08-26 23:43:19 +01:00
Fabio Berger
6a6b424c86 Move md files to lib folder during build 2018-08-26 23:35:47 +01:00
Fabio Berger
3a5c6ed00f Fix sra-spec main and types in package.json 2018-08-26 23:05:04 +01:00
Fabio Berger
db54588d05 Add BlockParamLiteral to template 2018-08-26 22:00:51 +01:00
Fabio Berger
52fde551e4 Remove check since this method is now used in multiple places 2018-08-26 21:16:32 +01:00
Fabio Berger
40cf805e5e Also use failure exit code if unexpected error occurs 2018-08-26 20:54:15 +01:00
Fabio Berger
09d6496135 Change exit code to failure 2018-08-26 20:53:21 +01:00
Fabio Berger
c4dadf4bfd Combine imports 2018-08-26 17:49:06 +01:00
Fabio Berger
35ba3e6f7c Bumop 0x.js version 2018-08-26 17:35:17 +01:00
Fabio Berger
3ac182ee91 Fix file path to main and types in package.json 2018-08-26 17:12:13 +01:00
Amir Bandeali
00e7c70b4d Merge pull request #986 from 0xProject/feature/contracts/assertions
Add more assertions to assertValidFill
2018-08-24 20:03:28 -07:00
Amir Bandeali
0aa9ed3839 Merge pull request #1008 from 0xProject/fix/contracts/robustMatching
Robustness in Order Matching
2018-08-24 19:00:53 -07:00
Remco Bloemen
d652deea23 Merge branch 'fix/contracts/robustMatching' of github.com:0xProject/0x.js into fix/contracts/robustMatching 2018-08-24 18:54:15 -07:00
Greg Hysen
878db3b849 Added comments to order matching 2018-08-24 18:48:29 -07:00
Greg Hysen
ec2e726be0 Rephrased some of the math in MixinMatchOrders to improve readability 2018-08-24 18:20:26 -07:00
Greg Hysen
287830d6e0 Run all tests 2018-08-24 18:20:26 -07:00
Greg Hysen
c7a7ae7e18 Give right maker better price when correct value is not integral 2018-08-24 18:20:26 -07:00
Greg Hysen
1c7ba6a315 Extract only fill event logs 2018-08-24 18:20:26 -07:00
Greg Hysen
0a6f107243 Added temporary @todo to MixinMatchOrders 2018-08-24 18:20:25 -07:00
Greg Hysen
a93f95c55e Wording in MixinMatchOrders 2018-08-24 18:20:25 -07:00
Greg Hysen
6833e243b7 Addressed linter errors in match order tesster 2018-08-24 18:20:25 -07:00
Greg Hysen
81dc893d1d Removed a redundant comment from matchOrders 2018-08-24 18:20:25 -07:00
Greg Hysen
f8e565bc06 Tests for matchOrders edge cases 2018-08-24 18:20:25 -07:00
Greg Hysen
ba15fb6a06 Swapped direction of expect values to match output in failure cases 2018-08-24 18:20:25 -07:00
Greg Hysen
1e6b83719a Renaming verify -> assert in order matching 2018-08-24 18:20:25 -07:00
Greg Hysen
9fcb2dda73 Fixed a function comment 2018-08-24 18:20:25 -07:00
Greg Hysen
9a5ec8d030 Added function signature comments 2018-08-24 18:20:25 -07:00
Greg Hysen
ac872e5181 Added expect messages for checking left/right order states 2018-08-24 18:20:25 -07:00
Greg Hysen
70863cca08 Ran prettier and linter 2018-08-24 18:20:25 -07:00
Greg Hysen
5a1dce15be Updated all existing match order tests to use new format 2018-08-24 18:19:43 -07:00
Greg Hysen
d291256158 Passes comprehensive test 2018-08-24 18:18:30 -07:00
Greg Hysen
8c706ac639 Verify logs 2018-08-24 18:18:30 -07:00
Greg Hysen
f697814849 First balance test with intentional values 2018-08-24 18:18:30 -07:00
Greg Hysen
ca5c9e77c0 Ironing out the new set of test cases for order matchubng 2018-08-24 18:17:27 -07:00
Greg Hysen
a32b201afe Rounding for fees in match orders addressed, plus example 2018-08-24 18:17:27 -07:00
Greg Hysen
0ecdf1e213 All existing tests pass. 2018-08-24 18:17:26 -07:00
Greg Hysen
057891b342 Added fees to matchOrders (previously in calculateFillResults 2018-08-24 18:17:26 -07:00
Greg Hysen
407f63ef20 Removed calculateFillResults from matchOrders workflow. Eliminates compounded rounding errors. 2018-08-24 18:17:26 -07:00
Amir Bandeali
f938c989e3 Merge pull request #1002 from 0xProject/feature/contracts/mutex
[contracts] Add mutexes and reentrancy guards
2018-08-24 18:15:22 -07:00
Amir Bandeali
c8500cab10 Fix build 2018-08-24 17:30:56 -07:00
Amir Bandeali
c28c3db63f Only use one nonReentrant modifier, remove modifier from fillOrderNoThrow variations 2018-08-24 17:30:56 -07:00
Amir Bandeali
a09ee90739 Add tests for matchOrders 2018-08-24 17:30:56 -07:00
Amir Bandeali
7d5a23969d Add reentrancy tests for fillOrder and wrapper functions 2018-08-24 17:30:56 -07:00
Amir Bandeali
56c3c29feb Update ReentrantERC20Token with new functions and check that revert is occuring for correct reason 2018-08-24 17:30:56 -07:00
Amir Bandeali
c75212bef0 Add nonReentrant modifiers on functions that use getCurrentContextAddress only, add lockMutex modifier on functions that make external calls 2018-08-24 17:30:56 -07:00
Amir Bandeali
6d0dedc62c Split modifiers into check only and check, lock, unlock 2018-08-24 17:30:56 -07:00
Amir Bandeali
cf12daea2f Add ReentrantToken 2018-08-24 17:30:56 -07:00
Amir Bandeali
6f88e9bdbd Add internal fill functions, add reentrancy guard to public functions that make external calls 2018-08-24 17:30:56 -07:00
Amir Bandeali
d8cb56caa3 Add ReentrancyGuard contract 2018-08-24 17:30:56 -07:00
Amir Bandeali
044415e23d Remove redundant sload from getCurrentContextAddress 2018-08-24 17:30:56 -07:00
Remco Bloemen
6b866d6053 Revert maker not equal taker check 2018-08-24 17:29:52 -07:00
Amir Bandeali
74ce893f52 Merge pull request #1003 from 0xProject/feature/contracts/roundup
[contracts] Add getPartialAmountCeil and isRoundingErrorCeil
2018-08-24 17:29:09 -07:00
Amir Bandeali
cc1fac9bbe Fix linting errors 2018-08-24 17:02:42 -07:00
Amir Bandeali
94e01be9ed Merge pull request #1021 from 0xProject/feature/contracts/skipselftransfer
[Contracts] Skip self transfers
2018-08-24 16:58:46 -07:00
fragosti
91a9014a50 Simplify dropdown component 2018-08-24 16:48:48 -07:00
Remco Bloemen
e215992859 Fix mixin api 2018-08-24 16:46:24 -07:00
Remco Bloemen
e6f5cac878 Fix double definition of error 2018-08-24 16:46:24 -07:00
Remco Bloemen
29971f36cf Split into assertFillable and assertValidFill 2018-08-24 16:46:24 -07:00
Remco Bloemen
3e4493b389 Disallow self filling 2018-08-24 16:46:24 -07:00
Remco Bloemen
749c6ecc30 Add revert reasons to types 2018-08-24 16:46:24 -07:00
Remco Bloemen
e6e7bae445 Remove BUG_ from revert reasons 2018-08-24 16:46:23 -07:00
Remco Bloemen
a1d8943552 Document accetable price check 2018-08-24 16:46:23 -07:00
Remco Bloemen
07e56b3cc7 Fix taker overpay check 2018-08-24 16:46:23 -07:00
Remco Bloemen
b16f5f55fb Check fillable early 2018-08-24 16:46:23 -07:00
Remco Bloemen
d92fd43791 Update for new assertValidFill signature 2018-08-24 16:46:23 -07:00
Remco Bloemen
e706fa76ac Add overfill and price assertion to assertValidFill 2018-08-24 16:46:23 -07:00
Remco Bloemen
11328bd93d Skip self-transfers 2018-08-24 16:26:48 -07:00
Remco Bloemen
bc686fcbf3 Stylistic fixes 2018-08-24 16:17:02 -07:00
Remco Bloemen
80291caf7c Append -Floor to getPartialAmount and isRoundingError 2018-08-24 16:16:44 -07:00
Brandon Millman
cd5e9a5115 Merge pull request #1018 from 0xProject/fix/migrations/order-validator-testnet
[migrations] Add testnet network info to OrderValidator artifact
2018-08-24 16:06:10 -07:00
fragosti
ad161a973e Change all onTouchTap to onClick 2018-08-24 15:59:14 -07:00
fragosti
103e1aa250 Upgrade typescript version used by sra-spec 2018-08-24 15:45:43 -07:00
fragosti
641d86cb98 Add typescript dependency to typescript-typings (no idea how it was working) 2018-08-24 15:40:04 -07:00
fragosti
813b2ca1fb Bump react-highlight in react-shared once more 2018-08-24 15:29:22 -07:00
fragosti
ec96c3bb77 Upgrade react-shared used by website to one that depends on react 16 2018-08-24 15:15:55 -07:00
fragosti
65120e84e2 Upgrade react-highlight to version that depends on React 16 2018-08-24 15:11:14 -07:00
Amir Bandeali
82b51db17e Merge pull request #1015 from 0xProject/feature/contracts/removeCallerSigType
Remove SignatureType.Caller
2018-08-24 15:09:39 -07:00
fragosti
374ee2db32 Upgrade react in react-docs 2018-08-24 15:05:46 -07:00
Brandon Millman
3557cd93fc Add testnet network info to OrderValidator artifact 2018-08-24 14:42:07 -07:00
Amir Bandeali
0629a7d143 Remove remaining Trezor references 2018-08-24 14:40:00 -07:00
Greg Hysen
a27112cbef SignatureType.Trezor -> SignatureType.EthSign in Signature Validator tests 2018-08-24 14:40:00 -07:00
Greg Hysen
d039a1adda Fixed linter in signatureUtils 2018-08-24 14:40:00 -07:00
Greg Hysen
bb4d449e92 Test case for Trezor Model T signature 2018-08-24 14:40:00 -07:00
Greg Hysen
241534a63d Fixed trezor personal message in client+contracts; added a test using message signed by Trezor One (firmware v1.6.2) 2018-08-24 14:40:00 -07:00
Amir Bandeali
1932aff35c Remove Trezor SignatureType 2018-08-24 14:40:00 -07:00
Amir Bandeali
4f27991959 Remove SigntureType.Caller from signingUtils 2018-08-24 14:39:08 -07:00
Amir Bandeali
8ce4f9c784 Remove SignatureType.Caller 2018-08-24 14:39:08 -07:00
Amir Bandeali
7351bf0b14 Merge pull request #1012 from 0xProject/feature/contracts/staticcall
Use staticcall for external function calls in MixinSignatureValidator
2018-08-24 14:38:54 -07:00
fragosti
48ab151ec2 Update react and remove tap event plugin [deprecated] 2018-08-24 14:20:55 -07:00
Remco Bloemen
f6080367fe Disambiguate the operator precedence 2018-08-24 14:11:45 -07:00
Remco Bloemen
7f78d7da9d Add tests 2018-08-24 14:09:51 -07:00
Remco Bloemen
6734f2f1bc Add docs 2018-08-24 14:09:51 -07:00
Remco Bloemen
0fb7617a78 Fix incorect modulus 2018-08-24 14:09:51 -07:00
Remco Bloemen
4219af1430 Add DIVISION_BY_ZERO to getPartialAmount for consistency 2018-08-24 14:09:51 -07:00
Remco Bloemen
c109d1f545 Remove .only 2018-08-24 14:09:51 -07:00
Remco Bloemen
50fab9feb3 Improve getPartialAmountCeil docs 2018-08-24 14:09:51 -07:00
Remco Bloemen
3dad6ee55e Add tests for getPartialAmountCeil 2018-08-24 14:09:51 -07:00
Remco Bloemen
5d70df771b Add isRoundingErrorCeil 2018-08-24 14:09:50 -07:00
Remco Bloemen
ab5df342e1 Add getPartialAmountCeil 2018-08-24 14:09:50 -07:00
Amir Bandeali
6a9669a409 Rethrow Wallet and Validator errors 2018-08-24 14:06:46 -07:00
Remco Bloemen
e68942ee78 Handle zero case 2018-08-24 13:45:10 -07:00
Remco Bloemen
4159e45aff Update tests 2018-08-24 13:45:10 -07:00
Remco Bloemen
92497d7df4 Fix isRoundingError 2018-08-24 13:45:10 -07:00
fragosti
44a430802e Merge branch 'development' of https://github.com/0xProject/0x-monorepo into website/feature/react-16 2018-08-24 13:38:30 -07:00
Amir Bandeali
070eff6f3a Rename TestStaticCall => TestStaticCallReceiver 2018-08-24 13:32:04 -07:00
Amir Bandeali
681ed822ec Revert if undefined function called in AssetProxies 2018-08-24 13:19:07 -07:00
Amir Bandeali
0a1ae2c311 Remove pragma experimental v0.5.0 and use staticcall is assembly 2018-08-24 13:19:07 -07:00
Amir Bandeali
c5f8b9c2d2 Add pragma experimental v0.5.0 to SignatureValidator and add tests 2018-08-24 13:19:07 -07:00
fragosti
6b03cfd40d Add new react and types 2018-08-24 12:05:54 -07:00
Francesco Agosti
7f36574a57 Merge pull request #1011 from 0xProject/sra-api/rename/sra-spec
[sra-spec] Rename the sra-api package to sra-spec
2018-08-24 12:00:39 -07:00
fragosti
b637ca105a Merge branch 'development' of https://github.com/0xProject/0x-monorepo into sra-api/rename/sra-spec 2018-08-24 11:16:28 -07:00
fragosti
9ffddb47b8 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into sra-api/rename/sra-spec 2018-08-24 11:14:34 -07:00
fragosti
7bcaac4e10 Ignore api.json in public 2018-08-24 11:11:56 -07:00
Fabio Berger
7f585a15f5 Publish
- 0x.js@1.0.1-rc.4
 - @0xproject/abi-gen@1.0.6
 - @0xproject/assert@1.0.6
 - @0xproject/base-contract@2.0.0
 - @0xproject/connect@2.0.0-rc.1
 - @0xproject/contract-wrappers@1.0.1-rc.4
 - contracts@2.1.41
 - @0xproject/dev-utils@1.0.5
 - ethereum-types@1.0.5
 - @0xproject/fill-scenarios@1.0.1-rc.4
 - @0xproject/forwarder-helper@1.0.1-rc.1
 - @0xproject/json-schemas@1.0.1-rc.5
 - @0xproject/metacoin@0.0.16
 - @0xproject/migrations@1.0.5
 - @0xproject/monorepo-scripts@1.0.6
 - @0xproject/order-utils@1.0.1-rc.4
 - @0xproject/order-watcher@1.0.1-rc.4
 - @0xproject/react-docs@1.0.6
 - @0xproject/react-shared@1.0.7
 - @0xproject/sol-compiler@1.1.0
 - @0xproject/sol-cov@2.1.0
 - @0xproject/sol-resolver@1.0.6
 - @0xproject/sra-api@1.0.1-rc.5
 - @0xproject/sra-report@1.0.6
 - @0xproject/subproviders@2.0.0
 - @0xproject/testnet-faucets@1.0.42
 - @0xproject/tslint-config@1.0.6
 - @0xproject/types@1.0.1-rc.5
 - @0xproject/typescript-typings@1.0.5
 - @0xproject/utils@1.0.6
 - @0xproject/web3-wrapper@2.0.0
 - @0xproject/website@0.0.45
2018-08-24 19:11:27 +01:00
Fabio Berger
b38ef579fb Updated CHANGELOGS 2018-08-24 19:11:10 +01:00
Fabio Berger
8427db36e9 Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Add documentation for connect v2
2018-08-24 18:59:01 +01:00
Fabio Berger
2d1c88c20d Updated api.json 2018-08-24 18:58:34 +01:00
Fabio Berger
029ea52979 Small fixes to publish script 2018-08-24 18:58:12 +01:00
Francesco Agosti
a2b6255f40 Merge pull request #1010 from 0xProject/feature/website/connect-2-docs
[website] Add documentation for connect v2
2018-08-24 10:35:45 -07:00
fragosti
d4592c0a60 Run prettier 2018-08-24 10:20:17 -07:00
Fabio Berger
fb6d511811 Added missing entry for RC package 2018-08-24 17:44:14 +01:00
Fabio Berger
c1b4fe999c Excessive command 2018-08-24 17:41:33 +01:00
Fabio Berger
1354f794a1 Merge pull request #1014 from 0xProject/feature/json-schemas/remove-superfluous-id
[json-schemas] Remove superflous id from relayer api fee recipients json schema
2018-08-24 16:32:04 +01:00
fragosti
8f6a96740e Remove superflous id from relayer api fee recipients json schema 2018-08-24 08:25:34 -07:00
fragosti
1d6699585e Add sra-spec to prettier ignore 2018-08-23 17:53:21 -07:00
Brandon Millman
e96f36751a Merge pull request #997 from 0xProject/feature/forwarder-helper/init
[forwarder-helper] Initial scaffolding for the forwarder-helper package
2018-08-23 17:42:48 -07:00
fragosti
a75c298de0 Point to new s3 bucket 2018-08-23 17:31:11 -07:00
fragosti
d603d8da47 Rename sra-api to sra-spec 2018-08-23 17:30:20 -07:00
fragosti
1040826b8b Add documentation for connect v2 2018-08-23 17:17:45 -07:00
Alex Browne
a551d0a6dd fix: Use yarn version 1.9.4 on CI 2018-08-23 16:45:18 -07:00
Brandon Millman
21c37ba62f Upgrade changelog version to get around test-publis CI job 2018-08-23 16:15:08 -07:00
Brandon Millman
2c660e62d3 Merge pull request #1006 from 0xProject/fix/0x.js/uglify-plugin
[0x.js] Update uglify plugin to support es6
2018-08-23 15:21:54 -07:00
Brandon Millman
6b667f8eca Remove CHANGELOG.md 2018-08-23 14:56:39 -07:00
Brandon Millman
d52c1310b2 Update uglify plugin to support es6 2018-08-23 14:42:03 -07:00
Brandon Millman
6338b5bd3c Move sorting phase into its own utils file 2018-08-23 13:47:24 -07:00
Brandon Millman
2713cca6ac Remove legacy docs stuff 2018-08-23 11:10:40 -07:00
Brandon Millman
57c104119c Merge branch 'development' into feature/forwarder-helper/init
* development: (187 commits)
  Remove trailing slash
  Fix linter
  Stop nesting interfaces and add necessary type exports
  Remove duplicate type and remove nested interface
  Add support for rending the Tuple type
  Add missing keyu
  Remove excessive timestamp
  Improve doc commebnt
  Remove docs catch-all endpoint
  Fix comments
  Look for all TS mapped types
  Add catch and exit with non-zero
  Remove superfluous dep
  Fix CHANGELOG entry
  Fix double assignment
  Upgrade Typedoc to 0.12.0, which works with TS 3.x
  Fix prettier issues
  Enable dry run of release publishing and handle git tags existing
  update yarn.lock
  Missing/superfluous type exports from connect
  ...
2018-08-23 10:58:33 -07:00
Brandon Millman
cd5c73550b Update _sortedConfigs naming 2018-08-23 10:53:59 -07:00
Brandon Millman
68b060cb6a Update yarn lock 2018-08-23 10:53:40 -07:00
Brandon Millman
7ad1a18a4a Merge branch 'development' into feature/forwarder-helper/init
* development: (31 commits)
  Update CI config to check development instead of v2-prototype branch
  fix: Make non-interactive npm login for publish tests more robust
  Run prettier
  Remove comment in updates json-schemas doc
  Add documentation for json-schemas
  Fix typo
  Remove artifacts
  Update variable names, make release candidate
  Update more names in docs
  Improve documentation
  Pin sra-report to 0xproject/connect v1.0.4
  Run prettier
  lint everything
  Update websocket for SRA v2
  Remove default query parameters
  Add networkId request param option
  Rename websocket files and types
  Use uuid as string for requestId
  Update changelogs
  Add fee recipients test
  ...
2018-08-23 10:52:09 -07:00
Fabio Berger
6e27324a34 Merge pull request #924 from 0xProject/wrap-typedoc
Improved Docs & Removed monorepo-scripts from packages
2018-08-23 18:12:39 +01:00
Fabio Berger
8eb4b6f917 Remove trailing slash 2018-08-23 17:50:42 +01:00
Fabio Berger
0ca64e394b Fix linter 2018-08-23 17:37:40 +01:00
Fabio Berger
c4c47d9665 Stop nesting interfaces and add necessary type exports 2018-08-23 17:28:27 +01:00
Fabio Berger
f9b222c127 Remove duplicate type and remove nested interface 2018-08-23 17:06:38 +01:00
Fabio Berger
28f077b16f Add support for rending the Tuple type 2018-08-23 16:55:41 +01:00
Fabio Berger
3563fabe88 Add missing keyu 2018-08-23 16:15:47 +01:00
Fabio Berger
1ca176e992 Remove excessive timestamp 2018-08-23 15:12:43 +01:00
Fabio Berger
52e2c60361 Improve doc commebnt 2018-08-23 15:12:34 +01:00
Fabio Berger
ae154f43df Remove docs catch-all endpoint 2018-08-23 15:08:12 +01:00
Fabio Berger
610caef73f Fix comments 2018-08-23 15:08:02 +01:00
Fabio Berger
29a9e1fc4e Look for all TS mapped types 2018-08-23 14:53:32 +01:00
Fabio Berger
ae937cfcce Add catch and exit with non-zero 2018-08-23 14:53:16 +01:00
Fabio Berger
6c7dca7d07 Remove superfluous dep 2018-08-23 14:53:04 +01:00
Fabio Berger
aa9efd79db Fix CHANGELOG entry 2018-08-23 14:52:52 +01:00
Fabio Berger
f0f4f873a9 Fix double assignment 2018-08-23 14:29:32 +01:00
Fabio Berger
0577ab96b8 Upgrade Typedoc to 0.12.0, which works with TS 3.x 2018-08-23 14:29:22 +01:00
Fabio Berger
15a34dca79 Fix prettier issues 2018-08-23 13:58:49 +01:00
Fabio Berger
2b38163274 Enable dry run of release publishing and handle git tags existing 2018-08-23 13:56:40 +01:00
Brandon Millman
572ad4615a Fix prettier 2018-08-22 23:02:44 -07:00
Alex Browne
b013cf2e14 Merge pull request #1001 from 0xProject/fix/npm-login-with-package
fix: Make non-interactive npm login for publish tests more robust
2018-08-22 17:20:14 -07:00
Alex Browne
3e56990db7 Update CI config to check development instead of v2-prototype branch 2018-08-22 16:58:48 -07:00
Alex Browne
2de7a49000 fix: Make non-interactive npm login for publish tests more robust 2018-08-22 16:40:10 -07:00
Fabio Berger
2a63592994 update yarn.lock 2018-08-23 00:23:33 +01:00
Fabio Berger
2cef8d3a3e Missing/superfluous type exports from connect 2018-08-23 00:23:19 +01:00
Fabio Berger
1417ee2ccb Break with -1 so that the exit code of the loop if hit is non-zero 2018-08-23 00:08:45 +01:00
Fabio Berger
04e4fe251a Prettier fix 2018-08-23 00:08:21 +01:00
Fabio Berger
61255309d2 merge development 2018-08-22 23:46:45 +01:00
Fabio Berger
27d329ff25 Replace complicated camelCase to spaces logic with change-case package 2018-08-22 23:44:46 +01:00
Francesco Agosti
cb19623a3a Merge pull request #974 from 0xProject/feature/connect/sra-api-v2
[connect][sra-api][json-schemas] Update Connect to SRA v2
2018-08-22 15:39:14 -07:00
Brandon Millman
44ca6c4b71 Fix lint errors 2018-08-22 15:39:03 -07:00
Brandon Millman
bfabdf6010 Prettier 2018-08-22 15:39:03 -07:00
Brandon Millman
cbcf8e8477 Add changelog entry and fix order-util changelog PR numbers 2018-08-22 15:39:03 -07:00
Brandon Millman
b0b3f9e339 Add assertions to factory 2018-08-22 15:39:03 -07:00
Brandon Millman
a5c7ddcff5 Add more comments 2018-08-22 15:39:03 -07:00
Brandon Millman
6cef847a27 Write initial forwarderHelperFactory 2018-08-22 15:39:03 -07:00
Brandon Millman
68dfd1bb22 Add tests for getMarketBuyOrdersInfo 2018-08-22 15:39:03 -07:00
Brandon Millman
67d33ec10c Fix rounding bug in marketUtils 2018-08-22 15:39:03 -07:00
Brandon Millman
05ba049f59 Add test for sorting that happens in constructor 2018-08-22 15:39:03 -07:00
Brandon Millman
867ff3c5ec Update yarn lock 2018-08-22 15:39:03 -07:00
Brandon Millman
c2454d1428 Add more TODO items 2018-08-22 15:39:03 -07:00
Brandon Millman
7e0e195c88 Make config public readonly 2018-08-22 15:39:03 -07:00
Brandon Millman
e8a1950a74 Add ForwarderHelperImplConfig 2018-08-22 15:39:03 -07:00
Brandon Millman
3c973ba9f6 Remove marketSell and add to marketBuy implementation 2018-08-22 15:39:03 -07:00
Brandon Millman
2ef867f398 Add stubs for ForwarderHelper interface in ForwarderHelperImpl 2018-08-22 15:39:03 -07:00
Brandon Millman
90f2813d0e Flesh out types 2018-08-22 15:39:03 -07:00
Brandon Millman
dd9c4b6e5d Initial skeleton of forwarder-helper package 2018-08-22 15:39:03 -07:00
Fabio Berger
a6cdc38d53 Add/improve comments 2018-08-22 23:25:06 +01:00
Fabio Berger
167c4f8519 Fix changelogs 2018-08-22 23:24:54 +01:00
Fabio Berger
799db64541 Merge branch 'development' into wrap-typedoc
* development:
  fix: Increase delay for non-interactive npm login
2018-08-22 23:14:45 +01:00
Fabio Berger
69b436babe Refactor publish script so that root package.json configs.packagesWithDocs is canonical source of which packages have doc pages 2018-08-22 23:13:59 +01:00
fragosti
c83f2a070c Run prettier 2018-08-22 14:31:53 -07:00
fragosti
ba9e31d3c1 Remove comment in updates json-schemas doc 2018-08-22 14:11:41 -07:00
Fabio Berger
e915d72202 Merge pull request #996 from 0xProject/fix/npm-auto-login-delay
fix: Increase delay for non-interactive npm login
2018-08-22 21:02:21 +01:00
fragosti
74e7fa13d6 Add documentation for json-schemas 2018-08-22 12:04:03 -07:00
Fabio Berger
b7c119b2aa Fix many linter errors that showed up upon upgrading tsutil 2018-08-22 18:52:17 +01:00
Fabio Berger
3c2af2067f Remove monorepo-scripts from tslintconfig.json 2018-08-22 16:24:45 +01:00
Fabio Berger
7c29cadb17 Use actual packageName for external example imports 2018-08-22 16:11:42 +01:00
Fabio Berger
40b202f8c0 Update all CHANGELOGs 2018-08-22 15:53:19 +01:00
Fabio Berger
392c00a698 Fix prettier 2018-08-22 15:10:32 +01:00
Fabio Berger
fb4fbc0e13 Update contract-wrappers CHANGELOG 2018-08-22 15:10:02 +01:00
Fabio Berger
730226081c Ignore error of first yarn install 2018-08-22 14:53:01 +01:00
Fabio Berger
1fdd7466b2 Double install catching first ones error 2018-08-22 14:49:05 +01:00
Fabio Berger
00b7620af1 Add yarn cache clean 2018-08-22 14:45:00 +01:00
Fabio Berger
a39d79352d Remove duplicate install cmd 2018-08-22 14:27:24 +01:00
Fabio Berger
3b5c8a847b Run yarn twice on CI 2018-08-22 14:24:23 +01:00
Fabio Berger
4b84081795 Check yarn info on CircleCi 2018-08-22 14:19:19 +01:00
Fabio Berger
27ba218ed7 Improve README 2018-08-22 14:07:31 +01:00
Fabio Berger
d907b40378 Fix remaining merge issues 2018-08-22 13:12:42 +01:00
Fabio Berger
0248add542 Merge development branch 2018-08-22 11:41:42 +01:00
Fabio Berger
c12f0d04bb Fix bugs in doc gen due to clone vs cloneDeep and pre-maturely removing placeholder undefined's in array iteration 2018-08-22 11:30:24 +01:00
Fabio Berger
22de88035c Fix index.ts given fix in doc generation 2018-08-22 11:28:31 +01:00
Amir Bandeali
80e52464a6 Merge pull request #985 from 0xProject/feature/contracts/orderValidator
[contracts] Add contract for batch validating orders
2018-08-21 20:43:23 -07:00
Amir Bandeali
3760eb5baf Add getBalancesAndAllowances 2018-08-21 18:14:22 -07:00
fragosti
c905b20ce6 Fix typo 2018-08-21 16:51:01 -07:00
Fabio Berger
301cb296ec Move types from sol-compiler to types so they can be used in other places without requiring sol-compiler as a dep 2018-08-21 23:58:06 +01:00
Fabio Berger
1bbd7bf870 Add generated_docs dir to clean command 2018-08-21 23:20:01 +01:00
Fabio Berger
da15df2c2d Stop logging to console for each packages without a package.json 2018-08-21 23:07:12 +01:00
Fabio Berger
fe43f84abd Use bash for loop for generating docs for each package, revert changes to script 2018-08-21 23:06:21 +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
Amir Bandeali
7fa5b474eb Add ZRX balances and allowances to TraderInfo 2018-08-21 13:53:44 -07:00
Amir Bandeali
3d25758b1d Add OrderValidator to migrations 2018-08-21 13:53:38 -07:00
fragosti
f1ddbc9387 Remove artifacts 2018-08-21 13:17:37 -07:00
Amir Bandeali
dafb282432 Add tests 2018-08-21 11:47:28 -07:00
Amir Bandeali
0918f95421 Don't throw if ERC721 token isn't owned 2018-08-21 11:47:28 -07:00
Amir Bandeali
be67c25b0a Add OrderValidator contract 2018-08-21 11:47:28 -07:00
Amir Bandeali
f53157414f Merge pull request #995 from 0xProject/refactor/contracts/forwarderConstructor
[contracts] Remove redundant constructor args
2018-08-21 11:45:50 -07:00
Fabio Berger
6b838c034a Modify script so it can generate docs for a specific package or all packages with doc pages, add doc gen test to CircleCi runs 2018-08-21 19:07:20 +01:00
Alex Browne
86cb89feef fix: Increase delay for non-interactive npm login 2018-08-21 11:04:27 -07:00
Amir Bandeali
1ba26ea5e8 Remove redundant constructor args 2018-08-21 10:59:54 -07:00
fragosti
8b79868c36 Update variable names, make release candidate 2018-08-21 10:58:35 -07:00
Fabio Berger
8bb7b5b543 Add shouldUpload flag to docGenAndUpload command 2018-08-21 18:49:56 +01:00
Fabio Berger
809d301d58 Fix lowercase names involving ERC acronym 2018-08-21 17:48:24 +01:00
Fabio Berger
c00c477307 Add doc comments to AbiDecoder 2018-08-21 17:39:35 +01:00
Fabio Berger
6216714be1 Merge pull request #994 from feuGeneA/remove-more-v2-artifacts
[0x.js, migrations] remove more v2 contract artifacts
2018-08-21 17:35:59 +01:00
Fabio Berger
cc90c806b0 Fix sol-cov index.ts 2018-08-21 17:16:42 +01:00
Fabio Berger
04bbd60c11 Fix sol-compiler index.ts 2018-08-21 17:16:34 +01:00
Fabio Berger
ad9bb3ea59 Fix order-watcher index.ts 2018-08-21 17:16:24 +01:00
Fabio Berger
1ddac0bc7b Fix type 2018-08-21 17:16:16 +01:00
Fabio Berger
a7468eb858 Don't check if types are used for libraries only include types 2018-08-21 17:16:00 +01:00
F. Eugene Aumson
213d82a2c2 remove more v2 contract artifacts 2018-08-21 11:41:01 -04:00
Fabio Berger
7553411fb2 Fix up order-utils 2018-08-21 16:37:03 +01:00
Fabio Berger
c52c94214f Rather then look for typeArguments, we want to ignore Partial & Promise references, but still continue to search below them, as they might surround a type 2018-08-21 16:36:48 +01:00
Fabio Berger
151cf03f5b Add link to Array type 2018-08-21 16:35:39 +01:00
Fabio Berger
141c51eaf5 Add missing exports to 0x.js and contract-wrappers index.ts 2018-08-21 16:35:13 +01:00
Fabio Berger
ab7d083aa5 Add missing key 2018-08-21 15:39:39 +01:00
Fabio Berger
12881e60e3 Fix file name from camel to snake case 2018-08-21 14:23:06 +01:00
Fabio Berger
1f65de60b4 Move sol-compiler dep to dependencies now that types from it are exported in index.ts 2018-08-21 11:18:12 +01:00
Fabio Berger
635373febb Implement ignoring config types 2018-08-21 11:17:12 +01:00
Fabio Berger
e7c7af8ef4 Add more types and ignores to docGenConfigs 2018-08-21 11:15:59 +01:00
fragosti
cd2bbd850d Update more names in docs 2018-08-20 17:23:38 -07:00
fragosti
83a36bc4b6 Improve documentation 2018-08-20 17:18:08 -07:00
fragosti
1c95f685bb Pin sra-report to 0xproject/connect v1.0.4 2018-08-20 16:56:57 -07:00
fragosti
e45d320fc5 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/connect/sra-api-v2 2018-08-20 16:50:24 -07:00
Francesco Agosti
dd2e54d60d Merge pull request #987 from 0xProject/feature/add-sra-to-readme
Add sra-api to README
2018-08-20 16:34:12 -07:00
Brandon Millman
64eac5f37f Merge pull request #990 from 0xProject/feature/website/update-onboarding-lock-image
[Website] Update lock icon in onboarding
2018-08-20 16:25:53 -07:00
Alex Browne
78ed6e0339 Merge pull request #989 from 0xProject/fix/sol-cov-incorrect-files
fix(sol-cov): Remove old files and update config.contractsDir
2018-08-20 14:25:36 -07:00
Brandon Millman
79aff1c57a Update lock icon in onboarding 2018-08-20 14:25:31 -07:00
Amir Bandeali
a21bfc5f2c Merge pull request #976 from feuGeneA/remove-v2-artifacts
[migrations, 0x.js, contract-wrappers, fill-scenarios, order-utils, order-watcher] remove v2 contract artifacts
2018-08-20 14:23:44 -07:00
Alex Browne
da3dc7affc fix(sol-cov): Remove old files and update config.contractsDir 2018-08-20 13:56:55 -07:00
Brandon Millman
254d88ffa0 Add Matt Taylor to website 2018-08-20 13:56:31 -07:00
Brandon Millman
4ded591624 Merge pull request #988 from 0xProject/fix/website/build-error
[website] Revert changes to website causing it to fail building
2018-08-20 13:55:22 -07:00
Brandon Millman
2af99a1fe2 Add CODEOWNERS file 2018-08-20 13:35:55 -07:00
fragosti
135fbf67ad Apply prettir 2018-08-20 13:15:30 -07:00
F. Eugene Aumson
6405c70d07 change clean to also remove generated artifacts 2018-08-20 16:12:09 -04:00
F. Eugene Aumson
1255570b95 remove disabled scripts 2018-08-20 16:12:09 -04:00
F. Eugene Aumson
a263e7dfce remove v2 contract artifacts 2018-08-20 16:12:09 -04:00
Brandon Millman
cbe0ffb3ce Remove exit 0 from website build command 2018-08-20 12:19:26 -07:00
Brandon Millman
67b4ba2a57 Revert error renames 2018-08-20 12:18:35 -07:00
fragosti
ab71f54128 Add sra-api to README 2018-08-20 12:10:58 -07:00
fragosti
cabce8cb67 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/connect/sra-api-v2 2018-08-20 12:01:58 -07:00
fragosti
44cc5e45cc Run prettier 2018-08-20 11:53:49 -07:00
fragosti
1ae11ed8ae lint everything 2018-08-20 11:51:26 -07:00
fragosti
075e3a41c8 Update websocket for SRA v2 2018-08-20 11:42:29 -07:00
Brandon Millman
756787c61f Update yarn lock 2018-08-20 11:28:55 -07:00
Fabio Berger
b67677f476 Fix website given that it still depends on an old version of @0xproject/Types 2018-08-20 13:51:23 +01:00
Fabio Berger
b4cf69b021 Cleanup web3-wrapper and subproviders index.ts 2018-08-20 13:50:28 +01:00
Fabio Berger
d149b6cdec Cleanup connect index.ts 2018-08-20 13:49:50 +01:00
Fabio Berger
f29263c477 Cleanup contract-wrappers index.ts 2018-08-20 13:49:29 +01:00
Fabio Berger
61ef6edaa5 Change Yarn verson in README 2018-08-18 12:27:15 -07:00
Fabio Berger
fae58ca695 Merge pull request #975 from 0xProject/feature/contract-wrappers/executeTransaction
[Contract-wrappers] Exchange execute transaction encoder
2018-08-18 12:23:16 -07:00
Jacob Evans
1c68057999 Rename to Transaction Encoder.
Add tests for all encoding methods.
2018-08-18 09:32:29 +10:00
Fabio Berger
fb637d9234 Make sure we don't render protected properties 2018-08-17 16:09:04 -07:00
Fabio Berger
0f7ced3625 Make sure export isn't internal to the package 2018-08-17 14:12:23 -07:00
Fabio Berger
ea4d7f153a Also ignore implementationOf 2018-08-17 14:12:04 -07:00
fragosti
f2d1d95355 Remove default query parameters 2018-08-17 13:58:55 -07:00
Amir Bandeali
ddf85112d7 Merge pull request #933 from 0xProject/refactor/contracts/tokens
[contracts] Refactor token implementations
2018-08-17 13:28:01 -07:00
Fabio Berger
05ce002435 Refactor DocGenerateAndUploadUtils to be a class, and decompose large methods for readability 2018-08-17 12:53:27 -07:00
fragosti
48ec78d3aa Add networkId request param option 2018-08-17 10:43:44 -07:00
Amir Bandeali
e35788e2c8 Update artifacts 2018-08-16 17:32:20 -07:00
Amir Bandeali
8bce73dc67 Fix typos, run prettier, and allow anyone to call on DummyERC721Token 2018-08-16 17:32:16 -07:00
Amir Bandeali
c13f538400 Update CHANGELOGs 2018-08-16 17:31:21 -07:00
Amir Bandeali
09d3d15db0 Fix Geth tests 2018-08-16 17:31:21 -07:00
Amir Bandeali
633e6c38c8 Fix linting errors 2018-08-16 17:31:21 -07:00
Amir Bandeali
a4d6bc3190 Fix tests that assumed logs were being filtered 2018-08-16 17:31:21 -07:00
Amir Bandeali
0b9a9d92af Add tests for ERC721Token 2018-08-16 17:31:21 -07:00
Amir Bandeali
a82e36c1d4 Add ERC721Receiver that returns incorrect value 2018-08-16 17:31:21 -07:00
Amir Bandeali
61ba012b1f Add ERC721 revert reasons to types 2018-08-16 17:31:21 -07:00
Amir Bandeali
aeb9ffbf5a Store methodId and number of indexed args in AbiDecoder to differentiate between events with same function signature 2018-08-16 17:31:21 -07:00
Amir Bandeali
6dde6d7cb7 Increase max mintable amount 2018-08-16 17:31:21 -07:00
Amir Bandeali
1d70724bcf Fix DummyERC721Receiver 2018-08-16 17:31:21 -07:00
Amir Bandeali
77c87cd009 Update artifacts 2018-08-16 17:31:21 -07:00
Amir Bandeali
4dd59a370d Add tests for ERC20 token with no return values 2018-08-16 17:31:21 -07:00
Amir Bandeali
7a6e647386 Add constructor back to DummyERC721Token 2018-08-16 17:31:21 -07:00
Amir Bandeali
f5459164d2 Restructure directories 2018-08-16 17:31:21 -07:00
Amir Bandeali
2743eee044 Update checking for erc721 existence 2018-08-16 17:31:21 -07:00
Amir Bandeali
bb3c345891 Update ERC20Token 2018-08-16 17:31:21 -07:00
Amir Bandeali
0f3201d72a Optimize ERC721Token 2018-08-16 17:31:21 -07:00
Alex Browne
8131a87046 Merge pull request #978 from 0xProject/feature/lenra-3.0.0-beta.25
feat: Update lerna to version 3.0.0-beta.25 of our fork
2018-08-16 17:10:28 -07:00
fragosti
64a85dfb9c Rename websocket files and types 2018-08-16 17:03:11 -07:00
Fabio Berger
68d7eb5712 Fix comment 2018-08-16 17:02:47 -07:00
Fabio Berger
f7375fca98 Move doc configs to a separate file 2018-08-16 17:02:37 -07:00
fragosti
e079790f7f Use uuid as string for requestId 2018-08-16 16:51:55 -07:00
Fabio Berger
2604d40751 Merge pull request #965 from feuGeneA/sol-compile-lot
[sol-compiler] Compile in batches rather than one at a time
2018-08-16 16:42:37 -07:00
fragosti
89174cd63f Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/connect/sra-api-v2 2018-08-16 16:08:02 -07:00
fragosti
8cb1d2a0af Update changelogs 2018-08-16 16:05:34 -07:00
F. Eugene Aumson
c1ec849554 Merge branch 'development' into sol-compile-lot 2018-08-16 15:32:09 -07:00
Fabio Berger
def575b995 Remove outdating comment 2018-08-16 15:31:43 -07:00
dependabot[bot]
d0d6a6a500 Merge pull request #970 from 0xProject/dependabot/npm_and_yarn/copy-webpack-plugin-4.5.2 2018-08-16 22:30:15 +00:00
F. Eugene Aumson
445177bf42 move doesFileExist to fsWrapper 2018-08-16 15:26:20 -07:00
Fabio Berger
a4c3a0d39f Undo prettier 2018-08-16 15:15:30 -07:00
Fabio Berger
7c08f6d30a Update yarn.lock 2018-08-16 15:13:28 -07:00
Fabio Berger
0337b5a401 Merge development 2018-08-16 15:10:12 -07:00
dependabot[bot]
4d81ab679d Bump copy-webpack-plugin from 4.5.1 to 4.5.2
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 4.5.1 to 4.5.2.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v4.5.1...v4.5.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-16 22:09:01 +00:00
Fabio Berger
72752bcb68 Merge pull request #928 from 0xProject/dependabot/npm_and_yarn/copyfiles-2.0.0
Bump copyfiles from 1.2.0 to 2.0.0
2018-08-16 15:05:47 -07:00
Fabio Berger
e47e9c5b34 Fix external exports section name 2018-08-16 15:01:52 -07:00
F. Eugene Aumson
402ca27fbf change some *Sync to *Async 2018-08-16 15:01:33 -07:00
Fabio Berger
8e3df2b5ae Render external dep exports 2018-08-16 14:57:45 -07:00
Fabio Berger
bf9ee82d9f Remove stray console log 2018-08-16 13:59:50 -07:00
Fabio Berger
ae7bce7674 Add links for external dep exports to docJson 2018-08-16 13:56:29 -07:00
Fabio Berger
7d09a94428 Remove unused ContractWrapper export 2018-08-16 13:50:03 -07:00
Alex Browne
b7079e9616 feat: Update lerna to version 3.0.0-beta.25 of our fork 2018-08-16 13:20:07 -07:00
F. Eugene Aumson
85427a84df clarify variable names for artifact mod times 2018-08-16 11:17:57 -07:00
F. Eugene Aumson
a59f18927d flatten out interface to verifyAndPersist* method 2018-08-16 10:57:31 -07:00
F. Eugene Aumson
a607a61bde clarify iteration range 2018-08-16 10:48:33 -07:00
F. Eugene Aumson
421a7394df scrap comments in favor of self-documentation 2018-08-16 10:47:33 -07:00
F. Eugene Aumson
acb3c0d0aa declare contractData before adding to map 2018-08-16 10:42:03 -07:00
F. Eugene Aumson
11231795cd change return Promise<void> to await... 2018-08-16 10:32:27 -07:00
F. Eugene Aumson
6b6b368bf6 consolidate binPaths... ref's into fullSolcVersion 2018-08-16 10:29:36 -07:00
Fabio Berger
60f026e6fd Export Web3ProviderEngine directly instead of indirectly via subproviders 2018-08-16 08:45:43 -07:00
Jacob Evans
36668f9409 [Contract-wrappers] Exchange execute transaction encoder 2018-08-16 16:51:55 +10:00
Jacob Evans
480d28ea26 Merge pull request #959 from 0xProject/bug/order-utils/rounding-error-small-maker
[Order-utils] Order is valid when maker amount is very small
2018-08-16 12:13:27 +10:00
Jacob Evans
88c99396a2 Rename OrderAlreadyCancelledOrFilled -> OrderCancelled.
Remove try catch of throwing errors in favour of returning the Errors in a OrderValidationResult
2018-08-16 11:12:35 +10:00
fragosti
ca5e52920d Add fee recipients test 2018-08-15 17:52:13 -07:00
fragosti
30dfb7511d All previous tests passing 2018-08-15 17:36:54 -07:00
fragosti
1c87e5f698 Get orders async tests passing 2018-08-15 17:31:39 -07:00
F. Eugene Aumson
badcb35525 extract method _shouldCompile() 2018-08-15 17:22:35 -07:00
fragosti
c325d638c9 getAssetPairsAsync tests passing 2018-08-15 17:18:19 -07:00
Fabio Berger
baab0f27b5 Check for superfluous types in a packages index.ts and throw if they exist 2018-08-15 16:50:23 -07:00
Fabio Berger
9e7657ac5d Improve Error external link 2018-08-15 16:38:30 -07:00
Fabio Berger
237bac920a Remove unused types from 0x.js index.ts discovered 2018-08-15 16:38:07 -07:00
F. Eugene Aumson
89202b7bdf clarify recompilation tests 2018-08-15 16:01:57 -07:00
F. Eugene Aumson
20ac6936ac change .rejectedWith(error) to .rejected() 2018-08-15 16:01:04 -07:00
F. Eugene Aumson
976d159e52 follow chai_setup pattern 2018-08-15 15:51:25 -07:00
fragosti
e7f19e350e Project now builds 2018-08-15 15:10:39 -07:00
fragosti
41768617a9 Update test fixtures 2018-08-15 14:41:09 -07:00
F. Eugene Aumson
455c78dfb1 renamed variable compiled to compilerOutput 2018-08-15 14:09:57 -07:00
F. Eugene Aumson
ec41e314b0 use for...of _.keys instead of for...in 2018-08-15 13:39:33 -07:00
F. Eugene Aumson
8959b0993e raise error for unknown compiler version 2018-08-15 13:38:41 -07:00
F. Eugene Aumson
7c96fa45f8 comments 2018-08-15 13:10:49 -07:00
F. Eugene Aumson
ad9a7d72ce remedy missing *IfExists identifier suffix 2018-08-15 13:10:45 -07:00
F. Eugene Aumson
558286467b extract interfaces for re-used complex data types 2018-08-15 12:53:41 -07:00
F. Eugene Aumson
f0f94f199e move getSolcAsync to static private method 2018-08-15 12:53:33 -07:00
Fabio Berger
6e74d1519b Add externalTypeToLink to docJson 2018-08-15 11:37:06 -07:00
Fabio Berger
a8d44ccc48 Move external types to link mapping to doc generation util and refactor typedocUtils to be a class to avoid excessive param passing 2018-08-15 11:36:45 -07:00
F. Eugene Aumson
d744468479 rename variable inputsByVersion to versionToInputs 2018-08-15 11:21:46 -07:00
F. Eugene Aumson
c01810f0d7 move getSolcAsync to static private method 2018-08-15 11:13:09 -07:00
Jacob Evans
622509c508 [Order-utils] Order is valid when maker amount is very small
Previously our min fillable calculation would throw a rounding error
when encountering a valid order (with a small maker amount). This was
inconsistent with the on-chain logic which allowed this order to be
filled.
2018-08-15 13:06:32 +10:00
fragosti
bb992f8a49 Update parsing code 2018-08-14 19:16:36 -07:00
F. Eugene Aumson
c11d805469 Update changelog 2018-08-14 18:02:39 -07:00
Fabio Berger
3b8a343711 Add version to our custom DocJson format 2018-08-14 17:55:38 -07:00
Fabio Berger
83e3bb899e Move purging private underscored items to the doc json generation phase 2018-08-14 17:41:03 -07:00
F. Eugene Aumson
bb4558e0be test compiler 2018-08-14 17:40:31 -07:00
fragosti
3eeb9ddfa6 Update connect json-schemas 2018-08-14 17:31:19 -07:00
Fabio Berger
cb5d8d75bf Link class reference types exported in same package to their declaration 2018-08-14 17:24:48 -07:00
Fabio Berger
267078ed6c Remove duplicate Typescript import 2018-08-14 17:23:36 -07:00
fragosti
80e5127a46 Update types and add missing param to SRA spec 2018-08-14 17:16:03 -07:00
Fabio Berger
19e17ba128 Add ability to hide specific class constructors 2018-08-14 16:34:48 -07:00
Fabio Berger
04e00e0c28 Improve missing type detection 2018-08-14 16:34:21 -07:00
Fabio Berger
8bebffb147 Flesh out 0x.js index.ts and added some exports to other index.ts in the process 2018-08-14 16:25:37 -07:00
fragosti
5c40c466f6 Update json-schemas, update HTTPClient types 2018-08-14 16:06:09 -07:00
Brandon Millman
f9f232f5d9 Merge pull request #954 from 0xProject/refactor/order-utils/market-utils-api
[order-utils] Update marketUtils api to be friendlier
2018-08-14 15:45:21 -07:00
Brandon Millman
7b7b97dd7b Merge branch 'development' into refactor/order-utils/market-utils-api
* development:
  Bump @types/fetch-mock from 5.12.2 to 6.0.3
2018-08-14 15:21:28 -07:00
dependabot[bot]
b6cdc00a31 Bump copyfiles from 1.2.0 to 2.0.0
Bumps [copyfiles](https://github.com/calvinmetcalf/copyfiles) from 1.2.0 to 2.0.0.
- [Release notes](https://github.com/calvinmetcalf/copyfiles/releases)
- [Commits](https://github.com/calvinmetcalf/copyfiles/compare/v1.2.0...v2.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-14 21:51:13 +00:00
Fabio Berger
644fe1de8f Merge in new 0x.js interface 2018-08-14 14:45:10 -07:00
fragosti
ce88086e08 Update types to reflect v2 2018-08-14 14:40:52 -07:00
Fabio Berger
1d9408a8e0 Fix additional merge conflicts 2018-08-14 14:39:59 -07:00
Fabio Berger
c743f010e3 Merge pull request #920 from 0xProject/dependabot/npm_and_yarn/@types/fetch-mock-6.0.3
Bump @types/fetch-mock from 5.12.2 to 6.0.3
2018-08-14 14:38:49 -07:00
Fabio Berger
2f2582a0da Merge development 2018-08-14 14:21:47 -07:00
fragosti
c1cc92a46f Change names of basic types in Client interface 2018-08-14 14:00:16 -07:00
Brandon Millman
9c3d10d5be Merge branch 'development' into refactor/order-utils/market-utils-api
* development:
  feat: Upgrade TypeScript to 3.0.1
  Add defaults for networkId and pagination
  Update sortingUtils to support Order and SignedOrder
  Change rateUtils to use Order
  Updated CHANGELOG
  Fix lint errors
  Update tests for optional feeRate
  Make feeRate optional with a default of 0
  Add tests for sortingUtils
  Implement sorting utils
  Add tests for rateUtils
  Implement rate utils
2018-08-14 13:48:21 -07:00
Brandon Millman
3afe405bbe Merge pull request #953 from 0xProject/feature/order-utils/order-sorting-utils
[order-utils] Add rate and sorting utilities
2018-08-14 13:45:04 -07:00
Alex Browne
7eff195d61 Merge pull request #966 from 0xProject/feature/typescript-3.0.1
feat: Upgrade TypeScript to 3.0.1
2018-08-14 11:46:08 -07:00
F. Eugene Aumson
e79c7632e6 simplify method interface 2018-08-14 11:42:06 -07:00
F. Eugene Aumson
aa27346f93 simplify method parameter 2018-08-14 11:42:06 -07:00
F. Eugene Aumson
db6de490b2 corrected whitespace (no functional changes) 2018-08-14 11:42:06 -07:00
F. Eugene Aumson
014d71d5ae compile contracts in batches
one batch per compiler version needed.
2018-08-14 11:42:06 -07:00
F. Eugene Aumson
783bc873db extract method _verifyAndPersistCompilationAsync() 2018-08-14 11:42:06 -07:00
F. Eugene Aumson
478bf14289 extract method _compile() 2018-08-14 11:42:06 -07:00
F. Eugene Aumson
d89934954d extract function getSolcAsync() 2018-08-14 11:42:06 -07:00
Alex Browne
6baa5ef311 feat: Upgrade TypeScript to 3.0.1 2018-08-14 11:02:04 -07:00
dependabot[bot]
db20ad1c5d Bump @types/fetch-mock from 5.12.2 to 6.0.3
Bumps [@types/fetch-mock](https://github.com/DefinitelyTyped/DefinitelyTyped) from 5.12.2 to 6.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-14 06:21:07 +00:00
Francesco Agosti
56eb444ea4 Merge pull request #964 from 0xProject/feature/sra-api/add-defaults
[sra-api] Add defaults for networkId and pagination
2018-08-13 23:05:37 -07:00
Brandon Millman
6a2634d362 Make marketUtils interface compatible with Order and SignedOrder 2018-08-13 21:31:23 -07:00
Brandon Millman
a2192e62df Update CHANGELOG 2018-08-13 21:31:23 -07:00
Brandon Millman
66745c5260 Remove remaining amounts that are now defaults in tests 2018-08-13 21:31:22 -07:00
Brandon Millman
c10c4cec1d Update marketUtils api 2018-08-13 21:31:22 -07:00
Fabio Berger
f2d9dfb56b Remove 0x.js from Circle CI 2018-08-13 20:51:04 -07:00
fragosti
228387f995 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra-api/add-defaults 2018-08-13 18:52:32 -07:00
Fabio Berger
336519a690 Add PR nr. 2018-08-13 18:50:12 -07:00
Fabio Berger
10dc3ea81c Fix merge 2018-08-13 18:49:35 -07:00
fragosti
dd7e03c7d7 Add defaults for networkId and pagination 2018-08-13 18:46:54 -07:00
Alex Browne
fadd292ecf Publish
- 0x.js@1.0.1-rc.3
 - @0xproject/abi-gen@1.0.5
 - @0xproject/assert@1.0.5
 - @0xproject/base-contract@2.0.0-rc.1
 - @0xproject/connect@1.0.5
 - @0xproject/contract-wrappers@1.0.1-rc.3
 - contracts@2.1.40
 - @0xproject/dev-utils@1.0.4
 - ethereum-types@1.0.4
 - @0xproject/fill-scenarios@1.0.1-rc.3
 - @0xproject/json-schemas@1.0.1-rc.4
 - @0xproject/metacoin@0.0.15
 - @0xproject/migrations@1.0.4
 - @0xproject/monorepo-scripts@1.0.5
 - @0xproject/order-utils@1.0.1-rc.3
 - @0xproject/order-watcher@1.0.1-rc.3
 - @0xproject/react-docs@1.0.5
 - @0xproject/react-docs-example@0.0.20
 - @0xproject/react-shared@1.0.6
 - @0xproject/sol-compiler@1.0.5
 - @0xproject/sol-cov@2.0.0
 - @0xproject/sol-resolver@1.0.5
 - @0xproject/sra-api@1.0.1-rc.4
 - @0xproject/sra-report@1.0.5
 - @0xproject/subproviders@1.0.5
 - @0xproject/testnet-faucets@1.0.41
 - @0xproject/tslint-config@1.0.5
 - @0xproject/types@1.0.1-rc.4
 - @0xproject/typescript-typings@1.0.4
 - @0xproject/utils@1.0.5
 - @0xproject/web3-wrapper@1.2.0
 - @0xproject/website@0.0.44
2018-08-13 18:34:51 -07:00
Alex Browne
7c8a7a2420 Updated CHANGELOGS 2018-08-13 18:34:37 -07:00
Brandon Millman
99b744ba52 Update sortingUtils to support Order and SignedOrder 2018-08-13 18:32:15 -07:00
Fabio Berger
c320c8742e Add CHANGELOG entry about public interface refactor 2018-08-13 18:20:45 -07:00
Fabio Berger
3a086cae1a Merge branch 'development' into refactor/0x-js-exported-interface
* development:
  fix(0x.js, order-utils): Fix CHANGELOG.json versions
2018-08-13 18:15:50 -07:00
Fabio Berger
b10cba600d Refactor 0x.js to simply re-export it's own sub-dependencies rather then wrapping them in a ZeroEx object 2018-08-13 18:10:11 -07:00
Alex Browne
3b0fa1aa87 fix(0x.js, order-utils): Fix CHANGELOG.json versions 2018-08-13 18:06:27 -07:00
Brandon Millman
d859399841 Change rateUtils to use Order 2018-08-13 17:46:43 -07:00
Fabio Berger
8169155a65 Update yarn.lock 2018-08-13 16:56:05 -07:00
Fabio Berger
952367d532 Add missing types from 0x.js index.ts 2018-08-13 16:55:52 -07:00
Fabio Berger
67666446bf Add a check to make sure types part of the exported interface are also exported from the packages index.ts 2018-08-13 16:55:37 -07:00
Fabio Berger
3d1c8dfe06 Remove old comment 2018-08-13 16:52:45 -07:00
Alex Browne
283175df98 Run publish/installation tests in CircleCI (#951)
feat(monorepo-scripts): Run publish tests in CircleCI
2018-08-13 16:49:50 -07:00
Fabio Berger
aeb368a1d9 Merge pull request #932 from 0xProject/fix-ganache-fork
Fix ganache fork
2018-08-13 19:45:01 -04:00
Jacob Evans
e51deb93ee Merge pull request #914 from 0xProject/feature/0x.js/ec-signature-string
0x.js Return signature as a hex encoded string
2018-08-14 09:36:11 +10:00
Jacob Evans
a351757493 Update version numbers.
Add source for Metamask future fix.
Consolidate switch statement to one return
2018-08-14 09:18:13 +10:00
Francesco Agosti
0025c6640b Merge pull request #958 from 0xProject/feature/sra-api/camel-case-everything
[sra-api] Enforce camelCase for all parameters and other changes.
2018-08-13 15:12:01 -07:00
Alex Browne
25a8554be1 fix(sol-compiler, sol-resolver): Bug where sol-resolver tried to read a directory (#961)
fix(sol-compiler, sol-resolver): Fix bug where sol-resolver tried to read a directory
2018-08-13 14:17:05 -07:00
Fabio Berger
cd76c129da Merge pull request #955 from feuGeneA/patch-6
[PR template] a to-do list should be in the imperative mood
2018-08-13 16:46:34 -04:00
Fabio Berger
7340338626 Merge pull request #938 from 0xProject/sol-cov-fixes
Sol cov fixes
2018-08-13 16:40:46 -04:00
Fabio Berger
9d3c287918 Merge branch 'sol-cov-fixes' of github.com:0xProject/0x-monorepo into sol-cov-fixes
* 'sol-cov-fixes' of github.com:0xProject/0x-monorepo: (49 commits)
  Add @return comments
  Import marshaller directly
  Update comment about ethers checksummed address behavior
  Add packages/coverage/.gitkeep file
  Update CI config and package.json to run @0xproject/utils tests on CI
  Update remaining CHANGELOG.json files
  Change amir picture
  Update CHANGELOG.json for contract-wrappers
  Update ethers typings for TypeScript 2.9.2
  Update CHANGELOG.json for base-contract
  Move some ethers-related types to typescript-typings/ethers
  Apply prettier
  Add strictArgumentEncodingCheck to BaseContract and use it in contract templates
  fix(monorepo-scripts): Fix typo in git tag command
  feat(monorepo-scripts): Add confirmation prompt before publishing
  fix comments and styling for MixinSignatureValidator
  Update TypeScript to version 2.9.2
  Use asm for hashEIP712Message, increment free memory pointer after asm hashing functions
  Fix comments, styling, and optimize hashOrder
  Remove assertion comments
  ...
2018-08-13 13:01:32 -07:00
Fabio Berger
c2b5fe3d84 Remove test for unknown prop now that we are allowing additional props fro txData 2018-08-13 13:01:10 -07:00
fragosti
5ef84d61fa Ignore api.json in prettier 2018-08-13 12:58:15 -07:00
fragosti
58321a36dc apply prettier 2018-08-13 11:45:13 -07:00
Jacob Evans
ca4905c343 Rename from SignerProviderType.EthSign to SignerType.Default 2018-08-11 18:27:21 +10:00
fragosti
b6d793aec4 Enforce camelCase for all parameters and change the way the site is deployed and hosted 2018-08-10 15:56:47 -07:00
F. Eugene Aumson
83fb9df63d a to-do list should be in the imperative mood 2018-08-10 00:34:31 -07:00
Amir Bandeali
083319786f Merge pull request #948 from 0xProject/feature/contracts/forwarderFoK
[contracts] Make marketBuy functions revert if entire amount not filled
2018-08-09 17:22:56 -07:00
Francesco Agosti
719699eb30 Merge pull request #916 from 0xProject/feature/sra/add-sra-package
Add the sra-api package (OpenAPI Spec)
2018-08-09 17:02:43 -07:00
fragosti
889ec81ff3 Fix order-watcher json-schemas 2018-08-09 16:43:16 -07:00
fragosti
2f66f26048 Fix linting issues 2018-08-09 16:41:43 -07:00
fragosti
713f285f37 fix contract-wrappers json-schemas 2018-08-09 16:22:20 -07:00
Brandon Millman
ab64ea7377 Updated CHANGELOG 2018-08-09 19:20:07 -04:00
Brandon Millman
b86210332f Fix lint errors 2018-08-09 19:12:42 -04:00
Brandon Millman
af52598d32 Update tests for optional feeRate 2018-08-09 19:12:42 -04:00
Brandon Millman
cbe639866e Make feeRate optional with a default of 0 2018-08-09 19:12:42 -04:00
Brandon Millman
fcd57d2743 Add tests for sortingUtils 2018-08-09 19:12:42 -04:00
Brandon Millman
c0924d8067 Implement sorting utils 2018-08-09 19:12:42 -04:00
Brandon Millman
a1860b076d Add tests for rateUtils 2018-08-09 19:12:42 -04:00
Brandon Millman
32ab4dcac7 Implement rate utils 2018-08-09 19:12:42 -04:00
fragosti
938a99f435 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package 2018-08-09 15:57:12 -07:00
Alex Browne
f97ec000e1 Merge pull request #949 from 0xProject/fix/update-dependencies
fix: Update dependencies
2018-08-09 14:22:16 -07:00
Amir Bandeali
1b5c5e7a3b Change withdrawERC20 => withdrawAsset, reuse transfer logic 2018-08-09 14:07:27 -07:00
fragosti
c804e2230d Update Clays linkedin 2018-08-09 12:25:26 -07:00
fragosti
3f610d4865 Merge https://github.com/0xProject/0x-monorepo into development 2018-08-09 12:15:30 -07:00
fragosti
8404e0e73f Add clay to website 2018-08-09 12:15:18 -07:00
fragosti
b2c666bb1f Apply prettier 2018-08-09 11:42:05 -07:00
Alex Browne
f3761af567 fix: Update dependencies 2018-08-09 11:35:54 -07:00
Amir Bandeali
b9d8d2d5e3 Make marketBuy functions revert if entire amount not filled 2018-08-09 11:26:32 -07:00
Amir Bandeali
b60a74c8bc Merge pull request #941 from 0xProject/feature/contracts/returnValuesTests
[contracts] Test fillOrder return values and abiEncodeFillOrder
2018-08-09 10:39:14 -07:00
fragosti
0113ecee96 Change scripts folder to build_scripts 2018-08-09 10:13:37 -07:00
fragosti
eb20e86947 Force case change in file 2018-08-09 09:39:29 -07:00
Leonid Logvinov
15e15f994a Merge branch 'development' into sol-cov-fixes 2018-08-09 17:03:41 +02:00
Leonid Logvinov
d44ff6a915 Add @return comments 2018-08-09 17:02:13 +02:00
Leonid Logvinov
68605ca261 Import marshaller directly 2018-08-09 17:00:05 +02:00
Jacob Evans
5d4dd406f2 Update Changelogs. Rebased from development 2018-08-09 12:05:17 +10:00
Jacob Evans
9dd6ba7825 Update jsdoc 2018-08-09 12:02:17 +10:00
Jacob Evans
45e9fbe8f9 Introduce SignerProviderType
This allows the developer to indicate the nuanced signer provider. Some have different implementations (trezor, ledger) and others have different implementations (metamask). Breaking the abstraction of eth_sign. EthSign assumes a spec compliant implementation and can be used as a default
2018-08-09 12:02:12 +10:00
Alex Browne
53713188fe Merge pull request #915 from 0xProject/feature/encode-decode-checks
Add strictArgumentEncodingCheck to BaseContract and use it in contract templates
2018-08-08 18:28:15 -07:00
Alex Browne
c4c37cafa0 Update comment about ethers checksummed address behavior 2018-08-08 17:58:04 -07:00
Alex Browne
5b7774f9d0 Add packages/coverage/.gitkeep file 2018-08-08 17:33:20 -07:00
Alex Browne
ca7d8a8940 Update CI config and package.json to run @0xproject/utils tests on CI 2018-08-08 16:47:36 -07:00
Alex Browne
762bbe9bcd Update remaining CHANGELOG.json files 2018-08-08 16:44:52 -07:00
fragosti
03fb73d1d2 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into development 2018-08-08 15:50:59 -07:00
Amir Bandeali
d10e2652ae Revert incrementing memory ptr in dispatchTransferFrom 2018-08-08 15:44:43 -07:00
Amir Bandeali
9a5d7b7635 Test abiEncodeFillOrder as part of combinatorial follOrder tests 2018-08-08 15:44:43 -07:00
Amir Bandeali
1fb3da6b53 Increment free memory pointer for internal Exchange functions that use asm 2018-08-08 15:44:43 -07:00
Amir Bandeali
970bef717e Add return values to combinatorial fillOrder tests 2018-08-08 15:44:43 -07:00
fragosti
2a85f79040 Change amir picture 2018-08-08 15:42:09 -07:00
Amir Bandeali
651a468b44 Merge pull request #946 from 0xProject/fix/contracts/signatureValidatorComments
[contracts] Fix comments and styling for MixinSignatureValidator
2018-08-08 15:35:34 -07:00
fragosti
5e8ad0aef4 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package 2018-08-08 15:12:10 -07:00
Alex Browne
44d909c0c7 Update CHANGELOG.json for contract-wrappers 2018-08-08 14:54:35 -07:00
Alex Browne
44b01f2069 Update ethers typings for TypeScript 2.9.2 2018-08-08 14:52:05 -07:00
fragosti
d7d51791a6 Remove md hints because the static site cannot handle them 2018-08-08 14:50:06 -07:00
fragosti
9e3fe7092b Add section about json-schemas and sra report 2018-08-08 14:47:43 -07:00
fragosti
083d42c8f7 Fix links in markdown 2018-08-08 14:36:38 -07:00
fragosti
6121a6d2bf Add to changelog and fix OrderBook typo 2018-08-08 14:28:09 -07:00
Alex Browne
09af23f950 Update CHANGELOG.json for base-contract 2018-08-08 14:27:30 -07:00
Alex Browne
52e094addc Move some ethers-related types to typescript-typings/ethers 2018-08-08 14:27:30 -07:00
Alex Browne
6a6739ebbe Apply prettier 2018-08-08 14:27:30 -07:00
Alex Browne
6a5965d73b Add strictArgumentEncodingCheck to BaseContract and use it in contract templates 2018-08-08 14:27:30 -07:00
Alex Browne
19cda0eb03 Merge pull request #947 from 0xProject/feature/confirm-before-publish
Add confirmation prompt before publishing
2018-08-08 14:23:52 -07:00
fragosti
cc67c0df51 Correct orderbook typo 2018-08-08 14:18:24 -07:00
fragosti
76b91cbcda Enforce that error code are ints not number 2018-08-08 14:16:59 -07:00
Alex Browne
13f0d27f7c Merge pull request #945 from 0xProject/fix/typescript-2.9.2
Update TypeScript to version 2.9.2
2018-08-08 14:12:18 -07:00
Alex Browne
5ccf41c566 fix(monorepo-scripts): Fix typo in git tag command 2018-08-08 14:01:57 -07:00
Alex Browne
797fd38e00 feat(monorepo-scripts): Add confirmation prompt before publishing 2018-08-08 14:01:12 -07:00
fragosti
9aacceb0e4 Remove tests directory, use swagger api, make json api compliant 2018-08-08 14:00:50 -07:00
Amir Bandeali
68fb1bf376 fix comments and styling for MixinSignatureValidator 2018-08-08 13:58:29 -07:00
Amir Bandeali
a6ccfaf9ca Merge pull request #925 from 0xProject/refactor/contracts/hashing
[contracts] Fix comments, styling and small optimization for hashOrder
2018-08-08 13:48:31 -07:00
fragosti
c9e1b7c5dc Change remainingFillableAmount to metaData 2018-08-08 11:57:16 -07:00
Alex Browne
6e2e658162 Update TypeScript to version 2.9.2 2018-08-08 11:27:38 -07:00
Amir Bandeali
149c07dfd2 Use asm for hashEIP712Message, increment free memory pointer after asm hashing functions 2018-08-08 11:15:38 -07:00
Fabio Berger
9f42ceb5a3 Split publish_utils since it was becoming too big and unwieldy 2018-08-08 09:47:06 -04:00
Fabio Berger
386b5bb122 Add back hashSpy 2018-08-08 09:33:20 -04:00
Fabio Berger
ca67e7d36f Remove console.log 2018-08-08 09:32:32 -04:00
Fabio Berger
d49af66add Add additional special-case acronym 2018-08-08 09:32:14 -04:00
fragosti
853b5aa38b Change some static side configs 2018-08-07 18:18:37 -07:00
fragosti
4e30bc3e16 Add POST order endpoint 2018-08-07 17:58:38 -07:00
fragosti
95b656f360 Add GET fee_recipients 2018-08-07 17:42:52 -07:00
fragosti
b0a7db81cb Add GET order_config 2018-08-07 16:52:34 -07:00
fragosti
e6c91493f2 token_pairs -> asset_pairs 2018-08-07 16:26:25 -07:00
fragosti
3771df728c Add GET OrderBook endpoint 2018-08-07 16:24:31 -07:00
fragosti
f6dbc23995 Add GET order endpoint spec 2018-08-07 16:10:59 -07:00
fragosti
f36a43a83f Add orders endpoint 2018-08-07 15:39:33 -07:00
fragosti
f4c2fabbf8 Minor refactoring 2018-08-07 15:03:52 -07:00
Amir Bandeali
3d6cf50364 Fix comments, styling, and optimize hashOrder 2018-08-07 14:34:28 -07:00
fragosti
0a616ad3b8 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package 2018-08-07 13:52:53 -07:00
fragosti
57a4429123 Add discharge config and deploy 2018-08-07 13:50:56 -07:00
fragosti
3b542bf356 Add static site build 2018-08-07 13:36:59 -07:00
fragosti
be472b61e7 Add markdown section 2018-08-07 13:22:11 -07:00
Brandon Millman
8199e87943 Merge pull request #937 from 0xProject/feature/contract-wrappers/forwarder-estimation-utils
Add marketUtils object for assisting with market buy calculations
2018-08-06 16:36:32 -04:00
Brandon Millman
35201af4b1 Remove assertion comments 2018-08-06 16:35:49 -04:00
Fabio Berger
1a89905ab9 Remove hash spy for now 2018-08-06 15:39:21 -04:00
Fabio Berger
b2b3c24fd2 Remove console.log 2018-08-06 15:39:11 -04:00
Fabio Berger
bc5835229d Remove stray console log 2018-08-06 15:31:52 -04:00
Fabio Berger
6182d2c7f6 Pass in typeDefinitionByName so that type declarations also link to inner-types and show the popover 2018-08-06 15:28:21 -04:00
Fabio Berger
af90a777c6 Update types 2018-08-06 15:27:39 -04:00
Fabio Berger
fdcb42d8e1 Fix bug where we only rendered one TypeDoc JSON key per export, instead of all of them 2018-08-06 15:27:28 -04:00
Fabio Berger
4e6322beb5 Add missing type exports 2018-08-06 15:26:39 -04:00
Fabio Berger
6e122691d1 Fix bug related to react-scroll's scrollSpy and the render order of elements 2018-08-06 11:57:56 -04:00
Fabio Berger
ea5684e054 Remove unused imports 2018-08-06 11:01:12 -04:00
Fabio Berger
50bbd793c6 Fix key 2018-08-06 10:55:19 -04:00
Fabio Berger
a1a777e715 Add missing type 2018-08-06 10:49:17 -04:00
Fabio Berger
d234ee12de Update yarn.lock 2018-08-06 10:49:11 -04:00
Fabio Berger
50e0ddcf79 Update dep 2018-08-06 10:49:02 -04:00
Fabio Berger
da304de3fc Re-order deps 2018-08-06 10:48:45 -04:00
Fabio Berger
ff3c77f7c4 Remove stray console.lgos 2018-08-06 10:48:18 -04:00
Brandon Millman
0bc775cdb8 Remove 0x test case from hexSchema test 2018-08-05 21:02:10 -04:00
Brandon Millman
2273798df9 Update CHANGELOGs 2018-08-05 20:58:57 -04:00
Brandon Millman
7d0bec9b2a Add some test cases that stress slippageBufferAmount param 2018-08-05 20:54:29 -04:00
Brandon Millman
8382161f75 Add tests for findFeeOrdersThatCoverFeesForTargetOrders 2018-08-05 20:48:56 -04:00
Brandon Millman
bc5f8e52de Change orderStates param name to remaingFillableMakerAssetAmounts 2018-08-05 18:33:52 -04:00
Brandon Millman
09c0fc94fc Implement first round of tests for findOrdersThatCoverMakerAssetFillAmount 2018-08-05 18:33:52 -04:00
Brandon Millman
e5d65b585a Update hex schema to match 0x 2018-08-05 18:33:52 -04:00
Brandon Millman
d9933237a0 Move helper functions into order-utils 2018-08-05 18:33:52 -04:00
Brandon Millman
a016747c36 Add findFeeOrdersThatCoverFeesForTargetOrders to ForwarderWrapper 2018-08-05 18:33:52 -04:00
Brandon Millman
1c06380ef5 Add findOrdersThatCoverMakerAssetFillAmount static method on ForwarderWrapper 2018-08-05 18:33:52 -04:00
Brandon Millman
47fef1f8ff Merge pull request #936 from 0xProject/feature/contract-wrappers/forwader-optimizations
ForwarderWrapper order optimizations
2018-08-05 17:47:42 -04:00
Brandon Millman
3cb955c136 Move CreateOrderOpts into shared types 2018-08-05 17:15:58 -04:00
Brandon Millman
47673ba4bb Update createFactory to accept one createOrderOpts param to encompass all optional params 2018-08-05 16:54:35 -04:00
Fabio Berger
4527e9ce00 Remove prefix hack and add prefix for objectLiteral functions 2018-08-04 10:09:59 +02:00
Fabio Berger
7759e67a5a Rename EIP712Utils to eip712Utils since objectLiterals shouldn't start with caps 2018-08-04 10:09:08 +02:00
Brandon Millman
3865a081a0 Prettier 2018-08-03 16:46:55 -04:00
Fabio Berger
4d75689790 Fix commebt 2018-08-03 22:42:17 +02:00
Fabio Berger
6df8746871 Omit certain exports and re-org index.ts 2018-08-03 22:37:02 +02:00
Fabio Berger
c68e183953 Add missing sol-cov comments 2018-08-03 22:36:44 +02:00
Fabio Berger
f42119c928 Add missing compiler comments 2018-08-03 22:36:32 +02:00
Fabio Berger
30be039570 Add missing comments 2018-08-03 22:24:42 +02:00
Brandon Millman
d00ee5df0d Fix CHANGELOGs 2018-08-03 16:04:59 -04:00
Brandon Millman
4f381ca1d9 Update orderFactory interface 2018-08-03 16:04:47 -04:00
Fabio Berger
bcc1ad2086 Re-order index.ts and add missing types 2018-08-03 21:30:57 +02:00
Fabio Berger
343cd05363 Add missing comments 2018-08-03 21:27:01 +02:00
Fabio Berger
d9f09b5e1e Make rendering of individually exported functions lighter-weight 2018-08-03 19:45:09 +02:00
Fabio Berger
9337d207a1 Stop exporting constants from order-utils 2018-08-03 19:41:55 +02:00
Fabio Berger
c17d6c47c3 Properly render class/objectLiteral properties that are simple variables 2018-08-03 19:24:58 +02:00
Fabio Berger
a728247d6c Display camelCase names all-caps properly 2018-08-03 18:28:56 +02:00
Fabio Berger
36d615318d Omit several exports from order-utils docs 2018-08-03 17:52:09 +02:00
Fabio Berger
1588f4ac39 Stop exporting crypto 2018-08-03 17:51:58 +02:00
Fabio Berger
0e82be1bda Remove react-docs-example package and links to it 2018-08-03 17:18:18 +02:00
Fabio Berger
d85ce6ac75 Make signature_util into an object literal so related functions are rendered together in the docs 2018-08-03 17:15:14 +02:00
Fabio Berger
0d3d9dad84 Don't process functions beginning with underscores 2018-08-03 17:14:14 +02:00
Fabio Berger
b8c8258404 Don't render object literal properties that start with underscore since are private 2018-08-03 17:13:38 +02:00
Fabio Berger
3ee3fc2fb3 Add missing doc comments 2018-08-03 17:13:10 +02:00
Leonid Logvinov
bb4d15005a Add comments 2018-08-03 16:45:26 +02:00
Leonid Logvinov
477c3dc4f6 Add PR numbers 2018-08-03 16:28:00 +02:00
Leonid Logvinov
81f689e693 Add sol-cov CHANGELOG 2018-08-03 13:57:19 +02:00
Leonid Logvinov
e80fa6e311 Read truffle compiler config from truffle.js and assert that the passed solidity version matches the one in artifacts 2018-08-03 13:42:47 +02:00
Leonid Logvinov
c94168981c Use CallDataRPC in subprovider 2018-08-03 13:42:05 +02:00
Leonid Logvinov
749ec0cefe Add a TODO for failed transactions 2018-08-03 13:38:40 +02:00
Leonid Logvinov
bd488020df Export RPC data types from web3-wrapper 2018-08-03 13:36:16 +02:00
Leonid Logvinov
ab398751e1 Alow additional properties in txData json-schema 2018-08-03 13:34:40 +02:00
Leonid Logvinov
74d5f2f0b9 Export marshaller from web3-wrapper 2018-08-03 13:32:45 +02:00
Fabio Berger
10f6647ab3 Add missing types to web3-wrapper index.ts 2018-08-03 13:27:20 +02:00
Fabio Berger
406b7c33f5 Re-order subproviders index.ts and add missing types 2018-08-03 13:27:08 +02:00
Fabio Berger
13520dbd94 Add missing types to sol-cov index.ts 2018-08-03 13:02:29 +02:00
Fabio Berger
d136df7679 Color-code basic type arrays orange aswell 2018-08-03 13:02:14 +02:00
Fabio Berger
8c96a31152 Fix sol-compiler doc configs 2018-08-03 12:40:47 +02:00
Fabio Berger
d4bd4ec441 Add comments for types and unnest type declarations 2018-08-03 12:40:35 +02:00
Fabio Berger
e4aed98a3d Add missing type exports 2018-08-03 12:40:01 +02:00
Fabio Berger
4a2a22a43b Refactor logic for clarity 2018-08-03 11:44:50 +02:00
Fabio Berger
47584b18e9 Fix-up Order-utils doc page 2018-08-03 11:14:16 +02:00
Fabio Berger
6dd656bdfc Add OrderWatcher docs page 2018-08-03 11:14:01 +02:00
fragosti
260640feed Refactor using some utility methods 2018-08-02 20:19:50 -07:00
fragosti
36e7cb16aa Add errors and headers 2018-08-02 18:24:24 -07:00
fragosti
0390a5ecbf Limit error codes with ranges 2018-08-02 18:08:36 -07:00
Brandon Millman
82092ab50a Rename to calldata utils 2018-08-02 16:03:19 -07:00
Brandon Millman
c3e6be7956 Add missing PR numbers 2018-08-02 15:53:02 -07:00
fragosti
1ce6579c3a Create asset_pairs SRA endpoint (and establish conventions) 2018-08-02 15:25:40 -07:00
Fabio Berger
b5d98a2803 Fix link in 0x.js intro 2018-08-02 21:09:48 +02:00
Fabio Berger
c7a5b8c776 Add MD sections to contract-wrappers docs 2018-08-02 21:09:38 +02:00
Fabio Berger
90ead59d34 Add support for rendering nested IndexSignatures 2018-08-02 21:09:18 +02:00
Fabio Berger
faa980ffc3 Add ability to omit rendering specific exports and also support direct exports from index.ts 2018-08-02 21:08:21 +02:00
fragosti
afc5c2616a Enforce stronger naming convention for json schema ids 2018-08-02 11:57:23 -07:00
Fabio Berger
9a3b630b19 prettier 2018-08-02 17:27:29 +02:00
Fabio Berger
b3473ff89f Remove unused var 2018-08-02 17:27:10 +02:00
Fabio Berger
987971bd59 Fix bug where if there were multiple matches, it wouldn't always take the longest match 2018-08-02 17:26:53 +02:00
Fabio Berger
71a2f2d721 We need to always include the globals.d.ts otherwise TS complains about .json imports 2018-08-02 17:25:18 +02:00
Brandon Millman
6e74896620 CHANGELOG 2018-08-01 20:49:10 -07:00
Brandon Millman
30c6fe08ec Add tests 2018-08-01 20:47:59 -07:00
Brandon Millman
7c864b81e0 Add createOrder with no signing to orderFactory 2018-08-01 20:47:59 -07:00
Brandon Millman
4f006fdc5c Create marketBuyOrdersOptimizations 2018-08-01 20:23:44 -07:00
Brandon Millman
9f7f61085c Update contract-wrappers CHANGELOG.json 2018-08-01 15:29:47 -07:00
Brandon Millman
2414b47a30 Merge pull request #934 from 0xProject/feature/contract-wrappers/forwader
Initial forwarder contract wrapper
2018-08-01 15:26:45 -07:00
Fabio Berger
238eef6bae Fix connect docs 2018-08-02 00:01:23 +02:00
Fabio Berger
b92b745ab7 Don't ignore compiler errors 2018-08-02 00:01:16 +02:00
Fabio Berger
0132286cab Add contract-wrappers page and make topBar component more concise 2018-08-02 00:01:02 +02:00
fragosti
f8a252d142 All schema tests padding 2018-08-01 13:55:16 -07:00
fragosti
962d6e71b6 update orders channel subscribe schema 2018-08-01 13:52:40 -07:00
fragosti
48aaf22855 Update order book schema test 2018-08-01 13:34:10 -07:00
fragosti
8351f5998a Add relayerApiOrdersResponseTest 2018-08-01 13:27:01 -07:00
Fabio Berger
2494af99aa Prefix menu and sections with markdown as that is all the should now be defined 2018-08-01 21:00:45 +02:00
Fabio Berger
e5b93d1f02 Add callpath to properties 2018-08-01 20:48:19 +02:00
fragosti
86eafeb826 Add tests for asset pair endpoint 2018-08-01 11:44:59 -07:00
Fabio Berger
32e1c2ac97 Add padding above anchor titles so they show up nice when scrolled to 2018-08-01 19:02:20 +02:00
Fabio Berger
5e3bbbbb3c Use our fork of react-scroll that fixes scrolling within an absolutely positioned div to work correctly. See: https://github.com/fisshy/react-scroll/pull/330 2018-08-01 18:56:31 +02:00
Fabio Berger
3bdf6004ca Start refactoring docs to remove unnecessary configs given more concise TypeDoc JSON 2018-08-01 17:36:37 +02:00
Fabio Berger
11869122b4 Update React-scroll, getting rid of the need to manually set the url hash 2018-08-01 17:33:28 +02:00
Fabio Berger
9b24459108 Add /src/artifacts in order-utils to gitignore 2018-08-01 17:29:24 +02:00
Fabio Berger
c5fbc5c991 Also add artifacts to src 2018-08-01 17:28:48 +02:00
Fabio Berger
0413e3e77f Change order of index.ts since it not dictates to ordering of the docs 2018-08-01 17:27:33 +02:00
Fabio Berger
92fda0a940 Remove unused dep so that it's not re-compiled onWatcher 2018-08-01 17:27:10 +02:00
fragosti
63e088730a Group all standard relayer api tests together 2018-07-31 17:46:57 -07:00
fragosti
a78d35f84e Add test for relayerApiOrderSchema 2018-07-31 17:22:26 -07:00
fragosti
63e869f6d0 Add paginated collection test case 2018-07-31 17:04:22 -07:00
fragosti
4aff9515d8 Get schema tests running (not crashiing) 2018-07-31 16:37:51 -07:00
Leonid Logvinov
6f0daa5463 Add the CHANGELOG entry for #909 2018-07-31 15:28:17 +02:00
Leonid Logvinov
a658aaaf30 Merge pull request #909 from joincivil/ritave/resolver-check-dirs
Fixed the relative resolver not checking if the file can be read in the
2018-07-31 14:49:50 +02:00
Leonid Logvinov
37590d5f5e Merge branch 'development' into ritave/resolver-check-dirs 2018-07-31 14:47:51 +02:00
Brandon Millman
ca1f926d6d Clarify ethAmount is in wei 2018-07-31 00:26:53 -07:00
Brandon Millman
5d44a67e62 Update forwarder_wrapper_test 2018-07-31 00:11:29 -07:00
Brandon Millman
8ed3d59f96 Add more assertions 2018-07-31 00:11:29 -07:00
Brandon Millman
bc93ff0cb5 Write initial test for forwarder_wrapper 2018-07-31 00:11:29 -07:00
Brandon Millman
44498f2263 Fix spelling error in exchange wrapper tests 2018-07-31 00:11:29 -07:00
Brandon Millman
045751a430 Add getOrdersInfo to exchange_wrapper 2018-07-31 00:11:28 -07:00
fragosti
162fe797fc Update schemas export 2018-07-30 17:53:01 -07:00
fragosti
e671563f1e Update json-schemas for SRA v1 2018-07-30 17:16:14 -07:00
Brandon Millman
a7238d0fdb Implement initial forwarder wrapper 2018-07-30 13:58:19 -07:00
Fabio Berger
2a899f5295 Move to dep 2018-07-30 22:42:22 +02:00
Fabio Berger
b7cd84fad6 Remove outdated parts of Dockerfile 2018-07-30 22:42:05 +02:00
Fabio Berger
36b6da7c4f Fix github dep to point to branch 2018-07-30 22:41:51 +02:00
Brandon Millman
02eb575813 Merge pull request #931 from 0xProject/feature/website/meta-tags
Add MetaTags component for easily adding customizable meta tags for a new page
2018-07-30 13:28:09 -07:00
Brandon Millman
ca8a6665ba Add back tags in html 2018-07-30 13:27:27 -07:00
Fabio Berger
ba00cd916a Remove console 2018-07-30 21:09:56 +02:00
Fabio Berger
b4f916d214 Standardize child naming 2018-07-30 21:09:17 +02:00
Fabio Berger
79faf7d3cb Update yarn.lock 2018-07-30 15:40:20 +02:00
Fabio Berger
79b1b6c8e0 Fix bugs in doc gen 2018-07-30 15:40:10 +02:00
Brandon Millman
2ecf7a3349 Fix jobs page overflow issue 2018-07-30 00:58:30 -07:00
Brandon Millman
5283dcce2e Create MetaTags component 2018-07-30 00:48:39 -07:00
Fabio Berger
b56fc697c4 Move logic to publishUtils so can use as command-line and script import 2018-07-29 23:55:28 +02:00
Fabio Berger
b7ff1fe5d3 Move type 2018-07-29 23:34:49 +02:00
Fabio Berger
1b24064c9f Move publish_release_notes to own script and other publish cleanup 2018-07-29 23:34:42 +02:00
Fabio Berger
bb9237b0f4 Make monorepo-scripts a private package now that no other package depends on it 2018-07-29 23:01:21 +02:00
Fabio Berger
fe2787fcc1 Add back the 'clean' command 2018-07-29 23:00:44 +02:00
Fabio Berger
11778db05a Remove no longer necessary include 2018-07-29 23:00:33 +02:00
Fabio Berger
454af2bda3 Fix package.json 2018-07-29 22:49:34 +02:00
Fabio Berger
9f7479711e Improve doc gen script 2018-07-29 22:29:56 +02:00
Fabio Berger
4579e1637d Add missing exports discovered by generating compact typedoc JSON 2018-07-29 21:59:09 +02:00
Fabio Berger
f4a2e227e1 Remove all in-package monorepo-scripts by adding doc gen/upload and aggregate release note publishing to publish script 2018-07-29 21:58:39 +02:00
Francesco Agosti
48e538f5c7 Merge pull request #910 from 0xProject/feature/website/upgrade-allowance-toggles-to-locks-and-checks
[website] Use new designs with tooltips for allowance toggles
2018-07-27 12:02:29 -07:00
fragosti
c851c37630 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/upgrade-allowance-toggles-to-locks-and-checks 2018-07-27 11:51:30 -07:00
fragosti
a0d7b1efa5 Remove unused variable 2018-07-27 11:49:06 -07:00
fragosti
1a06e6b305 Add loading state for initial load and other PR feedback 2018-07-27 11:48:04 -07:00
fragosti
43d7045a5b Add scripts 2018-07-27 10:19:20 -07:00
Olaf Tomalka
9199a56b7a Added fix to CHANGELOG 2018-07-27 15:20:24 +02:00
Fabio Berger
44d1be27e6 Add note about needing Yarn 1.6 to README 2018-07-27 12:22:43 +02:00
Alex Browne
554d5f97df Add combinatorial tests for internal Exchange functions (#807)
* WIP add combinatorial tests for internal Exchange functions

* Change combinitorial testing strategy based on feedback

* Check value of filled[orderHash] in updateFilledState tests

* Add combinatorial tests for addFillResults

* Add combinatorial tests for getPartialAmount

* Implement generic `testWithReferenceFuncAsync`

* Implement generic `testCombinatoriallyWithReferenceFuncAsync`

* Add combinatorial tests for isRoundingError

* Add combinatorial tests for calculateFillResults

* Add support for Geth in internal contract tests

* Fix contract artifacts

* Change DECIMAL_PLACES to 78 and add a note.

* Document new functions in utils

* Optimize tests by only reseting state when needed

* Rename/move some files

* Print parameter names on failure in testWithReferenceFuncAsync

* Add to changelog for utils package

* Appease various linters

* Rename some more things related to FillOrderCombinatorialUtils

* Remove .only from test/exchange/internal.ts

* Remove old test for isRoundingError and getPartialAmount

* Appease linters again

* Remove old todos

* Fix typos, add comments, rename some things

* Re-add some LibMath tests

* Update contract internal tests to use new SafeMath revert reasons

* Apply PR feedback from Amir

* Apply PR feedback from Remco

* Re-add networks to ZRXToken artifact

* Remove duplicate Whitelist in compiler.json
2018-07-26 22:09:55 -07:00
fragosti
78a4b9897c Add to README 2018-07-26 16:58:27 -07:00
fragosti
c1fcbe3f04 Create API development environment and json distribution 2018-07-26 16:49:43 -07:00
fragosti
efa67d87aa Rename to sra-api 2018-07-26 14:52:23 -07:00
fragosti
4fe410a277 Add typescript typings for Open API spec 2018-07-26 14:47:02 -07:00
fragosti
3235606644 Reset CHANGELOG 2018-07-26 14:32:22 -07:00
fragosti
260976914d Add basic smoke test 2018-07-26 14:30:24 -07:00
fragosti
3ca4b7e7a7 Initial commit 2018-07-26 13:24:34 -07:00
Fabio Berger
95c627f581 Publish
- 0x.js@1.0.1-rc.2
 - @0xproject/abi-gen@1.0.4
 - @0xproject/assert@1.0.4
 - @0xproject/base-contract@1.0.4
 - @0xproject/connect@1.0.4
 - @0xproject/contract-wrappers@1.0.1-rc.2
 - contracts@2.1.39
 - @0xproject/dev-utils@1.0.3
 - @0xproject/fill-scenarios@1.0.1-rc.2
 - @0xproject/json-schemas@1.0.1-rc.3
 - @0xproject/metacoin@0.0.14
 - @0xproject/migrations@1.0.3
 - @0xproject/order-utils@1.0.1-rc.2
 - @0xproject/order-watcher@1.0.1-rc.2
 - @0xproject/react-docs@1.0.4
 - @0xproject/react-docs-example@0.0.19
 - @0xproject/react-shared@1.0.5
 - @0xproject/sol-compiler@1.0.4
 - @0xproject/sol-cov@1.0.3
 - @0xproject/sol-resolver@1.0.4
 - @0xproject/sra-report@1.0.4
 - @0xproject/subproviders@1.0.4
 - @0xproject/testnet-faucets@1.0.40
 - @0xproject/types@1.0.1-rc.3
 - @0xproject/utils@1.0.4
 - @0xproject/web3-wrapper@1.1.2
 - @0xproject/website@0.0.43
2018-07-26 17:42:30 +02:00
Fabio Berger
512dbb448b Updated CHANGELOGS 2018-07-26 17:42:22 +02:00
Fabio Berger
b793c1cc73 Update yarn.lock 2018-07-26 17:20:48 +02:00
Fabio Berger
aea048ecc7 Point to actual current version 2018-07-26 17:19:26 +02:00
Fabio Berger
d0e6413fcf Add changelog entries for other RCs that did publish 2018-07-26 17:12:17 +02:00
Fabio Berger
3b7ad1688b Fix changelogs and package versions for ones that weren't published 2018-07-26 17:10:59 +02:00
Fabio Berger
e907b99314 Fix circle.yml 2018-07-26 16:57:08 +02:00
Fabio Berger
973bcb0483 Publish
- 0x.js@1.0.1-rc.2
 - @0xproject/abi-gen@1.0.3
 - @0xproject/assert@1.0.3
 - @0xproject/base-contract@1.0.3
 - @0xproject/connect@1.0.3
 - @0xproject/contract-wrappers@1.0.1-rc.2
 - contracts@2.1.38
 - @0xproject/dev-utils@1.0.3
 - ethereum-types@1.0.3
 - @0xproject/fill-scenarios@1.0.1-rc.2
 - @0xproject/json-schemas@1.0.1-rc.2
 - @0xproject/metacoin@0.0.13
 - @0xproject/migrations@1.0.3
 - @0xproject/monorepo-scripts@1.0.4
 - @0xproject/order-utils@1.0.1-rc.2
 - @0xproject/order-watcher@1.0.1-rc.2
 - @0xproject/react-docs@1.0.3
 - @0xproject/react-docs-example@0.0.18
 - @0xproject/react-shared@1.0.4
 - @0xproject/sol-compiler@1.0.3
 - @0xproject/sol-cov@1.0.3
 - @0xproject/sol-resolver@1.0.3
 - @0xproject/sra-report@1.0.3
 - @0xproject/subproviders@1.0.3
 - @0xproject/testnet-faucets@1.0.39
 - @0xproject/tslint-config@1.0.4
 - @0xproject/types@1.0.1-rc.2
 - @0xproject/typescript-typings@1.0.3
 - @0xproject/utils@1.0.3
 - @0xproject/web3-wrapper@1.1.1
 - @0xproject/website@0.0.42
2018-07-26 16:27:08 +02:00
Fabio Berger
87fb9a76ce Updated CHANGELOGS 2018-07-26 16:26:57 +02:00
Fabio Berger
0187e0c47d Still test unrunnable packages for compilation issues 2018-07-26 16:20:20 +02:00
Fabio Berger
8732d8ece8 Add changelog entries for next RC publish 2018-07-26 16:02:49 +02:00
Fabio Berger
2e7c130f62 Expose lerna dep 2018-07-26 16:00:46 +02:00
Fabio Berger
a90f434df5 Split running packages that cannot be run in a node.js script 2018-07-26 15:58:35 +02:00
Fabio Berger
3b005ad47c Fix accidental import from test folder 2018-07-26 15:34:00 +02:00
Fabio Berger
735bc2f178 Re-enable deleted the dir after test runs 2018-07-26 15:32:53 +02:00
Fabio Berger
e3cfa6363d Change test:installation so it also causes run-time errors to appear 2018-07-26 15:32:30 +02:00
Fabio Berger
331b1cb9a0 Fix lint issue 2018-07-26 15:27:50 +02:00
Fabio Berger
55dbb0ece0 Always append monorepo root path so script can be called from anywhere 2018-07-26 14:42:07 +02:00
Fabio Berger
af4071e119 Delete any remenants of test-env dir before creating a new one 2018-07-26 14:23:45 +02:00
Fabio Berger
9947e643d0 Print version that will be tested 2018-07-26 14:23:07 +02:00
Fabio Berger
d3be4f2852 Add ending slash 2018-07-26 14:22:51 +02:00
Fabio Berger
e320f343f8 Add support for testing installations post-publish as well 2018-07-26 14:14:14 +02:00
Fabio Berger
f6cc7d9c3c Fix asset path 2018-07-26 14:04:47 +02:00
Fabio Berger
b756f76b0e Publish
- 0x.js@1.0.1-rc.1
 - @0xproject/abi-gen@1.0.2
 - @0xproject/assert@1.0.2
 - @0xproject/base-contract@1.0.2
 - @0xproject/connect@1.0.2
 - @0xproject/contract-wrappers@1.0.1-rc.1
 - contracts@2.1.37
 - @0xproject/dev-utils@1.0.2
 - ethereum-types@1.0.2
 - @0xproject/fill-scenarios@1.0.1-rc.1
 - @0xproject/json-schemas@1.0.1-rc.1
 - @0xproject/metacoin@0.0.12
 - @0xproject/migrations@1.0.2
 - @0xproject/monorepo-scripts@1.0.3
 - @0xproject/order-utils@1.0.1-rc.1
 - @0xproject/order-watcher@1.0.1-rc.1
 - @0xproject/react-docs@1.0.2
 - @0xproject/react-docs-example@0.0.17
 - @0xproject/react-shared@1.0.3
 - @0xproject/sol-compiler@1.0.2
 - @0xproject/sol-cov@1.0.2
 - @0xproject/sol-resolver@1.0.2
 - @0xproject/sra-report@1.0.2
 - @0xproject/subproviders@1.0.2
 - @0xproject/testnet-faucets@1.0.38
 - @0xproject/tslint-config@1.0.3
 - @0xproject/types@1.0.1-rc.1
 - @0xproject/typescript-typings@1.0.2
 - @0xproject/utils@1.0.2
 - @0xproject/web3-wrapper@1.1.0
 - @0xproject/website@0.0.41
2018-07-26 13:53:36 +02:00
Fabio Berger
034948065d Updated CHANGELOGS 2018-07-26 13:53:27 +02:00
Fabio Berger
0c2df7e589 Fix linter 2018-07-26 13:40:37 +02:00
Fabio Berger
2ae6a71ca3 Revert to using execAsync 2018-07-26 13:27:21 +02:00
Fabio Berger
206fd0f78e update yarn.lock 2018-07-26 13:20:35 +02:00
Fabio Berger
b84225ac70 Revert to publishing ethereum-types 2018-07-26 13:05:36 +02:00
Fabio Berger
5ebcea53d6 Fix marshaller import 2018-07-26 12:59:48 +02:00
Fabio Berger
a491e01144 Update yarn.lock 2018-07-26 12:52:25 +02:00
Fabio Berger
1236efc008 Temporarily have all packages depend on an older, published version of ethereum-types since we cannot publish a new one 2018-07-26 12:50:15 +02:00
Fabio Berger
e63bbdeb87 Temporarily make ethereum-types private to exclude from publishing 2018-07-26 12:40:31 +02:00
Fabio Berger
084ccb62a6 Add order-watcher artifacts to gitignore 2018-07-26 12:35:22 +02:00
Fabio Berger
015469885d Fix changelogs 2018-07-26 12:34:41 +02:00
Fabio Berger
061f223269 Remove artifacts for git 2018-07-26 12:15:01 +02:00
Fabio Berger
88ee35d5f9 Call 'lerna publish' with spawn so we see stderr and stdout in real-time 2018-07-26 12:14:13 +02:00
Francesco Agosti
6c5b33ec71 Merge pull request #902 from 0xProject/feature/web3-wrapper/unexport-marshaller
Stop exporting marshaller from web3-wrapper
2018-07-25 16:32:04 -07:00
Brandon Millman
31b8dd1bfc Remove careers page feature flag 2018-07-26 06:55:06 +08:00
Brandon Millman
35113487f1 Merge pull request #893 from 0xProject/feature/website/jobs-page-part2
Jobs page
2018-07-25 15:31:54 -07:00
Brandon Millman
9ce8e10115 Header copy change 2018-07-26 06:28:17 +08:00
Brandon Millman
d07d059eda Margin polish 2018-07-26 06:00:35 +08:00
Fabio Berger
d836b0f815 Also skip prompt when publishing for real 2018-07-25 22:34:50 +02:00
Fabio Berger
1b1733ce7c Merge pull request #911 from 0xProject/fix-v2-beta-migration
Update/Fix V2-beta-testnet migration & Use it in all RC packages
2018-07-25 22:21:32 +02:00
Fabio Berger
5fd64a969b Add order-watcher artifacts to prettierignore 2018-07-25 22:04:12 +02:00
Fabio Berger
9a762e584c Add contract-wrappers artifacts to prettierignore 2018-07-25 21:51:36 +02:00
Fabio Berger
7fc0fd9fb6 Prettier fixes 2018-07-25 21:36:56 +02:00
fragosti
da4b70fcae Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/web3-wrapper/unexport-marshaller 2018-07-25 10:33:13 -07:00
Fabio Berger
a0db69ee05 Missing artifact 2018-07-25 19:10:36 +02:00
Fabio Berger
2c62504b79 Replace hard-coded compact_artifacts with migrations artifacts 2018-07-25 18:47:40 +02:00
Fabio Berger
67303106dc Update order-utils to use 2.0.0-beta-testnet artifacts 2018-07-25 18:28:09 +02:00
Fabio Berger
600d574042 Remove artifacts which should no longer be commited 2018-07-25 18:18:28 +02:00
Fabio Berger
07d4f21807 Add artifacts to gitignore 2018-07-25 18:16:09 +02:00
Fabio Berger
4da12067b9 New WETH9 artifacts 2018-07-25 18:12:28 +02:00
Fabio Berger
24ab24879c Modify WETH9 event arg names to be identical to ERC20 standard suggested names 2018-07-25 18:10:10 +02:00
Fabio Berger
dc51741b83 Update artifacts in contract-wrappers, generate artifacts and improve README 2018-07-25 18:07:12 +02:00
Fabio Berger
dd979dbf6d Update the kovan addresses in artifacts 2018-07-25 14:58:04 +02:00
Fabio Berger
0cfea5613a Improve the README instructions for migrations 2018-07-25 14:57:38 +02:00
Fabio Berger
98dd3ecab7 Use infura 2018-07-25 14:49:33 +02:00
Fabio Berger
fe05e0bac3 Fix typo 2018-07-25 14:48:28 +02:00
Fabio Berger
d3f9b72c84 Update v2-beta-testnet migration 2018-07-25 13:12:26 +02:00
Fabio Berger
05b35c0fdc Merge pull request #908 from 0xProject/publish-fixes-rc
Publish Flow Fixes For RC releases
2018-07-25 12:33:08 +02:00
Fabio Berger
36b61650b3 Update yarn.lock to not use local npm registry 2018-07-25 12:13:45 +02:00
Brandon Millman
c37b6f0eeb Update open positions section 2018-07-25 18:08:05 +08:00
Fabio Berger
28114c3b5a Remove unused import 2018-07-25 12:04:45 +02:00
Fabio Berger
2617df4ec7 Update artifact 2018-07-25 12:04:00 +02:00
Fabio Berger
0d28c48eb9 update yarn.lock 2018-07-25 12:02:16 +02:00
Fabio Berger
c6a6a54cce Fix dep collision 2018-07-25 12:02:10 +02:00
Fabio Berger
e5aa03da64 merge v2-prototype 2018-07-25 11:59:29 +02:00
Fabio Berger
47c0195b07 Leave react-dom type version also unspecified 2018-07-25 11:57:17 +02:00
Fabio Berger
f13d43dbf5 Remove unused typwe 2018-07-25 11:54:51 +02:00
Fabio Berger
f9e99a27d3 Remove force publish 2018-07-25 11:51:06 +02:00
Brandon Millman
854b8fad22 Update benefits section 2018-07-25 17:48:12 +08:00
Fabio Berger
91c7105d43 Revert "Temporarily add changelog & package.json version changes"
This reverts commit 97268d2253.
2018-07-25 11:48:01 +02:00
Fabio Berger
c1e3533287 Add back build step 2018-07-25 11:47:52 +02:00
Brandon Millman
bb7c308081 Update mission section 2018-07-25 15:35:26 +08:00
Brandon Millman
fcbaf2f4e3 Header copy updates 2018-07-25 14:41:26 +08:00
Brandon Millman
109c5df973 Use isMobileWidth util 2018-07-25 14:24:00 +08:00
Brandon Millman
b0fab3ea4a Use our image component in mission 2018-07-25 14:21:39 +08:00
fragosti
490fed6228 Make a non-jank Spinner component and use it 2018-07-24 19:09:02 -07:00
fragosti
9c81692d48 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/upgrade-allowance-toggles-to-locks-and-checks 2018-07-24 16:02:21 -07:00
fragosti
c505ba6f3e Center allowance toggles in account page 2018-07-24 15:58:33 -07:00
fragosti
ee71f57453 Increase allowance toggle loading spinner size by 1 2018-07-24 15:51:07 -07:00
Olaf Tomalka
f133aebfaf Fixed the relative resolver not checking if the file can be read in the
first place
2018-07-25 00:37:48 +02:00
fragosti
88556d31e2 Add unlocking and locking token copy 2018-07-24 15:32:12 -07:00
fragosti
c0d75c6476 Hide tooltip after allowance toggle click 2018-07-24 15:19:06 -07:00
fragosti
5b6cf447e5 Make tooltip appear to the left of the toggle when onboarding in progress 2018-07-24 15:11:46 -07:00
fragosti
3890f8224d Fix tooltip wrapping issue in onboardin 2018-07-24 14:44:31 -07:00
fragosti
b9f5c93830 Fix wrap button alignment issue 2018-07-24 14:19:19 -07:00
Leonid Logvinov
c40b3dea6c Specify registry url only if local publish attempted 2018-07-24 21:57:47 +02:00
Leonid Logvinov
dbc798596b Replace dry mode with local publishing mode 2018-07-24 21:57:47 +02:00
Amir Bandeali
fac90c446c Update orderEpoch comments 2018-07-24 10:46:08 -07:00
Fabio Berger
c5859b65a3 Install our fork of lerna and use it 2018-07-24 19:35:13 +02:00
Francesco Agosti
14bb697924 Merge pull request #891 from 0xProject/bug/website/wiki-page-topbar
Make topbar zIndex 1
2018-07-24 10:22:18 -07:00
Fabio Berger
dbd815c1e0 Merge pull request #905 from 0xProject/fix-rc-packages
Fix Published Packages Type Issues
2018-07-24 18:45:10 +02:00
Fabio Berger
9592a9a821 Omit specific version of react types 2018-07-24 17:15:25 +02:00
Fabio Berger
dd9f020c9b Correct next version 2018-07-24 17:15:18 +02:00
Fabio Berger
56f21f4bab Merge v2-prototype 2018-07-24 17:13:21 +02:00
Fabio Berger
91bc1b468b Omit specific version of react types 2018-07-24 16:44:40 +02:00
Fabio Berger
97268d2253 Temporarily add changelog & package.json version changes 2018-07-24 16:33:16 +02:00
Fabio Berger
14b3c50b69 Fix lerna verson 2018-07-24 16:29:55 +02:00
Fabio Berger
333bf9de05 Correct next version 2018-07-24 16:29:37 +02:00
Fabio Berger
16a38c687e Merge fix-rc-packages 2018-07-24 16:20:25 +02:00
Leonid Logvinov
24aa5cd1bf Make the test:installation work with the local npm registry 2018-07-24 16:08:17 +02:00
Leonid Logvinov
f699da90ba Pretend we defined types for @lerna/batch-packages 2018-07-24 16:07:32 +02:00
Leonid Logvinov
d1e33a3dff Add utils.getTopologicallySortedPackages 2018-07-24 16:07:11 +02:00
Leonid Logvinov
f50ac932d6 Introduce PackageJson file 2018-07-24 16:06:51 +02:00
Leonid Logvinov
cab32d7593 Add .npmrc to gitignore 2018-07-24 16:05:25 +02:00
Leonid Logvinov
2073aa9abc Test installation on latest version, not the packed one 2018-07-24 15:19:57 +02:00
Leonid Logvinov
0386025395 Temp: Force publish 2018-07-24 15:19:36 +02:00
Leonid Logvinov
0772403ea9 Fix(lerna): Change lerna version 2018-07-24 15:18:46 +02:00
Fabio Berger
8acfc9a2f9 improve logs 2018-07-24 13:43:27 +02:00
Fabio Berger
de087abc8d remove legacy prepublishOnly 2018-07-24 13:32:39 +02:00
Fabio Berger
98b2875512 Add --yes flag 2018-07-24 13:28:02 +02:00
Fabio Berger
e9e73aa0a3 Add node 2018-07-24 13:21:28 +02:00
Fabio Berger
d280311734 Use relative path to lerna executable 2018-07-24 13:19:31 +02:00
Fabio Berger
789762617f Upgrade to new lerna 2018-07-24 13:05:18 +02:00
Fabio Berger
6f38d1bee5 Add missing 'publish' 2018-07-24 12:46:40 +02:00
Fabio Berger
73d75bc405 Fix publish command 2018-07-24 12:44:38 +02:00
Fabio Berger
91dcfd5ee8 Use cdVersions flag instead of interactive prompt 2018-07-24 12:39:41 +02:00
Fabio Berger
5fe0e9f2e7 Temporarily use local lerna 2018-07-24 12:36:53 +02:00
Brandon Millman
51fb6e6a23 Always go to open positions when clicking CTA 2018-07-24 14:06:53 +08:00
Brandon Millman
9392d5c84f Fix hiding of dots on small screens 2018-07-24 13:51:37 +08:00
Brandon Millman
e49d136b99 Merge branch 'v2-prototype' into feature/website/jobs-page-part2
* v2-prototype: (38 commits)
  Revert "Publish"
  Publish
  Remove ERC721 callback functions
  Use != instead of > in loops, add sanity checks to market fill functions
  Add more tests and fixes
  Remove MConstants and MixinConstants for LibConstants
  Remove redundant external call by reimplementing fillOrderNoThrow
  Remove orders length check
  Add assertValidFillResults
  Update web3Wrapper CHANGELOG
  Get actual gasPrice from transaction instead of setting default
  Store orders length in varible before looping over orders
  Use transferFrom instead of safeTransferFrom
  Fix minimal tests
  Fix rounding error issues, use different logic when makerAsset is ZRX
  Rename marketSellEth => marketSellWeth
  Update percentage constants
  Update transferEthFeeAndRefund, add check to ERC721 transfer
  Refactor forwarding contract architecture, remove batch functions
  Updated CHANGELOGS
  ...
2018-07-24 13:43:26 +08:00
Fabio Berger
d50174b89e Add ignore flag 2018-07-23 21:33:03 +02:00
Fabio Berger
1d9a77027e Use include 2018-07-23 21:23:09 +02:00
Fabio Berger
b4cd8897b2 Dedup versionPrompt being triggered multiple times 2018-07-23 21:20:09 +02:00
Fabio Berger
df341717f7 Remove regex 2018-07-23 21:14:51 +02:00
Fabio Berger
68974313e1 Make regex less strict 2018-07-23 21:12:47 +02:00
Fabio Berger
39a06e1d3b Add timeout before writing to stdin 2018-07-23 21:10:44 +02:00
Fabio Berger
bfe57b84d6 Use string equals and remove returns 2018-07-23 20:59:41 +02:00
Fabio Berger
dae975b08c Add in print statements 2018-07-23 20:51:25 +02:00
Fabio Berger
27d44e3021 Add missing vars 2018-07-23 20:46:10 +02:00
Fabio Berger
df00d93b9c Also add private package new versions to packageToNextVersion 2018-07-23 20:44:47 +02:00
Fabio Berger
15bbbb3762 Make sure private packages have a next version 2018-07-23 20:36:03 +02:00
Fabio Berger
c9ee526d8b more bogus 2018-07-23 20:30:51 +02:00
Fabio Berger
b110d95de1 testing 2018-07-23 20:29:14 +02:00
Fabio Berger
76eab5d3ec Fix publish to give lerna actual version rather then the semver diff 2018-07-23 20:21:49 +02:00
Fabio Berger
4a2715e61f Update lerna.json 2018-07-23 20:19:04 +02:00
Fabio Berger
7fbcc3999f Changed artifacts 2018-07-23 20:16:16 +02:00
Fabio Berger
e873b8948f And also temporarily remove rebuilding from publish flow 2018-07-23 20:15:35 +02:00
Fabio Berger
c8108a1db2 Temporarily uncommented parts of publish flow 2018-07-23 20:12:18 +02:00
Fabio Berger
195c3af84e Fix lerna publish to include publishing prerelease versions 2018-07-23 19:56:53 +02:00
Fabio Berger
39724292e3 Omit building website before publish 2018-07-23 19:28:27 +02:00
Fabio Berger
24b5aa0e82 Add new RC versions to changelog so that these packages are publised as RC's 2018-07-23 19:18:09 +02:00
Fabio Berger
3af2ef8439 Revert "Revert "Publish""
This reverts commit a66ccaa1da.
2018-07-23 19:11:48 +02:00
Fabio Berger
e2d027e252 Add skip-git for testing 2018-07-23 19:09:35 +02:00
Fabio Berger
bddcebfbb1 Allow registry to be configured in lerna.json 2018-07-23 19:09:24 +02:00
Amir Bandeali
a05b14e4d9 Merge pull request #847 from 0xProject/refactor/contracts/simplify-forwarder
Refactor forwarding contract architecture, remove batch functions
2018-07-23 10:50:39 -05:00
Fabio Berger
9a36e73f4e Move solidity-parser-antlr type to dependencies since it's used as part of the packages public interface 2018-07-23 17:35:16 +02:00
Leonid Logvinov
a66ccaa1da Revert "Publish"
This reverts commit 3dc94051713e4a32796ce3b4ae4b70b527e24cfe.
2018-07-23 17:13:44 +02:00
Leonid Logvinov
f05a563802 Publish
- 0x.js@1.0.0
 - @0xproject/abi-gen@1.0.1
 - @0xproject/assert@1.0.1
 - @0xproject/base-contract@1.0.1
 - @0xproject/connect@1.0.1
 - @0xproject/contract-wrappers@1.0.0
 - contracts@2.1.36
 - @0xproject/dev-utils@1.0.1
 - ethereum-types@1.0.1
 - @0xproject/fill-scenarios@1.0.0
 - @0xproject/json-schemas@1.0.0
 - @0xproject/metacoin@0.0.11
 - @0xproject/migrations@1.0.1
 - @0xproject/monorepo-scripts@1.0.1
 - @0xproject/order-utils@1.0.0
 - @0xproject/order-watcher@1.0.0
 - @0xproject/react-docs@1.0.1
 - @0xproject/react-docs-example@0.0.16
 - @0xproject/react-shared@1.0.1
 - @0xproject/sol-compiler@1.0.1
 - @0xproject/sol-cov@1.0.1
 - @0xproject/sol-resolver@1.0.1
 - @0xproject/sra-report@1.0.1
 - @0xproject/subproviders@1.0.1
 - @0xproject/testnet-faucets@1.0.37
 - @0xproject/tslint-config@1.0.1
 - @0xproject/types@1.0.0
 - @0xproject/typescript-typings@1.0.1
 - @0xproject/utils@1.0.1
 - @0xproject/web3-wrapper@1.0.1
 - @0xproject/website@0.0.40
2018-07-23 17:13:44 +02:00
Amir Bandeali
06396b8874 Remove ERC721 callback functions 2018-07-23 10:02:51 -05:00
Amir Bandeali
e5e68de2d7 Use != instead of > in loops, add sanity checks to market fill functions 2018-07-23 10:02:51 -05:00
Amir Bandeali
dcc0908617 Add more tests and fixes 2018-07-23 10:02:51 -05:00
Amir Bandeali
45d68285f1 Remove MConstants and MixinConstants for LibConstants 2018-07-23 10:02:51 -05:00
Amir Bandeali
e20f3a0f97 Remove redundant external call by reimplementing fillOrderNoThrow 2018-07-23 10:02:51 -05:00
Amir Bandeali
c5029e61e3 Remove orders length check 2018-07-23 10:02:51 -05:00
Amir Bandeali
e90ed01105 Add assertValidFillResults 2018-07-23 10:02:51 -05:00
Amir Bandeali
d8099d53fe Update web3Wrapper CHANGELOG 2018-07-23 10:02:51 -05:00
Amir Bandeali
0a976a3fb8 Get actual gasPrice from transaction instead of setting default 2018-07-23 10:00:23 -05:00
Amir Bandeali
4636d5fbc2 Store orders length in varible before looping over orders 2018-07-23 10:00:23 -05:00
Amir Bandeali
3506ec1caa Use transferFrom instead of safeTransferFrom 2018-07-23 10:00:23 -05:00
Amir Bandeali
1f0e819756 Fix minimal tests 2018-07-23 10:00:23 -05:00
Amir Bandeali
799ff2a5c3 Fix rounding error issues, use different logic when makerAsset is ZRX 2018-07-23 10:00:23 -05:00
Amir Bandeali
ec5f768f9b Rename marketSellEth => marketSellWeth 2018-07-23 10:00:23 -05:00
Amir Bandeali
66ab010055 Update percentage constants 2018-07-23 10:00:23 -05:00
Amir Bandeali
6fb157488c Update transferEthFeeAndRefund, add check to ERC721 transfer 2018-07-23 10:00:23 -05:00
Amir Bandeali
814518dd80 Refactor forwarding contract architecture, remove batch functions 2018-07-23 10:00:23 -05:00
Amir Bandeali
554b18a466 Merge pull request #906 from 0xProject/refactor/contracts/examples
[contracts] Add `examples` directory
2018-07-23 10:00:06 -05:00
Leonid Logvinov
855b6b1dc5 Updated CHANGELOGS 2018-07-23 16:58:40 +02:00
Amir Bandeali
c2ae9f62a4 Add tests to verify ZRX_ASSET_DATA 2018-07-23 09:34:47 -05:00
Amir Bandeali
4159a8fe6e Add comments for deploying with constant ZRX_ASSET_DATA 2018-07-23 09:34:47 -05:00
Amir Bandeali
d8b44283a2 Move example contracts into new examples dir 2018-07-23 09:34:47 -05:00
Leonid Logvinov
2c1daf9c9a Add missing timestamps in CHANGELOGs 2018-07-23 16:24:13 +02:00
Fabio Berger
c7962216e9 Omit verson of react types 2018-07-23 16:02:03 +02:00
Leonid Logvinov
ffdaf88fd0 Add missing timestamps in CHANGELOGs 2018-07-23 15:57:16 +02:00
Fabio Berger
f84f879950 Stop specifying a specific version of @types/react so there can't be two instances of the type installed 2018-07-23 14:39:34 +02:00
Fabio Berger
eb6027fba7 Move hdkey typings to dependencies since it's part of the exported interface 2018-07-23 13:45:43 +02:00
Fabio Berger
9a1f0ac8e2 Add dependent types of the react-popper typings 2018-07-23 11:43:01 +02:00
Fabio Berger
51b6f8bc71 Revert "Move frontend package types out of typescript-typings since this package will be used in both node and browser contexts"
This reverts commit 74483631d0.
2018-07-23 11:42:01 +02:00
Fabio Berger
4f73b81b9c Add troubleshooting section to utils README 2018-07-23 11:00:27 +02:00
Amir Bandeali
195d11f9d0 Merge pull request #877 from 0xProject/feature/contracts/removeERC721Callback
Removed receiverData and `onReceive` callback from ERC721 proxy.
2018-07-22 18:14:09 -05:00
Fabio Berger
b325ad1735 Add additional required tsconfig option for utils package since it now relies on RequestInit & Response types defined in lib.dom.d.ts 2018-07-22 18:27:36 +02:00
Fabio Berger
74483631d0 Move frontend package types out of typescript-typings since this package will be used in both node and browser contexts 2018-07-22 16:22:19 +02:00
Fabio Berger
89b24a21a0 Add bn.js types as dep of typescript-typings since they are needed by ethereumjs-utils types 2018-07-22 15:57:47 +02:00
Fabio Berger
f0f13aa1dd Move ECSignature type from types package into eth-light-wallet type dec since only used there 2018-07-22 15:52:52 +02:00
Fabio Berger
06f61949f9 Merge pull request #880 from feuGeneA/patch-5
make PR template checklist more useful
2018-07-22 15:35:15 +02:00
Francesco Agosti
0e72b67865 Merge pull request #895 from 0xProject/feature/website/send-eth-from-portal
Send Ether from Portal
2018-07-22 03:45:21 -07:00
Fabio Berger
b987eebf21 Fix version of ethereumjs-abi to 0.6.5 to fix decoding bug 2018-07-22 07:37:12 +02:00
Fabio Berger
c808d12b74 Merge pull request #904 from lukeautry/luke/leading_zero_encode
0x.js v2: fix decodeAssetData for addresses starting in 0
2018-07-22 07:16:49 +02:00
Luke Autry
b466431ede fix decodeAssetData for addresses starting in 0 2018-07-21 18:05:33 -04:00
Amir Bandeali
bf69ca6e53 Merge pull request #899 from kroitor/patch-1
Deduplicate assert web3-wrapper signMessageAsync
2018-07-20 20:28:29 -07:00
Brandon Millman
6ffa907f0e Merge branch 'v2-prototype' into feature/website/jobs-page-part2
* v2-prototype: (103 commits)
  Add changelog entry for @0xproject/utils
  Add AbortController polyfill to fetchAsync in utils
  Increase node heap size for webpack command
  Add missing timestamp to CHANGELOG entries
  Upgrade some @0xproject packages to 1.0.0 in website
  Hard code fillOrder selector into abiEncodeFillOrder
  Returns byte array instead of memory range for encoding fillOrder calldata
  Created LibAbiEncoder with `fillOrderNoThrow`
  Add missing dep in migrations
  Fix the abi-gen entry point
  Fix linter error
  Remove the postinstall hook
  Update website package.json with original imports
  @0xproject/sra-report@1.0.0
  Change all package to depend on the new @0xproject/connect@1.0.0
  @0xproject/connect@1.0.0
  Use old assert version in @0xproject/connect
  FIx a typo
  Remove rc versions from unmigrated packages
  0x.js@1.0.0-rc.2
  ...
2018-07-20 16:15:04 -07:00
Brandon Millman
e54501522d Merge pull request #903 from 0xProject/bug/website/fix-website
Add AbortController polyfill to fetchAsync in utils
2018-07-20 13:51:12 -07:00
Brandon Millman
f2baeddc30 Merge branch 'v2-prototype' into bug/website/fix-website
* v2-prototype:
  Add missing timestamp to CHANGELOG entries
2018-07-20 12:07:27 -07:00
Brandon Millman
fd349b618a Add changelog entry for @0xproject/utils 2018-07-20 12:05:47 -07:00
Brandon Millman
6ca2a02766 Add AbortController polyfill to fetchAsync in utils 2018-07-20 11:58:38 -07:00
Brandon Millman
d9a282bd92 Increase node heap size for webpack command 2018-07-20 11:56:20 -07:00
Fabio Berger
dc151f7290 Add missing timestamp to CHANGELOG entries 2018-07-20 20:13:53 +02:00
Brandon Millman
cce2127f72 Upgrade some @0xproject packages to 1.0.0 in website 2018-07-20 10:55:47 -07:00
fragosti
0f8e6b395e WIP for allowance toggle redesign working 2018-07-20 10:44:59 -07:00
fragosti
b28cc6d7d3 Show token name dynamically in tooltip 2018-07-20 10:14:17 -07:00
fragosti
3bf12a98a7 Implement tooltips 2018-07-20 09:55:08 -07:00
fragosti
f27084ced4 Add loading state 2018-07-20 09:16:55 -07:00
fragosti
cdcf624e9e Have basic lock and check working in walelt 2018-07-20 08:52:14 -07:00
fragosti
ad4c2b95e4 Add remove marshaller to changelog notes 2018-07-20 08:51:16 -07:00
Amir Bandeali
8e7c395f59 Merge pull request #892 from 0xProject/refactor/contracts/LibAbiEncoder
Created LibAbiEncoder with `fillOrderNoThrow`
2018-07-20 07:43:40 -07:00
Amir Bandeali
02d50a513a Hard code fillOrder selector into abiEncodeFillOrder 2018-07-20 07:37:40 -07:00
Greg Hysen
d61759f6dd Returns byte array instead of memory range for encoding fillOrder calldata 2018-07-20 07:37:40 -07:00
Greg Hysen
5790ed7ba9 Created LibAbiEncoder with fillOrderNoThrow 2018-07-20 07:37:40 -07:00
fragosti
067adbfb62 Stop exporting marshaller from web3-wrapper 2018-07-20 07:37:17 -07:00
Leonid Logvinov
7fadba59e7 Merge pull request #901 from 0xProject/feature/abi-gen-fix
Fix the abi-gen entry point
2018-07-20 16:34:17 +02:00
Fabio Berger
bcde0731db Merge branch 'v2-prototype' of github.com:0xProject/0x-monorepo into v2-prototype
* 'v2-prototype' of github.com:0xProject/0x-monorepo:
  Fix linter error
  Remove the postinstall hook
2018-07-20 16:31:49 +02:00
Fabio Berger
052afb67a4 Add missing dep in migrations 2018-07-20 16:31:39 +02:00
Leonid Logvinov
6e15d7bb0f Fix the abi-gen entry point 2018-07-20 16:30:47 +02:00
Igor Kroitor
5bb68974ec Deduplicate assert web3-wrapper signMessageAsync 2018-07-20 08:49:16 +03:00
Leonid Logvinov
0a3ba4d27d Fix linter error 2018-07-20 02:06:11 +02:00
Leonid Logvinov
482a226dc5 Remove the postinstall hook 2018-07-20 02:02:16 +02:00
Fabio Berger
9e69458ba8 Merge branch 'v2-prototype' of github.com:0xProject/0x-monorepo into v2-prototype
* 'v2-prototype' of github.com:0xProject/0x-monorepo:
  @0xproject/sra-report@1.0.0
  Change all package to depend on the new @0xproject/connect@1.0.0
2018-07-20 01:24:19 +02:00
Fabio Berger
71e386d5fa Update website package.json with original imports 2018-07-20 01:22:48 +02:00
Leonid Logvinov
60b501b137 @0xproject/sra-report@1.0.0 2018-07-20 01:07:44 +02:00
Leonid Logvinov
36f8e9f1d5 Change all package to depend on the new @0xproject/connect@1.0.0 2018-07-20 01:06:14 +02:00
Leonid Logvinov
78707bd3ca @0xproject/connect@1.0.0 2018-07-20 01:03:15 +02:00
Leonid Logvinov
56137d0605 Use old assert version in @0xproject/connect 2018-07-20 01:01:54 +02:00
Leonid Logvinov
681a582630 FIx a typo 2018-07-20 00:54:44 +02:00
Leonid Logvinov
846a447c4d Remove rc versions from unmigrated packages 2018-07-20 00:50:13 +02:00
Leonid Logvinov
f76be4f016 0x.js@1.0.0-rc.2 2018-07-20 00:45:19 +02:00
Fabio Berger
ed19067096 Move methods in ZeroEx.assetData to ZeroEx itself 2018-07-20 00:39:23 +02:00
Leonid Logvinov
eb9f7c2c9d Fix scoping of assets in 0x.js 2018-07-20 00:21:59 +02:00
Leonid Logvinov
52693f7d0a 0x.js@1.0.0-rc.1 2018-07-20 00:11:00 +02:00
Leonid Logvinov
5e015872ef Remove bundles config 2018-07-20 00:07:25 +02:00
Leonid Logvinov
08c291bd3f @0xproject/order-watcher@1.0.0-rc.1 2018-07-20 00:05:44 +02:00
Leonid Logvinov
48c5d69c9d Add monorepo-scripts postpublish.ts 2018-07-20 00:05:25 +02:00
Leonid Logvinov
0f9c262bb0 Change all package to depend on the new @0xproject/contract-wrappers@1.0.0-rc.1 2018-07-20 00:01:24 +02:00
Leonid Logvinov
dff0fc65bf @0xproject/contract-wrappers@1.0.0-rc.1 2018-07-19 23:56:46 +02:00
Leonid Logvinov
161f96c07d Change all package to depend on the new @0xproject/migrations@1.0.0 2018-07-19 23:50:46 +02:00
Leonid Logvinov
67ad21b368 @0xproject/migrations@1.0.0 2018-07-19 23:46:23 +02:00
Leonid Logvinov
d5e633c38f Change all package to depend on the new @0xproject/sol-cov@1.0.0 2018-07-19 23:44:51 +02:00
Leonid Logvinov
617ef5b6ce @0xproject/sol-cov@1.0.0 2018-07-19 23:42:28 +02:00
Leonid Logvinov
8bd4e38d02 Change all package to depend on the new @0xproject/react-docs@1.0.0 2018-07-19 23:39:28 +02:00
Leonid Logvinov
f364b5c5ab @0xproject/react-docs@1.0.0 2018-07-19 23:38:13 +02:00
Leonid Logvinov
6486fced34 Change all package to depend on the new @0xproject/react-shared@1.0.0 2018-07-19 23:37:01 +02:00
Leonid Logvinov
bc9f2a51a2 @0xproject/react-shared@1.0.0 2018-07-19 23:35:14 +02:00
Leonid Logvinov
9c03b54d75 Copy postpublish scripts on build in fill-scenarios 2018-07-19 23:32:46 +02:00
Leonid Logvinov
eae08ea1e4 Change all package to depend on the new @0xproject/fill-scenarios@1.0.0-rc.1 2018-07-19 23:32:31 +02:00
Leonid Logvinov
6f276223c6 @0xproject/fill-scenarios@1.0.0-rc.1 2018-07-19 23:28:05 +02:00
Leonid Logvinov
21effcaa8b Change all package to depend on the new @0xproject/order-utils@1.0.0-rc.1 2018-07-19 23:26:32 +02:00
Leonid Logvinov
114b31a813 @0xproject/order-utils@1.0.0-rc.1 2018-07-19 23:23:37 +02:00
Leonid Logvinov
1a1b7a2bc4 Change all package to depend on the new @0xproject/sol-compiler@1.0.0 2018-07-19 23:21:29 +02:00
Leonid Logvinov
c9b213839a @0xproject/sol-compiler@1.0.0 2018-07-19 23:19:38 +02:00
Leonid Logvinov
4043fa76cc Change all package to depend on the new @0xproject/dev-utils@1.0.0 2018-07-19 23:16:47 +02:00
Leonid Logvinov
9c8e3bc4c9 @0xproject/dev-utils@1.0.0 2018-07-19 23:14:30 +02:00
Leonid Logvinov
18b1f01641 Change all package to depend on the new @0xproject/subproviders@1.0.0 2018-07-19 23:12:44 +02:00
Leonid Logvinov
9085c674e4 @0xproject/subproviders@1.0.0 2018-07-19 23:10:57 +02:00
Leonid Logvinov
b5d19d3fb1 Change all package to depend on the new @0xproject/base-contract@1.0.0 2018-07-19 23:05:01 +02:00
Leonid Logvinov
cc0477153b Fix the scripts build 2018-07-19 23:03:55 +02:00
Leonid Logvinov
76008b41c5 @0xproject/base-contract@1.0.0 2018-07-19 23:02:15 +02:00
Leonid Logvinov
8193fdc304 Change all package to depend on the new @0xproject/web3-wrapper@1.0.0 2018-07-19 22:57:27 +02:00
Leonid Logvinov
9d06c81078 FIx a typo 2018-07-19 22:56:17 +02:00
Leonid Logvinov
cdf85e5eee @0xproject/web3-wrapper@1.0.0 2018-07-19 22:54:32 +02:00
Leonid Logvinov
d774dbc432 Change all package to depend on the new @0xproject/abi-gen@1.0.0 2018-07-19 22:47:58 +02:00
Leonid Logvinov
0369f5ebc4 @0xproject/abi-gen@1.0.0 2018-07-19 22:46:33 +02:00
Leonid Logvinov
1e6b11b27e Change all package to depend on the new @0xproject/assert@1.0.0 2018-07-19 22:45:22 +02:00
Leonid Logvinov
7a8231435b Add forgotten file to git 2018-07-19 22:43:56 +02:00
Leonid Logvinov
b1aa7725df @0xproject/assert@1.0.0 2018-07-19 22:41:35 +02:00
Leonid Logvinov
bfe0ba3e9a Change all package to depend on the new @0xproject/sol-resolver@1.0.0 2018-07-19 22:39:42 +02:00
Leonid Logvinov
2d39329ee7 Add monorepo-scripts to sol-resolver 2018-07-19 22:38:19 +02:00
Leonid Logvinov
761b0063a0 @0xproject/sol-resolver@1.0.0 2018-07-19 22:33:24 +02:00
Leonid Logvinov
0f27ce3424 Change all package to depend on the new @0xproject/json-schemas@1.0.0-rc.1 2018-07-19 22:30:09 +02:00
Leonid Logvinov
2b0c0a6ff7 @0xproject/json-schemas@1.0.0-rc.1 2018-07-19 22:26:35 +02:00
Leonid Logvinov
5bd96f6fe9 Change the next @0xproject/json-schemas version to be 1.0.0-rc.1 2018-07-19 22:26:13 +02:00
Leonid Logvinov
37ac6749ba Change all package to depend on the new @0xproject/utils@1.0.0 2018-07-19 22:22:51 +02:00
Leonid Logvinov
bf955bd87f @0xproject/utils@1.0.0 2018-07-19 22:20:35 +02:00
Leonid Logvinov
6bd921d0bc Add a missing CHANGELOG entry 2018-07-19 22:20:08 +02:00
Leonid Logvinov
534decea95 Change all package to depend on the new @0xproject/types@1.0.0-rc.1 2018-07-19 22:17:55 +02:00
Leonid Logvinov
267830d463 FIx a typo 2018-07-19 22:15:31 +02:00
Leonid Logvinov
e82d0c21ec @0xproject/types@1.0.0-rc.1 2018-07-19 22:06:05 +02:00
Leonid Logvinov
ece6417699 Change the next @0xproject/types version to be 1.0.0-rc.1 2018-07-19 22:05:22 +02:00
Leonid Logvinov
74d5449719 Change all package to depend on the new @0xproject/tslint-config@1.0.0 2018-07-19 22:03:23 +02:00
Leonid Logvinov
4af7ff9cc3 @0xproject/tslint-config@1.0.0 2018-07-19 22:01:18 +02:00
Leonid Logvinov
46dedfcb67 Change the next @0xproject/tslint-config version to be 1.0.0 2018-07-19 22:00:58 +02:00
Leonid Logvinov
a9fa1a0df6 Change all package to depend on the new @0xproject/typescript-typings@1.0.0 2018-07-19 21:54:44 +02:00
Leonid Logvinov
a8572b4944 @0xproject/typescript-typings@1.0.0 2018-07-19 21:51:38 +02:00
Leonid Logvinov
91c0d47ad4 Change the next @0xproject/typescript-typings version to be 1.0.0 2018-07-19 21:51:12 +02:00
Leonid Logvinov
fd2611794a Change all package to depend on the new @0xproject/monorepo-scripts@1.0.0 2018-07-19 21:49:03 +02:00
Leonid Logvinov
1fe1c5321b @0xproject/monorepo-scripts@1.0.0 2018-07-19 21:45:38 +02:00
Leonid Logvinov
f063a5db0f Change all package to depend on the new ethereum-types@1.0.0 2018-07-19 21:44:09 +02:00
Leonid Logvinov
3883315447 Make PR numbers links on Github releases 2018-07-19 21:40:50 +02:00
Leonid Logvinov
7679e07957 v1.0.0 2018-07-19 21:28:51 +02:00
Leonid Logvinov
c39ba37ad8 Change the next ethereum-types version to be 1.0.0 2018-07-19 21:28:06 +02:00
Fabio Berger
f1c3840c3b Merge pull request #897 from 0xProject/doc-changes
Doc Changes for RC publish
2018-07-19 21:10:06 +02:00
Fabio Berger
e5c5b36a73 Specify exact version 2018-07-19 21:05:37 +02:00
Fabio Berger
c51f7a8375 Add PR nr. 2018-07-19 20:51:33 +02:00
Fabio Berger
e53e2ac31b Fix version dropdown so it also renders RC versions properly 2018-07-19 20:45:20 +02:00
Fabio Berger
b72857cd8b Update doc md files for v2 packages 2018-07-19 20:45:00 +02:00
Fabio Berger
cc223b9eab Compare host rather then origin so that it comes without the http/https prefix 2018-07-19 19:01:25 +02:00
Fabio Berger
f2c49e8b37 Merge branch 'v2-prototype' into doc-changes
* v2-prototype:
  Add missing import
  Remove comment and add assertion
  Add ability to nest doc ref markdown under specific versions
2018-07-19 18:15:35 +02:00
Fabio Berger
9b6476a6b7 Merge pull request #844 from 0xProject/support-multiple-doc-md
Support version-specific doc ref markdown sections
2018-07-19 18:14:58 +02:00
Fabio Berger
d8898cf9a3 merge v2-prototype 2018-07-19 17:48:06 +02:00
Fabio Berger
34df5af295 Don't export object literal because the docs cannot yet render them, moved type to types file 2018-07-19 17:46:24 +02:00
Fabio Berger
3de88d5345 Merge pull request #896 from 0xProject/update-lerna
Update Lerna & other small changes
2018-07-19 17:37:04 +02:00
Fabio Berger
9ab6ab1bf9 Improve log 2018-07-19 17:22:26 +02:00
Fabio Berger
b6de0bdd43 Merge branch 'v2-prototype' into update-lerna
* v2-prototype: (48 commits)
  Update CHANGELOG
  Rename call data schema id to CallData. Check for TypedArray when hashing data in order-utils crypto
  Fix broken links in sol-cov documentation
  Fix 0x.js ts warnings
  Update yarn.lock
  Fix 0x.js ts warnings
  Fix 0x.js tests on CI
  Fix a bad merge
  Update package versions
  Merge
  Update changelogs
  Add a test for ERC721 Allowance
  Use allowance instead of approval for all in fill-scenarios
  Upgrade sha3 to 1.2.2 to work with node v10
  Check if the token doesn't exist before minting in fill scenarios
  Make downlevelIteration a global config
  Fix tests descriptions
  DRY up the code in order-watcher collision-resistant abi decoder
  Await transactions in fillScenarios
  Rename decodeAssetData to decodeAssetDataOrThrow
  ...
2018-07-19 16:38:33 +02:00
Fabio Berger
a2b62fd808 Update yarn.lock 2018-07-19 16:38:02 +02:00
fragosti
fc166dea26 Add zIndex 1 to topbar and fix issue where no box-shadow present on /docs 2018-07-19 07:36:41 -07:00
Fabio Berger
f9c4d0925e Add additional pattern removal and added HACK comment 2018-07-19 16:32:03 +02:00
Fabio Berger
1df9370bc2 Renames to remove mention of Lerna 2018-07-19 16:26:45 +02:00
Fabio Berger
7d840c7a18 Remove unused declaration 2018-07-19 16:26:00 +02:00
fragosti
ff12aafc0f Remove TODO 2018-07-19 07:04:48 -07:00
fragosti
c08b4aa6a1 Remove unused Token import 2018-07-19 06:59:35 -07:00
fragosti
52a6e6357b Add lifecycle messages 2018-07-19 06:57:00 -07:00
Fabio Berger
74c0fd419b Upgrade Lerna to 3.0-Beta14 2018-07-19 15:51:38 +02:00
Fabio Berger
6f540e3e58 Replace lerna-get-packages with our own implementation 2018-07-19 15:50:21 +02:00
fragosti
dead04dce8 WIP for sending ether from portal (works) 2018-07-19 04:11:44 -07:00
Jacob Evans
886a03fdcd Merge pull request #894 from 0xProject/bug/minor-fixes-json-schema-order-utils
Rename json schema call data id to CallData.
2018-07-19 20:06:37 +10:00
Jacob Evans
81007c453c Update CHANGELOG 2018-07-19 19:51:07 +10:00
Jacob Evans
6529e06057 Rename call data schema id to CallData.
Check for TypedArray when hashing data in order-utils crypto
2018-07-19 17:51:03 +10:00
Brandon Millman
55336f96d7 Fix broken links in sol-cov documentation 2018-07-18 15:53:33 -07:00
Brandon Millman
938aabde3d Update hr color 2018-07-18 14:47:02 -07:00
Brandon Millman
c7f196b579 Fix lint errors 2018-07-18 14:30:44 -07:00
Brandon Millman
b28a88dbb2 Add /careers route and fix hr styling 2018-07-18 14:27:06 -07:00
Brandon Millman
e6558b7135 Fix typos 2018-07-18 14:10:17 -07:00
Brandon Millman
2c8fb9aa31 Fix key errors and typo 2018-07-18 13:59:50 -07:00
Brandon Millman
f48c6b6285 Fix padding on open positions section 2018-07-18 13:59:50 -07:00
Brandon Millman
4f42f60bde Add dots on hero 2018-07-18 13:59:50 -07:00
Brandon Millman
3942647910 Padding fixes 2018-07-18 13:59:50 -07:00
Brandon Millman
e0fbc78925 Update open positions section 2018-07-18 13:59:50 -07:00
Brandon Millman
f3e43d7d94 Benefits and values sections 2018-07-18 13:59:50 -07:00
Brandon Millman
f36547241c Remove sections 2018-07-18 13:59:49 -07:00
Brandon Millman
7ad29950a8 Update mission section 2018-07-18 13:59:49 -07:00
Brandon Millman
cbf91ad45c Updates to the Join 0x section 2018-07-18 13:59:49 -07:00
Brandon Millman
a039b66533 Fix development environment check 2018-07-18 13:59:49 -07:00
Fabio Berger
3a18c249f5 Merge pull request #889 from 0xProject/update_versions
Update Versions & Changelogs
2018-07-18 17:20:38 +02:00
Fabio Berger
7c0775aa1b Fix 0x.js ts warnings 2018-07-18 17:06:05 +02:00
fragosti
6514c34ed8 Make topbar zIndex 1 2018-07-18 08:05:19 -07:00
Fabio Berger
ba92754669 Update yarn.lock 2018-07-18 17:00:14 +02:00
Fabio Berger
30afd39129 Fix 0x.js ts warnings 2018-07-18 17:00:07 +02:00
Leonid Logvinov
41699406cf Fix 0x.js tests on CI 2018-07-18 16:44:45 +02:00
Greg Hysen
9aa49e59d0 Fixed merge errors 2018-07-18 16:44:24 +02:00
Fabio Berger
29d5034260 merge v2-prototype 2018-07-18 16:43:25 +02:00
Leonid Logvinov
00d1622b3f Merge pull request #887 from 0xProject/feature/order-watcher-v2
Order watcher v2
2018-07-18 16:38:16 +02:00
Leonid Logvinov
a1acf19ff3 Fix a bad merge 2018-07-18 16:31:17 +02:00
Greg Hysen
86328af6b7 Fixed merge error 2018-07-18 16:27:26 +02:00
Greg Hysen
36c27bdbf8 Ran prettier 2018-07-18 16:18:54 +02:00
Fabio Berger
c839965c05 Update to Lerna v3.0-beta 2018-07-18 16:06:39 +02:00
Greg Hysen
e1a9f3435f Removed receiverData from ERC721 Proxy Id generation 2018-07-18 15:52:14 +02:00
Greg Hysen
9f74feb347 Removed receiverData and onReceive callback from ERC721 proxy. 2018-07-18 15:50:58 +02:00
Fabio Berger
f99232095b Update package versions 2018-07-18 15:48:09 +02:00
Leonid Logvinov
5044fe4fe4 Merge branch 'v2-prototype' into feature/order-watcher-v2 2018-07-18 15:40:45 +02:00
Leonid Logvinov
8e49169e6b Merge branch 'feature/order-watcher-v2' of github.com:0xProject/0x-monorepo into feature/order-watcher-v2 2018-07-18 15:39:11 +02:00
Leonid Logvinov
c71781d9ab Merge 2018-07-18 15:38:10 +02:00
Fabio Berger
8a2a4052f3 Update changelogs 2018-07-18 15:30:38 +02:00
Leonid Logvinov
dad557164e Merge branch 'v2-prototype' into feature/order-watcher-v2 2018-07-18 15:27:38 +02:00
Fabio Berger
e2fb49a8f8 Merge pull request #884 from 0xProject/export-more-0x.js
Export missing V2 pieces from 0x.js
2018-07-18 15:18:54 +02:00
Leonid Logvinov
f3241ff86a Merge pull request #883 from 0xProject/feature/tslint-improvements
New tslint rules
2018-07-18 14:54:47 +02:00
Fabio Berger
b9e7973a0f edit changelog message 2018-07-18 14:53:38 +02:00
Fabio Berger
004b1f5288 Fix prettier 2018-07-18 14:53:31 +02:00
Leonid Logvinov
857bd24c6d Merge branch 'v2-prototype' into feature/order-watcher-v2 2018-07-18 14:51:24 +02:00
Leonid Logvinov
904968cf4a Fix an inconsistency in abi-gen CHANGELOG.json 2018-07-18 14:31:03 +02:00
Fabio Berger
83747934ad Fix linter 2018-07-18 12:11:11 +02:00
Fabio Berger
7f90f5ecd4 merge v2-prototype 2018-07-18 12:04:57 +02:00
Fabio Berger
12f02b9814 Rename decodeAssetDataId to decodeAssetProxyId for consistency 2018-07-18 11:49:30 +02:00
Fabio Berger
8931388309 Add java doc comments to assetDataUtils 2018-07-18 11:47:42 +02:00
Fabio Berger
25160d7344 Move encodeUint256 & decodeUint256 out of assetDataUtils since we don't want them exported 2018-07-18 11:32:01 +02:00
Leonid Logvinov
ab6bf6edc7 Merge pull request #879 from 0xProject/feature/order-watcher-erc721-tests
Add ERC721 tests for order watcher v2
2018-07-18 10:38:07 +02:00
Amir Bandeali
56a4a374cd Merge pull request #857 from 0xProject/feature/contracts/batchGetOrderInfo
Add getOrdersInfo function
2018-07-17 14:13:33 -07:00
Amir Bandeali
caa5b4e342 Add tests for getOrderInfo and getOrdersInfo 2018-07-17 13:59:14 -07:00
Amir Bandeali
b6172c3965 Reorder checks in getOrderInfo 2018-07-17 12:18:16 -07:00
Amir Bandeali
02ddfa07a7 Add getOrdersInfo function 2018-07-17 12:18:16 -07:00
Alex Browne
5022878680 Merge pull request #886 from 0xProject/fix/time-offset-accidental-revert
Mine a dummy block in blockchain_lifecycle to re-apply any time offset
2018-07-17 12:12:12 -07:00
Alex Browne
2bfacbb8ba Mine a dummy block in blockchain_lifecycle to re-apply any time offset 2018-07-17 11:48:39 -07:00
Alex Browne
b18d2b0274 Merge pull request #881 from 0xProject/fix/timestamp-conversions
Fix bugs having to do with block timestamps and order expirationTimes
2018-07-17 10:57:39 -07:00
Leonid Logvinov
f20b496dca Add a test for ERC721 Allowance 2018-07-17 18:46:58 +02:00
Leonid Logvinov
cca17f70b8 Use allowance instead of approval for all in fill-scenarios 2018-07-17 18:45:35 +02:00
Leonid Logvinov
b8e69718a1 Upgrade sha3 to 1.2.2 to work with node v10 2018-07-17 16:54:25 +02:00
Fabio Berger
50ed7d2af2 Export missing types and add to doc ref whitelist 2018-07-17 16:41:55 +02:00
Fabio Berger
698de932ed Remove unused dep 2018-07-17 16:27:59 +02:00
Fabio Berger
a3d8858bb1 Fix typing 2018-07-17 16:27:46 +02:00
Fabio Berger
83f3ba21b8 Move type decl. to typescript-typings 2018-07-17 16:01:01 +02:00
Leonid Logvinov
2aa729b212 Check if the token doesn't exist before minting in fill scenarios 2018-07-17 15:56:10 +02:00
Fabio Berger
1de70e4474 Add PR 2018-07-17 15:40:06 +02:00
Fabio Berger
f2393de59b Make assetData a static property and add to CHANGELOG 2018-07-17 15:33:49 +02:00
Fabio Berger
94ea7cc451 Export assetDataUtils from 0x.js 2018-07-17 15:31:25 +02:00
Fabio Berger
f8dbf57582 Rename assetProxyUtils to assetDataUtils 2018-07-17 15:26:55 +02:00
Leonid Logvinov
c59cd36da6 Make downlevelIteration a global config 2018-07-17 15:25:20 +02:00
Fabio Berger
15e92958d6 Merge pull request #875 from 0xProject/fix-order-watcher
OrderWatcher Fixes
2018-07-17 13:47:23 +02:00
Leonid Logvinov
96c648c4b4 Fix tests descriptions 2018-07-17 13:29:59 +02:00
Fabio Berger
f56a7d0cb2 Fix linter 2018-07-17 13:29:36 +02:00
Leonid Logvinov
01e617bb83 DRY up the code in order-watcher collision-resistant abi decoder 2018-07-17 13:28:27 +02:00
Fabio Berger
59fd5c69c0 Remove no-longer needed tests 2018-07-17 13:27:41 +02:00
Leonid Logvinov
28a9a8c380 Await transactions in fillScenarios 2018-07-17 13:26:49 +02:00
Leonid Logvinov
6c2796b433 Rename decodeAssetData to decodeAssetDataOrThrow 2018-07-17 13:16:47 +02:00
Leonid Logvinov
82ad5f7897 Use normalizedAddress 2018-07-17 13:13:05 +02:00
Leonid Logvinov
bf8ac3b9e6 Fix tslint issues 2018-07-17 12:59:02 +02:00
Leonid Logvinov
edcdc9b1b9 Upgrade tslint to the newest version 2018-07-17 12:58:42 +02:00
Leonid Logvinov
4227aaa68a Add new tslint rules 2018-07-17 12:58:04 +02:00
Fabio Berger
b750ce8be6 Stop subscriptions from unsubscribing on recoverable network issues 2018-07-17 12:33:43 +02:00
Fabio Berger
03a6a088c5 Merge branch 'v2-prototype' into fix-order-watcher
* v2-prototype: (39 commits)
  Add chris to website
  Fix ocean link
  Move update onboarding step tracking to onboarding flow code
  Bump npm-run-all from 4.1.2 to 4.1.3
  Move format to helper function
  Fix linter
  Add assertion to make sure caller to fetchAsync isn't trying to set timeout in a context-specific way
  Fix linter issues
  Remove unused import
  Switch conditional
  Update yarn.lock and artifact
  Fix abi-gen tests to not rely on sleep, since it causes intermittent failures
  Add missing assertion
  Move type defs to typescript-typingsd
  Fix linter
  Make createFinalPayload protected
  Replace process.browser with detect-node library
  Export Web3ProviderEngine and RPCSubprovider from 0x.js
  Export Web3ProviderEngine from subproviders package
  Update deps
  ...
2018-07-17 12:06:35 +02:00
Fabio Berger
1e787a7646 Remove stateLayer OrderWatcher config and instead temporarily hard-code until we get pending block to work with Blockstream 2018-07-17 12:04:29 +02:00
Fabio Berger
766ac3f1fe Remove blockRetention config 2018-07-17 11:57:52 +02:00
fragosti
a9038f2afc Add chris to website 2018-07-17 01:16:29 -07:00
Alex Browne
9828fa335e Fix bugs having to do with block timestamps and order expirationTimes 2018-07-16 18:41:37 -07:00
Brandon Millman
0c04d490bb Fix ocean link 2018-07-16 17:48:24 -07:00
F. Eugene Aumson
bffffffc95 make PR template checklist more useful
Goal is to make it so that every PR should check off every checklist
item before it is considered complete.

Removed mention of labels.  Since contributors outside the org don't
have permission to add labels, it's not possible for any such
contributor to ever check those items off.  Opted instead to prescribe
bracketed PR title prefixes, which are accessible to all.

Re-ordered checklist items to better represent chronological progress.
2018-07-16 17:50:24 -04:00
Leonid Logvinov
e9589ff786 Sort the config file lexicographically 2018-07-16 15:59:00 +02:00
Leonid Logvinov
c3bd3437f5 Make addOrder async 2018-07-16 15:50:06 +02:00
Leonid Logvinov
01789e6750 Merge pull request #800 from feuGeneA/patch-2
use bullets, not a task list, for Types of Changes
2018-07-16 15:24:18 +02:00
Leonid Logvinov
c3f7ba1b91 Merge pull request #872 from 0xProject/dependabot/npm_and_yarn/npm-run-all-4.1.3
Bump npm-run-all from 4.1.2 to 4.1.3
2018-07-16 15:22:58 +02:00
Leonid Logvinov
90d72a3683 Await the promise in order watcher assertion 2018-07-16 14:54:36 +02:00
Leonid Logvinov
f9bcf936ed Merge branch 'feature/order-watcher-v2' into feature/order-watcher-erc721-tests 2018-07-16 14:38:51 +02:00
Leonid Logvinov
acff177c54 Merge branch 'v2-prototype' into feature/order-watcher-v2 2018-07-16 14:38:27 +02:00
Leonid Logvinov
658214a2e2 Yarn lock changes 2018-07-16 14:31:46 +02:00
Leonid Logvinov
55f6f02c9b Import AssetproxyId 2018-07-16 14:31:33 +02:00
Leonid Logvinov
c5ba52910a Add ERC721 tests to order watcher 2018-07-16 14:30:48 +02:00
Leonid Logvinov
994ccd6694 Enable downlevelIteration 2018-07-16 14:29:59 +02:00
Leonid Logvinov
4921a83813 Register asset types within collisionResistantAbiDecoder 2018-07-16 14:29:23 +02:00
Leonid Logvinov
a97ba41b86 Add ERC721 support to fill-scenarios 2018-07-16 14:28:44 +02:00
Leonid Logvinov
67e2623d2c Remove no-unused-variable rule from tslint as it's buggy and has side-effects 2018-07-16 14:28:22 +02:00
Leonid Logvinov
4111095da3 Don't throw on transferFrom is the sender is an owner 2018-07-16 14:27:53 +02:00
Leonid Logvinov
6c21ddcedb Pass erc721ProxyAddress to fillScenarios 2018-07-16 14:27:34 +02:00
Leonid Logvinov
d86349658f Fix postinstall hook for contracts -> types 2018-07-16 14:26:23 +02:00
Fabio Berger
151ce6e3c7 Pass stateLater into getBlockAsync call 2018-07-16 10:24:34 +02:00
Francesco Agosti
6bdee26c30 Merge pull request #876 from 0xProject/feature/website/heap-tracking-sanity
Move update onboarding step tracking to onboarding flow code
2018-07-13 14:34:54 -07:00
fragosti
5e4b1eed30 Move update onboarding step tracking to onboarding flow code 2018-07-13 14:09:34 -07:00
Francesco Agosti
ab5cd95ccc Merge pull request #867 from 0xProject/bug/website/txhash-error
Only upload sourcemaps to rollbar on live deploys, and handle NaN error by using 0
2018-07-13 13:35:01 -07:00
dependabot[bot]
a3dc398da5 Bump npm-run-all from 4.1.2 to 4.1.3
Bumps [npm-run-all](https://github.com/mysticatea/npm-run-all) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/mysticatea/npm-run-all/releases)
- [Commits](https://github.com/mysticatea/npm-run-all/compare/v4.1.2...v4.1.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-13 18:25:06 +00:00
fragosti
b70f5d1a1e Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into bug/website/txhash-error 2018-07-13 11:15:50 -07:00
Francesco Agosti
26363931ed Merge pull request #866 from 0xProject/feature/website/integrate-heap
Integrate Heap analytics into the website
2018-07-13 11:14:38 -07:00
Fabio Berger
e2438330f5 Merge pull request #874 from 0xProject/fix/request-timeout-issue
Fix Fetch Timeout Issue
2018-07-13 20:12:37 +02:00
fragosti
c5fcdd0657 Move format to helper function 2018-07-13 11:11:49 -07:00
Fabio Berger
345f3c07a5 Add PR numbers 2018-07-13 20:04:21 +02:00
Fabio Berger
f3477ff28c Add changelog entries 2018-07-13 20:03:22 +02:00
Fabio Berger
7ac4fa50b5 Update yarn.lock 2018-07-13 19:55:45 +02:00
Fabio Berger
2f0a914838 Fix linter 2018-07-13 19:53:49 +02:00
Fabio Berger
5fc7d9a603 Fix bug that make all getBlock and getLog requests go to latest block 2018-07-13 19:44:56 +02:00
Fabio Berger
ced68e4e02 Expose Blockstreams blockRetention config as an OrderWatcher config 2018-07-13 19:44:21 +02:00
Fabio Berger
80071beaac Add assertion to make sure caller to fetchAsync isn't trying to set timeout in a context-specific way 2018-07-13 19:38:35 +02:00
Fabio Berger
de1029d5ef Fix linter issues 2018-07-13 18:51:21 +02:00
Leonid Logvinov
ffeb3194a8 Fix a dependency version 2018-07-13 17:46:53 +02:00
Leonid Logvinov
95e9f33f6a Migrate order-watcher to v2 2018-07-13 17:45:25 +02:00
Leonid Logvinov
c599a20b34 Enable prefer-readonly rule 2018-07-13 17:44:39 +02:00
Leonid Logvinov
ca59528a32 Add OrderWatcherPartialConfigSchema 2018-07-13 17:44:00 +02:00
Leonid Logvinov
6f4fd06d38 Use migrated package versions as order-watcher dependencies 2018-07-13 17:43:32 +02:00
Leonid Logvinov
4715c2d006 Update compact_artifacts in order-watcher 2018-07-13 17:42:50 +02:00
Leonid Logvinov
fcfa43b6f1 Export newly created store from order-utils 2018-07-13 17:42:27 +02:00
Leonid Logvinov
56b4c55654 Add OrderFilledCancelledLazyStore 2018-07-13 17:41:30 +02:00
Leonid Logvinov
830790eeac Add AbstractOrderFilledCancelledLazyStore 2018-07-13 17:39:41 +02:00
Leonid Logvinov
39de9c7879 Export forgotten stuff from contract-wrappers 2018-07-13 17:38:02 +02:00
Leonid Logvinov
7b6cc14b71 Make getZRXAssetData not async 2018-07-13 17:37:33 +02:00
Leonid Logvinov
ec749a4033 Add order-watcher to a postinstall HACK 2018-07-13 17:36:20 +02:00
Leonid Logvinov
fe32214613 Add no-return-await, no-duplicate-switch-case, no-implicit-dependencies rules 2018-07-13 17:30:44 +02:00
Leonid Logvinov
f6fcb775b7 Upgrade tslint to use prefer-readonly 2018-07-13 17:30:44 +02:00
Leonid Logvinov
d209108a95 Update contract artifacts 2018-07-13 17:30:00 +02:00
Fabio Berger
efc64cf17f Remove unused import 2018-07-13 17:17:45 +02:00
Fabio Berger
2f41ed50c1 Switch conditional 2018-07-13 16:47:32 +02:00
Fabio Berger
fcc8cdd36a Update yarn.lock and artifact 2018-07-13 16:40:06 +02:00
Fabio Berger
248632ce76 Merge branch 'v2-prototype' into fix/request-timeout-issue
* v2-prototype:
  Remove legacy portal code
2018-07-13 16:12:49 +02:00
Fabio Berger
25681754bd Fix abi-gen tests to not rely on sleep, since it causes intermittent failures 2018-07-13 16:06:15 +02:00
Fabio Berger
179c487da9 Add missing assertion 2018-07-13 15:25:48 +02:00
Fabio Berger
350989bbec Move type defs to typescript-typingsd 2018-07-13 15:25:37 +02:00
Fabio Berger
f5293e6c38 Fix linter 2018-07-13 15:09:51 +02:00
Fabio Berger
70c3515c94 Make createFinalPayload protected 2018-07-13 15:04:17 +02:00
Fabio Berger
4c7fd5a4e8 Replace process.browser with detect-node library 2018-07-13 15:03:13 +02:00
Fabio Berger
9d24341d94 Export Web3ProviderEngine and RPCSubprovider from 0x.js 2018-07-13 14:35:31 +02:00
Fabio Berger
512502ca08 Export Web3ProviderEngine from subproviders package 2018-07-13 14:26:02 +02:00
Fabio Berger
6ce662c7a4 Update deps 2018-07-13 13:05:38 +02:00
Fabio Berger
701ea5c46b Add typedoc for json-rpc-error package 2018-07-13 13:05:21 +02:00
Fabio Berger
2e5ff53d72 -fetch'; 2018-07-13 12:42:01 +02:00
Fabio Berger
1229c61ba4 Make timeout configurable on RPCSubprovider 2018-07-13 12:05:02 +02:00
fragosti
ee54438e92 Fix logging typo 2018-07-12 18:30:01 -07:00
fragosti
65af78c85d Fix indentify typo 2018-07-12 18:20:46 -07:00
fragosti
b4747c3f85 Refactor utils and add UNNKOWN environment type 2018-07-12 18:11:25 -07:00
fragosti
1df074b73e Make Analytics API non-async 2018-07-12 16:57:03 -07:00
fragosti
254d30b8df Fix linting errors 2018-07-12 15:56:01 -07:00
fragosti
ac5588c7c4 Make error reporter not return a promise and add more environment possibilities 2018-07-12 15:56:01 -07:00
fragosti
ddb70a89ad Do not crash on NaN, and provide default 2018-07-12 15:54:45 -07:00
fragosti
f4b2a9625d Only upload sourcemaps to rollbar on live deploys, and log NaN error for future debugging 2018-07-12 15:54:45 -07:00
Fabio Berger
c2a1317c38 Adjust timeout 2018-07-12 23:17:35 +02:00
Fabio Berger
49f1a6933c Add fetchAsync util and RPCSubprovider 2018-07-12 23:13:47 +02:00
Brandon Millman
9b387b8ec3 Merge pull request #865 from 0xProject/refactor/website/remove-legacy-portal
Remove legacy portal code
2018-07-12 11:01:14 -07:00
Fabio Berger
a45a29432e Merge pull request #863 from 0xProject/refactor/0x.js
Refactor 0x.js
2018-07-12 15:53:31 +02:00
Fabio Berger
819d069edc Add missing param 2018-07-12 15:25:35 +02:00
Fabio Berger
b0a57a5091 remove non-existent param comment 2018-07-12 15:25:25 +02:00
Fabio Berger
d8678d562d Add assertions to SignatureUtils exported methods 2018-07-12 15:22:21 +02:00
Leonid Logvinov
34a9035164 Merge pull request #788 from feuGeneA/abi-gen-ignore-unchanged
Using timestamps, skip generation of already-up-to-date contract wrappers
2018-07-12 11:53:21 +02:00
fragosti
0941e0a929 Add no-floating-promises ignore comments 2018-07-11 16:50:00 -07:00
fragosti
1ee78062d7 Remove unused configs and constants 2018-07-11 15:43:37 -07:00
Brandon Millman
09f5609618 Remove legacy portal code 2018-07-11 15:42:20 -07:00
fragosti
098322c564 Integrate heap analytics 2018-07-11 15:39:12 -07:00
Fabio Berger
365e24c1cd Fix prettier 2018-07-11 23:58:22 +02:00
Brandon Millman
b82fdd59e7 Merge pull request #626 from 0xProject/refactor/connect/browser-websocket-support
Add support for browser websocket client and fix multiple subscriptions bug
2018-07-11 14:40:19 -07:00
Brandon Millman
6190ac7791 Change version to 1.0.0 2018-07-11 14:31:39 -07:00
Brandon Millman
ed3aeb7997 Fix lint for order watcher 2018-07-11 13:35:21 -07:00
Brandon Millman
33f92b6bcf Fix lint for order-utils 2018-07-11 13:15:28 -07:00
fragosti
9131a72a47 Replace calls to google analytics with calls to heap 2018-07-11 12:14:23 -07:00
Brandon Millman
e5617dfe61 Lint fixes 2018-07-11 11:46:28 -07:00
Brandon Millman
e67d67419f Prettier 2018-07-11 11:29:34 -07:00
Brandon Millman
17c34716f9 Provide subscriptionOpts in error callback and include url in error messages 2018-07-11 11:16:45 -07:00
Brandon Millman
e12f7c3026 Remove outdated comments 2018-07-11 10:27:05 -07:00
Brandon Millman
af395eccda Update orderbook channel and factory tests 2018-07-11 10:25:54 -07:00
Brandon Millman
c403dcdabf Update tests 2018-07-11 10:25:54 -07:00
Brandon Millman
c500cc095f Enforce one handler per channel 2018-07-11 10:25:54 -07:00
Brandon Millman
6ecda647ad Add TODO comment for switching requestIds to strings 2018-07-11 10:25:54 -07:00
Brandon Millman
3e7ee1f090 Add explicit HACK comment when we import assert 2018-07-11 10:25:54 -07:00
Brandon Millman
0c120cb7a3 Assert that connection is opening before attempting to subscribe 2018-07-11 10:19:36 -07:00
Brandon Millman
cab6829df9 Remove unused import 2018-07-11 10:19:36 -07:00
Brandon Millman
0efe6df416 Add CHANGELOG entry 2018-07-11 10:19:36 -07:00
Brandon Millman
a4b6112a31 Consolidate back to one channel and expose only the factory 2018-07-11 10:18:15 -07:00
Brandon Millman
47debf0134 Initial implementation of OrderbookChannelFactory 2018-07-11 10:17:45 -07:00
Brandon Millman
16ddd1edfc Implement web browser socket 2018-07-11 10:17:45 -07:00
Fabio Berger
0f1fd0e90d prettier fix 2018-07-11 19:16:12 +02:00
Fabio Berger
ef76d83d2a Fix linter issues 2018-07-11 19:15:39 +02:00
Fabio Berger
df9f6004f2 Rename compact_artifacts to artifacts and update them 2018-07-11 19:09:02 +02:00
Fabio Berger
9a87f99dcd Add PR to changelog 2018-07-11 19:08:05 +02:00
Fabio Berger
30011db6d7 Add changelog entry 2018-07-11 19:06:38 +02:00
Fabio Berger
b6ac132c78 Refactor 0x.js to V2 2018-07-11 18:53:50 +02:00
Fabio Berger
abf87a643d Remove artifact tests since no testnet deployments are finalized 2018-07-11 18:49:37 +02:00
Fabio Berger
3824ea9079 Remove TokenRegistry from 0x.js 2018-07-11 18:46:12 +02:00
Fabio Berger
5e22ce05c5 Remove duplicate sol-compiler dep 2018-07-11 18:34:38 +02:00
Jacob Evans
8fcc7aefa7 Merge pull request #840 from 0xProject/feature/migrations/forwarder-migrations
Add Migrations for Forwarder and miscellaneous fixes
2018-07-11 20:59:23 +10:00
Jacob Evans
0b6ea1d046 Contract Wrappers - Ether token block range
Start after migrations to avoid any unexpected logs
2018-07-11 20:45:18 +10:00
Fabio Berger
22d3981a74 Temporarily remove OrderWatcher from 0x.js 2018-07-11 12:34:13 +02:00
Jacob Evans
81b4f4928d Remove extra ERC20ProxyId from Forwarder constructor 2018-07-11 20:16:59 +10:00
Jacob Evans
dd77a38535 Add Migrations for Forwarder 2018-07-11 20:16:04 +10:00
fragosti
d319b53e23 Add Heap snippet 2018-07-10 15:13:54 -07:00
Alex Browne
b9627e14d0 Merge pull request #848 from 0xProject/feature/contracts/safeMath
Add revert reasons and optimization to safeMath
2018-07-10 14:01:13 -07:00
Brandon Millman
56a96d36a1 Merge pull request #849 from 0xProject/feature/website/tokens-backend
Grab token registry information from our DB for mainnet
2018-07-10 13:57:14 -07:00
Amir Bandeali
e60630fa73 Update artifacts 2018-07-10 12:55:31 -07:00
Amir Bandeali
5ef6613024 Add revert reasons and optimization to safeMath 2018-07-10 12:53:47 -07:00
Amir Bandeali
af7e02de27 Merge pull request #837 from 0xProject/fix/contracts/assetProxyOwnerVersion
Use 0.4.10 in AssetProxyOwner
2018-07-10 12:46:53 -07:00
Brandon Millman
51d5b9d35d Grab token registry information from our DB for mainnet 2018-07-10 12:01:51 -07:00
Amir Bandeali
092ca6bcf5 Use 0.4.10 in AssetProxyOwner, add readBytes4 to contract and remove LibBytes 2018-07-10 11:24:22 -07:00
Francesco Agosti
2625cbbfed Merge pull request #846 from 0xProject/feature/website/add-peter-to-about
Add Peter to about page
2018-07-10 10:31:01 -07:00
fragosti
cedd1d5596 Add LinkedIn for Peter 2018-07-10 10:30:25 -07:00
Francesco Agosti
fb9e14a229 Merge pull request #845 from 0xProject/bug/website/portal-soft-launch-fixes
Enable sourceMaps on Rollbar and fix some small issues
2018-07-10 10:26:40 -07:00
fragosti
4e1bd7b5f0 Add Peter to about page 2018-07-09 19:02:50 -07:00
fragosti
5dfed8cd00 Update rollbar for telemetry 2018-07-09 18:17:14 -07:00
fragosti
a2672a0d78 Get rollbar uploads working by enabling sourcemaps 2018-07-09 18:04:55 -07:00
fragosti
ee5ac6b800 Fix unsubscribe bug 2018-07-09 16:16:48 -07:00
fragosti
a481d2ab46 Use JSON stringify around GIT_SHA 2018-07-09 16:07:16 -07:00
fragosti
c8bb21d12d Add sourcemaps for rollbar 2018-07-09 14:26:05 -07:00
fragosti
e817cd7d43 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into v2-prototype 2018-07-09 13:27:05 -07:00
fragosti
bd6085fffd Change Jacobs title to Ecosystem Engineer 2018-07-09 13:25:18 -07:00
Brandon Millman
7efe9a9385 Delete wings.png 2018-07-09 13:21:46 -07:00
Brandon Millman
50da40a727 Delete taas.png 2018-07-09 13:21:29 -07:00
Brandon Millman
48390a1875 Delete qtum.png 2018-07-09 13:21:12 -07:00
Brandon Millman
a3d27cd128 Delete eos.png 2018-07-09 13:20:49 -07:00
Brandon Millman
589c814ee6 Update icon file names 2018-07-09 13:17:57 -07:00
Leonid Logvinov
4b60a3cbab Merge branch 'v2-prototype' into abi-gen-ignore-unchanged 2018-07-09 20:08:28 +02:00
Fabio Berger
1aaf633df8 Add missing import 2018-07-09 19:59:26 +02:00
Fabio Berger
82771ec64a Remove comment and add assertion 2018-07-09 19:53:54 +02:00
Fabio Berger
ada8a402da merge v2-prototype 2018-07-09 19:46:28 +02:00
Fabio Berger
17956efe35 Merge pull request #843 from 0xProject/update-after-dev-publish
Update CHANGELOG & Versions After Development Publish
2018-07-09 19:40:37 +02:00
Fabio Berger
8378c9f85e Fix changelogs 2018-07-09 19:27:18 +02:00
Fabio Berger
324b1079e7 Add ability to nest doc ref markdown under specific versions 2018-07-09 19:05:38 +02:00
Fabio Berger
c6da829713 Remaining version fixes 2018-07-09 18:55:22 +02:00
Fabio Berger
844b0687a6 Update incorrect versions 2018-07-09 18:22:18 +02:00
Fabio Berger
2ed2dd2fb7 Update package versions 2018-07-09 18:16:02 +02:00
Fabio Berger
d2f7dd3d5a Update changelogs 2018-07-09 17:49:28 +02:00
F. Eugene Aumson
9f08916cf1 add tests of abi-gen 2018-07-09 10:56:18 -04:00
F. Eugene Aumson
a0e3676e3a move abi-gen funcs from index to utils for testing
preparing for unit testing. purely refactoring (no functionality
changed).
2018-07-09 10:45:21 -04:00
F. Eugene Aumson
2276793629 using timestamps, skip gen of up-to-date wrappers 2018-07-09 10:36:41 -04:00
Fabio Berger
a9b320e636 Add back timestamp 2018-07-09 15:49:24 +02:00
Leonid Logvinov
ecdc0636d8 Merge pull request #841 from 0xProject/feature/v2-contract-wrappers-validation
Feature/v2 contract wrappers validation
2018-07-09 12:21:32 +02:00
Leonid Logvinov
ea12e34809 Ignore coverage of generated files 2018-07-09 12:07:42 +02:00
Leonid Logvinov
9fb7865292 Dedupe AssetProxyId types 2018-07-09 11:43:00 +02:00
Leonid Logvinov
12f30c78ff Fix a typo 2018-07-09 11:29:42 +02:00
Leonid Logvinov
e3bed5cc71 Default shouldValidate to true 2018-07-09 11:29:09 +02:00
Leonid Logvinov
0f8f5ca5ff Add basic validation for exchange contract wrapper 2018-07-09 11:13:21 +02:00
Leonid Logvinov
0fe0433b9a Add type for AssetProxyId 2018-07-09 11:13:21 +02:00
Leonid Logvinov
ab1e38701d Add revert reason parsing to error handling decorator 2018-07-09 11:13:21 +02:00
Leonid Logvinov
258fe8ea50 Render callAsync in templates even if it returns nothing 2018-07-09 11:13:21 +02:00
Leonid Logvinov
813824868e Return AssetProxyId instead of string from proxy.getProxyIdAsync() 2018-07-09 11:13:21 +02:00
Fabio Berger
028184947f Merge pull request #833 from feuGeneA/issue-823
document how to check test coverage on a fork
2018-07-09 10:10:31 +02:00
Amir Bandeali
14c96e0b97 Merge pull request #839 from 0xProject/refactor/contracts/forwarder-interfaces
Refactor forwarder file structure
2018-07-08 20:29:31 -07:00
Brandon Millman
ef03d1ae13 Give environment enums string values 2018-07-08 01:37:22 -07:00
Amir Bandeali
f1613d36ac Move functions out of Forwarder.sol 2018-07-07 23:23:22 -07:00
Amir Bandeali
8314bbbbac Add interfaces and mixins 2018-07-07 22:57:09 -07:00
Amir Bandeali
462f1f00d8 Combine mixins 2018-07-07 22:11:36 -07:00
Amir Bandeali
1c80bba4dd Use interfaces instead of full contracts 2018-07-07 22:11:36 -07:00
fragosti
d22cff0976 Shim shouldShowPortalV2 to always return true 2018-07-06 16:08:35 -07:00
Francesco Agosti
269b56b907 Merge pull request #838 from 0xProject/feature/website/portal-final-touches
Some final polish touches for portal!
2018-07-06 15:38:51 -07:00
fragosti
60ebfcf36d Fix lint errors 2018-07-06 15:21:50 -07:00
fragosti
824c331ea0 Make unlock metamask step look more like mock 2018-07-06 15:17:23 -07:00
fragosti
b9e51d2fad Add updated asset for unlock metamask portal onboarding step 2018-07-06 14:23:00 -07:00
fragosti
9669a4d121 Create Balance component and make token symbols smaller than token amounts 2018-07-06 14:21:30 -07:00
Amir Bandeali
e929fb4337 Merge pull request #826 from 0xProject/refactor/contracts/todos
Address TODOs and small fixes
2018-07-06 13:41:06 -07:00
Brandon Millman
80da9cd31f Merge pull request #835 from 0xProject/feature/website/token-updates
Update token registry icons and asset picker flows
2018-07-06 13:24:55 -07:00
Amir Bandeali
5ed7a1baba Add lint-contracts to default lint command 2018-07-06 13:23:09 -07:00
Amir Bandeali
07c111d1f5 Remove TODOs that won't be addressed 2018-07-06 13:23:09 -07:00
Amir Bandeali
a2024da955 Remove AbiV2 where unused 2018-07-06 13:23:05 -07:00
fragosti
7418926ebb Give Wallet a min height 2018-07-06 13:17:28 -07:00
Brandon Millman
4cc33d270e Merge pull request #828 from 0xProject/feature/website/portal-improvements
Fix some portal bugs, and poll for best gas price
2018-07-06 13:05:27 -07:00
Brandon Millman
f767f5c12c Hard code exchange abi 2018-07-06 13:03:35 -07:00
Amir Bandeali
0ea3b10efd Only reset currentContextAddress if it was previously updated 2018-07-06 11:53:59 -07:00
Amir Bandeali
d634775d40 Change uint => uint256 2018-07-06 11:53:59 -07:00
Francesco Agosti
c4ab5bc653 Merge pull request #829 from 0xProject/bug/web3-wrapper/fix-invalid-transaction-format
Fix invalid transaction format errors when going through `SingerSubprovider`
2018-07-06 11:46:03 -07:00
Amir Bandeali
1d3bdfc374 Merge pull request #834 from 0xProject/fix/contracts/linter
Apply linter to nested contracts
2018-07-06 11:45:06 -07:00
fragosti
72fb1ee36f Fix linting issues 2018-07-06 11:30:01 -07:00
fragosti
afbc4989d5 address CR feedback 2018-07-06 11:23:41 -07:00
Amir Bandeali
d2e422cd5e Apply new linter rules 2018-07-06 10:58:28 -07:00
Brandon Millman
49c7365d93 Update token registry icons and asset picker flows 2018-07-06 10:51:46 -07:00
fragosti
c753e24f0a Export marshaller and use it to unmarshal tx dataa 2018-07-06 10:35:13 -07:00
fragosti
acfbba5476 Revert moving formatUtils into utils 2018-07-06 10:23:24 -07:00
Amir Bandeali
e796734659 Update linter config 2018-07-06 09:51:09 -07:00
F. Eugene Aumson
f172908bde document how to check test coverage on a fork 2018-07-06 10:26:24 -04:00
Leonid Logvinov
16dc4e9f66 Instantiate BlockAndLogStreamer with generic type parameters 2018-07-06 13:36:23 +02:00
Fabio Berger
8eefc89d55 Merge pull request #831 from 0xProject/fix-readme-intros
Update Package Descriptions
2018-07-06 13:10:00 +02:00
Fabio Berger
20d349cea7 Merge pull request #825 from 0xProject/fix-order-watcher
OrderWatcher Fixes
2018-07-06 13:06:12 +02:00
Fabio Berger
22f408f713 Update readme and doc intros 2018-07-06 13:05:13 +02:00
Fabio Berger
1e0fa776c1 Add isVerbose flag and log blockstream recoverable errors rather then bubbling them up 2018-07-06 12:34:03 +02:00
Leonid Logvinov
faf5c84082 Fix imports 2018-07-06 11:21:49 +02:00
Leonid Logvinov
b21f6e4d86 Merge pull request #822 from 0xProject/v2-contract-wrappers-WIP
V2 contract wrappers
2018-07-06 12:10:55 +03:00
Jacob Evans
bc52303402 Types: Move Forwarder Revert Reason into types package 2018-07-06 18:26:59 +10:00
Jacob Evans
2da705e81c Forwarder specify the revert reasons 2018-07-06 18:09:56 +10:00
Jacob Evans
a0601cd052 Forwarder fix linter error 2018-07-06 17:44:17 +10:00
Jacob Evans
ed2c06508b Update to new assertions 2018-07-06 17:43:15 +10:00
Jacob Evans
03b3d74748 Merge pull request #522 from 0xProject/feature/contracts/forwarder
Forwarding contract
2018-07-06 16:29:56 +10:00
Jacob Evans
0557d6a9bf Forwarding contract (squashed commits) 2018-07-06 15:30:07 +10:00
Brandon Millman
d975c0cef3 Merge pull request #827 from 0xProject/feature/website/landing-page-cta
Landing page CTA for portal
2018-07-05 22:03:13 -07:00
fragosti
188bf000b7 Add formatUtils 2018-07-05 18:59:01 -07:00
fragosti
608442b2e8 Add to changelog, rename to formatUtils and lint 2018-07-05 18:56:58 -07:00
fragosti
aefc122caf Add conversion utility file 2018-07-05 18:38:25 -07:00
fragosti
a72eae7ea8 Unmarshall txn data in SignerSubprovider before calling web3wrapper sendTransactionAsync 2018-07-05 18:32:28 -07:00
fragosti
30e3afc0fb Add unmarshallTxData to marshaller 2018-07-05 17:48:02 -07:00
fragosti
97809a03eb Make wallet height responsive 2018-07-05 17:11:50 -07:00
fragosti
f894ffc0cc Poll for gas prices and use fast instead of average for better UX 2018-07-05 15:37:35 -07:00
fragosti
127fbc6e94 Just disable closing onboarding by clicking outside for firefox 2018-07-05 15:16:46 -07:00
Brandon Millman
9f870b3d4e Change call to action link to /portal 2018-07-05 15:12:22 -07:00
Amir Bandeali
51b86742d1 Merge pull request #824 from protofire/v2-prototype-solhint
Add and apply solidity linter (V2, updated)
2018-07-05 15:09:41 -07:00
Brandon Millman
3a85b3212b Unify large and small padding in Portal 2018-07-05 14:42:22 -07:00
Brandon Millman
fd6445439e Implement landing page change in preperation for portal 2018-07-05 14:34:34 -07:00
Brandon Millman
51fa8d3e24 Merge pull request #820 from 0xProject/bug/website/top-bar-layout
Various mobile portal fixes and top bar layout refactor
2018-07-05 14:33:22 -07:00
Brandon Millman
7b8db1156d Various fixes for portal on mobile and top bar layout 2018-07-05 14:31:05 -07:00
Fabio Berger
32ad34d224 properly stop blockstream and pass stateLayer into blockstream 2018-07-05 23:18:55 +02:00
Fabio Berger
cfbb1c440e Add pr number 2018-07-05 22:33:11 +02:00
Fabio Berger
ade2f96ca3 Add changelog notes 2018-07-05 22:32:25 +02:00
Fabio Berger
abb38e1bc0 Don't unsubscribe on Blockstream errors 2018-07-05 22:25:47 +02:00
Fabio Berger
0df36471b7 Pass actual networkId 2018-07-05 22:24:21 +02:00
fragosti
97312c2656 Use default networkId of 1 for ledger dropdown 2018-07-05 11:45:54 -07:00
fragosti
e9e4df4891 Fix onboarding closing on unlock metamask step on click outside 2018-07-05 11:28:34 -07:00
Francesco Agosti
e0f80c5e6a Merge pull request #816 from 0xProject/feature/website/portal-mobile-improvements
Make onboarding and wallet copy dynamic based on OS
2018-07-05 11:09:25 -07:00
Alex Shafranovich
f21b042ed1 Contracts 2.0.0 were linted with solhint 2018-07-05 21:01:14 +03:00
Alex Shafranovich
d8c7c9803c Added Solhint package and 'lint-contracts' npm script 2018-07-05 20:58:52 +03:00
fragosti
302b9deef3 Rename getBestDownloadLink to getBestWalletDownloadLinkAndIsMobile 2018-07-05 10:54:13 -07:00
Leonid Logvinov
0c8264801a Fix tests 2018-07-05 19:11:41 +02:00
Leonid Logvinov
54d1a0359f Fix prettier 2018-07-05 17:09:14 +02:00
Leonid Logvinov
b87e48c113 Fix merge conflicts 2018-07-05 16:51:37 +02:00
Fabio Berger
a874cd2424 Remove legacy logic 2018-07-05 16:42:01 +02:00
Fabio Berger
d9e308e53a Refactor order-watcher to use Blockstream under-the-hood 2018-07-05 16:39:53 +02:00
Leonid Logvinov
efc3536283 Add CHANGELOG entries 2018-07-05 16:30:36 +02:00
Leonid Logvinov
4b7e669d29 Upgrade artifacts 2018-07-05 16:02:26 +02:00
Leonid Logvinov
01c6efeaf1 Merge branch 'v2-prototype' into v2-contract-wrappers-WIP 2018-07-05 17:00:50 +03:00
Leonid Logvinov
22cf7bee5b Merge pull request #814 from 0xProject/feature/fill-scenarios-v2
@0xproject/contract-wrappers V2 refactor. Part 2
2018-07-05 16:59:12 +03:00
Leonid Logvinov
ef890aeac4 Adjust comments 2018-07-05 15:58:42 +02:00
Leonid Logvinov
91e8c00076 Fix comments 2018-07-05 15:58:42 +02:00
Leonid Logvinov
20bf4d8ef9 Improve the comment 2018-07-05 15:58:42 +02:00
Leonid Logvinov
795da130a2 Rename Proxie to Proxy 2018-07-05 15:58:41 +02:00
Leonid Logvinov
51a625d4af Rename compact_artifacts to artifacts 2018-07-05 15:58:41 +02:00
Leonid Logvinov
ab8544b0ff Rearrange assertions t match parameter order 2018-07-05 15:58:41 +02:00
Leonid Logvinov
b68d16820f Fix match orders test and add a validation TODO 2018-07-05 15:58:41 +02:00
Leonid Logvinov
61d9cdced0 Add tests for exchange contract wrapper 2018-07-05 15:58:41 +02:00
Leonid Logvinov
714f9ed207 Add Exchange contract wrapper 2018-07-05 15:56:32 +02:00
Leonid Logvinov
ccccaf8e12 Pass through blockPollingInterval down to contract wrapper 2018-07-05 15:56:31 +02:00
Leonid Logvinov
c3ce9d6104 Export orderStatus and OrderInfo 2018-07-05 15:56:31 +02:00
Leonid Logvinov
d3f602f063 Add blockPollingInterval config to contractWrappers config type 2018-07-05 15:56:31 +02:00
Leonid Logvinov
6b379a8a0f Add contractWrappers.erc721Proxy.getproxyIdAsync 2018-07-05 15:56:31 +02:00
Leonid Logvinov
d1d636f1ca Add contractWrappers.erc20Proxy.getproxyIdAsync 2018-07-05 15:56:31 +02:00
Leonid Logvinov
ba9d3cbdb8 Make it possible to configure block polling interval in base contract wrapper 2018-07-05 15:56:31 +02:00
Leonid Logvinov
bcf8d51806 Add blockPollingIntervalMs as an optional field to contract-wrappers config schemas 2018-07-05 15:05:58 +02:00
Leonid Logvinov
66c0d6724a Add even more entries to postinstall hack 2018-07-05 15:05:58 +02:00
Leonid Logvinov
0f477607f9 Update dummy tokens addresses in token_utils 2018-07-05 15:05:58 +02:00
Leonid Logvinov
c1635f2656 Remove only from tests 2018-07-05 15:05:57 +02:00
Leonid Logvinov
029d91bd7a Add OrderInfo and OrderStatus to types 2018-07-05 15:05:57 +02:00
Leonid Logvinov
03dbad6813 Add OrderTxOptsSchema 2018-07-05 15:05:57 +02:00
Leonid Logvinov
c65b2573c4 Refactor fill-scenarios for V2 2018-07-05 15:05:57 +02:00
Leonid Logvinov
7fbee77875 Export ecSignatureParameterSchema from json-schemas 2018-07-05 15:05:57 +02:00
Leonid Logvinov
3cc1a952ca Add ordersSchema to json-schemas 2018-07-05 15:05:57 +02:00
Leonid Logvinov
9c8de3e933 Fix VRS signature generation in order-utils 2018-07-05 15:05:57 +02:00
Leonid Logvinov
cbdce6b67e Update ABI in compact_artifacts 2018-07-05 15:05:57 +02:00
Leonid Logvinov
a6746ae5cd Upgrade artifacts 2018-07-05 15:05:57 +02:00
Leonid Logvinov
7111f3ffc6 Dump assert version and make the order-watcher depend on the old assert version 2018-07-05 15:05:57 +02:00
Fabio Berger
87a7a4ad2d Merge pull request #821 from 0xProject/remove-web3-from-wrapper
Remove Web3.js From 0x-monorepo 🍾
2018-07-05 15:04:58 +02:00
Leonid Logvinov
1ee2d6ed54 Merge branch 'v2-prototype' into v2-contract-wrappers-WIP 2018-07-05 15:04:01 +02:00
Leonid Logvinov
1eba78e20a Revert all changes to the contracts 2018-07-05 14:49:05 +02:00
Fabio Berger
a1fb438a8c Prettier fixes 2018-07-05 13:03:33 +02:00
Fabio Berger
40d1b0a23c Update json-schema version used by web3-wrapper 2018-07-05 12:35:38 +02:00
Fabio Berger
1c9a657693 Add schema assertion checks for callData and txData 2018-07-05 12:35:16 +02:00
Fabio Berger
11747c6cf4 Make sure from is included in txData 2018-07-05 12:34:15 +02:00
Fabio Berger
2a7b3aecc3 Add CallData schema to json-schemas 2018-07-05 12:33:48 +02:00
Fabio Berger
75babed693 Update assert changelog 2018-07-05 12:07:17 +02:00
Fabio Berger
0a32ae6cb5 Add defaultBlock param to getBalanceInWeiAsync 2018-07-05 12:04:08 +02:00
Fabio Berger
3d67f122a5 Move 'from' check to sendTransaction 2018-07-05 12:03:34 +02:00
Fabio Berger
b0daec8384 Remove bn.js unused dep 2018-07-05 01:56:40 +02:00
Fabio Berger
f5b1fe0e6b Fix linter issues 2018-07-05 01:45:56 +02:00
Fabio Berger
139d289b01 remove stray console.log 2018-07-05 01:39:46 +02:00
Fabio Berger
fd242a9cba Remove web3Utils dep and write necessary utility methods 2018-07-05 01:38:14 +02:00
Fabio Berger
7efa17ef7d Add new param javadoc comment 2018-07-05 00:40:43 +02:00
Fabio Berger
a0b9c7777b merge v2-prototype 2018-07-05 00:38:15 +02:00
Fabio Berger
5204e4c08d Pass 'from' param to estimateGas since it is required 2018-07-05 00:36:30 +02:00
Fabio Berger
1050ecdf3c Refactor Web3Wrapper to no longer use Web3.js & add more test coverage 2018-07-05 00:36:01 +02:00
Fabio Berger
5176d929fa Merge pull request #817 from 0xProject/remove-web3
Remove Web3 Dependencies (exept for in web3-wrapper)
2018-07-04 18:51:17 +02:00
Fabio Berger
d712dc47d9 Removee getContractFromAbi method since we no longer use it and do not recommend others use it 2018-07-04 18:11:50 +02:00
Fabio Berger
8adc6f0faa merge v2-prototype 2018-07-04 16:35:49 +02:00
Fabio Berger
4e783fba57 Add missing undefined check 2018-07-04 16:34:03 +02:00
Jacob Evans
ade620f4f7 Merge pull request #775 from RadarRelay/eth-lightwallet-subprovider-final
Eth lightwallet subprovider (replaces #660)
2018-07-04 20:49:25 +10:00
Jacob Evans
5915f8430c Merge branch 'v2-prototype' into eth-lightwallet-subprovider-final 2018-07-04 20:29:54 +10:00
Jacob Evans
9e0f06d060 Specify the lint rule to disable 2018-07-04 20:06:10 +10:00
Fabio Berger
ce86ae0191 Add assert dep 2018-07-04 08:56:12 +02:00
Fabio Berger
2bec5cb7fd Fix bug in string enum assertion so that we check enum values not keys 2018-07-04 08:55:16 +02:00
Fabio Berger
cd766ea2a1 Add more assertions to Web3Wrapper public methods 2018-07-04 08:54:43 +02:00
Fabio Berger
aeea3817a4 Merge pull request #818 from 0xProject/fix-intermittent-test-failure
Fix intermittent test failure in Subproviders package
2018-07-04 07:48:37 +02:00
fragosti
0f11ae1875 No longer elevate relayer grid tile on long press 2018-07-03 18:22:19 -07:00
fragosti
6e87e3e1ac Fix issue where onboarding doesn't scroll to wallet when starting from relayers page 2018-07-03 18:05:00 -07:00
Fabio Berger
4ba108d12f Use stub in test to avoid difference in setup, how network requests take place 2018-07-04 00:59:18 +02:00
Fabio Berger
8ff17ff960 improve comment 2018-07-04 00:41:19 +02:00
Fabio Berger
0d56daf7ab remove console.log 2018-07-04 00:37:39 +02:00
Fabio Berger
9db0bc262b Fix conditional 2018-07-04 00:36:57 +02:00
Fabio Berger
f410903465 Rename to InjectedProvider and make publicConfigStore optional 2018-07-04 00:29:29 +02:00
Fabio Berger
5f2c303bd8 Remove hack since latest web3-provider-engine fixed underlying issue 2018-07-04 00:23:40 +02:00
Fabio Berger
6aa4984fed Fix instance variable name 2018-07-04 00:22:21 +02:00
Fabio Berger
f5cd1ac82e Fix linter 2018-07-04 00:18:09 +02:00
Fabio Berger
54c0b7b261 Fix type 2018-07-04 00:13:36 +02:00
Fabio Berger
a7902eca1f Fix package.json 2018-07-03 23:57:33 +02:00
Fabio Berger
2b4bb579d4 Rename subprovider in blockchain.ts 2018-07-03 23:57:19 +02:00
fragosti
52c956222e Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-mobile-improvements 2018-07-03 14:43:23 -07:00
Francesco Agosti
0900e0c85e Merge pull request #811 from 0xProject/feature/website/onboarding-polish-2
Add Hotjar, and other small improvements
2018-07-03 14:43:02 -07:00
Fabio Berger
a5653337c1 Remove unused imported Web3.js 2018-07-03 23:36:14 +02:00
Fabio Berger
d097113639 Remove dep on Web3 in Website. Introduced InjectedWeb3 type. 2018-07-03 23:34:51 +02:00
fragosti
9389d64392 Add toshi logo asset 2018-07-03 14:32:11 -07:00
fragosti
931e7e7d71 Prompt user to download Toshi or MetaMask in install wallet onboarding step 2018-07-03 14:28:49 -07:00
Fabio Berger
cce2fb40a1 Fix import 2018-07-03 23:11:59 +02:00
Fabio Berger
547cf4bef3 Refactor testnet-faucet to use web3Wrapper instead of web3 directly 2018-07-03 23:11:49 +02:00
Fabio Berger
d528ce757c Replace use of web3 w/ web3wrapper in subproviders and rename injectedWeb3 to signer subprovider for clarity 2018-07-03 22:58:17 +02:00
fragosti
3b78188fec Show different download links and icons when on mobile 2018-07-03 13:51:58 -07:00
Alex Browne
d91b30faef Merge pull request #812 from 0xProject/fix/revert-assertions-improvements
Improve robustness of revert reason assertions
2018-07-03 13:42:30 -07:00
Alex Browne
dc956020ef Move NodeType caching out of web3-wrapper and into our internal code 2018-07-03 12:57:11 -07:00
fragosti
a52eb81380 Rename isMobile utility fn to be more specific and add isMobileOperatingSystem 2018-07-03 12:48:19 -07:00
fragosti
ab0055d5c6 Add OperatingSystemType and get OS util 2018-07-03 12:45:28 -07:00
fragosti
32c25a2034 Persist whether onboarding is open or close across refreshes 2018-07-03 11:48:34 -07:00
fragosti
c30b42434a Fix linting 2018-07-03 11:31:40 -07:00
fragosti
3c797a6e11 Merge branch 'fixed-position-onboarding' into feature/website/onboarding-polish-2 2018-07-03 11:26:26 -07:00
Brandon Millman
9b864517e2 Merge pull request #799 from 0xProject/feature/website/wallet-menu
Add menu for at the top of wallet and top right component
2018-07-03 11:19:52 -07:00
Fabio Berger
a858e2870b Merge pull request #815 from 0xProject/update-dependencies
Update Blockstream & ProviderEngine
2018-07-03 20:19:08 +02:00
Alex Browne
ce1542da4f Update CHANGELOG.json for ethereum-types and web3-wrapper 2018-07-03 10:59:45 -07:00
Alex Browne
d2ebf4a777 Add TransactionReceiptStatus type to ethereum-types 2018-07-03 10:49:35 -07:00
Alex Browne
c5fcea1dbd Actually cache node type in web3-wrapper 2018-07-03 10:40:54 -07:00
Fabio Berger
5e8ef070e2 Fix alignment 2018-07-03 18:26:12 +02:00
Brandon Millman
2d30c290e9 Remove InstallPrompt 2018-07-03 09:22:52 -07:00
Fabio Berger
688b34710e Update blockstream to latest version, propogate errors to top-level callers 2018-07-03 18:15:20 +02:00
Brandon Millman
afbfc8ba1c Implement clickaway for wallet menu on mobile 2018-07-03 09:06:29 -07:00
Fabio Berger
671f29774b Update web3-provider-engine version w/o caret 2018-07-03 16:56:49 +02:00
Fabio Berger
4c99ac0ca2 Update web3-provider-engine 2018-07-03 15:59:30 +02:00
Leonid Logvinov
0e690608d3 Merge pull request #782 from 0xProject/feature/contract-wrappers-v2
@0xproject/contract-wrappers V2 refactor. Part 1
2018-07-03 15:32:38 +03:00
Fabio Berger
92f6391df5 Merge pull request #801 from feuGeneA/patch-3
in subproviders/package.json, cite typescript-typings only once
2018-07-03 11:53:23 +02:00
Brandon Millman
f2af6e4b3a Add optional onClick to Link simple menu item 2018-07-03 01:51:59 -07:00
Jacob Evans
27c03cffe2 Fix unused imports 2018-07-03 17:01:08 +10:00
Jacob Evans
499915042e Merge branch 'v2-prototype' into eth-lightwallet-subprovider-final 2018-07-03 16:58:08 +10:00
Jacob Evans
1a901554cc compiler and ts lint are confused about ContractEventArgs 2018-07-03 15:39:15 +10:00
Alex Browne
5b64b3ea93 Improve robustness of revert reason assertions 2018-07-02 18:57:33 -07:00
fragosti
6fc5c0cd46 Remove unused import 2018-07-02 18:36:41 -07:00
Brandon Millman
328da21420 Merge pull request #806 from 0xProject/feature/website/mobile-readable-web3-names
Add detection logic for Toshi and Cipher
2018-07-02 18:26:16 -07:00
Brandon Millman
81062d20eb Merge pull request #808 from 0xProject/feature/website/better-balance-formatting
Add better balance formatting rules for balances and usd values
2018-07-02 18:25:58 -07:00
Brandon Millman
835d06dcdc Merge pull request #810 from 0xProject/feature/wesbite/remove-add-balance
Remove increase balance link from balance_bounded_input component
2018-07-02 18:25:43 -07:00
fragosti
8929543b55 Add end comment to hotjar tracking code 2018-07-02 18:15:41 -07:00
fragosti
f62044c1e3 Add media file and remove stray comment 2018-07-02 18:14:21 -07:00
fragosti
a31f7a5112 Implement fixed position onboarding option 2018-07-02 18:12:08 -07:00
Brandon Millman
fe68114f39 Use new lock svg 2018-07-02 17:56:37 -07:00
fragosti
a5231df6d9 Add media query abstraction around ScreenWidths and stop relayer grid hover effect on mobile 2018-07-02 17:26:48 -07:00
Brandon Millman
fd545ec00f Remove increase balance link from balance_bounded_input component 2018-07-02 17:14:46 -07:00
Brandon Millman
73d8a2adf7 Always show the wrap ether row in between ETH and WETH 2018-07-02 17:02:11 -07:00
Brandon Millman
04d11d6fac Add human readable names for Toshi and Cipher 2018-07-02 16:37:22 -07:00
Brandon Millman
2eede4a09e Update start onboarding copy and relayer grid empty color 2018-07-02 16:30:13 -07:00
Brandon Millman
bc7e8ff471 Add better balance formatting rules for balances and usd values 2018-07-02 16:08:02 -07:00
fragosti
73e81c62fb Remove max-width from onboarding card to support iPad 2018-07-02 15:58:53 -07:00
fragosti
8c5dc7cecd Only auto-start onboarding if blockchain is loaded 2018-07-02 15:52:59 -07:00
Francesco Agosti
300c9f09b9 Merge pull request #805 from 0xProject/feature/website/add-alex-to-about
Add Alex Browne to about page
2018-07-02 14:09:31 -07:00
fragosti
06f4427939 Add Alex Browne to about page 2018-07-02 13:15:40 -07:00
Amir Bandeali
b1dc20bbb3 Add developer mailing list link to README 2018-07-02 09:51:51 -07:00
F. Eugene Aumson
4887d1d42f in subproviders, cite typescript-typings only once
`yarn build` was giving the following warning:

warning package.json: "dependencies" has dependency "@0xproject/typescript-typings" with range "^0.4.1" that collides with a dependency in "devDependencies" of the same name with version "^0.4.2"
2018-07-02 11:23:33 -04:00
Fabio Berger
d247d72e3e Merge pull request #803 from 0xProject/fix/publishing/remote-tag-removal
Small publish fixes
2018-07-02 16:20:34 +02:00
Fabio Berger
50957e1d29 Update incorrect versions of deps 2018-07-02 16:04:48 +02:00
Fabio Berger
6aad12a52f Add new changelog entry 2018-07-02 14:26:52 +02:00
Fabio Berger
db0944acde fix prettier 2018-07-02 14:21:49 +02:00
Fabio Berger
e553ef83de Git command outputs logs to stdErr so only way to check for errors if with try/catch 2018-07-02 14:20:42 +02:00
Fabio Berger
a619949a56 Remove remote tag before local one 2018-07-02 14:19:30 +02:00
Fabio Berger
1346fa792a Add logs for when tags get removed 2018-07-02 13:53:44 +02:00
Fabio Berger
b763cdbd4c combine changelog entries since we haven't published yet 2018-07-02 13:53:24 +02:00
Fabio Berger
e4eac14dc9 version outdated 2018-07-02 13:53:05 +02:00
Fabio Berger
bdda1f2992 Throw if changelog version is below package.json version 2018-07-02 13:32:22 +02:00
Fabio Berger
9c7289d7a3 Update outdated changelogs 2018-07-02 13:31:34 +02:00
Fabio Berger
d861caca23 Fix bug where 18 decimal tokens instead of 5 decimal tokens created 2018-07-02 12:31:02 +02:00
Fabio Berger
590033bcb2 Merge pull request #802 from 0xProject/fix/five_decimal_scenario
FillOrder Combinatorial Testing Fixes
2018-07-02 12:24:57 +02:00
Fabio Berger
af1e4574a8 Disable custom-no-magic-number for block 2018-07-02 11:39:07 +02:00
Fabio Berger
7b806fe84d Remove unused variable 2018-07-02 11:18:48 +02:00
Fabio Berger
e54e2ac67b Add .vscode from .gitignore 2018-07-02 11:13:31 +02:00
Fabio Berger
de9f0732a0 Merge branch 'v2-prototype' into fix/five_decimal_scenario
* v2-prototype: (75 commits)
  Update relayer grid tiles to use Text
  Fix build
  Update file structure
  Update 2.0.0 artifacts
  Move ledgerhq module declarations to typescript-typings
  Export LedgerEthereumClient type in subproviders
  Update artifacts
  Add logging and updated artifacts
  Fix migrations
  Run prettier
  Add Kovan artifacts
  Use ledger subprovider
  Add Kovan migrations
  Remove state variable from Link component in Portal
  Make registerAssetProxy append only
  Update staging api link
  Change getTransactionReceipt to awaitTransactionMined
  Move /docs route to the end
  Remove extra call to scrollIntoView for wallet in onboarding
  Update expectRevertReasonOrAlwaysFailingTransactionAsync to check status codes
  ...
2018-07-02 11:12:01 +02:00
Fabio Berger
20acdbf6c3 Add commented out scenarios not run by default 2018-07-02 11:01:15 +02:00
Fabio Berger
6a6d2f73a8 Fix comment 2018-07-02 11:00:32 +02:00
Fabio Berger
f5a8f00af8 Fix validation logic by checking for 0 maker/taker amount before 0 fillTakerAssetAmount since one causes the other during combinatorial testing 2018-07-02 10:52:49 +02:00
Fabio Berger
018a437d62 Print out entire orderFill scenario 2018-07-02 10:51:28 +02:00
Fabio Berger
32d75b6483 Transfer ERC721 token instead of burning, so we can still set an allowance to it in tests 2018-07-02 10:50:48 +02:00
Fabio Berger
cb6cace910 Fix bug where using nullAddress for order instead of actual taker address 2018-07-02 10:49:41 +02:00
Fabio Berger
0326ddd79d Add maker and taker balance/allowance scenarios to generateFillOrderCombination 2018-07-02 10:48:59 +02:00
Jacob Evans
d6f40a9281 Remove duplicated typescript-typings in package.json 2018-07-02 18:14:19 +10:00
Jacob Evans
687802394a Remove duplicate type definitions.
Clear private key earlier
Fix changelog in typescript-typings from bad merge
2018-07-02 18:09:05 +10:00
Jacob Evans
ad570b8ae1 Merge branch 'v2-prototype' into eth-lightwallet-subprovider-final 2018-07-02 11:21:16 +10:00
Jacob Evans
b9165c03af Use PrivateKeySubprovider inside eth lightwallet
There's a loss of information when hex encoding and passing to eth light wallet (chain id is lost). This results in a different signature. While it may work on testnets it is not sufficient for our test cases. We can export the private key and use it in our PrivateKeyWalletSubprovider
2018-07-02 11:09:32 +10:00
F. Eugene Aumson
cfe57f52f4 use bullets, not a task list, for Types of Changes 2018-07-01 20:44:28 -04:00
Brandon Millman
86d4ffe7e5 Lint fixes 2018-07-01 14:51:02 -07:00
Brandon Millman
2dea179333 More cleanup 2018-07-01 14:51:02 -07:00
Brandon Millman
5a7908984e Consolidate logic for common menu items 2018-07-01 14:51:02 -07:00
Brandon Millman
955fdf5d13 Give connected header accessory more padding 2018-07-01 14:51:02 -07:00
Brandon Millman
a6f40d4187 Implement correct behavior for menu in the wallet 2018-07-01 14:50:55 -07:00
Brandon Millman
6daf754f5b Add menu to wallet 2018-07-01 14:50:55 -07:00
Brandon Millman
da8cf9981e Implement simple menu 2018-07-01 14:50:55 -07:00
Brandon Millman
be64184cfa Clean up a bit of the provider display logic 2018-07-01 14:50:55 -07:00
Brandon Millman
3031598843 Implement icon button 2018-07-01 14:50:55 -07:00
Brandon Millman
b9b00e10d3 Update relayer grid tiles to use Text 2018-06-30 12:37:34 -07:00
Amir Bandeali
6c34255a3e Merge pull request #781 from 0xProject/refactor/contracts/fileStructure
Update contracts file structure
2018-06-29 18:36:00 -07:00
Amir Bandeali
41064adc66 Fix build 2018-06-29 18:20:44 -07:00
Amir Bandeali
2fcc36bbad Update file structure 2018-06-29 18:05:40 -07:00
Amir Bandeali
762c0143eb Merge pull request #770 from 0xProject/feature/migrations/kovan-deploy
Add Kovan migrations
2018-06-29 17:49:15 -07:00
Amir Bandeali
6c6f34ee72 Update 2.0.0 artifacts 2018-06-29 17:41:25 -07:00
Francesco Agosti
42b7b0dab9 Merge pull request #787 from 0xProject/feature/website/portal-onboarding-polish
Portal v2 onboarding polish
2018-06-29 17:40:43 -07:00
Amir Bandeali
e58e35e098 Move ledgerhq module declarations to typescript-typings 2018-06-29 17:25:56 -07:00
Amir Bandeali
654b048602 Export LedgerEthereumClient type in subproviders 2018-06-29 17:25:56 -07:00
Amir Bandeali
3ece72af49 Update artifacts 2018-06-29 17:25:56 -07:00
Amir Bandeali
2ef31991c7 Add logging and updated artifacts 2018-06-29 17:25:56 -07:00
Amir Bandeali
d3293a5571 Fix migrations 2018-06-29 17:25:56 -07:00
Amir Bandeali
854752acdf Run prettier 2018-06-29 17:25:56 -07:00
Amir Bandeali
0c889385f1 Add Kovan artifacts 2018-06-29 17:25:56 -07:00
Amir Bandeali
6e1a549fcb Use ledger subprovider 2018-06-29 17:25:56 -07:00
Amir Bandeali
5f0a2953c6 Add Kovan migrations 2018-06-29 17:25:56 -07:00
Amir Bandeali
78b513c52a Merge pull request #797 from 0xProject/refactor/contracts/registerAssetProxy
Make registerAssetProxy append only
2018-06-29 17:25:21 -07:00
fragosti
8ffce78827 Remove state variable from Link component in Portal 2018-06-29 16:47:58 -07:00
Amir Bandeali
d4852092b8 Make registerAssetProxy append only 2018-06-29 16:25:16 -07:00
Brandon Millman
622ce0bf2e Update staging api link 2018-06-29 16:11:57 -07:00
Amir Bandeali
6a197a64e6 Merge pull request #793 from 0xProject/feature/contracts/transferFromFallback
Optimize transferFrom (saves ~2000 gas /fill)
2018-06-29 15:34:56 -07:00
Amir Bandeali
1e4c3ed22b Change getTransactionReceipt to awaitTransactionMined 2018-06-29 15:21:00 -07:00
Brandon Millman
e3521c6388 Move /docs route to the end 2018-06-29 15:20:44 -07:00
fragosti
9d81e069dc Remove extra call to scrollIntoView for wallet in onboarding 2018-06-29 14:04:41 -07:00
Amir Bandeali
8623a30763 Merge pull request #796 from 0xProject/fix/contracts/failingTransactionAssertions
Update expectRevertReasonOrAlwaysFailingTransactionAsync to check status codes
2018-06-29 14:03:28 -07:00
Alex Browne
6cf39896f1 Update expectRevertReasonOrAlwaysFailingTransactionAsync to check status codes 2018-06-29 13:46:42 -07:00
Amir Bandeali
44b6adaa29 Fix deployment to geth 2018-06-29 13:33:22 -07:00
Amir Bandeali
762a6199b2 Fix tests 2018-06-29 13:33:22 -07:00
Amir Bandeali
8da42b12f4 Remove transferFrom, implement in fallback function 2018-06-29 13:33:22 -07:00
fragosti
c473a0444c Bump automatic show onborading delay by 1000ms 2018-06-29 13:30:43 -07:00
fragosti
e693629bbd Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-onboarding-polish 2018-06-29 13:27:19 -07:00
fragosti
0dbe883c3b Fix onboarding always starting 2018-06-29 13:24:31 -07:00
Brandon Millman
cc12bc9247 Merge pull request #792 from 0xProject/feature/website/wallet-polish
Various wallet polish items
2018-06-29 12:01:13 -07:00
Brandon Millman
ddec01e6c1 Change function to a const 2018-06-29 11:56:31 -07:00
Brandon Millman
03bc7bb935 Move wallet scrollIntoView into PortalOnboardingFlow 2018-06-29 11:55:00 -07:00
fragosti
5207dfdc0e Rename userHasAllowances bool to follow proper convention 2018-06-29 11:50:24 -07:00
fragosti
fc40efb761 Allow you to continue the onboarding flow once youve installed metamask and refreshed the page 2018-06-29 11:47:12 -07:00
Amir Bandeali
50556e2609 Merge pull request #774 from 0xProject/style/contracts/abiEncodeAsmComments
Added some comments for ASM hashing
2018-06-29 11:41:23 -07:00
Alex Browne
7a22298597 Merge pull request #794 from 0xProject/fix/devnet-minimum-blocks
Improve reliability of the minimum block number hack for devnet/geth
2018-06-29 11:21:17 -07:00
fragosti
36cadaae46 Use Image component where relevant and add back tracked token timestamp logic 2018-06-29 11:08:48 -07:00
Leonid Logvinov
09e921a562 Fix build after rebase 2018-06-29 17:52:55 +03:00
Leonid Logvinov
13cbaf56b2 Add a comment 2018-06-29 17:52:55 +03:00
Leonid Logvinov
62910c8e89 Assign true values to names vars 2018-06-29 17:52:55 +03:00
Leonid Logvinov
f20e1acad9 Fix a typo 2018-06-29 17:52:55 +03:00
Leonid Logvinov
5dea432ebf Set the interval to 0 in awaitTranscationSuccessAsync 2018-06-29 17:52:55 +03:00
Leonid Logvinov
016d82d766 Make promises dangerous 2018-06-29 17:52:54 +03:00
Leonid Logvinov
260c72cc20 Add a TODO comment 2018-06-29 17:52:54 +03:00
Leonid Logvinov
3d7bcd7ecb Add isSubscriptionToken assertion 2018-06-29 17:52:54 +03:00
Leonid Logvinov
ac9175bf88 Rename approved to approvedAddress 2018-06-29 17:52:54 +03:00
Leonid Logvinov
294d3bbdc1 Use removeUndefinedProperties for txOpts 2018-06-29 17:52:54 +03:00
Leonid Logvinov
6db614251e Rename getApprovedAsync to getApprovedIfExistsAsync 2018-06-29 17:52:54 +03:00
Leonid Logvinov
bcc588efe7 Add HACK comments 2018-06-29 17:52:54 +03:00
Leonid Logvinov
f7b3fc58bc Add assertions for txOpts and methodOpts 2018-06-29 17:52:54 +03:00
Leonid Logvinov
de40497330 Remove v2 artifact scripts 2018-06-29 17:52:54 +03:00
Leonid Logvinov
d84bb7ed7e Remove tokenTransferProxyAddress from config 2018-06-29 17:52:54 +03:00
Leonid Logvinov
f02ada2d11 Add a hack comment 2018-06-29 17:52:54 +03:00
Leonid Logvinov
48970d3424 Fix a typo 2018-06-29 17:52:54 +03:00
Leonid Logvinov
8940b1759d Fix linter errors 2018-06-29 17:52:54 +03:00
Leonid Logvinov
91a50d0f53 Fix addresses in WETH9 and ZRX token artifacts 2018-06-29 17:52:54 +03:00
Leonid Logvinov
ed4f8c5b66 Fix the token supply in migrations 2018-06-29 17:52:53 +03:00
Leonid Logvinov
2f07ee0a8f Dump assert version and make the order-watcher depend on the old assert version 2018-06-29 17:52:53 +03:00
Leonid Logvinov
8dd00a8eef Change event args names after templates change 2018-06-29 17:52:53 +03:00
Leonid Logvinov
d7845a177e Add contract-wrappers -> json-schemas and order-utils to postinstall hack 2018-06-29 17:52:53 +03:00
Leonid Logvinov
7a3be0a320 Change import paths from z_r_x and e_r_c to zrx and erc in migrations 2018-06-29 17:52:53 +03:00
Leonid Logvinov
14cebce304 Regenerate yarn.lock 2018-06-29 17:52:53 +03:00
Leonid Logvinov
9fcf9f2504 Export newly refactored contracts from contract-wrappers and index.ts 2018-06-29 17:52:53 +03:00
Leonid Logvinov
c466ab6cf2 Change artifacts list and add dependencies to package.json 2018-06-29 17:52:53 +03:00
Leonid Logvinov
01bf789ad4 Bump the version so that order-watcher doesn't pick it up 2018-06-29 17:52:53 +03:00
Leonid Logvinov
1a1ab5af54 Refactor event subscription tests 2018-06-29 17:52:53 +03:00
Leonid Logvinov
4089ad7b4b Refactor types 2018-06-29 17:52:53 +03:00
Leonid Logvinov
2adc299c78 Implement ERC721 token wrapper and token transfer proxy with tests 2018-06-29 17:52:53 +03:00
Leonid Logvinov
3aef323c13 Refactor ERC20 token transfer proxy and it's tests 2018-06-29 17:52:53 +03:00
Leonid Logvinov
a655cd046c Refactor ERC20 token wrapper and it's tests 2018-06-29 17:52:53 +03:00
Leonid Logvinov
9c8701f5f6 Refactor ether token wrapper test 2018-06-29 17:52:52 +03:00
Leonid Logvinov
7ac84aff0a Refactor base contract-wrapper class to use new names, artifact format and only decode logs from that contract 2018-06-29 17:52:52 +03:00
Leonid Logvinov
fd13c8f68c Refactor EtherToken contract wrapper to use new names and artifacts format 2018-06-29 17:52:52 +03:00
Leonid Logvinov
532964af42 Use new signature verification method in assertions 2018-06-29 17:52:52 +03:00
Leonid Logvinov
52d1407215 Export txDefaults from web3_wrapper.ts 2018-06-29 17:52:52 +03:00
Leonid Logvinov
ecb7356345 Refactor tokenUtils to not use tokenRegistry 2018-06-29 17:52:52 +03:00
Leonid Logvinov
edda7dae94 Add new test constants 2018-06-29 17:52:52 +03:00
Leonid Logvinov
32da0a376a Skip & refactor artifacts tests 2018-06-29 17:52:52 +03:00
Leonid Logvinov
073e76ee90 Run V2 migrations instead of V1 before tests 2018-06-29 17:52:52 +03:00
Leonid Logvinov
ceba82260f Remove unused params in filter_utils 2018-06-29 17:52:52 +03:00
Leonid Logvinov
a5a61c87fc Start unused parameter names with underscore 2018-06-29 17:52:52 +03:00
Leonid Logvinov
d34feb1e0a Remove old contracts and add new ones to/from artifacts.ts 2018-06-29 17:52:52 +03:00
Leonid Logvinov
6cc5e45183 Remove exchange-related functionality for now 2018-06-29 17:52:52 +03:00
Leonid Logvinov
618c7ef48a Update compact_wrtifacts 2018-06-29 17:52:52 +03:00
Leonid Logvinov
14047f9c7b Change import paths from z_r_x and e_r_c to zrx and erc. Also rename event args after templates change 2018-06-29 17:52:51 +03:00
Leonid Logvinov
f439f162d2 Change import paths from z_r_x and e_r_c to zrx and erc 2018-06-29 17:52:51 +03:00
Leonid Logvinov
5b685b32bd Rename TransferContractEventArgs to MetacoinTransferEventArgs after changing contracts templates 2018-06-29 17:52:51 +03:00
Leonid Logvinov
6ce151c676 Change import paths from z_r_x and e_r_c to zrx and erc 2018-06-29 17:52:51 +03:00
Leonid Logvinov
eb79b5d651 Pin contract-wrappers version 2018-06-29 17:52:51 +03:00
Leonid Logvinov
608e1c8960 Remove unused code/variables from abi-decoder 2018-06-29 17:52:51 +03:00
Leonid Logvinov
f8772d8850 Rename {{*}}ContractEventArgs to {{*}}EventArgs and append {{contractName}} to each event name (ERC721TransferEventArgs instead of TransferContractEventArgs) 2018-06-29 17:52:51 +03:00
Leonid Logvinov
ce2f408864 Update json-schema version to 1.0.0 2018-06-29 17:52:51 +03:00
Leonid Logvinov
c2a362e3ea Add to postinstall hack: rm fill-scenarios/node_modules/@0xproject 2018-06-29 17:52:51 +03:00
Leonid Logvinov
eafdd4d42d Remove generated contract directory before writing new contracts and replace z_r_x and e_r_c with zrx and erc accordingly 2018-06-29 17:52:51 +03:00
Fabio Berger
1a2c58494f Merge pull request #783 from 0xProject/miscenaleous-fixes
Migration Related Miscellaneous fixes
2018-06-29 11:59:49 +02:00
Fabio Berger
68c00976f1 Fix merge 2018-06-29 11:40:05 +02:00
Fabio Berger
aa2616b307 Merge v2-prototype 2018-06-29 11:34:38 +02:00
Jacob Evans
3062c18ebd Merge pull request #795 from 0xProject/miscellaneous-fixes/v2-exchange-register-assets
Register the asset proxies to exchange
2018-06-29 19:31:10 +10:00
Jacob Evans
a83f5241dc Register the asset proxies to exchange 2018-06-29 19:12:42 +10:00
Brandon Millman
f89acb49be Add dollar sign to NullTokenRow 2018-06-29 01:11:02 -07:00
Brandon Millman
2b5f45676f Remove unused imports and variables 2018-06-29 01:07:50 -07:00
Brandon Millman
aedd51a61b Refactor inline styles out of Wallet 2018-06-29 00:59:24 -07:00
Brandon Millman
0b5a49c17d Remove some hardcoded MetaMask colors 2018-06-28 23:31:17 -07:00
Brandon Millman
08f7666d21 Create AccountConnection component 2018-06-28 23:24:57 -07:00
Brandon Millman
81ff99276b Fix scrollbar bug 2018-06-28 23:03:30 -07:00
fragosti
e71862676c Bold all balances in onboarding 2018-06-28 18:02:32 -07:00
fragosti
67777c586d Customize allowance setting onboarding step if you have your allowances set 2018-06-28 18:00:10 -07:00
fragosti
9ada8e4ddf Re-center react-popper on every step 2018-06-28 17:51:39 -07:00
fragosti
0142e7fa8f Fix button hover and active hover state 2018-06-28 17:37:22 -07:00
fragosti
467e9abf5f Show eth balance in add eth balance onboarding step 2018-06-28 17:34:29 -07:00
fragosti
512980d9bd Change onboarding flow to communicate 3 steps 2018-06-28 17:25:58 -07:00
fragosti
e235a63119 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-onboarding-polish 2018-06-28 17:20:05 -07:00
Alex Browne
4c28b66539 Add @0xproject/utils as dependency to dev-utils/package.json 2018-06-28 15:42:56 -07:00
Greg Hysen
46d79e5115 Updated hashing comments as-per PR 2018-06-28 15:41:06 -07:00
Alex Browne
d79994fbb2 Improve reliability of the minimum block number hack for the devnet/geth 2018-06-28 15:32:14 -07:00
Brandon Millman
518a2da027 Merge pull request #791 from 0xProject/bug/website/broken-not-found
Fix NotFound component and render 0x.js docs for /docs
2018-06-28 12:35:18 -07:00
Brandon Millman
71fa92dbeb Fix NotFound component and render 0x.js docs for /docs 2018-06-28 12:24:34 -07:00
Brandon Millman
172d2353dd Start onboarding from relayer index 2018-06-28 11:50:08 -07:00
Brandon Millman
3315006c45 Fix learn how to set up account layout 2018-06-28 11:50:08 -07:00
Brandon Millman
6700745585 Fix typo 2018-06-28 11:50:08 -07:00
Brandon Millman
0ff18058ab Get rid of unused stuff in wallet 2018-06-28 11:50:08 -07:00
Brandon Millman
1a11283086 Fix body overlay on mobile 2018-06-28 11:50:08 -07:00
Brandon Millman
ed559be47c Change learn how to update your account styling 2018-06-28 11:50:08 -07:00
Brandon Millman
a60dd1cbaf Fix key issue and remove WalletDisconnectedItem 2018-06-28 11:50:08 -07:00
Brandon Millman
7ee37fb62a Implement new locked and uninstalled states 2018-06-28 11:50:08 -07:00
Brandon Millman
2970e103db Fix off center icon in wallet 2018-06-28 11:50:08 -07:00
Brandon Millman
78333b3026 Change wallet margin based on hover to prevent re-layout 2018-06-28 11:50:08 -07:00
Brandon Millman
1ca182e741 Update ProviderDisplay with new design 2018-06-28 11:50:08 -07:00
Brandon Millman
8419db53bb Implement provider name in header 2018-06-28 11:50:08 -07:00
Brandon Millman
f76c9bc226 Implement loading body rows 2018-06-28 11:50:08 -07:00
Brandon Millman
6a39a69afe Added Circle component 2018-06-28 11:50:08 -07:00
Francesco Agosti
2474d1d2f4 Merge pull request #780 from 0xProject/feature/website/support-new-metamask
Refactor Blockchain.ts to allow arbitrary provider state changes
2018-06-28 11:36:49 -07:00
fragosti
e4188f5d4c Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/support-new-metamask 2018-06-28 11:17:30 -07:00
Brandon Millman
0fcbd02d50 Merge pull request #762 from 0xProject/feature/website/scroll-to-token
Sort wallet tokens by timestamp added and scroll to newly added token
2018-06-28 10:47:43 -07:00
Brandon Millman
4969797c23 Remove isTracked field on token in favor of trackedTimestamp 2018-06-28 10:39:16 -07:00
Brandon Millman
0e932286d2 Use moment and lodash 2018-06-28 10:38:07 -07:00
Brandon Millman
366a9502dd Sort wallet tokens by timestamp added and scroll to newly added token 2018-06-28 10:38:07 -07:00
Fabio Berger
988a334758 Merge pull request #707 from 0xProject/feature/combinatorial-testing
OrderFill Declarative Testing & Combinatorial Tests [Merge after #760]
2018-06-28 11:04:16 +02:00
Fabio Berger
4fe6269043 Remove unused constants 2018-06-28 10:45:28 +02:00
Fabio Berger
646927962a Reduce the userAddresses to the individual addresses actually used by tests, as well as only deploy the number of ERC20 tokens needed for each test suite 2018-06-28 10:43:37 +02:00
Fabio Berger
b56baefaa6 Add await time constant 2018-06-28 09:34:13 +02:00
Fabio Berger
f49a507297 Add missing awaitTransactionSuccessAsync calls 2018-06-28 09:13:56 +02:00
fragosti
c20549e88d Scroll to top when going to relayers page from onboarding 2018-06-27 19:23:51 -07:00
fragosti
cd16986942 Bring you directly to relayers page once you finish onboarding 2018-06-27 19:21:09 -07:00
fragosti
e481404a14 Remove period in title from last step 2018-06-27 19:07:53 -07:00
fragosti
3dfde15133 Always restart onboarding from 0 and other small improvements 2018-06-27 18:56:14 -07:00
fragosti
4454cfa65d Customize flow depending on what steps you've completed 2018-06-27 18:21:51 -07:00
fragosti
382839464f Break wrapping ETH into a 3rd step 2018-06-27 17:00:07 -07:00
fragosti
cce5585795 Fix animation when coming from bottom 2018-06-27 16:29:38 -07:00
fragosti
26a9fe9127 Fix width issue with onboarding card on mobile 2018-06-27 16:21:50 -07:00
fragosti
47a267c3fa Clicking overlay closes onboarding 2018-06-27 15:14:21 -07:00
fragosti
36836eb942 Fix z index issue with wrap buttons and onboarding cards 2018-06-27 14:45:01 -07:00
fragosti
aad0804a1e Break wrath ETH step into 2 2018-06-27 14:33:04 -07:00
fragosti
3c68d9c297 Fix skip button position on first step 2018-06-27 13:51:37 -07:00
fragosti
ffdc7d13a9 Make onboarding bounce around less 2018-06-27 13:40:52 -07:00
fragosti
c5085d8364 Scroll to wallet when onboarding automatically starts as well 2018-06-27 13:36:38 -07:00
fragosti
00ad7bc470 Change asset for final onboarding step 2018-06-27 13:23:17 -07:00
fragosti
360927ec77 Changing provider to ledger more consistent with previous experience 2018-06-27 11:37:24 -07:00
fragosti
b6f546ebe0 Fix convention stuff 2018-06-27 11:17:32 -07:00
fragosti
2a092143dc Remove IS_MAINNET_ENABLED config 2018-06-27 10:40:07 -07:00
fragosti
de50407953 Rename all corresponding bools to shouldUseLedgerProvider 2018-06-27 10:34:17 -07:00
Fabio Berger
57d5fbfbd8 Merge pull request #766 from perissology/feature/solcov-ignore
[sol-cov] add ability to ignore covering specific code blocks
2018-06-27 19:00:16 +02:00
Fabio Berger
92322c0e07 Remove network 50 details 2018-06-27 18:42:34 +02:00
Fabio Berger
97ed453eb4 Re-generate and clean up artifacts for 2.0.0 2018-06-27 18:34:44 +02:00
Fabio Berger
654b782810 Add missing AssetProxyOwner from compile:v2 command 2018-06-27 18:34:03 +02:00
Fabio Berger
51211a21ba Improve ganache-core's GanacheOpts type and require it instead of any 2018-06-27 18:33:32 +02:00
Fabio Berger
133b6fe240 Encode ZRX address as needed. 2018-06-27 18:32:48 +02:00
Fabio Berger
c824fe8718 Add optimizer settings to migrations compiler.json 2018-06-27 18:31:34 +02:00
Fabio Berger
26d3a487a5 Update ganache-cli to latest 2018-06-27 18:31:18 +02:00
perissology
e0a2afc068 rename function 2018-06-27 07:26:12 -07:00
Fabio Berger
f6e97bb284 Merge pull request #763 from prettymuchbryce/invalid-argument-error
Fix OrderWatcher uncaught Error
2018-06-27 11:55:04 +02:00
Fabio Berger
6c8b998505 Fix tslint 2018-06-27 11:28:41 +02:00
Fabio Berger
f9fab216e9 Merge branch 'v2-prototype' into invalid-argument-error 2018-06-27 11:02:40 +02:00
Fabio Berger
c308359f59 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype:
  Improve 'web3-provider-engine' typings
  Fix build
  Update artifacts
  Add more revert reasons to tests
  Make dispatchTransferFrom revert with reason from AssetProxy on failure
  Remove redundant files, hard code function selector in dispatchTransferFrom, and modify revert reason
  Updated offset of receiverData length to reflect new assetData encoding.
  ERC20 Custom storage layout
  Golf the authorization check
  ERC20 manual memory layout
  ERC20 inline return
  ERC721 inline return
  Golf ERC721 transferFrom
  Inline ERC20 tranferFrom selector constant
  Optimize ERC20 transferFrom
  Polish asset picker layout
  Update relayer grid fallback icon
  Change metamask install link based on browser
  Use ethereumjs-tx@1.3.5 instead of our fork

# Conflicts:
#	packages/contracts/test/asset_proxy/proxies.ts
#	packages/contracts/test/exchange/core.ts
#	packages/migrations/artifacts/2.0.0/DummyERC721Token.json
2018-06-27 10:59:37 +02:00
Fabio Berger
375d667144 Move combinatorial fillOrder tests into the fill_ordere test file 2018-06-27 10:43:12 +02:00
Nikita Galkin
84bd54ba40 Improve 'web3-provider-engine' typings 2018-06-27 09:26:48 +03:00
Amir Bandeali
73c36fe2d2 Merge pull request #773 from 0xProject/feature/contracts/abi-calldata-proxy
Optimize transfer
2018-06-26 18:38:30 -07:00
Amir Bandeali
ec3e9efdaa Fix build 2018-06-26 18:30:20 -07:00
Amir Bandeali
d5c389b7dc Update artifacts 2018-06-26 17:36:44 -07:00
Amir Bandeali
7f233dcb15 Add more revert reasons to tests 2018-06-26 17:34:43 -07:00
Fabio Berger
6a2421c683 Fix tests 2018-06-26 23:17:29 +02:00
Fabio Berger
d66ca7b5cb Fix enum name 2018-06-26 23:17:20 +02:00
fragosti
5e38cbd69c Never use trackedTokenState when fetching new token state 2018-06-26 13:58:31 -07:00
Amir Bandeali
b6d8dcb6e1 Make dispatchTransferFrom revert with reason from AssetProxy on failure 2018-06-26 13:57:55 -07:00
Amir Bandeali
08ee1ab2e6 Remove redundant files, hard code function selector in dispatchTransferFrom, and modify revert reason 2018-06-26 13:57:51 -07:00
fragosti
26edec5773 Fix bug where we are requesting tokens on a different network 2018-06-26 13:43:25 -07:00
fragosti
d72e06842f Remove unused variables 2018-06-26 12:48:00 -07:00
fragosti
0a0da63ac7 Make unsubscribing work 2018-06-26 12:33:38 -07:00
Greg Hysen
873ec898d8 Updated offset of receiverData length to reflect new assetData encoding. 2018-06-26 12:23:19 -07:00
Remco Bloemen
97a70d14a3 ERC20 Custom storage layout 2018-06-26 12:23:19 -07:00
Remco Bloemen
394fbebfa8 Golf the authorization check 2018-06-26 12:23:19 -07:00
Remco Bloemen
b79588c4a0 ERC20 manual memory layout 2018-06-26 12:23:19 -07:00
Remco Bloemen
3b46e82625 ERC20 inline return 2018-06-26 12:23:19 -07:00
Remco Bloemen
dbaf1fcd43 ERC721 inline return 2018-06-26 12:23:19 -07:00
Remco Bloemen
4caf1271e4 Golf ERC721 transferFrom 2018-06-26 12:23:19 -07:00
Remco Bloemen
6921943aff Inline ERC20 tranferFrom selector constant 2018-06-26 12:23:19 -07:00
Remco Bloemen
3ce90b8257 Optimize ERC20 transferFrom 2018-06-26 12:23:19 -07:00
fragosti
3866154b50 Fix stateful ledger dialog edge state 2018-06-26 12:16:10 -07:00
fragosti
64ed2464cf Get things working with legacy portal 2018-06-26 12:09:20 -07:00
fragosti
e27780aee9 Fix subtle issues with ledger config dialog 2018-06-26 11:59:23 -07:00
Brandon Millman
744e6e60c5 Polish asset picker layout 2018-06-26 11:17:00 -07:00
fragosti
f70c1ff009 Ledger to metamask to ledger working 2018-06-26 11:01:50 -07:00
Brandon Millman
3a808fe7fd Update relayer grid fallback icon 2018-06-26 10:40:59 -07:00
Brandon Millman
2ca169b3c4 Merge pull request #777 from 0xProject/feature/website/browser-detection
Change metamask install link based on browser
2018-06-26 10:29:26 -07:00
Alex Browne
098d486291 Merge pull request #776 from 0xProject/ethereum-js-tx-1.3.5
Use ethereumjs-tx@1.3.5 instead of our fork
2018-06-26 10:22:53 -07:00
Fabio Berger
ec4fb70b80 Merge pull request #760 from 0xProject/refactor/check-revert-reasons
Check Revert Reasons in Contract Tests
2018-06-26 19:20:19 +02:00
Fabio Berger
2a82807be4 Fix type issue 2018-06-26 19:16:57 +02:00
Fabio Berger
43ae868c69 Merge branch 'refactor/check-revert-reasons' into feature/combinatorial-testing
* refactor/check-revert-reasons:
  Temporarily switch revert reasons to `TransferFailed`. Should be `InvalidAmount` but because of an oversight in the assembly implementation of `dispatchTransferFrom`, it always throws `TransferFailed`
  Expect RevertReason be passed in, not string
  Rename RevertReasons to RevertReason since singular enum names are more common

# Conflicts:
#	packages/contracts/test/asset_proxy/proxies.ts
#	packages/contracts/test/exchange/core.ts
2018-06-26 18:53:44 +02:00
Fabio Berger
1bc742aed1 Temporarily switch revert reasons to TransferFailed. Should be InvalidAmount but because of an oversight in the assembly implementation of dispatchTransferFrom, it always throws TransferFailed 2018-06-26 18:49:10 +02:00
Fabio Berger
6dc852774e Update AbstractAssetWrapper 2018-06-26 08:52:25 +02:00
Fabio Berger
7967ebed57 Rename to singular 2018-06-26 08:51:40 +02:00
Fabio Berger
105b927397 Fix merge issues 2018-06-26 08:43:37 +02:00
Fabio Berger
9219f9d8ae Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (21 commits)
  Don't use variables for revert reasons
  Add comments to dispatchTransferFrom
  Document IAssetData
  Compute bytes4 proxyid constants
  Return inplace bytes in LibBytes.readBytesWithLength
  Add Greg's documentation to MixinErc721Transfer
  Add Greg's documentation to MixinErc20Transfer
  Gas golf the transfer success logic
  Optimize like in PR #767
  Run prettier and fix linting errors
  Fix tests
  Update tests
  Fix AssetProxyUtils
  Update tests
  Fix ERC721Proxy TokenId
  Update AssetProxyUtils
  Add IAssetData
  WIP
  ABI encoded asset data
  Remove proxyId argument from dispatchTransferFrom
  ...

# Conflicts:
#	packages/contracts/test/asset_proxy/proxies.ts
2018-06-26 08:13:59 +02:00
Fabio Berger
f780e6f235 Expect RevertReason be passed in, not string 2018-06-26 08:11:32 +02:00
Fabio Berger
27670f4da6 Rename RevertReasons to RevertReason since singular enum names are more common 2018-06-26 08:11:14 +02:00
Fabio Berger
e051743a3d Merge branch 'v2-prototype' into refactor/check-revert-reasons
* v2-prototype: (21 commits)
  Don't use variables for revert reasons
  Add comments to dispatchTransferFrom
  Document IAssetData
  Compute bytes4 proxyid constants
  Return inplace bytes in LibBytes.readBytesWithLength
  Add Greg's documentation to MixinErc721Transfer
  Add Greg's documentation to MixinErc20Transfer
  Gas golf the transfer success logic
  Optimize like in PR #767
  Run prettier and fix linting errors
  Fix tests
  Update tests
  Fix AssetProxyUtils
  Update tests
  Fix ERC721Proxy TokenId
  Update AssetProxyUtils
  Add IAssetData
  WIP
  ABI encoded asset data
  Remove proxyId argument from dispatchTransferFrom
  ...

# Conflicts:
#	packages/contracts/test/asset_proxy/proxies.ts
2018-06-26 08:07:37 +02:00
Fabio Berger
fb03003b3a Fix inconsistency between contract and reference implementation of order validation logic 2018-06-26 07:50:24 +02:00
Brandon Millman
e52d0a3512 Change metamask install link based on browser 2018-06-25 17:48:36 -07:00
Amir Bandeali
cba92a01b6 Merge pull request #743 from 0xProject/feature/contracts/abi-encoded
ABI encode assetData fields
2018-06-25 16:53:15 -07:00
Alex Browne
0a87364101 Use ethereumjs-tx@1.3.5 instead of our fork 2018-06-25 16:40:33 -07:00
Amir Bandeali
a89908540f Don't use variables for revert reasons 2018-06-25 16:34:06 -07:00
fragosti
c4e2dcafa4 Have basic network switching working 2018-06-25 16:26:34 -07:00
Amir Bandeali
0163984ea4 Add comments to dispatchTransferFrom 2018-06-25 16:19:08 -07:00
Remco Bloemen
db3ce08cab Document IAssetData 2018-06-25 16:19:08 -07:00
Remco Bloemen
1076959006 Compute bytes4 proxyid constants 2018-06-25 16:19:08 -07:00
Remco Bloemen
5127cbb22c Return inplace bytes in LibBytes.readBytesWithLength 2018-06-25 16:19:08 -07:00
Remco Bloemen
9175b43542 Add Greg's documentation to MixinErc721Transfer 2018-06-25 16:19:07 -07:00
Remco Bloemen
562fec01d8 Add Greg's documentation to MixinErc20Transfer 2018-06-25 16:19:07 -07:00
Remco Bloemen
b8051c8fed Gas golf the transfer success logic 2018-06-25 16:19:07 -07:00
Remco Bloemen
4df66a4802 Optimize like in PR #767 2018-06-25 16:19:07 -07:00
Amir Bandeali
a2ff63daa5 Run prettier and fix linting errors 2018-06-25 16:19:07 -07:00
Amir Bandeali
7ce0f9682f Fix tests 2018-06-25 16:19:07 -07:00
Remco Bloemen
3c6d0dc3e0 Update tests 2018-06-25 16:19:07 -07:00
Remco Bloemen
64a6fb2344 Fix AssetProxyUtils 2018-06-25 16:19:07 -07:00
Remco Bloemen
07734a5184 Update tests 2018-06-25 16:19:07 -07:00
Remco Bloemen
32d4994219 Fix ERC721Proxy TokenId 2018-06-25 16:19:07 -07:00
Remco Bloemen
08d22d2f3c Update AssetProxyUtils 2018-06-25 16:19:07 -07:00
Remco Bloemen
b7b0185baf Add IAssetData 2018-06-25 16:19:07 -07:00
Remco Bloemen
7b0c13c121 WIP 2018-06-25 16:19:07 -07:00
Remco Bloemen
a98ecc05af ABI encoded asset data 2018-06-25 16:19:07 -07:00
Remco Bloemen
f7337c1a05 Remove proxyId argument from dispatchTransferFrom 2018-06-25 16:19:07 -07:00
fragosti
53e2cda4c8 Remove existing networkId watching logic from BlockchainWatcher 2018-06-25 16:01:26 -07:00
Fabio Berger
8064914bb7 Prettier fixes 2018-06-25 23:17:56 +02:00
Fabio Berger
6bb2203f79 Small stylistic tweaks 2018-06-25 23:07:27 +02:00
Fabio Berger
3d56817da1 Update yarn.lock 2018-06-25 23:00:19 +02:00
Fabio Berger
31e3b9ff8b Fix and imprrove ethLightWalletSubprovider 2018-06-25 22:59:41 +02:00
Fabio Berger
b2e32aaf58 Remove legacy named subprovider 2018-06-25 22:59:24 +02:00
Fabio Berger
699de9174e Format type 2018-06-25 22:59:04 +02:00
Fabio Berger
1dd9ec4d5a Remove duplicate type 2018-06-25 22:58:50 +02:00
Fabio Berger
87d66ccf6c Fix Tslint issues 2018-06-25 22:58:36 +02:00
Fabio Berger
1134ff1075 Fix tslint issues 2018-06-25 20:17:00 +02:00
Fabio Berger
178676ef8c Fix lint errors 2018-06-25 20:08:00 +02:00
Greg Hysen
94740155e5 Comments for ASM hashing 2018-06-25 11:02:31 -07:00
Fabio Berger
9341afe764 Merge pull request #772 from 0xProject/add-coverage-instructions
Improve Contracts README Testing Section
2018-06-25 19:58:15 +02:00
Cavan
7ce1e9b18d Add eth-lightwallet subprovider and tests 2018-06-25 19:39:23 +02:00
Cavan
1821f60fb5 Move eth-lightwallet declaration to typings 2018-06-25 19:08:16 +02:00
Cavan
235d78565e Format subprovider using prettier 2018-06-25 19:06:22 +02:00
Cavan
db5880539b Update changelogs 2018-06-25 19:01:53 +02:00
Cavan
76f4d67f33 Remove timestamps and fix typings 2018-06-25 18:58:25 +02:00
Bryce
e59c57106c Run prettier 2018-06-25 09:44:56 -07:00
Cavan
bb4c748bf1 Formatting and standards updates 2018-06-25 18:42:13 +02:00
perissology
92cb9c3807 add /*solcov ignore next*/ tests 2018-06-25 08:18:02 -07:00
perissology
1a4e99431b support ignoring entire contracts 2018-06-25 07:55:19 -07:00
Fabio Berger
ec9d1ca57e Document all the contract test options in README 2018-06-25 15:18:02 +02:00
Fabio Berger
71c9b98896 Fix revertReason 2018-06-25 14:23:35 +02:00
Fabio Berger
71bac8c60b Update yarn.lock 2018-06-25 13:51:41 +02:00
Fabio Berger
7b0f7c2e5c Remove no longer used method 2018-06-25 13:51:18 +02:00
Fabio Berger
ad67a6add5 Check revert reasons in declarative and combinatorial tests 2018-06-25 13:51:00 +02:00
Fabio Berger
1353723b58 merge check-revert-reasons 2018-06-25 13:02:38 +02:00
Fabio Berger
f811c07454 Move RevertReasons to @0xproject/types package 2018-06-25 12:59:26 +02:00
Fabio Berger
bb85382824 Add missing import 2018-06-25 12:47:44 +02:00
Fabio Berger
3ed4a1ba20 Add missing import 2018-06-25 12:47:13 +02:00
Fabio Berger
c50da5d034 merge check-revert-reasons 2018-06-25 12:32:16 +02:00
Fabio Berger
9b196ba68c Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (97 commits)
  Fix typos in comments
  Add modifier and tests for removeAuthorizedAddressAtIndex
  Update and add tests
  Change removeAuthorizedAddress => removeAuthorizedAddressAtIndex
  Move isFunctionRemoveAuthorizedAddress to test
  Fix usage of `popLastByte`
  Fix LibBytes is a library
  Remove `areBytesEqual`
  Fix usage of `contentAddress()`
  Clean low bits in bytes4
  Clean high bits in address
  Refactor LibBytes.readBytes4 for consistency
  Fix LibBytes.equals
  Add trailing garbage testcase for LibBytes.equals
  Rename bytes.equals
  Add slice and sliceDestructive
  Rename bytes.rawAddress and add bytes.contentAddress
  Rename read/writeBytesWithLength
  Using LibBytes for bytes
  Make LibBytes a library
  ...

# Conflicts:
#	packages/contracts/src/utils/constants.ts
#	packages/contracts/test/exchange/core.ts
2018-06-25 11:49:14 +02:00
Fabio Berger
df79fb19af Merge branch 'v2-prototype' into refactor/check-revert-reasons
* v2-prototype: (48 commits)
  Fix typos in comments
  Add modifier and tests for removeAuthorizedAddressAtIndex
  Update and add tests
  Change removeAuthorizedAddress => removeAuthorizedAddressAtIndex
  Move isFunctionRemoveAuthorizedAddress to test
  Fix usage of `popLastByte`
  Fix LibBytes is a library
  Remove `areBytesEqual`
  Fix usage of `contentAddress()`
  Clean low bits in bytes4
  Clean high bits in address
  Refactor LibBytes.readBytes4 for consistency
  Fix LibBytes.equals
  Add trailing garbage testcase for LibBytes.equals
  Rename bytes.equals
  Add slice and sliceDestructive
  Rename bytes.rawAddress and add bytes.contentAddress
  Rename read/writeBytesWithLength
  Using LibBytes for bytes
  Make LibBytes a library
  ...

# Conflicts:
#	packages/contracts/src/contracts/current/utils/Ownable/Ownable.sol
#	packages/contracts/test/libraries/lib_bytes.ts
2018-06-25 11:45:17 +02:00
Leonid Logvinov
f8bde5ab9b Merge pull request #735 from feuGeneA/metacoin-independence
Metacoin independence
2018-06-25 11:35:24 +02:00
Jacob Evans
0cd37cbf7e Merge pull request #758 from 0xProject/fix/order-utils/known-order-hash
Fix known order hash value test in order-utils
2018-06-25 15:47:07 +10:00
Remco Bloemen
d621e4201d Merge pull request #698 from 0xProject/fix/contracts/using-libbytes
Fixes and refactoring regarding LibBytes
2018-06-23 14:08:40 +02:00
Remco Bloemen
82af1df3c3 Fix typos in comments 2018-06-23 13:55:02 +02:00
Amir Bandeali
ea8c2b8d69 Add modifier and tests for removeAuthorizedAddressAtIndex 2018-06-23 13:53:39 +02:00
Amir Bandeali
8ddcb6c841 Update and add tests 2018-06-23 13:53:39 +02:00
Amir Bandeali
1681361aed Change removeAuthorizedAddress => removeAuthorizedAddressAtIndex 2018-06-23 13:53:39 +02:00
Remco Bloemen
6a6f98299d Move isFunctionRemoveAuthorizedAddress to test 2018-06-23 13:53:39 +02:00
Remco Bloemen
19ba272d62 Fix usage of popLastByte 2018-06-23 13:53:39 +02:00
Remco Bloemen
2f8ceca2ef Fix LibBytes is a library 2018-06-23 13:53:39 +02:00
Remco Bloemen
ba1baafca5 Remove areBytesEqual 2018-06-23 13:53:38 +02:00
Remco Bloemen
20a07494f6 Fix usage of contentAddress() 2018-06-23 13:53:38 +02:00
Remco Bloemen
c66477c690 Clean low bits in bytes4 2018-06-23 13:53:38 +02:00
Remco Bloemen
5c612a186f Clean high bits in address 2018-06-23 13:53:38 +02:00
Remco Bloemen
943e556f43 Refactor LibBytes.readBytes4 for consistency 2018-06-23 13:53:38 +02:00
Remco Bloemen
4bf4f96f47 Fix LibBytes.equals 2018-06-23 13:53:38 +02:00
Remco Bloemen
384cd2f605 Add trailing garbage testcase for LibBytes.equals 2018-06-23 13:53:38 +02:00
Remco Bloemen
425af46f98 Rename bytes.equals 2018-06-23 13:53:38 +02:00
Remco Bloemen
c83ee04662 Add slice and sliceDestructive 2018-06-23 13:53:38 +02:00
Remco Bloemen
2054cd78da Rename bytes.rawAddress and add bytes.contentAddress 2018-06-23 13:53:38 +02:00
Remco Bloemen
88982f98ff Rename read/writeBytesWithLength 2018-06-23 13:53:38 +02:00
Remco Bloemen
2ea0b839d3 Using LibBytes for bytes 2018-06-23 13:53:38 +02:00
Remco Bloemen
afd83e59b8 Make LibBytes a library 2018-06-23 13:53:38 +02:00
Remco Bloemen
7f84049538 Merge LibMem and LibBytes 2018-06-23 13:53:38 +02:00
Remco Bloemen
98840c9c5f Use provided mem in refernce memcpy 2018-06-23 13:53:38 +02:00
Amir Bandeali
26cacfa247 Merge pull request #749 from 0xProject/feature/contracts/transactionHashAsm
Converted `hashZeroExTransaction` to assembly. Saves 1k gas
2018-06-22 16:57:50 -07:00
Bryce Neal
4b2d27b5e5 CHANGELOG spacing 2018-06-22 16:57:49 -07:00
Bryce
69625946b1 Typings and comment 2018-06-22 16:56:19 -07:00
Bryce
f7fe9b0961 Update at abi_decoder 2018-06-22 16:41:47 -07:00
Greg Hysen
7fcd34eb36 Apply mask to address to zero-out unused bytes. 2018-06-22 16:35:50 -07:00
Brandon Millman
1f5848ba82 Remove extra border from the bottom of the wallet 2018-06-22 16:07:07 -07:00
perissology
bbd414bdcd add ability to ignore covering specific code blocks 2018-06-22 15:59:36 -07:00
Brandon Millman
a1737a28d0 Do not render ZRX or WETH as removable tracked tokens 2018-06-22 15:57:34 -07:00
Brandon Millman
66be42d1f8 Center items in portal drawer header 2018-06-22 15:33:58 -07:00
Francesco Agosti
c984c0f2c0 Merge pull request #764 from 0xProject/feature/website/relay-grid-stacking-bug
Fix issue where hovered tiles appear over top bar
2018-06-22 15:16:13 -07:00
fragosti
89d2bb7ecd Fix issue where hovered tiles appear over top bar 2018-06-22 14:32:21 -07:00
Bryce Neal
9f8cad93f7 CHANGELOG spacing 2018-06-22 14:08:21 -07:00
Bryce Neal
a207260fe0 Fix CHANGELOG spacing. 2018-06-22 14:07:19 -07:00
Bryce
1ef4a47255 Fix spacing 2018-06-22 14:06:45 -07:00
Bryce
b8aa68b4d1 Add CHANGELOG entry 2018-06-22 14:05:23 -07:00
Bryce
61edbac6e5 Remove package-lock 2018-06-22 14:02:29 -07:00
Bryce
d315133d34 Re-throw if not INVALID_ARGUMENT 2018-06-22 14:01:14 -07:00
Bryce
82d59dbea8 Address INVALID_ARGUMENT issue 2018-06-22 13:35:49 -07:00
Francesco Agosti
42884e0871 Merge pull request #746 from 0xProject/feature/website/relayer-grid-polish
Relayer grid polish
2018-06-22 13:11:33 -07:00
fragosti
7fb8b546f9 Remove unecessary position relative rules 2018-06-22 12:22:31 -07:00
fragosti
80fe1938b8 Fix tslint error 2018-06-22 12:04:45 -07:00
fragosti
2409afae95 Merge https://github.com/0xProject/0x-monorepo into v2-prototype 2018-06-22 11:54:37 -07:00
fragosti
06705f9e88 Remove diverse from about page 2018-06-22 11:54:24 -07:00
fragosti
2b408e71ac Use Ops instead of Operations in Mels description 2018-06-22 11:47:57 -07:00
Brandon Millman
b097193486 Merge pull request #750 from 0xProject/bug/website/fix-add-token
Various add token flow bugs
2018-06-22 11:43:02 -07:00
Brandon Millman
543f2c91fe Pulled out reset AssetPicker state into a common variable 2018-06-22 11:37:57 -07:00
fragosti
05c0088445 Comment out Chris, and move Mel up in about page 2018-06-22 11:22:33 -07:00
Fabio Berger
2f6f815d81 Fix tslint 2018-06-22 18:54:18 +02:00
Fabio Berger
1e03fbe1a8 Fix prettier 2018-06-22 18:50:02 +02:00
Fabio Berger
4409f11b24 Rename ContractLibErrors to RevertReasons 2018-06-22 18:45:45 +02:00
Fabio Berger
7a216901be Remove revert reason 'Exchange' prefix 2018-06-22 18:41:55 +02:00
Fabio Berger
0e7c254b93 Move constants over to ContractLibError enum and update all tests 2018-06-22 18:36:15 +02:00
Fabio Berger
ba14850c9a Standardize ERC20 error strings given convention 2018-06-22 18:35:35 +02:00
Fabio Berger
59d3a21993 Fix test now that contract reverts with message 2018-06-22 17:39:41 +02:00
Fabio Berger
d2faa49bf4 Merge branch 'v2-prototype' into refactor/check-revert-reasons
* v2-prototype:
  Check that assetProxy exists before attempting transfer
2018-06-22 17:15:51 +02:00
Fabio Berger
438c0e27ea Merge pull request #748 from 0xProject/fix/contracts/nullAssetProxy
Check that assetProxy exists before attempting transfer
2018-06-22 17:14:22 +02:00
Fabio Berger
4c14372b4a Add revert reason checks to wrapper tests 2018-06-22 17:12:52 +02:00
Fabio Berger
8b4077d7de Fix tests 2018-06-22 17:12:31 +02:00
Fabio Berger
914b009361 Change Whitelist error messages to conform to rest and added revert reason checks to transactions tests 2018-06-22 17:12:17 +02:00
Jacob Evans
b2a4b7eb88 Fix known order hash value test 2018-06-22 23:00:22 +10:00
Fabio Berger
daa50442c9 Add revert reason checks to match_orders tests 2018-06-22 14:28:01 +02:00
Fabio Berger
76fd7f47eb Fix tests 2018-06-22 14:13:44 +02:00
Fabio Berger
fbf840cb68 Merge branch 'v2-prototype' into refactor/check-revert-reasons
* v2-prototype:
  Update ganache-core in yarn.lock
  Add coverage and test:circleci command to sra-report
  Add missing artifacts
  Skip failing tests temporarily
  Fix web3-wrapper test
  fix name
  Add missing package tests from circleci
2018-06-22 13:26:59 +02:00
Fabio Berger
798a647b71 Merge pull request #757 from 0xProject/fix/circle-ci
Add missing package tests from circleci
2018-06-22 13:26:12 +02:00
Fabio Berger
26a0b09064 Update ganache-core in yarn.lock 2018-06-22 13:12:55 +02:00
Fabio Berger
98570b5da1 Add coverage and test:circleci command to sra-report 2018-06-22 12:50:52 +02:00
Fabio Berger
e923d7dafb Add missing artifacts 2018-06-22 12:33:23 +02:00
Fabio Berger
64b6861880 Skip failing tests temporarily 2018-06-22 12:33:10 +02:00
Fabio Berger
c46e11cae2 Fix web3-wrapper test 2018-06-22 12:32:12 +02:00
Fabio Berger
82ccfa21e1 fix name 2018-06-22 12:02:40 +02:00
Fabio Berger
13f7fc1fd2 Add missing package tests from circleci 2018-06-22 11:59:14 +02:00
Fabio Berger
018cc14a87 Fix expected version in test 2018-06-22 10:47:38 +02:00
Fabio Berger
3ce295a2af Merge branch 'v2-prototype' into refactor/check-revert-reasons
* v2-prototype: (40 commits)
  Use make-promises-safe as a preloader instead of manually importing
  Updated compiler runs to be 1,000,000
  Add event to setSignatureValidatorApproval, rename signer => signerAddress accross all contracts
  Add senderAddress to Fill and Cancel logs, add comments to events and types
  Fix Island component
  Add missing image assets for Chris and Mel
  Fix some bugs in sol-cov
  Remove unreachable PreSigned check
  Fix linting
  Buttons look hella disabled now
  Remove border radius, fix width issue for unlock step
  Add Chris and Mel to about page
  fix linter issues
  only call getLocationByOffset if source if defined
  Set settleOrder and settleMatchedOrders to private
  Prevent prettier issue
  Support mobile friendly onboarding flows
  Removed MixinSettlement. Moved `settleOrder` into `MixinExchangeCore` and `settleMatchedOrders` into `MixinMatchOrders`
  Migrations after rebasing
  Linter
  ...
2018-06-22 10:39:07 +02:00
Fabio Berger
a30107ab86 Check revert reason in dispatcher tests 2018-06-22 10:38:08 +02:00
Fabio Berger
d8df6968d3 remove unused import 2018-06-22 10:37:25 +02:00
Fabio Berger
0515c6acde Merge pull request #752 from 0xProject/make-promises-safe-preloader
Use make-promises-safe as a preloader instead of manually importing
2018-06-22 10:32:06 +02:00
Amir Bandeali
607b44e01d Check that assetProxy exists before attempting transfer 2018-06-21 22:45:15 -07:00
Amir Bandeali
5c0bae2070 Merge pull request #751 from 0xProject/feature/contracts/compilerRuns
Updated compiler runs to be 1,000,000
2018-06-21 22:06:31 -07:00
Alex Browne
4012e31115 Use make-promises-safe as a preloader instead of manually importing 2018-06-21 19:17:33 -07:00
Greg Hysen
2d8e9eda56 Converted hashZeroExTransaction to assembly. Saves 1k gas 2018-06-21 18:49:17 -07:00
Brandon Millman
4375a0e07e Fix state mutation in reducer 2018-06-21 18:06:34 -07:00
Brandon Millman
a07cfb7abc Do not add empty token to local storage 2018-06-21 18:06:34 -07:00
Greg Hysen
c131d82699 Updated compiler runs to be 1,000,000 2018-06-21 17:58:39 -07:00
fragosti
de2dcbae5a Lint and fix typo 2018-06-21 17:42:37 -07:00
fragosti
b0000bb276 Fix z-index issues 2018-06-21 17:40:33 -07:00
fragosti
82789d5315 Fix issues that arose from merge 2018-06-21 17:40:33 -07:00
Brandon Millman
3df5882711 Remove Background component 2018-06-21 17:40:33 -07:00
Brandon Millman
b6765b849c Padding adjustment 2018-06-21 17:40:33 -07:00
Brandon Millman
df94e5f164 Remove styles from Portal component 2018-06-21 17:40:33 -07:00
Brandon Millman
79edc12c76 Add Background component 2018-06-21 17:40:33 -07:00
Brandon Millman
bd03151c2a Various relayer grid ui polish items 2018-06-21 17:40:33 -07:00
Amir Bandeali
7c0fdc7ecf Merge pull request #740 from 0xProject/feature/contracts/updateEvents
Update events
2018-06-21 17:14:14 -07:00
Amir Bandeali
b333ed91de Add event to setSignatureValidatorApproval, rename signer => signerAddress accross all contracts 2018-06-21 16:10:12 -07:00
Amir Bandeali
6a073d5f86 Add senderAddress to Fill and Cancel logs, add comments to events and types 2018-06-21 16:09:38 -07:00
Alex Browne
c7159b2be4 Merge pull request #747 from 0xProject/fix/sol-cov-bugs
Fix some bugs in sol-cov
2018-06-21 13:50:30 -07:00
Amir Bandeali
2d98193c83 Merge pull request #744 from NoteGio/v2-prototype-unreachable
Remove unreachable PreSigned check
2018-06-21 13:38:23 -07:00
fragosti
685756f9d5 Fix Island component 2018-06-21 13:26:33 -07:00
fragosti
535bb364b6 Add missing image assets for Chris and Mel 2018-06-21 13:17:51 -07:00
Francesco Agosti
c740539f48 Merge pull request #739 from 0xProject/feature/website/mobile-friendly-onboarding
Add support for mobile-friendly onboarding flows
2018-06-21 13:16:13 -07:00
Alex Browne
4cf331067b Fix some bugs in sol-cov 2018-06-21 13:14:13 -07:00
Austin Roberts
a3ba7683f4 Remove unreachable PreSigned check
This code was unreachable, as it had the exact same condition as line 206.
2018-06-21 14:15:20 -05:00
fragosti
5edfec68cf Fix linting 2018-06-21 12:12:44 -07:00
fragosti
eb494f78fa Buttons look hella disabled now 2018-06-21 12:09:38 -07:00
fragosti
d963941be0 Remove border radius, fix width issue for unlock step 2018-06-21 11:33:47 -07:00
Francesco Agosti
8ab65fdde4 Merge pull request #742 from 0xProject/feature/website/chris-mel-about-page
Add Chris and Mel to about page
2018-06-21 11:32:10 -07:00
fragosti
8e2c0bb977 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/mobile-friendly-onboarding 2018-06-21 11:06:53 -07:00
fragosti
f1f1064f70 Add Chris and Mel to about page 2018-06-21 10:57:26 -07:00
Brandon Millman
88500e3714 Merge pull request #734 from 0xProject/feature/website/shadow-styling
Update Island shadow styling and use Island in more places
2018-06-21 10:31:48 -07:00
Leonid Logvinov
eae2a4df8b Merge pull request #702 from perissology/feature/missing-sources
[sol-cov] Only collect coverage for provided sources
2018-06-21 19:28:35 +02:00
perissology
ade8e95d2e fix linter issues 2018-06-21 09:12:30 -07:00
Fabio Berger
a0b225b8b1 Test revert reasons in proxy tests 2018-06-21 17:43:48 +02:00
Fabio Berger
323e8756ba remove only 2018-06-21 17:27:26 +02:00
Fabio Berger
ada5428df7 Check revert reasons in Authorizable tests 2018-06-21 17:23:59 +02:00
Fabio Berger
7869c19245 Change revert reason in ownable to be similar to all other revert reasons 2018-06-21 17:23:42 +02:00
Fabio Berger
5706b29c8c remove .only 2018-06-21 17:06:44 +02:00
Fabio Berger
8ff7b2405f Update yarn.lock 2018-06-21 16:53:14 +02:00
Fabio Berger
eaabe15863 Update core tests to actually check revert message 2018-06-21 16:53:05 +02:00
Fabio Berger
63b2ae743b Add command to remove all node_modules, nested and hoisted 2018-06-21 16:52:01 +02:00
perissology
c5ea985a70 only call getLocationByOffset if source if defined 2018-06-21 06:24:50 -07:00
Remco Bloemen
11b35b89f5 Merge pull request #692 from 0xProject/refactor/contracts/RemovedMixinSettlement
Removed MixinSettlement
2018-06-21 13:26:40 +02:00
Greg Hysen
6d5b16725d Set settleOrder and settleMatchedOrders to private 2018-06-20 17:27:45 -07:00
fragosti
c34897036e Prevent prettier issue 2018-06-20 16:05:19 -07:00
fragosti
1e51af1d4b Support mobile friendly onboarding flows 2018-06-20 15:51:17 -07:00
Greg Hysen
8ee6e26608 Removed MixinSettlement. Moved settleOrder into MixinExchangeCore and settleMatchedOrders into MixinMatchOrders 2018-06-20 15:36:28 -07:00
Brandon Millman
4d36f38f96 Merge pull request #733 from 0xProject/bug/website/identicon-layout
Move some layout logic out of the Identicon component
2018-06-20 15:25:51 -07:00
Greg Hysen
d31ca444e1 Merge pull request #736 from 0xProject/feature/contracts/MixinSignatureValidatorTests
MixinSignatureValidator Test Cases + Bug Fixes
2018-06-20 14:18:13 -07:00
Greg Hysen
090b3014c0 Migrations after rebasing 2018-06-20 14:00:21 -07:00
Greg Hysen
491a322ceb Linter 2018-06-20 13:54:39 -07:00
Greg Hysen
12e16d532b Renamed constants in test wallet/validator 2018-06-20 13:54:39 -07:00
Greg Hysen
7814a391d8 Few more minor #nit wording changes 2018-06-20 13:54:39 -07:00
Greg Hysen
322151b0d5 Changed wording of two tests #nit 2018-06-20 13:54:39 -07:00
Greg Hysen
4a136cafda Minor improvements to MixinSignatureValidator tests 2018-06-20 13:54:39 -07:00
Greg Hysen
d0df25d9e2 Remove .only 2018-06-20 13:54:39 -07:00
Greg Hysen
8d003dbc30 Fixed two mislabelled revert reasons + Signature Validator revert tests working on Geth 2018-06-20 13:54:39 -07:00
Greg Hysen
2c7358d64f Minor style tweaks 2018-06-20 13:54:39 -07:00
Greg Hysen
94e260cec6 Fixed how trezor messages are signed in signature_utils. Now uses byteLength instead of length. 2018-06-20 13:54:39 -07:00
Greg Hysen
783ac3c105 Fixed callAsync template. Previously did not append callData, so we couldn’t specify from address 2018-06-20 13:54:39 -07:00
Greg Hysen
d46e3f6778 Twenty new tests for MixinSignatureValidator. Fixed handling of unsupported types. Fixed trezor prefix. 2018-06-20 13:54:39 -07:00
Alex Browne
6fe3158778 Merge pull request #725 from 0xProject/feature/revert-trace-code-snippets
Include source code snippets in revert stack traces
2018-06-20 12:36:04 -07:00
Alex Browne
bbd12e33ec Update version for @types/solidity-parser-antlr 2018-06-20 12:22:39 -07:00
Alex Browne
e4d55242d8 Update to match latest type definitions and other small changes 2018-06-20 12:22:39 -07:00
Alex Browne
dedddcfcf5 Update sol-cov CHANGELOG.json 2018-06-20 12:22:39 -07:00
Alex Browne
613a78bcf6 Include source code snippets in revert stack traces 2018-06-20 12:19:30 -07:00
Alex Browne
f5decb1d7e Merge pull request #738 from 0xProject/fix/changelogs
Fix CHANGELOG entries changed during incorrect merge (2a4456b)
2018-06-20 12:19:04 -07:00
Fabio Berger
47b4c236c3 Fix CHANGELOG entries changed during incorrect merge (2a4456b) 2018-06-20 20:29:22 +02:00
fragosti
39ccb2df0b Scroll to wallet for mobile onboarding 2018-06-20 11:25:59 -07:00
Fabio Berger
5bfdffda11 Add support for approveAll in assetWrapper and fillOrderScenarios 2018-06-20 19:14:04 +02:00
Fabio Berger
247f8c8557 Fix orderValidationUtils where was confusing a makerAssetAmount as a takerAssetAmount 2018-06-20 19:13:30 +02:00
Fabio Berger
3ce449e167 Improve verbose logging 2018-06-20 19:12:31 +02:00
F. Eugene Aumson
663f9657ea ethereum-types now only has v0.0.2, no 0.0.1 2018-06-20 09:06:38 -04:00
F. Eugene Aumson
457f951aaf add missing metacoin dependencies 2018-06-20 09:06:38 -04:00
F. Eugene Aumson
feafd57027 make metacoin tsconfig independent 2018-06-20 09:06:32 -04:00
Fabio Berger
5c0183c71e Fix merge variable name issue 2018-06-20 14:08:56 +02:00
Fabio Berger
fb7d425244 Add support for setting allowance to unlimited 2018-06-20 13:56:27 +02:00
Fabio Berger
3fab40efe5 Add noop conditionals for clarity 2018-06-20 13:55:45 +02:00
Fabio Berger
0bbdbc9e63 Rename for clarity 2018-06-20 13:55:28 +02:00
Fabio Berger
9bc481ff62 Split balance and allowance amount types in prep of adding the "unlimited" allowance enum value 2018-06-20 13:36:57 +02:00
Fabio Berger
32dea43d2e Remove unneeded explicit type def 2018-06-20 13:31:57 +02:00
Fabio Berger
632da71a8d Add TS 2.7 numeric separators to improve readability 2018-06-20 13:31:21 +02:00
Fabio Berger
2ffab22185 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (22 commits)
  Fix closing parens in liborder
  Update after rebase
  ERC721Proxy Always call safeTransferFrom
  Rename makerEpoch => orderEpoch
  Make cancelOrdersUpTo compatible with sender abstraction
  Update PR template
  Use Image component instead of img tag
  Assembler orderHash function
  Optimize and remove redundant encodePacked
  Fix linting issue
  Fix bug where we do fetch balances on wallet login
  Check network state immediately instead of waiting for delay
  Fix onboarding persisting when changing routes
  Consolidate account state messaging logic
  Only elevate wallet zIndex when onboarding is in progress
  Rebase and update feedback
  Run linter
  Add Portal v2 logging
  Simplified handling of source < 32 edge case
  Basic EIP712 encoder
  ...
2018-06-20 13:25:29 +02:00
Fabio Berger
5541327968 Add ability for verbose logging 2018-06-20 13:24:09 +02:00
Jacob Evans
096eaa20d7 Merge pull request #637 from 0xProject/bug/contracts/eip712-191-prefix
Add missing EIP191 prefix for EIP712 and Execute Transaction
2018-06-20 10:54:51 +10:00
fragosti
e5fe6b915e Change Island to use styled-components 2018-06-19 17:32:01 -07:00
Jacob Evans
512bd84cc2 Fix closing parens in liborder 2018-06-20 10:27:45 +10:00
Jacob Evans
ebbcbeedd2 Merge pull request #730 from 0xProject/bug/contracts/eip712-191-prefix-asm-orderhash
Assembler orderHash function
2018-06-20 10:25:31 +10:00
Jacob Evans
be17308e50 Merge pull request #717 from 0xProject/feature/contracts/erc721proxy-always-safeTransferFrom
ERC721Proxy Always call safeTransferFrom
2018-06-20 10:24:12 +10:00
Jacob Evans
25fa29e6e1 Update after rebase 2018-06-20 10:01:41 +10:00
Jacob Evans
bddc47f9b2 ERC721Proxy Always call safeTransferFrom 2018-06-20 10:00:59 +10:00
fragosti
51948d7760 Show start onboarding flow button on top of wallet on mobile 2018-06-19 16:39:52 -07:00
Brandon Millman
5817a30031 Update Island shadow styling and use Island in more places 2018-06-19 16:25:43 -07:00
Amir Bandeali
e216eb1e7b Merge pull request #714 from 0xProject/feature/contracts/cancelOrdersUpToSender
Make cancelOrdersUpTo compatible with sender abstraction
2018-06-19 15:23:28 -07:00
Brandon Millman
549c6afa0a Move some layout logic out of the Identicon component 2018-06-19 13:55:29 -07:00
Amir Bandeali
6b08e6b809 Rename makerEpoch => orderEpoch 2018-06-19 13:52:23 -07:00
Francesco Agosti
0438fdde49 Merge pull request #724 from 0xProject/bug/website/onboarding-improvements
Fix Wallet appearing over Drawer, and Onboarding not exiting when changing routes
2018-06-19 13:47:52 -07:00
Francesco Agosti
be4ea18119 Merge pull request #727 from 0xProject/bug/website/fix-fetching-balances-on-wallet-login
Fix bug where we do not fetch balances on wallet login
2018-06-19 13:43:08 -07:00
fragosti
a75d6531f2 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into bug/website/onboarding-improvements 2018-06-19 13:29:54 -07:00
Brandon Millman
da69ddc19b Merge pull request #732 from 0xProject/feature/update-pr-template
Update PR template
2018-06-19 13:16:42 -07:00
Amir Bandeali
e92926e881 Make cancelOrdersUpTo compatible with sender abstraction 2018-06-19 13:04:55 -07:00
Brandon Millman
7dd208fb49 Merge pull request #723 from 0xProject/bug/website/drawer-address
Consolidate account state display message logic
2018-06-19 10:44:18 -07:00
Brandon Millman
5305db689d Update PR template 2018-06-19 10:41:27 -07:00
Francesco Agosti
2338c7a3b3 Merge pull request #706 from 0xProject/feature/website/portal-v2-analytics
Add logging to Portal V2
2018-06-19 10:32:35 -07:00
Brandon Millman
829bc96209 Use Image component instead of img tag 2018-06-19 10:30:28 -07:00
fragosti
7454e16aae Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-v2-analytics 2018-06-19 10:19:38 -07:00
Brandon Millman
e4acad60e9 Merge pull request #726 from 0xProject/bug/website/late-eth-balance
Check network state immediately instead of waiting for delay
2018-06-19 10:03:08 -07:00
Fabio Berger
f35af1fb6d Fix typo 2018-06-19 17:53:16 +02:00
Fabio Berger
c0e008c601 Rename NewOrderFactory to OrderFactoryFromScenario for clarity 2018-06-19 17:41:10 +02:00
Fabio Berger
9acf4458c0 Remove hack in ERC20Wrapper 2018-06-19 17:38:15 +02:00
Fabio Berger
70de264d4d Cleanup coreCombinatorialUtils 2018-06-19 17:31:26 +02:00
Fabio Berger
1a0b9e4612 Comments and cleanup 2018-06-19 17:25:08 +02:00
Remco Bloemen
66dc70c057 Merge pull request #683 from 0xProject/fix/contracts/memcpy
Simplified handling of source < 32 edge case
2018-06-19 13:53:25 +02:00
Fabio Berger
6641f34d76 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype:
  Prettier fix
  Update default params in sendRawPaylodAsync for improved JSON-RPC compatibility
  Fix missed merge conflicts
  Fix additional versions and update yarn.lock
  Add OrderWatcherConfig type to 0x.js docs page
  Export OrderWatcherConfig from 0x.js
  Update all package versions to match latest published to NPM
  Update CHANGELOG's with publishes performed on development branch
  Rebase with latest removing PROXY_ID from transfer
  Split transfer impl and AssetProxyMixin
  change @0xproject/types to ethereum-types
  remove mistaken comment
  workaround for TypeScript trailing comma bug
  Document contract_templates
2018-06-19 13:48:58 +02:00
Fabio Berger
f3ae5d8160 Prettier fix 2018-06-19 13:46:39 +02:00
Fabio Berger
d937541aa0 Merge pull request #701 from feuGeneA/v2-prototype
Document use of contract_templates (take 2; based on v2-prototype, not master)
2018-06-19 13:44:55 +02:00
Fabio Berger
21707d7ff6 Merge pull request #728 from 0xProject/fix/post-dev-publish
Update v2-prototype w/ development changes since publish
2018-06-19 13:18:36 +02:00
Leonid Logvinov
3002bc0eee Merge pull request #731 from avonian/v2-prototype
Fix sendRawPaylodAsync for improved JSON-RPC compatibility
2018-06-19 13:17:20 +02:00
Ara Kevonian
df50232ed9 Update default params in sendRawPaylodAsync for improved JSON-RPC compatibility 2018-06-19 04:13:32 -07:00
Fabio Berger
17d49067e9 Fix missed merge conflicts 2018-06-19 12:56:22 +02:00
Remco Bloemen
9a2e023a51 Assembler orderHash function 2018-06-19 12:55:04 +02:00
Jacob Evans
9c747f3160 Merge pull request #659 from 0xProject/feature/contracts/split-proxy-internal-logic
Split transfer implementation and AssetProxyMixin
2018-06-19 20:41:06 +10:00
Fabio Berger
08ea71cb24 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (40 commits)
  Increase number of columns in relayer grid for small screens
  Make isValidSignature public
  Make batchFill methods return FIllResults struct
  Remove remove_tags script
  Small fixes
  Use semver package instead of getNextPatchVersion
  Use semver library instead of semverUtils
  small fixes
  Show all errors of a given kind at once rather then throwing after the first instance is encountered
  fix package.json
  Add more prepublish checks
  remove remove_tags script
  Create a shared Image component
  Adjust version in changelog
  Update RelayerGridTile render logic to incorportate colors and logos
  Add max width to top bar
  Set max-width for LargeLayout
  Finish last onboarding step
  Finish set allowance step
  Add onboarding assets
  ...
2018-06-19 12:35:32 +02:00
Fabio Berger
a96abe2422 Fix additional versions and update yarn.lock 2018-06-19 12:32:43 +02:00
Fabio Berger
84a4a888e6 Add OrderWatcherConfig type to 0x.js docs page 2018-06-19 11:34:44 +02:00
Fabio Berger
e3299b546e Export OrderWatcherConfig from 0x.js 2018-06-19 11:33:46 +02:00
Fabio Berger
f2e0f1b2f1 Update all package versions to match latest published to NPM 2018-06-19 11:32:55 +02:00
Fabio Berger
2a4456b9ca Update CHANGELOG's with publishes performed on development branch 2018-06-19 11:16:30 +02:00
Jacob Evans
560a55bfd1 Optimize and remove redundant encodePacked 2018-06-19 17:32:17 +10:00
fragosti
d32f0fad12 Fix linting issue 2018-06-18 18:56:31 -07:00
fragosti
031e7d270d Fix bug where we do fetch balances on wallet login 2018-06-18 18:08:38 -07:00
Brandon Millman
3b73a0e269 Check network state immediately instead of waiting for delay 2018-06-18 18:01:38 -07:00
fragosti
bdd299dd9e Fix onboarding persisting when changing routes 2018-06-18 17:24:31 -07:00
Brandon Millman
f97e605bf6 Consolidate account state messaging logic 2018-06-18 17:08:44 -07:00
fragosti
db9ff76754 Only elevate wallet zIndex when onboarding is in progress 2018-06-18 16:57:28 -07:00
Jacob Evans
190eafc30e Merge branch 'v2-prototype' into bug/contracts/eip712-191-prefix 2018-06-18 21:50:35 +10:00
Jacob Evans
d4ee0e8622 Rebase and update feedback
Cache the domain separator data with address this
Use the EIP712Types enum for types everywhere
Rename EIP712 struct ExecuteTransaction to ZeroExTransaction
2018-06-18 21:46:05 +10:00
Jacob Evans
96c90e6295 Rebase with latest removing PROXY_ID from transfer 2018-06-18 16:36:30 +10:00
Jacob Evans
ff95da411b Split transfer impl and AssetProxyMixin 2018-06-18 15:24:12 +10:00
F. Eugene Aumson
8bac1706a1 change @0xproject/types to ethereum-types 2018-06-15 10:37:37 -04:00
fragosti
2cc7289b7b Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-v2-analytics 2018-06-14 15:50:46 -07:00
fragosti
81d6df925e Run linter 2018-06-14 15:47:59 -07:00
fragosti
677e77d0ae Add Portal v2 logging 2018-06-14 15:43:10 -07:00
Fabio Berger
0d0c1af7f7 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype:
  Run prettify
  Implement allowance and final flow step
  Render TokenAllowance
  Add utilities for getting tokens from tokensByAddress
  Wrap AllowanceToggle in redux container
2018-06-15 00:03:47 +02:00
Fabio Berger
fb55def54f Add ability to tweak the relevant balances/allowances for the maker and taker for a fillScenario. Convert more of the core tests to the declarative form. 2018-06-15 00:03:00 +02:00
Fabio Berger
eea86757d5 - Refactor assetWrapper to contain more of the normalizing logic instead of erc20Wrapper and erc721Wrapper
- Add burn method to DummyERC721Token
- Add additional methods to assetWrapper to set balance/allowances on ERC20 and ERC721 tokens
- Use approve instead of approveAll for ERC721 tokens
2018-06-15 00:00:02 +02:00
perissology
7a41a5249f Collect coverage for provided sources
When solidity generates source maps during contract compilation, the
contracts are referred to by an id, which corresponds to an array index.

We may not want to cover all sources that were included in a compilation,
but because we use array indexes (vs. the id that is provided by solidity
compiler) to map the contract to the sourceMap, the provided sourceCodes
array must include the code at the correct index. This can result in
empty slots in the sourceCodes array.

This commit allows the coverage to only be collected for the contracts
with provided sourceCode.
2018-06-14 11:17:04 -07:00
F. Eugene Aumson
f9e05d0cad remove mistaken comment
It must have been left over from when an abi-gen output was modified to
be the source of this template.
2018-06-14 13:52:10 -04:00
F. Eugene Aumson
15a63c4bc5 workaround for TypeScript trailing comma bug
before this change, TypeScript compilation of the generated contract
wrapper was giving me the following errors:

$ abi-gen --abis 'build/contracts/*.json' --out build/types --template contract_templates/contract.handlebars --partials 'contract_templates/partials/*.handlebars'
Found 7 partial templates
Found 1 ABI files
Processing: Migrations...
Created: build/types/migrations.ts
$ tsc
build/types/migrations.ts(81,23): error TS1013: A rest parameter or binding pattern may not have a trailing comma.
build/types/migrations.ts(108,23): error TS1013: A rest parameter or binding pattern may not have a trailing comma.
build/types/migrations.ts(130,23): error TS1013: A rest parameter or binding pattern may not have a trailing comma.
build/types/migrations.ts(146,25): error TS1013: A rest parameter or binding pattern may not have a trailing comma.
build/types/migrations.ts(173,25): error TS1013: A rest parameter or binding pattern may not have a trailing comma.
build/types/migrations.ts(195,25): error TS1013: A rest parameter or binding pattern may not have a trailing comma.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Here is the generated code around the first error:

74:    public setCompleted = {
75:        async sendTransactionAsync(
76:            completed: BigNumber,
77:            txData: Partial<TxData> = {},
78:        ): Promise<string> {
79:            const self = this as any as MigrationsContract;
80:            const inputAbi = self._lookupAbi('setCompleted(uint256)').inputs;
81:            [completed,
82:    ] = BaseContract._formatABIDataItemList(inputAbi, [completed,
83:    ], BaseContract._bigNumberToString.bind(self));

All of the other errors are the same, a destructuring assignment with a
single element but with a trailing comma.

This is legal JavaScript but it is not allowed by the TypeScript
compiler, apparently per the bug described at
https://github.com/Microsoft/TypeScript/issues/24628 .

While awaiting the 3.0 version of TypeScript, it's a simple enough
change to have the template not append a trailing comma.
2018-06-14 13:51:18 -04:00
F. Eugene Aumson
4a2e4d2b55 Document contract_templates 2018-06-14 13:51:10 -04:00
Fabio Berger
12033abe09 Rename OrderAmountScenario to OrderAssetAmountScenario and convert generateOrderCombinations to generateFillOrderCombinations 2018-06-14 12:07:57 +02:00
Fabio Berger
f9410d5d00 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (27 commits)
  Add back redirector behind feature flag
  Update minHeight in Text
  Use Text components in Values
  Use spread operator instead of React.createElement
  Fix issue with positions hash
  Revert localhost config
  Use Text in Teams
  Use Text in OpenPositions
  Use Text component for HeaderItem
  Remove FloatingImage
  Move FilledImage into components/ui
  Replace FlatButton with Button in Retry
  Fix incorrect colors
  Add font family to Button component and use in Join0x component
  Consolidate jobs page grey colors with shared colors
  Fix lint errors
  Remove extra packages
  Implement small open positions
  Implement large screen open positions
  Teams section
  ...
2018-06-14 11:17:58 +02:00
Fabio Berger
c232a32991 Use a defaultFillScenario in fillOrder tests 2018-06-14 11:17:13 +02:00
Fabio Berger
57f37939d5 Fix incorrect string values in enum 2018-06-14 11:16:51 +02:00
Fabio Berger
432ff58107 Fix calculation of expFilledTakerAmount and expected values in events emitted 2018-06-14 11:16:32 +02:00
Fabio Berger
d31b051fc5 Replace initial set of legacy manually written fillOrder tests with declarative FillScenario tests 2018-06-14 10:41:04 +02:00
Fabio Berger
98405a39db Add ability to specify takerAssetFillAmount and taker scenarios as part of a FillScenario 2018-06-14 10:40:17 +02:00
Fabio Berger
6239686afa Fix divide by zero bug 2018-06-13 18:36:30 +02:00
Fabio Berger
45186b70ec Move orderFill combinatorialTests to exchange folder 2018-06-13 16:14:48 +02:00
Fabio Berger
b4fead9606 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (26 commits)
  Rename _coverageCollector -> _profilerCollector in TraceCollectionSubprovider
  Refactor sol-cov to de-duplicate code for coverage and profiling
  Rename popByte and popAddress
  Hard code test addresses/bytes32 instead of generating pseudorandom ones
  Update artifacts
  Rename computeCoverageAsync -> computeSingleTraceCoverageAsync
  Fix linter errors
  Refactor sol-cov to avoid keeping traceInfo in memory
  Unpop byte rather than making deep copy
  Pass gas in to marketBuyOrdersNoThrow
  Looks up the memory location of makerAssetData/takerAssetData
  Make ZRX_PROXY_ID constant rather than popping it from ZRX_ASSET_DATA
  Add tests for deepCopyBytes and missing write methods from LibBytes
  Pop id from assetData before dispatching to AssetProxies
  Upgrade solidity-parser-entlr 0.2.11 => 0.2.12
  Fix import order
  Fix typos
  Add CHANGELOGs
  Speed-up sol-cov
  Increase delay when sending transactions during devnet startup
  ...
2018-06-13 16:10:05 +02:00
Fabio Berger
61243b418e Implement initial set of orderFill combinatorial tests 2018-06-13 16:09:04 +02:00
Fabio Berger
fe75660e88 Refactor ERC20 and ERC721 wrappers for V2 and introduce the assetWrapper superset 2018-06-13 16:01:01 +02:00
Fabio Berger
946e6c1644 Remaining refactors of order-utils components for V2 2018-06-13 13:20:13 +02:00
Fabio Berger
3eb232b3fc For some reason order-watcher tests were timeing out so I increased the timeout limit 2018-06-13 13:18:19 +02:00
Fabio Berger
38de1c9a31 Remove comment since we have added the tests 2018-06-13 13:16:22 +02:00
Fabio Berger
78dcb87a75 Variable rename for clarity 2018-06-13 13:11:45 +02:00
Fabio Berger
7e78f5941a Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (68 commits)
  Stop exporting ArtifactWriter
  Fix no-unused-variable tslint rule to include parameters and fix issues
  Fix linter exclude rule
  Validate all signature types rather then only ECSignatures
  Store the instantiated OrderValidationUtils
  Remove global hooks from tests and deploy contracts from within the specific tests
  Add EmitStatement to ASTVisitor
  Fix tslint issues
  Add back artifacts file
  Fix a bug in SolCompilerArtifacts adapter config overriding
  Move OrderValidationUtils (+ tests) and ExchangeTransferSimulator to order-utils
  export parseECSignature method
  Export ArtifactWriter from migrations package
  Remove unused artifact file
  Pass in generated contract wrapper to orderValidationUtils at instantiation
  Refactor orderValidationUtils to use the generated contract wrapper instead of the higher-level one
  Refactor ExchangeTransferSimulator public interface to accet an AbstractBalanceAndProxyAllowanceLazyStore so that this module could be re-used in different contexts.
  Increase timeout for contract migrations
  Remove some copy-paste code
  Await transactions in migrations
  ...
2018-06-12 00:23:48 +02:00
Remco Bloemen
82d1412d45 Simplified handling of source < 32 edge case 2018-06-11 09:19:52 +02:00
Jacob Evans
a8d328bfc9 Basic EIP712 encoder 2018-06-07 16:09:30 -07:00
Fabio Berger
20f9318597 Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype:
  Fix linter issue
  Fix linter issue
  Fix tslint issues
  Fix missing paths
  Fixed path
  Use source-map-support package to include correct line numbers in mocha
  move generated contract wrappers from `contract_wrappers/generated/` to `generated_contract_wrappers` in package with no non-generated contract wrappers
2018-06-07 21:45:48 +02:00
Fabio Berger
b646c84414 Merge branch 'fix/order-utils/remaining-v2-changes' into feature/combinatorial-testing
* fix/order-utils/remaining-v2-changes:
  Fix tslint failure
  Pass in fee and assetAmount rather then the whole signedOrder
2018-06-07 18:52:14 +02:00
Fabio Berger
7b7664bd66 Merge branch 'fix/order-utils/remaining-v2-changes' into feature/combinatorial-testing
* fix/order-utils/remaining-v2-changes:
  Revert to returning orderState on invalid order
  - Refactor remainingFillableCalculator so it can be used for the maker and taker side - Moved the tests over from order-watcher - Did some token -> asset renaming
  Update naming in orderStateUtils to use asset over token, also removed cancelledAmount since in V2 it's binary.
2018-06-07 18:22:00 +02:00
Fabio Berger
ab5e021bda POC: Generates an order from spec, get's the amount fillable 2018-06-07 18:00:13 +02:00
Fabio Berger
0fc9814004 merge v2-prototype 2018-06-07 12:18:53 +02:00
Fabio Berger
e617da3bbf Implement initial generateOrder function that given the scenario values for an order, generates the actual order. 2018-06-06 22:13:50 +02:00
Jacob Evans
a59e9f024e Update Order utils to use eip712 2018-06-05 14:08:04 -07:00
Jacob Evans
4670cc1a5f Add missing EIP191 prefix for EIP712 2018-06-04 17:41:00 -07:00
1790 changed files with 94949 additions and 69266 deletions

View File

@@ -1,183 +1,353 @@
version: 2
jobs:
build:
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
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-{{ .Branch }}
- yarn-packages-master
- yarn-packages-
- run:
name: yarn
command: yarn --frozen-lockfile install
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run: >
if [ -z "$(git diff --name-only v2-prototype packages/website)" ]; then
yarn build --exclude website
else
yarn build
fi
- save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo
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: albrow/0x-devnet
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
# HACK(albrow): we need to sleep 15 seconds to ensure the devnet is
# initialized
- run: sleep 15 && TEST_PROVIDER=geth yarn wsrun test contracts
test-rest:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0xproject/contract-wrappers
- run: yarn wsrun test:circleci @0xproject/sol-compiler
- run: yarn wsrun test:circleci @0xproject/assert
- run: yarn wsrun test:circleci @0xproject/connect
- run: yarn wsrun test:circleci @0xproject/dev-utils
- run: yarn wsrun test:circleci @0xproject/json-schemas
- run: yarn wsrun test:circleci @0xproject/subproviders
- run: yarn wsrun test:circleci @0xproject/sol-cov
- run: yarn wsrun test:circleci @0xproject/metacoin
- save_cache:
key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/contract-wrappers/coverage/lcov.info
- save_cache:
key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/sol-compiler/coverage/lcov.info
- save_cache:
key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/assert/coverage/lcov.info
- save_cache:
key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/connect/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-subproviders-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/subproviders/coverage/lcov.info
- save_cache:
key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/sol-cov/coverage/lcov.info
- save_cache:
key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/metacoin/coverage/lcov.info
static-tests:
working_directory: ~/repo
docker:
- image: circleci/node:9
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn prettier:ci
- run: yarn lerna:run lint
submit-coverage:
docker:
- image: circleci/node:9
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-assert-{{ .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-subproviders-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-contracts-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-metacoin-{{ .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
- 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 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 @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"
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
coverage run setup.py test
- save_cache:
key: coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/python-packages/order_utils/.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
- test-contracts-ganache:
requires:
version: 2
main:
jobs:
- build
- test-contracts-geth:
requires:
- build
- test-rest:
requires:
- build
- static-tests:
requires:
- build
- submit-coverage:
requires:
- test-rest
- build-website:
requires:
- 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
- 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

28
.gitignore vendored
View File

@@ -41,6 +41,7 @@ typings/
# Optional npm cache directory
.npm
.npmrc
# Optional eslint cache
.eslintcache
@@ -67,31 +68,38 @@ generated_docs/
TODO.md
# VSCode file
.vscode
packages/website/public/bundle*
packages/dev-tools-pages/public/bundle*
packages/react-docs/example/public/bundle*
# server cli
packages/testnet-faucets/server/
# generated contract artifacts/
packages/contracts/generated-artifacts/
packages/sol-cov/test/fixtures/artifacts/
packages/metacoin/artifacts/
packages/order-watcher/test/artifacts/
packages/contract-wrappers/test/artifacts/
# generated contract wrappers
packages/0x.js/src/generated_contract_wrappers/
packages/contracts/src/generated_contract_wrappers/
packages/contract-wrappers/src/contract_wrappers/generated/
packages/abi-gen-wrappers/wrappers
packages/contracts/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/v1/contract_wrappers
packages/migrations/src/v2/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,20 +1,15 @@
lib
.nyc_output
/packages/contract-wrappers/src/contract_wrappers/generated/
/packages/contracts/generated-wrappers
/packages/contracts/generated-artifacts
/packages/abi-gen-wrappers/src/generated-wrappers
/packages/contract-artifacts/artifacts
/python-packages/order_utils/src/zero_ex/contract_artifacts/artifacts
/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/src/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/v1/contract_wrappers
/packages/migrations/src/v2/contract_wrappers
/packages/0x.js/test/artifacts
/packages/contracts/src/artifacts
/packages/metacoin/artifacts
/packages/contract-wrappers/test/artifacts
/packages/order-watcher/test/artifacts
/packages/migrations/artifacts/1.0.0
/packages/migrations/artifacts/2.0.0
/packages/sra-spec/public/
package.json
scripts/postpublish_utils.js
packages/sol-cov/test/fixtures/artifacts

35
CODEOWNERS Normal file
View File

@@ -0,0 +1,35 @@
# See https://help.github.com/articles/about-codeowners/
# for more info about CODEOWNERS file
# It uses the same pattern rule for gitignore file
# https://git-scm.com/docs/gitignore#_pattern_format
# Website
packages/asset-buyer/ @BMillman19 @fragosti @steveklebanoff
packages/instant/ @BMillman19 @fragosti @steveklebanoff
packages/website/ @BMillman19 @fragosti @fabioberger @steveklebanoff
# Dev tools & setup
.circleci/ @LogvinovLeon
packages/abi-gen/ @LogvinovLeon
packages/base-contract/ @LogvinovLeon
packages/connect/ @fragosti
packages/contract_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
packages/contracts/test/ @albrow

View File

@@ -1,49 +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`.
### Styleguide
Branch names should be prefixed with `fix`, `feature` or `refactor`.
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.
* 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 lint your code just run: `yarn lint`
### CHANGELOGs
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.
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.
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:
```
{
"version": "1.0.1", <- The updated package version
"changes": [
{
"note": "", <- Describe your change
"PR": 100 <- Your PR number
}
]
},
```
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).
### Development Tooling
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

@@ -1,41 +1,27 @@
<!--- Thank you for taking the time to submit a Pull Request -->
<!--- Provide a general summary of the issue in the Title above -->
## Description
<!--- Describe your changes in detail -->
## Motivation and Context
## Testing instructions
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
<!--- Please describe how reviewers can test your changes -->
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
<!--- What types of changes does your code introduce? Uncomment all the bullets that apply: -->
* [ ] Bug fix (non-breaking change which fixes an issue)
* [ ] New feature (non-breaking change which adds functionality)
* [ ] Breaking change (fix or feature that would cause existing functionality to change)
<!-- * Bug fix (non-breaking change which fixes an issue) -->
<!-- * New feature (non-breaking change which adds functionality) -->
<!-- * Breaking change (fix or feature that would cause existing functionality to change) -->
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- 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! -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
* [ ] Change requires a change to the documentation.
* [ ] Added tests to cover my changes.
* [ ] Added new entries to the relevant CHANGELOG.jsons.
* [ ] Labeled this PR with the 'WIP' label if it is a work in progress.
* [ ] Labeled this PR with the labels corresponding to the changed package.
* [ ] 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.

122
README.md
View File

@@ -2,12 +2,15 @@
---
[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.
[website-url]: https://0xproject.com/
If you're developing on 0x now or are interested in using 0x infrastructure in the future, please join our [developer mailing list][dev-mailing-list-url] for updates.
[website-url]: https://0xproject.com
[whitepaper-url]: https://0xproject.com/pdfs/0x_white_paper.pdf
[dev-mailing-list-url]: http://eepurl.com/dx4cPf
[![CircleCI](https://circleci.com/gh/0xProject/0x-monorepo.svg?style=svg&circle-token=61bf7cd8c9b4e11b132089dfcffdd1be277d1e0c)](https://circleci.com/gh/0xProject/0x-monorepo)
[![Coverage Status](https://coveralls.io/repos/github/0xProject/0x-monorepo/badge.svg?branch=development)](https://coveralls.io/github/0xProject/0x-monorepo?branch=development)
@@ -15,60 +18,79 @@ This repository is a monorepo including the 0x protocol smart contracts and nume
[![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/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/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/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/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/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/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.py`](/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 |
### 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`](/packages/contracts) | 0x protocol solidity smart contracts & tests |
| [`@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 @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
@@ -79,10 +101,10 @@ We strongly recommend that the community help us make improvements and determine
### Install dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
Make sure you are using Yarn v1.9.4. To install using brew:
```bash
yarn config set workspaces-experimental true
brew install yarn@1.9.4
```
Then install dependencies
@@ -102,7 +124,7 @@ yarn build
To build a specific package:
```bash
PKG=@0xproject/web3-wrapper yarn build
PKG=@0x/web3-wrapper yarn build
```
### Watch
@@ -119,7 +141,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
@@ -175,5 +197,5 @@ yarn test
Run a specific package's test:
```bash
PKG=@0xproject/web3-wrapper yarn test
PKG=@0x/web3-wrapper yarn test
```

View File

@@ -1,15 +1,10 @@
{
"lerna": "2.5.1",
"lerna": "3.0.0-beta.23",
"packages": ["packages/*"],
"commands": {
"publish": {
"allowBranch": "development"
}
},
"version": "independent",
"commands": {
"command": {
"publish": {
"ignore": ["test/**/*", "*.md", "scripts", "lib", "tslint.json", "tsconfig.json"]
"ignoreChanges": ["test/**/*", "*.md", "scripts", "lib", "tslint.json", "tsconfig.json"]
}
},
"npmClient": "yarn",

View File

@@ -2,52 +2,78 @@
"private": true,
"name": "0x-monorepo",
"engines": {
"node" : ">=6.12"
"node": ">=6.12"
},
"workspaces": [
"packages/*"
],
"scripts": {
"ganache": "ganache-cli -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"ganache": "ganache-cli -p 8545 --gasLimit 10000000 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"prettier": "prettier --write '**/*.{ts,tsx,json,md}' --config .prettierrc",
"prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc",
"report_coverage": "lcov-result-merger 'packages/*/coverage/lcov.info' | coveralls",
"report_coverage": "lcov-result-merger './{packages/*/coverage/lcov.info,python-packages/*/.coverage}' | coveralls",
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild script:publish",
"run:publish:dry": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild script:publish:dry",
"test:installation:local": "IS_LOCAL_PUBLISH=true node ./packages/monorepo-scripts/lib/test_installation.js",
"test:publish:circleci": "yarn npm-cli-login -u test -p test -e test@example.com -r http://localhost:4873 && IS_LOCAL_PUBLISH=true run-s script:publish test:installation:local",
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild:no_website script:publish",
"run:publish:local": "IS_LOCAL_PUBLISH=true yarn run:publish",
"script:prepublish_checks": "node ./packages/monorepo-scripts/lib/prepublish_checks.js",
"script:publish": "node ./packages/monorepo-scripts/lib/publish.js",
"script:publish:dry": "IS_DRY_RUN=true yarn script:publish",
"install:all": "yarn install",
"wsrun": "wsrun",
"lerna:run": "lerna run",
"watch": "wsrun watch_without_deps $PKG --fast-exit -r --stages --done-criteria='complete|successfully'",
"lerna": "lerna",
"build": "wsrun build $PKG --fast-exit -r --stages",
"build:monorepo_scripts": "PKG=@0xproject/monorepo-scripts yarn build",
"build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0x/website",
"build:ci:no_website": "wsrun build:ci $PKG --fast-exit -r --stages --exclude @0x/website",
"build:monorepo_scripts": "PKG=@0x/monorepo-scripts yarn build",
"build:ts": "tsc -b",
"watch:ts": "tsc -b -w",
"clean": "wsrun clean $PKG --fast-exit -r --parallel",
"remove_node_modules": "lerna clean --yes; rm -rf node_modules",
"rebuild": "run-s clean build",
"rebuild:no_website": "run-s clean build:no_website",
"test": "wsrun test $PKG --fast-exit --serial --exclude-missing",
"stage_docs": "wsrun docs:stage $PKG --fast-exit --parallel --exclude-missing",
"lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing",
"comment:postinstall": "HACK: For some reason `yarn` is not setting up symlinks properly for order-utils. We temporarily set them manually. Remove this after V2 refactor is complete.",
"postinstall": "rm -rf `pwd`/packages/order-utils/node_modules/@0xproject; mkdir `pwd`/packages/order-utils/node_modules/@0xproject; ln -s `pwd`/packages/json-schemas `pwd`/packages/order-utils/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/types `pwd`/packages/order-utils/node_modules/@0xproject/types; rm -f `pwd`/packages/contracts/node_modules/@0xproject/types; ln -s `pwd`/packages/types `pwd`/packages/contracts/node_modules/@0xproject/types; mkdir -p `pwd`/packages/fill-scenarios/node_modules/@0xproject; ln -s `pwd`/packages/types `pwd`/packages/fill-scenarios/node_modules/@0xproject/types; ln -s `pwd`/packages/order-utils `pwd`/packages/fill-scenarios/node_modules/@0xproject/order-utils"
"generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js",
"test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i --shouldUpload false --isStaging true || break -1; done;",
"bundlewatch": "bundlewatch",
"lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing"
},
"config": {
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic",
"packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-cov ethereum-types asset-buyer migrations"
},
"bundlewatch": {
"files": [
{
"path": "packages/0x.js/_bundles/index.min.js",
"maxSize": "700kB"
},
{
"path": "packages/instant/umd/instant.js",
"maxSize": "1000kB"
}
],
"ci": {
"trackBranches": [
"master",
"development"
],
"repoBranchBase": "development"
}
},
"devDependencies": {
"@0x-lerna-fork/lerna": "3.0.0-beta.25",
"@0xproject/npm-cli-login": "^0.0.11",
"async-child-process": "^1.1.1",
"bundlewatch": "^0.2.1",
"coveralls": "^3.0.0",
"ganache-cli": "^6.1.0",
"ganache-cli": "6.1.8",
"lcov-result-merger": "^3.0.0",
"lerna": "^2.5.1",
"lerna": "^3.0.0-beta.25",
"npm-run-all": "^4.1.2",
"prettier": "^1.11.1",
"wsrun": "^2.2.0",
"source-map-support": "^0.5.6"
},
"resolutions": {
"ethereumjs-tx": "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default",
"ethers": "0xproject/ethers.js#eip-838-reasons"
"source-map-support": "^0.5.6",
"typescript": "3.0.1",
"wsrun": "^2.2.0"
}
}

View File

@@ -4,7 +4,6 @@ webpack.config.js
yarn-error.log
test/
/src/
/_bundles/
/contract_templates/
/generated_docs/
/scripts/

View File

@@ -1,4 +1,327 @@
[
{
"timestamp": 1542821676,
"version": "2.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542208198,
"version": "2.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542134075,
"version": "2.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542028948,
"version": "2.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.0.1",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1541740904
},
{
"version": "2.0.0",
"changes": [
{
"note": "Add support for `eth_signTypedData`.",
"pr": 1102
},
{
"note":
"Added `MetamaskSubprovider` to handle inconsistencies in Metamask's signing JSON RPC endpoints.",
"pr": 1102
},
{
"note":
"Removed `SignerType` (including `SignerType.Metamask`). Please use the `MetamaskSubprovider` to wrap `web3.currentProvider`.",
"pr": 1102
},
{
"note":
"Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers",
"pr": 1105
},
{
"note": "Make web3-provider-engine types a 'dependency' so it's available to users of the library",
"pr": 1105
},
{
"note": "Export new `AssetData` type from types",
"pr": 1131
}
],
"timestamp": 1539871071
},
{
"version": "1.0.8",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1538693146
},
{
"timestamp": 1538157789,
"version": "1.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537907159,
"version": "1.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537875740,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537541580,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.3",
"changes": [
{
"note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
}
],
"timestamp": 1537369748
},
{
"version": "1.0.2",
"changes": [
{
"note": "Add ZRX & WETH mainnet contract addresses into the included artifacts"
}
],
"timestamp": 1537265493
},
{
"timestamp": 1536142250,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.1-rc.6",
"changes": [
{
"note": "Fix missing `BlockParamLiteral` type import issue"
}
],
"timestamp": 1535377027
},
{
"version": "1.0.1-rc.5",
"changes": [
{
"note":
"Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js"
}
]
},
{
"version": "1.0.1-rc.4",
"changes": [
{
"note":
"Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher`",
"pr": 963
}
],
"timestamp": 1535133899
},
{
"version": "1.0.1-rc.3",
"changes": [
{
"note": "Dependencies updated"
},
{
"pr": 914,
"note": "Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts"
}
],
"timestamp": 1534210131
},
{
"version": "1.0.1-rc.2",
"changes": [
{
"note": "Fixed bug caused by importing non-existent dep"
}
],
"timestamp": 1532619515
},
{
"version": "1.0.1-rc.1",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1532605697
},
{
"timestamp": 1532357734,
"version": "1.0.0",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532043100,
"version": "1.0.0-rc.2",
"changes": [
{
"note": "Remove `zeroEx.assetData` and instead re-export it's static functions directly off `ZeroEx`"
}
]
},
{
"timestamp": 1532043000,
"version": "1.0.0-rc.1",
"changes": [
{
"note": "Remove tokenRegistry wrapper",
"pr": 863
},
{
"note": "Rename `zeroEx.token` to `zeroEx.erc20Token`, and add `zeroEx.erc721Token`",
"pr": 863
},
{
"note": "Rename `zeroEx.proxy` to `zeroEx.erc20Proxy` and add `zeroEx.erc721Proxy`",
"pr": 863
},
{
"note":
"Refactored `ZeroEx.isValidSignature` to `zeroEx.isValidSignatureAsync`. It is now async so that it can verify contract-dependent signature types",
"pr": 863
},
{
"note":
"Refactored `signOrderHashAsync` to `ecSignOrderHashAsync`. There are now many non-ECSignature ways to sign orders too.",
"pr": 863
},
{
"note":
"Removed `createOrderWatcherAsync` method. Will be added back once OrderWatcher is refactored for V2",
"pr": 863
},
{
"note": "0x.js exports renamed contract events and event arg types",
"pr": 863
},
{
"note": "Export `ZeroEx.assetData` with methods to decode/encode assetData fields found in 0x orders",
"pr": 884
}
]
},
{
"timestamp": 1531919263,
"version": "0.38.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1531149657,
"version": "0.38.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1529397769,
"version": "0.38.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1527617805,
"version": "0.38.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1527617227,
"version": "0.38.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1527616612,
"version": "0.38.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.38.0",
"changes": [

View File

@@ -1,10 +1,139 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v2.0.5 - _November 21, 2018_
* Dependencies updated
## v2.0.4 - _November 14, 2018_
* Dependencies updated
## v2.0.3 - _November 13, 2018_
* Dependencies updated
## v2.0.2 - _November 12, 2018_
* Dependencies updated
## v2.0.1 - _November 9, 2018_
* Dependencies updated
## v2.0.0 - _October 18, 2018_
* Add support for `eth_signTypedData`. (#1102)
* Added `MetamaskSubprovider` to handle inconsistencies in Metamask's signing JSON RPC endpoints. (#1102)
* Removed `SignerType` (including `SignerType.Metamask`). Please use the `MetamaskSubprovider` to wrap `web3.currentProvider`. (#1102)
* Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers (#1105)
* Make web3-provider-engine types a 'dependency' so it's available to users of the library (#1105)
* Export new `AssetData` type from types (#1131)
## v1.0.8 - _October 4, 2018_
* Dependencies updated
## v1.0.7 - _September 28, 2018_
* Dependencies updated
## v1.0.6 - _September 25, 2018_
* Dependencies updated
## v1.0.5 - _September 25, 2018_
* Dependencies updated
## v1.0.4 - _September 21, 2018_
* Dependencies updated
## v1.0.3 - _September 19, 2018_
* Drastically reduce the bundle size by removing unused parts of included contract artifacts.
## v1.0.2 - _September 18, 2018_
* Add ZRX & WETH mainnet contract addresses into the included artifacts
## v1.0.1 - _September 5, 2018_
* Dependencies updated
## v1.0.1-rc.6 - _August 27, 2018_
* Fix missing `BlockParamLiteral` type import issue
## v1.0.1-rc.5 - _Invalid date_
* Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js
## v1.0.1-rc.4 - _August 24, 2018_
* Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher` (#963)
## v1.0.1-rc.3 - _August 14, 2018_
* Dependencies updated
* Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts (#914)
## v1.0.1-rc.2 - _July 26, 2018_
* Fixed bug caused by importing non-existent dep
## v1.0.1-rc.1 - _July 26, 2018_
* Dependencies updated
## v1.0.0 - _July 23, 2018_
* Dependencies updated
## v1.0.0-rc.2 - _July 19, 2018_
* Remove `zeroEx.assetData` and instead re-export it's static functions directly off `ZeroEx`
## v1.0.0-rc.1 - _July 19, 2018_
* Remove tokenRegistry wrapper (#863)
* Rename `zeroEx.token` to `zeroEx.erc20Token`, and add `zeroEx.erc721Token` (#863)
* Rename `zeroEx.proxy` to `zeroEx.erc20Proxy` and add `zeroEx.erc721Proxy` (#863)
* Refactored `ZeroEx.isValidSignature` to `zeroEx.isValidSignatureAsync`. It is now async so that it can verify contract-dependent signature types (#863)
* Refactored `signOrderHashAsync` to `ecSignOrderHashAsync`. There are now many non-ECSignature ways to sign orders too. (#863)
* Removed `createOrderWatcherAsync` method. Will be added back once OrderWatcher is refactored for V2 (#863)
* 0x.js exports renamed contract events and event arg types (#863)
* Export `ZeroEx.assetData` with methods to decode/encode assetData fields found in 0x orders (#884)
## v0.38.6 - _July 18, 2018_
* Dependencies updated
## v0.38.5 - _July 9, 2018_
* Dependencies updated
## v0.38.4 - _June 19, 2018_
* Dependencies updated
## v0.38.3 - _May 29, 2018_
* Dependencies updated
## v0.38.2 - _May 29, 2018_
* Dependencies updated
## v0.38.1 - _May 29, 2018_
* Dependencies updated
## v0.38.0 - _May 22, 2018_
* Renamed createOrderStateWatcher to createOrderWatcherAsync since it is now async (#579)

View File

@@ -1,6 +1,6 @@
## 0x.js
A TypeScript/Javascript library for interacting with the 0x protocol.
A TypeScript/Javascript library for interacting with the 0x protocol. It is a high level package which combines a number of underlying packages such as order-utils and order-watcher.
### Read the [Documentation](https://0xproject.com/docs/0x.js).
@@ -19,14 +19,21 @@ npm install 0x.js --save
**Import**
```javascript
import { ZeroEx } from '0x.js';
import {
assetDataUtils,
BigNumber,
ContractWrappers,
generatePseudoRandomSalt,
orderHashUtils,
signatureUtils,
} from '0x.js';
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}
```

View File

@@ -1,6 +1,6 @@
{
"name": "0x.js",
"version": "0.38.0",
"version": "2.0.5",
"engines": {
"node": ">=6.12"
},
@@ -12,55 +12,28 @@
"tokens",
"exchange"
],
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"watch_without_deps": "yarn pre_build && tsc -w",
"build": "yarn pre_build && yarn build:all && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"build:all": "run-p build:umd:prod build:commonjs; exit 0;",
"pre_build": "run-s generate_contract_wrappers copy_artifacts",
"copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts",
"generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
"build": "yarn build:all",
"build:ci": "yarn build:commonjs",
"build:all": "run-p build:umd:prod build:commonjs",
"lint": "tslint --format stylish --project .",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"clean": "shx rm -rf _bundles lib test_temp scripts src/generated_contract_wrappers",
"clean": "shx rm -rf _bundles lib test_temp src/generated_contract_wrappers generated_docs",
"build:umd:prod": "NODE_ENV=production webpack",
"build:commonjs": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
"docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
"build:commonjs": "tsc -b",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"compact_artifacts": "Exchange DummyToken ZRXToken Token EtherToken TokenTransferProxy TokenRegistry",
"postpublish": {
"assets": [
"packages/0x.js/_bundles/index.js",
"packages/0x.js/_bundles/index.min.js"
],
"docPublishConfigs": {
"extraFileIncludes": [
"../types/src/index.ts",
"../ethereum-types/src/index.ts",
"../contract-wrappers/src/types.ts",
"../contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts",
"../contract-wrappers/src/contract_wrappers/exchange_wrapper.ts",
"../contract-wrappers/src/contract_wrappers/token_registry_wrapper.ts",
"../contract-wrappers/src/contract_wrappers/token_transfer_proxy_wrapper.ts",
"../contract-wrappers/src/contract_wrappers/token_wrapper.ts",
"../order-watcher/src/order_watcher/order_watcher.ts",
"./src/generated_contract_wrappers/ether_token.ts",
"./src/generated_contract_wrappers/token.ts",
"./src/generated_contract_wrappers/exchange.ts"
],
"s3BucketPath": "s3://doc-jsons/0x.js/",
"s3StagingBucketPath": "s3://staging-doc-jsons/0x.js/"
}
]
}
},
"repository": {
@@ -69,50 +42,52 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@0xproject/abi-gen": "^0.3.0",
"@0xproject/dev-utils": "^0.4.2",
"@0xproject/migrations": "^0.0.6",
"@0xproject/monorepo-scripts": "^0.1.20",
"@0xproject/sol-compiler": "^0.5.0",
"@0xproject/tslint-config": "^0.4.18",
"@0x/abi-gen": "^1.0.17",
"@0x/abi-gen-wrappers": "^1.1.0",
"@0x/contract-addresses": "^1.2.0",
"@0x/dev-utils": "^1.0.18",
"@0x/migrations": "^2.1.0",
"@0x/tslint-config": "^1.0.10",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
"@types/node": "*",
"@types/sinon": "^2.2.2",
"awesome-typescript-loader": "^3.1.3",
"awesome-typescript-loader": "^5.2.1",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^2.0.1",
"copyfiles": "^1.2.0",
"copyfiles": "^2.0.0",
"dirty-chai": "^2.0.1",
"json-loader": "^0.5.4",
"make-promises-safe": "^1.1.0",
"mocha": "^4.0.1",
"mocha": "^4.1.0",
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"opn-cli": "^3.1.0",
"shx": "^0.2.2",
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
"tslint": "5.8.0",
"typedoc": "0xProject/typedoc",
"typescript": "2.7.1",
"webpack": "^3.1.0"
"tslint": "5.11.0",
"typedoc": "0.13.0",
"typescript": "3.0.1",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.20.2"
},
"dependencies": {
"@0xproject/assert": "^0.2.10",
"@0xproject/base-contract": "^0.3.2",
"@0xproject/contract-wrappers": "^0.0.2",
"@0xproject/order-utils": "0.0.5",
"@0xproject/order-watcher": "^0.0.2",
"@0xproject/sol-compiler": "^0.5.0",
"@0xproject/types": "0.7.0",
"@0xproject/typescript-typings": "^0.3.2",
"@0xproject/utils": "^0.6.2",
"@0xproject/web3-wrapper": "^0.6.4",
"ethereum-types": "^0.0.1",
"ethers": "^3.0.15",
"lodash": "^4.17.4"
"@0x/assert": "^1.0.18",
"@0x/base-contract": "^3.0.7",
"@0x/contract-wrappers": "^4.1.0",
"@0x/order-utils": "^3.0.3",
"@0x/order-watcher": "^2.2.5",
"@0x/subproviders": "^2.1.5",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.5",
"@types/web3-provider-engine": "^14.0.0",
"ethereum-types": "^1.1.2",
"ethers": "~4.0.4",
"lodash": "^4.17.5",
"web3-provider-engine": "14.0.6"
},
"publishConfig": {
"access": "public"

View File

@@ -1,228 +0,0 @@
import { assert } from '@0xproject/assert';
import {
ContractWrappers,
ContractWrappersConfig,
EtherTokenWrapper,
ExchangeWrapper,
TokenRegistryWrapper,
TokenTransferProxyWrapper,
TokenWrapper,
} from '@0xproject/contract-wrappers';
import {
generatePseudoRandomSalt,
getOrderHashHex,
isValidOrderHash,
isValidSignature,
signOrderHashAsync,
} from '@0xproject/order-utils';
import { OrderWatcher, OrderWatcherConfig } from '@0xproject/order-watcher';
import { ECSignature, Order, Provider, SignedOrder, TransactionReceiptWithDecodedLogs } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { constants } from './utils/constants';
/**
* The ZeroEx class is the single entry-point into the 0x.js library. It contains all of the library's functionality
* and all calls to the library should be made through a ZeroEx instance.
*/
export class ZeroEx {
/**
* When creating an order without a specified taker or feeRecipient you must supply the Solidity
* address null type (as opposed to Javascripts `null`, `undefined` or empty string). We expose
* this constant for your convenience.
*/
public static NULL_ADDRESS = constants.NULL_ADDRESS;
/**
* An instance of the ExchangeWrapper class containing methods for interacting with the 0x Exchange smart contract.
*/
public exchange: ExchangeWrapper;
/**
* An instance of the TokenRegistryWrapper class containing methods for interacting with the 0x
* TokenRegistry smart contract.
*/
public tokenRegistry: TokenRegistryWrapper;
/**
* An instance of the TokenWrapper class containing methods for interacting with any ERC20 token smart contract.
*/
public token: TokenWrapper;
/**
* An instance of the EtherTokenWrapper class containing methods for interacting with the
* wrapped ETH ERC20 token smart contract.
*/
public etherToken: EtherTokenWrapper;
/**
* An instance of the TokenTransferProxyWrapper class containing methods for interacting with the
* tokenTransferProxy smart contract.
*/
public proxy: TokenTransferProxyWrapper;
private _contractWrappers: ContractWrappers;
/**
* Generates a pseudo-random 256-bit salt.
* The salt can be included in a 0x order, ensuring that the order generates a unique orderHash
* and will not collide with other outstanding orders that are identical in all other parameters.
* @return A pseudo-random 256-bit number that can be used as a salt.
*/
public static generatePseudoRandomSalt(): BigNumber {
return generatePseudoRandomSalt();
}
/**
* Verifies that the elliptic curve signature `signature` was generated
* by signing `data` with the private key corresponding to the `signerAddress` address.
* @param data The hex encoded data signed by the supplied signature.
* @param signature An object containing the elliptic curve signature parameters.
* @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
* @return Whether the signature is valid for the supplied signerAddress and data.
*/
public static isValidSignature(data: string, signature: ECSignature, signerAddress: string): boolean {
return isValidSignature(data, signature, signerAddress);
}
/**
* Computes the orderHash for a supplied order.
* @param order An object that conforms to the Order or SignedOrder interface definitions.
* @return The resulting orderHash from hashing the supplied order.
*/
public static getOrderHashHex(order: Order | SignedOrder): string {
return getOrderHashHex(order);
}
/**
* Checks if the supplied hex encoded order hash is valid.
* Note: Valid means it has the expected format, not that an order with the orderHash exists.
* Use this method when processing orderHashes submitted as user input.
* @param orderHash Hex encoded orderHash.
* @return Whether the supplied orderHash has the expected format.
*/
public static isValidOrderHash(orderHash: string): boolean {
return isValidOrderHash(orderHash);
}
/**
* A unit amount is defined as the amount of a token above the specified decimal places (integer part).
* E.g: If a currency has 18 decimal places, 1e18 or one quintillion of the currency is equivalent
* to 1 unit.
* @param amount The amount in baseUnits that you would like converted to units.
* @param decimals The number of decimal places the unit amount has.
* @return The amount in units.
*/
public static toUnitAmount(amount: BigNumber, decimals: number): BigNumber {
assert.isValidBaseUnitAmount('amount', amount);
assert.isNumber('decimals', decimals);
const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
return unitAmount;
}
/**
* A baseUnit is defined as the smallest denomination of a token. An amount expressed in baseUnits
* is the amount expressed in the smallest denomination.
* E.g: 1 unit of a token with 18 decimal places is expressed in baseUnits as 1000000000000000000
* @param amount The amount of units that you would like converted to baseUnits.
* @param decimals The number of decimal places the unit amount has.
* @return The amount in baseUnits.
*/
public static toBaseUnitAmount(amount: BigNumber, decimals: number): BigNumber {
assert.isBigNumber('amount', amount);
assert.isNumber('decimals', decimals);
const baseUnitAmount = Web3Wrapper.toBaseUnitAmount(amount, decimals);
return baseUnitAmount;
}
/**
* Instantiates a new ZeroEx instance that provides the public interface to the 0x.js library.
* @param provider The Provider instance you would like the 0x.js library to use for interacting with
* the Ethereum network.
* @param config The configuration object. Look up the type for the description.
* @return An instance of the 0x.js ZeroEx class.
*/
constructor(provider: Provider, config: ContractWrappersConfig) {
assert.isWeb3Provider('provider', provider);
this._contractWrappers = new ContractWrappers(provider, config);
this.proxy = this._contractWrappers.proxy;
this.token = this._contractWrappers.token;
this.exchange = this._contractWrappers.exchange;
this.tokenRegistry = this._contractWrappers.tokenRegistry;
this.etherToken = this._contractWrappers.etherToken;
}
/**
* Sets a new web3 provider for 0x.js. Updating the provider will stop all
* subscriptions so you will need to re-subscribe to all events relevant to your app after this call.
* @param provider The Web3Provider you would like the 0x.js library to use from now on.
* @param networkId The id of the network your provider is connected to
*/
public setProvider(provider: Provider, networkId: number): void {
this._contractWrappers.setProvider(provider, networkId);
}
/**
* Get the provider instance currently used by 0x.js
* @return Web3 provider instance
*/
public getProvider(): Provider {
return this._contractWrappers.getProvider();
}
/**
* Get user Ethereum addresses available through the supplied web3 provider available for sending transactions.
* @return An array of available user Ethereum addresses.
*/
public async getAvailableAddressesAsync(): Promise<string[]> {
// Hack: Get Web3Wrapper from ContractWrappers
const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper;
const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
return availableAddresses;
}
/**
* Signs an orderHash and returns it's elliptic curve signature.
* This method currently supports TestRPC, Geth and Parity above and below V1.6.6
* @param orderHash Hex encoded orderHash to sign.
* @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
* must be available via the Provider supplied to 0x.js.
* @param shouldAddPersonalMessagePrefix Some signers add the personal message prefix `\x19Ethereum Signed Message`
* themselves (e.g Parity Signer, Ledger, TestRPC) and others expect it to already be done by the client
* (e.g Metamask). Depending on which signer this request is going to, decide on whether to add the prefix
* before sending the request.
* @return An object containing the Elliptic curve signature parameters generated by signing the orderHash.
*/
public async signOrderHashAsync(
orderHash: string,
signerAddress: string,
shouldAddPersonalMessagePrefix: boolean,
): Promise<ECSignature> {
return signOrderHashAsync(
this._contractWrappers.getProvider(),
orderHash,
signerAddress,
shouldAddPersonalMessagePrefix,
);
}
/**
* Waits for a transaction to be mined and returns the transaction receipt.
* @param txHash Transaction hash
* @param pollingIntervalMs How often (in ms) should we check if the transaction is mined.
* @param timeoutMs How long (in ms) to poll for transaction mined until aborting.
* @return Transaction receipt with decoded log args.
*/
public async awaitTransactionMinedAsync(
txHash: string,
pollingIntervalMs: number = 1000,
timeoutMs?: number,
): Promise<TransactionReceiptWithDecodedLogs> {
// Hack: Get Web3Wrapper from ContractWrappers
const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper;
const transactionReceiptWithDecodedLogs = await web3Wrapper.awaitTransactionMinedAsync(
txHash,
pollingIntervalMs,
timeoutMs,
);
return transactionReceiptWithDecodedLogs;
}
/**
* Instantiates and returns a new OrderWatcher instance.
* Defaults to watching the pending state.
* @param config The configuration object. Look up the type for the description.
* @return An instance of the 0x.js OrderWatcher class.
*/
public async createOrderWatcherAsync(config?: OrderWatcherConfig): Promise<OrderWatcher> {
// Hack: Get Web3Wrapper from ContractWrappers
const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper;
const networkId = await web3Wrapper.getNetworkIdAsync();
const provider = this._contractWrappers.getProvider();
const orderWatcher = new OrderWatcher(provider, networkId, config);
return orderWatcher;
}
}

View File

@@ -1,22 +0,0 @@
{
"contract_name": "DummyToken",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_target",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "setBalance",
"outputs": [],
"payable": false,
"type": "function"
}
]
}

View File

@@ -1,287 +0,0 @@
{
"contract_name": "EtherToken",
"abi": [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "amount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "deposit",
"outputs": [],
"payable": true,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"payable": true,
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Deposit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Withdrawal",
"type": "event"
}
],
"networks": {
"1": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
"3": {
"address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a"
},
"4": {
"address": "0xc778417e063141139fce010982780140aa0cd5ab"
},
"42": {
"address": "0x653e49e301e508a13237c0ddc98ae7d4cd2667a1"
},
"50": {
"address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c"
}
}
}

View File

@@ -1,610 +0,0 @@
{
"contract_name": "Exchange",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "numerator",
"type": "uint256"
},
{
"name": "denominator",
"type": "uint256"
},
{
"name": "target",
"type": "uint256"
}
],
"name": "isRoundingError",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "filled",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "cancelled",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5][]"
},
{
"name": "orderValues",
"type": "uint256[6][]"
},
{
"name": "fillTakerTokenAmount",
"type": "uint256"
},
{
"name": "shouldThrowOnInsufficientBalanceOrAllowance",
"type": "bool"
},
{
"name": "v",
"type": "uint8[]"
},
{
"name": "r",
"type": "bytes32[]"
},
{
"name": "s",
"type": "bytes32[]"
}
],
"name": "fillOrdersUpTo",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5]"
},
{
"name": "orderValues",
"type": "uint256[6]"
},
{
"name": "cancelTakerTokenAmount",
"type": "uint256"
}
],
"name": "cancelOrder",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ZRX_TOKEN_CONTRACT",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5][]"
},
{
"name": "orderValues",
"type": "uint256[6][]"
},
{
"name": "fillTakerTokenAmounts",
"type": "uint256[]"
},
{
"name": "v",
"type": "uint8[]"
},
{
"name": "r",
"type": "bytes32[]"
},
{
"name": "s",
"type": "bytes32[]"
}
],
"name": "batchFillOrKillOrders",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5]"
},
{
"name": "orderValues",
"type": "uint256[6]"
},
{
"name": "fillTakerTokenAmount",
"type": "uint256"
},
{
"name": "v",
"type": "uint8"
},
{
"name": "r",
"type": "bytes32"
},
{
"name": "s",
"type": "bytes32"
}
],
"name": "fillOrKillOrder",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "orderHash",
"type": "bytes32"
}
],
"name": "getUnavailableTakerTokenAmount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "signer",
"type": "address"
},
{
"name": "hash",
"type": "bytes32"
},
{
"name": "v",
"type": "uint8"
},
{
"name": "r",
"type": "bytes32"
},
{
"name": "s",
"type": "bytes32"
}
],
"name": "isValidSignature",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "numerator",
"type": "uint256"
},
{
"name": "denominator",
"type": "uint256"
},
{
"name": "target",
"type": "uint256"
}
],
"name": "getPartialAmount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "TOKEN_TRANSFER_PROXY_CONTRACT",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5][]"
},
{
"name": "orderValues",
"type": "uint256[6][]"
},
{
"name": "fillTakerTokenAmounts",
"type": "uint256[]"
},
{
"name": "shouldThrowOnInsufficientBalanceOrAllowance",
"type": "bool"
},
{
"name": "v",
"type": "uint8[]"
},
{
"name": "r",
"type": "bytes32[]"
},
{
"name": "s",
"type": "bytes32[]"
}
],
"name": "batchFillOrders",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5][]"
},
{
"name": "orderValues",
"type": "uint256[6][]"
},
{
"name": "cancelTakerTokenAmounts",
"type": "uint256[]"
}
],
"name": "batchCancelOrders",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5]"
},
{
"name": "orderValues",
"type": "uint256[6]"
},
{
"name": "fillTakerTokenAmount",
"type": "uint256"
},
{
"name": "shouldThrowOnInsufficientBalanceOrAllowance",
"type": "bool"
},
{
"name": "v",
"type": "uint8"
},
{
"name": "r",
"type": "bytes32"
},
{
"name": "s",
"type": "bytes32"
}
],
"name": "fillOrder",
"outputs": [
{
"name": "filledTakerTokenAmount",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "orderAddresses",
"type": "address[5]"
},
{
"name": "orderValues",
"type": "uint256[6]"
}
],
"name": "getOrderHash",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "EXTERNAL_QUERY_GAS_LIMIT",
"outputs": [
{
"name": "",
"type": "uint16"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "VERSION",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"type": "function"
},
{
"inputs": [
{
"name": "_zrxToken",
"type": "address"
},
{
"name": "_tokenTransferProxy",
"type": "address"
}
],
"payable": false,
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "maker",
"type": "address"
},
{
"indexed": false,
"name": "taker",
"type": "address"
},
{
"indexed": true,
"name": "feeRecipient",
"type": "address"
},
{
"indexed": false,
"name": "makerToken",
"type": "address"
},
{
"indexed": false,
"name": "takerToken",
"type": "address"
},
{
"indexed": false,
"name": "filledMakerTokenAmount",
"type": "uint256"
},
{
"indexed": false,
"name": "filledTakerTokenAmount",
"type": "uint256"
},
{
"indexed": false,
"name": "paidMakerFee",
"type": "uint256"
},
{
"indexed": false,
"name": "paidTakerFee",
"type": "uint256"
},
{
"indexed": true,
"name": "tokens",
"type": "bytes32"
},
{
"indexed": false,
"name": "orderHash",
"type": "bytes32"
}
],
"name": "LogFill",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "maker",
"type": "address"
},
{
"indexed": true,
"name": "feeRecipient",
"type": "address"
},
{
"indexed": false,
"name": "makerToken",
"type": "address"
},
{
"indexed": false,
"name": "takerToken",
"type": "address"
},
{
"indexed": false,
"name": "cancelledMakerTokenAmount",
"type": "uint256"
},
{
"indexed": false,
"name": "cancelledTakerTokenAmount",
"type": "uint256"
},
{
"indexed": true,
"name": "tokens",
"type": "bytes32"
},
{
"indexed": false,
"name": "orderHash",
"type": "bytes32"
}
],
"name": "LogCancel",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "errorId",
"type": "uint8"
},
{
"indexed": true,
"name": "orderHash",
"type": "bytes32"
}
],
"name": "LogError",
"type": "event"
}
],
"networks": {
"1": {
"address": "0x12459c951127e0c374ff9105dda097662a027093"
},
"3": {
"address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac"
},
"4": {
"address": "0x1d16ef40fac01cec8adac2ac49427b9384192c05"
},
"42": {
"address": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364"
},
"50": {
"address": "0x48bacb9266a570d521063ef5dd96e61686dbe788"
}
}
}

View File

@@ -1,172 +0,0 @@
{
"contract_name": "Token",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "supply",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "balance",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "remaining",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
]
}

View File

@@ -1,547 +0,0 @@
{
"contract_name": "TokenRegistry",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
},
{
"name": "_index",
"type": "uint256"
}
],
"name": "removeToken",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_name",
"type": "string"
}
],
"name": "getTokenAddressByName",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_symbol",
"type": "string"
}
],
"name": "getTokenAddressBySymbol",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
},
{
"name": "_swarmHash",
"type": "bytes"
}
],
"name": "setTokenSwarmHash",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_token",
"type": "address"
}
],
"name": "getTokenMetaData",
"outputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "uint8"
},
{
"name": "",
"type": "bytes"
},
{
"name": "",
"type": "bytes"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
},
{
"name": "_name",
"type": "string"
},
{
"name": "_symbol",
"type": "string"
},
{
"name": "_decimals",
"type": "uint8"
},
{
"name": "_ipfsHash",
"type": "bytes"
},
{
"name": "_swarmHash",
"type": "bytes"
}
],
"name": "addToken",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
},
{
"name": "_name",
"type": "string"
}
],
"name": "setTokenName",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "tokens",
"outputs": [
{
"name": "token",
"type": "address"
},
{
"name": "name",
"type": "string"
},
{
"name": "symbol",
"type": "string"
},
{
"name": "decimals",
"type": "uint8"
},
{
"name": "ipfsHash",
"type": "bytes"
},
{
"name": "swarmHash",
"type": "bytes"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "tokenAddresses",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_name",
"type": "string"
}
],
"name": "getTokenByName",
"outputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "uint8"
},
{
"name": "",
"type": "bytes"
},
{
"name": "",
"type": "bytes"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getTokenAddresses",
"outputs": [
{
"name": "",
"type": "address[]"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
},
{
"name": "_ipfsHash",
"type": "bytes"
}
],
"name": "setTokenIpfsHash",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_symbol",
"type": "string"
}
],
"name": "getTokenBySymbol",
"outputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "uint8"
},
{
"name": "",
"type": "bytes"
},
{
"name": "",
"type": "bytes"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
},
{
"name": "_symbol",
"type": "string"
}
],
"name": "setTokenSymbol",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "token",
"type": "address"
},
{
"indexed": false,
"name": "name",
"type": "string"
},
{
"indexed": false,
"name": "symbol",
"type": "string"
},
{
"indexed": false,
"name": "decimals",
"type": "uint8"
},
{
"indexed": false,
"name": "ipfsHash",
"type": "bytes"
},
{
"indexed": false,
"name": "swarmHash",
"type": "bytes"
}
],
"name": "LogAddToken",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "token",
"type": "address"
},
{
"indexed": false,
"name": "name",
"type": "string"
},
{
"indexed": false,
"name": "symbol",
"type": "string"
},
{
"indexed": false,
"name": "decimals",
"type": "uint8"
},
{
"indexed": false,
"name": "ipfsHash",
"type": "bytes"
},
{
"indexed": false,
"name": "swarmHash",
"type": "bytes"
}
],
"name": "LogRemoveToken",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "token",
"type": "address"
},
{
"indexed": false,
"name": "oldName",
"type": "string"
},
{
"indexed": false,
"name": "newName",
"type": "string"
}
],
"name": "LogTokenNameChange",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "token",
"type": "address"
},
{
"indexed": false,
"name": "oldSymbol",
"type": "string"
},
{
"indexed": false,
"name": "newSymbol",
"type": "string"
}
],
"name": "LogTokenSymbolChange",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "token",
"type": "address"
},
{
"indexed": false,
"name": "oldIpfsHash",
"type": "bytes"
},
{
"indexed": false,
"name": "newIpfsHash",
"type": "bytes"
}
],
"name": "LogTokenIpfsHashChange",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "token",
"type": "address"
},
{
"indexed": false,
"name": "oldSwarmHash",
"type": "bytes"
},
{
"indexed": false,
"name": "newSwarmHash",
"type": "bytes"
}
],
"name": "LogTokenSwarmHashChange",
"type": "event"
}
],
"networks": {
"1": {
"address": "0x926a74c5c36adf004c87399e65f75628b0f98d2c"
},
"3": {
"address": "0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed"
},
"4": {
"address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6"
},
"42": {
"address": "0xf18e504561f4347bea557f3d4558f559dddbae7f"
},
"50": {
"address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082"
}
}
}

View File

@@ -1,187 +0,0 @@
{
"contract_name": "TokenTransferProxy",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
},
{
"name": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "target",
"type": "address"
}
],
"name": "addAuthorizedAddress",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "authorities",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "target",
"type": "address"
}
],
"name": "removeAuthorizedAddress",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "authorized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getAuthorizedAddresses",
"outputs": [
{
"name": "",
"type": "address[]"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressRemoved",
"type": "event"
}
],
"networks": {
"1": {
"address": "0x8da0d80f5007ef1e431dd2127178d224e32c2ef4"
},
"3": {
"address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6"
},
"4": {
"address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d"
},
"42": {
"address": "0x087eed4bc1ee3de49befbd66c662b434b15d49d4"
},
"50": {
"address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48"
}
}
}

View File

@@ -1,20 +0,0 @@
{
"contract_name": "ZRX",
"networks": {
"1": {
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498"
},
"3": {
"address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d"
},
"4": {
"address": "0x00f58d6d585f84b2d7267940cede30ce2fe6eae8"
},
"42": {
"address": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570"
},
"50": {
"address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401"
}
}
}

View File

@@ -1,51 +1,117 @@
export { ZeroEx } from './0x';
export { ContractAddresses } from '@0x/contract-addresses';
export { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils';
export {
ContractWrappers,
ERC20TokenWrapper,
ERC721TokenWrapper,
EtherTokenWrapper,
ExchangeWrapper,
ERC20ProxyWrapper,
ERC721ProxyWrapper,
ForwarderWrapper,
OrderValidatorWrapper,
IndexedFilterValues,
BlockRange,
ContractWrappersConfig,
MethodOpts,
OrderTransactionOpts,
TransactionOpts,
OrderStatus,
OrderInfo,
EventCallback,
DecodedLogEvent,
TransactionEncoder,
BalanceAndAllowance,
OrderAndTraderInfo,
TraderInfo,
ValidateOrderFillableOpts,
} from '@0x/contract-wrappers';
export {
WETH9Events,
WETH9WithdrawalEventArgs,
WETH9ApprovalEventArgs,
WETH9EventArgs,
WETH9DepositEventArgs,
WETH9TransferEventArgs,
ERC20TokenTransferEventArgs,
ERC20TokenApprovalEventArgs,
ERC20TokenEvents,
ERC20TokenEventArgs,
ERC721TokenApprovalEventArgs,
ERC721TokenApprovalForAllEventArgs,
ERC721TokenTransferEventArgs,
ERC721TokenEvents,
ERC721TokenEventArgs,
ExchangeCancelUpToEventArgs,
ExchangeAssetProxyRegisteredEventArgs,
ExchangeSignatureValidatorApprovalEventArgs,
ExchangeFillEventArgs,
ExchangeCancelEventArgs,
ExchangeEventArgs,
ExchangeEvents,
} from '@0x/abi-gen-wrappers';
export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0x/order-watcher';
export import Web3ProviderEngine = require('web3-provider-engine');
export {
RPCSubprovider,
Callback,
JSONRPCRequestPayloadWithMethod,
ErrorCallback,
MetamaskSubprovider,
} from '@0x/subproviders';
export { AbiDecoder } from '@0x/utils';
export { BigNumber } from '@0x/utils';
export {
BlockParamLiteral,
FilterObject,
BlockParam,
ContractEventArg,
ExchangeContractErrs,
LogWithDecodedArgs,
Order,
Provider,
SignedOrder,
ECSignature,
OrderStateValid,
OrderStateInvalid,
OrderState,
Token,
TransactionReceipt,
TransactionReceiptWithDecodedLogs,
} from '@0xproject/types';
AssetProxyId,
AssetData,
ERC20AssetData,
ERC721AssetData,
SignatureType,
OrderRelevantState,
Stats,
} from '@0x/types';
export {
EventCallback,
ContractEvent,
IndexedFilterValues,
BlockRange,
OrderCancellationRequest,
OrderFillRequest,
ContractEventArgs,
MethodOpts,
OrderTransactionOpts,
TransactionOpts,
LogEvent,
DecodedLogEvent,
OnOrderStateChangeCallback,
ContractWrappersError,
EtherTokenContractEventArgs,
WithdrawalContractEventArgs,
DepositContractEventArgs,
EtherTokenEvents,
TransferContractEventArgs,
ApprovalContractEventArgs,
TokenContractEventArgs,
TokenEvents,
LogErrorContractEventArgs,
LogCancelContractEventArgs,
LogFillContractEventArgs,
ExchangeContractEventArgs,
ExchangeEvents,
ContractWrappersConfig,
} from '@0xproject/contract-wrappers';
BlockParamLiteral,
ContractAbi,
BlockParam,
LogWithDecodedArgs,
ContractEventArg,
Provider,
JSONRPCRequestPayload,
JSONRPCResponsePayload,
JSONRPCErrorCallback,
JSONRPCResponseError,
LogEntry,
DecodedLogArgs,
LogEntryEvent,
DecodedLogEntry,
DecodedLogEntryEvent,
RawLog,
AbiDefinition,
FunctionAbi,
EventAbi,
EventParameter,
MethodAbi,
ConstructorAbi,
FallbackAbi,
DataItem,
ConstructorStateMutability,
StateMutability,
} from 'ethereum-types';

View File

@@ -1,8 +0,0 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);

View File

@@ -1,8 +0,0 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd);

View File

@@ -1,5 +0,0 @@
export const zeroExConfigSchema = {
id: '/ZeroExConfig',
oneOf: [{ $ref: '/ZeroExPrivateNetworkConfig' }, { $ref: '/ZeroExPublicNetworkConfig' }],
type: 'object',
};

View File

@@ -1,35 +0,0 @@
export const zeroExPrivateNetworkConfigSchema = {
id: '/ZeroExPrivateNetworkConfig',
properties: {
networkId: {
type: 'number',
minimum: 1,
},
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
tokenRegistryContractAddress: { $ref: '/Address' },
tokenTransferProxyContractAddress: { $ref: '/Address' },
orderWatcherConfig: {
type: 'object',
properties: {
pollingIntervalMs: {
type: 'number',
minimum: 0,
},
numConfirmations: {
type: 'number',
minimum: 0,
},
},
},
},
type: 'object',
required: [
'networkId',
'zrxContractAddress',
'exchangeContractAddress',
'tokenRegistryContractAddress',
'tokenTransferProxyContractAddress',
],
};

View File

@@ -1,43 +0,0 @@
const networkNameToId: { [networkName: string]: number } = {
mainnet: 1,
ropsten: 3,
rinkeby: 4,
kovan: 42,
ganache: 50,
};
export const zeroExPublicNetworkConfigSchema = {
id: '/ZeroExPublicNetworkConfig',
properties: {
networkId: {
type: 'number',
enum: [
networkNameToId.mainnet,
networkNameToId.ropsten,
networkNameToId.rinkeby,
networkNameToId.kovan,
networkNameToId.ganache,
],
},
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
tokenRegistryContractAddress: { $ref: '/Address' },
tokenTransferProxyContractAddress: { $ref: '/Address' },
orderWatcherConfig: {
type: 'object',
properties: {
pollingIntervalMs: {
type: 'number',
minimum: 0,
},
numConfirmations: {
type: 'number',
minimum: 0,
},
},
},
},
type: 'object',
required: ['networkId'],
};

View File

@@ -1,7 +0,0 @@
export enum InternalZeroExError {
NoAbiDecoder = 'NO_ABI_DECODER',
ZrxNotInTokenRegistry = 'ZRX_NOT_IN_TOKEN_REGISTRY',
WethNotInTokenRegistry = 'WETH_NOT_IN_TOKEN_REGISTRY',
}
// tslint:disable:max-file-line-count

View File

@@ -1,4 +0,0 @@
export const constants = {
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
TESTRPC_NETWORK_ID: 50,
};

View File

@@ -1,166 +0,0 @@
import { ContractWrappers } from '@0xproject/contract-wrappers';
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import * as _ from 'lodash';
import 'make-promises-safe';
import 'mocha';
import { ApprovalContractEventArgs, LogWithDecodedArgs, TokenEvents, ZeroEx } from '../src';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
import { TokenUtils } from './utils/token_utils';
import { provider, web3Wrapper } from './utils/web3_wrapper';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
chaiSetup.configure();
const expect = chai.expect;
describe('ZeroEx library', () => {
let zeroEx: ZeroEx;
before(async () => {
const config = {
networkId: constants.TESTRPC_NETWORK_ID,
};
zeroEx = new ZeroEx(provider, config);
});
describe('#setProvider', () => {
it('overrides provider in nested web3s and invalidates contractInstances', async () => {
// Instantiate the contract instances with the current provider
await (zeroEx.exchange as any)._getExchangeContractAsync();
await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.not.be.undefined();
expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.not.be.undefined();
// Add property to newProvider so that we can differentiate it from old provider
(provider as any).zeroExTestId = 1;
zeroEx.setProvider(provider, constants.TESTRPC_NETWORK_ID);
// Check that contractInstances with old provider are removed after provider update
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.be.undefined();
expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.be.undefined();
// Check that all nested zeroExContract/web3Wrapper instances return the updated provider
const nestedWeb3WrapperProvider = ((zeroEx as any)._contractWrappers as ContractWrappers).getProvider();
expect((nestedWeb3WrapperProvider as any).zeroExTestId).to.be.a('number');
const exchangeWeb3WrapperProvider = (zeroEx.exchange as any)._web3Wrapper.getProvider();
expect(exchangeWeb3WrapperProvider.zeroExTestId).to.be.a('number');
const tokenRegistryWeb3WrapperProvider = (zeroEx.tokenRegistry as any)._web3Wrapper.getProvider();
expect(tokenRegistryWeb3WrapperProvider.zeroExTestId).to.be.a('number');
});
});
describe('#isValidSignature', () => {
// The Exchange smart contract `isValidSignature` method only validates orderHashes and assumes
// the length of the data is exactly 32 bytes. Thus for these tests, we use data of this size.
const dataHex = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0';
const signature = {
v: 27,
r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
};
const address = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
it("should return false if the data doesn't pertain to the signature & address", async () => {
return expect(
(zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync('0x0', signature, address),
).to.become(false);
});
it("should return false if the address doesn't pertain to the signature & data", async () => {
const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42';
return expect(
(zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(
dataHex,
signature,
validUnrelatedAddress,
),
).to.become(false);
});
it("should return false if the signature doesn't pertain to the dataHex & address", async () => {
const wrongSignature = _.assign({}, signature, { v: 28 });
return expect(
(zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, wrongSignature, address),
).to.become(false);
});
it('should return true if the signature does pertain to the dataHex & address', async () => {
return expect(
(zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, signature, address),
).to.become(true);
});
});
describe('#toUnitAmount', () => {
it('should throw if invalid baseUnit amount supplied as argument', () => {
const invalidBaseUnitAmount = new BigNumber(1000000000.4);
const decimals = 6;
expect(() => ZeroEx.toUnitAmount(invalidBaseUnitAmount, decimals)).to.throw(
'amount should be in baseUnits (no decimals), found value: 1000000000.4',
);
});
it('Should return the expected unit amount for the decimals passed in', () => {
const baseUnitAmount = new BigNumber(1000000000);
const decimals = 6;
const unitAmount = ZeroEx.toUnitAmount(baseUnitAmount, decimals);
const expectedUnitAmount = new BigNumber(1000);
expect(unitAmount).to.be.bignumber.equal(expectedUnitAmount);
});
});
describe('#toBaseUnitAmount', () => {
it('Should return the expected base unit amount for the decimals passed in', () => {
const unitAmount = new BigNumber(1000);
const decimals = 6;
const baseUnitAmount = ZeroEx.toBaseUnitAmount(unitAmount, decimals);
const expectedUnitAmount = new BigNumber(1000000000);
expect(baseUnitAmount).to.be.bignumber.equal(expectedUnitAmount);
});
it('should throw if unitAmount has more decimals then specified as the max decimal precision', () => {
const unitAmount = new BigNumber(0.823091);
const decimals = 5;
expect(() => ZeroEx.toBaseUnitAmount(unitAmount, decimals)).to.throw(
'Invalid unit amount: 0.823091 - Too many decimal places',
);
});
});
describe('#awaitTransactionMinedAsync', () => {
beforeEach(async () => {
await blockchainLifecycle.startAsync();
});
afterEach(async () => {
await blockchainLifecycle.revertAsync();
});
it('returns transaction receipt with decoded logs', async () => {
const availableAddresses = await zeroEx.getAvailableAddressesAsync();
const coinbase = availableAddresses[0];
const tokens = await zeroEx.tokenRegistry.getTokensAsync();
const tokenUtils = new TokenUtils(tokens);
const zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address;
const proxyAddress = zeroEx.proxy.getContractAddress();
const txHash = await zeroEx.token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase);
const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash);
// tslint:disable-next-line:no-unnecessary-type-assertion
const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ApprovalContractEventArgs>;
expect(log.event).to.be.equal(TokenEvents.Approval);
expect(log.args._owner).to.be.equal(coinbase);
expect(log.args._spender).to.be.equal(proxyAddress);
expect(log.args._value).to.be.bignumber.equal(zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);
});
});
describe('#config', () => {
it('allows to specify exchange contract address', async () => {
const zeroExConfig = {
exchangeContractAddress: ZeroEx.NULL_ADDRESS,
networkId: constants.TESTRPC_NETWORK_ID,
};
const zeroExWithWrongExchangeAddress = new ZeroEx(provider, zeroExConfig);
expect(zeroExWithWrongExchangeAddress.exchange.getContractAddress()).to.be.equal(ZeroEx.NULL_ADDRESS);
});
it('allows to specify token registry token contract address', async () => {
const zeroExConfig = {
tokenRegistryContractAddress: ZeroEx.NULL_ADDRESS,
networkId: constants.TESTRPC_NETWORK_ID,
};
const zeroExWithWrongTokenRegistryAddress = new ZeroEx(provider, zeroExConfig);
expect(zeroExWithWrongTokenRegistryAddress.tokenRegistry.getContractAddress()).to.be.equal(
ZeroEx.NULL_ADDRESS,
);
});
});
});

View File

@@ -1,49 +0,0 @@
import { web3Factory } from '@0xproject/dev-utils';
import 'make-promises-safe';
import { ZeroEx } from '../src';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
chaiSetup.configure();
// Those tests are slower cause they're talking to a remote node
const TIMEOUT = 10000;
describe('Artifacts', () => {
describe('contracts are deployed on kovan', () => {
const kovanRpcUrl = constants.KOVAN_RPC_URL;
const provider = web3Factory.getRpcProvider({ rpcUrl: kovanRpcUrl });
const config = {
networkId: constants.KOVAN_NETWORK_ID,
};
const zeroEx = new ZeroEx(provider, config);
it('token registry contract is deployed', async () => {
await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
}).timeout(TIMEOUT);
it('proxy contract is deployed', async () => {
await (zeroEx.proxy as any)._getTokenTransferProxyContractAsync();
}).timeout(TIMEOUT);
it('exchange contract is deployed', async () => {
await (zeroEx.exchange as any)._getExchangeContractAsync();
}).timeout(TIMEOUT);
});
describe('contracts are deployed on ropsten', () => {
const ropstenRpcUrl = constants.ROPSTEN_RPC_URL;
const provider = web3Factory.getRpcProvider({ rpcUrl: ropstenRpcUrl });
const config = {
networkId: constants.ROPSTEN_NETWORK_ID,
};
const zeroEx = new ZeroEx(provider, config);
it('token registry contract is deployed', async () => {
await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
}).timeout(TIMEOUT);
it('proxy contract is deployed', async () => {
await (zeroEx.proxy as any)._getTokenTransferProxyContractAsync();
}).timeout(TIMEOUT);
it('exchange contract is deployed', async () => {
await (zeroEx.exchange as any)._getExchangeContractAsync();
}).timeout(TIMEOUT);
});
});

View File

@@ -1,17 +0,0 @@
import { devConstants } from '@0xproject/dev-utils';
import { runV1MigrationsAsync } from '@0xproject/migrations';
import { provider } from './utils/web3_wrapper';
before('migrate contracts', async function(): Promise<void> {
// HACK: Since the migrations take longer then our global mocha timeout limit
// we manually increase it for this before hook.
const mochaTestTimeoutMs = 20000;
this.timeout(mochaTestTimeoutMs);
const txDefaults = {
gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS,
};
const artifactsDir = `../migrations/artifacts/1.0.0`;
await runV1MigrationsAsync(provider, artifactsDir, txDefaults);
});

View File

@@ -1,9 +0,0 @@
export const constants = {
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
ROPSTEN_NETWORK_ID: 3,
KOVAN_NETWORK_ID: 42,
TESTRPC_NETWORK_ID: 50,
KOVAN_RPC_URL: 'https://kovan.infura.io/',
ROPSTEN_RPC_URL: 'https://ropsten.infura.io/',
ZRX_DECIMALS: 18,
};

View File

@@ -1,34 +0,0 @@
import { Token } from '@0xproject/types';
import * as _ from 'lodash';
import { InternalZeroExError } from '../../src/types';
const PROTOCOL_TOKEN_SYMBOL = 'ZRX';
const WETH_TOKEN_SYMBOL = 'WETH';
export class TokenUtils {
private _tokens: Token[];
constructor(tokens: Token[]) {
this._tokens = tokens;
}
public getProtocolTokenOrThrow(): Token {
const zrxToken = _.find(this._tokens, { symbol: PROTOCOL_TOKEN_SYMBOL });
if (_.isUndefined(zrxToken)) {
throw new Error(InternalZeroExError.ZrxNotInTokenRegistry);
}
return zrxToken;
}
public getWethTokenOrThrow(): Token {
const wethToken = _.find(this._tokens, { symbol: WETH_TOKEN_SYMBOL });
if (_.isUndefined(wethToken)) {
throw new Error(InternalZeroExError.WethNotInTokenRegistry);
}
return wethToken;
}
public getDummyTokens(): Token[] {
const dummyTokens = _.filter(this._tokens, token => {
return !_.includes([PROTOCOL_TOKEN_SYMBOL, WETH_TOKEN_SYMBOL], token.symbol);
});
return dummyTokens;
}
}

View File

@@ -1,8 +0,0 @@
import { web3Factory } from '@0xproject/dev-utils';
import { Provider } from '@0xproject/types';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true });
const web3Wrapper = new Web3Wrapper(provider);
export { provider, web3Wrapper };

View File

@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib",
"rootDir": "src"
},
"include": ["./src/**/*", "./test/**/*"]
"include": ["./src/**/*"]
}

View File

@@ -1,3 +1,3 @@
{
"extends": ["@0xproject/tslint-config"]
"extends": ["@0x/tslint-config"]
}

View File

@@ -0,0 +1,7 @@
{
"extends": "../../typedoc-tsconfig",
"compilerOptions": {
"outDir": "lib"
},
"include": ["./src/**/*"]
}

View File

@@ -2,7 +2,7 @@
* This is to generate the umd bundle only
*/
const _ = require('lodash');
const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');
const path = require('path');
const production = process.env.NODE_ENV === 'production';
@@ -15,6 +15,7 @@ if (production) {
module.exports = {
entry,
mode: 'production',
output: {
path: path.resolve(__dirname, '_bundles'),
filename: '[name].js',
@@ -26,13 +27,18 @@ module.exports = {
extensions: ['.ts', '.js', '.json'],
},
devtool: 'source-map',
plugins: [
new webpack.optimize.UglifyJsPlugin({
minimize: true,
sourceMap: true,
include: /\.min\.js$/,
}),
],
optimization: {
minimizer: [
new TerserPlugin({
sourceMap: true,
terserOptions: {
mangle: {
reserved: ['BigNumber'],
},
},
}),
],
},
module: {
rules: [
{
@@ -40,17 +46,18 @@ module.exports = {
use: [
{
loader: 'awesome-typescript-loader',
// tsconfig.json contains some options required for
// project references which do not work with webback.
// We override those options here.
query: {
declaration: false,
declarationMap: false,
composite: false,
},
},
],
exclude: /node_modules/,
},
{
test: /\.json$/,
loader: 'json-loader',
},
],
},
};

View File

@@ -0,0 +1,67 @@
[
{
"version": "1.1.0",
"changes": [
{
"note":
"`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface",
"pr": 1298
}
],
"timestamp": 1542821676
},
{
"timestamp": 1542208198,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542134075,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542028948,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1541740904
},
{
"timestamp": 1539871071,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.0",
"changes": [
{
"pr": 1105,
"note": "Initial release"
}
]
}
]

View File

@@ -0,0 +1,34 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.1.0 - _November 21, 2018_
* `deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface (#1298)
## v1.0.5 - _November 14, 2018_
* Dependencies updated
## v1.0.4 - _November 13, 2018_
* Dependencies updated
## v1.0.3 - _November 12, 2018_
* Dependencies updated
## v1.0.2 - _November 9, 2018_
* Dependencies updated
## v1.0.1 - _October 18, 2018_
* Dependencies updated
## v1.0.0 - _Invalid date_
* Initial release (#1105)

View File

@@ -0,0 +1,73 @@
## @0x/abi-gen-wrappers
Low-level 0x smart contract wrappers generated using @0x/abi-gen. These
low-level wrappers are imported by other packages in the 0x monorepo and
application developers are not expected to import this package directly.
You may also be interested in the
[@0x/contract-wrappers](../contract-wrappers/README.md) package which
includes some higher-level features.
## Installation
```bash
yarn add @0x/abi-gen-wrappers
```
**Import**
```typescript
import * as wrappers from '@0x/abi-gen-wrappers';
```
or
```javascript
var wrappers = require('@0x/abi-gen-wrappers');
```
## Contributing
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
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/abi-gen-wrappers yarn build
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

@@ -0,0 +1,49 @@
{
"name": "@0x/abi-gen-wrappers",
"version": "1.1.0",
"engines": {
"node": ">=6.12"
},
"description": "Low-level 0x smart contract wrappers generated using @0x/abi-gen",
"main": "lib/src/index.js",
"directories": {
"test": "test"
},
"scripts": {
"build": "yarn pre_build && tsc -b",
"build:ci": "yarn build",
"lint": "tslint --format stylish --project .",
"pre_build": "yarn generate_contract_wrappers",
"clean": "shx rm -rf lib wrappers",
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers"
},
"config": {
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|OrderValidator|WETH9|ZRXToken).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/packages/abi-gen-wrappers/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.17",
"@0x/tslint-config": "^1.0.10",
"@0x/types": "^1.3.0",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.5",
"ethereum-types": "^1.1.2",
"ethers": "~4.0.4",
"lodash": "^4.17.5",
"shx": "^0.2.2"
},
"dependencies": {
"@0x/base-contract": "^3.0.7"
},
"publishConfig": {
"access": "public"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,650 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
export type ERC20ProxyEventArgs =
| ERC20ProxyAuthorizedAddressAddedEventArgs
| ERC20ProxyAuthorizedAddressRemovedEventArgs;
export enum ERC20ProxyEvents {
AuthorizedAddressAdded = 'AuthorizedAddressAdded',
AuthorizedAddressRemoved = 'AuthorizedAddressRemoved',
}
export interface ERC20ProxyAuthorizedAddressAddedEventArgs extends DecodedLogArgs {
target: string;
caller: string;
}
export interface ERC20ProxyAuthorizedAddressRemovedEventArgs extends DecodedLogArgs {
target: string;
caller: string;
}
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class ERC20ProxyContract extends BaseContract {
public addAuthorizedAddress = {
async sendTransactionAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('addAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const encodedData = self._lookupEthersInterface('addAuthorizedAddress(address)').functions.addAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.addAuthorizedAddress.estimateGasAsync.bind(
self,
target
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('addAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('addAuthorizedAddress(address)').functions.addAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
target: string,
): string {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('addAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('addAuthorizedAddress(address)').functions.addAuthorizedAddress.encode([target
]);
return abiEncodedTransactionData;
},
async callAsync(
target: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'addAuthorizedAddress(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.addAuthorizedAddress;
const encodedData = ethersFunction.encode([target
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'addAuthorizedAddress'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public authorities = {
async callAsync(
index_0: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'authorities(uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.authorities;
const encodedData = ethersFunction.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'authorities'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public removeAuthorizedAddress = {
async sendTransactionAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddress(address)').functions.removeAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.removeAuthorizedAddress.estimateGasAsync.bind(
self,
target
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddress(address)').functions.removeAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
target: string,
): string {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('removeAuthorizedAddress(address)').functions.removeAuthorizedAddress.encode([target
]);
return abiEncodedTransactionData;
},
async callAsync(
target: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'removeAuthorizedAddress(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.removeAuthorizedAddress;
const encodedData = ethersFunction.encode([target
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'removeAuthorizedAddress'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public owner = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'owner()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.owner;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'owner'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public removeAuthorizedAddressAtIndex = {
async sendTransactionAsync(
target: string,
index: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddressAtIndex(address,uint256)').inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target,
index
]);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddressAtIndex(address,uint256)').functions.removeAuthorizedAddressAtIndex.encode([target,
index
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.removeAuthorizedAddressAtIndex.estimateGasAsync.bind(
self,
target,
index
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
target: string,
index: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddressAtIndex(address,uint256)').inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddressAtIndex(address,uint256)').functions.removeAuthorizedAddressAtIndex.encode([target,
index
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
target: string,
index: BigNumber,
): string {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddressAtIndex(address,uint256)').inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('removeAuthorizedAddressAtIndex(address,uint256)').functions.removeAuthorizedAddressAtIndex.encode([target,
index
]);
return abiEncodedTransactionData;
},
async callAsync(
target: string,
index: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'removeAuthorizedAddressAtIndex(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target,
index
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.removeAuthorizedAddressAtIndex;
const encodedData = ethersFunction.encode([target,
index
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'removeAuthorizedAddressAtIndex'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public getProxyId = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'getProxyId()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getProxyId;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getProxyId'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public authorized = {
async callAsync(
index_0: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'authorized(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.authorized;
const encodedData = ethersFunction.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'authorized'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public getAuthorizedAddresses = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string[]
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'getAuthorizedAddresses()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getAuthorizedAddresses;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getAuthorizedAddresses'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transferOwnership = {
async sendTransactionAsync(
newOwner: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
]);
const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transferOwnership.estimateGasAsync.bind(
self,
newOwner
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
newOwner: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
newOwner: string,
): string {
const self = this as any as ERC20ProxyContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
return abiEncodedTransactionData;
},
async callAsync(
newOwner: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'transferOwnership(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferOwnership;
const encodedData = ethersFunction.encode([newOwner
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transferOwnership'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20ProxyContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return ERC20ProxyContract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20ProxyContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`ERC20Proxy successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ERC20ProxyContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('ERC20Proxy', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,557 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
export type ERC20TokenEventArgs =
| ERC20TokenTransferEventArgs
| ERC20TokenApprovalEventArgs;
export enum ERC20TokenEvents {
Transfer = 'Transfer',
Approval = 'Approval',
}
export interface ERC20TokenTransferEventArgs extends DecodedLogArgs {
_from: string;
_to: string;
_value: BigNumber;
}
export interface ERC20TokenApprovalEventArgs extends DecodedLogArgs {
_owner: string;
_spender: string;
_value: BigNumber;
}
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class ERC20TokenContract extends BaseContract {
public approve = {
async sendTransactionAsync(
_spender: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_spender,
_value
]);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_spender,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.approve.estimateGasAsync.bind(
self,
_spender,
_value
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_spender: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_spender,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_spender: string,
_value: BigNumber,
): string {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_spender,
_value
]);
return abiEncodedTransactionData;
},
async callAsync(
_spender: string,
_value: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'approve(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_spender,
_value
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.approve;
const encodedData = ethersFunction.encode([_spender,
_value
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'approve'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public totalSupply = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'totalSupply()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.totalSupply;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'totalSupply'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transferFrom = {
async sendTransactionAsync(
_from: string,
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_value
]);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transferFrom.estimateGasAsync.bind(
self,
_from,
_to,
_value
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_from: string,
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_from: string,
_to: string,
_value: BigNumber,
): string {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_value
]);
return abiEncodedTransactionData;
},
async callAsync(
_from: string,
_to: string,
_value: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_value
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferFrom;
const encodedData = ethersFunction.encode([_from,
_to,
_value
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transferFrom'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public balanceOf = {
async callAsync(
_owner: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'balanceOf(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_owner
] = BaseContract._formatABIDataItemList(inputAbi, [_owner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_owner
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.balanceOf;
const encodedData = ethersFunction.encode([_owner
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'balanceOf'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transfer = {
async sendTransactionAsync(
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_to,
_value
]);
const encodedData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transfer.estimateGasAsync.bind(
self,
_to,
_value
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_to: string,
_value: BigNumber,
): string {
const self = this as any as ERC20TokenContract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([_to,
_value
]);
return abiEncodedTransactionData;
},
async callAsync(
_to: string,
_value: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'transfer(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_to,
_value
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transfer;
const encodedData = ethersFunction.encode([_to,
_value
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transfer'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public allowance = {
async callAsync(
_owner: string,
_spender: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'allowance(address,address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_owner,
_spender
] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
_spender
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_owner,
_spender
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.allowance;
const encodedData = ethersFunction.encode([_owner,
_spender
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'allowance'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20TokenContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return ERC20TokenContract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20TokenContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`ERC20Token successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ERC20TokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('ERC20Token', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,650 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
export type ERC721ProxyEventArgs =
| ERC721ProxyAuthorizedAddressAddedEventArgs
| ERC721ProxyAuthorizedAddressRemovedEventArgs;
export enum ERC721ProxyEvents {
AuthorizedAddressAdded = 'AuthorizedAddressAdded',
AuthorizedAddressRemoved = 'AuthorizedAddressRemoved',
}
export interface ERC721ProxyAuthorizedAddressAddedEventArgs extends DecodedLogArgs {
target: string;
caller: string;
}
export interface ERC721ProxyAuthorizedAddressRemovedEventArgs extends DecodedLogArgs {
target: string;
caller: string;
}
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class ERC721ProxyContract extends BaseContract {
public addAuthorizedAddress = {
async sendTransactionAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('addAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const encodedData = self._lookupEthersInterface('addAuthorizedAddress(address)').functions.addAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.addAuthorizedAddress.estimateGasAsync.bind(
self,
target
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('addAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('addAuthorizedAddress(address)').functions.addAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
target: string,
): string {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('addAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('addAuthorizedAddress(address)').functions.addAuthorizedAddress.encode([target
]);
return abiEncodedTransactionData;
},
async callAsync(
target: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'addAuthorizedAddress(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.addAuthorizedAddress;
const encodedData = ethersFunction.encode([target
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'addAuthorizedAddress'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public authorities = {
async callAsync(
index_0: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'authorities(uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.authorities;
const encodedData = ethersFunction.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'authorities'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public removeAuthorizedAddress = {
async sendTransactionAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddress(address)').functions.removeAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.removeAuthorizedAddress.estimateGasAsync.bind(
self,
target
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
target: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddress(address)').functions.removeAuthorizedAddress.encode([target
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
target: string,
): string {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddress(address)').inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('removeAuthorizedAddress(address)').functions.removeAuthorizedAddress.encode([target
]);
return abiEncodedTransactionData;
},
async callAsync(
target: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'removeAuthorizedAddress(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target
] = BaseContract._formatABIDataItemList(inputAbi, [target
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.removeAuthorizedAddress;
const encodedData = ethersFunction.encode([target
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'removeAuthorizedAddress'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public owner = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'owner()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.owner;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'owner'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public removeAuthorizedAddressAtIndex = {
async sendTransactionAsync(
target: string,
index: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddressAtIndex(address,uint256)').inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target,
index
]);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddressAtIndex(address,uint256)').functions.removeAuthorizedAddressAtIndex.encode([target,
index
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.removeAuthorizedAddressAtIndex.estimateGasAsync.bind(
self,
target,
index
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
target: string,
index: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddressAtIndex(address,uint256)').inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('removeAuthorizedAddressAtIndex(address,uint256)').functions.removeAuthorizedAddressAtIndex.encode([target,
index
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
target: string,
index: BigNumber,
): string {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('removeAuthorizedAddressAtIndex(address,uint256)').inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('removeAuthorizedAddressAtIndex(address,uint256)').functions.removeAuthorizedAddressAtIndex.encode([target,
index
]);
return abiEncodedTransactionData;
},
async callAsync(
target: string,
index: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'removeAuthorizedAddressAtIndex(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target,
index
] = BaseContract._formatABIDataItemList(inputAbi, [target,
index
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target,
index
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.removeAuthorizedAddressAtIndex;
const encodedData = ethersFunction.encode([target,
index
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'removeAuthorizedAddressAtIndex'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public getProxyId = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'getProxyId()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getProxyId;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getProxyId'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public authorized = {
async callAsync(
index_0: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'authorized(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.authorized;
const encodedData = ethersFunction.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'authorized'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public getAuthorizedAddresses = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string[]
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'getAuthorizedAddresses()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getAuthorizedAddresses;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getAuthorizedAddresses'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transferOwnership = {
async sendTransactionAsync(
newOwner: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
]);
const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transferOwnership.estimateGasAsync.bind(
self,
newOwner
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
newOwner: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
newOwner: string,
): string {
const self = this as any as ERC721ProxyContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
return abiEncodedTransactionData;
},
async callAsync(
newOwner: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'transferOwnership(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferOwnership;
const encodedData = ethersFunction.encode([newOwner
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transferOwnership'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721ProxyContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return ERC721ProxyContract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721ProxyContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`ERC721Proxy successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ERC721ProxyContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('ERC721Proxy', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,894 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
export type ERC721TokenEventArgs =
| ERC721TokenTransferEventArgs
| ERC721TokenApprovalEventArgs
| ERC721TokenApprovalForAllEventArgs;
export enum ERC721TokenEvents {
Transfer = 'Transfer',
Approval = 'Approval',
ApprovalForAll = 'ApprovalForAll',
}
export interface ERC721TokenTransferEventArgs extends DecodedLogArgs {
_from: string;
_to: string;
_tokenId: BigNumber;
}
export interface ERC721TokenApprovalEventArgs extends DecodedLogArgs {
_owner: string;
_approved: string;
_tokenId: BigNumber;
}
export interface ERC721TokenApprovalForAllEventArgs extends DecodedLogArgs {
_owner: string;
_operator: string;
_approved: boolean;
}
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class ERC721TokenContract extends BaseContract {
public getApproved = {
async callAsync(
_tokenId: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'getApproved(uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_tokenId
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getApproved;
const encodedData = ethersFunction.encode([_tokenId
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getApproved'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public approve = {
async sendTransactionAsync(
_approved: string,
_tokenId: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_approved,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_approved,
_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_approved,
_tokenId
]);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_approved,
_tokenId
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.approve.estimateGasAsync.bind(
self,
_approved,
_tokenId
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_approved: string,
_tokenId: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_approved,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_approved,
_tokenId
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_approved,
_tokenId
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_approved: string,
_tokenId: BigNumber,
): string {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_approved,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_approved,
_tokenId
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_approved,
_tokenId
]);
return abiEncodedTransactionData;
},
async callAsync(
_approved: string,
_tokenId: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'approve(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_approved,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_approved,
_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_approved,
_tokenId
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.approve;
const encodedData = ethersFunction.encode([_approved,
_tokenId
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'approve'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public transferFrom = {
async sendTransactionAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_tokenId
]);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_tokenId
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transferFrom.estimateGasAsync.bind(
self,
_from,
_to,
_tokenId
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_tokenId
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_from: string,
_to: string,
_tokenId: BigNumber,
): string {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_tokenId
]);
return abiEncodedTransactionData;
},
async callAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_tokenId
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferFrom;
const encodedData = ethersFunction.encode([_from,
_to,
_tokenId
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transferFrom'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public safeTransferFrom1 = {
async sendTransactionAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('safeTransferFrom(address,address,uint256)').inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_tokenId
]);
const encodedData = self._lookupEthersInterface('safeTransferFrom(address,address,uint256)').functions.safeTransferFrom.encode([_from,
_to,
_tokenId
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.safeTransferFrom1.estimateGasAsync.bind(
self,
_from,
_to,
_tokenId
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('safeTransferFrom(address,address,uint256)').inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('safeTransferFrom(address,address,uint256)').functions.safeTransferFrom.encode([_from,
_to,
_tokenId
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_from: string,
_to: string,
_tokenId: BigNumber,
): string {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('safeTransferFrom(address,address,uint256)').inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('safeTransferFrom(address,address,uint256)').functions.safeTransferFrom.encode([_from,
_to,
_tokenId
]);
return abiEncodedTransactionData;
},
async callAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'safeTransferFrom(address,address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_from,
_to,
_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_tokenId
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.safeTransferFrom;
const encodedData = ethersFunction.encode([_from,
_to,
_tokenId
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'safeTransferFrom'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public ownerOf = {
async callAsync(
_tokenId: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'ownerOf(uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [_tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_tokenId
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.ownerOf;
const encodedData = ethersFunction.encode([_tokenId
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'ownerOf'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public balanceOf = {
async callAsync(
_owner: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'balanceOf(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_owner
] = BaseContract._formatABIDataItemList(inputAbi, [_owner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_owner
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.balanceOf;
const encodedData = ethersFunction.encode([_owner
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'balanceOf'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public setApprovalForAll = {
async sendTransactionAsync(
_operator: string,
_approved: boolean,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('setApprovalForAll(address,bool)').inputs;
[_operator,
_approved
] = BaseContract._formatABIDataItemList(inputAbi, [_operator,
_approved
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_operator,
_approved
]);
const encodedData = self._lookupEthersInterface('setApprovalForAll(address,bool)').functions.setApprovalForAll.encode([_operator,
_approved
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.setApprovalForAll.estimateGasAsync.bind(
self,
_operator,
_approved
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_operator: string,
_approved: boolean,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('setApprovalForAll(address,bool)').inputs;
[_operator,
_approved
] = BaseContract._formatABIDataItemList(inputAbi, [_operator,
_approved
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('setApprovalForAll(address,bool)').functions.setApprovalForAll.encode([_operator,
_approved
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_operator: string,
_approved: boolean,
): string {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('setApprovalForAll(address,bool)').inputs;
[_operator,
_approved
] = BaseContract._formatABIDataItemList(inputAbi, [_operator,
_approved
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('setApprovalForAll(address,bool)').functions.setApprovalForAll.encode([_operator,
_approved
]);
return abiEncodedTransactionData;
},
async callAsync(
_operator: string,
_approved: boolean,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'setApprovalForAll(address,bool)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_operator,
_approved
] = BaseContract._formatABIDataItemList(inputAbi, [_operator,
_approved
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_operator,
_approved
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.setApprovalForAll;
const encodedData = ethersFunction.encode([_operator,
_approved
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'setApprovalForAll'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public safeTransferFrom2 = {
async sendTransactionAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
_data: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('safeTransferFrom(address,address,uint256,bytes)').inputs;
[_from,
_to,
_tokenId,
_data
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId,
_data
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_tokenId,
_data
]);
const encodedData = self._lookupEthersInterface('safeTransferFrom(address,address,uint256,bytes)').functions.safeTransferFrom.encode([_from,
_to,
_tokenId,
_data
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.safeTransferFrom2.estimateGasAsync.bind(
self,
_from,
_to,
_tokenId,
_data
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
_data: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('safeTransferFrom(address,address,uint256,bytes)').inputs;
[_from,
_to,
_tokenId,
_data
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId,
_data
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('safeTransferFrom(address,address,uint256,bytes)').functions.safeTransferFrom.encode([_from,
_to,
_tokenId,
_data
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_from: string,
_to: string,
_tokenId: BigNumber,
_data: string,
): string {
const self = this as any as ERC721TokenContract;
const inputAbi = self._lookupAbi('safeTransferFrom(address,address,uint256,bytes)').inputs;
[_from,
_to,
_tokenId,
_data
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId,
_data
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('safeTransferFrom(address,address,uint256,bytes)').functions.safeTransferFrom.encode([_from,
_to,
_tokenId,
_data
]);
return abiEncodedTransactionData;
},
async callAsync(
_from: string,
_to: string,
_tokenId: BigNumber,
_data: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'safeTransferFrom(address,address,uint256,bytes)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_from,
_to,
_tokenId,
_data
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_tokenId,
_data
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_tokenId,
_data
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.safeTransferFrom;
const encodedData = ethersFunction.encode([_from,
_to,
_tokenId,
_data
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'safeTransferFrom'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public isApprovedForAll = {
async callAsync(
_owner: string,
_operator: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'isApprovedForAll(address,address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_owner,
_operator
] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
_operator
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_owner,
_operator
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.isApprovedForAll;
const encodedData = ethersFunction.encode([_owner,
_operator
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'isApprovedForAll'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721TokenContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return ERC721TokenContract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721TokenContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`ERC721Token successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ERC721TokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('ERC721Token', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,731 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class ForwarderContract extends BaseContract {
public marketBuyOrdersWithEth = {
async sendTransactionAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
makerAssetFillAmount: BigNumber,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
txData: Partial<TxDataPayable> = {},
): Promise<string> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('marketBuyOrdersWithEth(tuple[],uint256,bytes[],tuple[],bytes[],uint256,address)').inputs;
[orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const encodedData = self._lookupEthersInterface('marketBuyOrdersWithEth(tuple[],uint256,bytes[],tuple[],bytes[],uint256,address)').functions.marketBuyOrdersWithEth.encode([orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.marketBuyOrdersWithEth.estimateGasAsync.bind(
self,
orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
makerAssetFillAmount: BigNumber,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('marketBuyOrdersWithEth(tuple[],uint256,bytes[],tuple[],bytes[],uint256,address)').inputs;
[orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('marketBuyOrdersWithEth(tuple[],uint256,bytes[],tuple[],bytes[],uint256,address)').functions.marketBuyOrdersWithEth.encode([orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
makerAssetFillAmount: BigNumber,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
): string {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('marketBuyOrdersWithEth(tuple[],uint256,bytes[],tuple[],bytes[],uint256,address)').inputs;
[orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('marketBuyOrdersWithEth(tuple[],uint256,bytes[],tuple[],bytes[],uint256,address)').functions.marketBuyOrdersWithEth.encode([orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
return abiEncodedTransactionData;
},
async callAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
makerAssetFillAmount: BigNumber,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}]
> {
const self = this as any as ForwarderContract;
const functionSignature = 'marketBuyOrdersWithEth(tuple[],uint256,bytes[],tuple[],bytes[],uint256,address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.marketBuyOrdersWithEth;
const encodedData = ethersFunction.encode([orders,
makerAssetFillAmount,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'marketBuyOrdersWithEth'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public withdrawAsset = {
async sendTransactionAsync(
assetData: string,
amount: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('withdrawAsset(bytes,uint256)').inputs;
[assetData,
amount
] = BaseContract._formatABIDataItemList(inputAbi, [assetData,
amount
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [assetData,
amount
]);
const encodedData = self._lookupEthersInterface('withdrawAsset(bytes,uint256)').functions.withdrawAsset.encode([assetData,
amount
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.withdrawAsset.estimateGasAsync.bind(
self,
assetData,
amount
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
assetData: string,
amount: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('withdrawAsset(bytes,uint256)').inputs;
[assetData,
amount
] = BaseContract._formatABIDataItemList(inputAbi, [assetData,
amount
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('withdrawAsset(bytes,uint256)').functions.withdrawAsset.encode([assetData,
amount
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
assetData: string,
amount: BigNumber,
): string {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('withdrawAsset(bytes,uint256)').inputs;
[assetData,
amount
] = BaseContract._formatABIDataItemList(inputAbi, [assetData,
amount
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('withdrawAsset(bytes,uint256)').functions.withdrawAsset.encode([assetData,
amount
]);
return abiEncodedTransactionData;
},
async callAsync(
assetData: string,
amount: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ForwarderContract;
const functionSignature = 'withdrawAsset(bytes,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[assetData,
amount
] = BaseContract._formatABIDataItemList(inputAbi, [assetData,
amount
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [assetData,
amount
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.withdrawAsset;
const encodedData = ethersFunction.encode([assetData,
amount
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'withdrawAsset'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public owner = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ForwarderContract;
const functionSignature = 'owner()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.owner;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'owner'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public marketSellOrdersWithEth = {
async sendTransactionAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
txData: Partial<TxDataPayable> = {},
): Promise<string> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('marketSellOrdersWithEth(tuple[],bytes[],tuple[],bytes[],uint256,address)').inputs;
[orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const encodedData = self._lookupEthersInterface('marketSellOrdersWithEth(tuple[],bytes[],tuple[],bytes[],uint256,address)').functions.marketSellOrdersWithEth.encode([orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.marketSellOrdersWithEth.estimateGasAsync.bind(
self,
orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('marketSellOrdersWithEth(tuple[],bytes[],tuple[],bytes[],uint256,address)').inputs;
[orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('marketSellOrdersWithEth(tuple[],bytes[],tuple[],bytes[],uint256,address)').functions.marketSellOrdersWithEth.encode([orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
): string {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('marketSellOrdersWithEth(tuple[],bytes[],tuple[],bytes[],uint256,address)').inputs;
[orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('marketSellOrdersWithEth(tuple[],bytes[],tuple[],bytes[],uint256,address)').functions.marketSellOrdersWithEth.encode([orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
return abiEncodedTransactionData;
},
async callAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
signatures: string[],
feeOrders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
feeSignatures: string[],
feePercentage: BigNumber,
feeRecipient: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}]
> {
const self = this as any as ForwarderContract;
const functionSignature = 'marketSellOrdersWithEth(tuple[],bytes[],tuple[],bytes[],uint256,address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.marketSellOrdersWithEth;
const encodedData = ethersFunction.encode([orders,
signatures,
feeOrders,
feeSignatures,
feePercentage,
feeRecipient
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'marketSellOrdersWithEth'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public transferOwnership = {
async sendTransactionAsync(
newOwner: string,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
]);
const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transferOwnership.estimateGasAsync.bind(
self,
newOwner
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
newOwner: string,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
newOwner: string,
): string {
const self = this as any as ForwarderContract;
const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
]);
return abiEncodedTransactionData;
},
async callAsync(
newOwner: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as ForwarderContract;
const functionSignature = 'transferOwnership(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferOwnership;
const encodedData = ethersFunction.encode([newOwner
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transferOwnership'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,
_zrxAssetData: string,
_wethAssetData: string,
): Promise<ForwarderContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return ForwarderContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange,
_zrxAssetData,
_wethAssetData
);
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,
_zrxAssetData: string,
_wethAssetData: string,
): Promise<ForwarderContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[_exchange,
_zrxAssetData,
_wethAssetData
] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[_exchange,
_zrxAssetData,
_wethAssetData
],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, [_exchange,
_zrxAssetData,
_wethAssetData
]);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`Forwarder successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ForwarderContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [_exchange,
_zrxAssetData,
_wethAssetData
];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('Forwarder', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,109 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class IValidatorContract extends BaseContract {
public isValidSignature = {
async callAsync(
hash: string,
signerAddress: string,
signature: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as IValidatorContract;
const functionSignature = 'isValidSignature(bytes32,address,bytes)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[hash,
signerAddress,
signature
] = BaseContract._formatABIDataItemList(inputAbi, [hash,
signerAddress,
signature
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [hash,
signerAddress,
signature
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.isValidSignature;
const encodedData = ethersFunction.encode([hash,
signerAddress,
signature
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'isValidSignature'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IValidatorContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return IValidatorContract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IValidatorContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`IValidator successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new IValidatorContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('IValidator', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,104 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class IWalletContract extends BaseContract {
public isValidSignature = {
async callAsync(
hash: string,
signature: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as IWalletContract;
const functionSignature = 'isValidSignature(bytes32,bytes)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[hash,
signature
] = BaseContract._formatABIDataItemList(inputAbi, [hash,
signature
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [hash,
signature
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.isValidSignature;
const encodedData = ethersFunction.encode([hash,
signature
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'isValidSignature'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IWalletContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return IWalletContract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IWalletContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`IWallet successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new IWalletContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('IWallet', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,358 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class OrderValidatorContract extends BaseContract {
public getOrderAndTraderInfo = {
async callAsync(
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
takerAddress: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<[{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}, {makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}]
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getOrderAndTraderInfo({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[order,
takerAddress
] = BaseContract._formatABIDataItemList(inputAbi, [order,
takerAddress
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
takerAddress
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getOrderAndTraderInfo;
const encodedData = ethersFunction.encode([order,
takerAddress
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getOrderAndTraderInfo'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public getBalanceAndAllowance = {
async callAsync(
target: string,
assetData: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<[BigNumber, BigNumber]
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getBalanceAndAllowance(address,bytes)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target,
assetData
] = BaseContract._formatABIDataItemList(inputAbi, [target,
assetData
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target,
assetData
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getBalanceAndAllowance;
const encodedData = ethersFunction.encode([target,
assetData
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getBalanceAndAllowance'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public getOrdersAndTradersInfo = {
async callAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
takerAddresses: string[],
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<[Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>, Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}>]
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getOrdersAndTradersInfo(tuple[],address[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
takerAddresses
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
takerAddresses
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
takerAddresses
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getOrdersAndTradersInfo;
const encodedData = ethersFunction.encode([orders,
takerAddresses
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getOrdersAndTradersInfo'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public getTradersInfo = {
async callAsync(
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
takerAddresses: string[],
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}>
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getTradersInfo(tuple[],address[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
takerAddresses
] = BaseContract._formatABIDataItemList(inputAbi, [orders,
takerAddresses
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
takerAddresses
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getTradersInfo;
const encodedData = ethersFunction.encode([orders,
takerAddresses
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getTradersInfo'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public getERC721TokenOwner = {
async callAsync(
token: string,
tokenId: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getERC721TokenOwner(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[token,
tokenId
] = BaseContract._formatABIDataItemList(inputAbi, [token,
tokenId
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [token,
tokenId
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getERC721TokenOwner;
const encodedData = ethersFunction.encode([token,
tokenId
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getERC721TokenOwner'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public getBalancesAndAllowances = {
async callAsync(
target: string,
assetData: string[],
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<[BigNumber[], BigNumber[]]
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getBalancesAndAllowances(address,bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[target,
assetData
] = BaseContract._formatABIDataItemList(inputAbi, [target,
assetData
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [target,
assetData
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getBalancesAndAllowances;
const encodedData = ethersFunction.encode([target,
assetData
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getBalancesAndAllowances'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public getTraderInfo = {
async callAsync(
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
takerAddress: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getTraderInfo({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[order,
takerAddress
] = BaseContract._formatABIDataItemList(inputAbi, [order,
takerAddress
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
takerAddress
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getTraderInfo;
const encodedData = ethersFunction.encode([order,
takerAddress
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'getTraderInfo'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,
_zrxAssetData: string,
): Promise<OrderValidatorContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return OrderValidatorContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange,
_zrxAssetData
);
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,
_zrxAssetData: string,
): Promise<OrderValidatorContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[_exchange,
_zrxAssetData
] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[_exchange,
_zrxAssetData
],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, [_exchange,
_zrxAssetData
]);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`OrderValidator successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new OrderValidatorContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [_exchange,
_zrxAssetData
];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('OrderValidator', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,836 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
export type WETH9EventArgs =
| WETH9ApprovalEventArgs
| WETH9TransferEventArgs
| WETH9DepositEventArgs
| WETH9WithdrawalEventArgs;
export enum WETH9Events {
Approval = 'Approval',
Transfer = 'Transfer',
Deposit = 'Deposit',
Withdrawal = 'Withdrawal',
}
export interface WETH9ApprovalEventArgs extends DecodedLogArgs {
_owner: string;
_spender: string;
_value: BigNumber;
}
export interface WETH9TransferEventArgs extends DecodedLogArgs {
_from: string;
_to: string;
_value: BigNumber;
}
export interface WETH9DepositEventArgs extends DecodedLogArgs {
_owner: string;
_value: BigNumber;
}
export interface WETH9WithdrawalEventArgs extends DecodedLogArgs {
_owner: string;
_value: BigNumber;
}
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class WETH9Contract extends BaseContract {
public name = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as WETH9Contract;
const functionSignature = 'name()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.name;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'name'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public approve = {
async sendTransactionAsync(
guy: string,
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[guy,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [guy,
wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [guy,
wad
]);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([guy,
wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.approve.estimateGasAsync.bind(
self,
guy,
wad
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
guy: string,
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[guy,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [guy,
wad
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([guy,
wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
guy: string,
wad: BigNumber,
): string {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[guy,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [guy,
wad
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([guy,
wad
]);
return abiEncodedTransactionData;
},
async callAsync(
guy: string,
wad: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as WETH9Contract;
const functionSignature = 'approve(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[guy,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [guy,
wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [guy,
wad
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.approve;
const encodedData = ethersFunction.encode([guy,
wad
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'approve'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public totalSupply = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as WETH9Contract;
const functionSignature = 'totalSupply()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.totalSupply;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'totalSupply'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transferFrom = {
async sendTransactionAsync(
src: string,
dst: string,
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[src,
dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [src,
dst,
wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [src,
dst,
wad
]);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([src,
dst,
wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transferFrom.estimateGasAsync.bind(
self,
src,
dst,
wad
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
src: string,
dst: string,
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[src,
dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [src,
dst,
wad
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([src,
dst,
wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
src: string,
dst: string,
wad: BigNumber,
): string {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[src,
dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [src,
dst,
wad
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([src,
dst,
wad
]);
return abiEncodedTransactionData;
},
async callAsync(
src: string,
dst: string,
wad: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as WETH9Contract;
const functionSignature = 'transferFrom(address,address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[src,
dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [src,
dst,
wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [src,
dst,
wad
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferFrom;
const encodedData = ethersFunction.encode([src,
dst,
wad
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transferFrom'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public withdraw = {
async sendTransactionAsync(
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('withdraw(uint256)').inputs;
[wad
] = BaseContract._formatABIDataItemList(inputAbi, [wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [wad
]);
const encodedData = self._lookupEthersInterface('withdraw(uint256)').functions.withdraw.encode([wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.withdraw.estimateGasAsync.bind(
self,
wad
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('withdraw(uint256)').inputs;
[wad
] = BaseContract._formatABIDataItemList(inputAbi, [wad
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('withdraw(uint256)').functions.withdraw.encode([wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
wad: BigNumber,
): string {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('withdraw(uint256)').inputs;
[wad
] = BaseContract._formatABIDataItemList(inputAbi, [wad
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('withdraw(uint256)').functions.withdraw.encode([wad
]);
return abiEncodedTransactionData;
},
async callAsync(
wad: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as WETH9Contract;
const functionSignature = 'withdraw(uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[wad
] = BaseContract._formatABIDataItemList(inputAbi, [wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [wad
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.withdraw;
const encodedData = ethersFunction.encode([wad
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'withdraw'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public decimals = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<number
> {
const self = this as any as WETH9Contract;
const functionSignature = 'decimals()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.decimals;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'decimals'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public balanceOf = {
async callAsync(
index_0: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as WETH9Contract;
const functionSignature = 'balanceOf(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.balanceOf;
const encodedData = ethersFunction.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'balanceOf'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public symbol = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as WETH9Contract;
const functionSignature = 'symbol()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.symbol;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'symbol'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transfer = {
async sendTransactionAsync(
dst: string,
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [dst,
wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [dst,
wad
]);
const encodedData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([dst,
wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transfer.estimateGasAsync.bind(
self,
dst,
wad
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
dst: string,
wad: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [dst,
wad
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([dst,
wad
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
dst: string,
wad: BigNumber,
): string {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [dst,
wad
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([dst,
wad
]);
return abiEncodedTransactionData;
},
async callAsync(
dst: string,
wad: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as WETH9Contract;
const functionSignature = 'transfer(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[dst,
wad
] = BaseContract._formatABIDataItemList(inputAbi, [dst,
wad
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [dst,
wad
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transfer;
const encodedData = ethersFunction.encode([dst,
wad
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transfer'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public deposit = {
async sendTransactionAsync(
txData: Partial<TxDataPayable> = {},
): Promise<string> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('deposit()').inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const encodedData = self._lookupEthersInterface('deposit()').functions.deposit.encode([]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.deposit.estimateGasAsync.bind(
self,
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('deposit()').inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('deposit()').functions.deposit.encode([]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
): string {
const self = this as any as WETH9Contract;
const inputAbi = self._lookupAbi('deposit()').inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('deposit()').functions.deposit.encode([]);
return abiEncodedTransactionData;
},
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<void
> {
const self = this as any as WETH9Contract;
const functionSignature = 'deposit()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.deposit;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'deposit'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray;
},
};
public allowance = {
async callAsync(
index_0: string,
index_1: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as WETH9Contract;
const functionSignature = 'allowance(address,address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[index_0,
index_1
] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
index_1
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0,
index_1
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.allowance;
const encodedData = ethersFunction.encode([index_0,
index_1
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'allowance'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<WETH9Contract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return WETH9Contract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<WETH9Contract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`WETH9 successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new WETH9Contract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('WETH9', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,647 @@
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
// tslint:disable:no-unused-variable
// tslint:disable:no-unbound-method
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
// tslint:enable:no-unused-variable
export type ZRXTokenEventArgs =
| ZRXTokenTransferEventArgs
| ZRXTokenApprovalEventArgs;
export enum ZRXTokenEvents {
Transfer = 'Transfer',
Approval = 'Approval',
}
export interface ZRXTokenTransferEventArgs extends DecodedLogArgs {
_from: string;
_to: string;
_value: BigNumber;
}
export interface ZRXTokenApprovalEventArgs extends DecodedLogArgs {
_owner: string;
_spender: string;
_value: BigNumber;
}
/* istanbul ignore next */
// tslint:disable:no-parameter-reassignment
// tslint:disable-next-line:class-name
export class ZRXTokenContract extends BaseContract {
public name = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'name()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.name;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'name'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public approve = {
async sendTransactionAsync(
_spender: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_spender,
_value
]);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_spender,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.approve.estimateGasAsync.bind(
self,
_spender,
_value
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_spender: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_spender,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_spender: string,
_value: BigNumber,
): string {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('approve(address,uint256)').inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('approve(address,uint256)').functions.approve.encode([_spender,
_value
]);
return abiEncodedTransactionData;
},
async callAsync(
_spender: string,
_value: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'approve(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_spender,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_spender,
_value
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.approve;
const encodedData = ethersFunction.encode([_spender,
_value
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'approve'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public totalSupply = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'totalSupply()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.totalSupply;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'totalSupply'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transferFrom = {
async sendTransactionAsync(
_from: string,
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_value
]);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transferFrom.estimateGasAsync.bind(
self,
_from,
_to,
_value
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_from: string,
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_from: string,
_to: string,
_value: BigNumber,
): string {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('transferFrom(address,address,uint256)').inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transferFrom(address,address,uint256)').functions.transferFrom.encode([_from,
_to,
_value
]);
return abiEncodedTransactionData;
},
async callAsync(
_from: string,
_to: string,
_value: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_from,
_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_from,
_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_from,
_to,
_value
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferFrom;
const encodedData = ethersFunction.encode([_from,
_to,
_value
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transferFrom'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public decimals = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<number
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'decimals()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.decimals;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'decimals'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public balanceOf = {
async callAsync(
_owner: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'balanceOf(address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_owner
] = BaseContract._formatABIDataItemList(inputAbi, [_owner
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_owner
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.balanceOf;
const encodedData = ethersFunction.encode([_owner
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'balanceOf'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public symbol = {
async callAsync(
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'symbol()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, []);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.symbol;
const encodedData = ethersFunction.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'symbol'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public transfer = {
async sendTransactionAsync(
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_to,
_value
]);
const encodedData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
self.transfer.estimateGasAsync.bind(
self,
_to,
_value
),
);
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
return txHash;
},
async estimateGasAsync(
_to: string,
_value: BigNumber,
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString);
const encodedData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([_to,
_value
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...txData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;
},
getABIEncodedTransactionData(
_to: string,
_value: BigNumber,
): string {
const self = this as any as ZRXTokenContract;
const inputAbi = self._lookupAbi('transfer(address,uint256)').inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString);
const abiEncodedTransactionData = self._lookupEthersInterface('transfer(address,uint256)').functions.transfer.encode([_to,
_value
]);
return abiEncodedTransactionData;
},
async callAsync(
_to: string,
_value: BigNumber,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<boolean
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'transfer(address,uint256)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_to,
_value
] = BaseContract._formatABIDataItemList(inputAbi, [_to,
_value
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_to,
_value
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transfer;
const encodedData = ethersFunction.encode([_to,
_value
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'transfer'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public allowance = {
async callAsync(
_owner: string,
_spender: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<BigNumber
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'allowance(address,address)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[_owner,
_spender
] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
_spender
], BaseContract._bigNumberToString.bind(self));
BaseContract.strictArgumentEncodingCheck(inputAbi, [_owner,
_spender
]);
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.allowance;
const encodedData = ethersFunction.encode([_owner,
_spender
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
...callData,
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: 'allowance'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ZRXTokenContract> {
if (_.isUndefined(artifact.compilerOutput)) {
throw new Error('Compiler output not found in the artifact file');
}
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return ZRXTokenContract.deployAsync(bytecode, abi, provider, txDefaults, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ZRXTokenContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
txDefaults,
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`ZRXToken successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ZRXTokenContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('ZRXToken', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,14 @@
export * from './generated-wrappers/asset_proxy_owner';
export * from './generated-wrappers/dummy_erc20_token';
export * from './generated-wrappers/dummy_erc721_token';
export * from './generated-wrappers/erc20_proxy';
export * from './generated-wrappers/erc20_token';
export * from './generated-wrappers/erc721_proxy';
export * from './generated-wrappers/erc721_token';
export * from './generated-wrappers/exchange';
export * from './generated-wrappers/forwarder';
export * from './generated-wrappers/i_validator';
export * from './generated-wrappers/i_wallet';
export * from './generated-wrappers/order_validator';
export * from './generated-wrappers/weth9';
export * from './generated-wrappers/zrx_token';

View File

@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": "."
},
"include": ["./src/**/*"]
}

View File

@@ -0,0 +1,3 @@
{
"extends": ["@0x/tslint-config"]
}

View File

@@ -1,4 +1,212 @@
[
{
"timestamp": 1542821676,
"version": "1.0.17",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542208198,
"version": "1.0.16",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.15",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1541740904
},
{
"timestamp": 1539871071,
"version": "1.0.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.13",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1538693146
},
{
"timestamp": 1538157789,
"version": "1.0.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537907159,
"version": "1.0.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537875740,
"version": "1.0.10",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537541580,
"version": "1.0.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1536142250,
"version": "1.0.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1535377027,
"version": "1.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1535133899,
"version": "1.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1534210131,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.1",
"changes": [
{
"note": "Fix the abi-gen entry point in package.json",
"pr": 901
}
],
"timestamp": 1532357734
},
{
"timestamp": 1532043000,
"version": "1.0.0",
"changes": [
{
"note": "Convert e_r_c to erc in generated file names",
"pr": 822
},
{
"note": "Remove the output directory before writing to it",
"pr": 822
},
{
"note": "skip generation of wrappers that are already up to date",
"pr": 788
}
]
},
{
"timestamp": 1531919263,
"version": "0.3.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1531149657,
"version": "0.3.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1529397769,
"version": "0.3.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.3.1",
"changes": [
{
"note": "Incorrect publish that was unpublished"
}
],
"timestamp": 1527810075
},
{
"version": "0.3.0",
"changes": [

View File

@@ -1,10 +1,100 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
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.17 - _November 21, 2018_
* Dependencies updated
## v1.0.16 - _November 14, 2018_
* Dependencies updated
## v1.0.15 - _November 9, 2018_
* Dependencies updated
## v1.0.14 - _October 18, 2018_
* Dependencies updated
## v1.0.13 - _October 4, 2018_
* Dependencies updated
## v1.0.12 - _September 28, 2018_
* Dependencies updated
## v1.0.11 - _September 25, 2018_
* Dependencies updated
## v1.0.10 - _September 25, 2018_
* Dependencies updated
## v1.0.9 - _September 21, 2018_
* Dependencies updated
## v1.0.8 - _September 5, 2018_
* Dependencies updated
## v1.0.7 - _August 27, 2018_
* Dependencies updated
## v1.0.6 - _August 24, 2018_
* Dependencies updated
## v1.0.5 - _August 14, 2018_
* Dependencies updated
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated
## v1.0.1 - _July 23, 2018_
* Fix the abi-gen entry point in package.json (#901)
## v1.0.0 - _July 19, 2018_
* Convert e_r_c to erc in generated file names (#822)
* Remove the output directory before writing to it (#822)
* skip generation of wrappers that are already up to date (#788)
## v0.3.4 - _July 18, 2018_
* Dependencies updated
## v0.3.3 - _July 9, 2018_
* Dependencies updated
## v0.3.2 - _June 19, 2018_
* Dependencies updated
## v0.3.1 - _May 31, 2018_
* Incorrect publish that was unpublished
## v0.3.0 - _May 22, 2018_
* Properly export the executable binary (#588)

View File

@@ -8,7 +8,7 @@ You can write your custom handlebars templates which will allow you to seamlessl
## Installation
`yarn add -g @0xproject/abi-gen`
`yarn add -g @0x/abi-gen`
## Usage
@@ -82,13 +82,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=@0xproject/abi-gen yarn build
PKG=@0x/abi-gen yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0xproject/abi-gen yarn watch
PKG=@0x/abi-gen yarn watch
```
### Clean

View File

@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('../lib/index.js')
require('../lib/src/index.js');

View File

View File

@@ -1,18 +1,22 @@
{
"name": "@0xproject/abi-gen",
"version": "0.3.0",
"name": "@0x/abi-gen",
"version": "1.0.17",
"engines": {
"node": ">=6.12"
},
"description": "Generate contract wrappers from ABI and handlebars templates",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
"watch_without_deps": "tsc -w",
"lint": "tslint --project .",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
"lint": "tslint --format stylish --project .",
"clean": "shx rm -rf lib",
"build": "tsc -b",
"build:ci": "yarn build",
"test": "yarn run_mocha",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit",
"test:circleci": "yarn test:coverage",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info"
},
"bin": {
"abi-gen": "bin/abi-gen.js"
@@ -27,31 +31,36 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
"dependencies": {
"@0xproject/typescript-typings": "^0.3.2",
"@0xproject/utils": "^0.6.2",
"ethereum-types": "^0.0.1",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.6",
"chalk": "^2.3.0",
"ethereum-types": "^1.1.2",
"glob": "^7.1.2",
"handlebars": "^4.0.11",
"lodash": "^4.17.4",
"lodash": "^4.17.5",
"mkdirp": "^0.5.1",
"sleep": "^5.1.1",
"tmp": "^0.0.33",
"to-snake-case": "^1.0.0",
"yargs": "^10.0.3"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.20",
"@0xproject/tslint-config": "^0.4.18",
"@types/glob": "^5.0.33",
"@0x/tslint-config": "^1.0.10",
"@types/glob": "5.0.35",
"@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1",
"@types/node": "^8.0.53",
"@types/node": "*",
"@types/sleep": "^0.0.7",
"@types/tmp": "^0.0.33",
"@types/yargs": "^10.0.0",
"copyfiles": "^1.2.0",
"chai": "^4.1.2",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^5.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1"
"tslint": "5.11.0",
"typescript": "3.0.1"
},
"publishConfig": {
"access": "public"

View File

@@ -1,17 +1,14 @@
#!/usr/bin/env node
import { abiUtils, logUtils } from '@0xproject/utils';
import { abiUtils, logUtils } from '@0x/utils';
import chalk from 'chalk';
import { AbiDefinition, ConstructorAbi, EventAbi, MethodAbi } from 'ethereum-types';
import * as fs from 'fs';
import { sync as globSync } from 'glob';
import * as Handlebars from 'handlebars';
import * as _ from 'lodash';
import * as mkdirp from 'mkdirp';
import * as yargs from 'yargs';
import toSnakeCase = require('to-snake-case');
import { ContextData, ContractsBackend, ParamKind } from './types';
import { utils } from './utils';
@@ -70,16 +67,6 @@ function registerPartials(partialsGlob: string): void {
}
}
function writeOutputFile(name: string, renderedTsCode: string): void {
let fileName = toSnakeCase(name);
if (fileName === 'z_r_x_token') {
fileName = 'zrx_token';
}
const filePath = `${args.output}/${fileName}.ts`;
fs.writeFileSync(filePath, renderedTsCode);
logUtils.log(`Created: ${chalk.bold(filePath)}`);
}
Handlebars.registerHelper('parameterType', utils.solTypeToTsType.bind(utils, ParamKind.Input, args.backend));
Handlebars.registerHelper('returnType', utils.solTypeToTsType.bind(utils, ParamKind.Output, args.backend));
if (args.partials) {
@@ -118,6 +105,14 @@ for (const abiFileName of abiFileNames) {
process.exit(1);
}
const outFileName = utils.makeOutputFileName(namedContent.name);
const outFilePath = `${args.output}/${outFileName}.ts`;
if (utils.isOutputFileUpToDate(abiFileName, outFilePath)) {
logUtils.log(`Already up to date: ${chalk.bold(outFilePath)}`);
continue;
}
let ctor = ABI.find((abi: AbiDefinition) => abi.type === ABI_TYPE_CONSTRUCTOR) as ConstructorAbi;
if (_.isUndefined(ctor)) {
ctor = utils.getEmptyConstructor(); // The constructor exists, but it's implicit in JSON's ABI definition
@@ -152,5 +147,6 @@ for (const abiFileName of abiFileNames) {
events: eventAbis,
};
const renderedTsCode = template(contextData);
writeOutputFile(namedContent.name, renderedTsCode);
utils.writeOutputFile(outFilePath, renderedTsCode);
logUtils.log(`Created: ${chalk.bold(outFilePath)}`);
}

View File

@@ -1,8 +0,0 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);

View File

@@ -2,6 +2,7 @@ import { AbiType, ConstructorAbi, DataItem } from 'ethereum-types';
import * as fs from 'fs';
import * as _ from 'lodash';
import * as path from 'path';
import toSnakeCase = require('to-snake-case');
import { ContractsBackend, ParamKind } from './types';
@@ -92,4 +93,27 @@ export const utils = {
inputs: [],
};
},
makeOutputFileName(name: string): string {
let fileName = toSnakeCase(name);
// HACK: Snake case doesn't make a lot of sense for abbreviated names but we can't reliably detect abbreviations
// so we special-case the abbreviations we use.
fileName = fileName.replace('z_r_x', 'zrx').replace('e_r_c', 'erc');
return fileName;
},
writeOutputFile(filePath: string, renderedTsCode: string): void {
fs.writeFileSync(filePath, renderedTsCode);
},
isOutputFileUpToDate(abiFile: string, outputFile: string): boolean {
const abiFileModTimeMs = fs.statSync(abiFile).mtimeMs;
try {
const outFileModTimeMs = fs.statSync(outputFile).mtimeMs;
return outFileModTimeMs > abiFileModTimeMs;
} catch (err) {
if (err.code === 'ENOENT') {
return false;
} else {
throw err;
}
}
},
};

View File

@@ -0,0 +1,86 @@
import * as chai from 'chai';
import * as dirtyChai from 'dirty-chai';
import * as fs from 'fs';
import 'mocha';
import * as tmp from 'tmp';
import { utils } from '../src/utils';
tmp.setGracefulCleanup(); // remove tmp files even if there are failures
chai.use(dirtyChai);
const expect = chai.expect;
describe('makeOutputFileName()', () => {
it('should handle Metacoin usage', () => {
expect(utils.makeOutputFileName('Metacoin')).to.equal('metacoin');
});
it('should handle special zrx_token case', () => {
expect(utils.makeOutputFileName('ZRXToken')).to.equal('zrx_token');
});
it('should handle special erc_token case', () => {
expect(utils.makeOutputFileName('ERC20Token')).to.equal('erc20_token');
});
});
describe('writeOutputFile()', () => {
let tempFilePath: string;
before(() => {
tempFilePath = tmp.fileSync(
{ discardDescriptor: true }, // close file (so we can update it)
).name;
});
it('should write content to output file', () => {
const content = 'hello world';
utils.writeOutputFile(tempFilePath, content);
expect(fs.readFileSync(tempFilePath).toString()).to.equal(content);
});
});
describe('isOutputFileUpToDate()', () => {
it('should throw ENOENT when there is no abi file', () => {
expect(utils.isOutputFileUpToDate.bind('nonexistant1', 'nonexistant2')).to.throw('ENOENT');
});
describe('when the abi input file exists', () => {
let abiFile: string;
before(() => {
abiFile = tmp.fileSync(
{ discardDescriptor: true }, // close file (set timestamp)
).name;
});
describe('without an existing output file', () => {
it('should return false', () => {
expect(utils.isOutputFileUpToDate(abiFile, 'nonexistant_file')).to.be.false();
});
});
describe('with an existing output file', () => {
let outputFile: string;
before(() => {
outputFile = tmp.fileSync(
{ discardDescriptor: true }, // close file (set timestamp)
).name;
const abiFileModTimeMs = fs.statSync(abiFile).mtimeMs;
const outfileModTimeMs = abiFileModTimeMs + 1;
fs.utimesSync(outputFile, outfileModTimeMs, outfileModTimeMs);
});
it('should return true when output file is newer than abi file', async () => {
expect(utils.isOutputFileUpToDate(abiFile, outputFile)).to.be.true();
});
it('should return false when output file exists but is older than abi file', () => {
const outFileModTimeMs = fs.statSync(outputFile).mtimeMs;
const abiFileModTimeMs = outFileModTimeMs + 1;
fs.utimesSync(abiFile, abiFileModTimeMs, abiFileModTimeMs);
expect(utils.isOutputFileUpToDate(abiFile, outputFile)).to.be.false();
});
});
});
});

View File

@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib",
"rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}

View File

@@ -1,3 +1,3 @@
{
"extends": ["@0xproject/tslint-config"]
"extends": ["@0x/tslint-config"]
}

View File

@@ -1,4 +1,213 @@
[
{
"timestamp": 1542821676,
"version": "1.0.18",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542208198,
"version": "1.0.17",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542028948,
"version": "1.0.16",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.15",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1541740904
},
{
"timestamp": 1539871071,
"version": "1.0.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.13",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1538693146
},
{
"timestamp": 1538157789,
"version": "1.0.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537907159,
"version": "1.0.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537875740,
"version": "1.0.10",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537541580,
"version": "1.0.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1536142250,
"version": "1.0.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1535377027,
"version": "1.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1535133899,
"version": "1.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1534210131,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532619515,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532614997,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532605697,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532357734,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1532043000,
"version": "1.0.0",
"changes": [
{
"note":
"Fix bug in string enum assertion. We erroneously were checking against the enum keys, not values",
"pr": 821
}
]
},
{
"timestamp": 1531919263,
"version": "0.2.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1531149657,
"version": "0.2.13",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1529397769,
"version": "0.2.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.2.11",
"changes": [
{
"note": "Incorrect publish that was unpublished"
}
],
"timestamp": 1527810075
},
{
"timestamp": 1527008270,
"version": "0.2.10",

View File

@@ -1,10 +1,102 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
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.18 - _November 21, 2018_
* Dependencies updated
## v1.0.17 - _November 14, 2018_
* Dependencies updated
## v1.0.16 - _November 12, 2018_
* Dependencies updated
## v1.0.15 - _November 9, 2018_
* Dependencies updated
## v1.0.14 - _October 18, 2018_
* Dependencies updated
## v1.0.13 - _October 4, 2018_
* Dependencies updated
## v1.0.12 - _September 28, 2018_
* Dependencies updated
## v1.0.11 - _September 25, 2018_
* Dependencies updated
## v1.0.10 - _September 25, 2018_
* Dependencies updated
## v1.0.9 - _September 21, 2018_
* Dependencies updated
## v1.0.8 - _September 5, 2018_
* Dependencies updated
## v1.0.7 - _August 27, 2018_
* Dependencies updated
## v1.0.6 - _August 24, 2018_
* Dependencies updated
## v1.0.5 - _August 14, 2018_
* Dependencies updated
## v1.0.4 - _July 26, 2018_
* Dependencies updated
## v1.0.3 - _July 26, 2018_
* Dependencies updated
## v1.0.2 - _July 26, 2018_
* Dependencies updated
## v1.0.1 - _July 23, 2018_
* Dependencies updated
## v1.0.0 - _July 19, 2018_
* Fix bug in string enum assertion. We erroneously were checking against the enum keys, not values (#821)
## v0.2.14 - _July 18, 2018_
* Dependencies updated
## v0.2.13 - _July 9, 2018_
* Dependencies updated
## v0.2.12 - _June 19, 2018_
* Dependencies updated
## v0.2.11 - _May 31, 2018_
* Incorrect publish that was unpublished
## v0.2.10 - _May 22, 2018_
* Dependencies updated

View File

@@ -1,17 +1,17 @@
## @0xproject/assert
## @0x/assert
Standard type and schema assertions to be used across all 0x projects and packages
## Installation
```bash
yarn add @0xproject/assert
yarn add @0x/assert
```
## Usage
```typescript
import { assert } from '@0xproject/assert';
import { assert } from '@0x/assert';
assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount);
```
@@ -20,7 +20,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}
```
@@ -49,13 +49,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=@0xproject/assert yarn build
PKG=@0x/assert yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0xproject/assert yarn watch
PKG=@0x/assert yarn watch
```
### Clean

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/assert",
"version": "0.2.10",
"name": "@0x/assert",
"version": "1.0.18",
"engines": {
"node": ">=6.12"
},
@@ -8,18 +8,16 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
"watch_without_deps": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib test_temp scripts",
"lint": "tslint --project .",
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
"prepublishOnly": "run-p build",
"build": "tsc -b",
"build:ci": "yarn build",
"clean": "shx rm -rf lib test_temp",
"lint": "tslint --format stylish --project .",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
"test:circleci": "yarn test:coverage"
},
"license": "Apache-2.0",
"repository": {
@@ -31,27 +29,25 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.20",
"@0xproject/tslint-config": "^0.4.18",
"@0x/tslint-config": "^1.0.10",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
"chai": "^4.0.1",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.0.1",
"mocha": "^4.1.0",
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1"
"tslint": "5.11.0",
"typescript": "3.0.1"
},
"dependencies": {
"@0xproject/json-schemas": "0.7.22",
"@0xproject/typescript-typings": "^0.3.2",
"@0xproject/utils": "^0.6.2",
"lodash": "^4.17.4",
"@0x/json-schemas": "^2.1.2",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.6",
"lodash": "^4.17.5",
"valid-url": "^1.0.9"
},
"publishConfig": {

View File

@@ -1,5 +1,5 @@
import { Schema, SchemaValidator } from '@0xproject/json-schemas';
import { addressUtils, BigNumber } from '@0xproject/utils';
import { Schema, SchemaValidator } from '@0x/json-schemas';
import { addressUtils, BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import * as validUrl from 'valid-url';
@@ -8,41 +8,41 @@ const HEX_REGEX = /^0x[0-9A-F]*$/i;
export const assert = {
isBigNumber(variableName: string, value: BigNumber): void {
const isBigNumber = _.isObject(value) && (value as any).isBigNumber;
this.assert(isBigNumber, this.typeAssertionMessage(variableName, 'BigNumber', value));
assert.assert(isBigNumber, assert.typeAssertionMessage(variableName, 'BigNumber', value));
},
isValidBaseUnitAmount(variableName: string, value: BigNumber): void {
assert.isBigNumber(variableName, value);
const isNegative = value.lessThan(0);
this.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`);
assert.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`);
const hasDecimals = value.decimalPlaces() !== 0;
this.assert(
assert.assert(
!hasDecimals,
`${variableName} should be in baseUnits (no decimals), found value: ${value.toNumber()}`,
);
},
isString(variableName: string, value: string): void {
this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value));
assert.assert(_.isString(value), assert.typeAssertionMessage(variableName, 'string', value));
},
isFunction(variableName: string, value: any): void {
this.assert(_.isFunction(value), this.typeAssertionMessage(variableName, 'function', value));
assert.assert(_.isFunction(value), assert.typeAssertionMessage(variableName, 'function', value));
},
isHexString(variableName: string, value: string): void {
this.assert(
assert.assert(
_.isString(value) && HEX_REGEX.test(value),
this.typeAssertionMessage(variableName, 'HexString', value),
assert.typeAssertionMessage(variableName, 'HexString', value),
);
},
isETHAddressHex(variableName: string, value: string): void {
this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value));
this.assert(addressUtils.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value));
assert.assert(_.isString(value), assert.typeAssertionMessage(variableName, 'string', value));
assert.assert(addressUtils.isAddress(value), assert.typeAssertionMessage(variableName, 'ETHAddressHex', value));
},
doesBelongToStringEnum(
variableName: string,
value: string,
stringEnum: any /* There is no base type for every string enum */,
): void {
const doesBelongToStringEnum = !_.isUndefined(stringEnum[value]);
const enumValues = _.keys(stringEnum);
const enumValues = _.values(stringEnum);
const doesBelongToStringEnum = _.includes(enumValues, value);
const enumValuesAsStrings = _.map(enumValues, enumValue => `'${enumValue}'`);
const enumValuesAsString = enumValuesAsStrings.join(', ');
assert.assert(
@@ -51,17 +51,17 @@ export const assert = {
);
},
hasAtMostOneUniqueValue(value: any[], errMsg: string): void {
this.assert(_.uniq(value).length <= 1, errMsg);
assert.assert(_.uniq(value).length <= 1, errMsg);
},
isNumber(variableName: string, value: number): void {
this.assert(_.isFinite(value), this.typeAssertionMessage(variableName, 'number', value));
assert.assert(_.isFinite(value), assert.typeAssertionMessage(variableName, 'number', value));
},
isBoolean(variableName: string, value: boolean): void {
this.assert(_.isBoolean(value), this.typeAssertionMessage(variableName, 'boolean', value));
assert.assert(_.isBoolean(value), assert.typeAssertionMessage(variableName, 'boolean', value));
},
isWeb3Provider(variableName: string, value: any): void {
const isWeb3Provider = _.isFunction(value.send) || _.isFunction(value.sendAsync);
this.assert(isWeb3Provider, this.typeAssertionMessage(variableName, 'Provider', value));
assert.assert(isWeb3Provider, assert.typeAssertionMessage(variableName, 'Provider', value));
},
doesConformToSchema(variableName: string, value: any, schema: Schema, subSchemas?: Schema[]): void {
if (_.isUndefined(value)) {
@@ -76,15 +76,15 @@ export const assert = {
const msg = `Expected ${variableName} to conform to schema ${schema.id}
Encountered: ${JSON.stringify(value, null, '\t')}
Validation errors: ${validationResult.errors.join(', ')}`;
this.assert(!hasValidationErrors, msg);
assert.assert(!hasValidationErrors, msg);
},
isWebUri(variableName: string, value: any): void {
const isValidUrl = !_.isUndefined(validUrl.isWebUri(value));
this.assert(isValidUrl, this.typeAssertionMessage(variableName, 'web uri', value));
assert.assert(isValidUrl, assert.typeAssertionMessage(variableName, 'web uri', value));
},
isUri(variableName: string, value: any): void {
const isValidUri = !_.isUndefined(validUrl.isUri(value));
this.assert(isValidUri, this.typeAssertionMessage(variableName, 'uri', value));
assert.assert(isValidUri, assert.typeAssertionMessage(variableName, 'uri', value));
},
assert(condition: boolean, message: string): void {
if (!condition) {

View File

@@ -1,8 +0,0 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);

View File

@@ -1,8 +1,7 @@
import { schemas } from '@0xproject/json-schemas';
import { BigNumber } from '@0xproject/utils';
import { schemas } from '@0x/json-schemas';
import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import * as dirtyChai from 'dirty-chai';
import 'make-promises-safe';
import 'mocha';
import { assert } from '../src/index';
@@ -50,7 +49,7 @@ describe('Assertions', () => {
});
describe('#isFunction', () => {
it('should not throw for valid input', () => {
const validInputs = [BigNumber, assert.isString];
const validInputs = [BigNumber, assert.isString.bind(assert)];
validInputs.forEach(input => expect(assert.isFunction.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {

View File

@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib",
"rootDir": "."
},
"include": ["./src/**/*", "./test/**/*"]
}

View File

@@ -1,3 +1,3 @@
{
"extends": ["@0xproject/tslint-config"]
"extends": ["@0x/tslint-config"]
}

View File

@@ -2,5 +2,7 @@
yarn-error.log
/src/
/scripts/
/schemas/
test/
tsconfig.json
/lib/monorepo_scripts/
/lib/src/monorepo_scripts/

View File

@@ -0,0 +1,165 @@
[
{
"version": "3.0.1",
"changes": [
{
"note": "Dependencies updated",
"pr": 1276
}
],
"timestamp": 1542821676
},
{
"version": "3.0.0",
"changes": [
{
"note": "update `getBuyQuoteAsync` to return eth spent on assets instead of per unit amount",
"pr": 1252
}
],
"timestamp": 1542208198
},
{
"timestamp": 1542134075,
"version": "2.2.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542028948,
"version": "2.2.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.2.0",
"changes": [
{
"note": "`getAssetBuyerForProvidedOrders` factory function now takes 3 args instead of 4",
"pr": 1187
},
{
"note":
"the `OrderProvider` now requires a new method `getAvailableMakerAssetDatasAsync` and the `StandardRelayerAPIOrderProvider` requires the network id at init.",
"pr": 1203
},
{
"note": "No longer require that provided orders all have the same maker and taker asset data",
"pr": 1197
},
{
"note":
"Fix bug where `BuyQuoteInfo` objects could return `totalEthAmount` and `feeEthAmount` that were not whole numbers",
"pr": 1207
},
{
"note":
"Fix bug where default values for `AssetBuyer` public facing methods could get overriden by `undefined` values",
"pr": 1207
},
{
"note": "Lower default expiry buffer from 5 minutes to 2 minutes",
"pr": 1217
}
],
"timestamp": 1541740904
},
{
"version": "2.1.0",
"changes": [
{
"note": "Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts`"
},
{
"note": "Export `BuyQuoteInfo` type",
"pr": 1131
},
{
"note":
"Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers",
"pr": 1105
},
{
"note": "Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts`",
"pr": 1116
},
{
"note": "Add `docs:json` command to package.json",
"pr": 1139
},
{
"note": "Add missing types to public interface",
"pr": 1139
},
{
"note": "Throw `SignatureRequestDenied` and `TransactionValueTooLow` errors when executing buy",
"pr": 1147
}
],
"timestamp": 1539871071
},
{
"version": "2.0.0",
"changes": [
{
"note": "Expand AssetBuyer to work with multiple assets at once",
"pr": 1086
},
{
"note": "Fix minRate and maxRate calculation",
"pr": 1113
}
],
"timestamp": 1538693146
},
{
"timestamp": 1538475601,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1538157789,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537907159,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537875740,
"version": "1.0.0",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.0-rc.1",
"changes": [
{
"note": "Init"
}
]
}
]

View File

@@ -0,0 +1,66 @@
<!--
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v3.0.1 - _November 21, 2018_
* Dependencies updated (#1276)
## v3.0.0 - _November 14, 2018_
* update `getBuyQuoteAsync` to return eth spent on assets instead of per unit amount (#1252)
## v2.2.2 - _November 13, 2018_
* Dependencies updated
## v2.2.1 - _November 12, 2018_
* Dependencies updated
## v2.2.0 - _November 9, 2018_
* `getAssetBuyerForProvidedOrders` factory function now takes 3 args instead of 4 (#1187)
* the `OrderProvider` now requires a new method `getAvailableMakerAssetDatasAsync` and the `StandardRelayerAPIOrderProvider` requires the network id at init. (#1203)
* No longer require that provided orders all have the same maker and taker asset data (#1197)
* Fix bug where `BuyQuoteInfo` objects could return `totalEthAmount` and `feeEthAmount` that were not whole numbers (#1207)
* Fix bug where default values for `AssetBuyer` public facing methods could get overriden by `undefined` values (#1207)
* Lower default expiry buffer from 5 minutes to 2 minutes (#1217)
## v2.1.0 - _October 18, 2018_
* Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts`
* Export `BuyQuoteInfo` type (#1131)
* Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers (#1105)
* Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts` (#1116)
* Add `docs:json` command to package.json (#1139)
* Add missing types to public interface (#1139)
* Throw `SignatureRequestDenied` and `TransactionValueTooLow` errors when executing buy (#1147)
## v2.0.0 - _October 4, 2018_
* Expand AssetBuyer to work with multiple assets at once (#1086)
* Fix minRate and maxRate calculation (#1113)
## v1.0.3 - _October 2, 2018_
* Dependencies updated
## v1.0.2 - _September 28, 2018_
* Dependencies updated
## v1.0.1 - _September 25, 2018_
* Dependencies updated
## v1.0.0 - _September 25, 2018_
* Dependencies updated
## v1.0.0-rc.1 - _Invalid date_
* Init

View File

@@ -0,0 +1,85 @@
## @0x/asset-buyer
**Warning: In Beta, has not been extensively tested.**
Convenience package for buying assets represented on the Ethereum blockchain using 0x. In its simplest form, the package helps in the usage of the [0x forwarder contract](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md), which allows users to execute [Wrapped Ether](https://weth.io/) based 0x orders without having to set allowances, wrap Ether or own ZRX, meaning they can buy tokens with Ether alone. Given some liquidity (0x signed orders), it helps estimate the Ether cost of buying a certain asset (giving a range) and then buying that asset.
In its more advanced and useful form, it integrates with the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) and takes care of sourcing liquidity for you given an SRA compliant endpoint. The final result is a library that tells you what assets are available, provides an Ether based quote for any asset desired, and allows you to buy that asset using Ether alone.
## Installation
```bash
yarn add @0x/asset-buyer
```
**Import**
```typescript
import { AssetBuyer } from '@0x/asset-buyer';
```
or
```javascript
var AssetBuyer = require('@0x/asset-buyer').AssetBuyer;
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}
```
## Contributing
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
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/asset-buyer yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0x/asset-buyer yarn watch
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

@@ -0,0 +1,73 @@
{
"name": "@0x/asset-buyer",
"version": "3.0.1",
"engines": {
"node": ">=6.12"
},
"description": "Convenience package for discovering and buying assets with Ether.",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
"build": "yarn tsc -b",
"build:ci": "yarn build",
"lint": "tslint --format stylish --project .",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit",
"clean": "shx rm -rf lib test_temp",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
"assets": []
}
},
"repository": {
"type": "git",
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"author": "",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
"dependencies": {
"@0x/assert": "^1.0.18",
"@0x/connect": "^3.0.7",
"@0x/contract-wrappers": "^4.1.0",
"@0x/json-schemas": "^2.1.2",
"@0x/order-utils": "^3.0.3",
"@0x/subproviders": "^2.1.5",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.5",
"ethereum-types": "^1.1.2",
"lodash": "^4.17.5"
},
"devDependencies": {
"@0x/tslint-config": "^1.0.10",
"@types/lodash": "^4.14.116",
"@types/mocha": "^2.2.42",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^2.0.1",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"shx": "^0.2.2",
"tslint": "5.11.0",
"typedoc": "0.13.0",
"typescript": "3.0.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,327 @@
import { ContractWrappers, ContractWrappersError, ForwarderWrapperError } from '@0x/contract-wrappers';
import { schemas } from '@0x/json-schemas';
import { SignedOrder } from '@0x/order-utils';
import { ObjectMap } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider } from 'ethereum-types';
import * as _ from 'lodash';
import { constants } from './constants';
import { BasicOrderProvider } from './order_providers/basic_order_provider';
import { StandardRelayerAPIOrderProvider } from './order_providers/standard_relayer_api_order_provider';
import {
AssetBuyerError,
AssetBuyerOpts,
BuyQuote,
BuyQuoteExecutionOpts,
BuyQuoteRequestOpts,
OrderProvider,
OrderProviderResponse,
OrdersAndFillableAmounts,
} from './types';
import { assert } from './utils/assert';
import { assetDataUtils } from './utils/asset_data_utils';
import { buyQuoteCalculator } from './utils/buy_quote_calculator';
import { orderProviderResponseProcessor } from './utils/order_provider_response_processor';
interface OrdersEntry {
ordersAndFillableAmounts: OrdersAndFillableAmounts;
lastRefreshTime: number;
}
export class AssetBuyer {
public readonly provider: Provider;
public readonly orderProvider: OrderProvider;
public readonly networkId: number;
public readonly orderRefreshIntervalMs: number;
public readonly expiryBufferSeconds: number;
private readonly _contractWrappers: ContractWrappers;
// cache of orders along with the time last updated keyed by assetData
private readonly _ordersEntryMap: ObjectMap<OrdersEntry> = {};
/**
* Instantiates a new AssetBuyer instance given existing liquidity in the form of orders and feeOrders.
* @param provider The Provider instance you would like to use for interacting with the Ethereum network.
* @param orders A non-empty array of objects that conform to SignedOrder. All orders must have the same makerAssetData and takerAssetData (WETH).
* @param feeOrders A array of objects that conform to SignedOrder. All orders must have the same makerAssetData (ZRX) and takerAssetData (WETH). Defaults to an empty array.
* @param options Initialization options for the AssetBuyer. See type definition for details.
*
* @return An instance of AssetBuyer
*/
public static getAssetBuyerForProvidedOrders(
provider: Provider,
orders: SignedOrder[],
options: Partial<AssetBuyerOpts> = {},
): AssetBuyer {
assert.isWeb3Provider('provider', provider);
assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema);
assert.assert(orders.length !== 0, `Expected orders to contain at least one order`);
const orderProvider = new BasicOrderProvider(orders);
const assetBuyer = new AssetBuyer(provider, orderProvider, options);
return assetBuyer;
}
/**
* Instantiates a new AssetBuyer instance given a [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) endpoint
* @param provider The Provider instance you would like to use for interacting with the Ethereum network.
* @param sraApiUrl The standard relayer API base HTTP url you would like to source orders from.
* @param options Initialization options for the AssetBuyer. See type definition for details.
*
* @return An instance of AssetBuyer
*/
public static getAssetBuyerForStandardRelayerAPIUrl(
provider: Provider,
sraApiUrl: string,
options: Partial<AssetBuyerOpts> = {},
): AssetBuyer {
assert.isWeb3Provider('provider', provider);
assert.isWebUri('sraApiUrl', sraApiUrl);
const networkId = options.networkId || constants.DEFAULT_ASSET_BUYER_OPTS.networkId;
const orderProvider = new StandardRelayerAPIOrderProvider(sraApiUrl, networkId);
const assetBuyer = new AssetBuyer(provider, orderProvider, options);
return assetBuyer;
}
/**
* Instantiates a new AssetBuyer instance
* @param provider The Provider instance you would like to use for interacting with the Ethereum network.
* @param orderProvider An object that conforms to OrderProvider, see type for definition.
* @param options Initialization options for the AssetBuyer. See type definition for details.
*
* @return An instance of AssetBuyer
*/
constructor(provider: Provider, orderProvider: OrderProvider, options: Partial<AssetBuyerOpts> = {}) {
const { networkId, orderRefreshIntervalMs, expiryBufferSeconds } = _.merge(
{},
constants.DEFAULT_ASSET_BUYER_OPTS,
options,
);
assert.isWeb3Provider('provider', provider);
assert.isValidOrderProvider('orderProvider', orderProvider);
assert.isNumber('networkId', networkId);
assert.isNumber('orderRefreshIntervalMs', orderRefreshIntervalMs);
assert.isNumber('expiryBufferSeconds', expiryBufferSeconds);
this.provider = provider;
this.orderProvider = orderProvider;
this.networkId = networkId;
this.orderRefreshIntervalMs = orderRefreshIntervalMs;
this.expiryBufferSeconds = expiryBufferSeconds;
this._contractWrappers = new ContractWrappers(this.provider, {
networkId,
});
}
/**
* Get a `BuyQuote` containing all information relevant to fulfilling a buy given a desired assetData.
* You can then pass the `BuyQuote` to `executeBuyQuoteAsync` to execute the buy.
* @param assetData The assetData of the desired asset to buy (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
* @param assetBuyAmount The amount of asset to buy.
* @param options Options for the request. See type definition for more information.
*
* @return An object that conforms to BuyQuote that satisfies the request. See type definition for more information.
*/
public async getBuyQuoteAsync(
assetData: string,
assetBuyAmount: BigNumber,
options: Partial<BuyQuoteRequestOpts> = {},
): Promise<BuyQuote> {
const { feePercentage, shouldForceOrderRefresh, slippagePercentage } = _.merge(
{},
constants.DEFAULT_BUY_QUOTE_REQUEST_OPTS,
options,
);
assert.isString('assetData', assetData);
assert.isBigNumber('assetBuyAmount', assetBuyAmount);
assert.isValidPercentage('feePercentage', feePercentage);
assert.isBoolean('shouldForceOrderRefresh', shouldForceOrderRefresh);
assert.isNumber('slippagePercentage', slippagePercentage);
const zrxTokenAssetData = this._getZrxTokenAssetDataOrThrow();
const isMakerAssetZrxToken = assetData === zrxTokenAssetData;
// get the relevant orders for the makerAsset and fees
// if the requested assetData is ZRX, don't get the fee info
const [ordersAndFillableAmounts, feeOrdersAndFillableAmounts] = await Promise.all([
this._getOrdersAndFillableAmountsAsync(assetData, shouldForceOrderRefresh),
isMakerAssetZrxToken
? Promise.resolve(constants.EMPTY_ORDERS_AND_FILLABLE_AMOUNTS)
: this._getOrdersAndFillableAmountsAsync(zrxTokenAssetData, shouldForceOrderRefresh),
shouldForceOrderRefresh,
]);
if (ordersAndFillableAmounts.orders.length === 0) {
throw new Error(`${AssetBuyerError.AssetUnavailable}: For assetData ${assetData}`);
}
const buyQuote = buyQuoteCalculator.calculate(
ordersAndFillableAmounts,
feeOrdersAndFillableAmounts,
assetBuyAmount,
feePercentage,
slippagePercentage,
isMakerAssetZrxToken,
);
return buyQuote;
}
/**
* Get a `BuyQuote` containing all information relevant to fulfilling a buy given a desired ERC20 token address.
* You can then pass the `BuyQuote` to `executeBuyQuoteAsync` to execute the buy.
* @param tokenAddress The ERC20 token address.
* @param assetBuyAmount The amount of asset to buy.
* @param options Options for the request. See type definition for more information.
*
* @return An object that conforms to BuyQuote that satisfies the request. See type definition for more information.
*/
public async getBuyQuoteForERC20TokenAddressAsync(
tokenAddress: string,
assetBuyAmount: BigNumber,
options: Partial<BuyQuoteRequestOpts> = {},
): Promise<BuyQuote> {
assert.isETHAddressHex('tokenAddress', tokenAddress);
assert.isBigNumber('assetBuyAmount', assetBuyAmount);
const assetData = assetDataUtils.encodeERC20AssetData(tokenAddress);
const buyQuote = this.getBuyQuoteAsync(assetData, assetBuyAmount, options);
return buyQuote;
}
/**
* Given a BuyQuote and desired rate, attempt to execute the buy.
* @param buyQuote An object that conforms to BuyQuote. See type definition for more information.
* @param options Options for the execution of the BuyQuote. See type definition for more information.
*
* @return A promise of the txHash.
*/
public async executeBuyQuoteAsync(
buyQuote: BuyQuote,
options: Partial<BuyQuoteExecutionOpts> = {},
): Promise<string> {
const { ethAmount, takerAddress, feeRecipient, gasLimit, gasPrice } = _.merge(
{},
constants.DEFAULT_BUY_QUOTE_EXECUTION_OPTS,
options,
);
assert.isValidBuyQuote('buyQuote', buyQuote);
if (!_.isUndefined(ethAmount)) {
assert.isBigNumber('ethAmount', ethAmount);
}
if (!_.isUndefined(takerAddress)) {
assert.isETHAddressHex('takerAddress', takerAddress);
}
assert.isETHAddressHex('feeRecipient', feeRecipient);
if (!_.isUndefined(gasLimit)) {
assert.isNumber('gasLimit', gasLimit);
}
if (!_.isUndefined(gasPrice)) {
assert.isBigNumber('gasPrice', gasPrice);
}
const { orders, feeOrders, feePercentage, assetBuyAmount, worstCaseQuoteInfo } = buyQuote;
// if no takerAddress is provided, try to get one from the provider
let finalTakerAddress;
if (!_.isUndefined(takerAddress)) {
finalTakerAddress = takerAddress;
} else {
const web3Wrapper = new Web3Wrapper(this.provider);
const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
const firstAvailableAddress = _.head(availableAddresses);
if (!_.isUndefined(firstAvailableAddress)) {
finalTakerAddress = firstAvailableAddress;
} else {
throw new Error(AssetBuyerError.NoAddressAvailable);
}
}
try {
// if no ethAmount is provided, default to the worst ethAmount from buyQuote
const txHash = await this._contractWrappers.forwarder.marketBuyOrdersWithEthAsync(
orders,
assetBuyAmount,
finalTakerAddress,
ethAmount || worstCaseQuoteInfo.totalEthAmount,
feeOrders,
feePercentage,
feeRecipient,
{
gasLimit,
gasPrice,
shouldValidate: true,
},
);
return txHash;
} catch (err) {
if (_.includes(err.message, ContractWrappersError.SignatureRequestDenied)) {
throw new Error(AssetBuyerError.SignatureRequestDenied);
} else if (_.includes(err.message, ForwarderWrapperError.CompleteFillFailed)) {
throw new Error(AssetBuyerError.TransactionValueTooLow);
} else {
throw err;
}
}
}
/**
* Get the asset data of all assets that are purchaseable with ether token (wETH) in the order provider passed in at init.
*
* @return An array of asset data strings that can be purchased using wETH.
*/
public async getAvailableAssetDatasAsync(): Promise<string[]> {
const etherTokenAssetData = this._getEtherTokenAssetDataOrThrow();
return this.orderProvider.getAvailableMakerAssetDatasAsync(etherTokenAssetData);
}
/**
* Grab orders from the map, if there is a miss or it is time to refresh, fetch and process the orders
*/
private async _getOrdersAndFillableAmountsAsync(
assetData: string,
shouldForceOrderRefresh: boolean,
): Promise<OrdersAndFillableAmounts> {
// try to get ordersEntry from the map
const ordersEntryIfExists = this._ordersEntryMap[assetData];
// we should refresh if:
// we do not have any orders OR
// we are forced to OR
// we have some last refresh time AND that time was sufficiently long ago
const shouldRefresh =
_.isUndefined(ordersEntryIfExists) ||
shouldForceOrderRefresh ||
// tslint:disable:restrict-plus-operands
ordersEntryIfExists.lastRefreshTime + this.orderRefreshIntervalMs < Date.now();
if (!shouldRefresh) {
const result = ordersEntryIfExists.ordersAndFillableAmounts;
return result;
}
const etherTokenAssetData = this._getEtherTokenAssetDataOrThrow();
const zrxTokenAssetData = this._getZrxTokenAssetDataOrThrow();
// construct orderProvider request
const orderProviderRequest = {
makerAssetData: assetData,
takerAssetData: etherTokenAssetData,
networkId: this.networkId,
};
const request = orderProviderRequest;
// get provider response
const response = await this.orderProvider.getOrdersAsync(request);
// since the order provider is an injected dependency, validate that it respects the API
// ie. it should only return maker/taker assetDatas that are specified
orderProviderResponseProcessor.throwIfInvalidResponse(response, request);
// process the responses into one object
const isMakerAssetZrxToken = assetData === zrxTokenAssetData;
const ordersAndFillableAmounts = await orderProviderResponseProcessor.processAsync(
response,
isMakerAssetZrxToken,
this.expiryBufferSeconds,
this._contractWrappers.orderValidator,
);
const lastRefreshTime = Date.now();
const updatedOrdersEntry = {
ordersAndFillableAmounts,
lastRefreshTime,
};
this._ordersEntryMap[assetData] = updatedOrdersEntry;
return ordersAndFillableAmounts;
}
/**
* Get the assetData that represents the WETH token.
* Will throw if WETH does not exist for the current network.
*/
private _getEtherTokenAssetDataOrThrow(): string {
return assetDataUtils.getEtherTokenAssetData(this._contractWrappers);
}
/**
* Get the assetData that represents the ZRX token.
* Will throw if ZRX does not exist for the current network.
*/
private _getZrxTokenAssetDataOrThrow(): string {
return this._contractWrappers.exchange.getZRXAssetData();
}
}

View File

@@ -0,0 +1,40 @@
import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
import { AssetBuyerOpts, BuyQuoteExecutionOpts, BuyQuoteRequestOpts, OrdersAndFillableAmounts } from './types';
const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
const MAINNET_NETWORK_ID = 1;
const DEFAULT_ASSET_BUYER_OPTS: AssetBuyerOpts = {
networkId: MAINNET_NETWORK_ID,
orderRefreshIntervalMs: 10000, // 10 seconds
expiryBufferSeconds: 120, // 2 minutes
};
const DEFAULT_BUY_QUOTE_REQUEST_OPTS: BuyQuoteRequestOpts = {
feePercentage: 0,
shouldForceOrderRefresh: false,
slippagePercentage: 0.2, // 20% slippage protection
};
// Other default values are dynamically determined
const DEFAULT_BUY_QUOTE_EXECUTION_OPTS: BuyQuoteExecutionOpts = {
feeRecipient: NULL_ADDRESS,
};
const EMPTY_ORDERS_AND_FILLABLE_AMOUNTS: OrdersAndFillableAmounts = {
orders: [] as SignedOrder[],
remainingFillableMakerAssetAmounts: [] as BigNumber[],
};
export const constants = {
ZERO_AMOUNT: new BigNumber(0),
NULL_ADDRESS,
MAINNET_NETWORK_ID,
ETHER_TOKEN_DECIMALS: 18,
DEFAULT_ASSET_BUYER_OPTS,
DEFAULT_BUY_QUOTE_EXECUTION_OPTS,
DEFAULT_BUY_QUOTE_REQUEST_OPTS,
EMPTY_ORDERS_AND_FILLABLE_AMOUNTS,
};

View File

@@ -0,0 +1,25 @@
export {
JSONRPCRequestPayload,
JSONRPCResponsePayload,
JSONRPCResponseError,
JSONRPCErrorCallback,
Provider,
} from 'ethereum-types';
export { SignedOrder } from '@0x/types';
export { BigNumber } from '@0x/utils';
export { AssetBuyer } from './asset_buyer';
export { BasicOrderProvider } from './order_providers/basic_order_provider';
export { StandardRelayerAPIOrderProvider } from './order_providers/standard_relayer_api_order_provider';
export {
AssetBuyerError,
AssetBuyerOpts,
BuyQuote,
BuyQuoteExecutionOpts,
BuyQuoteInfo,
BuyQuoteRequestOpts,
OrderProvider,
OrderProviderRequest,
OrderProviderResponse,
SignedOrderWithRemainingFillableMakerAssetAmount,
} from './types';

View File

@@ -0,0 +1,41 @@
import { schemas } from '@0x/json-schemas';
import { SignedOrder } from '@0x/types';
import * as _ from 'lodash';
import { OrderProvider, OrderProviderRequest, OrderProviderResponse } from '../types';
import { assert } from '../utils/assert';
export class BasicOrderProvider implements OrderProvider {
public readonly orders: SignedOrder[];
/**
* Instantiates a new BasicOrderProvider instance
* @param orders An array of objects that conform to SignedOrder to fetch from.
* @return An instance of BasicOrderProvider
*/
constructor(orders: SignedOrder[]) {
assert.doesConformToSchema('orders', orders, schemas.signedOrdersSchema);
this.orders = orders;
}
/**
* Given an object that conforms to OrderFetcherRequest, return the corresponding OrderProviderResponse that satisfies the request.
* @param orderProviderRequest An instance of OrderFetcherRequest. See type for more information.
* @return An instance of OrderProviderResponse. See type for more information.
*/
public async getOrdersAsync(orderProviderRequest: OrderProviderRequest): Promise<OrderProviderResponse> {
assert.isValidOrderProviderRequest('orderProviderRequest', orderProviderRequest);
const { makerAssetData, takerAssetData } = orderProviderRequest;
const orders = _.filter(this.orders, order => {
return order.makerAssetData === makerAssetData && order.takerAssetData === takerAssetData;
});
return { orders };
}
/**
* Given a taker asset data string, return all availabled paired maker asset data strings.
* @param takerAssetData A string representing the taker asset data.
* @return An array of asset data strings that can be purchased using takerAssetData.
*/
public async getAvailableMakerAssetDatasAsync(takerAssetData: string): Promise<string[]> {
const ordersWithTakerAssetData = _.filter(this.orders, { takerAssetData });
return _.map(ordersWithTakerAssetData, order => order.makerAssetData);
}
}

View File

@@ -0,0 +1,105 @@
import { HttpClient } from '@0x/connect';
import { APIOrder, AssetPairsResponse, OrderbookResponse } from '@0x/types';
import * as _ from 'lodash';
import {
AssetBuyerError,
OrderProvider,
OrderProviderRequest,
OrderProviderResponse,
SignedOrderWithRemainingFillableMakerAssetAmount,
} from '../types';
import { assert } from '../utils/assert';
import { orderUtils } from '../utils/order_utils';
export class StandardRelayerAPIOrderProvider implements OrderProvider {
public readonly apiUrl: string;
public readonly networkId: number;
private readonly _sraClient: HttpClient;
/**
* Given an array of APIOrder objects from a standard relayer api, return an array
* of SignedOrderWithRemainingFillableMakerAssetAmounts
*/
private static _getSignedOrderWithRemainingFillableMakerAssetAmountFromApi(
apiOrders: APIOrder[],
): SignedOrderWithRemainingFillableMakerAssetAmount[] {
const result = _.map(apiOrders, apiOrder => {
const { order, metaData } = apiOrder;
// calculate remainingFillableMakerAssetAmount from api metadata, else assume order is completely fillable
const remainingFillableTakerAssetAmount = _.get(
metaData,
'remainingTakerAssetAmount',
order.takerAssetAmount,
);
const remainingFillableMakerAssetAmount = orderUtils.getRemainingMakerAmount(
order,
remainingFillableTakerAssetAmount,
);
const newOrder = {
...order,
remainingFillableMakerAssetAmount,
};
return newOrder;
});
return result;
}
/**
* Instantiates a new StandardRelayerAPIOrderProvider instance
* @param apiUrl The standard relayer API base HTTP url you would like to source orders from.
* @param networkId The ethereum network id.
* @return An instance of StandardRelayerAPIOrderProvider
*/
constructor(apiUrl: string, networkId: number) {
assert.isWebUri('apiUrl', apiUrl);
assert.isNumber('networkId', networkId);
this.apiUrl = apiUrl;
this.networkId = networkId;
this._sraClient = new HttpClient(apiUrl);
}
/**
* Given an object that conforms to OrderProviderRequest, return the corresponding OrderProviderResponse that satisfies the request.
* @param orderProviderRequest An instance of OrderProviderRequest. See type for more information.
* @return An instance of OrderProviderResponse. See type for more information.
*/
public async getOrdersAsync(orderProviderRequest: OrderProviderRequest): Promise<OrderProviderResponse> {
assert.isValidOrderProviderRequest('orderProviderRequest', orderProviderRequest);
const { makerAssetData, takerAssetData } = orderProviderRequest;
const orderbookRequest = { baseAssetData: makerAssetData, quoteAssetData: takerAssetData };
const requestOpts = { networkId: this.networkId };
let orderbook: OrderbookResponse;
try {
orderbook = await this._sraClient.getOrderbookAsync(orderbookRequest, requestOpts);
} catch (err) {
throw new Error(AssetBuyerError.StandardRelayerApiError);
}
const apiOrders = orderbook.asks.records;
const orders = StandardRelayerAPIOrderProvider._getSignedOrderWithRemainingFillableMakerAssetAmountFromApi(
apiOrders,
);
return {
orders,
};
}
/**
* Given a taker asset data string, return all availabled paired maker asset data strings.
* @param takerAssetData A string representing the taker asset data.
* @return An array of asset data strings that can be purchased using takerAssetData.
*/
public async getAvailableMakerAssetDatasAsync(takerAssetData: string): Promise<string[]> {
// Return a maximum of 1000 asset datas
const maxPerPage = 1000;
const requestOpts = { networkId: this.networkId, perPage: maxPerPage };
const assetPairsRequest = { assetDataA: takerAssetData };
const fullRequest = {
...requestOpts,
...assetPairsRequest,
};
let response: AssetPairsResponse;
try {
response = await this._sraClient.getAssetPairsAsync(fullRequest);
} catch (err) {
throw new Error(AssetBuyerError.StandardRelayerApiError);
}
return _.map(response.records, item => item.assetDataB.assetData);
}
}

View File

@@ -0,0 +1,123 @@
import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
/**
* makerAssetData: The assetData representing the desired makerAsset.
* takerAssetData: The assetData representing the desired takerAsset.
* networkId: The networkId that the desired orders should be for.
*/
export interface OrderProviderRequest {
makerAssetData: string;
takerAssetData: string;
}
/**
* orders: An array of orders with optional remaining fillable makerAsset amounts. See type for more info.
*/
export interface OrderProviderResponse {
orders: SignedOrderWithRemainingFillableMakerAssetAmount[];
}
/**
* A normal SignedOrder with one extra optional property `remainingFillableMakerAssetAmount`
* remainingFillableMakerAssetAmount: The amount of the makerAsset that is available to be filled
*/
export interface SignedOrderWithRemainingFillableMakerAssetAmount extends SignedOrder {
remainingFillableMakerAssetAmount?: BigNumber;
}
/**
* gerOrdersAsync: Given an OrderProviderRequest, get an OrderProviderResponse.
* getAvailableMakerAssetDatasAsync: Given a taker asset data string, return all availabled paired maker asset data strings.
*/
export interface OrderProvider {
getOrdersAsync: (orderProviderRequest: OrderProviderRequest) => Promise<OrderProviderResponse>;
getAvailableMakerAssetDatasAsync: (takerAssetData: string) => Promise<string[]>;
}
/**
* assetData: String that represents a specific asset (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
* assetBuyAmount: The amount of asset to buy.
* orders: An array of objects conforming to SignedOrder. These orders can be used to cover the requested assetBuyAmount plus slippage.
* feeOrders: An array of objects conforming to SignedOrder. These orders can be used to cover the fees for the orders param above.
* feePercentage: Optional affiliate fee percentage used to calculate the eth amounts above.
* bestCaseQuoteInfo: Info about the best case price for the asset.
* worstCaseQuoteInfo: Info about the worst case price for the asset.
*/
export interface BuyQuote {
assetData: string;
assetBuyAmount: BigNumber;
orders: SignedOrder[];
feeOrders: SignedOrder[];
feePercentage?: number;
bestCaseQuoteInfo: BuyQuoteInfo;
worstCaseQuoteInfo: BuyQuoteInfo;
}
/**
* assetEthAmount: The amount of eth required to pay for the requested asset.
* feeEthAmount: The amount of eth required to pay the affiliate fee.
* totalEthAmount: The total amount of eth required to complete the buy (filling orders, feeOrders, and paying affiliate fee).
*/
export interface BuyQuoteInfo {
assetEthAmount: BigNumber;
feeEthAmount: BigNumber;
totalEthAmount: BigNumber;
}
/**
* feePercentage: The affiliate fee percentage. Defaults to 0.
* shouldForceOrderRefresh: If set to true, new orders and state will be fetched instead of waiting for the next orderRefreshIntervalMs. Defaults to false.
* slippagePercentage: The percentage buffer to add to account for slippage. Affects max ETH price estimates. Defaults to 0.2 (20%).
*/
export interface BuyQuoteRequestOpts {
feePercentage: number;
shouldForceOrderRefresh: boolean;
slippagePercentage: number;
}
/**
* ethAmount: The desired amount of eth to spend. Defaults to buyQuote.worstCaseQuoteInfo.totalEthAmount.
* takerAddress: The address to perform the buy. Defaults to the first available address from the provider.
* gasLimit: The amount of gas to send with a transaction (in Gwei). Defaults to an eth_estimateGas rpc call.
* gasPrice: Gas price in Wei to use for a transaction
* feeRecipient: The address where affiliate fees are sent. Defaults to null address (0x000...000).
*/
export interface BuyQuoteExecutionOpts {
ethAmount?: BigNumber;
takerAddress?: string;
gasLimit?: number;
gasPrice?: BigNumber;
feeRecipient: string;
}
/**
* networkId: The ethereum network id. Defaults to 1 (mainnet).
* orderRefreshIntervalMs: The interval in ms that getBuyQuoteAsync should trigger an refresh of orders and order states. Defaults to 10000ms (10s).
* expiryBufferSeconds: The number of seconds to add when calculating whether an order is expired or not. Defaults to 300s (5m).
*/
export interface AssetBuyerOpts {
networkId: number;
orderRefreshIntervalMs: number;
expiryBufferSeconds: number;
}
/**
* Possible errors thrown by an AssetBuyer instance or associated static methods.
*/
export enum AssetBuyerError {
NoEtherTokenContractFound = 'NO_ETHER_TOKEN_CONTRACT_FOUND',
NoZrxTokenContractFound = 'NO_ZRX_TOKEN_CONTRACT_FOUND',
StandardRelayerApiError = 'STANDARD_RELAYER_API_ERROR',
InsufficientAssetLiquidity = 'INSUFFICIENT_ASSET_LIQUIDITY',
InsufficientZrxLiquidity = 'INSUFFICIENT_ZRX_LIQUIDITY',
NoAddressAvailable = 'NO_ADDRESS_AVAILABLE',
InvalidOrderProviderResponse = 'INVALID_ORDER_PROVIDER_RESPONSE',
AssetUnavailable = 'ASSET_UNAVAILABLE',
SignatureRequestDenied = 'SIGNATURE_REQUEST_DENIED',
TransactionValueTooLow = 'TRANSACTION_VALUE_TOO_LOW',
}
export interface OrdersAndFillableAmounts {
orders: SignedOrder[];
remainingFillableMakerAssetAmounts: BigNumber[];
}

View File

@@ -0,0 +1,39 @@
import { assert as sharedAssert } from '@0x/assert';
import { schemas } from '@0x/json-schemas';
import * as _ from 'lodash';
import { BuyQuote, BuyQuoteInfo, OrderProvider, OrderProviderRequest } from '../types';
export const assert = {
...sharedAssert,
isValidBuyQuote(variableName: string, buyQuote: BuyQuote): void {
sharedAssert.isHexString(`${variableName}.assetData`, buyQuote.assetData);
sharedAssert.doesConformToSchema(`${variableName}.orders`, buyQuote.orders, schemas.signedOrdersSchema);
sharedAssert.doesConformToSchema(`${variableName}.feeOrders`, buyQuote.feeOrders, schemas.signedOrdersSchema);
assert.isValidBuyQuoteInfo(`${variableName}.bestCaseQuoteInfo`, buyQuote.bestCaseQuoteInfo);
assert.isValidBuyQuoteInfo(`${variableName}.worstCaseQuoteInfo`, buyQuote.worstCaseQuoteInfo);
sharedAssert.isBigNumber(`${variableName}.assetBuyAmount`, buyQuote.assetBuyAmount);
if (!_.isUndefined(buyQuote.feePercentage)) {
sharedAssert.isNumber(`${variableName}.feePercentage`, buyQuote.feePercentage);
}
},
isValidBuyQuoteInfo(variableName: string, buyQuoteInfo: BuyQuoteInfo): void {
sharedAssert.isBigNumber(`${variableName}.assetEthAmount`, buyQuoteInfo.assetEthAmount);
sharedAssert.isBigNumber(`${variableName}.feeEthAmount`, buyQuoteInfo.feeEthAmount);
sharedAssert.isBigNumber(`${variableName}.totalEthAmount`, buyQuoteInfo.totalEthAmount);
},
isValidOrderProvider(variableName: string, orderFetcher: OrderProvider): void {
sharedAssert.isFunction(`${variableName}.getOrdersAsync`, orderFetcher.getOrdersAsync);
},
isValidOrderProviderRequest(variableName: string, orderFetcherRequest: OrderProviderRequest): void {
sharedAssert.isHexString(`${variableName}.makerAssetData`, orderFetcherRequest.makerAssetData);
sharedAssert.isHexString(`${variableName}.takerAssetData`, orderFetcherRequest.takerAssetData);
},
isValidPercentage(variableName: string, percentage: number): void {
assert.isNumber(variableName, percentage);
assert.assert(
percentage >= 0 && percentage <= 1,
`Expected ${variableName} to be between 0 and 1, but is ${percentage}`,
);
},
};

View File

@@ -0,0 +1,12 @@
import { ContractWrappers } from '@0x/contract-wrappers';
import { assetDataUtils as sharedAssetDataUtils } from '@0x/order-utils';
import * as _ from 'lodash';
export const assetDataUtils = {
...sharedAssetDataUtils,
getEtherTokenAssetData(contractWrappers: ContractWrappers): string {
const etherTokenAddress = contractWrappers.forwarder.etherTokenAddress;
const etherTokenAssetData = sharedAssetDataUtils.encodeERC20AssetData(etherTokenAddress);
return etherTokenAssetData;
},
};

View File

@@ -0,0 +1,207 @@
import { marketUtils, SignedOrder } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { constants } from '../constants';
import { AssetBuyerError, BuyQuote, BuyQuoteInfo, OrdersAndFillableAmounts } from '../types';
import { orderUtils } from './order_utils';
// Calculates a buy quote for orders that have WETH as the takerAsset
export const buyQuoteCalculator = {
calculate(
ordersAndFillableAmounts: OrdersAndFillableAmounts,
feeOrdersAndFillableAmounts: OrdersAndFillableAmounts,
assetBuyAmount: BigNumber,
feePercentage: number,
slippagePercentage: number,
isMakerAssetZrxToken: boolean,
): BuyQuote {
const orders = ordersAndFillableAmounts.orders;
const remainingFillableMakerAssetAmounts = ordersAndFillableAmounts.remainingFillableMakerAssetAmounts;
const feeOrders = feeOrdersAndFillableAmounts.orders;
const remainingFillableFeeAmounts = feeOrdersAndFillableAmounts.remainingFillableMakerAssetAmounts;
const slippageBufferAmount = assetBuyAmount.mul(slippagePercentage).round();
// find the orders that cover the desired assetBuyAmount (with slippage)
const {
resultOrders,
remainingFillAmount,
ordersRemainingFillableMakerAssetAmounts,
} = marketUtils.findOrdersThatCoverMakerAssetFillAmount(orders, assetBuyAmount, {
remainingFillableMakerAssetAmounts,
slippageBufferAmount,
});
// if we do not have enough orders to cover the desired assetBuyAmount, throw
if (remainingFillAmount.gt(constants.ZERO_AMOUNT)) {
throw new Error(AssetBuyerError.InsufficientAssetLiquidity);
}
// if we are not buying ZRX:
// given the orders calculated above, find the fee-orders that cover the desired assetBuyAmount (with slippage)
// TODO(bmillman): optimization
// update this logic to find the minimum amount of feeOrders to cover the worst case as opposed to
// finding order that cover all fees, this will help with estimating ETH and minimizing gas usage
let resultFeeOrders = [] as SignedOrder[];
let feeOrdersRemainingFillableMakerAssetAmounts = [] as BigNumber[];
if (!isMakerAssetZrxToken) {
const feeOrdersAndRemainingFeeAmount = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
resultOrders,
feeOrders,
{
remainingFillableMakerAssetAmounts: ordersRemainingFillableMakerAssetAmounts,
remainingFillableFeeAmounts,
},
);
// if we do not have enough feeOrders to cover the fees, throw
if (feeOrdersAndRemainingFeeAmount.remainingFeeAmount.gt(constants.ZERO_AMOUNT)) {
throw new Error(AssetBuyerError.InsufficientZrxLiquidity);
}
resultFeeOrders = feeOrdersAndRemainingFeeAmount.resultFeeOrders;
feeOrdersRemainingFillableMakerAssetAmounts =
feeOrdersAndRemainingFeeAmount.feeOrdersRemainingFillableMakerAssetAmounts;
}
// assetData information for the result
const assetData = orders[0].makerAssetData;
// compile the resulting trimmed set of orders for makerAsset and feeOrders that are needed for assetBuyAmount
const trimmedOrdersAndFillableAmounts: OrdersAndFillableAmounts = {
orders: resultOrders,
remainingFillableMakerAssetAmounts: ordersRemainingFillableMakerAssetAmounts,
};
const trimmedFeeOrdersAndFillableAmounts: OrdersAndFillableAmounts = {
orders: resultFeeOrders,
remainingFillableMakerAssetAmounts: feeOrdersRemainingFillableMakerAssetAmounts,
};
const bestCaseQuoteInfo = calculateQuoteInfo(
trimmedOrdersAndFillableAmounts,
trimmedFeeOrdersAndFillableAmounts,
assetBuyAmount,
feePercentage,
isMakerAssetZrxToken,
);
// in order to calculate the maxRate, reverse the ordersAndFillableAmounts such that they are sorted from worst rate to best rate
const worstCaseQuoteInfo = calculateQuoteInfo(
reverseOrdersAndFillableAmounts(trimmedOrdersAndFillableAmounts),
reverseOrdersAndFillableAmounts(trimmedFeeOrdersAndFillableAmounts),
assetBuyAmount,
feePercentage,
isMakerAssetZrxToken,
);
return {
assetData,
orders: resultOrders,
feeOrders: resultFeeOrders,
bestCaseQuoteInfo,
worstCaseQuoteInfo,
assetBuyAmount,
feePercentage,
};
},
};
function calculateQuoteInfo(
ordersAndFillableAmounts: OrdersAndFillableAmounts,
feeOrdersAndFillableAmounts: OrdersAndFillableAmounts,
assetBuyAmount: BigNumber,
feePercentage: number,
isMakerAssetZrxToken: boolean,
): BuyQuoteInfo {
// find the total eth and zrx needed to buy assetAmount from the resultOrders from left to right
let assetEthAmount = constants.ZERO_AMOUNT;
let zrxEthAmount = constants.ZERO_AMOUNT;
if (isMakerAssetZrxToken) {
assetEthAmount = findEthAmountNeededToBuyZrx(ordersAndFillableAmounts, assetBuyAmount);
} else {
// find eth and zrx amounts needed to buy
const ethAndZrxAmountToBuyAsset = findEthAndZrxAmountNeededToBuyAsset(ordersAndFillableAmounts, assetBuyAmount);
assetEthAmount = ethAndZrxAmountToBuyAsset[0];
const zrxAmountToBuyAsset = ethAndZrxAmountToBuyAsset[1];
// find eth amount needed to buy zrx
zrxEthAmount = findEthAmountNeededToBuyZrx(feeOrdersAndFillableAmounts, zrxAmountToBuyAsset);
}
// eth amount needed to buy the affiliate fee
const affiliateFeeEthAmount = assetEthAmount.mul(feePercentage).ceil();
// eth amount needed for fees is the sum of affiliate fee and zrx fee
const feeEthAmount = affiliateFeeEthAmount.plus(zrxEthAmount);
// eth amount needed in total is the sum of the amount needed for the asset and the amount needed for fees
const totalEthAmount = assetEthAmount.plus(feeEthAmount);
return {
assetEthAmount,
feeEthAmount,
totalEthAmount,
};
}
// given an OrdersAndFillableAmounts, reverse the orders and remainingFillableMakerAssetAmounts properties
function reverseOrdersAndFillableAmounts(ordersAndFillableAmounts: OrdersAndFillableAmounts): OrdersAndFillableAmounts {
const ordersCopy = _.clone(ordersAndFillableAmounts.orders);
const remainingFillableMakerAssetAmountsCopy = _.clone(ordersAndFillableAmounts.remainingFillableMakerAssetAmounts);
return {
orders: ordersCopy.reverse(),
remainingFillableMakerAssetAmounts: remainingFillableMakerAssetAmountsCopy.reverse(),
};
}
function findEthAmountNeededToBuyZrx(
feeOrdersAndFillableAmounts: OrdersAndFillableAmounts,
zrxBuyAmount: BigNumber,
): BigNumber {
const { orders, remainingFillableMakerAssetAmounts } = feeOrdersAndFillableAmounts;
const result = _.reduce(
orders,
(acc, order, index) => {
const { totalEthAmount, remainingZrxBuyAmount } = acc;
const remainingFillableMakerAssetAmount = remainingFillableMakerAssetAmounts[index];
const makerFillAmount = BigNumber.min(remainingZrxBuyAmount, remainingFillableMakerAssetAmount);
const [takerFillAmount, adjustedMakerFillAmount] = orderUtils.getTakerFillAmountForFeeOrder(
order,
makerFillAmount,
);
const extraFeeAmount = remainingFillableMakerAssetAmount.greaterThanOrEqualTo(adjustedMakerFillAmount)
? constants.ZERO_AMOUNT
: adjustedMakerFillAmount.sub(makerFillAmount);
return {
totalEthAmount: totalEthAmount.plus(takerFillAmount),
remainingZrxBuyAmount: BigNumber.max(
constants.ZERO_AMOUNT,
remainingZrxBuyAmount.minus(makerFillAmount).plus(extraFeeAmount),
),
};
},
{
totalEthAmount: constants.ZERO_AMOUNT,
remainingZrxBuyAmount: zrxBuyAmount,
},
);
return result.totalEthAmount;
}
function findEthAndZrxAmountNeededToBuyAsset(
ordersAndFillableAmounts: OrdersAndFillableAmounts,
assetBuyAmount: BigNumber,
): [BigNumber, BigNumber] {
const { orders, remainingFillableMakerAssetAmounts } = ordersAndFillableAmounts;
const result = _.reduce(
orders,
(acc, order, index) => {
const { totalEthAmount, totalZrxAmount, remainingAssetBuyAmount } = acc;
const remainingFillableMakerAssetAmount = remainingFillableMakerAssetAmounts[index];
const makerFillAmount = BigNumber.min(acc.remainingAssetBuyAmount, remainingFillableMakerAssetAmount);
const takerFillAmount = orderUtils.getTakerFillAmount(order, makerFillAmount);
const takerFeeAmount = orderUtils.getTakerFeeAmount(order, takerFillAmount);
return {
totalEthAmount: totalEthAmount.plus(takerFillAmount),
totalZrxAmount: totalZrxAmount.plus(takerFeeAmount),
remainingAssetBuyAmount: BigNumber.max(
constants.ZERO_AMOUNT,
remainingAssetBuyAmount.minus(makerFillAmount),
),
};
},
{
totalEthAmount: constants.ZERO_AMOUNT,
totalZrxAmount: constants.ZERO_AMOUNT,
remainingAssetBuyAmount: assetBuyAmount,
},
);
return [result.totalEthAmount, result.totalZrxAmount];
}

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