-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Milestone
Description
Currently we have an issue with startMultipleTokenOrders function in ERC721Factory. The issue comes from the "tuple[]" encoding, which web3.py does not support correctly. This means we have to do manual encoding, and possibly send the transaction without web3.py.
We have the following options:
- figure out a way to send the transaction with encoded parameters using web3.py, but skipping ContractFunction logic
- if we are unable to do so, we must broadcast the transaction completely raw, using no tools/libraries, in which case we also have to handle the confirmation logic that the transaction took place (what web3.py handles out of the box)
What we have until now:
- using a tuple instead of the previously-used dictionary
- we are converting providerData to bytes (it is originally a string, but we can't send it like that)
- encoding with the following signature
encd = encode_single("(address,address,uint256,address,address,uint256,uint8,bytes32,bytes32,bytes32)[]", [base_tuple])
- there's clues on how to send the transaction here: https://www.programcreek.com/python/example/116802/eth_abi.encode_abi
specifically, see
transaction = {
"from": eth_tester.get_accounts()[0],
"to": contract_address,
"gas": 500000,
"data": encode_hex(fn_selector + encode_abi(arg_types, fn_args)),
}