connectWallet

The connectWallet function is used to connect to a crypto wallet such as Metamask.

When the function is executed, the following processing is performed

  1. request a connection to Metamask

  2. set up the chain when it is connected

  3. save the account and chainId in the cookie

  4. reload and update the connected_wallet object with the cookie

Last updated