Skip to content

Exzh34/Solidity

Repository files navigation

Solidity

Notes and simple code made while learning solidity

Moralis begginer stuff is based on https://www.youtube.com/channel/UCgWS9Q3P5AxCWyQLT2kQhBw/playlists

Zombie stuff based on learning guide @ https://cryptozombies.io/

Address:

Every account and smart contract has an address. It is used to send and receive Ether from one account to another. Basically your public identity on the blockchain

Mapping:

Data type used to store associations. Similar to a list but it holds 2 values, and allows to quickcly get the value corresponding to the key

Event:

When called, it causes the arguments to be stored in the transaction´s logs

Emit:

Keyword that is used to call events

Constructor:

Function that is runned directly when the contract is created, this functions runs only once

Msg:

Keyword that allows us to access some special variables that are available for us from the blockchain

Require:

Convenience function in solidity. It guarantees validity of conditions that cannot be detected before execution

Constant:

Keyword added to a variable that tells solidity it cannot be changed

Struct:

Struct types are used to represent a record. Allow to create our own data type

Enum:

Enums restrict variables to have one of the only few predefined values. The values in this enumerated list are called enums.

Arrays:

"Player[] public players;" creates and array called players of the struct Player.

Modifier:

Can be used to change the behaviour of functions in a declarative way, for example you can use a modifier to automatically check a condition prior to executing the function, it is also inheritable between contracts.

About

Notes while learning solidity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published