Put in order · Blockchain and Web3 course · Module 11: dApp Development

Sorting: Chain Switch Flow

Arrange the network-switching flow in a dApp:

Items to put in order

  • Call switchChain with the target chainId
  • The user clicks the network switch button
  • Network changed, the app reacts to the new chainId
  • MetaMask shows a popup asking to confirm the change

You can check the correct answer by solving this task in the CodeWorlds game.