Decodes the approve() calldata from a hex string to extract spender and amount.
Hex-encoded approve() calldata (with or without 0x prefix)
Decoded spender and amount, or null if not valid approve() calldata
const decoded = decodeApproveCalldata("0x095ea7b3...");if (decoded) { console.log(decoded.spender, decoded.amount);} Copy
const decoded = decodeApproveCalldata("0x095ea7b3...");if (decoded) { console.log(decoded.spender, decoded.amount);}
Decodes the approve() calldata from a hex string to extract spender and amount.