I need to write plain text to Ethereum blockchain. How can I do that using smart contracts and get contract address?

2 Answers 2


Solidity does provide the function sha256(). And go does provide package sha256. Since SHA2 is a standard both should be interoperable.

  • I mean I want to write just plain text. It doesn't matter sha256 or not, it could be "Hello World". Can I put plain text instead of bytecode to a smart contract?
    – Alex
    Sep 27, 2017 at 6:16
  • Sorry, but I do not understand what you are asking. Do you want to write a contract that stores plaint text messages?
    – Ismael
    Sep 27, 2017 at 15:01

Write a solidity contract that returns your string value. Something like this:

function returnValue() constant returns (string){ return "Hello World"; }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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