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
As we all know, we can decode transaction data when a known method is called like this.
[...]fnmain(){let input = "0x38ed173900000000000000000000000000000000000000000001a717cc0a3e4f84c00000000000000000000000000000000000000000000000000000000000000283568400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000201f129111c60401630932d9f9811bd5b5fff34e000000000000000000000000000000000000000000000000000000006227723d000000000000000000000000000000000000000000000000000000000000000200000000000000000000000095ad61b0a150d79219dcf64e1e6cc01f0b64c4ce000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7";let input = hex::decode(input)?;// Decode the input using the generated `swapExactTokensForTokens` bindings.let decoded = swapExactTokensForTokensCall::abi_decode(&input,false);[...]}
But how can we decode the data when we don't know which method is called? We can read the function signature data from the first 4 bytes of data, which can be used to determine what function is called. But how can we use alloy-rs to decode the data further using abi?
Additional context
No response
The text was updated successfully, but these errors were encountered:
Component
other
Describe the feature you would like
As we all know, we can decode transaction data when a known method is called like this.
But how can we decode the data when we don't know which method is called? We can read the function signature data from the first 4 bytes of data, which can be used to determine what function is called. But how can we use
alloy-rs
to decode the data further using abi?Additional context
No response
The text was updated successfully, but these errors were encountered: