Take the transfer
function of the DAI contract as example.
It allows only two arguments: dst
and wad
.
This is how the decoded data input looks like on a sample transaction:
Function: transfer(address dst, uint256 wad)
MethodID: 0xa9059cbb
[0]: 0000000000000000000000006262998ced04146fa42253a5c0af90ca02dfd2a3
[1]: 000000000000000000000000000000000000000000000002c3c465ca58ec0000
Is it possible to attach some extra data when calling the transfer
function, so that the decoded data input looks as follows:
Function: transfer(address dst, uint256 wad)
MethodID: 0xa9059cbb
[0]: 0000000000000000000000006262998ced04146fa42253a5c0af90ca02dfd2a3
[1]: 000000000000000000000000000000000000000000000002c3c465ca58ec0000
[2]: 000000000000000000000000000000000000000000000000000000000000fede
(obviously without the transaction being reverted or something)
If not possible, is there any other way to attach a message to a transaction that interacts with a contract?