Read what you sign: 5 function selectors that should make you stop (with a small decoder)
When a dapp asks you to confirm a transaction, the wallet shows a summary. The raw data field is where the truth is, and its first four bytes (the function selector) say what is being called. Here are selectors worth recognising on the Ethereum virtual machine: Selector Function Why it matters 0x095ea7b3 approve(address,uint256) Lets a spender move your token. "Unlimited" amounts are the risky…
A dapp may request your transaction confirmation, and the blockchain wallet will display a summary. The raw data field holds the crucial information, with the first four bytes being the function selector. These selectors indicate the function being called within the Ethereum virtual machine. Here are five selectors to watch out for:
0x095ea7b3 approve(address,uint256) - This allows a spender to move your token. Be cautious of unlimited amounts, as this carries significant risk.
0xa22cb465 setApprovalForAll(address,bool) - This grants an operator access to all your NFTs within a collection. Use this sparingly and only when necessary.
0x39509351 increaseAllowance(address,uint256) - Similar to approve, but this increases an existing allowance. It's a good practice to use this sparingly.
0x23b872dd transferFrom(address,address,uint256) - This moves tokens using an allowance. This is normal for swaps, but it's worth noting if you did not initiate the swap.
0xa9059cbb transfer(address,uint256) - This is a straightforward transfer of tokens. Always verify the recipient before proceeding.
To help you navigate, a decoder (17 lines) has been provided. By extracting the first four bytes and converting them to lowercase, you can identify the function being called. If the selector matches 0x095ea7b3, the decoder checks if the amount being transferred is the maximum possible value (all bits set). This helps you identify potential risks associated with unlimited transfers. Use this decoder in a wallet UI, browser tool, or as part of an internal review process.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.