Open feuGeneA opened 5 years ago
Testing against that PR #74 (as published to dockerhub 0xorg/launch-kit-backend:74bcc39
) I'm able to post checksummed orders. However, now i'm getting that web3.py error when trying to fill the order:
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')
At the moment, this is enough to unblock the work I'm doing. I changed my SRA client example to just do toChecksumAddress
on the maker address, and cited this Issue in the example explanation, and now my test passes.
In publishing the latest versions of the 0x Python packages, we're migrating from v4 to v5 of Web3.py. v5 will not accept any non-checksummed addresses for any inputs to any contracts.
We have an end-to-end tested example of the Python SRA client, which creates an order, posts it to the Launch Kit backend, retrieves the order from the order book, and then fills the order. After migrating this example to v5 of Web3.py, this test is failing with the following output:
The reason for the failure is that the example is sending a checksummed (mixed case) address for the
makerAddress
, and this build of Launch Kit is verifying that address against an old version of@0x/json-schemas
. In version 3.1.1.1 the schemas were updated to allow for mixed case addresses.However, simply accepting mixed case addresses in posting an order will not be sufficient to get these Python SRA client example working, because after posting an order, the example retrieves the order and fills it. So Launch Kit must also be changed to store the orders in mixed case as well, such that the retrieval will yield the case given in the posting.