MetaMask

Prompt users to connect to your app with their MetaMask wallet.

Usage

using Thirdweb;
public async void ConnectWallet()
{
// Reference to your Thirdweb SDK
var sdk = ThirdwebManager.Instance.SDK;
// Configure the connection
var connection = new WalletConnection(
provider: WalletProvider.Metamask, // The wallet provider you want to connect to (Required)
chainId: 1 // The chain you want to connect to (Required)
);
// Connect the wallet
string address = await sdk.Wallet.Connect(connection);
}

Behavior

WebGL

Prompts the user to connect their Metamask browser extension.

Standalone

Instantiates the customizable WalletProvider_Metamask UI prefab, displaying a QR code and deep link button. Scan the QR code with your Metamask mobile app to connect.

Mobile

Instantiates the customizable WalletProvider_Metamask UI prefab, displaying a QR code and deep link button. Click the deep link button to connect to your Metamask mobile app.

Miscellaneous

You may customize the WalletProvider_Metamask prefab to fit your app's design. The prefab is located at Assets/Thirdweb/Core/Prefabs and referenced in the ThirdwebManager prefab.