Smart Contract Codes: How You See It vs. How a Developer Sees It

Written by 0xsmartcontract | Published 2022/07/08
Tech Story Tags: blockchain | solidity | smart-contracts-solidity | hack-solidity | smart-contracts | solidity-hack | crypto | blockchain-writing-contest

TLDRUsing animated videos is not just making the brand adorable, but it also incorporates 2D animation videos on a landing page and a promotional campaign that ultimately boosts conversion rates. The traditional animation styles have been known since the 1800s. The digital techniques in the 2D. animation process replace the traditional process and make the 2. animation explainer videos much more accessible, cost-effective and faster. 2D animated videos are one of the proven formats many brands use to introduce and build brand awareness.via the TL;DR App

Smart contracts are digital contracts stored on a blockchain automatically executed when predetermined terms and conditions are met.

Now let's get to the code.

Have you ever wondered how Smart Contract developers see code? I have to explain this visually.

Let's choose a random function from any smart contract.

For someone without smart contract coding knowledge, this is like a jumbled sentence impossible to decipher and read—meaningless definitions, strange markings, etc.

Ordinary users see the code like this:

A Solidity Developer is one who uses the object-oriented Solidity language to build and deploy smart contracts on Ethereum-based applications. Solidity is the native language of Ethereum which gives enterprises the complete advantage of launching projects on the Ethereum blockchain platform.

Now let's see how a solidity developer sees this code.

First, let's see what Function's body looks like.

Elements in this function body above;

  • Contract name : Colleteral.sol

  • Function Name : depositTo

  • Funciton Visibility: external

  • Function Modifier: There are 5 modifiers and their order is important!

  • Function Arguments: There are 3 arguments.

  • Types of Function Arguments:

Those who can read the codes visualize it in their minds and understand, analyze or imagine it in this way.

This visualization, clearly explains how a developer decodes these codes, reads them and sees them.

Now let's look at the rest of the code.

In this section, a record is made in the mapping named _product.

During these recordings, it interacts with other solidity contracts in the project (OptimisticLegder.sol)

When I started writing smart contracts, I was incredibly excited to see how this simple one line of code had such detail.

We come to the last part of the code, where the "pull" function is triggered and a token transfer takes place.

Later, an Event with Emit is broadcast

Conclusion

In this article, I modeled how to visualize codes, and also visually told you how developers or hackers read these codes. Being able to read code is fun, but reading Solidity codes will not be easy at first.

I am a smart contract developer, you can reach me at my Twitter address.


Written by 0xsmartcontract | || Smart Contracts 🧭 || Code Review 📄 || Bot in Crypto 🤖 || Audit 📇 ||
Published by HackerNoon on 2022/07/08