You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When monitoring Transfer and AuthorizationUsed (transferWithAuthorization) events, it is made more difficult by the latter not including/exposing the from, to and value parameters in the same way as the former.
For now, my workaround is to get the transaction, decode the inputs with this package and getting the from, to, value from there. But it's a lot of extra work to get to parity of information.
var inputDataDecoder = require('ethereum-input-data-decoder');
let tx = await web3.eth.getTransaction(txHash);
let decoder = new inputDataDecoder(USDC_ABI);
let decodedData = decoder.decodeData(tx.input);
let from = decodedData.inputs[0];
let to = decodedData.inputs[1];
let value = decodedData.inputs[2].toString();
When monitoring
Transfer
andAuthorizationUsed
(transferWithAuthorization) events, it is made more difficult by the latter not including/exposing thefrom
,to
andvalue
parameters in the same way as the former.Transfer:
AuthorizationUsed:
How do I get the from, to and value parameters from an
AuthorizationUsed
event?The text was updated successfully, but these errors were encountered: