Skip links
ethereum logo

How to Store Text in Ethereum

This is a step by step guide that shows how to publish a text in the Roptsten testnet of Ethereum. In order to publish in the Mainnet you will need to select it in the first step of the following tutorial. Install MetaMask in your browser and select Ropsten as your network.

  • Make sure you have enough Ether in your MetaMask account
  • Deploy a Smart Contract
  • Go to Remix
  • Select the Solidity Environment
  • Create a new File
  • Insert the following code

pragma solidity ^0.5.9;
contract CoinFabrik {
event Flag(address indexed _from);
function() external {emit Flag(msg.sender);}

  • Select the correct Solidity Version (0.5.9) and select your file. After that, compile your Smart Contract.
  • Select Auto Compile
  • To deploy the contract, select in the window below “Injected Web3” in the environment slot. After that, press Deploy.
  • Confirm the transaction in MetaMask
  • You will see what is shown below once the transaction has been confirmed
  • Interacting with the contract and uploading the text. To begin, select the instance of your contract and interact with the fallback function by setting the string you want to upload. Then, press the “(fallback)” button and confirm the transaction.
  • Checking the transaction and getting your string. To start, go to the transaction link and you will see something similar to
  • Press “Click to see More” at the end of the panel
  • Go to “View Input As” and select “UTF-8”
  • End up by checking your text

For our complete research on Censorship-free publishing on the blockchain click here.