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.
Instructions
Step 1
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:
5468697320697320612074657374206D65737361676520746861742077696C6C2062652073746F72656420666F7265766572206F6E20476F65726C69206E6574776F726B
Step 2
Access your Metamask wallet (I know you know how to do this)
Step 3
Enable “Show hex data” by:
- Go to Metamask settings
- Enable “Show hex data”
Step 4
Now it’s time to send a transaction.
Copy the hex you got
here
and paste it into the Hex data
field in the Send screen
Step 5
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
Step 1
Go to the page on Etherscan for the transaction that contains the encoded message.
Step 2
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!
Happy hacking!