Skip to main content

Overview

The SNS Snap enables MetaMask users to resolve .s domain names on the Sonic blockchain (Chain ID: 146), allowing transactions to human-readable domains instead of hexadecimal addresses.

Technical Specifications

Supported Chain

Sonic (Chain ID: 146)

Supported TLDs

.s domains

NPM Package

sonic_resolver

Platform

MetaMask Snaps

Contract Addresses

{
  resolver: '0x90DB11399F3577BeFbF5B8E094BcaD35DA348Fc9',
  registrar: '0xc50DBB6F0BAab19C6D0473B225f7F58e4a2d440b',
  registry: '0x3D9D5ACc7dBACf1662Bc6D1ea8479F88B90b3cfb'
}

Key Features

1

Domain Name Resolution

Automatically converts .s domains to Ethereum addresses
2

MetaMask Integration

Seamlessly works in the MetaMask Send Flow recipient field
3

Developer RPC Methods

Access reverseLookup, getTokenIdForName, and getNameForTokenId functions

Installation Process

1

Open MetaMask Snaps

Access the MetaMask Snaps platform in your MetaMask wallet
2

Search for SNS

Search for “Sonic Name Service” in the Snaps directory
3

Install & Approve

Click install and approve the installation
4

Grant Permissions

Grant necessary permissions for network access and name lookup functionality
Currently available via MetaMask at MetaMask Snap Directory

Usage Instructions

Sending Transactions

1

Open MetaMask

Click the MetaMask extension and navigate to the Send feature
2

Enter Domain Name

Type a .s domain in the recipient field (e.g., “example.s”)
3

Verify Address

The Snap will automatically resolve and display the corresponding address
4

Complete Transaction

Review the details and complete your transaction as normal

Developer Integration

The SNS Snap provides RPC methods for developers to integrate domain resolution into their applications.

Example: Resolve a Domain

// Connect to the SNS Snap
const result = await window.ethereum.request({
  method: 'wallet_invokeSnap',
  params: {
    snapId: 'npm:sonic_resolver',
    request: {
      method: 'resolveDomain',
      params: {
        domain: 'example.s'
      }
    }
  }
});

console.log('Resolved address:', result.address);

Example: Reverse Lookup

// Get domain name from address
const result = await window.ethereum.request({
  method: 'wallet_invokeSnap',
  params: {
    snapId: 'npm:sonic_resolver',
    request: {
      method: 'reverseLookup',
      params: {
        address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
      }
    }
  }
});

console.log('Domain name:', result.domain);

Available RPC Methods

Convert an Ethereum address back to its registered .s domain name
Retrieve the NFT token ID associated with a specific domain name
Get the domain name associated with a specific token ID

Troubleshooting

  • Check that the domain is spelled correctly
  • Verify the domain is registered on Sonic Name Service
  • Ensure you’re connected to the Sonic blockchain (Chain ID: 146)
  • Make sure MetaMask is up to date
  • Try reinstalling the Snap
  • Check that you’ve granted all necessary permissions
  • Verify the domain ownership on the Sonic Name Service platform
  • Contact the domain owner if you believe there’s an issue

Security Considerations

The SNS Snap only performs name resolution. All transaction security is handled by MetaMask’s standard security features.
Always verify the resolved address before confirming any transaction, especially for large amounts.

Resources