Thursday, September 11, 2025
No Result
View All Result
Ajoobz
Advertisement
  • Home
  • Bitcoin
  • Crypto Updates
    • Crypto Updates
    • Altcoin
    • Ethereum
    • Crypto Exchanges
  • Blockchain
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Scam Alert
  • Regulations
  • Analysis
Marketcap
  • Home
  • Bitcoin
  • Crypto Updates
    • Crypto Updates
    • Altcoin
    • Ethereum
    • Crypto Exchanges
  • Blockchain
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Scam Alert
  • Regulations
  • Analysis
No Result
View All Result
Ajoobz
No Result
View All Result

Build on Solana and EVM

2 years ago
in Web3
Reading Time: 15 mins read
0 0
A A
0
Home Web3
Share on FacebookShare on TwitterShare on E-Mail


With the speedy enlargement of the Web3 {industry}, we now have seen quite a few blockchain networks emerge to handle the rising demand for decentralized purposes (dapps). And the fragmented ecosystem of a number of blockchains has highlighted the necessity for interoperability. Consequently, Web3 builders ought to have the ability to construct cross-chain appropriate dapps – on networks like Solana and all main EVM chains – to succeed in the biggest attainable viewers. Though most builders would possibly select to launch on a particular community, any forward-looking Web3 mission needs to be constructed with cross-chain appropriate APIs, enabling future enlargement to different networks. So, what APIs ought to these builders use? For the reply to this query, be a part of us on this article as we present you the best solution to construct on Solana and EVM!

Overview 

In at present’s article, we’ll begin by introducing you to Moralis and clarify how you should utilize our instruments to construct on each Solana and all main EVM chains. From there, we’ll dive deeper into our cross-chain appropriate APIs to spotlight the capabilities of those industry-leading instruments. Lastly, to high issues off, we’ll cowl two transient examples of how one can get the NFT steadiness of any handle on each Solana and all EVM chains. 

Additionally, do you know which you can entry all our APIs freed from cost? All it’s important to do is enroll with Moralis, and also you’ll instantly have the ability to leverage the complete energy of blockchain expertise! 

Nonetheless, with out additional ado, let’s bounce proper into it and discover the best solution to construct on Solana and EVM! 

Methods to Construct on Solana and EVM

Essentially the most accessible solution to construct on Solana and EVM chains is to leverage Moralis’ cross-chain appropriate APIs. Moralis offers a complete suite of enterprise-grade APIs, making Web3 improvement as seamless as Web2. As such, when working with Moralis, it has by no means been simpler to construct cross-chain appropriate decentralized purposes (dapps)! 

Among the many supported networks, you’ll discover Solana and ten+ EVM chains, together with Ethereum, Polygon, BNB Sensible Chain (BSC), Optimism, and plenty of others! 

Highlighting blockchain networks compatible with Moralis APIs, including Solana and EVM

Moreover, not solely do the cross-chain appropriate APIs from Moralis permit you to construct on each Solana and a number of EVM networks, however they’re additionally one of the best within the enterprise. As such, in terms of response occasions, scalability, reliability, and options, Moralis APIs clearly stand out as {industry} leaders!

Case Study Showing How Moralis Solana and EVM APIs are the fastest ones available - Competition comparison chart

Construct on Solana

With Moralis’ Solana-compatible APIs, you’ll be able to effortlessly deliver tasks to market quicker and extra effectively. The APIs index any blockchain information you want for Solana improvement, together with information for NFTs, fungible tokens, wallets, and extra! 

UI of Moralis Solana API

Querying blockchain information has by no means been simpler, and with solely single strains of code, you’ll be able to accomplish the next: 

Get NFT metadataFetch pockets portfoliosQuery token balances by walletMonitor pockets activityGet SPL token pricesAnd extra!

Moralis’ Solana-compatible APIs help the Solana mainnet and testnet, guaranteeing you’ll be able to leverage our complete suite of instruments for each testing and creating production-ready dapps! 

In case you instantly wish to construct on Solana and discover all out there endpoints, take a look at our official Solana Web3 information API documentation web page. 

Construct on EVM 

With Moralis’ EVM-compatible APIs, you’ll be able to seamlessly construct dapps quicker and extra effectively throughout ten+ blockchain networks. The truth is, when working with our suite of industry-leading interfaces, it can save you a whopping 83% of the common Web3 go-to-market time, enabling you to prototype, deploy, and launch your Web3 tasks earlier than everybody else! 

EVM components illustrated in art image

What’s extra, through the use of Moralis APIs, you’ll be leveraging the identical easy-to-use tech that already powers a number of the most vital tasks in Web3, together with MetaMask, Delta, NFTrade, 1inch, and plenty of others. 

So, what are you able to do with our EVM-compatible APIs? 

With solely single strains of code, you are able to do the next: 

Question token pricesStream real-time blockchain dataGet person tokensMonitor NFT assortment pricesFetch NFT metadataAnd rather more!

If you wish to get proper into it and discover all out there EVM endpoints, take a look at our official EVM Web3 information API documentation web page.

Nonetheless, that covers the fundamentals of how one can construct on Solana and EVM networks with Moralis. Let’s now dive a bit deeper and look nearer at a few of Moralis’ cross-chain appropriate APIs!

Solana and EVM Appropriate APIs 

Moralis provides a variety of cross-chain appropriate APIs, making it the final word one-stop store for anybody seeking to construct on each Solana and EVM chains. On this part, we’ll discover three distinguished examples: 

NFT APIToken APIWallet API

Nonetheless, with out additional delay, let’s begin by diving into the NFT API!

NFT API 

The Moralis NFT API is free to make use of and delivers unmatched efficiency by lightning-fast CDNs. It helps over three million NFT collections, together with all the things from established tasks like CryptoPunks and Pudgy Penguins to NFTs minted solely seconds in the past! 

Solana and EVM NFT API art image

So, what are you able to do with the NFT API? Listed below are a couple of examples:

Fetch NFT Switch Knowledge: Fetch historic and real-time switch information for any NFT, pockets, or handle. Entry Enriched Metadata: Entry normalized and totally enriched metadata for each collections and particular person NFTs. Get On-Chain Pricing Knowledge: Get and combine on-chain pricing information into your dapps, together with final sale costs and lowest historic costs. Question Optimized Picture Previews: Question and profit from dynamically sized picture previews.  

The NFT API helps Solana and ten+ EVM chains, that means you’ll be able to leverage the identical software to construct NFT tasks throughout a number of blockchain networks! 

Token API 

With the Moralis Token API, you’ll be able to effortlessly combine real-time costs, pockets balances, and transfers into your Web3 tasks. As such, when working with this software, it has by no means been really easy to construct decentralized exchanges (DEXs), Web3 wallets, portfolio trackers, or another dapps! 

EVM and Solana Token API art image illustration

So, what are the options of the Token API? Let’s have a look at a couple of examples:

Get Token Costs: Get any token’s present and historic worth from in style automated market makers (AMMs) like Uniswap and PancakeSwap. Monitor Token Transfers: Monitor transfers of any token in actual time by contract or pockets. You may as well fetch historic transfers with ease.Question Token Balances: Question token balances of any handle at any given time limit. Superior Spam Detection: Expertise enhanced safety with help for detecting suspicious tokens. Wealthy Metadata: Entry up-to-date token metadata, together with token names, logos, symbols, and rather more.

Additionally, similar to the NFT API, the Token API additionally options cross-chain help. Consequently, when utilizing Moralis’ Token API, you’ll be able to construct tasks appropriate with Solana and all main EVM blockchains! 

Pockets API

The Moralis Pockets API boasts an array of highly effective options, unparalleled scalability, and distinctive flexibility, making it the final word software for integrating pockets performance into dapps. The Pockets API helps over 500 million addresses throughout all main blockchains, together with Solana, Ethereum, Polygon, and plenty of different EVM-compatible networks! 

Moralis Solana and EVM Compatible APIs for Wallet Development art image

So, what does the Moralis Pockets API do? 

Native Balances: Entry each historic and present native balances for all wallets.Portfolios: Fetch your entire portfolio of any pockets, together with fungible and non-fungible tokens.NFTs: Get all NFTs and collections held by a pockets, together with metadata and pictures. Transfers: Get real-time transfers and swaps for each NFTs and fungible tokens. Labels: All switch and transaction endpoints help public handle labels, permitting you to simply decode transactions. And extra!

Due to the cross-chain compatibility of the Pockets API, you should utilize this interface to construct on each Solana and all main EVM chains! 

Further EVM APIs

Along with the three APIs from the earlier part, Moralis additionally provides quite a few different EVM-compatible interfaces. And on this part, we’ll introduce you to a couple of them: 

Worth API: The Worth API is the {industry}’s premier interface for crypto costs. You’ll be able to choose any metric – whether or not you wish to choose by velocity, options, or pricing – this API comes out on high in comparison with any competitor. Blockchain API: The Blockchain API is the {industry}’s most exact and scalable interface for uncooked and decoded blockchain information. With single strains of code, you’ll be able to seamlessly question block information, transactions, inside transactions, logs, and extra. Streams API: With the Streams API, you’ll be able to effortlessly arrange streams to obtain immediate, customizable notifications at any time when one thing necessary occurs on-chain. This lets you seamlessly monitor any person’s real-time transfers, notify your dapp customers about necessary occasions, and rather more.Market Knowledge API: With the Market Knowledge API, you’ll be able to unlock the ability of Web3 market information and seamlessly combine this into your dapps. Question trending NFT assortment, NFT drops, high ERC-20 tokens, and rather more with solely single strains of code. 

Highlighting all of Moralis' Solana and EVM compatible APIs

The APIs above are just a few examples. So, if you wish to discover all of them, take a look at our Web3 API web page! 

Tutorial: Methods to Construct with Solana and EVM with Cross-Chain Appropriate APIs

On this part, we’ll present you a few examples of how you should utilize our cross-chain appropriate APIs to construct with Moralis on each Solana and EVM blockchains. And on this case, we’ll be utilizing the NFT API as an example the ability of Moralis. Extra particularly, we’ll present you the best way to get the NFT steadiness of any handle! 

Nonetheless, earlier than persevering with, you could take care of a couple of important stipulations! 

Conditions

On this tutorial, we’ll be utilizing JavaScript to get the NFT steadiness of any handle. As such, earlier than you proceed, be sure you have the next prepared: 

Moreover, open your most well-liked built-in improvement atmosphere (IDE) and arrange a brand new mission. From there, launch a brand new terminal, cd into the mission’s root folder and run the command under to put in the Moralis SDK: 

npm set up moralis @moralisweb3/common-sol-utilsnpm set up moralis @moralisweb3/common-evm-utils

Lastly, you additionally want a Moralis API key. As such, if you happen to haven’t already, enroll with Moralis by clicking on the ”Begin for Free” button on the high proper of Moralis’ homepage: 

Build on Solana and EVM - Get started for free using Moralis start for free button

Subsequent, go to the ”Settings” tab, scroll all the way down to the ”API Keys” part, and replica your key: 

Showing API key page and illustration how to copy the API key

Hold it for now, as you want it within the coming two sections! 

Nonetheless, that covers the stipulations. Within the following sections, we’ll give two examples of how one can get the NFT steadiness of an handle on each Solana and EVM chains! 

Solana Instance: Get NFT Steadiness of an Handle

Create a brand new ”index.js” file in your mission root folder and add the next code: 

const Moralis = require(“moralis”).default;
const { SolNetwork } = require(“@moralisweb3/common-sol-utils”);

const runApp = async () => {
await Moralis.begin({
apiKey: “YOUR_API_KEY”,
// …and another configuration
});

const handle = “BWeBmN8zYDXgx2tnGj72cA533GZEWAVeqR9Eu29txaen”;

const community = SolNetwork.MAINNET;

const response = await Moralis.SolApi.account.getNFTs({
handle,
community,
});

console.log(response.toJSON());
};

runApp();

Subsequent, exchange YOUR_API_KEY with the important thing you copied within the earlier part: 

Solana and EVM API code - Replacing the API key

From there, configure the handle const by including the handle from which you wish to question the NFT steadiness: 

Changing the address parameter to query the NFT balance using the Solana and EVM API

We then move alongside handle and chain as parameters when calling the getNFTs() endpoint: 

Passing the address and chain parameter for the API call

That’s it for the code; now you can execute the script by operating the terminal command under within the mission’s root folder: 

node index.js

In return, you’ll get an array of all NFTs held by the handle you specified. It can look one thing like this: 

[
{
“associatedTokenAddress”: “B7gJmenw3xpQqq82UNHim2cFPqo5p21WY9YLf4XgVNkw”,
“mint”: “6RPYwFcfmkzMucAGz6FrBRvDX5sK4FBqDye3iZDCw5Q”,
“name”: “DegodsGiveaway #639”,
“symbol”: “DG”
}
]

Congratulations! You now know the best way to use Moralis’ NFT API to get the steadiness of an handle on Solana! If you wish to study extra about this, take a look at the get SPL NFT steadiness of handle documentation web page! 

EVM Instance: Get NFT Steadiness of an Handle

Arrange a brand new ”index.js” file in your mission’s root folder and add the next code: 

const Moralis = require(“moralis”).default;
const { EvmChain } = require(“@moralisweb3/common-evm-utils”);

const runApp = async () => {
await Moralis.begin({
apiKey: “YOUR_API_KEY”,
// …and another configuration
});

const handle = “0xd8da6bf26964af9d7eed9e03e53415d37aa96045”;

const chain = EvmChain.ETHEREUM;

const response = await Moralis.EvmApi.nft.getWalletNFTs({
handle,
chain,
});

console.log(response.toJSON());
};

runApp();

From right here, swap out YOUR_API_KEY with the important thing you fetched when coping with the stipulations: 

Solana and EVM API code example on how to get NFT balance of an address

Subsequent, configure the handle and chain constants to suit your question: 

Showing how to change the chain parameter to build on Solana and EVM

We then move alongside handle and chain as parameters when calling the getWalletNFTs() endpoint: 

getwalletNFTs example when building on Solana and EVM chains

That covers the code; now you can run the script by opening a brand new terminal and executing the next command within the root folder of the mission: 

node index.js

In return for operating the script, you’ll get a response containing an array of all NFTs held by the handle in query. Right here’s an instance of what it’d appear like: 

{
“whole”: 1456,
“web page”: 1,
“page_size”: 100,
“cursor”: “eyJhbGciOiJIUzI1NiIs//…”,
“end result”: [
{
“token_address”: “0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85”,
“token_id”: “4765809967066625256798886812262830659450023020194524584471225959000376492819”,
“amount”: “1”,
“owner_of”: “0xd8da6bf26964af9d7eed9e03e53415d37aa96045”,
“token_hash”: “ba6d44b5f16be94283cecffeb784b7ca”,
“block_number_minted”: “15572796”,
“block_number”: “15573017”,
“contract_type”: “ERC721”,
“name”: “Ethereum Name Service”,
“symbol”: “ENS”,
“token_uri”: null,
“metadata”: null,
“last_token_uri_sync”: null,
“last_metadata_sync”: “2022-09-20T06:06:08.153Z”,
“minter_address”: null
},
],
“standing”: “SYNCED”
}

That’s it! You now know the best way to use the NFT API to get the steadiness of an handle on an EVM community! If you wish to study extra about this, discover the get NFTs owned by handle documentation web page! 

Abstract: Construct with Solana and EVM Appropriate APIs

In at present’s article, we launched you to Moralis’ cross-chain appropriate APIs – the final word instruments permitting you to construct on each Solana and EVM. In doing so, we primarily dove into the next three examples: 

NFT APIToken APIWallet API

We additionally demonstrated the accessibility of our APIs by displaying you two examples of how one can get the NFT steadiness of any handle on each Solana and all EVM chains. As such, when you have adopted alongside this far, you already know the fundamentals of constructing cross-chain appropriate dapps! 

In case you appreciated this information, contemplate testing some extra content material right here on the Web3 weblog. For example, examine meta transactions or discover our full blockchain API tutorial. 

Additionally, don’t overlook to enroll with Moralis in order for you entry to all our cross-chain appropriate APIs. You’ll be able to create an account free of charge, and also you’ll have the ability to instantly begin leveraging the complete energy of blockchain expertise! 



Source link

Tags: buildEVMSolana
Previous Post

Experience the ‘Survive Thanksgiving’ Metaverse Experience

Next Post

Three Reasons Why a Bitcoin ETF Is a Bad Idea

Related Posts

Futures Traders Flock to Ethereum as ETF Investors Rotate to Bitcoin
Web3

Futures Traders Flock to Ethereum as ETF Investors Rotate to Bitcoin

10 hours ago
AI agents can now pay APIs with USDC in 200 ms as Coinbase activates x402 Bazaar
Web3

AI agents can now pay APIs with USDC in 200 ms as Coinbase activates x402 Bazaar

1 day ago
QMMM Stock Skyrockets Nearly 1,750% on Bitcoin, Ethereum, Solana Treasury Plan
Web3

QMMM Stock Skyrockets Nearly 1,750% on Bitcoin, Ethereum, Solana Treasury Plan

2 days ago
Strategy Buys 7 Million More In Bitcoin After S&P 500 Snub
Web3

Strategy Buys $217 Million More In Bitcoin After S&P 500 Snub

3 days ago
Wall Street’s Needs Will Advance Ethereum’s Privacy, Says Etherealize
Web3

Wall Street’s Needs Will Advance Ethereum’s Privacy, Says Etherealize

5 days ago
Robinhood Set to Join S&P 500 as Bitcoin Giant Strategy Misses Out
Web3

Robinhood Set to Join S&P 500 as Bitcoin Giant Strategy Misses Out

6 days ago
Next Post
Three Reasons Why a Bitcoin ETF Is a Bad Idea

Three Reasons Why a Bitcoin ETF Is a Bad Idea

From FTX to Fraud Charges

From FTX to Fraud Charges

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

[ccpw id="587"]
  • Disclaimer
  • Cookie Privacy Policy
  • Privacy Policy
  • DMCA
  • Terms and Conditions
  • Contact us
Contact us for business inquiries: cs@ajoobz.com

Copyright © 2023 Ajoobz.
Ajoobz is not responsible for the content of external sites.

No Result
View All Result
  • Home
  • Bitcoin
  • Crypto Updates
    • Crypto Updates
    • Altcoin
    • Ethereum
    • Crypto Exchanges
  • Blockchain
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Scam Alert
  • Regulations
  • Analysis

Copyright © 2023 Ajoobz.
Ajoobz is not responsible for the content of external sites.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In