I'm looking for an example of a raw json/body of a contract interaction before it is signed and passed to web3py / web3js / ethers
We are using AWS KMS for our wallet setup. There are some automated actions that this wallet is supposed to take. The problem I am facing is that in order to create a signature, the action has to be passed to KMS in a raw format.
I have found tutorials and samples describing the process to transfer a native token (ethereum itself) from the KMS wallet to a recipient, the process described is to create a raw dict containing all the required info, sign it with a given KMS method and then post it as a raw transaction.
For example a simple transaction raw dict should look like this (post EIP-1559)
{
'nonce': nonce,
'to': 0x0131c121,
'value': 1000000000000,
'data': '0x00',
'gas': 160000,
'maxFeePerGas': max_fee_per_gas,
'maxPriorityFeePerGas': max_priority_fee_per_gas,
'type': type,
'chainId': chainid,
}
What we are trying to do, however, is to interact with various contracts that require some changes based on user actions. The way that I believe should work is to figure out what the dictionary body components look like for a given contract interaction. It would be great if someone could point me into the right direction or explain what the raw json/body of a contract interaction looks like