The idea is simple: you can send transactions using any ethereum wallet, and every such wallet has an additional data to send called "transaction data". For example, I want users to be able to type in that data field name of the product they are purchasing, a simple string or maybe an integer value (index of a product). Is that possible? I just want users be able to not only interact with my contract using metamask or mist, but also just using their maybe online wallets or etc.
As I read in docs, I have to use a standard fallback payable function, like
contract Test {
function() payable {}
}
and somehow read the msg.data. How is that possible to read it?
I searched the questions but none of them had the right answer.
But there is more: fallback function executes only 2300 gas, so how can I handle it then?
msg.data. Here you can find some detailed instruction on how to parse them https://ethereum.stackexchange.com/questions/5684/accessing-the-last-function-parameter-from-msg-data. – Jakub Wojciechowski Jul 24 '17 at 21:02msg.datafrom payable function and process it further in another place. – Jakub Wojciechowski Jul 25 '17 at 00:32