How to Send an On-Chain Message Using an Ethereum Transaction
Using hexadecimal and Metamask, you can encode permanent messages onto the Ethereum (or any EVM) blockchain. People will then be able read these messages on Etherscan if they know where and how to look.
Go to a text to hexadecimal conversion tool and convert the message you would like to send. Make sure to swap the two fields so that you’re converting text to hex. When you swap the fields, a selector will appear below that you can use to ensure no spaces are included in the final hex output:
For example, with the message:
This is a test message that will be stored forever on Goerli network
You will receive this string in hex:
Access your Metamask wallet (I know you know how to do this)
Enable “Show hex data” by:
- Go to Metamask settings
- Enable “Show hex data”
Now it’s time to send a transaction.
Copy the hex you got
and paste it into the
Hex data field in the Send screen
Fill out the rest of the transaction information. Leave ETH at 0 or or a tiny amount like 0.0001 ETH. Then click send and sign the transaction with your wallet to finish!
How to Read a Hexadecimal Message on Etherscan
Go to the page on Etherscan for the transaction that contains the encoded message.
Scroll down and tap “Click to see More”. Then, select “View Input As” > “UTF-8”. The data will be converted from hexadecimal back to plain text.
What can I do with this trick?
In recent hacks, there are people who sent transactions to the hacker and asked for some money, lol
You can check it yourself here:
Be creative, Lady Luck favors the one who tries!