Skip to content

Instantly share code, notes, and snippets.

@mqklin
Last active May 27, 2021 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mqklin/a5eb23fee6519f1dfdb291148081a7a4 to your computer and use it in GitHub Desktop.
Save mqklin/a5eb23fee6519f1dfdb291148081a7a4 to your computer and use it in GitHub Desktop.
<button onClick={() => {
window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [
{
chainId: '0x1a4',
chainName: 'SanR L2 Chain',
nativeCurrency: {name: 'SAN', symbol: 'SAN', decimals: 18},
rpcUrls: ['https://l2.144.76.93.41.nip.io/'],
blockExplorerUrls: ['http://144.76.93.41:4001/'],
},
],
});
}}>12345</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment