Compare commits

..

147 Commits

Author SHA1 Message Date
xianny
f394d7dba9 Publish
- @0x/contracts-asset-proxy@2.2.5
 - @0x/contracts-coordinator@2.0.10
 - @0x/contracts-dev-utils@0.0.7
 - @0x/contracts-erc1155@1.1.12
 - @0x/contracts-erc20@2.2.11
 - @0x/contracts-erc721@2.1.12
 - @0x/contracts-exchange-forwarder@3.0.9
 - @0x/contracts-exchange-libs@3.0.5
 - @0x/contracts-exchange@2.1.11
 - @0x/contracts-extensions@4.0.5
 - @0x/contracts-multisig@3.1.11
 - @0x/contracts-test-utils@3.1.13
 - @0x/contracts-utils@3.2.1
 - 0x.js@6.0.15
 - @0x/abi-gen-templates@2.4.1
 - @0x/abi-gen-wrappers@5.2.0
 - @0x/abi-gen@4.1.0
 - @0x/assert@2.1.3
 - @0x/asset-buyer@6.1.11
 - @0x/asset-swapper@1.0.1
 - @0x/base-contract@5.3.1
 - @0x/connect@5.0.16
 - @0x/contract-addresses@3.0.3
 - @0x/contract-artifacts@2.0.4
 - @0x/contract-wrappers@11.0.0
 - @0x/contracts-gen@1.0.13
 - @0x/dev-utils@2.3.0
 - @0x/fill-scenarios@3.0.16
 - @0x/instant@1.0.28
 - @0x/json-schemas@3.1.13
 - @0x/migrations@4.2.0
 - @0x/monorepo-scripts@1.0.34
 - @0x/order-utils@8.2.5
 - @0x/order-watcher@4.0.17
 - @0x/python-contract-wrappers@1.0.3
 - @0x/sol-compiler@3.1.12
 - @0x/sol-coverage@3.0.9
 - @0x/sol-doc@2.0.16
 - @0x/sol-profiler@3.1.11
 - @0x/sol-trace@2.0.17
 - @0x/sol-tracing-utils@6.0.16
 - @0x/sra-spec@2.0.14
 - @0x/subproviders@5.0.1
 - @0x/testnet-faucets@1.0.84
 - @0x/utils@4.5.0
 - @0x/web3-wrapper@6.0.10
 - @0x/website@0.0.87
2019-08-08 13:58:46 -07:00
xianny
ca595cd8cf Updated CHANGELOGS 2019-08-08 13:58:30 -07:00
F. Eugene Aumson
ec807120c3 Migrate to Web3.py v5 (#2038)
* Install Py packages in dep. order, not in parallel

Install Python packages in dependency order, not in parallel.

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

* Fix python package dependency ordering...

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

* sra_client.py: reformat whitespace in doctest

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

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

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

* abi-gen/Py: doc contract method attributes

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

* sra_client.py: disable tests in CI

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

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

...except for the dummy tokens.

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

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

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

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

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

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

* sra_client.py: checksum address in doctest

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

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

* Update CHANGELOGs

* sra_client.py: make CHANGELOG be REVESE chrono.

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

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

- remove TransactionEncoder
- move TokenUtils to @0x/dev-utils
- detailed changes in #2040
2019-08-08 07:29:30 -07:00
F. Eugene Aumson
5ac7ff7084 Generate wrappers for all contracts (#2010)
* abi-gen/Py: fix return type for multi-val returns

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* contract_wrappers.py: include all contracts

* Update CHANGELOGs

* abi-gen: rename variable

* abi-gen: refine comments

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

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

* better formatting and persist generated docs as circleci build artifacts

* store artifacts properly

* hanging indent for method params
2019-08-06 14:24:08 -07:00
Jacob Evans
8cd99c5a40 Update Changelog 2019-08-06 17:26:49 +10:00
Jacob Evans
ad83312009 Update @0x/coordinator-server dependency 2019-08-06 09:50:10 +10:00
Jacob Evans
9e3b1fe333 Update to latest Coordinator Config 2019-08-06 09:45:41 +10:00
Jacob Evans
c3f42995f9 Update python addresses 2019-08-06 09:45:41 +10:00
Amir Bandeali
3d3a02c892 Add mainnet StaticCall and ERC1155Proxy addresses 2019-08-06 09:45:41 +10:00
Amir Bandeali
06bec227ad Add authorizedAddresses length check to MAP config tests 2019-08-06 09:45:40 +10:00
Amir Bandeali
5d7803323c Add script that tests deployed contract configs 2019-08-06 09:45:40 +10:00
Jacob Evans
4303f9a025 Add Ganache addresses to contract-addresses 2019-08-06 09:45:40 +10:00
Jacob Evans
fe4c5434fa Update migration 2019-08-06 09:45:40 +10:00
Amir Bandeali
9325bb70c5 Add testnet addresses 2019-08-06 09:45:39 +10:00
Amir Bandeali
b164557165 Add ERC1155Proxy and StaticCallProxy to build 2019-08-06 09:45:39 +10:00
Amir Bandeali
424f984ea8 Add ERC1155Proxy and StaticCallProxy artifacts 2019-08-06 09:45:39 +10:00
David Sun
78c704e3d1 Merge pull request #2032 from 0xProject/feature/asset-swapper/update-comments-info
Update comments for asset-swapper
2019-08-02 13:47:48 -07:00
Xianny
50f1a8fbd8 Add test for struct output in abi-gen (typescript) (#2028)
* add TS test for non-empty struct output
2019-08-02 13:34:19 -07:00
David Sun
0f90b7b5da Update comments for asset-swapper 2019-08-02 13:32:45 -07:00
David Sun
bec4384a5d Merge pull request #2030 from 0xProject/feature/website/change-credit-forms
Change modal contact form
2019-08-02 12:41:29 -07:00
David Sun
f361efae5a change modal contact form 2019-08-02 12:33:34 -07:00
Greg Hysz
76ca2116ab Merge pull request #2018 from 0xProject/feature/ContractWrappers/abiEncodeDecodeTxData
Decode Calldata + Return Values in Contract Wrappers
2019-08-02 09:51:01 +02:00
Greg Hysen
33d8646dc5 added start/end test comments to AbiGenDummy for consistency 2019-08-02 09:27:05 +02:00
F. Eugene Aumson
3cb5190bc6 Relax gas estimate expectation in Python doctest 2019-08-01 19:12:08 -04:00
Francesco Agosti
5bba06bef8 Merge pull request #2026 from 0xProject/feature/what_is_0x_video_embed
Add sandwich video to landing page
2019-08-01 14:27:30 -07:00
fragosti
dd3f672a35 Make video wider 2019-08-01 13:56:19 -07:00
fragosti
25ef3b8445 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/what_is_0x_video_embed 2019-08-01 13:43:33 -07:00
Greg Hysen
7eb2d290d8 Ran prettier 2019-08-01 20:25:19 +02:00
Greg Hysen
678762910b Fixed typo in callAsync.handlebars and updated expected output in abi-gen 2019-08-01 19:07:12 +02:00
Greg Hysen
da28a542c7 Added abi encoder test when bad selector is passed to method decoding 2019-08-01 19:07:12 +02:00
Greg Hysen
92602d33ad removed unnecessary fallback function from abi-gen tests 2019-08-01 19:07:12 +02:00
Greg Hysen
03f04f4bb3 Moved contract wrapper abi tests into abi-gen package 2019-08-01 19:07:12 +02:00
Greg Hysen
0d4dd5ff0d Appeased the linter 2019-08-01 19:05:22 +02:00
Greg Hysen
884864cc58 updated changelogs 2019-08-01 19:05:22 +02:00
Greg Hysen
7c199d83be updated expected output for abi-gen cli tests 2019-08-01 19:00:50 +02:00
Greg Hysen
5b4c29c4bb updated abi-gen-wrappers 2019-08-01 19:00:50 +02:00
Greg Hysen
f97ee80955 Added tests for strict decoding of method arguments 2019-08-01 19:00:50 +02:00
Greg Hysen
547322ae63 Do not allow allow reading beyond calldata 2019-08-01 19:00:50 +02:00
Greg Hysen
db74db622e Added getABIDecodedTransactionData and getABIDecodedReturnData to contract wrappers + test cases 2019-08-01 19:00:50 +02:00
F. Eugene Aumson
57318c0041 Python nested wrapper methods & estimate_gas (#1996)
* git rm unnecessary .gitkeep file

* After all Pytest runs, show short test summary

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

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

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

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

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

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

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

* contract_wrappers.py: make Base methods public

Changed some methods on BaseContractWrapper to be public.

* contract_wrappers.py: remove unused method

* contract_wrappers.py: extract method

* abi-gen/Py: inline method

* contract_wrappers.py: fix bug in call()

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

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

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

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

* abi-gen/Py: rename method

* contract_wrappers/Py: simplify web3 func handling

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

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

* contract_wrappers.py: inline method

Inline and remove method BaseContractWrapper.contract_instance().

* contract_wrappers.py: pass Validator to *Method

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

* abi-gen/Py: BaseContractWrapper -> ContractMethod

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

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

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

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

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

* abi-gen/Py: adjust whitespace

* contract_wrappers.py: inline method

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

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

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

* contract_wrappers.py: remove private_key support

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

* contract_wrappers.py: inline method

* contract_wrappers.py: rm unused member variables

* contract_wrappers.py: rm unnecessary instance var

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

* update CHANGELOG.json
2019-08-01 12:47:52 -04:00
fabioberger
4eb0767834 Update deps in private packages 2019-08-01 14:56:23 +02:00
fragosti
92bb7808ce Remove react-modal-video from website types 2019-07-31 17:50:21 -07:00
fragosti
abfe7d1613 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/what_is_0x_video_embed 2019-07-31 17:13:58 -07:00
fragosti
6c72239365 Remove react-modal-video as a dep and use the sass directly 2019-07-31 17:06:10 -07:00
fragosti
8001daad8c Fix linting errors 2019-07-31 16:40:39 -07:00
fragosti
73a38ab4f4 Add sandwich video to landing page 2019-07-31 15:15:55 -07:00
David Sun
281c207921 Publish
- @0x/contracts-asset-proxy@2.2.4
 - @0x/contracts-coordinator@2.0.9
 - @0x/contracts-dev-utils@0.0.6
 - @0x/contracts-exchange-forwarder@3.0.8
 - @0x/contracts-exchange@2.1.10
 - @0x/contracts-extensions@4.0.4
 - @0x/contracts-multisig@3.1.10
2019-07-31 14:14:47 -07:00
David Sun
ae531eef5f Updated CHANGELOGS 2019-07-31 14:14:35 -07:00
David Sun
d8b11238e6 reverted changelog for packages not published 2019-07-31 14:02:18 -07:00
David Sun
d36eb04ae8 Publish
- @0x/contracts-asset-proxy@2.2.4
 - @0x/contracts-coordinator@2.0.9
 - @0x/contracts-dev-utils@0.0.6
 - @0x/contracts-erc1155@1.1.11
 - @0x/contracts-erc20@2.2.10
 - @0x/contracts-erc721@2.1.11
 - @0x/contracts-exchange-forwarder@3.0.8
 - @0x/contracts-exchange-libs@3.0.4
 - @0x/contracts-exchange@2.1.10
 - @0x/contracts-extensions@4.0.4
 - @0x/contracts-multisig@3.1.10
 - @0x/contracts-test-utils@3.1.12
 - @0x/contracts-utils@3.2.0
 - 0x.js@6.0.14
 - @0x/abi-gen-templates@2.4.0
 - @0x/abi-gen-wrappers@5.1.0
 - @0x/abi-gen@3.1.2
 - @0x/assert@2.1.2
 - @0x/asset-buyer@6.1.10
 - @0x/asset-swapper@1.0.0
 - @0x/base-contract@5.3.0
 - @0x/connect@5.0.15
 - @0x/contract-artifacts@2.0.3
 - @0x/contract-wrappers@10.1.0
 - @0x/contracts-gen@1.0.12
 - @0x/dev-utils@2.2.6
 - @0x/fill-scenarios@3.0.15
 - @0x/json-schemas@3.1.12
 - @0x/migrations@4.1.11
 - @0x/order-utils@8.2.4
 - @0x/order-watcher@4.0.16
 - @0x/sol-compiler@3.1.11
 - @0x/sol-coverage@3.0.8
 - @0x/sol-doc@2.0.15
 - @0x/sol-profiler@3.1.10
 - @0x/sol-trace@2.0.16
 - @0x/sol-tracing-utils@6.0.15
 - @0x/sra-spec@2.0.13
 - @0x/subproviders@5.0.0
 - @0x/utils@4.4.2
 - @0x/web3-wrapper@6.0.9
2019-07-31 13:36:00 -07:00
David Sun
b97ba35279 Updated CHANGELOGS 2019-07-31 13:35:49 -07:00
David Sun
46efe92a72 Merge pull request #2025 from 0xProject/feature/asset-swapper/remove-react-deprecated
Removed react-docs from asset_swapper
2019-07-31 10:39:21 -07:00
David Sun
9cc27c7d1b Removed react-docs from asset_swapper 2019-07-31 10:14:31 -07:00
David Sun
7d3396f9c5 Merge pull request #2015 from 0xProject/feature/asset-swapper/bump-to-1.0.0
Version bump for asset-buyer and docs prep 1.0.0
2019-07-30 17:31:31 -07:00
David Sun
918ef13714 details 2019-07-30 16:48:46 -07:00
David Sun
9d12462893 updated comments in SwapQuoter 2019-07-30 12:25:58 -07:00
David Sun
ed44e16a95 prettier 2019-07-30 10:47:58 -07:00
Fabio B
dadab94644 Merge pull request #2004 from 0xProject/fix/githubDepsIssue
Fix react-highlight dep issue
2019-07-30 09:56:43 +02:00
David Sun
7ec232a470 bumped version and added to docs 2019-07-29 18:42:24 -07:00
David Sun
dc3569392c updated changelog 2019-07-29 17:07:16 -07:00
David Sun
11999cd407 Merge pull request #2011 from 0xProject/feature/asset-swapper/renaming-to
Asset swapper renaming to -> toAddress
2019-07-29 15:48:31 -07:00
David Sun
f786f8a7f6 renaming to -> toAddress 2019-07-29 14:43:51 -07:00
fabioberger
aab39e6ae0 Use explicit URL form for Github dependencies with commit hash to avoid Yarn caching issue 2019-07-29 22:40:31 +02:00
Fabio B
31d3968649 Merge pull request #1993 from 0xProject/remove/reactDocsAndReactShared
Remove react-docs and react-shared packages
2019-07-29 22:37:52 +02:00
David Sun
2cd0b01019 Merge pull request #2009 from 0xProject/feature/website/remove-zeip-vote-banner
Removed Banner
2019-07-29 11:29:32 -07:00
David Sun
a6bc0db896 removed banner 2019-07-29 11:24:47 -07:00
Greg Hysz
7cba95b523 Merge pull request #1995 from 0xProject/feature/ContractWrappers/decodeLogArgs
Decode log arguments in `awaitTransactionSuccessAsync`
2019-07-29 20:23:36 +02:00
David Sun
1b976130ce Merge pull request #1980 from 0xProject/feature/asset-swapper/add-test-coverage
Add test coverage for asset-swapper
2019-07-29 11:20:36 -07:00
David Sun
e9babc5a94 prettier + lint 2019-07-29 10:52:58 -07:00
David Sun
c8d0ff846c Finished up adding test coverage 2019-07-29 10:52:58 -07:00
David Sun
db1e9769d0 Fixed testing bug 2019-07-29 10:52:58 -07:00
David Sun
4b038b07ed changes for testing 2019-07-29 10:52:58 -07:00
David Sun
4c17c142f9 ground work for forwarder consumer 2019-07-29 10:52:58 -07:00
David Sun
65b2fa13ac added coverage for swap quote calculator 2019-07-29 10:52:58 -07:00
David Sun
c375199daa add affiliate fee utils tests 2019-07-29 10:52:58 -07:00
David Sun
805131cf1e add affiliate fee utils 2019-07-29 10:52:58 -07:00
Greg Hysen
6f64115561 Switched assignment of logDecodeDependenciesAbiOnly for readability and to pass linter 2019-07-29 17:51:56 +02:00
Greg Hysen
0aadb789a5 Fixed linter errors 2019-07-29 16:45:13 +02:00
Greg Hysen
26ee4d626c ran prettier on abi-gen-wrappers 2019-07-29 15:57:59 +02:00
Greg Hysen
a8939d3eda Updated expected typescript output for abi-gen cli tests 2019-07-29 12:28:28 +02:00
Greg Hysen
048e48b03a updated contract wrappers 2019-07-29 12:24:19 +02:00
Greg Hysen
c2f34baee0 Changed artifactDependencies/abiDependencies to logDecodeDependencies + removed lodash depency in contract wrappers 2019-07-29 12:19:35 +02:00
Greg Hysen
8961b476ef fixed typo in a test 2019-07-29 12:19:35 +02:00
Greg Hysen
58e08335b5 Added another test to show what happens when decoding both local and downstream events 2019-07-29 12:19:35 +02:00
Greg Hysen
ea8fc1d93f updated test output from abi-gen to account for changes to deployFrom0xArtifactAsync and deployAsync 2019-07-29 12:19:35 +02:00
Greg Hysen
2968dfb2ae Minor readability improvements 2019-07-29 12:14:37 +02:00
Greg Hysen
24783107ba Updated generated contract wrappers and ran linter 2019-07-29 12:11:58 +02:00
Greg Hysen
365c056b0f Added tests for for decoding log arguments when artifact dependencies are included/excluded 2019-07-29 12:11:02 +02:00
Greg Hysen
88a7d9cca8 Updated changelogs for deployFrom0xArtifactAsync interface change 2019-07-29 12:11:02 +02:00
Greg Hysen
d8cf9d54aa Updated all instances of deployFrom0xArtifactAsync 2019-07-29 12:07:28 +02:00
Greg Hysen
df746c5ff4 Decode log arguments in awaitTransactionSuccessAsync, when ABI is recognized. 2019-07-29 12:04:37 +02:00
Fabio B
aa29526ae4 Merge pull request #2003 from 0xProject/updateLodash
Update lodash
2019-07-29 00:57:16 +02:00
fabioberger
f0b5616aba Use more explicit URL dep pinning to avoid yarn cache issue with Github deps 2019-07-27 16:14:51 +02:00
fabioberger
2eca95df00 Fix version test 2019-07-27 15:35:39 +02:00
fabioberger
f560c2e66a stop exporting removed EthLightwalletSubprovider 2019-07-27 14:52:10 +02:00
fabioberger
5e19496e32 Update as many lodash deps to higher versions 2019-07-27 14:45:20 +02:00
fabioberger
aeadaba005 update publish-release fork again with updated inquirer dep 2019-07-27 14:41:46 +02:00
fabioberger
8dfda9ffdd Update publish-release fork to version with v4 lodash dep 2019-07-27 14:38:05 +02:00
fabioberger
91992bb034 Update ganache-core 2019-07-27 14:37:50 +02:00
fabioberger
34a93857a0 Remove eth-lighwallet subprovider 2019-07-27 14:34:10 +02:00
fabioberger
fbda096aa9 Fix linter errors 2019-07-27 14:13:20 +02:00
fabioberger
24a26aef70 Remove remaining references to react-shared 2019-07-27 14:13:20 +02:00
fabioberger
ec7f9d8a63 Remove react-shared package and fold it into website 2019-07-27 14:13:20 +02:00
fabioberger
cc7dec7a99 Move react-docs into website and delete it as a standalone package 2019-07-27 14:12:57 +02:00
Xianny
46384ce80d Allow generated wrappers to subscribe/unsubscribe to events (#1970)
* Define SubscriptionManager and instantiate in generated wrappers

* expose subscribe/unsubscribe in generated wrappers

* update changelogs

* use SubscriptionManager in `@0x/contract-wrappers`
2019-07-26 16:54:31 -07:00
F. Eugene Aumson
5aeb626045 abi-gen: skip run_mocha on OSX (#2002) 2019-07-26 13:28:32 -04:00
David Sun
d2a27f1a48 Merge pull request #1983 from 0xProject/feature/website/alex-towle
Adding Alex Towle to team page
2019-07-26 09:51:54 -07:00
Fabio B
f07c67202f Merge pull request #1999 from 0xProject/upgradeMocha
Update Mocha & Chokidar Deps
2019-07-26 18:39:54 +02:00
fabioberger
3a3658708a Get all Mocha's on same version and add typings to all packages 2019-07-26 18:05:57 +02:00
fabioberger
f3c5d19246 Update remaining handlebars of deps of deps 2019-07-26 17:42:59 +02:00
fabioberger
c66d8f202a Update Mocha 2019-07-26 17:38:44 +02:00
Fabio B
ec641c171d Merge pull request #1994 from 0xProject/fix/upgradeDeps
Update dependencies
2019-07-26 14:50:57 +02:00
David Sun
773d624365 Merge pull request #1997 from 0xProject/feature/asset-swapper/fix-changelog
Asset-swapper fix changelog
2019-07-25 15:18:18 -07:00
David Sun
25bd97a014 updated changelog 2019-07-25 14:49:34 -07:00
fabioberger
5dd9e28f72 Fix handlebar header callbacks now that the typings changed 2019-07-25 12:24:44 +02:00
fabioberger
cc1ef6f268 Update handlebars dep 2019-07-25 11:42:23 +02:00
fabioberger
967e361da3 Use https for all registry URLs 2019-07-25 11:40:13 +02:00
fabioberger
398097900c Fix test-publish CI test when no packages exist to publish 2019-07-25 11:30:55 +02:00
fabioberger
b86473f3c7 Update yarn.lock 2019-07-24 22:33:27 +02:00
fabioberger
3d361c6b4a Special-case if there are no packages to publish 2019-07-24 22:33:12 +02:00
fabioberger
3346024ea7 Upgrade lerna fork to fix test-publish failure 2019-07-24 22:20:09 +02:00
Fabio B
2fecf6c80b Merge pull request #1982 from 0xProject/fix/enableLerna2FAPrompt
publishing: prompt user for OTP
2019-07-24 20:27:24 +02:00
David Sun
183b4fb7ee Merge pull request #1988 from 0xProject/feature/asset-swapper/optimized-market-sell-output
Added optimization utils for asset-swapper exchange consumer
2019-07-24 11:09:15 -07:00
David Sun
0e2afc5dcb Merge pull request #1985 from 0xProject/feature/asset-swapper/update-changelog
Updated CHANGELOG.json for asset-swapper
2019-07-24 11:04:47 -07:00
David Sun
91aa716c07 prettier and lint 2019-07-24 10:46:22 -07:00
David Sun
9977626de0 Switched NULL_ADDRESS to NULL_BYTES 2019-07-24 10:46:22 -07:00
David Sun
8bb3fb5bb3 added optimization utils 2019-07-24 10:46:22 -07:00
David Sun
6d7adb277e prettier 2019-07-24 10:42:52 -07:00
fabioberger
fef1bd13b5 Add HACK comment about writing cdVersions to a file 2019-07-24 19:38:46 +02:00
fabioberger
910bba9976 Bump Lerna fork version to include change of cdVersions flag to file path and separator to | between package versions 2019-07-24 19:38:46 +02:00
fabioberger
cd2d756717 Use spawn instead of exec so we can intercept any 2FA requests and bubble them to the user 2019-07-24 19:38:46 +02:00
fabioberger
0a47d89963 Use spawn instead of exec so we can bubble up the OTP prompt since OTP is only valid for 30sec, and we might need several 2019-07-24 19:38:46 +02:00
fabioberger
65e5b09cd1 Fix outdated versions of monorepo dependencies 2019-07-24 19:23:05 +02:00
David Sun
97a8c6e5af Updated CHANGELOG.json 2019-07-23 10:27:55 -07:00
Chris Kalani
9d455b2bca Adding Alex Towle to team page 2019-07-23 16:19:27 +02:00
566 changed files with 58800 additions and 12857 deletions

View File

@@ -37,6 +37,8 @@ jobs:
path: ~/repo/packages/python-contract-wrappers/generated
- store_artifacts:
path: ~/repo/packages/abi-gen/test-cli/output
- store_artifacts:
path: ~/repo/packages/abi-gen-wrappers/generated_docs
build-website:
resource_class: medium+
docker:
@@ -180,12 +182,13 @@ jobs:
docker:
- image: circleci/python
- image: 0xorg/ganache-cli:2.2.2
- image: 0xorg/launch-kit-ci
- image: 0xorg/launch-kit-backend:74bcc39
environment:
RPC_URL: http://localhost:8545
NETWORK_ID: 50
WHITELIST_ALL_TOKENS: True
command: bash -c "until curl -sfd'{\"method\":\"net_listening\"}' http://localhost:8545 | grep true; do continue; done; forever ts/lib/index.js"
command: |
sh -c "until printf 'POST /\r\nContent-Length: 26\r\n\r\n{\"method\":\"net_listening\"}' | nc localhost 8545 | grep true; do continue; done; node_modules/.bin/forever ts/lib/index.js"
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
@@ -208,7 +211,7 @@ jobs:
- run:
command: |
cd python-packages
./parallel coverage run setup.py test
./parallel_without_sra_client coverage run setup.py test
./build_docs
- save_cache:
key: coverage-python-contract-addresses-{{ .Environment.CIRCLE_SHA1 }}

1
.gitattributes vendored
View File

@@ -4,4 +4,5 @@
*.svg linguist-generated=true
packages/contract-artifacts/artifacts/*json linguist-generated=true
packages/abi-gen-wrappers/src/generated-wrappers/*.ts linguist-generated=true
packages/contract-wrappers/src/generated-wrappers/*.ts linguist-generated=true

View File

@@ -22,9 +22,7 @@ contracts: ['contracts']
@0x/tslint-config: ['packages/tslint-config']
@0x/asset-buyer: ['packages/asset-buyer']
@0x/order-watcher: ['packages/order-watcher']
@0x/react-docs: ['packages/react-docs']
@0x/order-utils: ['packages/order-utils']
@0x/react-shared: ['packages/react-shared']
@0x/assert: ['packages/assert']
@0x/base-contract: ['packages/base-contract']
@0x/typescript-typings: ['packages/typescript-typings']

19
.gitignore vendored
View File

@@ -77,7 +77,6 @@ TODO.md
packages/website/public/bundle*
packages/dev-tools-pages/public/bundle*
packages/react-docs/example/public/bundle*
# server cli
packages/testnet-faucets/server/
@@ -115,6 +114,24 @@ contracts/exchange-forwarder/generated-wrappers/
contracts/dev-utils/generated-wrappers/
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/erc20_token/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/exchange/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/asset_proxy_owner/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/coordinator/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/coordinator_registry/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/dummy_erc20_token/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/dummy_erc721_token/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/dutch_auction/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/erc20_proxy/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/erc721_proxy/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/erc721_token/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/eth_balance_checker/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/forwarder/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/i_asset_proxy/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/i_validator/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/i_wallet/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/multi_asset_proxy/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/order_validator/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/weth9/__init__.py
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/zrx_token/__init__.py
# cli test output
packages/abi-gen/test-cli/output

View File

@@ -87,19 +87,17 @@ These packages are all under development. See [/contracts/README.md](/contracts/
#### Utilities
| Package | Version | Description |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom TSLint rules used by the 0x core team |
| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations |
| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages |
| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities |
| [`@0x/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0x/react-docs.svg)](https://www.npmjs.com/package/@0x/react-docs) | React documentation component for rendering TypeDoc & sol-doc generated JSON |
| [`@0x/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0x/react-shared.svg)](https://www.npmjs.com/package/@0x/react-shared) | 0x shared react components |
| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages |
| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x packages |
| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generator |
| Package | Version | Description |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom TSLint rules used by the 0x core team |
| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations |
| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages |
| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities |
| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages |
| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x packages |
| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generator |
#### Private Packages

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "2.2.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.2.4",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564607468
},
{
"timestamp": 1563957393,
"version": "2.2.3",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.2.5 - _August 8, 2019_
* Dependencies updated
## v2.2.4 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v2.2.3 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "2.2.3",
"version": "2.2.5",
"engines": {
"node": ">=6.12"
},
@@ -47,20 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,16 +69,16 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-erc1155": "^1.1.10",
"@0x/contracts-erc20": "^2.2.9",
"@0x/contracts-erc721": "^2.1.10",
"@0x/contracts-utils": "^3.1.10",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-erc1155": "^1.1.12",
"@0x/contracts-erc20": "^2.2.11",
"@0x/contracts-erc721": "^2.1.12",
"@0x/contracts-utils": "^3.2.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.11"

View File

@@ -37,6 +37,7 @@ describe('Authorizable', () => {
artifacts.MixinAuthorizable,
provider,
txDefaults,
artifacts,
);
});
beforeEach(async () => {

View File

@@ -23,7 +23,7 @@ import { LogWithDecodedArgs } from 'ethereum-types';
import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash';
import { ERC1155ProxyWrapper, ERC721ProxyContract } from '../src';
import { artifacts, ERC1155ProxyContract, ERC1155ProxyWrapper } from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -51,7 +51,7 @@ describe('ERC1155Proxy', () => {
let receiver: string;
let receiverContract: string;
// contracts & wrappers
let erc1155Proxy: ERC721ProxyContract;
let erc1155Proxy: ERC1155ProxyContract;
let erc1155Receiver: DummyERC1155ReceiverContract;
let erc1155ProxyWrapper: ERC1155ProxyWrapper;
let erc1155Contract: ERC1155MintableContract;
@@ -89,6 +89,7 @@ describe('ERC1155Proxy', () => {
erc1155Artifacts.DummyERC1155Receiver,
provider,
txDefaults,
artifacts,
);
receiverContract = erc1155Receiver.address;
await erc1155ProxyWrapper.setBalancesAndAllowancesAsync();

View File

@@ -31,6 +31,7 @@ import * as _ from 'lodash';
import {
artifacts,
ERC1155ProxyContract,
ERC1155ProxyWrapper,
ERC20ProxyContract,
ERC20Wrapper,
@@ -71,7 +72,7 @@ describe('Asset Transfer Proxies', () => {
let erc721AFromTokenId: BigNumber;
let erc721BFromTokenId: BigNumber;
let erc1155Proxy: ERC721ProxyContract;
let erc1155Proxy: ERC1155ProxyContract;
let erc1155ProxyWrapper: ERC1155ProxyWrapper;
let erc1155Contract: ERC1155MintableContract;
let erc1155Contract2: ERC1155MintableContract;
@@ -100,6 +101,7 @@ describe('Asset Transfer Proxies', () => {
artifacts.MultiAssetProxy,
provider,
txDefaults,
artifacts,
);
// Configure ERC20Proxy
@@ -172,6 +174,7 @@ describe('Asset Transfer Proxies', () => {
erc20Artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,
@@ -181,6 +184,7 @@ describe('Asset Transfer Proxies', () => {
erc20Artifacts.DummyMultipleReturnERC20Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,
@@ -223,6 +227,7 @@ describe('Asset Transfer Proxies', () => {
erc721Artifacts.DummyERC721Receiver,
provider,
txDefaults,
artifacts,
);
await erc721Wrapper.setBalancesAndAllowancesAsync();

View File

@@ -41,12 +41,14 @@ describe('StaticCallProxy', () => {
artifacts.StaticCallProxy,
provider,
txDefaults,
artifacts,
);
staticCallProxy = new IAssetProxyContract(staticCallProxyWithoutTransferFrom.address, provider, txDefaults);
staticCallTarget = await TestStaticCallTargetContract.deployFrom0xArtifactAsync(
artifacts.TestStaticCallTarget,
provider,
txDefaults,
artifacts,
);
});
beforeEach(async () => {

View File

@@ -54,6 +54,7 @@ export class ERC1155ProxyWrapper {
erc1155Artifacts.ERC1155Mintable,
this._provider,
txDefaults,
artifacts,
);
const erc1155Wrapper = new Erc1155Wrapper(erc1155Contract, this._provider, this._contractOwnerAddress);
this._dummyTokenWrappers.push(erc1155Wrapper);
@@ -69,6 +70,7 @@ export class ERC1155ProxyWrapper {
artifacts.ERC1155Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
return this._proxyContract;

View File

@@ -37,6 +37,7 @@ export class ERC20Wrapper {
erc20Artifacts.DummyERC20Token,
this._provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
decimals,
@@ -51,6 +52,7 @@ export class ERC20Wrapper {
artifacts.ERC20Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
return this._proxyContract;

View File

@@ -29,6 +29,7 @@ export class ERC721Wrapper {
erc721Artifacts.DummyERC721Token,
this._provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
),
@@ -41,6 +42,7 @@ export class ERC721Wrapper {
artifacts.ERC721Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
return this._proxyContract;

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "2.0.10",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.0.9",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564607468
},
{
"timestamp": 1563957393,
"version": "2.0.8",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.10 - _August 8, 2019_
* Dependencies updated
## v2.0.9 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v2.0.8 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-coordinator",
"version": "2.0.8",
"version": "2.0.10",
"engines": {
"node": ">=6.12"
},
@@ -47,20 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,17 +69,17 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-asset-proxy": "^2.2.3",
"@0x/contracts-erc20": "^2.2.9",
"@0x/contracts-exchange": "^2.1.9",
"@0x/contracts-exchange-libs": "^3.0.3",
"@0x/contracts-utils": "^3.1.10",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-asset-proxy": "^2.2.5",
"@0x/contracts-erc20": "^2.2.11",
"@0x/contracts-exchange": "^2.1.11",
"@0x/contracts-exchange-libs": "^3.0.5",
"@0x/contracts-utils": "^3.2.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.11"

View File

@@ -74,6 +74,7 @@ describe('Coordinator tests', () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
artifacts,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
@@ -91,6 +92,7 @@ describe('Coordinator tests', () => {
artifacts.Coordinator,
provider,
txDefaults,
artifacts,
exchange.address,
);

View File

@@ -25,6 +25,7 @@ describe('Libs tests', () => {
artifacts.Coordinator,
provider,
txDefaults,
artifacts,
exchangeAddress,
);
});

View File

@@ -44,6 +44,7 @@ describe('Mixins tests', () => {
artifacts.Coordinator,
provider,
txDefaults,
artifacts,
exchangeAddress,
);
const accounts = await web3Wrapper.getAvailableAddressesAsync();

View File

@@ -24,6 +24,7 @@ export class CoordinatorRegistryWrapper {
artifacts.CoordinatorRegistry,
this._provider,
txDefaults,
artifacts,
);
if (this._coordinatorRegistryContract === undefined) {
throw new Error(`Failed to deploy Coordinator Registry contract.`);

View File

@@ -1,4 +1,32 @@
[
{
"timestamp": 1565296576,
"version": "0.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1564607468,
"version": "0.0.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.0.5",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564604963
},
{
"timestamp": 1563957393,
"version": "0.0.5",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v0.0.7 - _August 8, 2019_
* Dependencies updated
## v0.0.6 - _July 31, 2019_
* Dependencies updated
## v0.0.5 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v0.0.5 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-dev-utils",
"version": "0.0.5",
"version": "0.0.7",
"engines": {
"node": ">=6.12"
},
@@ -47,21 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/dev-utils/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contract-wrappers": "^9.1.8",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -69,19 +69,19 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-asset-proxy": "^2.2.3",
"@0x/contracts-erc1155": "^1.1.10",
"@0x/contracts-erc20": "^2.2.9",
"@0x/contracts-erc721": "^2.1.10",
"@0x/contracts-exchange": "^2.1.9",
"@0x/contracts-exchange-libs": "^3.0.3",
"@0x/contracts-utils": "^3.1.10",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-asset-proxy": "^2.2.5",
"@0x/contracts-erc1155": "^1.1.12",
"@0x/contracts-erc20": "^2.2.11",
"@0x/contracts-erc721": "^2.1.12",
"@0x/contracts-exchange": "^2.1.11",
"@0x/contracts-exchange-libs": "^3.0.5",
"@0x/contracts-utils": "^3.2.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"ethereumjs-util": "^5.1.1"
},

View File

@@ -92,6 +92,7 @@ describe('LibAssetData', () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
artifacts,
constants.NULL_BYTES,
);
@@ -99,26 +100,31 @@ describe('LibAssetData', () => {
proxyArtifacts.ERC20Proxy,
provider,
txDefaults,
artifacts,
);
erc721Proxy = await ERC721ProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.ERC721Proxy,
provider,
txDefaults,
artifacts,
);
erc1155Proxy = await ERC1155ProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.ERC1155Proxy,
provider,
txDefaults,
artifacts,
);
multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.MultiAssetProxy,
provider,
txDefaults,
artifacts,
);
staticCallProxy = await StaticCallProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.StaticCallProxy,
provider,
txDefaults,
artifacts,
);
await exchange.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address);
@@ -131,6 +137,7 @@ describe('LibAssetData', () => {
artifacts.LibAssetData,
provider,
txDefaults,
artifacts,
exchange.address,
);
@@ -138,6 +145,7 @@ describe('LibAssetData', () => {
proxyArtifacts.TestStaticCallTarget,
provider,
txDefaults,
artifacts,
);
[tokenOwnerAddress] = await web3Wrapper.getAvailableAddressesAsync();
@@ -146,6 +154,7 @@ describe('LibAssetData', () => {
erc20Artifacts.DummyERC20Token,
provider,
txDefaults,
artifacts,
'Dummy',
'DUM',
new BigNumber(1),
@@ -156,6 +165,7 @@ describe('LibAssetData', () => {
erc721Artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
'Dummy',
'DUM',
);
@@ -172,6 +182,7 @@ describe('LibAssetData', () => {
erc1155Artifacts.ERC1155Mintable,
provider,
txDefaults,
artifacts,
);
const logDecoder = new LogDecoder(web3Wrapper, erc1155Artifacts);

View File

@@ -37,6 +37,7 @@ describe('LibTransactionDecoder', () => {
artifacts.LibTransactionDecoder,
provider,
txDefaults,
artifacts,
);
});
after(async () => {

View File

@@ -83,6 +83,7 @@ describe('OrderValidationUtils', () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
artifacts,
zrxAssetData,
);
@@ -90,6 +91,7 @@ describe('OrderValidationUtils', () => {
proxyArtifacts.MultiAssetProxy,
provider,
txDefaults,
artifacts,
);
const exchangeWrapper = new ExchangeWrapper(exchange, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
@@ -102,6 +104,7 @@ describe('OrderValidationUtils', () => {
artifacts.DevUtils,
provider,
txDefaults,
artifacts,
exchange.address,
zrxAssetData,
);

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "1.1.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.1.11",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564604963
},
{
"timestamp": 1563957393,
"version": "1.1.10",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.1.12 - _August 8, 2019_
* Dependencies updated
## v1.1.11 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v1.1.10 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc1155",
"version": "1.1.10",
"version": "1.1.12",
"engines": {
"node": ">=6.12"
},
@@ -47,19 +47,20 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -67,13 +68,13 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/contracts-utils": "^3.1.10",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/contracts-utils": "^3.2.1",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"lodash": "^4.17.11"
},

View File

@@ -60,11 +60,13 @@ describe('ERC1155Token', () => {
artifacts.ERC1155Mintable,
provider,
txDefaults,
artifacts,
);
erc1155Receiver = await DummyERC1155ReceiverContract.deployFrom0xArtifactAsync(
artifacts.DummyERC1155Receiver,
provider,
txDefaults,
artifacts,
);
receiver = erc1155Receiver.address;
// create wrapper & mint erc1155 tokens

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "2.2.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.2.10",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564604963
},
{
"timestamp": 1563957393,
"version": "2.2.9",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.2.11 - _August 8, 2019_
* Dependencies updated
## v2.2.10 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v2.2.9 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "2.2.9",
"version": "2.2.11",
"engines": {
"node": ">=6.12"
},
@@ -47,20 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,12 +69,12 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-utils": "^3.1.10",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-utils": "^3.2.1",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"lodash": "^4.17.11"
},

View File

@@ -37,6 +37,7 @@ describe('UnlimitedAllowanceToken', () => {
artifacts.DummyERC20Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,

View File

@@ -33,10 +33,15 @@ describe('EtherToken', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
account = accounts[0];
etherToken = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, {
gasPrice,
...txDefaults,
});
etherToken = await WETH9Contract.deployFrom0xArtifactAsync(
artifacts.WETH9,
provider,
{
gasPrice,
...txDefaults,
},
artifacts,
);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();

View File

@@ -26,7 +26,12 @@ describe('ZRXToken', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = accounts[0];
spender = accounts[1];
zrxToken = await ZRXTokenContract.deployFrom0xArtifactAsync(artifacts.ZRXToken, provider, txDefaults);
zrxToken = await ZRXTokenContract.deployFrom0xArtifactAsync(
artifacts.ZRXToken,
provider,
txDefaults,
artifacts,
);
MAX_UINT = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
});
beforeEach(async () => {

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "2.1.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.1.11",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564604963
},
{
"timestamp": 1563957393,
"version": "2.1.10",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.1.12 - _August 8, 2019_
* Dependencies updated
## v2.1.11 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v2.1.10 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc721",
"version": "2.1.10",
"version": "2.1.12",
"engines": {
"node": ">=6.12"
},
@@ -47,20 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,12 +69,12 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-utils": "^3.1.10",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-utils": "^3.2.1",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"lodash": "^4.17.11"
},

View File

@@ -48,6 +48,7 @@ describe('ERC721Token', () => {
artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
);
@@ -55,6 +56,7 @@ describe('ERC721Token', () => {
artifacts.DummyERC721Receiver,
provider,
txDefaults,
artifacts,
);
logDecoder = new LogDecoder(web3Wrapper, artifacts);
await web3Wrapper.awaitTransactionSuccessAsync(
@@ -176,6 +178,7 @@ describe('ERC721Token', () => {
artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
);
@@ -190,6 +193,7 @@ describe('ERC721Token', () => {
artifacts.InvalidERC721Receiver,
provider,
txDefaults,
artifacts,
);
const from = owner;
const to = invalidErc721Receiver.address;
@@ -237,6 +241,7 @@ describe('ERC721Token', () => {
artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
);
@@ -251,6 +256,7 @@ describe('ERC721Token', () => {
artifacts.InvalidERC721Receiver,
provider,
txDefaults,
artifacts,
);
const from = owner;
const to = invalidErc721Receiver.address;

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "3.0.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.0.8",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564607468
},
{
"timestamp": 1563957393,
"version": "3.0.7",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.9 - _August 8, 2019_
* Dependencies updated
## v3.0.8 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v3.0.7 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-forwarder",
"version": "3.0.7",
"version": "3.0.9",
"engines": {
"node": ">=6.12"
},
@@ -46,21 +46,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contract-wrappers": "^9.1.8",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,18 +68,18 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-asset-proxy": "^2.2.3",
"@0x/contracts-erc20": "^2.2.9",
"@0x/contracts-erc721": "^2.1.10",
"@0x/contracts-exchange": "^2.1.9",
"@0x/contracts-exchange-libs": "^3.0.3",
"@0x/contracts-utils": "^3.1.10",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-asset-proxy": "^2.2.5",
"@0x/contracts-erc20": "^2.2.11",
"@0x/contracts-erc721": "^2.1.12",
"@0x/contracts-exchange": "^2.1.11",
"@0x/contracts-exchange-libs": "^3.0.5",
"@0x/contracts-utils": "^3.2.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"lodash": "^4.17.11"
},

View File

@@ -32,6 +32,7 @@ const DECIMALS_DEFAULT = 18;
const MAX_WETH_FILL_PERCENTAGE = 95;
describe(ContractName.Forwarder, () => {
const dependencyArtifacts = { ...artifacts, ...erc20Artifacts, ...exchangeArtifacts };
let makerAddress: string;
let owner: string;
let takerAddress: string;
@@ -88,7 +89,12 @@ describe(ContractName.Forwarder, () => {
const erc721Balances = await erc721Wrapper.getBalancesAsync();
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(erc20Artifacts.WETH9, provider, txDefaults);
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(
erc20Artifacts.WETH9,
provider,
txDefaults,
dependencyArtifacts,
);
weth = new DummyERC20TokenContract(wethContract.address, provider);
erc20Wrapper.addDummyTokenContract(weth);
@@ -98,6 +104,7 @@ describe(ContractName.Forwarder, () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
dependencyArtifacts,
zrxAssetData,
);
exchangeWrapper = new ExchangeWrapper(exchangeInstance, provider);
@@ -131,6 +138,7 @@ describe(ContractName.Forwarder, () => {
artifacts.Forwarder,
provider,
txDefaults,
dependencyArtifacts,
exchangeInstance.address,
zrxAssetData,
wethAssetData,
@@ -169,6 +177,7 @@ describe(ContractName.Forwarder, () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
dependencyArtifacts,
zrxAssetData,
);
return expectContractCreationFailedAsync(
@@ -176,6 +185,7 @@ describe(ContractName.Forwarder, () => {
artifacts.Forwarder,
provider,
txDefaults,
dependencyArtifacts,
exchangeInstance.address,
zrxAssetData,
wethAssetData,

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "3.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.0.4",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564604963
},
{
"timestamp": 1563957393,
"version": "3.0.3",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.5 - _August 8, 2019_
* Dependencies updated
## v3.0.4 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v3.0.3 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-libs",
"version": "3.0.3",
"version": "3.0.5",
"engines": {
"node": ">=6.12"
},
@@ -47,20 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,13 +69,13 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-utils": "^3.1.10",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-utils": "^3.2.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"lodash": "^4.17.11"
},

View File

@@ -35,7 +35,7 @@ describe('Exchange libs', () => {
before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const makerAddress = accounts[0];
libs = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
libs = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults, artifacts);
const defaultOrderParams = {
...constants.STATIC_ORDER_PARAMS,

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "2.1.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.1.10",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564607468
},
{
"timestamp": 1563957393,
"version": "2.1.9",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.1.11 - _August 8, 2019_
* Dependencies updated
## v2.1.10 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v2.1.9 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
"version": "2.1.9",
"version": "2.1.11",
"engines": {
"node": ">=6.12"
},
@@ -47,20 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,18 +69,18 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-asset-proxy": "^2.2.3",
"@0x/contracts-erc1155": "^1.1.10",
"@0x/contracts-erc20": "^2.2.9",
"@0x/contracts-erc721": "^2.1.10",
"@0x/contracts-exchange-libs": "^3.0.3",
"@0x/contracts-utils": "^3.1.10",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-asset-proxy": "^2.2.5",
"@0x/contracts-erc1155": "^1.1.12",
"@0x/contracts-erc20": "^2.2.11",
"@0x/contracts-erc721": "^2.1.12",
"@0x/contracts-exchange-libs": "^3.0.5",
"@0x/contracts-utils": "^3.2.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.11"

View File

@@ -1,5 +1,6 @@
import {
artifacts as proxyArtifacts,
ERC1155ProxyContract,
ERC1155ProxyWrapper,
ERC20ProxyContract,
ERC20Wrapper,
@@ -50,6 +51,8 @@ import {
TestStaticCallReceiverContract,
} from '../src';
import { dependencyArtifacts } from './utils/dependency_artifacts';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -69,7 +72,7 @@ describe('Exchange core', () => {
let exchange: ExchangeContract;
let erc20Proxy: ERC20ProxyContract;
let erc721Proxy: ERC721ProxyContract;
let erc1155Proxy: ERC721ProxyContract;
let erc1155Proxy: ERC1155ProxyContract;
let multiAssetProxy: MultiAssetProxyContract;
let staticCallProxy: StaticCallProxyContract;
let staticCallTarget: TestStaticCallTargetContract;
@@ -116,11 +119,13 @@ describe('Exchange core', () => {
proxyArtifacts.MultiAssetProxy,
provider,
txDefaults,
dependencyArtifacts,
);
staticCallProxy = await StaticCallProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.StaticCallProxy,
provider,
txDefaults,
dependencyArtifacts,
);
const numDummyErc20ToDeploy = 3;
[erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
@@ -135,17 +140,20 @@ describe('Exchange core', () => {
artifacts.Exchange,
provider,
txDefaults,
dependencyArtifacts,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
maliciousWallet = maliciousValidator = await TestStaticCallReceiverContract.deployFrom0xArtifactAsync(
artifacts.TestStaticCallReceiver,
provider,
txDefaults,
dependencyArtifacts,
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
artifacts.ReentrantERC20Token,
provider,
txDefaults,
dependencyArtifacts,
exchange.address,
);
@@ -348,6 +356,7 @@ describe('Exchange core', () => {
erc20Artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
dependencyArtifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,
@@ -1473,6 +1482,7 @@ describe('Exchange core', () => {
proxyArtifacts.TestStaticCallTarget,
provider,
txDefaults,
dependencyArtifacts,
);
});
it('should revert if the staticcall is unsuccessful', async () => {

View File

@@ -29,6 +29,8 @@ import {
TestAssetProxyDispatcherContract,
} from '../src';
import { dependencyArtifacts } from './utils/dependency_artifacts';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -72,6 +74,7 @@ describe('AssetProxyDispatcher', () => {
artifacts.TestAssetProxyDispatcher,
provider,
txDefaults,
dependencyArtifacts,
);
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, {
@@ -134,6 +137,7 @@ describe('AssetProxyDispatcher', () => {
proxyArtifacts.ERC20Proxy,
provider,
txDefaults,
dependencyArtifacts,
);
// Register new ERC20 Transfer Proxy contract
return expectTransactionFailedAsync(

View File

@@ -18,6 +18,8 @@ import * as _ from 'lodash';
import { artifacts, TestExchangeInternalsContract } from '../src';
import { dependencyArtifacts } from './utils/dependency_artifacts';
chaiSetup.configure();
const expect = chai.expect;
@@ -65,6 +67,7 @@ describe('Exchange core internal functions', () => {
artifacts.TestExchangeInternals,
provider,
txDefaults,
dependencyArtifacts,
);
overflowErrorForSendTransaction = new Error(
await getRevertReasonOrErrorMessageForSendTransactionAsync(RevertReason.Uint256Overflow),

View File

@@ -29,6 +29,8 @@ import {
TestExchangeInternalsContract,
} from '../src';
import { dependencyArtifacts } from './utils/dependency_artifacts';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
chaiSetup.configure();
const expect = chai.expect;
@@ -118,6 +120,7 @@ describe('matchOrders', () => {
artifacts.Exchange,
provider,
txDefaults,
dependencyArtifacts,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
@@ -141,6 +144,7 @@ describe('matchOrders', () => {
artifacts.ReentrantERC20Token,
provider,
txDefaults,
dependencyArtifacts,
exchange.address,
);
@@ -175,6 +179,7 @@ describe('matchOrders', () => {
artifacts.TestExchangeInternals,
provider,
txDefaults,
dependencyArtifacts,
);
});
beforeEach(async () => {

View File

@@ -25,6 +25,8 @@ import {
WalletContract,
} from '../src';
import { dependencyArtifacts } from './utils/dependency_artifacts';
chaiSetup.configure();
const expect = chai.expect;
@@ -59,23 +61,27 @@ describe('MixinSignatureValidator', () => {
artifacts.TestSignatureValidator,
provider,
txDefaults,
dependencyArtifacts,
);
testWallet = await WalletContract.deployFrom0xArtifactAsync(
artifacts.Wallet,
provider,
txDefaults,
dependencyArtifacts,
signerAddress,
);
testValidator = await ValidatorContract.deployFrom0xArtifactAsync(
artifacts.Validator,
provider,
txDefaults,
dependencyArtifacts,
signerAddress,
);
maliciousWallet = maliciousValidator = await TestStaticCallReceiverContract.deployFrom0xArtifactAsync(
artifacts.TestStaticCallReceiver,
provider,
txDefaults,
dependencyArtifacts,
);
signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, artifacts);
await web3Wrapper.awaitTransactionSuccessAsync(

View File

@@ -21,6 +21,8 @@ import * as _ from 'lodash';
import { artifacts, ExchangeContract, ExchangeWrapper, ExchangeWrapperContract, WhitelistContract } from '../src/';
import { dependencyArtifacts } from './utils/dependency_artifacts';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -87,6 +89,7 @@ describe('Exchange transactions', () => {
artifacts.Exchange,
provider,
txDefaults,
dependencyArtifacts,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
@@ -219,6 +222,7 @@ describe('Exchange transactions', () => {
artifacts.ExchangeWrapper,
provider,
txDefaults,
dependencyArtifacts,
exchange.address,
);
});
@@ -333,6 +337,7 @@ describe('Exchange transactions', () => {
artifacts.Whitelist,
provider,
txDefaults,
dependencyArtifacts,
exchange.address,
);
const isApproved = true;

View File

@@ -0,0 +1,9 @@
import { artifacts as erc1155Artifacts } from '@0x/contracts-erc1155';
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
export const dependencyArtifacts = {
...erc20Artifacts,
...erc721Artifacts,
...erc1155Artifacts,
};

View File

@@ -1,37 +1,21 @@
import { artifacts as erc1155Artifacts } from '@0x/contracts-erc1155';
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import {
FillResults,
formatters,
LogDecoder,
OrderInfo,
orderUtils,
Web3ProviderEngine,
} from '@0x/contracts-test-utils';
import { FillResults, formatters, OrderInfo, orderUtils, Web3ProviderEngine } from '@0x/contracts-test-utils';
import { SignedOrder, SignedZeroExTransaction } from '@0x/types';
import { AbiEncoder, BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { MethodAbi, TransactionReceiptWithDecodedLogs, ZeroExProvider } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts, ExchangeContract } from '../../src';
import { ExchangeContract } from '../../src';
import { AbiDecodedFillOrderData } from './types';
export class ExchangeWrapper {
private readonly _exchange: ExchangeContract;
// tslint:disable no-unused-variable
private readonly _web3Wrapper: Web3Wrapper;
private readonly _logDecoder: LogDecoder;
constructor(exchangeContract: ExchangeContract, provider: Web3ProviderEngine | ZeroExProvider) {
this._exchange = exchangeContract;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, {
...artifacts,
...erc20Artifacts,
...erc721Artifacts,
...erc1155Artifacts,
});
}
public async fillOrderAsync(
signedOrder: SignedOrder,
@@ -39,20 +23,18 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmount?: BigNumber } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
const txHash = await this._exchange.fillOrder.sendTransactionAsync(
const txReceipt = await this._exchange.fillOrder.awaitTransactionSuccessAsync(
params.order,
params.takerAssetFillAmount,
params.signature,
{ from },
);
const txReceipt = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return txReceipt;
}
public async cancelOrderAsync(signedOrder: SignedOrder, from: string): Promise<TransactionReceiptWithDecodedLogs> {
const params = orderUtils.createCancel(signedOrder);
const txHash = await this._exchange.cancelOrder.sendTransactionAsync(params.order, { from });
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
const txReceipt = await this._exchange.cancelOrder.awaitTransactionSuccessAsync(params.order, { from });
return txReceipt;
}
public async fillOrKillOrderAsync(
signedOrder: SignedOrder,
@@ -60,14 +42,13 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmount?: BigNumber } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
const txHash = await this._exchange.fillOrKillOrder.sendTransactionAsync(
const txReceipt = await this._exchange.fillOrKillOrder.awaitTransactionSuccessAsync(
params.order,
params.takerAssetFillAmount,
params.signature,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async fillOrderNoThrowAsync(
signedOrder: SignedOrder,
@@ -75,14 +56,13 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmount?: BigNumber; gas?: number } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
const txHash = await this._exchange.fillOrderNoThrow.sendTransactionAsync(
const txReceipt = await this._exchange.fillOrderNoThrow.awaitTransactionSuccessAsync(
params.order,
params.takerAssetFillAmount,
params.signature,
{ from, gas: opts.gas },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async batchFillOrdersAsync(
orders: SignedOrder[],
@@ -90,14 +70,13 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmounts?: BigNumber[] } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
const txHash = await this._exchange.batchFillOrders.sendTransactionAsync(
const txReceipt = await this._exchange.batchFillOrders.awaitTransactionSuccessAsync(
params.orders,
params.takerAssetFillAmounts,
params.signatures,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async batchFillOrKillOrdersAsync(
orders: SignedOrder[],
@@ -105,14 +84,13 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmounts?: BigNumber[] } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
const txHash = await this._exchange.batchFillOrKillOrders.sendTransactionAsync(
const txReceipt = await this._exchange.batchFillOrKillOrders.awaitTransactionSuccessAsync(
params.orders,
params.takerAssetFillAmounts,
params.signatures,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async batchFillOrdersNoThrowAsync(
orders: SignedOrder[],
@@ -120,14 +98,13 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmounts?: BigNumber[]; gas?: number } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
const txHash = await this._exchange.batchFillOrdersNoThrow.sendTransactionAsync(
const txReceipt = await this._exchange.batchFillOrdersNoThrow.awaitTransactionSuccessAsync(
params.orders,
params.takerAssetFillAmounts,
params.signatures,
{ from, gas: opts.gas },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async marketSellOrdersAsync(
orders: SignedOrder[],
@@ -135,14 +112,13 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmount: BigNumber },
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createMarketSellOrders(orders, opts.takerAssetFillAmount);
const txHash = await this._exchange.marketSellOrders.sendTransactionAsync(
const txReceipt = await this._exchange.marketSellOrders.awaitTransactionSuccessAsync(
params.orders,
params.takerAssetFillAmount,
params.signatures,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async marketSellOrdersNoThrowAsync(
orders: SignedOrder[],
@@ -150,14 +126,13 @@ export class ExchangeWrapper {
opts: { takerAssetFillAmount: BigNumber; gas?: number },
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createMarketSellOrders(orders, opts.takerAssetFillAmount);
const txHash = await this._exchange.marketSellOrdersNoThrow.sendTransactionAsync(
const txReceipt = await this._exchange.marketSellOrdersNoThrow.awaitTransactionSuccessAsync(
params.orders,
params.takerAssetFillAmount,
params.signatures,
{ from, gas: opts.gas },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async marketBuyOrdersAsync(
orders: SignedOrder[],
@@ -165,14 +140,13 @@ export class ExchangeWrapper {
opts: { makerAssetFillAmount: BigNumber },
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createMarketBuyOrders(orders, opts.makerAssetFillAmount);
const txHash = await this._exchange.marketBuyOrders.sendTransactionAsync(
const txReceipt = await this._exchange.marketBuyOrders.awaitTransactionSuccessAsync(
params.orders,
params.makerAssetFillAmount,
params.signatures,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async marketBuyOrdersNoThrowAsync(
orders: SignedOrder[],
@@ -180,50 +154,47 @@ export class ExchangeWrapper {
opts: { makerAssetFillAmount: BigNumber; gas?: number },
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createMarketBuyOrders(orders, opts.makerAssetFillAmount);
const txHash = await this._exchange.marketBuyOrdersNoThrow.sendTransactionAsync(
const txReceipt = await this._exchange.marketBuyOrdersNoThrow.awaitTransactionSuccessAsync(
params.orders,
params.makerAssetFillAmount,
params.signatures,
{ from, gas: opts.gas },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async batchCancelOrdersAsync(
orders: SignedOrder[],
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createBatchCancel(orders);
const txHash = await this._exchange.batchCancelOrders.sendTransactionAsync(params.orders, { from });
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
const txReceipt = await this._exchange.batchCancelOrders.awaitTransactionSuccessAsync(params.orders, { from });
return txReceipt;
}
public async cancelOrdersUpToAsync(salt: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._exchange.cancelOrdersUpTo.sendTransactionAsync(salt, { from });
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
const txReceipt = await this._exchange.cancelOrdersUpTo.awaitTransactionSuccessAsync(salt, { from });
return txReceipt;
}
public async registerAssetProxyAsync(
assetProxyAddress: string,
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._exchange.registerAssetProxy.sendTransactionAsync(assetProxyAddress, { from });
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
const txReceipt = await this._exchange.registerAssetProxy.awaitTransactionSuccessAsync(assetProxyAddress, {
from,
});
return txReceipt;
}
public async executeTransactionAsync(
signedTx: SignedZeroExTransaction,
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._exchange.executeTransaction.sendTransactionAsync(
const txReceipt = await this._exchange.executeTransaction.awaitTransactionSuccessAsync(
signedTx.salt,
signedTx.signerAddress,
signedTx.data,
signedTx.signature,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async getTakerAssetFilledAmountAsync(orderHashHex: string): Promise<BigNumber> {
const filledAmount = await this._exchange.filled.callAsync(orderHashHex);
@@ -251,15 +222,14 @@ export class ExchangeWrapper {
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const params = orderUtils.createMatchOrders(signedOrderLeft, signedOrderRight);
const txHash = await this._exchange.matchOrders.sendTransactionAsync(
const txReceipt = await this._exchange.matchOrders.awaitTransactionSuccessAsync(
params.left,
params.right,
params.leftSignature,
params.rightSignature,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
return txReceipt;
}
public async getFillOrderResultsAsync(
signedOrder: SignedOrder,

View File

@@ -37,6 +37,7 @@ import 'make-promises-safe';
import { artifacts, ExchangeContract, ExchangeFillEventArgs } from '../../src';
import { AssetWrapper } from './asset_wrapper';
import { dependencyArtifacts } from './dependency_artifacts';
import { ExchangeWrapper } from './exchange_wrapper';
import { OrderFactoryFromScenario } from './order_factory_from_scenario';
import { SimpleAssetBalanceAndProxyAllowanceFetcher } from './simple_asset_balance_and_proxy_allowance_fetcher';
@@ -101,6 +102,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
artifacts.Exchange,
provider,
txDefaults,
dependencyArtifacts,
zrxAssetData,
);
const exchangeWrapper = new ExchangeWrapper(exchangeContract, provider);
@@ -135,6 +137,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
libsArtifacts.TestLibs,
provider,
txDefaults,
dependencyArtifacts,
);
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(

View File

@@ -24,6 +24,8 @@ import * as _ from 'lodash';
import { artifacts, ExchangeContract, ExchangeWrapper, ReentrantERC20TokenContract } from '../src';
import { dependencyArtifacts } from './utils/dependency_artifacts';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -87,6 +89,7 @@ describe('Exchange wrappers', () => {
artifacts.Exchange,
provider,
txDefaults,
dependencyArtifacts,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
@@ -110,6 +113,7 @@ describe('Exchange wrappers', () => {
artifacts.ReentrantERC20Token,
provider,
txDefaults,
dependencyArtifacts,
exchange.address,
);

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "4.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "4.0.4",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564607468
},
{
"timestamp": 1563957393,
"version": "4.0.3",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.0.5 - _August 8, 2019_
* Dependencies updated
## v4.0.4 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v4.0.3 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
"version": "4.0.3",
"version": "4.0.5",
"engines": {
"node": ">=6.12"
},
@@ -47,21 +47,22 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contract-wrappers": "^9.1.8",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contract-wrappers": "9.1.7",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -69,18 +70,18 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-asset-proxy": "^2.2.3",
"@0x/contracts-erc20": "^2.2.9",
"@0x/contracts-erc721": "^2.1.10",
"@0x/contracts-exchange": "^2.1.9",
"@0x/contracts-exchange-libs": "^3.0.3",
"@0x/contracts-utils": "^3.1.10",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-asset-proxy": "^2.2.5",
"@0x/contracts-erc20": "^2.2.11",
"@0x/contracts-erc721": "^2.1.12",
"@0x/contracts-exchange": "^2.1.11",
"@0x/contracts-exchange-libs": "^3.0.5",
"@0x/contracts-utils": "^3.2.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"lodash": "^4.17.11"
},

View File

@@ -130,6 +130,7 @@ describe(ContractName.BalanceThresholdFilter, () => {
artifacts.Exchange,
provider,
txDefaults,
artifacts,
zrxAssetData,
);
exchangeWrapper = new ExchangeWrapper(exchangeInstance, provider);
@@ -148,6 +149,7 @@ describe(ContractName.BalanceThresholdFilter, () => {
artifacts.BalanceThresholdFilter,
provider,
txDefaults,
artifacts,
exchangeInstance.address,
erc721BalanceThresholdAsset.address,
erc721alanceThreshold,
@@ -157,6 +159,7 @@ describe(ContractName.BalanceThresholdFilter, () => {
artifacts.BalanceThresholdFilter,
provider,
txDefaults,
artifacts,
exchangeInstance.address,
erc20BalanceThresholdAsset.address,
erc20BalanceThreshold,

View File

@@ -82,7 +82,7 @@ describe(ContractName.DutchAuction, () => {
const erc721Balances = await erc721Wrapper.getBalancesAsync();
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, txDefaults);
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, txDefaults, artifacts);
erc20Wrapper.addDummyTokenContract(wethContract as any);
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
@@ -90,6 +90,7 @@ describe(ContractName.DutchAuction, () => {
artifacts.Exchange,
provider,
txDefaults,
artifacts,
zrxAssetData,
);
const exchangeWrapper = new ExchangeWrapper(exchangeInstance, provider);
@@ -107,6 +108,7 @@ describe(ContractName.DutchAuction, () => {
artifacts.DutchAuction,
provider,
txDefaults,
artifacts,
exchangeInstance.address,
);
dutchAuctionContract = new DutchAuctionContract(dutchAuctionInstance.address, provider);

View File

@@ -103,12 +103,14 @@ describe('OrderMatcher', () => {
proxyArtifacts.ERC721Proxy,
provider,
txDefaults,
artifacts,
);
// Depoy exchange
exchange = await ExchangeContract.deployFrom0xArtifactAsync(
artifacts.Exchange,
provider,
txDefaults,
artifacts,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
@@ -126,6 +128,7 @@ describe('OrderMatcher', () => {
artifacts.OrderMatcher,
provider,
txDefaults,
artifacts,
exchange.address,
);
// Set default addresses
@@ -198,6 +201,7 @@ describe('OrderMatcher', () => {
artifacts.Exchange,
provider,
txDefaults,
artifacts,
constants.NULL_BYTES,
);
return expectContractCreationFailedAsync(
@@ -205,6 +209,7 @@ describe('OrderMatcher', () => {
artifacts.OrderMatcher,
provider,
txDefaults,
artifacts,
exchangeInstance.address,
) as any) as sendTransactionResult,
RevertReason.UnregisteredAssetProxy,
@@ -727,6 +732,7 @@ describe('OrderMatcher', () => {
erc721Artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
);
@@ -772,6 +778,7 @@ describe('OrderMatcher', () => {
erc721Artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
);
@@ -789,6 +796,7 @@ describe('OrderMatcher', () => {
erc721Artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
);

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1565296576,
"version": "3.1.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.1.10",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
],
"timestamp": 1564607468
},
{
"timestamp": 1563957393,
"version": "3.1.9",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.1.11 - _August 8, 2019_
* Dependencies updated
## v3.1.10 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
## v3.1.9 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
"version": "3.1.9",
"version": "3.1.11",
"engines": {
"node": ">=6.12"
},
@@ -47,20 +47,21 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -68,14 +69,14 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/contracts-asset-proxy": "^2.2.3",
"@0x/contracts-erc20": "^2.2.9",
"@0x/base-contract": "^5.3.1",
"@0x/contracts-asset-proxy": "^2.2.5",
"@0x/contracts-erc20": "^2.2.11",
"@0x/contracts-utils": "2.0.1",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"ethereum-types": "^2.1.4",
"lodash": "^4.17.11"
},

View File

@@ -61,17 +61,20 @@ describe('AssetProxyOwner', () => {
proxyArtifacts.MixinAuthorizable,
provider,
txDefaults,
artifacts,
);
erc721Proxy = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
proxyArtifacts.MixinAuthorizable,
provider,
txDefaults,
artifacts,
);
const defaultAssetProxyContractAddresses: string[] = [];
testAssetProxyOwner = await TestAssetProxyOwnerContract.deployFrom0xArtifactAsync(
artifacts.TestAssetProxyOwner,
provider,
txDefaults,
artifacts,
owners,
defaultAssetProxyContractAddresses,
REQUIRED_APPROVALS,
@@ -105,6 +108,7 @@ describe('AssetProxyOwner', () => {
artifacts.AssetProxyOwner,
provider,
txDefaults,
artifacts,
owners,
assetProxyContractAddresses,
REQUIRED_APPROVALS,
@@ -122,6 +126,7 @@ describe('AssetProxyOwner', () => {
artifacts.AssetProxyOwner,
provider,
txDefaults,
artifacts,
owners,
assetProxyContractAddresses,
REQUIRED_APPROVALS,

View File

@@ -66,6 +66,7 @@ describe('MultiSigWalletWithTimeLock', () => {
artifacts.MultiSigWalletWithTimeLock,
provider,
txDefaults,
artifacts,
owners,
REQUIRED_APPROVALS,
secondsTimeLocked,
@@ -81,6 +82,7 @@ describe('MultiSigWalletWithTimeLock', () => {
artifacts.MultiSigWalletWithTimeLock,
provider,
txDefaults,
artifacts,
owners,
REQUIRED_APPROVALS,
secondsTimeLocked,
@@ -135,6 +137,7 @@ describe('MultiSigWalletWithTimeLock', () => {
artifacts.MultiSigWalletWithTimeLock,
provider,
txDefaults,
artifacts,
owners,
REQUIRED_APPROVALS,
secondsTimeLocked,
@@ -198,6 +201,7 @@ describe('MultiSigWalletWithTimeLock', () => {
artifacts.TestRejectEther,
provider,
txDefaults,
artifacts,
);
const data = constants.NULL_BYTES;
const value = new BigNumber(10);
@@ -234,6 +238,7 @@ describe('MultiSigWalletWithTimeLock', () => {
artifacts.MultiSigWalletWithTimeLock,
provider,
txDefaults,
artifacts,
owners,
REQUIRED_APPROVALS,
secondsTimeLocked,
@@ -308,6 +313,7 @@ describe('MultiSigWalletWithTimeLock', () => {
artifacts.MultiSigWalletWithTimeLock,
provider,
txDefaults,
artifacts,
owners,
REQUIRED_APPROVALS,
SECONDS_TIME_LOCKED,

View File

@@ -4,14 +4,17 @@ import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { AssetProxyOwnerContract } from '../../generated-wrappers/asset_proxy_owner';
import { AssetProxyOwnerContract, TestAssetProxyOwnerContract } from '../../src';
import { artifacts } from '../../src/artifacts';
export class AssetProxyOwnerWrapper {
private readonly _assetProxyOwner: AssetProxyOwnerContract;
private readonly _assetProxyOwner: AssetProxyOwnerContract | TestAssetProxyOwnerContract;
private readonly _web3Wrapper: Web3Wrapper;
private readonly _logDecoder: LogDecoder;
constructor(assetproxyOwnerContract: AssetProxyOwnerContract, provider: Web3ProviderEngine) {
constructor(
assetproxyOwnerContract: AssetProxyOwnerContract | TestAssetProxyOwnerContract,
provider: Web3ProviderEngine,
) {
this._assetProxyOwner = assetproxyOwnerContract;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...proxyArtifacts });
@@ -57,7 +60,7 @@ export class AssetProxyOwnerWrapper {
): Promise<TransactionReceiptWithDecodedLogs> {
// tslint:disable-next-line:no-unnecessary-type-assertion
const txHash = await (this
._assetProxyOwner as AssetProxyOwnerContract).executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(
._assetProxyOwner as TestAssetProxyOwnerContract).executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(
txId,
{
from,

View File

@@ -3,14 +3,17 @@ import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { MultiSigWalletContract } from '../../generated-wrappers/multi_sig_wallet';
import { MultiSigWalletContract, MultiSigWalletWithTimeLockContract } from '../../src';
import { artifacts } from '../../src/artifacts';
export class MultiSigWrapper {
private readonly _multiSig: MultiSigWalletContract;
private readonly _multiSig: MultiSigWalletContract | MultiSigWalletWithTimeLockContract;
private readonly _web3Wrapper: Web3Wrapper;
private readonly _logDecoder: LogDecoder;
constructor(multiSigContract: MultiSigWalletContract, provider: Web3ProviderEngine) {
constructor(
multiSigContract: MultiSigWalletContract | MultiSigWalletWithTimeLockContract,
provider: Web3ProviderEngine,
) {
this._multiSig = multiSigContract;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1565296576,
"version": "3.1.13",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1564604963,
"version": "3.1.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1563957393,
"version": "3.1.11",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.1.13 - _August 8, 2019_
* Dependencies updated
## v3.1.12 - _July 31, 2019_
* Dependencies updated
## v3.1.11 - _July 24, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-test-utils",
"version": "3.1.11",
"version": "3.1.13",
"engines": {
"node": ">=6.12"
},
@@ -34,25 +34,26 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/test-utils/README.md",
"devDependencies": {
"mocha": "^4.1.0",
"@types/mocha": "^5.2.7",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.11.0",
"typescript": "3.0.1"
},
"dependencies": {
"@0x/dev-utils": "^2.2.5",
"@0x/order-utils": "^8.2.3",
"@0x/sol-compiler": "^3.1.10",
"@0x/sol-coverage": "^3.0.7",
"@0x/sol-profiler": "^3.1.9",
"@0x/sol-trace": "^2.0.15",
"@0x/subproviders": "^4.1.2",
"@0x/dev-utils": "^2.3.0",
"@0x/order-utils": "^8.2.5",
"@0x/sol-compiler": "^3.1.12",
"@0x/sol-coverage": "^3.0.9",
"@0x/sol-profiler": "^3.1.11",
"@0x/sol-trace": "^2.0.17",
"@0x/subproviders": "^5.0.1",
"@0x/tslint-config": "^3.0.1",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"@types/bn.js": "^4.11.0",
"@types/js-combinatorics": "^0.5.29",
"@types/lodash": "4.14.104",

View File

@@ -1,4 +1,27 @@
[
{
"timestamp": 1565296576,
"version": "3.2.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.2.0",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
},
{
"note": "Added tests for decoding log arguments when artifact dependencies are included/excluded.",
"pr": 1995
}
],
"timestamp": 1564604963
},
{
"timestamp": 1563957393,
"version": "3.1.10",

View File

@@ -5,6 +5,15 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.2.1 - _August 8, 2019_
* Dependencies updated
## v3.2.0 - _July 31, 2019_
* Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies. (#1995)
* Added tests for decoding log arguments when artifact dependencies are included/excluded. (#1995)
## v3.1.10 - _July 24, 2019_
* Dependencies updated

View File

@@ -32,6 +32,8 @@
"src/interfaces/IOwnable.sol",
"test/TestConstants.sol",
"test/TestLibAddressArray.sol",
"test/TestLibBytes.sol"
"test/TestLibBytes.sol",
"test/TestLogDecoding.sol",
"test/TestLogDecodingDownstream.sol"
]
}

View File

@@ -0,0 +1,55 @@
/*
Copyright 2018 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.5;
import "./TestLogDecodingDownstream.sol";
contract TestLogDecoding {
/// @dev arbitrary event; fields to not matter.
event TestEvent(
uint256 foo,
bytes bar,
string car
);
/// @dev Emits a local event
function emitEvent()
public
{
emit TestEvent(256, hex'1234', "4321");
}
/// @dev Emits an event in a downstream contract
function emitEventDownstream()
public
{
TestLogDecodingDownstream testLogDecodingDownstream = new TestLogDecodingDownstream();
ITestLogDecodingDownstream(testLogDecodingDownstream).emitEvent();
}
/// @dev Emits a local event and a downstream event
function emitEventsLocalAndDownstream()
public
{
emitEvent();
emitEventDownstream();
}
}

View File

@@ -0,0 +1,48 @@
/*
Copyright 2018 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.5;
contract ITestLogDecodingDownstream {
/// @dev Emits a local event
function emitEvent() external;
}
contract TestLogDecodingDownstream is
ITestLogDecodingDownstream
{
/// @dev event with fields different than those in `TestLogDecoding.TestEvent`
/// Note: do not include this in the interface
/// For testing, we want to emit an event that is
/// not known by the calling contract.
event TestEvent2(
uint256 lorem,
string ipsum
);
/// @dev Emits a local event
function emitEvent()
external
{
emit TestEvent2(256, "4321");
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-utils",
"version": "3.1.10",
"version": "3.2.1",
"engines": {
"node": ">=6.12"
},
@@ -34,7 +34,7 @@
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "./generated-artifacts/@(Address|IOwnable|LibBytes|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibAddressArray|TestLibBytes).json",
"abis": "./generated-artifacts/@(Address|IOwnable|LibBytes|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibAddressArray|TestLibBytes|TestLogDecoding|TestLogDecodingDownstream).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
@@ -47,21 +47,22 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
"devDependencies": {
"@0x/abi-gen": "^3.1.1",
"@0x/contracts-gen": "^1.0.11",
"@0x/contracts-test-utils": "^3.1.11",
"@0x/dev-utils": "^2.2.5",
"@0x/sol-compiler": "^3.1.10",
"@0x/abi-gen": "^4.1.0",
"@0x/contracts-gen": "^1.0.13",
"@0x/contracts-test-utils": "^3.1.13",
"@0x/dev-utils": "^2.3.0",
"@0x/sol-compiler": "^3.1.12",
"@0x/tslint-config": "^3.0.1",
"@types/bn.js": "^4.11.0",
"@types/lodash": "4.14.104",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"solhint": "^1.4.1",
@@ -69,12 +70,12 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.1.2",
"@0x/order-utils": "^8.2.3",
"@0x/base-contract": "^5.3.1",
"@0x/order-utils": "^8.2.5",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"bn.js": "^4.11.8",
"ethereum-types": "^2.1.4",
"ethereumjs-util": "^5.1.1",

View File

@@ -14,6 +14,8 @@ import * as SafeMath from '../generated-artifacts/SafeMath.json';
import * as TestConstants from '../generated-artifacts/TestConstants.json';
import * as TestLibAddressArray from '../generated-artifacts/TestLibAddressArray.json';
import * as TestLibBytes from '../generated-artifacts/TestLibBytes.json';
import * as TestLogDecoding from '../generated-artifacts/TestLogDecoding.json';
import * as TestLogDecodingDownstream from '../generated-artifacts/TestLogDecodingDownstream.json';
export const artifacts = {
Address: Address as ContractArtifact,
LibBytes: LibBytes as ContractArtifact,
@@ -22,6 +24,8 @@ export const artifacts = {
SafeMath: SafeMath as ContractArtifact,
IOwnable: IOwnable as ContractArtifact,
TestConstants: TestConstants as ContractArtifact,
TestLibBytes: TestLibBytes as ContractArtifact,
TestLibAddressArray: TestLibAddressArray as ContractArtifact,
TestLibBytes: TestLibBytes as ContractArtifact,
TestLogDecoding: TestLogDecoding as ContractArtifact,
TestLogDecodingDownstream: TestLogDecodingDownstream as ContractArtifact,
};

View File

@@ -12,3 +12,5 @@ export * from '../generated-wrappers/safe_math';
export * from '../generated-wrappers/test_constants';
export * from '../generated-wrappers/test_lib_address_array';
export * from '../generated-wrappers/test_lib_bytes';
export * from '../generated-wrappers/test_log_decoding';
export * from '../generated-wrappers/test_log_decoding_downstream';

View File

@@ -28,6 +28,7 @@ describe('LibAddressArray', () => {
artifacts.TestLibAddressArray,
provider,
txDefaults,
artifacts,
);
});
after(async () => {

View File

@@ -68,7 +68,12 @@ describe('LibBytes', () => {
testAddress = accounts[1];
testAddressB = accounts[2];
// Deploy LibBytes
libBytes = await TestLibBytesContract.deployFrom0xArtifactAsync(artifacts.TestLibBytes, provider, txDefaults);
libBytes = await TestLibBytesContract.deployFrom0xArtifactAsync(
artifacts.TestLibBytes,
provider,
txDefaults,
artifacts,
);
// Verify lengths of test data
const byteArrayShorterThan32BytesLength = ethUtil.toBuffer(byteArrayShorterThan32Bytes).byteLength;
expect(byteArrayShorterThan32BytesLength).to.be.lessThan(32);

View File

@@ -24,6 +24,7 @@ describe('Libs', () => {
artifacts.TestConstants,
provider,
txDefaults,
artifacts,
);
const isValid = await testConstants.assertValidZrxAssetData.callAsync();
expect(isValid).to.be.equal(true);

View File

@@ -0,0 +1,95 @@
import { chaiSetup, provider, txDefaults, web3Wrapper } from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import { DecodedLogArgs, LogWithDecodedArgs } from 'ethereum-types';
import { artifacts, TestLogDecodingContract } from '../src';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
describe('TestLogDecoding', () => {
let testLogDecodingWithDependencies: TestLogDecodingContract;
let testLogDecodingDeployedWithoutDependencies: TestLogDecodingContract;
const expectedEvent = {
foo: new BigNumber(256),
bar: '0x1234',
car: '4321',
};
const expectedDownstreamEvent = {
lorem: new BigNumber(256),
ipsum: '4321',
};
const emptyDependencyList = {};
before(async () => {
testLogDecodingDeployedWithoutDependencies = await TestLogDecodingContract.deployFrom0xArtifactAsync(
artifacts.TestLogDecoding,
provider,
txDefaults,
emptyDependencyList,
);
testLogDecodingWithDependencies = await TestLogDecodingContract.deployFrom0xArtifactAsync(
artifacts.TestLogDecoding,
provider,
txDefaults,
artifacts,
);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();
});
afterEach(async () => {
await blockchainLifecycle.revertAsync();
});
describe('Decoding Log Arguments', () => {
it('should decode locally emitted event args when no dependencies are passed into wrapper', async () => {
const txReceipt = await testLogDecodingDeployedWithoutDependencies.emitEvent.awaitTransactionSuccessAsync();
expect(txReceipt.logs.length).to.be.equal(1);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[0] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.deep.equal(expectedEvent);
});
it('should not decode event args when no dependencies are passed into wrapper', async () => {
const txReceipt = await testLogDecodingDeployedWithoutDependencies.emitEventDownstream.awaitTransactionSuccessAsync();
expect(txReceipt.logs.length).to.be.equal(1);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[0] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.undefined();
});
it('should decode args for local but not downstream event when no dependencies are passed into wrapper', async () => {
const txReceipt = await testLogDecodingDeployedWithoutDependencies.emitEventsLocalAndDownstream.awaitTransactionSuccessAsync();
expect(txReceipt.logs.length).to.be.equal(2);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[0] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.deep.equal(expectedEvent);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[1] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.undefined();
});
it('should decode locally emitted event args when dependencies are passed into wrapper', async () => {
const txReceipt = await testLogDecodingWithDependencies.emitEvent.awaitTransactionSuccessAsync();
expect(txReceipt.logs.length).to.be.equal(1);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[0] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.deep.equal(expectedEvent);
});
it('should decode downstream event args when dependencies are passed into wrapper', async () => {
const txReceipt = await testLogDecodingWithDependencies.emitEventDownstream.awaitTransactionSuccessAsync();
expect(txReceipt.logs.length).to.be.equal(1);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[0] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.deep.equal(
expectedDownstreamEvent,
);
});
it('should decode args for both local and downstream events when dependencies are passed into wrapper', async () => {
const txReceipt = await testLogDecodingWithDependencies.emitEventsLocalAndDownstream.awaitTransactionSuccessAsync();
expect(txReceipt.logs.length).to.be.equal(2);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[0] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.deep.equal(expectedEvent);
// tslint:disable no-unnecessary-type-assertion
expect((txReceipt.logs[1] as LogWithDecodedArgs<DecodedLogArgs>).args).to.be.deep.equal(
expectedDownstreamEvent,
);
});
});
});

View File

@@ -11,7 +11,9 @@
"generated-artifacts/SafeMath.json",
"generated-artifacts/TestConstants.json",
"generated-artifacts/TestLibAddressArray.json",
"generated-artifacts/TestLibBytes.json"
"generated-artifacts/TestLibBytes.json",
"generated-artifacts/TestLogDecoding.json",
"generated-artifacts/TestLogDecodingDownstream.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -50,7 +50,7 @@
"config": {
"contractsPackages": "@0x/contracts-asset-proxy @0x/contracts-erc20 @0x/contracts-erc721 @0x/contracts-erc1155 @0x/contracts-exchange @0x/contracts-exchange-forwarder @0x/contracts-exchange-libs @0x/contracts-extensions @0x/contracts-multisig @0x/contracts-test-utils @0x/contracts-utils @0x/contracts-coordinator @0x/contracts-dev-utils",
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic",
"packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-coverage sol-profiler sol-trace ethereum-types asset-buyer migrations",
"packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper order-utils order-watcher sol-compiler sol-coverage sol-profiler sol-trace ethereum-types asset-buyer migrations",
"ignoreDependencyVersions": "@types/styled-components @types/node",
"ignoreDependencyVersionsForPackage": "website instant dev-tools-pages"
},
@@ -77,7 +77,7 @@
"graceful-fs": "4.1.15"
},
"devDependencies": {
"@0x-lerna-fork/lerna": "3.16.7",
"@0x-lerna-fork/lerna": "3.16.10",
"@0xproject/npm-cli-login": "^0.0.11",
"async-child-process": "^1.1.1",
"bundlewatch": "^0.2.1",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1565296576,
"version": "6.0.15",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1564604963,
"version": "6.0.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "6.0.13",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.0.15 - _August 8, 2019_
* Dependencies updated
## v6.0.14 - _July 31, 2019_
* Dependencies updated
## v6.0.13 - _July 24, 2019_
* re-export new ethereum-types type, TupleDataItem (#1919)

View File

@@ -1,6 +1,6 @@
{
"name": "0x.js",
"version": "6.0.13",
"version": "6.0.15",
"engines": {
"node": ">=6.12"
},
@@ -43,13 +43,13 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@0x/abi-gen-wrappers": "^5.0.3",
"@0x/contract-addresses": "^3.0.2",
"@0x/dev-utils": "^2.2.5",
"@0x/migrations": "^4.1.10",
"@0x/abi-gen-wrappers": "^5.2.0",
"@0x/contract-addresses": "^3.0.3",
"@0x/dev-utils": "^2.3.0",
"@0x/migrations": "^4.2.0",
"@0x/tslint-config": "^3.0.1",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/mocha": "^5.2.7",
"@types/node": "*",
"@types/sinon": "^2.2.2",
"awesome-typescript-loader": "^5.2.1",
@@ -59,7 +59,7 @@
"copyfiles": "^2.0.0",
"dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
"mocha": "^4.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"opn-cli": "^3.1.0",
@@ -73,16 +73,17 @@
"webpack": "^4.20.2"
},
"dependencies": {
"@0x/assert": "^2.1.1",
"@0x/base-contract": "^5.1.2",
"@0x/contract-wrappers": "^9.1.8",
"@0x/order-utils": "^8.2.3",
"@0x/order-watcher": "^4.0.15",
"@0x/subproviders": "^4.1.2",
"@0x/assert": "^2.1.3",
"@0x/asset-swapper": "^1.0.1",
"@0x/base-contract": "^5.3.1",
"@0x/contract-wrappers": "9.1.7",
"@0x/order-utils": "^8.2.5",
"@0x/order-watcher": "^4.0.17",
"@0x/subproviders": "^5.0.1",
"@0x/types": "^2.4.1",
"@0x/typescript-typings": "^4.2.4",
"@0x/utils": "^4.4.1",
"@0x/web3-wrapper": "^6.0.8",
"@0x/utils": "^4.5.0",
"@0x/web3-wrapper": "^6.0.10",
"@types/web3-provider-engine": "^14.0.0",
"ethereum-types": "^2.1.4",
"ethers": "~4.0.4",

View File

@@ -40,6 +40,13 @@ export {
} from '@0x/contract-wrappers';
export {
DutchAuctionContract,
ERC20ProxyContract,
ERC721ProxyContract,
ExchangeContract,
ForwarderContract,
OrderValidatorContract,
WETH9Contract,
WETH9Events,
WETH9WithdrawalEventArgs,
WETH9ApprovalEventArgs,
@@ -102,15 +109,12 @@ export {
ObjectMap,
OrderRelevantState,
Stats,
DutchAuctionDetails,
ZeroExTransaction,
SignedZeroExTransaction,
} from '@0x/types';
export {
BlockParamLiteral,
ContractAbi,
BlockParam,
LogWithDecodedArgs,
ContractEventArg,
SupportedProvider,

View File

@@ -1,4 +1,27 @@
[
{
"timestamp": 1565296576,
"version": "2.4.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.4.0",
"changes": [
{
"note": "Updated interface to `deployFrom0xArtifactAsync` to include log decode dependencies.",
"pr": 1995
},
{
"note": "Updated interface to `deployAsync` to include log decode dependencies.",
"pr": 1995
}
],
"timestamp": 1564604963
},
{
"version": "2.3.0",
"changes": [

View File

@@ -5,6 +5,15 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.4.1 - _August 8, 2019_
* Dependencies updated
## v2.4.0 - _July 31, 2019_
* Updated interface to `deployFrom0xArtifactAsync` to include log decode dependencies. (#1995)
* Updated interface to `deployAsync` to include log decode dependencies. (#1995)
## v2.3.0 - _July 24, 2019_
* Python: fix broken event handling (#1919)

View File

@@ -11,37 +11,18 @@ from typing import ( # pylint: disable=unused-import
Union,
)
from eth_utils import to_checksum_address
from mypy_extensions import TypedDict # pylint: disable=unused-import
from hexbytes import HexBytes
from web3 import Web3
from web3.contract import ContractFunction
from web3.datastructures import AttributeDict
from web3.providers.base import BaseProvider
from zero_ex.contract_wrappers._base_contract_wrapper import BaseContractWrapper
from zero_ex.contract_wrappers.bases import ContractMethod, Validator
from zero_ex.contract_wrappers.tx_params import TxParams
class {{contractName}}ValidatorBase:
"""Base class for validating inputs to {{contractName}} methods."""
def __init__(
self,
provider: BaseProvider,
contract_address: str,
private_key: str = None,
):
"""Initialize the instance."""
def assert_valid(
self, method_name: str, parameter_name: str, argument_value: Any
):
"""Raise an exception if method input is not valid.
:param method_name: Name of the method whose input is to be validated.
:param parameter_name: Name of the parameter whose input is to be
validated.
:param argument_value: Value of argument to parameter to be validated.
"""
# Try to import a custom validator class definition; if there isn't one,
# declare one that we can instantiate for the default argument to the
# constructor for {{contractName}} below.
@@ -53,56 +34,58 @@ try:
)
except ImportError:
class {{contractName}}Validator({{contractName}}ValidatorBase): # type: ignore
class {{contractName}}Validator( # type: ignore
Validator
):
"""No-op input validator."""
{{tupleDefinitions ABIString}}
{{#each methods}}
{{> method_class contractName=../contractName}}
{{/each}}
# pylint: disable=too-many-public-methods
class {{contractName}}(BaseContractWrapper):
# pylint: disable=too-many-public-methods,too-many-instance-attributes
class {{contractName}}:
"""Wrapper class for {{contractName}} Solidity contract.{{docBytesIfNecessary ABIString}}"""
{{#each methods}}
{{toPythonIdentifier this.languageSpecificName}}: {{toPythonClassname this.languageSpecificName}}Method
"""Constructor-initialized instance of
:class:`{{toPythonClassname this.languageSpecificName}}Method`.
"""
{{/each}}
def __init__(
self,
provider: BaseProvider,
contract_address: str,
validator: {{contractName}}Validator = None,
private_key: str = None,
):
"""Get an instance of wrapper for smart contract.
:param provider: instance of :class:`web3.providers.base.BaseProvider`
:param contract_address: where the contract has been deployed
:param private_key: If specified, transactions will be signed locally,
via Web3.py's `eth.account.signTransaction()`:code:, before being
sent via `eth.sendRawTransaction()`:code:.
:param validator: for validation of method inputs.
"""
super().__init__(
provider=provider,
contract_address=contract_address,
private_key=private_key,
)
self.contract_address = contract_address
if not validator:
validator = {{contractName}}Validator(provider, contract_address, private_key)
validator = {{contractName}}Validator(provider, contract_address)
self.validator = validator
self._web3_eth = Web3( # type: ignore # pylint: disable=no-member
provider
).eth
def _get_contract_instance(self, token_address):
"""Get an instance of the smart contract at a specific address.
functions = self._web3_eth.contract(address=to_checksum_address(contract_address), abi={{contractName}}.abi()).functions
:returns: contract object
"""
return self._contract_instance(
address=token_address, abi={{contractName}}.abi()
)
{{#each methods}}
{{> call contractName=../contractName}}
{{/each}}
{{#each methods}}
self.{{toPythonIdentifier this.languageSpecificName}} = {{toPythonClassname this.languageSpecificName}}Method(provider, contract_address, functions.{{this.name}}, validator)
{{/each}}
{{#each events}}
{{> event}}
{{> event contractName=../contractName}}
{{/each}}
@staticmethod

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