Using Blast APIs With Mantle Network

11/07/233 min read

Mantleby Mantle

Developers

Mantle

Tutorials

Using Blast APIs With Mantle Network

This guide is intended for developers trying alternative RPCs from third-party providers such as Blast (Bware Labs' API). By the end of this guide, users will able to generate a dedicated endpoint that will give them access to the majority of RPC methods required for dApp development and/or blockchain interaction.

This Guide consists:

  1. Current Public RPC and WSS endpoints by Blast
  2. Why Choose Blast?
  3. Guide on generating dedicated Mantle endpoint

Current Public RPC and WSS Endpoints by Blast:

Dedicated Mantle endpoint

  1. Head over to https://blastapi.io/ and click on Launch App on the top right!
  2. Select Consumer App.
  3. Select either MetaMask or WalletConnect. We're going to be using MetaMask for this guide.
  4. Once MetaMask is selected, click on Sign a message to continue
  5. A MetaMask pop-up should appear in a new window. Note: If the pop-up doesn't appear, then please check your MetaMask extension and the signature request will be visible.
  6. Once signed, you will be taken to your main dashboard. Click on Add Project.
  7. Add the Name, Select "Development" in the Environment tab and click on "Create Project".
  8. Click on Available Endpoints and select Mantle.
  9. Mantle Mainnet will now be available.
  10. Your dedicated private RPCs should now be available to use. To quickly test the function, let's get the APIs in the playground.
  11. Let's try to fetch the balance of $MNT in the address that has been displayed below. We've selected the eth_getBalance method over here. Copy any address of your liking and paste it to the Address.
  12. As visible, the APIs are working and we're able to get the balance. Note: The ETH balance of the specified address in hexadecimal value, measured in wei. The smallest unit of ETH is called a wei, which is equivalent to 10^-18 ether.

Choosing an HEX to decimal convertor, we can see the output is 4297586492225575000 in wei.

When 18 decimal places are shifted from the right (right to left), we get 4.297586492225575000 or 4.2976 Approx. This is the same as the current balance in our wallet address shown by MetaMask.

Amazing! You're now equipped with the latest info on using Blast APIs with Mantle Network!

Fancy numbers and charts? Make sure to try the Dashboard feature! Find the complete guide in Blast's official documentation - https://docs.blastapi.io/blast-documentation/tutorials-and-guides/consumer-app/use-statistical-charts.

Wrap

🛑 Have doubts and need support? Join our Discord Server and ping the Dev Rel team for support or interact with other blockchain developers and fellow builders!

💪🏼 Not tired and want to keep building? Head over to https://www.mantle.xyz/blog/developers and check out an amazing list of tutorials to keep building cool dApps on Mantle Network!

Ciao! 👋🏼


Join the Community