Learn Solidity basics part 7

preview_player
Показать описание
Welcome to the basics of Solidity. Solidity is the language that is used to create smart contracts on the Ethereum or Polygon blockchain so we must have a good understanding of how it works. After this tutorial, you will be able to follow along with many more smart contract creation videos with ease and understand what I am talking about.

HashLips/HashLips Lab provides educational content and open-source code for informational purposes only, without any express or implied warranties on accuracy or completeness. Our materials are not intended as financial or professional advice and should not replace professional judgment or expertise. The use of our content and code is at your sole discretion and risk.

Please note, that our resources are not financial advice. Decisions made based on our content are the user's responsibility, and HashLips/HashLips Lab assumes no liability for any direct or indirect losses, including but not limited to data loss or profit loss, that may result from utilizing our educational materials or open-source code.

#react #generativeart #generative #art #node #javascript #coding #smartcontract #programming #matic #polygon #network #maticnetwork #polygonnetwork #nft​​ #nfts​​ #nftinvestor​​ #hashlips​​ #code​​ #safelips​​ #hashlip #game #solidity
Рекомендации по теме
Комментарии
Автор

Great tutorial @HashLips NFT, really understood the fundamentals of solidity. looking forward for more such Kudos to you bro

dasthunode
Автор

this code is very cool, I also found it very clean and I was able to assign more functions to it, it was very cool

MatheusPereira-nndj
Автор

Great tutorial! Just one part misleading. For data location, both 'calldata' and 'memory' can be applied to complex data types (array, struct, mapping). The difference is just that with 'calldata' as location, the params cannot be modified. While with 'memory' the params can be modified. The data location is not tied with complex data types.

saikongz
Автор

28:00 public vs private vs internal vs external

VMNthemaster
Автор

Hey Daniel! Awesome content, again!

One question: Why should i use Storage or Memory to update a "NFT"? I can simply update each value directly to the variable, like the example below:

function updateNFT(uint256 _index, string memory _name, uint256 _dna) public {
nftList[_index].name = _name;
nftList[_index].dna = _dna;
}
}

This is shorter than using storage to assign a new variable of NFT struct type and only then change the values, or even using memory to assign a new variable, update their values and then replace the nftList[_index] with the newly created one. Is there any flags on using this structure? It doesnt give any warnings or errors, just runs normally and works the same way

Gustavo-nzvt
Автор

Thanks a lot for tutorial! ... so if I want my smart contract to make automatic transactions and don't want it to be public, what shall it be external, internal or private payable?

lernikharutyunyan
Автор

In a sense, when you update updateNFTStorage you are "pointing" to the same storage as the state variable so you are overwriting it. Whereas with updateNFTMemory, you are copying the state variable and store it in temporary memory that is deleted when the function closes?

andrei
Автор

This honestly should have been a tutorial for an earlier video because practically everything uses functions.

mmckn