-
Notifications
You must be signed in to change notification settings - Fork 465
Conversation
c525a55
to
d936d9c
Compare
|
391a69f
to
27e758a
Compare
These should have been added back when we started generating these wrappers.
All of the contract artifacts were removed from the Python package recently, because now they're copied from the monorepo/packages area as an automated build step. Somehow this one artifact slipped through the cracks.
This was preventing the Exchange wrapper from ever importing its validator!
- Capture stderr (and have it included in stdout) so that it doesn't leak onto the console for commands that didn't actually fail. - Include all error output in the Exception object (eliminate print statement).
Newer versions care about this stuff. Old versions didn't, and we don't either.
4102f93
to
13c5e4d
Compare
`bytes.fromhex(bytes.decode('utf-8')` is just plain wrong. It would work for some cases, but is not working when trying to fill orders with the latest Exchange contract.
I swear the previous way was working before, but it wasn't working now, so this fixes it.
c873b83
to
2d1c306
Compare
2d1c306
to
bc354e3
Compare
7ef3115
to
503b4f2
Compare
1284fea
to
47bfb72
Compare
This allows easier consumption by other languages. (Specifically, it eliminates the overhead of keeping the Python addresses package in sync with the TypeScript one.)
47bfb72
to
0ef3435
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @feuGeneA I forgot to press the Submit button
Removed script that existed only to exclude runs of sra_client builds (parallel_without_sra_client). Now `parallel` is used by CI, re-including sra_client in CI checks.
f5de847
to
8941145
Compare
0167246
to
8d7f47f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like you have addressed some of the changes that I suggested. I'm happy to sign off, but it's up to you if you would also rather have some second reviewer, given the size of this PR
... ), | ||
... makerFeeAssetData='0x', | ||
... takerFeeAssetData='0x', | ||
... chain_id=Web3(ganache).eth.chainId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is chain_id
really assignable to an Order
?
When I run mypy
on a file that looks like this:
order = Order(
makerAddress='0x',
takerAddress='0x0000000000000000000000000000000000000000',
senderAddress='0x0000000000000000000000000000000000000000',
feeRecipientAddress='0x0000000000000000000000000000000000000000',
makerAssetData='0x',
takerAssetData='0x',
salt=1,
makerFee=0,
takerFee=0,
makerAssetAmount=1,
takerAssetAmount=1,
expirationTimeSeconds=1,
makerFeeAssetData='0x',
takerFeeAssetData='0x',
chain_id=42
)
I get the complaint:
error: Extra key 'chain_id' for TypedDict "Order"
Note, this is using contract-wrappers 2.0.0.dev9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @steveklebanoff ! Fixed in 19fac92
Description
Fixes #2163 .
Latest build artifacts (for commit e472cee on Nov 4 at 9:51 PM EDT):
0x-contract-wrappers
documentation(If you're interested in reviewing generated wrappers for any other contracts, or docs for any other packages, let me know and I can dig up the direct links from the Circle CI runs for you.)
Testing instructions
Checklist:
Finish these in this PR:
ValueError("You can't add the same un-named instance twice")
is currently being raised if you instantiate anExchange
wrapper twice in the same Python process.# type: ignore
s. Need to expand mypy stubs rather than disabling linter checks in the code.Raise new Issues for these discovered items so they can be addressed in a subsequent PR:
tuples
. They need to be coming back asdict
s (with named fields) in accordance with the type definitions we've already written. Python contract wrapper methods return raw tuples #2298