🔮
Ethereum
  • General
    • What is Ethereum
      • Ethereum & Bitcoin General Comparison
      • Singleton State
      • The Ethereum Virtual Machine (EVM)
      • Opcodes (operation codes) EVM
      • Ethereum Client
      • Forks
      • Gas (wei)
        • EIP-1559
        • Table Conversion (wei)
      • Proof of Stake (PoS)
      • Proof of Authority (PoA)
      • The Beacon Chain
      • Networks
        • Ethereum mainnet
        • Goerli
      • Account-based model & UTXO-based model
      • Externally Owned Account (EOA)
      • Node Clients
        • Geth
        • Nethermind
      • Contract Account
      • Smart Contract Upgradeability
      • Ultrasound Money
      • Merkle Trees
        • Patricia Merkle Tree
      • Tries
        • State Trie
        • Storage Trie
        • Transactions Trie
        • Receipts Trie
      • Transactions
        • Ethereum Transaction Architecture
      • World State
        • Chain of States
        • Chain of Blocks
        • Stack of Transactions / Mempool
      • Contract Creation
      • Message Call Transaction
      • P2P Network
      • Web3.js
      • Ether.js
        • Smart Contract Interaction Example
      • Web3.js vs Ether.js
      • Node Providers
      • ENS (Ethereum Name Service)
      • Web3 dapp
      • Escrow
      • Multi-signature
      • ERC-20 tokens
        • Send ERC20s to Contracts
      • NFTs
        • ERC-721 and ERC-1155
      • Solidity
        • State Variables
        • Data Location
        • Numbers
        • Modifiers
        • View & Pure Modifiers
        • Data Types
          • Modifiers
          • Modifiers (Functions)
          • Address & Address Payable
        • Hardhat
        • Payable Functions
        • Receive Function
        • Fallback Function
        • Global Variables
        • Self Destruct
        • Create2 Function
        • Revert function
        • Require function
        • Assert Function
        • Calldata
        • Interface
        • Mapping
        • Array
        • Struct
        • Inheritance
          • Virtual & Overwrite
          • Multiple inheritance
          • Hierarchical Inheritance
        • Events
          • Indexed (keyword)
          • LOG0 - LOG4
        • Multi-signature Example
        • Smart Contracts
          • Context
      • Application Binary Interface (ABI )
  • Extras
    • Terminology
      • Bytecode
      • Keccak-256
      • Turing complete
Powered by GitBook
On this page
  1. General
  2. What is Ethereum

Web3 dapp

Here is a typical flow of a web3 dapp with a visual representation:

  1. User opens the dapp: The user opens the web3 dapp in their web browser.

  2. Check for Web3 provider: The dapp checks if a web3 provider (such as Metamask) is installed on the user's computer. If not, the user is prompted to install it.

  3. Connect to Ethereum network: The dapp connects to the Ethereum network through the web3 provider, allowing the user to interact with the blockchain.

  4. Request user's account: The dapp requests the user's Ethereum account address from the web3 provider.

  5. Display dapp interface: The dapp displays its interface, showing the user what actions they can perform.

  6. User sends a transaction: The user selects an action and sends a transaction to the Ethereum network through the web3 provider.

  7. Transaction is broadcast: The transaction is broadcast to the Ethereum network, where it is verified and processed by miners.

  8. Transaction is confirmed: Once the transaction is confirmed by the network, the dapp updates the user's interface to reflect the result of the action.

  9. Retrieve data from the blockchain: If necessary, the dapp retrieves data from the blockchain to display to the user.

  10. User disconnects: The user disconnects from the dapp, ending their session on the Ethereum network.

Visual Representation

        +--------------------------------------+
        |                                      |
        |            Web3 Dapp                 |
        |                                      |
        +--------------------------------------+
                             |
                             |
                             |
                             |
                +----------------------------+
                |                            |
                |   Check for Web3 Provider  |
                |                            |
                +----------------------------+
                             |
                             |
                             |
                             |
               +---------------------------+
               |                           |
               |    Connect to Network     |
               |                           |
               +---------------------------+
                             |
                             |
                             |
                             |
                +----------------------------+
                |                            |
                |      Request User's       |
                |      Ethereum Account     |
                |                            |
                +----------------------------+
                             |
                             |
                             |
                             |
          +------------------|------------------+
          |                   |                  |
          |                   |                  |
+-----------------+ +------------------+ +---------------------+
|                 | |                  | |                     |
| User selects an | | User sends a     | | Dapp retrieves data  |
| action          | | transaction      | | from the blockchain  |
|                 | |                  | |                     |
+-----------------+ +------------------+ +---------------------+
          |                   |                  |
          |                   |                  |
          |                   |                  |
+-----------------+ +------------------+ +---------------------+
|                 | |                  | |                     |
| Transaction     | | Transaction is   | | Display updated      |
| is broadcasted  | | confirmed        | | interface and result |
| to the network   | |                  | | of the action        |
|                 | |                  | |                     |
+-----------------+ +------------------+ +---------------------+
                             |
                             |
                             |
                             |
                +----------------------------+
                |                            |
                |        User disconnects     |
                |                            |
                +----------------------------+
PreviousENS (Ethereum Name Service)NextEscrow

Last updated 2 years ago