GET transfers of NFTs for a given contract and other parameters.
Description | |
chain | The chain to query |
address (required) | The address of the wallet |
import Moralis from "moralis"; import { EvmChain, GetNFTContractTransfersResponseAdapter, } from "@moralisweb3/common-evm-utils"; import { config } from "dotenv"; // Inject environment variables config(); const runApp = async () => { await Moralis.start({ apiKey: process.env.MORALIS_API_KEY, // ...and any other configuration }); const address: string = "0xCAFFA4b5F72a44C75F796E94F22dEBd6369F04FC"; const chain: EvmChain = EvmChain.PALM; const response: GetNFTContractTransfersResponseAdapter = await Moralis.EvmApi.nft.getNFTContractTransfers({ address, chain, }); console.log(response.toJSON()); }; runApp();