The EVM evaluates smart contracts by reading code in the DATA field of an Ethereum transaction. This is why you shouldn't trust someone who asks you to include an unknown series of characters in a transaction.

However, you can also use that DATA field to send basic text messages.

If I want to send a transaction with a basic text message, how can I ensure that I'm not accidentally sending a potentially risky smart contract?

  • 1
    As you might be doing things off-chain per ethereum.stackexchange.com/questions/29717/… some ideas from rollups might help you, for example research.paradigm.xyz/optimism I think you will still get better answers if you explain more because it looks like you are jumping to a solution and could be missing other designs. – eth May 14 at 10:33
  • Exactly. Unfortunately it's a technically dense field and it's taking a while to penetrate. – tjr226 May 21 at 17:58
  • Take your time. You're right asking good questions takes good effort :) – eth May 23 at 10:39

Just check the recipient of your transaction is an EOA (and not a smart contract) : an account controlled by a private key that does not "contain" a code (aka a wallet).

To verify an address is an EOA, you can use Etherscan or a high-level library such as web3js for example (see this : How to detect if an address is a contract?).

Also note that if you send a transaction to a smart contract with random data attached to it, the likelihood that your data matches a valid payload triggering a contract function is very very unlikely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.