13026 Commits

Author SHA1 Message Date
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
@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 monorepo@281c207
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
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-erc1155@1.1.11 @0x/contracts-erc20@2.2.10 @0x/contracts-erc721@2.1.11 @0x/contracts-exchange-libs@3.0.4 @0x/contracts-gen@1.0.12 @0x/contracts-test-utils@3.1.12 @0x/contracts-utils@3.2.0 @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-doc@2.0.15 @0x/sol-profiler@3.1.10 @0x/sra-spec@2.0.13 @0x/subproviders@5.0.0 @0x/utils@4.4.2 @0x/sol-coverage@3.0.8 @0x/sol-trace@2.0.16 @0x/sol-tracing-utils@6.0.15 @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