Timeline for msg.sender vs tx.origin on ERC-20 token contract
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 2, 2017 at 2:39 | comment | added | Alex | I'm not sure that this is possible in one transaction in the way that you are defining a transaction. However, the buyer could send the tokens to the contract address, and the contract executes code that then forwards the tokens to the seller. This would all happen in one block, and in one self-contained contract code execution. So effectively this would be one transaction, depending on how you are defining a transaction. | |
| Sep 30, 2017 at 9:52 | comment | added | Juan Ignacio Pérez Sacristán | Thank you for your answers. By sending the tokens to the contract the buy asset operation would require two transactions: 1.- send tokens to the contract and 2.- contract sends tokens to the seller. But I need this operation to be performed with just 1 atomic transaction. The other solution, using approve() and transferFrom() endpoints behaves similarly in the sense that 2 transactions are required. | |
| Sep 29, 2017 at 19:37 | history | answered | Alex | CC BY-SA 3.0 |