Compare commits

...

366 Commits

Author SHA1 Message Date
Jacob Evans
4861e48059 Publish
- 0x.js@2.0.6
 - @0x/abi-gen-templates@1.0.1
 - @0x/abi-gen-wrappers@2.0.0
 - @0x/asset-buyer@3.0.2
 - @0x/base-contract@3.0.8
 - @0x/connect@3.0.8
 - @0x/contract-addresses@2.0.0
 - @0x/contract-artifacts@1.1.2
 - @0x/contract-wrappers@4.1.1
 - contracts@2.1.56
 - @0x/dev-tools-pages@0.0.8
 - @0x/dev-utils@1.0.19
 - @0x/fill-scenarios@1.0.14
 - @0x/instant@1.0.2
 - @0x/metacoin@0.0.30
 - @0x/migrations@2.2.0
 - @0x/order-utils@3.0.4
 - @0x/order-watcher@2.2.6
 - @0x/react-docs@1.0.20
 - @0x/react-shared@1.0.23
 - @0x/sol-compiler@1.1.14
 - @0x/sol-cov@2.1.14
 - @0x/sol-doc@1.0.9
 - @0x/subproviders@2.1.6
 - @0x/testnet-faucets@1.0.58
 - @0x/web3-wrapper@3.1.6
 - @0x/website@0.0.61
2018-11-28 21:49:55 +11:00
Jacob Evans
c0b9214138 Updated CHANGELOGS 2018-11-28 21:49:26 +11:00
Jacob Evans
9266df43a4 chore: Add Ganache to NetworkId enum 2018-11-28 20:08:34 +11:00
Jacob Evans
dac0bee95c Merge pull request #1318 from 0xProject/bug/testnets/rinkeby-exchange
[testnet][contract-addresses] Rinkeby and Ganache
2018-11-28 16:06:44 +11:00
Jacob Evans
494adedeef chore: Update CHANGELOG 2018-11-28 10:17:15 +11:00
Jacob Evans
f0ed0c6a35 chore: Redeploy Rinkeby using testnet Exchange contract. Add Ganache contract addresses back 2018-11-28 10:17:09 +11:00
Steve Klebanoff
47a87e57f1 Merge pull request #1335 from 0xProject/feature/instant/dropdown-analytics
[instant] Add analytics events for payment dropdown
2018-11-27 13:31:02 -08:00
F. Eugene Aumson
768c28f328 fix(order_utils.py): unpin pylint version (#1337)
The version was pinned in order to work around a bug in pylint.  That
bug has been fixed and released.
2018-11-27 14:49:28 -05:00
Steve Klebanoff
96a46bcb4b Merge branch 'development' into feature/instant/dropdown-analytics 2018-11-27 11:10:20 -08:00
Steve Klebanoff
4653e4c011 Merge pull request #1336 from 0xProject/fix/instant/clipboard
[instant] Fix copy to clipboard
2018-11-27 10:48:26 -08:00
Brandon Millman
372a242ea2 Merge pull request #1327 from 0xProject/feature/instant/events-buy
[instant] Add buy events to instant
2018-11-27 10:46:10 -08:00
Steve Klebanoff
fb1893626f Merge pull request #1330 from 0xProject/feature/instant/stable-css-classes
[instant] Add stable CSS classes
2018-11-27 10:42:05 -08:00
Steve Klebanoff
5fd837cc4f Merge branch 'development' into feature/instant/dropdown-analytics 2018-11-27 10:38:26 -08:00
Steve Klebanoff
435e62a94d fix(instant): Fix copy to clipboard 2018-11-27 10:32:54 -08:00
Brandon Millman
598db72523 Merge branch 'development' into feature/instant/events-buy
* development:
  Make explicit functions
  Linting
  Fix props
  Set selected asset to none
  Track numberAvailableAssets, selectedAssetName, selectedAssetData event properties
  Fix dupe merge issue
  feat(instant): Event tracking for token selector
  Token selector searched
  Token Selector open, closed, chose
2018-11-27 10:29:45 -08:00
Steve Klebanoff
4ebc561986 Merge branch 'development' into feature/instant/stable-css-classes 2018-11-27 10:24:12 -08:00
Steve Klebanoff
d23fd23e91 Merge pull request #1329 from 0xProject/feature/instant/token-picker-events
[instant] Token Selector events
2018-11-27 10:23:28 -08:00
Brandon Millman
6e2523625f feat(instant): change event properties to ms times instead of unix timestamps 2018-11-27 10:17:59 -08:00
Steve Klebanoff
23274f9b48 Merge branch 'development' into feature/instant/token-picker-events 2018-11-27 10:10:22 -08:00
Brandon Millman
7efa71eaf6 Merge branch 'development' into feature/instant/events-buy
* development:
  fix(instant): make package private
  Add stale bot config
2018-11-27 10:06:39 -08:00
Steve Klebanoff
9c27feeff6 Make explicit functions 2018-11-27 10:00:21 -08:00
Steve Klebanoff
be787a0fd1 feat(instant): Add analytics events for payment dropdown 2018-11-27 09:50:56 -08:00
Steve Klebanoff
ee5b6ad77f Linting 2018-11-27 09:16:26 -08:00
Steve Klebanoff
e08fb72cf1 Use constants 2018-11-27 09:01:49 -08:00
Leonid Logvinov
fdc4a4e5fa Merge pull request #1325 from 0xProject/feature/stale
Add stale bot config
2018-11-27 13:21:43 +01:00
Brandon Millman
ef2c5159dd fix(instant): make package private 2018-11-27 01:20:09 -08:00
Brandon Millman
f0f991245c Merge branch 'development' into feature/instant/events-buy
* development:
  fix: add --exclude-missing flag to yarn clean command
  Update CHANGELOG
  fix: remove getApproved check from OrderValidator since approval is removed after a single transfer
  Add comment
  Force scaling input component to rerender when a different asset is chosen
  Send in explicit props
  feat(instant): Add more event properties to heap
  Move out generating of event properties, and send in orderSource
  autofocus -> hasAutoFocus
  fix(instant): Right align amounts
  fix(instant): Autofocus text amount input
2018-11-26 23:11:05 -08:00
Brandon Millman
d3b0162dc9 feat(instant): add expectedEndTimeUnix and actualEndTimeUnix to buy events 2018-11-26 23:08:20 -08:00
Steve Klebanoff
f3d08c13eb Add stable CSS classes 2018-11-26 17:13:35 -08:00
Amir Bandeali
10cc46779e Merge pull request #1149 from 0xProject/fix/contracts/orderValidator
fix: remove getApproved check from OrderValidator
2018-11-26 17:06:10 -08:00
Steve Klebanoff
80a53aedf2 Fix props 2018-11-26 16:53:50 -08:00
Steve Klebanoff
1b96867df8 Merge pull request #1294 from 0xProject/feature/header-tweaks
[instant] Header tweaks
2018-11-26 16:01:04 -08:00
Steve Klebanoff
0192127e5d Set selected asset to none 2018-11-26 15:53:39 -08:00
Steve Klebanoff
7610130f73 Track numberAvailableAssets, selectedAssetName, selectedAssetData event properties 2018-11-26 15:51:40 -08:00
Amir Bandeali
218c0d9f51 Merge pull request #1326 from 0xProject/fix/yarnClean
fix: add --exclude-missing flag to yarn clean command
2018-11-26 15:29:43 -08:00
Steve Klebanoff
d5898a3a05 Fix dupe merge issue 2018-11-26 15:12:51 -08:00
Steve Klebanoff
b055055253 Merge branch 'development' into feature/instant/token-picker-events 2018-11-26 15:11:16 -08:00
Steve Klebanoff
6e3d70af56 Merge pull request #1299 from 0xProject/feature/instant/open-close-events
[instant] Add more event properties
2018-11-26 15:10:50 -08:00
Steve Klebanoff
ae570dba05 feat(instant): Event tracking for token selector 2018-11-26 15:04:02 -08:00
Brandon Millman
2795849dd3 feat(instant): add buyQuote properties to buy events 2018-11-26 14:49:50 -08:00
Brandon Millman
fad48b8b6c feat(instant): add txHash to relevant buy events 2018-11-26 14:48:07 -08:00
Brandon Millman
685d83d6d0 feat(instant): implement buy events without associated properties 2018-11-26 14:48:07 -08:00
Steve Klebanoff
9206f2d288 Token selector searched 2018-11-26 13:27:40 -08:00
Steve Klebanoff
2fec7613c4 Token Selector open, closed, chose 2018-11-26 13:20:16 -08:00
Amir Bandeali
2f026cd1b6 fix: add --exclude-missing flag to yarn clean command 2018-11-26 13:11:30 -08:00
Steve Klebanoff
6eec84d21b Merge branch 'development' into feature/instant/open-close-events 2018-11-26 13:07:02 -08:00
Steve Klebanoff
5f6a5e28e7 Merge branch 'development' into feature/header-tweaks 2018-11-26 13:06:36 -08:00
fragosti
825911ed89 feat: Add Xianny to about page 2018-11-26 13:15:32 -05:00
Leonid Logvinov
a72d418ddb Add stale bot config 2018-11-26 19:07:55 +01:00
Amir Bandeali
cf5fd8ff42 Update CHANGELOG 2018-11-26 09:47:55 -08:00
Amir Bandeali
994c6032bb fix: remove getApproved check from OrderValidator since approval is removed after a single transfer 2018-11-26 09:45:38 -08:00
Steve Klebanoff
1494a70bad Merge branch 'development' into feature/instant/open-close-events 2018-11-26 09:02:16 -08:00
Fabio B
6d565f4bff Merge pull request #1324 from 0xProject/addCommandLineInterfaceToMigrations
Add CLI interface to @0x/migrations
2018-11-26 16:14:16 +00:00
Fabio Berger
c6592148a7 Rename node-endpoint to rpc-url for clarity 2018-11-26 15:57:49 +00:00
Fabio Berger
6e39f11db1 Merge branch 'development' into addCommandLineInterfaceToMigrations
* development:
  fix(order_utils.py): work aroud pylint bug (#1322)
2018-11-26 15:18:41 +00:00
F. Eugene Aumson
ee86cd1dcc fix(order_utils.py): work aroud pylint bug (#1322) 2018-11-26 10:18:02 -05:00
Fabio Berger
420a677828 merge development 2018-11-26 15:08:57 +00:00
Fabio Berger
9da43878b1 Add CHANGELOG entry to migrations 2018-11-26 15:04:27 +00:00
Fabio Berger
527f074e59 Fix typo 2018-11-26 15:03:58 +00:00
Fabio Berger
eefd9d9dd2 Add command-line interface to @0x/migrations 2018-11-26 14:59:27 +00:00
Leonid Logvinov
2648f5ba65 Merge pull request #1323 from 0xProject/feature/contributing-autolabeler
Remove the instruction to prefix PRs with package name from PULL_REQUEST_TEMPLATE.md
2018-11-26 15:54:50 +01:00
Leonid Logvinov
1b45aa5974 Remove the instruction to prefix PRs with package name from a/PULL_REQUEST_TEMPLATE.md 2018-11-26 15:52:04 +01:00
Leonid Logvinov
dcf19e5226 Merge pull request #1320 from 0xProject/feature/autolabeler
Add autolabeler config
2018-11-26 15:42:48 +01:00
Leonid Logvinov
c5c852f54f Add autolabeler config 2018-11-26 15:38:18 +01:00
Leonid Logvinov
7b15217694 Merge pull request #1305 from 0xProject/feature/contract-templates
[@0x/contract-templates] Make contract-templates an npm package
2018-11-26 14:12:13 +01:00
Leonid Logvinov
8caded1d1d Merge pull request #1319 from 0xProject/revert-1312-feature/build-fix-instant
Revert "[@0x/instant] Fix CI build broken by instant installation tests"
2018-11-26 14:11:04 +01:00
Leonid Logvinov
ebc3116909 Revert "[@0x/instant] Fix CI build broken by instant installation tests" 2018-11-26 14:09:24 +01:00
Leonid Logvinov
387d7199d1 Merge pull request #1312 from 0xProject/feature/build-fix-instant
[@0x/instant] Fix CI build broken by instant installation tests
2018-11-26 14:00:25 +01:00
Jacob Evans
dc965da64e Merge pull request #1309 from 0xProject/bug/contract-artifacts/testnet-exchange
[contract-artifacts] Use Testnet Exchange artifact
2018-11-26 21:23:19 +11:00
Jacob Evans
1d83d99d87 Merge pull request #1308 from 0xProject/bug/web3-wrapper/unmarshall-parity-receipt
[web3-wrapper] Only unmarshall receipt if blockNumber present
2018-11-26 21:21:36 +11:00
Jacob Evans
09a683557b chore: Update CHANGELOGS use mainnet ZRX amount in Forwarder. 2018-11-26 09:57:43 +11:00
Jacob Evans
99e92a346b chore: Fund forwarder in migrations 2018-11-26 09:37:31 +11:00
Leonid Logvinov
9ddd45e2c6 Rename contract-templates to abi-gen-templates 2018-11-23 15:22:16 +01:00
Leonid Logvinov
0c0a1db114 Fix the lerna paremeter name from cdVersions to cd-versions 2018-11-23 14:51:21 +01:00
Leonid Logvinov
b1474973cd Copy assets in referenced in instant on commonjs build 2018-11-23 14:48:49 +01:00
Jacob Evans
f0f6b26c3b bug: Use Testnet Exchange over mainnet 2018-11-23 18:17:51 +11:00
Jacob Evans
03b3b80a65 bug: Only unmarshall receipt if blockNumber present.
https://github.com/paritytech/parity-ethereum/issues/1180
Parity can return a pending transaction receipt with a number of null values
2018-11-23 15:31:00 +11:00
Leonid Logvinov
06cc66005c Make contract-templates an npm package 2018-11-22 14:48:15 +01:00
Steve Klebanoff
b0792a85a4 Add comment 2018-11-21 14:33:12 -08:00
Francesco Agosti
a5359df002 Merge pull request #1281 from 0xProject/feature/instant/push-to-history
[instant] Close/open Instant on correct history changes. Provide option to disable.
2018-11-21 17:24:48 -05:00
Steve Klebanoff
10c9d0b723 Force scaling input component to rerender when a different asset is chosen 2018-11-21 14:24:13 -08:00
Brandon Millman
5c81f07d46 Merge pull request #1300 from 0xProject/feature/instant/events-account
[instant] Implement account related events
2018-11-21 14:20:01 -08:00
Steve Klebanoff
0adc8f5053 Merge branch 'development' into feature/header-tweaks 2018-11-21 14:14:27 -08:00
Brandon Millman
804de89796 chore(instant): revert usage of event properties 2018-11-21 13:52:55 -08:00
Brandon Millman
6604e2db20 chore(instant): refactor usage of event properties in heap 2018-11-21 13:16:34 -08:00
Fabio Berger
f46a49fd13 Publish
- 0x.js@2.0.5
 - @0x/abi-gen@1.0.17
 - @0x/abi-gen-wrappers@1.1.0
 - @0x/assert@1.0.18
 - @0x/asset-buyer@3.0.1
 - @0x/base-contract@3.0.7
 - @0x/connect@3.0.7
 - @0x/contract-addresses@1.2.0
 - @0x/contract-wrappers@4.1.0
 - contracts@2.1.55
 - @0x/dev-tools-pages@0.0.7
 - @0x/dev-utils@1.0.18
 - @0x/fill-scenarios@1.0.13
 - @0x/instant@1.0.1
 - @0x/json-schemas@2.1.2
 - @0x/metacoin@0.0.29
 - @0x/migrations@2.1.0
 - @0x/monorepo-scripts@1.0.14
 - @0x/order-utils@3.0.3
 - @0x/order-watcher@2.2.5
 - @0x/react-docs@1.0.19
 - @0x/react-shared@1.0.22
 - @0x/sol-compiler@1.1.13
 - @0x/sol-cov@2.1.13
 - @0x/sol-doc@1.0.8
 - @0x/sol-resolver@1.0.17
 - @0x/sra-spec@1.0.11
 - @0x/subproviders@2.1.5
 - @0x/testnet-faucets@1.0.57
 - @0x/types@1.3.0
 - @0x/utils@2.0.6
 - @0x/web3-wrapper@3.1.5
 - @0x/website@0.0.60
2018-11-21 21:09:47 +00:00
Fabio Berger
707af1ec58 Updated CHANGELOGS 2018-11-21 21:09:37 +00:00
Brandon Millman
31d1b4ba67 chore(instant): refactor account tracking logic in middleware to be more readable 2018-11-21 12:30:52 -08:00
Steve Klebanoff
d750225554 Send in explicit props 2018-11-21 11:10:17 -08:00
fragosti
ed91c6c874 fix: multiple render and closes edge case for onpopstate render 2018-11-21 12:44:28 -05: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
fragosti
b494a4a4db chore: clean up index.umd.ts a bit 2018-11-21 11:55:32 -05:00
fragosti
e0beb7fb38 feat: add more to instant dev env 2018-11-21 11:42:07 -05:00
fragosti
fc123871ad Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/push-to-history 2018-11-21 10:43:36 -05:00
Fabio Berger
f27fef0295 Reduce title size 2018-11-21 15:17:04 +00:00
Fabio Berger
36974a9557 reduce text side in README 2018-11-21 15:16:26 +00:00
Fabio Berger
584dc6217d Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Add additional CHANGELOG to types package
  Add CHANGELOG entry
  Fix prettier
  Fix `SimpleContractArtifact` type
  Update abi-gen-wrappers
  Add @0x/types to dependencies of `@0x/abi-gen-wrappers`
  Allow a `SimpleContractArtifact` to be passed into `deployFrom0xArtifactAsync`
  Update issue template
  fix(instant): Use new valid svg image for instant
  isDisabled -> isInputDisabled
  Allow user to select other token on success
  fix: do not use document on import
  fix(instant): Don't allow changing of assets when order processing
  fix: npmignore file ignoring index.d.ts
  fix: specify new location of index.js in package.json
  feat: fix instant build and add to project references
  chore: make instant public
2018-11-21 15:14:26 +00:00
Fabio Berger
edf07d9b5b Improve top-level README 2018-11-21 15:13:58 +00:00
Francesco Agosti
f66b695a47 Merge pull request #1283 from 0xProject/feature/instant/make-instant-public-and-fix-publishing
[instant] Make package public and fix publishing
2018-11-21 06:38:21 -08:00
Fabio Berger
61b3305af3 Fix prettier 2018-11-21 13:26:58 +00:00
Fabio Berger
e2b3c98d25 remove unused flag 2018-11-21 11:56:45 +00:00
Fabio Berger
39429dde68 Add CHANGELOG entry 2018-11-21 11:54:24 +00:00
Fabio Berger
baf69a60eb Fix additional comments 2018-11-21 11:53:50 +00:00
Fabio Berger
a90be44c9f Improve comments 2018-11-21 11:48:07 +00:00
Fabio Berger
fb7ac81945 Add migrations, contract-addresses and contract-artifacts to Developers home 2018-11-21 11:47:45 +00:00
Fabio Berger
db26ca977f Create migrations doc reference page 2018-11-21 11:47:24 +00:00
Fabio B
a8803431b3 Merge pull request #1298 from 0xProject/fix/artifact-type-error
Fix Artifact Interface Type Issue
2018-11-21 11:16:26 +00:00
Fabio Berger
2821bac3a3 Add additional CHANGELOG to types package 2018-11-21 10:44:20 +00:00
Fabio Berger
716168132a Add CHANGELOG entry 2018-11-21 10:39:10 +00:00
Brandon Millman
351e0e6f5f feat(instant): implement account related events 2018-11-20 22:38:49 -08:00
Fabio Berger
0244d04a55 Fix prettier 2018-11-21 00:11:25 +00:00
Fabio Berger
895281989c Fix SimpleContractArtifact type 2018-11-20 23:43:05 +00:00
Fabio Berger
21f39079c8 Update abi-gen-wrappers 2018-11-20 23:42:35 +00:00
Fabio Berger
c2ebcfb023 Add @0x/types to dependencies of @0x/abi-gen-wrappers 2018-11-20 23:15:53 +00:00
Steve Klebanoff
15f05733be Merge pull request #1290 from 0xProject/fix/instant/disable-token-picker
[instant] Don't allow changing of assets when order in progress
2018-11-20 15:08:27 -08:00
Steve Klebanoff
7741edbbcc Merge pull request #1296 from 0xProject/fix/instant/svg-warning
[instant] Replace "Powered By 0x" svg
2018-11-20 15:08:07 -08:00
Steve Klebanoff
1593b94aac feat(instant): Add more event properties to heap 2018-11-20 15:07:37 -08:00
Fabio Berger
4b64d8c3aa Allow a SimpleContractArtifact to be passed into deployFrom0xArtifactAsync 2018-11-20 23:06:46 +00:00
Steve Klebanoff
6124d80c89 Move out generating of event properties, and send in orderSource 2018-11-20 14:59:23 -08:00
Fabio Berger
48aec9ef47 Update issue template 2018-11-20 22:38:36 +00:00
Steve Klebanoff
1a7b167f63 fix(instant): Use new valid svg image for instant 2018-11-20 14:23:55 -08:00
Steve Klebanoff
b7eb2e887d isDisabled -> isInputDisabled 2018-11-20 13:59:09 -08:00
Steve Klebanoff
eca63b1a58 Merge branch 'development' into feature/header-tweaks 2018-11-20 13:26:00 -08:00
Steve Klebanoff
2bda6dd719 autofocus -> hasAutoFocus 2018-11-20 10:36:23 -08:00
Steve Klebanoff
cd4600b081 fix(instant): Right align amounts 2018-11-20 10:20:16 -08:00
Steve Klebanoff
83f4fa92a5 fix(instant): Autofocus text amount input 2018-11-20 10:19:59 -08:00
Steve Klebanoff
7ad5dbc59d Allow user to select other token on success 2018-11-20 09:51:14 -08:00
Steve Klebanoff
ba41fc9275 Merge pull request #1272 from 0xProject/feature/instant/heap
[instant] Base heap integration
2018-11-20 09:23:34 -08:00
Steve Klebanoff
36e888c3a5 Merge pull request #1287 from 0xProject/feature/instant/add-powered-by
[instant] Add "Powered By 0x"
2018-11-20 09:05:28 -08:00
Leonid Logvinov
6939182348 Merge pull request #1292 from 0xProject/feature/nonce-tx-opts
Add `nonce` to `TxOpts`
2018-11-20 16:54:36 +01:00
Fabio B
7a38a196ad Update packages/contract-wrappers/src/types.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-11-20 16:42:49 +01:00
Fabio B
0c91bf1415 Update packages/contract-wrappers/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2018-11-20 16:32:34 +01:00
Leonid Logvinov
e1bc3f3f2d Add nonce to TxOpts 2018-11-20 15:59:33 +01:00
Leonid Logvinov
e5cfc94cd2 Merge pull request #1291 from 0xProject/feature/web3-unmarshalling
[@0x/web3-wrapper] Properly unmarshall `TransactionReceiptRPC` to `TransactionReceipt`
2018-11-20 15:37:48 +01:00
Leonid Logvinov
22cfdd9f0b Properly unmarshall TransactionReceiptRPC to TransactionReceipt 2018-11-20 15:22:06 +01:00
Steve Klebanoff
0ba34f587c Import via TS 2018-11-19 17:12:32 -08:00
Steve Klebanoff
e86982bd41 Add ability to import SVGs in TS 2018-11-19 17:12:21 -08:00
fragosti
6de499459c fix: do not use document on import 2018-11-19 17:10:47 -08:00
Steve Klebanoff
3169b72406 fix(instant): Don't allow changing of assets when order processing 2018-11-19 17:04:15 -08:00
Steve Klebanoff
db6b2cbb05 Fix linting 2018-11-19 16:38:56 -08:00
Steve Klebanoff
a1b7f0ad83 Use anchor instead of Text 2018-11-19 16:36:51 -08:00
fragosti
b62fbd0b13 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/push-to-history 2018-11-19 16:30:11 -08:00
Steve Klebanoff
578a46c57f feat(instant): Add powered by 0x image 2018-11-19 16:28:40 -08:00
fragosti
9ab55fd07d fix: npmignore file ignoring index.d.ts 2018-11-19 16:22:05 -08:00
Steve Klebanoff
497385818b Check for instant heap production credentials in pre-publish step 2018-11-19 15:38:09 -08:00
Steve Klebanoff
c30ae762bf Merge branch 'development' into feature/instant/heap 2018-11-19 14:48:36 -08:00
Brandon Millman
953f8c119b Merge pull request #1276 from 0xProject/test/instant/bundle-size
[asset-buyer][instant] downgrade lodash to be consistent with the rest of 0x packages
2018-11-19 12:44:06 -08:00
Brandon Millman
6119bd3115 Merge pull request #1271 from 0xProject/feature/instant/icons
[instant] Add icons to token selector
2018-11-19 12:41:50 -08:00
Steve Klebanoff
1880c7c27d Linting: rename variable 2018-11-19 12:14:27 -08:00
Steve Klebanoff
8772d91699 Get heap analytics id from ENV variable 2018-11-19 12:02:31 -08:00
Brandon Millman
9b725a645d feat(instant): support custom iconUrls 2018-11-19 10:12:40 -08:00
Steve Klebanoff
2bfd03e64f Change disabled analytics name, add assertion, and always set 2018-11-19 09:54:59 -08:00
Steve Klebanoff
e23f90b82c No need to explicit send in NODE_ENV 2018-11-19 09:48:34 -08:00
Steve Klebanoff
0648e270fe Merge branch 'development' into feature/instant/heap 2018-11-19 09:47:58 -08:00
Brandon Millman
3d6711bd38 Merge branch 'development' into feature/instant/icons
* development: (37 commits)
  Add 0x-order-utils.py library to developers home
  Fixes to CONTRIBUTING.md
  Improve our CONTRIBUTING.md instructions
  fix(order_utils.py): publish docs to S3, not RTD (#1264)
  fix: make instant package private
  feat: refer to map file in postpublish configs
  feat: add new bundle name to bundle watch
  fix: tslint ignore rule in wrong place
  Update blog post feature
  Fix disclaimer on mobile
  Add smart contract docs to Developer Home
  Add Apache license link
  Fix capitalization in title
  Remove excess semi-colon
  Point directly to README for docs link
  Update icons
  Update LICENSE
  Fix disclaimer
  Add blogpost URL
  Add disclaimer
  ...
2018-11-19 09:32:39 -08:00
Fabio Berger
99541f89f7 Add 0x-order-utils.py library to developers home 2018-11-19 17:07:18 +00:00
Fabio Berger
4cb138ab37 Fixes to CONTRIBUTING.md 2018-11-19 14:34:21 +00:00
Fabio Berger
8b8e277b75 Improve our CONTRIBUTING.md instructions 2018-11-19 14:28:10 +00:00
Jacob Evans
94de441de7 Merge pull request #1278 from 0xProject/feature/contract-addresses/rinkeby
Deploy contracts to Rinkeby
2018-11-19 11:29:09 +11:00
F. Eugene Aumson
43443d6057 fix(order_utils.py): publish docs to S3, not RTD (#1264)
Publishing to readthedocs.io (RTD) wasn't working, for various reasons.

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

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

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

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

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

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

View File

@@ -6,6 +6,7 @@ lib
/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/metacoin/artifacts
/packages/sra-spec/public/

View File

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

View File

@@ -46,10 +46,14 @@
<!--- Include as many relevant details about the environment you experienced the bug in -->
| Package | Version |
| ------------------: | :------ |
| `0x.js` | 0.25.0 |
| `Exchange Contract` | v1 |
| Package | Version |
| ------: | :------ |
<!-- For example:
| `0x.js` | 2.0.4 |
| `Exchange Contract` | v2 |
-->
| Network |
| ------- |

View File

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

View File

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

113
README.md
View File

@@ -2,7 +2,7 @@
---
[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. A full description of the protocol may be found in our [whitepaper][whitepaper-url].
[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. For more information on how it works, check out the [0x protocol specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
This repository is a monorepo including the 0x protocol smart contracts and numerous developer tools. Each public sub-package is independently published to NPM.
@@ -18,63 +18,72 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t
[![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
### Published Packages
## Packages
| Package | Version | Description |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol |
| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0x/abi-gen-wrappers`](/packages/abi-gen-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen-wrappers.svg)](https://www.npmjs.com/package/@0x/abi-gen-wrappers) | Low-level 0x smart contract wrappers generated using @0x/abi-gen |
| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages |
| [`@0x/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0x/asset-buyer.svg)](https://www.npmjs.com/package/@0x/asset-buyer) | Convenience package for discovering and buying assets with Ether |
| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | A Javascript library for interacting with the Standard Relayer API |
| [`@0x/contract-addresses`](/packages/contract-addresses) | [![npm](https://img.shields.io/npm/v/@0x/contract-addresses.svg)](https://www.npmjs.com/package/@0x/contract-addresses) | Used to get known addresses of deployed 0x contracts |
| [`@0x/contract-artifacts`](/packages/contract-artifacts) | [![npm](https://img.shields.io/npm/v/@0x/contract-artifacts.svg)](https://www.npmjs.com/package/@0x/contract-artifacts) | 0x smart contract compilation artifacts |
| [`@0x/contract-wrappers`](/packages/contract-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/contract-wrappers.svg)](https://www.npmjs.com/package/@0x/contract-wrappers) | Smart TS wrappers for 0x smart contracts |
| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x projects and packages |
| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generation |
| [`@0x/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0x/json-schemas.svg)](https://www.npmjs.com/package/@0x/json-schemas) | 0x-related json schemas |
| [`@0x/migrations`](/packages/migrations) | [![npm](https://img.shields.io/npm/v/@0x/migrations.svg)](https://www.npmjs.com/package/@0x/migrations) | 0x smart contract migrations |
| [`@0x/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0x/order-utils.svg)](https://www.npmjs.com/package/@0x/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders |
| [`@0x/order-watcher`](/packages/order-watcher) | [![npm](https://img.shields.io/npm/v/@0x/order-watcher.svg)](https://www.npmjs.com/package/@0x/order-watcher) | An order watcher daemon that watches for order validity |
| [`@0x/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0x/react-docs.svg)](https://www.npmjs.com/package/@0x/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON |
| [`@0x/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0x/react-shared.svg)](https://www.npmjs.com/package/@0x/react-shared) | 0x shared react components |
| [`@0x/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-compiler.svg)](https://www.npmjs.com/package/@0x/sol-compiler) | A thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties |
| [`@0x/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0x/sol-cov.svg)](https://www.npmjs.com/package/@0x/sol-cov) | Solidity test coverage tool |
| [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator |
| [`@0x/sol-resolver`](/packages/sol-resolver) | [![npm](https://img.shields.io/npm/v/@0x/sol-resolver.svg)](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies |
| [`@0x/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0x/sra-spec.svg)](https://www.npmjs.com/package/@0x/sra-spec) | OpenAPI specification for the standard relayer API |
| [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Useful web3 subproviders (e.g. LedgerSubprovider) |
| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom 0x development TSLint rules |
| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations |
| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages |
| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities |
| [`@0x/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0x/web3-wrapper.svg)](https://www.npmjs.com/package/@0x/web3-wrapper) | Web3 wrapper |
Visit our [developer portal](https://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 |
| -------------------------------------------------------- | ---------------------------------------------------------------- |
| [`@0x/contracts`](/packages/contracts) | 0x solidity smart contracts & tests |
| [`@0x/react-docs-example`](/packages/react-docs-example) | Example documentation site created with `@0x/react-docs` |
| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
| [`@0x/website`](/packages/website) | 0x website & Portal DApp |
| Package | Version | Description |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [`0x-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.

View File

@@ -8,7 +8,7 @@
"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,python-packages/*/.coverage}' | coveralls",
@@ -22,13 +22,13 @@
"install:all": "yarn install",
"wsrun": "wsrun",
"lerna": "lerna",
"build": "wsrun build $PKG --fast-exit -r --stages",
"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": "wsrun build $PKG --fast-exit -r --stages --exclude-missing",
"build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
"build:ci:no_website": "wsrun build:ci $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
"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",
"clean": "wsrun clean $PKG --fast-exit -r --parallel --exclude-missing",
"remove_node_modules": "lerna clean --yes; rm -rf node_modules",
"rebuild": "run-s clean build",
"rebuild:no_website": "run-s clean build:no_website",
@@ -40,7 +40,7 @@
},
"config": {
"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"
"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": [
@@ -49,7 +49,7 @@
"maxSize": "700kB"
},
{
"path": "packages/instant/public/main.bundle.js",
"path": "packages/instant/umd/instant.js",
"maxSize": "1000kB"
}
],

View File

@@ -1,4 +1,31 @@
[
{
"timestamp": 1543401373,
"version": "2.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"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",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.6 - _November 28, 2018_
* Dependencies updated
## v2.0.5 - _November 21, 2018_
* Dependencies updated
## v2.0.4 - _November 14, 2018_
* Dependencies updated
## v2.0.3 - _November 13, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "0x.js",
"version": "2.0.3",
"version": "2.0.6",
"engines": {
"node": ">=6.12"
},
@@ -42,11 +42,10 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@0x/abi-gen": "^1.0.15",
"@0x/abi-gen-wrappers": "^1.0.4",
"@0x/contract-addresses": "^1.1.0",
"@0x/dev-utils": "^1.0.16",
"@0x/migrations": "^2.0.3",
"@0x/abi-gen-wrappers": "^2.0.0",
"@0x/contract-addresses": "^2.0.0",
"@0x/dev-utils": "^1.0.19",
"@0x/migrations": "^2.2.0",
"@0x/tslint-config": "^1.0.10",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
@@ -73,16 +72,16 @@
"webpack": "^4.20.2"
},
"dependencies": {
"@0x/assert": "^1.0.16",
"@0x/base-contract": "^3.0.5",
"@0x/contract-wrappers": "^4.0.1",
"@0x/order-utils": "^3.0.1",
"@0x/order-watcher": "^2.2.3",
"@0x/subproviders": "^2.1.3",
"@0x/types": "^1.2.1",
"@0x/assert": "^1.0.18",
"@0x/base-contract": "^3.0.8",
"@0x/contract-wrappers": "^4.1.1",
"@0x/order-utils": "^3.0.4",
"@0x/order-watcher": "^2.2.6",
"@0x/subproviders": "^2.1.6",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"@types/web3-provider-engine": "^14.0.0",
"ethereum-types": "^1.1.2",
"ethers": "~4.0.4",

View File

@@ -0,0 +1,20 @@
[
{
"timestamp": 1543401373,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.0",
"changes": [
{
"note": "Initial publish",
"pr": 1305
}
]
}
]

View File

@@ -0,0 +1,14 @@
<!--
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.1 - _November 28, 2018_
* Dependencies updated
## v1.0.0 - _Invalid date_
* Initial publish (#1305)

View File

@@ -4,6 +4,7 @@
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';
@@ -40,7 +41,7 @@ export class {{contractName}}Contract extends BaseContract {
{{/this.constant}}
{{/each}}
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
{{> typed_params inputs=ctor.inputs}}

View File

@@ -0,0 +1,20 @@
{
"name": "@0x/abi-gen-templates",
"version": "1.0.1",
"engines": {
"node": ">=6.12"
},
"description": "Handlebars templates used by abi-gen to generate contract-wrappers",
"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-templates/README.md",
"publishConfig": {
"access": "public"
}
}

View File

@@ -1,4 +1,34 @@
[
{
"version": "2.0.0",
"changes": [
{
"pr": 1309,
"note": "Update Exchange artifact to receive ZRX asset data as a constructor argument"
}
],
"timestamp": 1543401373
},
{
"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",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _November 28, 2018_
* Update Exchange artifact to receive ZRX asset data as a constructor argument (#1309)
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/abi-gen-wrappers",
"version": "1.0.4",
"version": "2.0.0",
"engines": {
"node": ">=6.12"
},
@@ -15,7 +15,7 @@
"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"
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output 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"
@@ -30,17 +30,19 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.15",
"@0x/abi-gen": "^1.0.17",
"@0x/abi-gen-templates": "^1.0.1",
"@0x/tslint-config": "^1.0.10",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/types": "^1.3.0",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"ethereum-types": "^1.1.2",
"ethers": "~4.0.4",
"lodash": "^4.17.5",
"shx": "^0.2.2"
},
"dependencies": {
"@0x/base-contract": "^3.0.5"
"@0x/base-contract": "^3.0.8"
},
"publishConfig": {
"access": "public"

View File

@@ -4,6 +4,7 @@
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';
@@ -1800,7 +1801,7 @@ export class AssetProxyOwnerContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_owners: string[],

View File

@@ -4,6 +4,7 @@
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';
@@ -968,7 +969,7 @@ export class DummyERC20TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_name: string,

View File

@@ -4,6 +4,7 @@
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';
@@ -1264,7 +1265,7 @@ export class DummyERC721TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_name: string,

View File

@@ -4,6 +4,7 @@
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';
@@ -601,7 +602,7 @@ export class ERC20ProxyContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20ProxyContract> {

View File

@@ -4,6 +4,7 @@
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';
@@ -508,7 +509,7 @@ export class ERC20TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20TokenContract> {

View File

@@ -4,6 +4,7 @@
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';
@@ -601,7 +602,7 @@ export class ERC721ProxyContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721ProxyContract> {

View File

@@ -4,6 +4,7 @@
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';
@@ -845,7 +846,7 @@ export class ERC721TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721TokenContract> {

View File

@@ -4,6 +4,7 @@
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';
@@ -3024,32 +3025,38 @@ export class ExchangeContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_zrxAssetData: string,
): Promise<ExchangeContract> {
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 ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, );
return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, _zrxAssetData
);
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
provider: Provider,
txDefaults: Partial<TxData>,
_zrxAssetData: string,
): Promise<ExchangeContract> {
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[] = BaseContract._formatABIDataItemList(
[_zrxAssetData
] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[],
[_zrxAssetData
],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, []);
const txData = deployInfo.encode(bytecode, [_zrxAssetData
]);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{data: txData},
@@ -3061,7 +3068,8 @@ export class ExchangeContract extends BaseContract {
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`Exchange successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ExchangeContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [];
contractInstance.constructorArgs = [_zrxAssetData
];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {

View File

@@ -4,6 +4,7 @@
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';
@@ -661,7 +662,7 @@ export class ForwarderContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,

View File

@@ -4,6 +4,7 @@
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';
@@ -60,7 +61,7 @@ export class IValidatorContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IValidatorContract> {

View File

@@ -4,6 +4,7 @@
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';
@@ -55,7 +56,7 @@ export class IWalletContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IWalletContract> {

View File

@@ -4,6 +4,7 @@
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';
@@ -295,7 +296,7 @@ export class OrderValidatorContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,

View File

@@ -4,6 +4,7 @@
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';
@@ -787,7 +788,7 @@ export class WETH9Contract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<WETH9Contract> {

View File

@@ -4,6 +4,7 @@
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';
@@ -598,7 +599,7 @@ export class ZRXTokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact,
artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ZRXTokenContract> {

View File

@@ -1,4 +1,22 @@
[
{
"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": [

View File

@@ -5,6 +5,14 @@ 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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/abi-gen",
"version": "1.0.15",
"version": "1.0.17",
"engines": {
"node": ">=6.12"
},
@@ -32,7 +32,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
"dependencies": {
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/utils": "^2.0.6",
"chalk": "^2.3.0",
"ethereum-types": "^1.1.2",
"glob": "^7.1.2",

View File

@@ -1,4 +1,22 @@
[
{
"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",

View File

@@ -5,6 +5,14 @@ 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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/assert",
"version": "1.0.16",
"version": "1.0.18",
"engines": {
"node": ">=6.12"
},
@@ -44,9 +44,9 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/json-schemas": "^2.1.0",
"@0x/json-schemas": "^2.1.2",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/utils": "^2.0.6",
"lodash": "^4.17.5",
"valid-url": "^1.0.9"
},

View File

@@ -1,4 +1,33 @@
[
{
"timestamp": 1543401373,
"version": "3.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"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",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.2 - _November 28, 2018_
* Dependencies updated
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-buyer",
"version": "2.2.2",
"version": "3.0.2",
"engines": {
"node": ">=6.12"
},
@@ -36,18 +36,18 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
"dependencies": {
"@0x/assert": "^1.0.16",
"@0x/connect": "^3.0.5",
"@0x/contract-wrappers": "^4.0.1",
"@0x/json-schemas": "^2.1.0",
"@0x/order-utils": "^3.0.1",
"@0x/subproviders": "^2.1.3",
"@0x/types": "^1.2.1",
"@0x/assert": "^1.0.18",
"@0x/connect": "^3.0.8",
"@0x/contract-wrappers": "^4.1.1",
"@0x/json-schemas": "^2.1.2",
"@0x/order-utils": "^3.0.4",
"@0x/subproviders": "^2.1.6",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"ethereum-types": "^1.1.2",
"lodash": "^4.17.10"
"lodash": "^4.17.5"
},
"devDependencies": {
"@0x/tslint-config": "^1.0.10",

View File

@@ -54,12 +54,12 @@ export interface BuyQuote {
}
/**
* ethPerAssetPrice: The price of one unit of the desired asset in ETH
* 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)
* totalEthAmount: The total amount of eth required to complete the buy (filling orders, feeOrders, and paying affiliate fee).
*/
export interface BuyQuoteInfo {
ethPerAssetPrice: BigNumber;
assetEthAmount: BigNumber;
feeEthAmount: BigNumber;
totalEthAmount: BigNumber;
}

View File

@@ -18,7 +18,7 @@ export const assert = {
}
},
isValidBuyQuoteInfo(variableName: string, buyQuoteInfo: BuyQuoteInfo): void {
sharedAssert.isBigNumber(`${variableName}.ethPerAssetPrice`, buyQuoteInfo.ethPerAssetPrice);
sharedAssert.isBigNumber(`${variableName}.assetEthAmount`, buyQuoteInfo.assetEthAmount);
sharedAssert.isBigNumber(`${variableName}.feeEthAmount`, buyQuoteInfo.feeEthAmount);
sharedAssert.isBigNumber(`${variableName}.totalEthAmount`, buyQuoteInfo.totalEthAmount);
},

View File

@@ -106,28 +106,28 @@ function calculateQuoteInfo(
isMakerAssetZrxToken: boolean,
): BuyQuoteInfo {
// find the total eth and zrx needed to buy assetAmount from the resultOrders from left to right
let ethAmountToBuyAsset = constants.ZERO_AMOUNT;
let ethAmountToBuyZrx = constants.ZERO_AMOUNT;
let assetEthAmount = constants.ZERO_AMOUNT;
let zrxEthAmount = constants.ZERO_AMOUNT;
if (isMakerAssetZrxToken) {
ethAmountToBuyAsset = findEthAmountNeededToBuyZrx(ordersAndFillableAmounts, assetBuyAmount);
assetEthAmount = findEthAmountNeededToBuyZrx(ordersAndFillableAmounts, assetBuyAmount);
} else {
// find eth and zrx amounts needed to buy
const ethAndZrxAmountToBuyAsset = findEthAndZrxAmountNeededToBuyAsset(ordersAndFillableAmounts, assetBuyAmount);
ethAmountToBuyAsset = ethAndZrxAmountToBuyAsset[0];
assetEthAmount = ethAndZrxAmountToBuyAsset[0];
const zrxAmountToBuyAsset = ethAndZrxAmountToBuyAsset[1];
// find eth amount needed to buy zrx
ethAmountToBuyZrx = findEthAmountNeededToBuyZrx(feeOrdersAndFillableAmounts, zrxAmountToBuyAsset);
zrxEthAmount = findEthAmountNeededToBuyZrx(feeOrdersAndFillableAmounts, zrxAmountToBuyAsset);
}
/// find the eth amount needed to buy the affiliate fee
const ethAmountToBuyAffiliateFee = ethAmountToBuyAsset.mul(feePercentage).ceil();
const totalEthAmountWithoutAffiliateFee = ethAmountToBuyAsset.plus(ethAmountToBuyZrx);
const ethAmountTotal = totalEthAmountWithoutAffiliateFee.plus(ethAmountToBuyAffiliateFee);
// divide into the assetBuyAmount in order to find rate of makerAsset / WETH
const ethPerAssetPrice = totalEthAmountWithoutAffiliateFee.div(assetBuyAmount);
// 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 {
totalEthAmount: ethAmountTotal,
feeEthAmount: ethAmountToBuyAffiliateFee,
ethPerAssetPrice,
assetEthAmount,
feeEthAmount,
totalEthAmount,
};
}

View File

@@ -44,19 +44,24 @@ export const orderProviderResponseProcessor = {
let unsortedOrders = filteredOrders;
// if an orderValidator is provided, use on chain information to calculate remaining fillable makerAsset amounts
if (!_.isUndefined(orderValidator)) {
// TODO(bmillman): improvement
// try/catch this request and throw a more domain specific error
const takerAddresses = _.map(filteredOrders, () => constants.NULL_ADDRESS);
const ordersAndTradersInfo = await orderValidator.getOrdersAndTradersInfoAsync(
filteredOrders,
takerAddresses,
);
// take orders + on chain information and find the valid orders and remaining fillable maker asset amounts
unsortedOrders = getValidOrdersWithRemainingFillableMakerAssetAmountsFromOnChain(
filteredOrders,
ordersAndTradersInfo,
isMakerAssetZrxToken,
);
try {
const ordersAndTradersInfo = await orderValidator.getOrdersAndTradersInfoAsync(
filteredOrders,
takerAddresses,
);
// take orders + on chain information and find the valid orders and remaining fillable maker asset amounts
unsortedOrders = getValidOrdersWithRemainingFillableMakerAssetAmountsFromOnChain(
filteredOrders,
ordersAndTradersInfo,
isMakerAssetZrxToken,
);
} catch (err) {
// Sometimes we observe this call to orderValidator fail with response `0x`
// Because of differences in Parity / Geth implementations, its very hard to tell if this response is a "system error"
// or a revert. In this case we just swallow these errors and fallback to partial fill information from the SRA.
// TODO(bmillman): report these errors so we have an idea of how often we're getting these failures.
}
}
// sort orders by rate
// TODO(bmillman): optimization

View File

@@ -108,17 +108,17 @@ describe('buyQuoteCalculator', () => {
// 50 eth to fill the first order + 100 eth for fees
const expectedEthAmountForAsset = new BigNumber(50);
const expectedEthAmountForZrxFees = new BigNumber(100);
const expectedFillEthAmount = expectedEthAmountForAsset.plus(expectedEthAmountForZrxFees);
const expectedFeeEthAmount = expectedEthAmountForAsset.mul(feePercentage);
const expectedFillEthAmount = expectedEthAmountForAsset;
const expectedAffiliateFeeEthAmount = expectedEthAmountForAsset.mul(feePercentage);
const expectedFeeEthAmount = expectedAffiliateFeeEthAmount.plus(expectedEthAmountForZrxFees);
const expectedTotalEthAmount = expectedFillEthAmount.plus(expectedFeeEthAmount);
const expectedEthPerAssetPrice = expectedFillEthAmount.div(assetBuyAmount);
expect(buyQuote.bestCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedFillEthAmount);
expect(buyQuote.bestCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedFeeEthAmount);
expect(buyQuote.bestCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedTotalEthAmount);
expect(buyQuote.bestCaseQuoteInfo.ethPerAssetPrice).to.bignumber.equal(expectedEthPerAssetPrice);
// because we have no slippage protection, minRate is equal to maxRate
expect(buyQuote.worstCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedFillEthAmount);
expect(buyQuote.worstCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedFeeEthAmount);
expect(buyQuote.worstCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedTotalEthAmount);
expect(buyQuote.worstCaseQuoteInfo.ethPerAssetPrice).to.bignumber.equal(expectedEthPerAssetPrice);
// test if feePercentage gets passed through
expect(buyQuote.feePercentage).to.equal(feePercentage);
});
@@ -146,23 +146,23 @@ describe('buyQuoteCalculator', () => {
// 50 eth to fill the first order + 100 eth for fees
const expectedEthAmountForAsset = new BigNumber(50);
const expectedEthAmountForZrxFees = new BigNumber(100);
const expectedFillEthAmount = expectedEthAmountForAsset.plus(expectedEthAmountForZrxFees);
const expectedFeeEthAmount = expectedEthAmountForAsset.mul(feePercentage);
const expectedFillEthAmount = expectedEthAmountForAsset;
const expectedAffiliateFeeEthAmount = expectedEthAmountForAsset.mul(feePercentage);
const expectedFeeEthAmount = expectedAffiliateFeeEthAmount.plus(expectedEthAmountForZrxFees);
const expectedTotalEthAmount = expectedFillEthAmount.plus(expectedFeeEthAmount);
const expectedEthPerAssetPrice = expectedFillEthAmount.div(assetBuyAmount);
expect(buyQuote.bestCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedFillEthAmount);
expect(buyQuote.bestCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedFeeEthAmount);
expect(buyQuote.bestCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedTotalEthAmount);
expect(buyQuote.bestCaseQuoteInfo.ethPerAssetPrice).to.bignumber.equal(expectedEthPerAssetPrice);
// 100 eth to fill the first order + 208 eth for fees
const expectedWorstEthAmountForAsset = new BigNumber(100);
const expectedWorstEthAmountForZrxFees = new BigNumber(208);
const expectedWorstFillEthAmount = expectedWorstEthAmountForAsset.plus(expectedWorstEthAmountForZrxFees);
const expectedWorstFeeEthAmount = expectedWorstEthAmountForAsset.mul(feePercentage);
const expectedWorstFillEthAmount = expectedWorstEthAmountForAsset;
const expectedWorstAffiliateFeeEthAmount = expectedWorstEthAmountForAsset.mul(feePercentage);
const expectedWorstFeeEthAmount = expectedWorstAffiliateFeeEthAmount.plus(expectedWorstEthAmountForZrxFees);
const expectedWorstTotalEthAmount = expectedWorstFillEthAmount.plus(expectedWorstFeeEthAmount);
const expectedWorstEthPerAssetPrice = expectedWorstFillEthAmount.div(assetBuyAmount);
expect(buyQuote.worstCaseQuoteInfo.assetEthAmount).to.bignumber.equal(expectedWorstFillEthAmount);
expect(buyQuote.worstCaseQuoteInfo.feeEthAmount).to.bignumber.equal(expectedWorstFeeEthAmount);
expect(buyQuote.worstCaseQuoteInfo.totalEthAmount).to.bignumber.equal(expectedWorstTotalEthAmount);
expect(buyQuote.worstCaseQuoteInfo.ethPerAssetPrice).to.bignumber.equal(expectedWorstEthPerAssetPrice);
// test if feePercentage gets passed through
expect(buyQuote.feePercentage).to.equal(feePercentage);
});

View File

@@ -1,4 +1,31 @@
[
{
"timestamp": 1543401373,
"version": "3.0.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542821676,
"version": "3.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542208198,
"version": "3.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542134075,
"version": "3.0.5",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.8 - _November 28, 2018_
* Dependencies updated
## v3.0.7 - _November 21, 2018_
* Dependencies updated
## v3.0.6 - _November 14, 2018_
* Dependencies updated
## v3.0.5 - _November 13, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/base-contract",
"version": "3.0.5",
"version": "3.0.8",
"engines": {
"node": ">=6.12"
},
@@ -41,8 +41,8 @@
},
"dependencies": {
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"ethereum-types": "^1.1.2",
"ethers": "~4.0.4",
"lodash": "^4.17.5"

View File

@@ -1,4 +1,31 @@
[
{
"timestamp": 1543401373,
"version": "3.0.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542821676,
"version": "3.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542208198,
"version": "3.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542134075,
"version": "3.0.5",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.8 - _November 28, 2018_
* Dependencies updated
## v3.0.7 - _November 21, 2018_
* Dependencies updated
## v3.0.6 - _November 14, 2018_
* Dependencies updated
## v3.0.5 - _November 13, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/connect",
"version": "3.0.5",
"version": "3.0.8",
"engines": {
"node": ">=6.12"
},
@@ -44,12 +44,12 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
"dependencies": {
"@0x/assert": "^1.0.16",
"@0x/json-schemas": "^2.1.0",
"@0x/order-utils": "^3.0.1",
"@0x/types": "^1.2.1",
"@0x/assert": "^1.0.18",
"@0x/json-schemas": "^2.1.2",
"@0x/order-utils": "^3.0.4",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/utils": "^2.0.6",
"lodash": "^4.17.5",
"query-string": "^5.0.1",
"sinon": "^4.0.0",

View File

@@ -1,4 +1,27 @@
[
{
"version": "2.0.0",
"changes": [
{
"note": "Redeployed Rinkeby with testnet Exchange artifact",
"pr": 1318
},
{
"note": "Added Ganache snapshot addresses for network 50",
"pr": 1318
}
],
"timestamp": 1543401373
},
{
"version": "1.2.0",
"changes": [
{
"note": "Rinkeby Deployment"
}
],
"timestamp": 1542821676
},
{
"version": "1.1.0",
"changes": [

View File

@@ -5,6 +5,15 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _November 28, 2018_
* Redeployed Rinkeby with testnet Exchange artifact (#1318)
* Added Ganache snapshot addresses for network 50 (#1318)
## v1.2.0 - _November 21, 2018_
* Rinkeby Deployment
## v1.1.0 - _November 9, 2018_
* Update Forwarder addresses (#1192)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-addresses",
"version": "1.1.0",
"version": "2.0.0",
"engines": {
"node": ">=6.12"
},

View File

@@ -14,7 +14,9 @@ export interface ContractAddresses {
export enum NetworkId {
Mainnet = 1,
Ropsten = 3,
Rinkeby = 4,
Kovan = 42,
Ganache = 50,
}
const networkToAddresses: { [networkId: number]: ContractAddresses } = {
@@ -38,6 +40,16 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
forwarder: '0x2240dab907db71e64d3e0dba4800c83b5c502d4e',
orderValidator: '0x90431a90516ab49af23a0530e04e8c7836e7122f',
},
4: {
exchange: '0xbce0b5f6eb618c565c3e5f5cd69652bbc279f44e',
erc20Proxy: '0x2f5ae4f6106e89b4147651688a92256885c5f410',
erc721Proxy: '0x7656d773e11ff7383a14dcf09a9c50990481cd10',
zrxToken: '0x8080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa',
etherToken: '0xc778417e063141139fce010982780140aa0cd5ab',
assetProxyOwner: '0xe1703da878afcebff5b7624a826902af475b9c03',
forwarder: '0x2d40589abbdee84961f3a7656b9af7adb0ee5ab4',
orderValidator: '0x0c5173a51e26b29d6126c686756fb9fbef71f762',
},
42: {
erc20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e',
erc721Proxy: '0x2a9127c745688a165106c11cd4d647d2220af821',
@@ -48,6 +60,17 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
forwarder: '0x17992e4ffb22730138e4b62aaa6367fa9d3699a6',
orderValidator: '0xb389da3d204b412df2f75c6afb3d0a7ce0bc283d',
},
// NetworkId 50 represents our Ganache snapshot generated from migrations.
50: {
exchange: '0x48bacb9266a570d521063ef5dd96e61686dbe788',
erc20Proxy: '0x1dc4c1cefef38a777b15aa20260a54e584b16c48',
erc721Proxy: '0x1d7022f5b17d2f8b695918fb48fa1089c9f85401',
zrxToken: '0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c',
etherToken: '0x0b1ba0af832d7c05fd64161e0db78e85978e8082',
assetProxyOwner: '0x34d402f14d58e001d8efbe6585051bf9706aa064',
forwarder: '0xb69e673309512a9d726f87304c6984054f87a93b',
orderValidator: '0xe86bb98fcf9bff3512c74589b78fb168200cc546',
},
};
/**

View File

@@ -1,4 +1,14 @@
[
{
"version": "1.1.2",
"changes": [
{
"pr": 1309,
"note": "Update Exchange artifact to receive ZRX asset data as a constructor argument"
}
],
"timestamp": 1543401373
},
{
"version": "1.1.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.1.2 - _November 28, 2018_
* Update Exchange artifact to receive ZRX asset data as a constructor argument (#1309)
## v1.1.0 - _November 9, 2018_
* Update Forwarder artifact (#1192)

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-artifacts",
"version": "1.1.0",
"version": "1.1.2",
"engines": {
"node": ">=6.12"
},

View File

@@ -1,4 +1,33 @@
[
{
"timestamp": 1543401373,
"version": "4.1.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "4.1.0",
"changes": [
{
"note":
"Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount",
"pr": 1292
}
],
"timestamp": 1542821676
},
{
"timestamp": 1542208198,
"version": "4.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542134075,
"version": "4.0.1",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.1.1 - _November 28, 2018_
* Dependencies updated
## v4.1.0 - _November 21, 2018_
* Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount (#1292)
## v4.0.2 - _November 14, 2018_
* Dependencies updated
## v4.0.1 - _November 13, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers",
"version": "4.0.1",
"version": "4.1.1",
"description": "Smart TS wrappers for 0x smart contracts",
"keywords": [
"0xproject",
@@ -37,9 +37,9 @@
"node": ">=6.0.0"
},
"devDependencies": {
"@0x/dev-utils": "^1.0.16",
"@0x/migrations": "^2.0.3",
"@0x/subproviders": "^2.1.3",
"@0x/dev-utils": "^1.0.19",
"@0x/migrations": "^2.2.0",
"@0x/subproviders": "^2.1.6",
"@0x/tslint-config": "^1.0.10",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
@@ -65,17 +65,17 @@
"web3-provider-engine": "14.0.6"
},
"dependencies": {
"@0x/abi-gen-wrappers": "^1.0.4",
"@0x/assert": "^1.0.16",
"@0x/contract-addresses": "^1.1.0",
"@0x/contract-artifacts": "^1.1.0",
"@0x/fill-scenarios": "^1.0.11",
"@0x/json-schemas": "^2.1.0",
"@0x/order-utils": "^3.0.1",
"@0x/types": "^1.2.1",
"@0x/abi-gen-wrappers": "^2.0.0",
"@0x/assert": "^1.0.18",
"@0x/contract-addresses": "^2.0.0",
"@0x/contract-artifacts": "^1.1.2",
"@0x/fill-scenarios": "^1.0.14",
"@0x/json-schemas": "^2.1.2",
"@0x/order-utils": "^3.0.4",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"ethereum-types": "^1.1.2",
"ethereumjs-blockstream": "6.0.0",
"ethereumjs-util": "^5.1.1",

View File

@@ -111,6 +111,7 @@ export class ERC20TokenWrapper extends ContractWrapper {
from: normalizedOwnerAddress,
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
nonce: txOpts.nonce,
}),
);
return txHash;
@@ -281,6 +282,7 @@ export class ERC20TokenWrapper extends ContractWrapper {
from: normalizedFromAddress,
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
nonce: txOpts.nonce,
}),
);
return txHash;
@@ -342,6 +344,7 @@ export class ERC20TokenWrapper extends ContractWrapper {
from: normalizedSenderAddress,
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
nonce: txOpts.nonce,
}),
);
return txHash;

View File

@@ -238,6 +238,7 @@ export class ERC721TokenWrapper extends ContractWrapper {
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
from: normalizedOwnerAddress,
nonce: txOpts.nonce,
}),
);
return txHash;
@@ -298,6 +299,7 @@ export class ERC721TokenWrapper extends ContractWrapper {
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
from: tokenOwnerAddress,
nonce: txOpts.nonce,
}),
);
return txHash;
@@ -369,6 +371,7 @@ export class ERC721TokenWrapper extends ContractWrapper {
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
from: normalizedSenderAddress,
nonce: txOpts.nonce,
}),
);
return txHash;

View File

@@ -71,6 +71,7 @@ export class EtherTokenWrapper extends ContractWrapper {
value: amountInWei,
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
nonce: txOpts.nonce,
}),
);
return txHash;
@@ -112,6 +113,7 @@ export class EtherTokenWrapper extends ContractWrapper {
from: normalizedWithdrawerAddress,
gas: txOpts.gasLimit,
gasPrice: txOpts.gasPrice,
nonce: txOpts.nonce,
}),
);
return txHash;

View File

@@ -196,6 +196,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
@@ -207,6 +208,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -243,6 +245,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
}
@@ -254,6 +257,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -287,6 +291,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.fillOrKillOrder.sendTransactionAsync(
@@ -297,6 +302,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -336,6 +342,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedSenderAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.executeTransaction.sendTransactionAsync(
@@ -347,6 +354,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedSenderAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -382,6 +390,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.batchFillOrders.sendTransactionAsync(
@@ -392,6 +401,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -425,6 +435,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.marketBuyOrders.sendTransactionAsync(
@@ -435,6 +446,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -468,6 +480,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.marketSellOrders.sendTransactionAsync(
@@ -478,6 +491,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -511,6 +525,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.marketBuyOrdersNoThrow.sendTransactionAsync(
@@ -521,6 +536,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -554,6 +570,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.marketSellOrdersNoThrow.sendTransactionAsync(
@@ -564,6 +581,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -599,6 +617,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.batchFillOrdersNoThrow.sendTransactionAsync(
@@ -609,6 +628,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -644,6 +664,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.batchFillOrKillOrders.sendTransactionAsync(
@@ -654,6 +675,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -682,12 +704,14 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedMakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.batchCancelOrders.sendTransactionAsync(orders, {
from: normalizedMakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
return txHash;
}
@@ -735,6 +759,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
}
@@ -747,6 +772,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -781,12 +807,14 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.preSign.sendTransactionAsync(hash, signerAddress, signature, {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
return txHash;
}
@@ -956,12 +984,14 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedMakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.cancelOrder.sendTransactionAsync(order, {
from: normalizedMakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
return txHash;
}
@@ -992,6 +1022,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedSenderAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.setSignatureValidatorApproval.sendTransactionAsync(
@@ -1001,6 +1032,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedSenderAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -1030,12 +1062,14 @@ export class ExchangeWrapper extends ContractWrapper {
from: normalizedSenderAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
}
const txHash = await exchangeInstance.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, {
from: normalizedSenderAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
});
return txHash;
}

View File

@@ -124,6 +124,7 @@ export class ForwarderWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
}
@@ -140,6 +141,7 @@ export class ForwarderWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;
@@ -213,6 +215,7 @@ export class ForwarderWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
}
@@ -230,6 +233,7 @@ export class ForwarderWrapper extends ContractWrapper {
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
gasPrice: orderTransactionOpts.gasPrice,
nonce: orderTransactionOpts.nonce,
},
);
return txHash;

View File

@@ -3,6 +3,7 @@ export const txOptsSchema = {
properties: {
gasPrice: { $ref: '/numberSchema' },
gasLimit: { type: 'number' },
nonce: { type: 'number' },
},
type: 'object',
};

View File

@@ -142,10 +142,12 @@ export interface MethodOpts {
/**
* gasPrice: Gas price in Wei to use for a transaction
* gasLimit: The amount of gas to send with a transaction (in Gwei)
* nonce: The nonce to use for a transaction. If not specified, it defaults to the next incremented nonce.
*/
export interface TransactionOpts {
gasPrice?: BigNumber;
gasLimit?: number;
nonce?: number;
}
/**

View File

@@ -1,4 +1,14 @@
[
{
"name": "OrderValidator",
"version": "1.0.1",
"changes": [
{
"note": "remove `getApproved` check from ERC721 approval query",
"pr": 1149
}
]
},
{
"name": "Forwarder",
"version": "1.1.0",

View File

@@ -148,7 +148,7 @@ contract OrderValidator {
balance = target == owner ? 1 : 0;
// Check if ERC721Proxy is approved to spend tokenId
bool isApproved = IERC721Token(token).isApprovedForAll(target, assetProxy) || IERC721Token(token).getApproved(tokenId) == assetProxy;
bool isApproved = IERC721Token(token).isApprovedForAll(target, assetProxy);
// Set alowance to 1 if ERC721Proxy is approved to spend tokenId
allowance = isApproved ? 1 : 0;

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "contracts",
"version": "2.1.53",
"version": "2.1.56",
"engines": {
"node": ">=6.12"
},
@@ -22,7 +22,7 @@
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
"compile": "sol-compiler --contracts-dir contracts",
"clean": "shx rm -rf lib generated-artifacts generated-wrappers",
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
"coverage:report:text": "istanbul report text",
"coverage:report:html": "istanbul report html && open coverage/index.html",
@@ -45,11 +45,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.15",
"@0x/dev-utils": "^1.0.16",
"@0x/sol-compiler": "^1.1.11",
"@0x/sol-cov": "^2.1.11",
"@0x/subproviders": "^2.1.3",
"@0x/abi-gen": "^1.0.17",
"@0x/dev-utils": "^1.0.19",
"@0x/sol-compiler": "^1.1.14",
"@0x/sol-cov": "^2.1.14",
"@0x/subproviders": "^2.1.6",
"@0x/tslint-config": "^1.0.10",
"@types/bn.js": "^4.11.0",
"@types/ethereumjs-abi": "^0.6.0",
@@ -71,12 +71,12 @@
"yargs": "^10.0.3"
},
"dependencies": {
"@0x/base-contract": "^3.0.5",
"@0x/order-utils": "^3.0.1",
"@0x/types": "^1.2.1",
"@0x/base-contract": "^3.0.8",
"@0x/order-utils": "^3.0.4",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"@types/js-combinatorics": "^0.5.29",
"bn.js": "^4.11.8",
"ethereum-types": "^1.1.2",

View File

@@ -198,7 +198,7 @@ describe('OrderValidator', () => {
);
expect(newAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
});
it('should return an allowance of 1 when ERC721Proxy is approved for specific tokenId', async () => {
it('should return an allowance of 0 when ERC721Proxy is approved for specific tokenId', async () => {
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Token.mint.sendTransactionAsync(makerAddress, tokenId),
constants.AWAIT_TRANSACTION_MINED_MS,
@@ -213,7 +213,7 @@ describe('OrderValidator', () => {
makerAddress,
erc721AssetData,
);
expect(newAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
expect(newAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
});
});
@@ -248,8 +248,9 @@ describe('OrderValidator', () => {
await erc721Token.mint.sendTransactionAsync(makerAddress, tokenId),
constants.AWAIT_TRANSACTION_MINED_MS,
);
const isApproved = true;
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Token.approve.sendTransactionAsync(erc721Proxy.address, tokenId, {
await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
from: makerAddress,
}),
constants.AWAIT_TRANSACTION_MINED_MS,
@@ -311,8 +312,9 @@ describe('OrderValidator', () => {
await erc721Token.mint.sendTransactionAsync(takerAddress, tokenId),
constants.AWAIT_TRANSACTION_MINED_MS,
);
const isApproved = true;
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Token.approve.sendTransactionAsync(erc721Proxy.address, tokenId, {
await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
from: takerAddress,
}),
constants.AWAIT_TRANSACTION_MINED_MS,
@@ -465,8 +467,9 @@ describe('OrderValidator', () => {
await erc721Token.mint.sendTransactionAsync(takerAddress, tokenId),
constants.AWAIT_TRANSACTION_MINED_MS,
);
const isApproved = true;
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Token.approve.sendTransactionAsync(erc721Proxy.address, tokenId, {
await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
from: takerAddress,
}),
constants.AWAIT_TRANSACTION_MINED_MS,

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/dev-tools-pages",
"version": "0.0.5",
"version": "0.0.8",
"engines": {
"node": ">=6.12"
},
@@ -16,7 +16,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@0x/react-shared": "^1.0.20",
"@0x/react-shared": "^1.0.23",
"basscss": "^8.0.3",
"bowser": "^1.9.3",
"less": "^2.7.2",

View File

@@ -1,4 +1,31 @@
[
{
"timestamp": 1543401373,
"version": "1.0.19",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542821676,
"version": "1.0.18",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542208198,
"version": "1.0.17",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542134075,
"version": "1.0.16",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.19 - _November 28, 2018_
* Dependencies updated
## v1.0.18 - _November 21, 2018_
* Dependencies updated
## v1.0.17 - _November 14, 2018_
* Dependencies updated
## v1.0.16 - _November 13, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/dev-utils",
"version": "1.0.16",
"version": "1.0.19",
"engines": {
"node": ">=6.12"
},
@@ -41,11 +41,11 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/subproviders": "^2.1.3",
"@0x/types": "^1.2.1",
"@0x/subproviders": "^2.1.6",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"@types/web3-provider-engine": "^14.0.0",
"chai": "^4.0.1",
"ethereum-types": "^1.1.2",

View File

@@ -1,4 +1,31 @@
[
{
"timestamp": 1543401373,
"version": "1.0.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542821676,
"version": "1.0.13",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542208198,
"version": "1.0.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1542134075,
"version": "1.0.11",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.14 - _November 28, 2018_
* Dependencies updated
## v1.0.13 - _November 21, 2018_
* Dependencies updated
## v1.0.12 - _November 14, 2018_
* Dependencies updated
## v1.0.11 - _November 13, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/fill-scenarios",
"version": "1.0.11",
"version": "1.0.14",
"description": "0x order fill scenario generator",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -28,14 +28,14 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/abi-gen-wrappers": "^1.0.4",
"@0x/base-contract": "^3.0.5",
"@0x/contract-artifacts": "^1.1.0",
"@0x/order-utils": "^3.0.1",
"@0x/types": "^1.2.1",
"@0x/abi-gen-wrappers": "^2.0.0",
"@0x/base-contract": "^3.0.8",
"@0x/contract-artifacts": "^1.1.2",
"@0x/order-utils": "^3.0.4",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"ethereum-types": "^1.1.2",
"ethers": "~4.0.4",
"lodash": "^4.17.5"

View File

@@ -1,6 +1,6 @@
{
"domain": "0x-instant-dogfood",
"build_command": "yarn build:umd:prod",
"build_command": "WEBPACK_OUTPUT_PATH=public yarn build:umd:prod",
"upload_directory": "public",
"index_key": "index.html",
"error_key": "index.html",

View File

@@ -1,2 +1,3 @@
public/main.bundle.js
public/main.bundle.js.map
public/instant.js
public/instant.js.map
umd/*

View File

@@ -0,0 +1,5 @@
.*
*
*/
!lib/**/*
!umd/**/*

View File

@@ -1,6 +1,6 @@
{
"domain": "0x-instant-staging",
"build_command": "yarn build:umd:prod",
"build_command": "WEBPACK_OUTPUT_PATH=public yarn build:umd:prod",
"upload_directory": "public",
"index_key": "index.html",
"error_key": "index.html",

View File

@@ -1 +1,11 @@
[]
[
{
"timestamp": 1542821676,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
}
]

View File

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

View File

@@ -1,13 +1,13 @@
{
"name": "@0x/instant",
"version": "0.0.6",
"version": "1.0.2",
"engines": {
"node": ">=6.12"
},
"private": true,
"description": "0x Instant React Component",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "yarn build:all",
"build:all": "run-p build:umd:prod build:commonjs",
@@ -29,8 +29,8 @@
"config": {
"postpublish": {
"assets": [
"packages/instant/public/index.js",
"packages/instant/public/index.min.js"
"packages/instant/umd/instant.js",
"packages/instant/umd/instant.js.map"
]
}
},
@@ -45,18 +45,19 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md",
"dependencies": {
"@0x/assert": "^1.0.16",
"@0x/asset-buyer": "^2.2.2",
"@0x/json-schemas": "^2.1.0",
"@0x/order-utils": "^3.0.1",
"@0x/subproviders": "^2.1.3",
"@0x/types": "^1.2.1",
"@0x/assert": "^1.0.18",
"@0x/asset-buyer": "^3.0.2",
"@0x/json-schemas": "^2.1.2",
"@0x/order-utils": "^3.0.4",
"@0x/subproviders": "^2.1.6",
"@0x/types": "^1.3.0",
"@0x/typescript-typings": "^3.0.4",
"@0x/utils": "^2.0.4",
"@0x/web3-wrapper": "^3.1.3",
"@0x/utils": "^2.0.6",
"@0x/web3-wrapper": "^3.1.6",
"bowser": "^1.9.4",
"copy-to-clipboard": "^3.0.8",
"ethereum-types": "^1.1.2",
"lodash": "^4.17.10",
"lodash": "^4.17.5",
"polished": "^2.2.0",
"react": "^16.5.2",
"react-dom": "^16.5.2",
@@ -82,11 +83,13 @@
"awesome-typescript-loader": "^5.2.1",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"ip": "^1.1.5",
"jest": "^23.6.0",
"make-promises-safe": "^1.1.0",
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"shx": "^0.2.2",
"svg-react-loader": "^0.4.6",
"ts-jest": "^23.10.3",
"tslint": "5.11.0",
"typedoc": "0.13.0",
@@ -96,6 +99,6 @@
"webpack-dev-server": "^3.1.9"
},
"publishConfig": {
"access": "private"
"access": "public"
}
}

View File

@@ -1,137 +1,206 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>0x Instant Dev Environment</title>
<link rel="stylesheet" href="/external.css">
<script type="text/javascript" src="/main.bundle.js" charset="utf-8"></script>
<script type="text/javascript" src="https://unpkg.com/jsuri@1.3.1/Uri.js" charset="utf-8"></script>
<script type="text/javascript" src="https://unpkg.com/bignumber.js@4.1.0/bignumber.js" charset="utf-8"></script>
<style>
#zeroExInstantContainer {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
body {
margin: 0;
background-color: rgba(0, 0, 0, 0.2);
}
</style>
</head>
<body>
<div id="zeroExInstantContainer"></div>
<script>
const removeUndefined = (obj) => {
for (let k in obj) if (obj[k] === undefined) delete obj[k];
return obj;
}
BigNumber.config({
EXPONENTIAL_AT: 1000,
DECIMAL_PLACES: 78,
});
const providedOrders = [
// Order selling REP
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('200000000000000000000'),
takerAssetAmount: new BigNumber('10000000000000000000'),
makerAssetData: '0xf47261b00000000000000000000000008cb3971b8eb709c14616bd556ff6683019e90d9c',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('1601535600'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber('3101985707338942582579795423923841749956600670712030922928319824580764688653'),
signature: '0x1bd4d5686fea801fe33c68c4944356085e7e6cb553eb7073160abd815609f714e85fb47f44b7ffd0a2a1321ac40d72d55163869d0a50fdb5a402132150fe33a08403',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2'
},
// Order selling ZRX
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('300000000000000000000'),
takerAssetAmount: new BigNumber('31000000000000000000'),
makerAssetData: '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('2524636800'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber('64592004666704945574675477805199411288137454783320798602050822322450089238268'),
signature: '0x1c13cacddca8d7d8248e91f412377e68f8f1f9891a59a6c1b2eea9f7b33558c30c4fb86a448e08ab7def40a28fb3a3062dcb33bb3c45302447fce5c4288b7c7f5b03',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2'
},
// Order selling GNT
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('250000000000000000000'),
takerAssetAmount: new BigNumber('10000000000000000000'),
makerAssetData: '0xf47261b000000000000000000000000031fb614e223706f15d0d3c5f4b08bdf0d5c78623',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('1601535600'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber('40204378562212615907903051460421336779451270522691667164301816101569427926606'),
signature: '0x1c788bf4b93769da1e8f195f52f0f59b4a298ac6da30cf6d05a87ed4be5ee974f61352ed1bc6a0844d0962b8c894c9ca08e452431255958a4e98dd93cbe1fbc73803',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2'
},
// Order selling MKR
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('200000000000000000000'),
takerAssetAmount: new BigNumber('5000000000000000000'),
makerAssetData: '0xf47261b00000000000000000000000007b6b10caa9e8e9552ba72638ea5b47c25afea1f3',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('1601535600'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber('71338269924068280039932133924198049371838034090153601678083172009862985793828'),
signature: '0x1bb3151d57ee1e8fa697767ce83ee4ba77d1ceb8cc1e79c7d77126b3687517704c50c6b3d9cb42c7e7d4478d574b297dfbd1626c5c18a7bc9c2a792c4c07f0797c03',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2'
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>0x Instant Dev Environment</title>
<link rel="stylesheet" href="/external.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css" />
<script type="text/javascript" src="/instant.js" charset="utf-8"></script>
<script type="text/javascript" src="https://unpkg.com/jsuri@1.3.1/Uri.js" charset="utf-8"></script>
<script type="text/javascript" src="https://unpkg.com/bignumber.js@4.1.0/bignumber.js" charset="utf-8"></script>
<style>
.flex-center {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
}
];
const queryParams = new Uri(window.location.search);
const renderOptionsDefaults = {
orderSource: 'https://api.radarrelay.com/0x/v2/',
onClose: () => { console.log('0x Instant Closed') }
}
const orderSourceOverride = queryParams.getQueryParamValue('orderSource');
const availableAssetDatasString = queryParams.getQueryParamValue('availableAssetDatas');
const feeRecipientOverride = queryParams.getQueryParamValue('feeRecipient');
const feePercentageOverride = +queryParams.getQueryParamValue('feePercentage');
let affiliateInfoOverride;
if (feeRecipientOverride !== undefined && feePercentageOverride !== undefined) {
affiliateInfoOverride = {
feeRecipient: feeRecipientOverride,
feePercentage: feePercentageOverride
};
}
const renderOptionsOverrides = {
orderSource: orderSourceOverride === 'provided' ? providedOrders : orderSourceOverride,
networkId: +queryParams.getQueryParamValue('networkId') || undefined,
defaultAssetBuyAmount: +queryParams.getQueryParamValue('defaultAssetBuyAmount') || undefined,
availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined,
defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'),
affiliateInfo: affiliateInfoOverride,
}
const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides));
zeroExInstant.render(renderOptions);
</script>
</body>
</html>
.flex-center--column {
flex-direction: column;
}
.button {
margin: 10px;
}
body {
margin: 0;
height: 100vh;
background-color: rgba(0, 0, 0, 0.2);
}
</style>
</head>
<body>
<div class="flex-center flex-center--column">
<div><button class="button is-large" onClick="renderWithUrlDefaults()">Open</button></div>
<div>
<button
class="button is-danger"
onClick="renderWithAssetData('0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862')"
>
Buy REP
</button>
<button
class="button is-black"
onClick="renderWithAssetData('0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498')"
>
Buy ZRX
</button>
<button
class="button is-info"
onClick="renderWithAssetData('0xf47261b00000000000000000000000006810e776880c02933d47db1b9fc05908e5386b96')"
>
Buy GNO
</button>
</div>
</div>
<div id="zeroExInstantContainer"></div>
<script>
// Simulate history
window.history.pushState({ page: 1 }, '0x Instant');
window.history.pushState({ page: 2 }, '0x Instant');
window.history.pushState({ page: 3 }, '0x Instant');
window.onpopstate = () => console.log("Integrator's onpopstate called");
const removeUndefined = obj => {
for (let k in obj) if (obj[k] === undefined) delete obj[k];
return obj;
};
BigNumber.config({
EXPONENTIAL_AT: 1000,
DECIMAL_PLACES: 78,
});
const providedOrders = [
// Order selling REP
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('200000000000000000000'),
takerAssetAmount: new BigNumber('10000000000000000000'),
makerAssetData: '0xf47261b00000000000000000000000008cb3971b8eb709c14616bd556ff6683019e90d9c',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('1601535600'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber('3101985707338942582579795423923841749956600670712030922928319824580764688653'),
signature:
'0x1bd4d5686fea801fe33c68c4944356085e7e6cb553eb7073160abd815609f714e85fb47f44b7ffd0a2a1321ac40d72d55163869d0a50fdb5a402132150fe33a08403',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
},
// Order selling ZRX
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('300000000000000000000'),
takerAssetAmount: new BigNumber('31000000000000000000'),
makerAssetData: '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('2524636800'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber(
'64592004666704945574675477805199411288137454783320798602050822322450089238268',
),
signature:
'0x1c13cacddca8d7d8248e91f412377e68f8f1f9891a59a6c1b2eea9f7b33558c30c4fb86a448e08ab7def40a28fb3a3062dcb33bb3c45302447fce5c4288b7c7f5b03',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
},
// Order selling GNT
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('250000000000000000000'),
takerAssetAmount: new BigNumber('10000000000000000000'),
makerAssetData: '0xf47261b000000000000000000000000031fb614e223706f15d0d3c5f4b08bdf0d5c78623',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('1601535600'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber(
'40204378562212615907903051460421336779451270522691667164301816101569427926606',
),
signature:
'0x1c788bf4b93769da1e8f195f52f0f59b4a298ac6da30cf6d05a87ed4be5ee974f61352ed1bc6a0844d0962b8c894c9ca08e452431255958a4e98dd93cbe1fbc73803',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
},
// Order selling MKR
{
senderAddress: '0x0000000000000000000000000000000000000000',
makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
takerAddress: '0x0000000000000000000000000000000000000000',
makerFee: new BigNumber('0'),
takerFee: new BigNumber('0'),
makerAssetAmount: new BigNumber('200000000000000000000'),
takerAssetAmount: new BigNumber('5000000000000000000'),
makerAssetData: '0xf47261b00000000000000000000000007b6b10caa9e8e9552ba72638ea5b47c25afea1f3',
takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
expirationTimeSeconds: new BigNumber('1601535600'),
feeRecipientAddress: '0x0000000000000000000000000000000000000000',
salt: new BigNumber(
'71338269924068280039932133924198049371838034090153601678083172009862985793828',
),
signature:
'0x1bb3151d57ee1e8fa697767ce83ee4ba77d1ceb8cc1e79c7d77126b3687517704c50c6b3d9cb42c7e7d4478d574b297dfbd1626c5c18a7bc9c2a792c4c07f0797c03',
exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
},
];
const getRenderOptionsOverridesFromUrl = () => {
const queryParams = new Uri(window.location.search);
const orderSourceOverride = queryParams.getQueryParamValue('orderSource');
const availableAssetDatasString = queryParams.getQueryParamValue('availableAssetDatas');
const feeRecipientOverride = queryParams.getQueryParamValue('feeRecipient');
const feePercentageOverride = +queryParams.getQueryParamValue('feePercentage');
let affiliateInfoOverride;
if (feeRecipientOverride !== undefined && feePercentageOverride !== undefined) {
affiliateInfoOverride = {
feeRecipient: feeRecipientOverride,
feePercentage: feePercentageOverride,
};
}
const renderOptionsOverrides = {
orderSource: orderSourceOverride === 'provided' ? providedOrders : orderSourceOverride,
networkId: +queryParams.getQueryParamValue('networkId') || undefined,
defaultAssetBuyAmount: +queryParams.getQueryParamValue('defaultAssetBuyAmount') || undefined,
availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined,
defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'),
affiliateInfo: affiliateInfoOverride,
shouldDisablePushToHistory: !!queryParams.getQueryParamValue('shouldDisablePushToHistory'),
};
return renderOptionsOverrides;
};
const render = renderOptionsOverrides => {
const renderOptionsDefaults = {
orderSource: 'https://api.radarrelay.com/0x/v2/',
onClose: () => {
console.log('0x Instant Closed');
},
};
const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides));
zeroExInstant.render(renderOptions);
};
const renderWithUrlDefaults = (renderOptions = {}) => {
const finalOptions = {
...getRenderOptionsOverridesFromUrl(),
...renderOptions,
};
render(finalOptions);
};
renderWithUrlDefaults();
const renderWithAssetData = assetData => {
renderWithUrlDefaults({
defaultSelectedAssetData: assetData,
});
};
</script>
</body>
</html>

View File

@@ -0,0 +1,4 @@
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.7499 13.7657H17.0782V12.215H21.1376C20.7961 10.7612 19.5062 9.6757 17.9887 9.6757C16.6799 9.6757 15.5038 10.4704 14.9916 11.711L14.6692 12.3506L13.588 11.1101C14.3467 9.28802 16.0729 8.125 17.9887 8.125C20.6064 8.125 22.7499 10.3154 22.7499 12.9903V13.7657V13.7657Z" fill="white"/>
<path d="M17.9888 17.8556C15.8453 17.8556 14.6882 16.5375 13.7777 15.3164L13.1707 14.5022C12.2792 13.3004 11.3497 12.0405 10.4202 10.8193C9.88911 10.1215 8.95963 9.6757 8.01119 9.6757C6.22811 9.6757 4.76751 11.1682 4.76751 12.9903C4.76751 14.8124 6.22811 16.3049 8.01119 16.3049C9.62354 16.3049 10.7806 14.793 11.2169 14.1339L11.4446 13.6881L12.4689 15.0062C11.2738 16.8283 9.64251 17.875 7.99222 17.875C5.39348 17.8556 3.25 15.6846 3.25 12.9903C3.25 10.296 5.39348 8.125 8.01119 8.125C9.45282 8.125 10.7996 8.78405 11.6153 9.86953C12.5447 11.0907 13.4742 12.3506 14.3658 13.5718L14.9728 14.3859C15.8833 15.6071 16.661 16.3049 17.9698 16.3049C19.2218 16.3049 20.1892 15.7428 20.7203 14.5992L22.4275 14.6573L22.2758 15.0644C21.517 16.7701 19.8288 17.8556 17.9888 17.8556Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,5 @@
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.325 5C10.8394 6.11774 9.74739 8.04279 10.0509 9.9134C10.6651 13.7056 16.5341 13.6813 16.6503 17.6773C16.7037 19.5213 15.62 20.7213 14.413 22" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M14.1626 5C14.1626 5 18.2507 7.50998 15.551 12.0307" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M12.311 21.9988C12.311 21.9988 8.22279 19.4888 10.9225 14.9681" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 639 B

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