Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 1.93 KB

File metadata and controls

56 lines (45 loc) · 1.93 KB
title Customize Dapp Display in MetaMask
sidebar_label Display in MetaMask
description Configure your dapp's favicon icon and smart contract method names to improve how transactions and requests appear in the MetaMask UI.
keywords
metamask
favicon
dapp icon
display
method names
4byte
transaction confirmation
UX
branding

Display in MetaMask

Follow these best practices when displaying icons or method names in MetaMask.

Display icons

When your dapp makes a sign-in request to a MetaMask user, MetaMask may render a modal that displays your dapp icon.

MetaMask retrieves this icon using the HTML selector <head> link[rel="shortcut icon"], so you can follow the favicon standard to customize your dapp icon. Add a link tag within your dapp's head with rel = "shortcut icon", as in the following example. The tag's href attribute is used for assigning the dapp icon.

<head>
  <link rel="shortcut icon" href="https://your-dapp.com/your-icon.png" />
</head>

Display method names

MetaMask uses the Ethereum Signature Database to display method names on the confirmation screen. For many common method names, such as token methods, this allows MetaMask to look up the method names by their method signature. However, sometimes you're using a method that isn't in that database, and MetaMask simply displays Contract Interaction to the user.

To register your contract's method names so they show in the MetaMask interface, submit each method's signature to the Ethereum Signature Database.

Next steps