Compare commits

...

4137 Commits

Author SHA1 Message Date
Brandon Millman
0bfcf79e79 Increase number of columns in relayer grid for small screens 2018-06-18 17:44:09 -07:00
Amir Bandeali
49f5495c45 Merge pull request #716 from 0xProject/feature/contracts/publicSignatureValidator
Make isValidSignature public
2018-06-18 16:20:16 -07:00
Amir Bandeali
9e431df848 Make isValidSignature public 2018-06-18 16:00:55 -07:00
Amir Bandeali
12476c52a4 Merge pull request #713 from 0xProject/feature/contracts/batchFillReturn
Make batchFill methods return FIllResults struct
2018-06-18 16:00:43 -07:00
Amir Bandeali
8fd9aebcb9 Make batchFill methods return FIllResults struct 2018-06-18 15:50:02 -07:00
Fabio Berger
8c83f4ba3b Merge pull request #722 from 0xProject/improvement/publishing-v2
Improvements to pre-publishing checks
2018-06-18 23:33:17 +02:00
Fabio Berger
25b6d1a232 Remove remove_tags script 2018-06-18 23:20:07 +02:00
Fabio Berger
880cbd88c2 Small fixes 2018-06-18 23:15:52 +02:00
Fabio Berger
dcd53c3c5b Use semver package instead of getNextPatchVersion 2018-06-18 23:08:44 +02:00
Fabio Berger
3e64b3da39 Use semver library instead of semverUtils 2018-06-18 23:08:33 +02:00
Fabio Berger
9a748c8bf1 small fixes 2018-06-18 23:07:03 +02:00
Fabio Berger
53eae14763 Show all errors of a given kind at once rather then throwing after the first instance is encountered 2018-06-18 23:06:55 +02:00
Fabio Berger
074c42e8b6 fix package.json 2018-06-18 23:06:48 +02:00
Fabio Berger
8633fa7024 Add more prepublish checks 2018-06-18 23:06:32 +02:00
Fabio Berger
19668b9b48 remove remove_tags script 2018-06-18 23:05:03 +02:00
Brandon Millman
3f02631b98 Merge pull request #712 from 0xProject/feature/website/portal-facelift
Change relayer grid tile to use logos and primary colors
2018-06-18 12:11:59 -07:00
Brandon Millman
da46eefe2e Create a shared Image component 2018-06-18 12:09:31 -07:00
Francesco Agosti
a3ca3ed33f Merge pull request #704 from 0xProject/bug/website/fix-filling-order
Fix filling orders on Portal
2018-06-18 10:24:42 -07:00
Francesco Agosti
efaa33c4d5 Merge pull request #711 from 0xProject/website/feature/prettier-onboarding-components
Made onboarding look like the mocks
2018-06-18 10:13:19 -07:00
fragosti
0cdfe7f458 Adjust version in changelog 2018-06-18 10:06:38 -07:00
Brandon Millman
2ad411ea29 Update RelayerGridTile render logic to incorportate colors and logos 2018-06-16 13:34:09 -07:00
Brandon Millman
55cbcd728d Add max width to top bar 2018-06-16 13:34:09 -07:00
Brandon Millman
8880860105 Set max-width for LargeLayout 2018-06-16 13:34:09 -07:00
Remco Bloemen
0c238448fd Merge pull request #700 from 0xProject/fix/contracts/tokenbugs
Handle tokens that do not return bool
2018-06-16 10:10:17 +02:00
fragosti
8a76fdc126 Finish last onboarding step 2018-06-15 18:34:57 -07:00
fragosti
433f830cf3 Finish set allowance step 2018-06-15 18:15:03 -07:00
fragosti
8893bc102c Add onboarding assets 2018-06-15 18:03:10 -07:00
fragosti
0cf9927132 Add all steps to their own file 2018-06-15 18:02:46 -07:00
fragosti
5993125cc7 Prettify account setup and add eth steps of onboarding 2018-06-15 15:17:20 -07:00
fragosti
0c34309133 Make metamask part of the fow pretty 2018-06-15 14:49:01 -07:00
fragosti
3d6ce0fb76 Make start onboarding button pretty 2018-06-15 14:06:17 -07:00
fragosti
54f79c2798 Improve styles of onboarding tooltip 2018-06-15 13:24:59 -07:00
fragosti
d0a3779091 Add Pointer component 2018-06-14 18:19:07 -07:00
Alex Browne
ff0960b174 Merge pull request #705 from 0xProject/feature/revert-trace-subprovider
Introduce subprovider for printing revert stack traces
2018-06-14 17:07:03 -07:00
Alex Browne
7032825e35 Change wording of error message when you try to use more than one subprovider 2018-06-14 16:53:48 -07:00
Alex Browne
d118533d87 Remove redundant check in trace.ts and revert_trace.ts 2018-06-14 16:53:29 -07:00
fragosti
35f4f75733 Prettier 2018-06-14 16:49:06 -07:00
Alex Browne
ef61c3543f Fix linter errors 2018-06-14 16:38:21 -07:00
Alex Browne
897560745a De-duplicate code by refactoring subprovider classes 2018-06-14 16:33:09 -07:00
Alex Browne
5a8539a122 Fix linter errors and remove coverage.json 2018-06-14 16:04:08 -07:00
Alex Browne
d9292a70bf Remove unused variables and other small fixes 2018-06-14 16:00:24 -07:00
Alex Browne
a9c23b7c28 Reverse order of stack trace to match behavior of most other language stack traces 2018-06-14 15:50:54 -07:00
Alex Browne
263bfb1bda Fix a bug in revert_trace.ts 2018-06-14 15:46:59 -07:00
Francesco Agosti
e7eb220c50 Merge pull request #695 from 0xProject/feature/website/onboarding-flow-allowances
Implement allowances and final "congrats" onboarding flow step
2018-06-14 14:41:42 -07:00
fragosti
7d67005820 Run prettify 2018-06-14 14:26:17 -07:00
fragosti
fadd91b6a2 Add to changelog for contract-wrappers 2018-06-14 14:22:53 -07:00
fragosti
5fa6a2848f Fix typo 2018-06-14 14:07:41 -07:00
Alex Browne
7ab921669b Introduce subprovider for printing revert stack traces 2018-06-14 13:58:54 -07:00
fragosti
4811dfa663 Fix filling orders on Portal 2018-06-14 13:56:36 -07:00
Remco Bloemen
2c7d6a7711 Handle tokens that do not return bool 2018-06-14 10:54:54 +02:00
Brandon Millman
0e354e5ea1 Merge pull request #685 from 0xProject/feature/website/jobs-page
Jobs page
2018-06-13 13:34:54 -07:00
Brandon Millman
d172a97247 Add back redirector behind feature flag 2018-06-13 12:29:36 -07:00
Brandon Millman
8a3df7e434 Update minHeight in Text 2018-06-13 12:19:14 -07:00
Brandon Millman
eafcbabaa2 Use Text components in Values 2018-06-13 12:10:21 -07:00
Brandon Millman
14071ea119 Use spread operator instead of React.createElement 2018-06-13 12:01:08 -07:00
fragosti
421e568232 Implement allowance and final flow step 2018-06-12 16:54:37 -07:00
Alex Browne
4efd28c092 Merge pull request #694 from 0xProject/refactor-sol-cov
Refactor sol-cov to de-duplicate code for coverage and profiling
2018-06-12 16:51:58 -07:00
Brandon Millman
d0bbee7e8c Fix issue with positions hash 2018-06-12 16:11:31 -07:00
Brandon Millman
7640563991 Revert localhost config 2018-06-12 16:09:23 -07:00
Amir Bandeali
90cf85c3f0 Merge pull request #682 from 0xProject/feature/contracts/popProxyId
Remove proxyId checks in AssetProxies
2018-06-12 16:05:46 -07:00
Brandon Millman
f1a98693d0 Use Text in Teams 2018-06-12 15:58:24 -07:00
Brandon Millman
2794d64d3e Use Text in OpenPositions 2018-06-12 15:54:27 -07:00
Alex Browne
82743cca92 Rename _coverageCollector -> _profilerCollector in TraceCollectionSubprovider 2018-06-12 15:46:41 -07:00
Alex Browne
d0c348e595 Refactor sol-cov to de-duplicate code for coverage and profiling 2018-06-12 15:40:18 -07:00
Alex Browne
f50d3088dc Merge pull request #691 from 0xProject/fix/sol-cov-memory
Refactor sol-cov to avoid keeping traceInfo in memory
2018-06-12 15:38:28 -07:00
Amir Bandeali
0917fa0d75 Rename popByte and popAddress 2018-06-12 15:30:46 -07:00
Amir Bandeali
cfb73dd534 Hard code test addresses/bytes32 instead of generating pseudorandom ones 2018-06-12 15:30:46 -07:00
Amir Bandeali
ef497b7989 Update artifacts 2018-06-12 15:30:41 -07:00
Brandon Millman
9d9341901f Use Text component for HeaderItem 2018-06-12 15:25:47 -07:00
Brandon Millman
155e3d225d Remove FloatingImage 2018-06-12 15:03:16 -07:00
Brandon Millman
ca41f100ab Move FilledImage into components/ui 2018-06-12 14:49:42 -07:00
Brandon Millman
084285a760 Replace FlatButton with Button in Retry 2018-06-12 14:26:48 -07:00
Brandon Millman
982391cd7c Fix incorrect colors 2018-06-12 14:23:47 -07:00
Brandon Millman
d206d0a3ae Add font family to Button component and use in Join0x component 2018-06-12 14:23:03 -07:00
Alex Browne
627ea6c860 Rename computeCoverageAsync -> computeSingleTraceCoverageAsync 2018-06-12 14:11:11 -07:00
Alex Browne
bcc76b3764 Fix linter errors 2018-06-12 14:09:42 -07:00
fragosti
39692a8b3f Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/onboarding-flow-allowances 2018-06-12 14:01:19 -07:00
Brandon Millman
eba8b4bf00 Consolidate jobs page grey colors with shared colors 2018-06-12 13:45:56 -07:00
Brandon Millman
f149665660 Fix lint errors 2018-06-12 13:40:15 -07:00
Brandon Millman
e3bb64cf35 Remove extra packages 2018-06-12 12:52:36 -07:00
Alex Browne
33f0669100 Refactor sol-cov to avoid keeping traceInfo in memory 2018-06-12 12:42:14 -07:00
Amir Bandeali
3a5f3e8b55 Unpop byte rather than making deep copy 2018-06-12 11:45:02 -07:00
Amir Bandeali
a0a90afbc0 Pass gas in to marketBuyOrdersNoThrow 2018-06-12 11:45:02 -07:00
Greg Hysen
2f96cb257c Looks up the memory location of makerAssetData/takerAssetData 2018-06-12 11:45:02 -07:00
Amir Bandeali
5910bec52e Make ZRX_PROXY_ID constant rather than popping it from ZRX_ASSET_DATA 2018-06-12 11:45:02 -07:00
Amir Bandeali
764b1c35cb Add tests for deepCopyBytes and missing write methods from LibBytes 2018-06-12 11:45:02 -07:00
Amir Bandeali
ee8c9b764d Pop id from assetData before dispatching to AssetProxies 2018-06-12 11:45:02 -07:00
Brandon Millman
7080f0c35a Implement small open positions 2018-06-12 10:44:03 -07:00
Brandon Millman
679d60cd5a Implement large screen open positions 2018-06-12 10:41:09 -07:00
Brandon Millman
bc36c0faed Teams section 2018-06-12 10:41:09 -07:00
Brandon Millman
3c073bc360 Benefits section 2018-06-12 10:41:08 -07:00
Brandon Millman
c52d5e1084 Refactor into BulletedItemList component 2018-06-12 10:41:08 -07:00
Brandon Millman
b7bb27fa21 Rework values section 2018-06-12 10:41:08 -07:00
Brandon Millman
087aaa2f94 Polish mission section and photo section 2018-06-12 10:41:08 -07:00
Brandon Millman
474b93a22f Add link to open positions section 2018-06-12 10:41:08 -07:00
Brandon Millman
0c2f002a7d Add scroll to top for jobs page 2018-06-12 10:41:08 -07:00
Brandon Millman
3d76d83a39 Skeleton for jobs page and initial implementation 2018-06-12 10:41:05 -07:00
Leonid Logvinov
787015f537 Upgrade solidity-parser-entlr 0.2.11 => 0.2.12 2018-06-12 10:22:15 -07:00
Leonid Logvinov
fb624fddc4 Fix import order 2018-06-11 22:30:14 -07:00
Leonid Logvinov
605ddacb71 Merge pull request #689 from 0xProject/geth-increase-startup-tx-delay
Increase delay when sending transactions during devnet startup
2018-06-11 22:15:51 -07:00
Leonid Logvinov
71934f05a8 Merge pull request #687 from 0xProject/feature/metacoin-docs
Add profiler and geth tests to metacoin
2018-06-11 22:03:22 -07:00
Leonid Logvinov
534a0d6836 Fix typos 2018-06-11 22:03:07 -07:00
Leonid Logvinov
746b1d0c4d Merge pull request #688 from 0xProject/feature/await-transaction-speedup
Speedup awaitTransactionMinedAsync and reduce polling interval in contracts tests
2018-06-11 21:56:56 -07:00
Leonid Logvinov
387c80e00a Merge pull request #690 from 0xProject/feature/truffle-sol-cov-fixes
Sol-cov fixes
2018-06-11 21:55:38 -07:00
Leonid Logvinov
05c914691f Add CHANGELOGs 2018-06-11 18:12:32 -07:00
Leonid Logvinov
94398d70f4 Speed-up sol-cov 2018-06-11 18:01:33 -07:00
Alex Browne
915ddb2b2b Increase delay when sending transactions during devnet startup 2018-06-11 17:26:10 -07:00
Alex Browne
b916e7f7ef Add note to web3-wrapper CHANGELOG.json 2018-06-11 17:13:58 -07:00
Alex Browne
3cc30f91a9 Speedup awaitTransactionMinedAsync and reduce polling interval in contracts tests 2018-06-11 17:07:28 -07:00
Leonid Logvinov
f4a61b4c70 Don't throw when no config file is found 2018-06-11 16:10:56 -07:00
Leonid Logvinov
6eebd693ce Fix solidityVersion schema regex 2018-06-11 16:10:15 -07:00
Fabio Berger
bc0ae6be31 Merge pull request #684 from 0xProject/fix/contract-wrappers/exchangeTransferSimulator
Move ExchangeTransferSimulator & OrderValidationUtils to Order-Utils
2018-06-12 00:14:19 +02:00
Fabio Berger
c03119d10a Stop exporting ArtifactWriter 2018-06-12 00:13:57 +02:00
Fabio Berger
e1879ef4d9 Fix no-unused-variable tslint rule to include parameters and fix issues 2018-06-11 23:42:30 +02:00
Fabio Berger
b6df727efb Fix linter exclude rule 2018-06-11 23:15:03 +02:00
Fabio Berger
fe58b44916 Validate all signature types rather then only ECSignatures 2018-06-11 22:14:03 +02:00
Fabio Berger
0a2694811d Store the instantiated OrderValidationUtils 2018-06-11 22:13:36 +02:00
Fabio Berger
31fe232bac Remove global hooks from tests and deploy contracts from within the specific tests 2018-06-11 22:13:12 +02:00
Leonid Logvinov
682f6d273c Fix linter issues 2018-06-11 12:49:46 -07:00
Leonid Logvinov
83ddaccf4a Add profiler and geth tests to metacoin 2018-06-11 11:59:48 -07:00
Leonid Logvinov
e0c0584c59 Add EmitStatement to ASTVisitor 2018-06-11 11:14:49 -07:00
Fabio Berger
60f5a52964 Merge branch 'v2-prototype' into fix/contract-wrappers/exchangeTransferSimulator
* v2-prototype:
  Fix a bug in SolCompilerArtifacts adapter config overriding
  Increase timeout for contract migrations
  Remove some copy-paste code
  Await transactions in migrations
  Fix typos
  Await transactions in migrations
  Await fake transactions
  Fix a typo
  Implement SolidityProfiler & adapt sol-cov to work with Geth

# Conflicts:
#	packages/migrations/CHANGELOG.json
2018-06-11 19:54:59 +02:00
Leonid Logvinov
7e5866ce3f Merge pull request #675 from 0xProject/feature/sol-cov-geth
`ProfilerSubprovider` & Geth-related fixes for `sol-cov`
2018-06-11 10:48:18 -07:00
Fabio Berger
89b7b56a2c Fix tslint issues 2018-06-11 19:43:40 +02:00
Fabio Berger
ae54b13d4b Add back artifacts file 2018-06-11 19:43:25 +02:00
Leonid Logvinov
927ccc489c Fix a bug in SolCompilerArtifacts adapter config overriding 2018-06-11 10:28:30 -07:00
Fabio Berger
21f7722f10 Move OrderValidationUtils (+ tests) and ExchangeTransferSimulator to order-utils 2018-06-11 19:21:32 +02:00
Fabio Berger
e4afe603f9 export parseECSignature method 2018-06-11 19:15:41 +02:00
Fabio Berger
30d15a1438 Export ArtifactWriter from migrations package 2018-06-11 19:12:55 +02:00
Fabio Berger
c84586dd66 Remove unused artifact file 2018-06-11 19:12:35 +02:00
Fabio Berger
e9f87c2026 Pass in generated contract wrapper to orderValidationUtils at instantiation 2018-06-11 14:44:53 +02:00
Fabio Berger
afa27a3c2a Refactor orderValidationUtils to use the generated contract wrapper instead of the higher-level one 2018-06-11 14:34:00 +02:00
Fabio Berger
ce6078ed94 Refactor ExchangeTransferSimulator public interface to accet an AbstractBalanceAndProxyAllowanceLazyStore so that this module could be re-used in different contexts. 2018-06-11 10:24:55 +02:00
Leonid Logvinov
6d5949ba9c Increase timeout for contract migrations 2018-06-08 15:27:59 -07:00
Leonid Logvinov
cdb165af7f Remove some copy-paste code 2018-06-08 14:56:46 -07:00
Leonid Logvinov
88a3f8e4aa Await transactions in migrations 2018-06-08 14:56:46 -07:00
Leonid Logvinov
1c3dc757c3 Fix typos 2018-06-08 14:56:45 -07:00
Leonid Logvinov
25866095db Await transactions in migrations 2018-06-08 14:56:45 -07:00
Leonid Logvinov
b6c8d8e971 Await fake transactions 2018-06-08 14:56:45 -07:00
Leonid Logvinov
ab94b0b231 Fix a typo 2018-06-08 14:56:45 -07:00
Leonid Logvinov
760bab8f86 Implement SolidityProfiler & adapt sol-cov to work with Geth 2018-06-08 14:56:45 -07:00
Greg Hysen
817c332d11 Merge pull request #627 from 0xProject/feature/contracts/erc721SafeTransferFrom
On-Chain AssetData Decoding Lib + safeTransferFrom for ERC721 + Memcpy
2018-06-08 11:58:23 -07:00
Greg Hysen
05fbc8e6b0 Linter changes to contracts 2018-06-08 11:43:47 -07:00
Greg Hysen
c39301b6da Fixed assetProxyUtils for linter 2018-06-08 11:04:07 -07:00
Alex Browne
add9a9db9b Merge pull request #674 from 0xProject/feature/geth-test-ci
Run contracts tests against Geth in CI
2018-06-08 10:53:22 -07:00
Greg Hysen
05123ea6f4 Updated LibBytes error messages 2018-06-07 16:32:42 -07:00
Greg Hysen
d62ff34a5a Cleanup after last rebase 2018-06-07 15:53:30 -07:00
Alex Browne
a8b8d53d9d Run contracts tests against Geth in CI 2018-06-07 15:47:43 -07:00
Greg Hysen
0d4ff5a916 Updated tests to use new revert handler 2018-06-07 15:39:40 -07:00
Greg Hysen
8ace41d144 Minor fixes after rebase 2018-06-07 15:39:40 -07:00
Greg Hysen
5bb7219f4b Camelcase in memCopy 2018-06-07 15:39:40 -07:00
Greg Hysen
f0200ab697 Moved some constants to global scope in assetProxyUtils 2018-06-07 15:39:40 -07:00
Greg Hysen
f457a56d4a Style updates to contracts 2018-06-07 15:39:40 -07:00
Greg Hysen
db086de84a Union types for generalized decodeAssetData 2018-06-07 15:39:40 -07:00
Greg Hysen
37684c6af0 Fixed a styling throughout contracts. Moved closing parenthesis for long list of function parameters to next line. 2018-06-07 15:39:40 -07:00
Greg Hysen
3c75d4f1dd Removed setting makerAssetData/takerAssetData from tests where values are same as defaultOrderParams. 2018-06-07 15:39:40 -07:00
Greg Hysen
b19276bb0f Fixed merge error when rebasing wrt length variable in asset data decoders 2018-06-07 15:39:40 -07:00
Greg Hysen
774d831fae Style updates to ERC721 onReceiver 2018-06-07 15:39:40 -07:00
Greg Hysen
a1b49d8389 Fixed after rebase 2018-06-07 15:39:40 -07:00
Greg Hysen
12e2bfc794 Fixes after rebasing 2018-06-07 15:39:38 -07:00
Greg Hysen
6e5abade3c updated migrations artifacts 2018-06-07 15:38:48 -07:00
Greg Hysen
e4e3676095 Fixed up after rebasing. Contracts build and tests pass 2018-06-07 15:38:48 -07:00
Greg Hysen
3ed13150e1 Style audit for proxies + libmem + libbytes 2018-06-07 15:38:48 -07:00
Greg Hysen
f03e5c6bd1 Style audit proxies 2018-06-07 15:38:48 -07:00
Greg Hysen
8496c1cdd3 Call safeTransferFrom only when there is receiver data present 2018-06-07 15:38:48 -07:00
Greg Hysen
3c3851c221 Fixed formatting in memory layout 2018-06-07 15:38:48 -07:00
Greg Hysen
05f1e9e3b8 Resolved edge case in Memcpy where where send would eventually turn "negative" and wrap around. 2018-06-07 15:38:48 -07:00
Greg Hysen
249a1e6d8d Removed the LibAssetProxyDecoder. Merged decode functions into the proxies. This way they can still be used by the forwarding contract. TestAssetDataDecoders inherits them in the same way the forwarding contract would 2018-06-07 15:38:48 -07:00
Greg Hysen
e042e0ad32 Converged on naming scheme for asset data: renamed all instances of assetMetadata, proxyData, proxyMetadata to assetData 2018-06-07 15:38:48 -07:00
Greg Hysen
5db15ca54c proxyData -> assetData 2018-06-07 15:38:48 -07:00
Remco Bloemen
069b89b208 Implement memcpy using masking and end-aligned words 2018-06-07 15:38:48 -07:00
Remco Bloemen
63014aeb6b Add tests for word loop iteration 2018-06-07 15:38:48 -07:00
Remco Bloemen
31e21db5b5 Add test for zero-size overlap 2018-06-07 15:38:48 -07:00
Remco Bloemen
7f21872510 Add test cases 2018-06-07 15:38:47 -07:00
Remco Bloemen
27351c9a90 Cleanup test script 2018-06-07 15:38:47 -07:00
Remco Bloemen
76b918d40e Convert Solidity tests to vectors 2018-06-07 15:38:47 -07:00
Remco Bloemen
f5bc0b205c Generate tests from vectors 2018-06-07 15:38:47 -07:00
Greg Hysen
b3c253ea2a Tests for writing bytes to nested bytes 2018-06-07 15:38:47 -07:00
Greg Hysen
d17e031259 Fixed up wording in memcpy 2018-06-07 15:38:47 -07:00
Greg Hysen
842363200b Tons of tests around nested byte arrays and ERC721 receiver 2018-06-07 15:38:42 -07:00
Greg Hysen
d9f9895b2b Test for onReceived erc721 callback 2018-06-07 15:37:42 -07:00
Greg Hysen
bc0edd4042 LibAssetProxyDecoder tests 2018-06-07 15:36:18 -07:00
Greg Hysen
9b82e2df58 Foundation for TestLibAssetProxyDecoder 2018-06-07 15:36:18 -07:00
Greg Hysen
3d65341080 Tests for libMem 2018-06-07 15:36:18 -07:00
Greg Hysen
80215ea181 LibMem + TestLibMem + LibAssetProxyDecoder + DummyERC721Receiver 2018-06-07 15:36:17 -07:00
Leonid Logvinov
78d8526e41 Merge pull request #679 from 0xProject/fix/await-transactions
Add missing awaitTransactionSuccessAsync calls
2018-06-07 15:34:46 -07:00
Alex Browne
0ddaabe377 Add missing awaitTransactionSuccessAsync calls 2018-06-07 14:46:03 -07:00
Fabio Berger
9bc6ebde4e Merge pull request #671 from 0xProject/refactor/move-spawn-switch-to-utils
Move spawnSwitchErr to @0xproject/utils
2018-06-07 21:44:22 +02:00
Fabio Berger
011f14d115 Fix linter issue 2018-06-07 21:24:27 +02:00
Fabio Berger
62a5cbb5ce Fix linter issue 2018-06-07 21:15:12 +02:00
Fabio Berger
5aaf87d612 Merge branch 'v2-prototype' into refactor/move-spawn-switch-to-utils
* v2-prototype:
  Fix tslint issues
  Fix tslint failure
  Pass in fee and assetAmount rather then the whole signedOrder
  Fix missing paths
  Revert to returning orderState on invalid order
  - Refactor remainingFillableCalculator so it can be used for the maker and taker side - Moved the tests over from order-watcher - Did some token -> asset renaming
  Update naming in orderStateUtils to use asset over token, also removed cancelledAmount since in V2 it's binary.
  Fixed path
  Use source-map-support package to include correct line numbers in mocha
  move generated contract wrappers from `contract_wrappers/generated/` to `generated_contract_wrappers` in package with no non-generated contract wrappers
2018-06-07 21:13:30 +02:00
Fabio Berger
96b31f3974 Merge pull request #678 from 0xProject/fix/order-utils/remaining-v2-changes
Remaining Order-utils V2 Changes
2018-06-07 21:12:21 +02:00
Fabio Berger
09e387bf09 Merge pull request #670 from 0xProject/fix/generated-nesting
Remove unnecessary folder nesting
2018-06-07 21:12:10 +02:00
Alex Browne
05fe8792ea Merge pull request #676 from 0xProject/feature/mocha-source-maps
Use source-map-support package to include correct line numbers in mocha
2018-06-07 11:55:47 -07:00
Fabio Berger
18ed45597a Fix tslint issues 2018-06-07 18:58:51 +02:00
Fabio Berger
a200eaacaa Fix tslint failure 2018-06-07 18:51:52 +02:00
Fabio Berger
f5ad553be3 Pass in fee and assetAmount rather then the whole signedOrder 2018-06-07 18:33:42 +02:00
Fabio Berger
4f4acc04fe Fix missing paths 2018-06-07 18:14:35 +02:00
Fabio Berger
dee0fec9e9 Revert to returning orderState on invalid order 2018-06-07 18:10:56 +02:00
Fabio Berger
73cc2a140c - Refactor remainingFillableCalculator so it can be used for the maker and taker side
- Moved the tests over from order-watcher
- Did some token -> asset renaming
2018-06-07 18:03:50 +02:00
Fabio Berger
6058a74da5 Update naming in orderStateUtils to use asset over token, also removed cancelledAmount since in V2 it's binary. 2018-06-07 18:02:48 +02:00
Fabio Berger
bd3b652cfc Fixed path 2018-06-07 13:15:13 +02:00
Fabio Berger
73429fc720 merge v2-prototype 2018-06-07 12:27:03 +02:00
Fabio Berger
10478a6b2f Merge branch 'v2-prototype' into refactor/move-spawn-switch-to-utils
* v2-prototype: (66 commits)
  Run prettier
  Remove unused variable
  Fix linting issues
  Change shouldRenderHeader prop to shouldHideHeader
  Get build and tests to pass
  typo
  Apply prettier
  Update contracts tests after rebase
  Apply various fixes based on PR feedback
  Document debug_increaseTime method and fix typo in devnet README
  Use an enum for ProviderType in contracts/src/utils/web3_wrapper
  Update contracts package README
  Update relevant changelogs
  Remove global gas estimate buffer
  Add Async suffix to relevant assertions
  Fix linter errors
  Update package.json and yarn.lock
  Update more things to work with both Geth and Ganache
  Small fixes and cleanup
  Add additional gas to calls to fillOrderNoThrow
  ...

# Conflicts:
#	packages/order-watcher/src/order_watcher/order_watcher.ts
#	packages/react-docs/src/components/type.tsx
#	packages/website/ts/components/ui/lifecycle_raised_button.tsx
#	packages/website/ts/components/wallet/wallet.tsx
2018-06-07 12:21:44 +02:00
Fabio Berger
e0bc01eea1 Merge pull request #673 from mohoff/patch-1
typo
2018-06-07 08:54:05 +01:00
fragosti
2af6d3f6bc Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/onboarding-flow-allowances 2018-06-06 18:07:22 -07:00
fragosti
cbe5438a31 Render TokenAllowance 2018-06-06 18:06:03 -07:00
Francesco Agosti
67c4ad128c Merge pull request #662 from 0xProject/feature/improve-linting
Tried enabling no-unused-variable...
2018-06-06 17:21:09 -07:00
fragosti
870eca0d9f Run prettier 2018-06-06 16:59:28 -07:00
Alex Browne
d299458084 Use source-map-support package to include correct line numbers in mocha 2018-06-06 16:54:20 -07:00
fragosti
e0cf68f1d5 Remove unused variable 2018-06-06 16:45:26 -07:00
fragosti
64906a1ba5 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting 2018-06-06 16:43:37 -07:00
fragosti
e75721016e Fix linting issues 2018-06-06 16:43:05 -07:00
fragosti
e0d5b9daf8 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting 2018-06-06 16:36:11 -07:00
Brandon Millman
5989844f1c Merge pull request #672 from 0xProject/feature/website/account-management-polish
Account management polish
2018-06-06 16:12:47 -07:00
Brandon Millman
14e3f413a2 Change shouldRenderHeader prop to shouldHideHeader 2018-06-06 16:11:23 -07:00
fragosti
a97d77064a Get build and tests to pass 2018-06-06 15:26:40 -07:00
mohoff
3342dd4001 typo 2018-06-06 23:21:53 +02:00
Alex Browne
785b9811f3 Merge pull request #622 from 0xProject/geth-devnet-rebase-on-v2
Run contract tests against private Geth network
2018-06-06 13:43:29 -07:00
Alex Browne
643c77ded0 Apply prettier 2018-06-06 13:28:32 -07:00
Alex Browne
76f01511a3 Update contracts tests after rebase 2018-06-06 13:10:59 -07:00
Alex Browne
dd8727d3ae Apply various fixes based on PR feedback 2018-06-06 12:41:15 -07:00
Alex Browne
b933946f33 Document debug_increaseTime method and fix typo in devnet README 2018-06-06 12:41:15 -07:00
Alex Browne
5d2f9d7a33 Use an enum for ProviderType in contracts/src/utils/web3_wrapper 2018-06-06 12:41:15 -07:00
Alex Browne
3baf14b793 Update contracts package README 2018-06-06 12:41:15 -07:00
Alex Browne
c57e4ba508 Update relevant changelogs 2018-06-06 12:41:14 -07:00
Alex Browne
98656289ea Remove global gas estimate buffer 2018-06-06 12:41:14 -07:00
Alex Browne
167a38e27d Add Async suffix to relevant assertions 2018-06-06 12:41:14 -07:00
Alex Browne
ba6806df5d Fix linter errors 2018-06-06 12:41:14 -07:00
Alex Browne
fe12101278 Update package.json and yarn.lock 2018-06-06 12:41:14 -07:00
Alex Browne
d6d7f4e875 Update more things to work with both Geth and Ganache 2018-06-06 12:40:31 -07:00
Alex Browne
63caddea62 Small fixes and cleanup 2018-06-06 12:40:31 -07:00
Alex Browne
36b01fbdcf Add additional gas to calls to fillOrderNoThrow 2018-06-06 12:40:31 -07:00
Alex Browne
45a3d8b75a Remove extra logs and other small fixes 2018-06-06 12:40:31 -07:00
Alex Browne
bca62c813d Throw in web3-wrapper when rawCallResult is '0x' 2018-06-06 12:40:30 -07:00
Alex Browne
ae1cf74dcd Remove outdated todo 2018-06-06 12:40:30 -07:00
Alex Browne
577a8dd005 Fix some more test cases, especially those that call increaseTime 2018-06-06 12:40:30 -07:00
Alex Browne
5900899c01 Add support for TEST_PROVIDER env var 2018-06-06 12:40:30 -07:00
Alex Browne
2dfc468094 Update more tests to pass on Geth 2018-06-06 12:40:30 -07:00
Alex Browne
98ffe9931d Get LibBytes tests working on both Ganache and Geth 2018-06-06 12:40:30 -07:00
Alex Browne
2004c0d739 Add ability to quickly switch between Geth and Ganache by changing a const 2018-06-06 12:39:44 -07:00
Alex Browne
cd7cb025ad Update exchange/transactions tests for Geth error messages 2018-06-06 12:39:43 -07:00
Alex Browne
96da267778 Fix ethers.js version override (the package is just called 'ethers') 2018-06-06 12:39:43 -07:00
Alex Browne
5816e410e9 Use our fork of ethers.js 2018-06-06 12:39:43 -07:00
Alex Browne
31c98fc0db Update some tests after rebase 2018-06-06 12:39:43 -07:00
Alex Browne
00bf957b53 Add more transactions to Geth on init. Skip tests that are failing. 2018-06-06 12:39:43 -07:00
Alex Browne
5b999c2f7d Increase gas limit to account for bigger ExchangeContract 2018-06-06 12:39:42 -07:00
Alex Browne
1cc9d9c071 Replace constant.REVERT test assertions with expectRevertOrAlwaysFailingTransaction 2018-06-06 12:39:42 -07:00
Alex Browne
72fb8460e9 Update code after rebase 2018-06-06 12:39:42 -07:00
Alex Browne
577156fe5f Use Geth for contract tests 2018-06-06 12:39:39 -07:00
fragosti
612cc96e41 Add utilities for getting tokens from tokensByAddress 2018-06-06 11:47:11 -07:00
Brandon Millman
da3f783a9f Merge pull request #669 from 0xProject/bug/website/fix-balance-rendering
Update balance amount rendering logic
2018-06-06 11:44:06 -07:00
Leonid Logvinov
b1e8545981 Merge pull request #653 from 0xProject/feature/ethereum-types-docs
Add a documentation page for ethereum-types package
2018-06-06 11:38:43 -07:00
fragosti
6a2da6dc06 Fix merge conflict 2018-06-06 11:23:57 -07:00
fragosti
58603e2a5a Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting 2018-06-06 11:17:13 -07:00
fragosti
d97184880c Use CLI for exclude 2018-06-06 11:10:06 -07:00
Leonid Logvinov
625f40cfa6 Add EthereumTypes to _renderDrawer 2018-06-06 10:31:38 -07:00
Leonid Logvinov
49049b8c12 Merge pull request #657 from 0xProject/feature/build-speed
Speedup CI builds
2018-06-06 10:25:43 -07:00
fragosti
037912ccab Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting 2018-06-06 10:20:35 -07:00
Leonid Logvinov
8b05b864fb Don't build website if no changes were made to it 2018-06-06 10:11:51 -07:00
Leonid Logvinov
319135c8fe Remove lerna bootstrap 2018-06-06 10:11:51 -07:00
Leonid Logvinov
61d9e418e8 Fix linter issues in generated contract wrappers 2018-06-06 10:11:51 -07:00
Leonid Logvinov
475bb2845d Add generated contract artifacts to prettierignore 2018-06-06 10:11:51 -07:00
Leonid Logvinov
42f39de0f9 Stop running prettier on generated files 2018-06-06 10:11:51 -07:00
fragosti
3898b8e8ab Wrap AllowanceToggle in redux container 2018-06-06 10:11:30 -07:00
Leonid Logvinov
b1fd005c95 Enable skipLibCheck flag in ts 2018-06-06 10:00:21 -07:00
Fabio Berger
cf8fdd3a70 Move spawnSwitchErr to @0xproject/utils 2018-06-06 16:26:04 +02:00
Fabio Berger
cb754ee125 move generated contract wrappers from contract_wrappers/generated/ to generated_contract_wrappers in package with no non-generated contract wrappers 2018-06-06 15:39:38 +02:00
Fabio Berger
cea81df969 Add missing import 2018-06-06 14:49:41 +02:00
Fabio Berger
af1d5fce6e Merge pull request #665 from 0xProject/fix/fix-build-watch
Improve Build/Watch Commands
2018-06-06 13:46:52 +01:00
Fabio Berger
54b86b6131 Add missing yarn 2018-06-06 13:40:34 +02:00
Fabio Berger
ec2b83515b Add missing build:all command 2018-06-06 13:26:08 +02:00
Fabio Berger
2f2724dff5 Fix remaining tslint issues 2018-06-06 12:39:15 +02:00
Fabio Berger
271fa26890 merge v2-prototype 2018-06-06 12:31:30 +02:00
Fabio Berger
fe437da751 Exclude generate contract wrappers from tslint 2018-06-06 12:23:50 +02:00
Fabio Berger
129876d1be remove unused imports from 0x.js test 2018-06-06 12:22:15 +02:00
Fabio Berger
f2ced67a8d Remove unused imports from contract handlebar template 2018-06-06 12:21:12 +02:00
Fabio Berger
787eec8be4 Merge v2-prototype 2018-06-06 11:30:57 +02:00
Fabio Berger
cc39eea999 Merge pull request #664 from 0xProject/fixes/misc-small-fixes
Small miscellaneous fixes
2018-06-06 10:26:50 +01:00
Fabio Berger
cbfed99bc6 Merge branch 'v2-prototype' into fixes/misc-small-fixes
* v2-prototype:
  Remove TranslatedText
  Fix prettier
  Add back UMD bundles for 0x.js
  Move portal disclaimer to the account management section
  Move prices into portal
  Use stricter check for subscribe input text
  Make buttons stack on mobile
  Do not show subscribe form if language is not english
  Address PR feedback
  Lint and cleanup
  Implement subscription form
  Add styled-components and polished
  Have basic newsletter subscribe form working
2018-06-06 11:10:27 +02:00
Brandon Millman
2b4cd8b2ec Fix undefined ether balance 2018-06-06 01:33:35 -07:00
Brandon Millman
b5dc72b126 Make scrollability a prop on TradeHistory 2018-06-06 01:33:35 -07:00
Brandon Millman
ab4d2faea3 Fix EthWrappers background color 2018-06-06 01:33:35 -07:00
Brandon Millman
1677817d9f Update GenerateOrderForm and FillOrder components 2018-06-06 01:33:35 -07:00
Brandon Millman
03854baf53 Update EthWrappers component 2018-06-06 01:33:35 -07:00
Brandon Millman
61dc253de1 Update TradeHistory component 2018-06-06 01:33:35 -07:00
Brandon Millman
a0e8f410d1 Hide action column on mainnet 2018-06-06 01:33:35 -07:00
Brandon Millman
2865f63c5d Fix TokenBalances background color 2018-06-06 01:33:35 -07:00
Brandon Millman
3f19ab1a87 Add isFullWidth prop to TokenBalances component 2018-06-06 01:33:35 -07:00
Brandon Millman
d75fec0cee Update balance amount rendering logic 2018-06-05 22:03:26 -07:00
fragosti
39570a9663 Remove TranslatedText 2018-06-05 21:49:14 -07:00
Brandon Millman
479c18e21f Fix prettier 2018-06-05 16:41:17 -07:00
Brandon Millman
fd4453d85e Merge pull request #668 from 0xProject/feature/website/move-disclaimer
Move portal disclaimer to the account management section
2018-06-05 16:40:08 -07:00
Leonid Logvinov
7ee7f99780 Add back UMD bundles for 0x.js 2018-06-05 16:29:18 -07:00
Brandon Millman
4c0b8e3113 Merge pull request #666 from 0xProject/bug/website/fix-missing-prices
Move price fetching from wallet into portal
2018-06-05 16:11:04 -07:00
Brandon Millman
e0af60d8a7 Move portal disclaimer to the account management section 2018-06-05 16:10:15 -07:00
Brandon Millman
afcb7f00da Move prices into portal 2018-06-05 15:37:51 -07:00
Francesco Agosti
e1b06bfce2 Merge pull request #652 from 0xProject/feature/website/landing-subscribe-button-2
Implement subscribe form on landing page
2018-06-05 13:16:10 -07:00
fragosti
8de3f03b49 Use stricter check for subscribe input text 2018-06-05 12:59:10 -07:00
fragosti
db8f018b42 Some cleanup 2018-06-05 11:51:07 -07:00
fragosti
59cb2132f2 Linter now passes 2018-06-05 11:46:05 -07:00
Fabio Berger
25f62daf14 - Rename watch to watch_without_deps in sub-packages, so dev's don't confuse running watch from root dir, with sub-package dir
- stop using special prebuild script name and run pre_build steps for `watch` and `build` commands
- Remove `clean` step from `build`/`watch`
2018-06-05 15:38:40 +02:00
Fabio Berger
05b9dfbe30 Mention the gasLimit until in the doc comment 2018-06-05 12:29:32 +02:00
Fabio Berger
3db4e2ee2f Merge branch 'v2-prototype' into fixes/misc-small-fixes
* v2-prototype:
  Fix broken link to `contract_templates`

# Conflicts:
#	packages/abi-gen/README.md
2018-06-05 12:22:24 +02:00
Fabio Berger
86a6a5b826 Replace - with _ in yarn script name so that we are consistent across yarn script names 2018-06-05 12:20:23 +02:00
Fabio Berger
cc6338d048 Add switch-default tslint rule and add missing default statement 2018-06-05 12:19:28 +02:00
Fabio Berger
57b65726d6 Remove outdated link in ABI-gen README 2018-06-05 12:16:25 +02:00
Fabio Berger
44a736c53b Merge pull request #661 from feuGeneA/patch-1
Fix broken link to `contract_templates`
2018-06-05 02:47:45 -07:00
Fabio Berger
38cbd42d81 Merge pull request #656 from 0xProject/refactor/fill-scenarios/for-v2
Refactor fill-scenarios for v2
2018-06-05 02:15:27 -07:00
Fabio Berger
28d019f824 Use _.omit for conciseness 2018-06-05 11:13:55 +02:00
Alex Browne
54b8e1be89 Merge pull request #658 from 0xProject/dont-automatically-rebuild-for-tests
Don't automatically rebuild when running yarn test
2018-06-05 01:00:51 -07:00
fragosti
9778695b4a Try enabling no-unused-variable... 2018-06-04 19:48:21 -07:00
Alex Browne
44b6285268 Remove duplicate cleans in package.json when clean is called in prebuild 2018-06-04 18:40:16 -07:00
F. Eugene Aumson
6c6fb2e287 Fix broken link to contract_templates
Note there is still a broken link here, the "wrapper files" one in the second paragraph.
2018-06-04 21:37:47 -04:00
Alex Browne
ecdfde8c38 Remove common-js/umd differentiation from 0x.js/package.json 2018-06-04 18:24:20 -07:00
fragosti
ea2d5b9d4a Make buttons stack on mobile 2018-06-04 17:52:39 -07:00
Leonid Logvinov
1e0522fe8f Add a TODO comment on StructLog type in the docs 2018-06-04 17:31:30 -07:00
Jacob Evans
70858603ed Merge pull request #633 from 0xProject/feature/contracts/errors
Update error handling
2018-06-04 17:25:45 -07:00
fragosti
3c508c1d27 Do not show subscribe form if language is not english 2018-06-04 17:06:23 -07:00
Jacob Evans
5c44db341f rename GT to GREATER_THAN 2018-06-04 17:04:16 -07:00
fragosti
cf73363016 Address PR feedback 2018-06-04 17:02:10 -07:00
Jacob Evans
351173e554 Rebase from v2-prototype 2018-06-04 16:55:22 -07:00
Amir Bandeali
342432dc76 Update Exchange statuses, revert instead of emmitting event on fill/cancel failures, and remove redundant logic in matchOrders 2018-06-04 15:55:28 -07:00
Alex Browne
c4538cada7 Don't automatically rebuild when running yarn test 2018-06-04 14:13:17 -07:00
Fabio Berger
de532bb2fc revert multisig change 2018-06-04 21:54:16 +01:00
Fabio Berger
f525afa5de reset multisign 2018-06-04 21:49:04 +01:00
Fabio Berger
9fba470364 Add PR to changelog 2018-06-04 21:29:17 +01:00
Fabio Berger
6cd5bf31c9 Update fill-scenarios for V2 and add CHANGELOG entry 2018-06-04 20:54:39 +01:00
Fabio Berger
321c0a8537 Remove unused compact artifacts from order-utils 2018-06-04 20:54:04 +01:00
Fabio Berger
b9bc58ef10 Add missing exports to order-utils and add CHANGELOG entry 2018-06-04 20:53:48 +01:00
Fabio Berger
7bcf05fd19 Add new 2.0 artifacts to migrations 2018-06-04 20:53:08 +01:00
Fabio Berger
f816bdf541 Remove compact_artifacts and replace with updated artifacts 2018-06-04 20:52:37 +01:00
Alex Browne
79472552aa Merge pull request #655 from 0xProject/update-migrations
Update artifacts in migrations
2018-06-04 12:47:11 -07:00
Fabio Berger
c5e5c8288e Update fill-scenarios to depend on v2 updated order-utils and types. Needed to re-employ the symlink hack. 2018-06-04 20:45:35 +01:00
Alex Browne
fd1c7f7169 Update artifacts in migrations 2018-06-04 12:45:23 -07:00
Leonid Logvinov
9212d67e2f Add a documentation page for ethereum types 2018-06-04 10:54:14 -07:00
Francesco Agosti
f5c74d123a Merge pull request #644 from 0xProject/feature/website/refactor-token-state-fetching
Move TokenState fetching logic up into Portal.tsx so it can be used by Wallet and PortalOnboardingFlow
2018-06-04 10:46:08 -07:00
fragosti
c8421efcd3 Address feedback 2018-06-04 10:27:24 -07:00
fragosti
f382609d01 Implement WETH step logic for continue 2018-06-04 10:25:38 -07:00
fragosti
f9615c18a1 Move trackedTokenStateByAddress logic into portal 2018-06-04 10:25:38 -07:00
fragosti
a74597c7cd Lint and cleanup 2018-06-01 17:37:32 -07:00
Fabio Berger
d50fbac5f9 Merge pull request #636 from 0xProject/refactor/order-utils/for-v2
Refactor order-utils for v2
2018-06-01 17:29:44 -07:00
fragosti
95086a75e6 Merge branch 'feature/website/landing-subscribe-button' into feature/website/landing-subscribe-button-2 2018-06-01 17:28:04 -07:00
fragosti
073a96cf63 Implement subscription form 2018-06-01 17:25:50 -07:00
Fabio Berger
d3c64bd5b4 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype:
  Set contract expiration time to a constant 10 minutes
  Remove unused promises array
  Make erc20_wrapper and erc721_wrapper serial
  Rename changelogs to changelog
  Add CHANGELOG entry
  Check that git branch is up to date before publishing
  Move prepublish checks before building packages for publishing
  Refactor changelog utils to a separate module
2018-06-01 17:13:02 -07:00
Fabio Berger
7024a7468a Improve comments and remove unused imports 2018-06-01 17:02:54 -07:00
Alex Browne
62e60e2ba6 Merge pull request #651 from 0xProject/serial-contract-wrappers
Make erc20_wrapper and erc721_wrapper serial and increase contract expiration time
2018-06-01 16:56:32 -07:00
Alex Browne
fb3860757c Set contract expiration time to a constant 10 minutes 2018-06-01 16:40:38 -07:00
Alex Browne
e4a8b17522 Remove unused promises array 2018-06-01 16:18:22 -07:00
Alex Browne
448df1bb9c Make erc20_wrapper and erc721_wrapper serial 2018-06-01 16:09:49 -07:00
Leonid Logvinov
bf6900fb2a Merge pull request #650 from 0xProject/feature/publishing
Improve publishing flow
2018-06-01 15:50:13 -07:00
Leonid Logvinov
50552546f3 Rename changelogs to changelog 2018-06-01 15:46:16 -07:00
Fabio Berger
324fab8186 Fix tslint issues 2018-06-01 14:12:18 -07:00
Fabio Berger
7ab80f01b5 Add comment to exported method 2018-06-01 14:09:47 -07:00
Fabio Berger
9ce4a5c7b1 Add missing dep 2018-06-01 14:09:16 -07:00
Fabio Berger
c9a0525a10 Fix types version 2018-06-01 14:02:15 -07:00
Fabio Berger
83465bb7f5 Also manually symlink types package in contracts 2018-06-01 14:02:00 -07:00
Leonid Logvinov
e8771fb36a Add CHANGELOG entry 2018-06-01 13:59:45 -07:00
Leonid Logvinov
d4d03f3d7f Check that git branch is up to date before publishing 2018-06-01 13:55:40 -07:00
Fabio Berger
d567d667e8 Remove usage of prebuild since it doesn't run on watch 2018-06-01 13:49:30 -07:00
Fabio Berger
3d55bbbc29 remove artifactsDir and contracts from compiler.json 2018-06-01 13:42:06 -07:00
Leonid Logvinov
2f8e52f905 Move prepublish checks before building packages for publishing 2018-06-01 13:39:04 -07:00
Fabio Berger
a5896ac6b6 Add postinstall hack to get around yarn not setting up symlinks properly. This is a temporary fix while we wait on: https://github.com/yarnpkg/yarn/issues/5907 2018-06-01 13:36:22 -07:00
Fabio Berger
94b9d5644c Fix type imports 2018-06-01 13:33:46 -07:00
Leonid Logvinov
06e5fc233c Refactor changelog utils to a separate module 2018-06-01 13:12:45 -07:00
Fabio Berger
aefb922a05 Remove ISigner artifact 2018-06-01 13:11:18 -07:00
Fabio Berger
a22434fd73 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype:
  Update v2 artifacts
  Add IWallet and IValidator to compiled contracts
  Split migrations compile command into one for V1 and another for V2

# Conflicts:
#	packages/migrations/artifacts/2.0.0/Exchange.json
#	packages/migrations/artifacts/2.0.0/TestSignatureValidator.json
2018-06-01 13:08:38 -07:00
Fabio Berger
c41846805d Merge pull request #649 from 0xProject/addArtifacts
Add Updated V2 Artifacts
2018-06-01 13:06:42 -07:00
Fabio Berger
b7b45b69a6 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype: (33 commits)
  Only show ProviderDisplay in portal
  Improve sol-cov docs
  Remove old parse code
  Refactor order parser and add shared order support to new portal
  Add generate and fill order routes
  Address feedback
  Override ethereumjs-tx version
  Fix missing key
  Update placeholder param ordering
  Change userEtherBalanceInWei to optional so we can know if its loading
  Add loading state to ProviderDisplay
  Tweaks
  Add Placeholder component
  Add StandardIconRow
  Split render into loading and loaaded
  Fix linter errors
  Fix linter errors
  Add ethereum-types to extraFileIncludes
  Introduce ethereum-types package
  Remove merge conflicts from yarn.lock
  ...

# Conflicts:
#	packages/contracts/src/utils/exchange_wrapper.ts
#	packages/contracts/src/utils/match_order_tester.ts
#	packages/contracts/src/utils/types.ts
#	packages/contracts/test/exchange/core.ts
#	packages/contracts/test/exchange/match_orders.ts
#	packages/contracts/test/libraries/lib_bytes.ts
#	packages/sol-cov/package.json
2018-06-01 13:05:17 -07:00
Fabio Berger
ed5528664c Update v2 artifacts 2018-06-01 12:20:54 -07:00
Fabio Berger
fe88d3c225 Add IWallet and IValidator to compiled contracts 2018-06-01 12:20:36 -07:00
Fabio Berger
aed4ee8694 Split migrations compile command into one for V1 and another for V2 2018-06-01 12:05:57 -07:00
fragosti
817d9b0d3e Add styled-components and polished 2018-06-01 11:49:58 -07:00
Fabio Berger
df9cfe7840 Update json-schemas version to 1.0.0 to avoid possible conflicts 2018-06-01 11:48:55 -07:00
Fabio Berger
8cd4578d83 Add signature specific validation methods, and other refactors 2018-06-01 11:34:12 -07:00
Brandon Millman
9ca41b9536 Merge pull request #648 from 0xProject/feature/website/fill-order
Add shared order support
2018-06-01 11:22:25 -07:00
Brandon Millman
559743c911 Only show ProviderDisplay in portal 2018-06-01 11:05:01 -07:00
fragosti
3a7f26f620 Have basic newsletter subscribe form working 2018-06-01 11:04:56 -07:00
Leonid Logvinov
04a0eae241 Improve sol-cov docs 2018-06-01 10:43:33 -07:00
Brandon Millman
0500d2fb6e Remove old parse code 2018-06-01 10:37:44 -07:00
Brandon Millman
31f1a9e5aa Refactor order parser and add shared order support to new portal 2018-06-01 10:37:44 -07:00
Brandon Millman
6387aae471 Add generate and fill order routes 2018-06-01 10:37:44 -07:00
Fabio Berger
152082e182 Fix TODOs 2018-05-31 21:32:20 -07:00
Fabio Berger
08eb2b3df7 Update all artifacts 2018-05-31 21:32:13 -07:00
Fabio Berger
846ec87249 List V2 contracts in compile.json now 2018-05-31 21:28:58 -07:00
Fabio Berger
62690b5159 Fix sol-cov issue by changing it's dep to current version of types 2018-05-31 21:23:28 -07:00
Fabio Berger
719c432ca8 Rename ISigner to IWallet and implement SignatureType.Validator 2018-05-31 21:23:08 -07:00
Fabio Berger
e654616b6d Bump types to a major version to avoid the caret 2018-05-31 20:39:10 -07:00
Fabio Berger
f0473b0320 Fix metadata offsets 2018-05-31 16:12:56 -07:00
Fabio Berger
fcc627e6e1 fix method rename 2018-05-31 16:12:36 -07:00
Fabio Berger
fe17802cd2 Rename Ecrecover to EthSign 2018-05-31 16:12:21 -07:00
Leonid Logvinov
384c05ccc7 Merge pull request #642 from 0xProject/feature/ethereum-types
Introduce ethereum-types package
2018-05-31 14:33:28 -07:00
Leonid Logvinov
193e4f3275 Address feedback 2018-05-31 13:43:53 -07:00
Brandon Millman
6fd87568e7 Merge pull request #643 from 0xProject/feature/website/wallet-loading
Add loading states to wallet and provider display
2018-05-31 13:34:12 -07:00
Alex Browne
484fd68495 Merge pull request #647 from 0xProject/override-ethereumjs-tx-version
Override ethereumjs-tx version
2018-05-31 12:19:37 -07:00
Alex Browne
792be54443 Override ethereumjs-tx version 2018-05-31 12:05:13 -07:00
Brandon Millman
00df102c29 Fix missing key 2018-05-31 11:54:25 -07:00
Brandon Millman
90e68ddd73 Update placeholder param ordering 2018-05-31 11:54:25 -07:00
Brandon Millman
df27f4f118 Change userEtherBalanceInWei to optional so we can know if its loading 2018-05-31 11:54:25 -07:00
Brandon Millman
bee26daf0c Add loading state to ProviderDisplay 2018-05-31 11:54:25 -07:00
Brandon Millman
b76c738785 Tweaks 2018-05-31 11:54:25 -07:00
Brandon Millman
8ca9fb0251 Add Placeholder component 2018-05-31 11:54:25 -07:00
Brandon Millman
3b26a656f7 Add StandardIconRow 2018-05-31 11:54:25 -07:00
Brandon Millman
2f5ac5d993 Split render into loading and loaaded 2018-05-31 11:54:25 -07:00
Leonid Logvinov
a2fc9a964b Fix linter errors 2018-05-31 11:19:18 -07:00
Leonid Logvinov
b8a267370d Fix linter errors 2018-05-31 11:04:06 -07:00
Leonid Logvinov
fa3d011f68 Add ethereum-types to extraFileIncludes 2018-05-31 11:04:05 -07:00
Leonid Logvinov
a7fc9caacb Introduce ethereum-types package 2018-05-31 11:04:05 -07:00
Leonid Logvinov
c284f6dcd4 Merge pull request #624 from 0xProject/feature/fast-ci2
Rebalance CI tests to run faster
2018-05-31 11:02:56 -07:00
Fabio Berger
368d59c3ca Update artifacts 2018-05-31 11:02:45 -07:00
Fabio Berger
94ee82e076 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype: (45 commits)
  Check length before accessing indices, add awaitTransactionSuccess where needed, and rename function
  Add back before/after snapshots for each test
  Rename Signer to Wallet, rename GAS_ESTIMATE to GAS_LIMIT
  Make preSigned and allowedValidators mappings public
  Change names of signature types
  Fix formatting and tests
  Make AssetProxyId last byte of assetData
  Add signer to txHash, allow approveValidator to be used with executeTransaction
  Update Whitelist
  Fix Exchange interface
  Increase block gas limit
  Use last byte of signature as signature type
  Remove TxOrigin signature type, modify whitelist to use Validator signature type
  Update Whitelist contract with comments, also require maker to be whitelisted
  Fix build
  Add example whitelist contract and minimum tests
  Add sample whitelist contract
  Add TxOrigin signature type and rearrange order of types
  Add approveValidator function
  Add Validator signature type
  ...

# Conflicts:
#	packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol
#	packages/contracts/src/utils/types.ts
#	packages/contracts/test/exchange/transactions.ts
#	packages/order-utils/src/asset_proxy_utils.ts
2018-05-31 10:45:34 -07:00
Leonid Logvinov
bfefb6e696 Remove merge conflicts from yarn.lock 2018-05-31 10:36:34 -07:00
Leonid Logvinov
95b7601e2b Don't wait con contract tests to submit coverage 2018-05-31 10:34:24 -07:00
Leonid Logvinov
f9c8bd868c Keep node versions consistent 2018-05-31 10:33:56 -07:00
Leonid Logvinov
a773973b1b Split tests into two buckets 2018-05-31 10:33:56 -07:00
Leonid Logvinov
a60006366b Use a newer version of node/yarn to speed-up deps instaation 2018-05-31 10:33:56 -07:00
Leonid Logvinov
a66bb7889a Try to cache dependencies 2018-05-31 10:32:43 -07:00
Leonid Logvinov
adfba06e85 Combine lint and pretttier tests together 2018-05-31 10:32:43 -07:00
Leonid Logvinov
6ee4e954f6 Rebalance tests 2018-05-31 10:32:43 -07:00
Leonid Logvinov
a11d139ff6 Merge pull request #641 from 0xProject/feature/remove-types
Remove types
2018-05-31 10:29:42 -07:00
Leonid Logvinov
85a3e66314 Add changelog entry for typescript-typings 2018-05-31 10:29:05 -07:00
Leonid Logvinov
1a3958ed60 Remove some types 2018-05-31 10:20:36 -07:00
Leonid Logvinov
743c957918 Remove published types 2018-05-31 10:20:35 -07:00
Amir Bandeali
224a6c192b Fix build 2018-05-31 10:19:10 -07:00
Alex Browne
ae47da3801 Merge pull request #640 from 0xProject/await-transaction-success
Add awaitTransactionSuccess where needed
2018-05-30 22:28:37 -07:00
Alex Browne
a6d669453f Pass in a provider and instantiate a new web3Wrapper in token_registry_wrapper 2018-05-30 22:27:07 -07:00
Fabio Berger
0beab9eec4 Expose isValidPresignedSignatureAsync method 2018-05-30 17:55:33 -07:00
Fabio Berger
aa997f1be5 Move isValidOrderHash to the order_hash_test file 2018-05-30 17:55:16 -07:00
Fabio Berger
4eb58a70bb Decide to throw for Caller signature type for now 2018-05-30 17:54:59 -07:00
Amir Bandeali
5b31d0aa36 Merge pull request #561 from 0xProject/feature/contracts/txorigin
Add Validator signature type
2018-05-30 17:53:22 -07:00
Amir Bandeali
79e7c44884 Check length before accessing indices, add awaitTransactionSuccess where needed, and rename function 2018-05-30 17:52:37 -07:00
Amir Bandeali
1382c1243a Add back before/after snapshots for each test 2018-05-30 17:11:31 -07:00
Amir Bandeali
8f2fd9b603 Rename Signer to Wallet, rename GAS_ESTIMATE to GAS_LIMIT 2018-05-30 17:11:31 -07:00
Amir Bandeali
d625b65a09 Make preSigned and allowedValidators mappings public 2018-05-30 17:11:31 -07:00
Amir Bandeali
101e9be7b9 Change names of signature types 2018-05-30 17:11:31 -07:00
Amir Bandeali
9f93d8f533 Fix formatting and tests 2018-05-30 17:11:31 -07:00
Amir Bandeali
6050a59e4a Make AssetProxyId last byte of assetData 2018-05-30 17:11:30 -07:00
Amir Bandeali
e5b7e29113 Add signer to txHash, allow approveValidator to be used with executeTransaction 2018-05-30 17:11:30 -07:00
Amir Bandeali
ecdd0ce9f2 Update Whitelist 2018-05-30 17:11:30 -07:00
Amir Bandeali
fc5c598f8f Fix Exchange interface 2018-05-30 17:11:30 -07:00
Amir Bandeali
18ebed3c5d Increase block gas limit 2018-05-30 17:11:30 -07:00
Amir Bandeali
822e319efe Use last byte of signature as signature type 2018-05-30 17:11:30 -07:00
Amir Bandeali
6d462fc961 Remove TxOrigin signature type, modify whitelist to use Validator signature type 2018-05-30 17:11:30 -07:00
Amir Bandeali
4b71c65aea Update Whitelist contract with comments, also require maker to be whitelisted 2018-05-30 17:11:30 -07:00
Amir Bandeali
34ab53173d Fix build 2018-05-30 17:11:30 -07:00
Amir Bandeali
d6be6f79ce Add example whitelist contract and minimum tests 2018-05-30 17:11:30 -07:00
Amir Bandeali
87d36f06fd Add sample whitelist contract 2018-05-30 17:11:30 -07:00
Amir Bandeali
3eb05b4505 Add TxOrigin signature type and rearrange order of types 2018-05-30 17:11:30 -07:00
Amir Bandeali
0789c6a3d8 Add approveValidator function 2018-05-30 17:11:30 -07:00
Amir Bandeali
b587f076fe Add Validator signature type 2018-05-30 17:11:30 -07:00
Amir Bandeali
a5a7217c8f Add deepCopyBytes method to LibBytes 2018-05-30 17:11:30 -07:00
Amir Bandeali
c0cf55b40b Merge pull request #639 from 0xProject/fix/contracts/multisigWrapper
Update LogDecoder
2018-05-30 17:10:39 -07:00
Fabio Berger
9200ed2216 Introduce OrderWithoutExchangeAddress type since this is what get's sent to the smart contracts 2018-05-30 14:45:20 -07:00
Fabio Berger
e1f7dd1372 Add ISigner artifacts 2018-05-30 14:08:58 -07:00
Fabio Berger
32833b7301 Fix order-utils tests 2018-05-30 14:08:43 -07:00
Fabio Berger
3302c89284 Revivie the ECSignatureSchema 2018-05-30 13:52:27 -07:00
Francesco Agosti
e18d61b31a Merge pull request #635 from 0xProject/feature/website/custom-onboarding-tooltip
Remove react-joyride and some more refactoring
2018-05-30 11:49:04 -07:00
Francesco Agosti
61cd1ae525 Merge pull request #638 from 0xProject/feature/website/onboarding-eth-flow
Onboarding: implement add ETH step, and stub for add WETH step
2018-05-30 11:17:38 -07:00
Alex Browne
064608a8ef Add awaitTransactionSuccess where needed 2018-05-30 11:10:30 -07:00
Amir Bandeali
5a840c88b5 Change logDecoder back into class, remove awaitTransactionMined from multiSigWrapper 2018-05-30 10:00:58 -07:00
fragosti
b14c3fe48d Onboarding: implement add ETH step, and stub for add WETH step 2018-05-29 17:57:22 -07:00
Fabio Berger
4874d55d03 Initial refactor of order-utils. Move many utils from contracts into this package. 2018-05-29 16:58:30 -07:00
Brandon Millman
b20e40dd6f Fix unselected relayer drawer item 2018-05-29 16:04:25 -07:00
fragosti
bc28a08dd0 Address PR feedback 2018-05-29 15:49:13 -07:00
fragosti
0d3010f6fc Remove react-joyride from deps 2018-05-29 15:27:30 -07:00
fragosti
399a651fa3 Add entry to CHANGELOG.json 2018-05-29 15:24:10 -07:00
fragosti
30ac5fcb5e Remove blacklist concept 2018-05-29 15:18:43 -07:00
fragosti
92cb5e10be Some cleanup 2018-05-29 14:26:38 -07:00
Fabio Berger
10faa47495 Freeze order-utils at 0.0.5 for all packages except contracts 2018-05-29 13:38:19 -07:00
fragosti
f0bbf2cab0 Improve tooltip look 2018-05-29 12:53:18 -07:00
fragosti
338e8be327 Add types for react-popper, remove types for react-joyride 2018-05-29 11:21:14 -07:00
Leonid Logvinov
a4726a0e0d Merge pull request #621 from 0xProject/feature/compiler-assertions
Add schema assertions on public methods of @0xproject/sol-compiler
2018-05-29 10:58:46 -07:00
fragosti
d4a366aeb1 Replace react-joyride with react-popper 2018-05-29 10:48:44 -07:00
Leonid Logvinov
98652997f9 Add a CHANGELOG entry 2018-05-29 10:09:09 -07:00
Leonid Logvinov
f5a39c2f7b Make opts param optional in Compiler 2018-05-29 10:09:09 -07:00
Leonid Logvinov
9854db0a63 Throw if trying to schema-validate an undefined 2018-05-29 10:09:09 -07:00
Leonid Logvinov
cc7b0f4623 Add CHANGELOG entry 2018-05-29 10:09:09 -07:00
Leonid Logvinov
549e6d57c4 Add schema assertions on public methods of @0xproject/sol-compiler 2018-05-29 10:09:07 -07:00
Fabio Berger
dea322e2c5 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype:
  Hide wallet management option and expand component on small screens
  Remove registry override
  Revert "Change the registry in yarn.lock"
  Change the registry in yarn.lock
  Remove contracts -> @0xproject/order-utils dependency
2018-05-25 19:54:11 -07:00
Fabio Berger
ed5b9c2b56 Merge pull request #625 from 0xProject/feature/contracts-without-contract-wrappers
Remove contracts -> @0xproject/contract-wrappers dependency
2018-05-25 19:52:47 -07:00
Brandon Millman
c31ca4af90 Hide wallet management option and expand component on small screens 2018-05-25 18:34:07 -07:00
Leonid Logvinov
2c9ec4bee8 Remove registry override 2018-05-25 17:01:50 -07:00
Leonid Logvinov
6dcfc36a4a Revert "Change the registry in yarn.lock"
This reverts commit 76579a3004.
2018-05-25 16:36:56 -07:00
Leonid Logvinov
76579a3004 Change the registry in yarn.lock 2018-05-25 16:13:48 -07:00
Leonid Logvinov
1d68692bb6 Remove contracts -> @0xproject/order-utils dependency 2018-05-25 16:09:17 -07:00
Fabio Berger
790af0fd72 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype:
  Fix imports in order_utils
  Use web3-wrapper instead of 0x.js, update logDecoder
  Cleanup tests
  Add errMsg when throwing on unrecognized error
  Move readFirst4 to LibBytes
  Add old MultiSig to previous contracts, cleanup file structure
  Fix build
  Address feedback, rename contract to AssetProxyOwner
  Update multisig tests and utils
  Update MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress to use a mapping of registered proxies
  Implement design for relayers with no volume or tokens
2018-05-25 15:39:02 -07:00
fragosti
39008372e5 Write custom tooltip component 2018-05-25 15:31:27 -07:00
fragosti
1026952f26 Run linter 2018-05-25 13:13:06 -07:00
fragosti
9631927a8c Add localstorage helper 2018-05-25 12:03:18 -07:00
fragosti
b0e6ce581a Add next button 2018-05-25 12:03:18 -07:00
fragosti
e575323c60 Auto-show onboarding flow on first page view 2018-05-25 12:03:18 -07:00
fragosti
809ac3340c Add ability to blacklist onboarding steps 2018-05-25 12:03:18 -07:00
fragosti
f0af638874 Fix PortalOnboardingFlowProps 2018-05-25 12:03:18 -07:00
fragosti
b49148ec54 Implement metamask installation flow 2018-05-25 12:03:18 -07:00
Brandon Millman
c7f5e77b3f Merge pull request #620 from 0xProject/feature/website/relayer-empty
Implement design for relayers with no volume or tokens
2018-05-24 23:16:44 -07:00
Leonid Logvinov
817248369a Fix imports in order_utils 2018-05-24 18:30:48 -07:00
Amir Bandeali
654698b208 Merge pull request #571 from 0xProject/feature/contracts/proxyOwner
Update MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress
2018-05-24 17:24:52 -07:00
Fabio Berger
4e5bfae332 Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype:
  Temporarily disable installation tests
  Use domain separator for exchange address
  publicGetOrderSchemaHash -> getOrderSchemaHash
  Update order hash to match latest eip712
  Pin connect in sra-report
  Fix a typo
  Pin types in sra-report
  Fix linter issues
  Unpin types version in @0xproject/connect
  Pin types version in website
  Do a fake version bump on types so that yarn doesn't try to install updated version for not yet migrated packages
  Migrate migrations to v2
2018-05-24 16:31:21 -07:00
Fabio Berger
895a9093aa Merge pull request #575 from 0xProject/feature/contracts/eip712-order-hash
Update order hash to match latest eip712
2018-05-24 16:30:46 -07:00
Fabio Berger
35121f0b78 Merge branch 'v2-prototype' into feature/contracts/eip712-order-hash
* v2-prototype:
  Temporarily disable installation tests
  Pin connect in sra-report
  Fix a typo
  Pin types in sra-report
  Fix linter issues
  Unpin types version in @0xproject/connect
  Pin types version in website
  Do a fake version bump on types so that yarn doesn't try to install updated version for not yet migrated packages
  Migrate migrations to v2

# Conflicts:
#	packages/contracts/src/utils/order_utils.ts
2018-05-24 16:30:30 -07:00
Leonid Logvinov
c4a7574f7b Merge pull request #618 from 0xProject/feature/v2-migrations
Migrate migrations, types to v2
2018-05-24 16:18:44 -07:00
Leonid Logvinov
4ee636ecca Temporarily disable installation tests 2018-05-24 16:07:11 -07:00
Fabio Berger
662dc12877 Add senderAddress to order schema 2018-05-24 16:05:07 -07:00
Jacob Evans
3cc8af819c Use domain separator for exchange address 2018-05-24 16:00:22 -07:00
Jacob Evans
fcf4a958c3 publicGetOrderSchemaHash -> getOrderSchemaHash 2018-05-24 16:00:22 -07:00
Jacob Evans
65676c22f9 Update order hash to match latest eip712 2018-05-24 16:00:22 -07:00
Leonid Logvinov
3e907d7f4f Pin connect in sra-report 2018-05-24 15:45:11 -07:00
Leonid Logvinov
9fa567aa78 Fix a typo 2018-05-24 15:42:29 -07:00
Amir Bandeali
237ebb0716 Use web3-wrapper instead of 0x.js, update logDecoder 2018-05-24 15:39:19 -07:00
Amir Bandeali
fdea260e41 Cleanup tests 2018-05-24 15:39:19 -07:00
Amir Bandeali
9af77dc835 Add errMsg when throwing on unrecognized error 2018-05-24 15:39:19 -07:00
Amir Bandeali
d4aacd218a Move readFirst4 to LibBytes 2018-05-24 15:39:19 -07:00
Amir Bandeali
326a566db2 Add old MultiSig to previous contracts, cleanup file structure 2018-05-24 15:39:19 -07:00
Amir Bandeali
84257dac2b Fix build 2018-05-24 15:39:19 -07:00
Amir Bandeali
22ad9e1e1a Address feedback, rename contract to AssetProxyOwner 2018-05-24 15:39:19 -07:00
Amir Bandeali
cc44f5f75d Update multisig tests and utils 2018-05-24 15:39:19 -07:00
Amir Bandeali
23df5cc201 Update MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress to use a mapping of registered proxies 2018-05-24 15:39:19 -07:00
Brandon Millman
dab2d5db44 Implement design for relayers with no volume or tokens 2018-05-24 15:37:04 -07:00
Leonid Logvinov
1717c5c00d Pin types in sra-report 2018-05-24 15:28:37 -07:00
Leonid Logvinov
ea3f82ccc2 Fix linter issues 2018-05-24 14:56:20 -07:00
Leonid Logvinov
fd6ce470e7 Unpin types version in @0xproject/connect 2018-05-24 14:40:53 -07:00
Leonid Logvinov
6d3fbbe256 Pin types version in website 2018-05-24 14:40:32 -07:00
Leonid Logvinov
45c4de16d2 Do a fake version bump on types so that yarn doesn't try to install updated version for not yet migrated packages 2018-05-24 14:33:48 -07:00
Leonid Logvinov
92b0efff5a Migrate migrations to v2 2018-05-24 13:59:30 -07:00
Leonid Logvinov
bc550c3265 Merge pull request #617 from 0xProject/feature/no-coverage-ci-contracts
Disable contracts coverage on CI
2018-05-24 13:37:55 -07:00
Francesco Agosti
b39aa5d359 Merge pull request #607 from 0xProject/feature/website/onboarding-setup
Set up structure for onboarding flow along with basic step 0
2018-05-24 13:02:45 -07:00
fragosti
f8f8bd95ca Improve OnboardingFlow API and typescript types 2018-05-24 11:24:10 -07:00
fragosti
d057b77dc5 Address PR feedback 2018-05-24 10:53:13 -07:00
fragosti
27d637195d Undo change to react-highlight 2018-05-24 10:52:11 -07:00
fragosti
46919ce797 Fix build errors 2018-05-24 10:52:11 -07:00
fragosti
b4e1ce59f9 Fix issue where modal can be out of sync with app state 2018-05-24 10:52:11 -07:00
fragosti
7af77d3eb0 Basic onboarding flow infrastructure set up 2018-05-24 10:51:06 -07:00
Francesco Agosti
de1ff52de3 Merge pull request #612 from 0xProject/feature/website/add-redux-devtools
Add redux-devtools-extension to project
2018-05-24 10:12:57 -07:00
Leonid Logvinov
69c1df68c8 Disable contracts coverage on CI 2018-05-24 09:57:13 -07:00
Fabio Berger
62431fee8e Merge pull request #615 from 0xProject/refactor/json-schemas/for-v2
Refactor order schemas in json-schemas for v2
2018-05-24 09:39:28 -07:00
Fabio Berger
357201869a Change all wsrun commands so that they fast-exit (e.g any one failing stops the entire process from executing) 2018-05-23 21:27:37 -07:00
Fabio Berger
a88e8ffe79 Have source-map-loader ignore node_modules packages 2018-05-23 21:27:08 -07:00
Fabio Berger
5c88f43e15 Revert to an earlier version that works 2018-05-23 21:26:17 -07:00
Alex Browne
2f7ab3e32d Merge pull request #613 from 0xProject/check-tx-receipt-status
Check transaction receipt status
2018-05-23 18:12:41 -07:00
Fabio Berger
3ec05bb5d8 Force hex to have at least two hex values after the prefix, but it could be two zeros 2018-05-23 17:36:34 -07:00
Fabio Berger
59890f2c83 Fix Hex regex and tests 2018-05-23 17:28:17 -07:00
Fabio Berger
2c70162bee Remove the caret so it actually installs this version 2018-05-23 17:28:03 -07:00
Brandon Millman
2f1a4042bf Merge pull request #603 from 0xProject/feature/website/wallet-flex-box
Improve wallet layout using flexbox
2018-05-23 17:03:54 -07:00
Fabio Berger
4af7740907 Merge branch 'v2-prototype' into refactor/json-schemas/for-v2
* v2-prototype:
  Ignore v2 artifacts
2018-05-23 17:01:14 -07:00
Fabio Berger
f64ea361d4 Add CHANGELOG entry 2018-05-23 17:00:32 -07:00
Fabio Berger
9c850d152c Updated Order, SignedOrder schemas, removed ECSignature schema types and added Hex basic type 2018-05-23 16:52:41 -07:00
Fabio Berger
71266c0220 Merge pull request #614 from 0xProject/bug/prettier/ignore-v2-artifacts
Ignore v2 artifacts
2018-05-23 15:47:43 -07:00
Brandon Millman
0801457ff0 Use visibility property instead of placeholder div in wrap ether item 2018-05-23 15:28:51 -07:00
Jacob Evans
ba7c9ceccc Ignore v2 artifacts 2018-05-23 15:21:43 -07:00
Alex Browne
f6f2818a02 Change error message for awaitTransactionSuccessAsync 2018-05-23 15:09:19 -07:00
Alex Browne
b05a3b7aed Check transaction receipt status codes where applicable 2018-05-23 15:09:17 -07:00
Brandon Millman
3fe94891d3 Merge branch 'v2-prototype' into feature/website/wallet-flex-box
* v2-prototype: (95 commits)
  Add missing dep to website
  Upgrade solidity parser
  Fix trace test
  Fix linter issues
  Move contract utils
  Fix prettier
  Fix NameResolver
  Fix prettier
  Remove 0x.js as a dependency from website
  Enable 0x.js tests
  Fix small bug in order-utils
  Address feedback
  Fix Tslint error caused by "PromiseLike" value
  Fix Tslint error caused by "PromiseLike" value
  Update dogfood url
  fix contract-wrappers version
  Parse compiler.json in SolCompilerArtifactsAdapter
  Fix TokenTransferProxy artifact name since it's now suffixed with _v1
  Update yarn.lock
  Fix signature verification test
  ...
2018-05-23 14:16:32 -07:00
Fabio Berger
9d11028fce Bump all dependencies on json-schemas down a patch version so that they don't auto-magically get upgraded to the next version during the next publish 2018-05-23 13:56:52 -07:00
Fabio Berger
f6b81f588d Add missing dep to website 2018-05-23 13:30:09 -07:00
Fabio Berger
513007a82c Merge pull request #589 from 0xProject/feature/truffle-sol-cov
Sol-cov artifact Adapters (truffle)
2018-05-23 12:01:38 -07:00
Leonid Logvinov
bf18a90da7 Upgrade solidity parser 2018-05-23 11:21:33 -07:00
Leonid Logvinov
2ddd53b355 Fix trace test 2018-05-23 10:49:08 -07:00
Leonid Logvinov
c9aef16649 Fix linter issues 2018-05-23 10:39:56 -07:00
Leonid Logvinov
6a77e0fe56 Move contract utils 2018-05-23 10:32:14 -07:00
Leonid Logvinov
0a725415a4 Merge branch 'v2-prototype' into feature/truffle-sol-cov 2018-05-23 10:19:10 -07:00
Leonid Logvinov
af0d9439d4 Merge pull request #611 from 0xProject/feature/remove-0x-from=-website
Remove 0x.js as a dependency from website
2018-05-23 10:16:00 -07:00
Leonid Logvinov
65f09d0528 Fix prettier 2018-05-23 10:15:03 -07:00
Leonid Logvinov
48e6695447 Fix NameResolver 2018-05-23 09:57:43 -07:00
Leonid Logvinov
e3604c1662 Fix prettier 2018-05-23 09:41:35 -07:00
Leonid Logvinov
5913d654bd Remove 0x.js as a dependency from website 2018-05-23 09:41:35 -07:00
Fabio Berger
f3fe9661f6 Merge pull request #609 from 0xProject/refactor/contracts/remove0xjsDep
Remove 0x.js dep from Contracts
2018-05-23 09:04:59 -07:00
Fabio Berger
17cfd7b001 Enable 0x.js tests 2018-05-23 08:37:43 -07:00
Fabio Berger
e941bdd945 Merge branch 'v2-prototype' into refactor/contracts/remove0xjsDep
* v2-prototype:
  Fix small bug in order-utils
  Fix Tslint error caused by "PromiseLike" value
  Update dogfood url
2018-05-22 18:15:38 -07:00
Alex Browne
e7e8773cd4 Fix small bug in order-utils 2018-05-22 18:14:23 -07:00
Leonid Logvinov
ebc750d5bf Address feedback 2018-05-22 17:41:48 -07:00
Fabio Berger
3507fe6d5b Merge branch 'v2-prototype' of github.com:0xProject/0x-monorepo into v2-prototype
* 'v2-prototype' of github.com:0xProject/0x-monorepo:
  Update dogfood url
2018-05-22 17:37:23 -07:00
Fabio Berger
f9ef6491e6 Fix Tslint error caused by "PromiseLike" value 2018-05-22 17:37:06 -07:00
Fabio Berger
61e487224f Fix Tslint error caused by "PromiseLike" value 2018-05-22 17:36:41 -07:00
Brandon Millman
85eb82acb2 Update dogfood url 2018-05-22 17:36:22 -07:00
Fabio Berger
4d364ea261 fix contract-wrappers version 2018-05-22 17:18:09 -07:00
Fabio Berger
577528bb9c merge v2-prototype 2018-05-22 16:56:09 -07:00
Leonid Logvinov
d49f2c40ae Parse compiler.json in SolCompilerArtifactsAdapter 2018-05-22 16:41:50 -07:00
Fabio Berger
706bfafe74 Fix TokenTransferProxy artifact name since it's now suffixed with _v1 2018-05-22 16:38:26 -07:00
Fabio Berger
1b8204dabe Update yarn.lock 2018-05-22 16:37:33 -07:00
Fabio Berger
05cabded02 Fix signature verification test 2018-05-22 16:37:17 -07:00
Fabio Berger
1578402cbe Fix TokenTransferProxy artifact name since it's now suffixed with _v1 2018-05-22 16:37:04 -07:00
fragosti
49ee56b22c Move to deps from devDeps and use in development only 2018-05-22 16:32:26 -07:00
Leonid Logvinov
8c7f0902c0 Add a more verbose comment for self-destruct 2018-05-22 16:29:10 -07:00
Leonid Logvinov
056ef9ccd1 Merge pull request #610 from 0xProject/feature/sra-report-without-0x
Remove 0x.js dependency from sra-report
2018-05-22 16:18:42 -07:00
fragosti
dfc635b451 Add redux-devtools-extension to project 2018-05-22 16:08:04 -07:00
Leonid Logvinov
68321362c5 Remove 0x.js dependency from sra-report 2018-05-22 15:45:44 -07:00
Leonid Logvinov
f7560036b8 Merge branch 'v2-prototype' into feature/truffle-sol-cov 2018-05-22 15:33:36 -07:00
Leonid Logvinov
fc87caa348 Merge branch 'development' into v2-prototype 2018-05-22 15:30:39 -07:00
Leonid Logvinov
6e0aef5f2b Fix depth tracking in a tracer 2018-05-22 15:27:18 -07:00
Leonid Logvinov
127b3e7d60 Fix sol-compiler version 2018-05-22 15:27:17 -07:00
Leonid Logvinov
9740199870 Fix sol-cov tests 2018-05-22 15:27:17 -07:00
Leonid Logvinov
06be580d2c Fix a bug in CALL-like opcode handling 2018-05-22 15:27:17 -07:00
Leonid Logvinov
6540343f45 Remove trace.json 2018-05-22 15:27:17 -07:00
Leonid Logvinov
447b305e3c Suppport subcalls in constructor 2018-05-22 15:27:17 -07:00
Leonid Logvinov
0c53d276f8 Use BlockParamLiteral.Latest 2018-05-22 15:27:17 -07:00
Leonid Logvinov
83c37c6a7a Address feedback 2018-05-22 15:27:17 -07:00
Leonid Logvinov
ac52ad88a1 Use loglevel instead of verbose flag 2018-05-22 15:26:29 -07:00
Leonid Logvinov
84a1b5612d Publish
- 0x.js@0.38.0
 - @0xproject/abi-gen@0.3.0
 - @0xproject/assert@0.2.10
 - @0xproject/base-contract@0.3.2
 - @0xproject/connect@0.6.13
 - @0xproject/contract-wrappers@0.0.2
 - contracts@2.1.29
 - @0xproject/dev-utils@0.4.2
 - @0xproject/fill-scenarios@0.0.2
 - @0xproject/json-schemas@0.7.24
 - @0xproject/metacoin@0.0.7
 - @0xproject/migrations@0.0.6
 - @0xproject/monorepo-scripts@0.1.20
 - @0xproject/order-utils@0.0.5
 - @0xproject/order-watcher@0.0.2
 - @0xproject/react-docs-example@0.0.12
 - @0xproject/react-docs@0.0.12
 - @0xproject/react-shared@0.1.7
 - @0xproject/sol-compiler@0.5.0
 - @0xproject/sol-cov@0.0.11
 - @0xproject/sol-resolver@0.0.5
 - @0xproject/sra-report@0.1.0
 - @0xproject/subproviders@0.10.2
 - @0xproject/testnet-faucets@1.0.30
 - @0xproject/tslint-config@0.4.18
 - @0xproject/types@0.7.0
 - @0xproject/typescript-typings@0.3.2
 - @0xproject/utils@0.6.2
 - @0xproject/web3-wrapper@0.6.4
 - @0xproject/website@0.0.33
2018-05-22 15:25:47 -07:00
Leonid Logvinov
fa4e694859 Updated CHANGELOGS 2018-05-22 15:22:38 -07:00
Leonid Logvinov
f8c628b0c7 Updated CHANGELOGS 2018-05-22 15:22:12 -07:00
Leonid Logvinov
2f35e4789c Change publish command name 2018-05-22 15:20:35 -07:00
Leonid Logvinov
253bada643 Fix import paths 2018-05-22 15:20:35 -07:00
Leonid Logvinov
e4fe497504 Refactor ContractData lookup 2018-05-22 15:20:35 -07:00
Leonid Logvinov
5c9bde203e Remove a comment 2018-05-22 15:20:35 -07:00
Leonid Logvinov
d9907f227e Use a hidden directory for temp artifacts 2018-05-22 15:20:34 -07:00
Leonid Logvinov
08b08ef1d0 Match class names with file names 2018-05-22 15:20:34 -07:00
Leonid Logvinov
334ef5c3eb Improve a CHANGELOG comment 2018-05-22 15:20:34 -07:00
Leonid Logvinov
ac925aa226 Improve a CHANGELOG comment 2018-05-22 15:20:34 -07:00
Leonid Logvinov
86f17fb466 Rename ZeroExArtifactAdapter to SolCompilerArtifactAdapter 2018-05-22 15:20:34 -07:00
Leonid Logvinov
6aafda4517 Assign then pass 2018-05-22 15:20:34 -07:00
Leonid Logvinov
8267950dbc Assign then return 2018-05-22 15:20:34 -07:00
Leonid Logvinov
56d1b0103f Introduce CONFIG_FILE 2018-05-22 15:20:34 -07:00
Leonid Logvinov
1ff34bd0f4 Remove web3Factory.create and remove dev-tools dependency on sol-cov 2018-05-22 15:20:34 -07:00
Leonid Logvinov
b86248f13f Add CHANGELOG entries 2018-05-22 15:20:34 -07:00
Leonid Logvinov
427a29145d Support all opcodes in a trace parser 2018-05-22 15:20:34 -07:00
Leonid Logvinov
974575b695 Make sol-cov work with truffle and other artifact adapters 2018-05-22 15:20:34 -07:00
Leonid Logvinov
60b1fdd367 Only look at *.sol files in NameResolver 2018-05-22 15:20:33 -07:00
Leonid Logvinov
842f2ea5cc Fix a bug in FS resolver causing it to try reading directories 2018-05-22 15:20:33 -07:00
Leonid Logvinov
ae220c37df Add solcVersion to CompilerOpts 2018-05-22 15:20:33 -07:00
Fabio Berger
6f57f52ac2 Fix dep version 2018-05-22 13:44:35 -07:00
Fabio Berger
4897513d7d Fix import 2018-05-22 13:19:35 -07:00
Fabio Berger
c8dad01137 Fix await calls 2018-05-22 13:19:29 -07:00
Fabio Berger
5a09063adb Refactor etherToken test to use contract-wrappers 2018-05-22 13:15:16 -07:00
Fabio Berger
9de9bf651b Fix ExchangeWrapper 2018-05-22 13:15:01 -07:00
Fabio Berger
09d80b1e50 Fix imports 2018-05-22 13:14:38 -07:00
Fabio Berger
2b793f372a Merge branch 'v2-prototype' into refactor/contracts/remove0xjsDep
* v2-prototype:
  Fix tslint issues
  Add `are` to boolean naming conventions
  Fix tslint
  Fix the tsutils version, fixing ts typings issue
  Rename some variables in multi_sig_with_time_lock.ts
  Remove extra awaitTransactionMinedAsync calls
  Update artifacts
  Update yarn.lock
  Fix warnings in Metacoin
  Upgrade UglifyJS to include ES6 support
  Add CancelOrder and MatchOrder types
  Add missing return types
  Ignore classnames linter rule
  Apply changes to test/exchange/match_orders.ts
  Fix some unhandled promise rejections
  Add awaitTransactionMinedAsync after every sent transaction
  Add missing blockchainLifecycle calls to contracts tests

# Conflicts:
#	packages/contracts/src/utils/exchange_wrapper.ts
#	packages/contracts/test/asset_proxy/proxies.ts
#	packages/contracts/test/exchange/dispatcher.ts
#	packages/contracts/test/multi_sig_with_time_lock.ts
2018-05-22 13:02:21 -07:00
Fabio Berger
4cfeb6b8ac Merge branch 'v2-prototype' of github.com:0xProject/0x-monorepo into v2-prototype
* 'v2-prototype' of github.com:0xProject/0x-monorepo:
  Rename some variables in multi_sig_with_time_lock.ts
  Remove extra awaitTransactionMinedAsync calls
  Apply changes to test/exchange/match_orders.ts
  Fix some unhandled promise rejections
  Add awaitTransactionMinedAsync after every sent transaction
  Add missing blockchainLifecycle calls to contracts tests
2018-05-22 11:58:50 -07:00
Fabio Berger
9373451ca8 Fix tslint issues 2018-05-22 11:58:42 -07:00
Fabio Berger
15c199d5a2 Add are to boolean naming conventions 2018-05-22 11:58:35 -07:00
Alex Browne
cde85243d6 Merge pull request #601 from 0xProject/contracts-test-fixes
Contracts test fixes
2018-05-22 11:48:41 -07:00
Fabio Berger
c579db1a7b Merge branch 'v2-prototype' of github.com:0xProject/0x-monorepo into v2-prototype
* 'v2-prototype' of github.com:0xProject/0x-monorepo:
  Update artifacts
  Update yarn.lock
  Fix warnings in Metacoin
  Upgrade UglifyJS to include ES6 support
  Add CancelOrder and MatchOrder types
  Add missing return types
  Ignore classnames linter rule
2018-05-22 11:42:58 -07:00
Fabio Berger
61fa34e2ce Fix tslint 2018-05-22 11:42:52 -07:00
Fabio Berger
96febf6639 Merge pull request #605 from 0xProject/fix/multiple/build-errors
Fix build/lint errors and warnings
2018-05-22 11:40:27 -07:00
Fabio Berger
09e59cf677 Fix the tsutils version, fixing ts typings issue 2018-05-22 11:23:14 -07:00
Fabio Berger
9119ee14b6 Update artifact 2018-05-22 11:19:19 -07:00
Fabio Berger
2ac2ae3eee Fix tsutils version 2018-05-22 11:19:09 -07:00
Fabio Berger
a682b5d90e Remove 0x.js dep from contracts 2018-05-22 11:18:50 -07:00
Alex Browne
e26c0c58ae Rename some variables in multi_sig_with_time_lock.ts 2018-05-22 11:02:29 -07:00
Alex Browne
187fa71526 Remove extra awaitTransactionMinedAsync calls 2018-05-22 10:58:34 -07:00
Leonid Logvinov
031f97e97c Publish
- 0x.js@0.38.0
 - @0xproject/abi-gen@0.3.0
 - @0xproject/assert@0.2.10
 - @0xproject/base-contract@0.3.2
 - @0xproject/connect@0.6.13
 - @0xproject/contract-wrappers@0.0.2
 - contracts@2.1.29
 - @0xproject/dev-utils@0.4.2
 - @0xproject/fill-scenarios@0.0.2
 - @0xproject/json-schemas@0.7.24
 - @0xproject/metacoin@0.0.7
 - @0xproject/migrations@0.0.6
 - @0xproject/monorepo-scripts@0.1.20
 - @0xproject/order-utils@0.0.5
 - @0xproject/order-watcher@0.0.2
 - @0xproject/react-docs-example@0.0.12
 - @0xproject/react-docs@0.0.12
 - @0xproject/react-shared@0.1.7
 - @0xproject/sol-compiler@0.5.0
 - @0xproject/sol-cov@0.0.11
 - @0xproject/sol-resolver@0.0.5
 - @0xproject/sra-report@0.1.0
 - @0xproject/subproviders@0.10.2
 - @0xproject/testnet-faucets@1.0.30
 - @0xproject/tslint-config@0.4.18
 - @0xproject/types@0.7.0
 - @0xproject/typescript-typings@0.3.2
 - @0xproject/utils@0.6.2
 - @0xproject/web3-wrapper@0.6.4
 - @0xproject/website@0.0.33
2018-05-22 10:26:47 -07:00
Leonid Logvinov
b9e1c3c34f Updated CHANGELOGS 2018-05-22 10:26:39 -07:00
Leonid Logvinov
1a35107a1d Updated CHANGELOGS 2018-05-22 10:16:53 -07:00
Leonid Logvinov
d3e086c850 Change publish command name 2018-05-22 10:16:53 -07:00
Fabio Berger
4a0c8d72b0 merge development 2018-05-22 09:25:02 -07:00
Fabio Berger
ab9cfd293b remove generated contract_wrappers during clean 2018-05-22 09:21:20 -07:00
Fabio Berger
cc840a6911 Merge pull request #594 from 0xProject/improvement/addCustomTslintRules
Add more tslint rules
2018-05-22 18:04:50 +02:00
Remco Bloemen
5456187dd0 Update artifacts 2018-05-22 17:13:04 +02:00
Remco Bloemen
73c95c328d Update yarn.lock 2018-05-22 17:08:47 +02:00
Remco Bloemen
4a971be168 Fix warnings in Metacoin 2018-05-22 15:19:40 +02:00
Remco Bloemen
f657a3d811 Upgrade UglifyJS to include ES6 support 2018-05-22 15:19:40 +02:00
Remco Bloemen
b39f75a2e3 Add CancelOrder and MatchOrder types 2018-05-22 15:15:14 +02:00
Remco Bloemen
1dad14f8ea Add missing return types 2018-05-22 13:50:07 +02:00
Remco Bloemen
5cc2e8de7b Ignore classnames linter rule 2018-05-22 13:45:18 +02:00
Brandon Millman
d0abc60176 Add missing key 2018-05-21 21:41:03 -07:00
Brandon Millman
130e83d9b2 Use flexbox for wrapped ether item 2018-05-21 21:25:43 -07:00
Brandon Millman
ed8acdb11c Re add wrapped ether item 2018-05-21 21:25:43 -07:00
Brandon Millman
26370da13d Rewrite balance rows using flex box 2018-05-21 21:25:42 -07:00
Fabio Berger
c4a2f70017 Make lint run in parallel 2018-05-21 18:36:06 -07:00
Alex Browne
a5d315ee2a Apply changes to test/exchange/match_orders.ts 2018-05-21 16:58:29 -07:00
Alex Browne
4fa57f55e6 Fix some unhandled promise rejections 2018-05-21 16:52:49 -07:00
Alex Browne
2c496a92ad Add awaitTransactionMinedAsync after every sent transaction 2018-05-21 16:52:49 -07:00
Alex Browne
4ca8903a21 Add missing blockchainLifecycle calls to contracts tests 2018-05-21 16:52:49 -07:00
Greg Hysen
d460c0e8b9 Merge pull request #572 from 0xProject/feature/contracts/atomicMatching
Atomic Order Matching
2018-05-21 14:29:56 -07:00
Greg Hysen
11b6d290da Removed debug line from chai_setup. Its failing linter and does not appear to be used (it was from an old PR I merged in). 2018-05-21 14:25:39 -07:00
Greg Hysen
d83902834f Ran prettier 2018-05-21 13:54:11 -07:00
Fabio Berger
0fdf32cf6f merge development 2018-05-21 13:38:12 -07:00
Greg Hysen
f4ebbfabf4 Added getNullFillResults 2018-05-18 17:07:00 -07:00
Greg Hysen
b5bcfc8fe7 orderFilledAmount -> orderTakerAssetFilledAmount 2018-05-18 17:07:00 -07:00
Greg Hysen
d13c08cc0d Style improvements to order matching 2018-05-18 17:07:00 -07:00
Greg Hysen
89abd76570 Upgraded to Solidity 0.4.24 2018-05-18 17:07:00 -07:00
Greg Hysen
8c1ae35088 Rebased against v2-prototype 2018-05-18 17:05:36 -07:00
Greg Hysen
bb74789b42 Changed calculateFillResults to public visibility so that it can be used by the Forwarding Contract. 2018-05-18 17:01:06 -07:00
Greg Hysen
dbbd32d2ce Moved feeTokenAddress to MatchOrderTester constructor. Since it is constant, we dont need to pass it in on each call. 2018-05-18 17:01:06 -07:00
Greg Hysen
80285a300d Wording of calculateMatchedFillResults 2018-05-18 17:01:06 -07:00
Greg Hysen
2eb5819851 Cleaned up interface for decoding proxy data. Added a general decoder, which should be useful for the forwarding contract code. 2018-05-18 17:01:06 -07:00
Greg Hysen
e748e1891b Style improvements to the match orders typescript test class 2018-05-18 17:01:06 -07:00
Greg Hysen
28bb11217c Removed redundant log decode call 2018-05-18 17:01:06 -07:00
Greg Hysen
636dae6a79 The OrderInfo struct is now returned by the getOrderInfo function 2018-05-18 17:01:06 -07:00
Greg Hysen
c8f65a1bf9 Updated order of settleMatchedOrders to align with settleOrder 2018-05-18 17:01:06 -07:00
Greg Hysen
ce177ae6f6 IExchange inherits from all other interfaces (in the same order as Exchange inherits Mixins) 2018-05-18 17:01:06 -07:00
Greg Hysen
c79f3501cd Renamed takerAssetFilledAmount to orderFilledAmount to more easily distinguish between fill results and order state 2018-05-18 17:01:06 -07:00
Greg Hysen
80114edc71 Comments for readability in exchange core and mixin match orders 2018-05-18 17:01:06 -07:00
Greg Hysen
71483e2865 Renamed "validate" functions to "assert" in mixin match. 2018-05-18 17:01:06 -07:00
Greg Hysen
93087324d9 Throw if the left or right orders do not compute the correct fill results. I like this better than just logging an error and failing silently. 2018-05-18 17:01:06 -07:00
Greg Hysen
061facdcce Removed redundant status checks in matchOrders. Saves gas, plus follows pattern of fillOrder more closely. 2018-05-18 17:01:06 -07:00
Greg Hysen
3e6e7fb272 Token -> Asset in fillOrder spec 2018-05-18 17:01:06 -07:00
Greg Hysen
12d8c2398f Reordered functions in mixin exchange core -- getOrderInfo is at the bottom 2018-05-18 17:01:06 -07:00
Greg Hysen
bb73963421 Changes based on style guidelines put out by Amir 2018-05-18 17:01:06 -07:00
Greg Hysen
1dd7688bdd Reordered fund transfers for matched orders, plus added an extra sanity check to order matching calculations 2018-05-18 17:01:06 -07:00
Greg Hysen
5735095521 Style changes to atomic order matching 2018-05-18 17:01:06 -07:00
Greg Hysen
fa7570352c Added require reasons to MixinMatchOrders and cleaned up some comments. 2018-05-18 17:01:06 -07:00
Greg Hysen
f378406d15 Updated remaining contracts to v0.4.23 2018-05-18 17:01:05 -07:00
Greg Hysen
68fa7ae2a3 Removed isRoundingError from mixin header 2018-05-18 17:01:05 -07:00
Greg Hysen
9b1015bbce Atomic Order Matching - Tests 2018-05-18 17:01:05 -07:00
Greg Hysen
a4c821eb60 Atomic Order Matching - Smart Contracts. 2018-05-18 17:01:05 -07:00
Brandon Millman
c70540e7f4 Merge pull request #598 from 0xProject/feature/website/mobile-optimize
Mobile optimize the portal layout
2018-05-18 15:38:04 -07:00
Brandon Millman
e291146443 Prettier 2018-05-18 11:36:17 -07:00
Brandon Millman
faa2b6237f Change number of columns in relayer index for small screens 2018-05-18 11:35:13 -07:00
Brandon Millman
26661f3091 Wallet instead of balances for small screens 2018-05-18 11:35:13 -07:00
Brandon Millman
e6e8d49d72 Close drawer when new path is chosen 2018-05-18 11:35:13 -07:00
Brandon Millman
b9ca055586 Fix styling of portal menu 2018-05-18 11:35:13 -07:00
Brandon Millman
9ce7be050a Refactor portal specific colors out of react-shared 2018-05-18 11:35:13 -07:00
Brandon Millman
1d2617c826 Add custom styling for drawer 2018-05-18 11:35:13 -07:00
Brandon Millman
7c8e9ddc42 Fix key issue for portal routes 2018-05-18 11:35:13 -07:00
Brandon Millman
157764c0d9 Fix responsiveness broken in rebase 2018-05-18 11:35:13 -07:00
Brandon Millman
317ff81744 Set up scaffolding for new drawer 2018-05-18 11:35:13 -07:00
Brandon Millman
bd7fc780cb Hide wallet component for small screens 2018-05-18 11:35:13 -07:00
Brandon Millman
4b343d9dcf Fix token link key 2018-05-18 11:35:13 -07:00
Brandon Millman
7a6a5d7595 Modulate number of columns based on screenwidth 2018-05-18 11:35:13 -07:00
Brandon Millman
85020c74cf Fix prettier 2018-05-18 11:33:46 -07:00
Jacob Evans
0137c0da8c Merge pull request #583 from 0xProject/bug/contracts/erc721-encoded-pad
ERC721Proxy Pad to 32 if asset ids are small
2018-05-18 12:26:31 +10:00
fragosti
407731ab16 Change my title to clarify 2018-05-17 16:33:09 -07:00
Francesco Agosti
72503c0689 Merge pull request #596 from 0xProject/feature/website/weth-eth-conversion-errors
Show error messages in the wrapped ether item
2018-05-17 13:15:24 -07:00
fragosti
e9e570db4f Center all the things 2018-05-17 13:04:39 -07:00
fragosti
5bc83fceaa Refactor code in response to CR feedback 2018-05-17 13:04:39 -07:00
fragosti
e7fd501200 Remove duplicate function call to validate 2018-05-17 13:04:39 -07:00
fragosti
ea0067d999 Show error messages in the wrapped ether item 2018-05-17 13:04:39 -07:00
fragosti
ec49ca6480 Improve about page descriptions 2018-05-17 13:04:39 -07:00
Alex Browne
a26cc7c14d Merge pull request #597 from 0xProject/make-promises-safe
Use make-promises-safe to catch unhandled rejections in tests
2018-05-17 11:58:31 -07:00
Brandon Millman
c9d3041460 Merge pull request #586 from 0xProject/feature/website/manage-wallet-2
Manage your wallet section of portal
2018-05-17 11:05:58 -07:00
Brandon Millman
943b7d39c6 Fix tslint false positive 2018-05-17 11:02:55 -07:00
Brandon Millman
6b1a911604 Fix spread 2018-05-17 11:02:55 -07:00
Brandon Millman
3d4e03f2cd Refactor account management itmes 2018-05-17 11:02:55 -07:00
Brandon Millman
48b0b54819 Add loading component 2018-05-17 11:02:55 -07:00
Brandon Millman
00515eb6f9 Refactor a bunch of layouts into their own files 2018-05-17 11:02:55 -07:00
Brandon Millman
63e7391981 Add portal layout component 2018-05-17 11:02:55 -07:00
Brandon Millman
b6776f53ab Get rid of extra curly brackets 2018-05-17 11:02:55 -07:00
Brandon Millman
6a0cda7396 Fix lint error 2018-05-17 11:02:55 -07:00
Brandon Millman
09692dc70e Fix comments 2018-05-17 11:02:55 -07:00
Brandon Millman
e0482f5400 Wait for blockchain to display the account management routes 2018-05-17 11:02:55 -07:00
Brandon Millman
c787dc7356 Fix linter errors and relayer index reloading 2018-05-17 11:02:55 -07:00
Brandon Millman
ea948ac2c8 Trade direct route 2018-05-17 11:02:55 -07:00
Brandon Millman
d6e321e97f Add manage you wallet footer 2018-05-17 11:02:55 -07:00
Brandon Millman
807250510a Add props to back button 2018-05-17 11:02:55 -07:00
Brandon Millman
ef1e974346 Back button and title components 2018-05-17 11:02:55 -07:00
Brandon Millman
55d1228abb Implement new menu styling 2018-05-17 11:02:55 -07:00
Brandon Millman
9e76d2ca63 Add menu 2018-05-17 11:02:55 -07:00
Brandon Millman
d53915e7e3 Add routes 2018-05-17 11:02:55 -07:00
Fabio Berger
7fab782907 Improve naming 2018-05-17 14:07:55 +02:00
Fabio Berger
cf7967e629 Disable magic number rule in more places where it isn't helping code readability 2018-05-17 14:07:44 +02:00
Fabio Berger
0eacbac8f6 Merge branch 'development' into improvement/addCustomTslintRules
* development:
  Remove "Order utils" from menu for now
  Fix top tokens key
  Improve about page descriptions
  Do not remove artifacts when running `clean`
2018-05-17 13:57:51 +02:00
Fabio Berger
cec76c33b6 Remove "Order utils" from menu for now 2018-05-17 13:21:37 +02:00
Brandon Millman
18dcf98998 Fix top tokens key 2018-05-16 18:07:47 -07:00
Alex Browne
251218af8b Use make-promises-safe to catch unhandled rejections in tests 2018-05-16 17:36:37 -07:00
Fabio Berger
e2cbe42ed0 Update yarn.lock 2018-05-16 20:44:16 +02:00
fragosti
c06ed58582 Improve about page descriptions 2018-05-16 10:15:04 -07:00
Fabio Berger
78623ae3bd Merge branch 'development' into v2-prototype
* development: (29 commits)
  Do not remove artifacts when running `clean`
  fix style errors
  Fix circular dependency
  Add my profile image to images
  Add myself to about page
  Add dogfood configs to website
  Revert to lerna:run lint
  Do lint sequentially
  Exclude monorepo-scripts from tslint as test
  Fix prettier
  Add hover state to top tokens
  Change to weekly txn volume
  Change minimum Node version to 6.12
  Document Node.js version requirement and add it to package.json
  Apply prettier to some files which were not formatted correctly
  Fix TSLint issues
  Fix TSLint issues
  Update ethereeumjs-testrpc to ganache-cli
  Fix infinite loop
  Add changelog entries for packages where executable binary exporting fixed
  ...

# Conflicts:
#	packages/contracts/package.json
#	packages/contracts/util/formatters.ts
#	packages/contracts/util/signed_order_utils.ts
#	packages/migrations/package.json
#	yarn.lock
2018-05-16 16:18:47 +02:00
Fabio Berger
4de6221825 Do not remove artifacts when running clean 2018-05-16 16:08:15 +02:00
Fabio Berger
136c6d01b3 Do not remove artifacts when running clean 2018-05-16 16:01:37 +02:00
Fabio Berger
22f3f57f44 Merge branch 'development' into improvement/addCustomTslintRules
* development:
  fix style errors
  Fix circular dependency
  Add my profile image to images
  Add myself to about page
  Add dogfood configs to website
  Change minimum Node version to 6.12
  Document Node.js version requirement and add it to package.json
2018-05-16 15:15:23 +02:00
Fabio Berger
b2f362225c Fix comments 2018-05-16 15:14:31 +02:00
Fabio Berger
40ed59ce28 Improve name 2018-05-16 15:14:24 +02:00
Fabio Berger
839db68571 Fix TSLint rules 2018-05-16 14:59:10 +02:00
Fabio Berger
fec6ac3ff0 Enforce new rules, including no-switch-case-fall-through 2018-05-16 14:58:28 +02:00
Fabio Berger
45fa26dc6c Implement boolean variable naming custom TSLint rule 2018-05-16 14:58:01 +02:00
Fabio Berger
f49d432fdc Implement custom no-magic-numbers rule that doesn't include magic numbers passed into BigNumber instantiations (e.g const amount = new BigNumber(5); ) 2018-05-16 14:57:28 +02:00
Fabio Berger
1a31ceff8e Run linter sequentially 2018-05-16 14:56:11 +02:00
Francesco Agosti
cc486cb86d Merge pull request #593 from 0xProject/bug/website/fix-cirular-dependency
Fix circular dependency
2018-05-15 16:35:05 -07:00
Francesco Agosti
7a45a579c0 Merge pull request #592 from 0xProject/feature/website/add-francesco-about
Add myself to about page
2018-05-15 15:59:24 -07:00
fragosti
dc58d539c2 fix style errors 2018-05-15 15:54:17 -07:00
fragosti
2ba78eb740 Fix circular dependency 2018-05-15 15:27:27 -07:00
fragosti
f43b275f16 Add my profile image to images 2018-05-15 14:50:33 -07:00
fragosti
509a81a572 Add myself to about page 2018-05-15 14:44:57 -07:00
Brandon Millman
184232ba4f Add dogfood configs to website 2018-05-15 13:51:43 -07:00
Amir Bandeali
9e0471bfbb Merge branch 'development' into v2-prototype 2018-05-15 15:52:49 -04:00
Alex Browne
0bc338ba42 Merge pull request #578 from 0xProject/document-node-version
Document Node.js version requirement and add it to package.json
2018-05-15 10:51:49 -07:00
Fabio Berger
406e91d387 Merge pull request #588 from 0xProject/improvement/use-wsrun
Individual package building & watching!!! 💪 🌹
2018-05-15 11:41:51 +02:00
Fabio Berger
473acafd14 Revert to lerna:run lint 2018-05-15 11:21:49 +02:00
Fabio Berger
7474e6b1c9 Do lint sequentially 2018-05-15 11:05:02 +02:00
Fabio Berger
323955277c Exclude monorepo-scripts from tslint as test 2018-05-15 10:47:00 +02:00
Fabio Berger
03b5b09122 Fix prettier 2018-05-15 10:43:41 +02:00
Fabio Berger
fe00c06d4b Merge development 2018-05-15 10:22:22 +02:00
Brandon Millman
ca08dd9705 Add hover state to top tokens 2018-05-15 00:52:51 -07:00
Brandon Millman
b3e53b609b Change to weekly txn volume 2018-05-14 22:49:08 -07:00
Alex Browne
fdeab0475c Change minimum Node version to 6.12 2018-05-14 18:46:53 -07:00
Alex Browne
f86cc0dc7a Document Node.js version requirement and add it to package.json 2018-05-14 18:46:52 -07:00
Alex Browne
0457c959dd Merge pull request #590 from 0xProject/fix-prettier
Apply prettier to some files which were not formatted correctly
2018-05-14 18:41:45 -07:00
Alex Browne
c520b7f1fb Apply prettier to some files which were not formatted correctly 2018-05-14 15:44:09 -07:00
Fabio Berger
5422bf5733 Fix TSLint issues 2018-05-14 23:27:41 +02:00
Fabio Berger
a703160226 Merge branch 'development' into improvement/use-wsrun
* development:
  Update ethereeumjs-testrpc to ganache-cli

# Conflicts:
#	package.json
2018-05-14 22:31:53 +02:00
Fabio Berger
d0905eda49 Fix TSLint issues 2018-05-14 21:48:46 +02:00
Leonid Logvinov
da60008048 Update ethereeumjs-testrpc to ganache-cli 2018-05-14 20:16:13 +02:00
Fabio Berger
7c023233f2 Fix infinite loop 2018-05-14 20:02:41 +02:00
Fabio Berger
1e7003a307 Add changelog entries for packages where executable binary exporting fixed 2018-05-14 19:57:41 +02:00
Fabio Berger
8cb074657d Rename bin to server in testnet-faucets since bin is no longer gitignored 2018-05-14 19:33:45 +02:00
Fabio Berger
5f72b86ce4 Fix sra-report binary 2018-05-14 19:33:23 +02:00
Fabio Berger
09d33792f3 rename build:watch to watch and remove build from docs:stage 2018-05-14 19:32:52 +02:00
Fabio Berger
a6773b85d2 Fix sol-compiler binary so it can be called directly from packages 2018-05-14 19:32:32 +02:00
Fabio Berger
5f678acf46 Fix abi-gen binary so it can be called directly from packages 2018-05-14 19:31:56 +02:00
Fabio Berger
76f9ad0705 Remove build from docs:stage commands 2018-05-14 19:24:47 +02:00
Fabio Berger
478f6ed011 Move from using lerna multi-package commands to wsrun, update README's accordingly 2018-05-14 19:23:50 +02:00
Fabio Berger
c94d1b2275 Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Add missing type definitions
2018-05-14 11:30:51 +02:00
Fabio Berger
7d60356fac Remove tslint-config as dep to monorepo-scripts to avoid circular dependency. Since monorepo-scripts is only expected to be used from within the monorepo, we reference tslint-config w/ a relative path 2018-05-14 11:30:15 +02:00
Leonid Logvinov
58fa35641d Merge pull request #585 from 0xProject/feature/typedef
Add missing type definitions. Enable typedef linter rule
2018-05-14 10:36:13 +02:00
Leonid Logvinov
b74957acdf Add missing type definitions 2018-05-14 10:35:13 +02:00
Fabio Berger
6aed4fb1ae Merge pull request #579 from 0xProject/breakUp0xjs
Split 0x.js into: contract-wrappers & order-watcher
2018-05-11 19:11:27 +02:00
Fabio Berger
ad8e12eeae Add missing .gitkeeps 2018-05-11 18:54:33 +02:00
Fabio Berger
31763a018c Revert "Remove gitkeeps"
This reverts commit 3f6876c419.
2018-05-11 18:50:50 +02:00
Fabio Berger
bc20f8a004 improve wording 2018-05-11 18:24:07 +02:00
Fabio Berger
3f6876c419 Remove gitkeeps 2018-05-11 17:41:35 +02:00
Fabio Berger
fb9c774558 Create coverage dir if doesn't exist 2018-05-11 17:41:25 +02:00
Fabio Berger
7df9393d29 Add compilerSettings to compiler.json 2018-05-11 16:26:08 +02:00
Fabio Berger
c6439def2c Add deployedBytecode to artifacts since it is needed by sol-cov 2018-05-11 16:25:52 +02:00
Fabio Berger
273d3445e4 Revert throw conditions since it messes with the expected test timing 2018-05-11 16:04:03 +02:00
Fabio Berger
bc3dc52377 Revert back to hack, we need the configured web3Wrapper 2018-05-11 15:40:19 +02:00
Fabio Berger
ef1d484d9e Add comment to TransactionReceiptWithDecodedLogs explaining that it doesn't always return "decodedLogs" 2018-05-11 15:39:15 +02:00
Fabio Berger
63cd5a6296 Get rid of hack 2018-05-11 15:24:31 +02:00
Fabio Berger
657dc785ea Get networkId from web3Wrapper 2018-05-11 15:23:50 +02:00
Fabio Berger
461e74d8be Throw if tx reverts 2018-05-11 15:23:34 +02:00
Fabio Berger
a7daea1728 Remove unused methods and imports 2018-05-11 15:22:57 +02:00
Fabio Berger
c4416f9696 Prettier ignore artifact files 2018-05-11 14:45:50 +02:00
Fabio Berger
f9ad34170d Add compiler dep 2018-05-11 14:25:48 +02:00
Fabio Berger
45f2a8ad06 Update yarn.lock 2018-05-11 13:31:49 +02:00
Fabio Berger
3dad802c90 Fix version 2018-05-11 13:18:13 +02:00
Fabio Berger
735166f06c remove unused modules 2018-05-11 13:15:41 +02:00
Fabio Berger
042df52e5c Fix deps 2018-05-11 13:15:21 +02:00
Fabio Berger
294a65f842 Fix prettier 2018-05-11 13:11:50 +02:00
Fabio Berger
bf8550ae1e Update artifacts 2018-05-11 12:59:14 +02:00
Fabio Berger
91549ef28c Update yarn.lock 2018-05-11 12:58:45 +02:00
Fabio Berger
95956eff64 Update global_hooks 2018-05-11 12:58:34 +02:00
Fabio Berger
bcae71dfa4 Remove legacy test 2018-05-11 12:33:39 +02:00
Fabio Berger
d370296e82 Merge branch 'development' into breakUp0xjs
* development:
  Fix ganache subprovider config
  Fix a bug in compiler config precedence
  Fix linter errors
  Fix templates
  Remove unused deployer docs configs
  Add a legacy endpoint for the deployer
  Add a check for compiler output
  Add a comment
  Put ARTIFACTS_VERSION in a config
  Improve a comment
  Remove _applyDefaultsToDeployTxDataAsync
  Add a HACK comment
  Fix linter issues
  Rename deployer to sol-compiler
  Remove deployer
  Remove deployer from 0x.js and migrations
  Configure migrations with a compiler.json
  Remove deployer from metacoin and contract tests
  Update wallet footer and add remove token functionality

# Conflicts:
#	.gitignore
#	packages/0x.js/package.json
#	packages/0x.js/src/0x.ts
#	packages/contracts/package.json
#	packages/contracts/test/multi_sig_with_time_lock.ts
#	packages/contracts/test/multi_sig_with_time_lock_except_remove_auth_addr.ts
#	packages/contracts/util/artifacts.ts
#	packages/deployer/test/deployer_test.ts
#	packages/migrations/package.json
2018-05-11 12:32:57 +02:00
Leonid Logvinov
f42f608f3f Merge pull request #574 from 0xProject/feature/rm-rf-deployer
Remove @0xproject/deployer.Deployer. Make contracts able to deploy themselves
2018-05-11 12:12:39 +02:00
Fabio Berger
f78b5741c3 Add missing version directory to path 2018-05-11 12:05:46 +02:00
Fabio Berger
733fe5b335 Add artifacts to clean command 2018-05-11 12:05:32 +02:00
Leonid Logvinov
c093aab350 Fix ganache subprovider config 2018-05-11 11:59:08 +02:00
Brandon Millman
44f17c1706 Merge pull request #580 from 0xProject/feature/website/remove-tokens
Update wallet footer and add remove token functionality
2018-05-10 10:55:17 -07:00
Fabio Berger
8302e1687a Remove unnecessary compile command 2018-05-10 19:03:58 +02:00
Fabio Berger
7ad4380653 Standardize gitignores and remove migrations/artifacts 2018-05-10 19:02:59 +02:00
Fabio Berger
bea185ce8b Commit v1 artifacts to migrations package and remove compile step from prebuild 2018-05-10 19:02:41 +02:00
Fabio Berger
5a73b8a8e6 Replace mkdir with mkdirp so it also created any missing intermediate directories 2018-05-10 18:56:32 +02:00
Fabio Berger
da62a0af3b Fix path to artifacts 2018-05-10 18:55:30 +02:00
Leonid Logvinov
1137abfd33 Fix a bug in compiler config precedence 2018-05-10 18:26:44 +02:00
Leonid Logvinov
e972ed8456 Fix linter errors 2018-05-10 18:12:34 +02:00
Leonid Logvinov
2e1c2d9dfe Fix templates 2018-05-10 17:56:57 +02:00
Fabio Berger
83dd333eba Fix tslint errors 2018-05-10 17:55:27 +02:00
Leonid Logvinov
f854f3ee2b Remove unused deployer docs configs 2018-05-10 17:47:38 +02:00
Leonid Logvinov
1055ca6d44 Add a legacy endpoint for the deployer 2018-05-10 17:47:38 +02:00
Leonid Logvinov
a5fea3b9c3 Add a check for compiler output 2018-05-10 17:47:38 +02:00
Leonid Logvinov
62f1430a2c Add a comment 2018-05-10 17:47:38 +02:00
Leonid Logvinov
1dec6a442e Put ARTIFACTS_VERSION in a config 2018-05-10 17:47:38 +02:00
Leonid Logvinov
97831e3702 Improve a comment 2018-05-10 17:47:38 +02:00
Leonid Logvinov
7eb9444458 Remove _applyDefaultsToDeployTxDataAsync 2018-05-10 17:47:38 +02:00
Leonid Logvinov
ebc296ea31 Add a HACK comment 2018-05-10 17:47:38 +02:00
Leonid Logvinov
75d24dea0e Fix linter issues 2018-05-10 17:47:38 +02:00
Leonid Logvinov
a6f72de09d Rename deployer to sol-compiler 2018-05-10 17:47:38 +02:00
Leonid Logvinov
96037aed52 Remove deployer 2018-05-10 17:46:57 +02:00
Leonid Logvinov
f9d80adaee Remove deployer from 0x.js and migrations 2018-05-10 17:46:57 +02:00
Leonid Logvinov
422e5a19d4 Configure migrations with a compiler.json 2018-05-10 17:46:57 +02:00
Leonid Logvinov
3d58b38e4e Remove deployer from metacoin and contract tests 2018-05-10 17:46:57 +02:00
Fabio Berger
0a044199a1 Add missing DummyToken 2018-05-10 17:29:59 +02:00
Fabio Berger
cd5f00ac4d Merge branch 'development' into breakUp0xjs
* development: (38 commits)
  Add fallback image support to relayer grid tile
  Clear relayer grid state when fetching
  Configure the compiler to generate artifacts with deployedBytecode
  Implement loading and error state for relayer grid
  Fallback image for relayer grid tile
  Change relayer grid tile to link on header
  Display top tokens from backend
  Remove overflowZ property from portal
  Suggestions and fix bad merge
  Fix typo
  Only show untracked tokens
  Make wallet scrollable
  Add token flow
  Update The Ocean logo
  Fix artifacts paths
  Create an artifacts folder
  Introduce a var
  Add removeHexPrefix util method
  CHeck if ABI exists
  Improve the readability of the check for should compile
  ...

# Conflicts:
#	.gitignore
#	packages/contracts/test/multi_sig_with_time_lock.ts
#	packages/contracts/test/multi_sig_with_time_lock_except_remove_auth_addr.ts
#	packages/contracts/util/artifacts.ts
2018-05-10 17:08:07 +02:00
Fabio Berger
23c4027c83 Add missing uuid types 2018-05-10 16:53:12 +02:00
Fabio Berger
eeb08b7fae Fix type error for latched on property 2018-05-10 16:53:03 +02:00
Fabio Berger
20beb2bdb6 Add generated contracts in contract-wrappers to gitignore 2018-05-10 16:52:47 +02:00
Fabio Berger
c6882d0bd8 Rename zeroExContract... to contractWrappers... 2018-05-10 16:51:45 +02:00
Fabio Berger
ce47e83939 Update yarn.lock 2018-05-10 16:41:05 +02:00
Fabio Berger
832e1e2cf7 Add missing quote 2018-05-10 15:26:19 +02:00
Fabio Berger
6d61616492 Add PR number 2018-05-10 15:23:17 +02:00
Fabio Berger
d5304fb5bd Remove provider instance variable 2018-05-10 15:23:04 +02:00
Fabio Berger
13a61db289 Add var returns 2018-05-10 15:22:51 +02:00
Fabio Berger
93b74cc766 Remove unneeded tslint disable 2018-05-10 15:22:33 +02:00
Fabio Berger
28e83c21e2 Remove uneeded tslint config 2018-05-10 15:22:13 +02:00
Fabio Berger
33ed5cd437 Remove generated contract wrappers 2018-05-10 15:21:37 +02:00
Fabio Berger
37c8e21f25 Remove extra tslint config 2018-05-10 15:00:06 +02:00
Fabio Berger
7b726650e9 Improve createOrderWatcherAsync 2018-05-10 14:59:54 +02:00
Fabio Berger
d3adb48c2e Fix no-any-propagation 2018-05-10 14:59:37 +02:00
Fabio Berger
9838124abc Remove unnecessary tslint config 2018-05-10 14:59:10 +02:00
Fabio Berger
4df847c349 Add pr number to changelogs 2018-05-10 14:58:15 +02:00
Jacob Evans
f9d2689a12 Pad to 32 if asset ids are small 2018-05-10 15:59:44 +10:00
Brandon Millman
c64ad1af28 Add fallback image support to relayer grid tile 2018-05-09 17:29:02 -07:00
Brandon Millman
e83b056bd4 Clear relayer grid state when fetching 2018-05-09 15:59:53 -07:00
Brandon Millman
eba6dcc497 Update wallet footer and add remove token functionality 2018-05-09 15:46:18 -07:00
Fabio Berger
017b5a23d8 Fix website and 0x.js docs 2018-05-09 23:26:51 +02:00
Leonid Logvinov
c7a147f49d Configure the compiler to generate artifacts with deployedBytecode 2018-05-09 23:14:44 +02:00
Fabio Berger
f84a466d16 Remove last artifact 2018-05-09 22:15:35 +02:00
Fabio Berger
382a805c7e Remove artifacts 2018-05-09 22:14:19 +02:00
Fabio Berger
0b38e575d6 Fix package.json 2018-05-09 22:08:41 +02:00
Fabio Berger
209266dbed Split 0x.js into contract-wrappers, order-watcher but keep 0x.js as a unifying library with the same interface 2018-05-09 20:36:28 +02:00
Brandon Millman
20f6d8d3d0 Implement loading and error state for relayer grid 2018-05-09 10:57:26 -07:00
Brandon Millman
09b26645ee Fallback image for relayer grid tile 2018-05-09 10:04:28 -07:00
Brandon Millman
9f2258ebd9 Change relayer grid tile to link on header 2018-05-09 09:28:57 -07:00
Amir Bandeali
9744b1906a Merge pull request #546 from 0xProject/feature/contracts/solidity-0.4.23
Use Solidity 0.4.23
2018-05-08 17:20:23 -07:00
Brandon Millman
71e2ee62e4 Merge pull request #576 from 0xProject/feature/website/top-tokens
Display top tokens from backend
2018-05-08 14:30:26 -07:00
Brandon Millman
6c8ee4d55d Merge pull request #557 from 0xProject/feature/website/top-bar-redesign
Redesign top bar for portal v2
2018-05-08 14:29:30 -07:00
Amir Bandeali
5198c56db9 Add revert variables, change lib => libs to get around gitignore 2018-05-08 13:10:09 -07:00
Brandon Millman
f94d4b492d Display top tokens from backend 2018-05-08 11:32:44 -07:00
Brandon Millman
e01a4fcbb4 Merge branch 'development' into feature/website/top-bar-redesign
* development:
  Remove overflowZ property from portal
  Fix typo
  Only show untracked tokens
  Make wallet scrollable
  Add token flow
2018-05-08 11:17:00 -07:00
Brandon Millman
5ed9b8b1dc Remove overflowZ property from portal 2018-05-08 11:16:12 -07:00
Brandon Millman
17f3d5f6ba Suggestions and fix bad merge 2018-05-08 11:12:46 -07:00
Brandon Millman
607d738342 Merge branch 'development' into feature/website/top-bar-redesign
* development: (63 commits)
  Update The Ocean logo
  Fix artifacts paths
  Create an artifacts folder
  Introduce a var
  Add removeHexPrefix util method
  CHeck if ABI exists
  Improve the readability of the check for should compile
  Use named constants
  Add a comment
  Fix comments
  Rename args to constructor-args
  Fix a typo
  Define a separator const
  Move artifacts from src/artifacts to artifacts/v1
  Fix sol-cov to work with the new artifacts format
  Implement new artifacts format
  Publish
  Updated CHANGELOGS
  Make node types a dependency
  Fix type errors in CSS properties
  ...
2018-05-08 11:04:31 -07:00
Brandon Millman
1b102f9ed3 Merge pull request #570 from 0xProject/feature/website/wallet-add-tokens
Portal v2 add tokens flow
2018-05-08 11:01:40 -07:00
Brandon Millman
6c38481550 Fix typo 2018-05-08 10:17:04 -07:00
Brandon Millman
9cbd151658 Only show untracked tokens 2018-05-08 10:16:08 -07:00
Brandon Millman
419b670aa3 Make wallet scrollable 2018-05-08 10:16:08 -07:00
Brandon Millman
a44874d2eb Add token flow 2018-05-08 10:16:08 -07:00
Brandon Millman
e9d70b7b1e Merge pull request #556 from 0xProject/feature/website/portal-v2
Add new top-level portal component with wallet and relayer index layout
2018-05-08 10:14:33 -07:00
Fabio Berger
73c6f11c9c Update The Ocean logo 2018-05-08 10:47:35 +02:00
Amir Bandeali
7e7364fc83 Move Authorizable to AssetProxy dir, rename to MixinAuthorizable 2018-05-07 11:20:53 -07:00
Leonid Logvinov
a9c5488620 Merge pull request #537 from 0xProject/feature/artifacts-v2
Implement the new artifacts format
2018-05-07 14:46:28 +02:00
Leonid Logvinov
906af858a5 Fix artifacts paths 2018-05-07 14:32:17 +02:00
Leonid Logvinov
b699a61f56 Create an artifacts folder 2018-05-07 14:23:24 +02:00
Leonid Logvinov
8eabc49e9d Introduce a var 2018-05-07 14:06:00 +02:00
Leonid Logvinov
9e67e12732 Add removeHexPrefix util method 2018-05-07 14:04:58 +02:00
Leonid Logvinov
2d30183d65 CHeck if ABI exists 2018-05-07 13:57:03 +02:00
Leonid Logvinov
fcb0a05880 Improve the readability of the check for should compile 2018-05-07 13:49:21 +02:00
Leonid Logvinov
fad7dc9f04 Use named constants 2018-05-07 13:46:44 +02:00
Leonid Logvinov
7c1e05d33c Add a comment 2018-05-07 13:42:47 +02:00
Leonid Logvinov
02147f546e Fix comments 2018-05-07 13:41:50 +02:00
Leonid Logvinov
3d51bc1ada Rename args to constructor-args 2018-05-07 13:40:53 +02:00
Leonid Logvinov
95df4433dc Fix a typo 2018-05-07 13:40:05 +02:00
Leonid Logvinov
0f1589a43f Define a separator const 2018-05-07 13:37:21 +02:00
Leonid Logvinov
27262c4e56 Move artifacts from src/artifacts to artifacts/v1 2018-05-07 13:32:24 +02:00
Leonid Logvinov
c9b8f2a397 Fix sol-cov to work with the new artifacts format 2018-05-07 10:52:28 +02:00
Leonid Logvinov
72b2a1c66f Implement new artifacts format 2018-05-07 10:23:08 +02:00
Amir Bandeali
395d060427 Split up mixins and interfaces 2018-05-04 17:10:25 -07:00
Amir Bandeali
bbf088d903 Make LibBytes methods internal, add TestLibBytes 2018-05-04 17:00:24 -07:00
Leonid Logvinov
69a6166b6a Publish
- 0x.js@0.37.2
 - @0xproject/abi-gen@0.2.13
 - @0xproject/assert@0.2.9
 - @0xproject/base-contract@0.3.1
 - @0xproject/connect@0.6.12
 - contracts@2.1.28
 - @0xproject/deployer@0.4.3
 - @0xproject/dev-utils@0.4.1
 - @0xproject/json-schemas@0.7.23
 - @0xproject/metacoin@0.0.6
 - @0xproject/migrations@0.0.5
 - @0xproject/order-utils@0.0.4
 - @0xproject/react-docs-example@0.0.11
 - @0xproject/react-docs@0.0.11
 - @0xproject/react-shared@0.1.6
 - @0xproject/sol-cov@0.0.10
 - @0xproject/sol-resolver@0.0.4
 - @0xproject/sra-report@0.0.14
 - @0xproject/subproviders@0.10.1
 - @0xproject/testnet-faucets@1.0.29
 - @0xproject/types@0.6.3
 - @0xproject/typescript-typings@0.3.1
 - @0xproject/utils@0.6.1
 - @0xproject/web3-wrapper@0.6.3
 - @0xproject/website@0.0.32
2018-05-05 01:55:12 +02:00
Leonid Logvinov
bf87b1a6af Updated CHANGELOGS 2018-05-05 01:55:04 +02:00
Leonid Logvinov
2e8a5602b2 Make node types a dependency 2018-05-05 01:33:35 +02:00
Leonid Logvinov
0ec1c4ad6d Fix type errors in CSS properties 2018-05-05 01:26:02 +02:00
Leonid Logvinov
15a3a8c62f Use a single version of react types 2018-05-05 01:13:22 +02:00
Leonid Logvinov
f001181e39 Revert yarn.lock changes 2018-05-05 01:10:48 +02:00
Leonid Logvinov
2c659d3d82 Publish
- @0xproject/react-docs-example@0.0.10
 - @0xproject/react-docs@0.0.10
 - @0xproject/react-shared@0.1.5
 - @0xproject/website@0.0.31
2018-05-04 23:55:03 +02:00
Leonid Logvinov
5ffff7397e Updated CHANGELOGS 2018-05-04 23:54:57 +02:00
Leonid Logvinov
1a36459ab8 Fix property name 2018-05-04 22:41:39 +02:00
Leonid Logvinov
33cc79c13b Upgrade react types version 2018-05-04 21:17:07 +02:00
Leonid Logvinov
b4cb21b55e Publish
- 0x.js@0.37.1
 - contracts@2.1.27
 - @0xproject/order-utils@0.0.3
 - @0xproject/sra-report@0.0.13
 - @0xproject/testnet-faucets@1.0.28
 - @0xproject/website@0.0.30
2018-05-04 20:44:18 +02:00
Leonid Logvinov
ae68c3abe4 Updated CHANGELOGS 2018-05-04 20:44:12 +02:00
Brandon Millman
939e2c70c4 Add headers to wallet and relayer index 2018-05-04 11:04:58 -07:00
Brandon Millman
14b29172b1 Add scrolling to relayer index 2018-05-04 11:04:58 -07:00
Brandon Millman
58794fc8e9 Lay out wallet and relayers 2018-05-04 11:04:58 -07:00
Leonid Logvinov
91fdd6fc29 Make a negligible change to order-utils to publish a new version 2018-05-04 19:07:02 +02:00
Leonid Logvinov
8dd9124863 Publish
- 0x.js@0.37.0
 - @0xproject/abi-gen@0.2.12
 - @0xproject/assert@0.2.8
 - @0xproject/base-contract@0.3.0
 - @0xproject/connect@0.6.11
 - contracts@2.1.26
 - @0xproject/deployer@0.4.2
 - @0xproject/dev-utils@0.4.0
 - @0xproject/json-schemas@0.7.22
 - @0xproject/metacoin@0.0.5
 - @0xproject/migrations@0.0.4
 - @0xproject/monorepo-scripts@0.1.19
 - @0xproject/order-utils@0.0.2
 - @0xproject/react-docs-example@0.0.9
 - @0xproject/react-docs@0.0.9
 - @0xproject/react-shared@0.1.4
 - @0xproject/sol-cov@0.0.9
 - @0xproject/sol-resolver@0.0.3
 - @0xproject/sra-report@0.0.12
 - @0xproject/subproviders@0.10.0
 - @0xproject/testnet-faucets@1.0.27
 - @0xproject/tslint-config@0.4.17
 - @0xproject/types@0.6.2
 - @0xproject/typescript-typings@0.3.0
 - @0xproject/utils@0.6.0
 - @0xproject/web3-wrapper@0.6.2
 - @0xproject/website@0.0.29
2018-05-04 12:16:17 +02:00
Leonid Logvinov
3fc99dbad5 Updated CHANGELOGS 2018-05-04 12:16:11 +02:00
Leonid Logvinov
01dd84dced Add order utils docs to the menu 2018-05-04 12:09:46 +02:00
Brandon Millman
6b92ef733c Open relayer app when clicking on grid tile 2018-05-03 13:59:08 -07:00
Brandon Millman
fe0f4ae257 Add header images to relayer grid tiles 2018-05-03 13:59:00 -07:00
Fabio Berger
cf9555debc Fix logo left padding on mobile 2018-05-03 12:35:21 +02:00
Fabio Berger
528008b1a9 Add new section to homepage 2018-05-03 12:35:07 +02:00
Brandon Millman
5e3576ed69 Remove id property from WebsiteBackendRelayerInfo 2018-05-02 17:03:59 -07:00
Amir Bandeali
c84be8ddb3 Update contracts with revert reasons and constructor keyword 2018-05-02 15:23:05 -07:00
Amir Bandeali
853b5e1b72 Merge pull request #569 from 0xProject/feature/contracts/batchTransfer
Batch transfers in proxies
2018-05-02 11:32:27 -07:00
Amir Bandeali
3355a39fe0 Add MixinAssetProxy to reuse redundant code 2018-05-02 11:30:26 -07:00
Leonid Logvinov
28ee9e247e Add order-utils to monorepo-scripts 2018-05-02 20:00:06 +03:00
Leonid Logvinov
a054b485d0 Merge pull request #559 from 0xProject/feature/order-utils
Move order utils to @0xproject/order-utils
2018-05-02 19:42:59 +03:00
Leonid Logvinov
3585326d7e Fix signature utils tests 2018-05-02 19:30:32 +03:00
Leonid Logvinov
a6046af024 Stop exporting assertions from order-utils 2018-05-02 18:38:50 +03:00
Leonid Logvinov
adaff92c92 Create wrapper functions so that docs render properly 2018-05-02 16:01:01 +03:00
Leonid Logvinov
0499541e11 Move order utils to @0xproject/order-utils 2018-05-02 15:10:24 +03:00
Brandon Millman
f08738e133 Add Greg and Remco to the about page 2018-05-01 17:11:06 -07:00
Amir Bandeali
0cb357a0e9 Add tests for batchTransferFrom 2018-05-01 13:39:55 -07:00
Amir Bandeali
668dcb7cf0 Add batchTransferFrom to asset proxies 2018-05-01 13:38:41 -07:00
Brandon Millman
1fbdc14734 Merge pull request #550 from 0xProject/feature/website/crypto-compare-prices
Grab wallet price information by token symbol
2018-05-01 10:09:04 -07:00
Jacob Evans
3e683162e9 Merge pull request #568 from 0xProject/bug/0x.js/trade-simulator-trading-zrx
Execute Taker side in trade simulation
2018-05-01 21:55:49 +10:00
Jacob Evans
8e7937bdb6 Update comment to be more descriptive of null address in exchange simulator 2018-05-01 19:06:17 +10:00
Jacob Evans
b36587fac8 Execute taker side in trade simulation
Fill if the taker address is open
2018-05-01 14:43:47 +10:00
Brandon Millman
3a1f9d01e8 Remove WETH special case, website backend handles this now 2018-04-30 16:49:47 -07:00
Amir Bandeali
b5c4b81aac Merge pull request #563 from 0xProject/feature/contracts/proxyIds
Add hard coded proxyId into each AssetProxy
2018-04-30 16:44:38 -07:00
Amir Bandeali
c849c8ef08 Remove outdated comment 2018-04-30 16:40:27 -07:00
Amir Bandeali
bbb3d5bb67 Add hard coded proxyId into each AssetProxy 2018-04-30 16:40:27 -07:00
Brandon Millman
1131d66b3d Hit website backend for price information 2018-04-30 16:40:02 -07:00
Amir Bandeali
63ad2ebf0b Merge pull request #560 from 0xProject/refactor/contracts/structure
Update contracts structure
2018-04-30 09:53:03 -07:00
Brandon Millman
7104ae4752 Merge pull request #564 from 0xProject/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2018-04-30 09:47:33 -07:00
Brandon Millman
2403323463 Style suggestions 2018-04-27 15:05:23 -07:00
Brandon Millman
feb7dfffa1 Move quote currency string into config 2018-04-27 15:05:23 -07:00
Brandon Millman
005e633e2a yarn.lock 2018-04-27 15:05:00 -07:00
Brandon Millman
127fe971e9 Prettier 2018-04-27 14:50:04 -07:00
Brandon Millman
3c4bde6ea1 Create CODE_OF_CONDUCT.md 2018-04-27 14:09:25 -07:00
Brandon Millman
dc19690863 Merge branch 'development' into feature/website/crypto-compare-prices
* development:
  Fix react type versions to avoid minor version bumps with breaking changes
  Update Web3 Provider Engine to 14.0.4
  Remove auto-assignment of everyone to PR's
  Check for Yarn instead of npm
  Add hack comment about the use of sudo
  Fix lazy load component name
  Rename Portal and PortalMenu components to LegacyPortal and LegacyPortalMenu
  Remove unnecessary additional params
  Remove outside declaration
  Capitalize yarn
  Use path for platform independence
  Consolidate github personal access token env to one place: constants.ts
  Use methods moved to utils since now shared by multiple scripts
  Add comment
  Improve comments
  Add checks for the required local setup before running the publish script
  Add descriptions for all commands in monorepo-scripts
  Add removeGitTags script that can be run after a failed Lerna publish
2018-04-26 17:11:01 -07:00
Amir Bandeali
e4f8ea2f7c Move TokenRegistry to 'previous' directory 2018-04-26 11:11:54 -07:00
Amir Bandeali
599d34f1c0 Make all lib functions internal, add contracts for testing 2018-04-26 11:11:54 -07:00
Amir Bandeali
31411dd11b Add LibFillResults 2018-04-26 11:09:53 -07:00
Amir Bandeali
b7781108ae Add ERC721 contracts from zeppelin-solidity 2018-04-26 10:59:27 -07:00
Amir Bandeali
35ca7d1826 Merge pull request #498 from 0xProject/feature/contracts/takerAbstraction
Sender abstraction
2018-04-26 10:59:03 -07:00
Amir Bandeali
9ddec32260 Add tests and comments 2018-04-26 10:56:44 -07:00
Amir Bandeali
185e7d43fb Add tests 2018-04-26 10:33:37 -07:00
Amir Bandeali
0e0a46f373 Update tests and utils 2018-04-26 10:33:37 -07:00
Amir Bandeali
732202fe8e Implement sender abstraction 2018-04-26 10:33:37 -07:00
Jacob Evans
47604384d4 Merge pull request #555 from 0xProject/feature/subproviders/upgrade-provider-engine
Update Web3 Provider Engine to 14.0.4
2018-04-26 15:44:55 +10:00
Fabio Berger
e1cab78c09 Remove remenants of MaliciousToken contract 2018-04-26 10:06:32 +09:00
Fabio Berger
9dc4ec6fb5 Fix prettier 2018-04-25 18:07:22 +09:00
Fabio Berger
c69984e309 Fix react type versions to avoid minor version bumps with breaking changes 2018-04-24 20:06:09 +09:00
Fabio Berger
0baaf1767b Fix merge conflict issues 2018-04-24 20:01:04 +09:00
Fabio Berger
eab76c5819 Fix @types/react version to avoid accidental minor version bumps with breaking changes 2018-04-24 19:54:22 +09:00
Fabio Berger
ebd6f7ace0 Merge pull request #549 from 0xProject/feature/contracts/combineAssetProxyDispatcher
Merge Exchange and AssetProxyDispatcher (depends on #548)
2018-04-24 18:38:11 +09:00
Fabio Berger
a6d5cd4b39 Fix CI failures caused by Webkit css properties not being recognized by React types. This is a hack. 2018-04-24 17:38:25 +09:00
Fabio Berger
4c5a632095 Revert "Fix CI test failure"
This reverts commit 870693b968.
2018-04-24 17:28:18 +09:00
Brandon Millman
b8c611de2b ProviderDisplay changes 2018-04-24 01:11:01 -07:00
Fabio Berger
870693b968 Fix CI test failure 2018-04-24 16:54:08 +09:00
Fabio Berger
b24b98a365 merge v2-prototype 2018-04-24 16:51:32 +09:00
Fabio Berger
fd041e2997 Merge pull request #548 from 0xProject/refactor/contracts/test-cleanup
Cleanup tests
2018-04-24 16:46:40 +09:00
Brandon Millman
9c827a0298 Top bar expanded display type 2018-04-23 23:47:37 -07:00
Brandon Millman
766aeaa9e1 Relayer grid spacing tweaks 2018-04-23 23:47:04 -07:00
Amir Bandeali
27a44f0e77 Rename variables, create private validation methods in token wrappers 2018-04-23 23:23:01 -07:00
Brandon Millman
567768c66a Add headers to wallet and relayer index 2018-04-23 22:17:26 -07:00
Brandon Millman
deaa5f3211 Add scrolling to relayer index 2018-04-23 21:45:05 -07:00
Jacob Evans
5682cd0048 Update Web3 Provider Engine to 14.0.4 2018-04-24 14:33:32 +10:00
Brandon Millman
11f1ccf3ff Lay out wallet and relayers 2018-04-23 21:17:23 -07:00
Fabio Berger
2896110d4d Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Fix lazy load component name
  Rename Portal and PortalMenu components to LegacyPortal and LegacyPortalMenu
2018-04-24 13:01:15 +09:00
Fabio Berger
d05b175e04 Remove auto-assignment of everyone to PR's 2018-04-24 12:53:54 +09:00
Brandon Millman
10a379077c Merge pull request #552 from 0xProject/refactor/website/legacy-portal
Rename Portal component to LegacyPortal
2018-04-23 22:42:07 -04:00
Fabio Berger
ffd9b79100 Check for Yarn instead of npm 2018-04-24 10:43:44 +09:00
Fabio Berger
04c07d9006 Merge pull request #541 from 0xProject/improveMonorepoScripts
Improve Monorepo-scripts
2018-04-24 10:34:40 +09:00
Fabio Berger
a3cc5c1dd7 Add hack comment about the use of sudo 2018-04-24 10:32:44 +09:00
Brandon Millman
941342cc24 Fix lazy load component name 2018-04-23 16:49:53 -07:00
Brandon Millman
cc471dd127 Rename Portal and PortalMenu components to LegacyPortal and LegacyPortalMenu 2018-04-23 14:27:11 -07:00
Amir Bandeali
432b064601 Fix tests 2018-04-23 10:50:09 -07:00
Amir Bandeali
a8a0a5cbfb Combine Exchange with AssetProxyDispatcher 2018-04-23 10:50:09 -07:00
Amir Bandeali
32e77753b5 Define numbers of dummy tokens to deploy in constants 2018-04-23 09:57:13 -07:00
Amir Bandeali
f427a736a3 Remove type assertions 2018-04-23 09:57:13 -07:00
Amir Bandeali
afb02b8bd1 Fix and cleanup tests 2018-04-23 09:57:13 -07:00
Amir Bandeali
48b44342ab Add ERC721 wrapper 2018-04-23 09:57:13 -07:00
Amir Bandeali
1f968fa4fd Add ERC20Wrapper 2018-04-23 09:57:13 -07:00
Amir Bandeali
ebf5077e1a Merge pull request #547 from 0xProject/refactor/contracts/cleanup
Cleanup contracts
2018-04-23 09:56:20 -07:00
Amir Bandeali
7d26b96d42 Rename proxyUtils => assetProxyUtils 2018-04-22 18:53:13 -07:00
Amir Bandeali
08208acf53 Rename missed variables 2018-04-22 14:44:56 -07:00
Brandon Millman
9b535e3cec Rename baseCurrency to quoteCurrency 2018-04-22 14:20:42 -04:00
Brandon Millman
9656895726 Remove some unused imports 2018-04-22 14:17:34 -04:00
Brandon Millman
121b6949a1 Rate limit crypto compare calls 2018-04-22 14:05:03 -04:00
Brandon Millman
fb31c49317 Refactor common fetch logic into fetch_utils 2018-04-22 13:28:13 -04:00
Brandon Millman
e51f9b3593 Grab price information from crypto compare api 2018-04-22 13:10:58 -04:00
Amir Bandeali
46653a0268 Reorder event args 2018-04-21 17:31:17 -07:00
Amir Bandeali
fcef1819b1 Add missing async suffix 2018-04-21 17:31:17 -07:00
Amir Bandeali
3335fc7baf Rename token => asset 2018-04-21 17:31:17 -07:00
Amir Bandeali
63abf34664 Rename Token => IERC20Token 2018-04-21 17:31:17 -07:00
Amir Bandeali
120ca5b1ec Rename DummyToken => DummyERC20Token 2018-04-21 17:31:17 -07:00
Amir Bandeali
1c94ab7cc3 export proxyUtils instead of individual functions 2018-04-21 17:31:17 -07:00
Amir Bandeali
aa3be51980 Fix names and visibilities, use address type over contract type for function args and returns 2018-04-21 17:31:11 -07:00
Amir Bandeali
fe6c77cafb Remove unused constructor arguments 2018-04-21 15:42:09 -07:00
Amir Bandeali
67117913dd Add presigned signature type 2018-04-20 13:57:18 -07:00
Amir Bandeali
e532f2c165 Fix zeppelin imports, run prettier 2018-04-20 13:57:18 -07:00
Greg Hysen
a0c7da95c2 Added tests for (most functions in) LibBytes. The write methods are not currently compatible with our generated contract wrappers. 2018-04-20 13:56:18 -07:00
Greg Hysen
95dbc0f5bc Added description for the DummyERC721Token constructor 2018-04-20 13:56:18 -07:00
Greg Hysen
ab13ce96cc Renamed addAssetProxy back to registerAssetProxy; this seemed to cause less confusion. Also updated the function description. 2018-04-20 13:56:18 -07:00
Greg Hysen
ac0c35424b Reverting earlier change: interfaces now inherit from other interfaces 2018-04-20 13:56:18 -07:00
Greg Hysen
41242a6660 Clarified that 0x0 could be passed into AssetProxyDispatcher 2018-04-20 13:56:18 -07:00
Greg Hysen
e80f203efc Inlined decodeMetadata in the proxies and removed encodeMetadata (already exists in Typescript). This simplifies the code. 2018-04-20 13:56:18 -07:00
Greg Hysen
dbd65cdb04 Added @TODO for safeTransferFrom support in ERC721 proxy 2018-04-20 13:56:18 -07:00
Greg Hysen
e4dd33a675 Removed outdated TODO comment in MixinSettlementProxy 2018-04-20 13:56:18 -07:00
Greg Hysen
0e3544e1f9 Miscellaneous style changes to the contracts package; specifically tests 2018-04-20 13:56:18 -07:00
Greg Hysen
f4589b5bd4 Ran prettier 2018-04-20 13:56:18 -07:00
Greg Hysen
3b7068e8d0 renaming after tokenTransferProxy was removed 2018-04-20 13:56:18 -07:00
Greg Hysen
2a8fc705c7 Commented out 0x.js tests until migration package is ready. 2018-04-20 13:56:18 -07:00
Greg Hysen
c19fb1dffc Removed ERC20 V1 Proxy + TokenTransferProxy 2018-04-20 13:56:18 -07:00
Greg Hysen
436a6605fb Updated commenting. Noted that transferFrom succeeds or throws on all transferFrom implementations. 2018-04-20 13:56:18 -07:00
Greg Hysen
84eddc3d94 switched to constants in default order params. 2018-04-20 13:56:18 -07:00
Greg Hysen
dfe6b2844b Reverted change that allowed ERC721 transfer proxy to be called with amount 0. This now throws. 2018-04-20 13:56:18 -07:00
Greg Hysen
6be5fe928e Removed takerTokenAddress and makerTokenAddress from Order struct. 2018-04-20 13:56:18 -07:00
Greg Hysen
167654c9a0 Added clarity to not-authorized test case in dispatcher 2018-04-20 13:56:18 -07:00
Greg Hysen
6d6179fb2c toUnsigned -> toBuffer in assetProxyUtils 2018-04-20 13:56:18 -07:00
Greg Hysen
80d06d358a Unrolled the loop that copies the Order struct in FillOrderNoThrow. Saves 900 gas 2018-04-20 13:56:18 -07:00
Greg Hysen
1cace49b74 address -> IAssetProxy where possible for clarity 2018-04-20 13:56:18 -07:00
Greg Hysen
7ab5442163 Reverted to calling read/write uint256 2018-04-20 13:56:18 -07:00
Greg Hysen
4d42f64fa3 More testing of common functionality across proxies 2018-04-20 13:56:17 -07:00
Greg Hysen
8d83243378 Updates to proxy tests. 2018-04-20 13:56:17 -07:00
Greg Hysen
e1a74b6bdd More authorized -> owner in test comments 2018-04-20 13:56:17 -07:00
Greg Hysen
44919c353e Removed unnecessary deployments in test 2018-04-20 13:56:17 -07:00
Greg Hysen
cf8523da5f Moved ERC721 FillOrderNoThrow tests into wrapper 2018-04-20 13:56:17 -07:00
Greg Hysen
10707ebc3a Style improvements to the Asset Proxy tests 2018-04-20 13:56:17 -07:00
Greg Hysen
8374a51e6a Replaced instances of accounts[0] with owner in contracts test cases 2018-04-20 13:56:17 -07:00
Greg Hysen
4e48de1116 Minor changes to typescript tests 2018-04-20 13:56:17 -07:00
Greg Hysen
b3b29f527e Minor fixes to the contracts 2018-04-20 13:56:17 -07:00
Greg Hysen
37cfeed0f5 Rearranged preconditions in ERC721 proxy 2018-04-20 13:56:17 -07:00
Greg Hysen
cb27fe17cd Changed order of encode/decode functions in token proxies 2018-04-20 13:56:17 -07:00
Greg Hysen
682ab76ba1 Updated name of AssetProxyChanged -> AssetProxySet 2018-04-20 13:56:17 -07:00
Greg Hysen
c811b710eb Explicity declare memory for complex types, where possible 2018-04-20 13:56:17 -07:00
Greg Hysen
d0930b9048 Improved readability of FillOrderNoThrow II 2018-04-20 13:56:17 -07:00
Greg Hysen
591645758a Improved readability of FillOrderNoThrow 2018-04-20 13:56:17 -07:00
Greg Hysen
4e093369f6 Updated ERC20 v1 proxy names in tests 2018-04-20 13:56:17 -07:00
Greg Hysen
be8e8791b7 Ran prettier/linter on new contract tests 2018-04-20 13:56:17 -07:00
Greg Hysen
b13a2e71ad Added comments around deploying contracts to helper/wrapper tests 2018-04-20 13:56:17 -07:00
Greg Hysen
28678214d2 TS styles in core contract tests 2018-04-20 13:56:17 -07:00
Greg Hysen
f75d03c9ae Added more comments to proxy tests 2018-04-20 13:56:17 -07:00
Greg Hysen
51508a732d Cleaned up TS in dispatcher tests 2018-04-20 13:56:17 -07:00
Greg Hysen
326d8d3976 Proxy Metadata -> Data 2018-04-20 13:56:17 -07:00
Greg Hysen
f559a5510b Cleaning up some wording 2018-04-20 13:56:17 -07:00
Greg Hysen
bf8b123dfc Removed some unused ERC721 tokens 2018-04-20 13:56:17 -07:00
Greg Hysen
32a7442845 Minor style improvements to asset proxy utils 2018-04-20 13:56:17 -07:00
Greg Hysen
a0dfdefd16 ethereum-js for encoding/decoding asset proxy data 2018-04-20 13:56:17 -07:00
Greg Hysen
e7b0c24d9d Added memory to bytes arrays, where possible 2018-04-20 13:56:17 -07:00
Greg Hysen
1707f1940d Replaced read/write Uint256 with generic bytes32, plus casting 2018-04-20 13:56:17 -07:00
Greg Hysen
5dd708aae8 Updated public -> external 2018-04-20 13:56:17 -07:00
Greg Hysen
2477ea2fcf Removed unused dependency 2018-04-20 13:56:17 -07:00
Greg Hysen
9b624a884b snake case to camel case 2018-04-20 13:56:17 -07:00
Greg Hysen
bc7672652e makerAssetProxyData/takerAssetProxyData -> makerAssetData/takerAssetData 2018-04-20 13:56:17 -07:00
Greg Hysen
cc77f8489e nilAddress to ZeroEx.NULL_ADDRESS 2018-04-20 13:56:17 -07:00
Greg Hysen
564ddff4c7 IAssetProxyDispatcher to IAssetProxy in MixinSettlement layer + allowing 0-condition in ERC721 transfer 2018-04-20 13:56:17 -07:00
Greg Hysen
023ea94f07 Removed Log prefix from events 2018-04-20 13:56:17 -07:00
Greg Hysen
adad76eca6 Removed unnecessary assetProxyManagerAddress 2018-04-20 13:56:17 -07:00
Greg Hysen
772bb65237 removed unnecessary import 2018-04-20 13:56:17 -07:00
Greg Hysen
d72a731865 setAssetProxy to addAssetProxy 2018-04-20 13:56:17 -07:00
Greg Hysen
f35fe56d9b Renamed TransferProxy to Proxy 2018-04-20 13:56:17 -07:00
Greg Hysen
1ab70f130d Renaming TransferProxy to Proxy 2018-04-20 13:56:17 -07:00
Greg Hysen
86f79949ea ERC20 V1 proxy compiling 2018-04-20 13:56:17 -07:00
Greg Hysen
219d6c294d Changed order of write parameters in LibBytes. Now ordered by most generalized to most specific 2018-04-20 13:56:17 -07:00
Greg Hysen
78d81f193f Asset Proxy Dispatcher 2018-04-20 13:56:17 -07:00
Fabio Berger
b9e0cd4512 Fix type issue 2018-04-20 13:56:17 -07:00
Fabio Berger
f9d4966000 Fix merge 2018-04-20 13:56:17 -07:00
Amir Bandeali
ad2289935d Use addFillResults function and add comments to all marketFill functions 2018-04-20 13:56:17 -07:00
Amir Bandeali
fd47b3fac5 Fix EtherDelta imports 2018-04-20 13:56:17 -07:00
Amir Bandeali
84d836f22b Add back require statements and tests (will move to another PR) 2018-04-20 13:56:17 -07:00
Amir Bandeali
5d05a2da74 Revert variable naming 2018-04-20 13:56:17 -07:00
Amir Bandeali
2f639b77bb Update Solidity syntax and comments 2018-04-20 13:56:17 -07:00
Amir Bandeali
8b5b371821 Return all amounts traded and fees paid 2018-04-20 13:56:17 -07:00
Amir Bandeali
0c74a3bc66 Add tests for marketBuyOrders 2018-04-20 13:56:17 -07:00
Amir Bandeali
75f77f3e86 Add marketBuyOrders, rename variables, and fx old tests 2018-04-20 13:56:17 -07:00
Amir Bandeali
7a66da5a51 Fix build errors 2018-04-20 13:56:17 -07:00
Amir Bandeali
3541f5e1da Separate filled/cancelled errors 2018-04-20 13:56:17 -07:00
Amir Bandeali
8f809e3a29 Remove partial cancels 2018-04-20 13:56:17 -07:00
Greg Hysen
3f76985435 updated test name to reflect smart contracts 2018-04-20 13:56:17 -07:00
Greg Hysen
751f9b9240 Change from cancelOrdersBefore to cancelOrdersUpTo. The effect is that orders with salt <= to maker epoch will be cancelled (previously, it was salt < maker epoch) 2018-04-20 13:56:17 -07:00
Greg Hysen
1efba5979f Renamed all instances of timestamp to salt. Clarified test case wording. 2018-04-20 13:56:17 -07:00
Greg Hysen
bf3c4f4743 Fixed spacing 2018-04-20 13:56:17 -07:00
Greg Hysen
aeb0742434 Implementation and tests in the protocol for cancelling all orders up to a specific time 2018-04-20 13:56:17 -07:00
Amir Bandeali
e98b4ea26d Fix build errors 2018-04-20 13:56:17 -07:00
Amir Bandeali
1729cfaea9 Update copyright headers 2018-04-20 13:56:17 -07:00
Amir Bandeali
56ade9c44e Add private keys for testrpc mnemonic 2018-04-20 13:56:17 -07:00
Amir Bandeali
6db0b2e398 Address feedback and lint 2018-04-20 13:56:16 -07:00
Amir Bandeali
2bd1ddd129 Add tests for fillOrderNoThrow based functions 2018-04-20 13:56:16 -07:00
Amir Bandeali
20a37bdd1d Fix fillOrderNoThrow 2018-04-20 13:56:16 -07:00
Amir Bandeali
234447cb3d Add logging to testrpc script 2018-04-20 13:56:16 -07:00
Amir Bandeali
97232145a4 Fix package.json 2018-04-20 13:56:16 -07:00
Amir Bandeali
056ec6d2b3 Bump Solidity version to 0.4.21 2018-04-20 13:56:16 -07:00
Amir Bandeali
2c44c7ea83 Add fillOrderNoThrow to exchange wrapper and add test 2018-04-20 13:56:16 -07:00
Amir Bandeali
9cc1956b4b Update formatting 2018-04-20 13:56:16 -07:00
Amir Bandeali
a35138e2b9 Update fillOrderNoThrow 2018-04-20 13:56:16 -07:00
Amir Bandeali
49f6c20b20 Update order utils 2018-04-20 13:56:16 -07:00
Amir Bandeali
6bfc02d79d Modify tests to work with new utils 2018-04-20 13:56:16 -07:00
Amir Bandeali
7b166837d3 Add script for starting testrpc with preconfigured private keys 2018-04-20 13:56:16 -07:00
Amir Bandeali
3ff8a319c5 Add utils for hashing and signing orders, update wrappers 2018-04-20 13:56:16 -07:00
Amir Bandeali
cd8f8e1e4a Modify utils to work with new signature format 2018-04-20 13:56:16 -07:00
Amir Bandeali
ed43d8d08b Change order field names 2018-04-20 13:56:16 -07:00
Amir Bandeali
ca786cdd11 Fix log decoding 2018-04-20 13:56:16 -07:00
Amir Bandeali
3e659f0de8 Revert getOrderHash to old logic 2018-04-20 13:56:16 -07:00
Amir Bandeali
795a357595 Fix compile errors 2018-04-20 13:56:16 -07:00
Remco Bloemen
5737365b2d Update fillOrderNoThrow 2018-04-20 13:56:16 -07:00
Remco Bloemen
8dff54de42 Use ABIv2 exchange core in wrapper functions 2018-04-20 13:56:16 -07:00
Remco Bloemen
c1b8a7fbb7 Implement ABIv2 in ExchangeCore 2018-04-20 13:56:16 -07:00
Remco Bloemen
6f3c6f7599 Implement EIP712 and ABIv2 in LibOrder 2018-04-20 13:56:16 -07:00
Amir Bandeali
246eca91aa Add logDecoder, remove outdated tests 2018-04-20 13:56:16 -07:00
Amir Bandeali
5fd378e4ce Merge development 2018-04-20 13:56:16 -07:00
Amir Bandeali
382f24c556 Run prettier 2018-04-20 13:56:16 -07:00
Amir Bandeali
0773fcf66f Fix utils to work with new ABI 2018-04-20 13:56:16 -07:00
Amir Bandeali
650a24ba87 Add fillOrderNoThrow and wrapper functions 2018-04-20 13:56:16 -07:00
Amir Bandeali
d2be2ee6cd Fix compile errors 2018-04-20 13:56:16 -07:00
Remco Bloemen
7d63c5d982 Fix spelling of latter 2018-04-20 13:56:16 -07:00
Remco Bloemen
a4f294c090 Add offset to signature 2018-04-20 13:56:16 -07:00
Remco Bloemen
58c5e800d0 Document noThrow wrapper and correct fixed array offset 2018-04-20 13:56:16 -07:00
Remco Bloemen
6d7097eed5 Add Trezor signatures 2018-04-20 13:56:16 -07:00
Remco Bloemen
55da59a537 Add Todos 2018-04-20 13:56:16 -07:00
Remco Bloemen
012ee310a4 Fix documentation 2018-04-20 13:56:16 -07:00
Remco Bloemen
1e07fcacac Verify length on EIP712 signatures 2018-04-20 13:56:16 -07:00
Remco Bloemen
69ab913bc6 Remove unused return value 2018-04-20 13:56:16 -07:00
Remco Bloemen
83a63f64b1 Spelling fixes 2018-04-20 13:56:16 -07:00
Remco Bloemen
8f7e67367a Add documentation 2018-04-20 13:56:16 -07:00
Remco Bloemen
0dad3fecb6 Make wrappers external again 2018-04-20 13:56:16 -07:00
Remco Bloemen
09b99bbf8b Explicit returns 2018-04-20 13:56:16 -07:00
Remco Bloemen
92e112dc63 Revert cancel order signature abstraction 2018-04-20 13:56:16 -07:00
Remco Bloemen
6f5a84703e Fix hash argument name 2018-04-20 13:56:16 -07:00
Remco Bloemen
c0de35e71c Fix batchFillOrdersNoThrow name 2018-04-20 13:56:16 -07:00
Remco Bloemen
f7dd6f7a7e Fix input length in fillOrderNoThrow 2018-04-20 13:56:16 -07:00
Remco Bloemen
655c1eb90f Add SignatureType.Invalid and documentation 2018-04-20 13:56:16 -07:00
Remco Bloemen
af6885db81 Make first value illegal 2018-04-20 13:56:16 -07:00
Remco Bloemen
78e216d157 Implement EIP712 at verify-signature call site 2018-04-20 13:56:16 -07:00
Remco Bloemen
61726d84ac Cancel signature abstraction 2018-04-20 13:56:16 -07:00
Remco Bloemen
60d3bed393 Cache order maker signature (ZEIP-15) 2018-04-20 13:56:16 -07:00
Remco Bloemen
3133ca0081 Add EIP712 signatures (implements ZEIP-17) 2018-04-20 13:56:16 -07:00
Remco Bloemen
0f720223a9 Add external contract call signatures (relates to ZEIP 1 and 7) 2018-04-20 13:56:16 -07:00
Remco Bloemen
6bb93b8170 Revert after cascade 2018-04-20 13:56:16 -07:00
Remco Bloemen
d0f32d1865 Add 'caller' signature type 2018-04-20 13:56:16 -07:00
Remco Bloemen
2fe4e380d1 Abstract signature to opaque bytearray 2018-04-20 13:56:16 -07:00
Remco Bloemen
a7f4701698 Use interfaces for contract types 2018-04-20 13:56:16 -07:00
Amir Bandeali
f12e4f8889 Use new logDecoder interface 2018-04-20 13:56:16 -07:00
Amir Bandeali
df99a360fb Rename variables 2018-04-20 13:56:16 -07:00
Amir Bandeali
4c76ad072a Move log decoding logic to exchange wrapper 2018-04-20 13:56:16 -07:00
Amir Bandeali
edf837ed62 Add logDecoder, remove outdated tests 2018-04-20 13:56:16 -07:00
Amir Bandeali
7201a74aea Move utils dir into src 2018-04-20 13:56:16 -07:00
Amir Bandeali
9e2f8bead9 Merge development 2018-04-20 13:56:16 -07:00
Amir Bandeali
942867179c Run prettier 2018-04-20 13:56:16 -07:00
Amir Bandeali
6b897f6fd2 Get tests to build 2018-04-20 13:56:16 -07:00
Amir Bandeali
389f1cde51 Fix utils to work with new ABI 2018-04-20 13:56:16 -07:00
Amir Bandeali
1ad31ab007 Add fillOrderNoThrow and wrapper functions 2018-04-20 13:56:15 -07:00
Remco Bloemen
914db52c4d Move order settlement to MSettlement 2018-04-20 13:56:15 -07:00
Remco Bloemen
fe51ec906e Exchange refactor using mixin pattern 2018-04-20 13:56:15 -07:00
Remco Bloemen
85551f4994 Fix compiler warnings 2018-04-20 13:56:15 -07:00
Remco Bloemen
fc1cfcceca Update exchange to use interfaces and current SafeMath 2018-04-20 13:56:15 -07:00
Remco Bloemen
6b4d4b9246 Copy Exchange and deps to previous as Exchange_v1 2018-04-20 13:56:15 -07:00
Remco Bloemen
b06ba55be3 Add interfaces for Exchange, TokenRegistery and TokenTransferProxy 2018-04-20 13:56:15 -07:00
Amir Bandeali
d08bfbf705 Merge pull request #545 from 0xProject/feature/deployer/solidity-0.4.23
Feature/deployer/solidity 0.4.23
2018-04-20 13:55:49 -07:00
Amir Bandeali
a10e466fed Fix getABIEncodedTransactionData in contract templates 2018-04-20 13:54:33 -07:00
Amir Bandeali
35bb010c35 Add support for solidity 0.4.23 2018-04-20 13:54:28 -07:00
Brandon Millman
0046a0762c Merge pull request #543 from 0xProject/feature/website/integrate-relayer-info
Integrate relayer index with website backend
2018-04-20 15:37:41 -04:00
Brandon Millman
c453012a8e Add specific render path for error and loading 2018-04-20 15:36:40 -04:00
Fabio Berger
1f82c7eadf Remove unnecessary additional params 2018-04-20 10:04:22 +09:00
Fabio Berger
b6fb8dbb52 Remove outside declaration 2018-04-20 10:03:53 +09:00
Fabio Berger
30256cbe51 Capitalize yarn 2018-04-20 10:01:21 +09:00
Fabio Berger
7f46e9af2c Use path for platform independence 2018-04-20 10:00:37 +09:00
Fabio Berger
417cec9e04 Consolidate github personal access token env to one place: constants.ts 2018-04-20 09:36:03 +09:00
Jacob Evans
62a55c0135 Merge pull request #540 from 0xProject/feature/abi-gen/tuple-return-types
Support Tuples returned from functions
2018-04-20 08:49:23 +10:00
Jacob Evans
72336eb393 Remove ethers-contracts types 2018-04-20 08:26:10 +10:00
Brandon Millman
12d8c0b6af Integrate relayer index with website backend 2018-04-19 16:28:35 -04:00
Jacob Evans
5c232b6a8d Update CHANGELOGs 2018-04-19 17:16:05 +10:00
Fabio Berger
f6fd4281a4 Add ImToken to landing page 2018-04-19 15:35:12 +09:00
Jacob Evans
4bee63afc6 Interface for EventDescription renamed topics 2018-04-19 16:28:46 +10:00
Jacob Evans
d186f6148b Use ethers in abi_decoder utils 2018-04-19 15:25:04 +10:00
Fabio Berger
2b15c03b9a Use methods moved to utils since now shared by multiple scripts 2018-04-19 14:19:34 +09:00
Fabio Berger
60d879e045 Add comment 2018-04-19 14:16:11 +09:00
Fabio Berger
858d1768ce Improve comments 2018-04-19 14:14:10 +09:00
Fabio Berger
fc2b7f747b Add checks for the required local setup before running the publish script 2018-04-19 14:10:48 +09:00
Jacob Evans
207019c7f3 Add ethers to web3-wrapper 2018-04-19 14:59:10 +10:00
Jacob Evans
b264bbea84 Update 0x.js package json for ethers 2018-04-19 14:57:14 +10:00
Jacob Evans
32efb3e280 Update ethers in metacoin project 2018-04-19 13:44:14 +10:00
Fabio Berger
1a0d68d49a Add descriptions for all commands in monorepo-scripts 2018-04-19 11:56:41 +09:00
Fabio Berger
7dd3b2d38b Add removeGitTags script that can be run after a failed Lerna publish 2018-04-19 11:40:22 +09:00
Fabio Berger
4bc65faf1a Merge pull request #526 from 0xProject/fix/expiration-watcher
Fix expiration watcher comparator
2018-04-19 11:28:18 +09:00
Brandon Millman
8634551f53 Merge pull request #539 from 0xProject/feature/website/backend-client
Implement backendClient object to unify calls to the portal api
2018-04-18 22:25:03 -04:00
Brandon Millman
089663ccc1 Merge pull request #534 from 0xProject/feature/website/integrate-prices
Add price information to wallet
2018-04-18 22:20:03 -04:00
Fabio Berger
d1d26f8bf6 Merge branch 'development' into fix/expiration-watcher
* development:
  Publish
  Updated CHANGELOGS
  Move @0xproject/migrations to devDependencies
  Publish
  Updated CHANGELOGS
  Make @0xproject/migrations public

# Conflicts:
#	packages/0x.js/CHANGELOG.json
#	packages/0x.js/package.json
2018-04-19 10:38:43 +09:00
Fabio Berger
1ca86730fa Remove hack above migrations package 2018-04-19 10:37:13 +09:00
Jacob Evans
12ae7c009d Support Tuples from function returns 2018-04-19 11:21:32 +10:00
Brandon Millman
51b2fce8c1 Implement backendClient object to unify calls to the portal api 2018-04-18 20:12:38 -04:00
Leonid Logvinov
62fcb51e1a Publish
- 0x.js@0.36.3
 - contracts@2.1.25
 - @0xproject/sra-report@0.0.11
 - @0xproject/testnet-faucets@1.0.26
 - @0xproject/website@0.0.28
2018-04-18 21:30:28 +02:00
Leonid Logvinov
cbc55f2ef8 Updated CHANGELOGS 2018-04-18 21:30:20 +02:00
Leonid Logvinov
679f828e4e Move @0xproject/migrations to devDependencies 2018-04-18 21:18:18 +02:00
Leonid Logvinov
4a8b4e7398 Publish
- 0x.js@0.36.2
 - contracts@2.1.24
 - @0xproject/migrations@0.0.3
 - @0xproject/sra-report@0.0.10
 - @0xproject/testnet-faucets@1.0.25
 - @0xproject/website@0.0.27
2018-04-18 19:57:42 +02:00
Leonid Logvinov
b6a11ca31e Updated CHANGELOGS 2018-04-18 19:57:36 +02:00
Leonid Logvinov
a30ccf2b25 Make @0xproject/migrations public 2018-04-18 19:32:53 +02:00
Leonid Logvinov
2574405699 Fix expiration watcher comparator 2018-04-18 13:45:04 +02:00
Fabio Berger
3ba78553f0 Publish
- 0x.js@0.36.1
 - @0xproject/abi-gen@0.2.11
 - @0xproject/assert@0.2.7
 - @0xproject/base-contract@0.2.1
 - @0xproject/connect@0.6.10
 - contracts@2.1.23
 - @0xproject/deployer@0.4.1
 - @0xproject/dev-utils@0.3.6
 - @0xproject/json-schemas@0.7.21
 - @0xproject/metacoin@0.0.4
 - @0xproject/migrations@0.0.2
 - @0xproject/monorepo-scripts@0.1.18
 - @0xproject/react-docs-example@0.0.8
 - @0xproject/react-docs@0.0.8
 - @0xproject/react-shared@0.1.3
 - @0xproject/sol-cov@0.0.8
 - @0xproject/sol-resolver@0.0.2
 - @0xproject/sra-report@0.0.9
 - @0xproject/subproviders@0.9.0
 - @0xproject/testnet-faucets@1.0.24
 - @0xproject/tslint-config@0.4.16
 - @0xproject/types@0.6.1
 - @0xproject/typescript-typings@0.2.0
 - @0xproject/utils@0.5.2
 - @0xproject/web3-wrapper@0.6.1
 - @0xproject/website@0.0.26
2018-04-18 20:16:29 +09:00
Fabio Berger
4d485fc424 Print out stderr 2018-04-18 20:03:50 +09:00
Fabio Berger
85f28ade86 Updated CHANGELOGS 2018-04-18 18:36:11 +09:00
Fabio Berger
f6f2991a44 Merge pull request #535 from 0xProject/fix/commentRendering
Docs: Fix Type Comment Rendering
2018-04-18 18:19:27 +09:00
Fabio Berger
4ea222bbff Bold property names 2018-04-18 17:55:16 +09:00
Fabio Berger
f9f5e04b41 Update PR template 2018-04-18 15:33:29 +09:00
Fabio Berger
ea6706a2af Improve rendering of type definition comments 2018-04-18 15:28:36 +09:00
Fabio Berger
64c5c5eb40 Fix comments 2018-04-18 15:22:20 +09:00
Jacob Evans
823f2db09f Merge pull request #531 from 0xProject/feature/deployer/solidity-0.4.22
Solidity 0.4.22
2018-04-18 16:21:56 +10:00
Jacob Evans
a71e511f82 Update test fixtures
allow dependency compiler test to run everywhere
2018-04-18 15:46:06 +10:00
Brandon Millman
39c0064ffb Add price information to wallet 2018-04-18 00:30:52 -04:00
Jacob Evans
12d5c35d14 Merge pull request #532 from 0xProject/bug/0x.js/fix-formatting-and-linting
Fix linter and prettier on development
2018-04-18 14:06:49 +10:00
Jacob Evans
1a161cc02e Fix linter and prettier 2018-04-18 11:24:59 +10:00
Jacob Evans
96f19ba8da Remove prettier change on package.json 2018-04-18 11:20:49 +10:00
Fabio Berger
a63dfb7995 Merge pull request #527 from avonian/redundant_order_removal_bug
Fix redundant expired order removal bug
2018-04-18 09:31:34 +09:00
Jacob Evans
97ea1e300a Update changelog with PR 2018-04-18 10:09:27 +10:00
Jacob Evans
d87d93dfac Update deployer and contracts repo to use solidity 0.4.22 2018-04-18 10:06:13 +10:00
Ara Kevonian
3ffcb03d87 Update CHANGELOG 2018-04-17 08:03:07 -07:00
Ara Kevonian
33b08b90a3 Revert removeOrder flag in favor of noop 2018-04-17 07:42:43 -07:00
Ara Kevonian
cbca2061f7 Fix redundant expired order removal bug 2018-04-17 07:25:13 -07:00
Fabio Berger
bf4873e519 Merge pull request #510 from avonian/development
Implement `zeroEx.exchange.getOrderStateAsync`
2018-04-17 23:09:05 +09:00
Ara Kevonian
8fc1b38ff2 Use this.defaultBlock in OrderFilledCancelledLazyStore 2018-04-17 06:51:26 -07:00
Ara Kevonian
7d957538b4 Add stateLayer param to getOrderState and clean up variable names 2018-04-17 06:47:36 -07:00
Fabio Berger
7a8edb5018 Reduce wiki article padding on mobile and remove commented out code 2018-04-17 22:03:16 +09:00
Jacob Evans
2193d9ae6e Merge pull request #524 from 0xProject/feature/0x.js/remove-hd-wallet-from-test
Remove truffle-hdwallet from 0x.js tests
2018-04-17 15:06:57 +10:00
Jacob Evans
79d01fe2d7 Merge branch 'development' into feature/0x.js/remove-hd-wallet-from-test 2018-04-17 13:47:57 +10:00
Jacob Evans
0d02037a12 Change changelog note as it has no public impact 2018-04-17 13:41:45 +10:00
Leonid Logvinov
d263f7783f Merge pull request #512 from 0xProject/feature/resolver
Dependencies resolver for deployer
2018-04-16 20:47:28 +02:00
Leonid Logvinov
d8ef76fd5e Rename resolver to sol-resolver 2018-04-16 17:43:59 +02:00
Jacob Evans
bc3c7a30c4 Prettier on CHANGELOG.json 2018-04-14 13:33:06 +10:00
Jacob Evans
7b318b3cc2 Update the Changelog with pr number 2018-04-14 13:15:22 +10:00
Leonid Logvinov
e5cf41b313 Uncomment tests 2018-04-13 13:27:52 +02:00
Leonid Logvinov
74012ad584 Rename getAllContracts to getAll 2018-04-13 13:20:54 +02:00
Leonid Logvinov
06b4f007f8 Introduce packagePath 2018-04-13 13:18:59 +02:00
Leonid Logvinov
a9cf425410 Remove artifacts 2018-04-13 13:17:40 +02:00
Ara Kevonian
5355da6cad Rename BalanceAndAllowanceFetchers to BalanceAndProxyAllowanceFetchers 2018-04-13 03:17:09 -07:00
Ara Kevonian
38f7c4a0d2 Implement Simple Fetchers 2018-04-13 03:04:51 -07:00
Fabio Berger
1fcf3c5dc4 Add SignedOrder type to 0x Connect docs 2018-04-13 14:10:03 +09:00
Fabio Berger
20b0afacf5 Standardize external type links 2018-04-13 14:05:57 +09:00
Fabio Berger
6dbe8dbc50 Fix calendar text color to it shows up 2018-04-13 13:38:52 +09:00
Jacob Evans
73e23996a6 Remove truffle-hdwallet from 0x.js tests 2018-04-13 13:16:30 +10:00
Fabio Berger
e40bce253c Add /jobs endpoint to website, link to it and have it re-direct to Angellist 2018-04-13 11:14:01 +09:00
Fabio Berger
74c279ea3a Remove unneeded template strings 2018-04-13 11:13:21 +09:00
Fabio Berger
6c13b792f9 Remove legacy export 2018-04-13 10:21:33 +09:00
Leonid Logvinov
6be7466c4a Fix tests 2018-04-12 14:47:03 +02:00
Leonid Logvinov
1dbdd7ee1f Merge pull request #523 from ritave/patch-1
Remove Greenkeeper from README
2018-04-12 13:20:13 +02:00
Leonid Logvinov
eb89926cee Implement the resolver 2018-04-12 12:52:48 +02:00
Leonid Logvinov
7923ff4ac6 Use solc.compileStandardWrapper 2018-04-12 12:52:21 +02:00
Leonid Logvinov
783314c037 Improve on readability 2018-04-12 12:52:21 +02:00
Leonid Logvinov
15cf64318c Update CHANGELOG's 2018-04-12 12:52:21 +02:00
Leonid Logvinov
442017f93a Use solc.compileStandardWrapper 2018-04-12 12:51:15 +02:00
Leonid Logvinov
4dd9f29769 Add ony abi-gen changes from Greg's PR 2018-04-12 12:50:52 +02:00
Leonid Logvinov
f2f9bd2e7a Revert "Merge pull request #493 from hysz/features/deployer/multipleCodebaseSupport"
This reverts commit 70d403e6f8, reversing
changes made to 073bf738dd.
2018-04-12 12:50:38 +02:00
Olaf Tomalka
d95b8ef3e1 Remove Greenkeeper from README
Greenkeeper doesn't support Monorepos as of yet
2018-04-12 10:51:58 +02:00
Jacob Evans
ed0c64fdcf Merge pull request #507 from 0xProject/feature/subproviders/mnemonic-wallet-subprovider
Mnemonic wallet subprovider and multiple accounts in ledger
2018-04-12 17:35:32 +10:00
Jacob Evans
9a91e39b3f Revert Ledger back to assigning ledgerClient to instance variable 2018-04-12 17:26:17 +10:00
Jacob Evans
ce3f25d48f Rename to parentDerivedKeyInfo to be explicity about how we walk the tree 2018-04-12 17:10:17 +10:00
Jacob Evans
b669508c34 Pluck key off of base path branch for Mnemonic
This reduces the tree walk complexity in wallet utils as it is assumed that we always walk relative. It also removes a HACK :)
2018-04-12 16:59:57 +10:00
Fabio Berger
364d8824af Fix web3-wrapper version 2018-04-12 09:29:58 +09:00
Fabio Berger
749354b1c0 Merge pull request #520 from 0xProject/fix/installation-tests
Fix the publishing/installation test issues
2018-04-12 09:26:42 +09:00
Jacob Evans
be73084e04 Merge branch 'development' into feature/subproviders/mnemonic-wallet-subprovider 2018-04-12 10:20:52 +10:00
Fabio Berger
5eb90697c8 Merge pull request #519 from 0xProject/fix/docImprovements
Doc fixes and improvements
2018-04-12 08:56:33 +09:00
Fabio Berger
faedd2fa0b Merge branch 'development' into fix/docImprovements
* development: (31 commits)
  Prettier ignore Metacoin artifacts
  Publish
  Updated CHANGELOGS
  Improve deployer error message
  Fix 0x.js tests
  Fix lint issue
  Simply export
  Move NULL_BYTES to @0xproject/utils
  Simplify the tests
  Fix lint error
  Add step to publishing that upload staging doc jsons, deploys staging website, opens every docs page and asks the dev to confirm that each one renders properly before publishing
  Fix web3Wrapper build command
  Add top-level `yarn lerna:stage_docs` to upload docJsons to the staging S3 bucket for all packages with a docs page
  Refactor publish script to have it's main execution body be lean and discrete steps
  Removed unused command
  Remove 0x.js test artifacts
  Fix tslint
  Move migrations into separate monorepo subpackage and hook it up to 0x.js and contracts
  Remove unused var
  Refactor RedundantRpcSubprovider into RedundantSubprovider
  ...

# Conflicts:
#	packages/react-docs/CHANGELOG.json
2018-04-12 08:56:13 +09:00
Fabio Berger
c47fb8f9a8 Merge pull request #500 from 0xProject/removeMigrateStep
Run all tests against in-process Ganache
2018-04-12 08:53:32 +09:00
Fabio Berger
27b915789e Merge branch 'development' into removeMigrateStep
* development:
  Publish
  Updated CHANGELOGS

# Conflicts:
#	packages/0x.js/package.json
#	packages/deployer/package.json
#	packages/utils/CHANGELOG.json
2018-04-12 08:53:12 +09:00
Fabio Berger
ddc6dca98c Prettier ignore Metacoin artifacts 2018-04-12 08:42:02 +09:00
Leonid Logvinov
72aa3d3005 Fix some of the publishing/installation issues 2018-04-11 18:39:58 +02:00
Leonid Logvinov
e8d4f6d532 Publish
- 0x.js@0.36.0
 - @0xproject/abi-gen@0.2.10
 - @0xproject/assert@0.2.6
 - @0xproject/base-contract@0.2.0
 - @0xproject/connect@0.6.9
 - contracts@2.1.22
 - @0xproject/deployer@0.4.0
 - @0xproject/dev-utils@0.3.5
 - @0xproject/json-schemas@0.7.20
 - @0xproject/metacoin@0.0.3
 - @0xproject/monorepo-scripts@0.1.17
 - @0xproject/react-docs-example@0.0.7
 - @0xproject/react-docs@0.0.7
 - @0xproject/react-shared@0.1.2
 - @0xproject/sol-cov@0.0.7
 - @0xproject/sra-report@0.0.8
 - @0xproject/subproviders@0.8.5
 - @0xproject/testnet-faucets@1.0.23
 - @0xproject/tslint-config@0.4.15
 - @0xproject/types@0.6.0
 - @0xproject/typescript-typings@0.1.0
 - @0xproject/utils@0.5.1
 - @0xproject/web3-wrapper@0.6.0
 - @0xproject/website@0.0.25
2018-04-11 18:00:46 +02:00
Leonid Logvinov
631e7e9c58 Updated CHANGELOGS 2018-04-11 18:00:39 +02:00
Fabio Berger
3c84ce2050 Improve deployer error message 2018-04-11 22:37:39 +09:00
Fabio Berger
9db1ce7ceb Fix 0x.js tests 2018-04-11 22:37:23 +09:00
Fabio Berger
e472f7899f Fix lint issue 2018-04-11 22:04:26 +09:00
Fabio Berger
b053781453 Simply export 2018-04-11 22:01:00 +09:00
Fabio Berger
f892b7dbf6 Move NULL_BYTES to @0xproject/utils 2018-04-11 22:00:54 +09:00
Fabio Berger
b146acc69e Simplify the tests 2018-04-11 21:59:30 +09:00
Jacob Evans
63b941fbaf Update documentation and add to website docs 2018-04-11 20:59:17 +10:00
Fabio Berger
29dc22e208 Merge branch 'development' into removeMigrateStep
* development:
  Fix lint error
  Fix documentation links in some READMEs
  Fix relative link
  Add step to publishing that upload staging doc jsons, deploys staging website, opens every docs page and asks the dev to confirm that each one renders properly before publishing
  Fix web3Wrapper build command
  Add top-level `yarn lerna:stage_docs` to upload docJsons to the staging S3 bucket for all packages with a docs page
  Added a detailed description of `renameOverloadedMethods` (special thanks to @fabioberger). Updated Javascript styles in the Abi-Gen and Utils packages, around support for function overloading.
  Updated deployer to accept a list of contract directories as input. Contract directories are namespaced to a void clashes. Also in this commit is a fix for overloading contract functions.
  Refactor publish script to have it's main execution body be lean and discrete steps

# Conflicts:
#	packages/contracts/package.json
#	packages/deployer/package.json
2018-04-11 19:00:30 +09:00
Fabio Berger
c44f9e56ad Merge pull request #514 from 0xProject/publishImprovements
Add Doc Page Check To Publish Flow
2018-04-11 18:55:59 +09:00
Fabio Berger
2fe209d5ff Fix lint error 2018-04-11 18:55:42 +09:00
Fabio Berger
41bd0e30d6 Add comment about Provider type 2018-04-11 18:43:58 +09:00
Fabio Berger
40f4dd91e9 Update CHANGELOG 2018-04-11 18:33:01 +09:00
Fabio Berger
5bf43a3560 Merge branch 'development' into fix/docImprovements
* development:
  Fix documentation links in some READMEs
  Fix relative link

# Conflicts:
#	packages/0x.js/README.md
#	packages/web3-wrapper/README.md
2018-04-11 18:17:35 +09:00
Fabio Berger
f0afc0ae45 Update 0x.js and web3-wrapper doc urls so that last segment is identical to package name. Keep legacy endpoints. 2018-04-11 18:14:22 +09:00
Jacob Evans
916b4d3a26 Renamed DerivedHDKey to DerivedHDKeyInfo
Added assertions on addresses for public methods
Throw a helpful error message when signer address is not instantiated address in PrivateKeyWalletSubprovider
Update changelog and rename derivationBasePath to baseDerivationPath
When returning undefined use pattern of IfExists
Added configuration object for MnemonicWallet
Put constants back into each individual wallet rather than in walletUtils
Delete accidental package-lock.json
2018-04-11 19:08:28 +10:00
Fabio Berger
6d1a587c5c Show staging docs on development and staging 2018-04-11 18:04:02 +09:00
Fabio Berger
bce97c2543 Add support for displaying default param values 2018-04-11 17:39:30 +09:00
Fabio Berger
34446cf569 Fix sol-cov, web3-wrapper, subproviders documentation pages given recent changes to the libraries 2018-04-11 17:36:41 +09:00
Fabio Berger
1e13e927d0 Add missing space in property declaration 2018-04-11 17:36:01 +09:00
Fabio Berger
3c0fa0b7e6 Fix 0x.js docs now that many types are no longer references through the Web3 typings 2018-04-11 17:05:35 +09:00
Fabio Berger
ad894fbdbb Add missing types to 0x.js docs 2018-04-11 16:53:30 +09:00
Fabio Berger
7d9c6eafbf Add support for nested methods within type declarations. Make sure they render without a callPath. 2018-04-11 16:53:13 +09:00
Fabio Berger
de6f757ec8 Introduce type JSONRpcErrorCallback 2018-04-11 16:48:56 +09:00
Fabio Berger
3eeb8f4d6d Small fix to README 2018-04-11 16:22:10 +09:00
Jacob Evans
f44ef7ce59 Update website to support latest ledger 2018-04-11 15:12:02 +10:00
Jacob Evans
b08c616713 Move type declaration for hdkey to typescript-typings 2018-04-11 14:53:58 +10:00
Jacob Evans
3ad693d334 Test valid address format but not found 2018-04-11 14:39:55 +10:00
Brandon Millman
7d8badc86e Fix documentation links in some READMEs 2018-04-10 21:24:17 -07:00
Brandon Millman
854d65b51b Merge pull request #517 from lgedeon/development
Fix relative link
2018-04-10 21:21:31 -07:00
Jacob Evans
4aa67e2925 Update JSDoc for methods in ledger and mnemonic wallet 2018-04-11 14:12:38 +10:00
Jacob Evans
260ab2d413 Update changelog and add derivationBasePath 2018-04-11 14:04:27 +10:00
Jacob Evans
a824957de7 Follow file naming pattern for mnemonic and private key subprovider 2018-04-11 13:46:01 +10:00
Jacob Evans
4017c172a2 Iterator pattern for walking derived keys 2018-04-11 13:44:08 +10:00
Jacob Evans
65b2c936ab Tests for signed transactions and multiple accounts 2018-04-11 12:56:52 +10:00
Jacob Evans
eee190826a Test signed messages with the second account 2018-04-11 12:51:57 +10:00
Jacob Evans
20a1deb187 Throw errors when the address is not specified or invalid 2018-04-11 12:47:17 +10:00
Jacob Evans
9169913a2c Add isChildKey to derived key 2018-04-11 12:22:41 +10:00
Luke Gedeon
df773d07f3 Fix relative link
0xproject.com/docs/json-schemas  -->  https://0xproject.com/docs/json-schemas
2018-04-10 21:29:16 -04:00
Ara Kevonian
bf0ef055fb Modify lazy stores to implement abstract fetcher classes 2018-04-10 03:46:43 -07:00
Jacob Evans
4e4842a62f Improve Documentation for functions and constructors 2018-04-10 16:01:34 +10:00
Jacob Evans
a34c9095c3 Rename to IS_CHILD_KEY 2018-04-10 15:51:09 +10:00
Fabio Berger
efdbc1ff6c Add step to publishing that upload staging doc jsons, deploys staging website, opens every docs page and asks the dev to confirm that each one renders properly before publishing 2018-04-10 14:49:13 +09:00
Jacob Evans
84a4b7d1c1 Refactor ledger to support multiple accounts with from address 2018-04-10 14:39:43 +10:00
Fabio Berger
a9b5faa787 Fix web3Wrapper build command 2018-04-10 12:04:51 +09:00
Fabio Berger
49a54c0ff6 Add top-level yarn lerna:stage_docs to upload docJsons to the staging S3 bucket for all packages with a docs page 2018-04-10 12:04:11 +09:00
Amir Bandeali
70d403e6f8 Merge pull request #493 from hysz/features/deployer/multipleCodebaseSupport
Deployer: Support for External Codebases + Overloaded Function Names
2018-04-09 20:02:55 -07:00
Greg Hysen
eecf09f515 Added a detailed description of renameOverloadedMethods (special thanks to @fabioberger). Updated Javascript styles in the Abi-Gen and Utils packages, around support for function overloading. 2018-04-09 19:25:07 -07:00
Jacob Evans
5b69cd4a22 Added walletUtils and address in signMessage 2018-04-10 11:58:12 +10:00
Greg Hysen
61fc3346c2 Updated deployer to accept a list of contract directories as input. Contract directories are namespaced to a void clashes. Also in this commit is a fix for overloading contract functions. 2018-04-09 17:22:58 -07:00
Ara Kevonian
c80b42712a Lint/Prettify 2018-04-09 07:05:46 -07:00
Ara Kevonian
8d76d74a17 Implement zeroEx.exchange.getOrderStateAsync 2018-04-09 04:49:05 -07:00
Fabio Berger
b7e98abc43 Refactor publish script to have it's main execution body be lean and discrete steps 2018-04-09 19:11:18 +09:00
Fabio Berger
6f72fed8b5 Removed unused command 2018-04-09 17:23:27 +09:00
Fabio Berger
27575e9866 Remove 0x.js test artifacts 2018-04-09 17:17:05 +09:00
Fabio Berger
986ba175ce Fix tslint 2018-04-09 17:14:32 +09:00
Fabio Berger
919b327fc5 Move migrations into separate monorepo subpackage and hook it up to 0x.js and contracts 2018-04-09 17:14:25 +09:00
Fabio Berger
e05b55d4a5 merge development 2018-04-09 14:34:36 +09:00
Fabio Berger
073bf738dd Since we moved Web3Wrapper class from index to it's own file, we need to update doc mapping 2018-04-07 10:41:43 +09:00
Fabio Berger
68e8d6f304 Update ERCDex logo 2018-04-07 10:24:47 +09:00
Fabio Berger
6f24337a53 Remove unused var 2018-04-07 10:17:53 +09:00
Jacob Evans
0e8f5004d6 Add Mnemonic wallet subprovider 2018-04-06 19:03:35 +10:00
Jacob Evans
524e4707d2 Merge pull request #506 from 0xProject/feature/subproviders/pk-wallet-subprovider
Private Key subprovider
2018-04-06 16:52:44 +10:00
Fabio Berger
22fa5a57a5 Refactor RedundantRpcSubprovider into RedundantSubprovider 2018-04-06 15:46:27 +09:00
Fabio Berger
e30c76b743 Make all handleRequest methods async, rename _engine to engine to remain compliant with web3-provider-engine 2018-04-06 15:41:42 +09:00
Jacob Evans
a0fac663f7 Update shared fixture data for network 42 2018-04-06 16:07:00 +10:00
Fabio Berger
277e58c2e5 Merge pull request #505 from 0xProject/fix/readmeContributingSection
Improve README contributing sections in all packages
2018-04-06 15:05:34 +09:00
Fabio Berger
75a51af006 Use provider over web3 in deployer, dev-utils and subprovider tests, rename subprovider to ganacheSubprovider in test util 2018-04-06 15:04:17 +09:00
Fabio Berger
24454938e5 Move away from using web3 directly in 0x.js tests 2018-04-06 15:03:14 +09:00
Jacob Evans
774ab8a8ef Feedback
remove id management from testnet faucet
spread over txParams rather than modify in place
2018-04-06 15:21:08 +10:00
Brandon Millman
21dc94b709 Merge pull request #503 from 0xProject/feature/website/relayer-grid
Implement initial relayer grid
2018-04-05 12:15:16 -07:00
Brandon Millman
d6176872f7 Merge pull request #504 from 0xProject/fix/website/wallet-key-warning
Fix missing key warnings in wallet component
2018-04-05 12:14:43 -07:00
Brandon Millman
c396be42b9 Change undefined to null 2018-04-05 12:13:55 -07:00
Fabio Berger
89a72ebf0d Merge branch 'development' into removeMigrateStep
* development:
  Fix tests
  Call static functions as static
  Address feedback
  Move our contract templates to accept Provider instead of Web3Wrapper
2018-04-05 21:06:58 +09:00
Leonid Logvinov
7f7ddee0f9 Merge pull request #501 from 0xProject/feature/provider-over-wrapper
Use Provider over web3Wrapper
2018-04-05 13:52:43 +02:00
Leonid Logvinov
b99c797945 Fix tests 2018-04-05 13:52:19 +02:00
Leonid Logvinov
59edca4166 Call static functions as static 2018-04-05 13:06:16 +02:00
Leonid Logvinov
fbba5e054a Address feedback 2018-04-05 12:37:35 +02:00
Jacob Evans
ea47613d90 Use PKWalletSubprovider in testnet faucet 2018-04-05 15:33:04 +10:00
Jacob Evans
9d18f751c8 Create a private key subprovider 2018-04-05 15:18:38 +10:00
Fabio Berger
9745dfe2f4 Use depcheck async support 2018-04-05 11:43:48 +09:00
Fabio Berger
29d38593d6 Fix contributing links 2018-04-05 10:01:41 +09:00
Fabio Berger
d76bc18bb7 Improve contributing section of all packages so they include building entire monorepo on first contribution 2018-04-05 09:57:21 +09:00
Brandon Millman
cbe61ac315 Fix missing key warnings in wallet component 2018-04-04 13:35:08 -07:00
Brandon Millman
250d97a7c4 Implement initial relayer grid 2018-04-04 12:09:03 -07:00
Leonid Logvinov
249bf0163d Move our contract templates to accept Provider instead of Web3Wrapper 2018-04-04 11:56:32 +03:00
Fabio Berger
20aaab0847 Add --exit to all mocha calls so they exit when called from top-level yarn command (https://github.com/mochajs/mocha/issues/3044) 2018-04-04 16:34:23 +09:00
Fabio Berger
3e648cfb7e Move migrations over from contracts to 0x.js 2018-04-04 16:33:18 +09:00
Fabio Berger
2106d7476d Add contract artifacts to 0x.js tests 2018-04-04 16:32:32 +09:00
Fabio Berger
43e07e7ce3 Update 0x.js to run tests against in-process ganache 2018-04-04 16:31:57 +09:00
Fabio Berger
5e4e27fed5 Update dev-utils and subproviders tests to use ganache in-process provider 2018-04-04 11:35:58 +09:00
Fabio Berger
6c02722f56 Make deployer tests run on inprocess ganache 2018-04-04 09:50:24 +09:00
Fabio Berger
5cfebd2680 Fix typos 2018-04-04 09:48:54 +09:00
Fabio Berger
bd20b1747d Add top-level test command 2018-04-04 09:48:36 +09:00
Fabio Berger
674e56cea6 Merge pull request #496 from 0xProject/removeUnusedDeps
Remove unused deps + Remove Dharma from website
2018-04-04 03:58:18 +09:00
Fabio Berger
61809130a6 Merge branch 'development' into removeUnusedDeps
* development:
  Temporarily remove installation test
  Fix package.json
  Remove `isPublished` from all CHANGELOG.json filesx
  Now that every version of a package published has a corresponding entry in it's CHANGELOG we no longer need the isPublished flag. Remove it.
  Remove temporary convert_changelog script

# Conflicts:
#	packages/monorepo-scripts/package.json
2018-04-04 03:57:42 +09:00
Fabio Berger
f5e6e0eaf7 Used generic declaration to remove need for any 2018-04-04 03:56:17 +09:00
Fabio Berger
b2c423dd84 Use Results type 2018-04-04 03:54:58 +09:00
Fabio Berger
4a9752d7cd Merge pull request #495 from 0xProject/fix/publishProcess
Improve Publish Flow
2018-04-04 03:14:36 +09:00
Leonid Logvinov
7db9a01639 Temporarily remove installation test 2018-04-03 12:50:23 +03:00
Fabio Berger
e9cb5c069a Add comment about ignored packages 2018-04-03 15:44:07 +09:00
Fabio Berger
03e4205700 Remove Dharma integration from Website 2018-04-03 15:39:43 +09:00
Fabio Berger
fd9278ac02 Add find_unused_deps monorepo script 2018-04-03 15:28:07 +09:00
Fabio Berger
1b7c7037b8 Remove remaining unused deps 2018-04-03 15:27:45 +09:00
Fabio Berger
913264c811 Update yarn.lock 2018-04-03 14:54:30 +09:00
Fabio Berger
e70b6630f9 Fix TS error 2018-04-03 14:52:31 +09:00
Fabio Berger
6d53947fd8 Add missing request types 2018-04-03 14:48:05 +09:00
Fabio Berger
1c0d982398 Fix yarn 2018-04-03 13:00:40 +09:00
Fabio Berger
a88b4040ff Stop using utils 2018-04-03 12:58:45 +09:00
Fabio Berger
e8073cd6f2 Update yarn.lock 2018-04-03 12:04:08 +09:00
Fabio Berger
8281be235c Use @0xproject/utils promisify everywhere 2018-04-03 12:03:59 +09:00
Fabio Berger
9ce03e3515 Update tslint-config. To avoid circular deps, this must always be one version back and must be manually updated. 2018-04-03 12:03:10 +09:00
Fabio Berger
667938696d Remove unused contracts deps 2018-04-03 11:43:23 +09:00
Fabio Berger
a165281dcf Remove unused 0x.js deps 2018-04-03 11:43:08 +09:00
Fabio Berger
185f70f2dd Fix package.json 2018-04-03 10:04:16 +09:00
Fabio Berger
cd3e14f45a Remove isPublished from all CHANGELOG.json filesx 2018-04-03 09:45:59 +09:00
Fabio Berger
dd87588dfe Now that every version of a package published has a corresponding entry in it's CHANGELOG we no longer need the isPublished flag. Remove it. 2018-04-03 09:45:30 +09:00
Fabio Berger
29042e1939 Remove temporary convert_changelog script 2018-04-03 09:36:43 +09:00
Leonid Logvinov
4dbf6559aa After publish 2018-04-02 16:12:37 +03:00
Leonid Logvinov
b987b5988d Publish
- 0x.js@0.35.0
 - @0xproject/abi-gen@0.2.9
 - @0xproject/assert@0.2.5
 - @0xproject/base-contract@0.1.0
 - @0xproject/connect@0.6.8
 - contracts@2.1.21
 - @0xproject/deployer@0.3.5
 - @0xproject/dev-utils@0.3.4
 - @0xproject/json-schemas@0.7.19
 - @0xproject/metacoin@0.0.2
 - @0xproject/monorepo-scripts@0.1.16
 - @0xproject/react-docs-example@0.0.6
 - @0xproject/react-docs@0.0.6
 - @0xproject/react-shared@0.1.1
 - @0xproject/sol-cov@0.0.6
 - @0xproject/sra-report@0.0.7
 - @0xproject/subproviders@0.8.4
 - @0xproject/testnet-faucets@1.0.22
 - @0xproject/tslint-config@0.4.14
 - @0xproject/types@0.5.0
 - @0xproject/typescript-typings@0.0.3
 - @0xproject/utils@0.5.0
 - @0xproject/web3-wrapper@0.5.0
 - @0xproject/website@0.0.24
2018-04-02 16:01:51 +03:00
Leonid Logvinov
6ba6bec105 Updated CHANGELOGS 2018-04-02 16:01:45 +03:00
Leonid Logvinov
d95b1e2db4 Merge pull request #485 from 0xProject/feature/metacoin
Add metacoin example project
2018-04-02 14:57:44 +03:00
Leonid Logvinov
c1d6c7ff66 Fix a typo 2018-04-02 14:45:59 +03:00
Leonid Logvinov
6e12794765 Compile only the Exchange contract in compiler tests 2018-04-02 14:20:53 +03:00
Leonid Logvinov
0f4b05e374 Fix version 2018-04-02 13:20:52 +03:00
Fabio Berger
695b697cdf small README fixes 2018-04-02 19:05:27 +09:00
Fabio Berger
3aea0e3b2f Update docs list in README 2018-04-02 19:04:02 +09:00
Leonid Logvinov
c0e92d511e Fix a typo 2018-04-02 13:01:40 +03:00
Leonid Logvinov
51f2a20b2a Merge branch 'development' into feature/metacoin 2018-04-02 12:56:46 +03:00
Leonid Logvinov
333a23f222 Update CHANGELOG.json's 2018-04-02 12:52:49 +03:00
Fabio Berger
3bf3f479f5 Add manual postpublish command to all public packages and update CHANGELOG.json 2018-04-02 18:46:53 +09:00
Fabio Berger
6241d06f27 Fix postpublish util to ignore namespace 2018-04-02 18:44:40 +09:00
Leonid Logvinov
9e81d3c87b Fix contracts and artifacts paths 2018-04-02 12:35:03 +03:00
Leonid Logvinov
a9b2838c5f Stop passing _abiDecoder 2018-04-02 12:35:03 +03:00
Leonid Logvinov
fbc39614c0 Report errors locally 2018-04-02 12:35:03 +03:00
Leonid Logvinov
b2d6ac8dba move all configs to a config file 2018-04-02 12:35:03 +03:00
Leonid Logvinov
b090b7b1f2 Remove a repo section 2018-04-02 12:35:03 +03:00
Leonid Logvinov
ba0696a0d7 Incroduce the Warning constant 2018-04-02 12:35:03 +03:00
Leonid Logvinov
b57850a225 Regroup gitignore entries 2018-04-02 12:34:29 +03:00
Leonid Logvinov
4d9029bb0e Add metacoin example project 2018-04-02 12:34:29 +03:00
Fabio Berger
bc49dde4d5 Fix release notes bug 2018-04-02 18:08:55 +09:00
Fabio Berger
afe07b2926 Should print out lerna publish stdout so we can see if anything went wrong 2018-04-02 17:59:47 +09:00
Fabio Berger
2411bfc20f Publish
- 0x.js@0.34.0
 - @0xproject/abi-gen@0.2.8
 - @0xproject/assert@0.2.4
 - @0xproject/base-contract@0.0.6
 - @0xproject/connect@0.6.7
 - contracts@2.1.20
 - @0xproject/deployer@0.3.4
 - @0xproject/dev-utils@0.3.3
 - @0xproject/json-schemas@0.7.18
 - @0xproject/monorepo-scripts@0.1.15
 - @0xproject/react-docs-example@0.0.5
 - @0xproject/react-docs@0.0.5
 - @0xproject/react-shared@0.1.0
 - @0xproject/sol-cov@0.0.5
 - @0xproject/sra-report@0.0.6
 - @0xproject/subproviders@0.8.3
 - @0xproject/testnet-faucets@1.0.21
 - @0xproject/tslint-config@0.4.13
 - @0xproject/types@0.4.2
 - @0xproject/typescript-typings@0.0.2
 - @0xproject/utils@0.4.4
 - @0xproject/web3-wrapper@0.4.0
 - @0xproject/website@0.0.23
2018-04-02 17:42:10 +09:00
Fabio Berger
4d4ea8a4d0 Updated CHANGELOGS 2018-04-02 17:42:03 +09:00
Fabio Berger
595517e68b Generate CHANGELOG.json files 2018-04-02 17:35:26 +09:00
Fabio Berger
40ab2de393 Merge pull request #489 from 0xProject/refactor/publishProcess
Automate NPM Publish Process
2018-04-02 10:33:13 +02:00
Fabio Berger
723276ae3f Fix hasty find/replace 2018-04-02 16:56:14 +09:00
Fabio Berger
76c5945017 Default to 4sp 2018-04-02 16:40:02 +09:00
Fabio Berger
01c6fd92e8 Update moment, no longer need separate moment types 2018-04-02 16:06:36 +09:00
Fabio Berger
3f230a8fdb Move prettify command to utils and also call it on CHANGELOG.md 2018-04-02 15:53:31 +09:00
Fabio Berger
2a6a71ea6c Add prettier run on generated CHANGELOG.json and fix scripts 2018-04-02 15:49:48 +09:00
Fabio Berger
cd23f220a0 Remove semi-colons from monorepo-scripts package.json 2018-04-02 08:51:10 +09:00
Fabio Berger
fab88ea2cc Get rid of ; in top-level package.json 2018-04-02 08:44:27 +09:00
Fabio Berger
688f8615ff Fix TSLint error 2018-04-02 05:12:03 +09:00
Fabio Berger
d187a31e38 Make dry-run configurable from top-level package.json 2018-04-02 05:10:27 +09:00
Fabio Berger
c6f85464ce Merge branch 'development' into refactor/publishProcess
* development:
  Run prettier, update deployer CHANGELOG
  Create solc_bin dir if does not exist before attempting to compile
  Add missing type import
2018-04-02 04:28:29 +09:00
Fabio Berger
a220b56736 Merge pull request #491 from 0xProject/fix/buildErrors
Fix build errors
2018-04-01 21:15:34 +02:00
Fabio Berger
0e33f45f3d Improve naming 2018-04-02 04:10:18 +09:00
Amir Bandeali
ff7c3012a5 Run prettier, update deployer CHANGELOG 2018-04-01 10:45:30 -07:00
Amir Bandeali
20fec2943b Create solc_bin dir if does not exist before attempting to compile 2018-04-01 10:45:25 -07:00
Fabio Berger
08b30b0706 Merge branch 'development' into refactor/publishProcess
* development:
  Add HACK comment and reorganize use other wallet button
  Fixed comment(s) for PR #488
  OrderStateWatcher fixes for PR #488
  Amended comments to clarify changes on PR #488
  Monitor different state layers with OrderWatcher
  Implement wallet locked and uninstalled states
  Style changes
  Remove props that are covered by the defaults
  Implement ETH/WETH conversion and allowance toggle styling
2018-04-02 02:41:28 +09:00
Fabio Berger
bf52ce7e72 Add temp comment, clean up code 2018-04-02 02:40:48 +09:00
Amir Bandeali
1bac5019e8 Add missing type import 2018-03-31 23:54:09 -07:00
Brandon Millman
19454a92dc Merge pull request #487 from 0xProject/feature/website/wallet-setup
Implement wallet locked and uninstalled states
2018-03-30 15:01:18 -07:00
Brandon Millman
cdbb3a015f Add HACK comment and reorganize use other wallet button 2018-03-30 15:00:02 -07:00
Leonid Logvinov
644da2b0cb Merge pull request #488 from avonian/development
Monitor different state layers with OrderWatcher
2018-03-30 19:56:16 +02:00
Ara Kevonian
57446d78f1 Fixed comment(s) for PR #488 2018-03-30 10:28:13 -07:00
Ara Kevonian
3e285c0ef1 OrderStateWatcher fixes for PR #488 2018-03-30 09:59:57 -07:00
Ara Kevonian
a322148631 Amended comments to clarify changes on PR #488 2018-03-30 08:00:05 -07:00
Fabio Berger
33ec9fdf47 Fixes for clarity 2018-03-30 15:49:09 +02:00
Fabio Berger
323826111a Remove CHANGELOG from website since it's a public package 2018-03-30 15:48:54 +02:00
Fabio Berger
ddd3d284d9 Remove CHANGELOG.json files since will be generated on development 2018-03-30 15:48:39 +02:00
Fabio Berger
f55a300f43 Set IS_DRY_RUN to false 2018-03-30 15:28:08 +02:00
Fabio Berger
08a69ebd6e Add more logging 2018-03-30 15:27:47 +02:00
Fabio Berger
ddb8e26bec Expose publish command from top-level dir 2018-03-30 15:07:24 +02:00
Ara Kevonian
57ca611e12 Monitor different state layers with OrderWatcher
Allow instantiation of stand-alone OrderWatchers
that can monitor different blockchain state
layers (e.g. pending or latest)
2018-03-30 05:59:09 -07:00
Fabio Berger
1eff120f49 Remove top-level internal dep b/c it's not clear to me what it's used for 2018-03-30 14:58:11 +02:00
Fabio Berger
4bc6096ec0 Fetch Github release notes from CHANGELOG.json and update CHANGELOG once they've been successfully published to Github 2018-03-30 14:48:20 +02:00
Fabio Berger
95eb114051 rename variable called path to includePath to avoid conflict with path package 2018-03-30 14:46:15 +02:00
Fabio Berger
9c856de49c Move monorepo root constant to constants file 2018-03-30 14:45:39 +02:00
Fabio Berger
d502f79303 Rename prepublish to publish now that it goes straight to actually publishing the packages 2018-03-30 14:29:30 +02:00
Fabio Berger
5224337323 Call lerna publish and supply it with new package versions 2018-03-30 14:29:07 +02:00
Fabio Berger
ef49192170 Add check that timestamp has been set before generating MD version 2018-03-30 12:43:03 +02:00
Fabio Berger
c9df388731 Add committing and pushing CHANGELOG changes to Github 2018-03-30 12:28:48 +02:00
Brandon Millman
870da2ab22 Implement wallet locked and uninstalled states 2018-03-29 16:57:23 -07:00
Brandon Millman
6122840241 Merge pull request #476 from 0xProject/feature/website/wallet-wrap
Implement ETH/WETH conversion and allowance toggle styling
2018-03-29 14:00:37 -07:00
Brandon Millman
03b00ef8da Style changes 2018-03-29 11:25:50 -07:00
Fabio Berger
84b820abc6 Show semver diff 2018-03-29 20:03:11 +02:00
Fabio Berger
cc4ff568a9 Improve README 2018-03-29 20:02:43 +02:00
Brandon Millman
665011174b Merge branch 'development' into feature/website/wallet-wrap
* development: (35 commits)
  Fix CHANGELOG
  Update Yarn.lock
  Standardize changelog dates and format
  Fix stubbing of a non-existent property
  Remove redundant cast
  Move common types out of web3 types
  Add monorepo_scripts to npmignore
  Add typeRoots
  Add clean-state tests
  Remove nested .gitignore files since `yarn publish` gets confused by them and ignores their contents on the top-level scope
  Remove WETH hack now that updated WETH address is in TokenRegistry
  Revert TokenRegistry address on Kovan
  Improve rounding error message
  Portal fill with mixed decimals
  Add error popover if TokenRegistry on network user is browsing on don't include the requisite default tokens for 0x Portal to function
  Set timeout for compiler tests
  Remove redundant types
  Add missing param comments
  Fix a comment
  Add a comment
  ...
2018-03-29 10:02:46 -07:00
Fabio Berger
37f210e9f0 Fix changelog.json 2018-03-29 17:46:43 +02:00
Fabio Berger
9c01e3a8a0 Merge branch 'development' into refactor/publishProcess
* development:
  Fix CHANGELOG
  Update Yarn.lock
2018-03-29 17:46:24 +02:00
Fabio Berger
c4dd9658e7 Fix CHANGELOG 2018-03-29 17:44:50 +02:00
Fabio Berger
29aa09e448 Generate CHANGELOG.mds 2018-03-29 17:41:39 +02:00
Fabio Berger
1337b6928a Update Yarn.lock 2018-03-29 17:17:41 +02:00
Fabio Berger
ac35d8127e remove console.logs 2018-03-29 17:02:44 +02:00
Fabio Berger
a6ae1efadb Begin global pre-publishing script. Updates changelog.json files in packages to be published 2018-03-29 15:26:47 +02:00
Fabio Berger
bd7b5c51b2 Add 0.x.x edgecase 2018-03-29 15:18:42 +02:00
Fabio Berger
397cd77ef9 Fix semver-sort version 2018-03-29 15:02:46 +02:00
Fabio Berger
743c3dbe01 Generate CHANGELOG.json files and add convert_changelog script 2018-03-29 14:06:29 +02:00
Fabio Berger
9f1c212596 Update Yarn lock and fix dep versions 2018-03-29 13:00:42 +02:00
Fabio Berger
defd249565 Standardize changelog dates and format 2018-03-29 12:49:39 +02:00
Leonid Logvinov
8926dac78c Merge pull request #482 from 0xProject/feature/web3-types
Move common types out of web3 types
2018-03-28 16:26:05 +02:00
Fabio Berger
18cac3f092 Merge pull request #483 from 0xProject/refactor/removeHardcodedWeth
Remove WETH hack now that updated WETH address is in TokenRegistry
2018-03-28 10:41:53 +01:00
Leonid Logvinov
01e27426d6 Fix stubbing of a non-existent property 2018-03-28 10:43:42 +02:00
Leonid Logvinov
0b09cc36b0 Remove redundant cast 2018-03-28 10:26:56 +02:00
Fabio Berger
f3cb484f82 Merge pull request #484 from 0xProject/fix/gitignoreIssue
Remove nested .gitignore & add monorepo_scripts to npmignore
2018-03-27 19:16:36 +01:00
Fabio Berger
0053762760 merge developmentx 2018-03-27 19:16:13 +01:00
Leonid Logvinov
d72b7299c6 Move common types out of web3 types 2018-03-27 17:56:21 +02:00
Fabio Berger
eb89ef79eb Add monorepo_scripts to npmignore 2018-03-27 16:49:19 +01:00
Leonid Logvinov
066d13f5b7 Merge pull request #480 from 0xProject/feature/clean-state-tests
Add clean-state tests
2018-03-27 17:47:45 +02:00
Leonid Logvinov
ec06d8d606 Add typeRoots 2018-03-27 17:47:05 +02:00
Leonid Logvinov
a2e4aaa9a3 Add clean-state tests 2018-03-27 17:47:04 +02:00
Leonid Logvinov
26e9696ddb Merge pull request #460 from 0xProject/feature/deployer-improvements
@0xproject/deployer improvements
2018-03-27 17:43:50 +02:00
Fabio Berger
343191e936 Remove nested .gitignore files since yarn publish gets confused by them and ignores their contents on the top-level scope 2018-03-27 16:24:44 +01:00
Fabio Berger
3e3b667366 Remove WETH hack now that updated WETH address is in TokenRegistry 2018-03-27 11:38:22 +01:00
Fabio Berger
3b45d4727b Revert TokenRegistry address on Kovan 2018-03-26 17:33:39 +01:00
Fabio Berger
b4f3450d4a Merge pull request #479 from 0xProject/bug/website/portal-fill-mixed-decimals
Portal fill with rounding error/mixed decimals
2018-03-26 13:21:26 +01:00
Fabio Berger
0a8b7cb494 Improve rounding error message 2018-03-26 13:21:02 +01:00
Jacob Evans
125ace3519 Portal fill with mixed decimals
When the token pair has different decimal precison we can end up with a remainder when multiplying by an exchange rate (as one is in 18 decimals and the other is 6 for example)
2018-03-26 16:43:12 +11:00
Fabio Berger
109fc41474 Add error popover if TokenRegistry on network user is browsing on don't include the requisite default tokens for 0x Portal to function 2018-03-25 00:22:06 +00:00
Leonid Logvinov
f30353087f Merge branch 'development' into feature/deployer-improvements 2018-03-23 19:18:31 +01:00
Brandon Millman
d106079d9b Remove props that are covered by the defaults 2018-03-22 23:39:13 -07:00
Brandon Millman
dc3be992a3 Implement ETH/WETH conversion and allowance toggle styling 2018-03-22 23:13:49 -07:00
Fabio Berger
bed7d87b7f Get LogEntry type to show up correctly as a Web3 type 2018-03-22 21:05:09 +00:00
Fabio Berger
05daab5dea Fix typos 2018-03-22 20:13:25 +00:00
Fabio Berger
170e5589f9 Fix 0x.js docs to include types from generated contract wrappers 2018-03-22 20:03:42 +00:00
Fabio Berger
538914aa52 Fix S3 bucket name 2018-03-22 16:58:20 +00:00
Fabio Berger
81deb68c8e Use past tense in FAQ 2018-03-22 16:37:23 +00:00
Fabio Berger
36986fe9c9 Replace Auctus with ERCDEX in projects section 2018-03-22 16:22:52 +00:00
Fabio Berger
5791632933 Fix Ethfinex link, looks like they have their own domain now 2018-03-22 16:19:59 +00:00
Fabio Berger
289359bf0d Merge pull request #465 from 0xProject/addExtraDocs
Add Additional Package Doc Pages
2018-03-22 16:11:23 +00:00
Fabio Berger
81f6487865 Use _.filter instead of _.reduce 2018-03-22 16:10:01 +00:00
Fabio Berger
21b797c3f9 Improve list of improvements 2018-03-22 16:00:55 +00:00
Fabio Berger
de8450d5c9 Make handleRequest public and add comment for it 2018-03-22 15:54:13 +00:00
Fabio Berger
bcb9ee4cc2 Make setEngine public 2018-03-22 15:53:54 +00:00
Fabio Berger
7c87447241 Fix lazy load so each doc page is a separate bundle 2018-03-22 15:53:39 +00:00
Fabio Berger
b39d87f357 Remove space 2018-03-22 15:53:20 +00:00
Fabio Berger
552b14b1fa npm -> yarn 2018-03-22 15:53:13 +00:00
Fabio Berger
5779ffd01b Add assertion to notify any developer trying to render a package with files containing multiple classes 2018-03-22 15:52:40 +00:00
Fabio Berger
a7c24a17f4 Fix lint rules directory 2018-03-22 14:33:40 +00:00
Fabio Berger
8743c40911 Use isEmpty 2018-03-22 13:32:14 +00:00
Leonid Logvinov
7ef6bd4b14 Set timeout for compiler tests 2018-03-22 14:26:24 +01:00
Fabio Berger
6af0f08dfc Remove no longer existent command 2018-03-22 12:54:03 +00:00
Fabio Berger
54ae94dde0 Fix benefits list 2018-03-22 12:53:51 +00:00
Fabio Berger
c570f3865f Use yarn instead of npm 2018-03-22 12:53:41 +00:00
Fabio Berger
ed9d1da297 Add default docs icon 2018-03-22 12:46:52 +00:00
Fabio Berger
beb483ea85 Merge branch 'development' into addExtraDocs
* development:
  Change blockchain prop to not optional
  Other style changes
  Updated padding and colors
  Refactor TokenState type
  Fix a bug causing fillOrdersUpTo validation to fail because of some extra orders being passed
  Implement initial wallet interface

# Conflicts:
#	packages/react-shared/CHANGELOG.md
#	packages/website/ts/types.ts
2018-03-22 12:00:41 +00:00
Fabio Berger
46b7fecafe Create helper function for converting dashes names for display 2018-03-22 11:56:12 +00:00
Leonid Logvinov
e476682922 Remove redundant types 2018-03-22 12:37:44 +01:00
Brandon Millman
8478dc8d6d Merge pull request #468 from 0xProject/feature/website/wallet-interface
Implement initial wallet interface
2018-03-21 15:48:13 -07:00
Brandon Millman
9f8e41cbfa Change blockchain prop to not optional 2018-03-21 15:45:11 -07:00
Brandon Millman
3916383dd0 Other style changes 2018-03-21 14:21:19 -07:00
Brandon Millman
a60c8f7d8c Updated padding and colors 2018-03-21 14:17:08 -07:00
Brandon Millman
4e5cd472c2 Refactor TokenState type 2018-03-21 13:02:44 -07:00
Fabio Berger
e1341bc6d9 Move docs to page and add link to docs to README 2018-03-21 18:55:59 +00:00
Fabio Berger
d437a66019 Add comments to JSON-schemas public methods 2018-03-21 18:51:17 +00:00
Fabio Berger
542b46a22f Move usage out of README and replace with link to Docs 2018-03-21 18:40:59 +00:00
Fabio Berger
6fef533fff Improve comments 2018-03-21 18:38:45 +00:00
Fabio Berger
ec219fc395 Add comments to sol-cov 2018-03-21 18:24:54 +00:00
Fabio Berger
a555a8a374 Improve subproviders comment 2018-03-21 18:24:45 +00:00
Fabio Berger
78e9c48803 Move docs from README into docs page and add a link to it. 2018-03-21 18:04:48 +00:00
Fabio Berger
18d3e5458a Fix sectionName and menuItemName to display with spaces rather then dashes 2018-03-21 18:04:27 +00:00
Fabio Berger
ac25764d12 Add changelog entry for making handleRequest private 2018-03-21 17:38:23 +00:00
Fabio Berger
c55e7fa91a Improve all the comments for the subproviders public methods 2018-03-21 17:38:02 +00:00
Leonid Logvinov
e31ba2e12e Add missing param comments 2018-03-21 18:06:50 +01:00
Leonid Logvinov
73f8ae9a47 Fix a comment 2018-03-21 18:01:26 +01:00
Leonid Logvinov
32b85625c1 Add a comment 2018-03-21 17:23:07 +01:00
Leonid Logvinov
629edd3108 Move npm-run-all to devDependencies 2018-03-21 17:20:30 +01:00
Leonid Logvinov
ee77b81551 Revert optimizer config 2018-03-21 17:19:46 +01:00
Leonid Logvinov
2c7fdac5cd Remove .only 2018-03-21 16:39:37 +01:00
Leonid Logvinov
d118116548 Revert version range changes 2018-03-21 16:34:57 +01:00
Leonid Logvinov
8d01956c3e Merge pull request #470 from 0xProject/fix/fillOrdersUpToValidation
Fix a bug causing fillOrdersUpTo validation to fail because of some e…
2018-03-21 15:30:26 +01:00
Leonid Logvinov
1dda8c1468 Fix a bug causing fillOrdersUpTo validation to fail because of some extra orders being passed 2018-03-21 15:30:04 +01:00
Leonid Logvinov
111f7e917e Add function docs 2018-03-21 15:24:41 +01:00
Leonid Logvinov
477daf4168 Add function docs 2018-03-21 15:12:18 +01:00
Leonid Logvinov
8b52793f2f Add tests for compiler utils 2018-03-21 15:12:18 +01:00
Leonid Logvinov
18b9fe5256 Enable strictNullChecks 2018-03-21 15:11:41 +01:00
Leonid Logvinov
439e864085 Change the type of optimizerEnabled to boolean and convert it to number only before passing to a compiler 2018-03-21 15:11:41 +01:00
Leonid Logvinov
f45191d0e8 Support proper semver version ranges 2018-03-21 15:11:41 +01:00
Leonid Logvinov
32feadee42 Change version ranges to only support patch version increments 2018-03-21 15:07:51 +01:00
Leonid Logvinov
c4b4bb9e8e Compile contracts sequentially 2018-03-21 15:07:51 +01:00
Leonid Logvinov
8fd705d2af Throw an error if contract file doesn't contain the contract with the same name 2018-03-21 15:07:51 +01:00
Leonid Logvinov
3c36135d6c Stop printing help on error 2018-03-21 15:07:51 +01:00
Leonid Logvinov
02ede26893 Rename onDeployCommand to onDeployCommandAsync and onCompileCommand to onCompileCommandAsync 2018-03-21 15:07:51 +01:00
Fabio Berger
af21ad1615 Add missing DocComments to Deployer package 2018-03-21 12:33:07 +00:00
Fabio Berger
07fa01528b Move usage out of README and add add link to docs 2018-03-21 12:32:53 +00:00
Fabio Berger
38f716bd77 Make docs link more discoverable in README, move docs out of README 2018-03-20 22:24:26 +00:00
Fabio Berger
6a410b03ff Improve comments 2018-03-20 22:17:39 +00:00
Fabio Berger
3cd7bce0a3 Add DocComments to Web3Wrapper 2018-03-20 21:41:59 +00:00
Fabio Berger
6693540f43 Add changelog entry 2018-03-20 21:41:36 +00:00
Fabio Berger
647bc5a63e Rename method for clarity 2018-03-20 21:41:21 +00:00
Fabio Berger
4f76bb2a12 Remove duplicate method 2018-03-20 21:39:41 +00:00
Fabio Berger
9991ddecc2 Fix var name typo 2018-03-20 21:39:08 +00:00
Brandon Millman
3cf2cb89bb Implement initial wallet interface 2018-03-20 13:42:50 -07:00
Fabio Berger
2875cfa8c7 Move doc related types closer to one another 2018-03-20 15:41:31 +00:00
Fabio Berger
87cbbdad72 Update yarn.lock 2018-03-20 15:39:39 +00:00
Fabio Berger
07de3a1d94 Pass actual iconUrl and add default icon image 2018-03-20 15:39:32 +00:00
Fabio Berger
27880a6059 Remove s3 mapping since s3 folder names are now identical to sub-package names 2018-03-20 15:35:48 +00:00
Fabio Berger
0367e4117a Remove duplicate switch case 2018-03-20 15:34:02 +00:00
Fabio Berger
ec582d6e46 Small doc fixes: remove duplicate types and add function array 2018-03-20 15:28:25 +00:00
Fabio Berger
4ca706d4e6 Remove duplicate ECSignature type def 2018-03-20 13:06:59 +00:00
Fabio Berger
72671c1014 Refactor titleToIcon mapping to idToIcon and move to docPage 2018-03-20 12:26:04 +00:00
Fabio Berger
a3c31f4f4a Fix changelog files and add PR number 2018-03-20 12:05:31 +00:00
Fabio Berger
db8be4a66e Rename stagedocs.ts file to stage_docs.ts in keeping with our file naming conventions. postpublish.ts is the only exception and this is because it is dictated by Lerna 2018-03-20 12:00:22 +00:00
Fabio Berger
2f7c19e80d Merge branch 'development' into addExtraDocs
* development: (29 commits)
  Set Lodash dep to an exact version since newer versions introduced breaking changes
  Update Kovan Ethertoken Address
  Update deployer version since manual re-publish
  Add new entry into CHANGELOG
  Fix bad merge
  Update yarn.lock
  Change title
  Add Blake and Zach to About page
  Re-size Jacob and Tom's images
  Manually publish 0x.js back to a working state
  Publish
  Publish
  Fix 0x.js assets
  Remove assets from connect and _bundles from packages that don't generate the folder
  Publish
  Fix packages that aren't working as expected
  Make new packages default to public on publish
  Add new public packages to top-level README
  Update top-level package.json
  Fix incorrect new versions
  ...

# Conflicts:
#	packages/0x.js/package.json
#	packages/connect/package.json
#	packages/json-schemas/package.json
#	packages/sol-cov/package.json
2018-03-20 11:52:22 +00:00
Fabio Berger
7d9c357409 Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
  Update Kovan Ethertoken Address
2018-03-20 11:40:48 +00:00
Fabio Berger
abf41b073c Set Lodash dep to an exact version since newer versions introduced breaking changes 2018-03-20 11:40:29 +00:00
Jacob Evans
c9b07107f3 Merge pull request #464 from 0xProject/bug/0x.js/kovan-ethertoken-address
Update Kovan Ethertoken Address
2018-03-20 22:24:22 +11:00
Jacob Evans
773be348a3 Update Kovan Ethertoken Address 2018-03-20 22:23:30 +11:00
Fabio Berger
b7bb8d9b2a Update deployer version since manual re-publish 2018-03-20 11:00:52 +00:00
Brandon Millman
c7c12371ef Merge pull request #451 from 0xProject/feature/sra-report/collection-tests
Add scaffolding for sra-report collection unit tests
2018-03-19 10:28:02 -07:00
Brandon Millman
fb40b10501 Add new entry into CHANGELOG 2018-03-19 10:10:17 -07:00
Brandon Millman
d4dce41d3a Fix bad merge 2018-03-19 10:06:54 -07:00
Brandon Millman
293b55e51f Update yarn.lock 2018-03-19 10:03:21 -07:00
Brandon Millman
11bac66046 Merge branch 'development' into feature/sra-report/collection-tests
* development: (26 commits)
  Change title
  Add Blake and Zach to About page
  Re-size Jacob and Tom's images
  Manually publish 0x.js back to a working state
  Publish
  Publish
  Fix 0x.js assets
  Remove assets from connect and _bundles from packages that don't generate the folder
  Publish
  Fix packages that aren't working as expected
  Make new packages default to public on publish
  Add new public packages to top-level README
  Update top-level package.json
  Fix incorrect new versions
  Fix path to assets
  Publish
  Updated CHANGELOGS
  Fix quotation marks
  Add a complex test for ast visitor
  Move opcodes to constants
  ...
2018-03-19 09:56:46 -07:00
Fabio Berger
2a438419ab Merge pull request #461 from 0xProject/updateTeam
Add Zach & Blake to team
2018-03-19 15:28:38 +01:00
Fabio Berger
0f0aca7de5 Change title 2018-03-19 14:51:58 +01:00
Fabio Berger
f699b9a73f Add Blake and Zach to About page 2018-03-19 14:50:50 +01:00
Fabio Berger
214096de9e Re-size Jacob and Tom's images 2018-03-19 14:50:36 +01:00
Fabio Berger
a0ccb609cd Manually publish 0x.js back to a working state 2018-03-19 00:55:10 +01:00
Fabio Berger
4e05554b3e Publish
- 0x.js@0.33.5
 - contracts@2.1.19
 - @0xproject/sra-report@0.0.5
 - @0xproject/testnet-faucets@1.0.20
 - @0xproject/website@0.0.22
2018-03-19 00:48:26 +01:00
Fabio Berger
04c08b9fc8 Publish
- 0x.js@0.33.4
 - @0xproject/assert@0.2.3
 - @0xproject/connect@0.6.6
 - contracts@2.1.18
 - @0xproject/deployer@0.3.2
 - @0xproject/dev-utils@0.3.2
 - @0xproject/json-schemas@0.7.17
 - @0xproject/react-docs-example@0.0.4
 - @0xproject/react-docs@0.0.4
 - @0xproject/react-shared@0.0.4
 - @0xproject/sol-cov@0.0.4
 - @0xproject/sra-report@0.0.4
 - @0xproject/subproviders@0.8.2
 - @0xproject/testnet-faucets@1.0.19
 - @0xproject/website@0.0.21
2018-03-19 00:39:25 +01:00
Fabio Berger
86c1c8082d Fix 0x.js assets 2018-03-19 00:36:44 +01:00
Fabio Berger
c5afc5feb5 Remove assets from connect and _bundles from packages that don't generate the folder 2018-03-19 00:30:33 +01:00
Fabio Berger
8392ee4625 Publish
- 0x.js@0.33.3
 - @0xproject/abi-gen@0.2.7
 - @0xproject/assert@0.2.2
 - @0xproject/base-contract@0.0.5
 - chai-as-promised-typescript-typings@0.0.12
 - chai-typescript-typings@0.0.6
 - @0xproject/connect@0.6.5
 - contracts@2.1.17
 - @0xproject/deployer@0.3.1
 - @0xproject/dev-utils@0.3.1
 - ethers-typescript-typings@0.0.4
 - @0xproject/json-schemas@0.7.16
 - @0xproject/monorepo-scripts@0.1.14
 - @0xproject/react-docs-example@0.0.3
 - @0xproject/react-docs@0.0.3
 - @0xproject/react-shared@0.0.3
 - @0xproject/sol-cov@0.0.3
 - @0xproject/sra-report@0.0.3
 - @0xproject/subproviders@0.8.1
 - @0xproject/testnet-faucets@1.0.18
 - @0xproject/tslint-config@0.4.12
 - @0xproject/types@0.4.1
 - @0xproject/utils@0.4.3
 - web3-typescript-typings@0.10.2
 - @0xproject/web3-wrapper@0.3.1
 - @0xproject/website@0.0.20
2018-03-19 00:24:28 +01:00
Fabio Berger
ac881d149c Fix packages that aren't working as expected 2018-03-19 00:13:19 +01:00
Fabio Berger
cc4e390c91 Make new packages default to public on publish 2018-03-18 20:13:43 +01:00
Fabio Berger
26c726da45 Add new public packages to top-level README 2018-03-18 20:13:29 +01:00
Fabio Berger
358f3d9b42 Update top-level package.json 2018-03-18 20:13:16 +01:00
Fabio Berger
3337625fa0 Fix incorrect new versions 2018-03-18 19:53:37 +01:00
Fabio Berger
ae2daa5a6f Fix path to assets 2018-03-18 19:53:26 +01:00
Fabio Berger
79f521b555 Publish
- 0x.js@0.33.2
 - @0xproject/abi-gen@0.2.6
 - @0xproject/assert@0.2.1
 - @0xproject/base-contract@0.0.4
 - chai-as-promised-typescript-typings@0.0.11
 - chai-typescript-typings@0.0.5
 - @0xproject/connect@0.6.4
 - contracts@2.1.16
 - @0xproject/deployer@0.3.0
 - @0xproject/dev-utils@0.3.0
 - ethers-typescript-typings@0.0.3
 - @0xproject/json-schemas@0.7.15
 - @0xproject/monorepo-scripts@0.1.13
 - @0xproject/react-docs-example@0.0.2
 - @0xproject/react-docs@0.0.2
 - @0xproject/react-shared@0.0.2
 - @0xproject/sol-cov@0.0.2
 - @0xproject/sra-report@0.0.2
 - @0xproject/subproviders@0.8.0
 - @0xproject/testnet-faucets@1.0.17
 - @0xproject/tslint-config@0.4.11
 - @0xproject/types@0.4.0
 - @0xproject/utils@0.4.2
 - web3-typescript-typings@0.10.1
 - @0xproject/web3-wrapper@0.3.0
 - @0xproject/website@0.0.19
2018-03-18 19:49:46 +01:00
Fabio Berger
fffcb98ac4 Updated CHANGELOGS 2018-03-18 19:22:55 +01:00
Fabio Berger
5468358f21 Add Subprovider docs to website 2018-03-18 19:04:16 +01:00
Fabio Berger
87044313c2 Capitalize rather then upper-case section headers 2018-03-18 18:45:06 +01:00
Fabio Berger
794b155827 Add support for displaying exported functions 2018-03-18 18:44:52 +01:00
Fabio Berger
4941ffd354 Add functions to submenu in sidebar 2018-03-18 18:43:38 +01:00
Fabio Berger
aa8a3ee055 Re-order developers dropdown 2018-03-18 16:12:24 +01:00
Fabio Berger
c1d17c83f8 Add sol-cov docs to website 2018-03-18 16:10:02 +01:00
Fabio Berger
db030016fa Refactor CoverageSubprovider to use subproviders types 2018-03-18 16:09:37 +01:00
Fabio Berger
ae04f55882 Export ErrorCallback type from Subproviders package 2018-03-18 16:09:08 +01:00
Fabio Berger
b40fab35f6 Add doc setup to sol-cov 2018-03-18 15:08:52 +01:00
Fabio Berger
644deee8b5 Standardize all doc commands and add docs:stage shortcut 2018-03-18 15:08:37 +01:00
Fabio Berger
c7302c46e5 Add JSON Schemas docs to website 2018-03-18 14:54:12 +01:00
Fabio Berger
4948551703 merge development 2018-03-18 14:01:18 +01:00
Brandon Millman
d4c1b3b0bd Merge pull request #456 from 0xProject/feature/connect/consolidate-types
Add SignedOrder, Order, and ECSignature types to the types package
2018-03-16 11:23:28 -07:00
Brandon Millman
bbdb072634 Fix quotation marks 2018-03-16 11:22:43 -07:00
Fabio Berger
d7bf003d51 Refactor all docJSON's to reside within the same S3 bucket under different folders 2018-03-16 16:56:53 +01:00
Fabio Berger
5a827eb3d4 Fix deployer external type link to point to specific commit 2018-03-16 14:05:05 +01:00
Fabio Berger
b37076136b Add missing type 2018-03-16 14:04:38 +01:00
Fabio Berger
3574ab253f Add missing type to subproviders exports 2018-03-16 14:04:27 +01:00
Fabio Berger
312a30578b Improve deployer docs 2018-03-16 14:04:08 +01:00
Fabio Berger
8243e73413 Use named types and introduce JSONRPCRequestPayloadWithMethod type 2018-03-16 14:03:50 +01:00
Fabio Berger
5175fe8107 Handle reflection type in type rendering 2018-03-16 14:02:55 +01:00
Leonid Logvinov
2acb767640 Merge pull request #457 from 0xProject/feature/sol-cov-tests
Add tests for sol-cov
2018-03-16 13:32:21 +01:00
Leonid Logvinov
a9b1dcb32a Add a complex test for ast visitor 2018-03-16 10:49:20 +01:00
Leonid Logvinov
8f8577b7c6 Move opcodes to constants 2018-03-16 10:27:12 +01:00
Fabio Berger
0225d34b74 Fix issue with bundling subproviders for the browser by ignoring the ganache-core dependency 2018-03-15 19:51:07 +01:00
Fabio Berger
8d1e27a1a5 Merge branch 'development' into addExtraDocs
* development:
  Add changelog entry about pragma addition
  Add pragma above command-line script
  Keep console.log in monorepo-scripts
  Enable coverage for all other packages with tests
  Fix parallel coverage results reporting
  Fix linter issuesx
  Update CHANGELOGs
  Consolidate all console.log into the @0xproject/utils package

# Conflicts:
#	packages/deployer/package.json
2018-03-15 19:44:10 +01:00
Brandon Millman
e4ea6e1ec3 WIP 2018-03-15 11:33:08 -07:00
Fabio Berger
8137d41ce5 Add changelog entry about pragma addition 2018-03-15 19:25:06 +01:00
Fabio Berger
4b7f0bd374 Add pragma above command-line script 2018-03-15 19:23:57 +01:00
Fabio Berger
f9ad97b978 Add Deployer docs to website 2018-03-15 19:23:21 +01:00
Fabio Berger
b145a17d11 Add pragma above command-line script 2018-03-15 19:22:57 +01:00
Brandon Millman
3430e2bdac Fix bad merge 2018-03-15 10:14:51 -07:00
Brandon Millman
cdcf925378 Fix yarn.lock 2018-03-15 09:58:20 -07:00
Brandon Millman
76029cbf09 Merge branch 'development' into feature/sra-report/collection-tests
* development: (97 commits)
  Keep console.log in monorepo-scripts
  Enable coverage for all other packages with tests
  Fix parallel coverage results reporting
  Fix linter issuesx
  Remove outdated comment
  Add script copying to build command
  Add postpublish script to sol-cov
  Move configuration into package.json configs section
  Transform input data before encoding for callAsync and getABIEncodedTransactionData
  Update CHANGELOGs
  Consolidate all console.log into the @0xproject/utils package
  Update coverage badge to show development coverage
  Configure post build hook
  Notify coveralls after all tasks have finished
  Address feedback
  Revert "Report all coverage reports together"
  Separate published packages and typescript typings on README
  Consolidate docs generation and uploading logic
  Use async/await instead of promise syntax
  Move changelog entry
  ...
2018-03-15 09:57:27 -07:00
Brandon Millman
b9c1653c1c Fix quotation marks 2018-03-15 09:48:45 -07:00
Leonid Logvinov
f6c01520ae Add tests for sol-cov 2018-03-15 16:19:01 +01:00
Brandon Millman
0fb4de85c4 Updated CHANGELOGs 2018-03-14 16:36:21 -07:00
Brandon Millman
ffe7363776 Add SignedOrder, Order, and ECSignature types to the types package 2018-03-14 16:33:10 -07:00
Brandon Millman
4a27a7dc58 Merge pull request #452 from 0xProject/feature/utils/console-log
Consolidate all console.log utils into @0xproject/utils
2018-03-14 15:30:59 -07:00
Brandon Millman
3b3d5b12bc Keep console.log in monorepo-scripts 2018-03-14 14:58:16 -07:00
Brandon Millman
380e51ca50 Merge branch 'development' into feature/utils/console-log
* development: (25 commits)
  Enable coverage for all other packages with tests
  Fix parallel coverage results reporting
  Fix linter issuesx
  Remove outdated comment
  Add script copying to build command
  Add postpublish script to sol-cov
  Move configuration into package.json configs section
  Transform input data before encoding for callAsync and getABIEncodedTransactionData
  Consolidate docs generation and uploading logic
  Use async/await instead of promise syntax
  Move changelog entry
  remove unneeded include
  remove unused dep
  Fix lint issues
  Re-add linter to monorepo-scripts but with tslint-config dep at earlier version to avoid cyclical dependency
  small fixes
  move scripts to monorepro-scripts
  Fix gitignore
  Move abi-gen scripts to src
  Add missing dep
  ...
2018-03-14 14:36:04 -07:00
Leonid Logvinov
aea7207b9f Merge pull request #455 from 0xProject/fix/coveralls
Enable coverage reporting for all packages that have tests
2018-03-14 17:36:23 +01:00
Fabio Berger
9593739938 Ignore ganache-core from subproviders in a browser setting & remove previous hack 2018-03-14 17:29:57 +01:00
Leonid Logvinov
40ebb533b3 Enable coverage for all other packages with tests 2018-03-14 17:15:38 +01:00
Leonid Logvinov
7fe26ee719 Fix parallel coverage results reporting 2018-03-14 17:14:25 +01:00
Fabio Berger
28d63ad8e1 Add Web3Wrapper docs to website 2018-03-14 16:37:24 +01:00
Fabio Berger
56eeea1e63 Add fix to webpack for issue: https://github.com/trufflesuite/ganache-core/issues/84 and prettier the configs 2018-03-14 16:37:09 +01:00
Fabio Berger
642a2cf165 Added doc json generation and uploading to Web3Wrapper package 2018-03-14 16:36:00 +01:00
Fabio Berger
e16feb27f4 Merge pull request #450 from 0xProject/convertScriptsToTs
Convert Scripts to TS & Other Misc. Fixes
2018-03-14 15:18:16 +01:00
Fabio Berger
83ae7ba08d Fix linter issuesx 2018-03-14 14:50:09 +01:00
Fabio Berger
a86f8a81a2 Fix linter issuesx 2018-03-14 14:49:09 +01:00
Fabio Berger
28abcef1ca Remove outdated comment 2018-03-14 14:32:45 +01:00
Fabio Berger
32d15d79f1 Add script copying to build command 2018-03-14 14:30:15 +01:00
Fabio Berger
538ac604a8 Add postpublish script to sol-cov 2018-03-14 14:27:36 +01:00
Fabio Berger
009b70f5b2 Merge branch 'development' into convertScriptsToTs
* development: (71 commits)
  Transform input data before encoding for callAsync and getABIEncodedTransactionData
  Update coverage badge to show development coverage
  Configure post build hook
  Notify coveralls after all tasks have finished
  Address feedback
  Revert "Report all coverage reports together"
  Separate published packages and typescript typings on README
  Report all coverage reports together
  Add other statement types
  Properly and consistently parse ENV vars
  Add forgotten file
  Start using solidity-parser-antlr
  Fix the default always overriding to address
  Submit a TD PR
  Add an explanatory comment for making ranges unique
  Fix a typo in handling env variables
  Introduce TESTRPC_FIRST_ADDRESS
  Make BlockchainLifecycle accept only web3Wrapper
  Fix comments
  Fix deployer CHANGELOG
  ...

# Conflicts:
#	README.md
#	packages/deployer/package.json
#	packages/subproviders/src/globals.d.ts
#	yarn.lock
2018-03-14 14:16:08 +01:00
Fabio Berger
f7c1e10b5a Move configuration into package.json configs section 2018-03-14 14:07:24 +01:00
Leonid Logvinov
3f3e8be004 Merge pull request #453 from 0xProject/fix/contract-templates/transformData
Transform input data before encoding
2018-03-14 05:50:02 +01:00
Amir Bandeali
cb612360ca Transform input data before encoding for callAsync and getABIEncodedTransactionData 2018-03-13 20:41:07 -07:00
Brandon Millman
6a8c2cb717 Update CHANGELOGs 2018-03-13 18:16:31 -07:00
Brandon Millman
c8a8b851d8 Consolidate all console.log into the @0xproject/utils package 2018-03-13 18:13:48 -07:00
Brandon Millman
ba9a734ba7 Update README and CHANGELOG 2018-03-13 16:17:02 -07:00
Brandon Millman
b08374f0ba Add scaffolding for sra-report collection unit tests 2018-03-13 15:54:33 -07:00
Leonid Logvinov
c2f8858aab Update coverage badge to show development coverage 2018-03-13 20:47:21 +01:00
Leonid Logvinov
1f81fa1c6c Configure post build hook 2018-03-13 20:38:33 +01:00
Leonid Logvinov
db44a5bca7 Merge pull request #426 from 0xProject/feature/solcov
Sol-cover
2018-03-13 19:49:30 +01:00
Leonid Logvinov
53e1815c1d Notify coveralls after all tasks have finished 2018-03-13 19:30:54 +01:00
Leonid Logvinov
20985d515f Address feedback 2018-03-13 19:13:37 +01:00
Leonid Logvinov
0334004b11 Revert "Report all coverage reports together"
This reverts commit 11ed5d62ba.
2018-03-13 19:09:16 +01:00
Brandon Millman
95e2b37d62 Separate published packages and typescript typings on README 2018-03-13 09:57:28 -07:00
Fabio Berger
dba1b8a7e9 Consolidate docs generation and uploading logic 2018-03-13 17:55:16 +01:00
Fabio Berger
ee29ed26ff Use async/await instead of promise syntax 2018-03-13 17:36:12 +01:00
Fabio Berger
a08ae722c1 Move changelog entry 2018-03-13 17:04:38 +01:00
Fabio Berger
b3c1c0ccad remove unneeded include 2018-03-13 17:04:31 +01:00
Fabio Berger
e1fa65f5ef remove unused dep 2018-03-13 17:04:14 +01:00
Fabio Berger
a2e848a7fa Fix lint issues 2018-03-13 16:55:50 +01:00
Fabio Berger
67fbffc964 Re-add linter to monorepo-scripts but with tslint-config dep at earlier version to avoid cyclical dependency 2018-03-13 16:55:35 +01:00
Fabio Berger
c3b4359e87 small fixes 2018-03-13 16:36:05 +01:00
Leonid Logvinov
11ed5d62ba Report all coverage reports together 2018-03-13 16:34:37 +01:00
Leonid Logvinov
5827170815 Add other statement types 2018-03-13 15:49:46 +01:00
Fabio Berger
ca25b816fa move scripts to monorepro-scripts 2018-03-13 15:29:12 +01:00
Leonid Logvinov
a9db0e8ebe Properly and consistently parse ENV vars 2018-03-13 15:19:31 +01:00
Leonid Logvinov
a0791455e1 Add forgotten file 2018-03-13 14:41:46 +01:00
Leonid Logvinov
efb0ee4c02 Start using solidity-parser-antlr 2018-03-13 11:53:45 +01:00
Fabio Berger
df1968157c Fix gitignore 2018-03-13 10:59:53 +01:00
Fabio Berger
355aac2a1a Move abi-gen scripts to src 2018-03-13 10:42:33 +01:00
Fabio Berger
b93b66edfb Add missing dep 2018-03-13 10:42:14 +01:00
Fabio Berger
92a4e77288 Make git-ignore generic for all package scripts 2018-03-13 10:42:06 +01:00
Fabio Berger
7ac646ff94 Move monorepo_scripts into src dir removing the need for a separate globals.d.ts and tsconfig files 2018-03-13 10:25:10 +01:00
Fabio Berger
ef6aa9f41b Convert 0x.js scripts to TS, move the prepublishUtils script to dev-utils and also convert it to TS. 2018-03-12 22:13:24 +01:00
Fabio Berger
df9e7385ad Merge pull request #449 from 0xProject/bug/website/portal-history-etherscan-tx
Fix the Portal Etherscan Link always overriding to address
2018-03-12 16:53:10 +01:00
Jacob Evans
e065ac45dc Fix the default always overriding to address 2018-03-12 11:34:55 -04:00
Fabio Berger
745af5309d Add missing prettier devDep 2018-03-12 16:04:01 +01:00
Fabio Berger
952f1cf8d0 Use isMetaMask flag rather then constructor name for Metamask provider detection 2018-03-12 15:22:04 +01:00
Fabio Berger
86a55fe55a Add OrderRelevantState to public types in 0x.js docs configs 2018-03-12 13:58:15 +01:00
Leonid Logvinov
88c6694ffc Submit a TD PR 2018-03-12 13:24:07 +01:00
Leonid Logvinov
20826e0f08 Add an explanatory comment for making ranges unique 2018-03-12 12:56:22 +01:00
Leonid Logvinov
e474096119 Fix a typo in handling env variables 2018-03-12 12:53:51 +01:00
Leonid Logvinov
075f286130 Introduce TESTRPC_FIRST_ADDRESS 2018-03-12 12:53:07 +01:00
Leonid Logvinov
32e3cab116 Make BlockchainLifecycle accept only web3Wrapper 2018-03-12 12:51:37 +01:00
Leonid Logvinov
49ff4299c6 Fix comments 2018-03-12 12:42:14 +01:00
Leonid Logvinov
4d18a4802d Fix deployer CHANGELOG 2018-03-12 12:40:00 +01:00
Fabio Berger
d613791104 Merge branch 'feature/solcov' of github.com:0xProject/0x-monorepo into feature/solcov
* 'feature/solcov' of github.com:0xProject/0x-monorepo:
  Add a HACK to detect coverage of the modifiers with no parameters
2018-03-12 12:32:32 +01:00
Fabio Berger
44f7f79bd9 Improve the sol-cov readme 2018-03-12 12:32:07 +01:00
Leonid Logvinov
1cdfbbadaa Add a HACK to detect coverage of the modifiers with no parameters 2018-03-12 12:31:33 +01:00
Fabio Berger
76a31b6fd6 Merge pull request #447 from 0xProject/refactorAnalytics
Refactor Website Analytics
2018-03-12 11:28:34 +01:00
Leonid Logvinov
0ad3d06ef9 Merge pull request #448 from 0xProject/fix/abi-gen-readme
Update README for abi-gen
2018-03-12 11:28:06 +01:00
Leonid Logvinov
fb0fd8ddc4 Update README 2018-03-12 11:24:37 +01:00
Leonid Logvinov
2a9913b8fb Treap transactions to address 0x0 as contract creation 2018-03-12 06:07:01 +01:00
Leonid Logvinov
9b8d2ed469 Add sol-cov README 2018-03-12 04:03:51 +01:00
Leonid Logvinov
17148df06d Add an example deployment script 2018-03-12 03:47:46 +01:00
Leonid Logvinov
d93089fcc0 Fix subproviders CHANGELOG 2018-03-12 03:37:31 +01:00
Leonid Logvinov
870995933a Remove redundant Date.now() 2018-03-12 03:37:30 +01:00
Leonid Logvinov
d6c2e47bbd Make env variables parsing more strict and add docs 2018-03-12 03:37:30 +01:00
Leonid Logvinov
e2b2bf1e0d Fix a typo 2018-03-12 03:37:30 +01:00
Leonid Logvinov
c4a18ee64b Make Deployer configurable by jsonrpcUrl instead of jsonrpcPort 2018-03-12 03:37:30 +01:00
Leonid Logvinov
7143996d26 Use locks instead of semaphores in ledger subprovider 2018-03-12 03:37:30 +01:00
Leonid Logvinov
22f78a2c52 Don't await lock releases 2018-03-12 03:37:30 +01:00
Leonid Logvinov
bd7517cfd4 Add support for async calls under coverage 2018-03-12 03:37:30 +01:00
Leonid Logvinov
9bffce9dc5 Fix coverage:report:html 2018-03-12 03:37:30 +01:00
Leonid Logvinov
10f6a17857 Add builtin modifier 'constant' 2018-03-12 03:37:30 +01:00
Leonid Logvinov
2197c2481a Increase timeout 2018-03-12 03:37:30 +01:00
Leonid Logvinov
8d90e640b0 Keep coverage directory 2018-03-12 03:37:30 +01:00
Leonid Logvinov
368870a2fc Fix sources list generation in a compiler 2018-03-12 03:37:30 +01:00
Leonid Logvinov
945a19bb61 Fix a typo in tests 2018-03-12 03:37:30 +01:00
Leonid Logvinov
b0abc384bc Disable completed docs rule 2018-03-12 03:37:30 +01:00
Leonid Logvinov
8f45e9a518 Run coverage on CI 2018-03-12 03:37:29 +01:00
Leonid Logvinov
b06f1d1982 Use custom fork of ganache-core 2018-03-12 03:37:29 +01:00
Leonid Logvinov
4365350430 Don't do parallel calls 2018-03-12 03:37:29 +01:00
Leonid Logvinov
3b158cb726 Address feedback 2018-03-12 03:37:29 +01:00
Leonid Logvinov
2298a34c37 Make _getSingleFileCoverageForTrace a private static method 2018-03-12 03:37:29 +01:00
Leonid Logvinov
633039c528 Use better variable name 2018-03-12 03:37:29 +01:00
Leonid Logvinov
ee31d5e24d Introduce redundant vars 2018-03-12 03:37:29 +01:00
Leonid Logvinov
f590aa11f7 Throw an error if artifacts not found 2018-03-12 03:37:29 +01:00
Leonid Logvinov
6b7f48644c Fix a typo 2018-03-12 03:37:29 +01:00
Leonid Logvinov
21aac75533 Use string enum for branch types 2018-03-12 03:37:29 +01:00
Leonid Logvinov
95b02a3197 Fix a typo 2018-03-12 03:37:29 +01:00
Leonid Logvinov
be7c444959 Remove initial implementation entry 2018-03-12 03:37:29 +01:00
Leonid Logvinov
f02d3f689d Document env variables 2018-03-12 03:37:29 +01:00
Leonid Logvinov
981752059c Add double negation before using shouldUseInProcessGanache 2018-03-12 03:37:29 +01:00
Leonid Logvinov
6c87ebac01 Rename useInProcessGanache to shouldUseInProcessGanache 2018-03-12 03:37:28 +01:00
Leonid Logvinov
a9479b3c01 Make coverage a module instead of a function 2018-03-12 03:37:28 +01:00
Leonid Logvinov
c5afca53a4 Rename COVERAGE to SOLIDITY_COVERAGS 2018-03-12 03:37:28 +01:00
Leonid Logvinov
b4cb88ab26 Add better error handling in deployer constructor 2018-03-12 03:37:28 +01:00
Leonid Logvinov
ad4f607643 Move compiler URL to constants 2018-03-12 03:37:28 +01:00
Leonid Logvinov
c7d340e822 Handle an error while loading the compiler 2018-03-12 03:37:28 +01:00
Leonid Logvinov
2c501d2380 Introduce isCompilerAvailableLocally 2018-03-12 03:37:28 +01:00
Leonid Logvinov
3787e4a83c Fix variable name 2018-03-12 03:37:28 +01:00
Leonid Logvinov
3b77e4ebf1 Rename getCoverageSubprovider to getCoverageSubproviderSingleton 2018-03-12 03:37:28 +01:00
Leonid Logvinov
6eebf717d5 Improve migrations comment 2018-03-12 03:37:28 +01:00
Leonid Logvinov
98f32d6f1f Stop making an assumption that contract code is immutable 2018-03-12 03:37:28 +01:00
Leonid Logvinov
62f45f7b41 Cache code parsing 2018-03-12 03:37:28 +01:00
Leonid Logvinov
a7d8f6599a use sourceList instead of sources 2018-03-12 03:37:28 +01:00
Leonid Logvinov
4da6db8418 Improve compiler output type 2018-03-12 03:37:28 +01:00
Leonid Logvinov
d991291f2a Use in-process Ganache in contracts 2018-03-12 03:37:27 +01:00
Leonid Logvinov
392fb42973 Revert mocha timeout increase 2018-03-12 03:37:27 +01:00
Leonid Logvinov
13299158d1 Add sol-cover implementation 2018-03-12 03:37:27 +01:00
Fabio Berger
a6571b09d2 Improve README 2018-03-11 13:24:34 +01:00
Fabio Berger
870ba445b8 Merge pull request #444 from 0xProject/dedupWeb3Wrapper
Remove custom web3Wrapper from website
2018-03-11 12:49:15 +01:00
Fabio Berger
caaa70f630 Fix getTokenBalanceAndAllowanceAsync to take ownerAddressIfExists so that we don't sometimes pass an empty string and sometimes undefined 2018-03-11 12:33:34 +01:00
Fabio Berger
56a8e0a09a Fix userAddress bugs 2018-03-11 12:04:46 +01:00
Fabio Berger
4c08667a07 Replace local PRECISION constants with global config.AMOUNT_DISPLAY_PRECISION 2018-03-10 22:43:13 +01:00
Fabio Berger
4ac6b6828c Get rid of getFirstAccountIfExistsAsync since no longer needed 2018-03-10 22:38:31 +01:00
Fabio Berger
c050186014 Use undefined rather then an empty string in blockchainWatcher 2018-03-10 22:36:54 +01:00
Fabio Berger
63f2606863 Refactor blockchain to store userAddress as address or undefined 2018-03-10 22:31:19 +01:00
Fabio Berger
5160e0ba18 Add pr number to changelog 2018-03-10 22:24:13 +01:00
Fabio Berger
0aad2ee005 Merge pull request #442 from 0xProject/addPackagePublishConfig
Add Package Publish Config
2018-03-10 17:07:38 +01:00
Fabio Berger
8a58ffda86 Fix tslint issues 2018-03-10 16:59:59 +01:00
Fabio Berger
cea8dcae3d Refactor Analytics so that calls to ReactGA are all in a single module, combining the provider type util function, moving GA id to configs and using utils.onPageLoadAsync 2018-03-10 16:53:42 +01:00
Brandon Millman
fc7e7d9331 Merge pull request #445 from 0xProject/feature/web3-logging
Fixed merge issue
2018-03-09 16:19:01 -08:00
Tom Schmidt
494bff4bc0 Fixed merge issue 2018-03-09 16:10:25 -08:00
Tom Schmidt
824ee8a3dc Merge pull request #441 from 0xProject/feature/website/web3-logging
Add web3 provider logging to GA
2018-03-09 15:31:21 -08:00
Tom Schmidt
47af38ecb8 Merge branch 'development' into feature/website/web3-logging 2018-03-09 15:22:59 -08:00
Tom Schmidt
654c790c3d Fixed Parity detection 2018-03-09 12:44:11 -08:00
Fabio Berger
7ebebb5bd9 Create blockchainWatcher class and refactor Portal such that Ether amounts are always passed around as baseUnits 2018-03-09 19:02:07 +01:00
Fabio Berger
8f921a61da Add getProvider method to web3Wrapper 2018-03-09 18:52:02 +01:00
Fabio Berger
cfd734d84f remove remaining declaration 2018-03-09 15:09:25 +01:00
Fabio Berger
342a697e42 Remove _exchangeAddress instance var from blockchain class 2018-03-09 15:08:22 +01:00
Fabio Berger
918f3cde94 Remove duplicitous methods from website's webWrapper 2018-03-09 15:08:02 +01:00
Fabio Berger
7b82a8669d Fix comment 2018-03-09 15:07:39 +01:00
Leonid Logvinov
7116f100ee Fix tests by passing DummyToken args 2018-03-09 14:16:38 +01:00
Fabio Berger
42fce45585 Merge pull request #443 from 0xProject/moveReactDocExample
Move `react-doc` example to separate sub-package
2018-03-09 14:10:56 +01:00
Fabio Berger
9da57daa7f Fix tslint error 2018-03-09 13:51:44 +01:00
Fabio Berger
e302d23317 Extend top-level tsconfigs 2018-03-09 13:44:56 +01:00
Fabio Berger
0edfa83951 Update README 2018-03-09 13:44:25 +01:00
Fabio Berger
a5ba049427 Update README 2018-03-09 13:41:31 +01:00
Fabio Berger
adba69a589 rm unnecessary npmignore 2018-03-09 11:06:03 +01:00
Fabio Berger
cc73f72d13 remove example top-level dir 2018-03-09 11:00:47 +01:00
Fabio Berger
e4f90996af Remove example from react-docs package to react-docs-example package 2018-03-09 10:49:57 +01:00
Fabio Berger
974c0d2b95 Fix isse of sourceMapLoader looking at node_modules 2018-03-09 10:18:15 +01:00
Fabio Berger
d1fc2a115e Export DocsState 2018-03-09 10:17:49 +01:00
Fabio Berger
a9373c7fb0 Remove unused dep from subproviders 2018-03-09 10:17:35 +01:00
Fabio Berger
8b604462ac Add missing dependencies 2018-03-09 10:17:23 +01:00
Fabio Berger
51e4a73439 Add missing package.json fields 2018-03-09 09:48:49 +01:00
Fabio Berger
d42cdcfd43 Improve README 2018-03-09 09:38:50 +01:00
Fabio Berger
c18acd0859 Remove screenshot and host it on S3 2018-03-09 09:37:03 +01:00
Fabio Berger
9699ee4eff Merge branch 'development' into addPackagePublishConfig
* development: (94 commits)
  Update CHANGELOG
  Add solc 0.4.20 and 0.4.21
  Prettier sra-report README
  Add new packages to top level README
  Updated @0xproject/utils in top level package.json
  Publish
  Updated CHANGELOGs
  Detail tests in the README
  Add support for ropsten and rinkeby
  Fix yarn.lock
  Update list of packages and organize them alphabetically
  Fix prettier issues
  Add support for going back to previous hashes via the browser back button to wiki
  Scroll to previous hashed elements when user clicks back button
  Add back strict null checks to react-shared package and fix issues
  remove ability to have implicit dependencies and add missing deps
  update license
  remove no-implicit-this
  Add example & screenshot to npmignore
  Remove `;` to be nice to windows users
  ...
2018-03-09 08:39:38 +01:00
Tom Schmidt
c78e504bfb Fixed lint 2018-03-08 17:08:43 -08:00
Amir Bandeali
0eeaac1f2b Update CHANGELOG 2018-03-08 17:01:02 -08:00
Amir Bandeali
b578517f91 Add solc 0.4.20 and 0.4.21 2018-03-08 16:43:32 -08:00
Tom Schmidt
c009e9979e Added web3 provider logging 2018-03-08 16:06:44 -08:00
Brandon Millman
22b6097e95 Prettier sra-report README 2018-03-08 10:44:49 -08:00
Brandon Millman
8e3446a389 Add new packages to top level README 2018-03-08 10:43:54 -08:00
Brandon Millman
1747d7a1bb Updated @0xproject/utils in top level package.json 2018-03-08 10:30:52 -08:00
Brandon Millman
8e5a876b37 Publish
- 0x.js@0.33.1
 - @0xproject/abi-gen@0.2.5
 - @0xproject/assert@0.2.0
 - @0xproject/base-contract@0.0.3
 - @0xproject/connect@0.6.3
 - contracts@2.1.15
 - @0xproject/deployer@0.2.1
 - @0xproject/dev-utils@0.2.1
 - @0xproject/json-schemas@0.7.14
 - @0xproject/react-docs@0.0.1
 - @0xproject/react-shared@0.0.1
 - @0xproject/sra-report@0.0.1
 - @0xproject/subproviders@0.7.0
 - @0xproject/testnet-faucets@1.0.16
 - @0xproject/types@0.3.1
 - @0xproject/utils@0.4.1
 - @0xproject/web3-wrapper@0.2.1
 - @0xproject/website@0.0.18
2018-03-08 10:20:46 -08:00
Brandon Millman
c71b710d7e Updated CHANGELOGs 2018-03-08 10:14:51 -08:00
Brandon Millman
7440b87596 Merge pull request #412 from 0xProject/feature/sra-reporter
Implement initial sra-report command line tool
2018-03-08 08:49:21 -08:00
Brandon Millman
583a17d627 Detail tests in the README 2018-03-08 08:45:05 -08:00
Brandon Millman
caf1a22084 Add support for ropsten and rinkeby 2018-03-08 08:44:45 -08:00
Brandon Millman
29abc5e921 Fix yarn.lock 2018-03-08 08:43:53 -08:00
Brandon Millman
098dae9a7e Merge branch 'development' into feature/sra-reporter
* development: (68 commits)
  Update list of packages and organize them alphabetically
  Fix prettier issues
  Add support for going back to previous hashes via the browser back button to wiki
  Scroll to previous hashed elements when user clicks back button
  Add back strict null checks to react-shared package and fix issues
  remove ability to have implicit dependencies and add missing deps
  update license
  remove no-implicit-this
  Add example & screenshot to npmignore
  Remove `;` to be nice to windows users
  Use unencoded @ symbol, browser will fix
  Fix external type links
  Add comment about commented out CSS exception
  Update prettier since the previous version had a bug when dealing with css files
  Fix css files with prettier
  Added base-contract package to README
  Prettify test jsons
  Update yarn.lock
  Improve README
  Feedback
  ...
2018-03-08 08:43:16 -08:00
Fabio Berger
aaa7affa46 Update list of packages and organize them alphabetically 2018-03-08 17:20:45 +01:00
Fabio Berger
40ca846cdc Merge pull request #438 from 0xProject/extractDocs
Extract Docs Template To Separate Package
2018-03-08 16:58:16 +01:00
Fabio Berger
da277f5b27 Add package.json publishConfig so that these packages are published as public. 2018-03-08 16:57:09 +01:00
Fabio Berger
2a24f6e2ea Fix prettier issues 2018-03-08 16:47:49 +01:00
Fabio Berger
98e8105ec5 Merge branch 'development' into extractDocs
* development:
  Added base-contract package to README
  Update yarn.lock
  Improve README
  Feedback
  README on derivation path
  Use our dev seed derivation path.
  README
  Add ledger-node package as optional dependency
  Force shouldGetChainCode to true in types
  Nuke tests for now
  Remove old ledger
  Update ledgerco packages
  Remove only
  Fix a typo
  Add PR name
  Improve an error message when an inorrect number of constructor params is passed
2018-03-08 16:40:46 +01:00
Fabio Berger
4a94a2b4e8 Add support for going back to previous hashes via the browser back button to wiki 2018-03-08 16:38:25 +01:00
Fabio Berger
2011349eb1 Scroll to previous hashed elements when user clicks back button 2018-03-08 16:35:33 +01:00
Fabio Berger
8057f4a678 Add back strict null checks to react-shared package and fix issues 2018-03-08 16:19:39 +01:00
Fabio Berger
f9ec8a0828 remove ability to have implicit dependencies and add missing deps 2018-03-08 16:00:15 +01:00
Fabio Berger
a0030c7bdb update license 2018-03-08 15:56:56 +01:00
Fabio Berger
0e4448fd3f remove no-implicit-this 2018-03-08 15:56:49 +01:00
Fabio Berger
21d2d59b50 Add example & screenshot to npmignore 2018-03-08 15:51:07 +01:00
Fabio Berger
295f177271 Remove ; to be nice to windows users 2018-03-08 14:44:58 +01:00
Fabio Berger
f3154313a8 Use unencoded @ symbol, browser will fix 2018-03-08 14:43:33 +01:00
Fabio Berger
e37f3b4fa3 Fix external type links 2018-03-08 14:43:09 +01:00
Fabio Berger
7e5c35d06e Add comment about commented out CSS exception 2018-03-08 14:39:28 +01:00
Fabio Berger
60756aa02b Update prettier since the previous version had a bug when dealing with css files 2018-03-08 14:37:25 +01:00
Fabio Berger
3779ab90de Fix css files with prettier 2018-03-08 14:37:05 +01:00
Fabio Berger
5b5037a844 Add publish config to package.json 2018-03-08 13:07:19 +01:00
Leonid Logvinov
03902b0b26 Merge pull request #419 from 0xProject/fix/deployer-args
Improve an error message when an incorrect number of constructor param…
2018-03-08 01:25:31 -08:00
Jacob Evans
883feabb8b Merge pull request #437 from 0xProject/feature/subproviders/update-ledgerco
Update ledgerco packages
2018-03-07 19:11:16 -05:00
Brandon Millman
5fb79e3253 Added base-contract package to README 2018-03-07 14:29:24 -08:00
Fabio Berger
c44811fbc2 Prettify test jsons 2018-03-07 22:01:37 +01:00
Fabio Berger
c3eaa694dd Update yarn.lock 2018-03-07 21:58:18 +01:00
Fabio Berger
bd8b8abfea Improve README 2018-03-07 21:44:11 +01:00
Jacob Evans
1a6c2e2bac Feedback 2018-03-07 15:20:06 -05:00
Jacob Evans
e2e6ae937d README on derivation path 2018-03-07 13:01:55 -05:00
Jacob Evans
5b9c5d2790 Use our dev seed derivation path.
Ensuring our signer address is 0x5409ed021d9299bf6814279a6a1411a7e866a631
2018-03-07 12:03:25 -05:00
Fabio Berger
896a57d4ed Flesh out the README 2018-03-07 16:48:28 +01:00
Fabio Berger
c3de8d3a67 Fix source line numbers in docJson since source needs to be identical to Github version tag for them to line up. 2018-03-07 16:15:10 +01:00
Fabio Berger
d1a92a0a2e fix source link 2018-03-07 16:05:20 +01:00
Fabio Berger
5f626495fd Add command to deploy react-docs example 2018-03-07 16:05:13 +01:00
Fabio Berger
238f3c89a7 Make sure we apply the appropriate syntax highlighting depending on the language of the docs 2018-03-07 15:32:37 +01:00
Fabio Berger
6e724eb8a5 Fix link color 2018-03-07 15:21:33 +01:00
Fabio Berger
9aec1feae3 Move remaining type configs to topLevel DocsInfoConfigs 2018-03-07 15:19:59 +01:00
Fabio Berger
8517de128b Update 0.1.12 json to add types 2018-03-07 14:27:12 +01:00
Fabio Berger
a3e15c910c Update 0.2.0 doc json to include types 2018-03-07 14:23:00 +01:00
Fabio Berger
a6303de4d1 Move RawLogEntry to types package 2018-03-07 14:22:15 +01:00
Fabio Berger
5356b0e118 Small improvements to docs 2018-03-07 14:11:14 +01:00
Fabio Berger
e31309f213 Allow user to change versions in demo example 2018-03-07 13:57:17 +01:00
Fabio Berger
6f8a70834b Add onSelectedVersion callback so it can be handled in any way the caller wishes 2018-03-07 13:25:15 +01:00
Fabio Berger
327cc307b3 Add back icons to example so that link icon renders 2018-03-07 11:05:48 +01:00
Fabio Berger
f191ba6e69 hide sidebar scrollbar unless onHover 2018-03-07 10:50:51 +01:00
Fabio Berger
a2b89411b0 Move example to it's own folder 2018-03-07 10:50:38 +01:00
Fabio Berger
f66efed777 Add example docs to react-docs package 2018-03-07 10:20:15 +01:00
Brandon Millman
f61b59fa89 Disable completed docs linting for globals 2018-03-07 00:17:39 -08:00
Brandon Millman
6288a72036 Add name to environment 2018-03-06 23:55:58 -08:00
Jacob Evans
a941f0ffb6 README 2018-03-06 21:01:39 -05:00
Jacob Evans
d7373a5c04 Add ledger-node package as optional dependency 2018-03-06 20:37:09 -05:00
Brandon Millman
2ff485d2e0 Add relevant newman typings 2018-03-06 16:25:51 -08:00
Brandon Millman
5a67068348 Random fixes 2018-03-06 15:39:38 -08:00
Brandon Millman
d39af6c9eb Print error message when no orders are found from /orders 2018-03-06 15:34:32 -08:00
Brandon Millman
1789025da9 Refactor environment factory and generalize token environment keys 2018-03-06 15:22:56 -08:00
Brandon Millman
696f49497b Flesh out README 2018-03-06 14:46:32 -08:00
Fabio Berger
e88eba1877 Fix tslint errors 2018-03-06 20:55:57 +01:00
Fabio Berger
f8b8a10b8f Make sidebar header configurable 2018-03-06 20:38:45 +01:00
Fabio Berger
01e505a5f4 Add publishConfig to package.json so that packages are published as public under the @0xproject namespace 2018-03-06 20:14:55 +01:00
Fabio Berger
5b2d9a4668 re-org index.ts 2018-03-06 19:50:33 +01:00
Fabio Berger
71008dc819 Remove menuSubsectionsBySection prop from Documentation component 2018-03-06 19:49:00 +01:00
Tom Schmidt
f27e943258 Added provider canonical name mapping 2018-03-06 09:47:13 -08:00
Fabio Berger
9301173f7d Rename docsVersion prop to selectedVersion and docsVersions to versions for clarity 2018-03-06 16:46:07 +01:00
Fabio Berger
60d95475eb Move DocsInfo out of the components folder 2018-03-06 16:45:25 +01:00
Fabio Berger
c8ace2edc0 Remove location prop 2018-03-06 16:37:37 +01:00
Fabio Berger
0b1ba9f997 Move Documentation to the @0xproject/react-docs package 2018-03-06 16:31:55 +01:00
Jacob Evans
f3026e33fd Force shouldGetChainCode to true in types 2018-03-06 08:57:54 -05:00
Fabio Berger
f014a97e9a Merge branch 'development' into extractDocs
* development:
  Also show staging 0x.js docs on development
  Fix source links in docs with a hack to support old and new versions of the TypeDoc JSON files
  remove from devDeps
  Remove date for now
  Add ethers typescript typings to 0x.js deps. The library works without this atm since another dep of 0x.js has it as a dep. But it's more robust to have it here.
  Add  missing instructions to add external types to tsconfig.json after installing the package
2018-03-06 11:11:35 +01:00
Brandon Millman
ddad09a936 Add support for custom environment file 2018-03-06 00:44:18 -08:00
Fabio Berger
5dd0654105 Also show staging 0x.js docs on development 2018-03-06 09:34:22 +01:00
Fabio Berger
b4b664e97a Fix source links in docs with a hack to support old and new versions of the TypeDoc JSON files 2018-03-06 09:33:35 +01:00
Brandon Millman
551771235b Prettier 2018-03-06 00:20:36 -08:00
Brandon Millman
eb201c4084 Add options for exporting environment and collection files 2018-03-06 00:18:58 -08:00
Jacob Evans
7bfc499ec8 Nuke tests for now 2018-03-05 22:36:53 -05:00
Jacob Evans
71e7e9c9c3 Remove old ledger 2018-03-05 21:07:07 -05:00
Jacob Evans
8521775389 Update ledgerco packages 2018-03-05 21:05:30 -05:00
Brandon Millman
61ad8d4c10 Add comment to environment factory 2018-03-05 16:31:39 -08:00
Brandon Millman
38a4ccd9f2 Change all globals in environment variables 2018-03-05 16:13:47 -08:00
Brandon Millman
cf342dd00e Change url command line option to endpoint-url 2018-03-05 15:31:42 -08:00
Brandon Millman
08ab81c54c Rename isHttpUrl to isWebUri in assert package 2018-03-05 15:24:55 -08:00
Brandon Millman
d355382f70 Update 0x package versions and fix yarn.lock 2018-03-05 15:15:03 -08:00
Brandon Millman
d171ce4fba Merge branch 'development' into feature/sra-reporter
* development: (79 commits)
  remove from devDeps
  Remove date for now
  Add ethers typescript typings to 0x.js deps. The library works without this atm since another dep of 0x.js has it as a dep. But it's more robust to have it here.
  Add  missing instructions to add external types to tsconfig.json after installing the package
  Fix bugs in postpublish_utils.js
  Update @0xproject/utils in top-level package.json
  Changelog tweaks
  Publish
  Updated CHANGELOGS
  Fix typo
  Add PR number to changelog entry
  Add changelog update to subproviders package
  Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` and add tests
  Remove unnecessary type assertion
  Fix comments
  Add comments
  Don't need any external packages for 0x connect docs yet
  Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc
  Fix styling
  Make prettier ignore postpublish_utils
  ...
2018-03-05 15:08:56 -08:00
Fabio Berger
5a90fece80 Moved over all pages/shared components and dependencies to react-shared 2018-03-05 13:53:13 +01:00
Fabio Berger
994935b5da Merge pull request #434 from 0xProject/addMissingReadmeInstructions
Add Missing README Instructions
2018-03-05 09:38:24 +01:00
Fabio Berger
874e667849 Bug fixes 2018-03-05 07:10:55 +01:00
Fabio Berger
1817f6eaf6 Merge branch 'development' into extractDocs
* development: (22 commits)
  Fix bugs in postpublish_utils.js
  Update @0xproject/utils in top-level package.json
  Changelog tweaks
  Publish
  Updated CHANGELOGS
  Fix typo
  Add PR number to changelog entry
  Add changelog update to subproviders package
  Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` and add tests
  Remove unnecessary type assertion
  Move web3 typings from devDeps to deps
  remove extrenuous comma
  Add PR number
  Add changelog entries from types and utils
  Add changelog entry to subproviders
  Remove extra comma
  Move web3 and ethers types to deps for utils package
  Make web3 typings a dep for web3Wrapper
  Make web3 typings a dep for subproviders
  reorder deps
  ...

# Conflicts:
#	packages/website/package.json
2018-03-05 06:20:15 +01:00
Fabio Berger
2e19930178 remove from devDeps 2018-03-05 06:17:57 +01:00
Fabio Berger
2b01461748 Remove date for now 2018-03-05 06:17:19 +01:00
Fabio Berger
24b9df475c Add ethers typescript typings to 0x.js deps. The library works without this atm since another dep of 0x.js has it as a dep. But it's more robust to have it here. 2018-03-05 06:12:36 +01:00
Fabio Berger
011bab3c80 Add missing instructions to add external types to tsconfig.json after installing the package 2018-03-05 06:11:53 +01:00
Fabio Berger
699c0c3e05 Fix bugs in postpublish_utils.js 2018-03-04 21:24:47 +01:00
Fabio Berger
5f4b28960e Update @0xproject/utils in top-level package.json 2018-03-04 19:38:32 +01:00
Fabio Berger
3837913855 Changelog tweaks 2018-03-04 19:38:16 +01:00
Fabio Berger
65eb3997d9 Publish
- 0x.js@0.33.0
 - @0xproject/abi-gen@0.2.4
 - @0xproject/assert@0.1.0
 - @0xproject/base-contract@0.0.2
 - chai-as-promised-typescript-typings@0.0.10
 - chai-typescript-typings@0.0.4
 - @0xproject/connect@0.6.2
 - contracts@2.1.14
 - @0xproject/deployer@0.2.0
 - @0xproject/dev-utils@0.2.0
 - ethers-typescript-typings@0.0.2
 - @0xproject/json-schemas@0.7.13
 - @0xproject/monorepo-scripts@0.1.12
 - @0xproject/subproviders@0.6.0
 - @0xproject/testnet-faucets@1.0.15
 - @0xproject/tslint-config@0.4.10
 - @0xproject/types@0.3.0
 - @0xproject/utils@0.4.0
 - web3-typescript-typings@0.10.0
 - @0xproject/web3-wrapper@0.2.0
 - @0xproject/website@0.0.17
2018-03-04 19:35:59 +01:00
Fabio Berger
47411b406d Updated CHANGELOGS 2018-03-04 17:02:50 +01:00
Fabio Berger
f710026a8f Merge pull request #432 from 0xProject/improveLedgerSubprovider
Allow LedgerSubprovider to return any number of accounts
2018-03-04 16:57:25 +01:00
Fabio Berger
925e133f50 Fix typo 2018-03-04 16:42:16 +01:00
Fabio Berger
2bdd60ed72 Add PR number to changelog entry 2018-03-04 16:39:18 +01:00
Fabio Berger
9ac1cce26f Merge branch 'development' into improveLedgerSubprovider
* development: (28 commits)
  Remove unnecessary type assertion
  Fix comments
  Add comments
  Don't need any external packages for 0x connect docs yet
  Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc
  Fix styling
  Make prettier ignore postpublish_utils
  Add hack comment
  Add comment about typeDoc versions
  Add support for merging multiple topLevel packages under a single section. For now, we simply merge the two package's children (works well for merging 0x.js types and @0xproject/types)
  Because we now include non-0x.js source, the keys changed. Needed to add both for backward compatibility with old doc JSON's
  Add support for backward compatibility for TypeDoc versions <0.9.0
  Consolidate all same exports together
  Add @0xproject/types to 0x.js tsconfig `include` so that TypeDoc also includes these types in the generated doc JSON
  Fix small bug where onHover type declarations with comments was taking up the entire window width
  Update to custom typeDoc fork with latest version (TS 2.7.0 support) + a bug fix allowing us to defer to the `include` in tsconfig.json on which files to run through TypeDoc
  Move web3 typings from devDeps to deps
  remove extrenuous comma
  Add PR number
  Add changelog entries from types and utils
  ...

# Conflicts:
#	packages/subproviders/CHANGELOG.md
2018-03-04 16:33:58 +01:00
Fabio Berger
0a597c94d6 Merge pull request #430 from 0xProject/0x.js/updateTypeDoc
Upgrade TypeDoc Dep & Add Missing @0xproject/types To Docs
2018-03-04 16:32:44 +01:00
Fabio Berger
02f82be094 Add changelog update to subproviders package 2018-03-04 15:52:52 +01:00
Fabio Berger
86e26240a1 Add numberOfAccounts param to LedgerSubprovider method getAccountsAsync and add tests 2018-03-04 15:52:16 +01:00
Fabio Berger
82c5be2564 Remove unnecessary type assertion 2018-03-04 15:29:14 +01:00
Fabio Berger
42f4f07268 Merge pull request #429 from 0xProject/fix/incorrectDeps
Move required typing from devDeps to deps
2018-03-04 15:21:32 +01:00
Fabio Berger
df4db8fa4c Merge branch '0x.js/updateTypeDoc' into extractDocs
* 0x.js/updateTypeDoc:
  Fix comments
  Add comments
  Don't need any external packages for 0x connect docs yet
  Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc
  Fix styling
  Make prettier ignore postpublish_utils
  Update yarn.lock
2018-03-03 21:44:44 +01:00
Fabio Berger
bd85fe0af3 Fix comments 2018-03-03 21:43:11 +01:00
Fabio Berger
aee15e5dff Add comments 2018-03-03 21:37:42 +01:00
Fabio Berger
d7a803d9fd Don't need any external packages for 0x connect docs yet 2018-03-03 21:37:36 +01:00
Fabio Berger
839e5895e4 Instead of adding @0xproject/types to tsconfig.json, let's only add it when calling TypeDoc 2018-03-03 21:34:13 +01:00
Fabio Berger
49a4f0c74c Fix styling 2018-03-03 21:33:44 +01:00
Fabio Berger
5bea8e63de Make prettier ignore postpublish_utils 2018-03-03 21:32:10 +01:00
Fabio Berger
e64be284dd Merge branch 'development' into 0x.js/updateTypeDoc
* development:
  Update yarn.lock
  Update yarn.lock
  Update all mentions of the repo name being `0x.js` to `0x-monorepo`
2018-03-03 20:29:40 +01:00
Fabio Berger
e11e26a352 Add clean command 2018-03-03 20:29:24 +01:00
Fabio Berger
bee90abbc4 Add changelog and readme 2018-03-03 20:29:17 +01:00
Fabio Berger
8782559c33 remove top-level configs 2018-03-03 20:29:07 +01:00
Fabio Berger
223ddc0f68 Add react-shared as dep of website 2018-03-03 20:15:48 +01:00
Fabio Berger
4445d1d5a0 Update yarn.lock 2018-03-03 20:09:09 +01:00
Fabio Berger
b7d001da88 Setup initial react-shared sub-package 2018-03-03 19:58:30 +01:00
Fabio Berger
3592ebef08 Move over AnchorTitle and associated elements 2018-03-03 19:55:40 +01:00
Fabio Berger
a783d21409 Merge branch 'development' into extractDocs
* development:
  Update yarn.lock
  Update all mentions of the repo name being `0x.js` to `0x-monorepo`
2018-03-03 19:20:56 +01:00
Fabio Berger
a716e3de74 Update yarn.lock 2018-03-03 19:18:58 +01:00
Fabio Berger
c797c720be Update all mentions of the repo name being 0x.js to 0x-monorepo 2018-03-03 19:11:09 +01:00
Fabio Berger
1b5742fbf0 Add hack comment 2018-03-03 17:03:51 +01:00
Fabio Berger
5794349d97 Add comment about typeDoc versions 2018-03-03 17:02:12 +01:00
Fabio Berger
456f094913 Add support for merging multiple topLevel packages under a single section. For now, we simply merge the two package's children (works well for merging 0x.js types and @0xproject/types) 2018-03-03 16:52:59 +01:00
Fabio Berger
abb9eb0df4 Because we now include non-0x.js source, the keys changed. Needed to add both for backward compatibility with old doc JSON's 2018-03-03 16:51:45 +01:00
Fabio Berger
9e7b45ea4c Add support for backward compatibility for TypeDoc versions <0.9.0 2018-03-03 16:50:58 +01:00
Fabio Berger
6c6bd60a48 Consolidate all same exports together 2018-03-03 16:50:17 +01:00
Fabio Berger
cef82e72dc Add @0xproject/types to 0x.js tsconfig include so that TypeDoc also includes these types in the generated doc JSON 2018-03-03 16:49:56 +01:00
Fabio Berger
45b9647ba0 Fix small bug where onHover type declarations with comments was taking up the entire window width 2018-03-03 13:47:39 +01:00
Fabio Berger
160f74d53e Update to custom typeDoc fork with latest version (TS 2.7.0 support) + a bug fix allowing us to defer to the include in tsconfig.json on which files to run through TypeDoc 2018-03-03 13:46:42 +01:00
Fabio Berger
3ab6139522 Move web3 typings from devDeps to deps 2018-03-03 10:59:43 +01:00
Fabio Berger
9aa54257e7 remove extrenuous comma 2018-03-03 10:38:51 +01:00
Fabio Berger
8eafa62bbe Add PR number 2018-03-03 10:36:53 +01:00
Fabio Berger
968c24f0bc Add changelog entries from types and utils 2018-03-03 10:32:01 +01:00
Fabio Berger
e5c755b1fc Add changelog entry to subproviders 2018-03-03 10:29:14 +01:00
Fabio Berger
6d56f01c40 Remove extra comma 2018-03-03 10:28:51 +01:00
Fabio Berger
eefce48e68 Move web3 and ethers types to deps for utils package 2018-03-03 10:24:29 +01:00
Fabio Berger
c7d97c733a Make web3 typings a dep for web3Wrapper 2018-03-03 10:20:53 +01:00
Fabio Berger
3db42deb42 Make web3 typings a dep for subproviders 2018-03-03 10:20:30 +01:00
Fabio Berger
02603e8926 reorder deps 2018-03-03 10:20:04 +01:00
Fabio Berger
c5003554f4 Move ethers and web3 types to deps since both are required when interacting with this package 2018-03-03 10:06:02 +01:00
Fabio Berger
eb223805ca Move web3 typings to dependencies since the types package cannot function without them being available when imported 2018-03-03 10:02:48 +01:00
Fabio Berger
244c148a80 Improve repo description in README 2018-03-03 07:47:27 +01:00
Fabio Berger
4dbb2ed167 Merge pull request #427 from 0xProject/fix/doc_bugs
Miscellaneous Doc Fixes
2018-03-03 06:07:00 +01:00
Fabio Berger
212d680a47 Small stylistic improvements 2018-03-03 05:46:12 +01:00
Fabio Berger
a853e35dec Improve icon sizes 2018-03-03 05:42:32 +01:00
Fabio Berger
fdaf9f0bfc Fix comment and use named variable in conditional 2018-03-03 05:36:26 +01:00
Fabio Berger
0afe45b3a8 Hash hash instead of prefixedHash to scrollToHash function 2018-03-03 05:36:08 +01:00
Fabio Berger
f9a37168b0 Fix link to intro tutorial wiki article 2018-03-02 17:07:32 +01:00
Fabio Berger
52232e98c7 Make sure the page has loaded (including all images) before scrolling to hash 2018-03-02 17:02:14 +01:00
Fabio Berger
0fbb443e4b Move onPageLoadAsync to utils 2018-03-02 17:01:46 +01:00
Fabio Berger
8021694b81 Give all container files the proper file suffix: ts 2018-03-02 16:21:10 +01:00
Fabio Berger
a2b262c9df Add hash to URL onClick 2018-03-02 15:10:44 +01:00
Fabio Berger
5906f4c995 Add underline to internal linksx 2018-03-02 15:02:50 +01:00
Fabio Berger
da8edd2226 Undo config changes 2018-03-02 14:47:43 +01:00
Fabio Berger
406aedfdc2 Merge branch 'development' into fix/doc_bugs
* development: (21 commits)
  Adjust the tests
  Move tutorials to adhere to current dir structure
  Make tests slightly nicer
  Remove only
  Improve the comments
  Improve the comments
  Add comments to Arbitrage contract
  Don't pass tokenGet and tokenGive because we can get them from 0x order
  Pretty-print ED contracts
  Make external
  Fix a typo
  Change type to uint256
  Make setAllowances external
  Fix the comment
  Put all ED contracts in one folder
  Move tutorials contracts to src folder
  Remove false-positive linter failure because of chai-as-pronmised incorrect types
  Assert that the balances don't change if arbitrage fails
  Initial implementation of Arbitrage contract with tests
  Set max to 2 ETH/2 ZRX
  ...
2018-03-02 14:44:53 +01:00
Fabio Berger
67c834841e Update react-markdown, properly scroll to section for wiki internal links, consolidate scrollTo logic and make external links open in new tabs 2018-03-02 14:40:26 +01:00
Fabio Berger
edaa0b0e34 Update yarn lock 2018-03-02 14:38:46 +01:00
Fabio Berger
31f03fcf3a Use custom fork of react-highlight with support for Solidity syntax highlighting 2018-03-02 02:17:23 +01:00
Leonid Logvinov
4a57f2a762 Merge pull request #425 from 0xProject/feature/build_watch
Arbitrage tutorial contract
2018-03-01 16:57:58 -08:00
Brandon Millman
92b9dbd706 Fix up some postman tests 2018-03-01 14:41:16 -08:00
Leonid Logvinov
6edd7682a9 Adjust the tests 2018-03-01 13:25:01 -08:00
Leonid Logvinov
447891b396 Move tutorials to adhere to current dir structure 2018-03-01 13:23:29 -08:00
Brandon Millman
89bfcafb80 Add ethers types 2018-03-01 13:17:49 -08:00
Brandon Millman
a74a04c5d5 Fix yarn.lock 2018-03-01 13:06:08 -08:00
Brandon Millman
0c16f0ea22 Merge branch 'development' into feature/sra-reporter
* development: (71 commits)
  Set max to 2 ETH/2 ZRX
  Add missing types from website
  Add dependencies
  Update the README
  Move BaseContract to its own package
  Upgrate prettier
  remove unused import
  Move more configs into docsInfo and remove logic that does not belong there elsewhere
  Fix a bug with displaying solidity functions returning multiple return values
  Add ethers-contracts as a dependency
  Include types for ethers-contracts
  Fix the version
  Include types for ethers-contracts
  Rename idx to i
  Remove tslint disable
  Move BaseContract to web3Wrapper
  Merge ifs
  Fix an option description
  Add link to the docs
  Improve CHANGELOG entry
  ...
2018-03-01 13:04:55 -08:00
Brandon Millman
003d43b03a Flesh out postman test cases 2018-03-01 13:02:12 -08:00
Leonid Logvinov
6323496945 Make tests slightly nicer 2018-03-01 12:21:09 -08:00
Leonid Logvinov
fd5e231a93 Remove only 2018-03-01 12:21:09 -08:00
Leonid Logvinov
ae209677de Improve the comments 2018-03-01 12:21:09 -08:00
Leonid Logvinov
d5ca00de95 Improve the comments 2018-03-01 12:21:09 -08:00
Leonid Logvinov
7be84c6ad3 Add comments to Arbitrage contract 2018-03-01 12:21:09 -08:00
Leonid Logvinov
425039e4d3 Don't pass tokenGet and tokenGive because we can get them from 0x order 2018-03-01 12:21:09 -08:00
Leonid Logvinov
6c5333180d Pretty-print ED contracts 2018-03-01 12:21:09 -08:00
Leonid Logvinov
cb47a51b70 Make external 2018-03-01 12:21:09 -08:00
Leonid Logvinov
e36fb654b0 Fix a typo 2018-03-01 12:21:09 -08:00
Leonid Logvinov
6325fac020 Change type to uint256 2018-03-01 12:21:09 -08:00
Leonid Logvinov
c6358d5f22 Make setAllowances external 2018-03-01 12:21:09 -08:00
Leonid Logvinov
413e8b6062 Fix the comment 2018-03-01 12:21:09 -08:00
Leonid Logvinov
e113a8e7af Put all ED contracts in one folder 2018-03-01 12:21:08 -08:00
Leonid Logvinov
e42891ae5b Move tutorials contracts to src folder 2018-03-01 12:21:08 -08:00
Leonid Logvinov
c90770472e Remove false-positive linter failure because of chai-as-pronmised incorrect types 2018-03-01 12:21:08 -08:00
Leonid Logvinov
45df9de5b5 Assert that the balances don't change if arbitrage fails 2018-03-01 12:21:08 -08:00
Leonid Logvinov
2d0940589e Initial implementation of Arbitrage contract with tests 2018-03-01 12:21:08 -08:00
Fabio Berger
5908f189a7 Fix bug where contract event anchor ids were incorrect 2018-03-01 09:18:46 +01:00
Brandon Millman
17328bce53 Add more globals 2018-02-28 16:39:23 -08:00
Jacob Evans
451a0dacbe Merge pull request #418 from 0xProject/feature/facuet/balance-check
Prevent a single account from draining the faucet
2018-02-28 14:40:17 -08:00
Jacob Evans
a46199e37d Set max to 2 ETH/2 ZRX 2018-02-28 14:25:07 -08:00
Fabio Berger
e25cc301fd Add missing types from website 2018-02-28 17:20:09 +01:00
Leonid Logvinov
5bbb0d1f60 Merge pull request #422 from 0xProject/feature/new-prettier
Upgrade prettier
2018-02-27 22:34:23 -08:00
Leonid Logvinov
a5b8875356 Merge pull request #423 from 0xProject/feature/base-contract
Move BaseContract to its own package
2018-02-27 18:44:23 -08:00
Leonid Logvinov
3e86df311d Add dependencies 2018-02-27 18:34:00 -08:00
Leonid Logvinov
002f9ebde7 Update the README 2018-02-27 18:33:05 -08:00
Leonid Logvinov
72e6e1ce8b Move BaseContract to its own package 2018-02-27 17:51:31 -08:00
Brandon Millman
a3c7af95e1 Add stringified order object into globals 2018-02-27 17:25:42 -08:00
Brandon Millman
0987c9a7cf Write to provided output directory 2018-02-27 17:12:45 -08:00
Fabio Berger
bbd87daf6d Merge pull request #421 from 0xProject/moveOutDocGenerator
Docs Refactor Prepping For Moving To Separate Package
2018-02-27 15:49:58 -08:00
Leonid Logvinov
30e4613d0a Upgrate prettier 2018-02-27 15:08:52 -08:00
Fabio Berger
79593f52b0 remove unused import 2018-02-27 14:50:35 -08:00
Leonid Logvinov
bab8c1eeff Remove only 2018-02-27 14:43:29 -08:00
Leonid Logvinov
8b6cc95c1b Fix a typo 2018-02-27 14:42:49 -08:00
Leonid Logvinov
90236b87de Add PR name 2018-02-27 14:42:49 -08:00
Leonid Logvinov
b6a133cc64 Improve an error message when an inorrect number of constructor params is passed 2018-02-27 14:42:49 -08:00
Leonid Logvinov
7aa070f9ea Merge pull request #413 from 0xProject/feature/ethers-contracts
abi-gen V2 abi and ethers-contracts
2018-02-27 14:41:59 -08:00
Leonid Logvinov
c2ec2291e8 Merge pull request #420 from 0xProject/fix/multiple-return-docs
Fix a bug with displaying solidity functions returning multiple retur…
2018-02-27 14:36:59 -08:00
Fabio Berger
97fcfb7f6c Move more configs into docsInfo and remove logic that does not belong there elsewhere 2018-02-27 14:29:22 -08:00
Leonid Logvinov
ce677fd55a Fix a bug with displaying solidity functions returning multiple return values 2018-02-27 14:23:36 -08:00
Brandon Millman
e48a3edacb Get orderHash via 0x connect 2018-02-27 14:11:45 -08:00
Leonid Logvinov
ce0b92d681 Add ethers-contracts as a dependency 2018-02-27 13:19:17 -08:00
Leonid Logvinov
29c5ba5639 Include types for ethers-contracts 2018-02-27 12:50:58 -08:00
Leonid Logvinov
cdea618457 Fix the version 2018-02-27 12:20:44 -08:00
Leonid Logvinov
425a519f97 Include types for ethers-contracts 2018-02-27 12:18:52 -08:00
Leonid Logvinov
c07d64c6ff Rename idx to i 2018-02-27 12:07:59 -08:00
Leonid Logvinov
c07e3a76bb Remove tslint disable 2018-02-27 12:07:58 -08:00
Leonid Logvinov
8fe844bcc9 Move BaseContract to web3Wrapper 2018-02-27 12:07:58 -08:00
Leonid Logvinov
a0390956a9 Merge ifs 2018-02-27 12:07:06 -08:00
Leonid Logvinov
4f1e6296ca Fix an option description 2018-02-27 12:07:06 -08:00
Leonid Logvinov
0ef372e531 Add link to the docs 2018-02-27 12:07:06 -08:00
Leonid Logvinov
06e2894750 Improve CHANGELOG entry 2018-02-27 12:07:06 -08:00
Leonid Logvinov
10e2d4b99c Remove unused param 2018-02-27 12:07:06 -08:00
Leonid Logvinov
ef40cb9687 Add txData to async calls 2018-02-27 12:07:06 -08:00
Leonid Logvinov
758604fc1a Include ethers types 2018-02-27 12:06:02 -08:00
Leonid Logvinov
34c1134b55 Create ethers-typescript-typings 2018-02-27 12:06:02 -08:00
Leonid Logvinov
a5ef1db0c5 Rewrite templates to decode call data on transactions 2018-02-27 12:06:02 -08:00
Leonid Logvinov
748ed40321 Add to context data 2018-02-27 12:06:02 -08:00
Leonid Logvinov
42063f785e Use as a backend to decode event args 2018-02-27 12:06:02 -08:00
Leonid Logvinov
1657451f37 Add as an option to 2018-02-27 12:06:02 -08:00
Leonid Logvinov
0bb0bff0b3 Change backend for contracts contracts 2018-02-27 12:06:02 -08:00
Leonid Logvinov
747732118c Fix namings 2018-02-27 12:06:02 -08:00
Leonid Logvinov
2aec1501d0 Update template link 2018-02-27 12:06:02 -08:00
Leonid Logvinov
39c6bc1106 Add PR number 2018-02-27 12:06:01 -08:00
Leonid Logvinov
4e451479f8 Fix build 2018-02-27 12:05:46 -08:00
Leonid Logvinov
93b2736d65 Use the same templates as 0x.js 2018-02-27 12:05:46 -08:00
Leonid Logvinov
34274a1042 Pass components to parameterType 2018-02-27 12:05:46 -08:00
Leonid Logvinov
fa822caa62 Apply prettier after generating contracts 2018-02-27 12:05:46 -08:00
Leonid Logvinov
ddc30cc2c0 Add CHANGELOG entry 2018-02-27 12:05:46 -08:00
Leonid Logvinov
9d9cab1711 Fix build by using local events types 2018-02-27 12:05:23 -08:00
Leonid Logvinov
fe8f2d8d89 Add support for ABIv2 to abi-gen 2018-02-27 12:05:23 -08:00
Leonid Logvinov
2d561bc8a0 Allow users to specify the contracts backend in abi-gen 2018-02-27 12:05:23 -08:00
Leonid Logvinov
f5275d3ad7 Add data to TxData 2018-02-27 12:05:23 -08:00
Leonid Logvinov
5fbdf9cfb9 Pass whole txData to estimateGas 2018-02-27 12:05:22 -08:00
Leonid Logvinov
0409c9c1e5 Fix default contract set calculation 2018-02-27 12:05:22 -08:00
Leonid Logvinov
42a5da1df4 Fix default paths 2018-02-27 12:05:22 -08:00
Leonid Logvinov
0b326a8bbe Add web3Wrapper.callAsync and remove web3Wrapper.getContractInstance 2018-02-27 12:05:22 -08:00
Brandon Millman
9c8501a84e Refactor environment factory and promisify newman 2018-02-27 11:51:05 -08:00
Leonid Logvinov
2da7f82171 Merge pull request #415 from 0xProject/fix/unsubscribeAll
Rename _unsubscribeAll to unsubscribeAll
2018-02-27 10:25:52 -08:00
Leonid Logvinov
593474031d Merge branch 'development' into fix/unsubscribeAll 2018-02-27 10:24:36 -08:00
Fabio Berger
fce10548d2 Merge pull request #373 from 0xProject/feature/0x.js/lowercase-addresses
Lowercase addresses in the Public API
2018-02-27 09:58:09 -08:00
Jacob Evans
addca63938 Prevent a single account from draining the faucet 2018-02-26 21:15:11 -08:00
Jacob Evans
6961169f89 Merge branch 'development' into feature/0x.js/lowercase-addresses 2018-02-26 18:47:09 -08:00
Jacob Evans
3d66feb89f Lowercase web3 wrapper addresses
Ensure all of the user account addresses are lower case when returned from web3wrapper
2018-02-26 18:10:27 -08:00
Brandon Millman
bb157eefc6 Add exchange contract address to environment files 2018-02-26 17:13:14 -08:00
Leonid Logvinov
7f8f4df0a0 Rename _unsubscribeAll to unsubscribeAll 2018-02-26 14:38:17 -08:00
Brandon Millman
4b325676f7 Add schema validation to each collection folder and flesh out params 2018-02-26 13:32:57 -08:00
Fabio Berger
ecba95250d Update missed docsJsonRoot variables 2018-02-26 10:09:22 -08:00
Fabio Berger
dd116b3cd6 remove docsJsonRoot from docsInfo 2018-02-26 09:52:08 -08:00
Jacob Evans
eabe96fd19 Check isETHAddressHex before lowercase
Flip the check so assertion happens before lowercase
2018-02-26 09:39:46 -08:00
Fabio Berger
7dd9ce2e32 Remove unused props 2018-02-26 07:57:41 -08:00
Fabio Berger
fffaafe4c9 Merge branch 'development' into moveOutDocGenerator
* development: (36 commits)
  Fix english translations
  Fix footer on mobile
  re-add google analytics code
  Fix Russian translation
  Move all dependencies on @0xproject/types out of devDependencies
  Slight improvement to footer
  Fix a few Korean translations
  Address feedback
  Use source tree hash instead of compile flag
  Fix race condition
  Update CHANGELOG
  Delete artifacts directory
  Add generated contract artifacts to gitignore
  Check dependencies when determining if should be recompiled
  Update CHANGELOG
  Remove unused CHANGELOG entry
  Remove unused import
  Change assert.doesConformToShema interface
  Remove a type assertion
  Publish
  ...
2018-02-25 18:32:12 -08:00
Brandon Millman
0b9646136a Update postman collection to load json schemas into tv4 before every test run 2018-02-23 14:26:24 -08:00
Brandon Millman
55f38b9c35 Add an array of schemaKeys to the globals 2018-02-23 14:25:48 -08:00
Fabio Berger
709fa9e02e Fix english translations 2018-02-23 14:15:53 -08:00
Fabio Berger
f42bdb8bab Fix footer on mobile 2018-02-23 14:15:39 -08:00
Fabio Berger
10aed46062 Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Update CHANGELOG
  Remove unused CHANGELOG entry
  Remove unused import
  Change assert.doesConformToShema interface
  Remove a type assertion
  Remove type-level validation
  Access property over this
  Add type cast
  Fix tests
  Add entries to the CHANGELOG
  Better validate ZeroExConfig on public networks
2018-02-23 14:15:29 -08:00
Fabio Berger
6e43e89b2d re-add google analytics code 2018-02-23 13:49:24 -08:00
Leonid Logvinov
10c0c0b6d2 Merge pull request #385 from 0xProject/feature/0x_config_validation
Better validate ZeroExConfig on private networks
2018-02-23 13:20:28 -08:00
Brandon Millman
e13924cd2d Remove url from kovan environment json 2018-02-23 11:57:33 -08:00
Brandon Millman
7afe00f06a Use Schema interface from @0xproject/json-schemas 2018-02-23 11:56:50 -08:00
Brandon Millman
87b9caa7dc Fix README typo 2018-02-23 11:47:45 -08:00
Jacob Evans
f689d335c0 Check maker is valid address 2018-02-22 18:43:01 -08:00
Jacob Evans
31f9a848f9 Lowercase public addresses
Normalize the public api addresses to lowercase to prevent an avoidable
error
2018-02-22 18:43:00 -08:00
Fabio Berger
3d2c5d67af Fix Russian translation 2018-02-22 16:32:19 -08:00
Brandon Millman
63f8f469b0 Fix @types/lodash version 2018-02-22 13:54:39 -08:00
Brandon Millman
9929f1acf0 Merge pull request #411 from 0xProject/fix/types/dev-dependencies
Move all dependencies on @0xproject/types out of devDependencies
2018-02-22 13:30:35 -08:00
Brandon Millman
42ecc087cb Implement initial sra-report command line tool 2018-02-22 13:12:44 -08:00
Brandon Millman
93adee36b0 Move all dependencies on @0xproject/types out of devDependencies 2018-02-22 00:35:16 -08:00
Fabio Berger
0e95fd0b9b Slight improvement to footer 2018-02-21 17:40:07 -08:00
Fabio Berger
611ddfeeb8 Fix a few Korean translations 2018-02-21 17:17:09 -08:00
Fabio Berger
dfe2579eeb Merge pull request #410 from 0xProject/translateHomepage
Translate Landing Page
2018-02-21 17:09:33 -08:00
Fabio Berger
66b36f6d8f Begin refactoring out doc generator template 2018-02-21 16:34:14 -08:00
Fabio Berger
1b3a9102f1 Move from storing translations in TS files to JSON files 2018-02-21 14:22:02 -08:00
Fabio Berger
9993a50903 Remove Segment.io 2018-02-21 12:06:53 -08:00
Fabio Berger
c226509be0 Remove unused var 2018-02-21 11:56:10 -08:00
Fabio Berger
ef6f52e722 Remove extenuous defaultProps 2018-02-21 11:54:03 -08:00
Fabio Berger
7d8cad8e3a Make translate required by footer 2018-02-21 11:51:41 -08:00
Fabio Berger
15507d3827 Make translate a required prop of TopBar 2018-02-21 11:49:54 -08:00
Fabio Berger
e2d17d122e Keep topBar and footer language to the one picked by the user 2018-02-21 11:46:16 -08:00
Fabio Berger
0d7bf50581 Re-set language to browser 2018-02-21 10:31:31 -08:00
Fabio Berger
a50618fcb0 Fix rocket.chat key 2018-02-21 10:31:15 -08:00
Fabio Berger
fc2a9a756a Mobile optimize translated landing page 2018-02-21 09:59:09 -08:00
Leonid Logvinov
07721eb99f Improve russian translations 2018-02-20 20:15:36 -08:00
Fabio Berger
13fed15e0c Improve homepage and add translations in chinese, russian, korean and spanish 2018-02-20 19:53:07 -08:00
Fabio Berger
38a308ce5b Move translate to redux 2018-02-20 19:52:28 -08:00
Amir Bandeali
be19316dfb Merge pull request #408 from 0xProject/fix/deployer/checkDependencies
Check dependencies when compiling contracts
2018-02-20 15:21:29 -08:00
Fabio Berger
c4f65681a1 Add translation infra and replace english text with calls to translate 2018-02-20 14:11:19 -08:00
Fabio Berger
f600226aa9 Move tsconfig package to devDeps 2018-02-20 14:10:07 -08:00
Amir Bandeali
67f2864501 Address feedback 2018-02-20 13:42:35 -08:00
Amir Bandeali
c1bbcaba73 Use source tree hash instead of compile flag 2018-02-20 13:19:12 -08:00
Amir Bandeali
6685cb3fba Fix race condition 2018-02-20 13:19:12 -08:00
Amir Bandeali
d770e46208 Update CHANGELOG 2018-02-20 13:19:12 -08:00
Amir Bandeali
665636e642 Delete artifacts directory 2018-02-20 13:19:12 -08:00
Amir Bandeali
0028e71ab2 Add generated contract artifacts to gitignore 2018-02-20 13:19:12 -08:00
Amir Bandeali
7fb66bf71a Check dependencies when determining if should be recompiled 2018-02-20 13:19:12 -08:00
Leonid Logvinov
3120d854f8 Update CHANGELOG 2018-02-20 12:09:39 -08:00
Leonid Logvinov
c85c14210f Remove unused CHANGELOG entry 2018-02-20 12:03:33 -08:00
Leonid Logvinov
0fb81a11a8 Remove unused import 2018-02-20 12:03:21 -08:00
Leonid Logvinov
7b67afae06 Change assert.doesConformToShema interface 2018-02-20 11:39:36 -08:00
Leonid Logvinov
fe9e319a61 Remove a type assertion 2018-02-20 11:34:29 -08:00
Leonid
097fc477a2 Merge pull request #401 from 0xProject/feature/web3-abi-v2-types
Add types for ABIv2
2018-02-20 11:55:29 -07:00
Leonid
f60b00d116 Merge branch 'development' into feature/web3-abi-v2-types 2018-02-20 11:55:10 -07:00
Brandon Millman
3a36e0621f Publish
- @0xproject/connect@0.6.1
2018-02-16 22:54:28 -07:00
Brandon Millman
b482473e23 Updated CHANGELOGs 2018-02-16 22:51:29 -07:00
Brandon Millman
9a5fd3f784 Merge pull request #407 from 0xProject/fix/connect/empty-response
Do not JSON parse empty reponse
2018-02-16 21:50:39 -08:00
Brandon Millman
b703ccde9b Do not JSON parse empty reponse 2018-02-16 22:43:37 -07:00
Brandon Millman
80eca30725 Fix incorrect comment on WebSocketOrderbookChannel constructor 2018-02-16 10:11:40 -07:00
Brandon Millman
7dbc14dc43 Fix broken postpublish script in connect 2018-02-16 10:06:47 -07:00
Brandon Millman
b3f9010eb5 Updated top level @0xproject/utils dependency 2018-02-16 10:00:39 -07:00
Brandon Millman
f62d72e548 Publish
- 0x.js@0.32.4
 - @0xproject/abi-gen@0.2.3
 - @0xproject/assert@0.0.20
 - @0xproject/connect@0.6.0
 - contracts@2.1.13
 - @0xproject/deployer@0.1.0
 - @0xproject/dev-utils@0.1.0
 - @0xproject/json-schemas@0.7.12
 - @0xproject/subproviders@0.5.0
 - @0xproject/testnet-faucets@1.0.14
 - @0xproject/types@0.2.3
 - @0xproject/utils@0.3.4
 - web3-typescript-typings@0.9.11
 - @0xproject/web3-wrapper@0.1.14
 - @0xproject/website@0.0.16
2018-02-16 09:53:35 -07:00
Brandon Millman
d12352972e Updated CHANGELOGs 2018-02-16 09:49:02 -07:00
Brandon Millman
03d3d84db3 Merge pull request #406 from 0xProject/feature/connect/heartbeat
Add configurable heartbeat to WebSocketOrderbookChannel
2018-02-16 08:10:00 -08:00
Brandon Millman
6d818c25c7 Add an enforced minimum for the heartbeat interval 2018-02-16 08:48:15 -07:00
Fabio Berger
6a8f624e75 Add Rinkeby network to smart contract docs 2018-02-16 08:47:27 -07:00
Fabio Berger
0801b1ddf9 Updated CHANGELOG 2018-02-16 08:47:10 -07:00
Fabio Berger
4fd64ca492 Merge pull request #405 from 0xProject/refactor/docs-redesign
Re-design Wiki + Doc pages
2018-02-16 07:45:55 -08:00
Brandon Millman
c4bcf24640 Add configurable heartbeat to WebSocketOrderbookChannel 2018-02-16 01:20:27 -07:00
Fabio Berger
0114fc9608 remove hard-coded color 2018-02-16 00:12:27 -07:00
Fabio Berger
8db098eaec Remove section links until they go somewhere 2018-02-16 00:09:10 -07:00
Fabio Berger
05c3a66543 Add more padding on top of section title 2018-02-16 00:08:57 -07:00
Fabio Berger
9349752baa Add hack comment explaining param count short-cut 2018-02-15 23:56:19 -07:00
Fabio Berger
974fab7284 replace repeated conditionals with variable 2018-02-15 23:54:36 -07:00
Fabio Berger
8a52ffe7b7 Remove unneeded props 2018-02-15 23:52:49 -07:00
Fabio Berger
c6ecdbd86e use const over hard-coding 2018-02-15 23:52:40 -07:00
Fabio Berger
03797545f9 uncomment dev logic 2018-02-15 23:51:10 -07:00
Fabio Berger
2778f96483 Re-design docs pages 2018-02-15 21:51:49 -07:00
Fabio Berger
6cd4e7a17e Add icons for all doc pages 2018-02-15 21:51:37 -07:00
Fabio Berger
5c91b4bfc6 Re-designed Wiki and half-redesigned docs pages 2018-02-15 20:12:47 -07:00
Fabio Berger
e2b51c5dc4 Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js: (24 commits)
  Rename variables
  Update CHANGELOG
  Add npm config for contracts list
  Run prettier
  Fix checks, add contract list to compile script in package.json
  Add contracts to compiler options
  Add missing public types from connect docs
  Change imports order
  Change default page params in connect to page 1 and perPage 100
  Add docs staging to 0x.js package
  Fix a typo
  Add an assertion
  Add PR numbers
  Fix entry points
  Add tests for dev-utils package
  Move subproviders from dev-utils to subproviders
  Add missing CHANGELOG entry
  Add support for intersection types in docs
  Add stagedocs script to connect package
  web3 typings fix - web3.net.peerCount returns number
  ...
2018-02-15 20:09:53 -07:00
Fabio Berger
b610b7c192 Prettier fixes 2018-02-15 20:09:24 -07:00
Amir Bandeali
b75fdd6b66 Merge pull request #400 from 0xProject/feature/deployer/selectContracts
Pass in contracts to compile in deployer
2018-02-15 12:27:43 -08:00
Amir Bandeali
060b02eaed Rename variables 2018-02-15 10:20:03 -08:00
Amir Bandeali
003e5da00d Update CHANGELOG 2018-02-15 10:13:06 -08:00
Amir Bandeali
02951d4813 Add npm config for contracts list 2018-02-15 10:13:06 -08:00
Amir Bandeali
db52ed9941 Run prettier 2018-02-15 10:13:06 -08:00
Amir Bandeali
af333b1838 Fix checks, add contract list to compile script in package.json 2018-02-15 10:13:06 -08:00
Amir Bandeali
f62762bd0e Add contracts to compiler options 2018-02-15 10:13:06 -08:00
Brandon Millman
4b67352278 Add missing public types from connect docs 2018-02-15 00:18:48 -08:00
Leonid Logvinov
76afb6b116 Add types for ABIv2 2018-02-14 15:52:06 -08:00
Leonid Logvinov
db52e87740 Remove type-level validation 2018-02-14 15:25:30 -08:00
Leonid
e22788abe8 Merge pull request #392 from 0xProject/feature/subproviders_move
Move subproviders from dev-utils to subproviders package and add tests for dev-utils
2018-02-15 00:13:12 +01:00
Leonid Logvinov
bbfbfcda85 Change imports order 2018-02-14 15:03:52 -08:00
Brandon Millman
0dfb36e675 Merge pull request #398 from 0xProject/feature/website/stage-documentation
Add support for intersection types and staged connect documentation
2018-02-14 14:45:33 -08:00
Brandon Millman
95a9d77301 Change default page params in connect to page 1 and perPage 100 2018-02-14 14:43:43 -08:00
Leonid
ab1f070901 Merge pull request #386 from 0xProject/fix/windows_install
Use system-independent rm command
2018-02-14 23:38:48 +01:00
Brandon Millman
8201d5d1f8 Add docs staging to 0x.js package 2018-02-14 14:35:31 -08:00
Leonid Logvinov
8704c34a0f Fix a typo 2018-02-14 11:54:20 -08:00
Leonid Logvinov
599adaf1bf Add an assertion 2018-02-14 11:53:40 -08:00
Leonid Logvinov
778e399438 Add PR numbers 2018-02-14 11:51:26 -08:00
Leonid Logvinov
485ae4d997 Fix entry points 2018-02-14 11:51:26 -08:00
Leonid Logvinov
8cd2ba3ad6 Add tests for dev-utils package 2018-02-14 11:51:26 -08:00
Leonid Logvinov
dbad7d1869 Move subproviders from dev-utils to subproviders 2018-02-14 11:51:26 -08:00
Leonid Logvinov
4d482438f5 Access property over this 2018-02-14 11:24:42 -08:00
Leonid Logvinov
b53a1b51d6 Add type cast 2018-02-14 11:22:37 -08:00
Leonid Logvinov
49375c73d4 Fix tests 2018-02-14 11:22:36 -08:00
Leonid Logvinov
98b78c56c5 Add entries to the CHANGELOG 2018-02-14 11:22:36 -08:00
Leonid Logvinov
f3e6ef0fa9 Better validate ZeroExConfig on public networks 2018-02-14 11:22:36 -08:00
Leonid Logvinov
18e1c2dea5 Add missing CHANGELOG entry 2018-02-14 10:23:20 -08:00
Leonid
91ae01e484 Merge pull request #397 from gagarin55/typings-fix
web3-typescript-typings fix - web3.net.peerCount returns number
2018-02-14 19:19:48 +01:00
Brandon Millman
2897b72967 Add support for intersection types in docs 2018-02-14 10:16:00 -08:00
Brandon Millman
3510985cf4 Add stagedocs script to connect package 2018-02-14 10:15:53 -08:00
gagarin55
5927e65045 web3 typings fix - web3.net.peerCount returns number 2018-02-14 16:18:49 +03:00
Brandon Millman
13e2041d50 Merge pull request #394 from 0xProject/feature/connect/add-pagination
Add page options to relevant HttpClient methods
2018-02-13 17:30:46 -08:00
Brandon Millman
4bf530ed9e Fix error in paged request schema 2018-02-13 16:55:48 -08:00
Brandon Millman
4c797405ad Addressed PR feedback 2018-02-13 15:50:28 -08:00
Brandon Millman
713c922e35 Add page options to relevant HttpClient methods 2018-02-13 14:15:54 -08:00
Leonid
7f1e789264 Merge branch 'development' into fix/windows_install 2018-02-12 15:01:24 +01:00
Fabio Berger
07d00cc515 Publish
- 0x.js@0.32.3
 - @0xproject/abi-gen@0.2.2
 - @0xproject/assert@0.0.19
 - @0xproject/connect@0.5.8
 - contracts@2.1.12
 - @0xproject/deployer@0.0.9
 - @0xproject/dev-utils@0.0.13
 - @0xproject/json-schemas@0.7.11
 - @0xproject/monorepo-scripts@0.1.11
 - @0xproject/subproviders@0.4.2
 - @0xproject/testnet-faucets@1.0.13
 - @0xproject/tslint-config@0.4.9
 - @0xproject/types@0.2.2
 - @0xproject/utils@0.3.3
 - @0xproject/web3-wrapper@0.1.13
 - @0xproject/website@0.0.15
2018-02-09 18:36:51 -08:00
Fabio Berger
cd55e346af Move tslint and tslint-eslint-rules to dev deps since this package needs them to function 2018-02-09 18:12:29 -08:00
Fabio Berger
6746428fb1 Update utils in top-level package.json 2018-02-09 16:29:09 -08:00
Fabio Berger
634032d5be Publish
- 0x.js@0.32.2
 - @0xproject/abi-gen@0.2.1
 - @0xproject/assert@0.0.18
 - chai-as-promised-typescript-typings@0.0.9
 - chai-typescript-typings@0.0.3
 - @0xproject/connect@0.5.7
 - contracts@2.1.11
 - @0xproject/deployer@0.0.8
 - @0xproject/dev-utils@0.0.12
 - @0xproject/json-schemas@0.7.10
 - @0xproject/monorepo-scripts@0.1.10
 - @0xproject/subproviders@0.4.1
 - @0xproject/testnet-faucets@1.0.12
 - @0xproject/tslint-config@0.4.8
 - @0xproject/types@0.2.1
 - @0xproject/utils@0.3.2
 - web3-typescript-typings@0.9.10
 - @0xproject/web3-wrapper@0.1.12
 - @0xproject/website@0.0.14
2018-02-09 16:19:43 -08:00
Fabio Berger
602abc53dd Fix version in CHANGELOG 2018-02-09 16:18:47 -08:00
Fabio Berger
fdbaa9768a Update changelog version 2018-02-09 16:09:53 -08:00
Fabio Berger
293d7261e0 Fix changelog version 2018-02-09 16:08:26 -08:00
Fabio Berger
efb6eb28ce Merge pull request #389 from 0xProject/fix/npmInclusionIssues
Fix NPM Inclusion Issues
2018-02-09 14:39:05 -08:00
Fabio Berger
ac5531ce85 Fix changelogs 2018-02-09 14:26:48 -08:00
Fabio Berger
bc2415c70e Add yarn-error.log to all .npmignore 2018-02-09 14:03:08 -08:00
Fabio Berger
0fd411f83f Add PR number to CHANGELOGs 2018-02-09 13:31:01 -08:00
Fabio Berger
b74ad0ad12 ignore all files starting with dots in all sub-packages 2018-02-09 13:28:32 -08:00
Fabio Berger
4c58836735 Remove top level .npmignore 2018-02-09 13:19:30 -08:00
Fabio Berger
3206b80dbd Add npmignore to web3-wrapper and update CHANGELOG 2018-02-09 13:18:49 -08:00
Fabio Berger
4910f7a61e Add npmignore and remove .gitignore 2018-02-09 13:16:16 -08:00
Fabio Berger
6e9109eaec Add npmignore to utils and update CHANGELOG 2018-02-09 13:14:31 -08:00
Fabio Berger
a04ec14cf0 Add npmignore to types and update CHANGELOG 2018-02-09 13:12:33 -08:00
Fabio Berger
7d3df3c117 cleanup npmignorex 2018-02-09 13:09:57 -08:00
Fabio Berger
b3a03f8e3e Add npmignore to subproviders and update CHANGELOG 2018-02-09 13:09:00 -08:00
Fabio Berger
e5668c1e5c Add npmignore to json-schemas and update CHANGELOG 2018-02-09 13:05:21 -08:00
Fabio Berger
92e74bc4fa Add npmignore to dev-utils and update CHANGELOG 2018-02-09 12:56:48 -08:00
Fabio Berger
7e12269baf Add npmignore to deployer along with a changelog 2018-02-09 12:52:12 -08:00
Fabio Berger
f3f264f5fd Add tslint.json to deployer package and fix all tslint issues 2018-02-09 12:50:37 -08:00
Brandon Millman
2e3c9b87df Merge pull request #388 from 0xProject/fix/testnet-faucet/base-unit-orders
Convert to baseUnits in signed order
2018-02-09 12:39:43 -08:00
Fabio Berger
0a113e1cf7 Add npmignore to subpackage and update CHANGELOG 2018-02-09 12:37:28 -08:00
Fabio Berger
fd772c48cf Add npmignore to typings packages 2018-02-09 12:37:18 -08:00
Fabio Berger
1c7dce6054 Add npmignore to subpackage and update CHANGELOG 2018-02-09 12:30:06 -08:00
Jacob Evans
0a2947b860 address is not optional in this context 2018-02-09 12:27:28 -08:00
Fabio Berger
c80877af43 Add npmignore to abi-gen and update CHANGELOG 2018-02-09 12:23:03 -08:00
Jacob Evans
e68b9c7e81 Convert to baseUnits in signed order 2018-02-09 12:20:25 -08:00
Fabio Berger
19198737a5 Add correct npmignore to 0x.js and update CHANGELOG 2018-02-09 12:18:23 -08:00
Brandon Millman
fea4b6aecd Merge pull request #387 from 0xProject/fix/testnet-faucet/ecsignature
Testnet Faucet Order conforming to JSON Schema
2018-02-09 12:01:59 -08:00
Fabio Berger
20e2673b82 Fix issue where custom TSLint rules were not being published to NPM 2018-02-09 11:53:38 -08:00
Jacob Evans
ef1375b9dd signature -> ecSignature 2018-02-09 10:50:38 -08:00
Brandon Millman
58f1939ec1 Merge pull request #382 from 0xProject/feature/clean-post-publish-scripts
Simplify standard postpublish script and remove them from some privat…
2018-02-09 10:19:33 -08:00
Leonid Logvinov
ba57c34adb Use system-independent rm command 2018-02-09 11:49:01 +01:00
Leonid
936f6ac10f Merge pull request #379 from 0xProject/portal_json
Make portal order JSON compatible with 0x.js
2018-02-09 09:27:08 +01:00
Fabio Berger
7e04c4f24b Merge pull request #383 from 0xProject/fix/website/addMoreRelayersLanding
Add relayers section to landing page
2018-02-08 18:41:16 -08:00
Fabio Berger
9495c8f46c Fix links 2018-02-08 18:40:06 -08:00
Fabio Berger
b3f91600d3 Center header above relayers 2018-02-08 17:53:31 -08:00
Fabio Berger
ddf4437fb6 Add blog to topBar and as a consequence support external links in topBar menu items 2018-02-08 17:36:17 -08:00
Fabio Berger
4153d57849 Add title above "benefits" section 2018-02-08 16:27:47 -08:00
Fabio Berger
0652790703 Add Relayer section to landing 2018-02-08 16:27:37 -08:00
Brandon Millman
9c934d903d Add new entries to the PR template checklist 2018-02-08 16:20:02 -08:00
Brandon Millman
d7a7e28925 Fix missing references to 'this' 2018-02-08 12:02:13 -08:00
Brandon Millman
6dec29e214 Simplify standard postpublish script and remove them from some private packages 2018-02-08 11:46:33 -08:00
Leonid Logvinov
43cf8d30bd Implement blockchain.portalOrderToZeroExOrder 2018-02-08 18:28:54 +01:00
Leonid
254d3f53e2 Merge pull request #377 from 0xProject/feature/signed_unsigned_order_contracts
Use SignedOrder and Order types from 0x.js
2018-02-08 18:15:10 +01:00
Leonid Logvinov
ec198343b5 Make naming of schemas consistent 2018-02-08 18:14:52 +01:00
Leonid Logvinov
876517d458 Fix namings 2018-02-08 18:03:55 +01:00
Leonid Logvinov
1233c33116 Address feedback 2018-02-08 16:23:20 +01:00
Fabio Berger
eebf205817 Fix flash message when receiving test ether 2018-02-07 16:58:05 -08:00
Brandon Millman
e666bb44c6 Fix incorrect network ids 2018-02-07 16:05:14 -08:00
Brandon Millman
39cb0b5122 Update @0xproject/utils version in top level package.json 2018-02-07 13:36:48 -08:00
Brandon Millman
58003a2811 Publish
- 0x.js@0.32.1
 - @0xproject/abi-gen@0.2.0
 - @0xproject/assert@0.0.17
 - @0xproject/connect@0.5.6
 - contracts@2.1.10
 - @0xproject/deployer@0.0.7
 - @0xproject/dev-utils@0.0.11
 - @0xproject/json-schemas@0.7.9
 - @0xproject/subproviders@0.4.0
 - @0xproject/testnet-faucets@1.0.11
 - @0xproject/types@0.2.0
 - @0xproject/utils@0.3.1
 - @0xproject/web3-wrapper@0.1.11
 - @0xproject/website@0.0.13
2018-02-07 13:25:39 -08:00
Brandon Millman
7f2a7cfa77 Update CHANGELOGs 2018-02-07 13:19:13 -08:00
Leonid Logvinov
8fba0477a6 Remove hash from signatureData 2018-02-07 20:58:19 +01:00
Fabio Berger
7ca1ba7e1e Fix wiki styling 2018-02-07 11:45:50 -08:00
Leonid Logvinov
e6f2c7a382 Remove networkId from orderJSON 2018-02-07 20:38:30 +01:00
Leonid Logvinov
69f5f5e946 Split Order into signedOrder and metadata 2018-02-07 20:26:13 +01:00
Fabio Berger
68a8acbe7b Merge pull request #374 from 0xProject/feature/website/addOtherTestnetFaucets
Feature/website/add other testnet faucets
2018-02-07 11:21:14 -08:00
Brandon Millman
852811b314 Merge pull request #375 from 0xProject/feature/testnet-faucets/queue-by-network
Organize async task queues by network
2018-02-07 11:16:24 -08:00
Brandon Millman
2404ff0304 Prettier 2018-02-07 11:01:21 -08:00
Brandon Millman
9ff4cacf0f Addressed review comments 2018-02-07 11:00:42 -08:00
Jacob Evans
e443cb2a3b Update Subprovider README 2018-02-07 10:37:34 -08:00
Brandon Millman
f3c6cce455 Merge branch 'development' into feature/testnet-faucets/queue-by-network
* development: (24 commits)
  Fix Remco's github name in CODEOWNERS
  Fix ABI error message
  Stop using definite assignment assertion cause prettier doesn't handle that
  Special-case ZRXToken snake case conversion
  Fix linter errors
  Generate contract wrappers on pre-build
  Add missing async
  Remove noImplicitThis
  Tslint disable no-consecutive-blank-lines in generated files
  Change compiled sources in contracts
  Change utils
  Change tests
  Add base_contract.ts
  Remove generated files
  .gitignore gemerated files
  Change the list of generated wrappers
  Change contract templates
  Add indices for index parameters so that their names don't collide
  Use abi-gen for events in 0x.js
  Fix artifacts path
  ...
2018-02-07 10:27:22 -08:00
Leonid Logvinov
ae14b0a71d Reuse ECSignature 2018-02-07 16:13:09 +01:00
Leonid Logvinov
3c7ebe2697 Remove unused types and take their names 2018-02-07 16:11:51 +01:00
Leonid Logvinov
10fb6061cc Introduce makerToken and takerToken fields for unsigned token metadata 2018-02-07 15:26:53 +01:00
Leonid Logvinov
223df8006a Move .taker.amount to .takerTokenAmount and .maker.amount to .makerTokenAmount 2018-02-07 15:09:06 +01:00
Leonid Logvinov
1c9428cbba Move .taker.feeAmount to .takerFee and .maker.feeAmount to .makerFee 2018-02-07 15:02:41 +01:00
Leonid Logvinov
18dc5d17b5 Rename signature to ecSignature 2018-02-07 14:54:37 +01:00
Leonid Logvinov
4d50933189 Rename exchangeContract to exchangeContractAddress 2018-02-07 14:48:59 +01:00
Leonid Logvinov
9b3680780f Rename expiration to expirationUnixTimestampSec 2018-02-07 14:41:40 +01:00
Leonid
a26e77074f Fix Remco's github name in CODEOWNERS 2018-02-07 13:46:14 +01:00
Leonid Logvinov
568e4d33f2 Use Order and SignedOrder type from 0x.js 2018-02-07 13:41:30 +01:00
Leonid Logvinov
fd004032cb Introduce SignedOrder class and remove type assertions 2018-02-07 12:22:22 +01:00
Leonid Logvinov
4b6324050d Make orderHashHex a getter instead of a property 2018-02-07 11:59:40 +01:00
Leonid
12d62e1157 Merge pull request #368 from 0xProject/feature/abigen/addNetworkId
Add CLI option for networkId, add abi-gen to contracts package
2018-02-07 11:40:06 +01:00
Fabio Berger
063c6b66b6 Only show faucet error if not on a testnet 2018-02-06 17:55:15 -08:00
Brandon Millman
d9b1d31e73 Organize async task queues by network 2018-02-06 17:39:49 -08:00
Leonid Logvinov
0bad911a16 Fix ABI error message 2018-02-06 17:34:45 -08:00
Fabio Berger
518efa8ad2 Move isTestNetwork into utils and also check it from showing ZRX request button 2018-02-06 17:29:10 -08:00
Leonid Logvinov
6e87c9e713 Stop using definite assignment assertion cause prettier doesn't handle that 2018-02-06 17:28:55 -08:00
Leonid Logvinov
b61852b1f5 Special-case ZRXToken snake case conversion 2018-02-06 17:27:47 -08:00
Leonid Logvinov
fcbe24a126 Fix linter errors 2018-02-06 17:27:47 -08:00
Leonid Logvinov
55312d00ef Generate contract wrappers on pre-build 2018-02-06 17:27:47 -08:00
Leonid Logvinov
a96e3f3222 Add missing async 2018-02-06 17:27:47 -08:00
Leonid Logvinov
e35519b50f Remove noImplicitThis 2018-02-06 17:27:47 -08:00
Leonid Logvinov
ae775f9664 Tslint disable no-consecutive-blank-lines in generated files 2018-02-06 17:27:47 -08:00
Leonid Logvinov
071b1c47d1 Change compiled sources in contracts 2018-02-06 17:27:47 -08:00
Leonid Logvinov
4cc5bbaf19 Change utils 2018-02-06 17:27:47 -08:00
Leonid Logvinov
a264c36a48 Change tests 2018-02-06 17:27:47 -08:00
Leonid Logvinov
0c2ab22656 Add base_contract.ts 2018-02-06 17:27:47 -08:00
Leonid Logvinov
47adad5122 Remove generated files 2018-02-06 17:27:47 -08:00
Leonid Logvinov
745f209f7e .gitignore gemerated files 2018-02-06 17:27:47 -08:00
Leonid Logvinov
2287597712 Change the list of generated wrappers 2018-02-06 17:27:47 -08:00
Leonid Logvinov
eea8b15180 Change contract templates 2018-02-06 17:27:47 -08:00
Leonid Logvinov
600a2b40af Add indices for index parameters so that their names don't collide 2018-02-06 17:27:47 -08:00
Leonid Logvinov
a7c51593e4 Use abi-gen for events in 0x.js 2018-02-06 17:27:47 -08:00
Amir Bandeali
218876ac19 Fix artifacts path 2018-02-06 17:26:13 -08:00
Amir Bandeali
6cda67df10 Update compile command and run prettier 2018-02-06 17:26:13 -08:00
Amir Bandeali
897515c002 Add CLI option for networkId, add abi-gen to contracts package 2018-02-06 17:26:12 -08:00
Fabio Berger
9deaf612f1 Remove stray log 2018-02-06 17:25:19 -08:00
Fabio Berger
b7676d8c46 Use isTestNetwork instead of isKovanTestNetwork on balances page except for Dharma integration 2018-02-06 17:23:27 -08:00
Fabio Berger
05aa2fa421 Properly detect Rinkeby and Ropsten TokenRegistry tokens as mintable 2018-02-06 17:23:01 -08:00
Fabio Berger
03f5c9b950 Add networkId to faucet requests so that we can request tokens on Kovan, Rinkeby and Ropsten 2018-02-06 17:22:20 -08:00
Fabio Berger
4c9c4c487a Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Bump subproviders version
  Update yarn.lock
  Change rpcUrls keys back into string literals
  Add types-bn package to 0x.js and testnet-faucets
  Prettier
  Addressed comments and update 0xProject/types-ethereumjs-util deps
  Prettier
  Update testnet-faucets README
  Fix lint errors
  Add order signing and dispensing ability to faucet
2018-02-06 16:26:35 -08:00
Fabio Berger
c172b9e080 Add networkId to event label 2018-02-06 16:25:50 -08:00
Fabio Berger
5533a84dcd Update yarn.lock 2018-02-06 16:25:29 -08:00
Brandon Millman
562bcb8571 Merge pull request #352 from 0xProject/feature/testnet-faucets/order-dispenser
Add order signing and dispensing ability to faucet
2018-02-06 16:15:25 -08:00
Tom Schmidt
00c07b38a4 Merge pull request #370 from 0xProject/feature/ga-portal-logging
Add GA Logging to Portal
2018-02-06 16:01:36 -08:00
Brandon Millman
f44bfa9682 Bump subproviders version 2018-02-06 15:56:40 -08:00
Brandon Millman
7357a0a324 Update yarn.lock 2018-02-06 15:38:23 -08:00
Brandon Millman
36a49966eb Merge branch 'development' into feature/testnet-faucets/order-dispenser
* development:
  Attribute the origins of NonceTracker
  Move BlockParamLiteral to shared types package
  Fixes
  Move BlockParam and BlockParamLiteral to shared types
  Rename called to something more readable
  Newline prettier/lint
  Yarn.lock
  Refactor tests for reuse of the fixture subprovider
  Remove re-fetch of transaction count on error
  Disable linter for multiple class declarations
  Remove double declaration
  Enable CIRCLECI and declare web3
  Test faucets to use new NonceTracker
  Update changelog
  Readability and prettier
  Prettify
  Nonce tracker subprovider Caches the nonce when a request to getTransactionCount is made and increments the pending nonce after successful transactions
2018-02-06 15:36:00 -08:00
Brandon Millman
f818d06b43 Change rpcUrls keys back into string literals 2018-02-06 15:31:12 -08:00
Jacob Evans
548246c05f Merge pull request #355 from 0xProject/feature/subproviders/nonce-tracker
Nonce tracker subprovider
2018-02-06 15:29:19 -08:00
Brandon Millman
2bf1aa975a Add types-bn package to 0x.js and testnet-faucets 2018-02-06 15:24:11 -08:00
Jacob Evans
4be8eca3fe Attribute the origins of NonceTracker
NonceTrackerSubprovider is inspired from Web3ProviderEngine NonceTracker
2018-02-06 15:16:28 -08:00
Jacob Evans
e17ace397c Move BlockParamLiteral to shared types package
Also BlockParam
2018-02-06 13:17:14 -08:00
Brandon Millman
6bdabe72b9 Prettier 2018-02-06 11:48:56 -08:00
Thomas Schmidt
00bfc7f889 Added logging for order filling and order cancelling 2018-02-06 11:47:24 -08:00
Brandon Millman
5fcb77e591 Merge branch 'development' into feature/testnet-faucets/order-dispenser
* development:
  Update utils in top level package to 0.3.0
  Add 0.2.0 back to yarn lock
  Reword comment on any
  Link to the wiki article in the README
  Justify the any usage
  Publish
  Revert "Temp"
  Changelog
  Change the InjectedWeb3Subprovider to accept Web3.Provider
2018-02-06 11:45:55 -08:00
Jacob Evans
df8de7ff51 Fixes
Rename to isFirstGetTransactionCount
assign nextPrefixedHexNonce as a const
2018-02-06 11:34:22 -08:00
Jacob Evans
67d7540907 Move BlockParam and BlockParamLiteral to shared types 2018-02-06 11:27:11 -08:00
Brandon Millman
83d0bad3a1 Addressed comments and update 0xProject/types-ethereumjs-util deps 2018-02-05 18:11:26 -08:00
Thomas Schmidt
9d80a62bb1 Moved to async await 2018-02-05 18:02:05 -08:00
Jacob Evans
629653425d Update utils in top level package to 0.3.0 2018-02-05 17:58:30 -08:00
Jacob Evans
03ce1d8641 Add 0.2.0 back to yarn lock 2018-02-05 17:47:10 -08:00
Jacob Evans
225baeb5cb Merge branch 'development' into feature/subproviders/nonce-tracker 2018-02-05 17:22:45 -08:00
Jacob Evans
cf171d28c7 Reword comment on any 2018-02-05 17:20:45 -08:00
Jacob Evans
61434a9121 Merge pull request #363 from 0xProject/refactor/subproviders/injected-provider-constructor
Change the InjectedWeb3Subprovider to accept Web3.Provider
2018-02-05 17:16:34 -08:00
Jacob Evans
20590b7d35 Rename called to something more readable 2018-02-05 17:11:45 -08:00
Jacob Evans
fce7081215 Newline prettier/lint 2018-02-05 16:57:27 -08:00
Thomas Schmidt
83c7c8110d Formatting and removed old GA code 2018-02-05 16:56:53 -08:00
Jacob Evans
c4680a97a8 Yarn.lock 2018-02-05 16:47:31 -08:00
Thomas Schmidt
91a5bcf380 Converted BigNumber to number for GA logging 2018-02-05 16:43:50 -08:00
Jacob Evans
7e9ae458e2 Merge branch 'development' into feature/subproviders/nonce-tracker 2018-02-05 16:36:46 -08:00
Jacob Evans
4e284f5e6c Refactor tests for reuse of the fixture subprovider 2018-02-05 16:32:43 -08:00
Thomas Schmidt
75ded89790 GA logging for order creation 2018-02-05 16:20:53 -08:00
Thomas Schmidt
598ce0d401 Switch GA to React GA and add logging for Portal 2018-02-05 15:57:29 -08:00
Jacob Evans
fc3058c1e2 Remove re-fetch of transaction count on error 2018-02-05 14:27:58 -08:00
Jacob Evans
d14ae70776 Link to the wiki article in the README 2018-02-05 13:55:01 -08:00
Jacob Evans
882816d609 Justify the any usage 2018-02-05 13:46:59 -08:00
Leonid Logvinov
2205e2b9a0 Publish
- 0x.js@0.32.0
 - @0xproject/abi-gen@0.1.7
 - @0xproject/assert@0.0.16
 - @0xproject/connect@0.5.5
 - contracts@2.1.9
 - @0xproject/deployer@0.0.6
 - @0xproject/dev-utils@0.0.10
 - @0xproject/json-schemas@0.7.8
 - @0xproject/monorepo-scripts@0.1.9
 - @0xproject/subproviders@0.3.6
 - @0xproject/testnet-faucets@1.0.10
 - @0xproject/tslint-config@0.4.7
 - @0xproject/types@0.1.9
 - @0xproject/utils@0.3.0
 - web3-typescript-typings@0.9.9
 - @0xproject/web3-wrapper@0.1.10
 - @0xproject/website@0.0.12
2018-02-05 22:29:42 +01:00
Leonid Logvinov
855fdd7921 Revert "Temp"
This reverts commit 881d32e733.
2018-02-05 22:26:50 +01:00
Brandon Millman
99b1f81e89 Merge branch 'development' into feature/testnet-faucets/order-dispenser
* development: (37 commits)
  Add dates to CHANGELOGs
  Change CHANGELOGs
  Add .editorconfig
  Fix a typo
  Temp
  Use forEach instead of map
  Add PR number
  Fix an exception when a signature collision happens
  Fix prettier
  Add regression tests
  Improve the comment and fix an exception
  Add missing comas
  Lerna-ignore tslint and tsconfig
  Update contract versions, fix tests
  Rename directories
  Rename previous contracts, fix imports, add nested file structure
  Move all contracts into a single directory
  Update import
  Fix import
  Get rid of suffixed contract versioning and replace it with a poor-mans package manager. Versions are stored locally, and are generated in a copy-on-write basis as required
  ...
2018-02-05 13:16:46 -08:00
Leonid Logvinov
46ad7b1b38 Add dates to CHANGELOGs 2018-02-05 22:04:03 +01:00
Leonid Logvinov
7e5b7a7f2a Merge branch 'development' of github.com:0xProject/0x.js into development 2018-02-05 21:56:41 +01:00
Leonid
156e85a6b3 Merge pull request #366 from 0xProject/fix/abi_decoder_colision
Fix an exception when a signature collision happens
2018-02-05 21:56:04 +01:00
Leonid Logvinov
6fce02d25e Change CHANGELOGs 2018-02-05 21:53:41 +01:00
Remco Bloemen
4ddb86df53 Merge pull request #360 from 0xProject/feature/editorconfig
Add .editorconfig
2018-02-05 11:31:06 -08:00
Leonid
3565e96f42 Merge branch 'development' into fix/abi_decoder_colision 2018-02-05 19:31:37 +01:00
Leonid
2c7db23022 Merge pull request #350 from 0xProject/fix/ether_token_address
Add zeroEx.etherToken.getContractAddressIfExists
2018-02-05 19:27:20 +01:00
Remco Bloemen
fe51c9a9a2 Add .editorconfig 2018-02-05 10:25:05 -08:00
Leonid Logvinov
5324dfa5a7 Fix a typo 2018-02-05 19:13:09 +01:00
Leonid Logvinov
881d32e733 Temp 2018-02-05 19:10:17 +01:00
Leonid Logvinov
1f4cbb7479 Use forEach instead of map 2018-02-05 13:04:49 +01:00
Leonid Logvinov
b17bbdaa7d Add PR number 2018-02-05 13:01:53 +01:00
Leonid Logvinov
5458a1c1b7 Fix an exception when a signature collision happens 2018-02-05 12:59:10 +01:00
Leonid Logvinov
fa98450754 Fix prettier 2018-02-05 12:49:57 +01:00
Leonid
7b4f2b47de Merge branch 'development' into fix/ether_token_address 2018-02-05 12:33:40 +01:00
Leonid Logvinov
400a97e7a8 Add regression tests 2018-02-05 12:32:59 +01:00
Leonid Logvinov
a816fb5958 Improve the comment and fix an exception 2018-02-05 12:28:27 +01:00
Leonid
c7ad6ebad6 Merge pull request #358 from 0xProject/feature/build_watch
Add build:watch command to all TS packages
2018-02-05 12:03:36 +01:00
Leonid Logvinov
85b4a82a4b Add missing comas 2018-02-05 12:03:13 +01:00
Leonid
f18fa8e947 Merge branch 'development' into feature/build_watch 2018-02-05 12:00:05 +01:00
Leonid
44cd185c66 Merge pull request #356 from 0xProject/lerna-ignore
Ignore test files and markdown files changes on publish
2018-02-05 11:26:31 +01:00
Leonid Logvinov
890f414b5a Lerna-ignore tslint and tsconfig 2018-02-05 11:25:59 +01:00
Leonid
03b1b12ef1 Merge pull request #359 from 0xProject/feature/ts-2.7
TS 2.7
2018-02-05 11:24:36 +01:00
Jacob Evans
dae6f28f8a Disable linter for multiple class declarations 2018-02-02 15:07:10 -08:00
Jacob Evans
5aca3a2d7d Changelog 2018-02-02 14:53:44 -08:00
Jacob Evans
7f257e258f Change the InjectedWeb3Subprovider to accept Web3.Provider 2018-02-02 14:44:29 -08:00
Amir Bandeali
6a9d3de0f9 Merge pull request #329 from 0xProject/feature/contracts/versioning
Implement stop-gap smart contract versioning
2018-02-02 10:57:18 -08:00
Amir Bandeali
05aae36813 Update contract versions, fix tests 2018-02-02 09:41:19 -08:00
Amir Bandeali
d5d6079b67 Rename directories 2018-02-02 09:39:08 -08:00
Amir Bandeali
bb4c8bf8eb Rename previous contracts, fix imports, add nested file structure 2018-02-02 09:39:08 -08:00
Fabio Berger
3eb40db498 Move all contracts into a single directory 2018-02-02 09:39:08 -08:00
Fabio Berger
576f63d5e4 Update import 2018-02-02 09:39:08 -08:00
Fabio Berger
cda1dc82e9 Fix import 2018-02-02 09:39:08 -08:00
Fabio Berger
2721252d6a Get rid of suffixed contract versioning and replace it with a poor-mans package manager. Versions are stored locally, and are generated in a copy-on-write basis as required 2018-02-02 09:39:08 -08:00
Leonid Logvinov
45ac960308 Add build:watch to README's 2018-02-02 12:42:19 +01:00
Leonid
47d74aa24a Merge pull request #361 from 0xProject/feature/deployer/solc-0.4.19
Add solc 0.4.19
2018-02-02 12:29:58 +01:00
Jacob Evans
48aa1ad57d Remove double declaration 2018-02-01 18:43:32 -08:00
Jacob Evans
2eccb28dee Enable CIRCLECI and declare web3 2018-02-01 17:08:19 -08:00
Brandon Millman
9c3bfd920f Add CODEOWNERS file for automatically adding reviewers to PRs 2018-02-01 16:31:00 -08:00
Jacob Evans
76eb1e9e7f Test faucets to use new NonceTracker 2018-02-02 11:26:49 +11:00
Jacob Evans
b7af597668 Update changelog 2018-02-02 11:06:56 +11:00
Jacob Evans
d635559a30 Readability and prettier 2018-02-02 11:06:23 +11:00
Jacob Evans
58dd90b7b7 Prettify 2018-02-02 11:06:22 +11:00
Jacob Evans
ead990a734 Nonce tracker subprovider
Caches the nonce when a request to getTransactionCount is made
and increments the pending nonce after successful transactions
2018-02-02 11:06:22 +11:00
Remco Bloemen
27400fcd5b Add solc 0.4.19 2018-02-01 15:46:38 -08:00
Leonid Logvinov
d4631e14b2 Publish
- 0x.js@0.31.1
 - @0xproject/abi-gen@0.1.6
 - @0xproject/assert@0.0.15
 - chai-as-promised-typescript-typings@0.0.8
 - @0xproject/connect@0.5.4
 - contracts@2.1.8
 - @0xproject/deployer@0.0.5
 - @0xproject/dev-utils@0.0.9
 - @0xproject/json-schemas@0.7.7
 - @0xproject/monorepo-scripts@0.1.8
 - @0xproject/subproviders@0.3.5
 - @0xproject/testnet-faucets@1.0.9
 - @0xproject/tslint-config@0.4.6
 - @0xproject/types@0.1.8
 - @0xproject/utils@0.2.4
 - web3-typescript-typings@0.9.8
 - @0xproject/web3-wrapper@0.1.9
 - @0xproject/website@0.0.11
2018-02-01 16:39:06 +01:00
Leonid Logvinov
8df2cc103e Fix linter errors 2018-02-01 16:29:16 +01:00
Leonid Logvinov
8e0e9c7d3a Update changelog 2018-02-01 16:27:12 +01:00
Leonid
913930b561 Merge pull request #357 from ERCdEX/luke/zrx_order_watch_cache
BUGFIX: don't remove maker/zrx order from cache twice
2018-02-01 16:25:25 +01:00
Leonid Logvinov
994c8db1f3 Add OrderWatcherConfig to the list of public types 2018-02-01 13:01:10 +01:00
Leonid Logvinov
0c6cbb66b1 Lerna ignore scripts and lib 2018-02-01 12:56:46 +01:00
Leonid Logvinov
f09393d4f4 Ignore test files and markdown files changes on publish 2018-02-01 12:56:10 +01:00
Leonid Logvinov
f6d963d45a Fix errors after TS upgrade 2018-02-01 12:51:04 +01:00
Leonid Logvinov
39e3733be4 Upgrade TS to the newest version 2018-02-01 12:50:55 +01:00
Leonid Logvinov
09659cc304 Add build:watch command to all TS packages 2018-02-01 12:32:05 +01:00
Luke Autry
6811bdec40 don't remove maker/zrx order from cache twice 2018-01-31 22:56:05 -05:00
Brandon Millman
6577d60733 Prettier 2018-01-31 15:52:05 -08:00
Brandon Millman
c7db837214 Update testnet-faucets README 2018-01-31 15:40:13 -08:00
Brandon Millman
03cb7233dc Merge branch 'development' into feature/testnet-faucets/order-dispenser
* development: (49 commits)
  Prettier
  Updated contract generation in 0x to new abi-gen CLI
  Add PR number to changelog
  Fix lint errors
  Removed deprecated CLI options
  Add protected keyword to underscore lint rule
  Remove unused prop
  Fix prettier
  Uppercase Networks enum values
  Make default gasPrice more readable
  Fix prettier mess
  Fix linter errors
  Shrink img
  Fix all setState calls after unmounted errors. Decided to create our own flag rather then using a cancellablePromise since there was little to be gained from this alternative
  Fix bug where we were return undefined instead of the empty object
  Default the derivation path to that found in the Ledger subprovider
  Add browser data to dialog info
  Add Rinkeby support
  Pass in whether we want the personal message prefix appended and never append it for Ledger. This fixes signing when Ledger is used and the backing node is not Parity
  Wholesale replace the tokenByAddress and de-dup properly
  ...
2018-01-31 15:30:09 -08:00
Brandon Millman
6682abf89d Merge pull request #354 from 0xProject/feature/tslint-config/underscore-protected-members
Modify lint rules to enforce underscore for protected members
2018-01-31 14:55:50 -08:00
Brandon Millman
78fbf0f7ba Prettier 2018-01-31 14:41:37 -08:00
Brandon Millman
89547332ee Merge branch 'development' into feature/tslint-config/underscore-protected-members
* development:
  Updated contract generation in 0x to new abi-gen CLI
  Removed deprecated CLI options
  Added PR # to the changelog of abi-gen
  Added CLI options for explicit specifying location of partials and main template
2018-01-31 12:38:12 -08:00
Leonid
75539bf675 Merge pull request #346 from joincivil/feature/abi-gen-partials
Added CLI options for explicit specifying location of partials and main template
2018-01-31 14:50:25 +01:00
Olaf Tomalka
eaeb715e56 Updated contract generation in 0x to new abi-gen CLI 2018-01-31 14:24:20 +01:00
Brandon Millman
ca55cc99ed Add PR number to changelog 2018-01-30 16:48:40 -08:00
Brandon Millman
7cc4a8f5ce Fix lint errors 2018-01-30 16:26:42 -08:00
Olaf Tomalka
fa35768fc9 Removed deprecated CLI options 2018-01-31 00:41:58 +01:00
Brandon Millman
4d0ff0dce4 Add protected keyword to underscore lint rule 2018-01-30 14:02:13 -08:00
Fabio Berger
8aac6e46d4 Remove unused prop 2018-01-30 21:34:13 +01:00
Fabio Berger
1feac1a308 Merge pull request #351 from 0xProject/feature/portal-ledger-support
Portal Ledger Support, Lazy-loading token balances/allowances
2018-01-30 21:27:21 +01:00
Fabio Berger
d3e42e4b3e Fix prettier 2018-01-30 21:16:47 +01:00
Brandon Millman
3a1ca32ff1 Fix lint errors 2018-01-30 12:10:06 -08:00
Fabio Berger
ecf86d1d13 Uppercase Networks enum values 2018-01-30 21:01:16 +01:00
Fabio Berger
adc6170f02 Make default gasPrice more readable 2018-01-30 20:53:22 +01:00
Fabio Berger
02600f40d2 Fix prettier mess 2018-01-30 20:53:09 +01:00
Fabio Berger
16ea0348a9 Fix linter errors 2018-01-30 20:45:09 +01:00
Brandon Millman
44162811bd Add order signing and dispensing ability to faucet 2018-01-30 11:36:39 -08:00
Fabio Berger
57acb8db5c Shrink img 2018-01-30 20:28:15 +01:00
Leonid
2bcb7d5639 Merge pull request #332 from 0xProject/feature/contracts-abi-gen
Contracts refactor. Bye, truffle!!! 👏
2018-01-30 20:27:14 +01:00
Fabio Berger
a99e54330a Merge branch 'development' into feature/portal-ledger-support
* development:
  Prettierignore package.json
  Enable solidity syntax highlighting
2018-01-30 20:13:02 +01:00
Fabio Berger
e219772b2a Fix all setState calls after unmounted errors. Decided to create our own flag rather then using a cancellablePromise since there was little to be gained from this alternative 2018-01-30 20:12:32 +01:00
Fabio Berger
144a507a2e Fix bug where we were return undefined instead of the empty object 2018-01-30 20:11:18 +01:00
Fabio Berger
5019c51940 Default the derivation path to that found in the Ledger subprovider 2018-01-30 20:10:51 +01:00
Fabio Berger
da1071526f Add browser data to dialog info 2018-01-30 19:03:10 +01:00
Leonid Logvinov
7ad314472d Change order 2018-01-30 16:33:52 +01:00
Leonid Logvinov
4f6168a982 Separate npm scripts in contracts 2018-01-30 16:01:37 +01:00
Leonid Logvinov
218a872968 Remove a semicolon 2018-01-30 16:01:37 +01:00
Leonid Logvinov
0043c5e1ac Fix glob patterns 2018-01-30 16:01:37 +01:00
Leonid Logvinov
d0e7046a89 Remove constructor arg 2018-01-30 16:01:37 +01:00
Leonid Logvinov
52ad16b920 Remove authorized address magic from tests 2018-01-30 16:01:37 +01:00
Leonid Logvinov
5a4c0bff6a Remove accounts magic from tests 2018-01-30 16:01:37 +01:00
Leonid Logvinov
6205209fbb Make an RPC constructor param implicit 2018-01-30 16:01:37 +01:00
Leonid Logvinov
6ebf8a57d1 Remove no-unused-variabe rule 2018-01-30 16:01:37 +01:00
Leonid Logvinov
c02dfc4fb1 Fix tslint issues 2018-01-30 16:01:37 +01:00
Leonid Logvinov
9d62e5fb6f Use an enum for contract name 2018-01-30 16:01:37 +01:00
Leonid Logvinov
6f13d107c4 Remove promisified web3 functions from tests 2018-01-30 16:01:37 +01:00
Leonid Logvinov
e56b2ceebb Remove truffle as a dependency 2018-01-30 16:01:37 +01:00
Leonid Logvinov
7de244ed62 Fix prettier 2018-01-30 16:01:37 +01:00
Leonid Logvinov
1e9147b8bb Normalize the dependencies 2018-01-30 16:01:37 +01:00
Leonid Logvinov
2f65fadeaa Add --bail to mocha config 2018-01-30 16:01:37 +01:00
Leonid Logvinov
a17091b394 Make awaitTransactionMinedAsync non-generic again 2018-01-30 16:01:36 +01:00
Leonid Logvinov
ed77c6cb54 Add back the artifacts 2018-01-30 16:01:36 +01:00
Leonid Logvinov
bc37cc8a91 Remove duplicate code 2018-01-30 16:01:36 +01:00
Leonid Logvinov
387363283c Remove truffle from tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
709026bf1a Refactor contracts tests to not use injected web3 instance 2018-01-30 16:01:36 +01:00
Leonid Logvinov
f2b2b86786 Remove truffle from Exchange tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
d0fbea76d8 Remove truffle from ZRXToken tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
8269610a5c Remove truffle from UnlimitedAllowanceToken tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
20c88a46d9 Remove truffle from UnlimitedAllowanceTokenV2 tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
661029f7cc Remove truffle from TokenRegistry tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
850d32d60c Remove truffle from MultiSigWalletWithTimeLock tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
eb881b9729 Remove truffle from MultiSigWalletWithTimeLockExceptRemoveAuthAddr tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
091ba473ff Remove truffle from Ether Token tests 2018-01-30 16:01:36 +01:00
Leonid Logvinov
fca051c565 Remove truffle from tokenTransferProxy tests 2018-01-30 16:01:35 +01:00
Leonid Logvinov
6463cda204 Remove truffle from tokenTransferProxy tests 2018-01-30 16:01:35 +01:00
Leonid Logvinov
d004df56e3 Prettierignore package.json 2018-01-30 16:00:29 +01:00
Leonid Logvinov
359dd482c4 Enable solidity syntax highlighting 2018-01-30 15:46:37 +01:00
Fabio Berger
89e98240b4 Add Rinkeby support 2018-01-30 15:05:55 +01:00
Leonid Logvinov
1c1f2ef1ff Fix PR template 2018-01-30 15:05:16 +01:00
Leonid Logvinov
4fa774f866 Update CHANGELOG 2018-01-30 15:04:42 +01:00
Leonid Logvinov
4671999ea0 Fix linter errors 2018-01-30 14:54:10 +01:00
Leonid Logvinov
0a73bbe279 Add zeroEx.etherToken.getContractAddressifExists 2018-01-30 14:35:04 +01:00
Fabio Berger
8d30058a6d Pass in whether we want the personal message prefix appended and never append it for Ledger. This fixes signing when Ledger is used and the backing node is not Parity 2018-01-30 14:19:58 +01:00
Fabio Berger
69151c06e4 Merge branch 'development' into feature/portal-ledger-support
* development:
  Publish
  Add PR number
  Add config file specifically in prettier command and fix files
  Fix prettier
  Fix prettier
  Add shouldAddPersonalMessagePrefix param to signOrderHashAsync instead of trying to infer whether to add it or not from the nodeVersion
  Publish
  Move @0xproject/types to dependencies
  Updated web3-typescript-typings changelog
  Fixed getTransactionReceipt not returning null
  Run prettier
  Update changelog
  Add Rinkeby addresses to artifacts
  Fix bad merge on package.json
  Respond to GH comments and add /info endpoint
  Change package name to @0xproject/testnet-faucets
  Implement testnet faucets for any testnet available via infura
  Rename to testnet-faucets
  Add to the Pull Request Template
  Create an ISSUE TEMPLATE
2018-01-30 14:00:35 +01:00
Fabio Berger
2e3c02887e Publish
- 0x.js@0.31.0
 - @0xproject/abi-gen@0.1.5
 - @0xproject/assert@0.0.14
 - chai-as-promised-typescript-typings@0.0.7
 - @0xproject/connect@0.5.3
 - contracts@2.1.7
 - @0xproject/deployer@0.0.4
 - @0xproject/dev-utils@0.0.8
 - @0xproject/json-schemas@0.7.6
 - @0xproject/monorepo-scripts@0.1.7
 - @0xproject/subproviders@0.3.4
 - @0xproject/testnet-faucets@1.0.8
 - @0xproject/tslint-config@0.4.5
 - @0xproject/types@0.1.7
 - @0xproject/utils@0.2.3
 - web3-typescript-typings@0.9.7
 - @0xproject/web3-wrapper@0.1.8
 - @0xproject/website@0.0.10
2018-01-30 13:54:36 +01:00
Fabio Berger
7603cef308 Merge pull request #349 from 0xProject/fix/0x.js/signOrderHash
Add shouldAddPersonalMessagePrefix param to signOrderHashAsync
2018-01-30 13:45:44 +01:00
Fabio Berger
be370c4e19 Add PR number 2018-01-30 13:45:20 +01:00
Fabio Berger
c6dece6bd1 Add config file specifically in prettier command and fix files 2018-01-30 13:26:46 +01:00
Fabio Berger
93a5b3f457 Fix prettier 2018-01-30 13:21:01 +01:00
Fabio Berger
4242176d29 Fix prettier 2018-01-30 13:16:31 +01:00
Fabio Berger
1cadbeed88 Add shouldAddPersonalMessagePrefix param to signOrderHashAsync instead of trying to infer whether to add it or not from the nodeVersion 2018-01-30 12:38:44 +01:00
Fabio Berger
86cc011212 Wholesale replace the tokenByAddress and de-dup properly 2018-01-30 11:16:13 +01:00
Fabio Berger
c0facfc28f Call destroy ealier so that web3Wrapper stops polling for userAddress/networkId updates before we prep for the batchDispatch 2018-01-30 11:15:36 +01:00
Jacob Evans
ad52a82190 Merge pull request #335 from 0xProject/feature/issue-template
Issue/Pull Request Template
2018-01-30 11:34:41 +11:00
Leonid Logvinov
60b6ed514f Publish
- 0x.js@0.30.2
 - @0xproject/abi-gen@0.1.4
 - @0xproject/assert@0.0.13
 - chai-as-promised-typescript-typings@0.0.6
 - @0xproject/connect@0.5.2
 - contracts@2.1.6
 - @0xproject/deployer@0.0.3
 - @0xproject/dev-utils@0.0.7
 - @0xproject/json-schemas@0.7.5
 - @0xproject/monorepo-scripts@0.1.6
 - @0xproject/subproviders@0.3.3
 - @0xproject/testnet-faucets@1.0.7
 - @0xproject/tslint-config@0.4.4
 - @0xproject/types@0.1.6
 - @0xproject/utils@0.2.2
 - web3-typescript-typings@0.9.6
 - @0xproject/web3-wrapper@0.1.7
 - @0xproject/website@0.0.9
2018-01-29 21:19:40 +01:00
Leonid Logvinov
ef32822b31 Move @0xproject/types to dependencies 2018-01-29 21:16:10 +01:00
Fabio Berger
bb0cedd2de Disallow negative amounts 2018-01-29 18:35:06 +01:00
Fabio Berger
8175c7c085 Remove the ability to clear tokenByAddress. It should simply be updated. 2018-01-29 17:56:35 +01:00
Fabio Berger
5c2d725721 Use live backend on development 2018-01-29 16:38:30 +01:00
Fabio Berger
72571628da Fetch default gasPrice from our ethGasStation API mirror and set it for all transactions 2018-01-29 16:38:05 +01:00
Fabio Berger
fa6130c907 remove unused type 2018-01-29 14:10:57 +01:00
Fabio Berger
8ccdd54974 Small improvements 2018-01-29 13:57:05 +01:00
Fabio Berger
6c1409b00d Fix bug related to balance/allowance fetching being async 2018-01-29 13:25:51 +01:00
Fabio Berger
542a1a11b9 Add missing entries for Ropsten and Rinkeby testnets, added Ropsten to Ledger network dropdown 2018-01-29 13:16:40 +01:00
Fabio Berger
63ffa80c5c Re-set Ledger config dialog to connect step if dialog is closed 2018-01-29 12:46:07 +01:00
Fabio Berger
609342be7a Add flash message instructing user to confirm tx on Ledger 2018-01-29 12:45:50 +01:00
Fabio Berger
52394884da Add the stack trace to help with debugging 2018-01-29 12:11:05 +01:00
Fabio Berger
af08177f79 Make it such that users can switch between Ledger accounts without first switching back to an injected provider 2018-01-29 12:10:49 +01:00
Fabio Berger
45fdfc2d3d Use colors module and remove in-lined colors 2018-01-29 10:55:53 +01:00
Fabio Berger
d18554e0e8 Replace heavy loading animation with simple circular loader 2018-01-29 10:46:15 +01:00
Fabio Berger
3c3f9ca85b Add network name to the select provider 2018-01-29 10:44:30 +01:00
Fabio Berger
005a02efeb Fix bug where could not switch to Ledger and back 2018-01-28 17:45:20 +01:00
Fabio Berger
6206ebc994 Implement just-in-time loading of token balances & allowances 2018-01-28 16:19:55 +01:00
Fabio Berger
dd9f5adc2e Initial Ledger support implementation 2018-01-28 10:29:15 +01:00
Fabio Berger
748d805a32 Remove unused Ledgerco import 2018-01-28 10:28:53 +01:00
Fabio Berger
4b59bf01b3 Add light blue as our accent color 2018-01-28 10:28:34 +01:00
Fabio Berger
b4faa4851a Properly detect user signing cancellation on Metamask, Parity signer and Ledger 2018-01-28 10:28:17 +01:00
Olaf Tomalka
f37fcc147c Added PR # to the changelog of abi-gen 2018-01-26 18:30:10 +01:00
Olaf Tomalka
dc5694e544 Added CLI options for explicit specifying location of partials and main template 2018-01-26 18:22:32 +01:00
Amir Bandeali
e588f6f8c3 Merge pull request #338 from joincivil/feature/transaction-receipt
Fix getTransactionReceipt not returning null
2018-01-26 09:04:18 -08:00
Olaf Tomalka
d227f2ad7c Updated web3-typescript-typings changelog 2018-01-25 23:53:38 +01:00
Olaf Tomalka
97c228031a Fixed getTransactionReceipt not returning null 2018-01-25 23:52:24 +01:00
Amir Bandeali
ad85011d62 Merge pull request #337 from 0xProject/feature/0x.js/update-artifacts
Add Rinkeby addresses to artifacts
2018-01-25 12:03:58 -08:00
Amir Bandeali
a70379625d Run prettier 2018-01-25 10:55:06 -08:00
Amir Bandeali
7350333129 Update changelog 2018-01-25 10:53:44 -08:00
Amir Bandeali
216420fdc5 Add Rinkeby addresses to artifacts 2018-01-25 10:53:44 -08:00
Brandon Millman
c559fbbe8c Merge pull request #339 from 0xProject/feature/kovan-faucets/all-testnet-support
Add support for all testnets to the faucet
2018-01-25 10:48:41 -08:00
Fabio Berger
71d68f975c Merge branch 'development' into feature/portal-ledger-support
* development: (437 commits)
  Publish
  Update yarn.lock
  Update the CHANGELOG
  Fix the bug making it impossible to specify the custom ZRX address
  Fix fill/cancel order by looking for NoError instead of empty blockchainErr given the BlockchainErrs type refactor
  Add a comment about a yarn bug
  Add our mainnet and kovan nodes as backups for Portal requests
  Fix bug hiding the user info from topBar
  Add dev-utils package to top level README
  Prettier newline
  Prettier
  Allow Token symbols to be alphanumeric
  Update CHANGELOG, rebase on development
  Should not -> cannot
  Reject negative amounts in isValidBaseUnitAmount
  Re-add changelog for 0x.js
  Fix prettier
  Update yarn.lock
  Move tests to a separate folder
  Change file layout
  ...

# Conflicts:
#	packages/website/README.md
2018-01-25 16:42:58 +01:00
Brandon Millman
390534497e Fix bad merge on package.json 2018-01-24 22:33:33 -08:00
Brandon Millman
3f0ec89f11 Merge branch 'development' into feature/kovan-faucets/all-testnet-support
* development:
  Publish
  Update yarn.lock
  Update the CHANGELOG
  Fix the bug making it impossible to specify the custom ZRX address
2018-01-24 17:13:16 -08:00
Brandon Millman
d3aa4f2bc7 Respond to GH comments and add /info endpoint 2018-01-24 17:11:14 -08:00
Leonid Logvinov
f58f0ddb67 Publish
- 0x.js@0.30.1
 - @0xproject/abi-gen@0.1.3
 - @0xproject/assert@0.0.12
 - chai-as-promised-typescript-typings@0.0.5
 - @0xproject/connect@0.5.1
 - contracts@2.1.5
 - @0xproject/deployer@0.0.2
 - @0xproject/dev-utils@0.0.6
 - @0xproject/json-schemas@0.7.4
 - @0xproject/kovan_faucets@1.0.6
 - @0xproject/monorepo-scripts@0.1.5
 - @0xproject/subproviders@0.3.2
 - @0xproject/tslint-config@0.4.3
 - @0xproject/types@0.1.5
 - @0xproject/utils@0.2.1
 - web3-typescript-typings@0.9.5
 - @0xproject/web3-wrapper@0.1.6
 - @0xproject/website@0.0.8
2018-01-24 17:02:13 +01:00
Leonid Logvinov
633e3129d4 Update yarn.lock 2018-01-24 17:01:27 +01:00
Leonid
877bdce4c8 Merge pull request #341 from 0xProject/fix/zrx-address
Fix the bug making it impossible to specify the custom ZRX address
2018-01-24 15:25:29 +01:00
Leonid Logvinov
6e1fbd2d97 Update the CHANGELOG 2018-01-24 15:20:03 +01:00
Leonid Logvinov
36bfe62a8f Fix the bug making it impossible to specify the custom ZRX address 2018-01-24 15:17:56 +01:00
Brandon Millman
b08bd0f9ab Change package name to @0xproject/testnet-faucets 2018-01-23 18:02:30 -08:00
Brandon Millman
3998b47d84 Implement testnet faucets for any testnet available via infura 2018-01-23 17:42:35 -08:00
Brandon Millman
d965fdb11d Rename to testnet-faucets 2018-01-23 10:10:43 -08:00
Jacob Evans
ddb64b3ec1 Add to the Pull Request Template 2018-01-23 14:43:25 +11:00
Jacob Evans
5055ec8617 Create an ISSUE TEMPLATE 2018-01-23 14:31:10 +11:00
Fabio Berger
8a858501f2 Fix fill/cancel order by looking for NoError instead of empty blockchainErr given the BlockchainErrs type refactor 2018-01-21 17:48:32 +01:00
Leonid
e1af25c8a6 Merge pull request #323 from 0xProject/feature/separate-deployer
Move deployer to a separate package
2018-01-19 13:43:32 +01:00
Leonid
6091f818da Merge branch 'development' into feature/separate-deployer 2018-01-19 13:39:57 +01:00
Leonid Logvinov
a45f9b4802 Add a comment about a yarn bug 2018-01-19 13:37:41 +01:00
Fabio Berger
9ccf63b44a Add our mainnet and kovan nodes as backups for Portal requests 2018-01-19 11:33:35 +08:00
Fabio Berger
d34135ae43 Fix bug hiding the user info from topBar 2018-01-19 11:26:03 +08:00
Jacob Evans
a81f6f9ad1 Merge pull request #328 from 0xProject/fix/website/alphanumeric-token-symbol
Allow Token symbols to be alphanumeric
2018-01-19 13:41:29 +11:00
Brandon Millman
8a80b10cc2 Add dev-utils package to top level README 2018-01-18 17:23:29 -08:00
Jacob Evans
22b1ee132a Merge pull request #324 from 0xProject/fix/0x.js/negativeFillValues
Reject negative amounts in public methods
2018-01-19 12:19:14 +11:00
Jacob Evans
ab7f681f15 Prettier newline 2018-01-19 11:35:02 +11:00
Jacob Evans
2ac806ef08 Prettier 2018-01-19 10:51:57 +11:00
Jacob Evans
13ec8ed03c Allow Token symbols to be alphanumeric 2018-01-19 10:42:37 +11:00
Jacob Evans
fb77817c2d Update CHANGELOG, rebase on development 2018-01-19 10:33:25 +11:00
Jacob Evans
ceb8a492b1 Should not -> cannot 2018-01-19 10:31:06 +11:00
Jacob Evans
cfc868bf4d Reject negative amounts in isValidBaseUnitAmount 2018-01-19 10:31:06 +11:00
Fabio Berger
7b4e2257d8 Re-add changelog for 0x.js 2018-01-19 10:31:06 +11:00
Brandon Millman
4ac6e5477d Merge pull request #326 from 0xProject/greenkeeper/@0xproject/utils-0.2.0
Update @0xproject/utils to the latest version 🚀
2018-01-18 14:50:15 -08:00
Leonid Logvinov
614ea14a7f Fix prettier 2018-01-18 16:18:25 +01:00
Leonid Logvinov
ce45f99006 Update yarn.lock 2018-01-18 15:58:46 +01:00
Leonid
9203813a61 Merge pull request #325 from 0xProject/fix/portal-bugs
Small Fixes/Additions
2018-01-18 15:27:01 +01:00
Leonid Logvinov
ba987b0574 Move tests to a separate folder 2018-01-18 15:17:17 +01:00
Leonid Logvinov
b20f34adb7 Change file layout 2018-01-18 15:12:56 +01:00
Leonid Logvinov
63d0d810b1 Add bin definition 2018-01-18 14:44:53 +01:00
Leonid Logvinov
5491400684 Add postpublish scripts and README 2018-01-18 14:43:10 +01:00
Leonid Logvinov
6a5165e9b3 Fix a link 2018-01-18 14:39:41 +01:00
Leonid Logvinov
9a7c4442d2 Fix scopes 2018-01-18 14:34:35 +01:00
Leonid Logvinov
0e5363b5c3 Update yarn.lock 2018-01-18 14:26:32 +01:00
Leonid Logvinov
d41bce36be Fix merge conflicts 2018-01-18 14:23:54 +01:00
Leonid Logvinov
1380cd811e Fix CI config 2018-01-18 14:22:49 +01:00
Leonid Logvinov
d99bb3a87c Fix merge conflicts 2018-01-18 14:21:15 +01:00
Leonid Logvinov
4b9501318d Move deployer to a separate package 2018-01-18 14:18:51 +01:00
Leonid
e5eec04f92 Merge pull request #322 from 0xProject/fix/ci-time
Speed-up CI
2018-01-18 14:16:53 +01:00
Fabio Berger
f9c21efc30 Use intervalUtils.clearAsyncExcludingInterval instead of calling clearInterval directly for grepability 2018-01-18 19:29:54 +08:00
greenkeeper[bot]
ae72b71895 chore(package): update @0xproject/utils to version 0.2.0 2018-01-18 10:09:13 +00:00
Brandon Millman
87e3fe725d Run prettier to revert formatting changes made by the lerna publish step 2018-01-18 00:21:52 -08:00
Fabio Berger
807d9e3eef Add discourse forum to Community section of website footer 2018-01-18 15:20:34 +08:00
Fabio Berger
9e569b3791 Remove dead-code 2018-01-18 15:20:15 +08:00
Fabio Berger
024f093585 Fix Portal topbar so that it displays the mobile menu 2018-01-18 15:02:53 +08:00
Fabio Berger
996e9e9102 Add missing onError callbacks 2018-01-18 15:02:36 +08:00
Brandon Millman
d58bfb46cf Publish
- 0x.js@0.30.0
 - @0xproject/abi-gen@0.1.2
 - @0xproject/assert@0.0.11
 - chai-as-promised-typescript-typings@0.0.4
 - chai-typescript-typings@0.0.2
 - @0xproject/connect@0.5.0
 - contracts@2.1.4
 - @0xproject/dev-utils@0.0.5
 - @0xproject/json-schemas@0.7.3
 - @0xproject/kovan_faucets@1.0.5
 - @0xproject/monorepo-scripts@0.1.4
 - @0xproject/subproviders@0.3.1
 - @0xproject/tslint-config@0.4.2
 - @0xproject/types@0.1.4
 - @0xproject/utils@0.2.0
 - web3-typescript-typings@0.9.4
 - @0xproject/web3-wrapper@0.1.5
 - @0xproject/website@0.0.7
2018-01-17 22:45:09 -08:00
Fabio Berger
eb0d7df50b Fix balance page copy to refer to the Wrap ETH tab instead of a "convert" button 2018-01-18 14:27:12 +08:00
Brandon Millman
547bee38c0 Update CHANGELOG 2018-01-17 21:55:04 -08:00
Leonid
60614ba250 Merge pull request #321 from 0xProject/fix/fill-up-to-validation
Fix fillOrdersUpTo validation
2018-01-17 23:56:08 +01:00
Leonid Logvinov
278f68ae77 Fix the typos 2018-01-17 16:22:47 +01:00
Leonid Logvinov
b4375d6f64 Enable restrict-plus-operands and fix issues detected 2018-01-17 16:14:25 +01:00
Leonid Logvinov
9f47c72d31 Remove unused dependencies 2018-01-17 16:07:49 +01:00
Leonid Logvinov
de3bf03f42 Add --frozen-lockfile flag on CI 2018-01-17 15:55:58 +01:00
Leonid Logvinov
59a39ac57d Fix a stupid RPC bug which caused the port togo over 65535 2018-01-17 15:35:14 +01:00
Leonid Logvinov
df9c2b193e Remove trailing slash 2018-01-16 21:28:26 +01:00
Leonid Logvinov
3894311d68 Test deployer separately from contracts 2018-01-16 21:11:30 +01:00
Leonid Logvinov
35501dd4fc Fix ignore configuration 2018-01-16 16:17:20 +01:00
Leonid Logvinov
e2ca713658 Fix the glob pattern for exclusion 2018-01-16 16:03:06 +01:00
Leonid Logvinov
a45de6d427 Return is pensing events are undefined 2018-01-16 15:50:15 +01:00
Leonid Logvinov
a350638526 Upgrade testrpc to 6.0.3 to avoid some race-conditions 2018-01-16 15:40:20 +01:00
Leonid Logvinov
59f9605ed9 Run testrpc for rest tests 2018-01-16 15:26:15 +01:00
Leonid Logvinov
9521bf8d4f Separate contracts tests from others 2018-01-16 15:20:15 +01:00
Leonid Logvinov
7c1c94d39b Change cached directory 2018-01-16 14:36:04 +01:00
Leonid Logvinov
8a74963815 Respore dependency cache 2018-01-16 14:31:28 +01:00
Leonid Logvinov
3ebd8b7f45 Revert "Don't run testrpc for the rest of the tests"
This reverts commit ae8cb2e6a8.
2018-01-16 14:11:17 +01:00
Leonid Logvinov
ae8cb2e6a8 Don't run testrpc for the rest of the tests 2018-01-16 14:05:11 +01:00
Leonid Logvinov
1ccb978612 Split tests into two bundles 2018-01-16 14:04:02 +01:00
Leonid Logvinov
7040a01cf2 Remove umd tests 2018-01-16 14:01:46 +01:00
Leonid Logvinov
6bc0e815e9 Add caching between steps 2018-01-16 13:54:13 +01:00
Leonid Logvinov
593f7e826c Specify the executor 2018-01-16 13:45:36 +01:00
Leonid Logvinov
835fa0af13 Test workflow 2018-01-16 13:44:38 +01:00
Leonid
0e3bd0c6c1 Merge pull request #320 from joincivil/feature/default-account
Fix web3 typing defaultAccount not allowing `undefined`
2018-01-16 13:34:14 +01:00
Olaf Tomalka
86668eb7b9 Added PR number to web3 typings changelog 2018-01-16 13:24:53 +01:00
Leonid Logvinov
771f65c858 Update the CHANGELOG 2018-01-16 11:25:31 +01:00
Leonid Logvinov
89d6326a83 Fix fillOrdersUpTo balances validation 2018-01-16 11:22:04 +01:00
Leonid Logvinov
8b81ea162f Add a regression test for fillUpToValidation 2018-01-16 11:08:17 +01:00
Olaf Tomalka
a53e6db537 Fix web3 typing defaultAccount not allowing undefined
The default value for the defaultAccount property is undefined,
this happens in real-life scenarios, and so the type should
explicitly warn users about it
2018-01-15 16:02:42 +01:00
Leonid
62e3feeb94 Merge pull request #319 from 0xProject/feature/final-monorepo
Import last TS packages into the monorepo
2018-01-13 02:03:22 +01:00
Leonid
a950494503 Merge pull request #312 from 0xProject/feature/error-reporting-intervals
Better error handling on async/sync intervals
2018-01-13 00:51:23 +01:00
Leonid Logvinov
3cb310122e Sort packages alphabetically in README 2018-01-13 00:50:07 +01:00
Leonid Logvinov
feace988b4 Add postpublish scripts 2018-01-12 22:16:45 +01:00
Leonid Logvinov
6a56f20928 Return after checking for an error and add an explanatory comment 2018-01-12 21:39:51 +01:00
Brandon Millman
80a46d14be Merge pull request #318 from 0xProject/feature/httpClientErrorImprovements
Improve HttpClient errors
2018-01-12 12:18:03 -08:00
Brandon Millman
fbcbf066cd Stop appending /v0 to HttpClient api endpoint urls 2018-01-12 11:53:14 -08:00
Leonid Logvinov
4d30e1115f Add chai-as-promised-typescript-typings 2018-01-12 17:48:15 +01:00
Leonid Logvinov
897cfb491c Remove redundant type refs 2018-01-12 17:23:59 +01:00
Brandon Millman
c2c7512431 Improve HttpClient errors 2018-01-12 08:01:41 -08:00
Leonid Logvinov
568cf4d182 Add web3-typescript-typings and chai-as-promised-typescript-typings to the main monorepo 2018-01-12 16:55:16 +01:00
Leonid Logvinov
f54330f1c5 Import chai-as-promised-typescript-typings 2018-01-12 16:49:48 +01:00
Leonid Logvinov
97e01d7a42 Fix @bmilman linkedin link 2018-01-12 15:32:29 +01:00
Leonid
4be3e000e1 Merge pull request #317 from 0xProject/feature/new-team-members
[WIP] Add @tom and @dekz while removing @PhABC
2018-01-12 15:25:05 +01:00
Leonid Logvinov
b47baa9ee1 Add new team photos 2018-01-12 15:22:44 +01:00
Leonid Logvinov
f6c98112df Add a CHANGELOG to a website 2018-01-11 17:45:51 +01:00
Leonid Logvinov
94d29ab22e Add @tom and @dekz while removing @PhABC 2018-01-11 17:45:51 +01:00
Leonid Logvinov
b0b179550a Prettify package.json files 2018-01-11 17:45:36 +01:00
Leonid Logvinov
41c7ab4f9c Update dependencies in yarn.lock 2018-01-11 17:38:22 +01:00
Leonid Logvinov
432c7c63fe Fix a version in web3-typescript-typings CHANGELOG 2018-01-11 14:44:30 +01:00
Leonid Logvinov
2bba1ae292 Publish
- 0x.js@0.29.2
 - @0xproject/abi-gen@0.1.1
 - @0xproject/connect@0.4.1
 - contracts@2.1.3
 - @0xproject/kovan_faucets@1.0.4
 - web3-typescript-typings@0.9.3
 - @0xproject/web3-wrapper@0.1.4
 - @0xproject/website@0.0.6
2018-01-11 14:43:58 +01:00
Leonid Logvinov
7830d518e0 Add types for getData on a web3 contract 2018-01-11 14:40:16 +01:00
Leonid Logvinov
571b3c4da8 Add types for getData on a web3 contract 2018-01-11 14:25:49 +01:00
Leonid Logvinov
5b6f8d4c3f Apply prettier 2018-01-11 13:44:01 +01:00
Leonid Logvinov
ae57b21b98 Update the CHANGELOG 2018-01-11 13:22:37 +01:00
Leonid Logvinov
292c3bbff8 Make some callbacks failable and add error handling 2018-01-11 13:22:04 +01:00
Leonid Logvinov
065570ebf5 Add an error handler parameter to intervals 2018-01-11 13:22:04 +01:00
Leonid Logvinov
1f5dfd71d5 Add forgotten CHANGELOG changes 2018-01-11 13:16:58 +01:00
Leonid Logvinov
31b3ac4b98 Publish
- 0x.js@0.29.1
 - @0xproject/abi-gen@0.1.0
 - @0xproject/assert@0.0.10
 - @0xproject/connect@0.4.0
 - contracts@2.1.2
 - @0xproject/dev-utils@0.0.4
 - @0xproject/json-schemas@0.7.2
 - @0xproject/kovan_faucets@1.0.3
 - @0xproject/monorepo-scripts@0.1.3
 - @0xproject/subproviders@0.3.0
 - @0xproject/tslint-config@0.4.1
 - @0xproject/types@0.1.3
 - @0xproject/utils@0.1.3
 - web3-typescript-typings@0.9.1
 - @0xproject/web3-wrapper@0.1.3
 - @0xproject/website@0.0.5
2018-01-11 13:05:49 +01:00
Leonid Logvinov
7f4a383d75 Update CHANGELOGs before publish 2018-01-11 13:03:38 +01:00
Leonid
de943c5f30 Merge pull request #307 from 0xProject/feature/web3-type-roots
Base tsconfig.json
2018-01-10 19:35:37 +01:00
Leonid Logvinov
e34b0af251 Fix ts error in portal after enabling more strict checks 2018-01-10 12:43:50 +01:00
Leonid Logvinov
fa7237fde7 Fix a compiler error in abi-gen 2018-01-10 12:00:39 +01:00
Leonid Logvinov
ed530cef72 Reinstall dependencies to get a new version of marked and get rid of GitHub warning about 0.3.6 being vulnerable 2018-01-10 11:36:14 +01:00
Leonid Logvinov
0f8b2703d1 Fix a compiler error with constructor enum 2018-01-10 11:28:43 +01:00
Leonid Logvinov
a2176f566b Update README 2018-01-10 11:24:38 +01:00
Leonid Logvinov
bef056b084 Fix linter issues 2018-01-10 11:24:38 +01:00
Leonid Logvinov
c8c86c44f8 Fix callback types 2018-01-10 11:24:37 +01:00
Leonid Logvinov
f917a4a34a Remove typeRoots 2018-01-10 11:24:37 +01:00
Leonid Logvinov
78fd942faa Return to old way of including web3 types 2018-01-10 11:24:37 +01:00
Leonid Logvinov
a3274ac9b1 Import web3-typescript-typings to monorepo 2018-01-10 11:24:37 +01:00
Leonid Logvinov
2e67d69434 0.9.0 2018-01-10 11:24:37 +01:00
Leonid Logvinov
c2d6e78b2a Manually apply #14 2018-01-10 11:24:37 +01:00
Olaf Tomalka
7233a11ba0 Added stateMutability to ABIs
In the newest version of Solidity, additional property was added,
called state mutability, specyfing what kind of access does the
function have to memory and storage.
Additionally, constructor mutability is limited to payable/non-payable
as it HAS to modify the storage to actually deploy the contract
2018-01-10 11:24:37 +01:00
Leonid Logvinov
3a1360ce11 0.8.0 2018-01-10 11:24:37 +01:00
Leonid Logvinov
ba761044a6 Fix types definition in package.json 2018-01-10 11:24:37 +01:00
Leonid Logvinov
d8636a2c5d 0.7.2 2018-01-10 11:24:37 +01:00
Olaf Tomalka
9889c8f9e0 Fix ContractInstance new() not parsing properly
new is a keyword in typescript and so if a function is called new(),
tsc and for example Visual Studio Code don't regonize types for this
function. The fix is to write this function in quotes
2018-01-10 11:24:37 +01:00
Olaf Tomalka
7e2e392ecc Made the callback in filter.stopWatching optional 2018-01-10 11:24:37 +01:00
Amir Bandeali
6912a67eba Add new to contract interface 2018-01-10 11:24:37 +01:00
Amir Bandeali
6abc83de83 fix typo 2018-01-10 11:24:37 +01:00
Leonid Logvinov
0ca66a1469 0.7.1 2018-01-10 11:24:37 +01:00
Leonid Logvinov
a88be1af44 Make transactionIndex nullable 2018-01-10 11:24:36 +01:00
Leonid Logvinov
ae47fda257 0.7.0 2018-01-10 11:24:36 +01:00
Leonid Logvinov
6eb5411029 Improve log events types 2018-01-10 11:24:36 +01:00
Leonid Logvinov
73d13d61a7 0.6.4 2018-01-10 11:24:36 +01:00
Leonid Logvinov
fdf213ef72 Constraint status type 2018-01-10 11:24:36 +01:00
Leonid Logvinov
22fe605b1e 0.6.3 2018-01-10 11:24:36 +01:00
Leonid Logvinov
bcc902a889 Add status to a transaction receipt 2018-01-10 11:24:36 +01:00
Sergey Ukustov
24ff2ec30c Add async web3.personal.sign 2018-01-10 11:24:36 +01:00
Sergey Ukustov
4e0c67e2a1 Fix indentation 2018-01-10 11:24:36 +01:00
Leonid Logvinov
0cc21db654 0.6.2 2018-01-10 11:24:36 +01:00
Leonid Logvinov
dd5d1c00e5 Make all parameters of FilterObject optional 2018-01-10 11:24:36 +01:00
Leonid Logvinov
cad2555c03 0.6.1 2018-01-10 11:24:36 +01:00
Leonid Logvinov
005d8184aa Add LogTopic type 2018-01-10 11:24:36 +01:00
Leonid Logvinov
c228eddc57 0.6.0 2018-01-10 11:24:36 +01:00
Leonid Logvinov
ae37f8d9b6 Define sendAsync on HttpProvider 2018-01-10 11:24:36 +01:00
Leonid Logvinov
6a8113af1d 0.5.0 2018-01-10 11:24:35 +01:00
Leonid Logvinov
0c8cf12650 Add AbiType 2018-01-10 11:24:35 +01:00
Leonid Logvinov
2e29a51ccf 0.4.1 2018-01-10 11:24:35 +01:00
Leonid Logvinov
162f1d94dc Add ContractInstance type 2018-01-10 11:24:35 +01:00
Leonid Logvinov
a76bce1f32 0.4.0 2018-01-10 11:24:35 +01:00
Leonid Logvinov
be20e04c7b Extend Abi types 2018-01-10 11:24:35 +01:00
Leonid Logvinov
d9df82f31d 0.3.4 2018-01-10 11:24:35 +01:00
Leonid Logvinov
6210333628 Add return type for sendAsync 2018-01-10 11:24:35 +01:00
Leonid Logvinov
a552a790d3 0.3.3 2018-01-10 11:24:35 +01:00
Leonid Logvinov
9acb745956 Add sendAsync types in provider 2018-01-10 11:24:35 +01:00
Leonid Logvinov
875edaf96f 0.3.2 2018-01-10 11:24:35 +01:00
Leonid Logvinov
a9afc0f3f0 Add Web3.isChecksumAddress 2018-01-10 11:24:35 +01:00
Leonid Logvinov
3bbeaabe26 0.3.1 2018-01-10 11:24:35 +01:00
libertylocked
c04cbb480a Add auth options to HttpProvider 2018-01-10 11:24:35 +01:00
Leonid Logvinov
2c241c294e Add tslint.json 2018-01-10 11:24:35 +01:00
Leonid Logvinov
ce851f3c28 0.3.0 2018-01-10 11:24:35 +01:00
Leonid Logvinov
817a6d1828 Fix linter errors 2018-01-10 11:24:35 +01:00
Leonid Logvinov
4d0735e7f6 Add linting script and specify style guide 2018-01-10 11:24:34 +01:00
Leonid Logvinov
80291930f0 Make error types consistent 2018-01-10 11:24:34 +01:00
Leonid Logvinov
cf8678b979 Introduce BlockWithoutTransactionData and BlockWithTransactionData 2018-01-10 11:24:34 +01:00
Leonid Logvinov
67722c0fb8 Add LogEntry type 2018-01-10 11:24:34 +01:00
Leonid Logvinov
0b6e246c04 Add web3.personal.sign 2018-01-10 11:24:34 +01:00
Leonid Logvinov
3992295678 Add a lot of types 2018-01-10 11:24:34 +01:00
Sergey Ukustov
da404b9acc Extract API interfaces: web3.version, web3.eth, web3.personal 2018-01-10 11:24:34 +01:00
Sergey Ukustov
da8db153be Optional provider parameter in Web3 constructor 2018-01-10 11:24:34 +01:00
Fabio Berger
2c90f7324b 0.2.1 2018-01-10 11:24:34 +01:00
Fabio Berger
2cdb0de1c3 Add missing semi-colon 2018-01-10 11:24:34 +01:00
Fabio Berger
66bd798e80 Add missing semi-colons 2018-01-10 11:24:34 +01:00
libertylocked
cf37dfb257 Add web3.eth.blockNumber 2018-01-10 11:24:34 +01:00
Sergey Ukustov
217f84204e Add web3.sha3 method declaration 2018-01-10 11:24:34 +01:00
Fabio Berger
fbbe0ec3db 0.2.0 2018-01-10 11:24:34 +01:00
Fabio Berger
1ec34767f9 0.1.0 2018-01-10 11:24:34 +01:00
Fabio Berger
14e94a5376 Use single instead of double quotes by convention 2018-01-10 11:24:34 +01:00
Fabio Berger
08508afdb2 Remove spaces between union types to remain stylistically consistent 2018-01-10 11:24:33 +01:00
Sergey Ukustov
4220f25e01 Constructor definition does not include name or constant modifier 2018-01-10 11:24:33 +01:00
Sergey Ukustov
4ff5afecc8 Revamp AbiDefinition 2018-01-10 11:24:33 +01:00
Sergey Ukustov
2eabb439d9 filter.stopWatching accepts callback 2018-01-10 11:24:33 +01:00
Sergey Ukustov
2bc9d5d490 filter.watch callback param accepts arguments 2018-01-10 11:24:33 +01:00
Leonid Logvinov
9e1c142f02 0.0.11 2018-01-10 11:24:33 +01:00
Leonid Logvinov
1a38893b52 Fix version typings 2018-01-10 11:24:33 +01:00
Leonid Logvinov
f28d75cf7c 0.0.10 2018-01-10 11:24:33 +01:00
Leonid Logvinov
a3c9d0ace5 Add at function to Contract class 2018-01-10 11:24:33 +01:00
Leonid Logvinov
aea1799a64 0.0.9 2018-01-10 11:24:33 +01:00
Leonid Logvinov
ef76c4c62b Make currentProvider a variable, not a function 2018-01-10 11:24:33 +01:00
Leonid Logvinov
210e7c5579 Flash out README with instructions 2018-01-10 11:24:33 +01:00
Fabio Berger
3fa0046542 0.0.8 2018-01-10 11:24:33 +01:00
Fabio Berger
d6754685cc remove default import 2018-01-10 11:24:33 +01:00
Fabio Berger
bb5721700b 0.0.7 2018-01-10 11:24:32 +01:00
Fabio Berger
5c4a1dcbd5 Move interface definitions into the web3 namespace 2018-01-10 11:24:32 +01:00
Fabio Berger
4f488dee61 0.0.6 2018-01-10 11:24:32 +01:00
Fabio Berger
0d33758104 0.0.5 2018-01-10 11:24:32 +01:00
Fabio Berger
15b5fcbaf9 Export all interfaces and export the web3 constructor as the default export 2018-01-10 11:24:32 +01:00
Fabio Berger
0718b0d5b0 0.0.4 2018-01-10 11:24:32 +01:00
Fabio Berger
0af2ba1b7d Move Provider type outside of namespace 2018-01-10 11:24:32 +01:00
Fabio Berger
ea2fdecb83 0.0.3 2018-01-10 11:24:32 +01:00
Fabio Berger
07eb250083 Allow numbers to also be passed to fromWei and toWei 2018-01-10 11:24:32 +01:00
Fabio Berger
ee04717e1b 0.0.2 2018-01-10 11:24:32 +01:00
Fabio Berger
d7d22c36ed Add toWei and getTransactionReceipt definitions 2018-01-10 11:24:32 +01:00
Fabio Berger
36bf91f920 0.0.1 2018-01-10 11:24:32 +01:00
Fabio Berger
98e9c3b800 Add getBlockNumber definition 2018-01-10 11:24:32 +01:00
Fabio Berger
a7f1137db8 Add bigNumber dependency 2018-01-10 11:24:32 +01:00
Fabio Berger
f86159e717 add node_modules to gitignore 2018-01-10 11:24:32 +01:00
Fabio Berger
6e93223ea3 Add license 2018-01-10 11:24:32 +01:00
Fabio Berger
a6d677043f Add gitignore 2018-01-10 11:24:31 +01:00
Fabio Berger
eb1bf198ac Add package.json 2018-01-10 11:24:31 +01:00
Fabio Berger
0a2f82a19d Add initial version of typings and README 2018-01-10 11:24:31 +01:00
Leonid Logvinov
27d9fba785 Include web3 types via typeRoots and factor out common parts of tsconfig.json 2018-01-10 11:24:31 +01:00
Leonid Logvinov
e6a783aff8 Apply prettier 2018-01-10 11:24:00 +01:00
Leonid Logvinov
a767c353d2 Merge branch 'fix/prettify_json' into development 2018-01-10 11:23:03 +01:00
Leonid
a39d3d7233 Merge pull request #305 from 0xProject/fix/bignumber_config
Use configured version of bignumber in all packages
2018-01-10 11:18:51 +01:00
Brandon Millman
40c7ee6355 Merge pull request #311 from 0xProject/fix/httpClientJsonParsing
Merge connect json parsing refactor into development
2018-01-09 14:38:33 -08:00
Brandon Millman
eb760aa33f Prettier 2018-01-09 14:19:33 -08:00
Brandon Millman
262c34abac Update style 2018-01-09 14:18:45 -08:00
Brandon Millman
8019b1b823 Merge branch 'development' into refactor/httpClientJsonParsing
* development: (21 commits)
  Update connect CHANGELOG
  Changes to abi-gen after code review
  Added constructor ABIs to abi-gen
  Describe #295 in a CHANGELOG
  Add #302 description to changelog
  Fix formatting
  Apply prettier config
  Install prettier
  Remove formatting esilnt rules
  sendTransactionAsync should return txHash string
  Added Event generation to abi-gen
  Publish
  Add dates to CHANGELOG entries
  Update subproviders CHANGELOG
  Support both personal_sign and eth_sign
  Fix Ledger tests given change from `personal_sign` to `eth_sign`
  Update subprovider to catch correct RPC method
  Rename guide
  Update contribution guide
  Fix broken links in the abi-gen README
  ...
2018-01-08 18:02:41 -08:00
Brandon Millman
7a56e83fa3 Merge pull request #296 from 0xProject/fix/mutatedInput
Prevent getFeesAsync method on HttpClient from mutating input
2018-01-08 16:57:59 -08:00
Brandon Millman
a1c38d9cb2 Update connect CHANGELOG 2018-01-08 16:47:33 -08:00
Brandon Millman
734cf5819a Merge branch 'development' into fix/mutatedInput
* development:
  Changes to abi-gen after code review
  Added constructor ABIs to abi-gen
  Describe #295 in a CHANGELOG
  Add #302 description to changelog
  Fix formatting
  Apply prettier config
  Install prettier
  Remove formatting esilnt rules
  sendTransactionAsync should return txHash string
  Added Event generation to abi-gen
  Publish
  Add dates to CHANGELOG entries
  Update subproviders CHANGELOG
  Support both personal_sign and eth_sign
  Fix Ledger tests given change from `personal_sign` to `eth_sign`
  Update subprovider to catch correct RPC method
  Rename guide
  Update contribution guide
  Fix broken links in the abi-gen README
  Fix typing generation for arrays in which types separated by |s
2018-01-08 16:35:12 -08:00
Leonid
35e0b6143a Merge pull request #304 from joincivil/ritave/feature/abi-gen-constructor
Added constructor ABIs to abi-gen
2018-01-05 12:49:51 +01:00
Olaf Tomalka
e019ae4aed Changes to abi-gen after code review
* Added change to CHANGELOG
* Renamed variable and context to ctor to avoid keyword
* Used lodash' isUndefined to better check ctor
2018-01-05 12:48:17 +01:00
Leonid Logvinov
c700046b76 Apply prettify on json and md files 2018-01-04 16:32:03 +01:00
Leonid Logvinov
326a6b729f Fix prettier 2018-01-04 16:31:46 +01:00
Leonid Logvinov
e2ef0c5b94 Fix linter errors 2018-01-04 15:12:32 +01:00
Leonid Logvinov
c49f68ef3e Fix linter errors 2018-01-04 14:53:38 +01:00
Leonid Logvinov
d0f66f8624 Merge imports 2018-01-04 12:55:22 +01:00
Leonid Logvinov
4dfa720f2d Use configured version of bignumber in all packages 2018-01-04 12:38:19 +01:00
Olaf Tomalka
f3b8bac477 Added constructor ABIs to abi-gen
Additionally if the constructor is not existent in JSON, meaning it's
implcite with no parameters, we're
explicitly creating one, with actual JSON parameters that it should have.
2018-01-03 15:48:29 +01:00
Leonid Logvinov
ce6abad97f Describe #295 in a CHANGELOG 2018-01-03 12:08:39 +01:00
Leonid
807e908f78 Merge pull request #295 from dharmaprotocol/fix-array-typing-generation
Fix array typing generation when permitting multiple types
2018-01-03 12:07:31 +01:00
Leonid Logvinov
94c75b5262 Add #302 description to changelog 2018-01-03 12:05:44 +01:00
Leonid
eb0dd6b6e9 Merge pull request #302 from joincivil/ritave/feature/abi-gen-events
Added Event generation to abi-gen
2018-01-03 12:02:06 +01:00
Leonid
1c542c3e0d Merge pull request #303 from ERCdEX/ercdex/send_transaction_return_txhash
_sendTransactionAsync should return txHash string
2018-01-03 11:53:37 +01:00
Leonid Logvinov
d46fcb33c5 Fix formatting 2018-01-03 11:42:20 +01:00
Leonid
d5e0da0eb6 Merge pull request #291 from 0xProject/feature/prettier
Use prettier
2018-01-03 11:39:08 +01:00
Leonid Logvinov
e744e4cd98 Apply prettier config 2018-01-03 11:37:38 +01:00
Leonid Logvinov
9a96e8c704 Install prettier 2018-01-03 11:37:38 +01:00
Leonid Logvinov
31a94f468e Remove formatting esilnt rules 2018-01-03 11:37:38 +01:00
Luke
7422b9b53b sendTransactionAsync should return txHash string 2018-01-02 23:41:48 -05:00
Olaf Tomalka
161a9d6ad2 Added Event generation to abi-gen 2017-12-30 16:13:32 +01:00
Fabio Berger
f684cc3711 Publish
- 0x.js@0.29.0
 - @0xproject/abi-gen@0.0.4
 - @0xproject/assert@0.0.9
 - @0xproject/connect@0.3.2
 - contracts@2.1.1
 - @0xproject/dev-utils@0.0.3
 - @0xproject/json-schemas@0.7.1
 - @0xproject/kovan_faucets@1.0.2
 - @0xproject/monorepo-scripts@0.1.2
 - @0xproject/subproviders@0.2.0
 - @0xproject/tslint-config@0.4.0
 - @0xproject/types@0.1.2
 - @0xproject/utils@0.1.2
 - @0xproject/web3-wrapper@0.1.2
 - @0xproject/website@0.0.4
2017-12-28 10:57:04 +01:00
Fabio Berger
ab0c8c3496 Add dates to CHANGELOG entries 2017-12-28 10:36:06 +01:00
Fabio Berger
47534b200d Update subproviders CHANGELOG 2017-12-28 10:29:52 +01:00
Fabio Berger
f2976af734 Support both personal_sign and eth_sign 2017-12-28 10:28:27 +01:00
Fabio Berger
ee463058f1 Fix Ledger tests given change from personal_sign to eth_sign 2017-12-28 09:46:50 +01:00
Fabio Berger
c36a7471a8 Merge pull request #300 from cavanmflynn/fix/ledger-subprovider-signing
Update subprovider to catch correct RPC method
2017-12-28 09:45:41 +01:00
Cavan Flynn
6ea8cee551 Update subprovider to catch correct RPC method
ZeroEx uses web3.eth.sign, rather than web3.eth.personal.sign. In addition, the message to sign is the second parameter; not the first. The first parameter is the address.
2017-12-27 19:48:58 -05:00
Fabio Berger
69806c8839 Rename guide 2017-12-25 17:54:24 +01:00
Fabio Berger
690036aa30 Update contribution guide 2017-12-25 17:53:18 +01:00
Brandon Millman
8fe81c9d09 Refactor JSON parsing in HttpClient 2017-12-24 21:01:28 -05:00
Brandon Millman
eda6b8d01b Fix broken links in the abi-gen README 2017-12-24 19:46:45 -05:00
Brandon Millman
9f3acf8e28 Prevent getFeesAsync method on HttpClient from mutating input 2017-12-24 19:02:01 -05:00
Nadav Hollander
31c9c82f6c Fix typing generation for arrays in which types separated by |s 2017-12-24 10:16:06 -08:00
Brandon Millman
cbf06b2165 Merge pull request #289 from 0xProject/fix/missingBigNumberConfigs
Add missing calls to bigNumberConfigs in packages where we are instan…
2017-12-21 21:04:50 -05:00
Fabio Berger
e884eb9882 Merge pull request #288 from 0xProject/fix/docLinks
Fix doc anchor link collisions
2017-12-21 22:45:22 +01:00
Brandon Millman
f8cbfea4a1 Remove unused import 2017-12-21 15:40:09 -05:00
Fabio Berger
e01c0f054d Merge branch 'development' into fix/docLinks
* development:
  Update and standardize contracts README
  Add to CHANGELOG
  Refactor toBaseUnitAmount so that it throws if user supplies unitAmount with too many decimals
  Make assertion stricter so that one cannot submit invalid baseUnit amounts to `toUnitAmount`
  Add some missed underscores, update changelog and comments
  Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors

# Conflicts:
#	packages/website/ts/pages/documentation/documentation.tsx
#	packages/website/ts/pages/shared/nested_sidebar_menu.tsx
2017-12-21 21:24:54 +01:00
Brandon Millman
12dc8c0d15 Add missing calls to bigNumberConfigs in packages where we are instantiating BigNumbers 2017-12-21 14:55:55 -05:00
Brandon Millman
cb3582289f Merge pull request #285 from 0xProject/fix/underscorePrivate
Add new underscore-privates rule to @0xproject/tslint-config and fix …
2017-12-21 13:16:25 -05:00
Fabio Berger
734d220d60 Merge pull request #287 from 0xProject/fix/toBaseUnitAmount
Fix toBaseUnitAmount Issue
2017-12-21 18:22:28 +01:00
Fabio Berger
d725de7286 Create types sectionName constant 2017-12-21 17:28:20 +01:00
Fabio Berger
3e91773cd9 Add sectionName prefix to all anchor links in order to fix method name collisions between sections 2017-12-21 17:28:06 +01:00
Amir Bandeali
dc1d2a33a5 Merge pull request #286 from 0xProject/feature/updateContractsReadme
Update and standardize contracts README
2017-12-21 09:26:33 -06:00
Amir Bandeali
ac4074911d Update and standardize contracts README 2017-12-21 09:21:10 -06:00
Fabio Berger
66cf60f9cb Fix Max button bug 2017-12-21 15:32:23 +01:00
Fabio Berger
fffe8c355e Add to CHANGELOG 2017-12-21 14:40:18 +01:00
Fabio Berger
b94d13b413 Refactor toBaseUnitAmount so that it throws if user supplies unitAmount with too many decimals 2017-12-21 09:34:50 +01:00
Fabio Berger
85e16c1233 Make assertion stricter so that one cannot submit invalid baseUnit amounts to toUnitAmount 2017-12-21 09:33:57 +01:00
Brandon Millman
2d53b7d9a4 Add some missed underscores, update changelog and comments 2017-12-20 19:08:11 -05:00
Brandon Millman
23052a5c2e Merge branch 'development' into fix/underscorePrivate
* development: (29 commits)
  Move call to error reporter to end of handler so that even if reporting the error takes a while, it doesn't block the UI
  Update outdated WETH ranges
  Fix conditional
  Fix top-padding
  Publish
  Update CHANGELOGs
  Add slashes to base URLs
  Fix linter issue
  Fix WETH symbol
  Update snapshot and artifacts
  Replace our EtherTokens with WETH9 from maker
  Fix test description
  Fix a typo
  Add err==null assertions
  Add WETH9 tests
  Use the new snapshot including WETH9 and it's artifacts
  Add WETH9 and mirations
  Fix WETH events watching
  Fix a typo
  Init the _etherTokenContractsByAddress
  ...
2017-12-20 19:07:54 -05:00
Fabio Berger
42b3a7c9d7 Move call to error reporter to end of handler so that even if reporting the error takes a while, it doesn't block the UI 2017-12-20 18:36:12 +01:00
Fabio Berger
33315046cd Update outdated WETH ranges 2017-12-20 18:31:01 +01:00
Fabio Berger
2cf647d5ad Fix conditional 2017-12-20 17:40:01 +01:00
Fabio Berger
b1d88ca643 Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Publish
2017-12-20 17:24:19 +01:00
Fabio Berger
b79b48cfbe Fix top-padding 2017-12-20 17:24:12 +01:00
Leonid Logvinov
a2bf19efc1 Publish
- 0x.js@0.28.0
 - @0xproject/abi-gen@0.0.3
 - @0xproject/assert@0.0.8
 - @0xproject/connect@0.3.1
 - contracts@2.1.0
 - @0xproject/dev-utils@0.0.2
 - @0xproject/json-schemas@0.7.0
 - @0xproject/kovan_faucets@1.0.1
 - @0xproject/monorepo-scripts@0.1.1
 - @0xproject/subproviders@0.1.1
 - @0xproject/tslint-config@0.3.0
 - @0xproject/types@0.1.1
 - @0xproject/utils@0.1.1
 - @0xproject/web3-wrapper@0.1.1
 - @0xproject/website@0.0.3
2017-12-20 17:10:12 +01:00
Leonid Logvinov
6636a0861d Update CHANGELOGs 2017-12-20 16:40:19 +01:00
Leonid Logvinov
5d4078bcf4 Add slashes to base URLs 2017-12-20 16:25:41 +01:00
Brandon Millman
396e3d3ec2 Merge pull request #280 from 0xProject/feature/updateReadmes
Update readmes for connect, kovan-faucets, types, and utils packages
2017-12-20 10:06:44 -05:00
Leonid
e88b01ed5b Merge pull request #277 from 0xProject/feature/weth-events
Add etherToken.getLogsAsync and etherToken.subscribe with tests
2017-12-20 15:33:15 +01:00
Brandon Millman
cb11aec84d Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors 2017-12-20 15:30:25 +01:00
Leonid Logvinov
3e3587c281 Fix linter issue 2017-12-20 15:21:36 +01:00
Fabio Berger
972e1675f6 Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Change contributing test
  Fix yarn workspaces explanation
  Change CONTRIBUTING section
  Fix the headers
  Address feedback
  Write 4 README's
2017-12-20 15:18:15 +01:00
Fabio Berger
05ee368763 Fix md link 2017-12-20 15:17:36 +01:00
Leonid
291e2c8fa0 Merge pull request #279 from 0xProject/feature/READMEs
Write 4 README's
2017-12-20 15:17:23 +01:00
Fabio Berger
ad61fe4b54 Fix link 2017-12-20 15:16:18 +01:00
Fabio Berger
439fe10e1e Merge pull request #284 from 0xProject/feature/newAndImprovedReadmes
Improve/Add to README's
2017-12-20 15:14:04 +01:00
Leonid Logvinov
d05a36deed Fix WETH symbol 2017-12-20 15:02:22 +01:00
Leonid Logvinov
03fd73fab8 Update snapshot and artifacts 2017-12-20 15:00:25 +01:00
Fabio Berger
1d430cf62f Standardize on improved contributing section 2017-12-20 14:53:50 +01:00
Leonid Logvinov
9ed05f56d3 Replace our EtherTokens with WETH9 from maker 2017-12-20 14:53:38 +01:00
Fabio Berger
23aa3ec5ea Add Yarn < v1.0 disclaimer 2017-12-20 14:51:04 +01:00
Fabio Berger
a0f5ceddce Flesh out LedgerSubprovider usage example 2017-12-20 14:50:20 +01:00
Fabio Berger
3171943228 Fix command 2017-12-20 14:50:08 +01:00
Leonid Logvinov
455f74d449 Fix test description 2017-12-20 14:45:35 +01:00
Leonid Logvinov
01bc254cd0 Fix a typo 2017-12-20 14:45:13 +01:00
Leonid Logvinov
2a7cafbf20 Add err==null assertions 2017-12-20 14:44:54 +01:00
Leonid Logvinov
bf1603839e Change contributing test 2017-12-20 14:21:39 +01:00
Leonid Logvinov
8ed776e113 Fix yarn workspaces explanation 2017-12-20 14:17:17 +01:00
Leonid Logvinov
c3508dcdc6 Change CONTRIBUTING section 2017-12-20 14:10:35 +01:00
Leonid Logvinov
3579f063d6 Fix the headers 2017-12-20 14:07:50 +01:00
Leonid Logvinov
ecc6cb2b7c Address feedback 2017-12-20 14:07:50 +01:00
Leonid Logvinov
de6fe25751 Write 4 README's 2017-12-20 14:07:50 +01:00
Leonid Logvinov
d639a22cff Add WETH9 tests 2017-12-20 14:02:25 +01:00
Leonid Logvinov
b1f36a9024 Use the new snapshot including WETH9 and it's artifacts 2017-12-20 14:02:25 +01:00
Leonid Logvinov
d8d15149fc Add WETH9 and mirations 2017-12-20 14:02:25 +01:00
Leonid Logvinov
c07de97fd8 Fix WETH events watching 2017-12-20 14:02:24 +01:00
Leonid Logvinov
78eb79396e Fix a typo 2017-12-20 14:02:24 +01:00
Leonid Logvinov
abce410897 Init the _etherTokenContractsByAddress 2017-12-20 14:02:24 +01:00
Leonid Logvinov
9594185f11 Export new public types 2017-12-20 14:02:24 +01:00
Leonid Logvinov
35c20d505e Update CHANGELOG 2017-12-20 14:02:24 +01:00
Leonid Logvinov
b829d55752 Make order watcher react to new etherToken events 2017-12-20 14:01:59 +01:00
Leonid Logvinov
e92d6ff84f Add EtherToken events to the ABI 2017-12-20 14:01:59 +01:00
Leonid Logvinov
0056c66d32 Enable multiple EtherTokenContract instances 2017-12-20 14:01:59 +01:00
Leonid Logvinov
613fada49f Add etherToken.getLogsAsync and etherToken.subscribe with tests 2017-12-20 14:01:59 +01:00
Leonid
b603197ae8 Merge pull request #278 from 0xProject/fix/error-taker-format
Throw a better error message when taker is null|undefined or anything but not a string
2017-12-20 13:06:21 +01:00
Brandon Millman
69b81836fe Merge branch 'development' into feature/updateReadmes
* development:
  Remove reliance on testrpc snapshot in ZRX tests
2017-12-20 01:12:07 -05:00
Brandon Millman
0be4e1e1b3 Fix wording 2017-12-20 01:11:58 -05:00
Amir Bandeali
14c994ce14 Merge pull request #282 from 0xProject/fix/zrx-tests
Remove reliance on testrpc snapshot in ZRX tests
2017-12-19 20:31:46 -06:00
Fabio Berger
dd39fadce7 Update and improve website README 2017-12-20 02:49:36 +01:00
Fabio Berger
5d24022209 Add mono repo scripts README 2017-12-20 02:37:14 +01:00
Fabio Berger
c75eaca5b6 Add clean instructions 2017-12-20 02:37:02 +01:00
Fabio Berger
53798302da Improve subproviders readme 2017-12-20 02:24:17 +01:00
Fabio Berger
b799a8a108 Flesh out main repo README 2017-12-20 02:14:44 +01:00
Fabio Berger
3d6c0b75a1 Improve package descriptions 2017-12-20 01:47:03 +01:00
Brandon Millman
c531d734d4 Merge branch 'development' into feature/updateReadmes
* development: (35 commits)
  Remove etherToken from smart contract docs
  Update new WETH addresses and localStorage clearance key
  Fix merge
  Remove re-assignment
  Fix scrolling topBar on Portal
  Fix overflow issue on calculated fillAmount
  Fix faulty import
  Refactor remaining _.assign to spread operator
  Move muiTheme into it's own module
  Add WETH
  remove extra space
  Remove binding on prop passed callbacks
  Add airtable tasks to TODO's
  Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping
  Sort colors into color spectrum
  remove unused style
  standarize on `grey` over `gray` spelling and other color related fixes
  Standardize colors to always be in uppercase hex and consolidate material-ui greys
  Consolidate all custom colors and material-ui colors into a colors module
  Remove unused `location` prop
  ...
2017-12-19 17:51:09 -05:00
Brandon Millman
f239522a19 Update some wording and remove N/A test sections 2017-12-19 17:50:54 -05:00
Fabio Berger
d1c36f50d5 Merge pull request #283 from 0xProject/createWethPage
Merge WETH page improvements into development
2017-12-19 23:36:37 +01:00
Fabio Berger
484312e677 Remove etherToken from smart contract docs 2017-12-19 23:28:18 +01:00
Fabio Berger
0dc5178083 Update new WETH addresses and localStorage clearance key 2017-12-19 23:24:04 +01:00
Fabio Berger
08f2406ca2 Fix merge 2017-12-19 23:04:08 +01:00
Fabio Berger
41104b2d45 Merge branch 'development' into createWethPage
* development: (27 commits)
  Remove re-assignment
  Fix scrolling topBar on Portal
  Fix overflow issue on calculated fillAmount
  Fix faulty import
  Introduce an identityCommandBuilder
  Define types for methodID
  Define types for ethereumjs-abi
  Install types for yargs
  Fix comments
  Fix linter issues
  Fix linter error
  Rename SubscriptionOpts to BlockRange
  Refactor remaining _.assign to spread operator
  Move muiTheme into it's own module
  Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping
  Sort colors into color spectrum
  remove unused style
  standarize on `grey` over `gray` spelling and other color related fixes
  Standardize colors to always be in uppercase hex and consolidate material-ui greys
  Consolidate all custom colors and material-ui colors into a colors module
  ...

# Conflicts:
#	packages/website/ts/components/eth_wrappers.tsx
#	packages/website/ts/components/portal.tsx
#	packages/website/ts/utils/configs.ts
#	packages/website/ts/utils/constants.ts
2017-12-19 22:58:06 +01:00
Amir Bandeali
766824120a Remove reliance on testrpc snapshot in ZRX tests 2017-12-19 15:03:42 -06:00
Fabio Berger
c39ac903a9 Merge pull request #275 from 0xProject/refactor/website
Refactor Website
2017-12-19 21:26:34 +01:00
Brandon Millman
ca2bb60877 Update readmes for connect, kovan-facuets, types, and utils packages 2017-12-19 12:55:48 -05:00
Leonid Logvinov
3c66f18a46 Don't throw in transformers 2017-12-19 18:39:35 +01:00
Fabio Berger
8a940a800a Remove re-assignment 2017-12-19 18:06:41 +01:00
Fabio Berger
06bd5a9b03 Merge branch 'development' into refactor/website
* development:
  Introduce an identityCommandBuilder
  Define types for methodID
  Define types for ethereumjs-abi
  Install types for yargs
  Fix comments
  Fix linter issues
  Fix linter error
  Rename SubscriptionOpts to BlockRange
2017-12-19 18:02:50 +01:00
Leonid Logvinov
93518802d6 Update CHANGELOG 2017-12-19 16:26:05 +01:00
Leonid Logvinov
75f637bd75 Throw a better error message when taker is null|undefined or anything but not a string 2017-12-19 16:22:57 +01:00
Fabio Berger
e38c7ff076 Fix scrolling topBar on Portal 2017-12-19 12:42:16 +01:00
Fabio Berger
66fe7b88b0 Fix overflow issue on calculated fillAmount 2017-12-19 12:38:41 +01:00
Fabio Berger
16179d2f8e Fix faulty import 2017-12-19 12:37:51 +01:00
Leonid
1316a2dd2a Merge pull request #273 from 0xProject/fix/contract-fixes
Add proper types for yargs and ethereumjs-abi
2017-12-19 12:20:28 +01:00
Leonid Logvinov
e5b5fc400a Introduce an identityCommandBuilder 2017-12-19 12:19:48 +01:00
Leonid Logvinov
786ea52738 Define types for methodID 2017-12-19 12:19:48 +01:00
Leonid Logvinov
ed6756898f Define types for ethereumjs-abi 2017-12-19 12:19:48 +01:00
Leonid Logvinov
a5d2cbfd6f Install types for yargs 2017-12-19 12:19:48 +01:00
Leonid
04268d7f4b Merge pull request #272 from 0xProject/fix/subscription-opts
Rename SubscriptionOpts to BlockRange
2017-12-19 12:10:59 +01:00
Leonid Logvinov
156dae1d33 Fix comments 2017-12-19 12:10:44 +01:00
Leonid Logvinov
436d78eb93 Fix linter issues 2017-12-19 12:10:43 +01:00
Leonid Logvinov
f269ecd95e Fix linter error 2017-12-19 12:10:43 +01:00
Leonid Logvinov
1e4fdcf615 Rename SubscriptionOpts to BlockRange 2017-12-19 12:10:43 +01:00
Fabio Berger
b7004b3002 Refactor remaining _.assign to spread operator 2017-12-19 11:25:50 +01:00
Fabio Berger
c6af59a3e7 Move muiTheme into it's own module 2017-12-19 11:18:02 +01:00
Fabio Berger
32396b5eca Merge branch 'development' into refactor/website
* development:
  Add additional public changes introduced to changelog
  Update CHANGELOG
  Add a comment
  Introduce a variable for true
  Remove redundant template string
  Implement the address derivations
  Add hdnode dependency
  Move web3 import after subprovider imports in test web3_factory
  Fixed https://github.com/0xProject/wiki/issues/19 by disabling re-rendering of markdownCodeBlock renderer if props haven't updated
  Add convenience `rebuild` command
  Update website calls to deposit/withdraw
  Add entry to CHANGELOG
  Fix tests in contracts
  Modify the etherToken wrapper methods to accept an etherTokenAddress as the first arg. Since it is becoming apparent we will be updating the canonical WETH contract, we want users of 0x.js to be able to interact with n number of etherTokens without re-instantiating for each one.
  Fix documentation issue where `unsubscribeAll` shown as method on every contractWrapper instance even though it's only used by Exchange and Token wrappers.

# Conflicts:
#	packages/website/ts/components/eth_weth_conversion_button.tsx
2017-12-19 11:04:25 +01:00
Fabio Berger
2930537a51 Add WETH 2017-12-19 10:41:52 +01:00
Fabio Berger
16c91bca0a remove extra space 2017-12-19 10:41:45 +01:00
Fabio Berger
1f85d31663 Remove binding on prop passed callbacks 2017-12-19 10:39:25 +01:00
Fabio Berger
684542d073 Add airtable tasks to TODO's 2017-12-19 10:36:54 +01:00
Fabio Berger
bab01abe27 Merge branch 'development' into createWethPage
* development:
  Add additional public changes introduced to changelog
  Update CHANGELOG
  Add a comment
  Introduce a variable for true
  Remove redundant template string
  Implement the address derivations
  Add hdnode dependency
  Move web3 import after subprovider imports in test web3_factory
  Fixed https://github.com/0xProject/wiki/issues/19 by disabling re-rendering of markdownCodeBlock renderer if props haven't updated
  Add convenience `rebuild` command
  Update website calls to deposit/withdraw
  Add entry to CHANGELOG
2017-12-19 10:28:11 +01:00
Fabio Berger
c63f76dde7 Merge pull request #268 from 0xProject/fix/codeSelectingInDocs
Fix code selection bug in docs
2017-12-19 10:23:35 +01:00
Fabio Berger
79bd416c61 Merge pull request #267 from 0xProject/refactor/passInEtherTokenAddress
Refactor EtherToken wrapper to accept address in method args
2017-12-19 10:23:07 +01:00
Fabio Berger
7710989dee Add additional public changes introduced to changelog 2017-12-18 22:04:12 +01:00
Fabio Berger
fb0b7efc45 Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping 2017-12-18 19:30:25 +01:00
Brandon Millman
1af427e4a7 Merge pull request #269 from 0xProject/fix/brokenCi
Move web3 import after subprovider imports in test web3_factory
2017-12-18 10:41:15 -05:00
Leonid
bb6d594ec7 Merge pull request #271 from 0xProject/fix/ledger-derivation
Implement ledger optimization for address derivation
2017-12-18 16:09:22 +01:00
Leonid Logvinov
a57dda2c2a Update CHANGELOG 2017-12-18 15:57:40 +01:00
Leonid Logvinov
a3a2df098b Add a comment 2017-12-18 15:56:31 +01:00
Leonid Logvinov
90d1c3e2c9 Introduce a variable for true 2017-12-18 14:49:13 +01:00
Leonid Logvinov
950406f1f9 Remove redundant template string 2017-12-18 14:47:39 +01:00
Leonid Logvinov
064405126d Implement the address derivations 2017-12-18 12:30:34 +01:00
Leonid Logvinov
6d447fd8a5 Add hdnode dependency 2017-12-18 12:30:14 +01:00
Fabio Berger
400228e139 Sort colors into color spectrum 2017-12-18 10:44:55 +01:00
Fabio Berger
edfae32484 remove unused style 2017-12-18 10:44:41 +01:00
Fabio Berger
1aed970ce3 standarize on grey over gray spelling and other color related fixes 2017-12-18 10:28:34 +01:00
Fabio Berger
445ff1e28e Standardize colors to always be in uppercase hex and consolidate material-ui greys 2017-12-18 10:06:16 +01:00
Fabio Berger
df9d3e3e16 Consolidate all custom colors and material-ui colors into a colors module 2017-12-18 09:15:12 +01:00
Brandon Millman
4dc6694651 Move web3 import after subprovider imports in test web3_factory 2017-12-17 23:30:14 -05:00
Fabio Berger
98c01c2f80 Remove unused location prop 2017-12-17 20:57:39 -05:00
Fabio Berger
f698dd4077 Use bigNumberConfigs from @0xproject/utils in website repo 2017-12-17 20:55:50 -05:00
Fabio Berger
0578116f1d Fix unhoverable help tooltip by renaming Trade Permissions to Allowance 2017-12-17 20:51:54 -05:00
Fabio Berger
abbad68eb8 Replace remaining strEnums with property TS string enums 2017-12-17 20:48:23 -05:00
Fabio Berger
90d274ffc4 Update ActionType enum and move from using _.assign in reducer 2017-12-17 20:06:49 -05:00
Fabio Berger
449fd9f024 Remove unused enums 2017-12-17 19:38:59 -05:00
Fabio Berger
22c4ee6ef7 Update first two string enums to native type 2017-12-17 19:35:24 -05:00
Fabio Berger
951fbc9b76 Temporarily pretend as if new WETH contracts are already whitelisted by tokenRegistry and put hacks behind the shouldDeprecateOldWethToken flag 2017-12-17 19:18:33 -05:00
Fabio Berger
89f368a8b8 Add notice dialog to balances page about updating the WETH contract. We also draw attention to the new dedicated section for unwrapping from outdated WETH tokens 2017-12-17 18:58:12 -05:00
Fabio Berger
672c8acaca Fix linter errors 2017-12-17 17:21:33 -05:00
Fabio Berger
681617480a Move weth.io url to constants 2017-12-17 17:10:51 -05:00
Fabio Berger
95dfac6f9b Make it such that Wrapped Ether page works on networks without any outdated WETH tokens 2017-12-17 17:09:16 -05:00
Fabio Berger
b2256679be Add Max convenience button in unwrap WETH dialog 2017-12-17 15:41:24 -05:00
Fabio Berger
9e914be975 Link all EtherTokens to Etherscan and add address tooltip 2017-12-17 14:14:23 -06:00
Fabio Berger
edbe6915e0 Fixed https://github.com/0xProject/wiki/issues/19 by disabling re-rendering of markdownCodeBlock renderer if props haven't updated 2017-12-17 13:22:54 -06:00
Fabio Berger
fd3e8cd813 Add convenience rebuild command 2017-12-17 13:20:27 -06:00
Fabio Berger
b640e2cc49 Update website calls to deposit/withdraw 2017-12-17 12:40:04 -06:00
Fabio Berger
51af6de624 Update to passing etherTokenAddress into withdraw and deposit calls 2017-12-17 12:36:50 -06:00
Fabio Berger
054c00e323 Add entry to CHANGELOG 2017-12-17 01:07:28 -06:00
Fabio Berger
5664333490 Since sending the error report could take some time, we first trigger onError so that the user gets notified immediately 2017-12-17 00:44:34 -06:00
Fabio Berger
ac78c64f9e Fix tests in contracts 2017-12-17 00:40:19 -06:00
Fabio Berger
1f748afed9 Modify the etherToken wrapper methods to accept an etherTokenAddress as the first arg. Since it is becoming apparent we will be updating the canonical WETH contract, we want users of 0x.js to be able to interact with n number of etherTokens without re-instantiating for each one. 2017-12-17 00:32:53 -06:00
Fabio Berger
4a73c05435 Fix documentation issue where unsubscribeAll shown as method on every contractWrapper instance even though it's only used by Exchange and Token wrappers. 2017-12-17 00:19:15 -06:00
Fabio Berger
fe8f2d87c7 Temporary hack to alleviate issues with updating tokenRegistry with new WETH address 2017-12-15 14:07:14 -06:00
Fabio Berger
a71a1edf2c Two mysteriously missing imports 2017-12-15 13:01:45 -06:00
Fabio Berger
87209b8f57 Merge pull request #264 from 0xProject/createWethPage
Create WETH Page
2017-12-15 12:58:22 -06:00
Fabio Berger
13279f1f20 Fix linter errors 2017-12-15 12:47:16 -06:00
Fabio Berger
b46dd2e0a2 Merge branch 'development' into createWethPage
* development: (54 commits)
  Fix redundant spaces
  Fix tests
  Fix website unused vars
  Fix connect unused vars
  Fix 0x.js unused vars
  Dissallow unused vars/imports
  Implement first custom linter rule async-suffix
  Reuse intervalutils in website
  Add a newline
  Name a variable
  Add a comment
  Fix a conditional
  Make migrations deterministic
  Fix linter error
  Fix linter errors
  Add a function to init token balances
  Rename tokenUtils.getNonProtocolTokens to tokenUtils.getDummyTokens
  Add DummyToken to gitignore
  Add DummyToken to artifacts list
  Increase mocha timeout
  ...
2017-12-15 12:37:03 -06:00
Leonid
3eb08735d4 Merge pull request #266 from 0xProject/fix/no-unused-vars
Remove all unused vars and imports
2017-12-15 19:03:01 +01:00
Leonid Logvinov
c8e52882ca Fix redundant spaces 2017-12-15 18:44:13 +01:00
Fabio Berger
484dd4c33a Update name to be a call to action 2017-12-15 11:06:18 -06:00
Fabio Berger
94f40a54b4 Add default value for onConversionSuccessful 2017-12-15 11:05:53 -06:00
Leonid Logvinov
818a50a3fb Fix tests 2017-12-15 15:32:10 +01:00
Leonid Logvinov
2041e9945e Fix website unused vars 2017-12-15 15:19:19 +01:00
Leonid Logvinov
126048bac9 Fix connect unused vars 2017-12-15 13:58:30 +01:00
Leonid Logvinov
274aa50d74 Fix 0x.js unused vars 2017-12-15 13:30:19 +01:00
Leonid Logvinov
c36d85a46c Dissallow unused vars/imports 2017-12-15 13:14:44 +01:00
Fabio Berger
ac1fbeb962 Improve WETH page styling 2017-12-14 19:28:49 -06:00
Leonid
de8c445f96 Merge pull request #265 from 0xProject/feature/custom-linter-rule
Implement first custom linter rule async-suffix
2017-12-14 22:34:54 +01:00
Leonid Logvinov
c23d42fea5 Implement first custom linter rule async-suffix 2017-12-14 21:49:19 +01:00
Leonid
a0aa21103b Merge pull request #258 from 0xProject/feature/contracts-refactor
A bunch of refactorings
2017-12-14 17:48:45 +01:00
Leonid Logvinov
ce242b10e2 Reuse intervalutils in website 2017-12-14 17:43:42 +01:00
Fabio Berger
6d386220d9 Use new wrap/unwrap buttons, fetch outdated WETH balances and re-fetch after a successful unwrap. 2017-12-14 10:43:20 -06:00
Fabio Berger
7ce1021798 Refactor the WETH conversion dialog/button to be either wrap or unwrap specific and not both 2017-12-14 10:41:33 -06:00
Leonid Logvinov
9ad9e1204c Add a newline 2017-12-14 17:15:49 +01:00
Leonid Logvinov
a63061f5b2 Name a variable 2017-12-14 17:15:07 +01:00
Leonid Logvinov
4997331410 Add a comment 2017-12-14 17:13:34 +01:00
Leonid Logvinov
f7f4b6da8d Fix a conditional 2017-12-14 17:12:18 +01:00
Leonid Logvinov
c975676f6c Make migrations deterministic 2017-12-14 16:40:37 +01:00
Leonid Logvinov
d702c65a5b Fix linter error 2017-12-14 15:59:00 +01:00
Leonid Logvinov
4391f9913e Fix linter errors 2017-12-14 15:47:03 +01:00
Leonid Logvinov
28c409fc6d Add a function to init token balances 2017-12-14 15:47:03 +01:00
Leonid Logvinov
449a04d39c Rename tokenUtils.getNonProtocolTokens to tokenUtils.getDummyTokens 2017-12-14 15:47:03 +01:00
Leonid Logvinov
4bcd7ba31e Add DummyToken to gitignore 2017-12-14 15:47:03 +01:00
Leonid Logvinov
5bda301fec Add DummyToken to artifacts list 2017-12-14 15:47:03 +01:00
Leonid Logvinov
84c7c6eb12 Increase mocha timeout 2017-12-14 15:47:03 +01:00
Leonid Logvinov
a5b7980b06 Add DummyToken to artifacts list 2017-12-14 15:47:03 +01:00
Leonid Logvinov
f746f5bfa3 Update addresses and add DummyToken artifact 2017-12-14 15:47:03 +01:00
Leonid Logvinov
3ed2eedfda Change circle commit hash to the newest one from the monorepo 2017-12-14 15:47:03 +01:00
Leonid Logvinov
4ce8eaa158 Fix CI build 2017-12-14 15:47:02 +01:00
Leonid Logvinov
7abb026819 Delete abi-gen-templates 2017-12-14 15:47:02 +01:00
Leonid Logvinov
abd55411d4 Move shared types to types package 2017-12-14 15:47:02 +01:00
Leonid Logvinov
cb596c1413 Move more shared utils into utils package and reuse them 2017-12-14 15:47:02 +01:00
Leonid Logvinov
6120a43fff Create dev-utils with blockchainLifecycle in it 2017-12-14 15:47:02 +01:00
Leonid Logvinov
02e7354b53 Move 0x.js temnplates to 0x.js instead of having them as a separate package 2017-12-14 15:47:02 +01:00
Leonid Logvinov
0a0d3503c0 Remove generated contracts and ignore them. Add a prebuild command to regenerate them 2017-12-14 15:47:02 +01:00
Fabio Berger
105bcc6664 Clear trackedTokens so that a user starts tracking the new WETH and no longer the old one 2017-12-13 19:58:33 -06:00
Fabio Berger
ceae51fe32 Make label optional and make sure the input field still renders properly without it 2017-12-13 19:46:48 -06:00
Fabio Berger
b054080fa1 Remove ETH-WETH convert button from balances page 2017-12-13 19:45:44 -06:00
Fabio Berger
565010408e Remove temporary hack 2017-12-13 19:44:27 -06:00
Fabio Berger
5619780cc1 Use boxed ETH 2017-12-13 19:43:43 -06:00
Brandon Millman
d69143487e Reorganize packages section of readme 2017-12-13 15:37:47 -08:00
Brandon Millman
2ef763a195 Merge pull request #229 from 0xProject/feature/addKovanFaucets
Add kovan faucet project into the mono repo
2017-12-13 15:09:39 -08:00
Brandon Millman
6ba4ed99c4 Fix hanging requests by importing web3 last 2017-12-13 15:05:57 -08:00
Brandon Millman
aec3c83191 Add kovan faucet to main README 2017-12-13 12:39:52 -08:00
Brandon Millman
19d8449981 Merge branch 'development' into feature/addKovanFaucets
* development:
  Add new packages to main README
  Remove redundant totalSupply from token interface
2017-12-13 12:37:01 -08:00
Brandon Millman
91f276d925 Cleanup kovan-faucet package 2017-12-13 12:36:29 -08:00
Leonid Logvinov
6bda6a22e3 Add new packages to main README 2017-12-13 16:05:48 +01:00
Amir Bandeali
1fbe638950 Remove redundant totalSupply from token interface 2017-12-12 16:07:04 -08:00
Brandon Millman
1e9f23ebba Fix build errors 2017-12-12 15:56:30 -08:00
Brandon Millman
bbb768c5cf Add kovan faucet project into the mono repo 2017-12-12 15:45:22 -08:00
Amir Bandeali
5678196706 Merge pull request #255 from 0xProject/feature/updateWeth
Update WETH
2017-12-12 15:39:29 -08:00
Amir Bandeali
987637abed Increase timeout on deployer tests 2017-12-12 15:11:57 -08:00
Amir Bandeali
ff422ecfb2 Add version string to EtherToken_v2 2017-12-12 15:05:31 -08:00
Amir Bandeali
1fb643cb69 Formatting fixes 2017-12-12 15:05:30 -08:00
Amir Bandeali
88db8c3724 Add missing package in utils, fix linting error 2017-12-12 15:05:30 -08:00
Amir Bandeali
cf50a82ecc fix tests after merging with development 2017-12-12 15:05:30 -08:00
Amir Bandeali
145fea5253 Add test:circleci command, add newlines to end of contracts 2017-12-12 15:05:30 -08:00
Amir Bandeali
b97f140b78 Add gas limits to failing tests 2017-12-12 15:05:30 -08:00
Amir Bandeali
1dda4d5f78 Rename contracts lib to utils 2017-12-12 15:05:29 -08:00
Amir Bandeali
6f2cb66163 Refactor unlimited allowance logic out of ERC20Token 2017-12-12 15:05:29 -08:00
Amir Bandeali
8b29f6f18d Fix typo, change variable name to be consistent 2017-12-12 15:05:28 -08:00
Amir Bandeali
2cc410e61f Update 0x.js version, fix build errors 2017-12-12 15:05:27 -08:00
Amir Bandeali
548fda8dba Add updated contracts, reorganize contract file structure 2017-12-12 15:02:05 -08:00
Amir Bandeali
b58bf8259d Add tests for ERC20Token and EtherToken_v2 2017-12-12 15:02:05 -08:00
Amir Bandeali
e6862e9739 Fix errors with new testrpc version 2017-12-12 15:02:04 -08:00
Amir Bandeali
7008e882c0 Add version to new EtherToken, fix typos 2017-12-12 15:02:04 -08:00
Amir Bandeali
7d59faa650 Add updated ERC20 implementation, update WETH 2017-12-12 15:02:04 -08:00
Fabio Berger
eaa6484f24 Merge branch 'development' into createWethPage
* development:
  update yarn.lock
  Fix typedoc_utils to take into account subPackageName when rendering call path
  Add WebSocketOrderbookChannel to connect docs
2017-12-12 15:40:23 -06:00
Fabio Berger
6630b1d8a5 update yarn.lock 2017-12-12 15:27:07 -06:00
Fabio Berger
d0916e196c progress weth page 2017-12-12 14:53:39 -06:00
Brandon Millman
8e74a22c6f Merge pull request #263 from 0xProject/fix/docsCallPath
Fix typedoc_utils to take into account subPackageName when rendering …
2017-12-12 12:52:35 -08:00
Brandon Millman
2ffcc853fd Fix typedoc_utils to take into account subPackageName when rendering call path 2017-12-12 10:23:51 -08:00
Brandon Millman
caeb5cb6ab Merge pull request #261 from 0xProject/feature/addWebSocketDocs
Add WebSocketOrderbookChannel to connect docs
2017-12-12 10:23:17 -08:00
Fabio Berger
4f72c527de Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Re-hard code the dependency
  Add missing dependency
  Add missing dependency
  Fix a dependency
  Fix an invocation
  Move dependency
  Merge dependencies
  Don't unsubscribe on error. It's done automatically
  Rename blockAndLogStreamer to blockAndLogStreamerIfExists
  Move isAddress to shared utils and remove all dependencies on ethereum-address
  Remove ethereum-address dependency and add this logic to the repo
2017-12-12 11:38:13 -06:00
Fabio Berger
71cb2e05d1 Resize token icons 2017-12-12 11:36:57 -06:00
Brandon Millman
d1fb61e0de Add WebSocketOrderbookChannel to connect docs 2017-12-12 15:37:55 +01:00
Leonid
cb7188d473 Merge pull request #257 from 0xProject/fix/ethereum-address
Remove ethereum-address dependency and add this logic to the repo
2017-12-12 15:30:04 +01:00
Leonid
02f22d9155 Merge pull request #262 from 0xProject/fix/portal-bug
Fix portal subscriptions bug
2017-12-12 15:27:35 +01:00
Leonid Logvinov
707b98849c Re-hard code the dependency 2017-12-12 15:25:06 +01:00
Leonid Logvinov
d778378b37 Add missing dependency 2017-12-12 15:14:54 +01:00
Leonid Logvinov
f3f596b231 Add missing dependency 2017-12-12 15:06:38 +01:00
Leonid Logvinov
276ee9903a Fix a dependency 2017-12-12 14:01:58 +01:00
Leonid Logvinov
16a970b65d Fix an invocation 2017-12-12 13:56:19 +01:00
Leonid Logvinov
1647e45247 Move dependency 2017-12-12 13:55:34 +01:00
Leonid Logvinov
3477a84bbd Merge dependencies 2017-12-12 13:54:17 +01:00
Leonid Logvinov
c61fe3ce64 Don't unsubscribe on error. It's done automatically 2017-12-12 13:33:12 +01:00
Leonid Logvinov
f94dc1fe44 Rename blockAndLogStreamer to blockAndLogStreamerIfExists 2017-12-12 13:32:54 +01:00
Brandon Millman
1339aadf4e Merge pull request #259 from 0xProject/fix/addChangelogAndPostpublishScripts
Fix broken postpublish_utils, add CHANGELOG and postpublish.js script…
2017-12-11 13:10:43 -08:00
Leonid Logvinov
a14424ae5f Move isAddress to shared utils and remove all dependencies on ethereum-address 2017-12-11 12:43:19 +01:00
Leonid Logvinov
f1e7ea118b Remove ethereum-address dependency and add this logic to the repo 2017-12-11 12:21:44 +01:00
Brandon Millman
9c6453e129 Fix broken postpublish_utils, add CHANGELOG and postpublish.js scripts to all packages 2017-12-08 15:01:52 -08:00
Brandon Millman
a6f9718131 Publish
- 0x.js@0.27.2
 - abi-gen-templates@0.0.2
 - @0xproject/abi-gen@0.0.2
 - @0xproject/assert@0.0.7
 - @0xproject/connect@0.3.0
 - contracts@2.0.0
 - @0xproject/json-schemas@0.6.10
 - @0xproject/monorepo-scripts@0.1.0
 - @0xproject/subproviders@0.1.0
 - @0xproject/tslint-config@0.2.1
 - @0xproject/types@0.1.0
 - @0xproject/utils@0.1.0
 - @0xproject/web3-wrapper@0.1.0
 - website@0.0.2
2017-12-08 13:17:03 -08:00
Brandon Millman
47075edc97 Add scope to abi-gen dependency in 0x.js 2017-12-08 13:11:47 -08:00
Brandon Millman
25cee41358 Add @0xproject scope to abi-gen package name 2017-12-08 13:05:24 -08:00
Brandon Millman
d08d65a3af Add yarn install to lerna:publish command 2017-12-08 12:44:13 -08:00
Brandon Millman
d14ed71191 Make contracts package private 2017-12-08 12:41:31 -08:00
Brandon Millman
f341f62b2b Update connect changelog 2017-12-08 11:56:01 -08:00
Fabio Berger
ec3d8a034f Update yarn.lock 2017-12-08 13:06:35 -06:00
Fabio Berger
c452294bcc Change dev domain since .dev is actually owned by Google and Chrome now enforces HSTS by default 2017-12-08 13:06:24 -06:00
Fabio Berger
d5757499bc Merge branch 'feature/addSubproviders' into feature/portal-ledger-support
* feature/addSubproviders:
  remove console.log
  Update README.md
  Fix unit test
  Add missing params
  Debug CircleCi failure
  Update yarn.lock
  Inline network module
  Add todo
  Stop supporting different file extensions in abi-gen
  Refactor networkId out of web3Wrapper
  Update connect types in preperation for publishing
  Add link to random id generator
  Remove `prebuild` command and add `test:circleci`
  Fix CI command
  Address feedback
  Refactor web3Wrapper to a separate package
2017-12-08 11:23:44 -06:00
Fabio Berger
828dffffed Merge pull request #252 from 0xProject/feature/addSubproviders
Add Subproviders Subpackage
2017-12-08 11:22:25 -06:00
Fabio Berger
af8d24d0eb Merge branch 'development' into feature/addSubproviders
* development:
  Update README.md
  Inline network module
  Stop supporting different file extensions in abi-gen
  Refactor networkId out of web3Wrapper
  Update connect types in preperation for publishing
  Fix CI command
  Address feedback
  Refactor web3Wrapper to a separate package

# Conflicts:
#	package.json
#	packages/website/ts/blockchain.ts
2017-12-08 11:21:51 -06:00
Fabio Berger
ca85a97106 remove console.log 2017-12-08 11:12:30 -06:00
Fabio Berger
5eea829be9 Update README.md 2017-12-08 11:05:53 -06:00
Fabio Berger
e822e3562d Fix unit test 2017-12-08 10:22:31 -06:00
Leonid
f109d132e4 Merge pull request #253 from 0xProject/feature/web3-wrapper
Refactor web3Wrapper to a separate package
2017-12-08 19:10:05 +03:00
Fabio Berger
1fc1eae39a Add missing params 2017-12-08 10:03:01 -06:00
Fabio Berger
deb6aeae43 Debug CircleCi failure 2017-12-08 09:57:34 -06:00
Fabio Berger
f48f126b3a Update yarn.lock 2017-12-08 09:49:08 -06:00
Leonid Logvinov
e0d79bd332 Inline network module 2017-12-08 18:47:50 +03:00
Fabio Berger
5e75aab8ea Add todo 2017-12-08 09:45:53 -06:00
Leonid
36125c3539 Merge branch 'development' into feature/web3-wrapper 2017-12-08 14:46:51 +03:00
Leonid Logvinov
72ced622d7 Stop supporting different file extensions in abi-gen 2017-12-08 13:25:00 +03:00
Leonid Logvinov
b362e2c28e Refactor networkId out of web3Wrapper 2017-12-08 12:51:46 +03:00
Brandon Millman
2260a0a4cd Merge pull request #256 from 0xProject/feature/standardSpecUpdate
Update connect types in preperation for publishing
2017-12-07 16:39:18 -08:00
Brandon Millman
3c64b33f5c Update connect types in preperation for publishing 2017-12-07 14:40:16 -08:00
Fabio Berger
5301086c68 Add link to random id generator 2017-12-07 15:32:01 -06:00
Fabio Berger
5687279c8d Remove prebuild command and add test:circleci 2017-12-07 15:21:35 -06:00
Fabio Berger
139c8c2e78 Merge branch 'feature/addSubproviders' into feature/portal-ledger-support
* feature/addSubproviders:
  Make sure we don't pass empty maker into getOrderHashHex
  Make sure we always pass in the correct networkId even if no injectedWeb3 found
2017-12-07 15:15:51 -06:00
Fabio Berger
6c2bf8ed26 Merge branch 'development' into feature/addSubproviders
* development:
  Make sure we don't pass empty maker into getOrderHashHex
  Make sure we always pass in the correct networkId even if no injectedWeb3 found
2017-12-07 15:15:23 -06:00
Fabio Berger
f1ecdcf602 Make sure we don't pass empty maker into getOrderHashHex 2017-12-07 14:53:14 -06:00
Fabio Berger
1eaefac12b Make sure we always pass in the correct networkId even if no injectedWeb3 found 2017-12-07 14:51:40 -06:00
Fabio Berger
215e33fa6c Merge branch 'feature/addSubproviders' into feature/portal-ledger-support
* feature/addSubproviders:
  remove unneeded reset
  Use rejectedWith
  Add missing calls to configure
  remove unneeded type assertions
  remove unused type
  Simplify interface to signPersonalMessageAsync
  Fix unit test
  Fix ethereumjs-tx declaration and import
  Use assert.isHexString
  Add type defs for ledgerco and ethereumjs-tx
  Make test only run unit tests since cannot run integration tests on CI
  Improve README
  Fix version and remove the UMD build
  Fix tslint error
2017-12-07 11:42:50 -06:00
Fabio Berger
be17b75ad3 remove unneeded reset 2017-12-06 22:31:20 -06:00
Fabio Berger
0c23f5e07e Use rejectedWith 2017-12-06 22:30:08 -06:00
Fabio Berger
86e1fa8153 Add missing calls to configure 2017-12-06 22:30:00 -06:00
Fabio Berger
fae0651b0c remove unneeded type assertions 2017-12-06 20:56:14 -06:00
Fabio Berger
720641f14c remove unused type 2017-12-06 20:53:23 -06:00
Fabio Berger
e8495b0c7b Simplify interface to signPersonalMessageAsync 2017-12-06 20:52:48 -06:00
Fabio Berger
e80579a605 Fix unit test 2017-12-06 19:49:27 -06:00
Fabio Berger
5967d39ca9 Fix ethereumjs-tx declaration and import 2017-12-06 19:48:38 -06:00
Fabio Berger
b82b50e2f0 Use assert.isHexString 2017-12-06 19:05:22 -06:00
Fabio Berger
e893e8c442 Add type defs for ledgerco and ethereumjs-tx 2017-12-06 19:05:09 -06:00
Fabio Berger
3db5efa264 Make test only run unit tests since cannot run integration tests on CI 2017-12-06 19:04:41 -06:00
Leonid Logvinov
5401c69163 Fix CI command 2017-12-07 01:24:48 +03:00
Fabio Berger
b7030cffd9 Improve README 2017-12-06 16:18:42 -06:00
Fabio Berger
73b4b4488e Fix version and remove the UMD build 2017-12-06 16:18:35 -06:00
Leonid Logvinov
825402b0f9 Address feedback 2017-12-07 01:15:15 +03:00
Fabio Berger
f23071a214 Fix tslint error 2017-12-06 16:13:24 -06:00
Leonid Logvinov
f1b267cc9f Refactor web3Wrapper to a separate package 2017-12-06 20:55:09 +03:00
Fabio Berger
3d12b84f1d Merge branch 'feature/addSubproviders' into feature/portal-ledger-support
* feature/addSubproviders:
  Standardize deps
  Inline function
  Introduce a const
  Make private
  Add version matcher script
  Use same versions of dependencies everywhere
  Add missing await
  Move declaration into proper conditional block
  Fix Party element so that an identicon's height is that which was passed in
2017-12-06 11:01:53 -06:00
Fabio Berger
adf1afc6ba Standardize deps 2017-12-06 11:00:57 -06:00
Fabio Berger
0abbdc6b96 Merge branch 'development' into feature/addSubproviders
* development:
  Inline function
  Introduce a const
  Make private
  Add version matcher script
  Use same versions of dependencies everywhere
  Add missing await
  Move declaration into proper conditional block
  Fix Party element so that an identicon's height is that which was passed in

# Conflicts:
#	packages/website/package.json
#	yarn.lock
2017-12-06 10:49:22 -06:00
Leonid
598f1dd2d8 Merge pull request #250 from 0xProject/feature/airport-experiments
Compare versions script
2017-12-06 15:52:38 +03:00
Leonid
594bd2de1c Merge branch 'development' into feature/airport-experiments 2017-12-06 15:52:22 +03:00
Leonid Logvinov
55083316fc Inline function 2017-12-06 15:48:30 +03:00
Leonid Logvinov
8c87394b2b Introduce a const 2017-12-06 15:48:30 +03:00
Leonid Logvinov
1dba4b85d0 Make private 2017-12-06 15:48:30 +03:00
Leonid Logvinov
22de68205b Add version matcher script 2017-12-06 15:48:30 +03:00
Leonid Logvinov
f76543ebfa Use same versions of dependencies everywhere 2017-12-06 15:48:30 +03:00
Fabio Berger
f0c27f98b8 Add missing await 2017-12-05 22:17:52 -06:00
Fabio Berger
da678ba018 Move declaration into proper conditional block 2017-12-05 22:17:48 -06:00
Fabio Berger
86ed1b4554 Fix Party element so that an identicon's height is that which was passed in 2017-12-05 22:17:43 -06:00
Fabio Berger
d8adc88c52 Add missing await 2017-12-05 22:15:31 -06:00
Fabio Berger
5119e49e47 Move declaration into proper conditional block 2017-12-05 22:15:23 -06:00
Fabio Berger
cfb9f87418 Fix Party element so that an identicon's height is that which was passed in 2017-12-05 22:07:25 -06:00
Fabio Berger
06e348f80b Have comments hug statements 2017-12-05 21:48:02 -06:00
Fabio Berger
f05e0174a0 Add declaration 2017-12-05 21:47:44 -06:00
Fabio Berger
6bea3ac157 Return actual error thrown 2017-12-05 21:47:29 -06:00
Fabio Berger
e4d42a079c remove unused modules 2017-12-05 21:47:05 -06:00
Fabio Berger
5bbdb7a8f7 Use subproviders subpackage in website and remove old subproviders 2017-12-05 21:33:42 -06:00
Fabio Berger
3cf7cb1054 remove extra space 2017-12-05 21:32:42 -06:00
Fabio Berger
78274440cb Add initial tests fort redundantRpcSubprovider 2017-12-05 18:50:02 -06:00
Fabio Berger
e59934ca21 Add null to err type 2017-12-05 18:49:48 -06:00
Fabio Berger
c93bb4ef98 Use null instead of undefined when no error exists 2017-12-05 18:48:51 -06:00
Fabio Berger
e3763bade2 Switch to using our custom base subprovider 2017-12-05 18:48:30 -06:00
Fabio Berger
1ea1c02387 remove unused import 2017-12-05 18:48:17 -06:00
Fabio Berger
f6321a8e70 Fix lint issues 2017-12-05 16:33:18 -06:00
Fabio Berger
08168c6e7d Merge branch 'development' into feature/addSubproviders
* development: (50 commits)
  Add PR number to changelog
  Address feedback
  Add requestId to subscription messages and update json-schemas
  Remove isomorphic-fetch types from contracts package
  Update README
  Regenerate files
  Make it private
  Change package name
  Update README
  Make fileExtension configurable
  Rename abi-gen to typed-contracts
  Add docs for typed-contracts
  Remove TODOs
  Introduce separate ContextData type and rework it
  Check ABI is defined
  Introduce a const for 'contract.mustache'
  Improve error message
  Reuse util
  Fix a typo
  Introduce a const for 'function'
  ...

# Conflicts:
#	yarn.lock
2017-12-05 16:18:36 -06:00
Fabio Berger
b5030df4e3 Remove spaces 2017-12-05 16:14:11 -06:00
Fabio Berger
8414c18866 Make exception 2017-12-05 16:12:10 -06:00
Fabio Berger
038668efdf Port subproviders over to mono repo, refactor LedgerSubprovider to no longer rely on hookedWalletSubprovider. Added unit and integration tests. 2017-12-05 15:45:35 -06:00
Brandon Millman
4441d76725 Merge pull request #251 from 0xProject/feature/websocketVersion2
Add requestId to subscription messages and update json-schemas
2017-12-05 11:57:14 -08:00
Brandon Millman
1f494feec4 Add PR number to changelog 2017-12-05 11:55:31 -08:00
Leonid
1153fa093b Merge pull request #249 from 0xProject/feature/typed-contracts
ABI to TS generator
2017-12-05 22:39:36 +03:00
Leonid Logvinov
c64ec92fb2 Address feedback 2017-12-05 22:34:59 +03:00
Brandon Millman
20e28d6c70 Add requestId to subscription messages and update json-schemas 2017-12-05 11:28:32 -08:00
Brandon Millman
c0015c2c11 Remove isomorphic-fetch types from contracts package 2017-12-05 11:25:47 -08:00
Leonid Logvinov
3880f2b3cc Update README 2017-12-05 20:35:14 +03:00
Leonid Logvinov
293847053a Regenerate files 2017-12-05 20:34:39 +03:00
Leonid Logvinov
e042f49e27 Make it private 2017-12-05 20:26:35 +03:00
Leonid Logvinov
c036b96848 Change package name 2017-12-05 20:26:18 +03:00
Leonid Logvinov
e95dba2c25 Update README 2017-12-05 20:12:35 +03:00
Leonid Logvinov
9891d7aaa6 Make fileExtension configurable 2017-12-05 19:59:13 +03:00
Leonid Logvinov
1ce66b4a81 Rename abi-gen to typed-contracts 2017-12-05 19:53:59 +03:00
Leonid Logvinov
63b1199bd5 Add docs for typed-contracts 2017-12-05 18:49:24 +03:00
Fabio Berger
47789d770d bump version 2017-12-05 09:26:00 -06:00
Fabio Berger
df58593ff4 Move testrpc to top-level package.json and standardize some versions 2017-12-05 09:25:45 -06:00
Leonid Logvinov
e2ef7a74db Remove TODOs 2017-12-05 18:07:39 +03:00
Leonid Logvinov
cde52b10b1 Introduce separate ContextData type and rework it 2017-12-05 18:05:03 +03:00
Leonid Logvinov
43983f1bb3 Check ABI is defined 2017-12-05 17:51:47 +03:00
Leonid Logvinov
eb4adcf797 Introduce a const for 'contract.mustache' 2017-12-05 17:46:51 +03:00
Leonid Logvinov
32568ebf09 Improve error message 2017-12-05 17:11:35 +03:00
Leonid Logvinov
c53d195ed0 Reuse util 2017-12-05 17:11:07 +03:00
Leonid Logvinov
9b1c9ecb8b Fix a typo 2017-12-05 17:08:41 +03:00
Leonid Logvinov
8cd204423a Introduce a const for 'function' 2017-12-05 17:08:22 +03:00
Leonid Logvinov
2abc5a88c5 Use lodash's map 2017-12-05 17:07:22 +03:00
Leonid Logvinov
4c0bc02c48 Fix an error message 2017-12-05 17:05:48 +03:00
Leonid Logvinov
16b27c4ae8 Delete abi from typed-contracts 2017-12-05 17:04:46 +03:00
Leonid Logvinov
dc5f4ab28b Type to-snake-case 2017-12-05 17:04:01 +03:00
Leonid Logvinov
f88ecaa035 Fix a comment 2017-12-05 17:01:24 +03:00
Leonid Logvinov
c0cf47138e Add a comment 2017-12-05 16:59:36 +03:00
Leonid Logvinov
e1127dc2e8 Fix a typo 2017-12-05 16:56:50 +03:00
Leonid Logvinov
5d1b845cad Fix linter error 2017-12-01 23:32:44 -06:00
Leonid Logvinov
355514ca38 Update comment 2017-12-01 23:31:50 -06:00
Leonid Logvinov
518d0eba84 Add comments before generated contracts 2017-12-01 23:31:50 -06:00
Leonid Logvinov
78fb8d2bdc Use our promisify 2017-12-01 23:31:50 -06:00
Leonid Logvinov
5673b42ec4 Make target optional 2017-12-01 23:31:50 -06:00
Leonid Logvinov
438c8ff807 Remove es6-promisify 2017-12-01 23:31:50 -06:00
Leonid Logvinov
ee15143dd7 Remove all contract wrapper 2017-12-01 23:31:50 -06:00
Leonid Logvinov
042caa3363 Add async prefix 2017-12-01 23:31:50 -06:00
Leonid Logvinov
eb667f653c Adjust 0x.js to use generated wrappers 2017-12-01 23:31:50 -06:00
Leonid Logvinov
6cbd0d4537 Remove old contract typings 2017-12-01 23:31:11 -06:00
Leonid Logvinov
11bf2a0e06 Add depencies and a command to generate contract wrappers 2017-12-01 23:31:11 -06:00
Leonid Logvinov
9485e4f4f3 Add promisify 2017-12-01 23:31:11 -06:00
Leonid Logvinov
865ee090c8 Add class utils 2017-12-01 23:31:11 -06:00
Leonid Logvinov
0fc356740a Add generated contract wrappers 2017-12-01 23:31:11 -06:00
Leonid Logvinov
f285a46d05 Add generator CLI util 2017-12-01 23:31:11 -06:00
Leonid Logvinov
1e1c99d8d6 Add templates 2017-12-01 23:31:11 -06:00
Amir Bandeali
c291419141 Merge pull request #247 from 0xProject/feature/addContractsRepo
Add contracts repo
2017-12-01 11:29:27 -08:00
Amir Bandeali
290a96d41f Remove duplicate in gitignore 2017-12-01 11:24:55 -08:00
Amir Bandeali
ca9518c48c Make class methods that don't use 'this' static 2017-11-30 22:11:44 -08:00
Amir Bandeali
d44d6ccfd8 Fix module versions, cleanup scripts 2017-11-30 22:06:59 -08:00
Amir Bandeali
cec0b2afe3 Add README to contracts package 2017-11-30 07:34:48 -08:00
Amir Bandeali
e85a69655c Fix indentations 2017-11-30 07:10:18 -08:00
Amir Bandeali
4b3e038323 Add contracts to packages, fix most linting errors 2017-11-30 07:10:18 -08:00
Fabio Berger
c57190dead Add orderWatcher to 0x.js docs 2017-11-29 18:57:21 -06:00
Fabio Berger
3d73167f53 Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Publish
  Update CHANGELOG.md
  Redeclare Order, SignedOrder, and ECSignature types in connect, remove 0x.js dependency
  Add SignedOrder and TokenTradeInfo to public interface and fix a HttpClient comment
2017-11-29 15:15:35 -06:00
Fabio Berger
2eefec54b4 Add order and signedOrder to public types 2017-11-29 15:13:21 -06:00
Brandon Millman
ab72656fdf Publish
- @0xproject/connect@0.2.0
 - website@0.0.1
2017-11-29 12:39:54 -08:00
Brandon Millman
b6f2f98db6 Update CHANGELOG.md 2017-11-29 12:36:28 -08:00
Brandon Millman
c051c48600 Merge pull request #246 from 0xProject/fix/signedOrderInConnect
Redeclare Order, SignedOrder, and ECSignature types in connect, remov…
2017-11-29 12:24:26 -08:00
Brandon Millman
04fc16587b Redeclare Order, SignedOrder, and ECSignature types in connect, remove 0x.js dependency 2017-11-29 12:19:16 -08:00
Brandon Millman
f1d5a7d31f Merge pull request #245 from 0xProject/fix/exportedTypes
Add SignedOrder and TokenTradeInfo to public interface and fix a Http…
2017-11-29 11:48:28 -08:00
Brandon Millman
7197356928 Add SignedOrder and TokenTradeInfo to public interface and fix a HttpClient comment 2017-11-29 11:27:34 -08:00
Fabio Berger
a75d547af6 Add TokenTradeInfo to public types 2017-11-29 10:33:09 -06:00
Fabio Berger
bdecb18e3e Merge pull request #244 from 0xProject/feature/connect-docs
Add Connect Docs
2017-11-29 09:03:42 -06:00
Fabio Berger
e2adcaa185 Merge branch 'development' into feature/connect-docs
* development:
  Fix connect documentation introduction and installation wording

# Conflicts:
#	packages/website/md/docs/connect/installation.md
#	packages/website/md/docs/connect/introduction.md
2017-11-29 09:03:27 -06:00
Fabio Berger
4193893349 Rename @0xproject/connect to 0x Connect 2017-11-29 08:59:57 -06:00
Fabio Berger
53522a98b9 Rename packageName to displayName for clarity 2017-11-29 08:52:49 -06:00
Fabio Berger
0e856ccfab Fix phantom Contracts section issue 2017-11-29 08:48:11 -06:00
Fabio Berger
6093ee7824 Add 0x Connect to footer 2017-11-29 08:47:55 -06:00
Fabio Berger
46f185bbeb Update 0x.js to 0.27.1 2017-11-29 08:30:31 -06:00
Brandon Millman
8bfa880371 Fix connect documentation introduction and installation wording 2017-11-28 16:28:57 -08:00
Fabio Berger
a7f0d03611 Lock the 0x.js version used in website 2017-11-28 16:22:18 -06:00
Fabio Berger
9ce899d3f3 Merge branch 'development' into feature/connect-docs
* development:
  rename for clarity
  remove unused code
  Publish
2017-11-28 16:06:44 -06:00
Fabio Berger
e71c7fdb16 Merge pull request #243 from 0xProject/fix/refactorDocs
Refactor docs
2017-11-28 16:06:09 -06:00
Fabio Berger
4258e6dab1 rename for clarity 2017-11-28 16:05:13 -06:00
Fabio Berger
e59b683047 remove unused code 2017-11-28 16:05:04 -06:00
Fabio Berger
3c3033586d Add 0x Connect Docs to the menu and topBar 2017-11-28 16:02:31 -06:00
Fabio Berger
166c741beb Add connect docs 2017-11-28 15:42:37 -06:00
Fabio Berger
629a0fa3a5 Add subPackageName and get rid of hard-coded 0x.js in sourceLink 2017-11-28 15:42:27 -06:00
Fabio Berger
15ce862334 Merge branch 'development' into fix/refactorDocs
* development: (30 commits)
  Export TransactionOpts type
  Make website private
  Publish
  Update CHANGELOG
  Change interval to 1h
  Rename
  Add ifExists to cleanupJobInterval
  Add a cleanup job to an order watcher
  Improve the comment
  Add CHANGELOG comment
  Add a HACK comment
  Normalise subprovider names
  Remove a comment
  Fix a typo
  Pin testrpc version
  Remove gas params from tests
  Add fake gas estimate suprovider for tests
  Revert "Fix website linter errors"
  Fix website linter errors
  Fix tests
  ...

# Conflicts:
#	packages/website/ts/utils/constants.ts
2017-11-28 15:21:15 -06:00
Leonid Logvinov
840557be0d Publish
- 0x.js@0.27.1
 - @0xproject/connect@0.1.2
 - website@0.0.0
2017-11-28 15:14:32 -06:00
Fabio Berger
72a00ac2df Refactor the topLevel documentation react components for 0x.js and Smart contracts into a single component 2017-11-28 15:11:04 -06:00
Leonid Logvinov
da0af12834 Export TransactionOpts type 2017-11-28 14:54:52 -06:00
Leonid Logvinov
7617b6681c Make website private 2017-11-28 14:51:38 -06:00
Leonid Logvinov
8e13c477a3 Publish
- 0x.js@0.27.0
 - @0xproject/assert@0.0.6
 - @0xproject/connect@0.1.1
 - @0xproject/json-schemas@0.6.9
 - @0xproject/tslint-config@0.2.0
 - website@0.0.0
2017-11-28 14:47:42 -06:00
Leonid Logvinov
ff334b0e53 Update CHANGELOG 2017-11-28 14:42:55 -06:00
Leonid
a98d6bf496 Merge pull request #235 from 0xProject/feature/gasPriceGasLimit
Add optional config for gasPrice and gasLimit for every transaction sending method
2017-11-28 14:37:33 -06:00
Leonid
bbcf669bd9 Merge pull request #242 from 0xProject/feature/orderWatcherCleanup
Add a cleanup job to an order watcher
2017-11-28 14:37:15 -06:00
Leonid Logvinov
328ecd0533 Change interval to 1h 2017-11-28 14:33:08 -06:00
Leonid Logvinov
ab91717199 Rename 2017-11-28 14:27:39 -06:00
Leonid Logvinov
e4dfdc6b5c Add ifExists to cleanupJobInterval 2017-11-28 14:27:16 -06:00
Leonid Logvinov
9e673f0073 Add a cleanup job to an order watcher 2017-11-28 14:11:00 -06:00
Leonid Logvinov
353abffba9 Improve the comment 2017-11-28 12:23:41 -06:00
Leonid Logvinov
bead76a5b7 Add CHANGELOG comment 2017-11-28 12:16:02 -06:00
Leonid Logvinov
9f5e724aec Add a HACK comment 2017-11-28 12:13:50 -06:00
Leonid Logvinov
50bf6a991d Normalise subprovider names 2017-11-28 12:12:25 -06:00
Leonid Logvinov
1d584b1329 Remove a comment 2017-11-28 12:10:06 -06:00
Leonid Logvinov
0c5a9fbc2c Fix a typo 2017-11-28 12:06:11 -06:00
Leonid Logvinov
d5e58ecdd8 Pin testrpc version 2017-11-28 12:05:32 -06:00
Leonid Logvinov
d6a9e7520d Remove gas params from tests 2017-11-28 11:51:10 -06:00
Leonid Logvinov
36b21e6e7b Add fake gas estimate suprovider for tests 2017-11-28 11:44:10 -06:00
Leonid Logvinov
977a6b2794 Revert "Fix website linter errors"
This reverts commit 6e2a69976b.
2017-11-28 11:43:42 -06:00
Fabio Berger
fcddd503b7 Fix tslint error 2017-11-28 11:16:42 -06:00
Fabio Berger
3472bdcfd4 Refactor docs to be more declarative, put all hard-coded doc-related data in one place so it easier to add new doc pages 2017-11-28 11:16:35 -06:00
Fabio Berger
78f0ab3682 Last remaining website fixes 2017-11-27 22:23:51 -06:00
Fabio Berger
5a59ac4c6b fix remaining tslint errors 2017-11-27 22:08:08 -06:00
Fabio Berger
0a19ba3014 Fix tslint issues 2017-11-27 21:38:09 -06:00
Fabio Berger
88bd0f5328 Add lint command to website sub-package 2017-11-27 19:58:53 -06:00
Leonid Logvinov
6e2a69976b Fix website linter errors 2017-11-27 18:06:15 -06:00
Leonid Logvinov
0500602ac3 Fix tests 2017-11-27 17:38:38 -06:00
Leonid Logvinov
e6887dc9d4 Fix a comment 2017-11-27 17:37:55 -06:00
Leonid Logvinov
082c5c375e Fix tests 2017-11-27 17:37:55 -06:00
Leonid Logvinov
5977fa881e Increase gas margin 2017-11-27 17:37:23 -06:00
Leonid Logvinov
128fccb763 Fix defaults for shouldValidate 2017-11-27 17:37:23 -06:00
Leonid Logvinov
65697f5896 Update MAX_REASONABLE_GAS_COST_IN_WEI 2017-11-27 17:37:23 -06:00
Leonid Logvinov
ee93f091ea Add gas margin and remove undefined values 2017-11-27 17:37:22 -06:00
Leonid Logvinov
33a8c7a9fb Update testrpc 2017-11-27 17:37:22 -06:00
Leonid Logvinov
d1065cd266 Add an initializer for txOpts in etherToken 2017-11-27 17:36:27 -06:00
Leonid Logvinov
0e44a630f0 Add CHANGELOG entry 2017-11-27 17:36:27 -06:00
Leonid Logvinov
7a21c6854b Add option config for gasPrice and gasLimit for every transaction sending method 2017-11-27 17:35:55 -06:00
Fabio Berger
54ef916b93 Merge pull request #233 from 0xProject/feature/passNetworkId
Forces the users of 0x.js to pass the network id
2017-11-27 17:15:18 -06:00
Brandon Millman
4a770dee84 Merge pull request #241 from 0xProject/fix/moveConnectTypes
Move all connect types into types.ts
2017-11-27 14:42:26 -08:00
Brandon Millman
426a412ba1 Move all connect types into types.ts 2017-11-27 14:34:34 -08:00
Leonid Logvinov
f862a2af6d Fix tests 2017-11-27 16:32:33 -06:00
Leonid Logvinov
32867c9a07 Fix merge conflicts 2017-11-27 16:03:57 -06:00
Leonid
cf0a8b2d05 Merge branch 'development' into feature/passNetworkId 2017-11-27 15:53:21 -06:00
Brandon Millman
4a17f5e820 Merge pull request #240 from 0xProject/fix/websiteMdDirectory
Add md directory to website package and change generated docs directory
2017-11-27 13:02:08 -08:00
Fabio Berger
694c37150c Merge pull request #239 from 0xProject/fix/docs
Fix 0x.js Doc Issues
2017-11-27 14:44:32 -06:00
Brandon Millman
b04d07815f Add md directory to website package and change generated docs directory 2017-11-27 12:12:19 -08:00
Fabio Berger
e7b523074a remove comment 2017-11-27 12:24:11 -06:00
Fabio Berger
4e03155588 Add link to Provider explanation 2017-11-27 12:06:03 -06:00
Fabio Berger
3e5abc60d3 Add "Web3" prefix to web3 alias types and link to the correct line in the web3 typings 2017-11-27 12:05:39 -06:00
Fabio Berger
edf80aba1a Fix overlapping arg names 2017-11-27 10:56:33 -06:00
Fabio Berger
25ec4cf7b0 Fix source links in 0x.js docs 2017-11-27 10:25:53 -06:00
Fabio Berger
48b3d85265 Merge pull request #237 from 0xProject/addWebsite
Add Website to Mono Repo
2017-11-27 10:05:47 -06:00
Fabio Berger
ecfee00fec Fix subscriptions given latest changes to 0x.js 2017-11-23 18:21:48 -06:00
Fabio Berger
b5ce876327 Update CHANGELOG.md 2017-11-23 17:35:53 -06:00
Fabio Berger
d1342c6326 Merge branch 'development' into addWebsite
* development: (41 commits)
  Add validation fix to changelog
  Fix tests now that we no longer fire duplicate orderWatcher events
  Add comment about BlockParamLiteral explaining the omission of Earliest
  Add missing type
  Pass 'latest' to ExchangeTransferSimulator when used for validating orders, and pass 'pending' when used in the order watcher.
  Remove `Earliest` from blockParamLiterals since specifying block 0 is trivial and this type can be reused in situations where the options are pending or latest
  Rename removed to isRemoved
  Add CHANGELOG entry
  Make DecodedLogEvent contain web3 log under a log subkey
  Update to Async call
  Fix nits
  Add @0xproject/connect to the main README
  Fix connect CHANGELOG version
  Publish
  Fix npm auth issues
  Perform the division last to not compound any errors
  add a test constant for ZRX decimals
  Add a test for when the ratio is < 1
  Remove only
  calculatedFillableAmountPlusFees
  ...
2017-11-23 17:08:20 -06:00
Fabio Berger
d3dcb2fd40 Add validation fix to changelog 2017-11-23 17:05:12 -06:00
Fabio Berger
c448d048fd Merge pull request #236 from 0xProject/fix/validateOrdersAgainstLatestBlock
Fix/validate orders against latest block
2017-11-23 17:02:57 -06:00
Fabio Berger
f0b3ee84b4 Fix tests now that we no longer fire duplicate orderWatcher events 2017-11-23 15:56:42 -06:00
Fabio Berger
ab78c54d6a Add comment about BlockParamLiteral explaining the omission of Earliest 2017-11-23 15:36:46 -06:00
Fabio Berger
cee0d2706f Add missing type 2017-11-23 15:32:00 -06:00
Fabio Berger
8dea47f038 Merge branch 'development' into validateOrdersAgainstLatestBlock
* development:
  Rename removed to isRemoved
  Add CHANGELOG entry
  Make DecodedLogEvent contain web3 log under a log subkey
2017-11-23 15:24:32 -06:00
Fabio Berger
b7b1721145 Pass 'latest' to ExchangeTransferSimulator when used for validating orders, and pass 'pending' when used in the order watcher. 2017-11-23 15:21:45 -06:00
Fabio Berger
5068f1666a Remove Earliest from blockParamLiterals since specifying block 0 is trivial and this type can be reused in situations where the options are pending or latest 2017-11-23 15:20:20 -06:00
Leonid Logvinov
37f0051d83 Update CHANGELOG.md 2017-11-23 15:16:04 -06:00
Leonid Logvinov
c780d04cee Remove ContractDoesNotExist error and replace it with more specific errors 2017-11-23 15:15:47 -06:00
Leonid Logvinov
8c54e9a873 Add a regression test 2017-11-23 15:15:47 -06:00
Leonid Logvinov
062f85e506 Pass networkId on provider update 2017-11-23 15:15:47 -06:00
Leonid Logvinov
b3c0d54acd Fix linter issue 2017-11-23 15:15:47 -06:00
Leonid Logvinov
3d11afd872 Remove outdated comment 2017-11-23 15:15:47 -06:00
Leonid Logvinov
96d15a8931 Improve a comment 2017-11-23 15:15:47 -06:00
Leonid Logvinov
50915e6007 Add a comment 2017-11-23 15:15:47 -06:00
Leonid Logvinov
52007e5864 Reuse the protected function to get contract address 2017-11-23 15:15:47 -06:00
Leonid Logvinov
0c74d5ba01 Move variable declaration inside the if 2017-11-23 15:15:47 -06:00
Leonid Logvinov
0cd1959706 Update CHANGELOG.md 2017-11-23 15:15:17 -06:00
Leonid Logvinov
55ddf62df2 Fix rebasing issues 2017-11-23 15:15:17 -06:00
Leonid Logvinov
7f69d26247 Add CHANGELOG entry 2017-11-23 15:15:17 -06:00
Leonid Logvinov
b3c01f6750 Revert "Remove redundant async"
This reverts commit 8d11ababd62d947e338757f57c41179510b11338.
2017-11-23 15:15:00 -06:00
Leonid Logvinov
34beee1edc Refactor getContractAddress to contractWrapper 2017-11-23 15:15:00 -06:00
Leonid Logvinov
7bc6a7b23f Remove redundant async 2017-11-23 15:13:38 -06:00
Leonid Logvinov
4a19655fb0 Fix the artifacts 2017-11-23 15:13:38 -06:00
Leonid Logvinov
e32c453bc3 Remove unused asyncs 2017-11-23 15:13:38 -06:00
Leonid Logvinov
7b8d9193e2 Auto-fix linter errors in other mono-repo packages 2017-11-23 15:13:37 -06:00
Leonid Logvinov
74633126ce Add type information for the linter 2017-11-23 15:13:37 -06:00
Leonid Logvinov
2fa5bb2028 Autofix json-schemas linter errors 2017-11-23 15:13:37 -06:00
Leonid Logvinov
010e6f8d7f Fix the imports order 2017-11-23 15:13:37 -06:00
Leonid Logvinov
3d5b6ec110 Enforce comments on public methods 2017-11-23 15:13:37 -06:00
Leonid Logvinov
db2917b01c Enable some new linter rules and fix the issues 2017-11-23 15:13:37 -06:00
Leonid Logvinov
87d34f9c7f Auto-fix linter errors 2017-11-23 15:13:37 -06:00
Leonid Logvinov
d20926e150 Don't reassign the parameter 2017-11-23 15:13:37 -06:00
Leonid Logvinov
c453099f6b Fix linter issues 2017-11-23 15:13:37 -06:00
Leonid Logvinov
08569dbe6c Await block reconcilation 2017-11-23 15:13:37 -06:00
Leonid Logvinov
a38ef3655b Remove even more asyncs 2017-11-23 15:13:37 -06:00
Leonid Logvinov
c586d3e81d Add project config to tslint which enables some type-dependent rules 2017-11-23 15:13:37 -06:00
Leonid Logvinov
c72745b0b2 Make zeroEx.tokenRegistry.getContractAddress non-async 2017-11-23 15:13:37 -06:00
Leonid Logvinov
8935146240 Make exchange subscriptions non-async 2017-11-23 15:13:37 -06:00
Leonid Logvinov
66aaceea91 Cleanup order watcher from redundant asyncs 2017-11-23 15:13:36 -06:00
Leonid Logvinov
4fe28ec53c Make zeroEx.exchange.getContractAddress non-async 2017-11-23 15:13:36 -06:00
Leonid Logvinov
efe8e07854 Add ZRX artifacts 2017-11-23 15:13:36 -06:00
Leonid Logvinov
63dc606a9c Make getZRXTokenAddress non async 2017-11-23 15:13:36 -06:00
Leonid Logvinov
131236305b Store networkId in web3Wrapper 2017-11-23 15:13:36 -06:00
Leonid Logvinov
45c9171a2c Add networkId to zeroExConfig schema 2017-11-23 15:13:36 -06:00
Leonid Logvinov
311d42626a Adjust the tests 2017-11-23 15:13:36 -06:00
Leonid Logvinov
cbf35de4c1 Fix CI tests 2017-11-23 15:13:36 -06:00
Leonid Logvinov
92efc65847 Add networkId to ZeroExConfig and make it required 2017-11-23 15:13:36 -06:00
Leonid
17e41f2391 Merge pull request #234 from 0xProject/feature/eventTypes
Make DecodedLogEvent contain web3 log under a log subkey
2017-11-23 15:13:07 -06:00
Leonid Logvinov
fcd37808d4 Rename removed to isRemoved 2017-11-23 15:12:34 -06:00
Leonid Logvinov
6323badc19 Add CHANGELOG entry 2017-11-23 15:12:34 -06:00
Leonid Logvinov
e01468b492 Make DecodedLogEvent contain web3 log under a log subkey 2017-11-23 15:12:34 -06:00
Fabio Berger
f7f2390ce1 Add exit code 0 because it is expected that uglifying the code throws an error 2017-11-23 14:01:23 -06:00
Fabio Berger
6118561bb5 update tokenByAddress after tokenStateByAddress to avoid race-condition 2017-11-23 13:58:27 -06:00
Fabio Berger
6a9f10cd36 Add error when unexpected condition hit 2017-11-23 13:57:01 -06:00
Fabio Berger
e7a4e03194 Fix alignment 2017-11-23 13:56:42 -06:00
Fabio Berger
a42e8ae873 Add missing keys 2017-11-23 13:56:34 -06:00
Fabio Berger
bcc5d63516 Fix bug 2017-11-23 13:56:16 -06:00
Fabio Berger
f97074dc84 Merge pull request #230 from 0xProject/feature/removeDuplicateEvents
Add an order state cache to filter out duplicate events
2017-11-23 12:35:18 -06:00
Fabio Berger
bd81124b5a Merge pull request #226 from dekz/feature/calculate-remaining-proportions
Calculate remaining proportions from fee to ratio proportions
2017-11-23 12:33:06 -06:00
Jacob Evans
5a18f43b51 Update to Async call 2017-11-23 15:17:11 +11:00
Jacob Evans
924b96ce2a Fix nits 2017-11-23 15:14:33 +11:00
Jacob Evans
47236dbaec Merge branch 'development' into feature/calculate-remaining-proportions 2017-11-23 14:38:10 +11:00
Jacob Evans
437ac301db Merge branch 'development' into feature/calculate-remaining-proportions 2017-11-23 14:37:34 +11:00
Brandon Millman
215740fab2 Add @0xproject/connect to the main README 2017-11-22 15:39:05 -08:00
Fabio Berger
c66fc63452 Merge branch 'development' into addWebsite
* development:
  Revert "Publish"
  Publish
  Add actual version to CHANGELOG
  Add blockchainLifecycle management to the ExpirationWatcher test
  Update connect CHANGELOG.md in preperation for publishing
  Add TODO comment before BigNumber.config() call
  Prepare connect package for publishing
2017-11-22 17:26:48 -06:00
Brandon Millman
02aefc40f3 Fix connect CHANGELOG version 2017-11-22 15:10:50 -08:00
Brandon Millman
cd42ca1bbd Publish
- 0x.js@0.26.1
     - @0xproject/connect@0.1.0
2017-11-22 15:07:34 -08:00
Brandon Millman
05bfd764b6 Fix npm auth issues
Related lerna issue: https://github.com/lerna/lerna/issues/896
2017-11-22 15:05:03 -08:00
Fabio Berger
99f2026ce2 Revert "Publish"
This reverts commit 6a8717b294.
2017-11-22 16:51:09 -06:00
Fabio Berger
6a8717b294 Publish
- 0x.js@0.26.1
 - @0xproject/connect@0.1.0
2017-11-22 16:50:16 -06:00
Fabio Berger
c3f24a9cea Add actual version to CHANGELOG 2017-11-22 16:47:24 -06:00
Fabio Berger
805a055946 Force the clearance of tradeHistory 2017-11-22 16:43:17 -06:00
Brandon Millman
c0e17f6136 Add blockchainLifecycle management to the ExpirationWatcher test 2017-11-22 14:20:45 -08:00
Brandon Millman
b38142ddb1 Update connect CHANGELOG.md in preperation for publishing 2017-11-22 13:54:07 -08:00
Brandon Millman
0b29514836 Merge pull request #232 from 0xProject/feature/prepareConnectForPublish
Prepare connect package for publishing
2017-11-22 13:31:16 -08:00
Brandon Millman
27ce87f652 Add TODO comment before BigNumber.config() call 2017-11-22 13:26:15 -08:00
Brandon Millman
a61a7b688a Prepare connect package for publishing 2017-11-22 13:12:17 -08:00
Fabio Berger
f74408f390 Merge branch 'development' into addWebsite
* development: (33 commits)
  Last renames
  Refactor while condition
  Fix tests
  Fix tests
  Fix a typo
  Fix test:circleci command
  Check if transactionReceipt exists before normalizing it
  Address nits
  Remove old comment
  Fix async callbacks
  Check if callback exists
  Rename
  Pass callback down
  Remove custom heap and use bintrees
  Add expirationMarginMs
  Add defaults
  Fix typos
  Rename orderLifetime to orderLifetimeS
  Reference types directly
  Add ifExists suffix
  ...
2017-11-22 14:22:22 -06:00
Fabio Berger
f5e0fd8de5 Upgrade to latest 0x.js version and refactor subscriptions to use latest interface 2017-11-22 14:21:07 -06:00
Fabio Berger
353b6f3d6d add bundles to gitignore 2017-11-22 14:20:35 -06:00
Fabio Berger
cb377f29c2 Fix build bug 2017-11-22 14:20:24 -06:00
Leonid
0e03ef385b Merge pull request #227 from 0xProject/feature/orderExpired
Add expirationWatcher
2017-11-22 12:02:31 -06:00
Leonid Logvinov
ac2c723ec9 Last renames 2017-11-22 11:56:34 -06:00
Leonid Logvinov
3fc0eae4c0 Refactor while condition 2017-11-22 11:44:34 -06:00
Leonid
beed223281 Merge branch 'development' into feature/orderExpired 2017-11-22 11:24:59 -06:00
Jacob Evans
9c9ce97525 Perform the division last to not compound any errors 2017-11-22 11:08:39 +11:00
Jacob Evans
4bfb1fcc71 add a test constant for ZRX decimals 2017-11-22 10:54:09 +11:00
Jacob Evans
15628a1206 Add a test for when the ratio is < 1 2017-11-22 10:43:38 +11:00
Jacob Evans
a1411e3d52 Remove only 2017-11-22 08:05:47 +11:00
Leonid Logvinov
66750f7349 Fix tests 2017-11-21 14:03:32 -06:00
Fabio Berger
f7f1397e52 Merge branch 'development' into addWebsite
* development:
  Fix a typo in  postpublish utils tags -> tag
  Publish
  Revert "Publish"
  Publish
  Add instanceOf assertion
  Rename toDecimal to hexToDecimal
  Add PR numbers
  Add postFormatter for logs
2017-11-21 14:03:26 -06:00
Fabio Berger
3660ba28d7 Add website to mono repo, update packages to align with existing sub-packages, use new subscribeAsync 0x.js method 2017-11-21 14:03:08 -06:00
Leonid Logvinov
e3cc283478 Fix a typo in postpublish utils tags -> tag 2017-11-21 13:43:39 -06:00
Leonid Logvinov
9a2735d035 Publish
- 0x.js@0.26.0
 - @0xproject/assert@0.0.5
 - @0xproject/connect@0.0.1
 - @0xproject/json-schemas@0.6.8
 - @0xproject/tslint-config@0.1.1
2017-11-21 13:34:33 -06:00
Leonid Logvinov
06cd2f1eb3 Revert "Publish"
This reverts commit 41315827c1.
2017-11-21 13:31:47 -06:00
Leonid Logvinov
41315827c1 Publish
- 0x.js@0.26.0
 - @0xproject/assert@0.0.5
 - @0xproject/connect@0.0.1
 - @0xproject/json-schemas@0.6.8
 - @0xproject/tslint-config@0.1.1
2017-11-21 13:27:42 -06:00
Leonid
415fd101d3 Merge pull request #231 from 0xProject/fix/logsPostFormatting
Add postFormatter for logs
2017-11-21 13:24:47 -06:00
Leonid Logvinov
0747e162fa Add instanceOf assertion 2017-11-21 13:18:29 -06:00
Leonid Logvinov
8d6ba6ee7a Rename toDecimal to hexToDecimal 2017-11-21 13:16:55 -06:00
Leonid Logvinov
173a707a2e Add PR numbers 2017-11-21 13:15:05 -06:00
Leonid Logvinov
c8c95b4bd2 Add postFormatter for logs 2017-11-21 13:09:23 -06:00
Leonid Logvinov
351b7557b6 Fix tests 2017-11-21 12:21:49 -06:00
Leonid Logvinov
4dc1962f9e Fix a typo 2017-11-21 11:59:34 -06:00
Jacob Evans
335b9629b8 calculatedFillableAmountPlusFees 2017-11-21 15:00:09 +11:00
Jacob Evans
d16f0508bd totalZRXTransferAmount -> totalZRXTransferAmountRequired 2017-11-21 14:57:08 +11:00
Jacob Evans
da03331015 Unit test edge case for ZRX and ZRX partial fill 2017-11-21 14:51:19 +11:00
Jacob Evans
43128234bb setting a failed test 2017-11-21 14:00:21 +11:00
Jacob Evans
bbcee8dfa7 Move to base units 2017-11-21 13:04:36 +11:00
Jacob Evans
5b8f84f59a Added unit test for calculator 2017-11-21 12:58:17 +11:00
Leonid Logvinov
cfcbf34305 Fix test:circleci command 2017-11-20 17:46:53 -06:00
Jacob Evans
4bd5789203 Refactor into a calculator class 2017-11-21 10:30:29 +11:00
Leonid Logvinov
c4669013ab Check if transactionReceipt exists before normalizing it 2017-11-20 17:24:30 -06:00
Leonid Logvinov
3ad6020e19 Address nits 2017-11-20 16:55:53 -06:00
Leonid Logvinov
3fc8645d92 Remove old comment 2017-11-20 16:52:53 -06:00
Jacob Evans
fb812d59b0 Fixes before refactor 2017-11-21 09:50:37 +11:00
Leonid Logvinov
3e0371685f Fix async callbacks 2017-11-20 16:39:34 -06:00
Leonid Logvinov
3bc3666215 Check if callback exists 2017-11-20 16:25:51 -06:00
Leonid Logvinov
b01a4af99e Rename 2017-11-20 16:17:23 -06:00
Leonid Logvinov
9745d5348c Pass callback down 2017-11-20 16:14:40 -06:00
Leonid Logvinov
c858ff61f7 Add an order state cache to filter out duplicate events 2017-11-20 16:07:16 -06:00
Leonid
d39c0bee39 Merge branch 'development' into feature/orderExpired 2017-11-20 14:46:53 -06:00
Leonid Logvinov
5788b90c52 Remove custom heap and use bintrees 2017-11-20 14:40:53 -06:00
Fabio Berger
037f466e1f Merge pull request #225 from dekz/feature/track-zrx-movements
Track ZRX Approval and Balance events
2017-11-20 13:54:07 -06:00
Leonid Logvinov
71475d3cea Add expirationMarginMs 2017-11-20 13:47:09 -06:00
Leonid Logvinov
a613c3b7e7 Add defaults 2017-11-20 13:02:24 -06:00
Leonid Logvinov
35668fe225 Fix typos 2017-11-20 12:54:22 -06:00
Leonid Logvinov
83a2abeee4 Rename orderLifetime to orderLifetimeS 2017-11-20 12:53:49 -06:00
Leonid Logvinov
49d926013c Reference types directly 2017-11-20 12:53:16 -06:00
Leonid Logvinov
c068ec5231 Add ifExists suffix 2017-11-20 12:49:55 -06:00
Leonid Logvinov
86d19657b1 Improve the comment 2017-11-20 11:17:53 -06:00
Leonid Logvinov
67ad07020d Remove comment 2017-11-20 11:16:40 -06:00
Leonid Logvinov
fa2c4160b5 Remove new line 2017-11-20 11:15:48 -06:00
Leonid Logvinov
a37f019806 Delete orderExpirationCheckingIntervalIdIfExists 2017-11-20 11:15:01 -06:00
Leonid Logvinov
20449a0cb2 Throw when subscription is already removed 2017-11-20 11:13:54 -06:00
Leonid Logvinov
856a5c3369 Throw when subscription is already present 2017-11-20 11:10:25 -06:00
Leonid Logvinov
2c193a1244 Remove redundant bind 2017-11-20 11:06:32 -06:00
Leonid Logvinov
c4d10a6f2d Do simple inits inline 2017-11-20 11:05:37 -06:00
Jacob Evans
d6589004c7 fix bug when fees and partial asymmetric 2017-11-20 11:10:50 +11:00
Jacob Evans
519f1318c6 remove import 2017-11-20 11:02:16 +11:00
Jacob Evans
7460a36ce2 calculate remaining maker token amount 2017-11-20 10:55:28 +11:00
Jacob Evans
c8f6e3f923 Remove only 2017-11-20 10:45:40 +11:00
Jacob Evans
7b373e29ea Split into Pooled and non-pooled 2017-11-20 10:45:01 +11:00
Jacob Evans
94ce7a54c3 Incorrect amount when is zero or non-zrx fee 2017-11-20 09:20:37 +11:00
Jacob Evans
3bb6d8871b Readability variable names 2017-11-20 09:04:26 +11:00
Fabio Berger
98394c6e37 Merge pull request #228 from 0xProject/feature/publishLifecycleScripts
Add postpublish scripts for sub-packages
2017-11-17 19:30:51 -05:00
Leonid Logvinov
e755ed927c Remove order on expiration 2017-11-17 17:25:58 -06:00
Fabio Berger
37a9b64503 Small fixes 2017-11-17 17:00:15 -06:00
Fabio Berger
0de00da753 Merge branch 'development' into feature/publishLifecycleScripts
* development:
  Remove clean step from test_umd.sh
  Update CHANGELOG.md
  vx.x.x
  Add CHANGELOG files to each sub-package
  Fix 0x.js CHANGELOG
  separate assignment and call
  Remove Async subscribe callbacks from OrderWatcher
  Update changelog
  Callback for subscribe no longer supports an Async Callback
2017-11-17 16:54:57 -06:00
Fabio Berger
a4ae3c1e14 Updated yarn.lock 2017-11-17 16:50:14 -06:00
Fabio Berger
7f595169c1 Put release name generation into postpublish_utils 2017-11-17 16:44:56 -06:00
Fabio Berger
abee7d25a4 Add back promisify 2017-11-17 16:43:15 -06:00
Fabio Berger
49ba456189 Set S3 bucket path to variable 2017-11-17 14:49:46 -06:00
Fabio Berger
6a83687f45 reset all sub-package versions to latest actually published 2017-11-17 14:44:44 -06:00
Fabio Berger
70f4453e3e Get package name from package.json 2017-11-17 14:33:43 -06:00
Fabio Berger
cd0f6716e8 remove unused imports 2017-11-17 14:33:28 -06:00
Brandon Millman
5042b85d21 Remove clean step from test_umd.sh 2017-11-17 12:32:58 -08:00
Fabio Berger
5015f2d7d7 Add postpublish scripts for all the subpackages so that they each publish a release to github 2017-11-17 14:10:18 -06:00
Fabio Berger
5277d4a266 Move most of code for getting latest tag/version and calling publish_release to postpublish_utils script in top-level dir 2017-11-17 14:09:48 -06:00
Fabio Berger
f25b2d9ab9 Set prerelease to true so that non of the releases are marked as "latest" 2017-11-17 13:19:33 -06:00
Fabio Berger
0402d3de80 Move upload_docs_json back to npm script and pass in vars properly. 2017-11-17 13:19:12 -06:00
Leonid Logvinov
d3e03744cd Improve the comment 2017-11-17 13:06:10 -06:00
Leonid Logvinov
34926eb66a Add tests for expirationWatcher 2017-11-17 13:02:37 -06:00
Leonid Logvinov
b7585318c7 Fix heap implementation 2017-11-17 13:02:17 -06:00
Fabio Berger
e70c3976db Use yarn docs:json command 2017-11-17 13:30:26 -05:00
Fabio Berger
2c055db0d7 update yarn.lock 2017-11-17 13:24:49 -05:00
Fabio Berger
50dc1d3db3 specify the current working directory in which to run the yarn command 2017-11-17 13:24:36 -05:00
Fabio Berger
2e368b50eb print out file name in console 2017-11-17 13:24:15 -05:00
Fabio Berger
7b61ad639b small fixes 2017-11-17 12:23:27 -05:00
Fabio Berger
741774c4a7 Update CHANGELOG.md 2017-11-17 12:13:40 -05:00
Jacob Evans
33c1259fa2 Merge branch 'development' into feature/track-zrx-movements 2017-11-15 19:31:45 -05:00
Jacob Evans
9ee04fb14c Merge branch 'development' into feature/track-zrx-movements 2017-11-15 19:31:08 -05:00
Jacob Evans
e9a5ae21e0 Fix nits 2017-11-15 19:30:18 -05:00
Jacob Evans
0bcf7e56c2 Change to Async suffix convention 2017-11-15 19:10:44 -05:00
Fabio Berger
141f185c72 Merge pull request #222 from dekz/syncSubscribe
Remove support for Async callback types when used in Subscribe functions
2017-11-15 18:57:17 -05:00
Jacob Evans
e1b2c64654 Merge branch 'development' into syncSubscribe 2017-11-15 18:25:41 -05:00
Jacob Evans
d7e5c6f9b5 Merge branch 'development' into syncSubscribe 2017-11-15 18:25:09 -05:00
Brandon Millman
1e5cc3b0e5 experiment with calling typedoc programatically 2017-11-15 18:17:41 -05:00
Jacob Evans
85c3b2996d vx.x.x 2017-11-15 16:48:30 -05:00
Fabio Berger
9a57f71ee6 improve script 2017-11-15 16:47:35 -05:00
Jacob Evans
cf7727debc refactor up 2017-11-15 16:37:02 -05:00
Jacob Evans
9133e764a5 Use 18 decimal place units 2017-11-15 16:22:35 -05:00
Jacob Evans
c32938fa43 Shortcut if everything satisfies in the non dependent use case 2017-11-15 16:20:39 -05:00
Fabio Berger
827c245777 postpublish script fixes 2017-11-15 16:19:33 -05:00
Leonid Logvinov
88d020f9f2 Add initial implementation of expiration watcher 2017-11-15 14:54:56 -06:00
Jacob Evans
54c891a447 Fix test 2017-11-15 15:52:23 -05:00
Brandon Millman
6096fe75d3 WIP 2017-11-15 15:46:58 -05:00
Jacob Evans
a2e1d28efc Remove comments 2017-11-15 15:26:22 -05:00
Brandon Millman
a9fbe921a0 WIP 2017-11-15 15:14:20 -05:00
Jacob Evans
ee8042b458 Add return type 2017-11-15 14:40:43 -05:00
Jacob Evans
1e1b14edc5 test wording 2017-11-15 12:12:01 -05:00
Jacob Evans
4c505b6470 Add a pending changelog 2017-11-15 12:09:27 -05:00
Jacob Evans
471abfa760 Add and Remove Fee Token with Maker Token 2017-11-15 12:08:12 -05:00
Jacob Evans
590552d3e0 Initial tests 2017-11-15 11:12:40 -05:00
Fabio Berger
557faba31b Add CHANGELOG files to each sub-package 2017-11-15 10:11:04 -05:00
Fabio Berger
2411749594 Fix 0x.js CHANGELOG 2017-11-15 10:10:45 -05:00
Fabio Berger
4e39a957c7 Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Add lodash noop to emptyOrderbookChannelHandler
  Fix lint error
  Add connect to monorepo
2017-11-14 22:50:10 -05:00
Fabio Berger
0cf719a744 Add title and install instructions to all sub-package READMEs 2017-11-14 22:46:10 -05:00
Brandon Millman
fe7ad22cc1 Merge pull request #224 from 0xProject/feature/addConnect
Add connect to monorepo
2017-11-14 22:43:29 -05:00
Fabio Berger
59f82c5bfb Add rocket.chat badge and remove 0x.js npm badge 2017-11-14 22:41:42 -05:00
Brandon Millman
a2b8933129 Add lodash noop to emptyOrderbookChannelHandler 2017-11-14 22:37:20 -05:00
Fabio Berger
031b07264a Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Change the way 0x.js assert extends the @0xproject/assert module
2017-11-14 22:31:42 -05:00
Fabio Berger
87f8e93e12 Add core packes to README 2017-11-14 22:31:37 -05:00
Brandon Millman
5b5c31861a Change the way 0x.js assert extends the @0xproject/assert module 2017-11-14 22:23:41 -05:00
Brandon Millman
c315ca6c0c Fix lint error 2017-11-14 22:10:43 -05:00
Brandon Millman
655b0636fa Add connect to monorepo 2017-11-14 21:55:29 -05:00
Fabio Berger
5bd8e172c9 Merge pull request #223 from dekz/bug/fix-readme-links
Fix README links
2017-11-14 21:42:15 -05:00
Jacob Evans
ebb35fd65e Doubled up 2017-11-14 21:41:36 -05:00
Jacob Evans
df7195bda4 Change Slack to Rocket 2017-11-14 21:40:20 -05:00
Jacob Evans
4bd950bb6f Fix README links 2017-11-14 21:31:41 -05:00
Jacob Evans
3f39b22a68 separate assignment and call 2017-11-14 21:20:31 -05:00
Brandon Millman
c019280e85 Merge pull request #219 from 0xProject/feature/rounding-validation
Rounding validation
2017-11-14 18:15:54 -05:00
Fabio Berger
ff0b0ae1ab re-add commonjs build 2017-11-14 18:04:29 -05:00
Fabio Berger
823015435d Publish
- 0x.js@0.25.1
2017-11-14 16:27:34 -05:00
Fabio Berger
99854d7ecf Publish
- 0x.js@0.25.0
2017-11-14 15:59:13 -05:00
Fabio Berger
bb7d9656a5 Publish
- 0x.js@0.24.0
2017-11-14 15:56:14 -05:00
Fabio Berger
e41994a064 revert 0x.js version and change name so matches existing npm package name 2017-11-14 15:51:59 -05:00
Fabio Berger
79df9ef8e6 Publish
- @0xproject/0x.js@0.24.0
 - @0xproject/assert@0.0.4
 - @0xproject/json-schemas@0.6.7
 - @0xproject/tslint-config@0.1.0
2017-11-14 15:43:59 -05:00
Fabio Berger
3b52686125 Remove private flag because we need it published to npm 2017-11-14 15:43:32 -05:00
Fabio Berger
af7c03212d Revert version 2017-11-14 15:38:24 -05:00
Fabio Berger
bdeedb6c91 Update package name and version in package.json 2017-11-14 15:00:40 -05:00
Brandon Millman
4d61d56639 Merge pull request #221 from 0xProject/feature/addJsonSchemas
Add json-schemas package to mono repo
2017-11-14 13:02:17 -05:00
Fabio Berger
430154d543 Update CHANGELOG 2017-11-14 12:57:34 -05:00
Brandon Millman
bb6631c7c6 Update tslint rules for assert and json-schemas 2017-11-14 12:56:22 -05:00
Brandon Millman
9bb5e6f5ce Merge branch 'development' into feature/addJsonSchemas
* development:
  Improve description
  Alphabetize
  Add exit 0 to 0x.js build command
  Add snapshot save and revert to order_state_watcher_test.ts
  Fix changelog
  Use tslint v5.8.0 everywhere and use the tslint-config sub-package instead of the old repo as a dep. in the rest of the sub-packages.
  Add tslint-config sub-package
  Fix tslint issue
  Public interface has changed, moved to minor version
  Update changelog
  Renamed canceled to cancelled
2017-11-14 12:29:46 -05:00
Fabio Berger
05de07496f Merge pull request #220 from 0xProject/feature/addTsLintPackage
Add TSLint Config package
2017-11-14 12:25:44 -05:00
Fabio Berger
ab9dc66b8f Improve description 2017-11-14 12:25:29 -05:00
Fabio Berger
f98042a7f8 Alphabetize 2017-11-14 12:25:20 -05:00
Brandon Millman
247b4686fa Add exit 0 to 0x.js build command 2017-11-14 12:14:08 -05:00
Brandon Millman
c78cb27175 Add snapshot save and revert to order_state_watcher_test.ts 2017-11-14 11:58:35 -05:00
Jacob Evans
752603284d Remove Async subscribe callbacks from OrderWatcher 2017-11-14 11:21:00 -05:00
Leonid Logvinov
dcfe8bae1c Name a constant 2017-11-14 11:11:09 -05:00
Jacob Evans
8f4be963b2 Update changelog 2017-11-14 11:09:37 -05:00
Leonid Logvinov
61496d77a5 Fix namings 2017-11-14 11:03:01 -05:00
Jacob Evans
a12069f03f Callback for subscribe no longer supports an Async Callback 2017-11-14 10:56:57 -05:00
Brandon Millman
56b5619d24 Add json-schemas package to mono repo 2017-11-14 09:42:50 -05:00
Fabio Berger
bc61b92070 Fix changelog 2017-11-13 21:31:40 -05:00
Fabio Berger
682fbd3b76 Merge pull request #217 from dekz/fixCancelledNaming2
Standardise on Cancelled over canceled
2017-11-13 21:12:31 -05:00
Fabio Berger
574ea453b0 Use tslint v5.8.0 everywhere and use the tslint-config sub-package instead of the old repo as a dep. in the rest of the sub-packages. 2017-11-13 21:08:23 -05:00
Fabio Berger
2b806455a5 Add tslint-config sub-package 2017-11-13 20:57:26 -05:00
Fabio Berger
49898525af Fix tslint issue 2017-11-13 20:56:01 -05:00
Leonid Logvinov
24493a4556 Fix tests 2017-11-13 20:32:39 -05:00
Jacob Evans
8de64c9495 Public interface has changed, moved to minor version 2017-11-13 19:25:50 -05:00
Leonid Logvinov
02bbcf6b0e Add a test for rounding error 2017-11-13 18:57:38 -05:00
Fabio Berger
08963f269b Merge pull request #218 from 0xProject/bmillman_add_assert
Add assert sub-package
2017-11-13 18:50:49 -05:00
Fabio Berger
2d0fd14d3c remove new line 2017-11-13 18:50:09 -05:00
Fabio Berger
a15f78652f Update urls 2017-11-13 18:50:00 -05:00
Fabio Berger
3d62312657 Missing @ 2017-11-13 18:45:30 -05:00
Fabio Berger
9b083eebd7 Remove unused circle.yml 2017-11-13 18:42:14 -05:00
Fabio Berger
c7e57a4124 Move conditional running of umd test to 0x.js's package.json 2017-11-13 18:42:02 -05:00
Fabio Berger
ee1a44ebeb Add preliminary instructions to top-level README 2017-11-13 18:20:20 -05:00
Fabio Berger
5b70383ce6 remove image from sub-readme 2017-11-13 18:20:04 -05:00
Fabio Berger
abb2ad45ce fix orderings 2017-11-13 18:12:01 -05:00
Fabio Berger
087ea1f068 Standardize around a test:circleci command that any sub-package can implement in order to have their tests run on CircleCi 2017-11-13 18:11:31 -05:00
Leonid Logvinov
33f479c271 Add assertions for fillableTakerAmount 2017-11-13 18:10:00 -05:00
Leonid Logvinov
f936363440 Add validation for rounding error 2017-11-13 18:09:18 -05:00
Leonid Logvinov
315e4015de Return remainingFillableTakerAmount 2017-11-13 17:59:18 -05:00
Leonid Logvinov
0c91b66f45 Add remainingFillableMakerAmount to types 2017-11-13 17:58:41 -05:00
Fabio Berger
4354d3f121 Rename back 2017-11-13 17:57:02 -05:00
Fabio Berger
3e8e3478a3 Rename assert sub-package and removed duplicate methods from 0x.js's assert module 2017-11-13 17:42:42 -05:00
Fabio Berger
cf29530dd0 fix merge 2017-11-13 17:14:07 -05:00
Brandon Millman
b0f13c17e2 Add assert package to the monorepo 2017-11-13 17:11:39 -05:00
Brandon Millman
1147cb56ba Add assert package to the monorepo 2017-11-13 17:07:33 -05:00
Jacob Evans
e29c3e4c70 Update changelog 2017-11-13 16:39:33 -05:00
Jacob Evans
b1b473d3cb Renamed canceled to cancelled 2017-11-13 16:35:37 -05:00
Fabio Berger
c088d9ddd9 Re-add changelog for 0x.js 2017-11-13 16:28:36 -05:00
Fabio Berger
2b26981e3d Merge pull request #215 from 0xProject/monoRepo
Mono repo Final Steps
2017-11-13 13:05:06 -05:00
Fabio Berger
f3e4576625 Upgrade to Typescript 2.6.1 and fix major & minor versions 2017-11-13 13:03:53 -05:00
Fabio Berger
5dae2b8d2b Don't remove files before UMD test run 2017-11-13 13:03:31 -05:00
Fabio Berger
62da364e5d Only run umd tests on development 2017-11-13 13:02:44 -05:00
Fabio Berger
58a318b754 Merge pull request #214 from 0xProject/monoRepo
Switch over to Lerna + Yarn Workspaces setup for a mono-repo approach
2017-11-13 12:52:08 -05:00
Fabio Berger
ff07f49002 Remove unused var 2017-11-13 12:47:54 -05:00
Fabio Berger
8d69d8553c Add interface type 2017-11-13 12:43:22 -05:00
Fabio Berger
a072954176 Replace _.get for type safety 2017-11-13 12:39:36 -05:00
Fabio Berger
23de8185c6 Declare as string 2017-11-13 12:39:20 -05:00
Fabio Berger
d9c80e9b6a Merge branch 'monoRepo' of github.com:0xProject/0x.js into monoRepo
* 'monoRepo' of github.com:0xProject/0x.js:
  Fail the tests on tsc error
2017-11-13 12:31:34 -05:00
Fabio Berger
dcc4272c4e move tslint.json to 0x.js sub-package 2017-11-13 12:31:29 -05:00
Fabio Berger
2060940ecc Fix lint and ts issues 2017-11-13 12:30:01 -05:00
Leonid Logvinov
14274ef67b Fail the tests on tsc error 2017-11-13 12:27:20 -05:00
Fabio Berger
70661c179f point to top-level node_modules 2017-11-13 12:21:25 -05:00
Fabio Berger
8a0ae68f27 remove unnecessary -- 2017-11-13 12:20:58 -05:00
Fabio Berger
06ada87370 Add missing key 2017-11-13 12:14:01 -05:00
Fabio Berger
a5d9b71eb6 Simply lerna command and run bootstrap to install dependencies 2017-11-13 12:13:11 -05:00
Fabio Berger
aa3385d516 Fix lerna command 2017-11-13 12:02:37 -05:00
Fabio Berger
af60b41c89 Fix package.json 2017-11-13 11:59:31 -05:00
Fabio Berger
506bf45272 Add checkout 2017-11-13 11:57:22 -05:00
Fabio Berger
2655daa2f4 Merge branch 'monoRepo' of github.com:0xProject/0x.js into monoRepo
* 'monoRepo' of github.com:0xProject/0x.js:
  Fix package.json
2017-11-13 11:54:29 -05:00
Fabio Berger
0b095ce5ce Upgrade circleci to version 2.0 2017-11-13 11:54:19 -05:00
Leonid Logvinov
ae461b77f8 Fix package.json 2017-11-13 11:26:39 -05:00
Fabio Berger
4f3b9dc61a leave out yarn version peg 2017-11-13 11:22:31 -05:00
Fabio Berger
a246702511 Use lerna 2017-11-13 11:20:07 -05:00
Fabio Berger
2ae47d64b7 use yarn instead of lerna 2017-11-13 11:09:56 -05:00
Fabio Berger
6a76349730 Install older version of yarn 2017-11-13 11:09:46 -05:00
Fabio Berger
e6482554f5 Add circle.yml and move testrpc command to top-level repo 2017-11-13 10:56:22 -05:00
Fabio Berger
c4ee2d7386 Switch over to Lerna + Yarn Workspaces setup for a mono-repo approach 2017-11-12 22:17:18 -05:00
Fabio Berger
a74ec0effa Merge pull request #200 from 0xProject/feature/receipt-status
Normalize the way we return the transaction status
2017-11-12 21:24:00 -05:00
Fabio Berger
e33027c624 Merge branch 'development' into feature/receipt-status
* development: (164 commits)
  Remove old tests
  Remove unused code
  Fix tests
  Remove redundant spaces
  Don't store empty objects
  Fix a typo
  Remove duplicate operations
  Remove redundant instance variables
  Fix tests
  Remove blockStore and default to numConfirmations === 0
  Add a comment
  Store number of confirmations in a blockStore
  Remove tautology check
  Pass blockStore to eventWatcher
  Fix last merge conflicts
  Clear cache on unsubscribe
  Clear store cache on events
  Add more configs for order watcher
  Make subscribe function async and make blockStore operational
  Adjust tests to new interface
  ...

# Conflicts:
#	package.json
#	src/types.ts
#	yarn.lock
2017-11-12 21:12:37 -05:00
Fabio Berger
b0be323e89 Merge pull request #205 from 0xProject/orderWatcher
Order watcher
2017-11-12 20:50:42 -05:00
Fabio Berger
a22661670f Merge branch 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js: (33 commits)
  Remove old tests
  Remove unused code
  Fix tests
  Remove redundant spaces
  Don't store empty objects
  Fix a typo
  Remove duplicate operations
  Remove redundant instance variables
  Fix tests
  Remove blockStore and default to numConfirmations === 0
  Add a comment
  Store number of confirmations in a blockStore
  Remove tautology check
  Pass blockStore to eventWatcher
  Fix last merge conflicts
  Clear cache on unsubscribe
  Clear store cache on events
  Add more configs for order watcher
  Make subscribe function async and make blockStore operational
  Adjust tests to new interface
  ...
2017-11-12 20:49:56 -05:00
Fabio Berger
442f35a1fd Merge branch 'development' into orderWatcher
* development:
  0.23.0
  Update CHANGELOG
  Fix amounts in tests one last time. Now that we updated the testRPC snapshot, this should no longer be mismatched between CI and locally
  Update testRPC snapshot used by CircleCi
  Push unsubscribe to the base class rather than super
  Check for null rather than undefined
  Removed nits
  Test case was error then unsubscribe
  Clean up subscription state.
  Fix unhandled promise rejection error on subscriptions

# Conflicts:
#	src/types.ts
#	test/exchange_wrapper_test.ts
#	test/token_wrapper_test.ts
2017-11-12 20:49:48 -05:00
Fabio Berger
5aef16c2aa Merge pull request #211 from 0xProject/feature/orderWatcherLocalStateStore
Order watcher local state store
2017-11-12 20:26:21 -05:00
Leonid Logvinov
e512e38efb Remove old tests 2017-11-12 20:21:24 -05:00
Leonid Logvinov
7ea0b138bc Remove unused code 2017-11-12 20:06:14 -05:00
Leonid Logvinov
d73fb5a23c Fix tests 2017-11-12 20:06:14 -05:00
Leonid Logvinov
610298a25d Remove redundant spaces 2017-11-12 20:06:14 -05:00
Leonid Logvinov
7b50a6490d Don't store empty objects 2017-11-12 20:06:14 -05:00
Leonid Logvinov
fdb82d5dd4 Fix a typo 2017-11-12 20:06:13 -05:00
Leonid Logvinov
a587697883 Remove duplicate operations 2017-11-12 20:06:13 -05:00
Leonid Logvinov
3204c077d1 Remove redundant instance variables 2017-11-12 20:06:13 -05:00
Leonid Logvinov
d52825a5b1 Fix tests 2017-11-12 20:06:13 -05:00
Leonid Logvinov
84c965d459 Remove blockStore and default to numConfirmations === 0 2017-11-12 20:06:13 -05:00
Leonid Logvinov
22cd6989a0 Add a comment 2017-11-12 20:06:13 -05:00
Leonid Logvinov
a9ae555b88 Store number of confirmations in a blockStore 2017-11-12 20:06:13 -05:00
Leonid Logvinov
d4dc428124 Remove tautology check 2017-11-12 20:06:13 -05:00
Leonid Logvinov
f5608d2c94 Pass blockStore to eventWatcher 2017-11-12 20:06:13 -05:00
Leonid Logvinov
bcad937003 Fix last merge conflicts 2017-11-12 20:06:13 -05:00
Leonid Logvinov
53c918cc78 Clear cache on unsubscribe 2017-11-12 20:06:13 -05:00
Leonid Logvinov
009f81fe4f Clear store cache on events 2017-11-12 20:06:13 -05:00
Leonid Logvinov
81ce4a0229 Add more configs for order watcher 2017-11-12 20:06:13 -05:00
Leonid Logvinov
6bcd9adb9e Make subscribe function async and make blockStore operational 2017-11-12 20:06:13 -05:00
Leonid Logvinov
61e7b735dc Adjust tests to new interface 2017-11-12 20:06:13 -05:00
Leonid Logvinov
44c15fc1ef Add more errors 2017-11-12 20:06:12 -05:00
Leonid Logvinov
9d3fe1258a Create stores in orderStateWatcher 2017-11-12 20:06:12 -05:00
Leonid Logvinov
e72ba39c41 Make orderStateUtils operate on stores 2017-11-12 20:05:46 -05:00
Leonid Logvinov
ffcc487763 Create fake blockStore for exchange transfer simulator 2017-11-12 20:03:18 -05:00
Leonid Logvinov
473ce8b617 Add initial incomplete BlockStore implementation 2017-11-12 20:03:18 -05:00
Leonid Logvinov
70436fa535 Make stores accept numConfirmations and blockStore instead of defaultBlock 2017-11-12 20:03:18 -05:00
Leonid Logvinov
4921f61e76 Add LatestBlockNumberNotSet internal error 2017-11-12 20:03:18 -05:00
Leonid Logvinov
75b390cf93 Add functions to clear stores cache 2017-11-12 20:03:18 -05:00
Leonid Logvinov
dcda8fe538 Add store for order filled/cancelled state 2017-11-12 20:03:18 -05:00
Leonid Logvinov
6edae86516 Make store configurable by blockParam 2017-11-12 20:03:18 -05:00
Leonid Logvinov
f163e6d8cc Fix tests 2017-11-12 20:03:18 -05:00
Leonid Logvinov
742660591f Make a store an instance variable of exchange transfer simulator and stop inheriting it 2017-11-12 20:03:18 -05:00
Leonid Logvinov
ddbcf5f470 Refactor out BalanceAndProxyAllowanceLazyStore 2017-11-12 20:03:17 -05:00
Fabio Berger
6becf22a2f Merge pull request #210 from dekz/orderWatcherRemaining
Calculate the remaining order amount in maker units
2017-11-12 19:39:24 -05:00
Jacob Evans
32246fd26b remove comments 2017-11-12 19:37:03 -05:00
Jacob Evans
42e3ab91a7 Perform the division after multiplication to reduce compounding the rounding errors 2017-11-12 19:17:27 -05:00
Fabio Berger
6daf70b745 Merge pull request #207 from 0xProject/orderWatcherTests
Additional order watcher tests
2017-11-12 18:11:45 -05:00
Fabio Berger
12298ea392 Don't return anything 2017-11-12 18:11:30 -05:00
Jacob Evans
5e77e8809a Update comment 2017-11-12 17:30:57 -05:00
Jacob Evans
1b3f84c9ad text description update 2017-11-12 17:28:34 -05:00
Jacob Evans
e06539e76d remove only 2017-11-12 17:25:42 -05:00
Jacob Evans
fdb3fa6801 Added specs for allowance and balance changes 2017-11-12 17:24:31 -05:00
Brandon Millman
1392a855bb 0.23.0 2017-11-12 17:01:58 -05:00
Brandon Millman
d4cab6e62f Update CHANGELOG 2017-11-12 17:01:43 -05:00
Leonid Logvinov
5d2b6585c6 Fix tslint issue 2017-11-12 15:19:10 -05:00
Leonid Logvinov
a2f89347a9 Fix tests 2017-11-12 15:05:06 -05:00
Leonid Logvinov
50ee23ebfa Normalize the way we return the transaction status 2017-11-12 15:05:06 -05:00
Brandon Millman
719c51f61a Merge pull request #209 from 0xProject/fixUnhandledPromiseBug
Fix unhandled promise rejection error on subscriptions
2017-11-12 14:06:39 -05:00
Jacob Evans
3e2a614eb9 Calculate the remaining order amount in maker units 2017-11-12 11:28:01 -05:00
Fabio Berger
abb23631df Update testRPC snapshot used by CircleCi 2017-11-12 10:53:29 -05:00
Fabio Berger
dae5a063cf Fix amounts in tests one last time. Now that we updated the testRPC snapshot, this should no longer be mismatched between CI and locally 2017-11-12 10:43:24 -05:00
Fabio Berger
e57a507ba0 Update testRPC snapshot used by CircleCi 2017-11-12 10:39:09 -05:00
Fabio Berger
4e194d7766 Merge pull request #208 from dekz/fixUnhandledPromiseBug
Clean up subscription state.
2017-11-12 09:40:47 -05:00
Jacob Evans
d34ea79d93 Push unsubscribe to the base class rather than super 2017-11-11 13:42:42 -05:00
Jacob Evans
ee73659f16 Check for null rather than undefined 2017-11-11 12:33:05 -05:00
Jacob Evans
394417ff07 Removed nits 2017-11-11 12:15:24 -05:00
Jacob Evans
a85b1f016d Test case was error then unsubscribe 2017-11-11 12:01:27 -05:00
Fabio Berger
c6f97f20fb Merge branch 'development' into orderWatcher
* development:
  0.22.6
  Add new changes to CHANGELOG
  use util fn
  no race, reject from interval cb and clear
  allow timeout for await transaction mined

# Conflicts:
#	src/types.ts
2017-11-11 11:14:09 -05:00
Fabio Berger
b66600338e Add comment 2017-11-11 11:05:52 -05:00
Jacob Evans
4ae9482d50 Clean up subscription state.
In the case of an exception, keep the state correct between contract wrapper, exchange wrapper and token wrapper.
2017-11-11 11:01:59 -05:00
Fabio Berger
72fcf7b2ab rename isDecodedLog to isLogDecoded 2017-11-11 10:57:39 -05:00
Fabio Berger
a8b6bbd6bc Improve comment 2017-11-11 10:57:27 -05:00
Fabio Berger
e5d04f4467 Fix test given that we now do delete the keys in dependentOrderHashes 2017-11-11 10:50:08 -05:00
Fabio Berger
62ac8e1952 Fix missing renames 2017-11-11 10:22:09 -05:00
Fabio Berger
d61f34ec12 Declare OnOrderStateChangeCallback as either sync or async 2017-11-11 10:21:59 -05:00
Fabio Berger
252fdd03d7 Fix comment 2017-11-11 10:21:40 -05:00
Fabio Berger
0fe5c5dac3 Remove keys from dependentOrderHashes if empty 2017-11-11 10:13:42 -05:00
Fabio Berger
037e992de4 establish convention of initializing empty instances in instance declaration 2017-11-11 09:57:45 -05:00
Fabio Berger
12023073f4 Use enum instead of boolean to avoid potential bugs from isRemoved incorrectly being set to true 2017-11-11 09:54:27 -05:00
Fabio Berger
0db0694aad rename _orders to _orderByOrderhash for clarity 2017-11-11 09:47:32 -05:00
Fabio Berger
d4f763aa68 Add comment above orderStateWatcher class 2017-11-11 09:45:50 -05:00
Fabio Berger
4e708c81ca Fix expected balance 2017-11-11 09:19:51 -05:00
Fabio Berger
041d00301c Fix type declaration in test 2017-11-11 08:58:01 -05:00
Fabio Berger
0ec51b124b Feather the callback down to _emitDifferencesAsync and don't store it as a class instance. This will make supporting multiple subscriptions easier later on and reduces the amount of unsubscription cleanup 2017-11-11 08:57:49 -05:00
Fabio Berger
6012926e82 Throw if trying to subscribe multiple times 2017-11-10 18:07:11 -05:00
Fabio Berger
ca9c1bca4a Fix alignment 2017-11-10 18:06:57 -05:00
Fabio Berger
0d957ea71d Add comment above the eventWatcher class 2017-11-10 17:47:41 -05:00
Fabio Berger
697926641f Rename method since it's not more then just mempool 2017-11-10 17:47:30 -05:00
Fabio Berger
2bf65fda1f Add tests for the numConfirmations config to ensure that the events are being emitted for the confirmation depth specified 2017-11-10 16:34:21 -05:00
Fabio Berger
4262ac3c89 Fix unhandled promise rejection error on subscriptions 2017-11-10 14:13:15 -05:00
Leonid Logvinov
76b66872d8 0.22.6 2017-11-10 11:41:31 -05:00
Leonid Logvinov
2f92aaea0c Add new changes to CHANGELOG 2017-11-10 11:40:31 -05:00
Leonid
c5b347bb15 Merge pull request #206 from lukeautry/await_transaction_timeout
Allow timeout for await transaction mined
2017-11-10 11:38:02 -05:00
Luke Autry
d11087c28f use util fn 2017-11-10 11:35:40 -05:00
Luke Autry
e6139e02b8 no race, reject from interval cb and clear 2017-11-10 11:34:17 -05:00
Luke Autry
583b92e672 allow timeout for await transaction mined 2017-11-10 10:43:52 -05:00
Fabio Berger
d90756e8ef Test that the orderStateWatcher doesn't emit an event when an irrelevant blockchain event is received. 2017-11-10 10:07:29 -05:00
Fabio Berger
9b9ab983d6 Fix test description 2017-11-10 09:04:25 -05:00
Fabio Berger
d5746652a2 Fix test description 2017-11-09 23:37:01 -05:00
Fabio Berger
47f9e171fc Move numConfirmations to constructor call 2017-11-09 23:32:22 -05:00
Fabio Berger
a1bc18e5cf Improve comment 2017-11-09 23:32:04 -05:00
Fabio Berger
0cd5bf7967 Make sure to set the defaultBlock to the blockNumber rather then the number of confirmations 2017-11-09 23:24:46 -05:00
Fabio Berger
0205f9ede3 Simplify to/from block code 2017-11-09 23:16:26 -05:00
Fabio Berger
960c83315b Add assertion 2017-11-09 23:05:46 -05:00
Fabio Berger
f9c84fb6f4 Merge branch 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js:
  Add forgotten file
2017-11-09 22:58:10 -05:00
Fabio Berger
1b14561748 remove no longer needed arg 2017-11-09 22:58:06 -05:00
Fabio Berger
27519e1dfa rename intervalId to intervalIdIfExists 2017-11-09 22:57:38 -05:00
Leonid Logvinov
46e2da24a4 Add forgotten file 2017-11-09 22:12:29 -05:00
Fabio Berger
dbbcbed344 Merge branch 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js:
  Add order state watcher tests for LogCancel

# Conflicts:
#	test/order_state_watcher_test.ts
2017-11-09 18:30:20 -05:00
Fabio Berger
c0db88168b Fix bug where we hard-coded using pendingBlock for fetching the orderState. Moved numConfirmations to become a global orderStateWatcher config 2017-11-09 18:29:13 -05:00
Leonid Logvinov
d98435b4dc Add order state watcher tests for LogCancel 2017-11-09 18:28:33 -05:00
Fabio Berger
595dc6de03 Fix comments 2017-11-09 18:04:24 -05:00
Fabio Berger
322e054f1a comment improvements 2017-11-09 17:57:41 -05:00
Fabio Berger
7f606e1e64 Closing paren on same level as open 2017-11-09 17:50:48 -05:00
Fabio Berger
b0491b0ee2 Rename _callbackAsync to _callbackIfExistsAsync for clarity 2017-11-09 17:48:05 -05:00
Fabio Berger
0e69356ca9 Merge branches 'orderWatcher' and 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js:
  Fix getting events from non-mempool

* 'orderWatcher' of github.com:0xProject/0x.js:
  Fix getting events from non-mempool
2017-11-09 17:45:37 -05:00
Fabio Berger
90348e08c1 use explicit import 2017-11-09 17:45:30 -05:00
Leonid Logvinov
c60d7e2db8 Fix getting events from non-mempool 2017-11-09 17:44:45 -05:00
Fabio Berger
50d3a14825 Remove finished TODOs 2017-11-09 17:39:03 -05:00
Fabio Berger
0ff3ba5250 Merge branch 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js:
  Revert test amount changes
2017-11-09 17:20:49 -05:00
Fabio Berger
02cc3f9116 Create assert.isValidSignature method and use it in addOrder 2017-11-09 17:18:30 -05:00
Fabio Berger
62861d1e13 Move isValidSignature implementation into signatureUtils 2017-11-09 17:18:03 -05:00
Leonid Logvinov
cd3c7f1b97 Revert test amount changes 2017-11-09 17:14:10 -05:00
Fabio Berger
0c8886ad0c Fix comment 2017-11-09 17:03:54 -05:00
Fabio Berger
9d24325207 Merge branch 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js:
  Revert "Use _.get for optional configs"

# Conflicts:
#	src/0x.ts
2017-11-09 17:01:30 -05:00
Fabio Berger
126a165f55 Add nested config for orderWatcher 2017-11-09 16:59:41 -05:00
Leonid Logvinov
1c6e6842c6 Revert "Use _.get for optional configs"
This reverts commit ecc54b07c7.
2017-11-09 16:48:45 -05:00
Fabio Berger
6f5a55b5fe Rename MempoolEventCallback to EventWatcherCallback 2017-11-09 16:43:19 -05:00
Fabio Berger
530f5a700e Merge branch 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js:
  Fix namings
2017-11-09 16:42:06 -05:00
Fabio Berger
441c1f9ab7 rename folder to order_watcher 2017-11-09 16:41:57 -05:00
Leonid Logvinov
d98d885924 Fix namings 2017-11-09 16:37:00 -05:00
Leonid Logvinov
6aa91d89e0 Remove redundant assertions 2017-11-09 16:30:40 -05:00
Fabio Berger
ecc54b07c7 Use _.get for optional configs 2017-11-09 16:30:14 -05:00
Fabio Berger
ce11a38d70 Improve comment 2017-11-09 16:23:39 -05:00
Leonid Logvinov
c9e0b29878 Add SubscriptionAlreadyPresent error 2017-11-09 16:20:31 -05:00
Leonid Logvinov
3a96fec03b Pass numConfirmations 2017-11-09 15:38:23 -05:00
Leonid Logvinov
7a231b3166 Removed unused order adding in tests 2017-11-09 15:30:41 -05:00
Leonid Logvinov
31f6934787 Add a test that a second subscription fails 2017-11-09 15:30:22 -05:00
Fabio Berger
c5dc89886d fix merge conflicts 2017-11-09 15:13:56 -05:00
Fabio Berger
545cc0b026 Add comments to public methods 2017-11-09 15:02:44 -05:00
Fabio Berger
9ff42053c3 Add numConfirmations arg so that caller can decide on numConfirmations at which they want to watch orders 2017-11-09 15:02:28 -05:00
Leonid Logvinov
41a0ce146d Add tests for order removals 2017-11-09 14:54:55 -05:00
Leonid Logvinov
709fa06af6 Pass orderHash instead of an order to removeOrder and adjust the tests 2017-11-09 14:23:53 -05:00
Fabio Berger
5623400557 Merge branch 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher
* 'orderWatcher' of github.com:0xProject/0x.js: (32 commits)
  Remove check for now, we need a more robust check
  Rename test file and add test for a partial fill
  Fix tests by making the expected balance be 2^27 not 2^26
  Add assert.isValidBaseUnitAmount that checks for decimals in amounts that should be in baseUnits. This can sometimes alert developers whenever they accidentally pass in unitAmounts.
  Look for relevant events in the decodedLogs and emit orderState events for orders impacted by the blockchain state changes
  Remove unused import
  Fix typo
  Add todo comments
  fix styling
  remove unused type
  Add naive order state watcher implementation
  Change fields in OrderState to represent taker side values
  Introduce OrderState interface
  Fix config schema
  Add empty implementation of order state watcher
  Add new public types
  Move mempoolPollingIntervalMs to OrderWatcherConfig
  Adjust tests for mempool event watcher
  Clear event cache on unsubscribe
  Remove mempool event watcher config
  ...
2017-11-09 14:12:17 -05:00
Fabio Berger
1351e02065 Remove check for now, we need a more robust check 2017-11-09 14:11:46 -05:00
Fabio Berger
4f030ac45c Rename test file and add test for a partial fill 2017-11-09 14:11:46 -05:00
Fabio Berger
c7c81a1f7e Fix tests by making the expected balance be 2^27 not 2^26 2017-11-09 14:11:46 -05:00
Fabio Berger
ae74965774 Add assert.isValidBaseUnitAmount that checks for decimals in amounts that should be in baseUnits. This can sometimes alert developers whenever they accidentally pass in unitAmounts. 2017-11-09 14:11:46 -05:00
Fabio Berger
e952c98ca8 Look for relevant events in the decodedLogs and emit orderState events for orders impacted by the blockchain state changes 2017-11-09 14:11:46 -05:00
Fabio Berger
6f00c422c7 Remove unused import 2017-11-09 14:11:46 -05:00
Fabio Berger
e592cedbb4 Fix typo 2017-11-09 14:11:46 -05:00
Fabio Berger
a10bb4b2fa Add todo comments 2017-11-09 14:11:46 -05:00
Fabio Berger
c89eec4261 fix styling 2017-11-09 14:11:46 -05:00
Fabio Berger
edc0fec808 remove unused type 2017-11-09 14:11:46 -05:00
Leonid Logvinov
bb5474660c Add naive order state watcher implementation
Revalidate all orders upon event received and emit order states even if
not changed
2017-11-09 14:11:46 -05:00
Leonid Logvinov
63f16b5f99 Change fields in OrderState to represent taker side values 2017-11-09 14:11:46 -05:00
Leonid Logvinov
0b84c469d3 Introduce OrderState interface 2017-11-09 14:11:45 -05:00
Leonid Logvinov
ff5d18d327 Fix config schema 2017-11-09 14:11:45 -05:00
Leonid Logvinov
1980b3fae4 Add empty implementation of order state watcher 2017-11-09 14:11:45 -05:00
Leonid Logvinov
6714b8958b Add new public types 2017-11-09 14:11:45 -05:00
Leonid Logvinov
f601a5d356 Move mempoolPollingIntervalMs to OrderWatcherConfig 2017-11-09 14:11:45 -05:00
Leonid Logvinov
e7f60032bc Adjust tests for mempool event watcher 2017-11-09 14:11:45 -05:00
Leonid Logvinov
589bd8694f Clear event cache on unsubscribe 2017-11-09 14:11:45 -05:00
Leonid Logvinov
eace1a9840 Remove mempool event watcher config 2017-11-09 14:11:45 -05:00
Leonid Logvinov
3ddb203317 Move provider altering logic to Web3Wrapper 2017-11-09 14:11:45 -05:00
Leonid Logvinov
84b8e77aaa Add types for order state watcher 2017-11-09 14:11:45 -05:00
Leonid Logvinov
247eefc33a Add initial interface of an OrderWatcher 2017-11-09 14:11:45 -05:00
Leonid Logvinov
fd54a6a3ad Rename MempoolWatcher to EventWatcher and remove from public interface 2017-11-09 14:11:45 -05:00
Leonid Logvinov
a2ffd7de2e Fix namings 2017-11-09 14:11:45 -05:00
Leonid Logvinov
cea2fb0fe6 Add mempool tests 2017-11-09 14:11:45 -05:00
Leonid Logvinov
23d7d7d140 Don't emit new events if already unsubscribed 2017-11-09 14:11:45 -05:00
Leonid Logvinov
f8179bc5a9 Compare logs by string representation 2017-11-09 14:11:45 -05:00
Leonid Logvinov
a4e93558aa Upgrade web3-typescript-typings 2017-11-09 14:11:45 -05:00
Leonid Logvinov
cb3cae0f30 Add initial mempool watching implememtation 2017-11-09 14:11:45 -05:00
Fabio Berger
04e0199790 Remove check for now, we need a more robust check 2017-11-09 10:22:29 -05:00
Fabio Berger
453f3405a7 Rename test file and add test for a partial fill 2017-11-09 10:21:54 -05:00
Fabio Berger
a8585df81b Fix tests by making the expected balance be 2^27 not 2^26 2017-11-09 10:21:38 -05:00
Fabio Berger
c96c681758 Add assert.isValidBaseUnitAmount that checks for decimals in amounts that should be in baseUnits. This can sometimes alert developers whenever they accidentally pass in unitAmounts. 2017-11-09 10:09:20 -05:00
Fabio Berger
6007609f71 Look for relevant events in the decodedLogs and emit orderState events for orders impacted by the blockchain state changes 2017-11-08 19:01:57 -05:00
Fabio Berger
5a6ed252c4 Remove unused import 2017-11-08 19:00:38 -05:00
Fabio Berger
641dff8991 Fix typo 2017-11-08 19:00:14 -05:00
Fabio Berger
ee3115550e Add todo comments 2017-11-08 18:59:59 -05:00
Fabio Berger
d39852c0cf fix styling 2017-11-08 18:59:40 -05:00
Fabio Berger
c57894633f remove unused type 2017-11-08 18:59:28 -05:00
Fabio Berger
a7bedad9f0 0.22.5 2017-11-07 18:02:57 -05:00
Fabio Berger
92df3d953f Update changelog 2017-11-07 18:02:40 -05:00
Leonid Logvinov
a896904ae7 Add naive order state watcher implementation
Revalidate all orders upon event received and emit order states even if
not changed
2017-10-30 18:49:16 +02:00
Leonid Logvinov
6bfcd253f8 Change fields in OrderState to represent taker side values 2017-10-30 18:49:16 +02:00
Leonid Logvinov
456f7e7304 Introduce OrderState interface 2017-10-30 18:49:16 +02:00
Leonid Logvinov
ed7917f9df Fix config schema 2017-10-30 18:49:16 +02:00
Leonid Logvinov
2a25ece363 Add empty implementation of order state watcher 2017-10-30 18:49:16 +02:00
Leonid Logvinov
1c90c3af42 Add new public types 2017-10-30 18:49:16 +02:00
Leonid Logvinov
6ca6290f6a Move mempoolPollingIntervalMs to OrderWatcherConfig 2017-10-30 18:49:16 +02:00
Leonid Logvinov
fd2c5d46ad Adjust tests for mempool event watcher 2017-10-30 18:49:16 +02:00
Leonid Logvinov
a6c110f558 Clear event cache on unsubscribe 2017-10-30 18:49:16 +02:00
Leonid Logvinov
02b33f988f Remove mempool event watcher config 2017-10-30 18:49:16 +02:00
Leonid Logvinov
7bf6e6188a Move provider altering logic to Web3Wrapper 2017-10-30 18:49:16 +02:00
Leonid Logvinov
26394813f4 Add types for order state watcher 2017-10-30 18:49:16 +02:00
Leonid Logvinov
f21f42f11e Add initial interface of an OrderWatcher 2017-10-30 18:49:16 +02:00
Leonid Logvinov
68a8556cd2 Rename MempoolWatcher to EventWatcher and remove from public interface 2017-10-30 18:49:16 +02:00
Leonid Logvinov
e4d8b1c4d2 Fix namings 2017-10-30 18:49:16 +02:00
Leonid Logvinov
eac467fe9a Add mempool tests 2017-10-30 18:49:16 +02:00
Leonid Logvinov
1bb9c912cd Don't emit new events if already unsubscribed 2017-10-30 18:49:16 +02:00
Leonid Logvinov
02d470892f Compare logs by string representation 2017-10-30 18:49:16 +02:00
Leonid Logvinov
161f62dc27 Upgrade web3-typescript-typings 2017-10-30 18:49:16 +02:00
Leonid Logvinov
f53472e717 Add initial mempool watching implememtation 2017-10-30 18:49:16 +02:00
Fabio Berger
7fa5d34c45 Remove unnecessary dep 2017-10-30 18:48:16 +02:00
Fabio Berger
b49d1dae7d Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Update CHANGELOG
  0.22.4
  Add HACK comments
  Add a forgotten augmentation file
  Upgrade bignumber to the version with native typings and remove typings
  Downgrade typedoc
  Upgrade bignumber to the version with native typings and remove typings
2017-10-30 16:17:39 +02:00
Fabio Berger
9b0496b049 Fix comment 2017-10-30 16:08:44 +02:00
Leonid Logvinov
fec8f8a881 Update CHANGELOG 2017-10-25 23:05:49 +03:00
Leonid Logvinov
e08c54878c 0.22.4 2017-10-25 23:04:49 +03:00
Leonid
e78398862b Merge pull request #202 from 0xProject/fix/bignumber-types
Bignumber types
2017-10-25 23:04:31 +03:00
Leonid Logvinov
122a5e9b63 Add HACK comments 2017-10-25 23:04:17 +03:00
Leonid Logvinov
5d759d82ed Add a forgotten augmentation file 2017-10-25 22:30:22 +03:00
Leonid Logvinov
744a9b8931 Upgrade bignumber to the version with native typings and remove typings 2017-10-25 22:22:23 +03:00
Leonid Logvinov
45c4042e2b Downgrade typedoc 2017-10-25 22:11:09 +03:00
Leonid Logvinov
bba7704732 Upgrade bignumber to the version with native typings and remove typings 2017-10-25 22:10:09 +03:00
Leonid Logvinov
fa3e88c454 0.22.3 2017-10-25 12:20:47 +03:00
Leonid Logvinov
e0ff550e19 Update CHANGELOG 2017-10-25 12:16:20 +03:00
Leonid
48dbee2e10 Merge pull request #199 from NoteGio/raise-allowance-gas
Increase ALLOWANCE_TO_ZERO_GAS_AMOUNT
2017-10-25 10:22:35 +03:00
Austin Roberts
1ba2df8024 Increase ALLOWANCE_TO_ZERO_GAS_AMOUNT
On TestRPC, I'm seeing a particular transaction that is taking 47275
gas instead of the predefined 47155. It's not at all obvious to me
why this transaction is taking an extra 120 gas, and I've been unable
to reproduce the issue in the 0x.js test suite, but bumping the gas
allowance has resolved the issue for me.

The transactions in question are trying to set an unlimited proxy
allowance on either the WETH or ZRX tokens in the testrpc snapshot,
but run out of gas.
2017-10-24 17:14:35 -05:00
Leonid Logvinov
e17f6979c3 0.22.2 2017-10-24 18:58:40 +03:00
Leonid
8330dabda8 Merge pull request #197 from 0xProject/fix/rounding
Fix rounding of maker fill amount and correctly validate partial fees
2017-10-24 18:54:50 +03:00
Leonid Logvinov
1fd8c2a6e2 Update CHANGELOG 2017-10-24 18:47:22 +03:00
Leonid Logvinov
0c6be94222 Fix index 2017-10-24 18:31:59 +03:00
Leonid Logvinov
89103c40fb Use more meaningful variable names 2017-10-24 18:31:59 +03:00
Leonid Logvinov
fbe34663da Fix the rounding of makerFillAmount and correctly validate partial fees 2017-10-24 18:31:59 +03:00
Leonid Logvinov
9d0ccdfdcc Add tests testing that rounding or makerFillAmount is correct and that we only validate partial fees 2017-10-24 18:31:59 +03:00
Leonid Logvinov
cd1f0c74c1 Revert CHANGELOG 2017-10-24 16:42:50 +03:00
Leonid
3deac0f100 Merge pull request #198 from 0xProject/revert-195-minification
Revert "Reduce final bundle size by 11% (82kB)"
2017-10-24 16:40:50 +03:00
Leonid
641d3b75ea Revert "Reduce final bundle size by 11% (82kB)" 2017-10-24 16:40:38 +03:00
Brandon Millman
fab2fa9adf Merge pull request #196 from 0xProject/bmillman_fix_tslint
Fix lint script to analyze nested files
2017-10-23 10:20:42 -07:00
Brandon Millman
b3d8cefbe6 Fix lint script to analyze nested files 2017-10-19 12:03:49 -07:00
Leonid Logvinov
32e8e52ad7 0.22.1 2017-10-19 17:09:30 +03:00
Leonid Logvinov
77b3a43e17 Update CHANGELOG 2017-10-19 17:09:23 +03:00
Leonid
ddec91ba52 Merge pull request #195 from 0xProject/minification
Reduce final bundle size by 11% (82kB)
2017-10-19 16:31:06 +03:00
Leonid Logvinov
0329b36430 Fix linter errors 2017-10-19 12:55:14 +03:00
Leonid Logvinov
f62dc0f46c Update 0x-json-schemas 2017-10-19 12:44:00 +03:00
Leonid Logvinov
f64638173a Transform lodash-es to commonjs module format 2017-10-19 00:31:10 +03:00
Leonid Logvinov
14a0dcecf5 Fix tests 2017-10-18 23:38:28 +03:00
Leonid Logvinov
e17cca9834 Remove unused parts from artifacts 2017-10-18 17:46:37 +03:00
Leonid Logvinov
9b0f68f9a9 Include only used lodash functions 2017-10-18 17:45:39 +03:00
Leonid Logvinov
f4eb73ca7c Upgrade 0x-json-schemas to the version that doesn't depend on lodash 2017-10-18 17:19:56 +03:00
Leonid Logvinov
4ea6ebb0ae Uprade ethereumjs-blockstream, cause new version doesn't include source maps and is significantly smaller 2017-10-18 17:18:44 +03:00
Leonid Logvinov
8931f2e736 0.22.0 2017-10-16 12:03:31 +03:00
Leonid Logvinov
7ae78ca3c8 Update CHANGELOG 2017-10-16 12:03:20 +03:00
Leonid
d24eeec1a1 Merge pull request #187 from apackin/setFillOrKillToUseRequestInterface
[WIP] Use OrderFillRequest interface for batchFillOrKill
2017-10-16 11:41:04 +03:00
Leonid
a798f32cc8 Merge branch 'development' into setFillOrKillToUseRequestInterface 2017-10-16 11:40:20 +03:00
Leonid Logvinov
df5fe4a84f 0.21.4 2017-10-13 19:00:06 +03:00
Leonid Logvinov
9aef222f79 Add changes to CHANGELOG 2017-10-13 18:59:52 +03:00
Leonid
5591378245 Merge pull request #194 from 0xProject/feature/type-safe-subscriptions
Make logs fetching and subscriptions more type-safe
2017-10-13 17:16:11 +03:00
Leonid Logvinov
dde2268f9f Remove unused code 2017-10-13 13:03:00 +03:00
Leonid Logvinov
0eaca6c691 Make logs fetching and sunscriptions more type-safe 2017-10-13 12:52:59 +03:00
Leonid Logvinov
ba654c04a0 0.21.3 2017-10-12 17:56:13 +03:00
Leonid
f4fbac2694 Merge pull request #193 from 0xProject/fix/allowance-error
Fix an issue causing fills to throw `INSUFFICIENT_TAKER_ALLOWANCE`
2017-10-12 17:51:37 +03:00
Leonid Logvinov
b86f6322e1 Update CHANGELOG 2017-10-12 17:08:46 +03:00
Leonid Logvinov
74c6be3698 Pass correct parameters to validation simulation 2017-10-12 17:02:18 +03:00
Leonid Logvinov
d114613384 Add a regression test 2017-10-12 17:01:55 +03:00
Leonid Logvinov
c23ea1e688 0.21.2 2017-10-11 18:49:26 +03:00
Leonid
f9d4799ebe Merge pull request #190 from 0xProject/fix/export-contract-event-arg
Export ContractEventArg
2017-10-11 18:37:48 +03:00
Leonid Logvinov
9ec4f6dcab Update CHANGELOG 2017-10-11 18:09:10 +03:00
Leonid Logvinov
bcdd063d70 Export ContractEventArg 2017-10-11 18:03:25 +03:00
Leonid Logvinov
22bc7cd692 0.21.1 2017-10-11 15:12:02 +03:00
Leonid
080fe38d1c Merge pull request #189 from 0xProject/fix/getLogsParamsSerialization
Fix a bug in logs fetching
2017-10-11 15:11:40 +03:00
Leonid Logvinov
df32756556 Update CHANGELOG 2017-10-11 14:58:58 +03:00
Leonid Logvinov
d02b7c5fdf Fix a bug in logs fetching 2017-10-11 14:54:49 +03:00
Assaf
c8b54f3bac Use OrderFillRequest interface for batchFillOrKill 2017-10-10 19:52:43 -04:00
Leonid Logvinov
233f97891c 0.21.0 2017-10-10 15:26:46 +03:00
Leonid
056e0f26ab Merge pull request #185 from 0xProject/fix/batch-validation
Fix batch validation
2017-10-10 14:15:57 +03:00
Leonid Logvinov
bda979a6c7 Change tests to test that allowance is checked first 2017-10-10 11:58:18 +03:00
Leonid Logvinov
cfae1a8dfd Throw allowance errors first 2017-10-10 11:48:42 +03:00
Leonid Logvinov
468a20c9ea Remove unused check 2017-10-10 11:48:05 +03:00
Leonid Logvinov
f24c94f1a8 Fix the comment 2017-10-10 11:47:39 +03:00
Leonid Logvinov
ac27937a9c Fix the comment 2017-10-10 11:47:01 +03:00
Leonid Logvinov
2b82354617 Remove redundant constructor 2017-10-10 11:46:33 +03:00
Leonid Logvinov
3fa98ec00e Assign to a variable before assigning 2017-10-10 11:45:57 +03:00
Leonid Logvinov
052fd5783f Change string enum value 2017-10-10 11:44:27 +03:00
Leonid Logvinov
63aa3d0659 Fix CHANGELOG comments 2017-10-10 11:43:55 +03:00
Leonid Logvinov
a4af1065ed Update CHANGELOG 2017-10-09 13:23:51 +03:00
Leonid Logvinov
ef8b2875cf Fix the comment 2017-10-09 13:20:19 +03:00
Leonid Logvinov
1424a7302a Implement transfer Emulator and rewrite tests 2017-10-09 13:07:48 +03:00
Leonid Logvinov
54ac354809 Add types for TradeSide and TransferType 2017-10-06 15:54:17 +03:00
Leonid
f38d2f80a6 Merge pull request #182 from 0xProject/feature/ethereumjs-blockstream
Rewrite subscriptions
2017-10-06 15:24:42 +03:00
Leonid Logvinov
0c112a2a1c Add a hex prefix 2017-10-06 15:13:31 +03:00
Leonid Logvinov
81297b44c6 Add undefined check 2017-10-06 13:15:11 +03:00
Leonid Logvinov
a2cc127ea9 Fix comments 2017-10-06 13:10:45 +03:00
Leonid Logvinov
cfa75ed36c Add a comment 2017-10-06 13:09:14 +03:00
Leonid Logvinov
498cf5333d Fix a typo 2017-10-06 13:08:07 +03:00
Leonid Logvinov
292aab9b18 Use BlockParamLiteral types 2017-10-06 13:07:01 +03:00
Leonid Logvinov
637183e4b2 introduce BlockParamLiteral 2017-10-06 13:04:51 +03:00
Leonid Logvinov
44e2929a4c Check for blockAndLogStreamer to be undefined instead of th filters object to be empty 2017-10-06 13:01:08 +03:00
Leonid Logvinov
1043def46c Install js-sha3 and use it for keccak256 2017-10-06 12:58:17 +03:00
Leonid Logvinov
6af2ba5cff Remove _activeFilters 2017-10-06 12:30:27 +03:00
Leonid
cd5327bc31 Merge pull request #184 from 0xProject/greenkeeper/typedoc-0.9.0
Update typedoc to the latest version 🚀
2017-10-06 12:11:05 +03:00
greenkeeper[bot]
977fe0f8ef chore(package): update typedoc to version 0.9.0 2017-10-06 04:16:50 +00:00
Leonid Logvinov
a406b4d134 Remove unused imports 2017-10-05 17:34:30 +03:00
Leonid Logvinov
1414b8ee8b Add type assertions for callback parameters 2017-10-05 16:32:01 +03:00
Leonid Logvinov
209c31f361 Remove TODOs 2017-10-05 16:28:20 +03:00
Leonid Logvinov
721d969a85 Make it possible to have multiple layers of snapshots 2017-10-05 15:56:28 +03:00
Leonid Logvinov
7bcedc27b8 Update CHANGELOG 2017-10-05 15:43:46 +03:00
Leonid Logvinov
553cbb25f4 Fix comments 2017-10-05 15:35:38 +03:00
Leonid Logvinov
118381c1d1 Move more logic into _stopBlockAndLogStream and _startBlockAndLogStream 2017-10-05 15:35:38 +03:00
Leonid Logvinov
f2100fa36d Remove missing comment 2017-10-05 15:35:38 +03:00
Leonid Logvinov
a537b2e40c Add missing comment 2017-10-05 15:35:37 +03:00
Leonid Logvinov
1b6d3b0f0b Add missing comments 2017-10-05 15:35:37 +03:00
Leonid Logvinov
7dd6352393 Implement subscriptions based on ethereumjs-blockstream 2017-10-05 15:35:37 +03:00
Leonid Logvinov
e37a3155cd Instantiate logAndBlockStreamer 2017-10-05 15:35:37 +03:00
Leonid Logvinov
542cf7b1cb Fix CHANGELOG formatting 2017-10-05 14:55:32 +03:00
Leonid Logvinov
60de7ecc41 0.20.0 2017-10-05 14:52:16 +03:00
Leonid Logvinov
624d108124 Revert "0.20.0"
This reverts commit acdc65c895.
2017-10-05 14:51:54 +03:00
Leonid
46f4c56a3d Merge pull request #183 from 0xProject/fix/getLogs-assertions
Add assertions
2017-10-05 14:49:04 +03:00
Leonid Logvinov
49a50efa9f Add assertion for tokenAddress 2017-10-05 14:43:04 +03:00
Leonid Logvinov
80cbdf469e Add assertions 2017-10-05 14:41:42 +03:00
Leonid Logvinov
acdc65c895 0.20.0 2017-10-05 09:48:27 +03:00
Leonid
0eb7b81636 Merge pull request #181 from 0xProject/feature/order-validation-zrx
Fees validations when one of the tokens is ZRX
2017-10-05 09:47:55 +03:00
Leonid Logvinov
0594667d36 Small reordering 2017-10-05 09:46:54 +03:00
Leonid Logvinov
cd16b35814 Fix a typo 2017-10-05 09:46:09 +03:00
Leonid
5bc7d716e0 Merge pull request #177 from 0xProject/greenkeeper/mocha-4.0.0
Update mocha to the latest version 🚀
2017-10-04 15:42:14 +03:00
Leonid Logvinov
3ec2402a98 Exit after running the tests 2017-10-04 15:16:51 +03:00
greenkeeper[bot]
04978f93d5 chore(package): update mocha to version 4.0.0 2017-10-04 15:11:37 +03:00
Leonid
0fa978c959 Merge pull request #179 from 0xProject/greenkeeper/source-map-support-0.5.0
Update source-map-support to the latest version 🚀
2017-10-04 15:10:38 +03:00
greenkeeper[bot]
f70cef081c chore(package): update source-map-support to version 0.5.0 2017-10-04 15:10:17 +03:00
Leonid Logvinov
b4717b8526 Fix tests 2017-10-04 15:06:38 +03:00
Leonid Logvinov
074040daf5 Add changes to CHANGELOG 2017-10-04 15:01:51 +03:00
Leonid Logvinov
0caab98399 Fi fees validation is one of the tokens transfered is 0x 2017-10-04 14:58:08 +03:00
Leonid Logvinov
8b7caef0db Fix an issue when validation failed, but contract call will succeed 2017-10-04 14:31:09 +03:00
Leonid
836d9be7fe Merge pull request #178 from 0xProject/feature/getLogs
Add zeroEx.getLogsAsync
2017-10-04 14:30:36 +03:00
Leonid Logvinov
e5bdf60460 Move ZRX_NOT_IN_TOKEN_REGISTRY to InternalZeroExError 2017-10-04 14:25:15 +03:00
Leonid Logvinov
11c48ced00 Reduce nesting 2017-10-04 14:23:42 +03:00
Leonid Logvinov
cc3871aca5 Use find 2017-10-04 14:22:47 +03:00
Leonid Logvinov
8fb5e87243 Allign brackets 2017-10-04 14:22:17 +03:00
Leonid Logvinov
504beeb2f3 Add filtering by topic 2017-10-04 13:30:00 +03:00
Leonid Logvinov
9af47eb063 Use a ternary and add a comment 2017-10-04 12:59:46 +03:00
Leonid Logvinov
944f51d66c Use SolidityTypes 2017-10-04 12:55:16 +03:00
Leonid Logvinov
499e60c4a3 Use 0x.length instead of 2 2017-10-04 12:48:45 +03:00
Leonid Logvinov
a6f4f83b5b Add a comment 2017-10-04 11:55:29 +03:00
Leonid Logvinov
2b9418b700 Fix a typo 2017-10-04 11:54:34 +03:00
Leonid Logvinov
aa995ff994 Use _.find instead of _.filter 2017-10-04 11:53:44 +03:00
Leonid Logvinov
d1e4f6efdd Move NoAbiDecoder to InternalZeroExErrors 2017-10-04 11:53:02 +03:00
Leonid Logvinov
f65bfc1ab1 Extract topics to its variable 2017-10-04 11:51:36 +03:00
Leonid Logvinov
f26d49f077 Use Noop instead of NoOp 2017-10-04 11:48:53 +03:00
Leonid Logvinov
ad7ce6c916 Update CHANGELOG 2017-10-04 11:14:20 +03:00
Leonid Logvinov
7c49224c7b Don't export RawLog 2017-10-04 11:14:20 +03:00
Leonid Logvinov
451ded4963 Add tests for zeroEx.exchange.getLogsAsync 2017-10-04 11:14:20 +03:00
Leonid Logvinov
837618c7a0 Implement zeroEx.exchange.getLogsAsync 2017-10-04 11:14:20 +03:00
Leonid Logvinov
e6c138be5a Add _getLogsAsync on contract_wrapper 2017-10-04 11:14:19 +03:00
Leonid Logvinov
087645e59f Add tests for zeroEx.token.getLogsAsync 2017-10-04 11:14:19 +03:00
Leonid Logvinov
0a12fa7f4e Implement getLogsAsync on token contract 2017-10-04 11:14:19 +03:00
Leonid Logvinov
87374d7f46 Refactor abi decoder 2017-10-04 11:14:19 +03:00
Leonid Logvinov
efa85f844b Add tryToDecodeLogOrNoOp and _getEventSignatureFromAbiByName on contract_wrapper 2017-10-04 11:14:19 +03:00
Leonid Logvinov
db08896274 Remove old tests 2017-10-04 11:14:19 +03:00
Leonid Logvinov
44abf283ec Add keccak256 on web3_wrapper 2017-10-04 11:14:19 +03:00
Leonid Logvinov
671bc7c917 Add NO_ABI_DECODER and ContractEvents 2017-10-04 11:14:19 +03:00
Leonid Logvinov
6bbdc98ba2 Move log decoding to AbiDecoder 2017-10-04 11:14:19 +03:00
Leonid Logvinov
a9681072ee Factor out tryToDecodeLogOrNoOp 2017-10-04 11:14:19 +03:00
Leonid Logvinov
16af052a16 Don't text for an exact block hash 2017-10-04 11:14:19 +03:00
Leonid Logvinov
40e0706954 Add changes to CHANGELOG 2017-10-04 11:14:19 +03:00
Leonid Logvinov
b859f4b8ab Add tests for zeroEx.getLogsAsync 2017-10-04 11:14:19 +03:00
Leonid Logvinov
835c17c961 Add zeroEx.getLogsAsync 2017-10-04 11:14:19 +03:00
Leonid Logvinov
7b545aa0e0 Re-export new types 2017-10-04 11:14:19 +03:00
Leonid Logvinov
ea08fc8642 Add getLogsAsync to web3_wrapper 2017-10-04 11:14:19 +03:00
Leonid Logvinov
5410924810 Add type aliases for web3 types 2017-10-04 11:14:19 +03:00
Leonid Logvinov
5d21d10437 Update web3-typescript-typings 2017-10-04 11:14:18 +03:00
Leonid
5d554ab882 Merge pull request #180 from 0xProject/greenkeeper/0x-json-schemas-0.6.0
Update 0x-json-schemas to the latest version 🚀
2017-10-04 11:12:15 +03:00
greenkeeper[bot]
c2ce8732e7 fix(package): update 0x-json-schemas to version 0.6.0 2017-10-04 06:49:52 +00:00
Leonid Logvinov
76c8d7108f 0.19.0 2017-09-29 16:21:22 +02:00
Leonid Logvinov
024bc1756e Fix types 2017-09-29 16:21:08 +02:00
Leonid Logvinov
0cf5cc778a Update CHANGELOG 2017-09-29 15:42:40 +02:00
Leonid
ed4536f57f Merge pull request #175 from 0xProject/fix/set-interval-bug
Fix the bug in transaction mined awaiting
2017-09-29 15:27:51 +02:00
Leonid Logvinov
5bc33257b6 Fix the bug in transaction mined awaiting 2017-09-29 15:22:01 +02:00
Leonid
0c3a14b662 Merge pull request #169 from 0xProject/greenkeeper/sinon-4.0.0
Update sinon to the latest version 🚀
2017-09-29 11:51:41 +02:00
Leonid
4b7b46071f Merge pull request #174 from 0xProject/greenkeeper/coveralls-3.0.0
Update coveralls to the latest version 🚀
2017-09-29 11:51:13 +02:00
Leonid
cbc9e87d65 Merge pull request #173 from 0xProject/feature/ropsten-support
Add Ropsten support
2017-09-28 18:18:19 +02:00
greenkeeper[bot]
1c10440a15 chore(package): update coveralls to version 3.0.0 2017-09-28 16:11:29 +00:00
Brandon Millman
a0af271996 Merge pull request #172 from 0xProject/bmillman_optional_validation
Add OrderTransactionOpts to enable optional validation to exchange_wr…
2017-09-28 09:06:23 -07:00
Brandon Millman
d21fbbc4c8 Fixed nits 2017-09-28 08:44:29 -07:00
Leonid Logvinov
db419ffcc7 Add tests for ropsten artifacts 2017-09-28 14:42:48 +02:00
Leonid Logvinov
b537636b42 Update CHANGELOG 2017-09-28 14:38:51 +02:00
Leonid Logvinov
4e0b4415f0 Add Ropsten artifacts 2017-09-28 14:36:58 +02:00
Brandon Millman
333665370f Add tests 2017-09-27 17:12:38 -07:00
Brandon Millman
1d4506427f Add OrderTransactionOpts to enable optional validation to exchange_wrapper 2017-09-27 13:28:11 -07:00
Fabio Berger
be12c5b538 0.18.0 2017-09-26 16:24:13 +02:00
Fabio Berger
5449fc5093 0.17.0 2017-09-26 16:23:48 +02:00
Fabio Berger
a87dd7af7d Update changelog 2017-09-26 16:23:29 +02:00
Fabio Berger
949fc2fc82 Merge pull request #170 from 0xProject/addOrderValidation
Add validateOrderFillableOrThrowAsync Method
2017-09-26 16:07:42 +02:00
Fabio Berger
5f7afce49d fix test 2017-09-26 15:58:08 +02:00
Fabio Berger
f8d5b72367 fix test 2017-09-26 15:57:36 +02:00
Fabio Berger
ad6e848821 fix merge issue 2017-09-26 15:37:14 +02:00
Fabio Berger
9ee88ba06d Updated changelog 2017-09-26 15:30:54 +02:00
Fabio Berger
deac665b42 Merge branch 'development' into addOrderValidation
* development:
  Update comment
  Add a test for getZRXTokenAddressAsync
  Document changes in CHANGELOG
  Make getZRXTokenAddressAsync public
2017-09-26 15:29:44 +02:00
Fabio Berger
fbac611337 improve comment 2017-09-26 15:29:08 +02:00
Fabio Berger
9886383638 Fix linter issue 2017-09-26 15:28:07 +02:00
Fabio Berger
5bea6ff581 Add success test and regression test for previous bug where comparing makerTokenAmount with a takerTokenAmount 2017-09-26 15:27:59 +02:00
Leonid
3c40526bff Merge pull request #171 from 0xProject/feature/zrx-getter
Make getZRXTokenAddressAsync public
2017-09-26 15:07:14 +02:00
Leonid Logvinov
8a29f12a61 Update comment 2017-09-26 15:02:12 +02:00
Fabio Berger
e704aea643 Add tests for validateOrderFillableOrThrowAsync 2017-09-26 12:39:17 +02:00
Fabio Berger
25116940c0 Refactor our logic checking fillAmountNotZero and expiry 2017-09-26 12:39:05 +02:00
Fabio Berger
2148eb6d99 make opts optional 2017-09-26 12:32:49 +02:00
Leonid Logvinov
ee0adc8a7e Add a test for getZRXTokenAddressAsync 2017-09-26 11:57:32 +02:00
Fabio Berger
d3f729dd71 rename validateOrderFillableThrowIfNotFillableAsync to validateOrderFillableOrThrowAsync 2017-09-26 11:55:07 +02:00
Fabio Berger
9effd57229 Fix bug where we were accidentally comparing a makerTokenAmount to a takerTokenAmount 2017-09-26 11:51:51 +02:00
Leonid Logvinov
e347297aaa Document changes in CHANGELOG 2017-09-26 11:46:31 +02:00
Leonid Logvinov
68c240aa4d Make getZRXTokenAddressAsync public 2017-09-26 11:44:33 +02:00
Fabio Berger
5e6c4e0ec3 improve comment 2017-09-26 11:38:37 +02:00
Fabio Berger
5e92ca039c Add validateOrderFillableThrowIfNotFillableAsync to public methods in order to validate orders in an orderbook without a specific taker in mind 2017-09-26 11:01:33 +02:00
greenkeeper[bot]
d1ce78a64f chore(package): update sinon to version 4.0.0 2017-09-26 08:27:04 +00:00
Leonid Logvinov
0a19a7e8d1 0.16.0 2017-09-20 15:05:43 +02:00
Leonid
d424933d70 Merge pull request #165 from 0xProject/feature/configurable-addresses
Allow users to pass contract addresses as a config
2017-09-20 14:59:48 +02:00
Leonid Logvinov
91679caf93 Update release date 2017-09-20 14:59:21 +02:00
Leonid Logvinov
1efcc5ad62 Fix the typo 2017-09-20 14:57:33 +02:00
Leonid Logvinov
96d853fc4b Add a comment for ZeroExConfig type 2017-09-19 15:09:05 +02:00
Leonid Logvinov
0f942f95f0 Move lower-casing logic 2017-09-19 14:56:41 +02:00
Leonid Logvinov
f1cb3a4f37 Fix a comment 2017-09-19 14:53:58 +02:00
Leonid Logvinov
66db021900 Postfix variable names with 'ifExists' 2017-09-19 14:53:12 +02:00
Leonid Logvinov
e7af0eb20c Prefix HACK comment with HACK 2017-09-19 14:43:42 +02:00
Leonid Logvinov
5e40f76996 Postfix variable names with 'ifExists' 2017-09-19 14:43:14 +02:00
Leonid Logvinov
903e2f4f8a Verify ZeroExConfig 2017-09-19 14:13:06 +02:00
Leonid Logvinov
4aeb6226d5 Add changes to the CHANGELOG 2017-09-19 13:29:15 +02:00
Leonid Logvinov
e19d5b3c78 Fix a typo 2017-09-18 17:26:30 +02:00
Leonid Logvinov
946978e454 Add explanatory comment 2017-09-18 17:24:54 +02:00
Leonid Logvinov
40a0d345b5 Add tests for contracts address config 2017-09-18 16:54:24 +02:00
Leonid Logvinov
504e7a25a5 Make contract addresses configurable 2017-09-18 15:55:26 +02:00
Leonid Logvinov
8db90538a1 Fetch tokenTransferProxy address from exchange contract 2017-09-18 15:18:04 +02:00
Leonid Logvinov
fe9f692a4f 0.15.0 2017-09-08 16:34:19 +02:00
Leonid
e9448953ac Merge pull request #161 from 0xProject/feature/defaultBlock
Add a possibility to specify defaultBlock when calling const blockchain methods
2017-09-08 16:33:45 +02:00
Leonid Logvinov
217c16027e Replace placeholders with actual coments 2017-09-08 16:24:07 +02:00
Leonid Logvinov
be0b9a1d7c Add a comment for MethodOpts 2017-09-08 14:02:03 +02:00
Leonid Logvinov
fdf54668ae Fix CHANGELOG comment 2017-09-08 14:00:39 +02:00
Leonid Logvinov
1d64b542d8 Rename CallOpts to MethodOpts 2017-09-08 13:56:10 +02:00
Leonid Logvinov
e60153a4fb Update CHANGELOG.md 2017-09-08 12:28:18 +02:00
Leonid Logvinov
762d02b2e0 Allow user to specify defaultBlock when calling const exchange methods 2017-09-08 12:25:05 +02:00
Leonid Logvinov
1dcfd4102b Allow user to specify defaultBlock when calling const token methods 2017-09-08 12:03:04 +02:00
Leonid Logvinov
aaae22642e Define CallOpts type 2017-09-08 12:02:37 +02:00
Leonid Logvinov
6999e15972 0.14.2 2017-09-07 21:10:23 +02:00
Leonid
1501b47c10 Merge pull request #160 from 0xProject/fix/bignumber-types
Add bignumber.js types as a dependency
2017-09-07 21:09:30 +02:00
Leonid Logvinov
fbb4e844a7 Update CHANGELOG 2017-09-07 21:05:35 +02:00
Leonid Logvinov
a705a7d612 Make bignumber.js types normal dependency 2017-09-07 20:55:21 +02:00
Leonid Logvinov
a0a39fa4dd 0.14.1 2017-09-07 20:32:40 +02:00
Leonid Logvinov
36de4c7b0f Add release note to CHANGELOG 2017-09-07 20:32:29 +02:00
Leonid
4e22c289af Merge pull request #159 from 0xProject/fix/types
Move Aftifact type definition to 'types'
2017-09-07 20:31:20 +02:00
Leonid Logvinov
af217e316a Move Aftifact type definition to 'types' 2017-09-07 20:28:45 +02:00
Leonid Logvinov
b5435b6ab8 0.14.0 2017-09-06 18:34:30 +02:00
Leonid Logvinov
c7418e131f Fix version number in CHANGELOG 2017-09-06 18:34:05 +02:00
Leonid
c567249819 Merge pull request #157 from 0xProject/feature/throw-for-exchange-errors
Feature/throw for exchange errors
2017-09-06 18:32:02 +02:00
Leonid Logvinov
d2dc4d18be Add zeroEx.exchange.throwLogErrorsAsErrors to CHANGELOG 2017-09-06 18:27:25 +02:00
Leonid Logvinov
67ed341f24 Use LogError type 2017-09-06 18:26:17 +02:00
Leonid Logvinov
0b6e874a0d Fix a comment 2017-09-06 18:25:03 +02:00
Leonid Logvinov
88791f732f Make intervalUtils an object instead of a class and make instance variable local 2017-09-06 18:22:28 +02:00
Leonid Logvinov
b1feb5ac29 Fix a bug in intervalUtils 2017-09-06 17:49:51 +02:00
Leonid Logvinov
873aa26f63 Update CHANGELOG 2017-09-06 17:45:10 +02:00
Leonid Logvinov
a57b22a6bc Fix overlapping async intervals issue 2017-09-06 17:41:40 +02:00
Leonid Logvinov
7c61b09dce Add zeroEx.exchange.throwLogErrorsAsErrors 2017-09-06 17:29:15 +02:00
Leonid Logvinov
b38aff8808 Fix log decoder to return correct types 2017-09-06 17:26:55 +02:00
Leonid Logvinov
912d15cb73 0.13.0 2017-09-06 15:35:15 +02:00
Leonid Logvinov
9dc13360c9 Revert "0.13.0"
This reverts commit 92eb68bf2c.
2017-09-06 15:35:03 +02:00
Leonid
cb44b77d0b Merge pull request #156 from 0xProject/feature/custom-abi-decoder
Custom abi decoder
2017-09-06 15:26:29 +02:00
Leonid Logvinov
1baf065317 Use startsWith instead of includes 2017-09-06 15:26:15 +02:00
Leonid Logvinov
88c96c7052 Use template strings 2017-09-06 15:15:00 +02:00
Leonid Logvinov
9680cc1270 Use _.includes instead of indexOf 2017-09-06 15:14:36 +02:00
Leonid Logvinov
68d051d4a7 Rename methodID to methodId 2017-09-06 15:11:41 +02:00
Leonid Logvinov
f1ed572819 Remove redundant js prefix 2017-09-06 15:11:08 +02:00
Leonid Logvinov
9ae56485a9 Fix type error 2017-09-06 15:10:59 +02:00
Leonid Logvinov
a7ba16ef4a Handle the case, when it's not possible to decode args 2017-09-06 14:31:52 +02:00
Leonid Logvinov
35f3396295 Implement custom ABI decoder 2017-09-06 14:29:52 +02:00
Leonid Logvinov
10817aa337 Add types for web3/lib/solidity/coder.js 2017-09-06 14:29:09 +02:00
Leonid Logvinov
542aae6cd9 Remove abi-decoder 2017-09-06 14:28:29 +02:00
Leonid Logvinov
92eb68bf2c 0.13.0 2017-09-06 13:02:31 +02:00
Leonid Logvinov
aa7d10e510 Update web-typescript-typings 2017-09-06 13:01:33 +02:00
Leonid Logvinov
7377df8a4d Define sendAsync on HDWalletProvider 2017-09-06 13:00:13 +02:00
Leonid Logvinov
70a7f02d0f Fix import in order_validation_utils 2017-09-06 12:51:47 +02:00
Leonid Logvinov
5fb4b54153 Specify the release date 2017-09-06 12:48:47 +02:00
Leonid Logvinov
c64154e33a Add missing separators in CHANGELOG 2017-09-06 10:47:31 +02:00
Leonid
07da617c05 Merge pull request #152 from 0xProject/fix/signature-verification
Add signature verification as a part of order validation
2017-09-06 10:39:43 +02:00
Leonid
35c133caed Merge branch 'development' into fix/signature-verification 2017-09-06 10:35:19 +02:00
Leonid Logvinov
18a52a1ea7 Update CHANGELOG 2017-09-06 10:34:31 +02:00
Leonid Logvinov
501f054d51 Add signature verification as a part of order validation and tests for it 2017-09-06 10:33:34 +02:00
Leonid
f0a5ad2d20 Merge pull request #151 from 0xProject/feature/remove-truffle-contracts
Remove truffle contracts dependency
2017-09-06 10:28:37 +02:00
Leonid Logvinov
258b4fac31 Fix a typo in test name 2017-09-06 10:26:22 +02:00
Leonid Logvinov
8ebc724379 Add lifecycle methods 2017-09-06 00:40:22 +02:00
Leonid Logvinov
df904f80e3 Add test for logs decoding in awaitTransactionMinedAsync 2017-09-06 00:18:07 +02:00
Leonid Logvinov
e6e12e946e Update CHANGELOG 2017-09-05 18:59:46 +02:00
Leonid Logvinov
2fd5f2781b Add forgotten artifacts file 2017-09-05 18:59:18 +02:00
Leonid Logvinov
2f97ddb727 Fix the return types and export the required public types 2017-09-05 18:50:22 +02:00
Leonid Logvinov
a7b2131db7 Decode logs args in awaitTransactionMinedAsync 2017-09-05 18:45:20 +02:00
Leonid Logvinov
f057267955 Update json-schemas 2017-09-05 16:45:40 +02:00
Leonid Logvinov
b0547819fd Define AbiType 2017-09-05 15:44:42 +02:00
Leonid Logvinov
dff63f9b89 Use AbiType 2017-09-05 15:34:52 +02:00
Leonid Logvinov
ee00769be1 Use schema validation to distinguish txData argument 2017-09-05 15:29:29 +02:00
Leonid Logvinov
ec22097efb Don't override function arguments 2017-09-05 13:49:47 +02:00
Leonid Logvinov
bc5fd316df Cast to Artifat type 2017-09-05 13:47:17 +02:00
Leonid Logvinov
92b101fac8 Remove unused code 2017-09-05 13:46:13 +02:00
Leonid Logvinov
78c46d7cc9 Change the order of default overriding 2017-09-05 13:45:32 +02:00
Leonid Logvinov
9f12ef61b0 Rename x.call -> x.callAsync x() -> x.sendTransactionAsync() x.estimateGas() -> x.estimateGasAsync() 2017-09-05 13:43:46 +02:00
Leonid Logvinov
e05dfab1fc Add explaining comment 2017-09-05 13:14:27 +02:00
Leonid Logvinov
b5c6c91962 Increase the default polling interval to 1000 2017-09-05 12:52:44 +02:00
Leonid Logvinov
f6a945dfe4 Fix the comment at awaitTransactionMinedAsync 2017-09-05 12:52:00 +02:00
Leonid Logvinov
a12df1c73a Fix gasPrice regression 2017-09-05 11:38:28 +02:00
Leonid Logvinov
876032a8a7 Update CHANGELOG 2017-09-05 10:42:00 +02:00
Leonid Logvinov
96d2a55eff Add TransationReceipt as a public exported type 2017-09-05 10:29:51 +02:00
Leonid Logvinov
5d57a2f0e9 Increase timeout 2017-09-05 10:22:22 +02:00
Leonid Logvinov
2b547f94a4 Change non-exhange contracts to also return txHash 2017-09-05 10:07:16 +02:00
Leonid Logvinov
c9e490bdae Implement zeroEx.awaitTransactionMined 2017-09-04 19:08:14 +02:00
Leonid Logvinov
6325a03818 Temporarily remove web3_beta, cause it breaks installation and tests 2017-09-04 18:48:18 +02:00
Leonid Logvinov
2577d8f662 Use Web3.ContractInstance type 2017-09-04 18:23:12 +02:00
Leonid Logvinov
1ad395cf86 Make the functions immidiately return txHash instead of awaiting for a transaction to be mined 2017-09-04 18:14:48 +02:00
Leonid Logvinov
1c2d4cbb1a Fix tests descriptions 2017-09-04 16:57:22 +02:00
Leonid Logvinov
9818eb2835 Use custom contract abstraction 2017-09-04 14:45:01 +02:00
Leonid Logvinov
59fed02a8b Remove truffle-contract from deps 2017-09-04 12:07:17 +02:00
Fabio Berger
0275ac9dad Merge pull request #146 from 0xProject/greenkeeper/0x-json-schemas-0.4.0
Update 0x-json-schemas to the latest version 🚀
2017-09-03 10:15:30 +02:00
Leonid Logvinov
62452db5d8 0.12.1 2017-09-02 05:18:31 +02:00
Leonid Logvinov
792646888a Update CHANGELOG version 2017-09-02 05:18:24 +02:00
Leonid Logvinov
cac36e781e 0.12.0 2017-09-02 05:09:38 +02:00
Leonid Logvinov
02f736ac06 Update yarn.lock 2017-09-02 05:08:07 +02:00
Leonid Logvinov
05296b7f48 Update CHANGELOG.md 2017-09-02 05:01:21 +02:00
Leonid
edeed527c2 Merge pull request #148 from BMillman19/bmillman_json_content_type
Add 'content-type' header with value 'application/json' for http requ…
2017-09-01 12:03:34 +02:00
Brandon Millman
4c40b60a2d Add 'content-type' header with value 'application/json' for http requests made JSONRPC endpoints 2017-09-01 00:58:05 -07:00
Leonid
134b9dfb23 Merge pull request #147 from BMillman19/bmillman_contract_types
Fix incorrect types related to contract calls in types.ts
2017-08-31 18:14:36 +02:00
Brandon Millman
18a5f7485c Fix type of ExchangeContract.getOrderHash.call 2017-08-31 08:33:34 -07:00
Brandon Millman
0ff6cc1997 Fix incorrect types related to contract interactions in types.ts 2017-08-31 08:16:28 -07:00
greenkeeper[bot]
66066b9722 fix(package): update 0x-json-schemas to version 0.4.0 2017-08-31 12:37:57 +00:00
Fabio Berger
4620c1c818 Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
  Improve the comment
  Add assert.isWeb3Provider
  Use more concise dep pointing
  Don't create whole web3 object in beta tests
  Improve the comment
  Add tests for web3@1.0
  Use zeroEx.getAvailableAddressesAsync instead of web3.eth.getAccounts
  Add web3@1.0 to web3Factory
  Support web3@1.0 providers
  Define web3@1.0 types ;)
  Install web3@1.0.0 as web3_beta
2017-08-30 19:47:14 +02:00
Fabio Berger
4370e19880 update 0x-json-schema 2017-08-30 19:47:04 +02:00
Leonid
5f44b5f711 Merge pull request #142 from 0xProject/feature/support_web3@1.0_provider
Feature/support web3@1.0 provider
2017-08-30 11:24:15 +02:00
Leonid Logvinov
c83e1d57fc Improve the comment 2017-08-30 11:14:01 +02:00
Leonid Logvinov
60ad5024ce Add assert.isWeb3Provider 2017-08-30 11:12:28 +02:00
Leonid Logvinov
5149fcdd74 Use more concise dep pointing 2017-08-30 11:05:23 +02:00
Leonid Logvinov
130a7967aa Don't create whole web3 object in beta tests 2017-08-30 10:56:46 +02:00
Leonid Logvinov
6e34cf2c3b Move CONTRIBUTING and PULL_REQUEST_TEMPLATE to top level 2017-08-30 10:22:47 +02:00
Leonid Logvinov
a98bb1f7ac Improve the comment 2017-08-29 18:45:26 +02:00
Leonid Logvinov
da2661cf33 Add tests for web3@1.0 2017-08-29 18:42:13 +02:00
Leonid Logvinov
7d82d14a7d Use zeroEx.getAvailableAddressesAsync instead of web3.eth.getAccounts 2017-08-29 18:41:29 +02:00
Leonid Logvinov
e5bb3bc75e Add web3@1.0 to web3Factory 2017-08-29 18:41:14 +02:00
Leonid Logvinov
3f99281309 Support web3@1.0 providers 2017-08-29 18:40:49 +02:00
Leonid Logvinov
28b4ff42ea Define web3@1.0 types ;) 2017-08-29 18:39:06 +02:00
Leonid Logvinov
372fc39a6b Install web3@1.0.0 as web3_beta 2017-08-29 17:04:57 +02:00
Leonid
c6b99fcca0 Merge pull request #141 from 0xProject/feature/CONTRIBUTING.md
Add a CONTRIBUTING.md and PULL_REQUEST_TEMPLATE.md
2017-08-29 13:21:22 +02:00
Leonid Logvinov
b4a95428c1 Add a CONTRIBUTING.md and PULL_REQUEST_TEMPLATE.md 2017-08-29 11:11:09 +02:00
Leonid
07a872f802 Merge pull request #139 from 0xProject/feature/gas-price-config
Gas price config
2017-08-29 10:03:00 +02:00
Leonid Logvinov
9516a50f64 Document changes in CHANGELOG 2017-08-29 10:01:53 +02:00
Leonid Logvinov
bfac021085 Use zeroExConfig in tests 2017-08-29 10:01:53 +02:00
Leonid Logvinov
a19b40b051 Pass config object to a constructor instead of gasPrice 2017-08-29 10:01:53 +02:00
Leonid Logvinov
836cea6fd7 Document gasPrice in ZeroExConfig 2017-08-29 10:01:13 +02:00
Leonid Logvinov
66dd659a2f Add ZeroExConfig type to public interface 2017-08-29 10:01:13 +02:00
Leonid Logvinov
c765f115ae Add ZeroExConfig type 2017-08-29 10:01:13 +02:00
Leonid Logvinov
e372b0c61f Fix CHANGELOG message 2017-08-29 10:01:13 +02:00
Leonid Logvinov
0f646da970 Update CHANGELOG 2017-08-29 10:01:13 +02:00
Leonid Logvinov
8eb8037f9b Revert "Add a unit parameter to web3Wrapper.toWei"
This reverts commit 4503c6a09dd9b97fb3b13f0222954b8f1f0db62e.
2017-08-29 10:01:13 +02:00
Leonid Logvinov
5b60d9f0f4 Remove default value for gasPrice 2017-08-29 10:01:13 +02:00
Leonid Logvinov
dcfc0ecac6 Specify gasPrice in WETH tests 2017-08-29 10:01:13 +02:00
Leonid Logvinov
a6a1601799 Allow user to specify the gas price 2017-08-29 10:01:13 +02:00
Leonid Logvinov
a8fd3f30cf Add a unit parameter to web3Wrapper.toWei 2017-08-29 10:01:13 +02:00
Leonid
05ce9733da Merge pull request #140 from 0xProject/0x-json-schemas
Use 0x-json-schemas
2017-08-28 18:01:39 +02:00
Leonid Logvinov
96da2c26dc Use 0x-json-schemas 2017-08-28 16:49:57 +02:00
Leonid Logvinov
0afc95982b Fix UMD tests 2017-08-24 23:23:50 +02:00
Leonid Logvinov
b132860f1f 0.11.0 2017-08-24 22:55:30 +02:00
Leonid Logvinov
f9a8392d2c Add release date for 0.11.0 2017-08-24 22:55:02 +02:00
Leonid
1e590ce4ba Merge pull request #137 from 0xProject/unlimited-allowance
Add setUnlimitedProxyAllowanceAsync and setUnlimitedAllowanceAsync
2017-08-24 22:49:11 +02:00
Leonid Logvinov
bd67cf0f9f Improve comments 2017-08-24 22:48:51 +02:00
Leonid Logvinov
5a3a8ae7d5 Refactor UNLIMITED_ALLOWANCE_IN_BASE_UNITS to constants 2017-08-24 22:48:51 +02:00
Leonid Logvinov
a2d579b201 Add an explanatory comment 2017-08-24 22:48:51 +02:00
Leonid Logvinov
79dcc1660e Add a test that unlimited allowance reduces gas cost 2017-08-24 22:48:51 +02:00
Leonid Logvinov
6f227c152d Add tests for unlimited allowance 2017-08-24 22:48:51 +02:00
Leonid Logvinov
af242278c3 Update CHANGELOG 2017-08-24 22:48:51 +02:00
Leonid Logvinov
9b66b168ed Add setUnlimitedProxyAllowanceAsync and setUnlimitedAllowanceAsync 2017-08-24 22:48:51 +02:00
Leonid Logvinov
9e76b2dd98 Fix test:commonjs 2017-08-24 22:48:51 +02:00
Leonid Logvinov
6d6688ddda Rename build:commonjs:dev to build:commonjs 2017-08-24 22:48:51 +02:00
Leonid Logvinov
2b1dc7c266 0.10.4 2017-08-24 22:48:51 +02:00
Leonid
3e1c436fa6 Merge pull request #136 from 0xProject/commonjs-build
Rename build:commonjs:dev to build:commonjs
2017-08-24 14:06:02 +02:00
Leonid Logvinov
02ae853718 Fix test:commonjs 2017-08-24 13:13:34 +02:00
Leonid Logvinov
b9f9581db9 Rename build:commonjs:dev to build:commonjs 2017-08-24 13:07:55 +02:00
Leonid Logvinov
31ce891beb Merge branch 'master' into development 2017-08-24 12:50:45 +02:00
Leonid Logvinov
6f29239211 0.10.4 2017-08-24 12:46:23 +02:00
Leonid
ea7c6be128 Merge pull request #135 from 0xProject/artifacts-addresses
Artifacts addresses
2017-08-24 12:46:08 +02:00
Leonid Logvinov
b4970d5bb9 Update CHANGELOG 2017-08-24 12:45:44 +02:00
Leonid Logvinov
73b2f59caa Update CHANGELOG 2017-08-24 12:40:16 +02:00
Leonid Logvinov
d92340903f Convert artifacts addresses lo lower case before using 2017-08-24 12:37:21 +02:00
Leonid Logvinov
44ec05de1f 0.10.3 2017-08-24 12:27:20 +02:00
Leonid Logvinov
2356c0e30e Bump the version 2017-08-24 12:24:52 +02:00
Leonid Logvinov
4e517b32f8 0.10.2 2017-08-24 12:01:46 +02:00
Leonid Logvinov
c21a0512af Add v0.10.2 CHANGELOG 2017-08-24 12:01:37 +02:00
Leonid Logvinov
ee4182c149 Hot fix the checksummed addresses in artifacts 2017-08-24 12:00:28 +02:00
Leonid
2d714d33c6 Merge pull request #134 from 0xProject/release-script
Specify tag and other values in the release script
2017-08-24 11:27:23 +02:00
Leonid Logvinov
92cbb48e15 Specify tag and other values in the release script 2017-08-24 11:15:10 +02:00
Leonid Logvinov
f3fe3fb0c5 0.10.1 2017-08-24 11:04:23 +02:00
Leonid Logvinov
dd75f8bf96 Bump patch version due to the publishing issue with 0.10.0 2017-08-24 11:04:13 +02:00
1391 changed files with 132853 additions and 9398 deletions

183
.circleci/config.yml Normal file
View File

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

12
.editorconfig Normal file
View File

@@ -0,0 +1,12 @@
# EditorConfig http://EditorConfig.org
# top-most EditorConfig file
root = true
# All files
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.sol linguist-language=Solidity

35
.gitignore vendored
View File

@@ -58,9 +58,40 @@ typings/
.env
# built library using in commonjs module syntax
lib
lib/
# UMD bundles that export the global variable
_bundles
# generated documentation
docs
generated_docs/
TODO.md
packages/website/public/bundle*
packages/react-docs/example/public/bundle*
# server cli
packages/testnet-faucets/server/
# generated contract artifacts/
packages/sol-cov/test/fixtures/artifacts/
packages/metacoin/artifacts/
packages/order-watcher/test/artifacts/
packages/contract-wrappers/test/artifacts/
# generated contract wrappers
packages/0x.js/src/generated_contract_wrappers/
packages/contracts/src/generated_contract_wrappers/
packages/contract-wrappers/src/contract_wrappers/generated/
packages/metacoin/src/contract_wrappers
packages/fill-scenarios/src/generated_contract_wrappers/
packages/order-watcher/src/generated_contract_wrappers/
packages/order-utils/src/generated_contract_wrappers/
packages/migrations/src/v1/contract_wrappers
packages/migrations/src/v2/contract_wrappers
# solc-bin in sol-compiler
packages/sol-compiler/solc_bin/
# Monorepo scripts
packages/*/scripts/

View File

@@ -1,6 +0,0 @@
.*
tsconfig.json
tslint.json
webpack.config.js
yarn.lock
docs

20
.prettierignore Normal file
View File

@@ -0,0 +1,20 @@
lib
.nyc_output
/packages/contract-wrappers/src/contract_wrappers/generated/
/packages/metacoin/src/contract_wrappers
/packages/0x.js/src/generated_contract_wrappers/
/packages/contracts/src/generated_contract_wrappers/
/packages/fill-scenarios/src/generated_contract_wrappers/
/packages/order-watcher/src/generated_contract_wrappers/
/packages/order-utils/src/generated_contract_wrappers/
/packages/migrations/src/v1/contract_wrappers
/packages/migrations/src/v2/contract_wrappers
/packages/0x.js/test/artifacts
/packages/contracts/src/artifacts
/packages/metacoin/artifacts
/packages/contract-wrappers/test/artifacts
/packages/order-watcher/test/artifacts
/packages/migrations/artifacts/1.0.0
/packages/migrations/artifacts/2.0.0
package.json
scripts/postpublish_utils.js

6
.prettierrc Normal file
View File

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

View File

@@ -1,86 +0,0 @@
# CHANGELOG
v0.10.0 - _Aug 24, 2017_
------------------------
* Added `zeroEx.exchange.validateFillOrderThrowIfInvalidAsync` (#128)
* Added `zeroEx.exchange.validateFillOrKillOrderThrowIfInvalidAsync` (#128)
* Added `zeroEx.exchange.validateCancelOrderThrowIfInvalidAsync` (#128)
* Added `zeroEx.exchange.isRoundingErrorAsync` (#128)
* Added `zeroEx.proxy.getContractAddressAsync` (#130)
* Added `zeroEx.tokenRegistry.getTokenAddressesAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenAddressBySymbolIfExistsAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenAddressByNameIfExistsAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenByNameIfExistsAsync` (#132)
* Added clear error message when checksummed address is passed to a public method (#124)
* Fixes the description of `shouldThrowOnInsufficientBalanceOrAllowance` in docs (#127)
v0.9.3 - _Aug 22, 2017_
------------------------
* Update contract artifacts to include latest Kovan and Mainnet deploys (#118)
v0.9.2 - _Aug 21, 2017_
------------------------
* *This version was unpublished because of a publishing issue.*
* Update contract artifacts to include latest Kovan and Mainnet deploys (#118)
v0.9.1 - _Aug. 16, 2017_
------------------------
* Fixed the bug causing `zeroEx.token.getBalanceAsync()` to fail if no addresses available (#120)
v0.9.0 - _Jul. 26, 2017_
------------------------
* Migrated to the new version of smart contracts (#101)
* Removed the ability to call methods on multiple authorized Exchange smart contracts (#106)
* Made `zeroEx.getOrderHashHex` a static method (#107)
* Cached `net_version` requests and invalidate the cache on calls to `setProvider` (#95)
* Renamed `zeroEx.exchange.batchCancelOrderAsync` to `zeroEx.exchange.batchCancelOrdersAsync`
* Renamed `zeroEx.exchange.batchFillOrderAsync` to `zeroEx.exchange.batchFillOrdersAsync`
* Updated to typescript v2.4 (#104)
* Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded (#109)
v0.8.0 - _Jul. 4, 2017_
------------------------
* Added the ability to call methods on different authorized versions of the Exchange smart contract (#82)
* Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59)
* Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync` (#89)
* Added `zeroEx.token.subscribeAsync` (#90)
* Made contract invalidation functions private (#90)
* `zeroEx.token.invalidateContractInstancesAsync`
* `zeroEx.exchange.invalidateContractInstancesAsync`
* `zeroEx.proxy.invalidateContractInstance`
* `zeroEx.tokenRegistry.invalidateContractInstance`
* Fixed the bug where `zeroEx.setProviderAsync` didn't invalidate etherToken contract's instance
v0.7.1 - _Jun. 26, 2017_
------------------------
* Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync` (#81)
v0.7.0 - _Jun. 22, 2017_
------------------------
* Added Kovan smart contract artifacts (#78)
* Started returning fillAmount from `fillOrderAsync` and `fillUpToAsync` (#72)
* Started returning cancelledAmount from `cancelOrderAsync` (#72)
* Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs`
v0.6.2 - _Jun. 21, 2017_
------------------------
* Reduced bundle size
* Improved documentation
v0.6.1 - _Jun. 19, 2017_
------------------------
* Improved documentation
v0.6.0 - _Jun. 19, 2017_
------------------------
* Made `ZeroEx` class accept `Web3Provider` instance instead of `Web3` instance
* Added types for contract event arguments
v0.5.2 - _Jun. 15, 2017_
------------------------
* Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page
v0.5.1 - _Jun. 15, 2017_
------------------------
* Added `postpublish` script to publish to Github Releases with assets.

46
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team@0xproject.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

49
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,49 @@
## 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!
### How to contribute
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.
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:
* 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/)
### Code quality
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.
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.
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.
### Styleguide
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.
To lint your code just run: `yarn lint`
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.
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)
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.
### Branch structure & versioning
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.
We have two main branches: `master` and `development`.
`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`.

62
ISSUE_TEMPLATE.md Normal file
View File

@@ -0,0 +1,62 @@
<!--- Thank you for taking the time to file an Issue -->
<!--- Before submitting please check to see if this issue was already reported -->
<!--- Provide a general summary of the issue in the Title above -->
## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a package change/improvement, tell us how it should work -->
<!--- If you're suggesting a contract or protocol change/improvement, visit our ZEIPs repo -->
## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
```
1.
2.
3.
```
## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
| Package | Version |
| ------------------: | :------ |
| `0x.js` | 0.25.0 |
| `Exchange Contract` | v1 |
| Network |
| ------- |
| NAME |
<!-- For example:
| mainnet |
| kovan |
| testrpc |
-->

41
PULL_REQUEST_TEMPLATE.md Normal file
View File

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

214
README.md
View File

@@ -4,50 +4,176 @@
[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].
This repository contains a Javascript library that makes it easy to build Relayers and other DApps that use the 0x protocol.
[![CircleCI](https://circleci.com/gh/0xProject/0x.js.svg?style=svg&circle-token=61bf7cd8c9b4e11b132089dfcffdd1be277d1e0c)](https://circleci.com/gh/0xProject/0x.js)
[![npm version](https://badge.fury.io/js/0x.js.svg)](https://badge.fury.io/js/0x.js)
[![Coverage Status](https://coveralls.io/repos/github/0xProject/0x.js/badge.svg?branch=master&t=fp0cXD)](https://coveralls.io/github/0xProject/0x.js?branch=master)
[![Slack Status](http://slack.0xProject.com/badge.svg)](http://slack.0xProject.com)
[![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Greenkeeper badge](https://badges.greenkeeper.io/0xProject/0x.js.svg?token=7c22e5c72acf39d3ead8d29c5d9bb38f9096df3e643024dcedd53ab732847be1&ts=1496426342666)](https://greenkeeper.io/)
## Installation
0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package.
#### CommonJS *(recommended)*:
**Install**
```bash
npm install 0x.js --save
```
**Import**
```javascript
import {ZeroEx} from '0x.js';
```
#### UMD:
**Install**
Download the UMD module from our [releases page](https://github.com/0xProject/0x.js/releases) and add it to your project.
**Import**
```html
<script type="text/javascript" src="0x.js"></script>
```
## Documentation
Extensive documentation of 0x.js can be found on [our website][docs-url].
This repository is a monorepo including the 0x protocol smart contracts and numerous developer tools. Each public sub-package is independently published to NPM.
[website-url]: https://0xproject.com/
[whitepaper-url]: https://0xproject.com/pdfs/0x_white_paper.pdf
[docs-url]: https://0xproject.com/docs/0xjs
[![CircleCI](https://circleci.com/gh/0xProject/0x-monorepo.svg?style=svg&circle-token=61bf7cd8c9b4e11b132089dfcffdd1be277d1e0c)](https://circleci.com/gh/0xProject/0x-monorepo)
[![Coverage Status](https://coveralls.io/repos/github/0xProject/0x-monorepo/badge.svg?branch=development)](https://coveralls.io/github/0xProject/0x-monorepo?branch=development)
[![Discord](https://img.shields.io/badge/chat-rocket.chat-yellow.svg?style=flat)](https://chat.0xproject.com)
[![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
### Published Packages
| Package | Version | Description |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol |
| [`@0xproject/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0xproject/abi-gen.svg)](https://www.npmjs.com/package/@0xproject/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0xproject/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0xproject/assert.svg)](https://www.npmjs.com/package/@0xproject/assert) | Type and schema assertions used by our packages |
| [`@0xproject/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0xproject/base-contract.svg)](https://www.npmjs.com/package/@0xproject/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0xproject/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0xproject/connect.svg)](https://www.npmjs.com/package/@0xproject/connect) | A Javascript library for interacting with the Standard Relayer API |
| [`@0xproject/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-compiler.svg)](https://www.npmjs.com/package/@0xproject/sol-compiler) | A thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties. |
| [`@0xproject/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0xproject/dev-utils.svg)](https://www.npmjs.com/package/@0xproject/dev-utils) | Dev utils to be shared across 0x projects and packages |
| [`@0xproject/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0xproject/json-schemas.svg)](https://www.npmjs.com/package/@0xproject/json-schemas) | 0x-related json schemas |
| [`@0xproject/monorepo-scripts`](/packages/monorepo-scripts) | [![npm](https://img.shields.io/npm/v/@0xproject/monorepo-scripts.svg)](https://www.npmjs.com/package/@0xproject/monorepo-scripts) | Monorepo scripts |
| [`@0xproject/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0xproject/react-docs.svg)](https://www.npmjs.com/package/@0xproject/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON |
| [`@0xproject/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0xproject/react-shared.svg)](https://www.npmjs.com/package/@0xproject/react-shared) | 0x shared react components |
| [`@0xproject/sra-report`](/packages/sra-report) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-report.svg)](https://www.npmjs.com/package/@0xproject/sra-report) | Generate reports for standard relayer API compliance |
| [`@0xproject/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-cov.svg)](https://www.npmjs.com/package/@0xproject/sol-cov) | Solidity test coverage tool |
| [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) |
| [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules |
| [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations |
| [`@0xproject/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0xproject/typescript-typings.svg)](https://www.npmjs.com/package/@0xproject/typescript-typings) | Repository of types for external packages |
| [`@0xproject/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0xproject/utils.svg)](https://www.npmjs.com/package/@0xproject/utils) | Shared utilities |
| [`@0xproject/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0xproject/web3-wrapper.svg)](https://www.npmjs.com/package/@0xproject/web3-wrapper) | Web3 wrapper |
### Private Packages
| Package | Description |
| --------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`@0xproject/contracts`](/packages/contracts) | 0x solidity smart contracts & tests |
| [`@0xproject/react-docs-example`](/packages/react-docs-example) | Example documentation site created with `@0xproject/react-docs` |
| [`@0xproject/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
| [`@0xproject/website`](/packages/website) | 0x website & Portal DApp |
## Usage
Dedicated documentation pages:
* [0x.js Library](https://0xproject.com/docs/0xjs)
* [0x Connect](https://0xproject.com/docs/connect)
* [Smart contracts](https://0xproject.com/docs/contracts)
* [Subproviders](https://0xproject.com/docs/subproviders)
* [Sol Compiler](https://0xproject.com/docs/sol-compiler)
* [Web3-wrapper](https://0xproject.com/docs/web3-wrapper)
* [JSON-schemas](https://0xproject.com/docs/json-schemas)
* [Sol-cov](https://0xproject.com/docs/sol-cov)
* [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md)
Node version >= 6.12 is required.
Most of the packages require additional typings for external dependencies.
You can include those by prepending @0xproject/typescript-typings package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config.
```json
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
```
## Contributing
We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
#### Read our [contribution guidelines](./CONTRIBUTING.md).
### Install dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
To build all packages:
```bash
yarn build
```
To build a specific package:
```bash
PKG=@0xproject/web3-wrapper yarn build
```
### Watch
To re-build all packages on change:
```bash
yarn watch
```
To watch a specific package and all it's dependent packages:
```bash
PKG=[NPM_PACKAGE_NAME] yarn watch
e.g
PKG=@0xproject/web3-wrapper yarn watch
```
### Clean
Clean all packages:
```bash
yarn clean
```
Clean a specific package
```bash
PKG=0x.js yarn clean
```
### Rebuild
To re-build (clean & build) all packages:
```bash
yarn rebuild
```
To re-build (clean & build) a specific package & it's deps:
```bash
PKG=0x.js yarn rebuild
```
### Lint
Lint all packages:
```bash
yarn lint
```
Lint a specific package:
```bash
PKG=0x.js yarn lint
```
### Run Tests
Run all tests:
```bash
yarn test
```
Run a specific package's test:
```bash
PKG=@0xproject/web3-wrapper yarn test
```

View File

@@ -1,23 +0,0 @@
machine:
node:
version: 6.5.0
environment:
CONTRACTS_COMMIT_HASH: '35053f9'
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
dependencies:
override:
- yarn
cache_directories:
- ~/.cache/yarn
test:
override:
- wget https://s3.amazonaws.com/testrpc-shapshots/${CONTRACTS_COMMIT_HASH}.zip
- unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot
- npm run testrpc -- --db testrpc_snapshot:
background: true
- yarn test:coverage
- yarn report_test_coverage
- if [ $CIRCLE_BRANCH = "master" ]; then yarn test:umd; fi
- yarn lint

17
lerna.json Normal file
View File

@@ -0,0 +1,17 @@
{
"lerna": "2.5.1",
"packages": ["packages/*"],
"commands": {
"publish": {
"allowBranch": "development"
}
},
"version": "independent",
"commands": {
"publish": {
"ignore": ["test/**/*", "*.md", "scripts", "lib", "tslint.json", "tsconfig.json"]
}
},
"npmClient": "yarn",
"useWorkspaces": true
}

View File

@@ -1,106 +1,53 @@
{
"name": "0x.js",
"version": "0.10.0",
"description": "A javascript library for interacting with the 0x protocol",
"keywords": [
"0x.js",
"0xproject",
"ethereum",
"tokens",
"exchange"
],
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
"prebuild": "npm run clean",
"build": "run-p build:*:prod",
"prepublishOnly": "run-p build:umd:prod build:commonjs:dev",
"postpublish": "run-s release docs:json upload_docs_json",
"release": "publish-release --assets _bundles/index.js,_bundles/index.min.js",
"upload_docs_json": "aws s3 cp docs/index.json s3://0xjs-docs-jsons/$(git describe --tags).json --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type aplication/json",
"lint": "tslint src/*.ts test/*.ts",
"test": "run-s clean test:commonjs",
"test:umd": "./scripts/test_umd.sh",
"test:coverage": "nyc npm run test --all",
"report_test_coverage": "nyc report --reporter=text-lcov | coveralls",
"update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;",
"testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json docs/index.json .",
"docs:generate": "typedoc --out docs .",
"docs:open": "opn docs/index.html",
"clean": "shx rm -rf _bundles lib test_temp",
"build:dev": "npm run clean && run-p build:*:dev",
"build:umd:dev": "webpack",
"build:umd:prod": "NODE_ENV=production webpack",
"build:commonjs:dev": "tsc; copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts;",
"test:commonjs": "run-s build:commonjs:dev run_mocha",
"pretest:umd": "run-s clean build:*:dev",
"substitute_umd_bundle": "npm run remove_src_files_not_used_by_tests; shx mv _bundles/* lib/src",
"remove_src_files_not_used_by_tests": "find ./lib/src \\( -path ./lib/src/utils -o -path ./lib/src/subproviders -o -path ./lib/src/schemas -o -path \"./lib/src/types.*\" \\) -prune -o -type f -print | xargs rm",
"run_mocha": "mocha lib/test/**/*_test.js --timeout 4000 --bail"
},
"config": {
"artifacts": "TokenTransferProxy Exchange TokenRegistry Token EtherToken",
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
},
"repository": {
"type": "git",
"url": "https://github.com/0xProject/0x.js"
},
"license": "Apache-2.0",
"engines": {
"node": ">=6.0.0"
},
"devDependencies": {
"@types/bignumber.js": "^4.0.2",
"@types/jsonschema": "^1.1.1",
"@types/lodash": "^4.14.64",
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.1",
"@types/sinon": "^2.2.2",
"awesome-typescript-loader": "^3.1.3",
"bignumber.js": "^4.0.2",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "0.0.3",
"chai-bignumber": "^2.0.1",
"chai-typescript-typings": "^0.0.0",
"copyfiles": "^1.2.0",
"coveralls": "^2.13.1",
"dirty-chai": "^2.0.1",
"ethereumjs-testrpc": "4.0.1",
"json-loader": "^0.5.4",
"mocha": "^3.4.1",
"npm-run-all": "^4.0.2",
"nyc": "^11.0.1",
"opn-cli": "^3.1.0",
"request": "^2.81.0",
"request-promise-native": "^1.0.4",
"shx": "^0.2.2",
"sinon": "^3.0.0",
"source-map-support": "^0.4.15",
"truffle-hdwallet-provider": "^0.0.3",
"tslint": "^5.3.2",
"tslint-config-0xproject": "^0.0.2",
"typedoc": "^0.8.0",
"types-bn": "^0.0.1",
"types-ethereumjs-util": "^0.0.5",
"typescript": "^2.4.1",
"web3-provider-engine": "^13.0.1",
"web3-typescript-typings": "^0.3.2",
"webpack": "^3.1.0"
},
"dependencies": {
"bignumber.js": "^4.0.2",
"compare-versions": "^3.0.1",
"es6-promisify": "^5.0.0",
"ethereumjs-abi": "^0.6.4",
"ethereumjs-util": "^5.1.1",
"find-versions": "^2.0.0",
"jsonschema": "^1.1.1",
"lodash": "^4.17.4",
"publish-release": "^1.3.3",
"truffle-contract": "^2.0.1",
"web3": "^0.20.0"
}
"private": true,
"name": "0x-monorepo",
"engines": {
"node" : ">=6.12"
},
"workspaces": [
"packages/*"
],
"scripts": {
"ganache": "ganache-cli -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"prettier": "prettier --write '**/*.{ts,tsx,json,md}' --config .prettierrc",
"prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc",
"report_coverage": "lcov-result-merger 'packages/*/coverage/lcov.info' | coveralls",
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild script:publish",
"run:publish:dry": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild script:publish:dry",
"script:prepublish_checks": "node ./packages/monorepo-scripts/lib/prepublish_checks.js",
"script:publish": "node ./packages/monorepo-scripts/lib/publish.js",
"script:publish:dry": "IS_DRY_RUN=true yarn script:publish",
"install:all": "yarn install",
"wsrun": "wsrun",
"lerna:run": "lerna run",
"watch": "wsrun watch_without_deps $PKG --fast-exit -r --stages --done-criteria='complete|successfully'",
"build": "wsrun build $PKG --fast-exit -r --stages",
"build:monorepo_scripts": "PKG=@0xproject/monorepo-scripts yarn build",
"clean": "wsrun clean $PKG --fast-exit -r --parallel",
"rebuild": "run-s clean build",
"test": "wsrun test $PKG --fast-exit --serial --exclude-missing",
"stage_docs": "wsrun docs:stage $PKG --fast-exit --parallel --exclude-missing",
"lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing",
"comment:postinstall": "HACK: For some reason `yarn` is not setting up symlinks properly for order-utils. We temporarily set them manually. Remove this after V2 refactor is complete.",
"postinstall": "rm -rf `pwd`/packages/order-utils/node_modules/@0xproject; mkdir `pwd`/packages/order-utils/node_modules/@0xproject; ln -s `pwd`/packages/json-schemas `pwd`/packages/order-utils/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/types `pwd`/packages/order-utils/node_modules/@0xproject/types; rm -f `pwd`/packages/contracts/node_modules/@0xproject/types; ln -s `pwd`/packages/types `pwd`/packages/contracts/node_modules/@0xproject/types; mkdir -p `pwd`/packages/fill-scenarios/node_modules/@0xproject; ln -s `pwd`/packages/types `pwd`/packages/fill-scenarios/node_modules/@0xproject/types; ln -s `pwd`/packages/order-utils `pwd`/packages/fill-scenarios/node_modules/@0xproject/order-utils"
},
"config": {
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
},
"devDependencies": {
"async-child-process": "^1.1.1",
"coveralls": "^3.0.0",
"ganache-cli": "^6.1.0",
"lcov-result-merger": "^3.0.0",
"lerna": "^2.5.1",
"npm-run-all": "^4.1.2",
"prettier": "^1.11.1",
"wsrun": "^2.2.0",
"source-map-support": "^0.5.6"
},
"resolutions": {
"ethereumjs-tx": "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default",
"ethers": "0xproject/ethers.js#eip-838-reasons"
}
}

11
packages/0x.js/.npmignore Normal file
View File

@@ -0,0 +1,11 @@
.*
tsconfig.json
webpack.config.js
yarn-error.log
test/
/src/
/_bundles/
/contract_templates/
/generated_docs/
/scripts/
/lib/src/monorepo_scripts/

File diff suppressed because it is too large Load Diff

374
packages/0x.js/CHANGELOG.md Normal file
View File

@@ -0,0 +1,374 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v0.38.0 - _May 22, 2018_
* Renamed createOrderStateWatcher to createOrderWatcherAsync since it is now async (#579)
* Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage (#579)
## v0.37.2 - _May 4, 2018_
* Dependencies updated
## v0.37.1 - _May 4, 2018_
* Dependencies updated
## v0.37.0 - _May 4, 2018_
* Fixed expiration watcher comparator to handle orders with equal expiration times (#526)
* Update Web3 Provider Engine to 14.0.4 (#555)
* Add `zeroEx.getProvider()` (#559)
* Move `ZeroExError.InvalidSignature` to `@0xproject/order-utils` `OrderError.InvalidSignature` (#559)
## v0.36.3 - _April 18, 2018_
* Move @0xproject/migrations to devDependencies
## v0.36.2 - _April 18, 2018_
* Dependencies updated
## v0.36.1 - _April 18, 2018_
* Internal changes and refactoring
* Fix redundant expired order removal bug (#527)
## v0.36.0 - _April 11, 2018_
* Moved Web3.Provider to `@0xproject/types:Provider` (#501)
* Add `zeroEx.exchange.getOrderStateAsync` to allow obtaining current OrderState for a signedOrder (#510)
## v0.35.0 - _April 2, 2018_
* Removed `ZeroExError.TransactionMiningTimeout` and moved it to '@0xproject/web3-wrapper' `Web3WrapperErrors.TransactionMiningTimeout` (#485)
## v0.34.0 - _April 2, 2018_
* Fix the bug causing `zeroEx.exchange.fillOrdersUpToAsync` validation to fail if there were some extra orders passed (#470)
* Remove automatic instantiation of `zeroEx.orderStateWatcher` (#488)
* Add `zeroEx.createOrderStateWatcher` to allow creating arbitrary number of OrderStateWatchers (#488)
* Added `stateLayer` setting to `OrderStateWatcherConfig` so OrderStateWatcher can be set to monitor different blockchain state layers (#488)
## v0.33.2 - _March 17, 2018_
* Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452)
* Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package (#456)
## v0.33.1 - _March 7, 2018_
* Add missing EthersJs typescript typings as dependency
## v0.33.0 - _March 3, 2018_
* Validate and lowercase all addresses in public methods (#373)
* Improve validation to force passing contract addresses on private networks (#385)
* Change `LogErrorContractEventArgs.errorId` type from `BigNumber` to `number` (#413)
* Rename all public `_unsubscribeAll` methods to `unsubscribeAll` (#415)
* Move web3 typings from devDep to dep since cannot use this package without it (#429)
## v0.32.2 - _February 8, 2018_
* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
## v0.32.1 - _February 6, 2018_
* Reorganized `BlockParamLiteral` export into `@0xproject/types` package (#355)
* Now using `abi-gen` package to generate ContractEventArgs types (#371)
## v0.32.0 - _February 4, 2018_
* Add `zeroEx.etherToken.getContractAddressIfExists` (#350)
* Fixed the bug causing order watcher to throw if there is an event with the same signature but different indexed fields (#366)
## v0.31.1 - _January 31, 2018_
* Fix the bug causing order watcher to throw if makerToken === zrx (#357)
## v0.31.0 - _January 29, 2018_
* Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the caller can decide on whether to add the personalMessage prefix before relaying the request to the signer. Parity Signer, Ledger and TestRPC add the prefix themselves, Metamask expects it to have already been added. (#349)
## v0.30.2 - _January 28, 2018_
* Add Rinkeby testnet addresses to artifacts (#337)
* Move @0xproject/types to dependencies from devDependencies fixing missing type errors
## v0.30.1 - _January 23, 2018_
* Fix a bug allowing negative fill values (#212)
* Fix a bug that made it impossible to pass a custom ZRX address (#341)
## v0.30.0 - _January 16, 2018_
* Add an error parameter to the order watcher callback (#312)
* Fix a bug making it impossible to catch some errors from awaitTransactionMinedAsync (#312)
* Fix a bug in fillOrdersUpTo validation making it impossible to fill up to if user doesn't have enough balance to fully fill all the orders (#321)
## v0.29.1 - _January 10, 2018_
* Fixed bignumber config issue #301 (#305)
## v0.29.0 - _December 27, 2017_
* Assert baseUnit amount supplied to `toUnitAmount` is integer amount. (#287)
* `toBaseUnitAmount` throws if amount supplied has too many decimals (#287)
## v0.28.0 - _December 19, 2017_
* Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken` (#267)
* Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry` (#267)
* Removed `etherTokenContractAddress` from `ZeroEx` constructor arg `ZeroExConfig` (#267)
* Rename `SubscriptionOpts` to `BlockRange` (#272)
* Add `zeroEx.etherToken.subscribe`, `zeroEx.etherToken.unsubscribe`, `zeroEx.etherToken.unsubscribeAll` (#277)
* Add `zeroEx.etherToken.getLogsAsync` (#277)
* Add new public types `BlockParamLiteral`, `EtherTokenEvents`, `EtherTokenContractEventArgs`, `DepositContractEventArgs`, `WithdrawalContractEventArgs` (#277)
* Support `Deposit` and `Withdraw` events on etherToken (#277)
* Improve the error message when taker is not a string (#278)
## v0.27.1 - _November 27, 2017_
* Export `TransactionOpts` type
## v0.27.0 - _November 27, 2017_
* Make `ZeroExConfig` required parameter of `ZeroEx` constructor (#233)
* Add a required property `networkId` to `ZeroExConfig` (#233)
* Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync (#233)
* Remove `ZeroExError.ContractNotFound` and replace it with contract-specific errors (#233)
* Make `DecodedLogEvent<A>` contain `LogWithDecodedArgs<A>` under log key instead of merging it in like web3 does (#234)
* Rename `removed` to `isRemoved` in `DecodedLogEvent<A>` (#234)
* Add config allowing to specify gasPrice and gasLimit for every transaction sending method (#235)
* All transaction sending methods now call `estimateGas` if no gas amount was supplied (#235)
* Modify order validation methods to validate against the `latest` block, not against the `pending` block (#236)
## v0.26.0 - _November 20, 2017_
* Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers (#231)
* Remove support for Async callback types when used in Subscribe functions (#222)
* In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different (#225)
## v0.25.1 - _November 12, 2017_
* Standardise on Cancelled over Canceled (#217)
* Add missing `DecodedLogEvent` type to exported types (#205)
* Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction. (#200)
## v0.23.0 - _November 11, 2017_
* Fixed unhandled promise rejection error in subscribe methods (#209)
* Subscribe callbacks now receive an error object as their first argument
## v0.22.6 - _November 9, 2017_
* Add a timeout parameter to transaction awaiting (#206)
## v0.22.5 - _November 6, 2017_
* Re-publish v0.22.4 to fix publishing issue
## v0.22.4 - _October 24, 2017_
* Upgraded bignumber.js to a new version that ships with native typings
## v0.22.3 - _October 24, 2017_
* Fixed an issue with new version of testrpc and unlimited proxy allowance (#199)
## v0.22.2 - _October 23, 2017_
* Fixed rounding of maker fill amount and incorrect validation of partial fees (#197)
## v0.22.0 - _October 15, 2017_
* Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill` (#187)
* Removed `OrderFillOrKillRequest` (#187)
## v0.21.4 - _October 12, 2017_
* Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type (#194)
## v0.21.3 - _October 11, 2017_
* Fixed a bug causing order fills to throw `INSUFFICIENT_TAKER_ALLOWANCE` (#193)
## v0.21.2 - _October 10, 2017_
* Exported `ContractEventArg` as a public type (#190)
## v0.21.1 - _October 10, 2017_
* Fixed a bug in subscriptions (#189)
## v0.21.0 - _October 9, 2017_
* Complete rewrite of subscription logic (#182)
* Subscriptions no longer return historical logs. If you want them - use `getLogsAsync`
* Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood
* Subscriptions correctly handle block re-orgs (forks)
* Subscriptions correctly backfill logs (connection problems)
* They no longer setup filters on the underlying nodes, so you can use them with infura without a filter Subprovider
* Removed `ContractEventEmitter` and added `LogEvent`
* Renamed `zeroEx.token.subscribeAsync` to `zeroEx.token.subscribe`
* Added `zeroEx.token.unsubscribe` and `zeroEx.exchange.unsubscribe`
* Renamed `zeroEx.exchange.stopWatchingAllEventsAsync` to `zeroEx.exhange.unsubscribeAll`
* Renamed `zeroEx.token.stopWatchingAllEventsAsync` to `zeroEx.token.unsubscribeAll`
* Fixed the batch fills validation by emulating all balance & proxy allowance changes (#185)
## v0.20.0 - _October 4, 2017_
* Add `zeroEx.token.getLogsAsync` (#178)
* Add `zeroEx.exchange.getLogsAsync` (#178)
* Fixed fees validation when one of the tokens transferred is ZRX (#181)
## v0.19.0 - _September 28, 2017_
* Made order validation optional (#172)
* Added Ropsten testnet support (#173)
* Fixed a bug causing awaitTransactionMinedAsync to DDos backend nodes (#175)
## v0.18.0 - _September 25, 2017_
* Added `zeroEx.exchange.validateOrderFillableOrThrowAsync` to simplify orderbook pruning (#170)
## v0.17.0 - _September 25, 2017_
* Made `zeroEx.exchange.getZRXTokenAddressAsync` public (#171)
## v0.16.0 - _September 19, 2017_
* Added the ability to specify custom contract addresses to be used with 0x.js (#165)
* ZeroExConfig.exchangeContractAddress
* ZeroExConfig.tokenRegistryContractAddress
* ZeroExConfig.etherTokenContractAddress
* Added `zeroEx.tokenRegistry.getContractAddressAsync` (#165)
## v0.15.0 - _September 7, 2017_
* Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method (#161)
## v0.14.2 - _September 6, 2017_
* Fixed an issue with bignumber.js types not found (#160)
## v0.14.1 - _September 6, 2017_
* Fixed an issue with Artifact type not found (#159)
## v0.14.0 - _September 5, 2017_
* Added `zeroEx.exchange.throwLogErrorsAsErrors` method to public interface (#157)
* Fixed an issue with overlapping async intervals in `zeroEx.awaitTransactionMinedAsync` (#157)
* Fixed an issue with log decoder returning `BigNumber`s as `strings` (#157)
## v0.13.0 - _September 5, 2017_
* Made all the functions submitting transactions to the network to immediately return transaction hash (#151)
* Added `zeroEx.awaitTransactionMinedAsync` (#151)
* Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types (#151)
* Added signature validation to `validateFillOrderThrowIfInvalidAsync` (#152)
## v0.12.1 - _September 1, 2017_
* Added the support for web3@1.x.x provider (#142)
* Added the optional `zeroExConfig` parameter to the constructor of `ZeroEx` (#139)
* Added the ability to specify `gasPrice` when instantiating `ZeroEx` (#139)
## v0.11.0 - _August 23, 2017_
* Added `zeroEx.token.setUnlimitedProxyAllowanceAsync` (#137)
* Added `zeroEx.token.setUnlimitedAllowanceAsync` (#137)
* Added `zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS` (#137)
## v0.10.4 - _August 23, 2017_
* Fixed a bug where checksummed addresses were being pulled from artifacts and not lower-cased. (#135)
## v0.10.1 - _August 23, 2017_
* Added `zeroEx.exchange.validateFillOrderThrowIfInvalidAsync` (#128)
* Added `zeroEx.exchange.validateFillOrKillOrderThrowIfInvalidAsync` (#128)
* Added `zeroEx.exchange.validateCancelOrderThrowIfInvalidAsync` (#128)
* Added `zeroEx.exchange.isRoundingErrorAsync` (#128)
* Added `zeroEx.proxy.getContractAddressAsync` (#130)
* Added `zeroEx.tokenRegistry.getTokenAddressesAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenAddressBySymbolIfExistsAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenAddressByNameIfExistsAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync` (#132)
* Added `zeroEx.tokenRegistry.getTokenByNameIfExistsAsync` (#132)
* Added clear error message when checksummed address is passed to a public method (#124)
* Fixes the description of `shouldThrowOnInsufficientBalanceOrAllowance` in docs (#127)
## v0.9.3 - _August 21, 2017_
* Update contract artifacts to include latest Kovan and Mainnet deploys (#118)
## v0.9.2 - _August 20, 2017_
* *This version was unpublished because of a publishing issue.*
* Update contract artifacts to include latest Kovan and Mainnet deploys (#118)
## v0.9.1 - _August 15, 2017_
* Fixed the bug causing `zeroEx.token.getBalanceAsync()` to fail if no addresses available (#120)
## v0.9.0 - _July 25, 2017_
* Migrated to the new version of smart contracts (#101)
* Removed the ability to call methods on multiple authorized Exchange smart contracts (#106)
* Made `zeroEx.getOrderHashHex` a static method (#107)
* Cached `net_version` requests and invalidate the cache on calls to `setProvider` (#95)
* Renamed `zeroEx.exchange.batchCancelOrderAsync` to `zeroEx.exchange.batchCancelOrdersAsync`
* Renamed `zeroEx.exchange.batchFillOrderAsync` to `zeroEx.exchange.batchFillOrdersAsync`
* Updated to typescript v2.4 (#104)
* Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded (#109)
## v0.8.0 - _July 3, 2017_
* Added the ability to call methods on different authorized versions of the Exchange smart contract (#82)
* Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59)
* Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync` (#89)
* Added `zeroEx.token.subscribeAsync` (#90)
* Made contract invalidation functions private (#90)
* `zeroEx.token.invalidateContractInstancesAsync`
* `zeroEx.exchange.invalidateContractInstancesAsync`
* `zeroEx.proxy.invalidateContractInstance`
* `zeroEx.tokenRegistry.invalidateContractInstance`
* Fixed the bug where `zeroEx.setProviderAsync` didn't invalidate etherToken contract's instance
## v0.7.1 - _June 25, 2017_
* Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync` (#81)
## v0.7.0 - _June 21, 2017_
* Added Kovan smart contract artifacts (#78)
* Started returning fillAmount from `fillOrderAsync` and `fillUpToAsync` (#72)
* Started returning cancelledAmount from `cancelOrderAsync` (#72)
* Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs`
## v0.6.2 - _June 20, 2017_
* Reduced bundle size
* Improved documentation
## v0.6.1 - _June 18, 2017_
* Improved documentation
## v0.6.0 - _June 18, 2017_
* Made `ZeroEx` class accept `Web3Provider` instance instead of `Web3` instance
* Added types for contract event arguments
## v0.5.2 - _June 14, 2017_
* Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page
## v0.5.1 - _June 14, 2017_
* Added `postpublish` script to publish to Github Releases with assets.

95
packages/0x.js/README.md Normal file
View File

@@ -0,0 +1,95 @@
## 0x.js
A TypeScript/Javascript library for interacting with the 0x protocol.
### Read the [Documentation](https://0xproject.com/docs/0x.js).
## Installation
0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package.
#### CommonJS _(recommended)_:
**Install**
```bash
npm install 0x.js --save
```
**Import**
```javascript
import { ZeroEx } from '0x.js';
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
#### UMD:
**Install**
Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project.
**Import**
```html
<script type="text/javascript" src="0x.js"></script>
```
## Contributing
We strongly recommend that the community help us make improvements and determine the future direction of 0x protocol. To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=0x.js yarn build
```
Or continuously rebuild on change:
```bash
PKG=0x.js yarn watch
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

120
packages/0x.js/package.json Normal file
View File

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

228
packages/0x.js/src/0x.ts Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

6
packages/0x.js/src/globals.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}

View File

@@ -0,0 +1,51 @@
export { ZeroEx } from './0x';
export {
BlockParamLiteral,
FilterObject,
BlockParam,
ContractEventArg,
ExchangeContractErrs,
LogWithDecodedArgs,
Order,
Provider,
SignedOrder,
ECSignature,
OrderStateValid,
OrderStateInvalid,
OrderState,
Token,
TransactionReceipt,
TransactionReceiptWithDecodedLogs,
} from '@0xproject/types';
export {
EventCallback,
ContractEvent,
IndexedFilterValues,
BlockRange,
OrderCancellationRequest,
OrderFillRequest,
ContractEventArgs,
MethodOpts,
OrderTransactionOpts,
TransactionOpts,
LogEvent,
DecodedLogEvent,
OnOrderStateChangeCallback,
ContractWrappersError,
EtherTokenContractEventArgs,
WithdrawalContractEventArgs,
DepositContractEventArgs,
EtherTokenEvents,
TransferContractEventArgs,
ApprovalContractEventArgs,
TokenContractEventArgs,
TokenEvents,
LogErrorContractEventArgs,
LogCancelContractEventArgs,
LogFillContractEventArgs,
ExchangeContractEventArgs,
ExchangeEvents,
ContractWrappersConfig,
} from '@0xproject/contract-wrappers';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,4 @@
export const constants = {
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
RPC_HOST: 'localhost',
RPC_PORT: 8545,
TESTRPC_NETWORK_ID: 50,
KOVAN_RPC_URL: 'https://kovan.0xproject.com',
};

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,10 @@
import * as chai from 'chai';
import * as dirtyChai from 'dirty-chai';
import ChaiBigNumber = require('chai-bignumber');
import chaiAsPromised = require('chai-as-promised');
import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
configure() {
configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -7,10 +7,10 @@ const path = require('path');
const production = process.env.NODE_ENV === 'production';
let entry = {
'index': './src/index.ts',
index: './src/index.ts',
};
if (production) {
entry = _.assign({}, entry, {'index.min': './src/index.ts'});
entry = _.assign({}, entry, { 'index.min': './src/index.ts' });
}
module.exports = {

View File

@@ -0,0 +1,6 @@
.*
yarn-error.log
/src/
/scripts/
tsconfig.json
/lib/monorepo_scripts/

View File

@@ -0,0 +1,139 @@
[
{
"version": "0.3.0",
"changes": [
{
"note": "Properly export the executable binary",
"pr": 588
}
],
"timestamp": 1527008270
},
{
"timestamp": 1525477860,
"version": "0.2.13",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1525428773,
"version": "0.2.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1524044013,
"version": "0.2.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1523462196,
"version": "0.2.10",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1522673609,
"version": "0.2.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1522658513,
"version": "0.2.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.2.5",
"changes": [
{
"note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package",
"pr": 452
}
],
"timestamp": 1521298800
},
{
"version": "0.2.4",
"changes": [
{
"note":
"Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3`",
"pr": 413
},
{
"note":
"Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types)",
"pr": 413
},
{
"note": "Add `hasReturnValue` to context data",
"pr": 413
}
],
"timestamp": 1520089200
},
{
"version": "0.2.1",
"changes": [
{
"note": "Fix publishing issue where .npmignore was not properly excluding undesired content",
"pr": 389
}
],
"timestamp": 1518102000
},
{
"version": "0.2.0",
"changes": [
{
"note": "Added CLI options for explicit specifying location of partials and main template",
"pr": 346
},
{
"note":
"Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts",
"pr": 388
}
],
"timestamp": 1517929200
},
{
"version": "0.1.0",
"changes": [
{
"note": "Fixed array typings with union types",
"pr": 295
},
{
"note": "Add event ABIs to context data passed to templates",
"pr": 302
},
{
"note": "Add constructor ABIs to context data passed to templates",
"pr": 304
}
],
"timestamp": 1515596400
}
]

View File

@@ -0,0 +1,59 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v0.3.0 - _May 22, 2018_
* Properly export the executable binary (#588)
## v0.2.13 - _May 4, 2018_
* Dependencies updated
## v0.2.12 - _May 4, 2018_
* Dependencies updated
## v0.2.11 - _April 18, 2018_
* Dependencies updated
## v0.2.10 - _April 11, 2018_
* Dependencies updated
## v0.2.9 - _April 2, 2018_
* Dependencies updated
## v0.2.8 - _April 2, 2018_
* Dependencies updated
## v0.2.5 - _March 17, 2018_
* Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452)
## v0.2.4 - _March 3, 2018_
* Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3` (#413)
* Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types) (#413)
* Add `hasReturnValue` to context data (#413)
## v0.2.1 - _February 8, 2018_
* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
## v0.2.0 - _February 6, 2018_
* Added CLI options for explicit specifying location of partials and main template (#346)
* Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts (#388)
## v0.1.0 - _January 10, 2018_
* Fixed array typings with union types (#295)
* Add event ABIs to context data passed to templates (#302)
* Add constructor ABIs to context data passed to templates (#304)

104
packages/abi-gen/README.md Normal file
View File

@@ -0,0 +1,104 @@
# ABI Gen
This package allows you to generate TypeScript contract wrappers from ABI files.
It's heavily inspired by [Geth abigen](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) but takes a different approach.
You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions.
[Here](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/contract_templates) are the templates used to generate the contract wrappers used by 0x.js.e
## Installation
`yarn add -g @0xproject/abi-gen`
## Usage
```
abi-gen
Options:
--help Show help [boolean]
--version Show version number [boolean]
--abis Glob pattern to search for ABI JSON files
[string] [required]
--output, -o, --out Folder where to put the output files [string] [required]
--partials Glob pattern for the partial template files [string]
--template Path for the main template file that will be used to
generate each contract [string] [required]
--backend The backing Ethereum library your app uses. Either 'web3'
or 'ethers'. Ethers auto-converts small ints to numbers
whereas Web3 doesn't.
[string] [choices: "web3", "ethers"] [default: "web3"]
--network-id ID of the network where contract ABIs are nested in
artifacts [number] [default: 50]
```
You're required to pass a [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) template where your abi files are located.
TL;DR - here is the example from 0x.js.
`--abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry).json`
We could've just used `--abis 'src/artifacts/*.json` but we wanted to exclude some of the abi files.
The abi file should be either a [Truffle](http://truffleframework.com/) contract artifact (a JSON object with an abi key) or a JSON abi array.
You need to also specify the location of your main template used for every contract `--template` as well as the partial templates `--partials` that can later be used from the main one.
## How to write custom templates?
The best way to get started is to copy [0x.js templates](https://github.com/0xProject/0x-monorepo/tree/development/packages/contract_templates) and start adjusting them for your needs.
We use [handlebars](http://handlebarsjs.com/) template engine under the hood.
You need to have a master template called `contract.mustache`. it will be used to generate each contract wrapper. Although - you don't need and probably shouldn't write all your logic in a single template file. You can write [partial templates](http://handlebarsjs.com/partials.html) and as long as they are within a partials folder - they will be registered and available.
## Which data/context do I get in my templates?
For now you don't get much on top of methods abi, some useful helpers and a contract name because it was enough for our use-case, but if you need something else - create a PR.
See the [type definition](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen/src/types.ts) of what we pass to the render method.
## Output files
Output files will be generated within an output folder with names converted to camel case and taken from abi file names. If you already have some files in that folder they will be overwritten.
## Contributing
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=@0xproject/abi-gen yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0xproject/abi-gen yarn watch
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```

View File

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

View File

@@ -0,0 +1,59 @@
{
"name": "@0xproject/abi-gen",
"version": "0.3.0",
"engines": {
"node": ">=6.12"
},
"description": "Generate contract wrappers from ABI and handlebars templates",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"watch_without_deps": "tsc -w",
"lint": "tslint --project .",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"bin": {
"abi-gen": "bin/abi-gen.js"
},
"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/README.md",
"dependencies": {
"@0xproject/typescript-typings": "^0.3.2",
"@0xproject/utils": "^0.6.2",
"ethereum-types": "^0.0.1",
"chalk": "^2.3.0",
"glob": "^7.1.2",
"handlebars": "^4.0.11",
"lodash": "^4.17.4",
"mkdirp": "^0.5.1",
"to-snake-case": "^1.0.0",
"yargs": "^10.0.3"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.20",
"@0xproject/tslint-config": "^0.4.18",
"@types/glob": "^5.0.33",
"@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1",
"@types/node": "^8.0.53",
"@types/yargs": "^10.0.0",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1"
},
"publishConfig": {
"access": "public"
}
}

6
packages/abi-gen/src/globals.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}

View File

@@ -0,0 +1,156 @@
#!/usr/bin/env node
import { abiUtils, logUtils } from '@0xproject/utils';
import chalk from 'chalk';
import { AbiDefinition, ConstructorAbi, EventAbi, MethodAbi } from 'ethereum-types';
import * as fs from 'fs';
import { sync as globSync } from 'glob';
import * as Handlebars from 'handlebars';
import * as _ from 'lodash';
import * as mkdirp from 'mkdirp';
import * as yargs from 'yargs';
import toSnakeCase = require('to-snake-case');
import { ContextData, ContractsBackend, ParamKind } from './types';
import { utils } from './utils';
const ABI_TYPE_CONSTRUCTOR = 'constructor';
const ABI_TYPE_METHOD = 'function';
const ABI_TYPE_EVENT = 'event';
const DEFAULT_NETWORK_ID = 50;
const DEFAULT_BACKEND = 'web3';
const args = yargs
.option('abis', {
describe: 'Glob pattern to search for ABI JSON files',
type: 'string',
demandOption: true,
})
.option('output', {
alias: ['o', 'out'],
describe: 'Folder where to put the output files',
type: 'string',
normalize: true,
demandOption: true,
})
.option('partials', {
describe: 'Glob pattern for the partial template files',
type: 'string',
implies: 'template',
})
.option('template', {
describe: 'Path for the main template file that will be used to generate each contract',
type: 'string',
demandOption: true,
normalize: true,
})
.option('backend', {
describe: `The backing Ethereum library your app uses. Either 'web3' or 'ethers'. Ethers auto-converts small ints to numbers whereas Web3 doesn't.`,
type: 'string',
choices: [ContractsBackend.Web3, ContractsBackend.Ethers],
default: DEFAULT_BACKEND,
})
.option('network-id', {
describe: 'ID of the network where contract ABIs are nested in artifacts',
type: 'number',
default: DEFAULT_NETWORK_ID,
})
.example(
"$0 --abis 'src/artifacts/**/*.json' --out 'src/contracts/generated/' --partials 'src/templates/partials/**/*.handlebars' --template 'src/templates/contract.handlebars'",
'Full usage example',
).argv;
function registerPartials(partialsGlob: string): void {
const partialTemplateFileNames = globSync(partialsGlob);
logUtils.log(`Found ${chalk.green(`${partialTemplateFileNames.length}`)} ${chalk.bold('partial')} templates`);
for (const partialTemplateFileName of partialTemplateFileNames) {
const namedContent = utils.getNamedContent(partialTemplateFileName);
Handlebars.registerPartial(namedContent.name, namedContent.content);
}
}
function writeOutputFile(name: string, renderedTsCode: string): void {
let fileName = toSnakeCase(name);
if (fileName === 'z_r_x_token') {
fileName = 'zrx_token';
}
const filePath = `${args.output}/${fileName}.ts`;
fs.writeFileSync(filePath, renderedTsCode);
logUtils.log(`Created: ${chalk.bold(filePath)}`);
}
Handlebars.registerHelper('parameterType', utils.solTypeToTsType.bind(utils, ParamKind.Input, args.backend));
Handlebars.registerHelper('returnType', utils.solTypeToTsType.bind(utils, ParamKind.Output, args.backend));
if (args.partials) {
registerPartials(args.partials);
}
const mainTemplate = utils.getNamedContent(args.template);
const template = Handlebars.compile<ContextData>(mainTemplate.content);
const abiFileNames = globSync(args.abis);
if (_.isEmpty(abiFileNames)) {
logUtils.log(`${chalk.red(`No ABI files found.`)}`);
logUtils.log(`Please make sure you've passed the correct folder name and that the files have
${chalk.bold('*.json')} extensions`);
process.exit(1);
} else {
logUtils.log(`Found ${chalk.green(`${abiFileNames.length}`)} ${chalk.bold('ABI')} files`);
mkdirp.sync(args.output);
}
for (const abiFileName of abiFileNames) {
const namedContent = utils.getNamedContent(abiFileName);
logUtils.log(`Processing: ${chalk.bold(namedContent.name)}...`);
const parsedContent = JSON.parse(namedContent.content);
let ABI;
if (_.isArray(parsedContent)) {
ABI = parsedContent; // ABI file
} else if (!_.isUndefined(parsedContent.abi)) {
ABI = parsedContent.abi; // Truffle artifact
} else if (!_.isUndefined(parsedContent.compilerOutput.abi)) {
ABI = parsedContent.compilerOutput.abi; // 0x artifact
}
if (_.isUndefined(ABI)) {
logUtils.log(`${chalk.red(`ABI not found in ${abiFileName}.`)}`);
logUtils.log(
`Please make sure your ABI file is either an array with ABI entries or a truffle artifact or 0x sol-compiler artifact`,
);
process.exit(1);
}
let ctor = ABI.find((abi: AbiDefinition) => abi.type === ABI_TYPE_CONSTRUCTOR) as ConstructorAbi;
if (_.isUndefined(ctor)) {
ctor = utils.getEmptyConstructor(); // The constructor exists, but it's implicit in JSON's ABI definition
}
const methodAbis = ABI.filter((abi: AbiDefinition) => abi.type === ABI_TYPE_METHOD) as MethodAbi[];
const sanitizedMethodAbis = abiUtils.renameOverloadedMethods(methodAbis) as MethodAbi[];
const methodsData = _.map(methodAbis, (methodAbi, methodAbiIndex: number) => {
_.forEach(methodAbi.inputs, (input, inputIndex: number) => {
if (_.isEmpty(input.name)) {
// Auto-generated getters don't have parameter names
input.name = `index_${inputIndex}`;
}
});
// This will make templates simpler
const methodData = {
...methodAbi,
singleReturnValue: methodAbi.outputs.length === 1,
hasReturnValue: methodAbi.outputs.length !== 0,
tsName: sanitizedMethodAbis[methodAbiIndex].name,
functionSignature: abiUtils.getFunctionSignature(methodAbi),
};
return methodData;
});
const eventAbis = ABI.filter((abi: AbiDefinition) => abi.type === ABI_TYPE_EVENT) as EventAbi[];
const contextData = {
contractName: namedContent.name,
ctor,
methods: methodsData,
events: eventAbis,
};
const renderedTsCode = template(contextData);
writeOutputFile(namedContent.name, renderedTsCode);
}

View File

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

View File

@@ -0,0 +1,24 @@
import { EventAbi, MethodAbi } from 'ethereum-types';
export enum ParamKind {
Input = 'input',
Output = 'output',
}
export enum ContractsBackend {
Web3 = 'web3',
Ethers = 'ethers',
}
export interface Method extends MethodAbi {
singleReturnValue: boolean;
hasReturnValue: boolean;
tsName: string;
functionSignature: string;
}
export interface ContextData {
contractName: string;
methods: Method[];
events: EventAbi[];
}

View File

@@ -0,0 +1,95 @@
import { AbiType, ConstructorAbi, DataItem } from 'ethereum-types';
import * as fs from 'fs';
import * as _ from 'lodash';
import * as path from 'path';
import { ContractsBackend, ParamKind } from './types';
export const utils = {
solTypeToTsType(paramKind: ParamKind, backend: ContractsBackend, solType: string, components?: DataItem[]): string {
const trailingArrayRegex = /\[\d*\]$/;
if (solType.match(trailingArrayRegex)) {
const arrayItemSolType = solType.replace(trailingArrayRegex, '');
const arrayItemTsType = utils.solTypeToTsType(paramKind, backend, arrayItemSolType, components);
const arrayTsType =
utils.isUnionType(arrayItemTsType) || utils.isObjectType(arrayItemTsType)
? `Array<${arrayItemTsType}>`
: `${arrayItemTsType}[]`;
return arrayTsType;
} else {
const solTypeRegexToTsType = [
{ regex: '^string$', tsType: 'string' },
{ regex: '^address$', tsType: 'string' },
{ regex: '^bool$', tsType: 'boolean' },
{ regex: '^u?int\\d*$', tsType: 'BigNumber' },
{ regex: '^bytes\\d*$', tsType: 'string' },
];
if (paramKind === ParamKind.Input) {
// web3 and ethers allow to pass those as numbers instead of bignumbers
solTypeRegexToTsType.unshift({
regex: '^u?int(8|16|32)?$',
tsType: 'number|BigNumber',
});
}
if (backend === ContractsBackend.Ethers && paramKind === ParamKind.Output) {
// ethers-contracts automatically converts small BigNumbers to numbers
solTypeRegexToTsType.unshift({
regex: '^u?int(8|16|32|48)?$',
tsType: 'number',
});
}
for (const regexAndTxType of solTypeRegexToTsType) {
const { regex, tsType } = regexAndTxType;
if (solType.match(regex)) {
return tsType;
}
}
const TUPLE_TYPE_REGEX = '^tuple$';
if (solType.match(TUPLE_TYPE_REGEX)) {
const componentsType = _.map(components, component => {
const componentValueType = utils.solTypeToTsType(
paramKind,
backend,
component.type,
component.components,
);
const componentType = `${component.name}: ${componentValueType}`;
return componentType;
});
const tsType = `{${componentsType.join(';')}}`;
return tsType;
}
throw new Error(`Unknown Solidity type found: ${solType}`);
}
},
isUnionType(tsType: string): boolean {
return tsType === 'number|BigNumber';
},
isObjectType(tsType: string): boolean {
return /^{.*}$/.test(tsType);
},
getPartialNameFromFileName(filename: string): string {
const name = path.parse(filename).name;
return name;
},
getNamedContent(filename: string): { name: string; content: string } {
const name = utils.getPartialNameFromFileName(filename);
try {
const content = fs.readFileSync(filename).toString();
return {
name,
content,
};
} catch (err) {
throw new Error(`Failed to read ${filename}: ${err}`);
}
},
getEmptyConstructor(): ConstructorAbi {
return {
type: AbiType.Constructor,
stateMutability: 'nonpayable',
payable: false,
inputs: [],
};
},
};

View File

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

View File

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

View File

@@ -0,0 +1,7 @@
.*
yarn-error.log
/src/
/scripts/
test/
tsconfig.json
/lib/src/monorepo_scripts/

View File

@@ -0,0 +1,112 @@
[
{
"timestamp": 1527008270,
"version": "0.2.10",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1525477860,
"version": "0.2.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1525428773,
"version": "0.2.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1524044013,
"version": "0.2.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1523462196,
"version": "0.2.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1522673609,
"version": "0.2.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1522658513,
"version": "0.2.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.2.0",
"changes": [
{
"note": "Rename `isHttpUrl` to `isWebUri`",
"pr": 412
}
],
"timestamp": 1520434800
},
{
"version": "0.1.0",
"changes": [
{
"note": "Remove isETHAddressHex checksum address check and assume address will be lowercased ",
"pr": 373
},
{
"note": "Add an optional parameter `subSchemas` to `doesConformToSchema` method",
"pr": 385
}
],
"timestamp": 1520089200
},
{
"version": "0.0.18",
"changes": [
{
"note": "Fix publishing issue where .npmignore was not properly excluding undesired content",
"pr": 389
}
],
"timestamp": 1486566000
},
{
"version": "0.0.4",
"changes": [
{
"note": "Re-publish Assert previously published under NPM package @0xproject/0x-assert"
},
{
"note":
"Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals."
}
],
"timestamp": 1510585200
}
]

View File

@@ -0,0 +1,52 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v0.2.10 - _May 22, 2018_
* Dependencies updated
## v0.2.9 - _May 4, 2018_
* Dependencies updated
## v0.2.8 - _May 4, 2018_
* Dependencies updated
## v0.2.7 - _April 18, 2018_
* Dependencies updated
## v0.2.6 - _April 11, 2018_
* Dependencies updated
## v0.2.5 - _April 2, 2018_
* Dependencies updated
## v0.2.4 - _April 2, 2018_
* Dependencies updated
## v0.2.0 - _March 7, 2018_
* Rename `isHttpUrl` to `isWebUri` (#412)
## v0.1.0 - _March 3, 2018_
* Remove isETHAddressHex checksum address check and assume address will be lowercased (#373)
* Add an optional parameter `subSchemas` to `doesConformToSchema` method (#385)
## v0.0.18 - _February 8, 2017_
* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
## v0.0.4 - _November 13, 2017_
* Re-publish Assert previously published under NPM package @0xproject/0x-assert
* Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals.

77
packages/assert/README.md Normal file
View File

@@ -0,0 +1,77 @@
## @0xproject/assert
Standard type and schema assertions to be used across all 0x projects and packages
## Installation
```bash
yarn add @0xproject/assert
```
## Usage
```typescript
import { assert } from '@0xproject/assert';
assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount);
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Contributing
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=@0xproject/assert yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0xproject/assert yarn watch
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

View File

@@ -0,0 +1,60 @@
{
"name": "@0xproject/assert",
"version": "0.2.10",
"engines": {
"node": ">=6.12"
},
"description": "Provides a standard way of performing type and schema validation across 0x projects",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
"watch_without_deps": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib test_temp scripts",
"lint": "tslint --project .",
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
"prepublishOnly": "run-p build",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.20",
"@0xproject/tslint-config": "^0.4.18",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
"chai": "^4.0.1",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/json-schemas": "0.7.22",
"@0xproject/typescript-typings": "^0.3.2",
"@0xproject/utils": "^0.6.2",
"lodash": "^4.17.4",
"valid-url": "^1.0.9"
},
"publishConfig": {
"access": "public"
}
}

6
packages/assert/src/globals.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}

View File

@@ -1,36 +1,46 @@
import { Schema, SchemaValidator } from '@0xproject/json-schemas';
import { addressUtils, BigNumber } from '@0xproject/utils';
import * as _ from 'lodash';
import * as BigNumber from 'bignumber.js';
import * as Web3 from 'web3';
import {Web3Wrapper} from '../web3_wrapper';
import {SchemaValidator} from './schema_validator';
import * as validUrl from 'valid-url';
const HEX_REGEX = /^0x[0-9A-F]*$/i;
export const assert = {
isBigNumber(variableName: string, value: BigNumber.BigNumber): void {
const isBigNumber = _.isObject(value) && value.isBigNumber;
isBigNumber(variableName: string, value: BigNumber): void {
const isBigNumber = _.isObject(value) && (value as any).isBigNumber;
this.assert(isBigNumber, this.typeAssertionMessage(variableName, 'BigNumber', value));
},
isUndefined(value: any, variableName?: string): void {
this.assert(_.isUndefined(value), this.typeAssertionMessage(variableName, 'undefined', value));
isValidBaseUnitAmount(variableName: string, value: BigNumber): void {
assert.isBigNumber(variableName, value);
const isNegative = value.lessThan(0);
this.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`);
const hasDecimals = value.decimalPlaces() !== 0;
this.assert(
!hasDecimals,
`${variableName} should be in baseUnits (no decimals), found value: ${value.toNumber()}`,
);
},
isString(variableName: string, value: string): void {
this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value));
},
isHexString(variableName: string, value: string): void {
this.assert(_.isString(value) && HEX_REGEX.test(value),
this.typeAssertionMessage(variableName, 'HexString', value));
isFunction(variableName: string, value: any): void {
this.assert(_.isFunction(value), this.typeAssertionMessage(variableName, 'function', value));
},
isETHAddressHex(variableName: string, value: string): void {
const web3 = new Web3();
this.assert(web3.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value));
isHexString(variableName: string, value: string): void {
this.assert(
web3.isAddress(value) && !web3.isChecksumAddress(value),
`Checksummed addresses are not supported. Convert ${variableName} to lower case before passing`,
_.isString(value) && HEX_REGEX.test(value),
this.typeAssertionMessage(variableName, 'HexString', value),
);
},
doesBelongToStringEnum(variableName: string, value: string,
stringEnum: any /* There is no base type for every string enum */): void {
isETHAddressHex(variableName: string, value: string): void {
this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value));
this.assert(addressUtils.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value));
},
doesBelongToStringEnum(
variableName: string,
value: string,
stringEnum: any /* There is no base type for every string enum */,
): void {
const doesBelongToStringEnum = !_.isUndefined(stringEnum[value]);
const enumValues = _.keys(stringEnum);
const enumValuesAsStrings = _.map(enumValues, enumValue => `'${enumValue}'`);
@@ -40,18 +50,6 @@ export const assert = {
`Expected ${variableName} to be one of: ${enumValuesAsString}, encountered: ${value}`,
);
},
async isSenderAddressAsync(variableName: string, senderAddressHex: string,
web3Wrapper: Web3Wrapper): Promise<void> {
assert.isETHAddressHex(variableName, senderAddressHex);
const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddressHex);
assert.assert(isSenderAddressAvailable,
`Specified ${variableName} ${senderAddressHex} isn't available through the supplied web3 provider`,
);
},
async isUserAddressAvailableAsync(web3Wrapper: Web3Wrapper): Promise<void> {
const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
this.assert(!_.isEmpty(availableAddresses), 'No addresses were available on the provided web3 provider');
},
hasAtMostOneUniqueValue(value: any[], errMsg: string): void {
this.assert(_.uniq(value).length <= 1, errMsg);
},
@@ -61,8 +59,18 @@ export const assert = {
isBoolean(variableName: string, value: boolean): void {
this.assert(_.isBoolean(value), this.typeAssertionMessage(variableName, 'boolean', value));
},
doesConformToSchema(variableName: string, value: any, schema: Schema): void {
isWeb3Provider(variableName: string, value: any): void {
const isWeb3Provider = _.isFunction(value.send) || _.isFunction(value.sendAsync);
this.assert(isWeb3Provider, this.typeAssertionMessage(variableName, 'Provider', value));
},
doesConformToSchema(variableName: string, value: any, schema: Schema, subSchemas?: Schema[]): void {
if (_.isUndefined(value)) {
throw new Error(`${variableName} can't be undefined`);
}
const schemaValidator = new SchemaValidator();
if (!_.isUndefined(subSchemas)) {
_.map(subSchemas, schemaValidator.addSchema.bind(schemaValidator));
}
const validationResult = schemaValidator.validate(value, schema);
const hasValidationErrors = validationResult.errors.length > 0;
const msg = `Expected ${variableName} to conform to schema ${schema.id}
@@ -70,6 +78,14 @@ Encountered: ${JSON.stringify(value, null, '\t')}
Validation errors: ${validationResult.errors.join(', ')}`;
this.assert(!hasValidationErrors, msg);
},
isWebUri(variableName: string, value: any): void {
const isValidUrl = !_.isUndefined(validUrl.isWebUri(value));
this.assert(isValidUrl, this.typeAssertionMessage(variableName, 'web uri', value));
},
isUri(variableName: string, value: any): void {
const isValidUri = !_.isUndefined(validUrl.isUri(value));
this.assert(isValidUri, this.typeAssertionMessage(variableName, 'uri', value));
},
assert(condition: boolean, message: string): void {
if (!condition) {
throw new Error(message);

View File

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

View File

@@ -0,0 +1,256 @@
import { schemas } from '@0xproject/json-schemas';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import * as dirtyChai from 'dirty-chai';
import 'make-promises-safe';
import 'mocha';
import { assert } from '../src/index';
chai.config.includeStack = true;
chai.use(dirtyChai);
const expect = chai.expect;
// tslint:disable:custom-no-magic-numbers
describe('Assertions', () => {
const variableName = 'variable';
describe('#isBigNumber', () => {
it('should not throw for valid input', () => {
const validInputs = [new BigNumber(23), new BigNumber('45')];
validInputs.forEach(input => expect(assert.isBigNumber.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = ['test', 42, false, { random: 'test' }, undefined];
invalidInputs.forEach(input => expect(assert.isBigNumber.bind(assert, variableName, input)).to.throw());
});
});
describe('#isValidBaseUnitAmount', () => {
it('should not throw for valid input', () => {
const validInputs = [new BigNumber(23), new BigNumber('45000000')];
validInputs.forEach(input =>
expect(assert.isValidBaseUnitAmount.bind(assert, variableName, input)).to.not.throw(),
);
});
it('should throw for invalid input', () => {
const invalidInputs = [0, undefined, new BigNumber(3.145), 3.145, new BigNumber(-400)];
invalidInputs.forEach(input =>
expect(assert.isValidBaseUnitAmount.bind(assert, variableName, input)).to.throw(),
);
});
});
describe('#isString', () => {
it('should not throw for valid input', () => {
const validInputs = ['hello', 'goodbye'];
validInputs.forEach(input => expect(assert.isString.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = [42, false, { random: 'test' }, undefined, new BigNumber(45)];
invalidInputs.forEach(input => expect(assert.isString.bind(assert, variableName, input)).to.throw());
});
});
describe('#isFunction', () => {
it('should not throw for valid input', () => {
const validInputs = [BigNumber, assert.isString];
validInputs.forEach(input => expect(assert.isFunction.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = [42, false, { random: 'test' }, undefined, new BigNumber(45)];
invalidInputs.forEach(input => expect(assert.isFunction.bind(assert, variableName, input)).to.throw());
});
});
describe('#isHexString', () => {
it('should not throw for valid input', () => {
const validInputs = [
'0x61a3ed31B43c8780e905a260a35faefEc527be7516aa11c0256729b5b351bc33',
'0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
];
validInputs.forEach(input => expect(assert.isHexString.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = [
42,
false,
{ random: 'test' },
undefined,
new BigNumber(45),
'0x61a3ed31B43c8780e905a260a35faYfEc527be7516aa11c0256729b5b351bc33',
];
invalidInputs.forEach(input => expect(assert.isHexString.bind(assert, variableName, input)).to.throw());
});
});
describe('#isETHAddressHex', () => {
it('should not throw for valid input', () => {
const validInputs = [
'0x0000000000000000000000000000000000000000',
'0x6fffd0ae3f7d88c9b4925323f54c6e4b2918c5fd',
'0x12459c951127e0c374ff9105dda097662a027093',
];
validInputs.forEach(input =>
expect(assert.isETHAddressHex.bind(assert, variableName, input)).to.not.throw(),
);
});
it('should throw for invalid input', () => {
const invalidInputs = [
42,
false,
{ random: 'test' },
undefined,
new BigNumber(45),
'0x6FFFd0ae3f7d88c9b4925323f54c6e4b2918c5fd',
'0x6FFFd0ae3f7d88c9b4925323f54c6e4',
];
invalidInputs.forEach(input => expect(assert.isETHAddressHex.bind(assert, variableName, input)).to.throw());
});
});
describe('#doesBelongToStringEnum', () => {
enum TestEnums {
Test1 = 'Test1',
Test2 = 'Test2',
}
it('should not throw for valid input', () => {
const validInputs = [TestEnums.Test1, TestEnums.Test2];
validInputs.forEach(input =>
expect(assert.doesBelongToStringEnum.bind(assert, variableName, input, TestEnums)).to.not.throw(),
);
});
it('should throw for invalid input', () => {
const invalidInputs = [42, false, { random: 'test' }, undefined, new BigNumber(45)];
invalidInputs.forEach(input =>
expect(assert.doesBelongToStringEnum.bind(assert, variableName, input, TestEnums)).to.throw(),
);
});
});
describe('#hasAtMostOneUniqueValue', () => {
const errorMsg = 'more than one unique value';
it('should not throw for valid input', () => {
const validInputs = [['hello'], ['goodbye', 'goodbye', 'goodbye']];
validInputs.forEach(input =>
expect(assert.hasAtMostOneUniqueValue.bind(assert, input, errorMsg)).to.not.throw(),
);
});
it('should throw for invalid input', () => {
const invalidInputs = [['hello', 'goodbye'], ['goodbye', 42, false, false]];
invalidInputs.forEach(input =>
expect(assert.hasAtMostOneUniqueValue.bind(assert, input, errorMsg)).to.throw(),
);
});
});
describe('#isNumber', () => {
it('should not throw for valid input', () => {
const validInputs = [42, 0, 21e42];
validInputs.forEach(input => expect(assert.isNumber.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = [false, { random: 'test' }, undefined, new BigNumber(45)];
invalidInputs.forEach(input => expect(assert.isNumber.bind(assert, variableName, input)).to.throw());
});
});
describe('#isBoolean', () => {
it('should not throw for valid input', () => {
const validInputs = [true, false];
validInputs.forEach(input => expect(assert.isBoolean.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = [42, { random: 'test' }, undefined, new BigNumber(45)];
invalidInputs.forEach(input => expect(assert.isBoolean.bind(assert, variableName, input)).to.throw());
});
});
describe('#isWeb3Provider', () => {
it('should not throw for valid input', () => {
const validInputs = [{ send: () => 45 }, { sendAsync: () => 45 }];
validInputs.forEach(input =>
expect(assert.isWeb3Provider.bind(assert, variableName, input)).to.not.throw(),
);
});
it('should throw for invalid input', () => {
const invalidInputs = [42, { random: 'test' }, undefined, new BigNumber(45)];
invalidInputs.forEach(input => expect(assert.isWeb3Provider.bind(assert, variableName, input)).to.throw());
});
});
describe('#doesConformToSchema', () => {
const schema = schemas.addressSchema;
it('should not throw for valid input', () => {
const validInputs = [
'0x6fffd0ae3f7d88c9b4925323f54c6e4b2918c5fd',
'0x12459c951127e0c374ff9105dda097662a027093',
];
validInputs.forEach(input =>
expect(assert.doesConformToSchema.bind(assert, variableName, input, schema)).to.not.throw(),
);
});
it('should throw for invalid input', () => {
const invalidInputs = [42, { random: 'test' }, undefined, new BigNumber(45)];
invalidInputs.forEach(input =>
expect(assert.doesConformToSchema.bind(assert, variableName, input, schema)).to.throw(),
);
});
});
describe('#isWebUri', () => {
it('should not throw for valid input', () => {
const validInputs = [
'http://www.google.com',
'https://api.example-relayer.net',
'https://api.radarrelay.com/0x/v0/',
'https://zeroex.beta.radarrelay.com:8000/0x/v0/',
];
validInputs.forEach(input => expect(assert.isWebUri.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = [
42,
{ random: 'test' },
undefined,
new BigNumber(45),
'ws://www.api.example-relayer.net',
'www.google.com',
'api.example-relayer.net',
'user:password@api.example-relayer.net',
'//api.example-relayer.net',
];
invalidInputs.forEach(input => expect(assert.isWebUri.bind(assert, variableName, input)).to.throw());
});
});
describe('#isUri', () => {
it('should not throw for valid input', () => {
const validInputs = [
'http://www.google.com',
'https://api.example-relayer.net',
'https://api.radarrelay.com/0x/v0/',
'https://zeroex.beta.radarrelay.com:8000/0x/v0/',
'ws://www.api.example-relayer.net',
'wss://www.api.example-relayer.net',
'user:password@api.example-relayer.net',
];
validInputs.forEach(input => expect(assert.isUri.bind(assert, variableName, input)).to.not.throw());
});
it('should throw for invalid input', () => {
const invalidInputs = [
42,
{ random: 'test' },
undefined,
new BigNumber(45),
'www.google.com',
'api.example-relayer.net',
'//api.example-relayer.net',
];
invalidInputs.forEach(input => expect(assert.isUri.bind(assert, variableName, input)).to.throw());
});
});
describe('#assert', () => {
const assertMessage = 'assert not satisfied';
it('should not throw for valid input', () => {
expect(assert.assert.bind(assert, true, assertMessage)).to.not.throw();
});
it('should throw for invalid input', () => {
expect(assert.assert.bind(assert, false, assertMessage)).to.throw();
});
});
describe('#typeAssertionMessage', () => {
it('should render correct message', () => {
expect(assert.typeAssertionMessage('variable', 'string', 'number')).to.equal(
`Expected variable to be of type string, encountered: number`,
);
});
});
});
// tslint:enable:custom-no-magic-numbers

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
.*
yarn-error.log
/scripts/
/src/
tsconfig.json
/lib/monorepo_scripts/

View File

@@ -0,0 +1,85 @@
[
{
"timestamp": 1527008270,
"version": "0.3.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1525477860,
"version": "0.3.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.3.0",
"changes": [
{
"note": "Update ethers-contracts to ethers.js",
"pr": 540
}
],
"timestamp": 1525428773
},
{
"timestamp": 1524044013,
"version": "0.2.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.2.0",
"changes": [
{
"note": "Contract wrappers now accept Provider and defaults instead of Web3Wrapper",
"pr": 501
}
],
"timestamp": 1523462196
},
{
"version": "0.1.0",
"changes": [
{
"note": "Add tests for traversing ABI tree",
"pr": 485
},
{
"note": "Fix ABI tuples traversing",
"pr": 485
},
{
"note": "Fix ABI arrays traversing",
"pr": 485
}
],
"timestamp": 1522673609
},
{
"timestamp": 1522658513,
"version": "0.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.0.2",
"changes": [
{
"note": "Initial release"
}
],
"timestamp": 1520089200
}
]

View File

@@ -0,0 +1,40 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v0.3.2 - _May 22, 2018_
* Dependencies updated
## v0.3.1 - _May 4, 2018_
* Dependencies updated
## v0.3.0 - _May 4, 2018_
* Update ethers-contracts to ethers.js (#540)
## v0.2.1 - _April 18, 2018_
* Dependencies updated
## v0.2.0 - _April 11, 2018_
* Contract wrappers now accept Provider and defaults instead of Web3Wrapper (#501)
## v0.1.0 - _April 2, 2018_
* Add tests for traversing ABI tree (#485)
* Fix ABI tuples traversing (#485)
* Fix ABI arrays traversing (#485)
## v0.0.6 - _April 2, 2018_
* Dependencies updated
## v0.0.2 - _March 3, 2018_
* Initial release

View File

@@ -0,0 +1,63 @@
## @0xproject/base-contract
BaseContract to derive all auto-generated wrappers from
## Installation
```bash
yarn add @0xproject/base-contract
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Usage
```javascript
import { BaseContract } from '@0xproject/base-contract';
```
## Contributing
We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=@0xproject/base-contract yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0xproject/base-contract yarn watch
```
### Lint
```bash
yarn lint
```

View File

View File

@@ -0,0 +1,56 @@
{
"name": "@0xproject/base-contract",
"version": "0.3.2",
"engines": {
"node": ">=6.12"
},
"description": "0x Base TS contract",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
"watch_without_deps": "tsc -w",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
"test:circleci": "yarn test:coverage",
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"lint": "tslint --project . --exclude **/src/contract_wrappers/**/*",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md",
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.20",
"@0xproject/tslint-config": "^0.4.18",
"@types/lodash": "4.14.104",
"chai": "^4.0.1",
"copyfiles": "^1.2.0",
"make-promises-safe": "^1.1.0",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1"
},
"dependencies": {
"ethereum-types": "^0.0.1",
"@0xproject/typescript-typings": "^0.3.2",
"@0xproject/utils": "^0.6.2",
"@0xproject/web3-wrapper": "^0.6.4",
"ethers": "^3.0.15",
"lodash": "^4.17.4"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,6 @@
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}

View File

@@ -0,0 +1,127 @@
import { abiUtils, BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import {
AbiDefinition,
AbiType,
ConstructorAbi,
ContractAbi,
DataItem,
MethodAbi,
Provider,
TxData,
TxDataPayable,
} from 'ethereum-types';
import * as ethers from 'ethers';
import * as _ from 'lodash';
import { formatABIDataItem } from './utils';
export interface EthersInterfaceByFunctionSignature {
[key: string]: ethers.Interface;
}
export class BaseContract {
protected _ethersInterfacesByFunctionSignature: EthersInterfaceByFunctionSignature;
protected _web3Wrapper: Web3Wrapper;
public abi: ContractAbi;
public address: string;
public contractName: string;
public constructorArgs: any[] = [];
protected static _formatABIDataItemList(
abis: DataItem[],
values: any[],
formatter: (type: string, value: any) => any,
): any {
return _.map(values, (value: any, i: number) => formatABIDataItem(abis[i], value, formatter));
}
protected static _lowercaseAddress(type: string, value: string): string {
return type === 'address' ? value.toLowerCase() : value;
}
protected static _bigNumberToString(_type: string, value: any): any {
return _.isObject(value) && value.isBigNumber ? value.toString() : value;
}
protected static _lookupConstructorAbi(abi: ContractAbi): ConstructorAbi {
const constructorAbiIfExists = _.find(
abi,
(abiDefinition: AbiDefinition) => abiDefinition.type === AbiType.Constructor,
// tslint:disable-next-line:no-unnecessary-type-assertion
) as ConstructorAbi | undefined;
if (!_.isUndefined(constructorAbiIfExists)) {
return constructorAbiIfExists;
} else {
// If the constructor is not explicitly defined, it won't be included in the ABI. It is
// still callable however, so we construct what the ABI would look like were it to exist.
const defaultConstructorAbi: ConstructorAbi = {
type: AbiType.Constructor,
stateMutability: 'nonpayable',
payable: false,
inputs: [],
};
return defaultConstructorAbi;
}
}
protected static _bnToBigNumber(_type: string, value: any): any {
return _.isObject(value) && value._bn ? new BigNumber(value.toString()) : value;
}
protected static async _applyDefaultsToTxDataAsync<T extends Partial<TxData | TxDataPayable>>(
txData: T,
txDefaults: Partial<TxData>,
estimateGasAsync?: (txData: T) => Promise<number>,
): Promise<TxData> {
// Gas amount sourced with the following priorities:
// 1. Optional param passed in to public method call
// 2. Global config passed in at library instantiation
// 3. Gas estimate calculation + safety margin
const removeUndefinedProperties = _.pickBy;
const txDataWithDefaults: TxData = {
...removeUndefinedProperties(txDefaults),
...removeUndefinedProperties(txData as any),
// HACK: TS can't prove that T is spreadable.
// Awaiting https://github.com/Microsoft/TypeScript/pull/13288 to be merged
} as any;
if (_.isUndefined(txDataWithDefaults.gas) && !_.isUndefined(estimateGasAsync)) {
txDataWithDefaults.gas = await estimateGasAsync(txData);
}
return txDataWithDefaults;
}
protected _lookupEthersInterface(functionSignature: string): ethers.Interface {
const ethersInterface = this._ethersInterfacesByFunctionSignature[functionSignature];
if (_.isUndefined(ethersInterface)) {
throw new Error(`Failed to lookup method with function signature '${functionSignature}'`);
}
return ethersInterface;
}
protected _lookupAbi(functionSignature: string): MethodAbi {
const methodAbi = _.find(this.abi, (abiDefinition: AbiDefinition) => {
if (abiDefinition.type !== AbiType.Function) {
return false;
}
const abiFunctionSignature = abiUtils.getFunctionSignature(abiDefinition);
if (abiFunctionSignature === functionSignature) {
return true;
}
return false;
}) as MethodAbi;
return methodAbi;
}
constructor(
contractName: string,
abi: ContractAbi,
address: string,
provider: Provider,
txDefaults?: Partial<TxData>,
) {
this.contractName = contractName;
this._web3Wrapper = new Web3Wrapper(provider, txDefaults);
this.abi = abi;
this.address = address;
const methodAbis = this.abi.filter(
(abiDefinition: AbiDefinition) => abiDefinition.type === AbiType.Function,
) as MethodAbi[];
this._ethersInterfacesByFunctionSignature = {};
_.each(methodAbis, methodAbi => {
const functionSignature = abiUtils.getFunctionSignature(methodAbi);
this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.Interface([methodAbi]);
});
}
}

View File

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

View File

@@ -0,0 +1,25 @@
import { DataItem } from 'ethereum-types';
import * as _ from 'lodash';
// tslint:disable-next-line:completed-docs
export function formatABIDataItem(abi: DataItem, value: any, formatter: (type: string, value: any) => any): any {
const trailingArrayRegex = /\[\d*\]$/;
if (abi.type.match(trailingArrayRegex)) {
const arrayItemType = abi.type.replace(trailingArrayRegex, '');
return _.map(value, val => {
const arrayItemAbi = {
...abi,
type: arrayItemType,
};
return formatABIDataItem(arrayItemAbi, val, formatter);
});
} else if (abi.type === 'tuple') {
const formattedTuple: { [componentName: string]: DataItem } = {};
_.forEach(abi.components, componentABI => {
formattedTuple[componentABI.name] = formatABIDataItem(componentABI, value[componentABI.name], formatter);
});
return formattedTuple;
} else {
return formatter(abi.type, value);
}
}

View File

@@ -0,0 +1,109 @@
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import 'make-promises-safe';
import 'mocha';
import { formatABIDataItem } from '../src/utils';
const { expect } = chai;
describe('Utils tests', () => {
describe('#formatABIDataItem', () => {
it('correctly handles arrays', () => {
const calls: Array<{ type: string; value: any }> = [];
const abi = {
name: 'values',
type: 'uint256[]',
};
const val = [1, 2, 3];
const formatted = formatABIDataItem(abi, val, (type: string, value: any) => {
calls.push({ type, value });
return value; // no-op
});
expect(formatted).to.be.deep.equal(val);
expect(calls).to.be.deep.equal([
{ type: 'uint256', value: 1 },
{ type: 'uint256', value: 2 },
{ type: 'uint256', value: 3 },
]);
});
it('correctly handles tuples', () => {
const calls: Array<{ type: string; value: any }> = [];
const abi = {
components: [
{
name: 'to',
type: 'address',
},
{
name: 'amount',
type: 'uint256',
},
],
name: 'data',
type: 'tuple',
};
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
const val = { to: ZERO_ADDRESS, amount: new BigNumber(1) };
const formatted = formatABIDataItem(abi, val, (type: string, value: any) => {
calls.push({ type, value });
return value; // no-op
});
expect(formatted).to.be.deep.equal(val);
expect(calls).to.be.deep.equal([
{
type: 'address',
value: val.to,
},
{
type: 'uint256',
value: val.amount,
},
]);
});
it('correctly handles nested arrays of tuples', () => {
const calls: Array<{ type: string; value: any }> = [];
const abi = {
components: [
{
name: 'to',
type: 'address',
},
{
name: 'amount',
type: 'uint256',
},
],
name: 'data',
type: 'tuple[2][]',
};
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
const val = [
[{ to: ZERO_ADDRESS, amount: new BigNumber(1) }, { to: ZERO_ADDRESS, amount: new BigNumber(2) }],
];
const formatted = formatABIDataItem(abi, val, (type: string, value: any) => {
calls.push({ type, value });
return value; // no-op
});
expect(formatted).to.be.deep.equal(val);
expect(calls).to.be.deep.equal([
{
type: 'address',
value: val[0][0].to,
},
{
type: 'uint256',
value: val[0][0].amount,
},
{
type: 'address',
value: val[0][1].to,
},
{
type: 'uint256',
value: val[0][1].amount,
},
]);
});
});
});

View File

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

View File

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

View File

@@ -0,0 +1,8 @@
.*
yarn-error.log
/src/
/scripts/
/generated_docs/
test/
tsconfig.json
/lib/src/monorepo_scripts/

View File

@@ -0,0 +1,175 @@
[
{
"timestamp": 1527008270,
"version": "0.6.13",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1525477860,
"version": "0.6.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1525428773,
"version": "0.6.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1524044013,
"version": "0.6.10",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1523462196,
"version": "0.6.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1522673609,
"version": "0.6.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1522658513,
"version": "0.6.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.6.4",
"changes": [
{
"note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package",
"pr": 456
}
],
"timestamp": 1521298800
},
{
"version": "0.6.2",
"changes": [
{
"note": "Fix JSON parse empty response",
"pr": 407
}
],
"timestamp": 1518706800
},
{
"version": "0.6.0",
"changes": [
{
"note": "Add pagination options to HttpClient methods",
"pr": 393
},
{
"note": "Add heartbeat configuration to WebSocketOrderbookChannel constructor",
"pr": 406
}
],
"timestamp": 1518706800
},
{
"version": "0.5.7",
"changes": [
{
"note": "Fix publishing issue where .npmignore was not properly excluding undesired content",
"pr": 389
}
],
"timestamp": 1518102000
},
{
"version": "0.5.0",
"changes": [
{
"note": "Sanitize api endpoint url and remove trailing slashes",
"pr": 318
},
{
"note": "Improve error message text in HttpClient",
"pr": 318
},
{
"note": "Stop appending '/v0' to api endpoint url in HttpClient",
"pr": 318
}
],
"timestamp": 1516114800
},
{
"version": "0.4.0",
"changes": [
{
"note": "Prevent getFeesAsync method on HttpClient from mutating input",
"pr": 296
}
],
"timestamp": 1515596400
},
{
"version": "0.3.0",
"changes": [
{
"note": "Expose WebSocketOrderbookChannel and associated types to public interface",
"pr": 251
},
{
"note": "Remove tokenA and tokenB fields from OrdersRequest",
"pr": 256
}
],
"timestamp": 1512658800
},
{
"version": "0.2.0",
"changes": [
{
"note": "Add SignedOrder and TokenTradeInfo to the public interface"
},
{
"note": "Add ECSignature and Order to the public interface"
},
{
"note": "Remove dependency on 0x.js"
}
],
"timestamp": 1511881200
},
{
"version": "0.1.0",
"changes": [
{
"note": "Provide a HttpClient class for interacting with standard relayer api compliant HTTP urls"
}
],
"timestamp": 1511276400
}
]

View File

@@ -0,0 +1,76 @@
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v0.6.13 - _May 22, 2018_
* Dependencies updated
## v0.6.12 - _May 4, 2018_
* Dependencies updated
## v0.6.11 - _May 4, 2018_
* Dependencies updated
## v0.6.10 - _April 18, 2018_
* Dependencies updated
## v0.6.9 - _April 11, 2018_
* Dependencies updated
## v0.6.8 - _April 2, 2018_
* Dependencies updated
## v0.6.7 - _April 2, 2018_
* Dependencies updated
## v0.6.4 - _March 17, 2018_
* Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package (#456)
## v0.6.2 - _February 15, 2018_
* Fix JSON parse empty response (#407)
## v0.6.0 - _February 15, 2018_
* Add pagination options to HttpClient methods (#393)
* Add heartbeat configuration to WebSocketOrderbookChannel constructor (#406)
## v0.5.7 - _February 8, 2018_
* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
## v0.5.0 - _January 16, 2018_
* Sanitize api endpoint url and remove trailing slashes (#318)
* Improve error message text in HttpClient (#318)
* Stop appending '/v0' to api endpoint url in HttpClient (#318)
## v0.4.0 - _January 10, 2018_
* Prevent getFeesAsync method on HttpClient from mutating input (#296)
## v0.3.0 - _December 7, 2017_
* Expose WebSocketOrderbookChannel and associated types to public interface (#251)
* Remove tokenA and tokenB fields from OrdersRequest (#256)
## v0.2.0 - _November 28, 2017_
* Add SignedOrder and TokenTradeInfo to the public interface
* Add ECSignature and Order to the public interface
* Remove dependency on 0x.js
## v0.1.0 - _November 21, 2017_
* Provide a HttpClient class for interacting with standard relayer api compliant HTTP urls

View File

@@ -0,0 +1,74 @@
## @0xproject/connect
This repository contains a Javascript library that makes it easy to interact with Relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)
## Installation
```bash
yarn add @0xproject/connect
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Usage
* [Docs](https://0xproject.com/docs/connect)
* [Tutorials](https://0xproject.com/wiki#connect)
## Contributing
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
PKG=@0xproject/connect yarn build
```
Or continuously rebuild on change:
```bash
PKG=@0xproject/connect yarn watch
```
### Clean
```bash
yarn clean
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

View File

@@ -0,0 +1,90 @@
{
"name": "@0xproject/connect",
"version": "0.6.13",
"engines": {
"node": ">=6.12"
},
"description": "A javascript library for interacting with the standard relayer api",
"keywords": [
"connect",
"0xproject",
"ethereum",
"tokens",
"exchange"
],
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
"watch_without_deps": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib test_temp scripts",
"copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures",
"lint": "tslint --project .",
"run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit",
"test": "run-s copy_test_fixtures run_mocha",
"rebuild_and_test": "run-s clean build test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
"docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
"config": {
"postpublish": {
"assets": [],
"docPublishConfigs": {
"s3BucketPath": "s3://doc-jsons/connect/",
"s3StagingBucketPath": "s3://staging-doc-jsons/connect/"
}
}
},
"repository": {
"type": "git",
"url": "https://github.com/0xProject/0x-monorepo.git"
},
"author": "Brandon Millman",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
"dependencies": {
"@0xproject/assert": "^0.2.10",
"@0xproject/json-schemas": "0.7.22",
"@0xproject/types": "^0.7.0",
"@0xproject/typescript-typings": "^0.3.2",
"@0xproject/utils": "^0.6.2",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",
"query-string": "^5.0.1",
"websocket": "^1.0.25"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.20",
"@0xproject/tslint-config": "^0.4.18",
"@types/fetch-mock": "^5.12.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/query-string": "^5.0.1",
"@types/websocket": "^0.0.34",
"async-child-process": "^1.1.1",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"fetch-mock": "^5.13.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typedoc": "~0.8.0",
"typescript": "2.7.1"
},
"publishConfig": {
"access": "public"
}
}

4
packages/connect/src/globals.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
declare module '*.json' {
const value: any;
export default value;
}

View File

@@ -0,0 +1,183 @@
import { assert } from '@0xproject/assert';
import { schemas } from '@0xproject/json-schemas';
import { SignedOrder } from '@0xproject/types';
import 'isomorphic-fetch';
import * as _ from 'lodash';
import * as queryString from 'query-string';
import { schemas as clientSchemas } from './schemas/schemas';
import {
Client,
FeesRequest,
FeesResponse,
HttpRequestOptions,
HttpRequestType,
OrderbookRequest,
OrderbookResponse,
OrdersRequestOpts,
PagedRequestOpts,
TokenPairsItem,
TokenPairsRequestOpts,
} from './types';
import { relayerResponseJsonParsers } from './utils/relayer_response_json_parsers';
const TRAILING_SLASHES_REGEX = /\/+$/;
const DEFAULT_PAGED_REQUEST_OPTS: PagedRequestOpts = {
page: 1,
perPage: 100,
};
/**
* This mapping defines how an option property name gets converted into an HTTP request query field
*/
const OPTS_TO_QUERY_FIELD_MAP = {
perPage: 'per_page',
};
/**
* This class includes all the functionality related to interacting with a set of HTTP endpoints
* that implement the standard relayer API v0
*/
export class HttpClient implements Client {
private _apiEndpointUrl: string;
/**
* Format parameters to be appended to http requests into query string form
*/
private static _buildQueryStringFromHttpParams(params?: object): string {
// if params are undefined or empty, return an empty string
if (_.isUndefined(params) || _.isEmpty(params)) {
return '';
}
// format params into a form the api expects
const formattedParams = _.mapKeys(params, (_value: any, key: string) => {
return _.get(OPTS_TO_QUERY_FIELD_MAP, key, key);
});
// stringify the formatted object
const stringifiedParams = queryString.stringify(formattedParams);
return `?${stringifiedParams}`;
}
/**
* Instantiates a new HttpClient instance
* @param url The relayer API base HTTP url you would like to interact with
* @return An instance of HttpClient
*/
constructor(url: string) {
assert.isWebUri('url', url);
this._apiEndpointUrl = url.replace(TRAILING_SLASHES_REGEX, ''); // remove trailing slashes
}
/**
* Retrieve token pair info from the API
* @param requestOpts Options specifying token information to retrieve and page information, defaults to { page: 1, perPage: 100 }
* @return The resulting TokenPairsItems that match the request
*/
public async getTokenPairsAsync(requestOpts?: TokenPairsRequestOpts & PagedRequestOpts): Promise<TokenPairsItem[]> {
if (!_.isUndefined(requestOpts)) {
assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.tokenPairsRequestOptsSchema);
assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema);
}
const httpRequestOpts = {
params: _.defaults({}, requestOpts, DEFAULT_PAGED_REQUEST_OPTS),
};
const responseJson = await this._requestAsync('/token_pairs', HttpRequestType.Get, httpRequestOpts);
const tokenPairs = relayerResponseJsonParsers.parseTokenPairsJson(responseJson);
return tokenPairs;
}
/**
* Retrieve orders from the API
* @param requestOpts Options specifying orders to retrieve and page information, defaults to { page: 1, perPage: 100 }
* @return The resulting SignedOrders that match the request
*/
public async getOrdersAsync(requestOpts?: OrdersRequestOpts & PagedRequestOpts): Promise<SignedOrder[]> {
if (!_.isUndefined(requestOpts)) {
assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.ordersRequestOptsSchema);
assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema);
}
const httpRequestOpts = {
params: _.defaults({}, requestOpts, DEFAULT_PAGED_REQUEST_OPTS),
};
const responseJson = await this._requestAsync(`/orders`, HttpRequestType.Get, httpRequestOpts);
const orders = relayerResponseJsonParsers.parseOrdersJson(responseJson);
return orders;
}
/**
* Retrieve a specific order from the API
* @param orderHash An orderHash generated from the desired order
* @return The SignedOrder that matches the supplied orderHash
*/
public async getOrderAsync(orderHash: string): Promise<SignedOrder> {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const responseJson = await this._requestAsync(`/order/${orderHash}`, HttpRequestType.Get);
const order = relayerResponseJsonParsers.parseOrderJson(responseJson);
return order;
}
/**
* Retrieve an orderbook from the API
* @param request An OrderbookRequest instance describing the specific orderbook to retrieve
* @param requestOpts Options specifying page information, defaults to { page: 1, perPage: 100 }
* @return The resulting OrderbookResponse that matches the request
*/
public async getOrderbookAsync(
request: OrderbookRequest,
requestOpts?: PagedRequestOpts,
): Promise<OrderbookResponse> {
assert.doesConformToSchema('request', request, clientSchemas.orderBookRequestSchema);
if (!_.isUndefined(requestOpts)) {
assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema);
}
const httpRequestOpts = {
params: _.defaults({}, request, requestOpts, DEFAULT_PAGED_REQUEST_OPTS),
};
const responseJson = await this._requestAsync('/orderbook', HttpRequestType.Get, httpRequestOpts);
const orderbook = relayerResponseJsonParsers.parseOrderbookResponseJson(responseJson);
return orderbook;
}
/**
* Retrieve fee information from the API
* @param request A FeesRequest instance describing the specific fees to retrieve
* @return The resulting FeesResponse that matches the request
*/
public async getFeesAsync(request: FeesRequest): Promise<FeesResponse> {
assert.doesConformToSchema('request', request, clientSchemas.feesRequestSchema);
const httpRequestOpts = {
payload: request,
};
const responseJson = await this._requestAsync('/fees', HttpRequestType.Post, httpRequestOpts);
const fees = relayerResponseJsonParsers.parseFeesResponseJson(responseJson);
return fees;
}
/**
* Submit a signed order to the API
* @param signedOrder A SignedOrder instance to submit
*/
public async submitOrderAsync(signedOrder: SignedOrder): Promise<void> {
assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema);
const requestOpts = {
payload: signedOrder,
};
await this._requestAsync('/order', HttpRequestType.Post, requestOpts);
}
private async _requestAsync(
path: string,
requestType: HttpRequestType,
requestOptions?: HttpRequestOptions,
): Promise<any> {
const params = _.get(requestOptions, 'params');
const payload = _.get(requestOptions, 'payload');
const query = HttpClient._buildQueryStringFromHttpParams(params);
const url = `${this._apiEndpointUrl}${path}${query}`;
const headers = new Headers({
'content-type': 'application/json',
});
const response = await fetch(url, {
method: requestType,
body: JSON.stringify(payload),
headers,
});
const text = await response.text();
if (!response.ok) {
const errorString = `${response.status} - ${response.statusText}\n${requestType} ${url}\n${text}`;
throw Error(errorString);
}
const result = !_.isEmpty(text) ? JSON.parse(text) : undefined;
return result;
}
}

View File

@@ -0,0 +1,20 @@
export { HttpClient } from './http_client';
export { WebSocketOrderbookChannel } from './ws_orderbook_channel';
export {
Client,
FeesRequest,
FeesResponse,
OrderbookChannel,
OrderbookChannelHandler,
OrderbookChannelSubscriptionOpts,
OrderbookRequest,
OrderbookResponse,
OrdersRequestOpts,
PagedRequestOpts,
TokenPairsItem,
TokenPairsRequestOpts,
TokenTradeInfo,
WebSocketOrderbookChannelConfig,
} from './types';
export { Order, SignedOrder } from '@0xproject/types';

View File

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

View File

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

View File

@@ -0,0 +1,26 @@
export const feesRequestSchema = {
id: '/FeesRequest',
type: 'object',
properties: {
exchangeContractAddress: { $ref: '/Address' },
maker: { $ref: '/Address' },
taker: { $ref: '/Address' },
makerTokenAddress: { $ref: '/Address' },
takerTokenAddress: { $ref: '/Address' },
makerTokenAmount: { $ref: '/Number' },
takerTokenAmount: { $ref: '/Number' },
expirationUnixTimestampSec: { $ref: '/Number' },
salt: { $ref: '/Number' },
},
required: [
'exchangeContractAddress',
'maker',
'taker',
'makerTokenAddress',
'takerTokenAddress',
'makerTokenAmount',
'takerTokenAmount',
'expirationUnixTimestampSec',
'salt',
],
};

View File

@@ -0,0 +1,9 @@
export const orderBookRequestSchema = {
id: '/OrderBookRequest',
type: 'object',
properties: {
baseTokenAddress: { $ref: '/Address' },
quoteTokenAddress: { $ref: '/Address' },
},
required: ['baseTokenAddress', 'quoteTokenAddress'],
};

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