I want to encode below data with eth_abi but I cannot get the correct way to map its data type.
here is my attempt but I got error on tuple
order_types = [('address maker','uint8 kind','tuple(uint8 erc,address addr,uint256 id,uint256 quantity) assets','uint256 expiredAt','address paymentToken','uint256 startAt','uint256 basePrice','uint256 endedAt','uint256 endedPrice','uint256 expectedState','uint256 nonce','uint256 marketFeePercentage')]
Here is my data.
from eth_abi import encode
order_data = [
Web3.to_checksum_address(order.maker),
1,
[
[
1,
Web3.to_checksum_address(order.assets[0]['address']),
int(order.assets[0]['id']),
int(order.assets[0]['quantity'])
]
],
int(order.expiredAt),
Web3.to_checksum_address(address),
int(order.startedAt),
int(order.basePrice),
int(order.endedAt),
int(order.endedPrice),
0,
int(order.nonce),
int(marketplace_fee)
]
encode(order_types, [order_data])
Can you advise how can I get the correct data type
Thank you in advance.