Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial video

Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial by patrick collins

Welcome to block chain

Bitcoin whitepaper

https://bitcoin.org/bitcoin.pdf

Smart contracts are written in codes with many parties.

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

Dapp = smart contract = Decentralized app

Hybrid smart contract = smart conract + centerilze system

Decentralized system is one of the advantages of smart contract.

Smart contract has a clear system.

Blockchain is immutable.

— — — — — — — — — — — — — — — — — — — — -

Decentralized autonomous organization DAo

MetaMask

Access to private Key

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

Test NET

The Rinkeby Testnet is Deprecated

Sepolia was a proof-of-authority testnet created in October 2021 by Ethereum core developers and maintained ever since. After the Ropsten testnet reached a Terminal Total Difficulty (TTD) of 50000000000000000 the Sepolia and the Goerli testnets transitioned to a proof-of-stake consensus mechanism to mimic the Ethereum mainnet.

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

https://sepolia.etherscan.io/

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

https://goerlifaucet.com/

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

https://www.alchemy.com/nft-api

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

Gwei is a denomination of the cryptocurrency ether (ETH), used on the Ethereum network to buy and sell goods and services. A gwei is one-billionth of one ETH. Gwei is the most commonly used ether unit because it is easier to specify Ethereum gas prices.

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

Live block chain demo

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

keccak256

Keccak256 is a cryptographic hash function that takes an input of an arbitrary length and produces a fixed-length output of 256 bits. It is the function used to compute the hashes of Ethereum addresses, transaction IDs, and other important values in the Ethereum ecosystem

https://www.youtube.com/watch?v=ucw5ZW291V0

SHA256

SHA-256 is one of the successor hash functions to SHA-1 (collectively referred to as SHA-2), and is one of the strongest hash functions available. SHA-256 is not much more complex to code than SHA-1, and has not yet been compromised in any way. The 256-bit key makes it a good partner-function for AES.

https://www.youtube.com/watch?v=orIgy2MjqrA

Target is finding best Nonce for condition in a hash function

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
has 4 zeros at start
has 4 zeros at start

Bruce force trying to find the best nonce

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

Peer to peer transaction

we have 3 different peers :

peer A

peer B

peer c

when value in A change then hash A change

base on majority peer A has different value from peer B and peer C

Hash Wars !

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

Nonce in Etherium is number of transaction

https://andersbrownworth.com/blockchain/public-private-keys/keys

The Elliptic Curve Digital Signature Algorithm (ECDSA) is a Digital Signature Algorithm (DSA) which uses keys derived from elliptic curve cryptography (ECC)

https://www.youtube.com/watch?v=NF1pwjL9-DE

Diffie Hellman -the Mathematics bit- Computerphile

https://www.youtube.com/watch?v=Yjrfm_oRO0w

https://www.youtube.com/watch?v=Yjrfm_oRO0w

private key ( secure) -> using math algoritm -> public key

Signatures

Ethereum address is public key

An Ethereum address is a 42-character hexadecimal address derived from the last 20 bytes of the public key controlling the account with 0x appended in front. e.g., 0x71C7656EC7ab88b098defB751B7401B5f6d8976F

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

Proof of work and proof of stack

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

chain selection
Sybil resistance

proof of work

civil attack

Nakamoto consensus

block confirmation : number of blocks ahead of chain

we paid gas to the miner

Proof of work uses a lot of energy

transaction fee and gas reward

Sybil Attack

blockchain is more democratic

proof of work uses a lot of energy

ETH 2.0

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

validators: how choose random validators?

layer one and layer two

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

bitcoin ethereum are layer one.

layer 2: application added on layer one

What Are Blockchain Rollups?

Blockchain rollups refers to a Layer 2 crypto scaling solution for blockchains which involves ‘rolling up’ or compiling a bunch of transactions on a layer 2 blockchain and turning them into a single piece of data to broadcast on a Layer 1 blockchain. To explain, they take the transactions out of the mainnet and process them off-chain. Then convert them into one single piece of data, and submit them back on a parent chain. This is why rollups are also called ‘off-chain scaling solutions.’

Solidity program

solidity
pragma solidity ^0.6.0;

https://docs.soliditylang.org/en/v0.8.23/types.html

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

for each run the code we need to spend money

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

default value is internal

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

view is read a state of blockchain

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

pure is not save anything

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

storage mean data will access after function execute.

string is array of bytes. we need to use string memory when use it as a parameter.

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

sepolia testnet faucet

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

https://docs.chain.link/resources/acquire-link

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…

https://sepolia.etherscan.io/tx/0x8e70f41f41ebe2b3dbd01e649ce385d08c23f5f79499694347147517040e52be

Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
Notes for Solidity, Blockchain, and Smart Contract Course — Beginner to Expert Python Tutorial…
solidity
// SPDX-License-Identifier: MITpragma solidity ^0.6.0;
contract SimpleStorage {
  // this will get initialized to 0! uint256 favoriteNumber;
  bool favoriteBool;
  struct People {
    uint256 favoriteNumber;
    string name;
  }
  People[] public people;
  mapping(string => uint256) public nameToFavoriteNumber;
  function store(uint256 _favoriteNumber) public {
    favoriteNumber = _favoriteNumber;
  }
  function retrieve() public view returns(uint256) {
    return favoriteNumber;
  }
  function addPerson(string memory _name, uint256 _favoriteNumber) public{
    people.push(People(_favoriteNumber, _name));
    nameToFavoriteNumber[_name] = _favoriteNumber;
  }
}

Subscribe to DDIntel Here.

Have a unique story to share? Submit to DDIntel here.

Join our creator ecosystem here.

DDIntel captures the more notable pieces from our main site and our popular DDI Medium publication. Check us out for more insightful work from our community.

DDI Official Telegram Channel: https://t.me/+tafUp6ecEys4YjQ1

Follow us on LinkedIn, Twitter, YouTube, and Facebook.