The One Question bounty closes Thursday 10 December.

Join in
We Them Media logo We Them Media Support us

Web3bridge Students (cohort 11) Share What They’ve Learned: DApps

The picture loads from YouTube. The player loads only when you press Play. Turn on captions in the player if you need them.

A Web3 Bridge student shares a week of learning smart contracts and Solidity, then explains dApps and smart contracts. They cover Solidity data types, the difference between value and reference types, and permanent storage versus temporary memory.

Not by We Them Media Channel: Web3Bridge. Published Tuesday 15 October 2024.

Titles are the owner’s. It plays from their channel.

Transcript

This transcript may contain errors. This video belongs to Web3Bridge. Letters mark each change of speaker.

These are the speakers’ own words. We have not checked their claims.

0:04 A: So this week was interesting and challenging at the same time for me.

0:09 B: We were introduced to smart contracts, Solidity programming language, and-

0:15 C: The experience has been quite sweet. I just like everything I've learned so far.

0:25 A: I'm talking about dApps, and dApps are a short form for decentralized applications, dApps, right? So what are decentralized applications, dApps? Decentralized applications or dApps are applications that run on the blockchain or peer-to-peer network, right? And this gives them advantage over traditional applications, right? In terms of security, in terms of transparency, in terms of user control. There are 2 key components to the applications, blockchain and smart contracts. And then advantages of dApps are decentralization and transparency. Applications of dApps in finance, as in decentralized finance, in gaming.

1:10 B: What are smart contracts? Smart contracts are self-executing contracts. They are basically agreements and terms written into lines of code, and these are run on the blockchain. Uh, like blockchains like Ethereum, uh, Solana, and the likes. Okay. So, uh, what's, what do smart contracts do? They're self-executing contracts. And just like in the Web2 space where we have, um, uh, the business logic written in either Java or other programming languages, uh, in the Web3 space, uh, smart contracts form the basic of the business logic. So, um, they power- they basically power dApps, decentralized applications. And the importance of smart contracts are they enable applications or decentralized applications to be run trustless, seamless.

2:05 D: Solidity is like- is an OOP, an object-oriented programming language, language that writes smart contracts on the EVM chain. And Solidity are like a statically typed language, means that you have to specify the data types in Solidity. And these data types, they're actually 2 types, which are the value data types and the reference data types. So for the value data types, now we have the integers, we have the Boolean, we have the bytes, We have the enums. Now these data types, most of them, they have the default value. Like the Boolean, I think it's false. The address is 0x, and so on. Now let me explain the data types. For Boolean, Booleans are just like normal programming languages. Boolean are just true and false statement. They return true or false. For address, address on the Ethereum is actually like 20 bytes, your normal Ethereum address. And there are 2 types of addresses. And we also have the enums. The enums are like, um, the enums are data types that you can actually define them and so on. Also, we have the references. Now, the good thing about the data types, for the value data types, you just store it in the memory. Like, for every value you create, you are going to be creating another copy. But for the reference data type, you actually like you're actually managing the memory. Like when you create a reference data type, you're pointing to the memory, not the storage itself. Examples are the strings, the arrays, the structs, and the mappings.

3:51 C: This storage is used in the EVM to store permanently data types, right? That could be your uh, integer, your addresses, and the rest, right? While memory is used to store, but memory is not permanent. So, um, um, if you're writing, if you're writing a variable in a function, that function, that variable in that function is going to be saved in your memory. Well, if you are writing a, uh, a variable at the contract level, that variable is going to be saved Uh, in your storage. And saving in the storage is permanent, while saving your memory is, uh, temporary. So whatever you save in memory is being lost after the function you call in the contract is fully executed.

4:44 B: For more updates, like, share, and subscribe.

More from this hub

Something wrong, or a video you want off this page? Write to wethem.xyz@gmail.com and it is fixed or taken down within 48 hours.