I'm trying to encode the data fields according to the contract ABI using Pyethereum in python. I'm making a raw transaction. I'm successfully able send ether from one address to another by signing a transaction and then sending it raw. Now i'm trying to execute a trade function on a contract, hence the need for the data field encoding.
I feel like there should be some encode function built into Pyethereum but I cannot find it. Should I encode these manually instead? How should I go about this?
Function: trade(address tokenGet, uint256 amountGet, address tokenGive, uint256 amountGive, uint256 expires, uint256 nonce, address user, uint8 v, bytes32 r, bytes32 s, uint256 amount)
MethodID: 0x0a19b14a
[0]:0000000000000000000000000000000000000000000000000000000000000000
[1]:0000000000000000000000000000000000000000000000002e8678fcd97f4000
[2]:000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498
[3]:0000000000000000000000000000000000000000000000a2a15d09519be00000
[4]:0000000000000000000000000000000000000000000000000000000000401042
[5]:000000000000000000000000000000000000000000000000000000008d64da5d
[6]:00000000000000000000000049b85d124dde84d651e0efb02f738c5e9c484a89
[7]:000000000000000000000000000000000000000000000000000000000000001b
[8]:f92d42545bd87995b4af1d3edf225dab7515a31350b755ef4761d6de160722de
[9]:3352d494554c036bd798fd287e4c2ac68371adf653a2dd6252ec7625555c1a52
[10]:00000000000000000000000000000000000000000000000000000a29e1e7c600