diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-js.png b/fern/api-reference/alchemy-sdk/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/alchemy-sdk/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart.mdx deleted file mode 100644 index de4b9788..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart.mdx +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: Alchemy SDK Quickstart -description: The easiest way to connect your dApp to the blockchain and get the power of Alchemy's infrastructure. Just download, write two lines of code, and go. -subtitle: The easiest way to connect your dApp to the blockchain and get the power of Alchemy's infrastructure. Just download, write two lines of code, and go. -url: https://docs.alchemy.com/reference/alchemy-sdk-quickstart -slug: reference/alchemy-sdk-quickstart ---- - -The Alchemy SDK is the most comprehensive, stable, and powerful Javascript SDK available today to interact with the blockchain. - -It supports the exact same syntax and functionality of the Ethers.js AlchemyProvider and WebSocketProvider, making it a 1:1 mapping for anyone using the Ethers.js Provider. However, it adds a significant amount of improved functionality on top of Ethers, such as easy access to Alchemy’s Enhanced and NFT APIs, robust WebSockets, and quality-of life improvements such as automated retries. - -The SDK leverages Alchemy's hardened node infrastructure, guaranteeing best-in-class node reliability, scalability, and data correctness, and is undergoing active development by Alchemy's engineers. - -# Getting started - -Check out the full Github repo here: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) - -## 1. Install the SDK: - - - ```shell NPM - npm install alchemy-sdk - ``` - - ```text Yarn - yarn add alchemy-sdk - ``` - - -## 2. After installing the app, you can then import and use the SDK: - - - ```javascript SDK.js - const { Network, Alchemy } = require('alchemy-sdk'); - - // Optional Config object, but defaults to demo api-key and eth-mainnet. - const settings = { - apiKey: '', // Replace with your Alchemy API Key. - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - ``` - - - - The public "demo" API key may be rate limited based on traffic. To create your own API key, **[sign up for an Alchemy account here](https://dashboard.alchemy.com/signup)** and use the key created on your dashboard for the first app. - - -The `Alchemy` object returned by `new Alchemy()` provides access to the Alchemy API. An optional config object can be passed in when initializing to set your API key, change the network, or specify the max number of retries. - -## 3. Make requests using the Alchemy SDK: - - - ```javascript SDK.js - import { Network, Alchemy } from 'alchemy-sdk'; - - // Optional Config object, but defaults to demo api-key and eth-mainnet. - const settings = { - apiKey: 'demo', // Replace with your Alchemy API Key. - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - // Access standard Ethers.js JSON-RPC node request - alchemy.core.getBlockNumber().then(console.log); - - // Access Alchemy Enhanced API requests - alchemy.core.getTokenBalances("0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE").then(console.log); - - // Access the Alchemy NFT API - alchemy.nft.getNftsForOwner('vitalik.eth').then(console.log); - - // Access WebSockets and Alchemy-specific WS methods - alchemy.ws.on( - { - method: 'alchemy_pendingTransactions' - }, - res => console.log(res) - ); - ``` - - -The Alchemy SDK currently supports four different namespaces, including: - -* `core`: All commonly-used Ethers.js Provider methods and Alchemy Enhanced API methods -* `nft`: All Alchemy NFT API methods -* `ws`: All WebSockets methods -* `notify`: CRUD endpoints for modifying Alchemy Notify Webhooks - -If you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` and it should just work. - -The Alchemy SDK also supports a number of Ethers.js objects that streamline the development process: - -* [`Utils`](https://docs.ethers.io/v5/api/utils/): Equivalent to `ethers.utils`, this provides a number of common Ethers.js utility methods for developers. -* [`Contract`](https://docs.ethers.io/v5/api/contract/contract/): An abstraction for smart contract code deployed to the blockchain. -* [`ContractFactory`](https://docs.ethers.io/v5/api/contract/contract-factory/): Allows developers to build a `Contract` object. -* [`Wallet`](https://docs.ethers.io/v5/api/signer/#Wallet): An implementation of `Signer` that can sign transactions and messages using a private key as a standard Externally Owned Account. - - - [If you're looking for more information about accessing any of the Alchemy SDK namespaces, objects, or specific implementation details, go to the link above!](/reference/alchemy-sdk-api-surface-overview) - - - - To contribute to the Alchemy SDK, visit our [Github](https://github.com/alchemyplatform/alchemy-sdk-js) or click [here](https://github.com/alchemyplatform/aa-sdk/archive/refs/heads/main.zip) to download the files. - - -## Alchemy SDK Example Requests - - - [You can find a long list of examples on how to use the SDK here.](/reference/using-the-alchemy-sdk) - - -### Getting the NFTs owned by an address - - - ```javascript SDK.js - import { - NftExcludeFilters, - Alchemy - } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - // Get how many NFTs an address owns. - alchemy.nft.getNftsForOwner('vitalik.eth').then(nfts => { - console.log(nfts.totalCount); - }); - - // Get all the image urls for all the NFTs an address owns. - async function main() { - for await (const nft of alchemy.nft.getNftsForOwnerIterator('vitalik.eth')) { - console.log(nft.media); - } - } - - main(); - - // Filter out spam NFTs. - alchemy.nft.getNftsForOwner('vitalik.eth', { - excludeFilters: [NftExcludeFilters.SPAM] - }).then(console.log); - ``` - - -### Getting all the owners of the BAYC NFT - - - ```javascript javascript - import { - Alchemy - } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - // Bored Ape Yacht Club contract address. - const baycAddress = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; - - async function main() { - for await (const nft of alchemy.nft.getNftsForContractIterator(baycAddress, { - // Omit the NFT metadata for smaller payloads. - omitMetadata: true, - })) { - await alchemy.nft - .getOwnersForNft(nft.contract.address, nft.tokenId) - .then((response) => - console.log("owners:", response.owners, "tokenId:", nft.tokenId) - ); - } - } - - main(); - ``` - - -### Get all outbound transfers to a provided address - - - ```javascript ethers.js - import { Alchemy } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - alchemy.core.getTokenBalances('vitalik.eth').then( - console.log - ); - ``` - - -## Questions & Feedback - - - We'd love your thoughts on what would improve your web3 dev process the most! If you have 5 minutes, tell us what you want at our [Feature Request feedback form](https://alchemyapi.typeform.com/sdk-feedback) and we'd love to build it for you: - - **[Alchemy SDK Feedback Form](https://alchemyapi.typeform.com/sdk-feedback)** - - -If you have any questions or feedback, please contact us at or open a ticket in the dashboard. - -This guide provides you with the code examples to get started with all of the Alchemy SDK. Check out our [Web3 Tutorials Overview](/docs/tutorials-overview) to learn more about building with Alchemy. diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/693457a-Getting_Started.png b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/693457a-Getting_Started.png deleted file mode 100644 index a1044496..00000000 Binary files a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/693457a-Getting_Started.png and /dev/null differ diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/alchemy-sdk-js.png b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/alchemy-sdk-quickstart.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/alchemy-sdk-quickstart.mdx deleted file mode 100644 index 0186048a..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/alchemy-sdk-quickstart.mdx +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: Alchemy SDK Quickstart -description: The easiest way to connect your dApp to the blockchain and get the power of Alchemy's infrastructure. Just download, write two lines of code, and go. -subtitle: The easiest way to connect your dApp to the blockchain and get the power of Alchemy's infrastructure. Just download, write two lines of code, and go. -url: https://docs.alchemy.com/reference/alchemy-sdk-quickstart -slug: reference/alchemy-sdk-quickstart ---- - -The Alchemy SDK is the most comprehensive, stable, and powerful Javascript SDK available today to interact with the blockchain. - -It supports the exact same syntax and functionality of the Ethers.js AlchemyProvider and WebSocketProvider, making it a 1:1 mapping for anyone using the Ethers.js Provider. However, it adds a significant amount of improved functionality on top of Ethers, such as easy access to Alchemy's Enhanced and NFT APIs, robust WebSockets, and quality-of life improvements such as automated retries. - -The SDK leverages Alchemy's hardened node infrastructure, guaranteeing best-in-class node reliability, scalability, and data correctness, and is undergoing active development by Alchemy's engineers. - -# Getting started - -Check out the full Github repo here: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) - -## 1. Install the SDK: - - - ```shell NPM - npm install alchemy-sdk - ``` - - ```text Yarn - yarn add alchemy-sdk - ``` - - -## 2. After installing the app, you can then import and use the SDK: - - - ```javascript SDK.js - const { Network, Alchemy } = require('alchemy-sdk'); - - // Optional Config object, but defaults to demo api-key and eth-mainnet. - const settings = { - apiKey: '', // Replace with your Alchemy API Key. - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - ``` - - - - The public "demo" API key may be rate limited based on traffic. To create your own API key, **[sign up for an Alchemy account here](https://dashboard.alchemy.com/signup)** and use the key created on your dashboard for the first app. - - -The `Alchemy` object returned by `new Alchemy()` provides access to the Alchemy API. An optional config object can be passed in when initializing to set your API key, change the network, or specify the max number of retries. - -## 3. Make requests using the Alchemy SDK: - - - ```javascript SDK.js - import { Network, Alchemy } from 'alchemy-sdk'; - - // Optional Config object, but defaults to demo api-key and eth-mainnet. - const settings = { - apiKey: 'demo', // Replace with your Alchemy API Key. - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - // Access standard Ethers.js JSON-RPC node request - alchemy.core.getBlockNumber().then(console.log); - - // Access Alchemy Enhanced API requests - alchemy.core.getTokenBalances("0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE").then(console.log); - - // Access the Alchemy NFT API - alchemy.nft.getNftsForOwner('vitalik.eth').then(console.log); - - // Access WebSockets and Alchemy-specific WS methods - alchemy.ws.on( - { - method: 'alchemy_pendingTransactions' - }, - res => console.log(res) - ); - ``` - - -The Alchemy SDK currently supports five different namespaces, including: - -* `core`: All commonly-used Ethers.js Provider methods and Alchemy Enhanced API methods -* `nft`: All Alchemy NFT API methods -* `ws`: All WebSockets methods -* `notify`: CRUD endpoints for modifying Alchemy Notify Webhooks - -If you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` and it should just work. - -The Alchemy SDK also supports a number of Ethers.js objects that streamline the development process: - -* [`Utils`](https://docs.ethers.io/v5/api/utils/): Equivalent to `ethers.utils`, this provides a number of common Ethers.js utility methods for developers. -* [`Contract`](https://docs.ethers.io/v5/api/contract/contract/): An abstraction for smart contract code deployed to the blockchain. -* [`ContractFactory`](https://docs.ethers.io/v5/api/contract/contract-factory/): Allows developers to build a `Contract` object. -* [`Wallet`](https://docs.ethers.io/v5/api/signer/#Wallet): An implementation of `Signer` that can sign transactions and messages using a private key as a standard Externally Owned Account. - - - [If you're looking for more information about accessing any of the Alchemy SDK namespaces, objects, or specific implementation details, go to the link above!](/reference/alchemy-sdk-api-surface-overview) - - - - To contribute to the Alchemy SDK, visit our [Github](https://github.com/alchemyplatform/alchemy-sdk-js) or click [here](https://github.com/alchemyplatform/aa-sdk/archive/refs/heads/main.zip) to download the files. - - -## Alchemy SDK Example Requests - - - [You can find a long list of examples on how to use the SDK here.](/reference/using-the-alchemy-sdk) - - -### Getting the NFTs owned by an address - - - ```javascript SDK.js - import { - NftExcludeFilters, - Alchemy - } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - // Get how many NFTs an address owns. - alchemy.nft.getNftsForOwner('vitalik.eth').then(nfts => { - console.log(nfts.totalCount); - }); - - // Get all the image urls for all the NFTs an address owns. - async function main() { - for await (const nft of alchemy.nft.getNftsForOwnerIterator('vitalik.eth')) { - console.log(nft.media); - } - } - - main(); - - // Filter out spam NFTs. - alchemy.nft.getNftsForOwner('vitalik.eth', { - excludeFilters: [NftExcludeFilters.SPAM] - }).then(console.log); - ``` - - -### Getting all the owners of the BAYC NFT - - - ```javascript javascript - import { - Alchemy - } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - // Bored Ape Yacht Club contract address. - const baycAddress = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; - - async function main() { - for await (const nft of alchemy.nft.getNftsForContractIterator(baycAddress, { - // Omit the NFT metadata for smaller payloads. - omitMetadata: true, - })) { - await alchemy.nft - .getOwnersForNft(nft.contract.address, nft.tokenId) - .then((response) => - console.log("owners:", response.owners, "tokenId:", nft.tokenId) - ); - } - } - - main(); - ``` - - -### Get all outbound transfers to a provided address - - - ```javascript ethers.js - import { Alchemy } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - alchemy.core.getTokenBalances('vitalik.eth').then( - console.log - ); - ``` - - -## Questions & Feedback - - - We'd love your thoughts on what would improve your web3 dev process the most! If you have 5 minutes, tell us what you want at our [Feature Request feedback form](https://alchemyapi.typeform.com/sdk-feedback) and we'd love to build it for you: - - **[Alchemy SDK Feedback Form](https://alchemyapi.typeform.com/sdk-feedback)** - - -If you have any questions or feedback, please contact us at or open a ticket in the dashboard. - -This guide provides you with the code examples to get started with all of the Alchemy SDK. Check out our [Web3 Tutorials Overview](/docs/tutorials-overview) to learn more about building with Alchemy. diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/d6172a5-Create_App_Details.png b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/d6172a5-Create_App_Details.png deleted file mode 100644 index a228f3d8..00000000 Binary files a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/d6172a5-Create_App_Details.png and /dev/null differ diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/f0dbb19-ezgif.com-gif-maker_1.gif b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/f0dbb19-ezgif.com-gif-maker_1.gif deleted file mode 100644 index e33373e9..00000000 Binary files a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/f0dbb19-ezgif.com-gif-maker_1.gif and /dev/null differ diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/favicon.ico b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/favicon.ico deleted file mode 100644 index a59308e2..00000000 Binary files a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/favicon.ico and /dev/null differ diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/how-to-manage-a-multichain-project-using-alchemy-sdk.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/how-to-manage-a-multichain-project-using-alchemy-sdk.mdx deleted file mode 100644 index 3537765c..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/how-to-manage-a-multichain-project-using-alchemy-sdk.mdx +++ /dev/null @@ -1,344 +0,0 @@ ---- -title: How to Manage a Multichain Project Using Alchemy SDK -description: Learn how to manage multiple API keys and network endpoints in the same project using Alchemy SDK -subtitle: Learn how to manage multiple API keys and network endpoints in the same project using Alchemy SDK -url: https://docs.alchemy.com/reference/how-to-manage-a-multichain-project-using-alchemy-sdk -slug: reference/how-to-manage-a-multichain-project-using-alchemy-sdk ---- - -# Introduction - -Web3 development often requires interacting with multiple blockchain networks, each with its own API endpoint and authentication keys. Managing all these connections and ensuring the correct API key and endpoint are used for each chain can be time-consuming and error-prone. Alchemy SDK provides a solution to this problem with its `AlchemyMultiChainClient`, a wrapper around the Alchemy SDK that allows for easy management of multiple chains in a single application. In this tutorial, we'll walk through a demo project that demonstrates how to use the `AlchemyMultiChainClient` to query NFTs for an owner on multiple chains. - -# Project Setup - -To follow along with this tutorial, you'll need to have [Node.js and npm](https://nodejs.org/en/download/) installed on your machine. You'll also need to clone the demo project from Alchemy's GitHub repository by running the following command in your terminal: - - - ```shell Shell - git clone https://github.com/alchemyplatform/alchemy-multichain-demo.git - ``` - - -After cloning the repo, navigate to the project directory and run the following command to install its dependencies: - - - ```shell shell - cd alchemy-multichain-demo - npm install - ``` - - -Now that we have the demo project set up, we can move on to querying multiple chains. - -# Querying Multiple Chains - -The `src/index.ts` file contains a simple demo that uses the `AlchemyMultichainClient` class to make requests across multiple chains. Let's walk through the code to understand how it works. - - - ```typescript typescript - import { AlchemyMultichainClient } from './alchemy-multichain-client'; - import { Network } from 'alchemy-sdk'; - - async function main() { - // Default config to use for all networks. - const defaultConfig = { - apiKey: 'demo', // TODO: Replace with your Mainnet Alchemy API key. - network: Network.ETH_MAINNET - }; - // Include optional setting overrides for specific networks. - const overrides = { - // TODO: Replace with your API keys. - [Network.MATIC_MAINNET]: { apiKey: 'demo', maxRetries: 10 }, // Replace with your Matic Alchemy API key. - [Network.ARB_MAINNET]: { apiKey: 'demo' } // Replace with your Arbitrum Alchemy API key. - }; - const alchemy = new AlchemyMultichainClient(defaultConfig, overrides); - - // get NFTs in multiple networks - const owner = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'; - const mainnetNfts = await alchemy - .forNetwork(Network.ETH_MAINNET) - .nft.getNftsForOwner(owner, { pageSize: 5 }); - const maticNfts = await alchemy - .forNetwork(Network.MATIC_MAINNET) - .nft.getNftsForOwner(owner, { pageSize: 5 }); - - console.log('mainnetNfts', mainnetNfts); - console.log('maticNfts', maticNfts); - } - - main(); - ``` - - -First, we import the necessary modules: - - - ```typescript typescript - import { AlchemyMultichainClient } from './alchemy-multichain-client'; - import { Network } from 'alchemy-sdk'; - ``` - - -The `AlchemyMultichainClient` class is imported from the `alchemy-multichain-client` file in the same directory, and the `Network` is imported from the Alchemy SDK. - -Next, we define the configuration settings for our multichain application. This is done by creating a `defaultConfig` object which contains the default settings that will be used across all networks. In this example, the `defaultConfig` object includes an Alchemy API key and specifies the `ETH_MAINNET` as the default network. - - - ```typescript typescript - const defaultConfig = { - apiKey: 'demo', - network: Network.ETH_MAINNET - }; - ``` - - -We can also include optional setting overrides for specific networks, if needed. This is done by creating an `overrides` object which maps network IDs to their respective configuration overrides. For example, in the overrides object in the example code below, we are overriding the API key for the `MATIC_MAINNET` and `ARB_MAINNET` networks. - - - ```typescript typescript - const overrides = { - [Network.MATIC_MAINNET]: { apiKey: 'demo', maxRetries: 10 }, // Replace 'demo' with your Alchemy Matic API key - [Network.ARB_MAINNET]: { apiKey: 'demo' } // Replace 'demo' with your Alchemy Arbitrum key - }; - ``` - - -With the configuration settings defined, we can now create an instance of the `AlchemyMultichainClient` by passing in the `defaultConfig` and `overrides` objects. - - - ```typescript typescript - const alchemy = new AlchemyMultichainClient(defaultConfig, overrides); - ``` - - -Once the `AlchemyMultichainClient` instance is created, we can start making requests to different networks using the `forNetwork` method. This method returns a new instance of the `AlchemyMultichainClient` with the specified network settings, so you can chain requests together. - -In the example code below, we are using the `forNetwork` method to make requests to the `ETH_MAINNET` and `MATIC_MAINNET` networks to get the NFTs for an owner with a specified wallet address. We are also specifying the pageSize option to limit the number of NFTs returned to 5. - - - ```typescript typescript - const owner = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'; - const mainnetNfts = await alchemy - .forNetwork(Network.ETH_MAINNET) - .nft.getNftsForOwner(owner, { pageSize: 5 }); - const maticNfts = await alchemy - .forNetwork(Network.MATIC_MAINNET) - .nft.getNftsForOwner(owner, { pageSize: 5 }); - ``` - - -Finally, we log the results of our requests to the console. - - - ```typescript typescript - console.log('mainnetNfts', mainnetNfts); - console.log('maticNfts', maticNfts); - ``` - - -# Testing the Script - -To test the script, make sure you have typescript installed by running this command, in the root of terminal: - - - ```shell shell - npm install -g typescript - ``` - - -Next, you need to compile your TypeScript file by running the following command: - - - ```shell shell - tsc src/index.ts - ``` - - -This will generate a JavaScript file called index.js in the same directory as your index.ts file. You can then run the index.js file using Node.js: - - - ```shell shell - node src/index.js - ``` - - -Finally, it will log the `mainnetNfts` and `maticNfts` for the given owner in your terminal 🎉 - - - ```shell shell - mainnetNfts { - ownedNfts: [ - { - contract: [Object], - tokenId: '1', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-17T16:10:26.611Z', - metadataError: undefined, - rawMetadata: {}, - tokenUri: [Object], - media: [], - spamInfo: [Object], - balance: 26 - }, - { - contract: [Object], - tokenId: '2', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-17T14:43:29.829Z', - metadataError: undefined, - rawMetadata: {}, - tokenUri: [Object], - media: [], - spamInfo: [Object], - balance: 31 - }, - { - contract: [Object], - tokenId: '3', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-17T15:55:26.778Z', - metadataError: undefined, - rawMetadata: {}, - tokenUri: [Object], - media: [], - spamInfo: [Object], - balance: 18 - }, - { - contract: [Object], - tokenId: '4', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-17T16:06:04.731Z', - metadataError: undefined, - rawMetadata: {}, - tokenUri: [Object], - media: [], - spamInfo: [Object], - balance: 33 - }, - { - contract: [Object], - tokenId: '5', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-17T16:05:53.096Z', - metadataError: undefined, - rawMetadata: {}, - tokenUri: [Object], - media: [], - spamInfo: [Object], - balance: 33 - } - ], - pageKey: 'MHgwMDAzODZlM2Y3NTU5ZDliNmEyZjVjNDZiNGFkMWE5NTg3ZDU5ZGMzOjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNTpmYWxzZQ==', - totalCount: 25853 - } - maticNfts { - ownedNfts: [ - { - contract: [Object], - tokenId: '2168', - tokenType: 'ERC721', - title: 'Process Series. Artdrop II. Natalie Portman', - description: 'Accursed Share is proud to present Captured Moment: The Master’s Process, the first NFT collection by photographer-to-the-stars Frederic Auerbach. The collection consists of NFT drops of process and master photos (1/1s) of five A-listers, plus airdrops. The stars in this collection are Benedict Cumberbatch, Natalie Portman, Sharon Stone, Mike Tyson and Zendaya.\n' + - '\n' + - 'The Process Series reveals the delicate behind-the-scenes construction required for the production of a Master work. It includes 1,700 NFTs of 30 unique photographs of different rarity (150, 100, 50, 25, 10, 5). \n' + - ' \n' + - 'For the Master Series, each celebrity will have their own NFT set, including: a dynamic NFT highlighting different aspects of the Master photo by displaying various edits of the image at different times of day; the high-res digital photo NFT of the Master (one per star); a high-res and autographed print of each Master photo, and a unique video NFT of the behind-the-scenes interview detailing Auerbach’s creative approach, from Process to Master.\n' + - '\n' + - 'Artdrop I corresponds to the Process Series. It is a slightly animated video NFT of a process photo of Zendaya’s 2013 Flaunt photoshoot by Frederic Auerbach. \n' + - '\n' + - 'Artdrop I is exclusively for the first 1000 wallets on the whitelist. It is stored on the Polygon blockchain.\n' + - '\n' + - '\n' + - 'Credits: Photography: Frederic Auerbach / Filmography: Gary Grenier / Producers: Accursed Share (Mónica Belevan, John Thomas Connor, Marcus de Ataide); André Antonelli, Frederic Auerbach, Eric Holdener / Engineer: Marcus de Ataide \n' + - '\n' + - 'Captured Moment: The Master’s Process is an Accursed Share production, in association with Frederic Auerbach. \n' + - '\n' + - 'Part of the proceeds from this project will be donated to Farm2People, Los Angeles.', - timeLastUpdated: '2023-01-31T11:45:48.853Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined, - balance: 1 - }, - { - contract: [Object], - tokenId: '1', - tokenType: 'ERC1155', - title: 'Forgotten Sketch #1', - description: '***Minting is currently live here: https://doodlesnft.shop.*** *First time minting of original AI sketches of the Doodles collection.* Doodles have quickly become one of the most actively traded and highly valued NFT collections on OpenSea. Before colorful Doodles graced the NFT world, each character first had to be sketched. For the first time, we are offering exquisite AI-generated sketches of each Doodle in the 10,000-piece collection. Close inspection of the each detailed drawing will reveal the artistic care and sophisticated AI that went into creating this collection. Over 100 different AI tools has been used in rendering these one-of-a kind sketches. No others will be produced like them. In this public offering, only one minting is available for each unique Doodle, and every owner will receive an individual ERC-721 token with proof of ownership on the Ethereum blockchain.', - timeLastUpdated: '2023-02-01T23:58:19.990Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined, - balance: 1 - }, - { - contract: [Object], - tokenId: '3232', - tokenType: 'ERC721', - title: 'Post by @rabbithole.lens', - description: "Crypto can be a scary place sometimes. But you're on a journey of a lifetime. The short term challenges don't dictate our destination. \n" + - '\n' + - 'The deeper you go, the brighter it gets.', - timeLastUpdated: '2023-02-01T19:24:49.335Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [], - spamInfo: undefined, - balance: 1 - }, - { - contract: [Object], - tokenId: '1', - tokenType: 'ERC1155', - title: "Ethereum World's Metaverse Genesis Chest", - description: "The Ethereum World's Metaverse Genesis Chest represents the access to an exclusive airdrop within the Ethereum Worlds' ecosystem. Claim your apt and take part in our [metaverse](https://www.ethereumtowers.world/?ps=50).", - timeLastUpdated: '2023-02-15T20:49:16.868Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined, - balance: 1 - }, - { - contract: [Object], - tokenId: '6702', - tokenType: 'ERC721', - title: 'Astrobot #6702', - description: 'Astrobots arrived on Earth from Deep Space. They can be funny, cute, grumpy or mysterious. BEWARE: not all of them are friendly!', - timeLastUpdated: '2023-01-31T10:47:18.461Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined, - balance: 1 - } - ], - pageKey: 'MHgwMzNmN2IyMGM5Y2ZlNGQwYTQxZDhlMTVkNDVmOGM3OTkzZTRlMzhhOjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMWEyZTpmYWxzZQ==', - totalCount: 2497 - } - ``` - - -# Conclusion - -In this tutorial, we have seen how to use the Alchemy SDK with multiple chains in a single application using the `AlchemyMultichainClient` class. We have also seen how to manage the different API keys and endpoints for different chains. With the knowledge gained from this tutorial, you can now start building your own multichain applications using the Alchemy SDK. diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/how-to-use-alchemy-sdk-with-typescript.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/how-to-use-alchemy-sdk-with-typescript.mdx deleted file mode 100644 index ac3056e4..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/how-to-use-alchemy-sdk-with-typescript.mdx +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: How to use Alchemy SDK with Typescript -description: Learn to build using the Alchemy SDK and TypeScript highlighting common errors. -subtitle: Learn to build using the Alchemy SDK and TypeScript highlighting common errors. -url: https://docs.alchemy.com/reference/how-to-use-alchemy-sdk-with-typescript -slug: reference/how-to-use-alchemy-sdk-with-typescript ---- - -TypeScript, a popular programming language, extends all the capabilities of JavaScript with the additional features such as static types, object-oriented programming (OOP) and much more. Why does this matter? - -These additional features come into play when you’re looking to create a scalable dApp with the best readable code, follow Object-Oriented Programming guidelines or simply write more reliable code. Let’s jump into examples that can take you deeper into this topic. - -If you are building your TypeScript project using the Alchemy SDK, you might notice that the code snippets from our docs written in JavaScript output errors. Though the Alchemy SDK, similar to Ethers.js, provides various JavaScript and TypeScript similarities, you’ll need to make a few small changes to configure your code. - -In this tutorial, we show you the changes you need to make so that you can utilize the Alchemy SDK in TypeScript. This example will show you how to check for the transaction history of an address on the ETH Mainnet. The following code snippets will include external and ERC-721 token transfers using the Alchemy SDK. - -In this section, we dive into the tutorial How to Get Transaction History for an Address on Ethereum to demonstrate how the JavaScript code should be configured to be executed using TypeScript. - -The JavaScript code to get transaction history for an address on Ethereum looks like this: - - - ```javascript Alchemy-SDK - // Setup: npm install alchemy-sdk - import { Alchemy, Network } from "alchemy-sdk"; - - const config = { - apiKey: "<-- ALCHEMY APP API KEY -->", - network: Network.ETH_MAINNET, - }; - const alchemy = new Alchemy(config); - - const data = await alchemy.core.getAssetTransfers({ - fromBlock: "0x0", - fromAddress: "0x5c43B1eD97e52d009611D89b74fA829FE4ac56b1", - category: ["external", "internal", "erc20", "erc721", "erc1155"], - }); - - console.log(data); - ``` - - -When you try to execute in a TypeScript file, here are example errors you may have received: - - - ```shell ERROR - Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - ``` - - -Or another error similar to this: - - - ```shell ERROR - error TS2769: No overload matches this call. - Overload 2 of 2, '(params: AssetTransfersParams): Promise', gave the following error. - Type '"external"' is not assignable to type 'AssetTransfersCategory'. - Overload 2 of 2, '(params: AssetTransfersParams): Promise', gave the following error. - Type '"internal"' is not assignable to type 'AssetTransfersCategory'. - Overload 2 of 2, '(params: AssetTransfersParams): Promise', gave the following error. - Type '"erc20"' is not assignable to type 'AssetTransfersCategory'. - Overload 2 of 2, '(params: AssetTransfersParams): Promise', gave the following error. - Type '"erc721"' is not assignable to type 'AssetTransfersCategory'. - Overload 2 of 2, '(params: AssetTransfersParams): Promise', gave the following error. - Type '"erc1155"' is not assignable to type 'AssetTransfersCategory'. - ``` - - -So what changes need to be made to make it compatible with TypeScript? Here are the two things to consider: - -Create an `async()` function: An asynchronous or async function is required alongside await to properly execute the Promise in TypeScript. - -Use the `AssetTransfersCategory` package: This package can be imported using the alchemy-sdk for Enumeration. Enums or Enumeration are data types representing constants supported in TypeScript. Unlike the JavaScript example that uses a raw string, TypeScript requires a typed Enum as the input since raw strings are not supported. - -JavaScript example requires raw string parameters: - - - ```shell shell - category: ["external", "internal", "erc20", "erc721", "erc1155"] - ``` - - -TypeScript example requires `AssetTransfersCategory` to be used instead of raw strings: - - - ```shell shell - category: [AssetTransfersCategory.EXTERNAL, AssetTransfersCategory.INTERNAL, AssetTransfersCategory.ERC20, AssetTransfersCategory.ERC721, AssetTransfersCategory.ERC1155] - ``` - - -Getting started: This will require a prior installation of the alchemy-SDK. Add the following code to `main.ts`. - -1. Install the Alchemy-SDK using the terminal/command line. - - - ```shell terminal - npm install alchemy-sdk - ``` - - -2. Import Alchemy, Network and AssetTransfersCategory using Alchemy-SDK. - - - ```javascript javascript - import { Alchemy, Network, AssetTransfersCategory } from "alchemy-sdk"; - ``` - - -3. Optional Config object, but defaults to demo api-key and eth-mainnet. - - - ```javascript javascript - const config = { - apiKey: "demo", // Replace with your Alchemy API key. - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(config); - ``` - - -4. Define the transaction and specify the required details to read the transfer. - - - ```javascript javascript - const getTransfer = async () => { - const data = await alchemy.core.getAssetTransfers({ - fromBlock: "0x0", - fromAddress: "0x5c43B1eD97e52d009611D89b74fA829FE4ac56b1", - category: [AssetTransfersCategory.EXTERNAL, AssetTransfersCategory.ERC1155], - }); - - console.log(data); - } - - getTransfer(); - ``` - - -5. Run this script by running the following command in your terminal: - - - ```shell shell - ts-node main.ts - ``` - - -## Additional enums - -**Are there more enums in the Alchemy SDK that should be used with TypeScript?** Yes! - -Here is a short list of enums exported in the Alchemy SDK ready to be used. Each link will direct you to Github highlighting more description for each. - -* [Network](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/Network.md): The supported networks by Alchemy. -* [TokenBalanceType](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/TokenBalanceType.md): Token Types for the `getTokenBalances()` endpoint. -* [NftTokenType](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/NftTokenType.md): An enum for specifying the token type on NFTs. NftSpamClassification: Potential reasons why an NFT contract was classified as spam. -* [NftFilters](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/NftFilters.md): Enum of NFT filters that can be applied to a getNftsForOwner or a getContractsForOwner request. -* [NftOrdering](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/NftOrdering.md): Enum of ordering that can be applied to a getNftsForOwner or a getContractsForOwner response. -* [SortingOrder](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/SortingOrder.md): Enum for representing the supported sorting orders of the API. -* [NftSaleMarketplace](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/NftSaleMarketplace.md): Enum representing the supported NFT marketplaces by the getNftSales endpoint. -* [NftSaleTakerType](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/NftSaleTakerType.md): Enum for specifying the taker type for the getNftSales endpoint. -* [RefreshState](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/RefreshState.md): The current state of the NFT contract refresh process. -* [OpenSeaSafelistRequestStatus](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/OpenSeaSafelistRequestStatus.md): An OpenSea collection's approval status. -* [AlchemySubscription](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/AlchemySubscription.md): This value is provided in the `method` field when creating an event filter on the Websocket Namespace. -* [WebhookVersion](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/WebhookVersion.md): The version of the webhook. All newly created webhooks default to V2. -* [WebhookType](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/WebhookType.md): The type of Webhook. -* [CommitmentLevel](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/CommitmentLevel.md): Commitment level of the target block with using methods in the DebugNamespace. -* [DebugTracerType](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/enums/DebugTracerType.md): The type of tracer to use when running debug methods in the DebugNamespace. diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/using-the-alchemy-sdk.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/using-the-alchemy-sdk.mdx deleted file mode 100644 index 4296b5ee..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-quickstart/using-the-alchemy-sdk.mdx +++ /dev/null @@ -1,563 +0,0 @@ ---- -title: Examples Using the Alchemy SDK -description: Real-world examples on how to query information from the blockchain using the most powerful Web3 SDK. -subtitle: Real-world examples on how to query information from the blockchain using the most powerful Web3 SDK. -url: https://docs.alchemy.com/reference/using-the-alchemy-sdk -slug: reference/using-the-alchemy-sdk ---- - -If you're looking to start using the Alchemy SDK, but want some plug-and-play examples on how to get started with common use cases, here's the place to start! We'll walk you through setting up the Alchemy SDK and a variety of basic tasks you can do. - -# Setting up the Alchemy SDK - -This guide assumes you already have an [Alchemy account](https://alchemy.com/?r=e68b2f77-7fc7-4ef7-8e9c-cdfea869b9b5) and access to our [Dashboard](https://dashboard.alchemyapi.io). - -## 1. Create an Alchemy Key - -To access Alchemy's free node infrastructure, you need an API key to authenticate your requests. - -You can [create API keys from the dashboard](http://dashboard.alchemyapi.io). Check out this video on how to create an app: - -Or follow the written steps below: - -First, navigate to the "create app" button in the "Apps" tab. - -![3584](693457a-Getting_Started.png "Getting Started.png") - -Fill in the details under "Create App" to get your new key. You can also see apps you previously made and those made by your team here. Pull existing keys by clicking on "View Key" for any app. - -![](d6172a5-Create_App_Details.png "Create App Details.png") - -You can also pull existing API keys by hovering over "Apps" and selecting one. You can "View Key" here, as well as "Edit App" to whitelist specific domains, see several developer tools, and view analytics. - -![](f0dbb19-ezgif.com-gif-maker_1.gif "ezgif.com-gif-maker (1).gif") - -## 2. Install and set up the Alchemy SDK - -To install the Alchemy SDK, you want to create a project, and then navigate to your project directory to run the installation. Let's go ahead and do that! Once we're in our home directory, let's execute the following: - -With NPM: - - - ```shell NPM - mkdir your-project-name - cd your-project-name - npm init # (or npm init --yes) - npm install alchemy-sdk - ``` - - -Next, create a file named `index.js` and add the following contents: - - - You should ultimately replace `demo` with your Alchemy HTTP API key. - - - - ```javascript index.js - // Setup: npm install alchemy-sdk - const { Network, Alchemy } = require("alchemy-sdk"); - - // Optional Config object, but defaults to demo api-key and eth-mainnet. - const settings = { - apiKey: "demo", // Replace with your Alchemy API Key. - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - async function main() { - const latestBlock = await alchemy.core.getBlockNumber(); - console.log("The latest block number is", latestBlock); - } - - main(); - ``` - - -Unfamiliar with the async stuff? Check out this [Medium post](https://betterprogramming.pub/understanding-async-await-in-javascript-1d81bb079b2c). - -## 3. Run your dApp using Node - - - ```shell shell - node index.js - ``` - - -You should now see the latest block number output in your console! - - - ```shell shell - The latest block number is 11043912 - ``` - - -## 4. Import SDK Utils (Optional) - -Optionally, you can import [SDK utils](/reference/sdk-ethers-utils) to perform certain operations, such as parsing ETH to Wei as shown in the example below: - - - ```javascript javascript - const { Network, Alchemy, Utils } = require("alchemy-sdk"); - - const settings = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your Network - }; - - const alchemy = new Alchemy(settings); - - async function main() { - const gasEstimate = await alchemy.core.estimateGas({ - to: "vitalik.eth", - // parsing 1 ETH to wei using Utils - value: Utils.parseEther("1.0"), - }); - console.log(gasEstimate); - } - - main(); - ``` - - -Below, we'll list a number of examples on how to make common requests on Ethereum or EVM blockchains. - -## SDK Core Endpoint Examples - -### [How to Get the Latest Block Number on Ethereum](/reference/eth-blocknumber) - -A block is generated on Ethereum approximately every 15 seconds. If you're looking for the latest block, you can plug in the following: - - - ```typescript typescript - async function main() { - const latestBlock = await alchemy.core.getBlockNumber(); - console.log("The latest block number is", latestBlock); - } - - main(); - ``` - - -### [How to Get a Block By Its Block Hash on Ethereum](/reference/eth-getblockbyhash) - -Every block on Ethereum correspond to a specific hash. If you'd like to look up a block by its hash, you can plug in the following code: - - - ```typescript typescript - async function main() { - const block = await alchemy.core.getBlock( - "0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3" - ); - console.log(block); - } - - main(); - ``` - - -### [How to Get a Block By Its Block Number on Ethereum](/reference/eth-getblockbynumber) - -Every block on Ethereum correspond to a specific number. If you'd like to look up a block by its number, you can plug in the following code: - - - ```typescript typescript - async function main() { - const block = await alchemy.core.getBlock(15221026); - console.log(block); - } - - main(); - ``` - - -### [How to Get Logs for an Ethereum Transaction](/reference/eth-getlogs) - -Logs are essentially a published list of user-defined events that have happened on the blockchain during an Ethereum transaction. You can learn more about them in [Understanding Logs: Deep Dive into eth\_getLogs](/docs/deep-dive-into-eth_getlogs). - -Here's an example on how to write a getLogs query on Ethereum: - - - ```typescript typescript - async function main() { - const getLogs = await alchemy.core.getLogs({ - address: "0xdAC17F958D2ee523a2206206994597C13D831ec7", - topics: [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - ], - blockHash: - "0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0", - }); - console.log(getLogs); - } - - main(); - ``` - - -### [How to Make an Eth\_Call on Ethereum](/reference/eth-call) - -An eth\_call in Ethereum is essentially a way to execute a message call immediately without creating a transaction on the block chain. It can be used to query internal contract state, to execute validations coded into a contract or even to test what the effect of a transaction would be without running it live. - -Here's an example on how to write a call query on Ethereum: - - - ```typescript typescript - async function main() { - const call = await alchemy.core.call({ - to: "0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41", - gas: "0x76c0", - gasPrice: "0x9184e72a000", - data: "0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558", - }); - console.log(call); - } - - main(); - ``` - - -### [How to Get a Transaction by Its Hash on Ethereum](/reference/eth-gettransactionbyhash) - -Every transaction on Ethereum correspond to a specific hash. If you'd like to look up a transaction by its hash, you can plug in the following code: - - - ```typescript typescript - async function main() { - const tx = await alchemy.core.getTransaction( - "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b" - ); - console.log(tx); - } - - main(); - ``` - - -### [How to Get a Transaction Receipt on Ethereum](/reference/eth-gettransactionreceipt) - -Every transaction on Ethereum has an associated receipt with metadata about the transaction, such as the gas used and logs printed during the transaction. If you'd like to look up a transaction's receipt, you can plug in the following code: - - - ```typescript typescript - async function main() { - const txReceipt = await alchemy.core.getTransactionReceipt( - "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b" - ); - console.log(txReceipt); - } - - main(); - ``` - - -### [How to get a User's Transaction Count on Ethereum](/reference/eth-gettransactioncount) - -The number of transactions a user has sent is particularly important when it comes to calculating the [nonce for sending new transactions on Ethereum](/docs/ethereum-transactions-pending-mined-dropped-replaced). Without it, you'll be unable to send new transactions because your nonce won't be set correctly. - - - ```typescript typescript - async function main() { - const txCount = await alchemy.core.getTransactionCount( - "0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41" - ); - console.log(txCount); - } - - main(); - ``` - - -### [How to Fetch Historical Transactions on Ethereum](/reference/alchemy-getassettransfers) - -Oftentimes, you'll want to look up a set of transactions on Ethereum between a set of blocks, corresponding to a set of token types such as ERC20 or ERC721, or with certain attributes. Alchemy's proprietary Transfers API allows you to do so in milliseconds, rather than searching every block on the blockchain. - - - ```typescript typescript - async function main() { - const getTransfers = alchemy.core.getAssetTransfers({ - fromBlock: "0x0", - toBlock: "latest", - toAddress: ["vitalik.eth"], - excludeZeroValue: true, - category: ["erc721"], - }); - console.log(getTransfers); - } - - main(); - ``` - - -### [How to Estimate the Gas of a Transaction on Ethereum](/reference/eth-estimategas) - -Oftentimes, you'll need to calculate how much gas a particular transaction will use on the blockchain to understand the maximum amount that you'll pay on that transaction. This example will return the gas used by the specified transaction: - - - ```typescript typescript - async function main() { - const gasEstimate = await alchemy.core.estimateGas({ - // ETH address - to: "vitalik.eth", - // 1 ether - value: Utils.parseEther("1.0"), - }); - console.log(gasEstimate); - } - - main(); - ``` - - -### [How to Get the Current Gas Price in Ethereum](/reference/eth-gasprice) - -You can retrieve the current gas price in wei using this method: - - - ```typescript typescript - async function main() { - const gasPrice = await alchemy.core.getGasPrice(); - console.log(gasPrice); - } - - main(); - ``` - - -## SDK Websocket Examples - -### [How to Subscribe to New Blocks on Ethereum](/reference/subscription-api) - -If you'd like to open a WebSocket subscription to send you a JSON object whenever a new block is published to the blockchain, you can set one up using the following syntax. - - - ```typescript typescript - // Subscription for new blocks on Eth Mainnet. - alchemy.ws.on("block", (blockNumber) => - console.log("The latest block number is", blockNumber) - ); - ``` - - -### [How to Subscribe to Pending Transactions on Ethereum](/reference/subscription-api) - -Alchemy exposes a proprietary WebSockets endpoint *pendingTransactions* that allows you to receive a JSON object whenever a pending transaction matching a set of requirements is submitted or confirmed on the blockchain. - -In the following example, you can receive a JSON object whenever a pending transaction is submitted with the recipient as Vitalik Buterin's contract address. - - - ```typescript typescript - // Subscription for Alchemy's pendingTransactions Enhanced API - alchemy.ws.on( - { - method: "alchemy_pendingTransactions", - toAddress: "vitalik.eth", - }, - (tx) => console.log(tx) - ); - ``` - - -## SDK NFT API Examples - -### [How to Check the Owner of an NFT](/reference/getownersfortoken) - -If you'd like to identify which contract address currently owns a specific NFT, you can use Alchemy's proprietary NFT API to search the blockchain. See the example below: - - - ```typescript typescript - async function main() { - // TIMEPieces contract address - const address = "0xDd69da9a83ceDc730bc4d3C56E96D29Acc05eCDE"; - - // Safe Haven Token ID - const tokenId = 4254; - - // Get owner of NFT - const owner = await alchemy.nft.getOwnersForNft(address, tokenId); - console.log(owner); - } - - main(); - ``` - - -### [How to get All NFTs in a Collection](/reference/getnftsforcollection) - -If you'd like to print the metadata of all the NFTs in a specific collection, you can use Alchemy's proprietary NFT API to search the blockchain. See the example below: - - - ```typescript typescript - async function main() { - // Contract address - const address = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - // Flag to omit metadata - const omitMetadata = false; - - // Get all NFTs - const { nfts } = await alchemy.nft.getNftsForContract(address, { - omitMetadata: omitMetadata, - }); - - let i = 1; - - for (let nft of nfts) { - console.log(`${i}. ${nft.rawMetadata.image}`); - i++; - } - } - - main(); - ``` - - -### [How to Get All NFTs Owned by an Address](/reference/getnfts) - -If you'd like to retrieve all the NFTs owned by a specific user address, you can use Alchemy's proprietary NFT API to search the blockchain. See these example below: - - - ```typescript typescript - async function main() { - // Get all NFTs - const nfts = await alchemy.nft.getNftsForOwner("elanhalpern.eth"); - // Print NFTs - console.log(nfts); - } - - main(); - ``` - - -## SDK Transact Examples - -### [How to Send a Transaction to the Blockchain](/reference/sdk-sendtransaction) - -One of the most common requests is sending a transaction to be mined onto the blockchain. Here's some example code showing you how to make a transaction from scratch, sign it, and send it to be confirmed. - - - ```typescript typescript - import { Network, Alchemy, Wallet, Utils } from "alchemy-sdk"; - import dotenv from "dotenv"; - dotenv.config(); - - const { API_KEY, PRIVATE_KEY } = process.env; - - const settings = { - apiKey: API_KEY, - network: Network.ETH_GOERLI, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - const wallet = new Wallet(PRIVATE_KEY); - - const transaction = { - to: "0xa238b6008Bc2FBd9E386A5d4784511980cE504Cd", - value: Utils.parseEther("0.001"), - gasLimit: "21000", - maxPriorityFeePerGas: Utils.parseUnits("5", "gwei"), - maxFeePerGas: Utils.parseUnits("20", "gwei"), - nonce: await alchemy.core.getTransactionCount(wallet.getAddress()), - type: 2, - chainId: 5, // Corresponds to ETH_GOERLI - }; - - const rawTransaction = await wallet.signTransaction(transaction); - await alchemy.transact.sendTransaction(rawTransaction); - ``` - - -### [How to Send a Private Transaction to the Blockchain](/docs/how-to-send-a-private-transaction-on-ethereum) - -If you're worried about your transactions being front-run on Ethereum, Flashbots has created a tool to allow you to submit transactions without exposing them to the entire blockchain! It provides greater privacy while maintaining all the features of sendTransaction. - - - ```typescript typescript - import { Network, Alchemy, Wallet, Utils } from "alchemy-sdk"; - import dotenv from "dotenv"; - dotenv.config(); - - const { API_KEY, PRIVATE_KEY } = process.env; - - const settings = { - apiKey: API_KEY, - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - const wallet = new Wallet(PRIVATE_KEY); - - const transaction = { - to: "0xa238b6008Bc2FBd9E386A5d4784511980cE504Cd", - value: Utils.parseEther("0.001"), - gasLimit: "21000", - maxPriorityFeePerGas: Utils.parseUnits("5", "gwei"), - maxFeePerGas: Utils.parseUnits("20", "gwei"), - nonce: await alchemy.core.getTransactionCount(wallet.getAddress()), - type: 2, - chainId: 1, // Corresponds to ETH_MAINNET - }; - - const rawTransaction = await wallet.signTransaction(transaction); - alchemy.transact.sendPrivateTransaction(rawTransaction).then(console.log); - ``` - - -## SDK Notify Examples - -### [How to Create an Alchemy Notify Webhook](/reference/sdk-create-webhook) - -If you'd like to set up a Webhook to alert you when a pending transaction is submitted, mined, or when activity happens on an NFT address, we have a simple CRUD API that lets you create, update, and delete our Notify Webhooks programmatically. - - - ```typescript typescript - // Setup: npm install alchemy-sdk - // Github: https://github.com/alchemyplatform/alchemy-sdk-js - import { Alchemy, Network, WebhookType } from "alchemy-sdk"; - - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const settings = { - authToken: "your-notify-auth-token", - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - const minedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.MINED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - const droppedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.DROPPED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - const addressActivityWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.ADDRESS_ACTIVITY, - { - addresses: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96010"], - network: Network.ETH_MAINNET, - } - ); - - const nftActivityWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.NFT_ACTIVITY, - { - filters: [ - { - contractAddress: "0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656", - tokenId: "234", - }, - ], - network: Network.ETH_MAINNET, - } - ); - ``` - diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-surface-overview/alchemy-sdk-api-surface-overview.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-surface-overview/alchemy-sdk-api-surface-overview.mdx deleted file mode 100644 index 77304125..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-surface-overview/alchemy-sdk-api-surface-overview.mdx +++ /dev/null @@ -1,369 +0,0 @@ ---- -title: Alchemy SDK Surface Overview -description: An in-depth look at the APIs available in the Alchemy SDK and how it differs from Ethers.js. -subtitle: An in-depth look at the APIs available in the Alchemy SDK and how it differs from Ethers.js. -url: https://docs.alchemy.com/reference/alchemy-sdk-api-surface-overview -slug: reference/alchemy-sdk-api-surface-overview ---- - - - [If you'd like to start writing code immediately with the SDK, go here!](/reference/alchemy-sdk-quickstart) - - -The Alchemy SDK is the most comprehensive, stable, and powerful Javascript SDK available today to interact with the blockchain. - -It supports the exact same syntax and functionality of the Ethers.js AlchemyProvider and WebSocketProvider, making it a 1:1 mapping for anyone using the Ethers.js Provider. However, it adds a significant amount of improved functionality on top of Ethers, such as easy access to Alchemy's Enhanced and NFT APIs, robust WebSockets, and quality-of life improvements such as automated retries. - -The SDK currently supports the following chains: - -* **Ethereum**: Mainnet, Sepolia -* **Polygon**: Mainnet, Amoy -* **Optimism**: Mainnet, Sepolia -* **Arbitrum**: Mainnet, Sepolia -* **Astar**: Mainnet -* **Polygon zkEVM**: Mainnet, Testnet - -# API Surface - -The Alchemy SDK currently supports five different namespaces, including: - -* `core`: All commonly-used Ethers.js Provider methods and Alchemy Enhanced API methods -* `nft`: All Alchemy NFT API methods -* `ws`: All WebSockets methods -* `notify`: CRUD endpoints for modifying Alchemy Notify Webhooks -* `debug`: Methods to inspect and replay transactions and blocks - -If you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` and it should just work. - - - The Alchemy SDK now supports ENS names (e.g. `vitalik.eth`) for every parameter where you can pass in an Externally Owned Address, or user address (e.g. `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`) - - - - ```javascript ENS Name Resolution - import { Alchemy, AlchemySubscription } from 'alchemy-sdk'; - - // Using default settings - pass in a settings object to specify your API key and network - const alchemy = new Alchemy(); - - // Access standard Ethers.js JSON-RPC node request - alchemy.core.getBlockNumber().then(console.log); - - // Access Alchemy Enhanced API requests - alchemy.core - .getTokenBalances('0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE') - .then(console.log); - - // Access the Alchemy NFT API - alchemy.nft.getNftsForOwner('vitalik.eth').then(console.log); - - // Access WebSockets and Alchemy-specific WS methods - alchemy.ws.on( - { - method: AlchemySubscription.PENDING_TRANSACTIONS - }, - res => console.log(res) - ); - ``` - - -The Alchemy SDK also supports a number of Ethers.js objects that streamline the development process: - -* [`Utils`](https://docs.ethers.io/v5/api/utils/): Equivalent to `ethers.utils`, this provides a number of common Ethers.js utility methods for developers. - * [`Interface`](https://docs.ethers.io/v5/api/utils/abi/interface/): Found in `Utils.Interface`, this class abstracts the encoding and decoding required to interact with contracts on the Ethereum network. -* [`Contract`](https://docs.ethers.io/v5/api/contract/contract/): An abstraction for smart contract code deployed to the blockchain. -* [`ContractFactory`](https://docs.ethers.io/v5/api/contract/contract-factory/): Allows developers to build a `Contract` object. -* [`Wallet`](https://docs.ethers.io/v5/api/signer/#Wallet): An implementation of `Signer` that can sign transactions and messages using a private key as a standard Externally Owned Account. - -# Alchemy Settings - -An `AlchemySettings` object can be passed on instantiation to the Alchemy object, with the following optional parameters: - -* `apiKey`: API key that can be found in the Alchemy dashboard. Defaults to `demo`: a rate-limited public key. -* `network`: Name of the network. Defaults to `Network.ETH_MAINNET` -* `maxRetries`: The maximum number of retries to attempt if a request fails. Defaults to 5. -* `url`: Optional URL endpoint to use for all requests. Setting this field will override the URL generated by the `network` and`apiKey` fields. -* `authToken`: Alchemy auth token required to use the Notify API. This token can be found in the Alchemy Dashboard on the [Webhooks tab](https://dashboard.alchemy.com/webhooks). -* `batchRequests`: Optional setting that automatically batches and sends json-rpc requests for higher throughput and reduced network IO. Defaults to false. -* `requestTimeout`: Optional setting that sets the timeout for requests in milliseconds for the NFT and Notify namespaces. Defaults to no timeout. - -# Alchemy Core - -The core package contains all commonly-used [Ethers.js Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) methods. If you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` and it should just work. - -It also includes the majority of Alchemy Enhanced APIs, including: - -* `getTokenMetadata()`: Get the metadata for a token contract address. -* `getTokenBalances()`: Gets the token balances for an owner given a list of contracts. -* `getAssetTransfers()`: Get transactions for specific addresses. -* `getTransactionReceipts()`: Gets all transaction receipts for a given block. - -You will also find the following utility methods: - -* `findContractDeployer()`: Find the contract deployer and block number for a given contract address. - -## Accessing the full Ethers.js Provider - -To keep the package clean, we don't support certain uncommonly-used Ethers.js Provider methods as top-level methods the Alchemy `core` namespace - for example, `provider.formatter`. If you'd like to access these methods, simply use the `alchemy.config.getProvider()` function to configure the Ethers.js [AlchemyProvider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) and return it. - - - ```javascript SDK.js - import { Alchemy } from 'alchemy-sdk'; - const alchemy = new Alchemy(); - - async function runAlchemy() { - const ethersProvider = await alchemy.config.getProvider(); - console.log(ethersProvider.formatter); - } - runAlchemy(); - ``` - - -# Alchemy WebSockets - -In addition to the built-in Ethers.js listeners, the Alchemy SDK includes support for [Alchemy's Subscription API](/reference/subscription-api) . This allows you to subscribe to events and receive updates as they occur. - -The `alchemy.ws` instance can be used can be used like the standard Ethers.js [WebSocketProvider](https://docs.ethers.io/v5/api/providers/other/#WebSocketProvider) to add listeners for Alchemy events: - - - ```javascript WebSockets.js - import { Alchemy } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - // Listen to all new pending transactions. - alchemy.ws.on( - { - method: 'alchemy_pendingTransactions' - }, - res => console.log(res) - ); - - // Listen to only the next transaction on the USDC contract. - alchemy.ws.once( - { - method: 'alchemy_pendingTransactions', - toAddress: 'vitalik.eth' - }, - res => console.log(res) - ); - - // Remove all listeners. - alchemy.ws.removeAllListeners(); - ``` - - -The SDK brings multiple improvements to ensure correct WebSocket behavior in cases of temporary network failure or dropped connections. As with any network connection, you should not assume that a WebSocket will remain open forever without interruption, but correctly handling dropped connections and reconnection by hand can be challenging to get right. `alchemy-sdk` automatically handles these failures with no configuration necessary. - -The main benefits are: - -* **Resilient event delivery:** Unlike standard Web3.js or Ethers.js, you will not permanently miss events which arrive while the backing WebSocket is temporarily down. Instead, you will receive these events as soon as the connection is reopened. Note that if the connection is down for more than 120 blocks (approximately 20 minutes), you may still miss some events that were not part of the most recent 120 blocks. -* **Lowered rate of failure:** Compared to standard Web3.js or Ethers.js, there are fewer failures when sending requests over the WebSocket while the connection is down. Alchemy Web3 will attempt to send the requests once the connection is reopened. Note that it is still possible, with a lower likelihood, for outgoing requests to be lost, so you should still have error handling as with any network request. - -# Alchemy NFT API - -The SDK currently supports the following [NFT API endpoints ]()under the `alchemy.nft` namespace: - -* `getNftMetadata()`: Get the NFT metadata for an NFT contract address and tokenId. -* `getNftMetadataBatch()`: Get the NFT metadata for multiple NFT contract addresses/token id pairs. -* `getContractMetadata()`: Get the metadata associated with an NFT contract -* `getContractsForOwner()`: Get all NFT contracts that the provided owner address owns. -* `getNftsForOwner()`: Get NFTs for an owner address. -* `getNftsForOwnerIterator()`: Get NFTs for an owner address as an async iterator (handles paging automatically). -* `getNftsForContract()`: Get all NFTs for a contract address. -* `getNftsForContractIterator()`: Get all NFTs for a contract address as an async iterator (handles paging automatically). -* `getOwnersForNft()`: Get all the owners for a given NFT contract address and a particular token ID. -* `getOwnersForContract()`: Get all the owners for a given NFT contract address. -* `verifyNftOwnership()`: Check whether the provided owner address owns the provided NFT contract addresses. -* `isSpamContract()`: Check whether the given NFT contract address is a spam contract as defined by Alchemy (see the [NFT API FAQ](/reference/nft-api-quickstart)) -* `getSpamContracts()`: Returns a list of all spam contracts marked by Alchemy. -* `refreshNftMetadata()`: Refresh the cached NFT metadata for a contract address and a single tokenId. -* `refreshContract()`: Enqueues the specified contract address to have all token ids' metadata refreshed. -* `getFloorPrice()`: Return the floor prices of a NFT contract by marketplace. -* `computeRarity()`: Get the rarity of each attribute of an NFT. -* `getNftSales()`: Returns NFT sales that have happened through on-chain marketplaces. -* `summarizeNftAttributes()`: Get the summary of attribute prevalence for all NFTs in a contract. -* `searchContractMetadata()`: Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. - -## Pagination - -The Alchemy NFT endpoints return 100 results per page. To get the next page, you can pass in the `pageKey` returned by the previous call. To simplify paginating through all results, the SDK provides the `getNftsIterator()` and `getNftsForCollectionIterator()` functions that automatically paginate through all NFTs and yields them via an `AsyncIterable`. - -Here's an example of how to paginate through all the NFTs in Vitalik's ENS address: - - - ```javascript javascript - import { Alchemy } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - async function main() { - const ownerAddress = 'vitalik.eth'; - for await (const nft of alchemy.nft.getNftsForOwnerIterator(ownerAddress)) { - console.log('ownedNft:', nft); - } - } - - main(); - ``` - - -## SDK vs NFT API Differences - -The NFT API in the SDK standardizes response types to reduce developer friction, but note this results in some differences compared to the Alchemy REST endpoints: - -* Methods referencing `Collection` have been renamed to use the name `Contract` for greater accuracy: e.g. `getNftsForContract`. -* Some methods have different naming that the REST API counterparts in order to provide a consistent API interface ( e.g. `getNftsForOwner()` is `alchemy_getNfts`, `getOwnersForNft()` is `alchemy_getOwnersForToken`). -* SDK standardizes to `omitMetadata` parameter (vs. `withMetadata`). -* Standardization to `pageKey` parameter for pagination (vs. `nextToken`/`startToken`) -* Empty `TokenUri` fields are omitted. -* Token ID is always normalized to an integer string on `BaseNft` and `Nft`. -* Some fields omitted in the REST response are included in the SDK response in order to return an `Nft` object. -* Some fields in the SDK's `Nft` object are named differently than the REST response. - -# Alchemy Notify - -The [Alchemy Notify API](/reference/notify-api-quickstart) helps developers set up webhooks in their apps. The namespace provides methods to programmatically create, read, update, and delete your webhooks along with typings for the different webhooks. To learn more about Webhooks, please refer to the [Alchemy documentation](/reference/notify-api-quickstart#what-are-webhooks). - -Methods on the `NotifyNamespace` can be accessed via `alchemy.notify`. To use the methods, you must include your team's auth token in the `authToken` field of `AlchemySettings` when instantiating the SDK. The auth token can be found on the Alchemy Dashboard in the Notify Tab. - -Methods include: - -* `getAllWebhooks()`: Get all webhooks on your team. -* `getAddresses()`: Get all addresses tracked for the provided Address Activity Webhook. -* `getNftFilters()`: Get all NFT filters tracked for the provided NFT Activity Webhook. -* `createWebhook()`: Create a new webhook. -* `updateWebhook()`: Update an existing webhook's active status or tracked addresses and NFT filters. -* `deleteWebhook()`: Delete the provided webhook. - -# Alchemy Debug - -Methods on the `DebugNamespace` can be accessed via `alchemy.debug`. These methods are used for inspecting and debugging transactions. - -Methods include: - -* `traceCall()`: Run an eth\_call with the context of the provided block execution using the final state of the parent block as the base. -* `traceTransaction()`: Run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. -* `traceBlock()`: Replay a block that has already been mined. - -# Documentation - -The SDK is documented via `tsdoc` comments in the source code. The generated types and documentation are included when using an IDE. To browse the documentation separately, you can view the generated API interfaces in `etc/alchemy-sdk.api.md`. You can view generated Markdown files for each endpoint in the `docs-md` directory, or as a webpage by opening `docs/index.html` in your browser. - -# Usage Examples - -Below are a few usage examples. - - - For more examples using the Alchemy SDK, [visit here](/reference/using-the-alchemy-sdk). - - -## Getting the NFTs owned by an address - - - ```javascript Alchemy-SDK - import { Alchemy, NftExcludeFilters } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - // Get how many NFTs an address owns. - alchemy.nft.getNftsForOwner('vitalik.eth').then(nfts => { - console.log(nfts.totalCount); - }); - - // Get all the image urls for all the NFTs an address owns. - async function main() { - for await (const nft of alchemy.nft.getNftsForOwnerIterator('vitalik.eth')) { - console.log(nft.media); - } - } - - main(); - - // Filter out spam NFTs. - alchemy.nft - .getNftsForOwner('vitalik.eth', { - excludeFilters: [NftExcludeFilters.SPAM] - }) - .then(console.log); - ``` - - -## Getting all the owners of the BAYC NFT - - - ```javascript Alchemy-SDK - import { Alchemy } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - // Bored Ape Yacht Club contract address. - const baycAddress = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; - - async function main() { - for await (const nft of alchemy.nft.getNftsForContractIterator(baycAddress, { - // Omit the NFT metadata for smaller payloads. - omitMetadata: true - })) { - await alchemy.nft - .getOwnersForNft(nft.contract.address, nft.tokenId) - .then(response => - console.log('owners:', response.owners, 'tokenId:', nft.tokenId) - ); - } - } - - main(); - ``` - - -## Get all outbound transfers for a provided address - - - ```javascript Alchemy-SDK - import { Alchemy } from 'alchemy-sdk'; - - const alchemy = new Alchemy(); - - alchemy.core.getTokenBalances('vitalik.eth').then(console.log); - ``` - - -# Utils Object - -Alchemy provides a consolidated `Utils` object that supports a number of Debug - -Methods on the most commonly used utils from Ethers. These should `DebugNamespace` can be able to be accessed via `alchemy.debug`. These methods are used as a drop-in replacement for `ethers.utils`. inspecting and debugging transactions. - -* `dnsEncode` -* `hashMessage` -* `id` -* `isValidName` -* `namehash` -* `arrayify` -* `concat` -* `hexConcat` -* `hexDataSlice` -* `hexDataLength` -* `hexlify` -* `hexStripZeros` -* `hexValue` -* `hexZeroPad` -* `isBytes` -* `isBytesLike` -* `isHexString` -* `joinSignature` -* `zeroPad` -* `splitSignature` -* `stripZeros` -* `formatEther` - -# Questions and Feedback - - - We'd love your thoughts on what would improve your web3 dev process the most! If you have 5 minutes, tell us what you want at our [Feature Request feedback form](https://alchemyapi.typeform.com/sdk-feedback) and we'd love to build it for you: - - [https://alchemyapi.typeform.com/sdk-feedback](https://alchemyapi.typeform.com/sdk-feedback) - - -If you have any questions or feedback, please contact us at or open a ticket in the dashboard. diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-surface-overview/alchemy-sdk-vs-general-api-methods.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-surface-overview/alchemy-sdk-vs-general-api-methods.mdx deleted file mode 100644 index 658ff834..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-surface-overview/alchemy-sdk-vs-general-api-methods.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Alchemy SDK vs. Raw API Methods -description: A list of all Alchemy SDK methods and their corresponding General API methods -subtitle: A list of all Alchemy SDK methods and their corresponding General API methods -url: https://docs.alchemy.com/reference/alchemy-sdk-vs-general-api-methods -slug: reference/alchemy-sdk-vs-general-api-methods ---- - -| Alchemy SDK Methods | Raw API Methods | Use Case | -| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **SDK Core** | | | -| [call](/reference/sdk-call) | [eth\_call](/reference/eth-call) - Also available on Polygon, Arbitrum, Optimism, Astar. | Executes a new message call immediately without creating a transaction on the block chain. | -| [estimateGas](/reference/sdk-estimategas-1) | [eth\_estimateGas](/reference/eth-estimategas) - Also available on Polygon, Arbitrum, Optimism, Astar. | Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. | -| [findContractDeployer](/reference/sdk-findcontractdeployer) | | Finds the address that deployed the provided contract and block number it was deployed in. | -| [getAssetTransfers](/reference/sdk-getassettransfers) | [alchemy\_getAssetTransfers](/reference/alchemy-getassettransfers) - Transfers API | The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. | -| [getBalance](/reference/sdk-getbalance) | [eth\_getBalance](/reference/eth-getbalance), [getBalance](/reference/getbalance) (Solana) - Also available on Arbitrum, Polygon. | Returns the balance of the account of a given address. | -| [getBlock](/reference/sdk-getblock) | [getBlock](/reference/sdk-getblock) (Solana), [eth\_getBlockByHash](/reference/eth-getblockbyhash), [eth\_getBlockByNumber](/reference/eth-getblockbynumber) | Returns the block from the network based on the provided block number or hash. | -| [getBlockNumber](/reference/sdk-getblocknumber) | [eth\_blockNumber](/reference/eth-blocknumber) - Also available on Polygon, Arbitrum, Optimism, Astar. | Returns the number of the most recent block. | -| [getBlockWithTransactions](/reference/sdk-getblockwithtransactions) | [eth\_getBlockTransactionCountByHash](/reference/eth-getblocktransactioncountbyhash), [eth\_getBlockTransactionCountByNumber](/reference/eth-getblocktransactioncountbynumber) | Returns the block from the network based on the provided block number or hash. Includes fully transactions from the block. | -| [getCode](/reference/sdk-getcode) | [eth\_getCode](/reference/eth-getcode) - Also available on Polygon, Arbitrum, Optimism. | Returns code at a given address. | -| [feeData](/reference/sdk-feedata) | [eth\_maxPriorityFeePerGas](/reference/eth-maxpriorityfeepergas) - Also available on Arbitrum, Astar. | Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas should be used. For legacy transactions and networks which do not support EIP-1559, the gasPrice should be used. | -| [getGasPrice](/reference/sdk-getgasprice) | [eth\_gasPrice](/reference/eth-gasprice) - Also available on Polygon, Arbitrum, Optimism, Astar. | Returns the current price per gas in wei. | -| [getLogs](/reference/sdk-getlogs) | [eth\_getLogs](/reference/eth-getlogs) - Also available on Polygon, Arbitrum, Optimism. | Returns an array of all logs matching a given filter object. | -| [getStorageAt](/reference/sdk-getstorageat) | [eth\_getStorageAt](/reference/eth-getstorageat) - Also available on Polygon, Arbitrum, Optimism. | Returns the value from a storage position at a given address, or in other words, returns the state of the contract's storage, which may not be exposed via the contract's methods. | -| [getTokenBalances](/reference/sdk-gettokenbalances) | [alchemy\_getTokenBalances](/reference/alchemy-gettokenbalances) - Token API | Returns token balances for a specific address given a list of contracts. | -| [getTokenMetadata](/reference/sdk-gettokenmetadata) | [alchemy\_getTokenMetadata](/reference/alchemy-gettokenmetadata) - Token API | Returns metadata (name, symbol, decimals, logo) for a given token contract address. | -| [getTransactionCount](/reference/sdk-gettransactioncount) | [eth\_getTransactionCount](/reference/eth-gettransactioncount) - Also available on Polygon, Arbitrum, Optimism. | Returns the number of transactions sent from an address. | -| [getTransactionReceipt](/reference/sdk-gettransactionreceipt) | [eth\_getTransactionReceipt](/reference/eth-gettransactionreceipt) - Also available on Polygon. | Returns the receipt of a transaction by transaction hash. | -| [getTransactionReceipts](/reference/sdk-gettransactionreceipts) | [eth\_getTransactionReceiptsByBlock](/reference/eth-gettransactionreceiptsbyblock-polygon),[alchemy\_getTransactionReceipts](/reference/alchemy-gettransactionreceipts) | An Alchemy Enhanced API that gets all transaction receipts for a given block by number or block hash. Supported on all networks for Ethereum, Polygon, and Arbitrum. | -| [send](/reference/sdk-send) | | Allows sending a raw message to the Alchemy backend. | -| **SDK NFTs** | **NFT API** | | -| [getNftsForOwner](/reference/sdk-getnfts) | [getNFTs](/reference/getnfts) | Gets all NFTs currently owned by a given address. | -| [getNftMetadata](/reference/sdk-getnftmetadata) | [getNFTMetadata](/reference/getnftmetadata) | Gets the metadata associated with a given NFT. | -| [getContractMetadata](/reference/sdk-getcontractmetadata) | [getContractMetadata](/reference/getcontractmetadata) | Queries NFT high-level collection/contract level information. | -| [getNftsForContract](/reference/sdk-getnftsforcontract) | [getNFTsForCollection](/reference/getnftsforcollection) | Gets all NFTs for a given NFT contract. | -| [getOwnersForNft](/reference/get_apikey-getownersfornft) | [getOwnersForToken](/reference/getownersfortoken) | Get the owner(s) for a token. | -| [getOwnersForContract](/reference/sdk-getownersforcontract) | [getOwnersForCollection](/reference/getownersforcollection) | Gets all owners for a given NFT contract. | -| [getSpamContracts](/reference/sdk-getspamcontracts) | [getSpamContracts](/reference/getspamcontracts) | Returns a list of all spam contracts marked by Alchemy. | -| [isSpamContract](/reference/sdk-isspamcontract) | [isSpamContract](/reference/isspamcontract) | Returns whether a contract is marked as spam or not by Alchemy. | -| [refreshContract](/reference/sdk-refreshcontract) | [reingestContract](/reference/reingestcontract) | Triggers metadata refresh for an entire NFT collection and refreshes stale metadata after a collection reveal/collection changes. | -| [getFloorPrice](/reference/sdk-getfloorprice) | [getFloorPrice](/reference/getfloorprice) | Returns the floor prices of a NFT collection by marketplace. | -| [computeRarity](/reference/sdk-computerarity) | [computeRarity](/reference/computerarity) | Computes the rarity of each attribute of an NFT. | -| **SDK Transact** | | | -| [getTransaction](/reference/sdk-gettransaction) | [eth\_getTransactionByHash](/reference/eth-gettransactionbyhash) - Also available on Polygon, Arbitrum, Optimism, Astar. [getTransaction](/reference/gettransaction) (Solana) | Returns the information about a transaction requested by transaction hash or number. In the response object, blockHash, blockNumber, and transactionIndex are null when the transaction is pending. | -| [sendTransaction](/reference/sdk-sendtransaction) | [eth\_sendRawTransaction](/reference/eth-sendrawtransaction) - Also available on Polygon, Arbitrum, Optimism, Astar. [sendTransaction](/reference/sendtransaction) (Solana) | Creates a new message call transaction or a contract creation for signed transactions. | -| [waitForTransaction](/reference/sdk-waitfortransaction) | | Returns a promise which will not resolve until specified transaction hash is mined. If confirmations is 0, this method is non-blocking and if the transaction has not been mined returns null. Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in which it was mined. | -| **SDK Notify** | **Notify API** | | -| [getAllWebhooks](/reference/sdk-get-all-webhooks) | [team-webhooks](/reference/team-webhooks) | This endpoint allows you to get all webhooks from every app on your team. | -| [getAddresses](/reference/sdk-get-addresses-webhooks) | [webhook-addresses](/reference/webhook-addresses) | Paginated endpoint to list all of the addresses a given Address Activity webhook is subscribed to. | -| [getNftFilters](/reference/sdk-get-nft-filters-webhooks) | [webhook-nft-filters](/reference/webhook-nft-filters) | Paginated endpoint to list all of the NFT filter objects a given webhook is subscribed to. | -| [updateWebhook](/reference/sdk-update-webhook) | [update-webhook](/reference/update-webhook) | Allows you to update the state of an existing webhook. Input parameters is a webhook ID or object, followed by exactly one of the Update objects listed below. | -| [createWebhook](/reference/sdk-create-webhook) | [create-webhook](/reference/create-webhook) | This endpoint allows you to create a webhook. | -| [deleteWebhook](/reference/sdk-delete-webhook) | [delete-webhook](/reference/delete-webhook) | Allows you to delete a webhook. | diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-v2-to-v3-migration-guide/alchemy-sdk-v2-to-v3-migration-guide.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-v2-to-v3-migration-guide/alchemy-sdk-v2-to-v3-migration-guide.mdx deleted file mode 100644 index 1991a773..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-v2-to-v3-migration-guide/alchemy-sdk-v2-to-v3-migration-guide.mdx +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: Alchemy SDK V2 to V3 Migration Guide -description: Easily migrate from Alchemy SDK V2 to V3 with this guide. Learn about key differences, updated methods, and best practices for a seamless transition to the improved SDK V3. -subtitle: Easily migrate from Alchemy SDK V2 to V3 with this guide. Learn about key differences, updated methods, and best practices for a seamless transition to the improved SDK V3. -url: https://docs.alchemy.com/reference/alchemy-sdk-v2-to-v3-migration-guide -slug: reference/alchemy-sdk-v2-to-v3-migration-guide ---- - -# Table of Contents - -1. [Introduction](#introduction) -2. [Overview of Changes in Alchemy SDK V3](#overview-of-changes-in-alchemy-sdk-v3) -3. [Migrating from V2 to V3](#migrating-from-v2-to-v3) -4. [Conclusion](#conclusion) - -For a detailed overview of the differences between each Alchemy SDK method in V2 and V3, check out [Alchemy SDK V2 vs. V3 Method Differences](/reference/alchemy-sdk-v2-vs-v3-method-differences) - -# Introduction - -Welcome to the Alchemy SDK V2 to V3 Migration Guide! This guide has been designed to help you transition your projects from using the V2 version of our Alchemy SDK to the improved V3 version. This latest version uses the improved [NFT API V3](/reference/nft-api-v2-to-v3-migration-guide) at its core, bringing all its advantages to the SDK users as well. So, Upgrading to Alchemy SDK V3 will bring several advantages when dealing with the NFT related methods, such as more consistent response formats, stricter typing, and overall enhanced ease of use. We believe that the improvements made in V3 will enable developers to work more efficiently and create more robust applications. - - - This guide specifically focuses on migrating projects that use Alchemy SDK for interacting with the NFT API. - - The response formats and migration steps in this guide are not applicable to projects using direct API calls. For API call formats refer to [NFT API V2 to V3 Migration Guide](/reference/nft-api-v2-to-v3-migration-guide). - - -# Overview of Changes in Alchemy SDK V3 - -Since Alchemy SDK V3 uses the advanced [NFT API V3](/reference/nft-api-v2-to-v3-migration-guide) under the hood, it incorporates all the benefits of the NFT API V3 when handling NFT related methods. The improvements for NFT related methods include: - -1. **Strict Types**: In V3, all fields have a strict type (string, map, or integer), ensuring that you receive predictable and reliable data. - -2. **Mandatory fields**: Null Fields will always be available in the response. This differs from V2, where null fields were sometimes missing. - -3. **Consistent format across APIs**: All methods in V3 return a consistent format for every model. - -4. **Flat response format**: V3 responses aim to have a flat structure, making them easier to parse and consume. - -5. **Ease of consumption**: We've designed V3 responses with ease of consumption, helping you understand and utilize the data more quickly. - -6. **Checksummed addresses**: All addresses in V3 are checksummed addresses, whereas in V2, we served lowercased addresses. This change enhances the security and readability of addresses in the SDK. - -7. **Decimal String token IDs**: All token IDs are now served as decimal strings. In V2, token IDs were sometimes served as hexadecimal or decimal strings, which could lead to confusion and potential errors. - -The changes introduced in Alchemy SDK V3 are focused on providing developers a better, more consistent, and easier-to-use experience. The following sections will discuss the migration process and provide detailed mappings for each changed endpoint. - -*** - -# Migrating from V2 to V3 - -This section provides steps to migrate your existing projects from Alchemy SDK V2 to V3. We will use a sample script that interacts with the `getContractMetadata` method as an example to demonstrate the migration process. The steps are listed below. - -## Step 0: Analyzing The Existing Codebase - -Before starting the migration, let's take a look at an existing [node.js](https://nodejs.org/en) script using Alchemy SDK V2. This script retrieves contract metadata for a given contract address and prints the floor price and collection name. We will use this script as a basis for demonstrating the migration steps. - -**Existing V2 Script:** - - - ```javascript javascript - // imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the address whose contract metadata you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - // call the method to fetch metadata - const response = await alchemy.nft.getContractMetadata(address) - - console.log("Floor Price: ", response.openSea.floorPrice); - console.log("Collection Name: ", response.openSea.collectionName); - } - - main(); - ``` - - -To run the script given above, you need to have a `node.js` project setup with `alchemy-sdk` installed. If you don't, you can follow the steps given below: - -1. Create a new `node.js` project by running the following commands in your terminal - - ```Text npm - mkdir alchemy-sdk-project - cd alchemy-sdk-project - npm init --yes - ``` - -2. Install the `alchemy-sdk` library by running the command - - ```Text npm - npm i alchemy-sdk@latest - ``` - -3. Create a new file called `getContractMetadata.js` and paste the script given above into it - - ```Text npm - touch getContractMetadata.js - ``` - -4. Run the script with the command given below - - ```Text npm - node getContractMetadata.js - ``` - -5. You should see the output in your console - - ```shell bash - Floor Price: 0.001 - Collection Name: Undead Warriors - ``` - - -*** - -## Step 1: Update Your Alchemy SDK Version - -Update the Alchemy SDK version by running the following command in your terminal: - - - ```shell npm - npm i alchemy-sdk@v3-beta - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -*** - -## Step 2: Update Your Response Handling Code - -Since the response structure has changed in SDK V3, you will need to update your code to handle the new response format. Make sure to account for the changes in field names, data types, and structure as outlined in [Detailed Method Mappings](/reference/alchemy-sdk-v2-vs-v3-method-differences). - -For example, in the case of the `getContractMetadata` method's response, the `openSea` object has been renamed to `openSeaMetadata`. So we can update our existing script as follows: - -**Updated V3 Script:** - - - ```javascript javascript - // imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // configurs the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the address whose contract metadata you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - // call the method to fetch metadata - const response = await alchemy.nft.getContractMetadata(address); - - // Now using the OpenSeaMetadata object in V3 instead of the OpenSea object in V2 - console.log("Floor Price: ", response.openSeaMetadata.floorPrice); - console.log("Collection Name: ", response.openSeaMetadata.collectionName); - } - - main(); - ``` - - -*** - -## Step 3: Testing The Updated Script - -At this point, you have successfully migrated from Alchemy SDK V2 to V3, but before deploying the updated script to production, thoroughly test it to ensure it works as expected according to your application requirements. Verify that the output is correct and that there are no errors or unexpected behavior. - -1. Run the updated script in your development environment. In this case, run it with the given command - - ```shell shell - node getContractMetadata.js - ``` - -2. Compare the output to the output of the V2 script, making sure the data is consistent. - ```text - Floor Price: 0.001 - Collection Name: Undead Warriors - ``` - In this case, as you can see, we are getting the same output as before and getting the desired result. -3. Perform additional tests, such as providing different parameters (in this case, contract addresses), to ensure the script can handle various scenarios. -4. Verify that the script integrates correctly with other parts of your application, if applicable. - -After successful testing, you can confidently deploy the updated script to production, taking advantage of the improvements. - -*** - -# Conclusion - -In this migration guide, we've covered key changes and detailed the differences between V2 and V3. Alchemy SDK V3 offers numerous improvements, including consistent formatting, a flat response format, and ease of consumption when dealing with NFT-related methods. For a detailed look at the differences between V2 and V3 for each method, check out [Alchemy SDK V2 vs. V3 Method Differences](/reference/alchemy-sdk-v2-vs-v3-method-differences). - -We strongly encourage developers to upgrade to Alchemy SDK V3 to benefit from these improvements and to ensure the best possible experience when working with NFTs. - -By upgrading to Alchemy SDK V3, you'll be better equipped to build and maintain efficient applications, ensuring a seamless experience for your users. Happy coding diff --git a/fern/api-reference/alchemy-sdk/alchemy-sdk-v2-to-v3-migration-guide/alchemy-sdk-v2-vs-v3-method-differences.mdx b/fern/api-reference/alchemy-sdk/alchemy-sdk-v2-to-v3-migration-guide/alchemy-sdk-v2-vs-v3-method-differences.mdx deleted file mode 100644 index e7b88cfd..00000000 --- a/fern/api-reference/alchemy-sdk/alchemy-sdk-v2-to-v3-migration-guide/alchemy-sdk-v2-vs-v3-method-differences.mdx +++ /dev/null @@ -1,5976 +0,0 @@ ---- -title: Alchemy SDK V2 vs. V3 Method Differences -description: Detailed differences between Alchemy SDK V2 and V3 methods -subtitle: Detailed differences between Alchemy SDK V2 and V3 methods -url: https://docs.alchemy.com/reference/alchemy-sdk-v2-vs-v3-method-differences -slug: reference/alchemy-sdk-v2-vs-v3-method-differences ---- - -# Detailed Method Mappings - -This page aims to provide a comprehensive and detailed mapping of the changes that have occurred in each endpoint between Alchemy SDK V2 and V3. For each method, we will outline any changes in the method name, provide example requests in both V2 and V3, and present a mapping table highlighting the differences in the response structure (where applicable). Additionally, we will include examples of the V2 and V3 responses to help illustrate the changes. - -*** - -## [getFloorPrice - SDK](/reference/sdk-getfloorprice) - -Returns the floor prices of an NFT contract by marketplace. - -### Overview of Changes - -* An `error` field has been added to both `openSea` and `looksRare` objects in the response structure in V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to check the contract floor price - const response = await alchemy.nft.getFloorPrice(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------------------- | ----------------------------- | -| `openSea.floorPrice` | `openSea.floorPrice` | -| `openSea.priceCurrency` | `openSea.priceCurrency` | -| `openSea.collectionUrl` | `openSea.collectionUrl` | -| `openSea.retrievedAt` | `openSea.retrievedAt` | -| | `openSea.error` (New in V3) | -| `looksRare.floorPrice` | `looksRare.floorPrice` | -| `looksRare.priceCurrency` | `looksRare.priceCurrency` | -| `looksRare.collectionUrl` | `looksRare.collectionUrl` | -| `looksRare.retrievedAt` | `looksRare.retrievedAt` | -| | `looksRare.error` (New in V3) | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - openSea: { - floorPrice: 44.5, - priceCurrency: 'ETH', - collectionUrl: 'https://opensea.io/collection/boredapeyachtclub', - retrievedAt: '2023-06-19T00:07:11.601Z' - }, - looksRare: { - floorPrice: 43.65, - priceCurrency: 'ETH', - collectionUrl: 'https://looksrare.org/collections/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', - retrievedAt: '2023-06-19T00:07:11.639Z' - } - } - ``` - - -#### V3 Example Response - - - ```json json - { - "openSea": { - "floorPrice": 24.979951, - "priceCurrency": "ETH", - "collectionUrl": "https://opensea.io/collection/boredapeyachtclub", - "retrievedAt": "2023-09-21T15:22:06.168Z", - "error": undefined - }, - "looksRare": { - "floorPrice": 24.98, - "priceCurrency": "ETH", - "collectionUrl": "https://looksrare.org/collections/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - "retrievedAt": "2023-09-21T15:22:06.097Z", - "error": undefined - } - } - ``` - - -*** - -## [getNftsForOwner - SDK](/reference/sdk-getnfts) - -Get all NFTs for an owner. - -This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the `options` parameter by setting `omitMetadata` to `true` in the body of the request. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in the V3 response. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to an optional `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `blockHash` parameter has been removed in V3. -* The `metadataError` in V2 has been replaced with the `raw.error` parameter in the V3 response. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3, which contains the `tokenUri` and `metadata` parameters -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in V3. -* The `isSpam` and `classifications` parameters for `spamInfo` on V2 has been added to the `contract` object in V3. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. -* The `validAt` object has been added to the V3 response. It contains the `blockNumber`, `blockHash`, and `blockTimestamp` parameters. -* The `acquiredAt` object has been added to the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let owner = "vitalik.eth"; - - //Call the method to get the nfts owned by this address - let response = await alchemy.nft.getNftsForOwner(owner) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ----------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug` (New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl` (New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `tokenUri` | `tokenUri` | -| `title` | `name` | -| `description` | `description` | -| `metadataError` | `raw.error` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| - | `raw.tokenUri` | -| `media` | `image` | -| `spamInfo` | (Removed in V3 and moved to `contract`) | -| - | `collection` (New in V3) | -| - | `mint`(New in V3) | -| `balance` | `balance` | -| `timeLastUpdated` | `timeLastUpdated` | -| - | `validAt.blockNumber`(New in V3) | -| - | `validAt.blockHash`(New in V3) | -| - | `validAt.blockTimestamp`(New in V3) | -| `pageKey` | `pageKey` | -| `totalCount` | `totalCount` | -| `blockHash` | (Removed in V3) | -| - | `acquiredAt`(New in V3) | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "ownedNfts": [ - { - "contract": { - "address": "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "openSea": { - "collectionName": "BoredApeNikeClub", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "lastIngestedAt": "2023-07-15T19:05:35.000Z" - }, - "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe", - "deployedBlockNumber": 14276343 - }, - "tokenId": "1", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-19T10:54:51.000Z", - "metadataError": "Contract returned a broken token uri", - "rawMetadata": { - "metadata": [], - "attributes": [] - }, - "tokenUri": { - "gateway": "http://api.nikeapenft.xyz/ipfs/1", - "raw": "http://api.nikeapenft.xyz/ipfs/1" - }, - "media": [], - "spamInfo": { - "isSpam": true, - "classifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "balance": 26 - }, - { - "contract": { - "address": "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "openSea": { - "collectionName": "BoredApeNikeClub", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "lastIngestedAt": "2023-07-15T19:05:35.000Z" - }, - "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe", - "deployedBlockNumber": 14276343 - }, - "tokenId": "2", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-19T10:54:50.978Z", - "metadataError": "Contract returned a broken token uri", - "rawMetadata": { - "metadata": [], - "attributes": [] - }, - "tokenUri": { - "gateway": "http://api.nikeapenft.xyz/ipfs/2", - "raw": "http://api.nikeapenft.xyz/ipfs/2" - }, - "media": [], - "spamInfo": { - "isSpam": true, - "classifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "balance": 31 - }, - { - "contract": { - "address": "0x00703f9b11f2ac02d391a11e7b97c6ee80cd8563", - "name": "Elon Musk", - "symbol": "MUSK", - "tokenType": "ERC721", - "openSea": { - "collectionName": "ELON MUSK LICENSE", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/7O8H5tVTUPfi03LBY3xI29wkuzp8sSsRvr_BjOxXUfsU7mrkV7WxhOMedXKBp-dqDtCLjSfLwzWEMg6_yrxw8YPXC7OY9TqelDm9?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://elonmusknftworld.shop)", - "externalUrl": "https://elonmusknftworld.shop", - "lastIngestedAt": "2023-07-15T19:21:16.000Z" - }, - "contractDeployer": "0x69a3c97428bad2c431a70b886d4d03b042df5670", - "deployedBlockNumber": 14268680 - }, - "tokenId": "5", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-19T10:54:51.011Z", - "metadataError": "Contract returned a broken token uri", - "rawMetadata": { - "metadata": [], - "attributes": [] - }, - "tokenUri": { - "gateway": "http://api.elonmusknfts.xyz/ipfs/5", - "raw": "http://api.elonmusknfts.xyz/ipfs/5" - }, - "media": [], - "spamInfo": { - "isSpam": true, - "classifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "balance": 11 - } - ], - "pageKey": "MHgwMDcwM2Y5YjExZjJhYzAyZDM5MWExMWU3Yjk3YzZlZTgwY2Q4NTYzOjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNTpmYWxzZQ==", - "totalCount": 26525, - "blockHash": "0x7f9574679a4ee645fc34683464ee4c038cb968112c912cb7ddce46d5abdeac94" - } - ``` - - -#### V3 Example Response - - - ```json json - { - "ownedNfts": [ - { - "contract": { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-11T13:59:53.000Z" - }, - "isSpam": true, - "spamClassifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "tokenId": "1", - "tokenType": "ERC721", - "tokenUri": "http://api.nikeapenft.xyz/ipfs/1", - "image": {}, - "raw": { - "tokenUri": "http://api.nikeapenft.xyz/ipfs/1", - "metadata": {} - }, - "collection": { - "name": "BoredApeNikeClub", - "slug": "bored-ape-nike-club-v2", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-20T12:18:35.890Z", - "balance": "26", - "acquiredAt": {} - }, - { - "contract": { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-11T13:59:53.000Z" - }, - "isSpam": true, - "spamClassifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "tokenId": "2", - "tokenType": "ERC721", - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "image": {}, - "raw": { - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "metadata": {}, - "error": "Contract returned a broken token uri" - }, - "collection": { - "name": "BoredApeNikeClub", - "slug": "bored-ape-nike-club-v2", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-20T13:13:54.798Z", - "balance": "31", - "acquiredAt": {} - }, - { - "contract": { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-11T13:59:53.000Z" - }, - "isSpam": true, - "spamClassifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "tokenId": "2", - "tokenType": "ERC721", - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "image": {}, - "raw": { - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "metadata": {} - }, - "collection": { - "name": "BoredApeNikeClub", - "slug": "bored-ape-nike-club-v2", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T11:02:14.698Z", - "balance": "31", - "acquiredAt": {} - }, - ], - "pageKey": "MHgwMDcwM2Y5YjExZjJhYzAyZDM5MWExMWU3Yjk3YzZlZTgwY2Q4NTYzOjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNTpmYWxzZQ==", - "totalCount": 26585, - "validAt": { - "blockNumber": 18162406, - "blockHash": "0x670957987df0a8d0838a05a25d8a1945fbeea24f547a4e59e748c42a12d7cfce", - "blockTimestamp": "2023-09-18T11:02:47Z" - } - } - ``` - - -*** - -## [getNftMetadata - SDK](/reference/sdk-getnftmetadata) - -Get the NFT metadata associated with the provided parameters. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in the V3 response. -* The `contract` object in the V3 response now includes new parameters called `isSpam` and `spamClassifications`. -* The `isSpam` and `classifications` parameters for `spamInfo` on V2 has been added to the `contract` object in V3. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to an optional `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata.attributes` parameter has been removed and changed to `raw.metadata.attributes` in the V3 response. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3 response, which contains the `tokenUri`, `error` and `metadata` parameters -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let owner = "0xe785E82358879F061BC3dcAC6f0444462D4b5330"; - let tokenId = 44; - - //Call the method to get the nfts owned by this address - let response = await alchemy.nft.getNftMetadata(owner, tokenId) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ----------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `contract.openSea.floorPrice` | `contract.openSeaMetadata.floorPrice` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug` (New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl` (New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `tokenUri` | `tokenUri` | -| `title` | `name` | -| `description` | `description` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| `rawMetadata.error` | `raw.error` | -| - | `raw.tokenUri` | -| `media` | `image` | -| - | `collection` (New in V3) | -| - | `mint`(New in V3) | -| `timeLastUpdated` | `timeLastUpdated` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "contract": { - "address": "0xe785e82358879f061bc3dcac6f0444462d4b5330", - "name": "World Of Women", - "symbol": "WOW", - "totalSupply": "10000", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.7999, - "collectionName": "World of Women", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format", - "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.", - "externalUrl": "http://worldofwomen.art", - "twitterUsername": "worldofwomennft", - "discordUrl": "https://discord.gg/worldofwomen", - "lastIngestedAt": "2023-07-11T11:58:25.000Z" - }, - "contractDeployer": "0xc9b6321dc216d91e626e9baa61b06b0e4d55bdb1", - "deployedBlockNumber": 12907782 - }, - "tokenId": "44", - "tokenType": "ERC721", - "title": "WoW #44", - "description": "", - "timeLastUpdated": "2023-07-13T08:14:36.601Z", - "rawMetadata": { - "name": "WoW #44", - "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi", - "attributes": [ - { - "value": "Green Orange", - "trait_type": "Background" - }, - { - "value": "Medium Gold", - "trait_type": "Skin Tone" - }, - { - "value": "Green To The Left", - "trait_type": "Eyes" - }, - { - "value": "Freckles", - "trait_type": "Facial Features" - }, - { - "value": "Boy Cut", - "trait_type": "Hairstyle" - }, - { - "value": "Tunic", - "trait_type": "Clothes" - }, - { - "value": "Spikes", - "trait_type": "Earrings" - }, - { - "value": "Slight Smile", - "trait_type": "Mouth" - }, - { - "value": "Purple", - "trait_type": "Lips Color" - } - ] - }, - "tokenUri": { - "gateway": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "raw": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "raw": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi", - "format": "png", - "bytes": 105117 - } - ] - } - ``` - - -#### V3 Example Response - - - ```json json - { - "contract": { - "address": "0xe785E82358879F061BC3dcAC6f0444462D4b5330", - "name": "World Of Women", - "symbol": "WOW", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0xc9b6321dc216D91E626E9BAA61b06B0E4d55bdb1", - "deployedBlockNumber": 12907782, - "openSeaMetadata": { - "floorPrice": 0.6021, - "collectionName": "World of Women", - "collectionSlug": "world-of-women-nft", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format", - "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.", - "externalUrl": "http://worldofwomen.art", - "twitterUsername": "worldofwomennft", - "discordUrl": "https://discord.gg/worldofwomen", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format", - "lastIngestedAt": "2023-09-18T12:28:27.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "44", - "tokenType": "ERC721", - "name": "WoW #44", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "contentType": "image/png", - "size": 105117, - "originalUrl": "https://ipfs.io/ipfs/QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi" - }, - "raw": { - "tokenUri": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "metadata": { - "name": "WoW #44", - "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi", - "attributes": [ - { - "value": "Green Orange", - "trait_type": "Background" - }, - { - "value": "Medium Gold", - "trait_type": "Skin Tone" - }, - { - "value": "Slight Smile", - "trait_type": "Mouth" - }, - { - "value": "Purple", - "trait_type": "Lips Color" - } - ] - } - }, - "collection": { - "name": "World of Women", - "slug": "world-of-women-nft", - "externalUrl": "http://worldofwomen.art", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T13:25:41.833Z" - } - ``` - - -*** - -## [getNftMetadataBatch - SDK](/reference/sdk-getnftmetadatabatch) - -Gets the NFT metadata for multiple NFT tokens. - -### Overview of Changes - -* The `getNftMetadataBatch` method now returns an nft array in the V3 response instead of an array of NFTs in V2. -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in the V3 response. -* The `isSpam` and `classifications` parameters for `spamInfo` on V2 has been added to the `contract` object in V3. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to an optional `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata.attributes` parameter has been changed to `raw.metadata.attributes` in the V3 response. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3 response, which contains the `tokenUri` and `metadata` parameters -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - //Call the method - let response = await alchemy.nft.getNftMetadataBatch( - [ - { - contractAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", - tokenId: "3", - tokenType: "ERC721" - }, - { - contractAddress: "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e", - tokenId: "4", - tokenType: "ERC721" - } - ], - { - tokenUriTimeoutInMs: 5000, - refreshCache: true - } - ) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ----------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `contract.openSea.floorPrice` | `contract.openSeaMetadata.floorPrice` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug` (New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl` (New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `tokenUri` | `tokenUri` | -| `title` | `name` | -| `description` | `description` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| `rawMetadata.error` | `raw.error` | -| - | `raw.tokenUri` | -| `media` | `image` | -| - | `collection` (New in V3) | -| - | `mint`(New in V3) | -| `timeLastUpdated` | `timeLastUpdated` | - -### Example Responses - -#### V2 Example Response - - - ```json json - [ - { - "contract": { - "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - "name": "BoredApeYachtClub", - "symbol": "BAYC", - "totalSupply": "10000", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 34.5, - "collectionName": "Bored Ape Yacht Club", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format", - "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.", - "externalUrl": "http://www.boredapeyachtclub.com/", - "twitterUsername": "BoredApeYC", - "discordUrl": "https://discord.gg/3P5K3dzgdB", - "lastIngestedAt": "2023-07-10T01:34:04.000Z" - }, - "contractDeployer": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03", - "deployedBlockNumber": 12287507 - }, - "tokenId": "3", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-19T19:18:42.867Z", - "rawMetadata": { - "image": "ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6", - "attributes": [ - { - "trait_type": "Background", - "value": "Purple" - }, - { - "trait_type": "Eyes", - "value": "Bored" - }, - { - "trait_type": "Mouth", - "value": "Tongue Out" - }, - { - "trait_type": "Clothes", - "value": "Bone Necklace" - }, - { - "trait_type": "Fur", - "value": "Cheetah" - } - ] - }, - "tokenUri": { - "gateway": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3", - "raw": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "raw": "ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6", - "format": "png", - "bytes": 208822 - } - ] - } - ] - ``` - - -#### V3 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", - "name": "BoredApeYachtClub", - "symbol": "BAYC", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0xaBA7161A7fb69c88e16ED9f455CE62B791EE4D03", - "deployedBlockNumber": 12287507, - "openSeaMetadata": { - "floorPrice": 24.76, - "collectionName": "Bored Ape Yacht Club", - "collectionSlug": "boredapeyachtclub", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format", - "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.", - "externalUrl": "http://www.boredapeyachtclub.com/", - "twitterUsername": "BoredApeYC", - "discordUrl": "https://discord.gg/3P5K3dzgdB", - "bannerImageUrl": "https://i.seadn.io/gae/i5dYZRkVCUK97bfprQ3WXyrT9BnLSZtVKGJlKQ919uaUB0sxbngVCioaiyu9r6snqfi2aaTyIvv6DHm4m2R3y7hMajbsv14pSZK8mhs?w=500&auto=format", - "lastIngestedAt": "2023-09-18T09:58:23.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "3", - "tokenType": "ERC721", - "tokenUri": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "contentType": "image/png", - "size": 208822, - "originalUrl": "https://ipfs.io/ipfs/QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6" - }, - "raw": { - "tokenUri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3", - "metadata": { - "image": "ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6", - "attributes": [ - { - "trait_type": "Background", - "value": "Purple" - }, - { - "trait_type": "Fur", - "value": "Cheetah" - } - ] - } - }, - "collection": { - "name": "Bored Ape Yacht Club", - "slug": "boredapeyachtclub", - "externalUrl": "http://www.boredapeyachtclub.com/", - "bannerImageUrl": "https://i.seadn.io/gae/i5dYZRkVCUK97bfprQ3WXyrT9BnLSZtVKGJlKQ919uaUB0sxbngVCioaiyu9r6snqfi2aaTyIvv6DHm4m2R3y7hMajbsv14pSZK8mhs?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T18:14:22.829Z" - }, - { - "contract": { - "address": "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e", - "name": "Doodles", - "symbol": "DOODLE", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0x2B3Ab8e7BB14988616359B78709538b10900AB7D", - "deployedBlockNumber": 13430097, - "openSeaMetadata": { - "floorPrice": 1.55, - "collectionName": "Doodles", - "collectionSlug": "doodles-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/7B0qai02OdHA8P_EOVK672qUliyjQdQDGNrACxs7WnTgZAkJa_wWURnIFKeOh5VTf8cfTqW3wQpozGedaC9mteKphEOtztls02RlWQ?w=500&auto=format", - "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury.", - "externalUrl": "https://doodles.app", - "twitterUsername": "doodles", - "discordUrl": "https://discord.gg/doodles", - "bannerImageUrl": "https://i.seadn.io/gae/svc_rQkHVGf3aMI14v3pN-ZTI7uDRwN-QayvixX-nHSMZBgb1L1LReSg1-rXj4gNLJgAB0-yD8ERoT-Q2Gu4cy5AuSg-RdHF9bOxFDw?w=500&auto=format", - "lastIngestedAt": "2023-09-10T05:19:20.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "4", - "tokenType": "ERC721", - "name": "Doodle #4", - "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.", - "tokenUri": "https://ipfs.io/ipfs/QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4", - "contentType": "image/png", - "size": 129566, - "originalUrl": "https://ipfs.io/ipfs/QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm" - }, - "raw": { - "tokenUri": "ipfs://QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4", - "metadata": { - "name": "Doodle #4", - "image": "ipfs://QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm", - "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.", - "attributes": [ - { - "value": "happy", - "trait_type": "face" - }, - { - "value": "purple", - "trait_type": "head" - } - ] - } - }, - "collection": { - "name": "Doodles", - "slug": "doodles-official", - "externalUrl": "https://doodles.app", - "bannerImageUrl": "https://i.seadn.io/gae/svc_rQkHVGf3aMI14v3pN-ZTI7uDRwN-QayvixX-nHSMZBgb1L1LReSg1-rXj4gNLJgAB0-yD8ERoT-Q2Gu4cy5AuSg-RdHF9bOxFDw?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T08:18:52.566Z" - } - ] - } - ``` - - -*** - -## [refreshNftMetadata - SDK](/reference/sdk-refreshnftmetadata) - -Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. - -### Overview of Changes - -* There are no changes in the request structure or method name between V2 and V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const contractAddress = "0x06012c8cf97bead5deae237070f9587f8e7a266d"; - const tokenId = "1"; - //Call the method - let response = await alchemy.nft.refreshNftMetadata(contractAddress, tokenId) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------ | ------------ | -| `boolean` | `boolean` | - -### Example Responses - -#### V2 Example Response - - - ```shell shell - false - ``` - - -#### V3 Example Response - - - ```json json - true - ``` - - -*** - -## [getNftSales - SDK](/reference/sdk-getnftsales) - -Returns NFT sales that have happened through on-chain marketplaces. - -### Overview of Changes - -* The `marketplaceAddress` parameter has been added to the V3 response. -* The `marketplaceFee` has been removed from the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return the nft sales data - const response = await alchemy.nft.getNftSales() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------------------ | ------------------------------- | -| `marketplace` | `marketplace` | -| - | `marketplaceAddress`(New in V3) | -| `contractAddress` | `contractAddress` | -| `tokenId` | `tokenId` | -| `quantity` | `quantity` | -| `buyerAddress` | `buyerAddress` | -| `sellerAddress` | `sellerAddress` | -| `taker` | `taker` | -| `sellerFee` | `sellerFee` | -| `marketplaceFee` | (Removed in V3) | -| `protocolFee` | `protocolFee` | -| `royaltyFee` | `royaltyFee` | -| `blockNumber` | `blockNumber` | -| `logIndex` | `logIndex` | -| `bundleIndex` | `bundleIndex` | -| `transactionHash` | `transactionHash` | -| `validAt` | `validAt` | -| `validAt.blockNumber` | `validAt.blockNumber` | -| `validAt.blockHash` | `validAt.blockHash` | -| `validAt.blockTimestamp` | `validAt.blockTimestamp` | -| `pageKey` | `pageKey` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "nftSales": [ - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "544", - "quantity": "1", - "buyerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f", - "sellerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a", - "taker": "seller", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919706, - "logIndex": 25, - "bundleIndex": 0, - "transactionHash": "0xb28b5f2c186bf534e4fc4b8604b1496c9632e42269424f70ef1bdce61ea8ba52" - }, - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "3134", - "quantity": "1", - "buyerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a", - "sellerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f", - "taker": "buyer", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919721, - "logIndex": 9, - "bundleIndex": 0, - "transactionHash": "0x65579455ac3227e7b3db72b4e359e988bb16cae6d26c88818d1a6991b478b274" - }, - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "5056", - "quantity": "1", - "buyerAddress": "0x00bd9fd57c423a1b1c969823d409156d90974d77", - "sellerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a", - "taker": "buyer", - "sellerFee": { - "amount": "100000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919847, - "logIndex": 35, - "bundleIndex": 0, - "transactionHash": "0xd79cca9282c06a0edb8f9426aae734119f0f2ed0d9683dfe3723dc7814f5fccd" - }, - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "5719", - "quantity": "1", - "buyerAddress": "0x00bd3a6660309fb9e0129b9b777a9ccb9c2869dc", - "sellerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f", - "taker": "buyer", - "sellerFee": { - "amount": "40000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 4367925, - "logIndex": 71, - "bundleIndex": 0, - "transactionHash": "0xe6e1885bd2dd142c63b79df6aca0ad3213e37c3a9f01a550c30fa1b234d3c7f2" - } - ], - "validAt": { - "blockNumber": 17736688, - "blockHash": "0x09c001045ba91210c239bf53948ce23329306cd64fe9c1618d6b9459ff283817", - "blockTimestamp": "2023-07-20T20:13:35Z" - }, - "pageKey": "NDM2ODAyNSw3Miww" - } - ``` - - -#### V3 Example Response - - - ```json json - { - "nftSales": [ - { - "marketplace": "cryptopunks", - "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "tokenId": "544", - "quantity": "1", - "buyerAddress": "0x5b098b00621EDa6a96b7a476220661ad265F083f", - "sellerAddress": "0xC352B534e8b987e036A93539Fd6897F53488e56a", - "taker": "seller", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919706, - "logIndex": 25, - "bundleIndex": 0, - "transactionHash": "0xb28b5f2c186bf534e4fc4b8604b1496c9632e42269424f70ef1bdce61ea8ba52" - }, - { - "marketplace": "cryptopunks", - "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "tokenId": "3134", - "quantity": "1", - "buyerAddress": "0xC352B534e8b987e036A93539Fd6897F53488e56a", - "sellerAddress": "0x5b098b00621EDa6a96b7a476220661ad265F083f", - "taker": "buyer", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919721, - "logIndex": 9, - "bundleIndex": 0, - "transactionHash": "0x65579455ac3227e7b3db72b4e359e988bb16cae6d26c88818d1a6991b478b274" - }, - { - "marketplace": "cryptopunks", - "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "tokenId": "5445", - "quantity": "1", - "buyerAddress": "0x0f4023208058ecfFCb22A7409Df11F6D6013FE8A", - "sellerAddress": "0x0B30fD3a500608413837Bb025c2018933130F9DB", - "taker": "buyer", - "sellerFee": { - "amount": "130000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 4367925, - "logIndex": 71, - "bundleIndex": 0, - "transactionHash": "0xe6e1885bd2dd142c63b79df6aca0ad3213e37c3a9f01a550c30fa1b234d3c7f2" - } - ], - "validAt": { - "blockNumber": 18213475, - "blockHash": "0xc839e3f01f73b8818899bad0d043b39c6ca0c9ec2150c62a9d195796b39c61a9", - "blockTimestamp": "2023-09-25T14:44:35Z" - }, - "pageKey": "NDM2ODAyNSw3Miww" - } - ``` - - -*** - -## [summarizeNftAttributes - SDK](/reference/sdk-summarizenftattributes) - -Get a summary of attribute prevalence for an NFT collection. - -### Overview of Changes - -* There are no changes in the method's request, response format, or parameter names/structures between V2 and V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const collection = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to fetch a summary a attribute prevalence for an NFT collection. - const response = await alchemy.nft.summarizeNftAttributes(collection) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript -// Same as V2. - ``` - - -### Overview of Changes - -* No changes have been made to the request or response structure in the transition from V2 to V3. - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ----------------- | ----------------- | -| `totalSupply` | `totalSupply` | -| `contractAddress` | `contractAddress` | -| `summary` | `summary` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "summary": { - "Fur": { - "Tan": 626, - "Death Bot": 175, - "Trippy": 77, - "Brown": 1370, - "Gray": 496, - "Golden Brown": 778, - "Blue": 490, - "Noise": 155, - "Zombie": 302, - "Cream": 636, - "Solid Gold": 46, - "Dmt": 215, - "Black": 1229, - "Cheetah": 406, - "Dark Brown": 1352, - "Red": 474, - "Pink": 511, - "White": 397, - "Robot": 265 - }, - "Eyes": { - "Heart": 394, - "Sleepy": 751, - "Eyepatch": 333, - "X Eyes": 243, - "Zombie": 308, - "Angry": 432, - "Coins": 479, - "Blue Beams": 49, - "Wide Eyed": 549, - "Hypnotized": 220, - "Bloodshot": 846, - "Blindfold": 264, - "Sunglasses": 352, - "3d": 487, - "Bored": 1714, - "Laser Eyes": 69, - "Cyborg": 108, - "Crazy": 407, - "Closed": 710, - "Sad": 551, - "Scumbag": 233, - "Robot": 350, - "Holographic": 151 - }, - "Background": { - "Gray": 1170, - "Aquamarine": 1266, - "Blue": 1242, - "Purple": 1291, - "Yellow": 1283, - "New Punk Blue": 1232, - "Army Green": 1243, - "Orange": 1273 - }, - "Mouth": { - "Phoneme Vuh": 333, - "Discomfort": 208, - "Bored Unshaven Pipe": 101, - "Bored Cigarette": 710, - "Rage": 266, - "Bored Bubblegum": 119, - "Bored Pizza": 50, - "Grin": 713, - "Bored Party Horn": 88, - "Bored": 2272, - "Bored Unshaven Bubblegum": 65, - "Bored Unshaven Cigarette": 438, - "Jovial": 296, - "Tongue Out": 202, - "Grin Multicolored": 116, - "Small Grin": 272, - "Bored Unshaven Party horn": 45, - "Phoneme ooo": 255, - "Bored Unshaven": 1551, - "Bored Unshaven Pizza": 26, - "Bored Unshaven Dagger": 28, - "Phoneme Wah": 163, - "Phoneme Oh": 237, - "Dumbfounded": 505, - "Bored Pipe": 132, - "Grin Gold Grill": 91, - "Bored Unshaven Cigar": 94, - "Phoneme L": 241, - "Bored Unshaven Kazoo": 61, - "Grin Diamond Grill": 78, - "Bored Dagger": 49, - "Bored Cigar": 121, - "Bored Kazoo": 74 - }, - "Clothes": { - "Smoking Jacket": 221, - "Bone Necklace": 203, - "Leather Jacket": 206, - "Striped Tee": 412, - "Bone Tee": 230, - "Tweed Suit": 141, - "Puffy Vest": 227, - "Vietnam Jacket": 224, - "Toga": 202, - "Black Holes T": 205, - "Prom Dress": 103, - "Work Vest": 188, - "Sleeveless Logo T": 144, - "Tanktop": 235, - "Hawaiian": 283, - "Bayc T Black": 215, - "Lumberjack Shirt": 213, - "Hip Hop": 128, - "Admirals Coat": 64, - "Lab Coat": 144, - "Pimp Coat": 80, - "Prison Jumpsuit": 235, - "Black Suit": 42, - "Service": 142, - "Blue Dress": 95, - "Caveman Pelt": 163, - "Sleeveless T": 252, - "Guayabera": 232, - "Sailor Shirt": 284, - "Bayc T Red": 140, - "Bandolier": 163, - "Rainbow Suspenders": 135, - "Tie Dye": 144, - "Biker Vest": 253, - "Space Suit": 105, - "Cowboy Shirt": 119, - "Navy Striped Tee": 334, - "Stunt Jacket": 178, - "Kings Robe": 68, - "Wool Turtleneck": 240, - "Leather Punk Jacket": 153, - "Black T": 334, - "Tuxedo Tee": 235 - }, - "Earring": { - "Gold Hoop": 462, - "Silver Hoop": 882, - "Silver Stud": 823, - "Gold Stud": 439, - "Cross": 149, - "Diamond Stud": 222 - }, - "Hat": { - "Trippy Captain's Hat": 65, - "Bayc Flipped Brim": 231, - "Short Mohawk": 318, - "Safari": 182, - "Cowboy Hat": 354, - "Sea Captain's Hat": 304, - "Vietnam Era Helmet": 223, - "Sushi Chef Headband": 187, - "Irish Boho": 225, - "Girl's Hair Short": 150, - "Laurel Wreath": 72, - "Girl's Hair Pink": 105, - "Bayc Hat Red": 119, - "Horns": 252, - "Fisherman's Hat": 345, - "Bowler": 262, - "Spinner Hat": 181, - "Faux Hawk": 136, - "Seaman's Hat": 420, - "Ww2 Pilot Helm": 110, - "Party Hat 1": 120, - "Party Hat 2": 107, - "Beanie": 578, - "King's Crown": 77, - "Army Hat": 294, - "Commie Hat": 304, - "Bunny Ears": 195, - "S&m Hat": 235, - "Stuntman Helmet": 157, - "Fez": 377, - "Bandana Blue": 89, - "Bayc Hat Black": 228, - "Halo": 324, - "Police Motorcycle Helmet": 130, - "Prussian Helmet": 130, - "Baby's Bonnet": 158 - } - }, - "totalSupply": 10000, - "contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" - } - ``` - - -#### V3 Example Response - - - ```json json - { - "summary": { - "Fur": { - "Tan": 626, - "Death Bot": 175, - "Trippy": 77, - "Brown": 1370, - "Gray": 496, - "Golden Brown": 778, - "Blue": 490, - "Noise": 155, - "Zombie": 302, - "Cream": 636, - "Solid Gold": 46, - "Dmt": 215, - "Black": 1229, - "Cheetah": 406, - "Dark Brown": 1352, - "Red": 474, - "Pink": 511, - "White": 397, - "Robot": 265 - }, - "Eyes": { - "Heart": 394, - "Sleepy": 751, - "Eyepatch": 333, - "X Eyes": 243, - "Zombie": 308, - "Angry": 432, - "Coins": 479, - "Blue Beams": 49, - "Wide Eyed": 549, - "Hypnotized": 220, - "Bloodshot": 846, - "Blindfold": 264, - "Sunglasses": 352, - "3d": 487, - "Bored": 1714, - "Laser Eyes": 69, - "Cyborg": 108, - "Crazy": 407, - "Closed": 710, - "Sad": 551, - "Scumbag": 233, - "Robot": 350, - "Holographic": 151 - }, - "Background": { - "Gray": 1170, - "Aquamarine": 1266, - "Blue": 1242, - "Purple": 1291, - "Yellow": 1283, - "New Punk Blue": 1232, - "Army Green": 1243, - "Orange": 1273 - }, - "Mouth": { - "Phoneme Vuh": 333, - "Discomfort": 208, - "Bored Unshaven Pipe": 101, - "Bored Cigarette": 710, - "Rage": 266, - "Bored Bubblegum": 119, - "Bored Pizza": 50, - "Grin": 713, - "Bored Party Horn": 88, - "Bored": 2272, - "Bored Unshaven Bubblegum": 65, - "Bored Unshaven Cigarette": 438, - "Jovial": 296, - "Tongue Out": 202, - "Grin Multicolored": 116, - "Small Grin": 272, - "Bored Unshaven Party horn": 45, - "Phoneme ooo": 255, - "Bored Unshaven": 1551, - "Bored Unshaven Pizza": 26, - "Bored Unshaven Dagger": 28, - "Phoneme Wah": 163, - "Phoneme Oh": 237, - "Dumbfounded": 505, - "Bored Pipe": 132, - "Grin Gold Grill": 91, - "Bored Unshaven Cigar": 94, - "Phoneme L": 241, - "Bored Unshaven Kazoo": 61, - "Grin Diamond Grill": 78, - "Bored Dagger": 49, - "Bored Cigar": 121, - "Bored Kazoo": 74 - }, - "Clothes": { - "Smoking Jacket": 221, - "Bone Necklace": 203, - "Leather Jacket": 206, - "Striped Tee": 412, - "Bone Tee": 230, - "Tweed Suit": 141, - "Puffy Vest": 227, - "Vietnam Jacket": 224, - "Toga": 202, - "Black Holes T": 205, - "Prom Dress": 103, - "Work Vest": 188, - "Sleeveless Logo T": 144, - "Tanktop": 235, - "Hawaiian": 283, - "Bayc T Black": 215, - "Lumberjack Shirt": 213, - "Hip Hop": 128, - "Admirals Coat": 64, - "Lab Coat": 144, - "Pimp Coat": 80, - "Prison Jumpsuit": 235, - "Black Suit": 42, - "Service": 142, - "Blue Dress": 95, - "Caveman Pelt": 163, - "Sleeveless T": 252, - "Guayabera": 232, - "Sailor Shirt": 284, - "Bayc T Red": 140, - "Bandolier": 163, - "Rainbow Suspenders": 135, - "Tie Dye": 144, - "Biker Vest": 253, - "Space Suit": 105, - "Cowboy Shirt": 119, - "Navy Striped Tee": 334, - "Stunt Jacket": 178, - "Kings Robe": 68, - "Wool Turtleneck": 240, - "Leather Punk Jacket": 153, - "Black T": 334, - "Tuxedo Tee": 235 - }, - "Earring": { - "Gold Hoop": 462, - "Silver Hoop": 882, - "Silver Stud": 823, - "Gold Stud": 439, - "Cross": 149, - "Diamond Stud": 222 - }, - "Hat": { - "Trippy Captain's Hat": 65, - "Bayc Flipped Brim": 231, - "Short Mohawk": 318, - "Safari": 182, - "Cowboy Hat": 354, - "Sea Captain's Hat": 304, - "Vietnam Era Helmet": 223, - "Sushi Chef Headband": 187, - "Irish Boho": 225, - "Girl's Hair Short": 150, - "Laurel Wreath": 72, - "Girl's Hair Pink": 105, - "Bayc Hat Red": 119, - "Horns": 252, - "Fisherman's Hat": 345, - "Bowler": 262, - "Spinner Hat": 181, - "Faux Hawk": 136, - "Seaman's Hat": 420, - "Ww2 Pilot Helm": 110, - "Party Hat 1": 120, - "Party Hat 2": 107, - "Beanie": 578, - "King's Crown": 77, - "Army Hat": 294, - "Commie Hat": 304, - "Bunny Ears": 195, - "S&m Hat": 235, - "Stuntman Helmet": 157, - "Fez": 377, - "Bandana Blue": 89, - "Bayc Hat Black": 228, - "Halo": 324, - "Police Motorcycle Helmet": 130, - "Prussian Helmet": 130, - "Baby's Bonnet": 158 - } - }, - "totalSupply": 10000, - "contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" - } - ``` - - -*** - -## [searchContractMetadata - SDK](/reference/sdk-searchcontractmetadata) - -Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. - -### Overview of Changes - -* The V3 response now lists the metadata objects within a `contracts` Array. -* The `openSea` object in the V2 response has been changed to `openSeaMetadata` in the V3 response. -* The `openSeaMetadata`object in the V3 response now contains the `collectionSlug` and `bannerImageUrl` parameters. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const kw = "hair" - - //Call the method to fetch metadata - const response = await alchemy.nft.searchContractMetadata(kw) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript -// Same as V2. - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------------------------- | ------------------------------------------- | -| `address` | `address` | -| `name` | `name` | -| `symbol` | `symbol` | -| `totalSupply` | `totalSupply` | -| `tokenType` | `tokenType` | -| `openSea.floorPrice` | `openSeaMetadata.floorPrice` | -| `openSea.collectionName` | `openSeaMetadata.collectionName` | -| - | `openSeaMetadata.collectionSlug`(New in V3) | -| `openSea.safelistRequestStatus` | `openSeaMetadata.safelistRequestStatus` | -| `openSea.imageUrl` | `openSeaMetadata.imageUrl` | -| `openSea.description` | `openSeaMetadata.description` | -| `openSea.externalUrl` | `openSeaMetadata.externalUrl` | -| `openSea.twitterUsername` | `openSeaMetadata.twitterUsername` | -| `openSea.discordUrl` | `openSeaMetadata.discordUrl` | -| `openSea.lastIngestedAt` | `openSeaMetadata.lastIngestedAt` | -| - | `openSeaMetada.bannerImageUrl`(New in V3) | -| `contractDeployer` | `contractDeployer` | -| `deployedBlockNumber` | `deployedBlockNumber` | - -### Example Responses - -#### V2 Example Response - - - ```json json - [ - { - "address": "0x1eac31a0b93e81bd093d116f5d36a83be08f381b", - "name": "Sneakr Token", - "symbol": "SNKR", - "totalSupply": "326", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0, - "collectionName": "SneakrCred Drop 1: EthAIReum", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/7JKgjQsQP6PNiuuT6J7upfs4Iq3btwg1zFMxpzvW9ZFpGFWrf0i2H08vbG-1glj9ZY9HDUxco5z_xMWc7e_f5myd5A?w=500&auto=format", - "description": "The first official Sneakr Drop.", - "externalUrl": "https://www.sneakrcred.com", - "lastIngestedAt": "2023-07-12T23:18:43.000Z" - }, - "contractDeployer": "0xccb74148d315b0397da4e3c7482036dbadd762e5", - "deployedBlockNumber": 9458121 - }, - { - "address": "0x7e2a853626d75321d2b6ed060f6320324d31b7e8", - "name": "Happy Little Hairdos", - "symbol": "HLHD", - "totalSupply": "240", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.05, - "collectionName": "Happy Little Hairdos", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/bx3ZIky25jfqxG_ield-BWVNuWvoOLJsqm-1TPN90xVuzyLrEjROQAX_Qf2jgMb5OrCsF_OKaRWq3DEpWztPRK2DriuRMN997kar?w=500&auto=format", - "description": "Happy Little Hairdos is a parody collection of 10,000 unique NFTs celebrating the man we all know as the painter with a Fro. Straight from the imagination & hand of artist J.J. Weinberg, what began as a Prismacolor illustration on paper in 2014 & an idea of a ☕ table ???? has found its way onto the blockchain. Weinberg is determined to push the envelope on the connection of the metaverse & the physical world. Let the #FROMO begin!\r\n\r\nDetails - www.happylittlehairdos.com\r\n\r\nHighlights\r\n\r\nArt / Print quality images 3000x3000k (Set to print at 10”x10” 300 dpi)\r\nCoffee table book featuring “Curated Cuts” & randomly chosen HLHD’s\r\nInfinite “Bob”jects\r\nEarly access to merch via the Fromo Boutique\r\n“Curated Cuts for a Cause” the rarity’s for charity on these special tokens outside of the 10K\r\nAccess to Alexander Bill’s “ART”cade\r\nSpecial token access to commissioned work by the artist & derivative license\r\nJoy of Minting mini-series\r\nSpecial thanks @cheforche - IG @jjweinberg - IG", - "externalUrl": "https://www.happylittlehairdos.com", - "twitterUsername": "happylittlehair", - "discordUrl": "https://discord.gg/kWFU5xP74W", - "lastIngestedAt": "2023-07-12T23:20:03.000Z" - }, - "contractDeployer": "0x5582809dd5d7b8848397c6033d8a41e4b06f8ded", - "deployedBlockNumber": 12885162 - }, - { - "address": "0x82cb9d20862641301c987f0b096086d32bc11b65", - "name": "AStrandOfHair", - "symbol": "ASOH", - "totalSupply": "10358", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0, - "collectionName": "AStrandOfHair", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gcs/files/5aa37f4f867ad6f1d5ab710f67f6cfdd.jpg?w=500&auto=format", - "description": "It's a metaverse built by wizards. From just a strand of hair to the entire world. We are not just a meme, we are a culture strongly rooted by our community. ", - "externalUrl": "https://astrandofhair.xyz/", - "twitterUsername": "Hair_xyz", - "lastIngestedAt": "2023-07-13T04:09:33.000Z" - }, - "contractDeployer": "0xc4c2a776a352a8994be83d2ef2bb4a9604dc6e97", - "deployedBlockNumber": 15210942 - }, - { - "address": "0xbd5bd01e9445d24d83e8607ac0a64d71c9d36933", - "name": "Queens+KingsHair", - "symbol": "Q+KTH", - "totalSupply": "3623", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0045, - "collectionName": "Queens+Kings Traits", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/0OkPiJqvKO7oAJYU7pNGp3Y2nGgCm98itXBnCa12xpEttaVw9HuUFhFNXmE0lfaQjZGpxa6N8KrZtHcX1InpNzNtaBkW8kslTwYwAQ?w=500&auto=format", - "description": "Queens+Kings overthrow hierarchies in contemporary art and re-mint your CryptoRealm:\nCreated by Hackatao and NFT Studios, supported by Sotheby’s\n\n6,900 Queens+Kings: interchangeable NFT traits, randomly allocated and algorithmically generated. The avatars can then be hacked by the collectors, customized, disassembled and assembled on the [dedicated website](http://queenskings.hackatao.com) builder. In the cryptoverse, a non-hierarchical community is in charge, traditional roles of the art world are subverted. Hack the Royals, let the Self-Crowning begin. ", - "externalUrl": "https://queenskings.hackatao.com/", - "twitterUsername": "Hackatao", - "discordUrl": "https://discord.gg/hackatao", - "lastIngestedAt": "2023-07-14T19:19:37.000Z" - }, - "contractDeployer": "0x139c8919ce2b7fb8a04f929d83b8c54c116c692b", - "deployedBlockNumber": 13984623 - }, - { - "address": "0xcba843509a832131eb6f72845482abd440f75dc7", - "name": "Wind In Her Hair ", - "symbol": "PHOTO", - "totalSupply": "1", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0, - "collectionName": "Wind In Her Hair.", - "safelistRequestStatus": "requested", - "imageUrl": "https://i.seadn.io/gae/zZvfeMVYtZRk92TFIb7-ytogC7D7kbG50V_V_35yFBilinbVoZNEzHJ_wuqAzFK59BvejB0gM2SlFsVpiwWKJZNjWc0Xoytc2H-2?w=500&auto=format", - "description": "Stories about loneliness on a lost island", - "twitterUsername": "xeniiau", - "lastIngestedAt": "2023-07-15T01:43:37.000Z" - }, - "contractDeployer": "0x56e6b5de6a4e680e49bf1de3e14b2d49e51103ff", - "deployedBlockNumber": 14423329 - }, - { - "address": "0x55fd148b0b0df020b5cc49d00bc9b1464afd85dd", - "name": "A Portrait Study of Hair", - "symbol": "HAIR", - "totalSupply": "4", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0, - "collectionName": "A Portrait Study of Hair", - "safelistRequestStatus": "not_requested", - "lastIngestedAt": "2023-07-09T22:59:19.000Z" - }, - "contractDeployer": "0x3ae33a926a69aeb1ca977cec976b9e53fa84fc25", - "deployedBlockNumber": 14230101 - } - ] - ``` - - -#### V3 Example Response - - - ```json json - { - "contracts": [ - { - "address": "0x1EaC31A0B93E81bd093d116f5D36a83Be08f381B", - "name": "Sneakr Token", - "symbol": "SNKR", - "totalSupply": "326", - "tokenType": "ERC721", - "contractDeployer": "0xccB74148D315B0397dA4e3C7482036dbaDD762e5", - "deployedBlockNumber": 9458121, - "openSeaMetadata": { - "floorPrice": 0, - "collectionName": "SneakrCred Drop 1: EthAIReum", - "collectionSlug": "sneakr-token", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/7JKgjQsQP6PNiuuT6J7upfs4Iq3btwg1zFMxpzvW9ZFpGFWrf0i2H08vbG-1glj9ZY9HDUxco5z_xMWc7e_f5myd5A?w=500&auto=format", - "description": "The first official Sneakr Drop.", - "externalUrl": "https://www.sneakrcred.com", - "lastIngestedAt": "2023-09-09T23:18:24.000Z" - } - }, - { - "address": "0x7E2A853626D75321d2B6eD060f6320324D31b7e8", - "name": "Happy Little Hairdos", - "symbol": "HLHD", - "totalSupply": "241", - "tokenType": "ERC721", - "contractDeployer": "0x5582809Dd5d7b8848397C6033D8a41e4b06F8dEd", - "deployedBlockNumber": 12885162, - "openSeaMetadata": { - "floorPrice": 0.05, - "collectionName": "Happy Little Hairdos", - "collectionSlug": "hlhd", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/bx3ZIky25jfqxG_ield-BWVNuWvoOLJsqm-1TPN90xVuzyLrEjROQAX_Qf2jgMb5OrCsF_OKaRWq3DEpWztPRK2DriuRMN997kar?w=500&auto=format", - "description": "Happy Little Hairdos is a parody collection of 10,000 unique NFTs celebrating the man we all know as the painter with a Fro. Straight from the imagination & hand of artist J.J. Weinberg, what began as a Prismacolor illustration on paper in 2014 & an idea of a ☕ table ???? has found its way onto the blockchain. Weinberg is determined to push the envelope on the connection of the metaverse & the physical world. Let the #FROMO begin!\r\n\r\nDetails - www.happylittlehairdos.com\r\n\r\nHighlights\r\n\r\nArt / Print quality images 3000x3000k (Set to print at 10”x10” 300 dpi)\r\nCoffee table book featuring “Curated Cuts” & randomly chosen HLHD’s\r\nInfinite “Bob”jects\r\nEarly access to merch via the Fromo Boutique\r\n“Curated Cuts for a Cause” the rarity’s for charity on these special tokens outside of the 10K\r\nAccess to Alexander Bill’s “ART”cade\r\nSpecial token access to commissioned work by the artist & derivative license\r\nJoy of Minting mini-series\r\nSpecial thanks @cheforche - IG @jjweinberg - IG", - "externalUrl": "https://www.happylittlehairdos.com", - "twitterUsername": "happylittlehair", - "discordUrl": "https://discord.gg/kWFU5xP74W", - "bannerImageUrl": "https://i.seadn.io/gae/WhmKRaraSN-sWNMtKm6BIiZ95ikkJ9Ey9Q6KaVtwxpAmI7MmaOi8D6X_JrBsJBU0bY4VRmNaRDXP7jnSpBnCvrtMevqJL6UJGjhByg?w=500&auto=format", - "lastIngestedAt": "2023-09-09T23:19:57.000Z" - } - }, - { - "address": "0x82Cb9D20862641301C987f0b096086d32bC11B65", - "name": "AStrandOfHair", - "symbol": "ASOH", - "totalSupply": "10358", - "tokenType": "ERC721", - "contractDeployer": "0xC4c2a776A352A8994be83D2ef2Bb4A9604DC6E97", - "deployedBlockNumber": 15210942, - "openSeaMetadata": { - "floorPrice": 0, - "collectionName": "AStrandOfHair", - "collectionSlug": "astrandofhair", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gcs/files/5aa37f4f867ad6f1d5ab710f67f6cfdd.jpg?w=500&auto=format", - "description": "It's a metaverse built by wizards. From just a strand of hair to the entire world. We are not just a meme, we are a culture strongly rooted by our community. ", - "externalUrl": "https://astrandofhair.xyz/", - "twitterUsername": "Hair_xyz", - "bannerImageUrl": "https://i.seadn.io/gcs/files/3e75adaed1ac45184ea446175e8856d9.jpg?w=500&auto=format", - "lastIngestedAt": "2023-09-10T01:35:01.000Z" - } - }, - { - "address": "0xBd5BD01e9445d24D83E8607Ac0a64D71C9D36933", - "name": "Queens+KingsHair", - "symbol": "Q+KTH", - "totalSupply": "3638", - "tokenType": "ERC721", - "contractDeployer": "0x139C8919Ce2B7fb8A04F929d83b8C54C116c692b", - "deployedBlockNumber": 13984623, - "openSeaMetadata": { - "floorPrice": 0.003, - "collectionName": "Queens+Kings Traits", - "collectionSlug": "queenskings-traits", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/0OkPiJqvKO7oAJYU7pNGp3Y2nGgCm98itXBnCa12xpEttaVw9HuUFhFNXmE0lfaQjZGpxa6N8KrZtHcX1InpNzNtaBkW8kslTwYwAQ?w=500&auto=format", - "description": "Queens+Kings overthrow hierarchies in contemporary art and re-mint your CryptoRealm:\nCreated by Hackatao and NFT Studios, supported by Sotheby’s\n\n6,900 Queens+Kings: interchangeable NFT traits, randomly allocated and algorithmically generated. The avatars can then be hacked by the collectors, customized, disassembled and assembled on the [dedicated website](http://queenskings.hackatao.com) builder. In the cryptoverse, a non-hierarchical community is in charge, traditional roles of the art world are subverted. Hack the Royals, let the Self-Crowning begin. ", - "externalUrl": "https://queenskings.hackatao.com/", - "twitterUsername": "Hackatao", - "discordUrl": "https://discord.gg/hackatao", - "bannerImageUrl": "https://i.seadn.io/gae/k8DXM0eWdF14zud9pr7RURMhC0_zwuEigV_oG3hy5A9HlnKkjoH4lYaPVU5-2O4qC0g46HTWTwUQhKM3ZElgaIJJgqCGcgusGWWIK8Q?w=500&auto=format", - "lastIngestedAt": "2023-09-10T18:44:05.000Z" - } - }, - { - "address": "0x57e876FaEFD30bCEF9B154812Ba4d29396308C38", - "name": "A CHAIR IN THE SKY", - "symbol": "SKYCHAIR", - "totalSupply": "5", - "tokenType": "ERC721", - "contractDeployer": "0xaB3627317c43D394eb171170f818153B976D28A3", - "deployedBlockNumber": 16288864, - "openSeaMetadata": { - "floorPrice": 0, - "collectionName": "A CHAIR IN THE SKY", - "collectionSlug": "a-chair-in-the-sky", - "safelistRequestStatus": "not_requested", - "lastIngestedAt": "2023-09-18T10:20:33.000Z" - } - } - ] - } - ``` - - -*** - -## [getNftsForOwnerIterator - SDK](/reference/sdk-getnftsforowneriterator) - -Fetches all NFTs for a given owner and yields them in an async iterable. - -This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the `options` parameter in the request's body. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in V3. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to a `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata.attributes` parameter has been changed to `raw.metadata.attributes` in V3. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3, which contains the `tokenUri` and `metadata` parameters -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `isSpam` and `spamClassifications` parameters for `spamInfo` in V2 have been added to the `contract` object in V3. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. -* The `acquiredAt` object has been added to the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the owner address whose NFTs you want to fetch - const owner = "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8"; - - // create an async generator function that uses the getNftsForOwnerIterator method - async function getNftsForOwner() { - try { - let nfts = []; - // Get the async iterable for the owner's NFTs. - const nftsIterable = alchemy.nft.getNftsForOwnerIterator(owner); - - // Iterate over the NFTs and add them to the nfts array. - for await (const nft of nftsIterable) { - nfts.push(nft); - } - - // Log the NFTs. - console.log(nfts); - } catch (error) { - console.log(error); - } - } - - getNftsForOwner(); - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ----------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug` (New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl` (New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `tokenUri` | `tokenUri` | -| `title` | `name` | -| `description` | `description` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| `rawMetadata.error` | `raw.error` | -| - | `raw.tokenUri` | -| `media` | `image` | -| - | `collection` (New in V3) | -| - | `mint`(New in V3) | -| `balance` | `balance` | -| `timeLastUpdated` | `timeLastUpdated` | -| - | `acquiredAt` | - -### Example Responses - -#### V2 Example Response - - - ```json json - [ - { - "contract": { - "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d", - "name": "CryptoKitties", - "symbol": "CK", - "totalSupply": "2022876", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0039, - "collectionName": "CryptoKitties", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg?w=500&auto=format", - "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.", - "externalUrl": "https://www.cryptokitties.co/", - "twitterUsername": "CryptoKitties", - "discordUrl": "https://discord.gg/cryptokitties", - "lastIngestedAt": "2023-07-15T21:20:09.000Z" - }, - "contractDeployer": "0xba52c75764d6f594735dc735be7f1830cdf58ddf", - "deployedBlockNumber": 4605167 - }, - "tokenId": "1289657", - "tokenType": "ERC721", - "title": "Nala", - "description": "", - "timeLastUpdated": "2023-07-10T19:05:02.342Z", - "rawMetadata": { - "birthday": "2018-12-16T00:00:00.000Z", - "hatched": true, - "enhanced_cattributes": [ - { - "description": "spock", - "position": 5850, - "type": "pattern", - "kittyId": 680104 - }, - { - "description": "soserious", - "type": "mouth", - "kittyId": 1289657 - }, - { - "description": "chronic", - "position": 87, - "type": "eyes", - "kittyId": 468466 - }, - { - "description": "fox", - "position": 28, - "type": "body", - "kittyId": 916054 - }, - { - "description": "mauveover", - "position": 13, - "type": "colorprimary", - "kittyId": 11610 - }, - { - "description": "se7", - "position": -1, - "type": "secret", - "kittyId": 1289657 - } - ], - "color": "cyan", - "created_at": "2018-12-16T08:12:41.000Z", - "bio": "En Taro Adun! I'm Nala. I am currently trying to start my own company making berets for tripod kitties. I combine the best qualities of Ryan Gosling, Benjamin Franklin, and Raekwon. I can tell you like to get into trouble.", - "language": "en", - "auction": {}, - "offer": {}, - "children": [ - { - "generation": 14, - "owner": { - "address": "0x002781a27becd321d831d815e3fa386944b329c8" - }, - "hatched": true, - "enhanced_cattributes": [], - "color": "cyan", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "is_exclusive": false, - "created_at": "2018-12-16T10:31:23.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "kitty_type": "fancy", - "fancy_type": "Pawrula", - "name": "Pawrula The Bright", - "owner_wallet_address": "0x002781a27becd321d831d815e3fa386944b329c8", - "id": 1290051, - "is_fancy": true, - "wrapped": true, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "status": { - "is_ready": true, - "cooldown": 1527648022509, - "is_gestating": false - } - }, - { - "generation": 14, - "owner": { - "address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b" - }, - "hatched": true, - "enhanced_cattributes": [ - { - "description": "soserious", - "position": -1, - "type": "mouth", - "kittyId": 1903269 - }, - { - "description": "chronic", - "position": 87, - "type": "eyes", - "kittyId": 468466 - }, - { - "description": "camo", - "position": 1001, - "type": "pattern", - "kittyId": 680201 - }, - { - "description": "koladiviya", - "position": 31, - "type": "body", - "kittyId": 744561 - }, - { - "description": "mauveover", - "position": 13, - "type": "colorprimary", - "kittyId": 11610 - }, - { - "description": "coffee", - "position": -1, - "type": "colorsecondary", - "kittyId": 1903269 - }, - { - "description": "sandalwood", - "position": 60, - "type": "colortertiary", - "kittyId": 337860 - }, - { - "description": "doridnudibranch", - "position": 132, - "type": "coloreyes", - "kittyId": 680079 - } - ], - "color": "doridnudibranch", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg", - "is_exclusive": false, - "created_at": "2020-04-23T22:10:56.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.png", - "name": "Fressbert", - "owner_wallet_address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b", - "id": 1903269, - "is_fancy": false, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg", - "status": { - "is_ready": true, - "cooldown": 1607028977617, - "is_gestating": false - } - } - ], - "id": 1289657, - "is_fancy": false, - "wrapped": true, - "generation": 13, - "owner": { - "address": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "hasDapper": false - }, - "genes": "508101394017420297960203117038449397458346282085579186181678174847507224", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg", - "is_prestige": false, - "is_exclusive": false, - "is_special_edition": false, - "purrs": { - "count": 1, - "is_purred": false - }, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.png", - "hatcher": { - "image": "5", - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "hasDapper": false, - "nickname": "Kitten Mittens LLC 10D 10K 10H" - }, - "background_color": "#c5eefa", - "name": "Nala", - "matron": { - "generation": 12, - "owner": { - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f" - }, - "hatched": true, - "enhanced_cattributes": [ - { - "description": "soserious", - "position": -1, - "type": "mouth", - "kittyId": 1289248 - }, - { - "description": "chronic", - "position": 87, - "type": "eyes", - "kittyId": 468466 - }, - { - "description": "camo", - "position": 1001, - "type": "pattern", - "kittyId": 680201 - }, - { - "description": "manul", - "position": 36, - "type": "body", - "kittyId": 803032 - }, - { - "description": "martian", - "position": 72, - "type": "colorprimary", - "kittyId": 916364 - }, - { - "description": "butterscotch", - "position": 13, - "type": "colorsecondary", - "kittyId": 750763 - }, - { - "description": "purplehaze", - "position": 28, - "type": "colortertiary", - "kittyId": 484303 - }, - { - "description": "topaz", - "position": -1, - "type": "coloreyes", - "kittyId": 1289248 - } - ], - "color": "topaz", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg", - "is_exclusive": false, - "created_at": "2018-12-16T05:37:33.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.png", - "name": "Sergeant Delibinky", - "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "id": 1289248, - "is_fancy": false, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg", - "status": { - "is_ready": true, - "cooldown": 1521350296999, - "is_gestating": false - } - }, - "sire": { - "generation": 12, - "owner": { - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f" - }, - "hatched": true, - "enhanced_cattributes": [], - "color": "topaz", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "is_exclusive": false, - "created_at": "2018-12-16T06:15:48.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "kitty_type": "fancy", - "fancy_type": "Pawrula", - "name": "Pawrula The Bright", - "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "id": 1289336, - "is_fancy": true, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "status": { - "is_ready": true, - "cooldown": 1521366384221, - "is_gestating": false - } - }, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg", - "watchlist": { - "count": 0, - "is_watchlisted": false - }, - "status": { - "is_ready": true, - "cooldown_end_block": 9932251, - "cooldown": 1571707809089, - "dynamic_cooldown": 1595199834562, - "cooldown_index": 8, - "is_gestating": false - } - }, - "tokenUri": { - "gateway": "https://api.cryptokitties.co/v3/kitties/1289657", - "raw": "https://api.cryptokitties.co/v3/kitties/1289657" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "raw": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg", - "format": "svg+xml", - "bytes": 63131 - } - ], - "balance": 1 - } - ] - ``` - - -#### V3 Example Response - - - ```json json - [ - { - "contract": { - "address": "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d", - "name": "CryptoKitties", - "symbol": "CK", - "totalSupply": "2023232", - "tokenType": "ERC721", - "contractDeployer": "0xba52c75764d6F594735dc735Be7F1830CDf58dDf", - "deployedBlockNumber": 4605167, - "openSeaMetadata": { - "floorPrice": 0.006, - "collectionName": "CryptoKitties", - "collectionSlug": "cryptokitties", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg?w=500&auto=format", - "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.", - "externalUrl": "https://www.cryptokitties.co/", - "twitterUsername": "CryptoKitties", - "discordUrl": "https://discord.gg/cryptokitties", - "bannerImageUrl": "https://i.seadn.io/gcs/static/banners/cryptokitties-banner2.png?w=500&auto=format", - "lastIngestedAt": "2023-09-18T00:29:33.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "1289657", - "tokenType": "ERC721", - "name": "Nala", - "tokenUri": "https://api.cryptokitties.co/v3/kitties/1289657", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "contentType": "image/svg+xml", - "size": 63131, - "originalUrl": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg" - }, - "raw": { - "tokenUri": "https://api.cryptokitties.co/v3/kitties/1289657", - "metadata": { - "birthday": "2018-12-16T00:00:00.000Z", - "hatched": true, - "enhanced_cattributes": [ - { - "description": "spock", - "position": 5850, - "type": "pattern", - "kittyId": 680104 - }, - { - "description": "se7", - "position": -1, - "type": "secret", - "kittyId": 1289657 - } - ], - "color": "cyan", - "created_at": "2018-12-16T08:12:41.000Z", - "bio": "En Taro Adun! I'm Nala. I am currently trying to start my own company making berets for tripod kitties. I combine the best qualities of Ryan Gosling, Benjamin Franklin, and Raekwon. I can tell you like to get into trouble.", - "language": "en", - "auction": {}, - "offer": {}, - "children": [ - { - "generation": 14, - "owner": { - "address": "0x002781a27becd321d831d815e3fa386944b329c8" - }, - "hatched": true, - "enhanced_cattributes": [], - "color": "cyan", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "is_exclusive": false, - "created_at": "2018-12-16T10:31:23.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "kitty_type": "fancy", - "fancy_type": "Pawrula", - "name": "Pawrula The Bright", - "owner_wallet_address": "0x002781a27becd321d831d815e3fa386944b329c8", - "id": 1290051, - "is_fancy": true, - "wrapped": true, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "status": { - "is_ready": true, - "cooldown": 1527648022509, - "is_gestating": false - } - }, - { - "generation": 14, - "owner": { - "address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b" - }, - "hatched": true, - "enhanced_cattributes": [ - { - "description": "soserious", - "position": -1, - "type": "mouth", - "kittyId": 1903269 - }, - { - "description": "doridnudibranch", - "position": 132, - "type": "coloreyes", - "kittyId": 680079 - } - ], - "color": "doridnudibranch", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg", - "is_exclusive": false, - "created_at": "2020-04-23T22:10:56.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.png", - "name": "Fressbert", - "owner_wallet_address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b", - "id": 1903269, - "is_fancy": false, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg", - "status": { - "is_ready": true, - "cooldown": 1607028977617, - "is_gestating": false - } - } - ], - "id": 1289657, - "is_fancy": false, - "wrapped": true, - "generation": 13, - "owner": { - "address": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "hasDapper": false - }, - "genes": "508101394017420297960203117038449397458346282085579186181678174847507224", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg", - "is_prestige": false, - "is_exclusive": false, - "is_special_edition": false, - "purrs": { - "count": 1, - "is_purred": false - }, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.png", - "hatcher": { - "image": "5", - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "hasDapper": false, - "nickname": "Kitten Mittens LLC 10D 10K 10H" - }, - "background_color": "#c5eefa", - "name": "Nala", - "matron": { - "generation": 12, - "owner": { - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f" - }, - "hatched": true, - "enhanced_cattributes": [ - { - "description": "soserious", - "position": -1, - "type": "mouth", - "kittyId": 1289248 - }, - { - "description": "chronic", - "position": 87, - "type": "eyes", - "kittyId": 468466 - }, - { - "description": "topaz", - "position": -1, - "type": "coloreyes", - "kittyId": 1289248 - } - ], - "color": "topaz", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg", - "is_exclusive": false, - "created_at": "2018-12-16T05:37:33.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.png", - "name": "Sergeant Delibinky", - "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "id": 1289248, - "is_fancy": false, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg", - "status": { - "is_ready": true, - "cooldown": 1521350296999, - "is_gestating": false - } - }, - "sire": { - "generation": 12, - "owner": { - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f" - }, - "hatched": true, - "enhanced_cattributes": [], - "color": "topaz", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "is_exclusive": false, - "created_at": "2018-12-16T06:15:48.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "kitty_type": "fancy", - "fancy_type": "Pawrula", - "name": "Pawrula The Bright", - "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "id": 1289336, - "is_fancy": true, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "status": { - "is_ready": true, - "cooldown": 1521366384221, - "is_gestating": false - } - }, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg", - "watchlist": { - "count": 0, - "is_watchlisted": false - }, - "status": { - "is_ready": true, - "cooldown_end_block": 9932251, - "cooldown": 1571707809089, - "dynamic_cooldown": 1595681023241, - "cooldown_index": 8, - "is_gestating": false - } - } - }, - "collection": { - "name": "CryptoKitties", - "slug": "cryptokitties", - "externalUrl": "https://www.cryptokitties.co/", - "bannerImageUrl": "https://i.seadn.io/gcs/static/banners/cryptokitties-banner2.png?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T19:21:52.169Z", - "balance": "1", - "acquiredAt": {} - }, - { - "contract": { - "address": "0xEA67b4DD7BaCAE340Bc4E43652044B5CDED1963c", - "name": "Moonkys", - "symbol": "MOONK", - "totalSupply": "8968", - "tokenType": "ERC721", - "contractDeployer": "0x94f65107EB422c67E61588682Fcf9D85AaC940B8", - "deployedBlockNumber": 14045176, - "openSeaMetadata": { - "floorPrice": 0.0019, - "collectionName": "The MoonkysNFT", - "collectionSlug": "the-moonkysnft", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/HagE-EZ6Wrf5Odw56FjtlSmfFvyEAz5Vg1p76yH-ARh_erNiiWMknrktD7mphF_9QRP_SOzx_Gmm1HrgFv9reHr6eMBxh4FWUg2j5A?w=500&auto=format", - "description": "A collection of 9000 Moonkys!\r\nAll different, all endearing, from the jungle to the moon and beyond.", - "externalUrl": "https://www.moonkys.art", - "twitterUsername": "MoonkysNFT", - "discordUrl": "https://discord.gg/8sZyt3SNUY", - "bannerImageUrl": "https://i.seadn.io/gae/NwDkjH5GU0DsDmQUUnkHk0i6gQcil-pNMPs9su9r2V_mgsTjgBhbg1YM9450riZYsxTAE9HlbDd0R269vfTDVrCZDkN4S_m5hH-5qQ?w=500&auto=format", - "lastIngestedAt": "2023-09-18T05:52:19.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "2378", - "tokenType": "ERC721", - "name": "Moonky #2378", - "description": "A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.", - "tokenUri": "https://ipfs.io/ipfs/QmThsntJV1wZuF3HdvYWG9QkVVSW1WwU5TZrCH36skCe21/2378", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/a29980483f4257bde13a28906ca87267", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a29980483f4257bde13a28906ca87267", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/a29980483f4257bde13a28906ca87267", - "contentType": "image/png", - "size": 233824, - "originalUrl": "https://ipfs.io/ipfs/QmRmquSbLpiYRd8nCURUmP2fJ9LbaEtG3tJLGGscFp1WAT" - }, - "raw": { - "tokenUri": "https://ipfs.io/ipfs/QmThsntJV1wZuF3HdvYWG9QkVVSW1WwU5TZrCH36skCe21/2378", - "metadata": { - "name": "Moonky #2378", - "description": "A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.", - "image": "https://ipfs.io/ipfs/QmRmquSbLpiYRd8nCURUmP2fJ9LbaEtG3tJLGGscFp1WAT", - "attributes": [ - { - "value": "Orange", - "trait_type": "Background" - }, - { - "value": "Cobra Kai", - "trait_type": "Hat" - } - ], - "external_link": "https://www.moonkys.art" - } - }, - "collection": { - "name": "The MoonkysNFT", - "slug": "the-moonkysnft", - "externalUrl": "https://www.moonkys.art", - "bannerImageUrl": "https://i.seadn.io/gae/NwDkjH5GU0DsDmQUUnkHk0i6gQcil-pNMPs9su9r2V_mgsTjgBhbg1YM9450riZYsxTAE9HlbDd0R269vfTDVrCZDkN4S_m5hH-5qQ?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xffa6c931719cf546df7e48010bde2b0fd0bfc431", - "blockNumber": 15108732, - "timestamp": "2022-07-09T13:47:51Z", - "transactionHash": "0xce02924d42c0d6f1e5144bbfea8a49fc4fb0330a42782ac8c7c00b7d10b8a4c4" - }, - "timeLastUpdated": "2023-08-01T07:40:39.116Z", - "balance": "1", - "acquiredAt": {} - } - ] - ``` - - -*** - -## [getNftsForContractIterator -SDK](/reference/sdk-getnftsforcontractiterator) - -Fetches all NFTs for a given contract address and yields them in an async iterable. - -This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in V3. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to a `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3, which contains the `tokenUri`, `error`, and `metadata` parameters -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `isSpam` and `spamClassifications` parameters for `spamInfo` in V2 have been added to the `contract` object in V3. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. -* The `acquiredAt` object has been added to the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address whose NFTs you want to fetch - const contractAddress = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - // create an async generator function that uses the getNftsForContractIterator method - async function getNftsForContract() { - try { - let nfts = []; - // Get the async iterable for the contract's NFTs. - const nftsIterable = alchemy.nft.getNftsForContractIterator(contractAddress); - - // Iterate over the NFTs and add them to the nfts array. - for await (const nft of nftsIterable) { - nfts.push(nft); - } - - // Log the NFTs. - console.log(nfts); - } catch (error) { - console.log(error); - } - } - - // call the async generator function - getNftsForContract(); - - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ----------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug` (New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl` (New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `tokenUri` | `tokenUri` | -| `title` | `name` | -| `description` | `description` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| `rawMetadata.error` | `raw.error` | -| - | `raw.tokenUri` | -| `media` | `image` | -| - | `collection` (New in V3) | -| - | `mint`(New in V3) | -| `timeLastUpdated` | `timeLastUpdated` | -| - | `acquiredAt` | - -### Example Responses - -#### V2 Example Response - - - ```json json - [ - { - "contract": { - "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - "name": "BoredApeYachtClub", - "symbol": "BAYC", - "totalSupply": "10000", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 33.92, - "collectionName": "Bored Ape Yacht Club", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format", - "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.", - "externalUrl": "http://www.boredapeyachtclub.com/", - "twitterUsername": "BoredApeYC", - "discordUrl": "https://discord.gg/3P5K3dzgdB", - "lastIngestedAt": "2023-07-21T02:53:34.000Z" - }, - "contractDeployer": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03", - "deployedBlockNumber": 12287507 - }, - "tokenId": "0", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-20T00:59:03.382Z", - "rawMetadata": { - "image": "ipfs://QmRRPWG96cmgTn2qSzjwr2qvfNEuhunv6FNeMFGa9bx6mQ", - "attributes": [ - { - "value": "Silver Hoop", - "trait_type": "Earring" - }, - { - "value": "X Eyes", - "trait_type": "Eyes" - } - ] - }, - "tokenUri": { - "gateway": "https://alchemy.mypinata.cloud/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/0", - "raw": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/0" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/415d618f5fef7bfe683e02d4653c4289", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/415d618f5fef7bfe683e02d4653c4289", - "raw": "ipfs://QmRRPWG96cmgTn2qSzjwr2qvfNEuhunv6FNeMFGa9bx6mQ", - "format": "png", - "bytes": 133270 - } - ] - }, - { - "contract": { - "address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - "name": "BoredApeYachtClub", - "symbol": "BAYC", - "totalSupply": "10000", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 33.92, - "collectionName": "Bored Ape Yacht Club", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format", - "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.", - "externalUrl": "http://www.boredapeyachtclub.com/", - "twitterUsername": "BoredApeYC", - "discordUrl": "https://discord.gg/3P5K3dzgdB", - "lastIngestedAt": "2023-07-21T02:53:34.000Z" - }, - "contractDeployer": "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03", - "deployedBlockNumber": 12287507 - }, - "tokenId": "9999", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-18T12:25:10.309Z", - "rawMetadata": { - "image": "ipfs://QmejYePrutbfWEV8wA3ogTHi2cf2j6hoaPhZSc6vNE43nH", - "attributes": [ - { - "value": "Army Hat", - "trait_type": "Hat" - }, - { - "value": "Scumbag", - "trait_type": "Eyes" - } - ] - }, - "tokenUri": { - "gateway": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/9999", - "raw": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/9999" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/4b5307d8d2a9d044b659f4eecf3e018e", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/4b5307d8d2a9d044b659f4eecf3e018e", - "raw": "ipfs://QmejYePrutbfWEV8wA3ogTHi2cf2j6hoaPhZSc6vNE43nH", - "format": "png", - "bytes": 135967 - } - ] - } - ] - ``` - - -#### V3 Example Response - - - ```json json - [ - { - "contract": { - "address": "0xe785E82358879F061BC3dcAC6f0444462D4b5330", - "name": "World Of Women", - "symbol": "WOW", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0xc9b6321dc216D91E626E9BAA61b06B0E4d55bdb1", - "deployedBlockNumber": 12907782, - "openSeaMetadata": { - "floorPrice": 0.6021, - "collectionName": "World of Women", - "collectionSlug": "world-of-women-nft", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format", - "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.", - "externalUrl": "http://worldofwomen.art", - "twitterUsername": "worldofwomennft", - "discordUrl": "https://discord.gg/worldofwomen", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format", - "lastIngestedAt": "2023-09-18T12:28:27.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "44", - "tokenType": "ERC721", - "name": "WoW #44", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "contentType": "image/png", - "size": 105117, - "originalUrl": "https://ipfs.io/ipfs/QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi" - }, - "raw": { - "tokenUri": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "metadata": { - "name": "WoW #44", - "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi", - "attributes": [ - { - "value": "Green Orange", - "trait_type": "Background" - }, - { - "value": "Purple", - "trait_type": "Lips Color" - } - ] - } - }, - "collection": { - "name": "World of Women", - "slug": "world-of-women-nft", - "externalUrl": "http://worldofwomen.art", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T13:25:41.833Z" - } - ] - ``` - - -*** - -## [getContractMetadata - SDK](/reference/sdk-getcontractmetadata) - -Get the NFT collection metadata associated with the provided parameters. - -### Overview of Changes - -* The `openSea` object in the response structure has been renamed to `openSeaMetadata` in the V3 response. -* The `collectionSlug` and `bannerImageUrl` have been added to the `openSeaMetadata` object in the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the address whose contract metadata you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch metadata - const response = await alchemy.nft.getContractMetadata(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------------------------- | ------------------------------------------- | -| `address` | `address` | -| `name` | `name` | -| `symbol` | `symbol` | -| `totalSupply` | `totalSupply` | -| `tokenType` | `tokenType` | -| `openSea.floorPrice` | `openSeaMetadata.floorPrice` | -| `openSea.collectionName` | `openSeaMetadata.collectionName` | -| - | `openSeaMetadata.collectionSlug`(New in V3) | -| `openSea.safelistRequestStatus` | `openSeaMetadata.safelistRequestStatus` | -| `openSea.imageUrl` | `openSeaMetadata.imageUrl` | -| `openSea.description` | `openSeaMetadata.description` | -| `openSea.externalUrl` | `openSeaMetadata.externalUrl` | -| `openSea.twitterUsername` | `openSeaMetadata.twitterUsername` | -| `openSea.discordUrl` | `openSeaMetadata.discordUrl` | -| - | `openSeaMetadata.bannerImageUrl`(New in V3) | -| `openSea.lastIngestedAt` | `openSeaMetadata.lastIngestedAt` | -| `contractDeployer` | `contractDeployer` | -| `deployedBlockNumber` | `deployedBlockNumber` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "address": "0x61fce80d72363b731425c3a2a46a1a5fed9814b2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "openSea": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "lastIngestedAt": "2023-07-21T11:02:08.000Z" - }, - "contractDeployer": "0xd32bb311467060cec58cd6e9b37134ca6d81377f", - "deployedBlockNumber": 13950908 - } - ``` - - -#### V3 Example Response - - - ```json json - { - "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F", - "deployedBlockNumber": 13950908, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "collectionSlug": "undeadwarriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format", - "lastIngestedAt": "2023-09-17T10:13:28.000Z" - } - } - ``` - - -*** - -## [getNftsForContract - SDK](/reference/sdk-getnftsforcontract) - -Get all NFTs for a given contract address. - -This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the options parameter. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in the V3 response. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to a `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3, which contains the `tokenUri`, `metadata`, and `error` parameters. -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `isSpam` and `spamClassifications` parameters for `spamInfo` in V2 has been added to the `contract` object in V3. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. -* The `acquiredAt` object has been added to the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address whose NFTs you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch metadata - const response = await alchemy.nft.getNftsForContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ----------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug` (New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl` (New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `tokenUri` | `tokenUri` | -| `title` | `name` | -| `description` | `description` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| `rawMetadata.error` | `raw.error` | -| - | `raw.tokenUri` | -| `media` | `image` | -| - | `collection` (New in V3) | -| - | `mint`(New in V3) | -| `timeLastUpdated` | `timeLastUpdated` | -| - | `acquiredAt` | -| `pageKey` | `pageKey` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x61fce80d72363b731425c3a2a46a1a5fed9814b2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "openSea": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "lastIngestedAt": "2023-07-21T11:02:08.000Z" - }, - "contractDeployer": "0xd32bb311467060cec58cd6e9b37134ca6d81377f", - "deployedBlockNumber": 13950908 - }, - "tokenId": "0", - "tokenType": "ERC1155", - "title": "Undead Warrior #0", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "timeLastUpdated": "2023-07-12T06:28:38.764Z", - "rawMetadata": { - "date": 1659652582322, - "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png", - "website": "https://undeadwarriors.io", - "dna": "d297klq0913j20c9l51nw51m2h68hgvfa539ut10", - "name": "Undead Warrior #0", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "edition": 0, - "attributes": [ - { - "value": "PastHistory", - "trait_type": "Background" - }, - { - "value": "Security", - "trait_type": "Rank" - } - ], - "compiler": "Black Badge: V.01A" - }, - "tokenUri": { - "gateway": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0", - "raw": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "raw": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png", - "format": "png", - "bytes": 1458749 - } - ] - }, - { - "contract": { - "address": "0x61fce80d72363b731425c3a2a46a1a5fed9814b2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "openSea": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Fr,\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "lastIngestedAt": "2023-07-21T11:02:08.000Z" - }, - "contractDeployer": "0xd32bb311467060cec58cd6e9b37134ca6d81377f", - "deployedBlockNumber": 13950908 - }, - "tokenId": "353", - "tokenType": "ERC1155", - "title": "Undead Warrior #353", - "description": "Undead Warriors in the E-Gaming and Web 3 space.", - "timeLastUpdated": "2023-07-12T06:32:38.722Z", - "rawMetadata": { - "date": 1659653043027, - "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png", - "website": "https://undeadwarriors.io", - "dna": "aa09f30b73d7fa23c636ff2734f9e7b48d2ce1b1", - "name": "Undead Warrior #353", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "edition": 353, - "attributes": [ - { - "value": "LaunchBay", - "trait_type": "Background" - }, - { - "value": "Warrior", - "trait_type": "Rank" - } - ], - "compiler": "Black Badge: V.01A" - }, - "tokenUri": { - "gateway": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353", - "raw": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "raw": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png", - "format": "png", - "bytes": 1645083 - } - ] - } - ], - "pageKey": "0x0162" - } - ``` - - -#### V3 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F", - "deployedBlockNumber": 13950908, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "collectionSlug": "undeadwarriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format", - "lastIngestedAt": "2023-09-17T10:13:28.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "0", - "tokenType": "ERC1155", - "name": "Undead Warrior #0", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "tokenUri": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "contentType": "image/png", - "size": 1458749, - "originalUrl": "https://ipfs.io/ipfs/QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png" - }, - "raw": { - "tokenUri": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0", - "metadata": { - "date": 1659652582322, - "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png", - "website": "https://undeadwarriors.io", - "dna": "d297klq0913j20c9l51nw51m2h68hgvfa539ut10", - "name": "Undead Warrior #0", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "edition": 0, - "attributes": [ - { - "value": "PastHistory", - "trait_type": "Background" - }, - { - "value": "Security", - "trait_type": "Rank" - } - ], - "compiler": "Black Badge: V.01A" - } - }, - "collection": { - "name": "Undead Warriors", - "slug": "undeadwarriors", - "externalUrl": "http://undeadwarriors.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-17T09:58:57.133Z" - }, - { - "contract": { - "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F", - "deployedBlockNumber": 13950908, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "collectionSlug": "undeadwarriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format", - "lastIngestedAt": "2023-09-17T10:13:28.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "353", - "tokenType": "ERC1155", - "name": "Undead Warrior #353", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "tokenUri": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "contentType": "image/png", - "size": 1645083, - "originalUrl": "https://ipfs.io/ipfs/QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png" - }, - "raw": { - "tokenUri": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353", - "metadata": { - "date": 1659653043027, - "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png", - "website": "https://undeadwarriors.io", - "dna": "aa09f30b73d7fa23c636ff2734f9e7b48d2ce1b1", - "name": "Undead Warrior #353", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "edition": 353, - "attributes": [ - { - "value": "LaunchBay", - "trait_type": "Background" - }, - { - "value": "Warrior", - "trait_type": "Rank" - } - ], - "compiler": "Black Badge: V.01A" - } - }, - "collection": { - "name": "Undead Warriors", - "slug": "undeadwarriors", - "externalUrl": "http://undeadwarriors.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T12:33:14.542Z" - } - ], - "pageKey": "0x0162" - } - ``` - - -*** - -## [getTransfersForOwner - SDK](/reference/sdk-gettransfersforowner) - -The `getTransfersForOwner` method gets all NFT transfers for a given owner address. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in the V3 response. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to a `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3, which contains the `tokenUri`, `error`, and `metadata` parameters -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `isSpam` and `spamClassifications` parameters for `spamInfo` in V2 has been added to the `contract` object in V3. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. -* The `acquiredAt` object has been added to the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getTransfersForOwner method - const main = async () => { - // The owner address to get transfers for - let address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"; - - // Whether to get transfers TO or FROM the owner address. (Optional) - let category = "FROM"; - - // Additional options for the request. (Optional) - let options = { - /** - * List of NFT contract addresses to filter mints by. If omitted, defaults to - * all contract addresses. - */ - contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"], - /** - * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all - * NFTs. - */ - tokenType: "ERC721", - }; - - // Calling the getTransfersForOwner method - let transfers = await alchemy.nft.getTransfersForOwner( - address, - category, - options - ); - - // Logging the response to the console - console.log(transfers); - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ---------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.totalSupply` | `contract.totalSupply` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.openSea.floorPrice` | `contract.openSeaMetadata.floorPrice` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug`(New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| `contract.openSea.twitterUsername` | `contract.openSeaMetadata.twitterUsername` | -| `contract.openSea.discordUrl` | `contract.openSeaMetadata.discordUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl`(New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `title` | `name` | -| `description` | `description` | -| `timeLastUpdated` | `timeLastUpdated` | -| `rawMetadata` | `raw` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| `rawMetadata.tokenUri` | `raw.tokenUri` | -| `rawMetadata.error` | `raw.error` | -| `tokenUri` | `tokenUri` | -| `media` | `image` | -| `from` | `from` | -| `to` | `to` | -| `transactionHash` | `transactionHash` | -| `blockNumber` | `blockNumber` | -| `pageKey` | `pageKey` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0031, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-07-12T23:25:34.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "890", - "tokenType": "ERC721", - "title": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-07-15T10:06:39.607Z", - "rawMetadata": { - "name": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - { - "value": "Tie Dye", - "trait_type": "Outfit" - }, - { - "value": "Double", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890", - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "raw": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "format": "png", - "bytes": 199542 - } - ], - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x84561625814e1c7e882c1ae20a9d722a8c301f04", - "transactionHash": "0x43ff4418ca88d94857f3b687e8ac7450e107c2a36517e8d59a5308dba4acec94", - "blockNumber": "0xec8125" - }, - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0031, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-07-12T23:25:34.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "3990", - "tokenType": "ERC721", - "title": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-02-28T17:51:29.181Z", - "rawMetadata": { - "name": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "attributes": [ - { - "value": "Pink Checkerboard", - "trait_type": "Background" - }, - { - "value": "Nubs", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "gateway": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990", - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "raw": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "format": "png", - "bytes": 198447 - } - ], - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x6a3623db71c1b3442a94e3fd4655334b48114693", - "transactionHash": "0x13f33287ac95893e06cda2cd30c08003808ac46867382d8c92e1c864e4895ec6", - "blockNumber": "0xec8131" - } - ] - } - ``` - - -#### V3 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "890", - "tokenType": "ERC721", - "name": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "contentType": "image/png", - "size": 199542, - "originalUrl": "https://ipfs.io/ipfs/QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890", - "metadata": { - "name": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - { - "value": "Double", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "blockNumber": 15143441, - "timestamp": "2022-07-14T22:17:44Z", - "transactionHash": "0x317dfdacec0ae4cbe0a1f7ee394f9cc7c6d4ae9985a5202fcfef28b3a19ce899" - }, - "timeLastUpdated": "2023-08-13T03:40:39.232Z", - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x84561625814e1c7e882c1ae20a9d722a8c301f04", - "transactionHash": "0x43ff4418ca88d94857f3b687e8ac7450e107c2a36517e8d59a5308dba4acec94", - "blockNumber": "0xec8125" - }, - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "3990", - "tokenType": "ERC721", - "name": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "contentType": "image/png", - "size": 198447, - "originalUrl": "https://ipfs.io/ipfs/QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990", - "metadata": { - "name": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "attributes": [ - { - "value": "Pink Checkerboard", - "trait_type": "Background" - }, - { - "value": "Nubs", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "blockNumber": 15214264, - "timestamp": "2022-07-25T22:02:43Z", - "transactionHash": "0x343e4697e0e834acb61c23268a63ddddb29e29ce6bcaf652b08430f7c0fdc934" - }, - "timeLastUpdated": "2023-02-28T17:51:29.181Z", - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x6a3623db71c1b3442a94e3fd4655334b48114693", - "transactionHash": "0x13f33287ac95893e06cda2cd30c08003808ac46867382d8c92e1c864e4895ec6", - "blockNumber": "0xec8131" - } - ] - } - ``` - - -*** - -## [getTransfersForContract - SDK](/reference/sdk-gettransfersforcontract) - -The `getTransfersForContract` method gets all NFT transfers for a given NFT contract address. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in the V3 response. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to a `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3, which contains the `tokenUri`, `metadata`, and `error` parameters. -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `isSpam` and `spamClassifications` parameters for `spamInfo` in V2 has been added to the `contract` object in V3. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. -* The `acquiredAt` object has been added to the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getTransfersForContract method - const main = async () => { - // The nft contract address to get transfers for - let contractAddress = "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"; - - // Additional options for the request. (Optional) - let options = { - /** Starting block (inclusive) to get transfers from. */ - fromBlock: 16564734, - /** Ending block (inclusive) to get transfers from. */ - toBlock: 16567427, - /** - * Whether to return results in ascending or descending order by block number. - * Defaults to ascending if omitted. - */ - order: "desc", - }; - - // Calling the getTransfersForContract method - let transfers = await alchemy.nft.getTransfersForContract( - contractAddress, - options - ); - - // Logging the response to the console - console.log(transfers); - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same with V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ---------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.totalSupply` | `contract.totalSupply` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.openSea.floorPrice` | `contract.openSeaMetadata.floorPrice` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug`(New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| `contract.openSea.twitterUsername` | `contract.openSeaMetadata.twitterUsername` | -| `contract.openSea.discordUrl` | `contract.openSeaMetadata.discordUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl`(New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `title` | `name` | -| `description` | `description` | -| `timeLastUpdated` | `timeLastUpdated` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.tokenUri` | `raw.tokenUri` | -| `rawMetadata.error` | `raw.error` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| `tokenUri` | `tokenUri` | -| `media` | `image` | -| `from` | `from` | -| `to` | `to` | -| `transactionHash` | `transactionHash` | -| `blockNumber` | `blockNumber` | -| `pageKey` | `pageKey` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0031, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-07-12T23:25:34.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "5447", - "tokenType": "ERC721", - "title": "3L3PHANTS #5447", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-02-18T18:43:33.104Z", - "rawMetadata": { - "name": "3L3PHANTS #5447", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx", - "attributes": [ - { - "value": "Green", - "trait_type": "Background" - }, - { - "value": "Gold", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "gateway": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447", - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "raw": "ipfs://QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx", - "format": "png", - "bytes": 211149 - } - ], - "from": "0x93ab7195dc4dd4a098efb10b47fe48c7893b8864", - "to": "0xad2596f9506309ea64e81605aaa4e898134ac1f2", - "transactionHash": "0xcec76b5c70c1dc71c09a2f383a4ae5a93331a0d4dea690171041263ae416c05c", - "blockNumber": "0xfccb9e" - }, - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0031, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-07-12T23:25:34.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "372", - "tokenType": "ERC721", - "title": "3L3PHANTS #372", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-03-15T08:33:25.446Z", - "rawMetadata": { - "name": "3L3PHANTS #372", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - "value": "Brown", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372", - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372" - }, - "media": [ - { - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "raw": "ipfs://QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY", - "format": "png", - "bytes": 189584 - } - ], - "from": "0xb7dded5be42790543096fd7d765155de658530f8", - "to": "0x4209859ae2992f581d2678392b4ac80c13d5eed4", - "transactionHash": "0xb89d383a80ead28c4ec00d985dd5f25989c02d945bb84b55261e07ce34d4406f", - "blockNumber": "0xfcc202" - } - ] - } - ``` - - -#### V3 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "5447", - "tokenType": "ERC721", - "name": "3L3PHANTS #5447", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "contentType": "image/png", - "size": 211149, - "originalUrl": "https://ipfs.io/ipfs/QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447", - "metadata": { - "name": "3L3PHANTS #5447", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx", - "attributes": [ - { - "value": "Green", - "trait_type": "Background" - }, - { - "value": "Red Hoodie", - "trait_type": "Outfit" - }, - { - "value": "Gold", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xfd279644adb28043ee10111f2971b3e4fb655e86", - "blockNumber": 15260123, - "timestamp": "2022-08-02T01:18:08Z", - "transactionHash": "0x7cfdf3018a244529c6b1c6b85171f5c1cbf355c78b5f4faa80bd2fcfaf0d4429" - }, - "timeLastUpdated": "2023-02-18T18:43:33.104Z", - "from": "0x93ab7195dc4dd4a098efb10b47fe48c7893b8864", - "to": "0xad2596f9506309ea64e81605aaa4e898134ac1f2", - "transactionHash": "0xcec76b5c70c1dc71c09a2f383a4ae5a93331a0d4dea690171041263ae416c05c", - "blockNumber": "0xfccb9e" - }, - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "372", - "tokenType": "ERC721", - "name": "3L3PHANTS #372", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "contentType": "image/png", - "size": 189584, - "originalUrl": "https://ipfs.io/ipfs/QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372", - "metadata": { - "name": "3L3PHANTS #372", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - { - "value": "Brown", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xa590b03f6492f658b9d13f49924b2b1bb4b596b1", - "blockNumber": 15141967, - "timestamp": "2022-07-14T16:52:41Z", - "transactionHash": "0xc126314bde53b9348df97561c796ff9535549ac7fa596f9f7223084443bbdff8" - }, - "timeLastUpdated": "2023-03-15T08:33:25.446Z", - "from": "0xb7dded5be42790543096fd7d765155de658530f8", - "to": "0x4209859ae2992f581d2678392b4ac80c13d5eed4", - "transactionHash": "0xb89d383a80ead28c4ec00d985dd5f25989c02d945bb84b55261e07ce34d4406f", - "blockNumber": "0xfcc202" - } - ] - } - ``` - - -*** - -## [getMintedNfts - SDK](/reference/sdk-getmintednfts) - -The `getMintedNfts` method gets all the NFTs minted by a specified owner address. - -### Overview of Changes - -* The `openSea` object in the parent `contract` object has been changed to `openSeaMetadata` in the V3 response. -* The `collectionSlug` and `bannerImageUrl` parameters have been added to the `contract.openSeaMetadata` object in V3. -* The `title` parameter in V2 has been changed to a `name` parameter in V3. -* The `media` parameter in V2 has been replaced with an `image` object in V3. -* The `rawMetadata`object parameter has been changed to a `raw` object in V3, which contains the `tokenUri`,`metadata`, and `error` parameters -* The `tokenUri` object in V2 has been changed to a `tokenUri` string parameter in the V3 response. -* The `isSpam` and `spamClassifications` parameters have been added to the `contract` object in V3. -* The `mint` object parameter has been added to the V3 response containing optional `mintAddress?`, `blockNumber?`, `timestamp?`, and `transactionHash?` parameters. -* The `collection` object has been added to the V3 response containing the `name`, `slug?`, `externalUrl?`, and `bannerImageUrl?` parameters. -* The `acquiredAt` object has been added to the V3 response. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getMintedNfts method - const main = async () => { - // Address for the NFT owner (can be in ENS format). - let address = "vitalik.eth"; - - // Additional options for the request. (Optional) - let options = { - /** - * List of NFT contract addresses to filter mints by. If omitted, defaults to - * all contract addresses. - */ - contractAddresses: ["0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85"], - /** - * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all - * NFTs. - */ - tokenType: "ERC721", - }; - - // Calling the getMintedNfts method - let mintedNfts = await alchemy.nft.getMintedNfts(address, options); - - // Logging the response to the console - console.log(mintedNfts); - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ---------------------------------------- | ---------------------------------------------------- | -| `contract.address` | `contract.address` | -| `contract.name` | `contract.name` | -| `contract.symbol` | `contract.symbol` | -| `contract.totalSupply` | `contract.totalSupply` | -| `contract.tokenType` | `contract.tokenType` | -| `contract.openSea.floorPrice` | `contract.openSeaMetadata.floorPrice` | -| `contract.openSea.collectionName` | `contract.openSeaMetadata.collectionName` | -| - | `contract.openSeaMetadata.collectionSlug`(New in V3) | -| `contract.openSea.safelistRequestStatus` | `contract.openSeaMetadata.safelistRequestStatus` | -| `contract.openSea.imageUrl` | `contract.openSeaMetadata.imageUrl` | -| `contract.openSea.description` | `contract.openSeaMetadata.description` | -| `contract.openSea.externalUrl` | `contract.openSeaMetadata.externalUrl` | -| `contract.openSea.twitterUsername` | `contract.openSeaMetadata.twitterUsername` | -| `contract.openSea.discordUrl` | `contract.openSeaMetadata.discordUrl` | -| - | `contract.openSeaMetadata.bannerImageUrl`(New in V3) | -| `contract.openSea.lastIngestedAt` | `contract.openSeaMetadata.lastIngestedAt` | -| `contract.contractDeployer` | `contract.contractDeployer` | -| `contract.deployedBlockNumber` | `contract.deployedBlockNumber` | -| `spamInfo.isSpam` | `contract.isSpam` | -| `spamInfo.classifications` | `contract.spamClassifications` | -| `tokenId` | `tokenId` | -| `tokenType` | `tokenType` | -| `title` | `name` | -| `description` | `description` | -| `timeLastUpdated` | `timeLastUpdated` | -| `rawMetadata` | `raw` | -| `rawMetadata.metadata` | `raw.metadata` | -| `rawMetadata.error` | `raw.error` | -| `rawMetadata.attributes` | `raw.metadata.attributes` | -| - | `raw.tokenUri` | -| `tokenUri` | `tokenUri` | -| `media` | `image` | -| `from` | `from` | -| `to` | `to` | -| `transactionHash` | `transactionHash` | -| `blockNumber` | `blockNumber` | -| `pageKey` | `pageKey` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0005, - "collectionName": "ENS: Ethereum Name Service", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-07-21T07:08:17.000Z" - }, - "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8", - "deployedBlockNumber": 9380410 - }, - "tokenId": "111352653673047713804124050598355152059184664886497242203777472800304891334469", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-21T12:40:51.364Z", - "metadataError": "Token uri responded with a non 200 response code", - "rawMetadata": { - "metadata": [], - "attributes": [] - }, - "tokenUri": { - "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45", - "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45" - }, - "media": [], - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xc5bc4cf983e98ad9708dee356a17196aa367228f9ec87f81e622c81adaa6211e", - "blockNumber": "0xe88086" - }, - { - "contract": { - "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0005, - "collectionName": "ENS: Ethereum Name Service", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-07-21T07:08:17.000Z" - }, - "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8", - "deployedBlockNumber": 9380410 - }, - "tokenId": "103040680624633360426956226800459505851045291463662393946817594920946384752224", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-21T12:40:50.845Z", - "metadataError": "Token uri responded with a non 200 response code", - "rawMetadata": { - "metadata": [], - "attributes": [] - }, - "tokenUri": { - "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60", - "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60" - }, - "media": [], - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0x9f21fad5549aaf94e7731f5c4649353926cf7520b96891b8b511d099020fb887", - "blockNumber": "0xf47bcd" - }, - { - "contract": { - "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0005, - "collectionName": "ENS: Ethereum Name Service", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-07-21T07:08:17.000Z" - }, - "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8", - "deployedBlockNumber": 9380410 - }, - "tokenId": "79362104341617195787435013155216554898816343870453146709166302825328240112628", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-07-21T12:40:51.867Z", - "metadataError": "Token uri responded with a non 200 response code", - "rawMetadata": { - "metadata": [], - "attributes": [] - }, - "tokenUri": { - "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4", - "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4" - }, - "media": [], - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xe3c78eca914f215644922e15d080b4198d552885a64958f4bec6516ace149b43", - "blockNumber": "0xf47bcd" - } - ] - } - ``` - - -#### V3 Example Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85", - "tokenType": "ERC721", - "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8", - "deployedBlockNumber": 9380410, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "ENS: Ethereum Name Service", - "collectionSlug": "ens", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-09-18T10:20:40.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "111352653673047713804124050598355152059184664886497242203777472800304891334469", - "tokenType": "ERC721", - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45", - "image": {}, - "raw": { - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45", - "metadata": {}, - "error": "Centralized gateway timed out, try again with a higher tokenUri timeout" - }, - "collection": { - "name": "ENS: Ethereum Name Service", - "slug": "ens", - "externalUrl": "https://ens.domains" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T14:06:39.073Z", - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xc5bc4cf983e98ad9708dee356a17196aa367228f9ec87f81e622c81adaa6211e", - "blockNumber": "0xe88086" - }, - { - "contract": { - "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85", - "tokenType": "ERC721", - "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8", - "deployedBlockNumber": 9380410, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "ENS: Ethereum Name Service", - "collectionSlug": "ens", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-09-18T10:20:40.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "103040680624633360426956226800459505851045291463662393946817594920946384752224", - "tokenType": "ERC721", - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60", - "image": {}, - "raw": { - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60", - "metadata": {}, - "error": "Centralized gateway timed out, try again with a higher tokenUri timeout" - }, - "collection": { - "name": "ENS: Ethereum Name Service", - "slug": "ens", - "externalUrl": "https://ens.domains" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T14:06:39.076Z", - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0x9f21fad5549aaf94e7731f5c4649353926cf7520b96891b8b511d099020fb887", - "blockNumber": "0xf47bcd" - }, - { - "contract": { - "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85", - "tokenType": "ERC721", - "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8", - "deployedBlockNumber": 9380410, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "ENS: Ethereum Name Service", - "collectionSlug": "ens", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-09-18T10:20:40.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "79362104341617195787435013155216554898816343870453146709166302825328240112628", - "tokenType": "ERC721", - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4", - "image": {}, - "raw": { - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4", - "metadata": {}, - "error": "Token uri responded with a non 200 response code" - }, - "collection": { - "name": "ENS: Ethereum Name Service", - "slug": "ens", - "externalUrl": "https://ens.domains" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T14:06:38.973Z", - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xe3c78eca914f215644922e15d080b4198d552885a64958f4bec6516ace149b43", - "blockNumber": "0xf47bcd" - } - ] - } - ``` - - -*** - -## [getOwnersForNft - SDK](/reference/sdk-getownersfornft) - -Gets all the owners for a given NFT contract address and token ID. - -### Overview of Changes - -* A new field `pageKey` has been added to the response structure in V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and token Id - const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - const tokenId = "1590"; - - //Call the method to fetch the owners for the collection - const response = await alchemy.nft.getOwnersForNft(address, tokenId) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------ | -------------------- | -| `owners` | `owners` | -| | `pageKey`(New in V3) | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "owners": [ - "0xf5fff32cf83a1a614e15f25ce55b0c0a6b5f8f2c" - ] - } - ``` - - -#### V3 Example Response - - - ```json json - { - "owners": [ - "0xF5FFF32CF83A1A614e15F25Ce55B0c0A6b5F8F2c" - ], - "pageKey": null - } - ``` - - -*** - -## [getOwnersForContract - SDK](/reference/sdk-getownersforcontract) - -Gets all the owners for a given NFT contract and the token balance. - -### Overview of Changes - -There are no changes in the request or response structure for the method `getOwnersForContract` between V2 and V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch the owners for the contract - const response = await alchemy.nft.getOwnersForContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------- | ------------- | -| `owners` | `owners` | -| `totalCount?` | `totalCount?` | -| `pageKey?` | `pageKey?` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "owners": [ - "0x001a61213d72f2f3c95ff743c80f472749ab8ad3", - "0x003a1acce28eb335f3ff1e93a5b09cd4b598ef62", - "0x00614efd868dabb5f92e15b0440d1f85ac0f9be1", - "0x006f48d6ed87efd9e0bc56cc7a8703d0455c2858", - "0x008b7903f1f0b825636739c7a3defb7eebc94f1d", - "0x008c79f10cbd14070b106b05d5fd494e084ee8a5", - "0x00ce8f7e0ec4f03a821e8cb3d84479d76151d0a9", - "0x00f3a0fcc47ba9f7a757c255aaa6a286a524cef9", - "0x016c6422b74463834514394b7207478982139bb4", - "0x016df42305bb3d0e21abf75b456a4babb1777a4b", - "0x01882145348b9908f803740e547efbad0983cdcb", - "0x018edc98b3190dbb261e6ff3858c4ba59c71ba94", - "0x019d99678bd3b9f1157e763398a3dd62cb760a23", - "0x01ae3e9aa99f080b59d3a02ee40478af8b3d63c1", - "0x01e4cf06c6adb9231a30ca17f4a62afe23c0a9c1", - "0x01e6357045328fa19c11994af6a4500754e6a75b", - "0x02070ed234f1a07ca88f6164791e033c97570d96", - "0x0207a5cfc75733d82f2dd5a8b6adf78277ef7347", - "0x025dca13f8803ed01b3ea717e2ee9daf7a383cda", - "0x02b92b2254c27bed8d4268e663200f705bc76e35", - "0xffc91af289242fb62d8d06116b2c5a6c6aa50205", - "0xffcebf6be845b95cfd42e77c65968662bc8f9f2f" - ] - } - ``` - - -#### V3 Example Response - - - ```json json - { - "owners": [ - "0x001a61213D72F2F3C95Ff743c80f472749AB8ad3", - "0x003a1aCce28eb335F3FF1E93A5B09cD4b598EF62", - "0x00614Efd868DAbB5f92E15b0440D1F85ac0f9be1", - "0x006F48D6eD87eFD9e0BC56cC7a8703D0455C2858", - "0x008B7903F1f0B825636739c7a3defb7EEbc94F1D", - "0x008c79F10CBd14070b106b05d5Fd494e084EE8A5", - "0x00Ce8F7e0EC4F03a821E8CB3D84479D76151D0A9", - "0x00f3a0fcC47ba9f7A757C255aaa6A286a524ceF9", - "0x016c6422B74463834514394B7207478982139bB4", - "0x016DF42305bb3D0E21abF75b456a4Babb1777A4B", - "0x01882145348B9908f803740e547EfbaD0983cDcB", - "0x018eDC98B3190DbB261E6Ff3858c4BA59c71Ba94", - "0x019D99678BD3B9F1157E763398a3Dd62cb760A23", - "0x01aE3e9Aa99F080b59D3A02EE40478af8b3d63c1", - "0x01E4cF06C6ADb9231a30Ca17f4A62afE23c0A9c1", - "0x01E6357045328fA19C11994af6a4500754E6a75b", - "0x02070ed234F1a07cA88F6164791e033C97570d96", - "0x0207A5cFc75733D82f2dd5A8b6adf78277EF7347", - "0x025DCA13f8803Ed01B3Ea717e2Ee9DaF7A383cDa", - "0x02B92b2254c27beD8d4268e663200f705bC76E35", - "0x02f52b4aF1deCD963a3f0586D28484F530bdC101", - "0x02fe09e15f1fEAEf2E4Dd4b7afd5A12630f1fae6", - "0x034C8f85476f2D30c946e3CE5929BC24e8D3B04F", - "0x037C8b05C9Ffe5e33B99372d17580C0C915AFa60", - "0x037FC3F7f58771CbcC4C32327814769FBF5A8F3F", - "0x038080B8BF89847Ca926F9731695859d9c55A4C6", - "0xffcEBF6Be845b95CFD42e77c65968662BC8F9f2F" - ] - } - ``` - - -*** - -## [getContractsForOwner - SDK](/reference/sdk-getcontractsforowner) - -Gets all NFT contracts held by the specified owner address. - -### Overview of Changes - -* A new `totalSupply` field has been added. -* The field `title` has been removed and replaced with `displayNft.name`. -* The field `tokenId` has been renamed to `displayNft.tokenId`. -* A new `image` object has been created with the specified mappings. -* The `openSea` object has been renamed to `openSeaMetadata`. -* The `collectionSlug` and `bannerUrl` parameters have been added to the `openSeaMetadata` object. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - const owner = "vitalik.eth" - - //Call the method - const response = await alchemy.nft.getContractsForOwner(owner) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 | V3 | -| ------------------------------- | --------------------------------------- | -| `address` | `address` | -| `totalBalance` | `totalBalance` | -| `numDistinctTokensOwned` | `numDistinctTokensOwned` | -| `name` | `name` | -| `title` | Not present, use `displayNft.name` | -| `symbol` | `symbol` | -| - | `totalSupply` | -| `tokenType` | `tokenType` | -| `contractDeployer` | `contractDeployer` | -| `deployedBlockNumber` | `deployedBlockNumber` | -| `isSpam` | `isSpam` | -| `tokenId` | `displayNft.tokenId` | -| `media` | `image` | -| `opensea.floorPrice` | `openSeaMetadata.floorPrice` | -| `opensea.collectionName` | `openSeaMetadata.collectionName` | -| - | `openSeaMetadata.collectionSlug` | -| `opensea.safelistRequestStatus` | `openSeaMetadata.safelistRequestStatus` | -| `opensea.imageUrl` | `openSeaMetadata.imageUrl` | -| `opensea.description` | `openSeaMetadata.description` | -| `opensea.externalUrl` | `openSeaMetadata.externalUrl` | -| `opensea.twitterUsername` | `openSeaMetadata.twitterUsername` | -| `opensea.discordUrl` | `openSeaMetadata.discordUrl` | -| - | `openSeaMetadata.bannerUrl` | -| `opensea.lastIngestedAt` | `openSeaMetadata.lastIngestedAt` | -| `totalCount` | `totalCount` | -| `pageKey` | `pageKey` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "contracts": [ - { - "address": "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3", - "totalBalance": 912, - "numDistinctTokensOwned": 80, - "isSpam": true, - "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000001", - "name": "Bored Ape Nike Club", - "title": "", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51d7d428041e23ef51422e110dfeff906e821cfe", - "deployedBlockNumber": 14276343, - "opensea": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-21T15:28:51.000Z" - }, - "media": [ - { - "gateway": "", - "raw": "" - } - ] - }, - { - "address": "0x0da763dfc24764275e56d9011a01186fbacf2edf", - "totalBalance": 10, - "numDistinctTokensOwned": 6, - "isSpam": true, - "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000012", - "name": "VeeCon", - "title": "", - "symbol": "VC", - "totalSupply": "8", - "tokenType": "ERC721", - "contractDeployer": "0xdce675fcce9cb500b62f69464fe10f2999d77a50", - "deployedBlockNumber": 14530344, - "opensea": { - "collectionName": "Vee Con Tickets Official", - "collectionSlug": "veecontickets-2022", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/wPIhTZGy2aMY3rHL6eUUvSansxQqTZwsbnD2Dt7AoW2YQZH-iwiue3Xt6YbO005Z_vwCzyKyVhmHBZ8C4KYttgjmzEpTRc6sAQLWag?w=500&auto=format", - "description": "[Mint on the website](https://veecontickets.xyz)\n\nVeeCon 2022 is a multi-day superconference where only VeeCon NFT ticket holders will experience an extraordinary lineup of content including iconic keynote speeches; innovative and educational talks, panels and Q&A sessions; and many collaborative experiences", - "externalUrl": "https://veecontickets.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/zjaIJ85YSsyeO88fFOegjzeh3lfG8Z0zNYjvjDGrRGpdTyEUw3upA7ZrdRTHbwWu7XVQPheZMOObLKrMWV0mQdbjhZeXiddyKnwLD9E?w=500&auto=format", - "lastIngestedAt": "2023-09-28T23:32:45.000Z" - }, - "media": [ - { - "gateway": "", - "raw": "" - } - ] - } - ], - "totalCount": 2207, - "pageKey": "94d6b0fd-5288-4cab-8f60-ac5f09941a65" - } - ``` - - -#### V3 Example Response - - - ```json json - { - "contracts": [ - { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-21T15:28:51.000Z" - }, - "totalBalance": "912", - "numDistinctTokensOwned": "80", - "isSpam": true, - "displayNft": { - "tokenId": "1" - }, - "image": {} - }, - { - "address": "0x0015F391949f25c3211063104aD4AFC99210f85c", - "name": "BAYC Otherside Land", - "symbol": "BAYC", - "totalSupply": "24", - "tokenType": "ERC721", - "contractDeployer": "0x4B7A67800712472F5f4a5f580c3B99345DF1CeD6", - "deployedBlockNumber": 14669988, - "openSeaMetadata": { - "collectionName": "BAYC Otherside Land V3", - "collectionSlug": "bayc-otherside-land-v3-7", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/aR91WTPUmY4QBkle9qBum5dfjfCyh9n8zgYWyMAFJ-3vUUdquzasMpYyl2Jr6elxhZlPuI1gzthut99h0Z33F_k-xqev_jGldV7X?w=500&auto=format", - "description": "[Mint on the website](https://baycofficial.xyz)\n\nBAYC Otherside Land is an open world that enables users to build 3D immersive applications on top of several blockchains. In BAYC Otherside Land, users can take advantage of traditional 3D open-world features such as building 3D architectures, hosting virtual meetings, exhibiting NFTs, and more advanced functionality.Details on Twitter @BoredApeYC or PUBLIC MINT NOW LIVE!\n", - "externalUrl": "https://baycofficial.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/buhkgp9EPv2YoCeB9k1XWMX7hkBbkpIFkwOdveTZPsVOuKiANbDBwjvAxSpvxhbh5NxU0Kkjje-3VVWk36z-f4Z5rlmAHZXMeisu?w=500&auto=format", - "lastIngestedAt": "2023-09-21T21:07:17.000Z" - }, - "totalBalance": "17", - "numDistinctTokensOwned": "6", - "isSpam": true, - "displayNft": { - "tokenId": "2" - }, - "image": {} - }, - { - "address": "0x0dA763DFc24764275E56D9011A01186fbacF2edf", - "name": "VeeCon", - "symbol": "VC", - "totalSupply": "8", - "tokenType": "ERC721", - "contractDeployer": "0xDce675fCcE9Cb500B62f69464fE10f2999d77A50", - "deployedBlockNumber": 14530344, - "openSeaMetadata": { - "collectionName": "Vee Con Tickets Official", - "collectionSlug": "veecontickets-2022", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/wPIhTZGy2aMY3rHL6eUUvSansxQqTZwsbnD2Dt7AoW2YQZH-iwiue3Xt6YbO005Z_vwCzyKyVhmHBZ8C4KYttgjmzEpTRc6sAQLWag?w=500&auto=format", - "description": "[Mint on the website](https://veecontickets.xyz)\n\nVeeCon 2022 is a multi-day superconference where only VeeCon NFT ticket holders will experience an extraordinary lineup of content including iconic keynote speeches; innovative and educational talks, panels and Q&A sessions; and many collaborative experiences", - "externalUrl": "https://veecontickets.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/zjaIJ85YSsyeO88fFOegjzeh3lfG8Z0zNYjvjDGrRGpdTyEUw3upA7ZrdRTHbwWu7XVQPheZMOObLKrMWV0mQdbjhZeXiddyKnwLD9E?w=500&auto=format", - "lastIngestedAt": "2023-09-19T03:10:31.000Z" - }, - "totalBalance": "10", - "numDistinctTokensOwned": "6", - "isSpam": true, - "displayNft": { - "tokenId": "18" - }, - "image": {} - } - ], - "pageKey": "75db8160-ea3f-4cb0-9bc4-4663f6a804af", - "totalCount": 2207 - } - ``` - - -*** - -## [getSpamContracts - SDK](/reference/sdk-getspamcontracts) - -Returns a list of all spam contracts marked by Alchemy. - -### Overview of Changes - -* The key name for the array of contract addresses in the response has been changed to `contractAddresses` in V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return a list of spam contracts - const response = await alchemy.nft.getSpamContracts() - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------ | ------------------------------- | -| N/A | `contractAddresses` (new in V3) | - -### Example Responses - -#### V2 Example Response - - - ```json json - [ - "0x000000000a42c2791eec307fff43fa5c640e3ef7", - "0x000294f162dc337cf060ac6e2cb7db8c8f544004", - "0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3", - "0x00050657890966fc261113dba4c277d9cb204e52", - "0x0009498dd5a13679ac11927e4bae78c154fcf754", - "0x000d398c50ea4d0681e6a224749c94334d606ba2", - "0x000fb295d38c01051e37e65f3034dd4f02267c96", - "0x0015f391949f25c3211063104ad4afc99210f85c", - "0x001757861e8233c5a288411ddbf17378e724dd0c", - "0x001ac203afb48600f5a7d9b524145ac075f648af", - "0x001f561c73555005a7f22e2ae9cb785cf37cc3b9", - "0x002cb7d6d92e0bca294e0d4bc5762ef5d535d1d2", - "0x0030a97650f44802a4331dadeb2a4fc83e59dec1", - "0xfff9e4b5cf4b0f0ff83bba48ee5a88772cd258b9" - ] - ``` - - -#### V3 Example Response - - - ```json json - - "contractAddresses": [ - "0x000000000A42C2791eEc307FFf43Fa5c640e3Ef7", - "0x000294F162Dc337Cf060AC6e2Cb7Db8c8F544004", - "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "0x00050657890966fc261113DBa4c277d9cb204E52", - "0x0009498dD5a13679aC11927e4BAE78C154Fcf754", - "0x000D398c50EA4D0681E6a224749C94334d606Ba2", - "0x000Fb295d38c01051e37e65F3034dD4F02267c96", - "0x0015F391949f25c3211063104aD4AFC99210f85c", - "0x001757861e8233C5a288411dDbf17378e724DD0C", - "0x001AC203aFB48600f5a7D9b524145AC075f648aF", - "0x001f561C73555005a7f22e2ae9CB785cf37Cc3B9", - "0xfFf9e4b5Cf4b0F0fF83BbA48Ee5A88772Cd258B9" - ] - } - ``` - - -*** - -## [isSpamContract - SDK](/reference/sdk-isspamcontract) - -Returns whether a contract is marked as spam or not by Alchemy. - -### Overview of Changes - -* The V3 response wraps the boolean value in an object with a key `isSpamContract`. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x000440f08436a7b866d1ae42db5e0be801da722a"; - - //Call the method to check if a contract is a spam - const response = await alchemy.nft.isSpamContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------ | ------------------------------- | -| `boolean` | `{ "isSpamContract": boolean }` | - -### Example Responses - -#### V2 Example Response - - - ```json json - false - ``` - - -#### V3 Example Response - - - ```json json - { - "isSpamContract": false - } - ``` - - -*** - -## [refreshContract - SDK](/reference/sdk-refreshcontract) - -Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. - -### Overview of Changes - -* There are no changes in the method's request, response format, or parameter names/structures between V2 and V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - - //Call the method to return the refresh result response object - const response = await alchemy.nft.refreshContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ----------------- | ----------------- | -| `contractAddress` | `contractAddress` | -| `refreshState` | `refreshState` | -| `progress` | `progress` | - -### Example Responses - -#### V2 Example Response - - - ```json json - { - "contractAddress": "0x5180db8f5c931aae63c74266b211f580155ecac8", - "refreshState": "queued", - "progress": 0 - } - ``` - - -#### V3 Example Response - - - ```json json - { - "contractAddress": "0x5180db8f5c931aae63c74266b211f580155ecac8", - "refreshState": "already_queued", - "progress": 0 - } - ``` - - -*** - -## [computeRarity - SDK](/reference/sdk-computerarity) - -Returns the floor prices of an NFT contract by marketplace. - -### Overview of Changes - -* The response structure has been reorganized in V3. Instead of an array of objects, the response now contains an object with a `rarities` property that holds an array of objects. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and tokenId - const address = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"; - const tokenId = 145; - - //Call the method to display the rarity of each attribute of the NFT - const response = await alchemy.nft.computeRarity(address, tokenId) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - - - ```javascript javascript - // Same as V2 - ``` - - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------ | --------------------- | -| `prevalence` | `rarities.prevalence` | -| `traitType` | `rarities.traitType` | -| `value` | `rarities.value` | - -### Example Responses - -#### V2 Example Response - - - ```json json - [ - { - "prevalence": 0.1273, - "traitType": "Background", - "value": "Orange" - }, - { - "prevalence": 0.013, - "traitType": "Hat", - "value": "Prussian Helmet" - }, - { - "prevalence": 0.1551, - "traitType": "Mouth", - "value": "Bored Unshaven" - }, - { - "prevalence": 0.1229, - "traitType": "Fur", - "value": "Black" - }, - { - "prevalence": 0.0203, - "traitType": "Clothes", - "value": "Bone Necklace" - }, - { - "prevalence": 0.0487, - "traitType": "Eyes", - "value": "3d" - } - ] - ``` - - -#### V3 Example Response - - - ```json json - { - "rarities": [ - { - "traitType": "Background", - "value": "Orange", - "prevalence": 0.1273 - }, - { - "traitType": "Hat", - "value": "Prussian Helmet", - "prevalence": 0.013 - }, - { - "traitType": "Mouth", - "value": "Bored Unshaven", - "prevalence": 0.1551 - }, - { - "traitType": "Fur", - "value": "Black", - "prevalence": 0.1229 - }, - { - "traitType": "Clothes", - "value": "Bone Necklace", - "prevalence": 0.0203 - }, - { - "traitType": "Eyes", - "value": "3d", - "prevalence": 0.0487 - } - ] - } - ``` - - -*** - -## [verifyNftOwnership - SDK](/reference/sdk-verifynftownership) - -Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. - -### Overview of Changes - -* There are no changes in the method's request, response format, or parameter names/structures between V2 and V3. - -### Example Requests - -#### V2 Example Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and owner - const address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"; - const owner = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to display the rarity of each attribute of the NFT - const response = await alchemy.nft.verifyNftOwnership(owner, address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -#### V3 Example Request - -```js -// Same as V2 -``` - -### V2 \<> V3 Mapping - -| V2 Parameter | V3 Parameter | -| ------------ | ------------ | -| `boolean` | `boolean` | - -### Example Responses - -#### V2 Example Response - - - ```json json - false - ``` - - -#### V3 Example Response - - - ```json json - false - ``` - diff --git a/fern/api-reference/alchemy-sdk/favicon.ico b/fern/api-reference/alchemy-sdk/favicon.ico deleted file mode 100644 index a59308e2..00000000 Binary files a/fern/api-reference/alchemy-sdk/favicon.ico and /dev/null differ diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/call-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/call-sdk-v3.mdx deleted file mode 100644 index 05c88ff5..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/call-sdk-v3.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: call - SDK -description: Returns the result of executing the transaction, using call . A call does not require any ether, but cannot change any state. This is useful for calling getters on Contracts. -subtitle: Returns the result of executing the transaction, using call . A call does not require any ether, but cannot change any state. This is useful for calling getters on Contracts. -url: https://docs.alchemy.com/reference/call-sdk-v3 -slug: reference/call-sdk-v3 ---- - -Returns the result of executing the transaction, using `call`. A call does not require any ether, but cannot change any state. This is useful for calling getters on Contracts. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the result of executing the transaction using `call`. A call does not require any ether but cannot change any state. This is useful for calling getters on Contracts. - -> Starting from Geth 1.9.13, `eth_call` will check the balance of the sender (to make sure that the sender has enough gas to complete the request) before executing the call when one of the following conditions is true: -> -> 1. the `gas_price` parameter is populated, or -> 2. the contract function being called (i.e. in data modifies blockchain state) -> -> In these two cases, even though the `eth_call` requests don't consume any gas, the from address must have enough gas to execute the call as if it were a write transaction because `eth_call` is being used to simulate the transaction. - - - `eth_call` has a timeout restriction at the node level. Batching multiple `eth_call` together on-chain using pre-deployed smart contracts might result in unexpected timeouts that cause none of your calls to complete. Instead, consider serializing these calls, or using smaller batches if they fail with a node error code. - - -# Parameters - -| Name | Type | Description | -| ------------- | ----------------- | ------------------------------------------------------ | -| `transaction` | `string` | The transaction to execute | -| `blockTag` | `string / number` | The optional block number or hash to get the call for. | - -### `transaction` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address the transaction is directed to. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `gasPrice?` | `number / string` | `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `number` | `QUANTITY` - (optional) Integer of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `string` | The maximum gas allowed. | -| `chainId?` | `number` | `optional` the Id of the transaction chain. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ---------------------------------------------------------------------------------------------------------- | -| `Promise` | `string` | The method returns the output data as a hexadecimal-encoded string without modifying the blockchain state. | - -### `blocktag` parameters - -* `pending` - A sample next block built by the client on top of the latest, containing the set of transactions usually taken from the local mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client. This block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. -* `finalized` - The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the call method - const main = async () => { - //Initialize a variable for the transaction object - let tx = { - to: "0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41", - gas: "0x76c0", - gasPrice: "0x9184e72a000", - data: "0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558", - } - let response = await alchemy.core.call(tx) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - 0x0000000000000000000000005555763613a12d8f3e73be831dff8598089d3dca - ``` - - -# Use Cases - -The `call` method is used for making low-level calls to the EVM blockchains. It can be used for a variety of use cases, including: - -* **Reading data from smart contracts**: Developers can use the `call` method to read data from a smart contract on the EVM blockchain. - -* **Querying blockchain data**: Developers can use the `call` method to query blockchain data, such as account balances, transaction history, and block data. - -Overall, the `call` method is a versatile SDK method that can be used for a wide range of tasks related to interacting with the EVM blockchain. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/estimategas-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/estimategas-sdk-v3.mdx deleted file mode 100644 index 36872dd5..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/estimategas-sdk-v3.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: estimateGas - SDK -description: Returns an estimate of the amount of gas that would be required to submit a transaction to the network. -subtitle: Returns an estimate of the amount of gas that would be required to submit a transaction to the network. -url: https://docs.alchemy.com/reference/estimategas-sdk-v3 -slug: reference/estimategas-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns an estimate of the amount of gas that would be required to submit a transaction to the network. - -An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. - -# Parameters - -| Name | Type | Description | -| ------------- | -------- | ------------------------------------ | -| `transaction` | `object` | The transaction to estimate gas for. | - -### `transaction` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address to the transaction is directed to. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `gasPrice?` | `number / string` | `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `number` | `QUANTITY` - (optional) Integer of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `string` | the maximum gas allowed. | -| `chainId?` | `number` | `optional` the Id of the transaction chain. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Response - -| Property | Type | Description | -| -------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Promise` | `object` | Returns an estimate of the amount of gas that would be required to submit the transaction to the network. This is an estimate of the amount of gas required to submit the given transaction to the network. An example of the output is `{ "type": "BigNumber", "hex": "0x6d22" }`. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make an `estimateGas` request using the Alchemy SDK: - - - ```javascript estimateGas.js - // Imports the Alchemy SDK - const { Alchemy, Network, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const response = await alchemy.core.estimateGas({ - // Wrapped ETH address - to: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - // `function deposit() payable` - data: "0xd0e30db0", - // 1 ether - value: Utils.parseEther("1.0") - }); - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "type": "BigNumber", - "hex": "0x6d22" - } - ``` - - -# Use Cases - -Here are some common use cases for the `estimateGas` method: - -* **Optimizing transaction fees**: Gas is the fee paid by the sender of a transaction to compensate the miners for processing it. By estimating the gas required for a transaction beforehand, developers can optimize their transaction fees by choosing the right gas price and limit. - -* **Ensuring successful transactions**: If a transaction runs out of gas before it is completed, it will fail and the sender will lose the gas spent on it. By estimating the required gas beforehand, developers can ensure that the transaction has enough gas to complete successfully. - -* **Validating transaction parameters**: When submitting a transaction, certain parameters such as the gas limit and gas price must be set correctly to avoid issues such as network congestion or excessive fees. By using `estimateGas`, developers can validate these parameters before submitting the transaction. - -# Related Methods - -Here are the methods related to `estimateGas`: - -* [getBalance](/reference/getbalance-sdk): Returns the balance of a given address as of the provided block. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/findcontractdeployer-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/findcontractdeployer-sdk-v3.mdx deleted file mode 100644 index c338c212..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/findcontractdeployer-sdk-v3.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: findContractDeployer - SDK -description: Finds the address that deployed the provided contract and block number it was deployed in. -subtitle: Finds the address that deployed the provided contract and block number it was deployed in. -url: https://docs.alchemy.com/reference/findcontractdeployer-sdk-v3 -slug: reference/findcontractdeployer-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Finds the address that deployed the provided contract and the block number it was deployed in. - - - This method performs a binary search across all blocks since genesis and can take a long time to complete. This method is a convenience method that will eventually be replaced by a single call to an Alchemy endpoint with this information cached. - - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ---------------------------------------------- | -| `contractAddress` | `string` | The contract address to find the deployer for. | - -# Response - -| Property | Type | Description | -| ----------------------- | -------- | ------------------------------------------------------------------------------------------------ | -| `Promise` | `object` | Returns the address that deployed the provided contract and the block number it was deployed in. | - -### `DeployResult` response object parameters - -| Property | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `deployerAddress?` | `string` | The address of the contract deployer, if it is available. | -| `blockNumber` | `number` | The block number the contract was deployed in. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `findContractDeployer` request using the Alchemy SDK: - - - ```javascript findContractDeployer.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Assign the contract address to a variable - let address = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" - - //The response fetches the contract deployer of the above address - let response = await alchemy.core.findContractDeployer(address) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json response - { - deployerAddress: '0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03', - blockNumber: 12287507 - } - ``` - - -# Use Cases - -Here are some common use cases for `findContractDeployer` method: - -* **Contract verification**: When a new contract is deployed on a blockchain, it is important to verify the identity of the deployer to ensure that a trusted source deployed the contract. By using the `findContractDeployer` method, developers can easily verify the deployer of a contract and ensure that the contract is legitimate. - -* **Security auditing**: Security auditors can use the `findContractDeployer` method to identify potential security vulnerabilities in a smart contract by analyzing the behavior of the deployer. If the deployer is identified as a potential threat, additional security measures can be implemented to prevent unauthorized access to the contract. - -* **Contract management**: Smart contracts are often used to automate business processes and manage digital assets. By using the `findContractDeployer` method, contract managers can identify who has deployed a particular contract and ensure that it is being used in accordance with the terms and conditions agreed upon by all parties. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getassettransfers-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getassettransfers-sdk-v3.mdx deleted file mode 100644 index e7ff0cec..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getassettransfers-sdk-v3.mdx +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: getAssetTransfers - SDK -description: The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. See the web documentation for the full details. -subtitle: The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. See the web documentation for the full details. -url: https://docs.alchemy.com/reference/getassettransfers-sdk-v3 -slug: reference/getassettransfers-sdk-v3 ---- - -The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. See the [web documentation](/reference/alchemy-getassettransfers#alchemy_getassettransfers) for the full details. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -The Transfers API allows you to fetch historical transactions for any address across Ethereum easily and supported L2s including Polygon, Arbitrum, and Optimism. - -See the [web documentation](/reference/alchemy-getassettransfers#alchemy_getassettransfers) for the full details. - -# Parameters - -| Parameter | Type | Description | -| --------- | -------- | -------------------------------------------------------- | -| `params` | `object` | An object containing fields for the asset transfer query | - -### `params` object parameters - -| Param | Type | Description | -| ------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fromBlock` | `string` | The starting block to check for transfers. This value is inclusive and defaults to `0x0` if omitted. | -| `toBlock` | `string` | Inclusive to block (hex string, int, or latest). Defaults to `latest` if omitted. | -| `order?` | `string` | Whether to return results in ascending or descending order by block number. Defaults to `ascending` if omitted. | -| `fromAddress?` | `string` | The `from` address to filter transfers by. This value defaults to a wildcard for all addresses if omitted. | -| `toAddress?` | `string` | The `to` address to filter transfers by. This value defaults to a wildcard for all addresses if omitted. | -| `contractAddresses` | `array of strings` | List of contract addresses to filter for - only applies to `erc20`, `erc721`, `erc1155` transfers. Defaults to all addresses if omitted. | -| `excludeZeroValue` | `boolean` | Whether to exclude transfers with zero value. Note that `zero` value is different from `null` value. Defaults to `true` if omitted. | -| `category` | `array` | An array of categories to get transfers for. Available categories include: \[ EXTERNAL = `external`, INTERNAL = `internal`, ERC20 = `erc20`, ERC721 = `erc721`, ERC1155 = `erc1155`, SPECIALNFT = `specialnft`] | -| `maxCount` | `number` | The maximum number of results to return per page. Defaults to **1000** if omitted. | -| `pageKey?` | `string` | Optional page key from an existing one to use for pagination. | -| `withMetadata` | `boolean` | Whether to include additional metadata about each transfer event. Defaults to `false` if omitted. | - -# Response - -| Property | Type | Description | -| ----------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------- | -| `Promise` | `object` | This returns the object response depending on whether `withMetadata` was set to `true`or not. | - -### `AssetTransfersResponse` response object parameters - -| Parameter | Type | Description | -| ----------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uniqueId` | `string` | The unique ID of the transfer. | -| `category` | `string` | The category of the transfer. | -| `blockNum` | `string` | The block number where the transfer occurred. | -| `from` | `string` | The `from` address of the transfer. | -| `to` | `string \| null` | The `to` address of the transfer. | -| `value` | `number \| null` | Converted asset transfer value as a number (raw value divided by contract decimal). `null` if ERC721 transfer or contract decimal is not available. | -| `erc721TokenId` | `string \| null` | The raw ERC721 token id of the transfer as a hex string. `null` if not an ERC721 transfer. | -| `erc1155Metadata` | `ERC1155Metadata[] \| null` | A list of ERC1155 metadata objects, if the asset transferred, is an ERC1155 token. `null` if not an ERC1155 transfer. | -| `tokenId` | `string \| null` | The token id of the token transferred. | -| `asset` | `string \| null` | Returns the token's symbol or ETH for other transfers. `null` if the information was not available. | -| `hash` | `string` | The transaction hash of the transfer transaction. | -| `rawContract` | `RawContract` | Information about the raw contract of the asset transferred. | - -### `AssetTransfersWithMetadataResponse` object parameters - -| Parameter | Type | Description | -| ----------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `uniqueId` | `string` | The unique ID of the transfer. | -| `category` | `string` | The category of the transfer. | -| `blockNum` | `string` | The block number where the transfer occurred. | -| `from` | `string` | The `from` address of the transfer. | -| `to` | `string \| null` | The `to` address of the transfer. | -| `value` | `number \| null` | Converted asset transfer value as a number (raw value divided by contract decimal). `null` if ERC721 transfer or contract decimal not available. | -| `erc721TokenId` | `string \| null` | The raw ERC721 token id of the transfer as a hex string. `null` if not an ERC721 transfer. | -| `erc1155Metadata` | `ERC1155Metadata[] \| null` | A list of ERC1155 metadata objects, if the asset transferred, is an ERC1155 token. `null` if not an ERC1155 transfer. | -| `tokenId` | `string \| null` | The token id of the token transferred. | -| `asset` | `string \| null` | Returns the token's symbol or ETH for other transfers. `null` if the information was not available. | -| `hash` | `string` | The transaction hash of the transfer transaction. | -| `rawContract` | `RawContract` | Information about the raw contract of the asset transferred. | -| `metadata` | `object` | Additional metadata about the transfer event. The additional metadata object includes: 1. `blockTimestamp`: `string` *Timestamp of the block from which the transaction event originated.* | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getAssetTransfers` request using the Alchemy SDK: - - - ```javascript getAssetTransfers.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Assign the contract address to a variable - let toAddress = "0x1E6E8695FAb3Eb382534915eA8d7Cc1D1994B152"; - - //The response fetches the transactions the specified addresses. - let response = await alchemy.core.getAssetTransfers({ - fromBlock: "0x0", - fromAddress: "0x0000000000000000000000000000000000000000", - toAddress: toAddress, - excludeZeroValue: true, - category: ["erc721", "erc1155"], - }) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "transfers": [ - { - "blockNum": "0xd2113f", - "uniqueId": "0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d:log:165", - "hash": "0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d", - "from": "0x0000000000000000000000000000000000000000", - "to": "0x1e6e8695fab3eb382534915ea8d7cc1d1994b152", - "value": null, - "erc721TokenId": "0x0000000000000000000000000000000000000000000000000000000000001acb", - "erc1155Metadata": null, - "tokenId": "0x0000000000000000000000000000000000000000000000000000000000001acb", - "asset": "DUSK", - "category": "erc721", - "rawContract": { - "value": null, - "address": "0x0beed7099af7514ccedf642cfea435731176fb02", - "decimal": null - } - }, - { - "blockNum": "0xd2113f", - "uniqueId": "0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d:log:166", - "hash": "0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d", - "from": "0x0000000000000000000000000000000000000000", - "to": "0x1e6e8695fab3eb382534915ea8d7cc1d1994b152", - "value": null, - "erc721TokenId": "0x0000000000000000000000000000000000000000000000000000000000001acc", - "erc1155Metadata": null, - "tokenId": "0x0000000000000000000000000000000000000000000000000000000000001acc", - "asset": "DUSK", - "category": "erc721", - "rawContract": { - "value": null, - "address": "0x0beed7099af7514ccedf642cfea435731176fb02", - "decimal": null - } - }, - { - "blockNum": "0xe4284a", - "uniqueId": "0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157:log:345", - "hash": "0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157", - "from": "0x0000000000000000000000000000000000000000", - "to": "0x1e6e8695fab3eb382534915ea8d7cc1d1994b152", - "value": null, - "erc721TokenId": "0x0000000000000000000000000000000000000000000000000000000000000bc0", - "erc1155Metadata": null, - "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000bc0", - "asset": "NC", - "category": "erc721", - "rawContract": { - "value": null, - "address": "0xe9fca552b9eb110c2d170962af740725f71f5644", - "decimal": null - } - }, - { - "blockNum": "0xe4284a", - "uniqueId": "0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157:log:346", - "hash": "0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157", - "from": "0x0000000000000000000000000000000000000000", - "to": "0x1e6e8695fab3eb382534915ea8d7cc1d1994b152", - "value": null, - "erc721TokenId": "0x0000000000000000000000000000000000000000000000000000000000000bc1", - "erc1155Metadata": null, - "tokenId": "0x0000000000000000000000000000000000000000000000000000000000000bc1", - "asset": "NC", - "category": "erc721", - "rawContract": { - "value": null, - "address": "0xe9fca552b9eb110c2d170962af740725f71f5644", - "decimal": null - } - } - ] - } - ``` - - -# Use Cases - -Here are some common use cases for the `getAssetTransfers` method: - -* **Asset tracking**: One of the most common use cases for `getAssetTransfers` is to track the movement of a particular asset on the blockchain. This can be useful for businesses and organizations that need to keep track of their assets as they move on-chain. - -* **Audit trails**: By using `getAssetTransfers` to retrieve a history of all transfers of a particular asset, auditors can verify the authenticity and provenance of the asset. This can help to prevent fraud and ensure compliance with regulations. - -* **Payment verification**: `getAssetTransfers` can also be used to verify that a payment has been made or received. For example, if a company expects a payment in a particular asset, it can use this function to confirm that the payment has been transferred to its account. - -# Related Methods - -Here are the methods related to `getAssetTransfers`: - -* [call](/reference/call-sdk): Returns the result of executing the transaction using call. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getbalance-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getbalance-sdk-v3.mdx deleted file mode 100644 index 50a883dd..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getbalance-sdk-v3.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: getBalance - SDK -description: Returns the balance of a given address as of the provided block. -subtitle: Returns the balance of a given address as of the provided block. -url: https://docs.alchemy.com/reference/getbalance-sdk-v3 -slug: reference/getbalance-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the balance of a given address as of the provided block. - -# Parameters - -| Name | Type | Description | -| --------------- | -------- | ---------------------------------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the balance for. | -| `blockTag` | `string` | The optional block number or hash to get the balance for. Defaults to `latest` if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Promise` | `object` | This is an estimate of the balance of gas. Properties returned in this object include: 1. `hex`: `string` This is the hex. 2. `type`: `string` BigNumber. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getBalance` request using the Alchemy SDK: - - - ```javascript getbalance.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // This response fetches the balance of the given address in the parameter as of the provided block. - let response = await alchemy.core.getBalance("vitalik.eth", "latest") - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "type": "BigNumber", - "hex": "0x32a24830b63151ab54" - } - ``` - - -# Use Cases - -Here are some common use cases for the `getBalance` method: - -* **Retrieve balance**: One of the most common use cases for `getBalance` is to retrieve the balance of a particular address on the blockchain. - -* **Payment verification**: `getBalance` can also be used to verify that a payment has been made or received. - -# Related Methods - -Here are the methods related to `getBalance`: - -* [getAssetTransfers](/reference/getassettransfers-sdk): Get transactions for specific addresses. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getblock-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getblock-sdk-v3.mdx deleted file mode 100644 index 48a7f255..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getblock-sdk-v3.mdx +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: getBlock - SDK -description: Returns the block from the network based on the provided block number or hash. -subtitle: Returns the block from the network based on the provided block number or hash. -url: https://docs.alchemy.com/reference/getblock-sdk-v3 -slug: reference/getblock-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the block from the network based on the provided block number or hash. Transactions on the block are represented as an array of transaction hashes. To get the full transaction details on the block, use [getBlockWithTransactions](/reference/sdk-getblockwithtransactions) instead. - -# Parameters - -| Name | Type | Description | -| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `blockHashOrBlockTag` | `string` | The block hash or one of the following block tags: - `pending`: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Intuitively, you can think of this as block that have not been mined yet. - `latest`: The most recent block in the chain observed by the client, this block may be re-orged out of the chain even under normal conditions. - `earliest`: The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. | - -# Response - -| Property | Type | Description | -| ---------------- | -------- | ----------------------------------------------------------------------------------- | -| `Promise` | `object` | Returns a block object with the following fields or `null` when no block was found. | - -### `Block` response object parameters - -| Parameter | Type | Description | -| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `hash` | `string` | `32 Bytes` - hash of the block. `null` when its pending block. | -| `parentHash` | `string` | `32 Bytes` - hash of the parent block. | -| `number` | `number` | The block number. `null` when it's pending block. | -| `timestamp` | `number` | The unix timestamp for when the block was collated. | -| `nonce` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `difficulty` | `number` | Integer of the difficulty for this block. | -| `gasLimit` | `BigNumber` | The maximum gas allowed in this block. | -| `gasUsed` | `BigNumber` | The total used gas by all transactions in this block. | -| `miner` | `string` | `20 Bytes` - the address of the beneficiary to whom the mining rewards were given. | -| `extraData` | `string` | Some extra data if existing in hex. | -| `transactions` | `array` | An arrray containing transactions. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getBlock` request using the Alchemy SDK: - - - ```javascript getblock.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // using the block tag "latest" to get the latest block - // could've used a block hash to get a particualr block as well - let blockTagOrHash = "latest" - - let response = await alchemy.core.getBlock(blockTagOrHash); - - // logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "hash": "0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3", - "parentHash": "0x6890edf8ad6900a5472c2a7ee3ef795f020ef6f907afb7f4ebf6a92d6aeb1804", - "number": 15221026, - "timestamp": 1658877717, - "nonce": "0xd8c399035d6e6e8f", - "difficulty": null, - "gasLimit": { - "type": "BigNumber", - "hex": "0x01ca35d2" - }, - "gasUsed": { - "type": "BigNumber", - "hex": "0x01ca1ae1" - }, - "miner": "0x52bc44d5378309EE2abF1539BF71dE1b7d7bE3b5", - "extraData": "0x6e616e6f706f6f6c2e6f7267", - "transactions": [ - "0xba4938ea41154427c8cb424ea89d9f150f139ed10065fe43ce11102dc82e1c37", - "0x98cc6b4b66453e184f65728fee265a726b030c5ddcfc1311a01ea5345c3959ab", - "0x2cbb4968cce66c73f2755fe7ef177981962afa7943f658b323e61850f31e4163", - "0x85cd0a68df54ddeb40fdccc86262f9480e3b94e934bd105bf59b3c0f991b3e34", - "0xc37cecf4880ca1a51a91f3063821c552cdd2966a76bd662ccc18f94311720e26", - "0xbd319961c938441c9d5421b27d24e2985c5fb4e3aea3a97e640f672f38b9faaf", - "0x177676cf64b7a9cfd6e25b0c6dfe6d94cc5731587e2d5a8c14d4b0dca4633e6d", - "0xc7d63e68ea7c1366e891000d71d35aa0c691317a69e498bea0b4736415249812", - "0x95ec1381d6eacf757e15aa95c1ea1cdfda71ba8b552349ef7c711b93655b2715", - "0x1e403778aee7dad56c20183b818132c39a778a11784861b804d34ac637576780", - "0x1ce311d3b5f2f5bd4ffb23dc455cb9cef93208460524c880c0a0b56aeaf0aa8c", - "0xed316486d9756d7d46c67e9dc332dcc58a2dd8bfbdfba94816fc617c902dbaf2", - "0x57f158e41cf1d91f20527d91fe66c8deb00b4955b00be5bb8b3628191e2e5eb5", - "0xb14b4d54b810b6caf5df21aa860e48e68f9c42c4ba7cb7a38d9f83d6b02367bf", - "0xd5f1b189446c3e238f54123e36a2dbce831fc83b325e9a1a4704be35b5b8dfb8", - "0x8113c2326ecc10901a0ab869635cc9aa6687a4de1f5b6cf05c70297a0743a45b", - "0x88c5db5deaf0813acd912dcda4dd00b018fb240dc9b0c70322390700d4a77f12", - "0xb4402dc022905cb32c58ba350b14f364751303756c24fd5d40bea4cdb7240337", - "0x02ec5bd3bffb4f49ec863b2f803ebd61f979d17e8bfe75861f14fdccda1c6a0f", - "0xbd5b2292484b12ec65e7518c2af9fd83df39d77bcf074adc293974ec8e87538e", - "0x0b6cdd161684471ddb785c456f534088ce6e6938d521fcd2be43ebe060bbdce9", - "0xced37b05ab17208cf15ff66916c92a635cdf1a369a3dc2ccfcac99e07e9ea564", - "0x2718f1b2d03925d18e70f43fff42b4b9ff8f656a3bf9cd2b1448236a97b7f7f0", - "0xd3cc112ea4b5224e0c67cf7c8db6df4d7d18e76d73467c9015e958083688c4cc", - "0x54eebb9e3c3b74e21b2ea5c0e1a8a73ea827eecc78c268cc796c306c4eb59556", - "0xc1aa619e47085b6aa98eb16066cc7d12ab9c9911096066e015cd09e50fca38e8", - "0xf5719639babe39602e11f01113edfc8830c36d79e38d71dbe94bf00b7fa159e5", - "0x2c4a3375971cfb1c727824933bcf289a4a30b5262a909ce92161dc7bd6b08a23", - "0x185a6f8ad77508078d9e1dec4f284ae4b3ad64683ca9817f79593f3487e181e4", - "0xb68eb4c1fe149693ee04408cd2d34f555af51baacd52aae27b6c13c0ff003e81", - "0x00861e23118207ac981a1cd2e30db47cc1c2f1bc071120cb193cc68d13732cb8", - "0x258f7a6a4c288cbd75da7a5bef24144ddbe03fbafb4d7ce42c4bf408adc7dde4" - ] - "baseFeePerGas": { - "type": "BigNumber", - "hex": "0x02aa2d1d80" - }, - "_difficulty": { - "type": "BigNumber", - "hex": "0x2a31d8a2cf4dd7" - } - } - ``` - - -# Related Methods - -Here are the methods related to `getBlock`: - -* [getBlockWithTransactions](/reference/getblockwithtransactions-sdk): Returns the block from the network based on the provided block number or hash. Includes full transactions from the block. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getblocknumber-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getblocknumber-sdk-v3.mdx deleted file mode 100644 index f87dd2d2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getblocknumber-sdk-v3.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: getBlockNumber - SDK -description: Returns the block number of the most recently mined block. -subtitle: Returns the block number of the most recently mined block. -url: https://docs.alchemy.com/reference/getblocknumber-sdk-v3 -slug: reference/getblocknumber-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the block number of the most recently mined block. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ----------------------------------------------------- | -| `Promise` | `number` | Integer of the current block number the client is on. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getBlockNumber` request using the Alchemy SDK: - - - ```javascript getblocknumber.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //The response returns the block number of the most recently mined block - let response = await alchemy.core.getBlockNumber() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - 17939684 - ``` - - -# Use Cases - -Here are some potential use cases for the `getBlockNumber` method: - -* **Monitoring**: You can use `getBlockNumber` to monitor the progress of the Ethereum network by checking the current block number. This can be useful for tracking the growth of the network and understanding how it is evolving over time. - -* **Smart Contract Development**: If you are developing a smart contract, you may need to know the current block number for certain operations, such as setting timeouts or scheduling transactions. You can use `getBlockNumber` to get the current block number and use it in your contract logic. - -# Related Methods - -Here are the methods related to `getBlockNumber`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getblockwithtransactions-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getblockwithtransactions-sdk-v3.mdx deleted file mode 100644 index d6955945..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getblockwithtransactions-sdk-v3.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -title: getBlockWithTransactions - SDK -description: Returns the block from the network based on the provided block number or hash. In addition to the transaction hashes included in the block, it also returns the full transaction objects. -subtitle: Returns the block from the network based on the provided block number or hash. In addition to the transaction hashes included in the block, it also returns the full transaction objects. -url: https://docs.alchemy.com/reference/getblockwithtransactions-sdk-v3 -slug: reference/getblockwithtransactions-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the block from the network based on the provided block number or hash. In addition to the transaction hashes included in the block, it also returns the full transaction objects. - -# Parameters - -| Name | Type | Description | -| --------------------- | -------- | ---------------------------------------------- | -| `blockHashOrBlockTag` | `string` | The block number or hash to get the block for. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ------------------------------------------------------------------------------------ | -| `Promise` | `object` | Returns a block object with the following fields, or `null` when no block was found. | - -### `BlockWithTransactions` response object parameters - -| Parameter | Type | Description | -| -------------- | ------------------ | ----------------------------------------------------------------------------------------------------- | -| `hash` | `string` | `32 Bytes` - hash of the block. `null` when its pending block. | -| `parentHash` | `string` | `32 Bytes` - hash of the parent block. | -| `number` | `number` | the block number. `null` when its pending block. | -| `logsBloom` | `string` | `256 Bytes` - the bloom filter for the logs of the block. `null` when its pending block. | -| `timestamp` | `number` | the unix timestamp for when the block was collated. | -| `nonce` | `string` | 8 Bytes - hash of the generated proof-of-work. `null` when its pending block. | -| `difficulty` | `number` | integer of the difficulty for this block. | -| `gasLimit` | `number` | the maximum gas allowed in this block. | -| `gasUsed` | `number` | the total used gas by all transactions in this block. | -| `size` | `integer` | the size of this block in bytes. | -| `miner` | `string` | `20 Bytes` - the beneficiary's address to whom the mining rewards were given. | -| `extraData` | `string` | Extra data represented in hex string. | -| `transactions` | `array of objects` | Array of transaction objects, or `32 Bytes` transaction hashes depending on the last given parameter. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getBlockWithTransactions` request using the Alchemy SDK: - - - ```javascript getblockwithtransactions.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Assign the hash to a variable - let txHash = "0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3" - - //Call the method to return the block with transactions - let response = await alchemy.core.getBlockWithTransactions(txHash) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "hash": "0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3", - "parentHash": "0x6890edf8ad6900a5472c2a7ee3ef795f020ef6f907afb7f4ebf6a92d6aeb1804", - "number": 15221026, - "timestamp": 1658877717, - "nonce": "0xd8c399035d6e6e8f", - "difficulty": null, - "gasLimit": { - "type": "BigNumber", - "hex": "0x01ca35d2" - }, - "gasUsed": { - "type": "BigNumber", - "hex": "0x01ca1ae1" - }, - "miner": "0x52bc44d5378309EE2abF1539BF71dE1b7d7bE3b5", - "extraData": "0x6e616e6f706f6f6c2e6f7267", - "transactions": [ - { - "hash": "0xba4938ea41154427c8cb424ea89d9f150f139ed10065fe43ce11102dc82e1c37", - "type": 2, - "accessList": [], - "blockHash": "0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3", - "blockNumber": 15221026, - "transactionIndex": 0, - "confirmations": 2718689, - "from": "0x91aaE0aAfd9D2d730111b395c6871f248d7Bd728", - "gasPrice": { - "type": "BigNumber", - "hex": "0x06ffba9ab3" - }, - "maxPriorityFeePerGas": { - "type": "BigNumber", - "hex": "0x04558d7d33" - }, - "maxFeePerGas": { - "type": "BigNumber", - "hex": "0x0b31856075" - }, - "gasLimit": { - "type": "BigNumber", - "hex": "0x0493ee" - }, - "to": "0x98C3d3183C4b8A650614ad179A1a98be0a8d6B8E", - "value": { - "type": "BigNumber", - "hex": "0x00" - }, - "nonce": 117386, - "data": "0xce2e62ff00000000000000000000000000000000000000000000000006d37a96c691fec00000000000000000000000000000000000000000000000006c5f2aba0307f8000000000000000000000000000c4a68cf6857cc76fe946d04fe85fac5fae9625e000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000062e07780", - "r": "0xc509b635a3a59b03be542d6d9ef898b9b2acc479e8bbae79d20481c5cde53694", - "s": "0x35f94c8c184c73f9086ba093147ed705d3240e9caadced2b436eb5fece4674cd", - "v": 0, - "creates": null, - "chainId": 1 - }, - { - "hash": "0x98cc6b4b66453e184f65728fee265a726b030c5ddcfc1311a01ea5345c3959ab", - "type": 2, - "accessList": [], - "blockHash": "0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3", - "blockNumber": 15221026, - "transactionIndex": 1, - "confirmations": 2718689, - "from": "0x5E2B6c6B2240d582995537D3FafdB556E4A3822F", - "gasPrice": { - "type": "BigNumber", - "hex": "0x03e860aad6" - }, - "maxPriorityFeePerGas": { - "type": "BigNumber", - "hex": "0x013e338d56" - }, - "maxFeePerGas": { - "type": "BigNumber", - "hex": "0x0538c964e2" - }, - "gasLimit": { - "type": "BigNumber", - "hex": "0x0493ee" - }, - "to": "0x98C3d3183C4b8A650614ad179A1a98be0a8d6B8E", - "value": { - "type": "BigNumber", - "hex": "0x00" - }, - "nonce": 40639, - "data": "0x49c36c0700000000000000000000000024ee2c6b9597f035088cda8575e9d5e15a84b9df00000000000000000000000000000000000000000000000014626a9f5386a600000000000000000000000000000000000000000040360e6bc85c5c000000000000000000000000000000000000000000000000004059ca9822509c00000000000000000000000000000000000000000000000000000000000000000000000000", - "r": "0xdcdb05fe7f32ba447ce9fa56ffd77873542b5a071c044e5011fcd8361f019395", - "s": "0x54d2fe30406a3c16261eb0069980b75e824481097dd537057ff88942743b61e3", - "v": 0, - "creates": null, - "chainId": 1 - }, - ], - "baseFeePerGas": { - "type": "BigNumber", - "hex": "0x02aa2d1d80" - }, - "_difficulty": { - "type": "BigNumber", - "hex": "0x2a31d8a2cf4dd7" - } - } - ``` - - -# Use Cases - -Here are some possible use cases for this method: - -* **Blockchain Explorer**: When building a blockchain explorer, it is important to be able to retrieve detailed information about blocks and their transactions. `getBlockWithTransactions` can be used to fetch this information and display it to users. - -* **Smart Contract Verification**: When verifying the correctness of a smart contract execution, it may be necessary to retrieve the block and its transactions that triggered the execution. `getBlockWithTransactions` can be used to fetch this information and verify that the smart contract executed correctly. - -* **Payment Processing**: When processing payments on a blockchain, retrieving the block and its transactions that confirm the payment may be necessary. `getBlockWithTransactions` can be used to fetch this information and confirm that the payment was successfully processed. - -# Related Methods - -Here are the methods related to `getBlockWithTransactions`: - -* [getBlock](/reference/getBlock-sdk): Returns the block from the network based on the provided block number or hash. -* [getBlockNumber](/reference/getblocknumber-sdk): Returns the result of executing the transaction, using call. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getcode-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getcode-sdk-v3.mdx deleted file mode 100644 index 441d128c..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getcode-sdk-v3.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: getCode - SDK -description: Returns the contract code of the provided address at the block. If there is no contract deployed, the result is 0x . -subtitle: Returns the contract code of the provided address at the block. If there is no contract deployed, the result is 0x . -url: https://docs.alchemy.com/reference/getcode-sdk-v3 -slug: reference/getcode-sdk-v3 ---- - -Returns the contract code of the provided address at the block. If there is no contract deployed, the result is `0x`. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the contract code of the provided address at the block. If there is no contract deployed, the result is `0x`. - -# Parameters - -| Name | Type | Description | -| --------------- | -------- | ----------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the code for. | -| `blockTag` | `string` | The optional block number or hash. Defaults to `latest` if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ----------------- | -| `Promise` | `string` | Returns the code. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getCode` request using the Alchemy SDK: - - - ```javascript getcode.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let address = "registrar.firefly.eth" - - //Call the method to retrieve code of address - let response = await alchemy.core.getCode(address) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - "0x606060405236156100885763ffffffff60e060020a60003504166369fe0e2d81146100fa578063704b6c021461010f57806379502c551461012d578063bed866f614610179578063c37067fa1461019e578063c66485b2146101ab578063d80528ae146101c9578063ddca3f43146101f7578063f2c298be14610219578063f3fef3a314610269575b6100f85b6000808052600760209081527f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df80543490810190915560408051918252517fdb7750418f9fa390aaf85d881770065aa4adbe46343bcff4ae573754c829d9af929181900390910190a25b565b005b341561010257fe5b6100f860043561028a565b005b341561011757fe5b6100f8600160a060020a03600435166102ec565b005b341561013557fe5b61013d610558565b60408051600160a060020a0396871681526020810195909552928516848401526060840191909152909216608082015290519081900360a00190f35b341561018157fe5b61018c600435610580565b60408051918252519081900360200190f35b6100f8600435610595565b005b34156101b357fe5b6100f8600160a060020a03600435166105e6565b005b34156101d157fe5b6101d9610676565b60408051938452602084019290925282820152519081900360600190f35b34156101ff57fe5b61018c61068d565b60408051918252519081900360200190f35b6100f8600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061069495505050505050565b005b341561027157fe5b6100f8600160a060020a0360043516602435610ab2565b005b60025433600160a060020a039081169116146102a65760006000fd5b600454604080519182526020820183905280517f854231545a00e13c316c82155f2b8610d638e9ff6ebc4930676f84a5af08a49a9281900390910190a160048190555b50565b60025433600160a060020a039081169116146103085760006000fd5b60025460408051600160a060020a039283168152918316602083015280517fbadc9a52979e89f78b7c58309537410c5e51d0f63a0a455efe8d61d2b474e6989281900390910190a16002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911790915560008054604080516020908101849052815160e060020a6302571be30281527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e26004820152915192909416936302571be39360248084019492938390030190829087803b15156103e957fe5b60325a03f115156103f657fe5b50505060405180519050600160a060020a0316631e83409a826000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b151561045f57fe5b60325a03f1151561046c57fe5b50506040805160008054600354602093840183905284517f0178b8bf00000000000000000000000000000000000000000000000000000000815260048101919091529351600160a060020a039091169450630178b8bf9360248082019493918390030190829087803b15156104dd57fe5b60325a03f115156104ea57fe5b505060408051805160035460025460e860020a62d5fa2b0284526004840191909152600160a060020a03908116602484015292519216925063d5fa2b0091604480830192600092919082900301818387803b151561054457fe5b60325a03f1151561055157fe5b5050505b50565b600054600354600254600454600154600160a060020a039485169492831692165b9091929394565b6000818152600760205260409020545b919050565b6000818152600760209081526040918290208054349081019091558251908152915183927fdb7750418f9fa390aaf85d881770065aa4adbe46343bcff4ae573754c829d9af92908290030190a25b50565b60025433600160a060020a039081169116146106025760006000fd5b60015460408051600160a060020a039283168152918316602083015280517f279875333405c968e401e3bc4e71d5f8e48728c90f4e8180ce28f74efb5669209281900390910190a16001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600654600554600160a060020a033016315b909192565b6004545b90565b80516001820190600080808060048510806106af5750601485115b156106ba5760006000fd5b600093505b8484101561072a57855160ff16925060618310806106e05750607a8360ff16115b80156106fc575060308360ff1610806106fc575060398360ff16115b5b801561070d57508260ff16602d14155b156107185760006000fd5b6001909501945b6001909301926106bf565b60045434101561073a5760006000fd5b866040518082805190602001908083835b6020831061076a5780518252601f19909201916020918201910161074b565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060035483528282018190528451928390038501832060008054948401819052865160e060020a6302571be3028152600481018390529651929a509098509650600160a060020a0390921694506302571be393602480820194509192919082900301818787803b15156107ff57fe5b60325a03f1151561080c57fe5b505060405151600160a060020a031691909114905061082b5760006000fd5b60008054600354604080517f06ab5923000000000000000000000000000000000000000000000000000000008152600481019290925260248201869052600160a060020a03308116604484015290519216926306ab59239260648084019382900301818387803b151561089a57fe5b60325a03f115156108a757fe5b505060008054600154604080517f1896f70a00000000000000000000000000000000000000000000000000000000815260048101879052600160a060020a0392831660248201529051919092169350631896f70a9260448084019391929182900301818387803b151561091657fe5b60325a03f1151561092357fe5b50506001546040805160e860020a62d5fa2b02815260048101859052600160a060020a033381166024830152915191909216925063d5fa2b009160448082019260009290919082900301818387803b151561097a57fe5b60325a03f1151561098757fe5b505060008054604080517f5b0fc9c300000000000000000000000000000000000000000000000000000000815260048101869052600160a060020a0333811660248301529151919092169350635b0fc9c39260448084019391929182900301818387803b15156109f357fe5b60325a03f11515610a0057fe5b505060058054349081019091556006805460010190556000838152600760209081526040918290208054840190558151600160a060020a03331681529081019290925280518493507f179ef3319e6587f6efd3157b34c8b357141528074bcb03f9903589876168fa149281900390910190a260408051348152905182917fdb7750418f9fa390aaf85d881770065aa4adbe46343bcff4ae573754c829d9af919081900360200190a25b50505050505050565b60025433600160a060020a03908116911614610ace5760006000fd5b604051600160a060020a0383169082156108fc029083906000818181858888f193505050501515610aff5760006000fd5b60408051600160a060020a03841681526020810183905281517fac375770417e1cb46c89436efcf586a74d0298fee9838f66a38d40c65959ffda929181900390910190a15b50505600a165627a7a723058205c3628c01dc80233f51979d91a76cec2a25d84e86c9838d34672734ca2232b640029" - ``` - - -# Use Cases - -The everyday use case for the `getCode` method is to return the contract code of an address on the blockchain. However, here are some other possible use cases for the `getCode` method: - -* **Contract verification**: Developers can use the `getCode` method to verify that the bytecode of a deployed contract matches the expected bytecode. This can be used to ensure that a contract has not been tampered with or to verify that a contract has been deployed correctly. - -* **Contract debugging**: If a contract is not behaving as expected, developers can use `getCode` to retrieve the bytecode and examine it for errors or unexpected behavior. - -* **Contract analysis**: Researchers or security auditors might use `getCode` to analyze the bytecode of a contract for vulnerabilities or other issues. - -* **Contract migration**: If a contract needs to be migrated to a new address, developers can use `getCode` to retrieve the bytecode of the existing contract and then deploy it to the new address. - -Overall, `getCode` is a useful tool for developers who are building on the EVM networks and need to interact with deployed contracts. It can be used for various purposes, from debugging and analysis to migration and verification. - -# Related Methods - -Here are the methods related to `getCode`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. -* [getBlockNumber](/reference/getblocknumber-sdk): Returns the block number of the most recently mined block. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getfeedata-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getfeedata-sdk-v3.mdx deleted file mode 100644 index f7aea323..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getfeedata-sdk-v3.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: getFeeData - SDK -description: Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas should be used.For legacy transactions and networks which do not support EIP-1559, the gasPrice should be used. -subtitle: Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas should be used.For legacy transactions and networks which do not support EIP-1559, the gasPrice should be used. -url: https://docs.alchemy.com/reference/getfeedata-sdk-v3 -slug: reference/getfeedata-sdk-v3 ---- - -Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the `maxFeePerGas` and `maxPriorityFeePerGas` should be used.For legacy transactions and networks which do not support EIP-1559, the `gasPrice` should be used. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the `maxFeePerGas` and `maxPriorityFeePerGas` should be used. - -For legacy transactions and networks which do not support EIP-1559, the `gasPrice` should be used. - -Warning: The Ethers.js library hardcodes `maxPriorityFeePerGas` to 1.5 gwei (1,500,000,000 wei), which may not reflect actual network conditions. For accurate `maxPriorityFeePerGas` estimations, use `[getMaxPriorityFeePerGas](/reference/getmaxpriorityfeepergas-sdk)`. - -# Response - -| Property | Type | Description | -| ------------------ | -------- | ------------------------------- | -| `Promise` | `object` | Returns an object with the fees | - -### `FeeData` response object parameters - -| Property | Type | Description | -| ---------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `maxFeePerGas` | `number / string` | The `maxFeePerGas` to use for a transaction. This is based on the most recent block's `baseFee`. | -| `maxPriorityFeePerGas` | `number / string` | The `maxPriorityFeePerGas` to use for a transaction. This accounts for the uncle risk and the majority of current MEV risk. | -| `gasPrice` | `number / string` | The `gasPrice` to use for legacy transactions or networks which do not support EIP-1559. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getFeeData` request using the Alchemy SDK: - - - ```javascript getfeedata.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - //Call the method to return the recommended fee data to use in a transaction. - let response = await alchemy.core.getFeeData() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "lastBaseFeePerGas": { - "type": "BigNumber", - "hex": "0x06bff1b5ca" - }, - "maxFeePerGas": { - "type": "BigNumber", - "hex": "0x0dd94b9a94" - }, - "maxPriorityFeePerGas": { - "type": "BigNumber", - "hex": "0x59682f00" - }, - "gasPrice": { - "type": "BigNumber", - "hex": "0x06c1241635" - } - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getFeeData` method: - -* **Transaction fee estimation**: Developers can use the `getFeeData` method to estimate the fee required for a particular transaction. Given the current network conditions, this information can be used to determine the optimal fee to set for a transaction. - -* **Gas price monitoring**: The `getFeeData` method can be used to monitor changes in the gas price of a blockchain network over time. This information can be used to adjust application gas price strategies, ensuring they stay competitive and cost-effective. - -* **Smart contract development**: When developing smart contracts, developers need to ensure that their contracts operate within the gas limits of the network. The `getFeeData` method can be used to calculate the gas costs associated with specific operations, helping developers to optimize their contract code and stay within network constraints. - -# Related Methods - -Here are the methods related to `getFeeData`: - -* [getGasPrice](/reference/getgasprice-sdk): Returns the current price per gas in `wei`. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getgasprice-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getgasprice-sdk-v3.mdx deleted file mode 100644 index 04b8bbb2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getgasprice-sdk-v3.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: getGasPrice - SDK -description: Returns the best guess of the current gas price to use in a transaction. -subtitle: Returns the best guess of the current gas price to use in a transaction. -url: https://docs.alchemy.com/reference/getgasprice-sdk-v3 -slug: reference/getgasprice-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the best guess of the current gas price to use in a transaction. - -# Response - -| Property | Type | Description | -| -------------------- | -------- | ------------------------------------------------------------------ | -| `Promise` | `object` | Returns an object with the `hex`: *string* and `type`: *BigNumber* | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getGasPrice` request using the Alchemy SDK: - - - ```javascript getgasprice.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - //Call the method - let response = await alchemy.core.getGasPrice() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "type": "BigNumber", - "hex": "0x04f2d00973" - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getGasPrice` method: - -* **Gas estimation**: Before submitting a transaction to the EVM networks, it's important to estimate the amount of gas that will be required to execute the transaction. `getGasPrice` can be used to retrieve the current gas price and use it to estimate the gas cost of a transaction. - -* **Gas price optimization**: Gas prices on the EVM networks can vary widely depending on network congestion and other factors. By using `getGasPrice`, developers can dynamically adjust the gas price of their transactions to optimize for speed and cost. - -* **Gas price monitoring**: Gas prices can fluctuate rapidly, and it's important to stay up-to-date on the current market conditions. `getGasPrice` can be used to monitor gas prices and alert developers when prices are high or low. - -* **Network analysis**: Gas prices can be an important indicator of network health and congestion. By analyzing historical gas prices using `getGasPrice`, developers can gain insights into network usage patterns and identify potential bottlenecks or congestion points. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getlogs-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getlogs-sdk-v3.mdx deleted file mode 100644 index a9a1a477..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getlogs-sdk-v3.mdx +++ /dev/null @@ -1,203 +0,0 @@ ---- -title: getLogs - SDK -description: Returns an array of logs that match the provided filter. -subtitle: Returns an array of logs that match the provided filter. -url: https://docs.alchemy.com/reference/getlogs-sdk-v3 -slug: reference/getlogs-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns an array of logs that match the provided filter. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | --------------------------------------------------------------------- | -| `filter` | `object` | The filter object to use. Includes the `fromBlock` and the `toBlock`. | - -### `filter` parameters - -| Parameter | Type | Description | -| ----------- | -------- | ------------------------------------------------------------------------------------- | -| `fromBlock` | `string` | Either the hex value of a **block number** OR One of the **block tags** listed below. | -| `toBlock` | `string` | Either the hex value of a **block number** OR One of the **block tags** listed below: | - -* `pending` (Not available on Ethereum) - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| --------------------- | ------- | ------------------------------------------------------------------------------------- | -| `Promise>` | `array` | `Array of log objects`, or an empty array if nothing has changed since the last poll. | - -### `>` response object parameters - -| Prameter | Type | Description | -| ------------------ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `blockHash` | `string` | `32 Bytes` - hash of the block where this log was in. null when its pending. `null` when its pending log. | -| `blockNumber` | `integer` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `transactionIndex` | `integer` | Integer of the transactions index position log was created from. null when its pending log. | -| `address` | `string` | `20 Bytes` - address from which this log originated. | -| `logIndex` | `integer` | Integer of the log index position in the block. `null` when its pending log. | -| `data` | `string` | Contains one or more 32 Bytes non-indexed arguments of the log. | -| `removed` | `boolean` | `true` when the log was removed, due to a chain reorganization. `false` if its a valid log. | -| `topics` | `array of strings` | Array of zero to four 32 Bytes DATA of indexed log arguments. **In solidity**: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier. | -| `transactionHash` | `string` | Hash of the transactions this log was created from. `null` when its pending log. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getLogs` request using the Alchemy SDK: - - - ```javascript getlogs.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - let address = "0xdAC17F958D2ee523a2206206994597C13D831ec7" - let topics = [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" ] - let blockHash = "0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0" - - //Call the method to return array of logs - let response = await alchemy.core.getLogs(address, topics, blockHash) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - [ - { - "blockNumber": 17944092, - "blockHash": "0x5f610d392c3b5823ede49ebc1267dda0043a174684ab9be684e3f6da2a5db683", - "transactionIndex": 0, - "removed": false, - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "data": "0x00000000000000000000000000000000000000000000000001617eb90b26c000", - "topics": [ - "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", - "0x00000000000000000000000058df81babdf15276e761808e872a3838cbecbcf9" - ], - "transactionHash": "0x4b561cdef026ccd80c76bddb7d298da791a3601cd399972bde9954c82c3feebe", - "logIndex": 0 - }, - { - "blockNumber": 17944092, - "blockHash": "0x5f610d392c3b5823ede49ebc1267dda0043a174684ab9be684e3f6da2a5db683", - "transactionIndex": 0, - "removed": false, - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "data": "0x00000000000000000000000000000000000000000000000001617eb90b26c000", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x00000000000000000000000058df81babdf15276e761808e872a3838cbecbcf9", - "0x000000000000000000000000cc489c3a61182d9cc019a3a987ec10b51588cf15" - ], - "transactionHash": "0x4b561cdef026ccd80c76bddb7d298da791a3601cd399972bde9954c82c3feebe", - "logIndex": 1 - }, - { - "blockNumber": 17944092, - "blockHash": "0x5f610d392c3b5823ede49ebc1267dda0043a174684ab9be684e3f6da2a5db683", - "transactionIndex": 0, - "removed": false, - "address": "0x645c8FB9e85b652cb6FBcAF18d17E2ADB657D587", - "data": "0x0000000000000000000000000000000000000000000000000005749d4fbbd908", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x000000000000000000000000cc489c3a61182d9cc019a3a987ec10b51588cf15", - "0x000000000000000000000000645c8fb9e85b652cb6fbcaf18d17e2adb657d587" - ], - "transactionHash": "0x4b561cdef026ccd80c76bddb7d298da791a3601cd399972bde9954c82c3feebe", - "logIndex": 2 - }, - { - "blockNumber": 17944092, - "blockHash": "0x5f610d392c3b5823ede49ebc1267dda0043a174684ab9be684e3f6da2a5db683", - "transactionIndex": 144, - "removed": false, - "address": "0xB49159aFEB54f8922b0A82a5d58bd4728B8c20bb", - "data": "0x00000000000000000000000000000000000000000000000000000016920554d1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000492202cd5376ff1", - "topics": [ - "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822", - "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", - "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad" - ], - "transactionHash": "0x4fb174eb30c8b6a65301bb93809577624b5a04892c5eaecdd46db811d24b59ae", - "logIndex": 315 - }, - { - "blockNumber": 17944092, - "blockHash": "0x5f610d392c3b5823ede49ebc1267dda0043a174684ab9be684e3f6da2a5db683", - "transactionIndex": 144, - "removed": false, - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "data": "0x0000000000000000000000000000000000000000000000000492202cd5376ff1", - "topics": [ - "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", - "0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad" - ], - "transactionHash": "0x4fb174eb30c8b6a65301bb93809577624b5a04892c5eaecdd46db811d24b59ae", - "logIndex": 316 - } - ] - ``` - - -# Use Cases - -Here are some possible use cases for the `getLogs` method: - -* **Event tracking**: `getLogs` can be used to track specific events generated by smart contracts. This is useful for monitoring the state changes of a smart contract and taking action based on those changes. - -* **Analytics**: `getLogs` can be used to analyze smart contract data and generate reports or visualizations. For example, you could use `getLogs` to analyze the frequency and volume of trades on a decentralized exchange. - -* **Debugging**: `getLogs` can be used to debug smart contracts. If a smart contract is not behaving as expected, you can use `getLogs` to retrieve the events generated by the contract and identify where the issue is occurring. - -# Related Methods - -Here are the methods related to `getLogs`: - -* [getBlock -SDK](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/getstorageat-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/getstorageat-sdk-v3.mdx deleted file mode 100644 index eef4b81f..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/getstorageat-sdk-v3.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: getStorageAt - SDK -description: Returns the value of the provided position at the provided address, at the provided block in Bytes32 format. -subtitle: Returns the value of the provided position at the provided address, at the provided block in Bytes32 format. -url: https://docs.alchemy.com/reference/getstorageat-sdk-v3 -slug: reference/getstorageat-sdk-v3 ---- - -Returns the value of the provided position at the provided address, at the provided block in `Bytes32` format. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the value of the provided position at the provided address, at the provided block in `Bytes32` format. - -# Parameters - -| Parameter | Type | Description | -| --------------- | --------- | ------------------------------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the code for. | -| `position` | `integer` | The position of the storage slot to get. | -| `blockTag` | `string` | The optional block number or hash to get the code for. Defaults to 'latest' if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `Promise` | `string` | Returns the value at this storage position. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getStorageAt` request using the Alchemy SDK: - - - ```javascript getStorageAt.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - let address = "registrar.firefly.eth" - let position = 0 - - //Call the method to get storage - let response = await alchemy.core.getStorageAt(address, position) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - 0x000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b - ``` - - -# Related Methods - -Here are the methods related to `getStorageAt`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokenbalances-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokenbalances-sdk-v3.mdx deleted file mode 100644 index 981af316..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokenbalances-sdk-v3.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: getTokenBalances - SDK -description: Returns the ERC-20 token balances for a specific owner address. -subtitle: Returns the ERC-20 token balances for a specific owner address. -url: https://docs.alchemy.com/reference/gettokenbalances-sdk-v3 -slug: reference/gettokenbalances-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the ERC-20 token balances for a specific owner address. - -# Parameters - -| Name | Type | Description | -| -------------------------------- | -------- | ------------------------------------------------------------ | -| `addressOrName` | `string` | The owner address or ENS name to get the token balances for. | -| `contractAddresses` ( optional ) | `array` | List of contract addresses to filter by. | - -# Response - -| Parameter | Type | Description | -| -------------------------------------------------------------- | -------- | -------------------------- | -| `Promise` | `object` | The ERC-20 token balances. | - -### `TokenBalancesResponse` response object parameters - -| Property | Type | Description | -| --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `address` | `string` | Returns the value at this storage position. | -| `tokenBalances` | `array` | returns an array of token balance objects. Each object contains: `contractAddress`, `tokenBalance`: *hex-encoded*, `error`: One of `tokenBalance` or error will be `null`. | - -### `TokenBalancesResponseErc20` response object parameters - -| Property | Type | Description | -| --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `address` | `string` | Returns the value at this storage position. | -| `tokenBalances` | `array` | returns an array of token balance objects. Each object contains: `contractAddress`, `tokenBalance`: *hex-encoded*, `error`: One of `tokenBalance` or error will be `null`. | -| `pageKey?` | `string` | This applies only to the `erc20` request type. An address to be passed into the `pageKey` of the next request to paginate through an owner's tokens. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTokenBalances` request using the Alchemy SDK: - - - ```javascript gettokenbalances.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - let vitalikAddress = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; - let usdcContract = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; - - //Call the method to return the token balances for this address - let response = await alchemy.core.getTokenBalances(vitalikAddress, [usdcContract]) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045', - tokenBalances: [ - { - contractAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', - tokenBalance: '0x0000000000000000000000000000000000000000000000000000000002561840' - } - ] - } - ``` - - -# Use Cases - -For guidance on how to leverage this method, check out the following tutorials: - -* [How to Get Token Balance for an Address](/docs/how-to-get-token-balance-for-an-address) -* [How to Get All Tokens Owned by an Address](/docs/how-to-get-all-tokens-owned-by-an-address) - -# Related Methods - -Here are the methods related to `getTokenBalances`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. -* [getBalance](/reference/getbalance-sdk): Returns the balance of a given address as of the provided block. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokenmetadata-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokenmetadata-sdk-v3.mdx deleted file mode 100644 index 2fc59727..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokenmetadata-sdk-v3.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: getTokenMetadata - SDK -description: Returns metadata for a given token contract address. -subtitle: Returns metadata for a given token contract address. -url: https://docs.alchemy.com/reference/gettokenmetadata-sdk-v3 -slug: reference/gettokenmetadata-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns metadata for a given token contract address. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------- | -| `address` | `string` | The contract address to get metadata for. | - -# Response - -| Parameters | Type | Description | -| -------------------------------- | -------- | --------------------------------------------------- | -| `Promise` | `object` | Returns metadata for a given token contract address | - -### `TokenMetadataResponse` object parameters - -| Property | Type | Description | -| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | The token's name, `null` if not defined in the contract and not available from other sources. | -| `symbol` | `string` | The token's symbol. `null` if not defined in the contract and not available from other sources. | -| `decimals` | `number` | The number of decimals of the token. `null` if not defined in the contract and not available from other sources. | -| `logo` | `string` | URL of the token's logo image. `null` if not available. | - -# Example Request and Response - -**Prerequisite**: You must install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTokenMetadata` request using the Alchemy SDK: - - - ```javascript gettokenmetadata.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - const usdcContract = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; - - //Call the method to retrieve the token metadata - let response = await alchemy.core.getTokenMetadata(usdcContract) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - decimals: 6, - logo: 'https://static.alchemyapi.io/images/assets/3408.png', - name: 'USD Coin', - symbol: 'USDC' - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getTokenMetadata` method: - -* **Displaying Token Information**: DApps and other blockchain applications often need to display information about a particular token. By using `getTokenMetadata`, developers can easily retrieve information such as the token name, symbol, and decimal places for display in their application. - -# Related Methods - -Here are the methods related to `getTokenMetadata`: - -* [getTokenBalances](/reference/gettokenbalances): Returns the ERC-20 token balances for a specific owner address. -* [getFeeData](/reference/getfeedata-sdk): Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the `maxFeePerGas` and `maxPriorityFeePerGas` should be used. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokensforowner-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokensforowner-sdk-v3.mdx deleted file mode 100644 index 4d222c40..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettokensforowner-sdk-v3.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: getTokensForOwner - SDK -description: Returns the tokens that the specified address owns, along with the amount of each token and the relevant metadata. -subtitle: Returns the tokens that the specified address owns, along with the amount of each token and the relevant metadata. -url: https://docs.alchemy.com/reference/gettokensforowner-sdk-v3 -slug: reference/gettokensforowner-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the tokens that the specified address owns, along with the amount of each token and the relevant metadata. - -# Parameters - -| Name | Type | Description | -| --------------- | -------- | ------------------------------------------------------ | -| `addressOrName` | `string` | The owner address to get the tokens with balances for. | -| `options?` | `string` | Additional options to pass to the request. | - -### `GetTokensForOwnerOptions` parameters - -| Parameters | Type | Description | -| ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `contractAddresses` | `string` | `optional` List of contract addresses to filter by. Options include: "DEFAULT\_TOKENS", "erc20". If omitted, it defaults to `erc20`. | -| `pageKey` | `string` | Optional page key to use for pagination. | - -# Response - -| Parameters | Type | Description | -| ------------------------------------ | -------- | ------------------------------------------------------------------------- | -| `Promise` | `object` | Returns the tokens that the specified address owns and relevant metadata. | - -### `GetTokensForOwnerResponse` response parameters - -| Property | Type | Description | -| --------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageKey` | `string` | `optional` Page key for the next page of results, if one exists. | -| `tokens` | `array of objects` | Owned tokens for the provided addresses along with relevant metadata. The following parameters are associated with the `OwnedToken` object: 1. **`balance`** - `string` The formatted value of the balance field as a hex string. This value is undefined if the error field is present or if the `decimals` field = `undefined`. 2. **`contractAddress`** - `string` The contract address of the token. 3. **`decimals`** - `number` The number of decimals of the token. It is `undefined` if not defined in the contract and unavailable from other sources. 4. **`error`** - `string` Error from fetching the token balances. None of the other fields will be defined if this field is defined. 5. **`logo`** - `string` URL link to the token's logo. It is undefined if the logo is not available. 6. **`name`** - `string` The token's name. It is undefined if the name is not defined in the contract and is unavailable from other sources. 7. **`rawBalance`** - `string`The raw value of the balance field as a hex string. 8. **`symbol`** - `string` The token's symbol. It is undefined if the symbol is not defined in the contract and unavailable from other sources. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTokensForOwner` request using the Alchemy SDK: - - - ```javascript getTokensForOwner.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the owner address or name - const ownerAddress = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" - - //The response returns the tokens the address owns and relevant metadata. - let response = await alchemy.core.getTokensForOwner(ownerAddress) - - //Logging the response to the console - console.log(response) - }; - main(); - ``` - - -## Response - - - ```json json - { - "tokens": [ - { - "contractAddress": "0x006b05751a9b7aafd6e0dd251a14e463c94e9dfc", - "rawBalance": "59061420000000000000000000", - "decimals": 0, - "name": "", - "symbol": "", - "balance": "59061420000000000000000000" - }, - { - "contractAddress": "0x011de7ae82cabe65824114110773096181bb0215", - "rawBalance": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "decimals": 18, - "name": "$ get-usdc.com", - "symbol": "Visit https://get-usdc.com to get rewards", - "balance": "115792089237316195423570985008687907853269984665640564039457.584007913129639935" - }, - { - "contractAddress": "0x9412796c9c9def387626825a76b7ccebf28ab42c", - "rawBalance": "0", - "decimals": 18, - "name": "PulseX", - "symbol": "PULSE", - "balance": "0.0" - }, - { - "contractAddress": "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce", - "rawBalance": "163283668535754919854895611", - "decimals": 18, - "logo": "https://static.alchemyapi.io/images/assets/5994.png", - "name": "Shiba Inu", - "symbol": "SHIB", - "balance": "163283668.535754919854895611" - }, - { - "contractAddress": "0x981dc247745800bd2ca28a4bf147f0385eaa0bc0", - "rawBalance": "8880000000000000000", - "decimals": 18, - "logo": "https://static.alchemyapi.io/images/assets/22651.png", - "name": "NutsDAO", - "symbol": "NUTS", - "balance": "8.88" - }, - { - "contractAddress": "0x98976a6dfaaf97b16a4bb06035cc84be12e79110", - "rawBalance": "500000000000000000", - "decimals": 18, - "name": "MYOUToken", - "symbol": "MYOU", - "balance": "0.5" - } - ], - "pageKey": "0x98976a6dfaaf97b16a4bb06035cc84be12e79110" - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getTokensForOwner` method: - -* **Portfolio Management**: The `getTokensForOwner` method allows developers to build applications that help users manage their crypto portfolios. By querying the tokens owned by a specific address, developers can provide users with an overview of their token holdings, including the token balances and associated metadata. -* **Token Listings**: Platforms that list tokens or marketplaces can utilize the `getTokensForOwner` method to gather information about the tokens owned by an address. This data can display the tokens available for trade or sale, including their attributes, prices, and other relevant details. -* **Automated Tasks**: Blockchain developers often need to automate certain tasks based on token ownership. By using the `getTokensForOwner` method, developers can programmatically check if an address owns specific tokens and perform actions accordingly. For example, triggering events or executing smart contract functions based on token ownership - -# Related Methods - -Here are some methods related to the`getTokensForOwner` method: - -* [getTokenBalances](/reference/gettokenbalances): Returns the ERC-20 token balances for a specific owner address. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactioncount-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactioncount-sdk-v3.mdx deleted file mode 100644 index 37b003b6..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactioncount-sdk-v3.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: getTransactionCount - SDK -description: Returns the number of transactions ever sent from the provided address, as of the provided block tag. This value is used as the nonce for the next transaction from the address sent to the network. -subtitle: Returns the number of transactions ever sent from the provided address, as of the provided block tag. This value is used as the nonce for the next transaction from the address sent to the network. -url: https://docs.alchemy.com/reference/gettransactioncount-sdk-v3 -slug: reference/gettransactioncount-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the number of transactions ever sent from the provided address, as of the provided block tag. This value is used as the nonce for the next transaction from the address sent to the network. - -# Parameters - -| Name | Type | Description | -| --------------- | -------- | ----------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the nonce for. | -| `blockTag` | `string` | The optional block number or hash. Defaults to 'latest' if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ------------------------------- | -| `Promise` | `number` | Returns the value of the count. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTransactionCount` request using the Alchemy SDK: - - - ```javascript getTransactionCount.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - const address = "vitalik.eth" - - //Call the method - let response = await alchemy.core.getTransactionCount(address) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - 1017 - ``` - - -# Related Methods - -* [getTransactionReceipts](/reference/gettransactionreceipts-sdk): Returns the transaction receipt for hash or `null` if the transaction has not been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactionreceipt-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactionreceipt-sdk-v3.mdx deleted file mode 100644 index ebd5ae10..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactionreceipt-sdk-v3.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: getTransactionReceipt - SDK -description: Returns the transaction receipt for hash or null if the transaction has not been mined. -subtitle: Returns the transaction receipt for hash or null if the transaction has not been mined. -url: https://docs.alchemy.com/reference/gettransactionreceipt-sdk-v3 -slug: reference/gettransactionreceipt-sdk-v3 ---- - -Returns the transaction receipt for hash or `null` if the transaction has not been mined. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the transaction receipt for hash or `null` if the transaction has not been mined. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------- | -| `transactionHash` | `string` | `32 Bytes` - Hash of a transaction. | - -# Response - -| Property | Type | Description | -| ------------------------------------- | -------- | ----------------------------------------------------------------- | -| `Promise` | `object` | A transaction receipt object, or `null` when no receipt was found | - -### `TransactionReceipt` response object parameters - -| Parameter | Type | Description | -| -------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `20 Bytes` - address of the receiver. `null` when its a contract creation transaction | -| `from` | `string` | `20 Bytes` - address of the sender | -| `contractAddress` | `string \| null` | `20 Bytes` - The contract address created, if the transaction was a contract creation, otherwise `null` | -| `transactionIndex` | `number` | The integer of the transactions index position log was created from. `null` when it's pending log. | -| `root?` | `string` | `32 bytes` of post-transaction stateroot (pre Byzantium) | -| `gasUsed` | `object` | The amount of gas used by this specific transaction alone. It returns the *type: BigNumber* , and the hexadecimal representation of the gas used in the *hex* property. | -| `logsBloom` | `string` | `256 Bytes` - Bloom filter for light clients to quickly retrieve related logs | -| `transactionHash` | `string` | `32 Bytes` - hash of the transaction | -| `logs` | `array` | Array of log objects, which this transaction generated | -| `blockNumber` | `number` | The block number where this log was in. null when its pending. `null` when its pending log. | -| `confirmations` | `number` | The number of confirmations for the transaction. | -| `type` | `number` | type. | -| `status` | `integer` | Either `1` (success) or `0` (failure) | -| `cummulativeGasUsed` | `object` | A cumulative amount of gas used for the transaction. It returns the *type: BigNumber* , and the hexadecimal representation of the cumulative gas used in the *hex* property. | -| `effectiveGasPrice` | `number` | The gas price. It returns the *type: BigNumber* , and the hexadecimal representation of the effective gas in the *hex* property. | -| `byzantium` | `boolean` | Returns true/false. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTransactionReceipt` request using the Alchemy SDK: - - - ```javascript gettransactionreceipt.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - const tx = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b" - - //Call the method to fetch the transaction receipt of the tx - let response = await alchemy.core.getTransactionReceipt(tx) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "to": "0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB", - "from": "0xa7d9ddBE1f17865597fBD27EC712455208B6B76d", - "contractAddress": null, - "transactionIndex": 65, - "gasUsed": { - "type": "BigNumber", - "hex": "0x53a0" - }, - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", - "transactionHash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b", - "logs": [], - "blockNumber": 6139707, - "confirmations": 11809387, - "cumulativeGasUsed": { - "type": "BigNumber", - "hex": "0x20ec2d" - }, - "effectiveGasPrice": { - "type": "BigNumber", - "hex": "0x04a817c800" - }, - "status": 1, - "type": 0, - "byzantium": true - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getTransactionReceipt` method: - -* **Confirming transaction execution**: When a transaction is sent on the Ethereum blockchain, it may take some time to process and confirm it. The `getTransactionReceipt` method can confirm that a transaction has been processed and its status (success or failure). - -* **Verifying smart contract execution**: Smart contracts are self-executing programs that run on the Ethereum blockchain. They can execute transactions and perform various operations on the blockchain. The `getTransactionReceipt` method can be used to verify that a smart contract has been executed as intended and to check its output. - -* **Tracking token transactions**: Tokens are a type of digital asset that can be traded on the Ethereum blockchain. The `getTransactionReceipt` method can be used to track token transactions and to verify that they have been executed correctly. - -* **Auditing blockchain transactions**: The transparency and immutability of blockchain transactions make them an ideal platform for auditing purposes. The `getTransactionReceipt` method can be used to audit transactions and to ensure that they have been executed correctly and securely. - -# Related Methods - -Here are the methods related to `getTransactionReceipt`: - -* [getTransactionReceipts](/reference/gettransactionreceipts-sdk): Gets all transaction receipts for a given block by number or block hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactionreceipts-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactionreceipts-sdk-v3.mdx deleted file mode 100644 index a4e9f6be..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/gettransactionreceipts-sdk-v3.mdx +++ /dev/null @@ -1,237 +0,0 @@ ---- -title: getTransactionReceipts - SDK -description: Gets all transaction receipts for a given block by number or block hash. -subtitle: Gets all transaction receipts for a given block by number or block hash. -url: https://docs.alchemy.com/reference/gettransactionreceipts-sdk-v3 -slug: reference/gettransactionreceipts-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets all transaction receipts for a given block by number or block hash. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `params` | `object` | The api only takes in one parameter - an object with at least a `blockNumber` or `blockHash`. If both are provided, `blockHash` is prioritized. | - -### `params` Parameters - -| Parameter | Type | Description | -| ------------- | -------- | -------------------------------------------------------------------- | -| `blockNumber` | `number` | The block number you want to get transaction receipts for, in *hex*. | -| `blockHash` | `string` | The block hash you want to get transaction receipts for. | - -# Response - -| Property | Type | Description | -| -------------------------------------- | -------- | ------------------------------------------------------------------ | -| `Promise` | `object` | A list of transaction receipts for each transaction in this block. | - -## `TransactionReceiptsResponse` object parameters - -| Property | Type | Description | -| ---------- | ------------------ | ----------------------------------------------------- | -| `receipts` | `array of objects` | A list of transaction receipts for the queried block. | - -### `receipts` object parameters - -| Parameter | Type | Description | -| -------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `20 Bytes` - address of the receiver. `null` when its a contract creation transaction | -| `from` | `string` | `20 Bytes` - address of the sender | -| `contractAddress` | `string \| null` | `20 Bytes` - The contract address created, if the transaction was a contract creation, otherwise `null` | -| `transactionIndex` | `number` | The integer of the transactions index position log was created from. `null` when it's pending log. | -| `root?` | `string` | `32 bytes` of post-transaction stateroot (pre Byzantium) | -| `gasUsed` | `object` | The amount of gas used by this specific transaction alone. It returns the *type: BigNumber* , and the hexadecimal representation of the gas used in the *hex* property. | -| `logsBloom` | `string` | `256 Bytes` - Bloom filter for light clients to quickly retrieve related logs | -| `transactionHash` | `string` | `32 Bytes` - hash of the transaction | -| `logs` | `array` | Array of log objects, which this transaction generated | -| `blockNumber` | `number` | The block number where this log was in. null when its pending. `null` when its pending log. | -| `confirmations` | `number` | The number of confirmations for the transaction. | -| `type` | `number` | type. | -| `status` | `integer` | Either `1` (success) or `0` (failure) | -| `cummulativeGasUsed` | `object` | A cumulative amount of gas used for the transaction. It returns the *type: BigNumber* , and the hexadecimal representation of the cumulative gas used in the *hex* property. | -| `effectiveGasPrice` | `number` | The gas price. It returns the *type: BigNumber* , and the hexadecimal representation of the effective gas in the *hex* property. | -| `byzantium` | `boolean` | Returns true/false. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTransactionReceipts` request using the Alchemy SDK: - - - ```javascript gettransactionreceipts.js - // Imports the Alchemy SDK - const { Alchemy, Network, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the params object - const params = { - // blockNumber - blockNumber: "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe" - }; - - //The response returns the transaction receipts of the `blockNumber` - let response = await alchemy.core.getTransactionReceipts(params) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "receipts": [ - { - "transactionHash": "0xcbe7ce4c134f142265f66002865b9c70c653f331db166bd04145d017099d32a5", - "blockHash": "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe", - "blockNumber": "0xedd023", - "logs": [ - { - "transactionHash": "0xcbe7ce4c134f142265f66002865b9c70c653f331db166bd04145d017099d32a5", - "address": "0xb4b9dc1c77bdbb135ea907fd5a08094d98883a35", - "blockHash": "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe", - "blockNumber": "0xedd023", - "data": "0x000000000000000000000000000000000000000000001e52bf853982a7320000", - "logIndex": "0x0", - "removed": false, - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x000000000000000000000000e93381fb4c4f14bda253907b18fad305d799241a", - "0x000000000000000000000000b93e6551a61305b7a5c9621599f0d054aab6f17d" - ], - "transactionIndex": "0x0" - } - ], - "contractAddress": null, - "effectiveGasPrice": "0x6fc23ac00", - "cumulativeGasUsed": "0x10569", - "from": "0xe93381fb4c4f14bda253907b18fad305d799241a", - "gasUsed": "0x10569", - "logsBloom": "0x00020000000000000000000000000000000000000000000000000000000000000000040000000000000000010000000000000000010000000000000000000000000000000000000000000008000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000010000000000000000000800000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000100000000000002000000000000000000000000000000000000000000000000000000000000000000", - "status": "0x1", - "to": "0xb4b9dc1c77bdbb135ea907fd5a08094d98883a35", - "transactionIndex": "0x0", - "type": "0x0" - }, - { - "transactionHash": "0xf0605f4c7e07737142a6dfccf44dd77faab6574404bf99faab9e347addeef728", - "blockHash": "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe", - "blockNumber": "0xedd023", - "logs": [ - { - "transactionHash": "0xf0605f4c7e07737142a6dfccf44dd77faab6574404bf99faab9e347addeef728", - "address": "0xb4b9dc1c77bdbb135ea907fd5a08094d98883a35", - "blockHash": "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe", - "blockNumber": "0xedd023", - "data": "0x000000000000000000000000000000000000000000005ec4c3f70f248b8a0000", - "logIndex": "0x1", - "removed": false, - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x000000000000000000000000e93381fb4c4f14bda253907b18fad305d799241a", - "0x0000000000000000000000005e8304b5600cccba6d6292c6687ac9ead0ec6288" - ], - "transactionIndex": "0x1" - } - ], - "contractAddress": null, - "effectiveGasPrice": "0x6fc23ac00", - "cumulativeGasUsed": "0x20ad2", - "from": "0xe93381fb4c4f14bda253907b18fad305d799241a", - "gasUsed": "0x10569", - "logsBloom": "0x00000000000000000000000000000000000002000000000000000000000000000000000000000000000000010000000000000000010000000000000000000000000000000000000000000008040000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000010000000000000000000800000000000000000000000001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000", - "status": "0x1", - "to": "0xb4b9dc1c77bdbb135ea907fd5a08094d98883a35", - "transactionIndex": "0x1", - "type": "0x0" - }, - { - "transactionHash": "0xf54f3420c1f7504d3260d3e9cd48521dc42785317df2f280d63fc614f731008c", - "blockHash": "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe", - "blockNumber": "0xedd023", - "logs": [ - { - "transactionHash": "0xf54f3420c1f7504d3260d3e9cd48521dc42785317df2f280d63fc614f731008c", - "address": "0x0820aeb0add3ffa988d00aea416e98e7099d0aa8", - "blockHash": "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe", - "blockNumber": "0xedd023", - "data": "0x", - "logIndex": "0x1f", - "removed": false, - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000252f6c8b09de8d7690c605dde04930a39bfcc2b5", - "0x00000000000000000000000000000000000000000000000000000000000000d4" - ], - "transactionIndex": "0x1d" - } - ], - "contractAddress": null, - "effectiveGasPrice": "0x1f2198025", - "cumulativeGasUsed": "0x1d41ca", - "from": "0x252f6c8b09de8d7690c605dde04930a39bfcc2b5", - "gasUsed": "0x1a522", - "logsBloom": "0x00000000000000000000000000000001000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000008000000000000004000000000000000000000000000000000020000000000000000000800000000000000020000000110000000000000000000000000000000000000000000000100000040000000000000000000000000000000000000000000000000000000200000000000000000000000000000000002000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000", - "status": "0x1", - "to": "0x0820aeb0add3ffa988d00aea416e98e7099d0aa8", - "transactionIndex": "0x1d", - "type": "0x2" - } - ] - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getTransactionReceipts` method: - -* **Transaction Confirmation**: You can use `getTransactionReceipts` to check if the EVM networks have successfully confirmed a transaction. A transaction receipt contains information such as the block number and transaction status, which can indicate if the transaction was successful or not. - -* **Contract Interaction**: When you interact with a smart contract on the EVM networks, you typically receive a transaction hash. You can use `getTransactionReceipts` to retrieve the transaction receipt for that hash, which contains the contract address and any events emitted by the contract during the transaction. - -* **Transaction History**: If you need to keep track of the transactions you have sent or received on the EVM networks, you can use `getTransactionReceipts` to retrieve the receipts for those transactions. You can then store this information in your application's database or use it to generate reports. - -# Related Methods - -Here are the methods related to `getTransactionReceipts`: - -* [getTransactionReceipt](/reference/gettransactionreceipt-sdk): Returns the transaction receipt for hash or null if the transaction has not been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/iscontractaddress-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/iscontractaddress-sdk-v3.mdx deleted file mode 100644 index dcd0d607..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/iscontractaddress-sdk-v3.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: isContractAddress - SDK -description: Checks if the provided address is a smart contract. -subtitle: Checks if the provided address is a smart contract. -url: https://docs.alchemy.com/reference/iscontractaddress-sdk-v3 -slug: reference/iscontractaddress-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Checks if the provided address is a smart contract. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ------------------------------ | -| `address` | `string` | The address to check type for. | - -# Response - -| Property | Type | Description | -| ------------------ | --------- | -------------------------------------------------------------------------- | -| `Promise` | `boolean` | Returns true if the provided address is a smart contract, false otherwise. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make an `isContractAddress` request using the Alchemy SDK: - - - ```javascript isContractAddress.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const result = await alchemy.core.isContractAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); // Wrapped ETH address - - // Logging the response to the console - console.log(result) - } - - main(); - ``` - - -## Response - - - ```json json - true - ``` - - -# Use Cases - -Here are some common use cases for the `isContractAddress` method: - -* **Verifying the contract status of an address**: It's important to know the type of an address (Externally Owned Address or Contract Address) in many blockchain related operations. This function allows developers to verify if an address is a smart contract. - -* **Improving security**: Before interacting with an address, verifying its type can add an extra layer of security to prevent potential exploits ( for example, reentrancy attacks ) or mistakes. - -# Related Methods - -Here are the methods related to `isContractAddress`: - -* [getBalance](/reference/getbalance-sdk): Returns the balance of a given address as of the provided block. diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/sdk-core-methods.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/sdk-core-methods.mdx deleted file mode 100644 index 77c942b5..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/sdk-core-methods.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: SDK Core Methods -description: List of all SDK Core methods. -subtitle: List of all SDK Core methods. -url: https://docs.alchemy.com/reference/sdk-core-methods -slug: reference/sdk-core-methods ---- - -# Introduction - -The Alchemy SDK Core Methods allow for interacting with the EVM network seamlessly. - -# Supported Methods - -| Method | Description | -| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`call`](/reference/sdk-call) | Returns the result of executing the transaction. | -| [`estimateGas`](/reference/sdk-estimategas) | Returns an estimate of the amount of gas that would be required to submit a transaction to the network. | -| [`findContractDeployer`](/reference/sdk-findcontractdeployer) | Finds the address that deployed the provided contract and the block number it was deployed in. | -| [`getAssetTransfers`](/reference/sdk-getassettransfers) | The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. | -| [`getBalance`](/reference/sdk-getbalance) | Returns the balance of a given address as of the provided block. | -| [`getBlock`](/reference/sdk-getblock) | Returns the block from the network based on the provided block number or hash. | -| [`getBlockNumber`](/reference/sdk-getblocknumber) | Returns the block number of the most recently mined block. | -| [`getBlockWithTransactions`](/reference/sdk-getblockwithtransactions) | Returns the block from the network based on the provided block number or hash. | -| [`getCode`](/reference/sdk-getcode) | Returns the contract code of the provided address at the block. If there is no contract deployed, the result is 0x. | -| [`getFeeData`](/reference/sdk-getfeedata) | Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas should be used. | -| [`getGasPrice`](/reference/sdk-getgasprice) | Returns the best guess of the current gas price to use in a transaction. | -| [`getLogs`](/reference/sdk-getlogs) | Returns an array of logs that match the provided filter. | -| [`getStorageAt`](/reference/sdk-getstorageat) | Returns the value of the provided position at the provided address, at the provided block in `Bytes32` format. | -| [`getTokenBalances`](/reference/sdk-gettokenbalances) | Returns the ERC-20 token balances for a specific owner address. | -| [`getTokenMetadata`](/reference/sdk-gettokenmetadata) | Returns metadata for a given token contract address. | -| [`getTransactionCount`](/reference/sdk-gettransactioncount) | Returns the number of transactions ever sent from the provided address, as of the provided block tag. | -| [`getTransactionReceipt`](/reference/sdk-gettransactionreceipt) | Returns the transaction receipt for hash or null if the transaction has not been mined. | -| [`getTransactionReceipts`](/reference/sdk-gettransactionreceipts) | Gets all transaction receipts for a given block by number or block hash. | -| [`send`](/reference/sdk-send) | Allows sending a raw message to the Alchemy backend. | diff --git a/fern/api-reference/alchemy-sdk/sdk-core-methods/send-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-core-methods/send-sdk-v3.mdx deleted file mode 100644 index 719ccb03..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-core-methods/send-sdk-v3.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: send - SDK -description: Allows sending a raw message to the Alchemy backend. -subtitle: Allows sending a raw message to the Alchemy backend. -url: https://docs.alchemy.com/reference/send-sdk-v3 -slug: reference/send-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Allows sending a raw message to the Alchemy backend. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | ------------------------------------------------- | -| `params` | `array` | The parameters to pass to the method. | -| `method` | `string` | The method to call, e.g., `eth_getBlockByNumber`. | - -# Response - -| Property | Type | Description | -| -------------- | -------- | ----------------------------------------------------- | -| `Promise` | `object` | Returns an object corresponding to the method called. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `send` request using the Alchemy SDK: - - - ```javascript send.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let method = "eth_getBlockByNumber"; - let params = ["0xEDD023", false]; - - //Call the method - let response = await alchemy.core.send(method, params) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - number: '0xedd023', - hash: '0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe', - transactions: [ - '0xcbe7ce4c134f142265f66002865b9c70c653f331db166bd04145d017099d32a5', - '0xf0605f4c7e07737142a6dfccf44dd77faab6574404bf99faab9e347addeef728', - '0xf95639f915762ea2e57f4009595b1d7a00b4e896334695d75ec5e658bf0be6f8', - '0x3711b290df2402ce92eac90682c31814b90f89a8ab76878f479b3816455255b9', - '0xb903a9bb990b2f0576e84b72c3ba997b0e1e0e35656fcb35388021669ab10939', - '0x4bdd80fc079e3ed9f34f3851ac6ec393f80d6029eb0933ecdb317a5ca8929a3a', - '0x0b6188fbd2727060e03c657286eecf2819fb114a44a332bea98db5a14389de73', - '0x9724e919acff0392810d6cb373ecb315caa2c8ea93af3c2dee20c426ab252834', - '0xcbfe9a33127daa41b4254d041f1f44cfde317f011013e5576fb02ba7cf23c96f', - '0x0f0d44dbde0b877f8b51ceaebf05f4189afe12da0bf71bb0e85a2969c2c068be', - '0x4c9ca3b0ff18af68b11f17e3fcd71308c6dfef625b10f60c953114254a33f280', - '0x5ff2f1bbb2adfe70be2616abadf1e5c4840e49e25f8608ec5ebe916bcd9e3d5c', - '0x6eb27c6b68c7d0813e4751b245dbe456d3a1aa3522d63adc5a885cc92dfbf694', - '0xdaf12541d960f59e07454ed8652751326d8a7f0cd51c80aa658abd0f46b514fe', - '0x1666d9a752e1d5b3e59f5c59d0e13b5cfddee4e420d0d0eea170cfa6caca2fd6', - '0x3ef79b21db8716ad87fa08976b509ea8c8f9687859052b0dfe4db97fad9ac52f', - '0x6954f24dcffff19b99ff20d85a19173871efb1c3f7d07634f0ee894d47f3e306', - '0xd77574d4a17e8657b5297ac924803a7e26181abc9d0f7b8610c5dfa7251cbb87', - '0xbbd1c5ce3b55fec2153449b98351399e35a279a90961776ffbc47ad51ffece65', - '0x47169a29662dee6acb6b7fe3d8cb38f28bc107242d7e08aa6123ab6d5df4b95b', - '0x7a00d99e26bda5d9008e3948eb6548f84b19fe86740add3721c2701b0e85c2d8', - '0xc5b2f3fba21affb3eb84895551ed25ab497509026b3a6db6df97977c92d313c2', - '0x531e9dadda5a6ed8b65e99f342ac7f861173ad6ab261116883ddd124317338b1', - '0xe902d41d7600b7ed1bf36aeb0f544eaded9db41148cdd593b9b80c69cc7cd4cb', - '0xa3bd42e0a83f8ca5a2c23cb5d195897bfacc8d6897664c51eb7ba150594a003c', - '0x5cc61393f3dc49563f73aa6cbee365e8feef77b5b1da152b8c6cca6a39849e14', - '0x70e3dac3e3ca3ddd9453d7122f04603901f22ed8d18b001877c4436ecd20e5cd', - '0xe081332bc5456121715f91948e59a201555250f756238a7617a90e8f8026d0bd', - '0xa903afcd80f69f4beff17735e87c267fb2a653937f96a95c1051782529eeac0b', - '0xf54f3420c1f7504d3260d3e9cd48521dc42785317df2f280d63fc614f731008c' - ], - difficulty: '0x0', - extraData: '0x', - gasLimit: '0x1c9c380', - gasUsed: '0x1d41ca', - logsBloom: '0x00020000210008000200000400000001006042000400000000000000041000400020040000043000200a0811000101000a8002000b18200000080000002060000000080000008008280001280400000400000040004002000080080034000450020010020200004010011041000008080000028000000600000001100008408000000000228004280808000000000180008059000110400120284000011030041240210400017000020f0080000064020000200004008001003100022008800840000632000030000100084000000080012000200108010100400102001062000210200800008080000011084000080200001000400000000000088200800000', - miner: '0x388c818ca8b9251b393131c08a736a67ccb19297', - mixHash: '0x006ff88775a192a1a71dd002325549419f37a2f69732bd3f004d16fb35ac16fc', - nonce: '0x0000000000000000', - parentHash: '0xdf690ffd33a8715fcd6622426c2b498064e1fd8ed585da053302185f9bd7ad59', - receiptsRoot: '0x1086fbfce054458970c81893549fbf0c3861a183f96d2bb2c6e83aec97799aac', - sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - size: '0x21d4', - stateRoot: '0x562c00e97e229c109f1979bd0bb9836f567f8468c6a535990a0b05e2d4861a3a', - timestamp: '0x632bac4b', - totalDifficulty: '0xc70d815d562d3cfa955', - transactionsRoot: '0x25bc257b1b2393f16a7a0331986c1faa2dcc6b6cdae0be01783734bc70f5eb9b', - uncles: [], - baseFeePerGas: '0x1deff4daf' - } - ``` - - -# Use Cases - -Here are some possible use cases for the `send` method: - -* **Sending Ether**: The `send` method can be used to send Ether from one Ethereum address to another. This is the most common use case for the send function and is used in a wide variety of applications, from simple wallet transfers to complex smart contract interactions. - -* **Sending Tokens**: In addition to Ether, the `send` method can also be used to send ERC-20 tokens. This is particularly useful for decentralized applications (dApps) that require the transfer of tokens as part of their functionality. - -* **Triggering Smart Contract Interactions**: The `send` method can be used to trigger smart contract interactions, such as executing a function or changing a contract's state. This is a powerful feature that enables developers to build complex dApps that interact with the Ethereum blockchain. diff --git a/fern/api-reference/alchemy-sdk/sdk-debug-methods/sdk-debug-endpoints.mdx b/fern/api-reference/alchemy-sdk/sdk-debug-methods/sdk-debug-endpoints.mdx deleted file mode 100644 index b7390766..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-debug-methods/sdk-debug-endpoints.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: SDK Debug Methods -description: Learn about the debug methods provided by the Alchemy SDK -subtitle: Learn about the debug methods provided by the Alchemy SDK -url: https://docs.alchemy.com/reference/sdk-debug-endpoints -slug: reference/sdk-debug-endpoints ---- - -# Introduction - -The Alchemy SDK Debug Methods allow for tracing and debugging of calls, blocks, and transactions for improved troubleshooting and analysis. - -# Supported Methods - -| Method | Description | -| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`traceCall`](/reference/sdk-tracecall) | Runs an `eth_call` with the context of the provided block execution using the final state of the parent block as the base. | -| [`traceTransaction`](/reference/sdk-tracetransaction) | Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. | -| [`traceBlock`](/reference/sdk-traceblock) | Replays a block that has already been mined. | diff --git a/fern/api-reference/alchemy-sdk/sdk-debug-methods/traceblock-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-debug-methods/traceblock-sdk-v3.mdx deleted file mode 100644 index c8db84d4..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-debug-methods/traceblock-sdk-v3.mdx +++ /dev/null @@ -1,793 +0,0 @@ ---- -title: traceBlock - SDK -description: Replays a block that has already been mined. -subtitle: Replays a block that has already been mined. -url: https://docs.alchemy.com/reference/traceblock-sdk-v3 -slug: reference/traceblock-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`traceBlock`replays a block that has already been mined. - -# Parameters - -| Name | Type | Description | Example | -| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | -| `blockIdentifier` | `object` | The block to debug. Can be a block hash, block number hex string, or a commitment level. There are the following commitment levels: 1. `pending`: Sample next block inferred by Alchemy built on top of the latest block. 2. `latest`: The most recent block in the canonical chain observed by Alchemy. 3. `safe`: The most recent crypto-economically secure block that cannot be re-orged outside of manual intervention driven by community coordination. This is only available on Goerli testent. 4. `finalized`: The most recent secure block that has been accepted by >2/3 of validators. This block is very unlikely to be re-orged. This is only available on Goerli testnet. 5. `earliest`: The lowest numbered block available that is usually the first block created. | `0x5568A`, `latest`, `0x04e19fc95ec33e65c667d26a69d66d024732891c13742a345f5001ff900bd60a `etc. | -| `tracer` | `object` | Tracer type and configuration. This tracer tracks all call frames executed during a transaction, including depth 0. The returned result is a nested list of call frames executed as part of the call. It is an object with the following options: 1. `type`: The type of tracer to use during the execution. The options are [`callTracer`](/reference/debug-tracecall#calltracer) and [`prestateTracer`](/reference/debug-tracecall#prestatetracer) 2. `onlyTopCall?`: Whether to only trace the main (top-level) calls and ignore sub-calls. It is a boolean and defaults to `false`. | `{ type: callTracer, onlyTopCall: true }` | - -# Response - -The `traceTransaction` method returns a `Promise`response object with the following properties. - -| Property | Type | Description | -| --------------- | ------------------------------------------- | ------------------------------------------------------------ | -| `type` | `string` | The type of call: `CALL` or `CREATE` for the top-level call. | -| `from` | `string` | From address of the transaction. | -| `to` | `string` | To address of the transaction. | -| `value` | `string` | Amount of value transfer as a hex string. | -| `gas` | `string` | Gas provided for call as a hex string. | -| `gasUsed` | `string` | Gas used during the call as a hex string. | -| `input` | `string` | Call data. | -| `output` | `string` | Return data. | -| `errror?` | `string` | Optional error field. | -| `revertReason?` | `string` | Solidity revert reason, if the call reverted. | -| `calls?` | `array of response object` | Array of sub-calls executed as part of the original call. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```text yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `traceBlock` request using the Alchemy SDK: - - - ```javascript getTransaction.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the traceBlock method - const main = async () => { - // The block to debug. - let block = "latest"; - - // Tracer type and configuration. - let tracerConfig = { - type: "callTracer", - onlyTopCall: true, - }; - - // Calling the traceCall method - let response = await alchemy.debug.traceBlock(block, tracerConfig); - - // Logging the response to the console - console.log(response); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json traceBlock response - [ - { - "result": { - "type": "CALL", - "from": "0x4970197593ef5aed9d2c33409b953f5f9bb22563", - "to": "0x00000000008c4fb1c916e0c88fd4cc402d935e7d", - "value": "0x0", - "gas": "0x1d16ed", - "gasUsed": "0x20607", - "input": "0x06e399490e04c2b0f2a7f736d3b908bdde8608177c8fc28c1690f1ee7348e45ef0e838c705c2eece6d414d4aab3f3a880652f47bfaa771908c07dd8673a787daed3a003e5b0e9a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a58335e010000000000000000000000000000000000000000000000792e54dff737a4f35000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xec640f1dbe4c3e880c69c988ca5398028f770266", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x64fc8", - "gasUsed": "0x4a6c3", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e30fb700000000000000000000000000000000000000000000000000000000000000040a08000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000001600000000000000000000000003a880652f47bfaa771908c07dd8673a787daed3a000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3156b00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041111d0f98eeaa4cafb38f3d6697a8e7ca83918ad36664e6d76653348e247790392576049075b2e8e7ffe88398e927e10dc0b1c7713657cdf4cd366bc98edebce31c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000086e4085398776b4943000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000003a880652f47bfaa771908c07dd8673a787daed3a000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c79aef20e01a400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000084c79aef20e01a4", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9b9c09dffcaea00a6ed39af98275136f0b731c1b", - "to": "0xac57de9c1a09fec648e93eb98875b212db0d460b", - "value": "0x0", - "gas": "0x342b3", - "gasUsed": "0x21045", - "input": "0xa9059cbb000000000000000000000000d284d90ca74746c4521af905bdc15cdb1caa967d00000000000000000000000000000000000000000000000059ade1d1c96199ec", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x84e295f14985f6dfbf25bd0c7e47d3c01dccc783", - "to": "0x2e71b2688019ebdfdde5a45e6921aaebb15b25fb", - "value": "0x9851c70b3b082", - "gas": "0x3afb2", - "gasUsed": "0x3a72e", - "input": "0xe2bbb15800000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000025c33226cd78c2f6b", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x820fe284be0254d3c7f0cc800c8d7183e40ee5dd", - "to": "0xfc34a4d998d219f60717c1a5db0e5405ab4b53a4", - "value": "0x0", - "gas": "0x11e67", - "gasUsed": "0x115e2", - "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x1f2eb98b4e5a445b166cf152e50c008b85ea17b1", - "to": "0xba0b09fb5c2078698f84d47e23f33bb0c284d827", - "value": "0xde0b6b3a7640000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xef3396952a570fab461646042a1e921e571e4d3b", - "to": "0x512d03379c135b464b0c62847141eeed6ccb1bd8", - "value": "0x0", - "gas": "0x8683", - "gasUsed": "0x8683", - "input": "0x2e7ba6ef00000000000000000000000000000000000000000000000000000000000037a2000000000000000000000000ef3396952a570fab461646042a1e921e571e4d3b000000000000000000000000000000000000000000000001a0c01934d640c0000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f745e2c3654e73f076b6e1d67660188069a17cd5363050501bfb62c81d690d218e6060d801e51ef8087f7684e4d6c79c45c4fd9a4350d08927e0f6472ab4b8e1622f358234771f9fe6855c38cc3646388e2791c2029d8b5a1010a2454b0bc3b8d75cffdba8304751a47d294ba3054b48151d44a28ba797f6c3760fcc49b64934b327657d5a5fb4d8109d21f9f92c92b030c153311e6c7f23d0a6de82261c2bb7b8bb70d5bdc6bd8cf28343a82b78128c556689867f15ab2321ddf7835087277565c22b204aa2713e00546b4f443c6058d8929564627957f181972193c4bc0a735a4f4d878f381eacc846cd39542ab8de5bdade1ed81e8a660cb4535999645a48bc6c7549e961afe50c8cf85e00fc1b0c2d347942c324238800087cba4c8ff54295dd9831c90b8ba75a633313c419109b06ea44876c12f0e0c6dd56890b32157302b3eeb73d87d8be6ef6d82d105d16100e02367c5c4f65bad23257104332f40bbc35a67b9fde03357aa9fb52d21e0b142900bcdcd7a3bf314771fc7dc551afb88c0be4a25fd5cfe0c34c57114d755b160b5f38bf622e064df5e07aeee24ba24c517b536f159c21270d5451d4fcaa1b1a4bb66e005191c464712a0cd1505d7665c9eb45b25983fb2abb4f06d2366e03614c8ea8ef995b0ff2883b3aea4d2469e23", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf9530ea194648c5859be70c6ab03a4ffc7e04284", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x38d7ea4c68000", - "gas": "0x199d9", - "gasUsed": "0x1915e", - "input": "0xfb0f3ee1000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000376c1e0a7f000000000000000000000000000eeb3756560dc82814b4155e4e15d2588205ecf82000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c0000000000000000000000000057f1887a8bf19b14fc0df6fd9b2acc9af147ea85f940bbe1f9b3662500d9642220ef681024503553631adbc11dc31b47ebe7308d000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000063e05e170000000000000000000000000000000000000000000000000000000063e998970000000000000000000000000000000000000000000000000000000000000000360c6ebe000000000000000000000000000000000000000052974f353af0d0e80000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000e76a6dc9af8080b48c51e564e964cd15b9d66640001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000016bcc41e90000000000000000000000000000000a26b00c1f0df003000390027140000faa71900000000000000000000000000000000000000000000000000000000000000419cc7aa2f0820658a80133cb94a47db723c8db73d2b661842fe53e17a794693ba4bfa821aafd0331e31bfc29c2fb34102fe21b9fbd046a89a7ea19666824f9b811c00000000000000000000000000000000000000000000000000000000000000c5d24601", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc63fc0ae83555e2553762edd887433573f77cfc2", - "to": "0x48c3399719b582dd63eb5aadf12a40b4c3f52fa2", - "value": "0x0", - "gas": "0xa89e", - "gasUsed": "0x7c0d", - "input": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba300000000000000000000000000000000000000000000033d97e7358b4869b5bf", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa12a635362203c561845f1090bff55db0b980aa7", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0x5638a", - "gasUsed": "0x3f459", - "input": "0x55944a4200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000d8000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000063e2488d0000000000000000000000000000000000000000000000000000000063e399fb0000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000dc660db8875869750000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001040f031d8f000000000000000000000000000000000000000000000000000001040f031d8f00000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000031aaf705fa77a3a7c7b22c1890c387a36b3e17182f544baf2a0c7db16a74b1d8766980c4ffbc19c76325992bb0725c6b110a1cff000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006806013f060000000000000000000000000000000000000000000000000000006806013f060000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a01804fc18000000000000000000000000000000000000000000000000000001a01804fc18000000000000000000000000000e53f976b720a0be0fd60508f9e938185dfd43657000000000000000000000000000000000000000000000000000000000000004164f269a92a5cec60c5aa9f5a7fc6b6617a463a4affde8fc27ec4683a2a59f7c576b5021ac056adbdde890cfcb44dd177bf0608d402e8ab206bcda9e8c44e72131c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000a12a635362203c561845f1090bff55db0b980aa700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e2488d0000000000000000000000000000000000000000000000000000000063e399fb0000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000019030b59443fa570000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000031aaf705fa77a3a7c7b22c1890c387a36b3e17180000000000000000000000000000000000000000000000000000000000001e820000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e38d22b9dd200000000000000000000000000000000000000000000000000000e38d22b9dd2000000000000000000000000000a12a635362203c561845f1090bff55db0b980aa70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e8200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000e6987684467c8c9584ccceeb6369701b084939bc7b7b78e8d9778d5eb265e336665d5e096f2382896a142fb5e3a532d04b8a3307f3a65b3fa3c9ae9441438c5c9ffacd707cf5875b4ecb451ed8332bfa1f9552338ee6040a81b36c8b3969fb4b39ba201459565d67585231723b47f98e282f55db646a04c825a4804f315fdcb89d394111c22f1995a82ce12b9f73cef75fa51c26c791917479709b7a59227a3b9c1d509d5c68fffd1ad1f9d04cc88baeb773cb191bc908a5516f007a4e2397e828276aa2252ab4601cd4deddb6c9d03d4e94adefd71e92c909cbbda4a912fdbad8c9f2cc89a2e6aaaaf467e187768ea4546231b85eefda87c1e9f95028eda1232606a077f640cc7884e92d19f5a9feb5e3867334a3b422c003b32e2f7baebe455d0d2f7f866df9c43e85ac013c6a756ae75da0ca15913e25a4d2d6d6cb042f60de2aca74650de52641eafc1b47bbdf5e723395ea301a26ee3d1bf292e847e77c5171d18d98e6ce887eb3494788f593bad6cbb73688c95a723fa6f9b265a689d2d25453fe871b5bd2dc5fcbd9d8f04bfe076cade6fd77ee9a63b71016948a85ceedb60e5e3059f09ef6d2582b6c34f76aeca5050c9eb8f1c6c7e011b88998f200300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000360c6ebe", - "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000031aaf705fa77a3a7c7b22c1890c387a36b3e17180000000000000000000000000000000000000000000000000000000000001e8200000000000000000000000000000000000000000000000000000000000000010000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c000000000000000000000000a12a635362203c561845f1090bff55db0b980aa70000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006806013f060000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a01804fc18000000000000000000000000000e53f976b720a0be0fd60508f9e938185dfd436570000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e38d22b9dd2000000000000000000000000000a12a635362203c561845f1090bff55db0b980aa70000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000" - } - }, - { - "result": { - "type": "CALL", - "from": "0x560a2edd994f2ba4883cdf8e0d164558d8c803ac", - "to": "0x44e94034afce2dd3cd5eb62528f239686fc8f162", - "value": "0x2386f26fc10000", - "gas": "0x16dcb", - "gasUsed": "0x1654f", - "input": "0x26c858a4000000000000000000000000fc9e10cb276c957ccd06edfcc6e8759b59e70600000000000000000000000000000000000000000000000000000000005adef0f0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000560a2edd994f2ba4883cdf8e0d164558d8c803ac00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc22938f454cf63a010a6cf7210239f7dd83c3085", - "to": "0xeea25ef21ab82eaec7d56400f0260d349a668feb", - "value": "0x3782dace9d90000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa0651a30a86dfd3befcf89a1454536b499ffbc5c", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0xc599", - "gasUsed": "0x7e0f", - "input": "0xfd9f1e10000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000a0651a30a86dfd3befcf89a1454536b499ffbc5c000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c0000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000639577c800000000000000000000000000000000000000000000000000000000640c1ec80000000000000000000000000000000000000000000000000000000000000000360c6ebe00000000000000000000000000000000000000000e774b081c397d9f0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000a604060890923ff400e8c6f5290461a83aedaceca0651a30a86dfd3befcf89a1454536b499ffbc5c000000000000010000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004882edd1176a80000000000000000000000000000000000000000000000000004882edd1176a80000000000000000000000000000a0651a30a86dfd3befcf89a1454536b499ffbc5c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000000000000000000000001e87f85809dc000000000000000000000000000007d6d221a707470196f84560423444cd75bba77000000000360c6ebe", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xce906632838073f6a82c1c92f252388dfa46ef5e", - "to": "0xa8c774a1567b7bb3b397fe75617dd92eafbe1f86", - "value": "0x15280a7ba33000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x417eec998e20b71bfd5b51e1db737a4420e7958f", - "to": "0x4d224452801aced8b2f0aebe155379bb5d594381", - "value": "0x0", - "gas": "0x847f", - "gasUsed": "0x602b", - "input": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xcdc4508b5a9e05abdfdd45fb509e92400aceb4eb", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x552dd75989f516c", - "gas": "0x3e770", - "gasUsed": "0x32756", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e310bf00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000552dd75989f516c000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000552dd75989f516c0000000000000000000000000000000000000000000032507ece494ff634926200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000235c8ee913d93c68d2902a8e0b5a643755705726", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6081258689a75d253d87ce902a8de3887239fe80", - "to": "0xf9803984b021bc6a2730e6ff4c318216bf2ae7fa", - "value": "0x69cd4d4b737f60", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xd493e90dffdd4740b11aed8401e6347e405b0c1f", - "to": "0xdea65dd08eb6d51fb23038322376897c54668964", - "value": "0x0", - "gas": "0x62f7", - "gasUsed": "0x62f7", - "input": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c710000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x8c46b3b70e895935f9465a6f10e2bc876119f51d", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0xb1a2bc2ec50000", - "gas": "0x43799", - "gasUsed": "0x368f2", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000000006055becbcfb00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002d886570a0da04885bfd6eb48ed8b8ff01a0eb7e", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x2a8ce51e7c0a1ee60e20bd859ecd07fd2530a3f3", - "to": "0x000000000000ad05ccc4f10045630fb830b95127", - "value": "0x0", - "gas": "0x4b27b", - "gasUsed": "0x41a66", - "input": "0x9a1fc3a7000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd024f0000000000000000000000002a8ce51e7c0a1ee60e20bd859ecd07fd2530a3f300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000b92d5d043faf7cecf7e2ee6aaed232000000000000000000000000aa462106da447c0440a4be29614c19387a59a3310000000000000000000000000000000000000000000000000000000000001a3900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000a39bb272e79075ade125fd351887ac00000000000000000000000000000000000000000000000000f8b0a10e4700000000000000000000000000000000000000000000000000000000000063e273250000000000000000000000000000000000000000000000000000000063e31c9900000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000006d97635e4d809e94bb9c2fe985a61c3800000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001b549a9137fa00c9f56d3848caa7e40ce8c3207d05fff91f083f109297add8c76c269c6d3e97321dff11d26c54c091ba99f86ee076ff40053cce718faa61e7390d00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001c5960890e57ffe8115685f286a475d36278461b9dc01f55623267a28129401be374c02d7e9b215ab194b51d2c2b36b1458020911d1fe8307148f1f01936ba7eac00000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd024f000000000000000000000000ba1ba61ff159422bcb07f78017186624e94e693600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b92d5d043faf7cecf7e2ee6aaed232000000000000000000000000aa462106da447c0440a4be29614c19387a59a331000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000a39bb272e79075ade125fd351887ac00000000000000000000000000000000000000000000000000f8b0a10e4700000000000000000000000000000000000000000000000000000000000063e273240000000000000000000000000000000000000000000000000000000065c3a6a400000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000741bc6b4483a7d07db999dadbc87fc5e00000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001b47dd2f5e55b3ebdedac66fed02f8fe19bf62c9b2556e6adeb54831cbac620c79362da5c5ce79601c9fb20247a71c5ba9ce5ef9b982ea1ebb7d281e1bdb9ed242", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb501a6d4901fcc36fda522b068d16b4d352b8bad", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x54607fc96a60000", - "gas": "0x3d6fd", - "gasUsed": "0x319d3", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159300000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000054607fc96a6000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000054607fc96a60000000000000000000000000000000000000000000000000000000000814af0229500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000022beb89e08fbfd32ade3d106beef43d0b04c5b56", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x0d07ef7954b276f11288b288f3c6375bef5d4d16", - "to": "0x9c8882c6b3e40530cdbce404eef003443b1e455a", - "value": "0x0", - "gas": "0x967b", - "gasUsed": "0x6063", - "input": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c710000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x55908c7cfb7ca9531b8f53ea954d13bcf81fda4c", - "to": "0x389dcc122a2304a95ef929e71b7ef2504c6cc3ac", - "value": "0x0", - "gas": "0x966e", - "gasUsed": "0x6059", - "input": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c710000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xceb69f6342ece283b2f5c9088ff249b5d0ae66ea", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x2b8cc", - "gasUsed": "0xa281", - "input": "0xa9059cbb000000000000000000000000796ef1e4b1457fe4761cd119ac703d802a8d53b000000000000000000000000000000000000000000000000000000005ce442fd9", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc438f0c5f01cb9841a26660b31a61176996e3df8", - "to": "0xa48a76f8537d1aed135849fa6809de088730245f", - "value": "0x1bc16d674ec80000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf0533476b7b4c421219e15fa2887f14149a7de70", - "to": "0xdba2efb64d1a8423a656728c874377c85af5c9ef", - "value": "0x34e3f33f3b921e", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6ec2bdcbc5804a4fbdfa578e46918cd0040db843", - "to": "0x0000000000a39bb272e79075ade125fd351887ac", - "value": "0x14d1120d7b160000", - "gas": "0x733c", - "gasUsed": "0x71e1", - "input": "0xd0e30db0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x4318003afdb642777c78f0e23483c3ce7cf429e7", - "to": "0x098852059b3a0b69b91cf373edae574bd1d08fd6", - "value": "0x71afd498d00000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x75a28b8c1a05f6da98647df616a6ed44d087be7d", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x3367b", - "gasUsed": "0x292a2", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000030a000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000f3dcbc6d72a4e1892f7917b7c43b74131df8480e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b8e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3159600000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000414dad984b6d9148ba77fe93123d3fda77b69e4346bb74d28d01a44f7089c80bb23cecb3e4bf23332b0eefdb24bc6590d81b0a833157cc23205d1651e29cdfb2201b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000004becf3f7465f955b6000000000000000000000000000000000000000000000000006fe2f28f3e9fe000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002bf3dcbc6d72a4e1892f7917b7c43b74131df8480e000bb8c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000006fe2f28f3e9fe0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9da24ce4fd54c7a0c17371c05149a8a6ab0c489c", - "to": "0x5d5092c22c5d0fd3fec42b6b2ce796d5b33421c6", - "value": "0x0", - "gas": "0x7fdf", - "gasUsed": "0x7fdf", - "input": "0x987fa5e10000000000000000000000000000000000000000000000000000000000000002", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9c48c15556719b287ef1286f6375fef24ae4d666", - "to": "0x0000000000a39bb272e79075ade125fd351887ac", - "value": "0x4db732547630000", - "gas": "0x2f60", - "gasUsed": "0x2f15", - "input": "0xd0e30db0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x65dc656ad1cd9e36d649a4a4be68a6e3d5250064", - "to": "0x4c8e924df8f84c0d4f4b456ad2b9b073638ee35f", - "value": "0x2c68af0bb140000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x5b3edd9a0d2673292a044507d015c651c0525b32", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2fae0b5a77346ce", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xcf073e31974ad3a24ae6d7580f6cada98438d040", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x303de6e23f2a488", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x7a76fcc57262b28d2a86fa4e5c9cb7ce8d386b3a", - "to": "0x5954ab967bc958940b7eb73ee84797dc8a2afbb9", - "value": "0x0", - "gas": "0xc171", - "gasUsed": "0xc171", - "input": "0x8279e760", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xacee7804b9e60050953e5dbdbc1a9af298988086", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x3b1d2", - "gasUsed": "0x2f96b", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000030a080c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000d8a4b3f4afd16eed638cbbd19d5801a5735c0930000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b8f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3159700000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041eb1bca1f57a9cd1e129f399fec13d043c83d14d6bb4a36a9b0ac83da36e438cc4732401ff488042ca8a602bbac8ddf692891c4cef9314582d31e0dbc92c268011c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000fc5a35a7dde1582200000000000000000000000000000000000000000000000009165ad432c029c400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d8a4b3f4afd16eed638cbbd19d5801a5735c0930000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000009165ad432c029c4", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xdaa9a5b37d369a40080bfeb3c251c5d5a42c14a3", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2fa03565a8d2088", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb4e85f3b797954549d9ce1dd29e0267787baf3bb", - "to": "0xe95b3dc78c0881dea17a69bafc6cfeb8d891e9de", - "value": "0x2c68af0bb140000", - "gas": "0x434f9", - "gasUsed": "0x42ab0", - "input": "0xcfe96c84000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000002c68af0bb14000002a8e4f0decfd0db4a5bb479c92432456d1c4dac272712f9e8b2f9df8af7b1770000000000000000000000000000000000000000000000000564fd1c1b80027700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002a87c0252000000000000000000000000007122db0ebe4eb9b434a9f2ffe6760bc03bfbd0e000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000007122db0ebe4eb9b434a9f2ffe6760bc03bfbd0e0000000000000000000000000e95b3dc78c0881dea17a69bafc6cfeb8d891e9de00000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000000000013e92f4900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e70000000000000000000000000000000000000000000000000000a900001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2397ff1542f962076d0bfe58ea045ffa2d347aca06ae4071138002dc6c0397ff1542f962076d0bfe58ea045ffa2d347aca01111111254fb6c44bac0bed2854e76f90643097d0000000000000000000000000000000000000000000000000000000013cf921ac02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000002c68af0bb14000000000000000000000000000000000000000000000000000000cfee7c08000000000000000000000000000000000000000000000000", - "error": "execution reverted" - } - }, - { - "result": { - "type": "CALL", - "from": "0xe6ed110ecc46174f2bb2ca41db388a23d7a57517", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2ff737cfe303a22", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa8e093ff7d6aaea1c6b5e35141d18f8ef15f8db3", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2fd58145d7e2088", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xab8fa57d08e8132072ac04b6c84ab8d4d557c567", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x16345785d8a0000", - "gas": "0x2e2fd", - "gasUsed": "0x24f3c", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000004d41f220db795bec6803958c300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006e9513330fe54ad5a793908dfe5676596394534a", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x10c04f0161c669080fadad3d43e3a9108ee72988", - "to": "0xc3aa9bc72bd623168860a1e5c6a4530d3d80456c", - "value": "0x0", - "gas": "0x1f53c", - "gasUsed": "0x1edda", - "input": "0x2407a746000000000000000000000000d2036d4c669be440ae9aff6ce025ab91f3bfd212ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9c3b95d11fbfdb61ec64d7b038328d403e5f9fd9", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x3026b63d9f040fc", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xd8722a0fc8c97b3ddeb66280f9d2ea17d2fa84f4", - "to": "0x587eef1f295b3462f545c279c95e82b799aa3f0e", - "value": "0x8401699a6f84000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9b1c83c13d7dc590ece3ef753222e2a051362965", - "to": "0x7f1949644840691593ba1c93bb17c4cd5a3074a7", - "value": "0x0", - "gas": "0x1376e", - "gasUsed": "0x1243f", - "input": "0x6a761202000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000044a9059cbb00000000000000000000000087cb4b5ae8e1e9cf16bd107320a59a5b34411ed700000000000000000000000000000000000000000000000000000002540be400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082edc9ca983c15ac021594567e8e59dfffbf159a3eb201ec169e3eaed90929b6931dbea5c338b3ca4992a0cd450d3107867b570c59b4347f2a969d067c8a77f7b4200000000000000000000000009b1c83c13d7dc590ece3ef753222e2a051362965000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x97ec0a17432d71a3234ef7173c6b48a2c0940896", - "to": "0x9008d19f58aabd9ed0d60971565aa8510560ab41", - "value": "0x0", - "gas": "0x8dec3", - "gasUsed": "0x5f8f3", - "input": "0x13d79a0b0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe840000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000002129893c72065ea5f8c288f0000000000000000000000000000000000000000000000000de864e41aac624c000000000000000000000000000000000000000000000000021570c41aabd80c000000000000000000000000000000000000000000000000000000000ee6b2800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db34edc8c96608c64126600e0470d65173e9e741000000000000000000000000000000000000000000000000000000000ee6b280000000000000000000000000000000000000000000000000021570c41aabd80600000000000000000000000000000000000000000000000000000000640a4467c1164815465bff632c198b8455e9a421c07e8ce426c8cd1b59eef7b305b8ca9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee6b2800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000004139dd1acd15e32f3e7beee395a5e4e17416e55d7b7f77847fcc796dafa25a5db90322182db5be6172d79634ef9a7cd852a2654a70bc8b40d898efc41519353b7a1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000009e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000007a0000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002249240529c000000000000000000000000d9fcd98c322942075a5c3860693e9f4f03aae07b000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000078e022da39a700000000000000000000000000000000000000000000000000000000000003454ba800000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b9b48bbdd8018396daad50364c467246db30d87000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009b858be6e3047d88820f439b240deac2418a255100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e770560000000000000000000000000000000000000000000000000000000063de35d60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001b0f2cc6131727e8675034fc8a512c6e4b4fef81f7269d6c255d2c613bb07d32b72dbf151f9447536ede55543f09ab3d4d4d19472228bf94fdcac4778e342c4ed50000000000000000000000000000000000000000000000000000000003454ba800000000000000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002249240529c000000000000000000000000d9fcd98c322942075a5c3860693e9f4f03aae07b000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000001a055690d9db80000000000000000000000000000000000000000000000000000000000000bfb044000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b9b48bbdd8018396daad50364c467246db30d87000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009b858be6e3047d88820f439b240deac2418a255100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e76fe20000000000000000000000000000000000000000000000000000000063de35620000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001b5bbfe47fad6f5438d519e2ec35d2fe5c8ed400353c6b03e15d6bc34619f686b52868db545239f9f6922f1ca52ac9cbf5510dbae52aa464c09bc78516a84a4ab6000000000000000000000000000000000000000000000000000000000ab62f8300000000000000000000000000000000000000000000000000000000000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000104414bf389000000000000000000000000d9fcd98c322942075a5c3860693e9f4f03aae07b000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000027100000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab410000000000000000000000000000000000000000000000001741badeb2c03dd5000000000000000000000000000000000000000000000001ed1d65345428fd280000000000000000000000000000000000000000000000000214401e56a0cc4c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001048803dbee000000000000000000000000000000000000000000000000021570c41aabd80400000000000000000000000000000000000000000000000002169089528d765f00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab41ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb6480922cc2af4180b8f10ec0fb3e8527d0db7e1", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0x36bf6", - "gasUsed": "0x2726f", - "input": "0x55944a4200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000ca000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004e00000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000063e1a1900000000000000000000000000000000000000000000000000000000063eadc0c0000000000000000000000000000000000000000000000000000000000000000360c6ebe00000000000000000000000000000000000000009734ece8b84f03dc0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001aa535d3d0c000000000000000000000000000000000000000000000000000001aa535d3d0c000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005000000000000000000000000f37cb20090057bdc70b928b7f91d081d412cfe5cd7fe02fa40860f55ab87c4ee6f9ede8c666ca6ca0f6b26a3ba377335b687bc8d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aa87bee538000000000000000000000000000000000000000000000000000000aa87bee5380000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000041842a7dbf1e3d541de8eca813b68b87cc7d551f6540dbbb23122232a56b2c503c4a1ae11b893d34e3ede03adb104d2d9396bd5e27e8676299eb8424faadd924601c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000063e1a1900000000000000000000000000000000000000000000000000000000063eadc0c0000000000000000000000000000000000000000000000000000000000000000360c6ebe000000000000000000000000000000000000000025dab100f1b6ac8e0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f37cb20090057bdc70b928b7f91d081d412cfe5c00000000000000000000000000000000000000000000000000000000000014460000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029911687df40000000000000000000000000000000000000000000000000000029911687df4000000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000d7a7099eb680d441ddb24e7dea202d08e126b69005cadb75dedbd1c03ed6e81d90d648591800c33f79ee1de2c4dcdc2ba70f345d877f609289eee98984554dd0dc41c37e81afcba9e16d91b8b567c929e80e4125f437ab73e1b99fb4d021b5d31b2d018f280d40cb7407da97753e04ddeb45a10c5e6f997c409c4740c90c9c14800a5c2a3a988b3636acc8e799caaae7de7636963db00f25b5aa33254a45c3ddb7d24d7063cda107a67729a83b8f5ed39f534308ecdea0d4c2b2c597d2c12e36d8a13d799b1872652bc38a906b343c90c498459c74b770b7bc2797ce7eaf97d804b92284ceef53c86617ca43178c4fe136b805d164ecbee4855880906b3b830e44834307ed94fb7c8ae6e0c10f683a455c4b882e0073ab68495c0ae1f50a7efeb488cd5e9609e76450adc0359c8f18f39c222f0076b2f56a79ec7febe874d77fe09c2681ff0e7c6be557a4f3c911d7de0286580b2317cf21a56a0c2c0847b947508735bbf56238886da5e8e386b72c9aad91c76cf8400ad655439e5c8d1445ec18b3c047eef04f0419f3cb7510cd8d4845fb72371abb6024e0d3076a82cda6d6e0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000360c6ebe", - "output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f37cb20090057bdc70b928b7f91d081d412cfe5c000000000000000000000000000000000000000000000000000000000000144600000000000000000000000000000000000000000000000000000000000000010000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e10000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029911687df4000000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e10000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9a7d666f031e4748bcbae05e97ad0a7fd0737be8", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x71b7", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb00000000000000000000000029c79c0ce4bdd81c0340cba99a85f1e2ee99a0f00000000000000000000000000000000000000000000000000000000006052340", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x215a800eb51dd612f75618b892601ddcbee911e8", - "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", - "value": "0x16345785d8a0000", - "gas": "0x2a97c", - "gasUsed": "0x22dbd", - "input": "0x7ff36ab50000000000000000000000000000000000000000000000000000001ca3f97dde0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000215a800eb51dd612f75618b892601ddcbee911e80000000000000000000000000000000000000000000000000000000063e313470000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000022beb89e08fbfd32ade3d106beef43d0b04c5b56", - "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000229a058cd1" - } - }, - { - "result": { - "type": "CALL", - "from": "0x951d5aac7edc356dbf3cddba53ba8573642b4f55", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x32369", - "gasUsed": "0x282c4", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000030a080c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001600000000000000000000000003106a0a076bedae847652f42ef07fd58589e001f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b8e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3159600000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000004102dd678bf27099c616a307cbf6106f7d3c1405492168af8ed1d4e48dad51a1ed459388919258e5f6889b4e27952fa75729ca5bbe8c34fa3a744ed1e473710cbf1b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000d8d726b7177a82cac00000000000000000000000000000000000000000000000000688ce32dbcbebb00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000003106a0a076bedae847652f42ef07fd58589e001f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000688ce32dbcbebb", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x011ce6fe10159b88b27f2711d8bd696408dd0fb6", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x11de9", - "gasUsed": "0xa281", - "input": "0xa9059cbb0000000000000000000000001262a61792460d203ba1007f8d69d4d1d77852a50000000000000000000000000000000000000000000000000000000005f5e100", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x8931ec04113c2485964eebaaa7f08d434e0b22a3", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x26db992a3b18000", - "gas": "0x33dc7", - "gasUsed": "0x29ae4", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e315ab00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000026db992a3b1800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000026db992a3b1800000000000000000000000000000000000000000000015be1e604f98060e92134b00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000003cb63598d2cc62f3ddc760c918b3437b45c15961", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xec3dcf56da0be96f69c45353c5df9da2bd908cce", - "to": "0xab7878196133c2f24b9539ef58c0b8b76b85ada4", - "value": "0x50677e59d5f54a", - "gas": "0x3e4", - "gasUsed": "0x0", - "input": "0x00", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6887246668a3b87f54deb3b94ba47a6f63f32985", - "to": "0x5e4e65926ba27467555eb562121fac00d24e9dd2", - "value": "0x0", - "gas": "0x21754", - "gasUsed": "0x13a7f", - "input": "0xd0f89344000457bd880000380000050000000000000000000000000000000000000b0000000063e30e820000fd021d00001b0000000063e30e920000fd021e0000010000000063e30e920000fd021f0000110000000063e30ea10000fd021f789cdcbd0558555bd338be0f87eeee0e91104491430802222129d288484a4a97c521a5430e25e1060549c5221411459152c240ba51bae5d0ffe7c27def07f783b355defbfebff737cf739feb3eb367af596bcdcc9a596b6601c02e2dc1ecfd931602c8e46503d4546551fe05828332476d8e1b54a875ca269e77cbd39a374496c1b08b1f165701db8086a988d967fe8c039784f297b4fb12c1290d25080033c07e17dfd677abd924139b1f821e23580c90bedb0ffd1f200ece4f7006086cb84a9472298c7b15c47098e660dff91a628e77809bc6eb5b669f0568a6c0e2042327bbcc448d2e32b38f668d61213b7d349443787049081dc9c6780d80b92cc12ee96c0e3756fa286ae8a6fc65c2f191430313936cf4bd34577182692c8328fc8c0d54ca60d872aa73a1dbdb97ffdf2ce16e7f582b41d9f272d34853873474f4be75e0e1497033c5dc23a2d2ed4ff6b7d4e12f9ae544eb329f88849cf5602c18712ec1446d31403e8001bdd98dbdd18226bd2cca6498f9fb63cc2996e59cdc9f14c50f097d47cbd31e292fe6372a68a07a6c3ada263e7b72e2743e780d3f7f7c42e875a6b0f33ba128e015c32755f831239117398f9ec62a3a375df605e0ee4b70177f18f6e6a8631b0ba09eea4e2c74a24de53f4cb1891dcee2278fd2cdd60926871319163d2983631f8bd35383e0ea02041ec484b41820bb0d410f27821143bc82991e020fc57f256634ac17825e16028fb5376a6b1a20da87f83c8617b882679d5e6122fd99f631cfef4f80c00da07dfcd883687404ed8b69b91beef5d21ec94f00a252280dff59801a7fc80144808717f20866fc65280e57c41d79f4de1ed96d40601c4a3fcd7d327954d9e7b66a0148604aca4515654164a0ecf66aaa2a3300be11465fe0e5fbf27416f9613526025900ebfe1256be3f2c32808ab2290046fa06a577a450e575bb439db326d20c61ae2472776c84115986a560e749b943207ccf79aa95532f59a784045ccd5021aea3aba2c5fb9d51d8d65fa801f92f071884c2020ab938a9cfb7ff906b3bf0f5c91dcfac149a77647cdd45d12ff3f1fc307f02fe7d1f0cca6d7f1028d6cd3897e0656f147deffc1ae7a3cac304d11b501f809258041818c2562bc4606bcde7434da6681f1c8ee0f1794c9a571f6b30aee3ed7a6a4a1de47731c4b18fb29e400b152e901d3c3d9d1553ff8cea4544057deda7a982f1a05c0098408f05e0a520022835910170125914d870b4cb4999e1931ba7b9be0fff3a176955b52fb23450112da505c18e75121d2f0372ca3c2fdd47f952436a431e69e04367faa30acacd2be9791cb3f22310f4d4c67dabb6a4e46796edf43fc904ba9acebd168898ff52ed538745419d999de234800069693497575c354e2c2ca93aa71554dd79fc34e9e513adba2bc719ed25cd253510204eecbbf7632c461c37eed07fe6517a37c833f924ff9942c095e746aa8a15a2ace2005080cef387696c2e8b303261d46e7a872c5520387feff176de70996e500a35abc61fc8a1624f0d33cc3eca73257f0302c441276b8220a976b5764b968816e787c5ae99ad7106d207460e19dd29bfc013e29c071e080fc38d49357c6fcd28b12891613193ddc17d5fabaac2d12065a68e84a289e6cfe9d131fe6f981e7130fcac7a4f3bcbe9ce93ea99731185733a9dbc7d923efc6189c19f68df26fac0fc419f6ede519d7eab1b6b3f3e8f6987af0e48d94b60572dcae636e6cef8f297b58803803ddad69f35ef2fd77cfef1619982942ebfe884d3bc835f53273eddbe71121978ca05704780fd374b90787793d76c78a592ad35af2cd44695bfb7a331208d8e8b6067932fcd04090b2e22db8e99283abc44bce42579eaa0d15d93777fa8a383fbc5a1b8a4f302cc00e080b6f337aef8ab35c6a197ce494cd1f47ce9fe4778b841e11ac7c46a641060c08f0f20c06cf91c758b136e53cbd42bac42f9d70e6fb0c6c79fd25b9cd62531f67aab27d2068a4dbc38fcb67751cd33e80bfbb268898838eafa708384aab4fbb15b083cca98a93f030f258ecdf606fb2a7f3af0a83019f44b5c4d54046ec62670a51fd0a8779681324cbf1b78c8e2e4b5d78bebec497746c559beec4079032f94f443b40f88588b49482044cd24f608a110609aa3149bd37057163feaae9bfacac67878e5cb8d9ecfe497fc1e77dad913aa91827683ab1cd95a4cc3a1696414aed12f8dad667bf204230a053f48315b798fdb5201c0387ad41fb61579e0d955a276d362646960b6dcf52f10dc6270de7e02c8bf97ee8522338a4c294b9979220e56e4882fbce77ea7f6ed10aee63ab18e79c1c5262d9257ca0e2425d41d1374a24ea04b2cca1a3cf5f88715eef13a61dd6a25fdb57b6ffd8655f5e1b347632f7dfa761fc0265bc2260e802f936d7538831dc5cc32ab49822b675ab510ceccd6de655a63c2a7852c83dfad457a4840f08cc48cc68270a7a1bc7128d8b1bac7706ef0a1e9406f46c2376fd4e26d2c00ec61721c3c383e8085838d0b23f8ad06a0c201424c48bc18b38398f1899e98f1a99731e31b309a73bc98d6867de16385af60c6cb619c7fbc58a36accf8ea754c780000b0031b549d0faa0ee7c555749d5bf1c5ff402176572dd6b63aacc12e1b65e6c4503478ebcc01ebc0833dc9861c4e4c4384efc2ae8345672f9bab2ff7b7bc175ccd76e24d4e198d551eba7d5b934ec2d655ca939b1337db86a5f19c91efc4f0a9e265d204393ca94ba71a6ff1f010930fcd465da4509520e9ad108e88bfc8e8e7e9e8c807c59fcd4b2a3a97948bc4caf341b165a88da093095ee2e3ec046ca743068ed5183692d1a8df2f363bb4ecf754aeeb85f19d4aa6ca0446029f3579aa45ecb13b1f51f0299e1c92451fa7b0c8613463727d4c5a55b5e3859a159f77341f9a1a6c3496cdd36deeb3ae65ab16e5474de71d89497a6d1d7a86f796bcd0652f55c5f7e5129d9f0f8b8309d6f7980212c82fb4b9aeaf7ca8f3bea4d06bd06b69eb18728a4b6d96dfc1330984133f9939e7814fb46499e4d87c1bc7a7e6a808a0a379e5086eaf6691309df10100e6b004b315dd3407a45c293fbdde4404982cdfd1e01fa6f3f84eda9f2ee8aa66d7ff1c62b820a3ab3d60c0296601f9906aef5885b3c385445ee464fc7ed71b0b0f73b34b18f008f0a4145a411cf1fdedf17691b3f704569bf5e94bcfe357bd9da267a1a73e7fec602b289be033ebc859743664f10c0efbe79121937cc19766f3bde0467268e76a75fb45004b63094bd51f16b515fd49e3ec11fdc106ff1efdfd626442a7ec09b9feffbf1efd41d96f28f8c7a33371f05eb3f310c2625d30fe66bd1b8364e5e2a98cfb8b0dc6a2d8b8c9f6a81ee7935da00d2fb3c6686d577440bc4827a8deef4a0c94c447063c5d4922ee5486e1d59e04f08f2ce10bfbc3fc363518378c1ed53d933f2008d7d08de83aab1f6b79dc2043b2811c59865723a76b55b4bd7154117e1ea09f4a85573425a872ab2d2c6228ca603b7e7217c0d81b129de4bd47e24b619a700c1a623ca0f68fb021f0100e093684c06343ecdfe140f1470a8187681f0e25b0ec10f81d0035bfbfbea9066530e010fc41e1b1308f3f26f9fa29806a1f525fff4e4fa97bc9d6cdcbcc59efe8cf34bf7ffd8090ef9dfbd3bb9da140d0432d08f2bbcb94e5ae3b93b0f97fd7b6ed5ff0bb1ec4cf02947d811a9f1df8dd7abf4f0f05eaf0038abf1df6e597ec3bac8d925ed863c7f83c3008fd4a44667f506bfc3c3aafc95c3f64b20c2aa223da27ff50dbb950fa0df57d28fdda217f50f67537088e0f7cbfe31990c2d6746eafccaf21ac8977c32946e0c74dec41aa9fff7a2ade6280341c01be562c9c6456df48a93493451e7fdb3e9dd0fad94a3823cb6b446645abe97a4624c8ac19df629414de7030287434e54a5268ed5ca5ff51e9986a81daaad48956d01b006cd0d601782d07feda66e24a8afd529d3781dfa8f27ca06760758671b16508894480b10e9501934f63a46548ccb03a1ebcb06f5e4924fb21be2cc327452da1cdf2d9093cc972ee9183f80fff1893eecb1fcc06418f5033ca77b7961135ceac835e65669d00908fcef5c712fba325ff52146a17ad90df6533b575a6cb4485dd42a5eefbd3a0d5a20fd20933b64ed09ba9f81c25ccc7ab28db13710d5cbc573bb25669430c6e9f99ed9be311eda3b694a4033d4f2c69b35179c86768bc484aadef97f8c07249af2eea8ccd5dadb0f4e60c81100046b20423f487c5fd3530bce1460a1257d3a2b4dd4f4c8c1f38ae74a1939111597a37c4632c703bbf787207b12f38b7a5529b44bf73511f7ca595f521154a18f60292dee2c7f730986aa2a66487f58f06057bbea04432d8e3ff47b852381d327b65ee83970eada210256e8cdf7c711c6b1dceed5ae257cc614e8dd666209e979c68767119ef9786f9779f1ab90d78be2f236c6aac8fe89de579705afadba53f67efc6e6ec8d65a0dac981d41726785dc4e3d56666ab71adb50049c62eb3c7d94a1ec7067b65c39ca14f364d3b213f76e52a3fd4ec2140f7e74f9b52eb96ae9918df4410df087c68a703237e27a42e71d2a881053fe9531248c3b1ea2c1d7ebb437150a56246c6f2daf3af1a73fca1b1e794d8d7ba84e22a620120177deff426af8dbc3fbb6d9ffa3d4caf99fd30606628b35888779ac905407dc6383d9a85ed08f03c2ba766ef399ef3cacfe645a5ba7866567a4d3fbc1c258cbad418ca17235ed2081a60517fcf7d14b83ce7f53db3d6fc461341e4926d864983d2a260fb6b694f4267000845dff05bdd9433f8b328d478f4a80f96d37ab34dc34235efbbf9e0d62b9ea6c8bba0cb211b0cacc0acc07240fcb6318beb7b7a0dcbc1b5188ffb15b718975571683a85bbee63cfeac93cacae300475ba3d9d98b94d9b6893fb720f947b13311489b40d29665db660a5bbdb207c3f1220165b223e1a8097d2b4798640d0e181f2fb7673281738feaae6a5ae2d48265a6ce2514477035b9fd22d67a5b28ce80d0e3e8a15e3200180f5f6073e275df4cac1c1a45283a6f276dc36dd47f527123152c3d4f0a1ce22a0ce1a20f8dbe16b86977febd12a5e97f59a56f29cd134078c7b1d2330931342ad4510be3c21d45a04e58bec33970106b1d6c1a1629d39f40c382138c7e01a616ebf7a538057d23ebbabe67a35d7835cd941e348ba11a14cba3a70c6ea4ea3ee17ede0d0b8b0517f55f56b071c6aa317127513c76a2dafa4f393898036677b3aacb570993c443f9c8c21c7631d0f843b50c72dcaa8067156a69a567c036f869dac9d906f7b55a8edf5b97d9d433fe85b346ba5cdb370c1f78ef4a64004179833d316de25cda04ab23e84e761962a92e42bdd765bbe22df37d48afaf0276a43d020cd22dbc794ceed4d124ad6eff39359b59225da98c2c98f9311b2e1a515d325482428d2346f8f7bd8aeb2915949838d7e85c7a4d353f2cccbd5533fd2d18af2f46d20f24f8018921de33bbf049b418265c7323457d0f7deaba628760c88901ca01a25d8c023835f55199eef78d3f5a003ac455fba065793c2398155b506bfe2a3202116a6b15009c6cdab7fbda273ba7501ac977376f7742996db28e120209e96749f247c73ded444376860c2c15c178b8d05ec90c0ab5b3d61101165cf13bb81bae5b162549f71575f4358c5c9627558877a064c2f69c94f4008fa5f37eb2c93b4ef3734556154f02bf05bd5117513cfff71f52bf8f91ceb6007ad64eccac0aa0dd5f5b32f72dc9ac4260f3404ad87c559c5d70f2980f7b4db0ae75bce55363f80fb84591da49de6eb3f861e123d47dd347b6143632408949667287c979b2e7f6142f9a5ea45da61ceebf6c0a99a5326463c32dc76f3ee7ce0878fed0d49d20d1c6e06fd7a676e7d7ac97ff09e6f62c2790d2746009d9f73d615cc90177debbeba162ca2103b38ca2e2d6777a2f443068eeec3a9ce8fd694cba67a6096d5fdf6383c05ed8ab9230c49345dabec638a23c3f137270ba947fc034ef85283c52194f7683de8c6fd3407b339d6478ac4b3ead2ddcbe7ed10eed71ed617cf7c0119dd6f1cee6b79a19ee1e33a81772240942281682cab17f86e1fa3d6f1a03c221e34a7bcca1a218a2775319c5dd52ea1ee4635eee3e9f0891ba43d8f8366700f1236831e4078afb80da9e3d585814b537d1aee2d4bb7eb40961180f0135b7648eb9b9c5f10109ce5259c45f6329cb9259c695800ce55c2b2ff712efffc17d6ff38ac9bff2707b6bbb0e43b5f06762001fccdffd877bcb96953b076bc02fcfd6bffcbeafcfd0c4376eb0b7b582772ac3fbefbe7c7d8770e073b40bee56093ff2d8e63ff173b4bd843e81454d167ac11f10953f5d961bff54b72b7671344be08a02dc0ae59ed42a6fe9a14dbd74536ab88c8bc78817b33166f32680f2e18a92f703d9eda61af76b3e790c9497bbc00232c2e512b23e80500b4012af3b260a67a4b449fe6d3854055c3203678e78c7f1fd8c3f186a624aa4557b036915265801f47b27c18ff3261efcadc62e453bad3a2717b37cdd560f9e6f520357a09a5ee56582250d525166a3dd134fd883a1096e1dddf0716551f59306565921294f69f671d74b17f5249466612f8fec12b3903a6528fcb9aa550cbd07e539ef420ce35616af87be2fef417302faee8369491cebab6e8770a45c7b3d681e601478ec79f247fd4076ac84d52f51effdcab6079e329f7da9bb01f05b30e78ea051d3dc54fdd9f08fa2996424da813041eaaebd4db1f7693cabd3b3eee27935427b30493dc635a475e4c9872dfa58dd2949ad700f82292a5381176851106efba725dc274ea47fdcb20773aa042dd3f53f5e05e80f5aeac3bfdb24bb6a72cfd8f824000f5afb859e8b65d2d411f68ad71c0e76a378562d76a59d6c7f96e33badba9148f6c83929f130c07cfcbd309ec5b2ef6f09cfe996eee09fb3d1dc781c0c3c44146f9875c0803e0a3ab588cd829b4affbf8e5e0a4c2b88b598627bed4234f74e782475bad2896c4752e569fa866ebab387df02d91c8a5b75544a9fed42b55910f2e9400d8514bd8e1feb0e8add32cadc37b9c666173fffd342bf986c4cbf6c2eeab7152287e1b1c89a304d1e9edfbeb2fe469d63fbd79f80f0394438ec51d89dcc09891006d3560f5ff4092e9bf29c9f2ff266380e5ff55c6a044e197e13f701a1a9de2eb65657db1037d3acd58f3cc4459e786c8e3055eff8b3a3c94ecc7e76818c0231d1a53ba6322bc791caf9ba84ee37e99eb24afdf68f08b927d15e98bd233f3fd577e53fef05ff94d0da2b4a28aaa4ecd9cacea67aeb6222974f30b74ff53f94d30d87eacce8efca6d7be391ccb7c8b383521a32b1f75b51b002c1306383e0e361e012e00c3fabdc5625ff94d81df89315adcc0ef6d7ba708fe811fb98971290d1c07315a2b48fce4283946fca206c6f985c207e134e4ec07ff879b98f184f752cfc704bdd0be2fd71f5ade2828b073087e1e83252a62f15059e547c0693b95323166fb1c144782f493e12561dee994d3641a3e82cbc722efa5b4deffa4f5be70a194f178344d3dc9c1e82f32d14b53afe88bce9debff21f9b2fdcbd59c7e23f51838778472de8351e7d0a65a871e66fa40514f843ece411e3e868f94355e50e536d8b2e8abd58f326fe659691d25cee1a8dbb899bd8cc73739aa9a784ea0227020da8e72099956e26a37cef23d88cef98a6255f86557efc964029977fcf2f023da343592b32f48ee6253c8ac89c2739f5874d7327214378b33885531524890bcef5c4b1027920d78615a1eccb0be701547273fac0d3b78c8b7bfb94560c65ee163d3330771b0ee6b0ae171ced232e79831a7c40f0ba2b45c2c1cd8a5e2dc4cf6b2178ba6461c4197e3914d84c7920647b910ed96368b0fc42d4f7147371fb4f573b366217bf6b868abb24c77abb24cfdeaee9565b8eb9aca04ff1d9565f318d09bddd81b4d51764d4f02d2114580fd22cd089b07141c64b49689ba8736188b5e552aa12a46ea5a401fc3db74ea8ea0307d2fa7f92761d6f32538599ec6ac099381046fbcddb26df98a2259a7477439012cb2252ce200b84edae6b093d079a278beb21b1b492009de9f5f5479cb792cd1e522c7656419ec6e4fdcdb3df35eff847ff7a1fddfc9b18524c7c330bf83edbbfd094a2a7ec521c06b3af360505a16a3a51237eb73c1c85eb9e0dec7ea8c0cb4aa5add94db7f3220e341dd2d4c635d7d1d4c5ce553a153dbdd87718cc441756a176a8d477eda34a2e68547576f950ab40bdfc77e3ac33af70cfff5b9bee604905b26504603517b2f5c82f0e0b71949f4c9c08e93cd82defa27ec7894c9aa47a901a0109d1f0053cede2aaaf09745b9c8c812c105423b6edb909fd7629b39724122300659aa401760c2fcbf3920a60400f8379805a939c000625c952c06485311a082948695f4f7c85c86e3c3b2868f5d2f181c94fb482a57d4f9967448dcdbfc241a1438e5725dc6a023fde2a4b9e639c020f3210d73a11751f751c9b047c71c6b59d2ffca9326ffcb8f3021a7e7ae8e7b4768b351f5bea841425352b36cfc3fe647ec2b7ad9e1477c555c7edd5a7fce70be5db2d1e3a4af1c807dc5181b0b868f838b874df09b41e7befc08fe1ee11398f15918231ffe5e6a1a8cf8be79997f14dfaf82d1f3e51fa8c6b826f00f5562d43e28fc1fe609dfac7d58b5d859eb660256dbd52e412b257ae5c4a396831e776e0ad6be7e3de73927fb5c3fb7fe59669278655f3dde634aa165c39b8b0e2742ab471e4d509e7f61623d62e1e05a8a42507ba5bc311dd40ef466209588b926a2509ec681db73d5b6c1b07e70489faceb45d9f560fa51da55de9441017f9851f79992b08285c7eeb52150fc71892e475be935b7ac7780b0d35a976e9c22f1c06393d0228c3fd628243ce6d2c0d7feeef2e95bbad63473f28732e2610703b34f6b1d150acc264ffe1ee75428d42a7aa23c2a879e97c17bd8ddfc947e3943337d7fc0d929a23ce6f1a09736d7db390ded2a834ae698f87c96bdbbae1c3eef4c3bc6154fb4f15aed2c659fb3da6d073b04b87e965530a18da6dfb4fe6d531f275f904a5270d78cd0fd707cb8c15ca5675b2b889b19ab2dee96ab841bd076ec86d989b49067063dd5061401a6849651b7b2b9d2fe951970e157330344f54f5cd350656398d3180093d48a576419615079ef7b0361ce95c9b318cc097c60c03bdd7fef44ec3f3303c4c1427243fd8226e08cd0f553822678599ca77a7ca70d7ee05dc4bf164554f3b9f00b48f3bdf03d15b55150c9985e5d08ef277d45a57557cd1096655d61ede74f533fad6c9eb56f968efb67b2ee75d6fef73056883ed7a445e70c188b4b75b465563cee528e7d30a6ee62ad7ab18b83a1e75cdac7dd8c2917c4bb1eddfc61e9dc781d6d54fbee6298f483385ce4449b1f284777ed855b59d63afdabb2716b78a30a999660e6fc8f8d4c4f5a2c96a7914b12ffbacee1c7ffe9eb1c8c1347f05950389110f418c16280749fdb687f080727990dfa848e574983bdee71fb83b12d090b1c7d213e4ce107adc6620f3296f88052246c35dd78c10ffd05d6dc8191d22ee3f2d5b460ffce139278b1d9579cc3d400600c3de2d7b395923c49bf8fa2aadf5ef6a09268483a78abcf5db37c2f0e065ccf49496cc71b96ad6d7a851f79afa145745c0187897eec4d82590b4f47fc2c28f836785eecb3e217c38c52819bd71a651a6df5eb56a372f8de766470302539e700b0c8255898dfd3ad5c8e9743a854cab8b8181c3e860722baf34cf3b4641faded9c9065306efa8cc37b8b3b99a0b1cc38fcf19e7872d7ccf5bacf4310dddeb15456b19fed90eebb7adee6d44793171acf83c9faadda30115b0c900f427c7fc77cb01d79f85a5457bcb27ac17fb588d32df53483c60e75ff8dfc4f983878d7f084a118bbff31404f7cbd742d9df6d365877837befe0d40fd340efb158404e8b9804c9b1a11e3d5e2695168994aa439249a19707fe900d72253f377bcdbcbb57faafba5825f56f7a352ac77f97222493e457cab74a0bd90daea74122a86ff5d75e714edd7694ebc0a410d01ff0e7547806d6431519fba7b57e1619fef89b5dabe831bdf656af5ba97503cccfa99694af320c82667efd4d5e6ff35484944a342a2fc71349abb3935f8b2f7a07d1fefb9cf99119b25b9017086b9cd014f4a40a2388df194dee01e4aea1fd1f7e07fdb7afc5ac1460c3240769d401c3cdc75d3722cbdcfa044f065ce86a3fe499f8a8eec952f9271c54f66c4bf5b13c8835473ecce7e0fd314857474d5488e22c72797911e852ea2e717414e6bee63cff20158d4122cdc1f3b702ba65f70dd53dfe6e9acbfeede691819f1b46597218463c589cd7a1362f476e85b217188146c38cde75d1e5739d3ed367bda3c594e4cc41603e47310dfdf213ec7c3adb0f41b9fceba2e262ff43f19d68acb60dc71caf33b3bd1e2a0ce8f8a6ccd8286a93bc4579512e77d66db2cd2d6047cbbecacfc35bd108d5c8920ee459b83ed42653c4c5fd9c6c42c2566e90ffb3e7be8eb9921d6d47f3fd68c2c66b3461ab9e90a68e3a33ad98ff5ac0d95a79ee6180bf5092bbc9f52524818827f166c11390e004804882c6b596df4b9c57056e7b25ba48982e1f944c4c589b1fadab6139fda89f893be82b21c4251d85106f514041cde2f526f2d8597b5f39b99057c6b6b0fa192bba192bce979d06f36d78e83da6d4c76cbf2db4544a033123f9e2a759f276552a5b3f0a718e3ce160d39145fb3fc450978677399e3118d7d3ea827063fd64bddd2cdc67372ccfbf4c21dd2b1d8918b294632bc1d9c554a0453af00f20f4be4f5fe5888ad8d109f41d46e89adc83272cb806619285352b99fb986ab884a61fe3cd465196410611ed98eeddcddf27cf7a25c6af89af176ef34827f015481f5afa467ed06ff7439dcdef34b51e583e8ddc9fe35f67cc7b005921b59dfbbe72f29cfb7760a65edfba2aeeda0e6c69df5402f3de29a0a175d5f956e792c0db7e2767c35dfcbe069a119996836538fc2ef39b4ba3792a3317f114a7c897774104a3e76ab62fb15fc2eb0c356ffbaad24caf97b051d541f7ea58d9fd101b8bacd7e2be8f699350a75084d00a543fbac9083a810fbc50a39a8f9fbf757c861411de243e1f79c9f9fb4a11000d5fe2f6fb6b3e859393859ba3a395a4110fe7bf8875c0376cc4fc691f662ca8e7365abb7de1c001b388c44b9966af7d9fe3f9d64b24ffdc181d2cffdeacf6f1f846c0194fe40253541e1b12bf75981b7cff67f597f18e4adacdc6d9c3cad2e796ffdb01ffee1ea368b10ed431d55ecb00fcf283939393923c3ef9e8a0ff3009dd5f5ec676b20be0fb1be6041c91f940f0825dfbd57b4bcce067cfc32cd6114cd4726982e3456f1e1d1b6af8643d043c13ef51f261b7adbcd4bab434f20e4d520e52403561289a4b2c236fea0b27ea0dadfdf2545fbbfe17187ff01653fa0f6977e23defda7edf33e2b5cf79df6bbdf0a5aa8f9f925ffe8976f90d8a542f6ea33d2925c599b23a7022abc5cde8eb7f30cbe69de83b4fd91c7f20d8b01d2df2ebc8480ffbfaf4bd977fb081067b290b935b871bc2e365cd5de989d233bcbe7ccddaffaaa0c37b5bf2a9eeba705b5d1b4496e66aba9442f73cee9bdc22df3d2f69e97bad8c4b068792f9940e7c4e53f2f4784ff672e4714609ee7ac5f730f0dd5294da156c16a9909d699b338691fd18264cbc529cebf045af0b83e706c7a4255b3eca0c461a8605ce4ef2d3de8c1ea2e6dc7b736705e4301009cd08efe3f78b7b60a55a651c5c14d1951da0abe065ffb8f0f0d893c6c3ca7dc17a276e853e2e25227801407bd603586c24f5883d28a569f25cf4a91e4cd25dbb5136b2c04da9335dc573e7d12bc7c81ad6282e2f5a16f65962ade3f08b1ab633db024b22ce0a9d86b89734ed3f1009087cef17bb05584aafab3c3438c6fc047647f202c6e45f7f2b445cc1d456293624c33c99861488c000df86e46f7f3937fa5ba8e57237c2ebcc382f9473cb11f9b2436de71225a45e58be001bb79d603626dce1a2b320f5129acf6be252c61fcab6c489962369d75a50c230078887ea0b159f409ab34401900dc091cedda843d9d198e992461a69568eaaf37f018d7542201a05461c8d2ac1042c0c4b73f740b2a7f0c36a935bad5c55e03d378ddfd7654b70501b6dc591b6ca5e9f4be7fc13246c967fa3ca511bfbb6dec754593da97a31b3aad69205ccd2a743a426235edfd3786f9681151e265a5b6f569e1685f112dd9c94b13545b12880ddb924007695484d3c1d9993b35be6471e1092d1eec6d1eac356dbb0c31eb5b7c243939e72b9ac3a0ad2d998e62b3e2a99bd012183215dd7ff36a7e5bf6c7404d7bc382797dd1bede330f6567c71d3d1b3f3d973202bde8f2df71ad7d3e5b36c91f6089a01dbd7eabdd5e8b80ce5ff2b67d637dfc922000ffb004aff7c70ad9e497e840286ab7e2686419dc32edc962de768677abb5de8ea7425474a6718e57783acee0d49a4b7066fa588cff0a7e3795dc8edf6d5c21e6ffbf1da0e2cffd7a0fffe525087b03d32bc78b1a187c7fa6e23ce3f6e9d7181375fe13800007e7eaf12307af4b5173ac8707315e15e6f7e419e8d0e42a91afaff64f56b656050951641b233db4b8f664f2da0f2253d4a8066f21c4ce2a6b4b64a4977fb42782ffebee0c5ec8bb33a20b2a9bfafa5bac6b59cbe11bda4ec9e823511a55cc5732c996ebcd65559eaf80a7bd2e5716d8f9e12c7bf0e5b58fd43ec9c0bddc5c9725c4784433d5c271c987f5cfc5d66ccbd45174fdaca93b74cc9e42ad3ca77be3d08d80d1d759594734fb7aa04d9d9b0495bdaf91bab943bd34c3c7eeb3eb7265be4dada643253d17cf4e58f049db83221d702e0bc72b645395b131d2c627af2604f31fe1496b7c948bd888c855d666d9ba2c02e6bfb9f6dd27fbd9b5ef770c330254afe40bb91f7561fcba973127c353d5c9ebc6beadcfe4e8eb93cfc06469524cc640594e06a2f108c716d12f24f962773aef2cd3bee1de10196494c08aedf70c165a05804b68077f22adadc10d0651cbdac9c152ee2b556f023e3b78a2d351a892a32a3760e46d22972a0124021c496fe70ca564f4e6ccc65e929c9bcd47a5a69ecfd3830f53e9ccda74ff889e0239e89e96b3cbb4c89fd5f61c11bb631b51d88fe71d7482f7c1012f47e6a7aa550800084387f8ad6db6872f7e0df5a0277686bdbbf6b8d59a45c7e7718490499da93ff2eedbb1d1f1dd65178b95a1b7f6d92359001007596203c6928c6f0fe2052811f71eaa1488923dfb3c496c96e1e96497ce8be04a72d09ade84a48f452fec2859eebc86ab327789e3b100b5db8f34b48bc2b0d81c8535360fd1f47ef15a8fdf71e210208a97d5678acfd212f729ad108514a1684a6360d9a11cad9bb5b9c844db3940193c372bf59ea46af901dd35babb96b72def04359a456a3190b797cb9deebcf01ee50dc01b97e00d017829cd9b9e8a3c6c61d7eb29fe58437984af40d958c7ed0fce8cf1ce97b1620ac2631ebba4470d3d2217c30fc0484d69811f3cc630fcf293a56ffc49d9571d8e5e5ac3218da6a1583aea5216edb324b8d75f41e121f88388d0b0dcb73fed565dba85a9e5011cd398686ddf49c1a5d795ee1bc12cf3137a78ca1400a75feef33e729a7e12bf0f809b9f3a628af1a25a5c38cf9e278f5b40f4f1dfccd4dfa017e3cda8b8d8144d98e9a14e66213775a8c16cb56443f62b72cb4fe553497d70625f721fd08322da0b1060ef9daf8f8fe0dc7922bd5e5f54465249271115b346e5f0a6185edbedcac0f1cd00d409192b9e5a0a9ee1b5710682eb57727ed8249659298c565e33b9463898d9c10360152c61e5726dfde199291065f358d1e0e88aeb3dd2f7f341bd83ef5e045bad9e42966129180dc23a31b16231c00cf52749f6f127577e861ef28ed1412dae273ddb7f80dab4fa8d43274c352100c63ee24ed3e9d51bb462a43e120155a1b11f50509155dd3b0b6a17fe8897f313bf2e45101a3b4d32e3c769df3c7b96db19530308f03b03bd84eefd6b64ca7dd24a0b1ed80c296cc2c5de2ad2853527aab3a6a44c1740be843ad998c9aab43efd212101a3cc37c05537518d436f9805620839441abf5ed88ce9b75238601f9a50eaa3e9b111e6a159829f6cebaab55daf5c91136c41962af43f7f0875ffdbde76101ee920f6ec3bbd38e8ebae6b292c94ba2c7df50ee985a65a59bcb6f2d8e9d195be760df87161b5ce52d0d77f9d623da8c7251b37b7b7857dca439f4c6c39eda497aa01dced508cc6370b0036be041b61d8d2ad852f7b25470562488e7a7b7dca5ce7900b1aa35915efbb0625773b368b8b9e4b1a643fbe1380903d76aae5a5a4cb0ae1438c66cf62807c09e2fb3be4fa9f488efa15fadfb80e10260ea25716aacdb1bdc3f20428ebdf1b9c61968c3fda49acd00bbfd4e4f603611b2d040a2add53644ac399196e3709564cfb8af2bd60fa42773c0e572941b2e9ebeb985e00a6ba045356dd9c6eb23836d46ed799214b07b3151c7654b6f91ea6cae37817e823392c0f936d72962c60f2acd88bcd7f256f6104cdc23d3311f1468896fbd0add618e9551f62b82d1e5bbae466d88ecab550fd9b562d33c164391f4b99692eca5260bf32481307f9026076cac7878ad7bfc57fce4f7f462aab94784895f1e909ddf1439f556d992e803a52dee76f73e7397ea5e69e289666683ac55cf7fd0515051b4c2c71f6e32c3edbff170000ffff2b8f1de7", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6dfc34609a05bc22319fa4cce1d1e2929548c0d7", - "to": "0xaedf386b755465871ff874e3e37af5976e247064", - "value": "0x0", - "gas": "0x13220", - "gasUsed": "0x74ef", - "input": "0xa9059cbb000000000000000000000000d79367527ef941bb7f4fae3cb943ef72dfbaf07f0000000000000000000000000000000000000000000000031708ae0045440000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x690b9a9e9aa1c9db991c7721a92d351db4fac990", - "to": "0x388c818ca8b9251b393131c08a736a67ccb19297", - "value": "0x16be3ca23fceca3", - "gas": "0x1964", - "gasUsed": "0x457", - "input": "0x", - "output": "0x" - } - } - ] - ``` - - -# Use Cases - -Here's a potential use case for `traceBlock`: - -* **Analyzing Network Performance**: The `traceBlock` method can be used to analyze the performance of the EVM networks by tracing the execution of all transactions within a specific block and evaluating gas usage and other metrics. - -# Related Methods - -Here are the methods related to `traceBlock`: - -* [`traceCall`](/reference/sdk-tracecall): Runs an `eth_call` with the context of the provided block execution using the final state of the parent block as the base. - -* [`traceTransaction`](/reference/sdk-tracetransaction): Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-debug-methods/tracecall-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-debug-methods/tracecall-sdk-v3.mdx deleted file mode 100644 index 87e7f2f2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-debug-methods/tracecall-sdk-v3.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: traceCall - SDK -description: Runs an eth_call with the context of the provided block execution using the final state of the parent block as the base. -subtitle: Runs an eth_call with the context of the provided block execution using the final state of the parent block as the base. -url: https://docs.alchemy.com/reference/tracecall-sdk-v3 -slug: reference/tracecall-sdk-v3 ---- - -Runs an `eth_call` with the context of the provided block execution using the final state of the parent block as the base. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`traceCall`runs an [`eth_call`](/reference/eth-call) with the context of the provided block execution using the final state of the parent block as the base. - -# Parameters - -| Name | Type | Description | Example | -| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `transaction` | `object` | The transaction to debug trace. This is an object with the following optional properties: 1. `to?`: The address the transaction is directed to. 2. `from?`: The address the transaction is sent from. 3. `gas?`: The gas provided for the transaction execution, as a hex string. 4. `gasPrice?`: The gas price to use as a hex string. 5. `value?`: The value associated with the transaction as a hex string. 6. `data?`: The data associated with the transaction. | `{ "from": "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "value": "0x0", "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}` | -| `blockIdentifier` | `object` | The block to debug the transaction in. Can be a block hash, block number hex string, or a commitment level. There are the following commitment levels: 1. `pending`: Sample next block inferred by Alchemy built on top of the latest block. 2. `latest`: The most recent block in the canonical chain observed by Alchemy. 3. `safe`: The most recent crypto-economically secure block that cannot be re-orged outside of manual intervention driven by community coordination. This is only available on Goerli testent. 4. `finalized`: The most recent secure block that has been accepted by >2/3 of validators. This block is very unlikely to be re-orged. This is only available on Goerli testnet. 5. `earliest`: The lowest numbered block available that is usually the first block created. | `0x5568A`, `latest`, `0x04e19fc95ec33e65c667d26a69d66d024732891c13742a345f5001ff900bd60a `etc. | -| `tracer` | `object` | Tracer type and configuration. This tracer tracks all call frames executed during a transaction, including depth 0. The returned result is a nested list of call frames executed as part of the call. It is an object with the following options: 1. `type`: The type of tracer to use during the execution. The options are [`callTracer`](/reference/debug-tracecall#calltracer) and [`prestateTracer`](/reference/debug-tracecall#prestatetracer) 2. `onlyTopCall?`: Whether to only trace the main (top-level) calls and ignore sub-calls. It is a boolean and defaults to `false`. | `{ type: callTracer, onlyTopCall: true }` | - -# Response - -The `traceCall` method returns a `Promise`response object with the following properties. - -| Property | Type | Description | -| --------------- | ------------------------------------------- | ------------------------------------------------------------ | -| `type` | `string` | The type of call: `CALL` or `CREATE` for the top-level call. | -| `from` | `string` | From address of the transaction. | -| `to` | `string` | To address of the transaction. | -| `value` | `string` | Amount of value transfer as a hex string. | -| `gas` | `string` | Gas provided for call as a hex string. | -| `gasUsed` | `string` | Gas used during the call as a hex string. | -| `input` | `string` | Call data. | -| `output` | `string` | Return data. | -| `errror?` | `string` | Optional error field. | -| `revertReason?` | `string` | Solidity revert reason, if the call reverted. | -| `calls?` | `array of response object` | Array of sub-calls executed as part of the original call. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```text yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `traceCall` request using the Alchemy SDK: - - - ```javascript traceCall response - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the traceCall method - const main = async () => { - // The transaction to debug trace. - let transaction = { - from: "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638", - to: "0x6b175474e89094c44da98b954eedeac495271d0f", - value: "0x0", - data: "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE", - }; - - // The block to debug the transaction in. - let block = "latest"; - - // Tracer type and configuration. - let tracerConfig = { - type: "callTracer", - onlyTopCall: true, - }; - - // Calling the traceCall method - let response = await alchemy.debug.traceCall( - transaction, - block, - tracerConfig - ); - - // Logging the response to the console - console.log(response); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json sendTransaction Response - { - "from": "0x6f1fb6efdf50f34bfa3f2bc0e5576edd71631638", - "gas": "0x7fffffffffffffff", - "gasUsed": "0x5de2", - "to": "0x6b175474e89094c44da98b954eedeac495271d0f", - "input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be", - "output": "0x0000000000000000000000000000000000000000000000000858898f93629000", - "value": "0x0", - "type": "CALL" - } - ``` - - -# Use Cases - -Some of the use cases for `traceCall` are: - -* **Debugging Contract Issues**: Developers can use the `traceCall` method to diagnose and fix issues with smart contract execution by tracing the flow of execution and the state changes made by the contract. - -* **Optimizing Contract Performance**: Developers can use the `traceCall` method to identify and optimize slow or inefficient sections of code by tracing the execution and gas consumption of smart contract calls. - -* **Verifying Contract Security**: Security auditors can use the `traceCall` method to verify the security of smart contracts by tracing the execution of malicious inputs and evaluating the contract's response. - -* **Improving Contract User Experience**: Developers can use the `traceCall` method to improve the user experience of smart contract interactions by tracing the execution of user inputs and evaluating the contract's response. - -# Related Methods - -Here are the methods related to `traceCall`: - -* [`traceTransaction`](/reference/sdk-tracetransaction): Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. -* [`traceBlock`](/reference/sdk-traceblock): Replays a block that has already been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-debug-methods/tracetransaction-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-debug-methods/tracetransaction-sdk-v3.mdx deleted file mode 100644 index df059db0..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-debug-methods/tracetransaction-sdk-v3.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: traceTransaction - SDK -description: Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. -subtitle: Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. -url: https://docs.alchemy.com/reference/tracetransaction-sdk-v3 -slug: reference/tracetransaction-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`traceTransaction`attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. - -# Parameters - -| Name | Type | Description | Example | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `transactionHash` | `string` | The transaction hash of the transaction to trace. | `0x60e07437b027f8b64b409137f75e527583f1139741d311c6969d4efc879d94b8` | -| `tracer` | `object` | Tracer type and configuration. This tracer tracks all call frames executed during a transaction, including depth 0. The returned result is a nested list of call frames executed as part of the call. It is an object with the following options: 1. `type`: The type of tracer to use during the execution. The options are [`callTracer`](/reference/debug-tracecall#calltracer) and [`prestateTracer`](/reference/debug-tracecall#prestatetracer) 2. `onlyTopCall?`: Whether to only trace the main (top-level) calls and ignore sub-calls. It is a boolean and defaults to `false`. | `{ type: callTracer, onlyTopCall: true }` | -| `timeout?` | `string` | A optional duration string of decimal numbers that overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Max timeout is "10s". Valid time units are "ns", "us", "ms", "s" each with optional fraction, such as "300ms" or "2s45ms" | `"10s"`, `"300ms"` etc. | - -# Response - -The `traceTransaction` method returns a `Promise`response object with the following properties. - -| Property | Type | Description | -| --------------- | ------------------------------------------- | ------------------------------------------------------------ | -| `type` | `string` | The type of call: `CALL` or `CREATE` for the top-level call. | -| `from` | `string` | From address of the transaction. | -| `to` | `string` | To address of the transaction. | -| `value` | `string` | Amount of value transfer as a hex string. | -| `gas` | `string` | Gas provided for call as a hex string. | -| `gasUsed` | `string` | Gas used during the call as a hex string. | -| `input` | `string` | Call data. | -| `output` | `string` | Return data. | -| `errror?` | `string` | Optional error field. | -| `revertReason?` | `string` | Solidity revert reason, if the call reverted. | -| `calls?` | `array of response object` | Array of sub-calls executed as part of the original call. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```text yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `traceTransaction` request using the Alchemy SDK: - - - ```javascript getTransaction.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the traceTransaction method - const main = async () => { - // The transaction hash of the transaction to trace. - let txHash = - "0x45c1b4c9685a0a9312e698ad273802c20f0354a2248f3f20bbd3623ef32f9523"; - - // Tracer type and configuration. - let tracerConfig = { - type: "callTracer", - onlyTopCall: true, - }; - - let timeout = "10s"; - - // Calling the traceTransaction method - let response = await alchemy.debug.traceTransaction( - txHash, - tracerConfig, - timeout - ); - - // Logging the response to the console - console.log(response); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json traceTransaction response - { - type: 'CALL', - from: '0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8', - to: '0xdac17f958d2ee523a2206206994597c13d831ec7', - value: '0x0', - gas: '0x11def', - gasUsed: '0xa281', - input: '0xa9059cbb0000000000000000000000006a3623db71c1b3442a94e3fd4655334b4811469300000000000000000000000000000000000000000000000000000000000f4240', - output: '0x' - } - ``` - - -# Use Cases - -Some of the use cases for `traceCall` are: - -* **Debugging Contract Issues**: Developers can use the `traceTransaction` method to diagnose and fix issues with smart contract execution by tracing the flow of execution and the state changes made by the contract in response to a specific transaction. - -* **Optimizing Contract Performance**: Developers can use the `traceTransaction` method to identify and optimize slow or inefficient sections of code by tracing the execution and gas consumption of a specific transaction. - -* **Verifying Contract Security**: Security auditors can use the `traceTransaction` method to verify the security of smart contracts by tracing the execution of malicious transactions and evaluating the contract's response. - -# Related Methods - -Here are the methods related to `traceTransaction`: - -* [`traceCall`](/reference/sdk-tracecall): Runs an `eth_call` with the context of the provided block execution using the final state of the parent block as the base. - -* [`traceBlock`](/reference/sdk-traceblock): Replays a block that has already been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/arrayify.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/arrayify.mdx deleted file mode 100644 index 99c4cfe2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/arrayify.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: arrayify -description: Learn about the arrayify utils method -subtitle: Learn about the arrayify utils method -url: https://docs.alchemy.com/reference/arrayify -slug: reference/arrayify ---- - -Learn about the `arrayify` utils method - -# Introduction - -The [`arrayify`](https://docs.ethers.org/v5/api/utils/bytes/#utils-arrayify) method is used to convert a hex string into a byte array. This method is often used to ensure that input values are formatted correctly for various EVM operations. - -# Usage - -This method should be used when a hex string is expected to be an array of bytes. For example, if an EVM contract function is expecting a byte array for a parameter, this method can be used to convert the hex string into the correct format. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = "0x68656c6c6f20776f726c64"; - let byteArray = Utils.arrayify(hexString); - console.log(byteArray); // [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100] - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/concat.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/concat.mdx deleted file mode 100644 index ca000718..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/concat.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: concat -description: Learn about the concat utils method -subtitle: Learn about the concat utils method -url: https://docs.alchemy.com/reference/concat -slug: reference/concat ---- - -Learn about the `concat` utils method - -# Introduction - -The [`concat`](https://docs.ethers.org/v5/api/utils/bytes/#utils-concat) method is used to concatenate multiple hex strings into a single `Uint8Array`. The input hex strings are passed as an array of strings. - -# Usage - -This method can be used to combine multiple hex strings into a single `Uint8Array`. Here's an example of how to use it: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString1 = "0xabcd"; - let hexString2 = "0xef01"; - - let concatenatedHex = Utils.concat([hexString1, hexString2]); - console.log(concatenatedHex); // Uint8Array(4) [ 171, 205, 239, 1 ] - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/dnsencode.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/dnsencode.mdx deleted file mode 100644 index a62567e3..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/dnsencode.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: dnsEncode -description: Learn about the dnsEncode utils method -subtitle: Learn about the dnsEncode utils method -url: https://docs.alchemy.com/reference/dnsencode -slug: reference/dnsencode ---- - -Learn about the `dnsEncode` utils method - -# Introduction - -The `dnsEncode` method is used to encode a string for use in a domain name. It replaces characters not supported in domain names with their hexadecimal representation preceded by `x`. - -# Usage - -The dnsEncode method can be used when encoding strings to be used in a domain name. Here's an example of how you can use it: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let string = "sahilaujla"; - let encodedString = Utils.dnsEncode(string); - console.log(encodedString); // 0x0a736168696c61756a6c6100 - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/formatether.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/formatether.mdx deleted file mode 100644 index c90330fd..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/formatether.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: formatEther -description: Learn about the formatEther utils method -subtitle: Learn about the formatEther utils method -url: https://docs.alchemy.com/reference/formatether -slug: reference/formatether ---- - -Learn about the `formatEther` utils method - -# Introduction - -The [`formatEther`](https://docs.ethers.org/v5/api/utils/display-logic/#utils-formatEther) method is used to format a value in wei to a more human-readable string representation in ether. - -# Usage - -The `formatEther` method can be used to format a value in Wei to Ether. This can be useful when working with Ether amounts in your code. Here's an example of how you can use it: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let weiValue = "1000000000000000000"; - let formattedEther = Utils.formatEther(weiValue); - console.log(formattedEther); // '1.0 ETH' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/formatunits.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/formatunits.mdx deleted file mode 100644 index 20bfd4b6..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/formatunits.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: formatUnits -description: Learn about the formatUnits utils method -subtitle: Learn about the formatUnits utils method -url: https://docs.alchemy.com/reference/formatunits -slug: reference/formatunits ---- - -Learn about the `formatUnits` utils method - -# Introduction - -The [`formatUnits`](https://docs.ethers.org/v5/api/utils/display-logic/#utils-formatUnits) method is used to convert a value in `wei` to a more human-readable representation. This method is particularly useful for working with EVM values as the `wei` denomination is often not easily readable for users. - -# Usage - -This method should be used when converting values from `wei` to more human-readable denominations. For example, converting from `wei` to `ether`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let weiValue = "1000000000000000000"; - let formattedWei = Utils.formatUnits(weiValue, "ether"); - console.log(formattedWei); // '1.0 ETH' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hashmessage.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hashmessage.mdx deleted file mode 100644 index 6c0a2131..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hashmessage.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: hashMessage -description: Learn about the hashMessage utils method -subtitle: Learn about the hashMessage utils method -url: https://docs.alchemy.com/reference/hashmessage -slug: reference/hashmessage ---- - -Learn about the `hashMessage` utils method - -# Introduction - -The [`hashMessage`](https://docs.ethers.org/v5/api/utils/hashing/#utils-hashMessage) method provides the ability to hash a message using the Keccak-256 hash function. This method takes a message input and returns the hashed value of the message in hexadecimal format. - -# Usage - -This method is useful for creating unique signatures for a given message and verifying the authenticity of the messages. The message can be any string or byte string, and the hashed result is always fixed for a given message. - -Here is an example of using the `hashMessage` method in Alchemy SDK: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let message = 'Hello, world!'; - - let hashedMessage = Utils.hashMessage(message); - console.log(hashedMessage); // 0xb453bd4e271eed985cbab8231da609c4ce0a9cf1f763b6c1594e76315510e0f1 - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexconcat.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexconcat.mdx deleted file mode 100644 index 1dc7a2b7..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexconcat.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: hexConcat -description: Learn about the hexConcat utils method -subtitle: Learn about the hexConcat utils method -url: https://docs.alchemy.com/reference/hexconcat -slug: reference/hexconcat ---- - -Learn about the `hexConcat` utils method - -# Introduction - -The [`hexConcat`](https://docs.ethers.org/v5/api/utils/bytes/#utils-hexConcat) method is used to concatenate multiple hex strings into a single hex string. This method is often used to join together several hex values into a single string for EVM operations. - -# Usage - -This method should be used when concatenating multiple hex strings into a single string. For example, if you have two hex strings `'0xabcd'` and `'0xef01'`, you can use this method to join them into a single string `'0xabcdef01'`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString1 = "0xabcd"; - let hexString2 = "0xef01"; - - let concatenatedHex = Utils.hexConcat([hexString1, hexString2]); - console.log(concatenatedHex); // 0xabcdef01 - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexdatalength.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexdatalength.mdx deleted file mode 100644 index 45e281d1..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexdatalength.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: hexDataLength -description: Learn about the hexDataLength utils method -subtitle: Learn about the hexDataLength utils method -url: https://docs.alchemy.com/reference/hexdatalength -slug: reference/hexdatalength ---- - -Learn about the `hexDataLength` utils method - -# Introduction - -The [`hexDataLength`](https://docs.ethers.org/v4/api-utils.html) method is used to determine the length of a hex string in bytes. This method is often used to ensure that hex strings are the correct length for EVM operations. - -# Usage - -This method should be used when determining the length of a hex string in bytes. For example, you can use this method to determine that a hex string `'0x68656c6c6f20776f726c64'` has a length of 11 bytes. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = "0x68656c6c6f20776f726c64"; - let hexLength = Utils.hexDataLength(hexString); - console.log(hexLength); // 11 - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexdataslice.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexdataslice.mdx deleted file mode 100644 index c4a1bdca..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexdataslice.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: hexDataSlice -description: Learn about the hexDataSlice utils method -subtitle: Learn about the hexDataSlice utils method -url: https://docs.alchemy.com/reference/hexdataslice -slug: reference/hexdataslice ---- - -Learn about the `hexDataSlice` utils method - -# Introduction - -The [`hexDataSlice`](https://docs.ethers.org/v5/api/utils/bytes/#utils-hexDataSlice) method is used to extract a portion of a hex string. This method is often used to extract specific values from hex strings for EVM operations. - -# Usage - -This method should be used when extracting a portion of a hex string. For example, you can use this method to extract a portion of the hex string `'0x68656c6c6f20776f726c64'` from position 2 with length 4. The result would be `'0x6c6c'`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = "0x68656c6c6f20776f726c64"; - let slicedHex = Utils.hexDataSlice(hexString, 2, 4); - console.log(slicedHex); // 0x6c6c - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexlify.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexlify.mdx deleted file mode 100644 index ebc5be30..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexlify.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: hexlify -description: Learn about the hexlify utils method -subtitle: Learn about the hexlify utils method -url: https://docs.alchemy.com/reference/hexlify -slug: reference/hexlify ---- - -Learn about the `hexlify` utils method - -# Introduction - -The [`hexlify`](https://docs.ethers.org/v5/api/utils/bytes/#utils-hexlify) method provides the ability to convert a given value to its hexadecimal representation. This method takes an input value and returns the hexadecimal representation of the value. - -# Usage - -This method is useful for converting values to their hexadecimal representation, which is a more compact representation and can be easily used in EVM transactions and smart contracts. The input value can be of any data type, including strings, integers, and arrays. - -Here is an example of using the `hexlify` method with the Alchemy SDK: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let value = 123; - - let hexValue = Utils.hexlify(value); - console.log(hexValue); // 0x7b (0x7b is the hex representation of 123) - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexstripzeros.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexstripzeros.mdx deleted file mode 100644 index 9c270bee..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexstripzeros.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: hexStripZeros -description: Learn about the hexStripZeros utils method -subtitle: Learn about the hexStripZeros utils method -url: https://docs.alchemy.com/reference/hexstripzeros -slug: reference/hexstripzeros ---- - -Learn about the `hexStripZeros` utils method - -# Introduction - -The [`hexStripZeros`](https://docs.ethers.org/v5/api/utils/bytes/#utils-hexStripZeros) method is used to remove leading zeros from a hex string. This method is often used to clean up hex strings for EVM operations. - -# Usage - -This method should be used when removing leading zeros from a hex string. For example, you can use this method to remove the leading zeros from the hex string `'0x0000000000000000000001'`. The result would be `'0x1'`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = "0x0000000000000000000001"; - let strippedHex = Utils.hexStripZeros(hexString); - console.log(strippedHex); // 0x1 - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexvalue.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexvalue.mdx deleted file mode 100644 index 39b87678..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexvalue.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: hexValue -description: Learn about the hexValue utils method. -subtitle: Learn about the hexValue utils method. -url: https://docs.alchemy.com/reference/hexvalue -slug: reference/hexvalue ---- - -Learn about the `hexValue` utils method. - -# Introduction - -The [`hexValue`](https://docs.ethers.org/v5/api/utils/bytes/#utils-hexValue) method is used to get the number value of a hex string, ignoring leading zeros. - -# Usage - -This method should be used when you want to get the number value of a hex string, ignoring leading zeros. For example, you can use this method to get the number value of the hex string `'0x00000000000000000000000000000000000000000000000000001234'`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = '0x00000000000000000000000000000000000000000000000000001234'; - - let value = Utils.hexValue(hexString); - console.log(value); // 0x1234 - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexzeropad.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexzeropad.mdx deleted file mode 100644 index ec98df0e..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/hexzeropad.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: hexZeroPad -description: Learn about the hexZeroPad utils method -subtitle: Learn about the hexZeroPad utils method -url: https://docs.alchemy.com/reference/hexzeropad -slug: reference/hexzeropad ---- - -Learn about the `hexZeroPad` utils method - -# Introduction - -The [`hexZeroPad`](https://docs.ethers.org/v5/api/utils/bytes/#utils-hexZeroPad) method is used to pad a hex string with leading zeros so that its length is equal to a specified number of characters. - -# Usage - -This method should be used when you want to pad a hex string with leading zeros so that its length is equal to a specified number of characters. For example, you can use this method to pad the hex string '0x1234' so that its length is equal to 8 characters (or 4 bytes). - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = '0x1234'; - - let zeroPaddedHexString = Utils.hexZeroPad(hexString, 4); // 4 bytes = 8 characters - console.log(zeroPaddedHexString); // '0x00001234' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/id.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/id.mdx deleted file mode 100644 index cdfc11fb..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/id.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: id -description: Learn about the id utils method -subtitle: Learn about the id utils method -url: https://docs.alchemy.com/reference/id -slug: reference/id ---- - -Learn about the `id` utils method - -# Introduction - -The [`id`](https://docs.ethers.org/v5/api/utils/hashing/#utils-id) method is used to generate a unique identifier for an object. - -# Usage - -This method should be used when you want to generate a unique identifier for an object. For example, you can use this method to generate a unique identifier for a contract instance. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let contractInstance = { - name: "My Contract", - address: "0x1234567890abcdef1234567890abcdef12345678", - }; - - let contractId = Utils.id(contractInstance); - console.log(contractId); // '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/interface.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/interface.mdx deleted file mode 100644 index 4a4f5f4e..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/interface.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Interface -description: Learn about the Interface utils method -subtitle: Learn about the Interface utils method -url: https://docs.alchemy.com/reference/interface -slug: reference/interface ---- - -Learn about the `Interface` utils method - -# Introduction - -The [`Interace`](https://docs.ethers.org/v5/api/utils/abi/interface/#Interface--creating) method generates a smart contract interface from a JSON ABI. - -# Usage - -The interface method is useful when you want to create an instance of a smart contract and call its methods. - -Here's an example code: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let abi = [ - { - constant: true, - inputs: [], - name: "get", - outputs: [ - { - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - ]; - - let contractInterface = new Utils.Interface(abi); - console.log(contractInterface); - - /* - Output: - - Interface { - fragments: [ - FunctionFragment { - type: 'function', - name: 'get', - constant: true, - inputs: [], - outputs: [Array], - payable: false, - stateMutability: 'view', - gas: null, - _isFragment: true - } - ], - _abiCoder: AbiCoder { coerceFunc: null }, - functions: { - 'get()': FunctionFragment { - type: 'function', - name: 'get', - constant: true, - inputs: [], - outputs: [Array], - payable: false, - stateMutability: 'view', - gas: null, - _isFragment: true - } - }, - errors: {}, - events: {}, - structs: {}, - deploy: ConstructorFragment { - name: null, - type: 'constructor', - inputs: [], - payable: false, - stateMutability: 'nonpayable', - gas: null, - _isFragment: true - }, - _isInterface: true - } - */ - ``` - - -The code creates an ABI as an array of JSON objects, where each object represents a single function of the smart contract. In this example, the ABI has only one function named "get". - -The `contractInterface` object is created by calling the `Interface` method and passing in the ABI array. The output of the `console.log` statement shows that the `contractInterface` object contains several properties: - -* `fragments`: an array of the individual functions and constructors in the smart contract. - -* `functions`: an object where each key is the encoded function signature and the value is a `FunctionFragment` object that describes the function. - -* `events`: an object where each key is the event signature and the value is an `EventFragment` object that describes the event. - -* `structs`: an object where each key is the type signature of a struct and the value is a `StructFragment` object that describes the struct. - -* `deploy`: a `ConstructorFragment` object that describes the constructor function of the smart contract. - -* `_abiCoder`: an `AbiCoder` object that is used for encoding and decoding smart contract data. - -* `errors`: an object that contains error messages if any occurred during the creation of the contract interface. - -* `_isInterface`: a Boolean that indicates if this object is an instance of Interface. diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isbytes.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isbytes.mdx deleted file mode 100644 index edd310d7..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isbytes.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: isBytes -description: Learn about the isBytes utils method. -subtitle: Learn about the isBytes utils method. -url: https://docs.alchemy.com/reference/isbytes -slug: reference/isbytes ---- - -Learn about the `isBytes` utils method. - -# Introduction - -The [`isBytes`](https://docs.ethers.org/v5/api/utils/bytes/#utils-isBytes) method is used to check if a value is a byte array. - -# Usage - -This method should be used when you want to check if a value is a byte array. For example, you can use this method to check if the value `[0x01, 0x02, 0x03]` is a byte array. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let byteArray = [0x01, 0x02, 0x03]; - - let isByteArray = Utils.isBytes(byteArray); - console.log(isByteArray); // true - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isbyteslike.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isbyteslike.mdx deleted file mode 100644 index a9fca74b..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isbyteslike.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: isBytesLike -description: Learn about the isBytesLike utils method. -subtitle: Learn about the isBytesLike utils method. -url: https://docs.alchemy.com/reference/isbyteslike -slug: reference/isbyteslike ---- - -Learn about the `isBytesLike` utils method. - -# Introduction - -The [`isBytesLike`](https://docs.ethers.org/v5/api/utils/bytes/#utils-isBytesLike) method is used to check if a value is a "bytes-like" object. - -# Usage - -This method should be used when you want to check if a value is a "bytes-like" object. This means that the value must be a `string`, an `array`, or a `Uint8Array`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let stringValue = "0x010203"; - - let isBytesLike = Utils.isBytesLike(stringValue); - console.log(isBytesLike); // true - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/ishexstring.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/ishexstring.mdx deleted file mode 100644 index 54fb94de..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/ishexstring.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: isHexString -description: Learn about the isHexString utils method -subtitle: Learn about the isHexString utils method -url: https://docs.alchemy.com/reference/ishexstring -slug: reference/ishexstring ---- - -Learn about the `isHexString` utils method - -# Introduction - -The [`isHexString`](https://docs.ethers.org/v5/api/utils/bytes/#utils-isHexString) method is used to check if a string is a hex string. This method is often used to validate if a string is a valid hex string for EVM operations. - -# Usage - -This method should be used when checking if a string is a hex string. For example, you can use this method to check if the string `'0xabcdef'` is a hex string. The result would be `true`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let string = "0xabcdef"; - let isHex = Utils.isHexString(string); - console.log(isHex); // true - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isvalidname.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isvalidname.mdx deleted file mode 100644 index a1675846..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/isvalidname.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: isValidName -description: Learn about the isValidName utils method -subtitle: Learn about the isValidName utils method -url: https://docs.alchemy.com/reference/isvalidname -slug: reference/isvalidname ---- - -Learn about the `isValidName` utils method - -# Introduction - -The [`isValidName`](https://docs.ethers.org/v4/api-utils.html) method is used to check if a string is a valid Ethereum name. This method is often used to validate Ethereum names (ENS). - -# Usage - -This method should be used when checking if a string is a valid Ethereum name. For example, you can use this method to check if the string `'myName'` is a valid Ethereum name. The result would be `true`. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let string = "myName"; - let isValid = Utils.isValidName(string); - console.log(isValid); // true - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/joinsignature.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/joinsignature.mdx deleted file mode 100644 index 3684e8c3..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/joinsignature.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: joinSignature -description: Learn about the joinSignature utils method -subtitle: Learn about the joinSignature utils method -url: https://docs.alchemy.com/reference/joinsignature -slug: reference/joinsignature ---- - -Learn about the `joinSignature` utils method - -# Introduction - -The [`joinSignature`](https://docs.ethers.org/v5/api/utils/bytes/#utils-joinSignature) method is used to combine separate parts of an Ethereum signature into a single hex string. The signature parts must be in a specific order for this method to work. - -# Usage - -This method should be used when you have separate parts of an Ethereum signature and you want to combine them into a single hex string. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - // Expanded-format; this is the format Solidity and other tools often require - let expanded = { - r: "0x0ba9770fd8778383f6d56faadc71e17b75f0d6e3ff0a408d5e6c4cee3bd70a16", - s: "0x3574da0ebfb1eaac261698b057b342e52ea53f85287272cea471a4cda41e3466", - recoveryParam: 0, - v: 27, - }; - let flat = Utils.joinSignature(expanded); - - console.log(flat); - - // 0x0ba9770fd8778383f6d56faadc71e17b75f0d6e3ff0a408d5e6c4cee3bd70a163574da0ebfb1eaac261698b057b342e52ea53f85287272cea471a4cda41e34661b - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/namehash.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/namehash.mdx deleted file mode 100644 index 2665bf21..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/namehash.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: namehash -description: Learn about the namehash utils method -subtitle: Learn about the namehash utils method -url: https://docs.alchemy.com/reference/namehash -slug: reference/namehash ---- - -Learn about the `namehash` utils method - -# Introduction - -The [`namehash`](https://docs.ethers.org/v5/api/utils/hashing/#utils-namehash) method is used to compute the namehash of a name. - -# Usage - -This method should be used when you want to compute the `namehash` of a name. The `namehash` is the result of applying the `keccak-256` hash function to a name in a specific format. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let name = "sahilaujla.eth"; - - let namehash = Utils.namehash(name); - console.log(namehash); // '0xe6da5447d54460d3a2e0bf9c49d9204ce90277d6d171aca5749fc4b7c35d9c64' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/parseether.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/parseether.mdx deleted file mode 100644 index b51e8672..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/parseether.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: parseEther -description: Learn about the parseEther utils method -subtitle: Learn about the parseEther utils method -url: https://docs.alchemy.com/reference/parseether -slug: reference/parseether ---- - -Learn about the `parseEther` utils method - -# Introduction - -The [`parseEther`](https://docs.ethers.org/v5/api/utils/display-logic/#utils-parseEther) method is used to parse a string or number representing an amount of ether and convert it into a number of wei. - -# Usage - -This method should be used when you want to parse a string or number representing an amount of ether and convert it into a number of wei. This can be useful when working with Ether amounts in your code, as it allows you to convert the amount into wei, which is the smallest unit of Ether. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let etherAmount = "1.0"; - - let weiAmount = Utils.parseEther(etherAmount); - console.log(weiAmount); // '1000000000000000000' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/parseunits.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/parseunits.mdx deleted file mode 100644 index b3b08e33..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/parseunits.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: parseUnits -description: Learn about the parseUnits utils method -subtitle: Learn about the parseUnits utils method -url: https://docs.alchemy.com/reference/parseunits -slug: reference/parseunits ---- - -Learn about the `parseUnits` utils method - -# Introduction - -The [`parseUnits`](https://docs.ethers.org/v5/api/utils/display-logic/#utils-parseUnits) method is used to parse a string or number representing an amount of a currency and convert it into the equivalent amount of wei. - -# Usage - -This method should be used when you want to parse a string or number representing an amount of a currency and convert it into the equivalent amount of wei. This can be useful when working with amounts of currencies in your code, as it allows you to convert the amount into wei, which is the smallest unit of that currency. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let currencyAmount = "1.0"; - let decimalPlaces = 18; - - let weiAmount = Utils.parseUnits(currencyAmount, decimalPlaces); - console.log(weiAmount); // '1000000000000000000' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/sdk-ethers-utils.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/sdk-ethers-utils.mdx deleted file mode 100644 index 3f85e9e5..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/sdk-ethers-utils.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: SDK Ethers Utils -description: Learn about the wrapper Ethers util methods provided by Alchemy SDK -subtitle: Learn about the wrapper Ethers util methods provided by Alchemy SDK -url: https://docs.alchemy.com/reference/sdk-ethers-utils -slug: reference/sdk-ethers-utils ---- - -# Introduction - -Alchemy provides a consolidated `Utils` object that supports a number of the most commonly used utils from Ethers. These methods are used as a drop-in replacement for `ethers.utils` methods. - -# Supported Methods - -Methods that are currently supported by the `Utils` object are: - -| Method | Description | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| [`arrayify`](/reference/arrayify) | Converts a hexadecimal string, number, or a byte array into a byte array. | -| [`concat`](/reference/concat) | Concatenates multiple byte arrays into a single byte array. | -| [`dnsEncode`](/reference/dnsencode) | Converts a string into a format suitable for use as a domain name, by replacing certain characters with escape sequences. | -| [`formatEther`](/reference/formatether) | Formats an Ether value as a string with a unit and decimal places. | -| [`formatUnits`](/reference/formatunits) | Formats a value in wei as a string with a unit and decimal places. | -| [`hashMessage`](/reference/hashmessage) | Hashes a message using Keccak256. | -| [`hexConcat`](/reference/hexconcat) | Concatenates multiple hexadecimal strings into a single hexadecimal string. | -| [`hexDataLength`](/reference/hexdatalength) | Concatenates multiple hexadecimal strings into a single hexadecimal string. | -| [`hexDataSlice`](/reference/hexdataslice) | Extracts a slice of bytes from a hexadecimal string. | -| [`hexStripZeros`](/reference/hexstripzeros) | Extracts a slice of bytes from a hexadecimal string. | -| [`hexValue`](/reference/hexvalue) | Extracts a slice of bytes from a hexadecimal string. | -| [`hexZeroPad`](/reference/hexzeropad) | Adds leading zeros to a hexadecimal string to match a certain length. | -| [`hexlify`](/reference/hexlify) | Converts a number, string, or byte array into a hexadecimal string. | -| [`id`](/reference/id) | Returns a unique identifier for an object. | -| [`isBytes`](/reference/isbytes) | Returns true if an object is a byte array. | -| [`isBytesLike`](/reference/isbyteslike) | Returns true if an object can be converted into a byte array. | -| [`isHexString`](/reference/ishexstring) | Returns true if a string is a valid hexadecimal string. | -| [`Interface`](/reference/interface) | Generates a smart contract interface from a JSON ABI. | -| [`isValidName`](/reference/isvalidname) | Returns true if a string is a valid domain name. | -| [`joinSignature`](/reference/joinsignature) | Concatenates the components of a signature into a single-byte array. | -| [`namehash`](/reference/namehash) | Calculates the name hash of a domain name. | -| [`parseEther`](/reference/parseether) | Parses a string with a unit and decimal places into an Ether value in wei. | -| [`parseUnits`](/reference/parseunits) | Parses a string with a unit and decimal places into a value in wei. | -| [`splitSignature`](/reference/splitsignature) | Splits a byte array representing a signature into its components. | -| [`stripZeros`](/reference/stripzeros) | Removes leading zeros from a byte array. | -| [`toUtf8Bytes`](/reference/toutf8bytes) | Converts a string into a byte array in UTF-8 format. | -| [`toUtf8String`](/reference/toutf8string) | Converts a byte array in UTF-8 format into a string. | -| [`zeroPad`](/reference/zeropad) | Adds leading zeros to a byte array to match a certain length. | diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/splitsignature.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/splitsignature.mdx deleted file mode 100644 index ec1c4ca1..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/splitsignature.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: splitSignature -description: Learn about the splitSignature utils method -subtitle: Learn about the splitSignature utils method -url: https://docs.alchemy.com/reference/splitsignature -slug: reference/splitsignature ---- - -Learn about the `splitSignature` utils method - -# Introduction - -The [`splitSignature`](https://docs.ethers.org/v5/api/utils/bytes/#utils-splitSignature) method is used to split an Ethereum signature hex string into separate parts. The signature must be in a specific format for this method to work. - -# Usage - -This method should be used when you want to split a compact Ethereum signature into its individual components. This can be useful when working with Ethereum signatures in your code, as it allows you to extract the relevant values from a signature for further processing. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - // Flat-format; this is the format provided by JSON-RPC responses - let flatSig = - "0x0ba9770fd8778383f6d56faadc71e17b75f0d6e3ff0a408d5e6c4cee3bd70a16" + - "3574da0ebfb1eaac261698b057b342e52ea53f85287272cea471a4cda41e3466" + - "1b"; - - let expandedSig = Utils.splitSignature(flatSig); - - console.log(expandedSig); - - // { - // r: "0x0ba9770fd8778383f6d56faadc71e17b75f0d6e3ff0a408d5e6c4cee3bd70a16", - // s: "0x3574da0ebfb1eaac261698b057b342e52ea53f85287272cea471a4cda41e3466", - // recoveryParam: 0, - // v: 27 - // } - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/stripzeros.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/stripzeros.mdx deleted file mode 100644 index e32f3fe6..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/stripzeros.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: stripZeros -description: Learn about the stripZeros utils method -subtitle: Learn about the stripZeros utils method -url: https://docs.alchemy.com/reference/stripzeros -slug: reference/stripzeros ---- - -Learn about the `stripZeros` utils method - -# Introduction - -The [`stripZeros`](https://docs.ethers.org/v5/api/utils/bytes/#utils-stripZeros) method is used to remove leading zeros from a hex string and return the output in a `Uint8Array` form. - -# Usage - -This method should be used when you want to remove leading zeros from a hex string and want the output in a `Uint8Array` form. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = "0x00000000000000000005"; - - let strippedUint8Array = Utils.stripZeros(hexString); - console.log(strippedUint8Array); // Uint8Array(1) [ 5 ] - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/toutf8bytes.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/toutf8bytes.mdx deleted file mode 100644 index c414d562..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/toutf8bytes.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: toUtf8Bytes -description: Learn about the toUtf8Bytes utils method. -subtitle: Learn about the toUtf8Bytes utils method. -url: https://docs.alchemy.com/reference/toutf8bytes -slug: reference/toutf8bytes ---- - -Learn about the `toUtf8Bytes` utils method. - -# Introduction - -The [`toUtf8Bytes`](https://docs.ethers.org/v5/api/utils/strings/#utils-toUtf8Bytes) method is used to convert a string to its equivalent UTF-8 encoded byte array representation. - -# Usage - -This method should be used when you want to convert a string to its UTF-8 encoded byte array representation. For example, you can use this method to convert the string `'Hello World'` to its UTF-8 encoded byte array representation. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let message = "Hello World"; - - let utf8Bytes = Utils.toUtf8Bytes(message); - console.log(utf8Bytes); // [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100] - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/toutf8string.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/toutf8string.mdx deleted file mode 100644 index 2b290242..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/toutf8string.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: toUtf8String -description: Learn about the toUtf8String utils method -subtitle: Learn about the toUtf8String utils method -url: https://docs.alchemy.com/reference/toutf8string -slug: reference/toutf8string ---- - -Learn about the `toUtf8String` utils method - -# Introduction - -The [`toUtf8String`](https://docs.ethers.org/v5/api/utils/strings/#utils-toUtf8String) method is used to convert a byte array to its equivalent string representation. - -# Usage - -This method should be used when you want to convert a byte array to its equivalent string representation. For example, you can use this method to convert the byte array `[72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]` to its equivalent string representation. - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let utf8Bytes = [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]; - - let message = Utils.toUtf8String(utf8Bytes); - console.log(message); // 'Hello World' - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/zeropad.mdx b/fern/api-reference/alchemy-sdk/sdk-ethers-utils/zeropad.mdx deleted file mode 100644 index 9315108a..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-ethers-utils/zeropad.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: zeroPad -description: Learn about the zeroPad utils method -subtitle: Learn about the zeroPad utils method -url: https://docs.alchemy.com/reference/zeropad -slug: reference/zeropad ---- - -Learn about the `zeroPad` utils method - -# Introduction - -The [`zeroPad`](https://docs.ethers.org/v5/api/utils/bytes/#utils-zeroPad) method is used to pad a hex string into a byte array with leading zeros so that its length is 64 characters. - -# Usage - -This method should be used when you want to pad a hex string into a byte array with leading zeros so that its length is 64 characters. For example, you can use this method to pad the hex string `'0x1234'` into: - - - ```text Byte Array - Uint8Array(64) [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 18, 52 - ] - ``` - - -Here's a simple code example to demonstrate how to use this method: - - - ```javascript Javascript - const { Utils } = require("alchemy-sdk"); - - let hexString = '0x1234'; - - let zeroPaddedHexByteArray = Utils.zeroPad(hexString, 64); - console.log(zeroPaddedHexByteArray); - - /* - Output: - - Uint8Array(64) [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 18, 52 - ] - */ - ``` - diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/computerarity-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/computerarity-sdk-v3.mdx deleted file mode 100644 index d0ce78b6..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/computerarity-sdk-v3.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: computeRarity - SDK -description: Returns the floor prices of an NFT contract by marketplace. -subtitle: Returns the floor prices of an NFT contract by marketplace. -url: https://docs.alchemy.com/reference/computerarity-sdk-v3 -slug: reference/computerarity-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - - - Please note that this endpoint is only available on **Ethereum (mainnet)** & **Polygon (mainnet & mumbai)** - - -# Description - -Get the rarity of each attribute of an NFT. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT collection. | -| `tokenId` | `string` | Token id of the NFT. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ----------------------------------- | -| `Promise` | `object` | The response object for the method. | - -## `ComputeRarityResponse` object properties - -| Parameter | Type | Description | -| ---------- | ------------------ | ------------------------------------------------------------------- | -| `rarities` | `array of objects` | Summary of the attribute prevalence for the specified NFT contract. | - -### `rarities` response properties - -| Property | Type | Description | -| ------------ | -------- | --------------------------------------------------------------------------------------------------------- | -| `value` | `string` | Name of the NFT's attribute. | -| `traitType` | `string` | The type of NFT attribute. | -| `prevalence` | `number` | A number from `0` to `1`represents this value's prevalence for this trait type in the current collection. | - -# Example Request and Response - -**Prerequisite**: You must install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and tokenId - const address = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"; - const tokenId = 145; - - //Call the method to display the rarity of each attribute of the NFT - const response = await alchemy.nft.computeRarity(address, tokenId) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "rarities": [ - { - "traitType": "Background", - "value": "Orange", - "prevalence": 0.1273 - }, - { - "traitType": "Hat", - "value": "Prussian Helmet", - "prevalence": 0.013 - }, - { - "traitType": "Mouth", - "value": "Bored Unshaven", - "prevalence": 0.1551 - }, - { - "traitType": "Fur", - "value": "Black", - "prevalence": 0.1229 - }, - { - "traitType": "Clothes", - "value": "Bone Necklace", - "prevalence": 0.0203 - }, - { - "traitType": "Eyes", - "value": "3d", - "prevalence": 0.0487 - } - ] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `computeRarity` method: - -* **NFT marketplaces**: NFT marketplaces such as OpenSea, Rarible, and SuperRare use the `computeRarity` method to calculate the rarity score of different NFTs helps determine their value in the marketplace. - -* **NFT collections**: NFT collections such as CryptoKitties and CryptoPunks use the `computeRarity` method to determine the rarity of each NFT in their collection, which adds to the overall uniqueness and value of the collection. - -* **Gaming applications**: Gaming applications that use NFTs often use the `computeRarity` method to calculate the rarity of different game items, such as weapons or armor, which can affect their in-game performance and value. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getcontractmetadata-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getcontractmetadata-sdk-v3.mdx deleted file mode 100644 index 27b25a3c..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getcontractmetadata-sdk-v3.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: getContractMetadata - SDK -description: Get the NFT collection metadata associated with the provided parameters. -subtitle: Get the NFT collection metadata associated with the provided parameters. -url: https://docs.alchemy.com/reference/getcontractmetadata-sdk-v3 -slug: reference/getcontractmetadata-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -*** - -# Description - -Get the NFT collection metadata associated with the provided parameters. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | - -# Response - -| Property | Type | Description | -| ---------------------- | -------- | ---------------------------- | -| `Promise` | `object` | The NFT collection metadata. | - -### `NftContract` response object properties - -| Property | Type | Description | -| --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tokenType` | `string` | The type of the token in the contract. Available options are: `ERC721` = "ERC721", `ERC1155` = "ERC1155", `UNKNOWN` = "UNKNOWN" | -| `address` | `string` | The address of the NFT contract. | -| `name` | `string` | The name of the contract. | -| `symbol` | `string` | The symbol of the contract. | -| `totalSupply` | `string` | The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. | -| `openSeaMetadata` | `object` | OpenSea's metadata for the contract. Parameters include: 1. `floorPrice?: number`: The floor price of the collection. 2. `collectionName?: string`: The name of the collection on OpenSea. 3. `safelistRequestStatus?: string`: The approval status of the collection on OpenSea. 4. `imageUrl?: string`: The image URL determined by OpenSea. 5. `description?: string`: The description of the collection on OpenSea. 6. `externalUrl?: string`: The homepage of the collection as determined by OpenSea. 7. `twitterUsername?: string`: The Twitter handle of the collection. 8. `discordUrl?: string`: The Discord URL of the collection. 9. ` lastIngestedAt: string`: Timestamp of when Alchemy last ingested the OpenSea metadata. | -| `contractDeployer` | `string` | The address that deployed the NFT contract. | -| `deployedBlockNumber` | `number` | The block number the NFT contract deployed in. | - -# Example Request and Response - -**Prerequisite**: You must install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the address whose contract metadata you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch metadata - const response = await alchemy.nft.getContractMetadata(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F", - "deployedBlockNumber": 13950908, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "collectionSlug": "undeadwarriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format", - "lastIngestedAt": "2023-09-17T10:13:28.000Z" - } - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getContractMetadata` method: - -* **Querying contract information**: The `getContractMetadata` method can be used to retrieve general information about a smart contract, such as the contract's name, version, and author. - -* **Verifying contract authenticity**: The metadata of a smart contract can include a cryptographic hash of the source code used to compile the contract. By retrieving this hash through `getContractMetadata`, users can verify that the deployed contract matches the original source code. - -* **Automating contract interactions**: Some smart contracts may include metadata that provides additional information about the contract's functions and parameters. This information can be used to automatically generate code for interacting with the contract, which can save time and reduce errors. - -# Related Methods - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getcontractsforowner-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getcontractsforowner-sdk-v3.mdx deleted file mode 100644 index a506a8b7..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getcontractsforowner-sdk-v3.mdx +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: getContractsForOwner - SDK -description: Gets all NFT contracts held by the specified owner address. -subtitle: Gets all NFT contracts held by the specified owner address. -url: https://docs.alchemy.com/reference/getcontractsforowner-sdk-v3 -slug: reference/getcontractsforowner-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets all NFT contracts held by the specified owner address. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------------- | -| `owner` | `string` | Address for NFT owner (can be in ENS format!). | -| `options` | `string` | The optional parameters to use for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `excludeFilters?` | `string` | `Optional` list of filters applied to the query. NFTs that match one or more of these filters are excluded from the response. Available options include: `SPAM`, `AIRDROPS`. | -| `includeFilters?` | `string` | `Optional` list of filters applied to the query. NFTs that match one or more of these filters are included in the response. Available options include: `SPAM`, `AIRDROPS`. | -| `pageSize?` | `number` | Sets the total number of NFTs to return in the response. Defaults to **100**. Maximum page size is **100**. | -| `orderBy?` | `string` | Order in which to return results. By default, results are ordered by contract address and token ID in lexicographic order. The available option is `TRANSFERTIME`. | -| `pageKey?` | string | Optional page key to use for pagination. | - -# Response - -| Property | Type | Description | -| --------------------------------------- | -------- | -------------------------------------------- | -| `Promise` | `object` | An object containing nfts owned by an owner. | - -## `GetContractsForOwnerResponse` object properties - -| Property | Type | Description | -| ------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `contracts` | `array of objects` | The list of contracts that match the query held by the given address. | -| `pageKey?` | `string` | Pagination token that can be passed into another request to fetch the next NFTs. If there is no page key, there are no more NFTs to fetch. | -| `totalCount` | `number` | The total count of NFT contracts owned by the provided address. | - -### `contracts` properties - -| Property | Type | Description | -| ------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tokenType` | `string` | The type of the token in the contract. Available options are: `ERC721` = "ERC721", `ERC1155` = "ERC1155", `UNKNOWN` = "UNKNOWN" | -| `address` | `string` | The address of the NFT contract. | -| `name` | `string` | The name of the contract. | -| `symbol` | `string` | The symbol of the contract. | -| `totalSupply` | `string` | The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. | -| `openSeaMetadata` | `object` | OpenSea's metadata for the contract. Parameters include: 1. `floorPrice?: number`: The floor price of the collection. 2. `collectionName?: string`: The name of the collection on OpenSea. 3. `safelistRequestStatus?: string`: The approval status of the collection on OpenSea. 4. `imageUrl?: string`: The image URL determined by OpenSea. 5. `description?: string`: The description of the collection on OpenSea. 6. `externalUrl?: string`: The homepage of the collection as determined by OpenSea. 7. `twitterUsername?: string`: The Twitter handle of the collection. 8. `discordUrl?: string`: The Discord URL of the collection. 9. ` lastIngestedAt: string`: Timestamp of when Alchemy last ingested the OpenSea metadata. | -| `contractDeployer` | `string` | The address that deployed the NFT contract. | -| `deployedBlockNumber` | `number` | The block number the NFT contract deployed in. | -| `totalBalance` | `string` | The sum of NFT balances across all token IDs held by the owner. This will be equal to the `numDistinctTokensOwned` for non-fungible tokens, but it may be higher if the user holds some fungible ERC1155 tokens. | -| `numDistinctTokensOwned` | `string` | Number of distinct token IDs held by the owner. For non-fungible tokens, this will be equal to the `totalBalance`, but it may be lower if the user holds some fungible ERC1155 tokens. | -| `isSpam` | `boolean` | Whether the NFT contract is considered spam. | -| `displayNft` | `object` | Object containing an NFT owned by the owner for this particular contract. Use this to display a sample NFT for the contract. It contains: 1. `tokenId`: A token id of an NFT owned by the owner on the contract. 2. `name?`: The name of the NFT, if available. | -| `image` | `object` | Object containing different URLs for the NFT media. 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm i alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - const owner = "vitalik.eth" - - //Call the method - const response = await alchemy.nft.getContractsForOwner(owner) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "contracts": [ - { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-21T15:28:51.000Z" - }, - "totalBalance": "912", - "numDistinctTokensOwned": "80", - "isSpam": true, - "displayNft": { - "tokenId": "1" - }, - "image": {} - }, - { - "address": "0x0015F391949f25c3211063104aD4AFC99210f85c", - "name": "BAYC Otherside Land", - "symbol": "BAYC", - "totalSupply": "24", - "tokenType": "ERC721", - "contractDeployer": "0x4B7A67800712472F5f4a5f580c3B99345DF1CeD6", - "deployedBlockNumber": 14669988, - "openSeaMetadata": { - "collectionName": "BAYC Otherside Land V3", - "collectionSlug": "bayc-otherside-land-v3-7", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/aR91WTPUmY4QBkle9qBum5dfjfCyh9n8zgYWyMAFJ-3vUUdquzasMpYyl2Jr6elxhZlPuI1gzthut99h0Z33F_k-xqev_jGldV7X?w=500&auto=format", - "description": "[Mint on the website](https://baycofficial.xyz)\n\nBAYC Otherside Land is an open world that enables users to build 3D immersive applications on top of several blockchains. In BAYC Otherside Land, users can take advantage of traditional 3D open-world features such as building 3D architectures, hosting virtual meetings, exhibiting NFTs, and more advanced functionality.Details on Twitter @BoredApeYC or PUBLIC MINT NOW LIVE!\n", - "externalUrl": "https://baycofficial.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/buhkgp9EPv2YoCeB9k1XWMX7hkBbkpIFkwOdveTZPsVOuKiANbDBwjvAxSpvxhbh5NxU0Kkjje-3VVWk36z-f4Z5rlmAHZXMeisu?w=500&auto=format", - "lastIngestedAt": "2023-09-21T21:07:17.000Z" - }, - "totalBalance": "17", - "numDistinctTokensOwned": "6", - "isSpam": true, - "displayNft": { - "tokenId": "2" - }, - "image": {} - }, - { - "address": "0x0dA763DFc24764275E56D9011A01186fbacF2edf", - "name": "VeeCon", - "symbol": "VC", - "totalSupply": "8", - "tokenType": "ERC721", - "contractDeployer": "0xDce675fCcE9Cb500B62f69464fE10f2999d77A50", - "deployedBlockNumber": 14530344, - "openSeaMetadata": { - "collectionName": "Vee Con Tickets Official", - "collectionSlug": "veecontickets-2022", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/wPIhTZGy2aMY3rHL6eUUvSansxQqTZwsbnD2Dt7AoW2YQZH-iwiue3Xt6YbO005Z_vwCzyKyVhmHBZ8C4KYttgjmzEpTRc6sAQLWag?w=500&auto=format", - "description": "[Mint on the website](https://veecontickets.xyz)\n\nVeeCon 2022 is a multi-day superconference where only VeeCon NFT ticket holders will experience an extraordinary lineup of content including iconic keynote speeches; innovative and educational talks, panels and Q&A sessions; and many collaborative experiences", - "externalUrl": "https://veecontickets.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/zjaIJ85YSsyeO88fFOegjzeh3lfG8Z0zNYjvjDGrRGpdTyEUw3upA7ZrdRTHbwWu7XVQPheZMOObLKrMWV0mQdbjhZeXiddyKnwLD9E?w=500&auto=format", - "lastIngestedAt": "2023-09-19T03:10:31.000Z" - }, - "totalBalance": "10", - "numDistinctTokensOwned": "6", - "isSpam": true, - "displayNft": { - "tokenId": "18" - }, - "image": {} - } - ], - "pageKey": "75db8160-ea3f-4cb0-9bc4-4663f6a804af", - "totalCount": 2207 - } - ``` - - -# Use Cases - -Some possible use cases for this method include: - -* **Displaying NFT contracts owned by a user**: DApps or marketplaces that display a user's NFT collection can use the `getContractsForOwner` method to retrieve information about the NFTs owned by a specific address. This can be useful for providing a customized view of a user's NFTs and allowing them to manage their collection easily. - -* **Verifying ownership in a smart contract**: Smart contracts that require ownership of specific NFTs as a condition for executing certain functions can use the `getContractsForOwner` method to verify that a user owns the required NFTs. - -# Related Methods - -Here are the methods related to `getContractsForOwner`: - -* [getOwnersForContract](/reference/getownersforcontract-sdk): Get the NFTs for a owner. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getfloorprice-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getfloorprice-sdk-v3.mdx deleted file mode 100644 index 88760ae2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getfloorprice-sdk-v3.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: getFloorPrice - SDK -description: Returns the floor prices of an NFT contract by marketplace. -subtitle: Returns the floor prices of an NFT contract by marketplace. -url: https://docs.alchemy.com/reference/getfloorprice-sdk-v3 -slug: reference/getfloorprice-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - - - Please note that this endpoint is only available on **Ethereum mainnet** for **Opensea** & **Looksrare** marketplaces. - - -# Description - -Returns the floor prices of an NFT contract by marketplace. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------------------- | -| `contractAddress` | `string` | The contract address for the NFT collection. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `Promise` | `object` | Returns an object of the name of the NFT marketplace where the collection is listed. Current marketplaces supported: **OpenSea**, **LooksRare** | - -### `GetFloorPriceResponse` object properties - -| Property | Type | Description | -| --------------- | -------- | ------------------------------------------------------------------------- | -| `floorPrice` | `number` | The floor price of the collection on the given marketplace. | -| `priceCurrency` | `string` | The currency in which the floor price is denominated. | -| `collectionUrl` | `string` | The link to the collection on the given marketplace. | -| `retrievedAt` | `string` | UTC timestamp of when the floor price was retrieved from the marketplace. | - -### `FloorPriceError` object properties - -If there is an error, the failing object is returned by the `getFloorPrice` method call for each marketplace (e.g., looksRare, or OpenSea). - -| Property | Type | Description | -| -------- | -------- | ------------------------------------------------------- | -| `error` | `string` | Error fetching floor prices from the given marketplace. | - -# Example Request and Response - -**Prerequisite**: You must install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to check the contract floor price - const response = await alchemy.nft.getFloorPrice(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "openSea": { - "floorPrice": 24.979951, - "priceCurrency": "ETH", - "collectionUrl": "https://opensea.io/collection/boredapeyachtclub", - "retrievedAt": "2023-09-21T15:22:06.168Z", - "error": undefined - }, - "looksRare": { - "floorPrice": 24.98, - "priceCurrency": "ETH", - "collectionUrl": "https://looksrare.org/collections/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - "retrievedAt": "2023-09-21T15:22:06.097Z", - "error": undefined - } - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getFloorPrice` method: - -* **NFT marketplaces**: In an NFT marketplace, the `getFloorPrice` method can be used to display the minimum price at which an NFT can be purchased. This helps buyers to determine the minimum price they need to pay for a particular NFT, and also helps sellers to set a minimum price for their NFT. - -* **Auctions**: In an auction, the `getFloorPrice` method can be used to determine the minimum bid amount for an item. This helps to ensure that the auction starts at a fair price and helps to prevent low-ball bids. - -* **Automated market makers (AMMs)**: In an AMM, the `getFloorPrice` method can be used to determine the minimum price at which a particular token can be bought or sold. This helps to ensure that trades are executed at a fair price and helps to prevent price manipulation. - -* **Tokenized real estate**: In the emerging market of tokenized real estate, the `getFloorPrice` method can be used to display the minimum price at which a particular real estate asset can be sold. This helps buyers to determine the minimum price they need to pay for a particular property, and also helps sellers to set a minimum price for their property. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getmintednfts-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getmintednfts-sdk-v3.mdx deleted file mode 100644 index 922a7624..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getmintednfts-sdk-v3.mdx +++ /dev/null @@ -1,279 +0,0 @@ ---- -title: getMintedNfts - SDK -description: The getMintedNfts method gets all the NFTs minted by a specified owner address. -subtitle: The getMintedNfts method gets all the NFTs minted by a specified owner address. -url: https://docs.alchemy.com/reference/getmintednfts-sdk-v3 -slug: reference/getmintednfts-sdk-v3 ---- - -The `getMintedNfts` method gets all the NFTs minted by a specified owner address. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -The `getMintedNfts` method gets all the NFTs minted by a specified owner address. - -# Parameters - -| Name | Type | Description           | Example | -| --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `owner` | `string` | Address for the NFT owner (can be in ENS format). | `"vitalik.eth"` or `"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"` | -| `options` | `Object` | An optional object with the following properties: 1. `contractAddresses`: An array of NFT contract addresses to filter mints by. If omitted, defaults to all contract addresses. 2. `tokenType`: ENUM option to filter mints by `ERC721` vs `ERC1155` contracts. If omitted, defaults to all NFTs. 3. `pageKey`: Optional page key from an existing response to use for pagination. | `{ contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"], tokenType: "ERC721" }` | - -# Response - -The `getMintedNfts` method returns a `Promise` object that contains the NFT mints by the specified owner address. - -## `TransfersNftResponse` object properties - -The returned object has the following fields: - -| Property | Type | Description | -| ---------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | `array of objects` | An array of the transfer objects. Each transfer object contains information about the transferred NFT. | -| `pageKey?` | `string` | Optional page key to use to fetch the next group of NFTs. `undefined` if all the transfers are already included in the response. | - -### `nfts` properties - -Each mint object has the following fields: - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN` | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | -| `from` | `string` | The address the NFT was sent from. For minted NFTs, this field is set to `0x0000000000000000000000000000000000000000`. | -| `to` | `string` | The address the NFT was sent or minted to. | -| `transactionHash` | `string` | The transaction hash where the transfer or mint occurred. | -| `blockNumber` | `string` | The block number as a hex string of when the transfer or mint occurred. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```text yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getMintedNfts` request using the Alchemy SDK: - - - ```javascript getMintedNfts.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getMintedNfts method - const main = async () => { - // Address for the NFT owner (can be in ENS format). - let address = "vitalik.eth"; - - // Additional options for the request. (Optional) - let options = { - /** - * List of NFT contract addresses to filter mints by. If omitted, defaults to - * all contract addresses. - */ - contractAddresses: ["0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85"], - /** - * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all - * NFTs. - */ - tokenType: "ERC721", - }; - - // Calling the getMintedNfts method - let mintedNfts = await alchemy.nft.getMintedNfts(address, options); - - // Logging the response to the console - console.log(mintedNfts); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json getMintedNfts response - { - "nfts": [ - { - "contract": { - "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85", - "tokenType": "ERC721", - "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8", - "deployedBlockNumber": 9380410, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "ENS: Ethereum Name Service", - "collectionSlug": "ens", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-09-18T10:20:40.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "111352653673047713804124050598355152059184664886497242203777472800304891334469", - "tokenType": "ERC721", - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45", - "image": {}, - "raw": { - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45", - "metadata": {}, - "error": "Centralized gateway timed out, try again with a higher tokenUri timeout" - }, - "collection": { - "name": "ENS: Ethereum Name Service", - "slug": "ens", - "externalUrl": "https://ens.domains" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T14:06:39.073Z", - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xc5bc4cf983e98ad9708dee356a17196aa367228f9ec87f81e622c81adaa6211e", - "blockNumber": "0xe88086" - }, - { - "contract": { - "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85", - "tokenType": "ERC721", - "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8", - "deployedBlockNumber": 9380410, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "ENS: Ethereum Name Service", - "collectionSlug": "ens", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-09-18T10:20:40.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "103040680624633360426956226800459505851045291463662393946817594920946384752224", - "tokenType": "ERC721", - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60", - "image": {}, - "raw": { - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60", - "metadata": {}, - "error": "Centralized gateway timed out, try again with a higher tokenUri timeout" - }, - "collection": { - "name": "ENS: Ethereum Name Service", - "slug": "ens", - "externalUrl": "https://ens.domains" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T14:06:39.076Z", - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0x9f21fad5549aaf94e7731f5c4649353926cf7520b96891b8b511d099020fb887", - "blockNumber": "0xf47bcd" - }, - { - "contract": { - "address": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85", - "tokenType": "ERC721", - "contractDeployer": "0x4Fe4e666Be5752f1FdD210F4Ab5DE2Cc26e3E0e8", - "deployedBlockNumber": 9380410, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "ENS: Ethereum Name Service", - "collectionSlug": "ens", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-09-18T10:20:40.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "79362104341617195787435013155216554898816343870453146709166302825328240112628", - "tokenType": "ERC721", - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4", - "image": {}, - "raw": { - "tokenUri": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4", - "metadata": {}, - "error": "Token uri responded with a non 200 response code" - }, - "collection": { - "name": "ENS: Ethereum Name Service", - "slug": "ens", - "externalUrl": "https://ens.domains" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T14:06:38.973Z", - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xe3c78eca914f215644922e15d080b4198d552885a64958f4bec6516ace149b43", - "blockNumber": "0xf47bcd" - } - ] - } - ``` - - -# Use Cases - -Some of the use cases for `getMintedNfts` are: - -* **NFT Collector Portfolio**: NFT collectors could use the API to retrieve information about all NFTs they have minted and display them as part of their online portfolio. - -* **NFT Market Analysis**: An NFT market analysis platform could use the API to gather data on NFTs minted by a specific creator and analyze their popularity and market demand. - -* **NFT Creator Monitoring**: NFT contract owners or administrators could use the API to monitor the NFTs minted by a specific creator and ensure that they comply with the rules and regulations set by the NFT contract. - -* **NFT Creator Stats**: An NFT creator could use the API to retrieve information about all their NFTs minted and view statistics such as the total number of NFTs minted. - -* **NFT Creator Tracking**: Investors or fans of a specific NFT creator could use the API to track their NFT creation activity and stay updated on their latest NFT releases. - -# Related Methods - -Here are the methods related to `getMintedNfts`: - -* [`getTransfersForOwner`](/reference/sdk-gettransfersforowner): Returns all NFT transfers for a given owner address. - -* [`getTransfersForContract`](/reference/sdk-gettransfersforcontract): Returns all NFT transfers for a given NFT contract address. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftmetadata-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftmetadata-sdk-v3.mdx deleted file mode 100644 index f3fa94c1..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftmetadata-sdk-v3.mdx +++ /dev/null @@ -1,194 +0,0 @@ ---- -title: getNftMetadata -SDK -description: Get the NFT metadata associated with the provided parameters. -subtitle: Get the NFT metadata associated with the provided parameters. -url: https://docs.alchemy.com/reference/getnftmetadata-sdk-v3 -slug: reference/getnftmetadata-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get the NFT metadata associated with the provided parameters. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | Token id of the NFT. | -| `options` | `object` | Options for the request. A null object should still be passed in params if no options are provided for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ---------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `tokenType?` | `object` | Optional field to specify the type of token to speed up the query. Available options include: \[`ERC721` = "ERC721", `ERC1155` = "ERC1155", `UNKNOWN` = "UNKNOWN"] | -| `tokenUriTimeoutInMs?` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to 0. | -| `refreshCache?` | `boolean` | Whether to refresh the metadata for the given NFT token before returning the response. Defaults to false for faster response times. | - -# Response - -| Property | Type | Description | -| -------------- | -------- | ------------------------------- | -| `Promise` | `object` | Object containing nft metadata. | - -### `Nft` response object properties - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The NFT token ID as an integer string. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN`. | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm i alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const contractAddress = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - const tokenId = "1590"; - - // call the method - let response = await alchemy.nft.getNftMetadata(contractAddress, tokenId, {}); - - // logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "contract": { - "address": "0xe785E82358879F061BC3dcAC6f0444462D4b5330", - "name": "World Of Women", - "symbol": "WOW", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0xc9b6321dc216D91E626E9BAA61b06B0E4d55bdb1", - "deployedBlockNumber": 12907782, - "openSeaMetadata": { - "floorPrice": 0.6021, - "collectionName": "World of Women", - "collectionSlug": "world-of-women-nft", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format", - "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.", - "externalUrl": "http://worldofwomen.art", - "twitterUsername": "worldofwomennft", - "discordUrl": "https://discord.gg/worldofwomen", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format", - "lastIngestedAt": "2023-09-18T12:28:27.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "44", - "tokenType": "ERC721", - "name": "WoW #44", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "contentType": "image/png", - "size": 105117, - "originalUrl": "https://ipfs.io/ipfs/QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi" - }, - "raw": { - "tokenUri": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "metadata": { - "name": "WoW #44", - "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi", - "attributes": [ - { - "value": "Green Orange", - "trait_type": "Background" - }, - { - "value": "Medium Gold", - "trait_type": "Skin Tone" - }, - { - "value": "Slight Smile", - "trait_type": "Mouth" - }, - { - "value": "Purple", - "trait_type": "Lips Color" - } - ] - } - }, - "collection": { - "name": "World of Women", - "slug": "world-of-women-nft", - "externalUrl": "http://worldofwomen.art", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T13:25:41.833Z" - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftMetadata` function: - -* **Displaying NFT information**: When a user wants to view information about a specific NFT, such as its name, description, image, or other attributes, `getNftMetadata` can be called to retrieve this information from the NFT metadata. - -* **NFT marketplaces**: NFT marketplaces can use `getNftMetadata` to display information about NFTs that are available for sale or auction. This information can help potential buyers decide which NFTs to purchase. - -* **Verification**: `getNftMetadata` can be used to verify the authenticity of an NFT. If the metadata associated with an NFT matches the expected values, then it is more likely to be a genuine NFT. - -# Related Methods - -Here are the methods related to the`getNftMetadata` method: - -* [getNftMetadataBatch](/reference/getnftmetadatabatch-sdk): Gets the NFT metadata for multiple NFT tokens. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftmetadatabatch-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftmetadatabatch-sdk-v3.mdx deleted file mode 100644 index 24433723..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftmetadatabatch-sdk-v3.mdx +++ /dev/null @@ -1,284 +0,0 @@ ---- -title: getNftMetadataBatch - SDK -description: Gets the NFT metadata for multiple NFT tokens. -subtitle: Gets the NFT metadata for multiple NFT tokens. -url: https://docs.alchemy.com/reference/getnftmetadatabatch-sdk-v3 -slug: reference/getnftmetadatabatch-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets the NFT metadata for multiple NFT tokens. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | --------------------------------------------- | -| `tokens` | `array` | An array of NFT tokens to fetch metadata for. | -| `options` | `string` | Configuration options for making the request. | - -### `tokens` parameters - -| Parameter | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The NFT contract address. Limited to ERC721 and ERC1155 tokens. | -| `tokenId` | `string` | The `id` of the NFT. | -| `tokenType?` | `string` | Optional field to specify the type of token to speed up the query, e.g., `ERC1155`, `ERC721`. | - -### `options` parameters - -| Parameter | Type | Description | -| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tokenUriTimeoutInMs?` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want only to access the cache and not live fetch any metadata for cache misses, then set this value to 0. | - -# Response - -| Property | Type | Description | -| -------------------------------------- | -------- | -------------------------------------------------- | -| `Promise` | `object` | An object containing multiple `nfts` NFT metadata. | - -### `GetNftMetadataBatchResponse` object properties - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The NFT token ID as an integer string. | -| `tokenType` | `string` | The type of NFT e.g.,`ERC721`, `ERC1155`, `UNKNOWN`. | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - //Call the method - let response = await alchemy.nft.getNftMetadataBatch( - [ - { - contractAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", - tokenId: "3", - tokenType: "ERC721" - }, - { - contractAddress: "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e", - tokenId: "4", - tokenType: "ERC721" - } - ], - { - tokenUriTimeoutInMs: 5000, - refreshCache: true - } - ) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", - "name": "BoredApeYachtClub", - "symbol": "BAYC", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0xaBA7161A7fb69c88e16ED9f455CE62B791EE4D03", - "deployedBlockNumber": 12287507, - "openSeaMetadata": { - "floorPrice": 24.76, - "collectionName": "Bored Ape Yacht Club", - "collectionSlug": "boredapeyachtclub", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB?w=500&auto=format", - "description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs— unique digital collectibles living on the Ethereum blockchain. Your Bored Ape doubles as your Yacht Club membership card, and grants access to members-only benefits, the first of which is access to THE BATHROOM, a collaborative graffiti board. Future areas and perks can be unlocked by the community through roadmap activation. Visit www.BoredApeYachtClub.com for more details.", - "externalUrl": "http://www.boredapeyachtclub.com/", - "twitterUsername": "BoredApeYC", - "discordUrl": "https://discord.gg/3P5K3dzgdB", - "bannerImageUrl": "https://i.seadn.io/gae/i5dYZRkVCUK97bfprQ3WXyrT9BnLSZtVKGJlKQ919uaUB0sxbngVCioaiyu9r6snqfi2aaTyIvv6DHm4m2R3y7hMajbsv14pSZK8mhs?w=500&auto=format", - "lastIngestedAt": "2023-09-18T09:58:23.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "3", - "tokenType": "ERC721", - "tokenUri": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/e93ceab748985031d68b8ac5a3e38ed1", - "contentType": "image/png", - "size": 208822, - "originalUrl": "https://ipfs.io/ipfs/QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6" - }, - "raw": { - "tokenUri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3", - "metadata": { - "image": "ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6", - "attributes": [ - { - "trait_type": "Background", - "value": "Purple" - }, - { - "trait_type": "Fur", - "value": "Cheetah" - } - ] - } - }, - "collection": { - "name": "Bored Ape Yacht Club", - "slug": "boredapeyachtclub", - "externalUrl": "http://www.boredapeyachtclub.com/", - "bannerImageUrl": "https://i.seadn.io/gae/i5dYZRkVCUK97bfprQ3WXyrT9BnLSZtVKGJlKQ919uaUB0sxbngVCioaiyu9r6snqfi2aaTyIvv6DHm4m2R3y7hMajbsv14pSZK8mhs?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T18:14:22.829Z" - }, - { - "contract": { - "address": "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e", - "name": "Doodles", - "symbol": "DOODLE", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0x2B3Ab8e7BB14988616359B78709538b10900AB7D", - "deployedBlockNumber": 13430097, - "openSeaMetadata": { - "floorPrice": 1.55, - "collectionName": "Doodles", - "collectionSlug": "doodles-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/7B0qai02OdHA8P_EOVK672qUliyjQdQDGNrACxs7WnTgZAkJa_wWURnIFKeOh5VTf8cfTqW3wQpozGedaC9mteKphEOtztls02RlWQ?w=500&auto=format", - "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury.", - "externalUrl": "https://doodles.app", - "twitterUsername": "doodles", - "discordUrl": "https://discord.gg/doodles", - "bannerImageUrl": "https://i.seadn.io/gae/svc_rQkHVGf3aMI14v3pN-ZTI7uDRwN-QayvixX-nHSMZBgb1L1LReSg1-rXj4gNLJgAB0-yD8ERoT-Q2Gu4cy5AuSg-RdHF9bOxFDw?w=500&auto=format", - "lastIngestedAt": "2023-09-10T05:19:20.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "4", - "tokenType": "ERC721", - "name": "Doodle #4", - "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.", - "tokenUri": "https://ipfs.io/ipfs/QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/f1fa2cc9dd6ddfc0449c5c30fb30fca4", - "contentType": "image/png", - "size": 129566, - "originalUrl": "https://ipfs.io/ipfs/QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm" - }, - "raw": { - "tokenUri": "ipfs://QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4", - "metadata": { - "name": "Doodle #4", - "image": "ipfs://QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm", - "description": "A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.", - "attributes": [ - { - "value": "happy", - "trait_type": "face" - }, - { - "value": "purple long", - "trait_type": "hair" - }, - { - "value": "spotted hoodie", - "trait_type": "body" - }, - { - "value": "gradient 2", - "trait_type": "background" - }, - { - "value": "purple", - "trait_type": "head" - } - ] - } - }, - "collection": { - "name": "Doodles", - "slug": "doodles-official", - "externalUrl": "https://doodles.app", - "bannerImageUrl": "https://i.seadn.io/gae/svc_rQkHVGf3aMI14v3pN-ZTI7uDRwN-QayvixX-nHSMZBgb1L1LReSg1-rXj4gNLJgAB0-yD8ERoT-Q2Gu4cy5AuSg-RdHF9bOxFDw?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T08:18:52.566Z" - } - ] - } - ``` - - -# Use Cases - -Here are some use cases for the `getNftMetadataBatch` function: - -* **NFT Marketplaces**: An NFT marketplace is a platform where users can buy and sell NFTs. In such platforms, the `getNftMetadataBatch` function can be used to retrieve metadata for multiple NFTs in a single API call. This can improve the platform's performance and user experience, as users can quickly view information about multiple NFTs simultaneously. - -* **NFT Galleries**: NFT galleries are websites or apps that showcase a collection of NFTs. With `getNftMetadataBatch`, gallery owners can easily retrieve and display metadata for multiple NFTs, making it easier for visitors to browse and explore the collection. - -* **NFT Wallets**: NFT wallets are digital wallets that allow users to store, manage, and trade their NFTs. When users want to view their NFTs, the `getNftMetadataBatch` function can be used to retrieve metadata for all NFTs in the wallet, providing a quick overview of the user's collection. - -# Related Methods - -Here are the methods related to `getNftMetadataBatch`: - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnfts-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnfts-sdk-v3.mdx deleted file mode 100644 index 3ebcce18..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnfts-sdk-v3.mdx +++ /dev/null @@ -1,317 +0,0 @@ ---- -title: getNftsForOwner - SDK -description: Get all NFTs for an owner. -subtitle: Get all NFTs for an owner. -url: https://docs.alchemy.com/reference/getnfts-sdk-v3 -slug: reference/getnfts-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all NFTs for an owner. - -This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the `options` parameter by setting `omitMetadata` to `true` in the body of the request. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------------- | -| `owner` | `string` | The address of the owner. | -| `options` | `string` | The optional parameters to use for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `contractAddresses?` | `array of strings` | `Optional` list of contract addresses to filter the results by. Limit is 45. | -| `omitMetadata?` | `boolean` | `Optional` boolean flag to omit NFT metadata. Defaults to `false`. To return the response as shown in [OwnedBaseNftsResponse](#ownedbasenftsresponse-object-parameters), set this parameter to `true`. | -| `excludeFilters?` | `string` | `Optional` list of filters applied to the query. NFTs that match one or more of these filters are excluded from the response. Available options include: `SPAM`, `AIRDROPS`. | -| `includeFilters?` | `string` | `Optional` list of filters applied to the query. NFTs that match one or more of these filters are included in the response. Available options include: `SPAM`, `AIRDROPS`. | -| `pageSize?` | `number` | Sets the total number of NFTs to return in the response. Defaults to **100**. Maximum page size is **100**. | -| `tokenUriTimeoutInMs?` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want only to access the cache and not live to fetch any metadata for cache misses, then set this value to `0`. | -| `orderBy?` | `string` | Order in which to return results. By default, results are ordered by contract address and token ID in lexicographic order. The available option is `TRANSFERTIME`. | -| `pageKey?` | string | Optional page key to use for pagination. | - -# Response - -| Property | Type | Description | -| ----------------------------------------------------- | -------- | -------------------------------------------- | -| `Promise` | `object` | An object containing nfts owned by an owner. | - -## `OwnedNftsResponse` object properties - -| Property | Type | Description | -| ------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ownedNfts` | `array of objects` | The NFTs owned by the provided address. | -| `pageKey` | `string` | Pagination token that can be passed into another request to fetch the next NFTs. If there is no page key, there are no more NFTs to fetch. | -| `totalCount` | `number` | The total count of NFTs owned by the provided address. | -| `validAt` | `object` | The `validAt` object contains the following information: 1. `blockNumber` - The block number the sale information is valid at. 2. `blockHash` - The block hash. Used to detect reorgs. 3. `blockTimestamp` - The timestamp for the block. | - -### `ownedNfts` properties - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN` | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt?` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `balance` | `string` | The token balance indicating how many units of this NFT the owner holds. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | - -## `OwnedBaseNftsResponse` object properties - -The `ownedBaseNfts` response object is returned when the `options` parameter `omitMetadata` is set to `true`. - -| Property | Type | Description | -| ------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ownedNfts` | `array of objects` | The NFTs owned by the provided address. | -| `pageKey` | `string` | Pagination token that can be passed into another request to fetch the next NFTs. If there is no page key, there are no more NFTs to fetch. | -| `totalCount` | `number` | The total count of NFTs owned by the provided address. | -| `validAt` | `object` | The `validAt` object contains the following information: 1. `blockNumber` - The block number the sale information is valid at. 2. `blockHash` - The block hash. Used to detect reorgs. 3. `blockTimestamp` - The timestamp for the block. | - -### `ownedNfts` properties - -| Property | Type | Description | -| ----------------- | -------- | ----------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `balance` | `string` | The token balance indicating how many units of this NFT the owner holds. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm i alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let owner = "vitalik.eth"; - //Define the optional `options` parameters - let options = { - excludeFilters: "SPAM" - }; - - //Call the method to get the nfts owned by this address - let response = await alchemy.nft.getNftsForOwner(owner, options); - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "ownedNfts": [ - { - "contract": { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-11T13:59:53.000Z" - }, - "isSpam": true, - "spamClassifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "tokenId": "1", - "tokenType": "ERC721", - "tokenUri": "http://api.nikeapenft.xyz/ipfs/1", - "image": {}, - "raw": { - "tokenUri": "http://api.nikeapenft.xyz/ipfs/1", - "metadata": {} - }, - "collection": { - "name": "BoredApeNikeClub", - "slug": "bored-ape-nike-club-v2", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-20T12:18:35.890Z", - "balance": "26", - "acquiredAt": {} - }, - { - "contract": { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-11T13:59:53.000Z" - }, - "isSpam": true, - "spamClassifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "tokenId": "2", - "tokenType": "ERC721", - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "image": {}, - "raw": { - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "metadata": {}, - "error": "Contract returned a broken token uri" - }, - "collection": { - "name": "BoredApeNikeClub", - "slug": "bored-ape-nike-club-v2", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-20T13:13:54.798Z", - "balance": "31", - "acquiredAt": {} - }, - { - "contract": { - "address": "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "name": "Bored Ape Nike Club", - "symbol": "BANC", - "tokenType": "ERC721", - "contractDeployer": "0x51D7D428041E23ef51422e110dfEfF906e821CFe", - "deployedBlockNumber": 14276343, - "openSeaMetadata": { - "collectionName": "BoredApeNikeClub", - "collectionSlug": "bored-ape-nike-club-v2", - "safelistRequestStatus": "not_requested", - "imageUrl": "https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format", - "description": "COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format", - "lastIngestedAt": "2023-09-11T13:59:53.000Z" - }, - "isSpam": true, - "spamClassifications": [ - "OwnedByMostHoneyPots", - "Erc721TooManyOwners", - "Erc721TooManyTokens", - "NoSalesActivity", - "HighAirdropPercent", - "HighHoneyPotPercent", - "HoneyPotsOwnMultipleTokens" - ] - }, - "tokenId": "2", - "tokenType": "ERC721", - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "image": {}, - "raw": { - "tokenUri": "http://api.nikeapenft.xyz/ipfs/2", - "metadata": {} - }, - "collection": { - "name": "BoredApeNikeClub", - "slug": "bored-ape-nike-club-v2", - "externalUrl": "https://nikemetaverse.xyz", - "bannerImageUrl": "https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T11:02:14.698Z", - "balance": "31", - "acquiredAt": {} - }, - ], - "pageKey": "MHgwMDcwM2Y5YjExZjJhYzAyZDM5MWExMWU3Yjk3YzZlZTgwY2Q4NTYzOjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNTpmYWxzZQ==", - "totalCount": 26585, - "validAt": { - "blockNumber": 18162406, - "blockHash": "0x670957987df0a8d0838a05a25d8a1945fbeea24f547a4e59e748c42a12d7cfce", - "blockTimestamp": "2023-09-18T11:02:47Z" - } - } - ``` - - -# Use Cases - -The `getNftsForOwner` method can be used to retrieve information about non-fungible tokens (NFTs) owned by a specific address. Some possible use cases for this method include: - -* **Displaying NFTs owned by a user**: DApps or marketplaces that display a user's NFT collection can use the `getNftsForOwner` method to retrieve information about the NFTs owned by a specific address. This can be useful for providing a customized view of a user's NFTs and allowing them to manage their collection easily. - -* **Tracking NFT ownership**: The `getNftsForOwner` method can be used to track the ownership of specific NFTs over time. This can be useful for tracking the ownership history of rare or valuable NFTs and verifying the authenticity of ownership claims. - -* **Verifying ownership in a smart contract**: Smart contracts that require ownership of specific NFTs as a condition for executing certain functions can use the `getNftsForOwner` method to verify that a user owns the required NFTs. - -# Related Methods - -Here are the methods related to `getNftsForOwner`: - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsales-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsales-sdk-v3.mdx deleted file mode 100644 index 17e78745..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsales-sdk-v3.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -title: getNftSales - SDK -description: Returns NFT sales that have happened through on-chain marketplaces. -subtitle: Returns NFT sales that have happened through on-chain marketplaces. -url: https://docs.alchemy.com/reference/getnftsales-sdk-v3 -slug: reference/getnftsales-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - - - Please note that this endpoint is only available on **Ethereum (Seaport, Wyvern, X2Y2, Blur, LooksRare, Cryptopunks)**, **Polygon (Seaport) & Optimism (Seaport) mainnets** - - -# Description - -Returns NFT sales that have happened through on-chain marketplaces. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------------- | -| `options` | `object` | The optional parameters to use for the request. | - -### `options` parameters - -| parameter | type | description | -| --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fromBlock` | `number` | The block number to start fetching NFT sales data from, e.g., `latest`. | -| `toBlock` | `number` | The block number limit to fetch NFT sales data from. `latest` | -| `order` | `string` | Whether to return the results in ascending or descending order by block number. ASCENDING = `asc`, DESCENDING = `desc`. | -| `marketplace` | `string` | The NFT marketplace to filter sales by. Examples are \[SEAPORT = `seaport`, LOOKSRARE = `looksrare`, X2Y2 = `x2y2`, WYVERN' = `wyvern`, 'CRYPTOPUNKS' = `cryptopunks`, UNKNOWN = `unknown` | -| `buyerAddress` | `string` | The address of the NFT buyer to filter sales by. | -| `sellerAddress` | `string` | The address of the NFT seller to filter sales by. | -| `taker` | `string` | Filter by whether the buyer or seller was the taker in the NFT trade. Defaults to returning both buyer and seller taker trades. Available options are: \[ BUYER = `buyer`, SELLER = `seller`]. | -| `limit` | `number` | The maximum number of NFT sales to return. | -| `pageKey` | `string` | Key for pagination to use to fetch results from the next page if available. | - -# Response - -| Property | Type | Description | -| ------------------------------ | ------ | ----------------------------------------------------------------------- | -| `Promise` | object | Returns the NFT sales that have happened through on-chain marketplaces. | - -### `GetNftSalesResponse` object properties - -| Property | Type | Description | -| ---------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `nftSales` | `array of objects` | List of NFT sales that match the query. | -| `validAt` | `object` | Block Information of the block as of which the corresponding data is valid. Includes the following properties: - `blockNumber`: The block number the sale information is valid at. - `blockHash`: The block hash. Used to detect reorgs. - `blockTimestamp`: The timestamp for the block. | -| `pageKey` | `string` | The page key to use to fetch the next page if more results are available. | - -### `nftSales` properties - -| Parameter | Type | Description | -| -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `marketplace` | `string` | The marketplace the sale took place on. Currently, tracked marketplaces are Seaport, Looksrare, X2Y2, Wyvern, Blur, and Cryptopunks. For all other marketplaces, this field is unknown. | -| `marketplaceAddress` | `string` | This is the NFT marketplace address, which is the same as the `contractAddress`. | -| `contractAddress` | `string` | The NFT contract address. | -| `tokenId` | `string` | The decimal token ID of the NFT being sold. | -| `quantity` | `string` | The number of tokens sold in the sale as a decimal integer string. | -| `buyerAddress` | `string` | The address of the buyer in the NFT sale. | -| `sellerAddress` | `string` | The address of the seller in the NFT sale. | -| `taker` | `string` | Whether the price taker in the trade was the buyer or the seller. | -| `sellerFee` | `object` | The payment from the buyer to the seller. The parameters in this object include: `amount`: *string*, `symbol`: *string*, `decimals`: *number*\`. | -| `protocolFee` | `object` | The payment from the buyer to the marketplace. The parameters in this object include: `amount`: *string*, `symbol`: *string*, `decimals`: *number*\`. | -| `royaltyFee` | `object` | The payment from the buyer to the royalty address of the NFT collection. The parameters in this object include: `amount`: *string*, `symbol`: *string*, `decimals`: *number*\`. | -| `blockNumber` | `number` | The block number the NFT sale took place in. | -| `logIndex` | `number` | The log number of the sale event emitted within the block. | -| `bundleIndex` | `number` | The index of the token within the bundle of NFTs sold in the sale. | -| `transactionHash` | `string` | The `transactionHash` of the NFT sale. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return the nft sales data - const response = await alchemy.nft.getNftSales() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "nftSales": [ - { - "marketplace": "cryptopunks", - "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "tokenId": "544", - "quantity": "1", - "buyerAddress": "0x5b098b00621EDa6a96b7a476220661ad265F083f", - "sellerAddress": "0xC352B534e8b987e036A93539Fd6897F53488e56a", - "taker": "seller", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919706, - "logIndex": 25, - "bundleIndex": 0, - "transactionHash": "0xb28b5f2c186bf534e4fc4b8604b1496c9632e42269424f70ef1bdce61ea8ba52" - }, - { - "marketplace": "cryptopunks", - "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "tokenId": "3134", - "quantity": "1", - "buyerAddress": "0xC352B534e8b987e036A93539Fd6897F53488e56a", - "sellerAddress": "0x5b098b00621EDa6a96b7a476220661ad265F083f", - "taker": "buyer", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919721, - "logIndex": 9, - "bundleIndex": 0, - "transactionHash": "0x65579455ac3227e7b3db72b4e359e988bb16cae6d26c88818d1a6991b478b274" - }, - { - "marketplace": "cryptopunks", - "marketplaceAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "contractAddress": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "tokenId": "5445", - "quantity": "1", - "buyerAddress": "0x0f4023208058ecfFCb22A7409Df11F6D6013FE8A", - "sellerAddress": "0x0B30fD3a500608413837Bb025c2018933130F9DB", - "taker": "buyer", - "sellerFee": { - "amount": "130000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 4367925, - "logIndex": 71, - "bundleIndex": 0, - "transactionHash": "0xe6e1885bd2dd142c63b79df6aca0ad3213e37c3a9f01a550c30fa1b234d3c7f2" - } - ], - "validAt": { - "blockNumber": 18213475, - "blockHash": "0xc839e3f01f73b8818899bad0d043b39c6ca0c9ec2150c62a9d195796b39c61a9", - "blockTimestamp": "2023-09-25T14:44:35Z" - }, - "pageKey": "NDM2ODAyNSw3Miww" - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftSales` method: - -* **NFT market analysis**: By using `getNftSales`, users can retrieve data about the sales of various NFTs on the blockchain network. This data can be used to analyze market trends and understand the popularity of specific NFTs. Investors and traders can use this information to make informed decisions about buying or selling NFTs. - -* **Royalty calculation**: NFTs often include royalty clauses that enable creators to receive a percentage of the sale price every time the NFT is sold. `getNftSales` can be used to retrieve information about all the sales of a specific NFT, allowing creators to calculate their royalty payments accurately. - -* **Proof of ownership**: `getNftSales` can be used to verify an NFT's ownership by checking its sales history. This can be helpful in cases where the ownership of an NFT is disputed or when verifying the authenticity of an NFT. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforcontract-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforcontract-sdk-v3.mdx deleted file mode 100644 index 6706504b..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforcontract-sdk-v3.mdx +++ /dev/null @@ -1,290 +0,0 @@ ---- -title: getNftsForContract -SDK -description: Get all NFTs for a given contract address. This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the options parameter. -subtitle: Get all NFTs for a given contract address. This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the options parameter. -url: https://docs.alchemy.com/reference/getnftsforcontract-sdk-v3 -slug: reference/getnftsforcontract-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all NFTs for a given contract address. - -This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the `options` by setting `omitMetadata` to `true`parameter. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT contract. | -| `options` | `object` | The parameters to use for the request. | - -#### `options` parameters - -| Property | Type | Description | -| --------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageKey?` | `string` | Optional page key from an existing `OwnedBaseNftsResponse` or `OwnedNftsResponse` to use for pagination. | -| `pageSize` | `number` | Sets the total number of NFTs to return in the response. Defaults to 100. Maximum page size is **100**. | -| `omniMetadata` | `boolean` | `Optional` boolean flag to omit NFT metadata. Defaults to `false`. | -| `tokenUriTimeoutInMs` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want only to access the cache and not live fetch any metadata for cache misses then set this value to `0`. | - -# Response - -| Property | Type | Description | -| ----------------------------------------------------------------- | -------- | ------------------------- | -| `Promise` | `object` | The NFTs for the contract | - -## `NftContractNftsResponse` object properties - -| Property | Type | Description | -| --------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | `array of objects` | An array of objects containing NFTs with their respective metadata. | -| `pageKey` | `string` | Pagination token that can be passed into another request to fetch the next NFTs. If there is no page key, then there are no more NFTs to fetch. | - -### `nfts` properties - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN` | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | - -## `NftContractBaseNftsResponse` object properties - -| Property | Type | Description | -| --------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `nfts` | `array of objects` | An array of objects containing NFTs with their respective metadata. | -| `pageKey` | `string` | Pagination token that can be passed into another request to fetch the next NFTs. If there is no page key, there are no more NFTs to fetch. | - -### `nfts` properties - -The `nfts` object does not hold any metadata information and only contains the contract address and token ID. This is achieved by setting the `options` **omitMetadata** parameter to `true`. - -| Property | Type | Description | -| ----------------- | -------- | -------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | The NFT token ID as an integer string. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address whose NFTs you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch metadata - const response = await alchemy.nft.getNftsForContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "nfts": [ - { - "contract": { - "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F", - "deployedBlockNumber": 13950908, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "collectionSlug": "undeadwarriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format", - "lastIngestedAt": "2023-09-17T10:13:28.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "0", - "tokenType": "ERC1155", - "name": "Undead Warrior #0", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "tokenUri": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/a31b9e2703540f70e3c15478d449162b", - "contentType": "image/png", - "size": 1458749, - "originalUrl": "https://ipfs.io/ipfs/QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png" - }, - "raw": { - "tokenUri": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/0", - "metadata": { - "date": 1659652582322, - "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/0.png", - "website": "https://undeadwarriors.io", - "dna": "d297klq0913j20c9l51nw51m2h68hgvfa539ut10", - "name": "Undead Warrior #0", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "edition": 0, - "attributes": [ - { - "value": "PastHistory", - "trait_type": "Background" - }, - { - "value": "Security", - "trait_type": "Rank" - } - ], - "compiler": "Black Badge: V.01A" - } - }, - "collection": { - "name": "Undead Warriors", - "slug": "undeadwarriors", - "externalUrl": "http://undeadwarriors.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-17T09:58:57.133Z" - }, - { - "contract": { - "address": "0x61fcE80D72363B731425c3A2A46a1A5fed9814B2", - "name": "CyborgMercenariesCm", - "symbol": "CYBORG", - "totalSupply": "8039", - "tokenType": "ERC1155", - "contractDeployer": "0xd32bB311467060ceC58Cd6e9b37134CA6d81377F", - "deployedBlockNumber": 13950908, - "openSeaMetadata": { - "floorPrice": 0.001, - "collectionName": "Undead Warriors", - "collectionSlug": "undeadwarriors", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format", - "description": "Core Team\nhttps://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\nUndead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n\n", - "externalUrl": "http://undeadwarriors.io", - "twitterUsername": "undead_warriors", - "discordUrl": "https://discord.gg/qjZbJMPS86", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format", - "lastIngestedAt": "2023-09-17T10:13:28.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "353", - "tokenType": "ERC1155", - "name": "Undead Warrior #353", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "tokenUri": "https://ipfs.io/ipfs/QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/f72c8a8a4aa69dc8ac340a619289451f", - "contentType": "image/png", - "size": 1645083, - "originalUrl": "https://ipfs.io/ipfs/QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png" - }, - "raw": { - "tokenUri": "ipfs://QmSodrnHXf2sd3Cd61tzNdn7MpaHqe116KvGx2NS8Qzg1i/353", - "metadata": { - "date": 1659653043027, - "image": "ipfs://QmeNdyrTRGyVr6YvXPZHy1DPtwq3V8zZGzkzU145r5xcqa/353.png", - "website": "https://undeadwarriors.io", - "dna": "aa09f30b73d7fa23c636ff2734f9e7b48d2ce1b1", - "name": "Undead Warrior #353", - "description": "Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.", - "edition": 353, - "attributes": [ - { - "value": "LaunchBay", - "trait_type": "Background" - }, - { - "value": "Warrior", - "trait_type": "Rank" - } - ], - "compiler": "Black Badge: V.01A" - } - }, - "collection": { - "name": "Undead Warriors", - "slug": "undeadwarriors", - "externalUrl": "http://undeadwarriors.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/bbb358656434031a1b9c27873a72b13e.png?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-21T12:33:14.542Z" - } - ], - "pageKey": "0x0162" - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftsForContract` method: - -* **NFT marketplace integration**: An NFT marketplace could use the `getNftsForContract` method to display all the NFTs associated with a particular contract address. This would allow users to browse and search for NFTs on the marketplace easily. - -* **Portfolio tracking**: NFT collectors or investors could use the `getNftsForContract` method to track their NFT holdings associated with a specific contract address. This could be particularly useful for investors who are interested in tracking the performance of specific NFT projects or creators. - -* **Gaming applications**: Gaming applications that use NFTs could use the `getNftsForContract` method to retrieve all the NFTs associated with a particular game or game studio. This could help developers create more immersive gaming experiences and reward players with unique NFTs for their in-game achievements. - -# Related Methods - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforcontractiterator-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforcontractiterator-sdk-v3.mdx deleted file mode 100644 index 47e68556..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforcontractiterator-sdk-v3.mdx +++ /dev/null @@ -1,220 +0,0 @@ ---- -title: getNftsForContractIterator - SDK -description: Fetches all NFTs for a given contract address and yields them in an async iterable. This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. -subtitle: Fetches all NFTs for a given contract address and yields them in an async iterable. This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. -url: https://docs.alchemy.com/reference/getnftsforcontractiterator-sdk-v3 -slug: reference/getnftsforcontractiterator-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Fetches all NFTs for a given contract address and yields them in an async iterable. - -This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the `options` parameter by setting `omitMetadata` to `true` in the body of the request. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT contract. | -| `options` | `object` | The optional parameters to use for the request. | - -### `options` parameters - -| Property | Type | Description | -| --------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageKey?` | `string` | `Optional` page key from an existing `OwnedBaseNftsResponse` or `OwnedNftsResponse` to use for pagination. | -| `pageSize?` | `number` | Sets the total number of NFTs to return in the response. It defaults to **100**. Maximum page size is **100**. | -| `omitMetadata?` | `boolean` | `Optional` boolean flag to omit NFT metadata. Defaults to `false`. | -| `tokenUriTimeoutInMs` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want only to access the cache and not live fetch any metadata for cache misses, then set this value to `0`. | - -# Response - -| Property | Type | Description | -| ------------------------------- | -------- | ------------------------- | -| `AsyncIterable` | `object` | The NFTs for the contract | - -## `Nft` response properties - -| Property | Type | Description | -| ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `arrray` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN` | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | - -## `BaseNft` response properties - -Alchemy's representation of an NFT that doesn't contain metadata. The `BaseNft` object does not hold any metadata information and only contains the NFT contract and token ID. This is gotten by setting the `options` **omitMetadata** parameter to `true`. - -| Property | Type | Description | -| ----------------- | -------- | -------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | The NFT token ID as an integer string. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address whose NFTs you want to fetch - const contractAddress = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - // create an async generator function that uses the getNftsForContractIterator method - async function getNftsForContract() { - try { - let nfts = []; - // Get the async iterable for the contract's NFTs. - const nftsIterable = alchemy.nft.getNftsForContractIterator(contractAddress); - - // Iterate over the NFTs and add them to the nfts array. - for await (const nft of nftsIterable) { - nfts.push(nft); - } - - // Log the NFTs. - console.log(nfts); - } catch (error) { - console.log(error); - } - } - - // call the async generator function - getNftsForContract(); - - }; - - main(); - ``` - - -## Response - - - ```json json - [ - { - "contract": { - "address": "0xe785E82358879F061BC3dcAC6f0444462D4b5330", - "name": "World Of Women", - "symbol": "WOW", - "totalSupply": "10000", - "tokenType": "ERC721", - "contractDeployer": "0xc9b6321dc216D91E626E9BAA61b06B0E4d55bdb1", - "deployedBlockNumber": 12907782, - "openSeaMetadata": { - "floorPrice": 0.6021, - "collectionName": "World of Women", - "collectionSlug": "world-of-women-nft", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/8604de2d9aaec98dd389e3af1b1a14b6.gif?w=500&auto=format", - "description": "World of Women is a collection of 10,000 NFTs that gives you full access to our network of artists, creators, entrepreneurs, and executives who are championing diversity and equal opportunity on the blockchain.\n\nCreated and illustrated by Yam Karkai (@ykarkai), World of Women has made prominent appearances at Christie's, The New Yorker and Billboard.\n\nJoin us to receive exclusive access to NFT drops, experiences, and much more.\n\nThe Time is WoW.", - "externalUrl": "http://worldofwomen.art", - "twitterUsername": "worldofwomennft", - "discordUrl": "https://discord.gg/worldofwomen", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format", - "lastIngestedAt": "2023-09-18T12:28:27.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "44", - "tokenType": "ERC721", - "name": "WoW #44", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/9316855d8f60a32cd44aa71f07cd7dc1", - "contentType": "image/png", - "size": 105117, - "originalUrl": "https://ipfs.io/ipfs/QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi" - }, - "raw": { - "tokenUri": "ipfs://QmTNBQDbggLZdKF1fRgWnXsnRikd52zL5ciNu769g9JoUP/44", - "metadata": { - "name": "WoW #44", - "image": "ipfs://QmUkdJKCsV8ixm2eDLJGosH8Bntwwx942YXxfuF9yXPBzi", - "attributes": [ - { - "value": "Green Orange", - "trait_type": "Background" - }, - { - "value": "Slight Smile", - "trait_type": "Mouth" - }, - { - "value": "Purple", - "trait_type": "Lips Color" - } - ] - } - }, - "collection": { - "name": "World of Women", - "slug": "world-of-women-nft", - "externalUrl": "http://worldofwomen.art", - "bannerImageUrl": "https://i.seadn.io/gae/GHhptRLebBOWOy8kfXpYCVqsqdes-1-6I_jbuRnGTHHW6TD63CtciH75Dotfu2u8v6EmkWt-tjhkFRVLxRUwgMfKqqy5W24AolJayeo?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T13:25:41.833Z" - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftsForContractIterator` method: - -* **Marketplace platforms**: Marketplace platforms that enable buying and selling of NFTs often require the ability to search for specific NFTs based on contract addresses. The `getNftsForContractIterator` method can be used to retrieve all NFTs associated with a given contract, allowing users to browse and search for NFTs from a particular collection. - -* **Wallet applications**: Wallet applications that support NFTs may need to display all the NFTs owned by a user for a particular contract. The `getNftsForContractIterator` method can be used to retrieve all NFTs associated with a specific contract that is owned by a given address. - -* **NFT explorer tools**: NFT explorer tools allow users to browse and search for NFTs on the blockchain. These tools often require the ability to query the blockchain for NFTs associated with a specific contract. The `getNftsForContractIterator` method can be used to retrieve all NFTs associated with a given contract, which can then be displayed and searched through an explorer tool. - -# Related Methods - -* [getNftsForOwnerIterator](/reference/getnftsforowneriterator-sdk): Fetches all NFTs for a given owner and yields them in an async iterable. - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforowneriterator-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforowneriterator-sdk-v3.mdx deleted file mode 100644 index 357da70f..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getnftsforowneriterator-sdk-v3.mdx +++ /dev/null @@ -1,481 +0,0 @@ ---- -title: getNftsForOwnerIterator - SDK -description: Fetches all NFTs for a given owner and yields them in an async iterable. This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the options parameter in the request's body. -subtitle: Fetches all NFTs for a given owner and yields them in an async iterable. This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the options parameter in the request's body. -url: https://docs.alchemy.com/reference/getnftsforowneriterator-sdk-v3 -slug: reference/getnftsforowneriterator-sdk-v3 ---- - -Fetches all NFTs for a given owner and yields them in an async iterable. This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the `options` parameter in the request's body. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Fetches all NFTs for a given owner and yields them in an async iterable. - -This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the `options` parameter by setting `omitMetadata` to `true` in the body of the request. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------------- | -| `owner` | `string` | The address of the owner. | -| `options` | `string` | The optional parameters to use for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `contractAddresses?` | `array of strings` | `Optional` list of contract addresses to filter the results by. Limit is 45. | -| `omitMetadata?` | `boolean` | `Optional` boolean flag to omit NFT metadata. Defaults to `false`. To return the response as shown in [OwnedBaseNftsResponse](#ownedbasenftsresponse-object-parameters), set this parameter to `true`. | -| `excludeFilters?` | `string` | `Optional` list of filters applied to the query. NFTs that match one or more of these filters are excluded from the response. Available options include: `SPAM`, `AIRDROPS`. | -| `includeFilters?` | `string` | `Optional` list of filters applied to the query. NFTs that match one or more of these filters are included in the response. Available options include: `SPAM`, `AIRDROPS`. | -| `pageSize?` | `number` | Sets the total number of NFTs to return in the response. Defaults to **100**. Maximum page size is **100**. | -| `tokenUriTimeoutInMs?` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want only to access the cache and not live to fetch any metadata for cache misses, then set this value to `0`. | -| `orderBy?` | `string` | Order in which to return results. By default, results are ordered by contract address and token ID in lexicographic order. The available option is `TRANSFERTIME`. | -| `pageKey?` | string | Optional page key to use for pagination. | - -# Response - -| Property | Type | Description | -| ------------------------------------------ | -------- | -------------------------------------------- | -| `AsyncIterable ` | `object` | An object containing nfts owned by an owner. | - -## `OwnedNft` response object properties - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN` | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `balance` | `string` | The token balance indicating how many units of this NFT the owner holds. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | - -## `OwnedBaseNft` response object properties - -The `ownedBaseNft` response object is returned when the `options` parameter `omitMetadata` is set to `true`. - -| Property | Type | Description | -| ----------------- | -------- | ----------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `balance` | `string` | The token balance indicating how many units of this NFT the owner holds. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the owner address whose NFTs you want to fetch - const owner = "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8"; - - // create an async generator function that uses the getNftsForOwnerIterator method - async function getNftsForOwner() { - try { - let nfts = []; - // Get the async iterable for the owner's NFTs. - const nftsIterable = alchemy.nft.getNftsForOwnerIterator(owner); - - // Iterate over the NFTs and add them to the nfts array. - for await (const nft of nftsIterable) { - nfts.push(nft); - } - - // Log the NFTs. - console.log(nfts); - } catch (error) { - console.log(error); - } - } - - getNftsForOwner(); - }; - - main(); - ``` - - -## Response - - - ```json json - [ - { - "contract": { - "address": "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d", - "name": "CryptoKitties", - "symbol": "CK", - "totalSupply": "2023232", - "tokenType": "ERC721", - "contractDeployer": "0xba52c75764d6F594735dc735Be7F1830CDf58dDf", - "deployedBlockNumber": 4605167, - "openSeaMetadata": { - "floorPrice": 0.006, - "collectionName": "CryptoKitties", - "collectionSlug": "cryptokitties", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg?w=500&auto=format", - "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.", - "externalUrl": "https://www.cryptokitties.co/", - "twitterUsername": "CryptoKitties", - "discordUrl": "https://discord.gg/cryptokitties", - "bannerImageUrl": "https://i.seadn.io/gcs/static/banners/cryptokitties-banner2.png?w=500&auto=format", - "lastIngestedAt": "2023-09-18T00:29:33.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "1289657", - "tokenType": "ERC721", - "name": "Nala", - "tokenUri": "https://api.cryptokitties.co/v3/kitties/1289657", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/5bd85609cdacb4214faab3d08e13bd9f", - "contentType": "image/svg+xml", - "size": 63131, - "originalUrl": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg" - }, - "raw": { - "tokenUri": "https://api.cryptokitties.co/v3/kitties/1289657", - "metadata": { - "birthday": "2018-12-16T00:00:00.000Z", - "hatched": true, - "enhanced_cattributes": [ - { - "description": "spock", - "position": 5850, - "type": "pattern", - "kittyId": 680104 - }, - { - "description": "se7", - "position": -1, - "type": "secret", - "kittyId": 1289657 - } - ], - "color": "cyan", - "created_at": "2018-12-16T08:12:41.000Z", - "bio": "En Taro Adun! I'm Nala. I am currently trying to start my own company making berets for tripod kitties. I combine the best qualities of Ryan Gosling, Benjamin Franklin, and Raekwon. I can tell you like to get into trouble.", - "language": "en", - "auction": {}, - "offer": {}, - "children": [ - { - "generation": 14, - "owner": { - "address": "0x002781a27becd321d831d815e3fa386944b329c8" - }, - "hatched": true, - "enhanced_cattributes": [], - "color": "cyan", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "is_exclusive": false, - "created_at": "2018-12-16T10:31:23.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "kitty_type": "fancy", - "fancy_type": "Pawrula", - "name": "Pawrula The Bright", - "owner_wallet_address": "0x002781a27becd321d831d815e3fa386944b329c8", - "id": 1290051, - "is_fancy": true, - "wrapped": true, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1290051.png", - "status": { - "is_ready": true, - "cooldown": 1527648022509, - "is_gestating": false - } - }, - { - "generation": 14, - "owner": { - "address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b" - }, - "hatched": true, - "enhanced_cattributes": [ - { - "description": "soserious", - "position": -1, - "type": "mouth", - "kittyId": 1903269 - }, - { - "description": "doridnudibranch", - "position": 132, - "type": "coloreyes", - "kittyId": 680079 - } - ], - "color": "doridnudibranch", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg", - "is_exclusive": false, - "created_at": "2020-04-23T22:10:56.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.png", - "name": "Fressbert", - "owner_wallet_address": "0x65e10a29e0bf9bfda353ab3d44fe127bf2e09a4b", - "id": 1903269, - "is_fancy": false, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1903269.svg", - "status": { - "is_ready": true, - "cooldown": 1607028977617, - "is_gestating": false - } - } - ], - "id": 1289657, - "is_fancy": false, - "wrapped": true, - "generation": 13, - "owner": { - "address": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "hasDapper": false - }, - "genes": "508101394017420297960203117038449397458346282085579186181678174847507224", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg", - "is_prestige": false, - "is_exclusive": false, - "is_special_edition": false, - "purrs": { - "count": 1, - "is_purred": false - }, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.png", - "hatcher": { - "image": "5", - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "hasDapper": false, - "nickname": "Kitten Mittens LLC 10D 10K 10H" - }, - "background_color": "#c5eefa", - "name": "Nala", - "matron": { - "generation": 12, - "owner": { - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f" - }, - "hatched": true, - "enhanced_cattributes": [ - { - "description": "soserious", - "position": -1, - "type": "mouth", - "kittyId": 1289248 - }, - { - "description": "chronic", - "position": 87, - "type": "eyes", - "kittyId": 468466 - }, - { - "description": "topaz", - "position": -1, - "type": "coloreyes", - "kittyId": 1289248 - } - ], - "color": "topaz", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg", - "is_exclusive": false, - "created_at": "2018-12-16T05:37:33.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.png", - "name": "Sergeant Delibinky", - "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "id": 1289248, - "is_fancy": false, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289248.svg", - "status": { - "is_ready": true, - "cooldown": 1521350296999, - "is_gestating": false - } - }, - "sire": { - "generation": 12, - "owner": { - "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f" - }, - "hatched": true, - "enhanced_cattributes": [], - "color": "topaz", - "image_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "is_exclusive": false, - "created_at": "2018-12-16T06:15:48.000Z", - "is_special_edition": false, - "image_url_png": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "kitty_type": "fancy", - "fancy_type": "Pawrula", - "name": "Pawrula The Bright", - "owner_wallet_address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", - "id": 1289336, - "is_fancy": true, - "wrapped": false, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289336.png", - "status": { - "is_ready": true, - "cooldown": 1521366384221, - "is_gestating": false - } - }, - "image_url_cdn": "https://img.cn.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1289657.svg", - "watchlist": { - "count": 0, - "is_watchlisted": false - }, - "status": { - "is_ready": true, - "cooldown_end_block": 9932251, - "cooldown": 1571707809089, - "dynamic_cooldown": 1595681023241, - "cooldown_index": 8, - "is_gestating": false - } - } - }, - "collection": { - "name": "CryptoKitties", - "slug": "cryptokitties", - "externalUrl": "https://www.cryptokitties.co/", - "bannerImageUrl": "https://i.seadn.io/gcs/static/banners/cryptokitties-banner2.png?w=500&auto=format" - }, - "mint": {}, - "timeLastUpdated": "2023-09-18T19:21:52.169Z", - "balance": "1", - "acquiredAt": {} - }, - { - "contract": { - "address": "0xEA67b4DD7BaCAE340Bc4E43652044B5CDED1963c", - "name": "Moonkys", - "symbol": "MOONK", - "totalSupply": "8968", - "tokenType": "ERC721", - "contractDeployer": "0x94f65107EB422c67E61588682Fcf9D85AaC940B8", - "deployedBlockNumber": 14045176, - "openSeaMetadata": { - "floorPrice": 0.0019, - "collectionName": "The MoonkysNFT", - "collectionSlug": "the-moonkysnft", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/HagE-EZ6Wrf5Odw56FjtlSmfFvyEAz5Vg1p76yH-ARh_erNiiWMknrktD7mphF_9QRP_SOzx_Gmm1HrgFv9reHr6eMBxh4FWUg2j5A?w=500&auto=format", - "description": "A collection of 9000 Moonkys!\r\nAll different, all endearing, from the jungle to the moon and beyond.", - "externalUrl": "https://www.moonkys.art", - "twitterUsername": "MoonkysNFT", - "discordUrl": "https://discord.gg/8sZyt3SNUY", - "bannerImageUrl": "https://i.seadn.io/gae/NwDkjH5GU0DsDmQUUnkHk0i6gQcil-pNMPs9su9r2V_mgsTjgBhbg1YM9450riZYsxTAE9HlbDd0R269vfTDVrCZDkN4S_m5hH-5qQ?w=500&auto=format", - "lastIngestedAt": "2023-09-18T05:52:19.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "2378", - "tokenType": "ERC721", - "name": "Moonky #2378", - "description": "A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.", - "tokenUri": "https://ipfs.io/ipfs/QmThsntJV1wZuF3HdvYWG9QkVVSW1WwU5TZrCH36skCe21/2378", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/a29980483f4257bde13a28906ca87267", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a29980483f4257bde13a28906ca87267", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/a29980483f4257bde13a28906ca87267", - "contentType": "image/png", - "size": 233824, - "originalUrl": "https://ipfs.io/ipfs/QmRmquSbLpiYRd8nCURUmP2fJ9LbaEtG3tJLGGscFp1WAT" - }, - "raw": { - "tokenUri": "https://ipfs.io/ipfs/QmThsntJV1wZuF3HdvYWG9QkVVSW1WwU5TZrCH36skCe21/2378", - "metadata": { - "name": "Moonky #2378", - "description": "A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.", - "image": "https://ipfs.io/ipfs/QmRmquSbLpiYRd8nCURUmP2fJ9LbaEtG3tJLGGscFp1WAT", - "attributes": [ - { - "value": "Orange", - "trait_type": "Background" - }, - { - "value": "Cobra Kai", - "trait_type": "Hat" - } - ], - "external_link": "https://www.moonkys.art" - } - }, - "collection": { - "name": "The MoonkysNFT", - "slug": "the-moonkysnft", - "externalUrl": "https://www.moonkys.art", - "bannerImageUrl": "https://i.seadn.io/gae/NwDkjH5GU0DsDmQUUnkHk0i6gQcil-pNMPs9su9r2V_mgsTjgBhbg1YM9450riZYsxTAE9HlbDd0R269vfTDVrCZDkN4S_m5hH-5qQ?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xffa6c931719cf546df7e48010bde2b0fd0bfc431", - "blockNumber": 15108732, - "timestamp": "2022-07-09T13:47:51Z", - "transactionHash": "0xce02924d42c0d6f1e5144bbfea8a49fc4fb0330a42782ac8c7c00b7d10b8a4c4" - }, - "timeLastUpdated": "2023-08-01T07:40:39.116Z", - "balance": "1", - "acquiredAt": {} - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftsForOwnerIterator` method: - -* **NFT marketplace platforms**: NFT marketplace platforms can use this method to retrieve a list of all NFTs owned by a user and display them on the user's profile page. This can help users keep track of their NFTs and make it easier to sell or trade their NFTs on the platform. - -* **Asset management**: Companies or individuals who own many NFTs can use this function to keep track of their assets on the blockchain. They can use this function to retrieve a list of all the NFTs they own and their corresponding metadata. - -* **Gaming platforms**: Gaming platforms that use NFTs as in-game assets can use this function to retrieve a list of all NFTs owned by a player's account. This can be useful for players to keep track of their in-game assets and also for game developers to design games around NFT ownership. - -# Related Methods - -* [getNftsForContractIterator](/reference/getnftsforcontractiterator-sdk): Fetches all NFTs for a given contract address and yields them in an async iterable. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getownersforcontract-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getownersforcontract-sdk-v3.mdx deleted file mode 100644 index a169e183..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getownersforcontract-sdk-v3.mdx +++ /dev/null @@ -1,170 +0,0 @@ ---- -title: getOwnersForContract - SDK -description: Gets all the owners for a given NFT contract and the token balance. -subtitle: Gets all the owners for a given NFT contract and the token balance. -url: https://docs.alchemy.com/reference/getownersforcontract-sdk-v3 -slug: reference/getownersforcontract-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets all the owners for a given NFT contract along with the token balance. - -Note that token balances are omitted by default. To include token balances for each owner, use [GetOwnersForContractWithTokenBalancesOptions](#getownersforcontractwithtokenbalancesoptions-parameters), which has the `withTokenBalances` field set to `true`. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `contractAddress` | `string` | The NFT contract to get the owners for. | -| `options` | `object` | Optional parameters to use for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | -| `withTokenBalances` | `boolean` | Whether to include the token balances per token id for each owner. Defaults to `false` when omitted. | -| `pageKey?` | `string` | `Optional` page key to paginate the next page for large requests. | -| `includeCount?` | `boolean` | If true, include the total count of owners in the response. Only applicable when `withTokenBalances` is not set to `true`. | - -### `GetOwnersForContractWithTokenBalancesOptions` parameters - -| Parameter | Type | Description | -| ------------------- | --------- | ----------------------------------------------------------------- | -| `withTokenBalances` | `boolean` | This parameter must be set to `true` to include token balances. | -| `pageKey` | `string` | `Optional` page key to paginate the next page for large requests. | - -# Response - -| Property | Type | Description | -| ------------------------------------------------------------------------------------------ | -------- | ---------------------------------------------- | -| `Promise \| ` | `object` | An object containing the owners of a contract. | - -## `GetOwnersForContractResponse` object properties - -| Property | Type | Description | -| ------------- | ------------------ | ----------------------------------------------------------------------------------- | -| `owner` | `array of strings` | An array of owner addresses for the provided contract address. | -| `totalCount?` | `number` | Total count of unique owners. Only present if `includeCount` is true. | -| `pageKey?` | `string` | `Optional` Page key that is returned when a collection has more than 50,000 owners. | - -## `GetOwnersForContractWithTokenBalancesResponse` object properties - -| Property | Type | Description | -| ---------- | ------------------ | ----------------------------------------------------------------------------------- | -| `owner` | `array of objects` | An array of owner addresses for the provided contract address. | -| `pageKey?` | `string` | `Optional` Page key that is returned when a collection has more than 50,000 owners. | - -### `owner` properties - -| Property | Type | Description | -| --------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ownerAddress` | `string` | The NFT's owner address. | -| `tokenBalances` | `array of objects` | A list of objects containing token balances for the provided NFT contract. The parameters in the object include: 1. `tokenId: string`: The token id owned in the NFT contract. 2. ` balance: string`: The token id balance for the provided owner. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch the owners for the contract - const response = await alchemy.nft.getOwnersForContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "owners": [ - "0x001a61213D72F2F3C95Ff743c80f472749AB8ad3", - "0x003a1aCce28eb335F3FF1E93A5B09cD4b598EF62", - "0x00614Efd868DAbB5f92E15b0440D1F85ac0f9be1", - "0x006F48D6eD87eFD9e0BC56cC7a8703D0455C2858", - "0x008B7903F1f0B825636739c7a3defb7EEbc94F1D", - "0x008c79F10CBd14070b106b05d5Fd494e084EE8A5", - "0x00Ce8F7e0EC4F03a821E8CB3D84479D76151D0A9", - "0x00f3a0fcC47ba9f7A757C255aaa6A286a524ceF9", - "0x016c6422B74463834514394B7207478982139bB4", - "0x016DF42305bb3D0E21abF75b456a4Babb1777A4B", - "0x01882145348B9908f803740e547EfbaD0983cDcB", - "0x018eDC98B3190DbB261E6Ff3858c4BA59c71Ba94", - "0x019D99678BD3B9F1157E763398a3Dd62cb760A23", - "0x01aE3e9Aa99F080b59D3A02EE40478af8b3d63c1", - "0x01E4cF06C6ADb9231a30Ca17f4A62afE23c0A9c1", - "0x01E6357045328fA19C11994af6a4500754E6a75b", - "0x02070ed234F1a07cA88F6164791e033C97570d96", - "0x0207A5cFc75733D82f2dd5A8b6adf78277EF7347", - "0x025DCA13f8803Ed01B3Ea717e2Ee9DaF7A383cDa", - "0x02B92b2254c27beD8d4268e663200f705bC76E35", - "0x02f52b4aF1deCD963a3f0586D28484F530bdC101", - "0x02fe09e15f1fEAEf2E4Dd4b7afd5A12630f1fae6", - "0x034C8f85476f2D30c946e3CE5929BC24e8D3B04F", - "0x037C8b05C9Ffe5e33B99372d17580C0C915AFa60", - "0x037FC3F7f58771CbcC4C32327814769FBF5A8F3F", - "0x038080B8BF89847Ca926F9731695859d9c55A4C6", - "0xffcEBF6Be845b95CFD42e77c65968662BC8F9f2F" - ] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getOwnersForContract` function: - -* **Portfolio tracking**: The `getOwnersForContract` method can be used to track a user's portfolio of NFTs from a specific contract. This information can be used to display the user's NFT holdings and their current market value. - -* **Marketplace analytics**: NFT marketplaces can use the `getOwnersForContract` method to analyze the ownership distribution of NFTs from a particular contract. This information can be used to identify trends and inform marketplace strategies. - -* **Royalty tracking**: Similar to the `getOwnersForNft` method, the `getOwnersForContract` method can be used to track the ownership of NFTs representing intellectual property, such as music or art, and ensure that royalties are paid to the correct parties. - -* **Fraud prevention**: The `getOwnersForContract` method can also be used to detect potential fraudulent activity. For example, if many NFTs from a specific contract are being rapidly and frequently transferred to different wallet addresses, it may be a sign of a fraudulent transaction. - -# Related Methods - -Here are the methods related to `getOwnersForContract`: - -* [getOwnersForNft](/reference/getownersfornft-sdk): Gets all the owners for a given NFT contract address and token ID. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getownersfornft-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getownersfornft-sdk-v3.mdx deleted file mode 100644 index 28210393..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getownersfornft-sdk-v3.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: getOwnersForNft - SDK -description: Gets all the owners for a given NFT contract address and token ID. -subtitle: Gets all the owners for a given NFT contract address and token ID. -url: https://docs.alchemy.com/reference/getownersfornft-sdk-v3 -slug: reference/getownersfornft-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets all the owners for a given NFT contract address and token ID. - -# Parameters - -| Property | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | Token id of the NFT. | -| `options?` | `object` | Optional parameters to use for the request. | - -### `options` parameters - -| Property | Type | Description | -| ---------- | -------- | --------------------------------------------------------------- | -| `pageKey` | `string` | Optional page key to paginate the next page for large requests. | -| `pageSize` | `number` | Sets the total number of owners to return in the response. | - -# Response - -| Property | Type | Description | -| ---------------------------------- | -------- | ---------------------------------------------------------------------- | -| `Promise` | `object` | An object that returns all the owners for a given NFT contract address | - -## `GetOwnersForNftResponse` object properties - -| Property | Type | Description | -| --------- | ------------------ | --------------------------------------------------- | -| `owners` | `array of strings` | An array of owner addresses for the provided token. | -| `pageKey` | `string` | Describes the page key. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and token Id w - const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - const tokenId = "1590"; - - //Call the method to fetch the owners for the collection - const response = await alchemy.nft.getOwnersForNft(address, tokenId) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "owners": [ - "0xF5FFF32CF83A1A614e15F25Ce55B0c0A6b5F8F2c" - ], - "pageKey": null - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getOwnersForNft` method: - -* **Royalty tracking**: NFTs can be used to represent intellectual property, such as music or art. The `getOwnersForNft` method can be used to track the ownership of the NFT and ensure that royalties are paid to the correct parties. - -* **Fraud prevention**: The `getOwnersForNft` method can be used to detect potential fraudulent activity. For example, if the ownership of an NFT changes rapidly and frequently, it may be a sign of a fraudulent transaction. - -# Related Methods - -Here are the methods related to `getOwnersForNft`: - -* [getNftMetadata](/reference/getnftmetadata-sdk): Gets the metadata associated with a given NFT. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getspamcontracts-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/getspamcontracts-sdk-v3.mdx deleted file mode 100644 index 71797947..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/getspamcontracts-sdk-v3.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: getSpamContracts -SDK -description: Returns a list of all spam contracts marked by Alchemy. -subtitle: Returns a list of all spam contracts marked by Alchemy. -url: https://docs.alchemy.com/reference/getspamcontracts-sdk-v3 -slug: reference/getspamcontracts-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns a list of all spam contracts marked by Alchemy. For details on how Alchemy marks spam contracts, go to [this link](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification). - -# Response - -| Property | Type | Description | -| ----------------------------------- | -------- | ------------------------------------ | -| `Promise` | `object` | A list of identified spam contracts. | - -### `GetSpamContractsResponse` object properties - -| Property | Type | Description | -| ------------------- | ------------------ | --------------------------------------------- | -| `contractAddresses` | `array of strings` | An array containing a list of spam contracts. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return a list of spam contracts - const response = await alchemy.nft.getSpamContracts() - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "contractAddresses": [ - "0x000000000A42C2791eEc307FFf43Fa5c640e3Ef7", - "0x000294F162Dc337Cf060AC6e2Cb7Db8c8F544004", - "0x000386E3F7559d9B6a2F5c46B4aD1A9587D59Dc3", - "0x00050657890966fc261113DBa4c277d9cb204E52", - "0x0009498dD5a13679aC11927e4BAE78C154Fcf754", - "0x000D398c50EA4D0681E6a224749C94334d606Ba2", - "0x000Fb295d38c01051e37e65F3034dD4F02267c96", - "0x0015F391949f25c3211063104aD4AFC99210f85c", - "0x001757861e8233C5a288411dDbf17378e724DD0C", - "0x001AC203aFB48600f5a7D9b524145AC075f648aF", - "0x001f561C73555005a7f22e2ae9CB785cf37Cc3B9", - "0xfFf9e4b5Cf4b0F0fF83BbA48Ee5A88772Cd258B9" - ] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getSpamContracts` method: - -* **Anti-spam measures**: `getSpamContracts` could be used to identify and flag contracts or agreements likely to be spam or fraudulent. For example, a system could use machine learning algorithms to analyze contracts and agreements for patterns and characteristics commonly associated with spam or fraudulent activity. - -* **Contract management**: `getSpamContracts` could be used to manage and organize many contracts or agreements. By identifying contracts that are unlikely to be legitimate, the system could prioritize the review and processing of valid contracts. - -* **Legal compliance**: `getSpamContracts` could be part of a compliance process to ensure that all contracts and agreements meet legal and regulatory requirements. By identifying potential spam or fraudulent contracts, the system could prevent violations of legal and regulatory frameworks. - -# Related Methods - -* [isSpamContract](/reference/isspamcontract-sdk) - Returns whether a contract is marked as spam or not by Alchemy. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/gettransfersforcontract-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/gettransfersforcontract-sdk-v3.mdx deleted file mode 100644 index d06614b2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/gettransfersforcontract-sdk-v3.mdx +++ /dev/null @@ -1,307 +0,0 @@ ---- -title: getTransfersForContract - SDK -description: The getTransfersForContract method gets all NFT transfers for a given NFT contract address. -subtitle: The getTransfersForContract method gets all NFT transfers for a given NFT contract address. -url: https://docs.alchemy.com/reference/gettransfersforcontract-sdk-v3 -slug: reference/gettransfersforcontract-sdk-v3 ---- - -The `getTransfersForContract` method gets all NFT transfers for a given NFT contract address. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`getTransfersForContract` gets all NFT transfers for a given NFT contract address. - -# Parameters - -| Name | Type | Description | Example | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | -| `contractAddress` | `string` | The NFT contract address to get transfers for. | `"0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"` | -| `options?` | `object` | An optional object with the following properties: 1. `fromBlock`: Starting block (inclusive) to get transfers from. This can be an integer of the block number, hex string of the block number or a block tag such as `latest`, `earliest` or `finalized`. 2. `toBlock`: Ending block (inclusive) to get transfers from. This can be an integer of the block number, hex string of the block number or a block tag such as `latest`, `earliest` or `finalized`. 3. `order`: Whether to return results in ascending or descending order by block number. Defaults to ascending if omitted. The options are `"asc"` for ascending order and `"desc"` for descending order. 4. `pageKey`: Optional page key from an existing response to use for pagination. | `{ fromBlock: 16564734, toBlock: 16567427, order: "desc", }` | - -# Response - -The `getTransfersForContract` method returns a `Promise` object that contains the NFT transfers for the given NFT contract address. - -## `TransfersNftResponse` object properties - -The returned object has the following fields: - -| Property | Type | Description | -| ---------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | `array of objects` | An array of the transfer objects. Each transfer object contains information about the transferred NFT. | -| `pageKey?` | `string` | Optional page key to use to fetch the next group of NFTs. `undefined` if all the transfers are already included in the response. | - -### `nfts` properties - -Each transfer object has the following fields: - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN` | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | -| `from` | `string` | The address the NFT was sent from. For minted NFTs, this field is set to `0x0000000000000000000000000000000000000000`. | -| `to` | `string` | The address the NFT was sent or minted to. | -| `transactionHash` | `string` | The transaction hash where the transfer or mint occurred. | -| `blockNumber` | `string` | The block number as a hex string of when the transfer or mint occurred. | - -# Example Request and Response - -**Prerequisite**: You must install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```text yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTransfersForContract` request using the Alchemy SDK: - - - ```javascript getTransfersForContract.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getTransfersForContract method - const main = async () => { - // The nft contract address to get transfers for - let contractAddress = "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"; - - // Additional options for the request. (Optional) - let options = { - /** Starting block (inclusive) to get transfers from. */ - fromBlock: 16564734, - /** Ending block (inclusive) to get transfers from. */ - toBlock: 16567427, - /** - * Whether to return results in ascending or descending order by block number. - * Defaults to ascending if omitted. - */ - order: "desc", - }; - - // Calling the getTransfersForContract method - let transfers = await alchemy.nft.getTransfersForContract( - contractAddress, - options - ); - - // Logging the response to the console - console.log(transfers); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json getTransfersForContract response - { - "nfts": [ - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "5447", - "tokenType": "ERC721", - "name": "3L3PHANTS #5447", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/34233c43dee24fc5748d48867d5a61e8", - "contentType": "image/png", - "size": 211149, - "originalUrl": "https://ipfs.io/ipfs/QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/5447", - "metadata": { - "name": "3L3PHANTS #5447", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmWS5E2YK9rEWUuvkZkicSTZ9Fbck9z1aZTKYLAcmkmdTx", - "attributes": [ - { - "value": "Green", - "trait_type": "Background" - }, - { - "value": "Red Hoodie", - "trait_type": "Outfit" - }, - { - "value": "Gold", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xfd279644adb28043ee10111f2971b3e4fb655e86", - "blockNumber": 15260123, - "timestamp": "2022-08-02T01:18:08Z", - "transactionHash": "0x7cfdf3018a244529c6b1c6b85171f5c1cbf355c78b5f4faa80bd2fcfaf0d4429" - }, - "timeLastUpdated": "2023-02-18T18:43:33.104Z", - "from": "0x93ab7195dc4dd4a098efb10b47fe48c7893b8864", - "to": "0xad2596f9506309ea64e81605aaa4e898134ac1f2", - "transactionHash": "0xcec76b5c70c1dc71c09a2f383a4ae5a93331a0d4dea690171041263ae416c05c", - "blockNumber": "0xfccb9e" - }, - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "372", - "tokenType": "ERC721", - "name": "3L3PHANTS #372", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/5da1c73b64d3fc6dc1c986ac8e4f76f8", - "contentType": "image/png", - "size": 189584, - "originalUrl": "https://ipfs.io/ipfs/QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/372", - "metadata": { - "name": "3L3PHANTS #372", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmXvc2DMgg9ZJWGuAV1DTRn3HFS2oFtHbyo2am2LsSuguY", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - { - "value": "Brown", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xa590b03f6492f658b9d13f49924b2b1bb4b596b1", - "blockNumber": 15141967, - "timestamp": "2022-07-14T16:52:41Z", - "transactionHash": "0xc126314bde53b9348df97561c796ff9535549ac7fa596f9f7223084443bbdff8" - }, - "timeLastUpdated": "2023-03-15T08:33:25.446Z", - "from": "0xb7dded5be42790543096fd7d765155de658530f8", - "to": "0x4209859ae2992f581d2678392b4ac80c13d5eed4", - "transactionHash": "0xb89d383a80ead28c4ec00d985dd5f25989c02d945bb84b55261e07ce34d4406f", - "blockNumber": "0xfcc202" - } - ] - } - ``` - - -# Use Cases - -Some of the use cases for `getTransfersForContract` are: - -* **NFT Market Analysis**: An NFT market analysis platform could use the API to gather data on NFT transfers for a specific NFT contract and analyze the demand and supply of that particular NFT. - -* **NFT Contract Monitoring**: An NFT contract owner or administrator could use the API to monitor all transfers of their NFT contract and ensure that they are being used in a compliant manner. - -* **NFT Trading Platform**: An NFT trading platform could use the API to retrieve information about all transfers of a specific NFT contract and display it to users, allowing them to trade and buy/sell NFTs. - -# Related Methods - -Here are the methods related to `getTransfersForContract`: - -* [`getTransfersForOwner`](/reference/sdk-gettransfersforowner): Returns all NFT transfers for a given owner address. - -* [`getMintedNfts`](/reference/sdk-getmintednfts): Returns all the NFTs minted by a specified owner address. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/gettransfersforowner-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/gettransfersforowner-sdk-v3.mdx deleted file mode 100644 index b0b01e68..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/gettransfersforowner-sdk-v3.mdx +++ /dev/null @@ -1,307 +0,0 @@ ---- -title: getTransfersForOwner - SDK -description: The getTransfersForOwner method gets all NFT transfers for a given owner address. -subtitle: The getTransfersForOwner method gets all NFT transfers for a given owner address. -url: https://docs.alchemy.com/reference/gettransfersforowner-sdk-v3 -slug: reference/gettransfersforowner-sdk-v3 ---- - -The `getTransfersForOwner` method gets all NFT transfers for a given owner address. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`getTransfersForOwner` gets all NFT transfers for a given owner's address. - -# Parameters - -| Name | Type | Description | Example | -| ----------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `owner` | `string` | The owner address to get transfers for. | `"0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"` | -| `category?` | `string` | Whether to get transfers `TO` or `FROM` the owner address. | `TO`, `FROM` | -| `options` | `Object` | An optional object with the following properties: 1. `contractAddresses`: An array of NFT contract addresses to filter mints by. If omitted, defaults to all contract addresses. 2. `tokenType`: Filter mints by `ERC721` vs `ERC1155` contracts. If omitted, defaults to all NFTs. 3. `pageKey`: Optional page key from an existing response to use for pagination. | `{ contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"], tokenType: "ERC721" }` | - -# Response - -The `getTransfersForOwner` method returns a `Promise` object that contains the NFT transfers for the given owner address. - -The returned object has the following fields: - -| Property | Type | Description | -| ---------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | `array of objects` | An array of the transfer objects. Each transfer object contains information about the transferred NFT. | -| `pageKey?` | `string` | Optional page key to use to fetch the next group of NFTs. `undefined` if all the transfers are already included in the response. | - -### `nfts` properties - -Each `nfts` transfer object has the following fields: - -| Property | Type | Description | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `address`: `string` The address of the NFT contract. 2. `tokenType`: `object` The type of the token in the contract 3. `name`: `string` The name of the contract. 4. `symbol`: `string` The symbol of the contract. 5. `totalSupply?: string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 6. `openSeaMetadata: object` OpenSea's metadata for the contract. 7. `contractDeployer?: string` The address that deployed the NFT contract. 8. `deployedBlockNumber?: number`The block number the NFT contract deployed in. 9. `isSpam`: `boolean` Whether the NFT contract is marked as spam. 10. `spamClassifications`: `array` Potential reasons why an NFT Contract was classified as spam. | -| `tokenId` | `string` | The unique identifier of the token. This could be in hexadecimal or decimal format. | -| `tokenType` | `string` | The type of NFT, e.g.,`ERC721`, `ERC1155`, `UNKNOWN` | -| `name` | `string` | The NFT name. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `raw` | `object` | The raw metadata for the NFT based on the metadata URI on the NFT contract. 1. `tokenUri?: string`: The raw token URI on the NFT contract. 2. `metadata: string`: The raw metadata parsed from the raw token URI. 3. `error?: string`: Error message if the raw metadata could not be fetched. | -| `tokenUri` | `string` | URIs for accessing the NFT's metadata blob. | -| `image` | `object` | Media URLs and information for the NFT. Parameters in this object include: 1. `cachedUrl: string`: URL of the image stored in Alchemy's cache. 2. `thumbnailUrl: string`: URL of a thumbnail-sized image. 3. `pngUrl: string`: URL of the image in `png` format. 4. `contentType: string`: The type of the media image. | -| `acquiredAt` | `object` | Time at which the user most recently acquired the NFT. Only available when specifying `orderBy: NftOrdering.TRANSFERTIME` in the request. 1. `blockTimestamp?: string`: Timestamp of the block at which an NFT was last acquired. 2. `blockNumber?: number`: Block number of the block at which an NFT was last acquired. | -| `collection` | `object` | Collection metadata for the NFT, if available. Parameters include: 1. `name: string`: The name of the collection. 2. `slug?: string`: The OpenSea human-readable slug of the collection. 3. `externalUrl?: string`: The external URL for the collection. 4. `bannerImageUrl?: string`: The banner image URL for the collection. | -| `mint` | `object` | Mint information for the NFT. Parameters include: 1. `mintAddress?: string`: The address that the NFT was minted to. 2. `blockNumber?: number`: The block number that the NFT was minted on. 3. `timestamp?: string`: The timestamp the NFT was minted on. 4. `transactionHash?: string`: The transaction hash of the transaction that minted the NFT. | -| `from` | `string` | The address the NFT was sent from. For minted NFTs, this field is set to `0x0000000000000000000000000000000000000000`. | -| `to` | `string` | The address the NFT was sent or minted to. | -| `transactionHash` | `string` | The transaction hash where the transfer or mint occurred. | -| `blockNumber` | `string` | The block number as a hex string of when the transfer or mint occurred. | - -# Example Request and Response - -**Prerequisite**: You must install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```text yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make a `getTransfersForOwner` request using the Alchemy SDK: - - - ```javascript getTransfersForOwner.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getTransfersForOwner method - const main = async () => { - // The owner address to get transfers for - let address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"; - - // Whether to get transfers TO or FROM the owner address. (Optional) - let category = "FROM"; - - // Additional options for the request. (Optional) - let options = { - /** - * List of NFT contract addresses to filter mints by. If omitted, defaults to - * all contract addresses. - */ - contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"], - /** - * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all - * NFTs. - */ - tokenType: "ERC721", - }; - - // Calling the getTransfersForOwner method - let transfers = await alchemy.nft.getTransfersForOwner( - address, - category, - options - ); - - // Logging the response to the console - console.log(transfers); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json getTransfersForOwner response - { - "nfts": [ - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "890", - "tokenType": "ERC721", - "name": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "contentType": "image/png", - "size": 199542, - "originalUrl": "https://ipfs.io/ipfs/QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890", - "metadata": { - "name": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - { - "value": "Double", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "blockNumber": 15143441, - "timestamp": "2022-07-14T22:17:44Z", - "transactionHash": "0x317dfdacec0ae4cbe0a1f7ee394f9cc7c6d4ae9985a5202fcfef28b3a19ce899" - }, - "timeLastUpdated": "2023-08-13T03:40:39.232Z", - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x84561625814e1c7e882c1ae20a9d722a8c301f04", - "transactionHash": "0x43ff4418ca88d94857f3b687e8ac7450e107c2a36517e8d59a5308dba4acec94", - "blockNumber": "0xec8125" - }, - { - "contract": { - "address": "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "contractDeployer": "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8", - "deployedBlockNumber": 15140845, - "openSeaMetadata": { - "floorPrice": 0.0032, - "collectionName": "3L3Phants Official", - "collectionSlug": "3l3phants-official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format", - "lastIngestedAt": "2023-09-19T22:06:03.000Z" - }, - "spamClassifications": [] - }, - "tokenId": "3990", - "tokenType": "ERC721", - "name": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "tokenUri": "https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990", - "image": { - "cachedUrl": "https://nft-cdn.alchemy.com/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "thumbnailUrl": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "pngUrl": "https://res.cloudinary.com/alchemyapi/image/upload/convert-png/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "contentType": "image/png", - "size": 198447, - "originalUrl": "https://ipfs.io/ipfs/QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg" - }, - "raw": { - "tokenUri": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990", - "metadata": { - "name": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "attributes": [ - { - "value": "Pink Checkerboard", - "trait_type": "Background" - }, - { - "value": "Nubs", - "trait_type": "Tusks" - } - ] - } - }, - "collection": { - "name": "3L3Phants Official", - "slug": "3l3phants-official", - "externalUrl": "http://3l3phants.io", - "bannerImageUrl": "https://i.seadn.io/gcs/files/1667bbb67e548917820271ee2430bb35.png?w=500&auto=format" - }, - "mint": { - "mintAddress": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "blockNumber": 15214264, - "timestamp": "2022-07-25T22:02:43Z", - "transactionHash": "0x343e4697e0e834acb61c23268a63ddddb29e29ce6bcaf652b08430f7c0fdc934" - }, - "timeLastUpdated": "2023-02-28T17:51:29.181Z", - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x6a3623db71c1b3442a94e3fd4655334b48114693", - "transactionHash": "0x13f33287ac95893e06cda2cd30c08003808ac46867382d8c92e1c864e4895ec6", - "blockNumber": "0xec8131" - } - ] - } - ``` - - -# Use Cases - -Some of the use cases for `getTransfersForOwner` are: - -* **NFT Marketplace**: An NFT marketplace could use the API to retrieve all the NFT transfers for a particular owner and display them on their website for the owner to see their NFT collection and transaction history. - -* **NFT Portfolio Tracking**: An individual or a company could use the API to track all the NFT transfers to and from their address and keep a record of their NFT portfolio. - -* **NFT Analytics**: An NFT analytics platform could use the API to gather data on NFT transfers and analyze the NFT market trends and patterns. - -# Related Methods - -Here are the methods related to `getTransfersForOwner`: - -* [`getMintedNfts`](/reference/sdk-getmintednfts): Returns all the NFTs minted by a specified owner address. - -* [`getTransfersForContract`](/reference/sdk-gettransfersforcontract): Returns all NFT transfers for a given NFT contract address. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/isspamcontract-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/isspamcontract-sdk-v3.mdx deleted file mode 100644 index ed6d9ff2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/isspamcontract-sdk-v3.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: isSpamContract - SDK -description: Returns whether a contract is marked as spam or not by Alchemy. -subtitle: Returns whether a contract is marked as spam or not by Alchemy. -url: https://docs.alchemy.com/reference/isspamcontract-sdk-v3 -slug: reference/isspamcontract-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - - - Spam NFT functionality is available on Mainnet for the following chains: Base, Arbitrum, Optimism, Ethereum, Polygon, Worldchain, Avax, Gnosis, Zksync, and Blast. More to come soon! - - -# Description - -Returns whether a contract is marked as spam or not by Alchemy. For more information on how we classify spam, go to our [NFT API FAQ page](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification). - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------ | -| `contractAddress` | `string` | The contract address to check. | - -# Response - -| Property | Type | Description | -| --------------------------------- | -------- | ------------------------------------------------------------- | -| `Promise` | `object` | Returns an object containing the spam status of the contract. | - -## `IsSpamContractResponse` object properties - -| Property | Type | Description | -| ---------------- | --------- | ------------------------------------------------------------------ | -| `isSpamContract` | `boolean` | The spam status of the contract. Returns either `true` or `false`. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x000440f08436a7b866d1ae42db5e0be801da722a"; - - //Call the method to check if a contract is a spam - const response = await alchemy.nft.isSpamContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "isSpamContract": false - } - ``` - - -# Use Cases - -Here are some potential use cases for the `isSpamContract` method: - -* **Preventing spam transactions**: If you are building a blockchain-based application or service, you may want to prevent spam transactions from being processed on your network. By checking whether a contract is a spam, you can filter out transactions that are likely to be spam and prevent them from clogging up your network. - -* **Improving search results**: If you are building a search engine for smart contracts, you may want to filter out spam contracts from your search results. By using the `isSpamContract` method, you can identify and exclude contracts that are known to be spam. - -* **Enhancing security**: If you are building a security system for a smart contract platform, you may want to identify contracts that are known to be malicious or spammy. By using the `isSpamContract` method, you can flag these contracts as high-risk and take additional security measures to protect your platform and users. - -# Related Methods - -* [getSpamContracts](/reference/getspamcontracts-sdk): Returns a list of all spam contracts marked by Alchemy. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/refreshcontract-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/refreshcontract-sdk-v3.mdx deleted file mode 100644 index dc4b03e4..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/refreshcontract-sdk-v3.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: refreshContract - SDK -description: Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. -subtitle: Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. -url: https://docs.alchemy.com/reference/refreshcontract-sdk-v3 -slug: reference/refreshcontract-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. - -Refreshes are queued on the Alchemy backend and may take time to fully process. To refresh the metadata for a specific token, use the [refreshNftMetadata](/reference/sdk-refreshnftmetadata) method instead. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT collection. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ----------------------------------- | -| `Promise` | `object` | The refresh result response object. | - -### `RefreshContractResult` response object properties - -| Property | Type | Description | -| ----------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The NFT contract address that was passed in to be refreshed. | -| `refreshState` | `string` | The current state of the refresh request. The available response options are: 1. DOES\_NOT\_EXIST = 'does\_not\_exist :The provided contract is not an NFT or does not contain metadata. 2. ALREADY\_QUEUED = 'already\_queued': The contract has already been queued for refresh. 3. IN\_PROGRESS = 'in\_progress': The contract is currently being refreshed. | -| `progress` | `string \| null` | Percentage of tokens currently refreshed, represented as an integer string. The field can be null if the refresh has not occurred. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - - //Call the method to return the refresh result response object - const response = await alchemy.nft.refreshContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "contractAddress": "0x5180db8f5c931aae63c74266b211f580155ecac8", - "refreshState": "in_progress", - "progress": null - } - ``` - - -# Use Cases - -Here are some potential use cases for the `refreshContract` method: - -* **Marketplace management**: NFT marketplaces can use the `refreshContract` method to ensure that the data for a specific contract is up-to-date, including any changes to the contract's metadata or events. This information is crucial for ensuring that the marketplace accurately reflects the current state of the contract. - -* **Contract management**: Developers can use the `refreshContract` method to update the data for a contract they are developing. This can be useful for ensuring that the contract is functioning properly and for identifying any potential issues or bugs. - -* **User interface updates**: DApp developers can use the `refreshContract` method to update their user interfaces to reflect any changes to the contract's metadata or events. This can be useful for improving the user experience and ensuring that the DApp is always displaying the most accurate information. - -# Related Methods - -Here are the methods related to `refreshContract`: - -* [refreshNftMetadata](/reference/refreshnftmetadata-sdk): Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. - -* [searchContractMetadata](/reference/searchcontractmetadata-sdk): Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/refreshnftmetadata-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/refreshnftmetadata-sdk-v3.mdx deleted file mode 100644 index 23b06bc6..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/refreshnftmetadata-sdk-v3.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: refreshNftMetadata - SDK -description: Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. -subtitle: Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. -url: https://docs.alchemy.com/reference/refreshnftmetadata-sdk-v3 -slug: reference/refreshnftmetadata-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - - - Please note that this endpoint is only supported on **Ethereum (Mainnet & Sepolia)**, **Polygon (Mainnet, Mumbai & Amoy)**, **Arbitrum One (mainnet)** & **Optimism (mainnet)** - - For other chains, you could use the [getNFTMetadata](/reference/getnftmetadata-v3) endpoint with the `refreshCache` parameter set to true to refresh the metadata! - - -# Description - -Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. - -This method is useful when you want to refresh the metadata for an NFT that has been updated since the last time it was fetched. - - - Note that the backend only allows one refresh per token every 15 minutes, globally for all users. The last refresh time for an NFT can be accessed on the `Nft.timeLastUpdated` field. - - -To trigger a refresh for all NFTs in a contract, use [refreshContract](/reference/refreshcontract-sdk) instead. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | Token id of the NFT. | - -# Response - -| Property | Type | Description | -| ------------------ | --------- | ------------------------------------------------------------ | -| `Promise` | `boolean` | Boolean value indicating whether the metadata was refreshed. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const contractAddress = "0x06012c8cf97bead5deae237070f9587f8e7a266d"; - const tokenId = "1"; - //Call the method - let response = await alchemy.nft.refreshNftMetadata(contractAddress, tokenId) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - false - ``` - - -# Use Cases - -Here are some potential use cases for the `refreshNftMetadata` method: - -* **Up-to-Date NFT Information**: NFT metadata, such as images, descriptions, and attributes, can change over time. By refreshing the metadata, developers ensure that their application displays the most current and accurate information about the NFT, enhancing the user experience. - -* **Correcting errors**: Sometimes errors can occur in the metadata associated with an NFT. For example, the wrong image may have been uploaded or the description may contain a typo. The `refreshNftMetadata` method can be used to correct these errors. - -* **Improving NFT marketability**: The metadata associated with an NFT can significantly impact its marketability. By updating the metadata, NFT owners can improve the chances of their NFTs being sold or traded. - -# Related Methods - -Here are some methods that are similar to the `refreshNftMetadata` method: - -* [refreshContract](/reference/refreshcontract-sdk) - Triggers a metadata refresh of all NFTs in the provided contract address. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/sdk-nft-methods.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/sdk-nft-methods.mdx deleted file mode 100644 index 82c889d6..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/sdk-nft-methods.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: SDK NFT Methods -description: List of all SDK NFT methods. -subtitle: List of all SDK NFT methods. -url: https://docs.alchemy.com/reference/sdk-nft-methods -slug: reference/sdk-nft-methods ---- - -# Introduction - -The Alchemy SDK NFT Methods allow for retrieving NFT data, verifying NFT ownership, and much more for improved troubleshooting and analysis. - -# Supported Methods - -| Method | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`getNftsForOwner`](/reference/sdk-getnfts) | Get all NFTs for an owner. | -| [`getNftMetadata`](/reference/sdk-getnftmetadata) | Get the NFT metadata associated with the provided parameters. | -| [`getNftMetadataBatch`](/reference/sdk-getnftmetadatabatch) | Gets the NFT metadata for multiple NFT tokens. | -| [`refreshNftMetadata`](/reference/sdk-refreshnftmetadata) | Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. | -| [`getNftSales`](/reference/sdk-getnftsales) | Returns NFT sales that have happened through on-chain marketplaces. | -| [`summarizeNftAttribute`](/reference/sdk-summarizenftattributes) | Get a summary of attribute prevalence for an NFT collection. | -| [`searchContractMetadata`](/reference/sdk-searchcontractmetadata) | Search for a keyword across the metadata of all `ERC-721` and `ERC-1155` smart contracts. | -| [`getNftsForOwnerIterator`](/reference/sdk-getnftsforowneriterator) | Fetches all NFTs for a given owner and yields them in an async iterable. | -| [`getNftsForContractIterator`](/reference/sdk-getnftsforcontractiterator) | Fetches all NFTs for a given contract address and yields them in an async iterable. | -| [`getContractMetadata`](/reference/sdk-getcontractmetadata) | Get the NFT collection metadata associated with the provided parameters. | -| [`getNftsForContract`](/reference/sdk-getnftsforcontract) | Get all NFTs for a given contract address. | -| [`getTransfersForOwner`](/reference/sdk-gettransfersforowner) | The `getTransfersForOwner` method gets all NFT transfers for a given owner address. | -| [`getTransfersForContract`](/reference/sdk-gettransfersforcontract) | The `getTransfersForContract` method gets all NFT transfers for a given NFT contract address. | -| [`getMintedNfts`](/reference/sdk-getmintednfts) | The `getMintedNfts` method gets all the NFTs minted by a specified owner address. | -| [`getOwnersForNft`](/reference/sdk-getownersfornft) | Gets all the owners for a given NFT contract address and token ID. | -| [`getOwnersForContract`](sdk-getownersforcontract) | Gets all the owners for a given NFT contract along with the token balance. | -| [`getSpamContracts`](/reference/sdk-getspamcontracts) | Returns a list of all spam contracts marked by Alchemy. | -| [`isSpamContract`](/reference/sdk-isspamcontract) | Returns whether a contract is marked as spam or not by Alchemy. | -| [`refreshContract`](/reference/sdk-refreshcontract) | Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. | -| [`getFloorPrice`](/reference/sdk-getfloorprice) | Returns the floor prices of an NFT contract by marketplace. | -| [`computeRarity`](/reference/sdk-computerarity) | Get the rarity of each attribute of an NFT. | -| [`verifyNftOwnership`](/reference/sdk-verifynftownership) | Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. | diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/searchcontractmetadata-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/searchcontractmetadata-sdk-v3.mdx deleted file mode 100644 index 3b4d0bc9..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/searchcontractmetadata-sdk-v3.mdx +++ /dev/null @@ -1,217 +0,0 @@ ---- -title: searchContractMetadata - SDK -description: Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. -subtitle: Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. -url: https://docs.alchemy.com/reference/searchcontractmetadata-sdk-v3 -slug: reference/searchcontractmetadata-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Search for a keyword across the metadata of all `ERC-721` and `ERC-1155` smart contracts. - - -If you have any questions or feedback, please contact us at or open a ticket in the dashboard. - - -# Parameters - -| Name | Type | Description | -| ------- | -------- | ------------------------------------------------------------------- | -| `query` | `string` | The search string that you want to search for in contract metadata. | - -# Response - -| Property | Type | Description | -| ----------------------------------------- | -------- | ---------------------------------------------------------------------------- | -| `Promise` | `object` | An object containing a `contracts` array property that returns nft metadata. | - -### `SearchContractMetadataResponse` object properties - -| Property | Type | Description | -| --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tokenType` | `string` | The type of token in the contract. Options are: `ERC721` = "ERC721", `ERC1155` = "ERC1155", `UNKNOWN` = "UNKNOWN" | -| `address` | `string` | The address of the NFT contract. | -| `name` | `string` | The name of the contract. | -| `symbol` | `string` | The symbol of the contract. | -| `totalSupply` | `string` | The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. | -| `openSeaMetadata` | `object` | OpenSea's metadata for the contract. Parameters include: 1. `floorPrice?: number`: The floor price of the collection. 2. `collectionName?: string`: The name of the collection on OpenSea. 3. `safelistRequestStatus?: string`: The approval status of the collection on OpenSea. 4. `imageUrl?: string`: The image URL determined by OpenSea. 5. `description?: string`: The description of the collection on OpenSea. 6. `externalUrl?: string`: The homepage of the collection as determined by OpenSea. 7. `twitterUsername?: string`: The Twitter handle of the collection. 8. `discordUrl?: string`: The Discord URL of the collection. 9. ` lastIngestedAt: string`: Timestamp of when Alchemy last ingested the OpenSea metadata. | -| `contractDeployer` | `string` | The address that deployed the NFT contract. | -| `deployedBlockNumber` | `number` | The block number the NFT contract deployed in. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const kw = "hair" - - //Call the method to fetch metadata - const response = await alchemy.nft.searchContractMetadata(kw) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "contracts": [ - { - "address": "0x1EaC31A0B93E81bd093d116f5D36a83Be08f381B", - "name": "Sneakr Token", - "symbol": "SNKR", - "totalSupply": "326", - "tokenType": "ERC721", - "contractDeployer": "0xccB74148D315B0397dA4e3C7482036dbaDD762e5", - "deployedBlockNumber": 9458121, - "openSeaMetadata": { - "floorPrice": 0, - "collectionName": "SneakrCred Drop 1: EthAIReum", - "collectionSlug": "sneakr-token", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/7JKgjQsQP6PNiuuT6J7upfs4Iq3btwg1zFMxpzvW9ZFpGFWrf0i2H08vbG-1glj9ZY9HDUxco5z_xMWc7e_f5myd5A?w=500&auto=format", - "description": "The first official Sneakr Drop.", - "externalUrl": "https://www.sneakrcred.com", - "lastIngestedAt": "2023-09-09T23:18:24.000Z" - } - }, - { - "address": "0x7E2A853626D75321d2B6eD060f6320324D31b7e8", - "name": "Happy Little Hairdos", - "symbol": "HLHD", - "totalSupply": "241", - "tokenType": "ERC721", - "contractDeployer": "0x5582809Dd5d7b8848397C6033D8a41e4b06F8dEd", - "deployedBlockNumber": 12885162, - "openSeaMetadata": { - "floorPrice": 0.05, - "collectionName": "Happy Little Hairdos", - "collectionSlug": "hlhd", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/bx3ZIky25jfqxG_ield-BWVNuWvoOLJsqm-1TPN90xVuzyLrEjROQAX_Qf2jgMb5OrCsF_OKaRWq3DEpWztPRK2DriuRMN997kar?w=500&auto=format", - "description": "Happy Little Hairdos is a parody collection of 10,000 unique NFTs celebrating the man we all know as the painter with a Fro. Straight from the imagination & hand of artist J.J. Weinberg, what began as a Prismacolor illustration on paper in 2014 & an idea of a ☕ table ???? has found its way onto the blockchain. Weinberg is determined to push the envelope on the connection of the metaverse & the physical world. Let the #FROMO begin!\r\n\r\nDetails - www.happylittlehairdos.com\r\n\r\nHighlights\r\n\r\nArt / Print quality images 3000x3000k (Set to print at 10”x10” 300 dpi)\r\nCoffee table book featuring “Curated Cuts” & randomly chosen HLHD’s\r\nInfinite “Bob”jects\r\nEarly access to merch via the Fromo Boutique\r\n“Curated Cuts for a Cause” the rarity’s for charity on these special tokens outside of the 10K\r\nAccess to Alexander Bill’s “ART”cade\r\nSpecial token access to commissioned work by the artist & derivative license\r\nJoy of Minting mini-series\r\nSpecial thanks @cheforche - IG @jjweinberg - IG", - "externalUrl": "https://www.happylittlehairdos.com", - "twitterUsername": "happylittlehair", - "discordUrl": "https://discord.gg/kWFU5xP74W", - "bannerImageUrl": "https://i.seadn.io/gae/WhmKRaraSN-sWNMtKm6BIiZ95ikkJ9Ey9Q6KaVtwxpAmI7MmaOi8D6X_JrBsJBU0bY4VRmNaRDXP7jnSpBnCvrtMevqJL6UJGjhByg?w=500&auto=format", - "lastIngestedAt": "2023-09-09T23:19:57.000Z" - } - }, - { - "address": "0x82Cb9D20862641301C987f0b096086d32bC11B65", - "name": "AStrandOfHair", - "symbol": "ASOH", - "totalSupply": "10358", - "tokenType": "ERC721", - "contractDeployer": "0xC4c2a776A352A8994be83D2ef2Bb4A9604DC6E97", - "deployedBlockNumber": 15210942, - "openSeaMetadata": { - "floorPrice": 0, - "collectionName": "AStrandOfHair", - "collectionSlug": "astrandofhair", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gcs/files/5aa37f4f867ad6f1d5ab710f67f6cfdd.jpg?w=500&auto=format", - "description": "It's a metaverse built by wizards. From just a strand of hair to the entire world. We are not just a meme, we are a culture strongly rooted by our community. ", - "externalUrl": "https://astrandofhair.xyz/", - "twitterUsername": "Hair_xyz", - "bannerImageUrl": "https://i.seadn.io/gcs/files/3e75adaed1ac45184ea446175e8856d9.jpg?w=500&auto=format", - "lastIngestedAt": "2023-09-10T01:35:01.000Z" - } - }, - { - "address": "0xBd5BD01e9445d24D83E8607Ac0a64D71C9D36933", - "name": "Queens+KingsHair", - "symbol": "Q+KTH", - "totalSupply": "3638", - "tokenType": "ERC721", - "contractDeployer": "0x139C8919Ce2B7fb8A04F929d83b8C54C116c692b", - "deployedBlockNumber": 13984623, - "openSeaMetadata": { - "floorPrice": 0.003, - "collectionName": "Queens+Kings Traits", - "collectionSlug": "queenskings-traits", - "safelistRequestStatus": "approved", - "imageUrl": "https://i.seadn.io/gae/0OkPiJqvKO7oAJYU7pNGp3Y2nGgCm98itXBnCa12xpEttaVw9HuUFhFNXmE0lfaQjZGpxa6N8KrZtHcX1InpNzNtaBkW8kslTwYwAQ?w=500&auto=format", - "description": "Queens+Kings overthrow hierarchies in contemporary art and re-mint your CryptoRealm:\nCreated by Hackatao and NFT Studios, supported by Sotheby’s\n\n6,900 Queens+Kings: interchangeable NFT traits, randomly allocated and algorithmically generated. The avatars can then be hacked by the collectors, customized, disassembled and assembled on the [dedicated website](http://queenskings.hackatao.com) builder. In the cryptoverse, a non-hierarchical community is in charge, traditional roles of the art world are subverted. Hack the Royals, let the Self-Crowning begin. ", - "externalUrl": "https://queenskings.hackatao.com/", - "twitterUsername": "Hackatao", - "discordUrl": "https://discord.gg/hackatao", - "bannerImageUrl": "https://i.seadn.io/gae/k8DXM0eWdF14zud9pr7RURMhC0_zwuEigV_oG3hy5A9HlnKkjoH4lYaPVU5-2O4qC0g46HTWTwUQhKM3ZElgaIJJgqCGcgusGWWIK8Q?w=500&auto=format", - "lastIngestedAt": "2023-09-10T18:44:05.000Z" - } - }, - { - "address": "0x57e876FaEFD30bCEF9B154812Ba4d29396308C38", - "name": "A CHAIR IN THE SKY", - "symbol": "SKYCHAIR", - "totalSupply": "5", - "tokenType": "ERC721", - "contractDeployer": "0xaB3627317c43D394eb171170f818153B976D28A3", - "deployedBlockNumber": 16288864, - "openSeaMetadata": { - "floorPrice": 0, - "collectionName": "A CHAIR IN THE SKY", - "collectionSlug": "a-chair-in-the-sky", - "safelistRequestStatus": "not_requested", - "lastIngestedAt": "2023-09-18T10:20:33.000Z" - } - } - ] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `searchContractMetadata` method: - -* **Finding relevant smart contracts**: If you are looking for a particular smart contract to interact with on a blockchain network, you can use `searchContractMetadata` to find contracts that match certain metadata criteria, such as contract name, author, or version. - -* **Analyzing smart contract usage**: Blockchain networks allow for the deployment of multiple instances of the same smart contract, each with its own metadata. `searchContractMetadata` can be used to analyze metadata from various instances of a particular contract to gain insights into its usage patterns and adoption rates. - -* **Auditing smart contracts**: Smart contracts are self-executing and can be complex, making them susceptible to bugs and vulnerabilities. `searchContractMetadata` can be used to audit the metadata associated with a particular smart contract to ensure that it is trustworthy and secure. - -# Related Methods - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. - -* [getNftMetadataBatch](/reference/getnftmetadatabatch-sdk): Gets the NFT metadata for multiple NFT tokens. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/summarizenftattributes-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/summarizenftattributes-sdk-v3.mdx deleted file mode 100644 index 9405559f..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/summarizenftattributes-sdk-v3.mdx +++ /dev/null @@ -1,286 +0,0 @@ ---- -title: summarizeNftAttributes - SDK -description: Get a summary of attribute prevalence for an NFT collection. -subtitle: Get a summary of attribute prevalence for an NFT collection. -url: https://docs.alchemy.com/reference/summarizenftattributes-sdk-v3 -slug: reference/summarizenftattributes-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - - - Please note that this endpoint is only available on **Ethereum (mainnet)** & **Polygon (mainnet & mumbai)** - - -# Description - -Get a summary of attribute prevalence for an NFT collection. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ---------------------------------------- | -| `contractAddress` | `string` | Contract address for the NFT collection. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ------------------------------- | -| `Promise` | `object` | Object containing nft metadata. | - -### `NftAttributesResponse` object properties - -| Property | Type | Description | -| ----------------- | ---------------------------------------- | -------------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The specified NFT contract's address. | -| `totalSupply` | `string` | The specified NFT contract's total supply. | -| `summary` | `Record>` | The attribute prevalence of each trait grouped by the trait type for the provided NFT. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const collection = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to fetch a summary a attribute prevalence for an NFT collection. - const response = await alchemy.nft.summarizeNftAttributes(collection) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "summary": { - "Fur": { - "Tan": 626, - "Death Bot": 175, - "Trippy": 77, - "Brown": 1370, - "Gray": 496, - "Golden Brown": 778, - "Blue": 490, - "Noise": 155, - "Zombie": 302, - "Cream": 636, - "Solid Gold": 46, - "Dmt": 215, - "Black": 1229, - "Cheetah": 406, - "Dark Brown": 1352, - "Red": 474, - "Pink": 511, - "White": 397, - "Robot": 265 - }, - "Eyes": { - "Heart": 394, - "Sleepy": 751, - "Eyepatch": 333, - "X Eyes": 243, - "Zombie": 308, - "Angry": 432, - "Coins": 479, - "Blue Beams": 49, - "Wide Eyed": 549, - "Hypnotized": 220, - "Bloodshot": 846, - "Blindfold": 264, - "Sunglasses": 352, - "3d": 487, - "Bored": 1714, - "Laser Eyes": 69, - "Cyborg": 108, - "Crazy": 407, - "Closed": 710, - "Sad": 551, - "Scumbag": 233, - "Robot": 350, - "Holographic": 151 - }, - "Background": { - "Gray": 1170, - "Aquamarine": 1266, - "Blue": 1242, - "Purple": 1291, - "Yellow": 1283, - "New Punk Blue": 1232, - "Army Green": 1243, - "Orange": 1273 - }, - "Mouth": { - "Phoneme Vuh": 333, - "Discomfort": 208, - "Bored Unshaven Pipe": 101, - "Bored Cigarette": 710, - "Rage": 266, - "Bored Bubblegum": 119, - "Bored Pizza": 50, - "Grin": 713, - "Bored Party Horn": 88, - "Bored": 2272, - "Bored Unshaven Bubblegum": 65, - "Bored Unshaven Cigarette": 438, - "Jovial": 296, - "Tongue Out": 202, - "Grin Multicolored": 116, - "Small Grin": 272, - "Bored Unshaven Party horn": 45, - "Phoneme ooo": 255, - "Bored Unshaven": 1551, - "Bored Unshaven Pizza": 26, - "Bored Unshaven Dagger": 28, - "Phoneme Wah": 163, - "Phoneme Oh": 237, - "Dumbfounded": 505, - "Bored Pipe": 132, - "Grin Gold Grill": 91, - "Bored Unshaven Cigar": 94, - "Phoneme L": 241, - "Bored Unshaven Kazoo": 61, - "Grin Diamond Grill": 78, - "Bored Dagger": 49, - "Bored Cigar": 121, - "Bored Kazoo": 74 - }, - "Clothes": { - "Smoking Jacket": 221, - "Bone Necklace": 203, - "Leather Jacket": 206, - "Striped Tee": 412, - "Bone Tee": 230, - "Tweed Suit": 141, - "Puffy Vest": 227, - "Vietnam Jacket": 224, - "Toga": 202, - "Black Holes T": 205, - "Prom Dress": 103, - "Work Vest": 188, - "Sleeveless Logo T": 144, - "Tanktop": 235, - "Hawaiian": 283, - "Bayc T Black": 215, - "Lumberjack Shirt": 213, - "Hip Hop": 128, - "Admirals Coat": 64, - "Lab Coat": 144, - "Pimp Coat": 80, - "Prison Jumpsuit": 235, - "Black Suit": 42, - "Service": 142, - "Blue Dress": 95, - "Caveman Pelt": 163, - "Sleeveless T": 252, - "Guayabera": 232, - "Sailor Shirt": 284, - "Bayc T Red": 140, - "Bandolier": 163, - "Rainbow Suspenders": 135, - "Tie Dye": 144, - "Biker Vest": 253, - "Space Suit": 105, - "Cowboy Shirt": 119, - "Navy Striped Tee": 334, - "Stunt Jacket": 178, - "Kings Robe": 68, - "Wool Turtleneck": 240, - "Leather Punk Jacket": 153, - "Black T": 334, - "Tuxedo Tee": 235 - }, - "Earring": { - "Gold Hoop": 462, - "Silver Stud": 823, - "Cross": 149, - "Silver Hoop": 882, - "Gold Stud": 439, - "Diamond Stud": 222 - }, - "Hat": { - "Trippy Captain's Hat": 65, - "Bayc Flipped Brim": 231, - "Short Mohawk": 318, - "Safari": 182, - "Cowboy Hat": 354, - "Sea Captain's Hat": 304, - "Vietnam Era Helmet": 223, - "Sushi Chef Headband": 187, - "Irish Boho": 225, - "Girl's Hair Short": 150, - "Laurel Wreath": 72, - "Girl's Hair Pink": 105, - "Bayc Hat Red": 119, - "Horns": 252, - "Fisherman's Hat": 345, - "Bowler": 262, - "Spinner Hat": 181, - "Faux Hawk": 136, - "Seaman's Hat": 420, - "Ww2 Pilot Helm": 110, - "Party Hat 1": 120, - "Party Hat 2": 107, - "Beanie": 578, - "King's Crown": 77, - "Army Hat": 294, - "Commie Hat": 304, - "Bunny Ears": 195, - "S&m Hat": 235, - "Stuntman Helmet": 157, - "Fez": 377, - "Bandana Blue": 89, - "Bayc Hat Black": 228, - "Halo": 324, - "Police Motorcycle Helmet": 130, - "Prussian Helmet": 130, - "Baby's Bonnet": 158 - } - }, - "totalSupply": "10000", - "contractAddress": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" - } - ``` - - -# Use Cases - -Here is a potential use case for the `summarizeNftAttributes` method: - -* Users can use the `summarizeNftAttributes` method to get an overview of all the traits in an NFT Collection and also find out which traits are rare. diff --git a/fern/api-reference/alchemy-sdk/sdk-nft-methods/verifynftownership-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-nft-methods/verifynftownership-sdk-v3.mdx deleted file mode 100644 index 93e768a3..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-nft-methods/verifynftownership-sdk-v3.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: verifyNftOwnership - SDK -description: Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. -subtitle: Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. -url: https://docs.alchemy.com/reference/verifynftownership-sdk-v3 -slug: reference/verifynftownership-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------------------- | -| `owner` | `string` | The owner address to check. | -| `contractAddress` | `string` | An NFT contract address to check ownership for. | - -# Response - -| Property | Type | Description | -| ------------------------------------------------------------ | --------- | ----------------------------------------------------------------------- | -| `Promise` | `boolean` | A boolean indicating whether the owner's address owns the provided NFT. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and owner - const address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"; - const owner = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to display the rarity of each attribute of the NFT - const response = await alchemy.nft.verifyNftOwnership(owner, address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - false - ``` - - -# Use Cases - -Here are some potential use cases for the `verifyNftOwnership` method: - -* **Authenticating ownership during a transaction**: When a user wants to sell their NFT, the `verifyNftOwnership` method can be used to ensure that the seller is the rightful owner of the NFT. This helps prevent fraudulent transactions. - -* **Proving ownership for insurance or legal purposes**: In cases where the ownership of an NFT is disputed, the `verifyNftOwnership` method can be used to prove ownership. This can be useful in legal cases or when purchasing insurance for the NFT. - -* **NFT lending or borrowing**: NFT owners may want to lend their NFTs to others for a fee or borrow NFTs from others. The `verifyNftOwnership` method can be used to verify ownership before entering into such agreements. - -# Related Methods - -Here are the methods related to `verifyNftOwnership`: - -* [getOwnersForNft](/reference/getownersfornft-sdk): Gets all the owners for a given NFT contract address and token ID. - -* [getNftsForOwner](/reference/getnftsforowner-sdk): Get all NFTs for an owner. diff --git a/fern/api-reference/alchemy-sdk/sdk-notify-methods/createwebhook-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-notify-methods/createwebhook-sdk-v3.mdx deleted file mode 100644 index 9418af58..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-notify-methods/createwebhook-sdk-v3.mdx +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: createWebhook - SDK -description: This endpoint allows you to create a webhook. Note that the webhook will be created in the app network of the provided app id. -subtitle: This endpoint allows you to create a webhook. Note that the webhook will be created in the app network of the provided app id. -url: https://docs.alchemy.com/reference/createwebhook-sdk-v3 -slug: reference/createwebhook-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -This endpoint allows you to create a webhook. - -Note that the webhook will be created in the app network of the provided app id. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| `url` | `string` | The URL that the webhook should send events to. | -| `type` | `string` | The type of webhook to create. Available options include: `MINED_TRANSACTION`, `DROPPED_TRANSACTION`, `ADDRESS_ACTIVITY`, `NFT_ACTIVITY`, `GRAPHQL` | -| `params` | `object` | Params object containing the parameters required to create a webhook depending on the `type` of webhook to be created. | - -### `params` Parameters - - - Include only one of these `params` objects as the third parameter. - - -| Name | Type | Description | -| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `TransactionWebhookParams` | `object` | Used for Mined / Dropped Transaction Webhooks, i.e., `MINED_TRANSACTION` & `DROPPED_TRANSACTION`. Parameters in this object include: 1. `appId` - `string` The app id of the project to create the mined/dropped transaction webhook on. | -| `AddressWebhookParams` | `object` | Used for Address Activity Webhooks, i.e., `ADDRESS_ACTIVITY`. Parameters here include: 1. `addresses` - `array of strings` Array of addresses the webhook should track activity for. 2. `network` - `string` Optional network to create the webhook on. If omitted, the webhook will be created on network of the app provided in the api key config. | -| `NftWebhookParams` | `object` | Used for NFT Filter Webhooks, i.e.,`NFT_ACTIVITY`. Parameters here include: 1. `addresses` - `array of objects` Array of NFT filters the webhook should track containing the `contractAddress` and `tokenId`. 2. `network` - `string` Optional network to create the webhook on. If omitted, the webhook will be created on network of the app provided in the api key config. | -| `CustomGraphqlWebhookParams` | `object` | Used for Custom Webhooks, i.e.,`GRAPHQL`. Parameters here include: 1. `graphqlQuery` - `string` A valid, stringified GraphQL query that you would like to host on Alchemy 2. `network` - `string` Optional network to create the webhook on. If omitted, the webhook will be created on network of the app provided in the api key config. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | ------------------------------ | -| `Promise` | `object` | Returns webhook creation data. | - -### `DroppedTransactionWebhook` response object parameters - -| Property | Type | Description | -| ------------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | `string` | Type of webhook. `MINED_TRANSACTION`, `DROPPED_TRANSACTION`, `ADDRESS_ACTIVITY`, `NFT_ACTIVITY` | -| `id` | `string` | Unique ID for given webhook. | -| `network` | `string` | Network of webhook. `ETH_MAINNET` `ETH_GOERLI` `ETH_ROPSTEN` `ETH_RINKEBY` `ETH_KOVAN` `MATIC_MAINNET` `MATIC_MUMBAI` `ARB_MAINNET` `ARB_RINKEBY` `OPT_MAINNET` `OPT_KOVAN` | -| `url` | `string` | URL endpoint where webhook is sent | -| `isActive` | `boolean` | `true` if webhook is active, `false` if not active. | -| `timeStamp` | `string` | Timestamp webhook was created. | -| `signingKey` | `string` | Signing key for given webhook. | -| `version` | `string` | Webhook version (v1 or v2). | -| `appId` | `string` | Only exists for **Mined / Dropped Transactions**. The App ID of the project the webhook is connected to. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Setup: npm install alchemy-sdk - // Github: https://github.com/alchemyplatform/alchemy-sdk-js - import { Alchemy, Network, WebhookType } from "alchemy-sdk"; - - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const settings = { - authToken: "your-notify-auth-token", - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - const minedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.MINED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - const droppedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.DROPPED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - const addressActivityWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.ADDRESS_ACTIVITY, - { - addresses: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96010"], - network: Network.ETH_MAINNET, - } - ); - - const customGraphQLWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.GRAPHQL, - { - graphqlQuery: ` - { - block { - # Block hash is a great primary key to use for your data stores! - hash - number - timestamp - # Add smart contract addresses to the list below to filter for specific logs - logs(filter: {addresses: [], topics: []}) { - data - topics - index - account { - address - } - transaction { - hash - nonce - index - from { - address - } - to { - address - } - value - gasPrice - maxFeePerGas - maxPriorityFeePerGas - gas - status - gasUsed - cumulativeGasUsed - effectiveGasPrice - createdContract { - address - } - } - } - } - } - `, - network: Network.ETH_MAINNET, - } - ); - - const nftActivityWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.NFT_ACTIVITY, - { - filters: [ - { - contractAddress: "0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656", - tokenId: "234", - }, - ], - network: Network.ETH_MAINNET, - } - ); - ``` - - -## Response - - - ```json json - { - "id": "string", - "network": "ETH_MAINNET", - "type": "MINED_TRANSACTION", - "url": "string", - "isActive": true, - "timeCreated": "string", - "signingKey": "string", - "version": "string", - "appId": "string" - } - ``` - - -# Use Cases - -Here are some potential use cases for the `createWebhook` method: - -* **Notification of a completed transaction**: If you have a web or mobile application that relies on completing transactions, you can use `createWebhook` to notify your application when a transaction is completed. This way, you can provide your users with real-time updates on the status of their transactions. - -* **Monitoring data changes**: If you have a database or a system that stores data, you can use `createWebhook` to monitor changes in the data. This can be useful if you need to keep track of updates to customer information, inventory levels, or any other data that is important to your business. - -* **Real-time updates for chat applications**: If you have a chat application, you can use `createWebhook` to notify your users in real-time when a new message is received or when a user has joined or left the chat. - -# Related Methods - -* [updateWebhook](/reference/updatewebhook-sdk): Update a `NftActivityWebhook's` active status or NFT filters. - -* [deleteWebhook](/reference/deletewebhook-sdk): Delete a webhook. diff --git a/fern/api-reference/alchemy-sdk/sdk-notify-methods/deletewebhook-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-notify-methods/deletewebhook-sdk-v3.mdx deleted file mode 100644 index 2f117910..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-notify-methods/deletewebhook-sdk-v3.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: deleteWebhook - SDK -description: Delete the provided webhook. -subtitle: Delete the provided webhook. -url: https://docs.alchemy.com/reference/deletewebhook-sdk-v3 -slug: reference/deletewebhook-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Delete the provided webhook. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ---------------------- | -| `webhook` | `string` | The webhook to delete. | - -# Response - -| Property | Type | Description | -| --------------- | ------ | ---------------- | -| `Promise` | `void` | Returns nothing. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Setup: npm install alchemy-sdk - // Github: https://github.com/alchemyplatform/alchemy-sdk-js - import { Alchemy, Network, WebhookType } from "alchemy-sdk"; - - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const settings = { - authToken: "your-notify-auth-token", - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - const minedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.MINED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - //Perform deletion of Webhooks - const deleteViaWebhookID = await alchemy.notify.deleteWebhook("wh_qv16bt12wbj9kax4"); - const deleteMinedTxWebhook = await alchemy.notify.deleteWebhook(minedTxWebhook); - ``` - - -## Response - - - ```json json - {} - ``` - - -# Use Cases - -Here are some potential use cases for the `deleteWebhook` method: - -* **Updating webhook settings**: If you need to update the URL or other settings of a webhook, you can delete the existing webhook using the`deleteWebhook` method and then create a new one with the updated settings using `createWebhook`. - -* **Removing unused webhooks**: If you have created a webhook that is no longer needed, you can delete it using `deleteWebhook` to clean up your API and reduce clutter. - -* **Resolving issues with a webhook**: If you are experiencing issues with a webhook, deleting it and creating a new one can help resolve the issue. - -* **Revoking access**: If you need to revoke access to your API for a particular webhook, you can delete it using `deleteWebhook`. - -# Related Methods - -* [createWebhook](/reference/createwebhook-sdk) - Create a new Webhook to track transactions sent by the app associated with the app id. -* [updateWebhook](/reference/updatewebhook-sdk) - Update a webhook address. diff --git a/fern/api-reference/alchemy-sdk/sdk-notify-methods/getaddresses-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-notify-methods/getaddresses-sdk-v3.mdx deleted file mode 100644 index a2e86415..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-notify-methods/getaddresses-sdk-v3.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: getAddresses - SDK -description: Get all addresses tracked for the provided AddressActivityWebhook .An Address Activity Webhook tracks ETH , ERC20 , ERC721 , and ERC1155 transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. -subtitle: Get all addresses tracked for the provided AddressActivityWebhook .An Address Activity Webhook tracks ETH , ERC20 , ERC721 , and ERC1155 transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. -url: https://docs.alchemy.com/reference/getaddresses-sdk-v3 -slug: reference/getaddresses-sdk-v3 ---- - -Get all addresses tracked for the provided `AddressActivityWebhook`.An Address Activity Webhook tracks `ETH`, `ERC20`, `ERC721`, and `ERC1155` transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all addresses tracked for the provided `AddressActivityWebhook`. - -An Address Activity Webhook tracks `ETH`, `ERC20`, `ERC721`, and `ERC1155` transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. - -# Parameters - -| Name | Type | Description | -| ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addressWebhook` | `string` | The Address Activity webhook. Available options are: `MINED_TRANSACTION`,`DROPPED_TRANSACTION`, `ADDRESS_ACTIVITY`, `NFT_ACTIVITY`. | -| `options` | `object` | `Optional` Pagination options when fetching addresses. Parameters include: 1. `limit` - `number` Number of addresses to fetch. 2. `pageKey` - `string` Page cursor for the next page. | - -# Response - -| Property | Type | Description | -| ---------------------------------- | ------------------ | -------------------------------------- | -| `Promise` | `array of objects` | List of addresses and pagination info. | - -### `AddressActivityResponse` parameters - -| Property | Type | Description | -| ------------ | ------------------ | ---------------------------------------------------------- | -| `addresses` | `array of strings` | List of addresses associated with given webhook. | -| `totalCount` | `number` | The total number of addresses. | -| `pageKey` | `string` | `Optional` Page key used to fetch the remaining addresses. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network} = require("alchemy-sdk"); - - // Configures the Alchemy SDK - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const config = { - authToken: "your-auth-token ", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the webhooks by fetching all the Webhooks - const hooks = await alchemy.notify.getAllWebhooks(); - - //Call the method to return the addresses by ID using the webhookId. - const addressesById = await alchemy.notify.getAddresses("wh_qv16bt12wbj9kax4", { - limit: 3, - }); - - // Get the addresses by webhooks - const addressesByWebhook = await alchemy.notify.getAddresses( - hooks.webhooks[3], - { limit: 3, pageKey: 1 } - ); - - //Logging the response to the console - console.log(addressesById, addressesByWebhook) - } - - main(); - ``` - - -## Response - - - ```shell shell - [ - { - "addresses": [ - "string" - ], - "totalCount": 0, - "pageKey": "string" - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getAddresses` method: - -* **Monitoring User Balances**: Developers can use Alchemy Notify to monitor user balances for specific Ethereum addresses. `getAddresses` can be used to retrieve the addresses currently being monitored and ensure that the balances of these addresses are up-to-date. - -* **Monitoring Smart Contract Events**: Alchemy Notify can also be used to monitor events on smart contracts. Developers can use `getAddresses` to retrieve the addresses currently being monitored and ensure that events from these addresses are being properly received and processed. - -* **Tracking Transactions**: Developers can use Alchemy Notify to track transactions on the Ethereum network.`getAddresses` can be used to retrieve the addresses of the wallets or contracts involved in a particular transaction and ensure that the transaction is being tracked properly. - -# Related Methods - -* [getAllWebhooks](/reference/getallwebhooks-sdk) - Get all webhooks on your team. diff --git a/fern/api-reference/alchemy-sdk/sdk-notify-methods/getallwebhooks-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-notify-methods/getallwebhooks-sdk-v3.mdx deleted file mode 100644 index 98bd3eb8..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-notify-methods/getallwebhooks-sdk-v3.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: getAllWebhooks - SDK -description: Get all webhooks on your team. The team is determined by the authToken provided into the AlchemySettings object when creating a new Alchemy instance.This method returns a response object containing all the webhooks. -subtitle: Get all webhooks on your team. The team is determined by the authToken provided into the AlchemySettings object when creating a new Alchemy instance.This method returns a response object containing all the webhooks. -url: https://docs.alchemy.com/reference/getallwebhooks-sdk-v3 -slug: reference/getallwebhooks-sdk-v3 ---- - -Get all webhooks on your team. The team is determined by the `authToken` provided into the `AlchemySettings` object when creating a new Alchemy instance.This method returns a response object containing all the webhooks. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all webhooks on your team. The team is determined by the `authToken` provided into the `AlchemySettings` object when creating a new Alchemy instance. - -This method returns a response object containing all the webhooks. - -# Response - -| Property | Type | Description | -| --------------------------------- | ------------------ | -------------------------------- | -| `Promise` | `array of objects` | Returns list of webhook objects. | - -### `GetAllWebhooksResponse` parameters - -| Property | Type | Description | -| ------------ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `webhooks` | `array of objects` | List of webhooks for your team. The parameters contained in this property include: 1. `id` - `string` The webhook's unique id. 2. `network` - `string` The network the webhook is on, e.g., `ETH_MAINNET`, `ETH_GOERLI`, `ETH_ROPSTEN`, `ETH_RINKEBY`, etc. 3. `type` - `string` The type of webhook. e.g., `MINED_TRANSACTION`, `DROPPED_TRANSACTION`, etc. 4. `url` - `string` The url that the webhook sends its payload to. 5. `isActive` - `boolean` Whether the webhook is currently active. 6. `timeCreated` - `string` The creation time of the webhook as an ISO string. 7. `signingKey` - `string` The signing key used to verify payloads for the webhook. 8. `version` - `string` The webhook version. All newly created webhooks default to V2. 9. `appId` - `string` Only exists for Mined / Dropped Transactions. The App ID of the project the webhook is connected to. | -| `totalCount` | `number` | The total number of webhooks. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network} = require("alchemy-sdk"); - - // Configures the Alchemy SDK - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const config = { - authToken: "", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return the webhooks - const response = await alchemy.notify.getAllWebhooks() - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { webhooks: [Array], totalCount: 0 } - ``` - - -# Use Cases - -Here are some potential use cases for the `getAllWebhooks` method: - -* **Monitoring transactions**: By setting up a webhook for transaction events, you can receive real-time notifications about when transactions are sent or received by your smart contract. This can be useful for tracking the progress of a transaction, and for triggering other actions in response to specific transaction events. - -* **Monitoring contract events**: In addition to tracking transactions, you can also set up webhooks to receive notifications when specific events occur within your smart contract. For example, you could set up a webhook to trigger an alert whenever a new user registers on your decentralized application. - -* **Managing account balances**: By using webhooks to monitor changes in your account balances, you can keep track of your cryptocurrency holdings in real time. This can be useful for managing your portfolio, and for triggering automated trades or other actions based on changes in your account balances. - -# Related Methods - -Some methods related to `getAllWebhooks` include: - -* [getAddresses](/reference/getaddresses-sdk) - Get all addresses tracked for the provided address activity. diff --git a/fern/api-reference/alchemy-sdk/sdk-notify-methods/getnftfilters-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-notify-methods/getnftfilters-sdk-v3.mdx deleted file mode 100644 index 0fcf3c1a..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-notify-methods/getnftfilters-sdk-v3.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: getNftFilters - SDK -description: Get all NFT filters tracked for the provided NftActivityWebhook , i.e., the \NFT_ACTIVITY\. -subtitle: Get all NFT filters tracked for the provided NftActivityWebhook , i.e., the \NFT_ACTIVITY\. -url: https://docs.alchemy.com/reference/getnftfilters-sdk-v3 -slug: reference/getnftfilters-sdk-v3 ---- - -Get all NFT filters tracked for the provided `NftActivityWebhook`, i.e., the "NFT\_ACTIVITY". - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all NFT filters tracked for the provided `NftActivityWebhook`, i.e., the "NFT\_ACTIVITY". - -# Parameters - -| Name | Type | Description | -| ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `webhookId` | `string` | The `id` of the NFT activity webhook. Passing in an incorrect id of a non-NFT webhook will result in a response object with no filters. | -| `options` | `object` | `Optional` Pagination options when fetching nft filters. Parameters include: 1. `limit` - `number` Number of addresses to fetch. 2. `pageKey` - `string` Page cursor for the next page. | - -# Response - -| Property | Type | Description | -| ----------------------------- | ------------------ | ------------------------------------- | -| `Promise` | `array of objects` | Returns a list of nft filter objects. | - -### `NftFiltersResponse` parameters - -| Property | Type | Description | -| ------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `filters` | `array of objects` | The NFT filters on the provided webhook. The parameters in the objects include: 1. `contractAddress` - `string` The contract address of the NFT. 2. `tokenId` - `string` The token id of the NFT to track. If this field is omitted, defaults to tracking all NFTs for the provided contract address. | -| `totalCount` | `number` | The total number of NFT filters on the webhook. | -| `pageKey` | `string` | `Optional` Page key used to fetch the remaining filters. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network} = require("alchemy-sdk"); - - // Configures the Alchemy SDK - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const config = { - authToken: "your-notify-auth-token", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the webhooks by fetching all the Webhooks - const hooks = await alchemy.notify.getAllWebhooks(); - - //Call the method to return the nfts by ID - const nftsById = await alchemy.notify.getNftFilters("wh_zyhqo5im08n6ougk", { - limit: 3, - pageKey: 1, - }); - - // Get the nfts by webhooks - const nftsByWebhook = await alchemy.notify.getNftFilters(hooks.webhooks[1]); - - //Logging the response to the console - console.log(nftsById, nftsByWebhook); - } - - main(); - ``` - - -## Response - - - ```json json - [ - { - "addresses": [ - { - "contractAddress": "string", - "tokenId": "string" - } - ], - "totalCount": 0, - "pageKey": "string" - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftFilters` method: - -* **Tracking NFT transfers**: You can use `getNftFilters` to track the transfer of NFTs between addresses. This can be useful for tracking the movement of valuable NFTs, such as rare digital art pieces or collectibles. - -* **Monitoring NFT sales**: If you're interested in the buying and selling of NFTs, you can use `getNftFilters` to receive notifications whenever an NFT is sold on a particular marketplace or exchange. This can help you stay up to date with market trends and fluctuations. - -* **Watching NFT auctions**: Many NFTs are sold through auction houses or bidding platforms. With `getNftFilters`, you can track the progress of NFT auctions in real-time and receive notifications when bids are placed, updated, or withdrawn. - -* **Monitoring NFT metadata changes**: The metadata associated with an NFT can be just as valuable as the NFT itself. With `getNftFilters`, you can track changes to NFT metadata, such as updates to the image or description, and receive notifications when these changes occur. diff --git a/fern/api-reference/alchemy-sdk/sdk-notify-methods/sdk-notify-methods.mdx b/fern/api-reference/alchemy-sdk/sdk-notify-methods/sdk-notify-methods.mdx deleted file mode 100644 index c39fe62f..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-notify-methods/sdk-notify-methods.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: SDK Notify Methods -description: List of all Alchemy SDK Notify methods. -subtitle: List of all Alchemy SDK Notify methods. -url: https://docs.alchemy.com/reference/sdk-notify-methods -slug: reference/sdk-notify-methods ---- - -# Introduction - -The Alchemy SDK Notify Methods allow for webhook notifications. - -# Supported Methods - -| Method | Description | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`getAllWebhooks`](/reference/sdk-getallwebhooks) | This method returns a response object containing all the webhooks. | -| [`getAddresses`](/reference/sdk-getaddresses) | Get all addresses tracked for the provided `AddressActivityWebhook`. An Address Activity Webhook tracks `ETH`, `ERC20`, `ERC721`, and `ERC1155` transfers for the provided addresses. | -| [`getNftFilters`](/reference/sdk-getnftfilters) | Get all NFT filters tracked for the provided `NftActivityWebhook`, i.e., the "NFT\_ACTIVITY". | -| [`updateWebhook`](/reference/sdk-updatewebhook) | Update an `NftActivityWebhook's` active status or NFT filters. | -| [`createWebhook`](/reference/sdk-createwebhook) | This endpoint allows you to create a webhook. | -| [`deleteWebhook`](/reference/sdk-deletewebhook) | Delete the provided webhook. | diff --git a/fern/api-reference/alchemy-sdk/sdk-notify-methods/updatewebhook-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-notify-methods/updatewebhook-sdk-v3.mdx deleted file mode 100644 index 4891e584..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-notify-methods/updatewebhook-sdk-v3.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: updateWebhook - SDK -description: Update a NftActivityWebhook's active status or NFT filters. -subtitle: Update a NftActivityWebhook's active status or NFT filters. -url: https://docs.alchemy.com/reference/updatewebhook-sdk-v3 -slug: reference/updatewebhook-sdk-v3 ---- - -Update a `NftActivityWebhook's` active status or NFT filters. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Update a `NftActivityWebhook's` active status or NFT filters. - -# Parameters - -| Name | Type | Description | -| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `nftWebhook` | `string` | The NFT activity webhook to update, i.e., NFT\_ACTIVITY = `NFT_ACTIVITY`. | -| `update` | `object` | Object containing the update. Parameters include: 1. `limit` - `number` Number of addresses to fetch. 2. `pageKey` - `string` Page cursor for the next page. | - -### `update` parameters - - - Include only one of these `update` objects as the second parameter. - - -| Name | Type | Description | -| ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `WebhookStatusUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `isActive` - `boolean` Whether the webhook is active. | -| `WebhookAddressUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `addAddresses` - `array of strings` The addresses to additionally track. 2. `removeAddresses` - `array of strings` Existing addresses to remove. | -| `WebhookAddressOverride` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `newAddresses` - `array of strings` The new addresses to track. Existing addresses will be removed. | -| `WebhookNftFilterUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `addFilters` - `array of strings` The filters to additionally track. 2. `removeFilters` - `array of strings` Existing filters to remove. | -| `CustomGraphqlWebhookUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to update the status for `GRAPHQL`. Parameters here include: 1. `isActive` - `boolean` Whether the webhook is active. | - -# Response - -| Property | Type | Description | -| --------------- | ------ | ------------------ | -| `Promise` | `void` | Returns undefined. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Setup: npm install alchemy-sdk - // Github: https://github.com/alchemyplatform/alchemy-sdk-js - const { Alchemy, Network } = require("alchemy-sdk"); - - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const settings = { - authToken: "your-auth-token", - network: Network.ETH_MAINNET, // Replace with your network. - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(settings); - - const main = async () => { - const updateWebhookById = await alchemy.notify.updateWebhook("wh_qv16bt12wbj9kax4", { isActive: false }); - - //// Updating Address Activity Webhook: add/remove addresses - const updateAddresses = - await alchemy.notify.updateWebhook("wh_qv16bt12wbj9kax4", { - addAddresses: [ - "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96010", - "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96011", - ], - removeAddresses: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96043"], - }); - - // Updating Address Activity Webhook: replace all addresses - const replaceAddresses = - await alchemy.notify.updateWebhook("wh_qv16bt12wbj9kax4", { - newAddresses: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96010"], - }); - - // Updating NFT Filter Webhook: add/remove filters - const updateNftFilterWebhook = - await alchemy.notify.updateWebhook("wh_zyhqo5im08n6ougk", { - addFilters: [ - { - contractAddress: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - tokenId: "101", - }, - ], - removeFilters: [ - { - contractAddress: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - tokenId: "24", - }, - ], - }); - - //Logging the response to the console - console.log(updateWebhookByIdById, updateAddresses, updateNftFilterWebhook, replaceAddresses) - } - - main(); - ``` - - -## Response - - - ```json json - undefined - ``` - - -# Use Cases - -Here are some potential use cases for the `updateWebhook` method: - -* **Changing the endpoint URL**: If you need to update the endpoint URL for an existing webhook, you can use the `updateWebhook` method to change it. - -* **Updating the authentication credentials**: If you need to update the authentication credentials for an existing webhook, you can use the `updateWebhook` method to provide new credentials. - -* **Modifying the notification format**: If you need to modify the format of the notifications that are sent to the webhook, you can use the `updateWebhook` method to update the payload format. - -* **Adding or removing headers**: If you need to add or remove headers to the requests that are sent to the webhook, you can use the `updateWebhook` method to modify the headers. - -# Related Methods - -* [createWebhook](/reference/createwebhook-sdk) - Create a new Webhook to track transactions sent by the app associated with the app id. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/cancelprivatetransaction-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/cancelprivatetransaction-sdk-v3.mdx deleted file mode 100644 index 245a79e5..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/cancelprivatetransaction-sdk-v3.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: cancelPrivateTransaction - SDK -description: Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the sendPrivateTransaction call submitting the transaction in the first place. -subtitle: Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the sendPrivateTransaction call submitting the transaction in the first place. -url: https://docs.alchemy.com/reference/cancelprivatetransaction-sdk-v3 -slug: reference/cancelprivatetransaction-sdk-v3 ---- - -Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the `sendPrivateTransaction` call submitting the transaction in the first place. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the [sendPrivateTransaction](/reference/sendprivatetransaction-sdk) call submitting the transaction in the first place. - -Please note that ***fast mode*** transactions cannot be canceled using this method. - -Returns a **boolean** indicating whether the cancellation was successful. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------------------------------- | -| `transactionHash` | `string` | Transaction hash of private transaction to be cancelled. | - -# Response - -| Property | Type | Description | -| ------------------ | --------- | -------------------------------------------- | -| `Promise` | `boolean` | Returns the transaction cancellation status. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network, Wallet, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash/Include your private trransaction hash - const txHash = "0x2e8dff1ae477808ec0682c27fbdd250a2e628090fe4e901e644c942628113b37" - - //Call the method to cancel the transaction based on the transaction hash - const response = await alchemy.transact.cancelPrivateTransaction(txHash) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - true - ``` - - -## Use Cases - -Here are some potential use cases for the `cancelPrivateTransaction` method: - -* **Error in transaction parameters**: If the sender realizes that they have made an error in the transaction parameters, such as sending the wrong amount or specifying the wrong recipient, they can cancel the transaction before it is processed. - -* **Privacy concerns**: If the sender realizes that the transaction includes sensitive information that they do not want to be visible on the blockchain, they can cancel the transaction before it is processed. - -* **High gas price**: If the gas price is too high, the sender may want to cancel the transaction and resubmit it with a lower gas price to save on transaction fees. - -## Related Methods - -Here are the methods related to `cancelPrivateTransaction`: - -* [sendPrivateTransaction](/reference/sendprivatetransaction-sdk): Used to send a single transaction to Flashbots. Flashbots will attempt to send the transaction to miners for the next 25 blocks. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/estimategas-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/estimategas-sdk.mdx deleted file mode 100644 index 035d2b8b..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/estimategas-sdk.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: estimateGas - SDK -description: Returns an estimate of the amount of gas that would be required to submit transaction to the network. An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. -subtitle: Returns an estimate of the amount of gas that would be required to submit transaction to the network. An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. -url: https://docs.alchemy.com/reference/estimategas-sdk -slug: reference/estimategas-sdk ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns an estimate of the amount of gas that would be required to submit a transaction to the network. - -An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. - -# Parameters - -| Name | Type | Description | -| ------------- | ---------------------------- | ------------------------------------ | -| `transaction` | `object` | The transaction to estimate gas for. | - -### `transaction` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address to the transaction is directed to. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `gasPrice?` | `number / string` | `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `number` | `QUANTITY` - (optional) Integer of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `string` | the maximum gas allowed. | -| `chainId?` | `number` | `optional`The Id of the transaction chain. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Response - -| Property | Type | Description | -| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Promise` | `object` | Returns an estimate of the amount of gas that would be required to submit the transaction to the network. This is an estimate of the amount of gas required to submit the given transaction to the network. An example of the output is `BigNumber { _hex: '0x651a', _isBigNumber: true }`. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make an `estimateGas` request using the Alchemy SDK: - - - ```javascript estimateGas.js - // Imports the Alchemy SDK - const { Alchemy, Network, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the params object - const params = { - // Wrapped ETH address - to: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - // `function deposit() payable` - data: "0xd0e30db0", - // 1 ether - value: Utils.parseEther("1.0"), - }; - - //The response returns the block number of the most recently mined block - let response = await alchemy.transact.estimateGas(params) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - BigNumber { _hex: '0x6d22', _isBigNumber: true } - ``` - - -# Use Cases - -Here are some common use cases for the `estimateGas` method: - -* **Optimizing transaction fees**: Gas is the fee paid by the sender of a transaction to compensate the miners for processing it. By estimating the gas required for a transaction beforehand, developers can optimize their transaction fees by choosing the right gas price and limit. - -* **Ensuring successful transactions**: If a transaction runs out of gas before it is completed, it will fail and the sender will lose the gas spent on it. By estimating the required gas beforehand, developers can ensure that the transaction has enough gas to complete successfully. - -* **Validating transaction parameters**: When submitting a transaction, certain parameters such as the gas limit and gas price must be set correctly to avoid issues such as network congestion or excessive fees. By using `estimateGas`, developers can validate these parameters before submitting the transaction. - -# Related Methods - -Here are the methods related to `estimateGas`: - -* [getTransaction](/reference/getTransaction-sdktransaction): Returns the transaction details. -* [getMaxPriorityFeePerGas](/reference/getmaxpriorityfeepergas-sdk): Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/getmaxpriorityfeepergas-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/getmaxpriorityfeepergas-sdk-v3.mdx deleted file mode 100644 index 87f01cf7..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/getmaxpriorityfeepergas-sdk-v3.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: getMaxPriorityFeePerGas - SDK -description: Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or \tip\, to get a transaction included in the current block. This number is generally used to set the maxPriorityFeePerGas field in a transaction request. -subtitle: Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or \tip\, to get a transaction included in the current block. This number is generally used to set the maxPriorityFeePerGas field in a transaction request. -url: https://docs.alchemy.com/reference/getmaxpriorityfeepergas-sdk-v3 -slug: reference/getmaxpriorityfeepergas-sdk-v3 ---- - -Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block. This number is generally used to set the `maxPriorityFeePerGas` field in a transaction request. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns a fee per gas (in `wei`) that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block. - -This number is generally used to set the `maxPriorityFeePerGas` field in a transaction request. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ------------------------ | -| `Promise` | `number` | Returns the fee per gas. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to display the max priority fee per gas in wei - const response = await alchemy.transact.getMaxPriorityFeePerGas() - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - 94000000 - ``` - - -# Use Cases - -Here are some potential use cases for the `getMaxPriorityFeePerGas` method: - -* **Setting optimal gas fees for transactions**: By using the `getMaxPriorityFeePerGas` method, developers can ensure that they set optimal gas fees for their transactions. This can help ensure that transactions are processed quickly and efficiently while minimizing user costs. -* **Automating gas fee calculations**: Some applications may need to calculate gas fees for transactions automatically. By using the `getMaxPriorityFeePerGas` method, developers can automate this process and ensure that gas fees are always set at the optimal level. -* **Monitoring network congestion**: The value returned by `getMaxPriorityFeePerGas` can be an indicator of network congestion. Developers can use this information to monitor the network's health and adjust their gas fees accordingly. -* **Providing transparency to users**: By displaying the current `getMaxPriorityFeePerGas` value to users, developers can provide transparency and help users make informed decisions about their transactions. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/gettransaction-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/gettransaction-sdk-v3.mdx deleted file mode 100644 index 2dcdcb54..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/gettransaction-sdk-v3.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: getTransaction - SDK -description: Returns the transaction with hash or null if the transaction is unknown.If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent an... -subtitle: Returns the transaction with hash or null if the transaction is unknown.If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent an... -url: https://docs.alchemy.com/reference/gettransaction-sdk-v3 -slug: reference/gettransaction-sdk-v3 ---- - -Returns the transaction with `hash` or `null` if the transaction is unknown.If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent and not yet indexed) in which case this method may also return null. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the transaction with hash or null if the transaction is unknown. - -If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent and not yet indexed) in which case this method may also return null. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------- | -| `transactionHash` | `string` | The hash of the transaction to get. | - -# Response - -| Property | Type | Description | -| -------------------------------------- | -------- | --------------------------------- | -| `Promise` | `object` | Returns the transaction response. | - -### `TransactionResponse` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address the transaction is directed to. | -| `hash` | `string` | The transaction hash. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `blockNumber` | `number` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `blockHash` | `string` | `32 Bytes` - hash of the block where this log was in. null when its pending. `null` when its pending log. | -| `gasPrice?` | `object` | An object containing the `type` and `hex` parameters of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `object` | An object containing the `type` and `hex` parameters of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `object` | An object containing the `type` and `hex` parameters of the the maximum gas allowed. | -| `chainId?` | `number` | `optional` the Id of the transaction chain. | -| `timestamp` | `number` | `Optional`. Returns only if a transaction has been mined. | -| `confirmations` | `number` | number of transaction confirmations. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `raw` | `string` | The raw transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const txHash = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.getTransaction(txHash) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "hash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b", - "type": 0, - "accessList": null, - "blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", - "blockNumber": 6139707, - "transactionIndex": 65, - "confirmations": 12046451, - "from": "0xa7d9ddBE1f17865597fBD27EC712455208B6B76d", - "gasPrice": { - "type": "BigNumber", - "hex": "0x04a817c800" - }, - "gasLimit": { - "type": "BigNumber", - "hex": "0xc350" - }, - "to": "0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB", - "value": { - "type": "BigNumber", - "hex": "0x0f3dbb76162000" - }, - "nonce": 21, - "data": "0x68656c6c6f21", - "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea", - "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c", - "v": 37, - "creates": null, - "chainId": 1 - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getTransaction` method: - -* **Transaction status**: You can use `getTransaction` to check the status of a transaction by its hash. If the transaction has been mined and confirmed, you will be able to see the block number and other details. If the transaction has not yet been mined, you can use `getTransactionReceipt` to get the current status. - -* **Transaction details**: You can use `getTransaction` to retrieve the details of a transaction, including the sender and recipient addresses, the amount transferred, and the gas used. This information can be useful for auditing purposes or to reconcile your own records. - -* **Debugging**: If you are experiencing issues with a transaction, you can use `getTransaction` to retrieve the details and identify the source of the problem. For example, if a transaction is failing due to insufficient gas, you can use `getTransaction` to confirm the gas limit and adjust it as needed. - -# Related Methods - -Here are the methods related to `getTransaction`: - -* [sendTransaction](/reference/sendtransaction-sdk) - Submits transaction to the network to be mined. -* [waitForTransaction](/reference/waitfortransaction-sdk) - Returns a promise which will not resolve until specified transaction hash is mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/sdk-transact-methods.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/sdk-transact-methods.mdx deleted file mode 100644 index 860b53e1..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/sdk-transact-methods.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: SDK Transact Methods -description: List of all Alchemy SDK Transact methods. -subtitle: List of all Alchemy SDK Transact methods. -url: https://docs.alchemy.com/reference/sdk-transact-methods -slug: reference/sdk-transact-methods ---- - -# Introduction - -The available Alchemy SDK Transact methods include: - -# Supported Methods - -| Method | Description | -| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`getTransaction`](/reference/sdk-gettransaction) | Returns the transaction with hash or null if the transaction is unknown. | -| [`sendTransaction`](/reference/sdk-sendtransaction) | Submits transactions to the network to be mined. | -| [`sendPrivateTransaction`](/reference/sdk-sendprivatetransaction) | Used to send a single transaction to Flashbots. Flashbots will attempt to send the transaction to miners for the next 25 blocks. | -| [`cancelPrivateTransaction`](/reference/sdk-cancelprivatetransaction) | Stops the provided private transaction from being submitted for future blocks. | -| [`waitForTransaction`](/reference/sdk-waitfortransaction) | Returns a promise which will not resolve until the specified transaction hash is mined. | -| [`estimateGas`](/reference/sdk-estimategas) | Returns an estimate of the amount of gas required to submit transactions to the network. | -| [`getMaxPriorityFeePerGas`](/reference/getmaxpriorityfeepergas-sdk) | Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block. | -| [`simulateAssetChanges`](/reference/simulateassetchanges-sdk) | Simulates the asset changes resulting from a single transaction. | -| [`simulateAssetChangesBundle`](/reference/simulateassetchangesbundle-sdk) | Simulates the asset changes resulting from a list of transactions simulated in sequence. | -| [`simulateExecution`](/reference/simulateexecution-sdk) | Simulates a single transaction and the resulting and returns list of decoded traces and logs that occurred during the transaction simulation. | -| [`simulateExecutionBundle`](/reference/simulateexecutionbundle-sdk) | Simulates a list of transactions in sequence and returns list of decoded traces and logs that occurred for each transaction during simulation. | diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/sendtransaction-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/sendtransaction-sdk-v3.mdx deleted file mode 100644 index 9eacad6c..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/sendtransaction-sdk-v3.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: sendTransaction - SDK -description: Submits transaction to the network to be mined. The transaction must be signed, and be valid (i.e. the nonce is correct and the account has sufficient balance to pay for the transaction). -subtitle: Submits transaction to the network to be mined. The transaction must be signed, and be valid (i.e. the nonce is correct and the account has sufficient balance to pay for the transaction). -url: https://docs.alchemy.com/reference/sendtransaction-sdk-v3 -slug: reference/sendtransaction-sdk-v3 ---- - -Submits transaction to the network to be mined. The transaction must be signed, and be valid (i.e. the `nonce` is correct and the account has sufficient balance to pay for the transaction). - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Submits transaction to the network to be mined. The transaction must be signed, and valid (i.e. the `nonce` is correct and the account has sufficient balance to pay for the transaction). - -# Parameters - -| Name | Type | Description | -| ------------------- | -------- | ------------------------------- | -| `signedTransaction` | `string` | The signed transaction to send. | - -# Response - -| Property | Type | Description | -| ------------------------------ | -------- | --------------------------------- | -| `Promise` | `object` | Returns the transaction response. | - -### `TransactionResponse` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address the transaction is directed to. | -| `hash` | `string` | The transaction hash. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `blockNumber` | `number` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `blockHash` | `string` | `32 Bytes` - hash of the block where this log was in. null when its pending. `null` when its pending log. | -| `gasPrice?` | `object` | An object containing the `type` and `hex` parameters of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `object` | An object containing the `type` and `hex` parameters of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `object` | An object containing the `type` and `hex` parameters of the the maximum gas allowed. | -| `chainId?` | `number` | `optional` the Id of the transaction chain. | -| `timestamp` | `number` | `Optional`. Returns only if a transaction has been mined. | -| `confirmations` | `number` | number of transaction confirmations. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `raw` | `string` | The raw transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network, Wallet, Utils } = require("alchemy-sdk"); - const dotenv = require("dotenv"); - dotenv.config(); - - //Replace with your own private key - const {PRIVATE_KEY} = process.env; - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - const wallet = new Wallet(PRIVATE_KEY); - - const main = async () => { - // define the transaction - const transaction = { - to: "0xa238b6008Bc2FBd9E386A5d4784511980cE504Cd", - value: Utils.parseEther("0.001"), - gasLimit: "21000", - maxPriorityFeePerGas: Utils.parseUnits("5", "gwei"), - maxFeePerGas: Utils.parseUnits("20", "gwei"), - nonce: await alchemy.core.getTransactionCount(wallet.getAddress()), - type: 2, - chainId: 5, // Corresponds to ETH_GOERLI - }; - - const rawTransaction = await wallet.signTransaction(transaction); - const response = await alchemy.transact.sendTransaction(rawTransaction) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - value: { - to: '0xa238b6008Bc2FBd9E386A5d4784511980cE504Cd', - value: { - "type": "BigNumber", - "hex": '0x038d7ea4c68000' - }, - gasLimit: '21000', - maxPriorityFeePerGas: { - "type": "BigNumber", - "hex": '0x012a05f200' - }, - maxFeePerGas: { - "type": "BigNumber" - "hex": '0x04a817c800' - }, - type: 2, - chainId: 5 - } - } - ``` - - -# Use Cases - -Here are some potential use cases for the `sendTransaction` method: - -* **Sending ETH**: `sendTransaction` can be used to send Ether from one Ethereum address to another. This is one of the most common use cases for sendTransaction. - -* **Deploying a smart contract**: When you deploy a smart contract to the Ethereum blockchain, you need to send a transaction that includes the bytecode of the contract. `sendTransaction` can be used to send this transaction. - -* **Interacting with a smart contract**: Once a smart contract has been deployed, you can interact with it by sending transactions that call its functions. `sendTransaction` can be used to send these transactions. - -* **Token transfers**: Tokens on the Ethereum blockchain are often built using smart contracts. `sendTransaction` can be used to transfer tokens from one Ethereum address to another. - -# Related Methods - -Here are the methods related to `sendTransaction`: - -* [sendPrivateTransaction](/reference/sendprivatetransaction-sdk): Used to send a single transaction to Flashbots. Flashbots will attempt to send the transaction to miners for the next 25 blocks. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateassetchanges-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateassetchanges-sdk-v3.mdx deleted file mode 100644 index 00998568..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateassetchanges-sdk-v3.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: simulateAssetChanges - SDK -description: Simulates the asset changes resulting from a single transaction. Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. -subtitle: Simulates the asset changes resulting from a single transaction. Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. -url: https://docs.alchemy.com/reference/simulateassetchanges-sdk-v3 -slug: reference/simulateassetchanges-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates the asset changes resulting from a single transaction. - -Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transaction` | `object` | The transaction to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transaction` object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to` | `string` | The address the transaction is directed to. | -| `value` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| --------------------------------------- | -------- | --------------------------------- | -| `Promise` | `object` | Returns the transaction response. | - -### `SimulateAssetChangesResponse` object parameters - -| Property | Type | Description | -| ---------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | `array of objects` | An array of asset changes resulted from the transaction. | -| `error?` | `object` | Optional error field that is present if an error occurred. The available parameter in this error response is: `message`: `string` The error message. | -| `gasUsed?` | `string` | The amount of gas used by the transaction represented as a hex string. The field is undefined if an error occurred. | - -### `changes` array property parameters - -| Property | Type | Description | -| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount?` | `string` | The amount as an integer string. This value is calculated by applying the decimals field to the `rawAmount` field. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `assetType` | `string` | The type of asset from the transaction. | -| `changeType` | `string` | The type of change from the transaction. | -| `contractAddress?` | `string` | The contract address of the asset. Only applicable to ERC20, ERC721, ERC1155, NFT and SPECIAL\_NFT transactions. | -| `decimals?` | `number` | The number of decimals used by the ERC20 token. Set to 0 for APPROVE changes. Field is undefined if it's not defined in the contract and not available from other sources. | -| `from` | `string` | The from address. | -| `logo?` | `string` | URL for the logo of the asset, if available. Only applicable to ERC20 transactions. | -| `name?` | `string` | The name of the asset transferred, if available. | -| `rawAmount` | `string` | The raw amount as an integer string. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `symbol?` | `string` | The symbol of the asset transferred if available. | -| `to` | `string` | The to address. | -| `tokenId` | `string` | The token id of the asset transferred. Only applicable to ERC721, ERC1155 and SPECIAL\_NFT NFTs. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnx = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.simulateAssetChanges(trnx) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "changes": [ - { - "assetType": "NATIVE", - "changeType": "TRANSFER", - "from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d", - "to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb", - "rawAmount": "4290000000000000", - "decimals": 18, - "symbol": "ETH", - "name": "Ethereum", - "logo": "https://static.alchemyapi.io/images/network-assets/eth.png", - "amount": "0.00429" - } - ], - "gasUsed": "0x0" - } - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateAssetChanges` method: - -* **Testing**: Developers can use `simulateAssetChanges` to test their smart contracts before deploying them to a blockchain network. By simulating the changes that would occur, developers can identify potential errors and debug their code. - -* **Optimizing asset transactions**: Businesses that regularly perform asset transactions, such as banks or trading firms, can use `simulateAssetChanges` to optimize their transaction strategies. These firms can identify the most efficient ways to move assets between accounts by simulating different transaction scenarios. - -# Related Methods - -Here are the methods related to `simulateAssestChanges`: - -* [simulateAssetChangesBundle](/reference/simulateassetchangesbundle-sdk): Simulates the asset changes resulting from a list of transactions simulated in sequence. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateassetchangesbundle-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateassetchangesbundle-sdk-v3.mdx deleted file mode 100644 index 730d3740..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateassetchangesbundle-sdk-v3.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: simulateAssetChangesBundle - SDK -description: Simulates the asset changes resulting from a list of transactions simulated in sequence. Returns a list of asset changes for each transaction during simulation. -subtitle: Simulates the asset changes resulting from a list of transactions simulated in sequence. Returns a list of asset changes for each transaction during simulation. -url: https://docs.alchemy.com/reference/simulateassetchangesbundle-sdk-v3 -slug: reference/simulateassetchangesbundle-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates the asset changes resulting from a list of transactions simulated in sequence. - -Returns a list of asset changes for each transaction during simulation. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transactions` | `array` | Transactions list of max 3 transactions to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transactions` array object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to` | `string` | The address the transaction is directed to. | -| `value` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| --------------------------------------- | ------------------ | ----------------------------------- | -| `Promise` | `array of objects` | Returns the transactions' response. | - -### `SimulateAssetChangesResponse` object parameters - -| Property | Type | Description | -| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | `array` | An array of asset changes resulted from the transaction. | -| `error?` | `object` | Optional error field that is present if an error occurred. The available parameter in this error response is: `message`: `string` The error message. | -| `gasUsed?` | `string` | The amount of gas used by the transaction represented as a hex string. The field is undefined if an error occurred. | - -### `changes` array property parameters - -| Property | Type | Description | -| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount?` | `string` | The amount as an integer string. This value is calculated by applying the decimals field to the `rawAmount` field. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `assetType` | `string` | The type of asset from the transaction. | -| `changeType` | `string` | The type of change from the transaction. | -| `contractAddress?` | `string` | The contract address of the asset. Only applicable to ERC20, ERC721, ERC1155, NFT and SPECIAL\_NFT transactions. | -| `decimals?` | `number` | The number of decimals used by the ERC20 token. Set to 0 for APPROVE changes. Field is undefined if it's not defined in the contract and not available from other sources. | -| `from` | `string` | The from address. | -| `logo?` | `string` | URL for the logo of the asset, if available. Only applicable to ERC20 transactions. | -| `name?` | `string` | The name of the asset transferred, if available. | -| `rawAmount` | `string` | The raw amount as an integer string. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `symbol?` | `string` | The symbol of the asset transferred if available. | -| `to` | `string` | The to address. | -| `tokenId` | `string` | The token id of the asset transferred. Only applicable to ERC721, ERC1155 and SPECIAL\_NFT NFTs. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnxs = - [ - { - tr1: "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b", - tr2: "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bbrrewn67353841eer3432cb45" - } - ] - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.simulateAssetChangesBundle(trnxs) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - [ - { - "changes": [], - "gasUsed": "0xcf08" - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateAssetChangesBundle` method: - -* **Testing**: Developers can use `simulateAssetChangesBundle` to test their smart contracts before deploying them to a blockchain network. By simulating the changes that would occur, developers can identify potential errors and debug their code. - -* **Optimizing asset transactions**: Businesses that regularly perform asset transactions, such as banks or trading firms, can use `simulateAssetChangesBundle` to optimize their transaction strategies. By simulating different transactions scenarios, these firms can identify the most efficient ways to move assets between accounts. - -# Related Methods - -Here are the methods related to `simulateAssestChanges`: - -* [simulateAssetChangesBundle](/reference/simulateassetchanges-sdk): Simulates the asset changes resulting from a single transaction. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateexecution-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateexecution-sdk-v3.mdx deleted file mode 100644 index abe945f0..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateexecution-sdk-v3.mdx +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: simulateExecution - SDK -description: Simulates a single transaction and the resulting and returns list of decoded traces and logs that occurred during the transaction simulation. -subtitle: Simulates a single transaction and the resulting and returns list of decoded traces and logs that occurred during the transaction simulation. -url: https://docs.alchemy.com/reference/simulateexecution-sdk-v3 -slug: reference/simulateexecution-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates the asset changes resulting from a single transaction. - -Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transaction` | `object` | The transaction to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transaction` object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to` | `string` | The address the transaction is directed to. | -| `value` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | -------------------------------------------- | -| `Promise` | `object` | Returns the transaction simulation response. | - -### `SimulateExecutionResponse` object parameters - -| Property | Type | Description | -| -------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `calls` | `array of object` | An array of traces generated during simulation that represent the execution of the transaction along with the decoded calls if available. | -| `logs` | `array of object` | An array of logs emitted during simulation along with the decoded logs if available. | - -### `calls` array property parameters - -| Property | Type | Description | -| ---------- | -------- | --------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the call. Provided on a best-effort basis. | -| `error` | `string` | Optional error field. | -| `gas` | `string` | Gas provided for call as a hex string. | -| `gasUsed` | `string` | Gas used during the call as a hex string. | -| `input` | `string` | Call data. | -| `from` | `string` | From address of the transaction. | -| `output` | `string` | Return data. | -| `type` | `string` | The type of call. | -| `value` | `string` | Amount of value transfer as a hex string. | -| `to` | `string` | To address of the transaction. | - -### `logs` array property parameters - -| Property | Type | Description | -| ---------- | ------------------ | -------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the log. Provided on a best-effort basis. | -| `address` | `string` | The address of the contract that generated the log. | -| `data` | `string` | The data included the log. | -| `topics` | `array of strings` | An array of topics in the log. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnx = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.simulateExecution(trnx) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - calls: [ - { - type: 'CALL', - from: '0xa7d9ddbe1f17865597fbd27ec712455208b6b76d', - to: '0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb', - value: '0xf3dbb76162000', - gas: '0x6fb0', - gasUsed: '0x53a0', - input: '0x68656c6c6f21', - output: '0x' - } - ], - logs: [] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateExecution` method: - -* **Testing**: You can use `simulateExecution` to test the logic of your smart contract without incurring the cost of actually executing the transaction on the blockchain. - -* **Gas estimation**: The method can also be used to estimate the amount of gas required to execute a transaction. This can be useful in determining the appropriate gas limit to set for a transaction to ensure it is processed efficiently. - -* **Debugging**: When you encounter errors while interacting with a smart contract, `simulateExecution` can help you debug the issue. By simulating the execution of the transaction, you can identify the specific line of code that is causing the error. - -# Related Methods - -Here are the methods related to `simulateExecution`: - -* [simulateExecutionBundle](/reference/simulateExecutionBundle-sdk): Simulates a list of transactions in sequence and returns list of decoded traces and logs that occurred for each transaction during simulation. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateexecutionbundle-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateexecutionbundle-sdk-v3.mdx deleted file mode 100644 index 0dfab7ca..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/simulateexecutionbundle-sdk-v3.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: simulateExecutionBundle - SDK -description: Simulates a list of transactions in sequence and returns list of decoded traces and logs that occurred for each transaction during simulation. Note that this method does not run any transactions on the blockchain. -subtitle: Simulates a list of transactions in sequence and returns list of decoded traces and logs that occurred for each transaction during simulation. Note that this method does not run any transactions on the blockchain. -url: https://docs.alchemy.com/reference/simulateexecutionbundle-sdk-v3 -slug: reference/simulateexecutionbundle-sdk-v3 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates a list of transactions in sequence and returns a list of decoded traces and logs that occurred for each transaction during simulation. - -Note that this method does not run any transactions on the blockchain. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transactions` | `object` | Transactions list of max 3 transactions to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transactions` object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to?` | `string` | The address the transaction is directed to. | -| `value?` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | -------------------------------------------- | -| `Promise[]` | `array` of `SimulateExecutionResponse` | Returns execution traces for each transaction in the bundle. | - -### `SimulateExecutionResponse` object parameters - -| Property | Type | Description | -| -------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `calls` | `array of object` | An array of traces generated during simulation that represent the execution of the transaction along with the decoded calls if available. | -| `logs` | `array of object` | An array of logs emitted during simulation along with the decoded logs if available. | - -### `calls` array property parameters - -| Property | Type | Description | -| ---------- | -------- | --------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the call. Provided on a best-effort basis. | -| `error` | `string` | Optional error field. | -| `gas` | `string` | Gas provided for call as a hex string. | -| `gasUsed` | `string` | Gas used during the call as a hex string. | -| `input` | `string` | Call data. | -| `from` | `string` | From address of the transaction. | -| `output` | `string` | Return data. | -| `type` | `string` | The type of call. | -| `value` | `string` | Amount of value transfer as a hex string. | -| `to` | `string` | To address of the transaction. | - -### `logs` array property parameters - -| Property | Type | Description | -| ---------- | ------------------ | -------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the log. Provided on a best-effort basis. | -| `address` | `string` | The address of the contract that generated the log. | -| `data` | `string` | The data included the log. | -| `topics` | `array of strings` | An array of topics in the log. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnxs = [ - { - transaction: - "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"} - ]; - - //Call the method to display the transaction simulation execution - const response = await alchemy.transact.simulateExecutionBundle(trnxs) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - calls: [ - { - type: 'CALL', - from: '0xa7d9ddbe1f17865597fbd27ec712455208b6b76d', - to: '0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb', - value: '0xf3dbb76162000', - gas: '0x6fb0', - gasUsed: '0x53a0', - input: '0x68656c6c6f21', - output: '0x' - } - ], - logs: [] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateExecutionBundle` method: - -* **Testing**: You can use `simulateExecutionBundle` to test the logic of your smart contract without incurring the cost of actually executing the transactions on the blockchain. - -* **Gas estimation**: The method can also be used to estimate the amount of gas required to execute a series of transactions. This can be useful in determining the appropriate gas limit to set for a transaction to ensure it is processed efficiently. - -* **Debugging**: When you encounter errors while interacting with a smart contract, `simulateExecutionBundle` can help you debug the issue. By simulating the execution of the set of transactions, you can identify the specific line of code that is causing the error. - -# Related Methods - -Here are the methods related to `simulateExecutionBundle`: - -* [simulateExecution](/reference/simulateexecution-sdk): Simulates a single transaction and the results and returns a list of decoded traces and logs that occurred during the transaction simulation. diff --git a/fern/api-reference/alchemy-sdk/sdk-transact-methods/waitfortransaction-sdk-v3.mdx b/fern/api-reference/alchemy-sdk/sdk-transact-methods/waitfortransaction-sdk-v3.mdx deleted file mode 100644 index 0d319d8a..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-transact-methods/waitfortransaction-sdk-v3.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: waitForTransaction - SDK -description: Returns a promise which will not resolve until specified transaction hash is mined.If confirmations is 0, this method is non-blocking, and if the transaction has not been mined returns null . Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in wh... -subtitle: Returns a promise which will not resolve until specified transaction hash is mined.If confirmations is 0, this method is non-blocking, and if the transaction has not been mined returns null . Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in wh... -url: https://docs.alchemy.com/reference/waitfortransaction-sdk-v3 -slug: reference/waitfortransaction-sdk-v3 ---- - -Returns a promise which will not resolve until specified transaction hash is mined.If `confirmations` is 0, this method is non-blocking, and if the transaction has not been mined returns `null`. Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in which it was mined. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns a promise which will not resolve until the specified transaction hash is mined. - -If `confirmations` is 0, this method is non-blocking, and if the transaction has not been mined returns `null`. Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in which it was mined. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------------------------------- | -| `transactionHash` | `string` | The hash of the transaction to wait for. | -| `confirmations` | `number` | `Optional` The number of blocks to wait for. | -| `timeout` | `number` | `Optional` The maximum time to wait for the transaction to confirm. | - -# Response - -| Property | Type | Description | -| ------------------------------------- | -------- | ------------------------------- | -| `Promise` | `object` | Returns the transaction status. | - -### `TransactionReceipt` response object parameters - -| Property | Type | Description | -| -------------------- | ------------------ | -------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `20 Bytes` - address of the receiver. `null` when its a contract creation transaction | -| `from` | `string` | `20 Bytes` - address of the sender. | -| `contractAddress` | `string` | `20 Bytes` - The contract address created, if the transaction was a contract creation, otherwise `null`. | -| `transactionIndex` | `number` | Integer of the transactions index position log was created from. `null` when its pending log. | -| `root?` | `string` | `32 bytes` of post-transaction stateroot (pre Byzantium). | -| `gasUsed` | `number \| string` | The amount of gas used by this specific transaction alone | -| `logsBloom` | `string` | `256 Bytes` - Bloom filter for light clients to quickly retrieve related logs. | -| `blockHash` | `string` | `32 Bytes` - hash of the block where this log was in. null when its pending. null when its pending log. | -| `transactionHash` | `string` | `32 Bytes` - hash of the transaction | -| `logs` | `array` | Array of log objects, which this transaction generated. | -| `blockNumber` | `number` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `confirmations` | `number` | Describes the number of confirmations. | -| `cummulativeGasUsed` | `number \| string` | The total amount of gas used when this transaction was executed in the block. | -| `effectiveGasPrice` | `number \| string` | Effective gas price used. | -| `byzantium` | `boolean` | specifies `true` or `falsle`. | -| `type` | `number` | Describes the type. | -| `status?` | `number` | Either **1** (success) or **0** (failure) | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network, Wallet, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const txHash = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method - const response = await alchemy.transact.waitForTransaction(txHash) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { - "to": "0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB", - "from": "0xa7d9ddBE1f17865597fBD27EC712455208B6B76d", - "contractAddress": null, - "transactionIndex": 65, - "gasUsed": { - "type": "BigNumber", - "hex": "0x53a0" - }, - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", - "transactionHash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b", - "logs": [], - "blockNumber": 6139707, - "confirmations": 12049691, - "cumulativeGasUsed": { - "type": "BigNumber", - "hex": "0x20ec2d" - }, - "effectiveGasPrice": { - "type": "BigNumber", - "hex": "0x04a817c800" - }, - "status": 1, - "type": 0, - "byzantium": true - } - ``` - - -# Use Cases - -Here are some potential use cases for the `waitForTransaction` method: - -* **Ensuring transaction execution**: When sending a transaction to the Ethereum network, there is no guarantee that the transaction will be executed immediately. `waitForTransaction` can be used to ensure that the transaction is mined and executed before moving on to the next step in the program. - -* **Waiting for contract deployment**: When deploying a new smart contract to the Ethereum network, it may take some time for the contract to be deployed and ready for use. `waitForTransaction` can be used to wait for the contract deployment transaction to be confirmed before interacting with the contract. - -* **Checking transaction status**: `waitForTransaction` can be used to check the status of a transaction and ensure that it was successfully mined and confirmed by the network. This is useful for ensuring that funds were successfully transferred, or for verifying that a contract function was executed as expected. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/estimategas-sdk-2.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/estimategas-sdk-2.mdx deleted file mode 100644 index fa1a2d10..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/estimategas-sdk-2.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: estimateGas - SDK -description: Returns an estimate of the amount of gas that would be required to submit transaction to the network. An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. -subtitle: Returns an estimate of the amount of gas that would be required to submit transaction to the network. An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. -url: https://docs.alchemy.com/reference/estimategas-sdk-2 -slug: reference/estimategas-sdk-2 ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns an estimate of the amount of gas that would be required to submit a transaction to the network. - -An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. - -# Parameters - -| Name | Type | Description | -| ------------- | ---------------------------- | ------------------------------------ | -| `transaction` | `object` | The transaction to estimate gas for. | - -### `transaction` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address to the transaction is directed to. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `gasPrice?` | `number / string` | `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `number` | `QUANTITY` - (optional) Integer of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `string` | the maximum gas allowed. | -| `chainId?` | `number` | `optional`The Id of the transaction chain. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Response - -| Property | Type | Description | -| -------------------- | -------- | --------------------------------------------------------------------------------- | -| `Promise` | `object` | Returns an estimate of the gas required to submit the transaction to the network. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk@latest - ``` - - ```shell yarn - yarn add alchemy-sdk@latest - ``` - - -## Request - -Here is an example of how to make an `estimateGas` request using the Alchemy SDK: - - - ```javascript estimateGas.js - // Imports the Alchemy SDK - const { Alchemy, Network, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the params object - const params = { - // Wrapped ETH address - to: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - // `function deposit() payable` - data: "0xd0e30db0", - // 1 ether - value: Utils.parseEther("1.0"), - }; - - //The response returns the block number of the most recently mined block - let response = await alchemy.transact.estimateGas(params) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "type": "BigNumber", - "hex": "0x6d22" - } - ``` - - -# Use Cases - -Here are some common use cases for the `estimateGas` method: - -* **Optimizing transaction fees**: Gas is the fee paid by the sender of a transaction to compensate the miners for processing it. By estimating the gas required for a transaction beforehand, developers can optimize their transaction fees by choosing the right gas price and limit. - -* **Ensuring successful transactions**: If a transaction runs out of gas before it is completed, it will fail and the sender will lose the gas spent on it. By estimating the required gas beforehand, developers can ensure that the transaction has enough gas to complete successfully. - -* **Validating transaction parameters**: When submitting a transaction, certain parameters such as the gas limit and gas price must be set correctly to avoid issues such as network congestion or excessive fees. By using `estimateGas`, developers can validate these parameters before submitting the transaction. - -# Related Methods - -Here are the methods related to `estimateGas`: - -* [getTransaction](/reference/getTransaction-sdktransaction): Returns the transaction details. -* [getMaxPriorityFeePerGas](/reference/getmaxpriorityfeepergas-sdk): Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/getmaxpriorityfeepergas-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/getmaxpriorityfeepergas-sdk.mdx deleted file mode 100644 index 883869de..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/getmaxpriorityfeepergas-sdk.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: getMaxPriorityFeePerGas - SDK -description: Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or \tip\, to get a transaction included in the current block. This number is generally used to set the maxPriorityFeePerGas field in a transaction request. -subtitle: Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or \tip\, to get a transaction included in the current block. This number is generally used to set the maxPriorityFeePerGas field in a transaction request. -url: https://docs.alchemy.com/reference/getmaxpriorityfeepergas-sdk -slug: reference/getmaxpriorityfeepergas-sdk ---- - -Returns a fee per gas (in wei) that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block. This number is generally used to set the `maxPriorityFeePerGas` field in a transaction request. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns a fee per gas (in `wei`) that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block. - -This number is generally used to set the `maxPriorityFeePerGas` field in a transaction request. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ------------------------ | -| `Promise` | `number` | Returns the fee per gas. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to display the max priority fee per gas in wei - const response = await alchemy.transact.getMaxPriorityFeePerGas() - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - 94000000 - ``` - - -# Use Cases - -Here are some potential use cases for the `getMaxPriorityFeePerGas` method: - -* **Setting optimal gas fees for transactions**: By using the `getMaxPriorityFeePerGas` method, developers can ensure that they are setting optimal gas fees for their transactions. This can help to ensure that transactions are processed quickly and efficiently, while also minimizing costs for users. -* **Automating gas fee calculations**: Some applications may need to automatically calculate gas fees for transactions. By using the `getMaxPriorityFeePerGas` method, developers can automate this process and ensure that gas fees are always set at the optimal level. -* **Monitoring network congestion**: The value returned by `getMaxPriorityFeePerGas` can be an indicator of network congestion. Developers can use this information to monitor the health of the network and adjust their gas fees accordingly. -* **Providing transparency to users**: By displaying the current `getMaxPriorityFeePerGas` value to users, developers can provide transparency and help users make informed decisions about their transactions. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/gettokensforowner-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/gettokensforowner-sdk.mdx deleted file mode 100644 index e4b87df2..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/gettokensforowner-sdk.mdx +++ /dev/null @@ -1,370 +0,0 @@ ---- -title: getTokensForOwner - SDK -description: Returns the tokens that the specified address owns, along with the amount of each token and the relevant metadata. -subtitle: Returns the tokens that the specified address owns, along with the amount of each token and the relevant metadata. -url: https://docs.alchemy.com/reference/gettokensforowner-sdk -slug: reference/gettokensforowner-sdk ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the tokens that the specified address owns, along with the amount of each token and the relevant metadata. - -# Parameters - -| Name | Type | Description | -| --------------- | -------------------------- | ------------------------------------------------------ | -| `addressOrName` | `string` | The owner address to get the tokens with balances for. | -| `options?` | `GetTokensForOwnerOptions` | Additional options to pass to the request. | - -### `GetTokensForOwnerOptions` parameters - -| Parameters | Type | Description | -| ------------------- | -------- | -------------------------------------------------------------------------------------------------------- | -| `contractAddresses` | `string` | `optional` List of contract addresses to filter by. If omitted, it defaults to `TokenBalanceType.ERC20`. | -| `pageKey` | `string` | Optional page key to use for pagination. | - -# Response - -| Parameters | Type | Description | -| ------------------------------------ | -------- | ------------------------------------------------------------------------- | -| `Promise` | `object` | Returns the tokens that the specified address owns and relevant metadata. | - -### `GetTokensForOwnerResponse` response parameters - -| Property | Type | Description | -| --------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageKey` | `string` | `optional` Page key for the next page of results, if one exists. | -| `tokens` | `OwnedToken` | Owned tokens for the provided addresses along with relevant metadata. The following parameters are associated with the `OwnedToken` object: 1. **`balance`** - `string` The formatted value of the balance field as a hex string. This value is undefined if the error field is present or if the `decimals` field = `undefined`. 2. **`contractAddress`** - `string` The contract address of the token. 3. **`decimals`** - `number` The number of decimals of the token. It is `undefined` if not defined in the contract and unavailable from other sources. 4. **`error`** - `string` Error from fetching the token balances. None of the other fields will be defined if this field is defined. 5. **`logo`** - `string` URL link to the token's logo. It is undefined if the logo is not available. 6. **`name`** - `string` The token's name. It is undefined if the name is not defined in the contract and is unavailable from other sources. 7. **`rawBalance`** - `string`The raw value of the balance field as a hex string. 8. **`symbol`** - `string` The token's symbol. It is undefined if the symbol is not defined in the contract and unavailable from other sources. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTokensForOwner` request using the Alchemy SDK: - - - ```javascript getTokensForOwner.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the owner address or name - const ownerAddress = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" - - //The response returns the tokens the address owns and relevant metadata. - let response = await alchemy.core.getTokensForOwner(ownerAddress) - - //Logging the response to the console - console.log(response) - }; - main(); - ``` - - -## Response - - - ```shell shell - decimals: 0, - logo: undefined, - name: '', - symbol: '', - balance: '59061420000000000000000000' - }, - { - contractAddress: '0x01e849040c418c3b7f130351a6e4630c08a7d98e', - rawBalance: '3848', - decimals: 2, - logo: undefined, - name: 'UNI', - symbol: 'www.uniswap.cab', - balance: '38.48' - }, - { - contractAddress: '0x6fb3e0a217407efff7ca062d46c26e5d60a14d69', - rawBalance: '200162000000000000000000', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/2777.png', - name: 'IoTeX', - symbol: 'IOTX', - balance: '200162.0' - }, - { - contractAddress: '0x73dabaff2d1a1fd00cd11998d3cb8d3ae2d2fe8a', - rawBalance: '27000000', - decimals: 6, - logo: undefined, - name: 'USDC', - symbol: 'USDC', - balance: '27.0' - }, - { - contractAddress: '0x761d38e5ddf6ccf6cf7c55759d5210750b5d60f3', - rawBalance: '1147579083426018352959478600', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/9436.png', - name: 'Dogelon Mars', - symbol: 'ELON', - balance: '1147579083.4260183529594786' - }, - { - contractAddress: '0x7a6b87d7a874fce4c2d923b09c0e09e4936bcf57', - rawBalance: '7000', - decimals: 0, - logo: undefined, - name: '$ USTBonus.com', - symbol: '$ Visit USTBonus.com to claim', - balance: '7000' - }, - { - contractAddress: '0x7c5cb1220bd293ff9cf903915732e51a71292038', - rawBalance: '3500000000000000000000', - decimals: 18, - logo: undefined, - name: 'YottaLing', - symbol: 'YTL', - balance: '3500.0' - }, - { - contractAddress: '0x7cd167b101d2808cfd2c45d17b2e7ea9f46b74b6', - rawBalance: '260794140590000000000', - decimals: 18, - logo: undefined, - name: 'USD Coin (Wormhole)', - symbol: 'USDC', - balance: '260.79414059' - }, - { - contractAddress: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0', - rawBalance: '1000000000000000000', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/3890.png', - name: 'Polygon', - symbol: 'MATIC', - balance: '1.0' - }, - { - contractAddress: '0x7e7c005c8fcd5e18c03db8014af44ce5837c5f08', - rawBalance: '58865000000000000000000000', - decimals: 0, - logo: undefined, - name: '', - symbol: '', - balance: '58865000000000000000000000' - }, - { - contractAddress: '0x82cbd1a309a5de0ba4042f245df075cb55093e53', - rawBalance: '666000000000000000000', - decimals: 18, - logo: undefined, - name: 'QUANT', - symbol: 'QNT', - balance: '666.0' - }, - { - contractAddress: '0x85332b222787eacab0fff68cf3b884798823528c', - rawBalance: '666', - decimals: 0, - logo: undefined, - name: 'WinETHFree', - symbol: 'winethfree.com (Win ETH Free)', - balance: '666' - }, - { - contractAddress: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359', - rawBalance: '22097520248770066535', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/2308.png', - name: 'Single Collateral DAI', - symbol: 'SAI', - balance: '22.097520248770066535' - }, - { - contractAddress: '0x8b3192f5eebd8579568a2ed41e6feb402f93f73f', - rawBalance: '6253870435272180982', - decimals: 9, - logo: 'https://static.alchemyapi.io/images/assets/10498.png', - name: 'Saitama', - symbol: 'SAITAMA', - balance: '6253870435.272180982' - }, - { - contractAddress: '0x8b3870df408ff4d7c3a26df852d41034eda11d81', - rawBalance: '637762212', - decimals: 6, - logo: 'https://static.alchemyapi.io/images/assets/10295.png', - name: 'IOI Token', - symbol: 'IOI', - balance: '637.762212' - }, - { - contractAddress: '0x8d1c555ec2f99a3d6a82bd3a725b5b65b65d0d69', - rawBalance: '100000', - decimals: 0, - logo: undefined, - name: '$ HEXBonus.com', - symbol: '$ HEXBonus.com <- Visit to claim!', - balance: '100000' - }, - { - contractAddress: '0x91bc206f0a1ffbc399b4a20a41324ed1dad2b718', - rawBalance: '1000', - decimals: 0, - logo: undefined, - name: 'Bullshit', - symbol: 'BSH', - balance: '1000' - }, - { - contractAddress: '0x938af1975d026d2a657f11dc99c4fb1a4e7116ae', - rawBalance: '58865000000000000000000000', - decimals: 0, - logo: undefined, - name: '', - symbol: '', - balance: '58865000000000000000000000' - }, - { - contractAddress: '0x9412796c9c9def387626825a76b7ccebf28ab42c', - rawBalance: '0', - decimals: 18, - logo: undefined, - name: 'PulseX', - symbol: 'PULSE', - balance: '0.0' - }, - { - contractAddress: '0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce', - rawBalance: '163283668535754919854895611', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/5994.png', - name: 'Shiba Inu', - symbol: 'SHIB', - balance: '163283668.535754919854895611' - }, - { - contractAddress: '0x981dc247745800bd2ca28a4bf147f0385eaa0bc0', - rawBalance: '8880000000000000000', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/22651.png', - name: 'NutsDAO', - symbol: 'NUTS', - balance: '8.88' - }, - { - contractAddress: '0x98976a6dfaaf97b16a4bb06035cc84be12e79110', - rawBalance: '500000000000000000', - decimals: 18, - logo: undefined, - name: 'MYOUToken', - symbol: 'MYOU', - balance: '0.5' - }, - { - contractAddress: '0x98a83960c52dc6ccc1765a25361b08b43aa38128', - rawBalance: '10000000', - decimals: 8, - logo: undefined, - name: 'Asia Eternal Coin', - symbol: 'AE', - balance: '0.1' - }, - { - contractAddress: '0x993864e43caa7f7f12953ad6feb1d1ca635b875f', - rawBalance: '76000000000000000000', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/9638.png', - name: 'SingularityDAO', - symbol: 'SDAO', - balance: '76.0' - }, - { - contractAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', - rawBalance: '0', - decimals: 6, - logo: 'https://static.alchemyapi.io/images/assets/3408.png', - name: 'USD Coin', - symbol: 'USDC', - balance: '0.0' - }, - { - contractAddress: '0xa101e27f06a97985b925e244111b61560ecd97db', - rawBalance: '2000000000000000000', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/4534.png', - name: 'BITTO', - symbol: 'BITTO', - balance: '2.0' - }, - { - contractAddress: '0xa24a4955ee7aa09a6a9e660f991a49af09460a0d', - rawBalance: '1940000000000000', - decimals: 9, - logo: undefined, - name: 'Proof Of UP', - symbol: 'PoUP', - balance: '1940000.0' - }, - { - contractAddress: '0xa47c8bf37f92abed4a126bda807a7b7498661acd', - rawBalance: '800000000000000000000', - decimals: 18, - logo: 'https://static.alchemyapi.io/images/assets/7129.png', - name: 'TerraUSD', - symbol: 'UST', - balance: '800.0' - }, - { - contractAddress: '0xa5269a8e31b93ff27b887b56720a25f844db0529', - rawBalance: '14967756400731753690911', - decimals: 18, - logo: undefined, - name: 'Morpho-Aave USD Coin Supply Vault', - symbol: 'maUSDC', - balance: '14967.756400731753690911' - } - ], - pageKey: undefined - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getTokensForOwner` method: - -* **Portfolio Management**: The `getTokensForOwner` method allows developers to build applications that help users manage their crypto portfolios. By querying the tokens owned by a specific address, developers can provide users with an overview of their token holdings, including the token balances and associated metadata. -* **Token Listings**: Platforms that list tokens or marketplaces can utilize the `getTokensForOwner` method to gather information about the tokens owned by an address. This data can display the tokens available for trade or sale, including their attributes, prices, and other relevant details. -* **Automated Tasks**: Blockchain developers often need to automate certain tasks based on token ownership. By using the `getTokensForOwner` method, developers can programmatically check if an address owns specific tokens and perform actions accordingly. For example, triggering events or executing smart contract functions based on token ownership - -# Related Methods - -Here are some methods related to the`getTokensForOwner` method: - -* [getTokenBalances](/reference/gettokenbalances): Returns the ERC-20 token balances for a specific owner address. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/iscontractaddress-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/iscontractaddress-sdk.mdx deleted file mode 100644 index ddd0939e..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/iscontractaddress-sdk.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: isContractAddress - SDK -description: Checks if the provided address is a smart contract. -subtitle: Checks if the provided address is a smart contract. -url: https://docs.alchemy.com/reference/iscontractaddress-sdk -slug: reference/iscontractaddress-sdk ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Checks if the provided address is a smart contract. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ------------------------------ | -| `address` | `string` | The address to check type for. | - -# Response - -| Property | Type | Description | -| ------------------ | --------- | -------------------------------------------------------------------------- | -| `Promise` | `boolean` | Returns true if the provided address is a smart contract, false otherwise. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make an `isContractAddress` request using the Alchemy SDK: - - - ```javascript isContractAddress.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const result = await alchemy.core.isContractAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); // Wrapped ETH address - - // Logging the response to the console - console.log(result) - } - - main(); - ``` - - -## Response - - - ```shell shell - true - ``` - - -# Use Cases - -Here are some common use cases for the `isContractAddress` method: - -* **Verifying the contract status of an address**: It's important to know the type of an address (Externally Owned Address or Contract Address) in many blockchain related operations. This function allows developers to verify if an address is a smart contract. - -* **Improving security**: Before interacting with an address, verifying its type can add an extra layer of security to prevent potential exploits ( for example, reentrancy attacks ) or mistakes. - -# Related Methods - -Here are the methods related to `isContractAddress`: - -* [getBalance](/reference/getbalance-sdk): Returns the balance of a given address as of the provided block. -* [call](/reference/call-sdk): Returns the result of executing a transaction, using call. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-call.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-call.mdx deleted file mode 100644 index 28dc163e..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-call.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: call - SDK -description: Returns the result of executing the transaction, using call . A call does not require any ether, but cannot change any state. This is useful for calling getters on Contracts. -subtitle: Returns the result of executing the transaction, using call . A call does not require any ether, but cannot change any state. This is useful for calling getters on Contracts. -url: https://docs.alchemy.com/reference/sdk-call -slug: reference/sdk-call ---- - -Returns the result of executing the transaction, using `call`. A call does not require any ether, but cannot change any state. This is useful for calling getters on Contracts. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the result of executing the transaction, using `call`. A call does not require any ether, but cannot change any state. This is useful for calling getters on Contracts. - -> Starting from Geth 1.9.13, `eth_call` will check the balance of the sender (to make sure that the sender has enough gas to complete the request) before executing the call when one of the following conditions is true: -> -> 1. the `gas_price` parameter is populated, or -> 2. the contract function being called (i.e. in data modifies blockchain state) -> -> In these two cases, even though the `eth_call` requests don't consume any gas, the from address must have enough gas to execute the call as if it were a write transaction because `eth_call` is being used to simulate the transaction. - - - `eth_call` has a timeout restriction at the node level. Batching multiple `eth_call` together on-chain using pre-deployed smart contracts might result in unexpected timeouts that cause none of your calls to complete. Instead, consider serializing these calls, or using smaller batches if they fail with a node error code. - - -# Parameters - -| Name | Type | Description | -| ------------- | ----------------- | ------------------------------------------------------ | -| `transaction` | `string` | The transaction to execute | -| `blockTag` | `string / number` | The optional block number or hash to get the call for. | - -### `transaction` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address the transaction is directed to. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `gasPrice?` | `number / string` | `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `number` | `QUANTITY` - (optional) Integer of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `string` | The maximum gas allowed. | -| `chainId?` | `number` | `optional` the Id of the transaction chain. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ---------------------------------------------------------------------------------------------------------- | -| `Promise` | `string` | The method returns the output data as a hexadecimal-encoded string without modifying the blockchain state. | - -### `blocktag` parameters - -* `pending` - A sample next block built by the client on top of the latest and containing the set of transactions usually taken from the local mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Goerli**. -* `finalized` - The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Goerli**. -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript javascript - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the call method - const main = async () => { - //Initialize a variable for the transaction object - let tx = { - to: "0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41", - gas: "0x76c0", - gasPrice: "0x9184e72a000", - data: "0x3b3b57debf074faa138b72c65adbdcfb329847e4f2c04bde7f7dd7fcad5a52d2f395a558", - } - let response = await alchemy.core.call(tx) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - 0x0000000000000000000000005555763613a12d8f3e73be831dff8598089d3dca - ``` - - -# Use Cases - -The `call` method is used for making low-level calls to the EVM blockchains. It can be used for a variety of use cases, including: - -* **Reading data from smart contracts**: Developers can use the `call` method to read data from a smart contract on the EVM blockchain. - -* **Querying blockchain data**: Developers can use the `call` method to query blockchain data, such as account balances, transaction history, and block data. - -Overall, the `call` method is a versatile SDK method that can be used for a wide range of tasks related to interacting with the EVM blockchain. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-cancelprivatetransaction.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-cancelprivatetransaction.mdx deleted file mode 100644 index fdbfb5a1..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-cancelprivatetransaction.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: cancelPrivateTransaction - SDK -description: Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the sendPrivateTransaction call submitting the transaction in the first place. -subtitle: Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the sendPrivateTransaction call submitting the transaction in the first place. -url: https://docs.alchemy.com/reference/sdk-cancelprivatetransaction -slug: reference/sdk-cancelprivatetransaction ---- - -Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the `sendPrivateTransaction` call submitting the transaction in the first place. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Stops the provided private transaction from being submitted for future blocks. A transaction can only be canceled if the same key signs the request as the [sendPrivateTransaction](/reference/sendprivatetransaction-sdk) call submitting the transaction in the first place. - -Please note that ***fast mode*** transactions cannot be canceled using this method. - -Returns a **boolean** indicating whether the cancellation was successful. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------------------------------- | -| `transactionHash` | `string` | Transaction hash of private transaction to be cancelled. | - -# Response - -| Property | Type | Description | -| ------------------ | --------- | -------------------------------------------- | -| `Promise` | `boolean` | Returns the transaction cancellation status. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network, Wallet, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const txHash = "0x2e8dff1ae477808ec0682c27fbdd250a2e628090fe4e901e644c942628113b37" - - //Call the method to cancel the transaction based on the transaction hash - const response = await alchemy.transact.cancelPrivateTransaction(txHash) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - true - ``` - - -# Use Cases - -Here are some potential use cases for the `cancelPrivateTransaction` method: - -* **Error in transaction parameters**: If the sender realizes that they have made an error in the transaction parameters, such as sending the wrong amount or specifying the wrong recipient, they can cancel the transaction before it is processed. - -* **Privacy concerns**: If the sender realizes that the transaction includes sensitive information that they do not want to be visible on the blockchain, they can cancel the transaction before it is processed. - -* **High gas price**: If the gas price is too high, the sender may want to cancel the transaction and resubmit it with a lower gas price to save on transaction fees. - -# Related Methods - -Here are the methods related to `cancelPrivateTransaction`: - -* [sendPrivateTransaction](/reference/sendprivatetransaction-sdk): Used to send a single transaction to Flashbots. Flashbots will attempt to send the transaction to miners for the next 25 blocks. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-computerarity.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-computerarity.mdx deleted file mode 100644 index 90471717..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-computerarity.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: computeRarity - SDK -description: Get the rarity of each attribute of an NFT. -subtitle: Get the rarity of each attribute of an NFT. -url: https://docs.alchemy.com/reference/sdk-computerarity -slug: reference/sdk-computerarity ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get the rarity of each attribute of an NFT. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT collection. | -| `tokenId` | `string` | Token id of the NFT. | - -# Response - -| Property | Type | Description | -| ------------------------------- | -------- | ------------------------------------------------------------------- | -| `Promise` | `object` | Summary of the attribute prevalence for the specified NFT contract. | - -### `NftAttributeRarity` response parameters - -| Property | Type | Description | -| ------------ | -------- | ----------------------------------------------------------------------------------------------------------------- | -| `value` | `string` | Name of the NFT's attribute. | -| `traitType` | `string` | The type of NFT attribute. | -| `prevalence` | `number` | A number from `0` to `1` representing the prevalence of this value for this trait type in the current collection. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and tokenId - const address = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"; - const tokenId = 145; - - //Call the method to display the rarity of each attribute of the NFT - const response = await alchemy.nft.computeRarity(address, tokenId) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - [ - { prevalence: 0.1273, traitType: 'Background', value: 'Orange' }, - { prevalence: 0.013, traitType: 'Hat', value: 'Prussian Helmet' }, - { prevalence: 0.1551, traitType: 'Mouth', value: 'Bored Unshaven' }, - { prevalence: 0.1229, traitType: 'Fur', value: 'Black' }, - { prevalence: 0.0203, traitType: 'Clothes', value: 'Bone Necklace' }, - { prevalence: 0.0487, traitType: 'Eyes', value: '3d' } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `computeRarity` method: - -* **NFT marketplaces**: NFT marketplaces such as OpenSea, Rarible, and SuperRare use the `computeRarity` method to calculate the rarity score of different NFTs, which helps determine their value in the marketplace. - -* **NFT collections**: NFT collections such as CryptoKitties and CryptoPunks use the `computeRarity` method to determine the rarity of each NFT in their collection, which adds to the overall uniqueness and value of the collection. - -* **Gaming applications**: Gaming applications that use NFTs often use the `computeRarity` method to calculate the rarity of different game items, such as weapons or armor, which can affect their in-game performance and value. - -# Related Methods - -Here are the methods related to `computeRarity`: - -* [getNftMetadataBatch](/reference/getnftmetadatabatch-sdk): Gets the NFT metadata for multiple NFT tokens. - -* [getNftMetadata](/reference/getnftmetadata-sdk): Gets the metadata associated with a given NFT. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-createwebhook.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-createwebhook.mdx deleted file mode 100644 index f9b1f8dd..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-createwebhook.mdx +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: createWebhook - SDK -description: This endpoint allows you to create a webhook. Note that the webhook will be created in the app network of the provided app id. -subtitle: This endpoint allows you to create a webhook. Note that the webhook will be created in the app network of the provided app id. -url: https://docs.alchemy.com/reference/sdk-createwebhook -slug: reference/sdk-createwebhook ---- - -This endpoint allows you to create a webhook. - -Note that the webhook will be created in the app network of the provided app id. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -This endpoint allows you to create a webhook. - -Note that the webhook will be created in the app network of the provided app id. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| `url` | `string` | The URL that the webhook should send events to. | -| `type` | `string` | The type of webhook to create. Available options include: `MINED_TRANSACTION`, `DROPPED_TRANSACTION`, `ADDRESS_ACTIVITY`, `NFT_ACTIVITY`, `GRAPHQL` | -| `params` | `object` | Params object containing the parameters required to create a webhook depending on the `type` of webhook to be created. | - -### `params` Parameters - - - Include only one of these `params` objects as the third parameter. - - -| Name | Type | Description | -| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `TransactionWebhookParams` | `object` | Used for Mined / Dropped Transaction Webhooks, i.e., `MINED_TRANSACTION` & `DROPPED_TRANSACTION`. Parameters in this object include: 1. `appId` - `string` The app id of the project to create the mined/dropped transaction webhook on. | -| `AddressWebhookParams` | `object` | Used for Address Activity Webhooks, i.e., `ADDRESS_ACTIVITY`. Parameters here include: 1. `addresses` - `array of strings` Array of addresses the webhook should track activity for. 2. `network` - `string` Optional network to create the webhook on. If omitted, the webhook will be created on network of the app provided in the api key config. | -| `NftWebhookParams` | `object` | Used for NFT Filter Webhooks, i.e.,`NFT_ACTIVITY`. Parameters here include: 1. `addresses` - `array of objects` Array of NFT filters the webhook should track containing the `contractAddress` and `tokenId`. 2. `network` - `string` Optional network to create the webhook on. If omitted, the webhook will be created on network of the app provided in the api key config. | -| `CustomGraphqlWebhookParams` | `object` | Used for Custom Webhooks, i.e.,`GRAPHQL`. Parameters here include: 1. `graphqlQuery` - `string` A valid, stringified GraphQL query that you would like to host on Alchemy 2. `network` - `string` Optional network to create the webhook on. If omitted, the webhook will be created on network of the app provided in the api key config. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | ------------------------------ | -| `Promise` | `object` | Returns webhook creation data. | - -### `DroppedTransactionWebhook` response object parameters - -| Property | Type | Description | -| ------------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | `string` | Type of webhook. `MINED_TRANSACTION`, `DROPPED_TRANSACTION`, `ADDRESS_ACTIVITY`, `NFT_ACTIVITY` | -| `id` | `string` | Unique ID for given webhook. | -| `network` | `string` | Network of webhook. `ETH_MAINNET` `ETH_GOERLI` `ETH_ROPSTEN` `ETH_RINKEBY` `ETH_KOVAN` `MATIC_MAINNET` `MATIC_MUMBAI` `ARB_MAINNET` `ARB_RINKEBY` `OPT_MAINNET` `OPT_KOVAN` | -| `url` | `string` | URL endpoint where webhook is sent | -| `isActive` | `boolean` | `true` if webhook is active, `false` if not active. | -| `timeStamp` | `string` | Timestamp webhook was created. | -| `signingKey` | `string` | Signing key for given webhook. | -| `version` | `string` | Webhook version (v1 or v2). | -| `appId` | `string` | Only exists for **Mined / Dropped Transactions**. The App ID of the project the webhook is connected to. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Setup: npm install alchemy-sdk - // Github: https://github.com/alchemyplatform/alchemy-sdk-js - import { Alchemy, Network, WebhookType } from "alchemy-sdk"; - - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const settings = { - authToken: "your-notify-auth-token", - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - const minedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.MINED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - const droppedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.DROPPED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - const addressActivityWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.ADDRESS_ACTIVITY, - { - addresses: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96010"], - network: Network.ETH_MAINNET, - } - ); - - const customGraphQLWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.GRAPHQL, - { - graphqlQuery: `{ - block { - # Block hash is a great primary key to use for your data stores! - hash, - number, - timestamp, - # Add smart contract addresses to the list below to filter for specific logs - logs(filter: {addresses: [], topics: []}) { - data, - topics, - index, - account { - address - }, - transaction { - hash, - nonce, - index, - from { - address - }, - to { - address - }, - value, - gasPrice, - maxFeePerGas, - maxPriorityFeePerGas, - gas, - status, - gasUsed, - cumulativeGasUsed, - effectiveGasPrice, - createdContract { - address - } - } - } - } - }`, - network: Network.ETH_MAINNET, - } - ); - - const nftActivityWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.NFT_ACTIVITY, - { - filters: [ - { - contractAddress: "0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656", - tokenId: "234", - }, - ], - network: Network.ETH_MAINNET, - } - ); - ``` - - -## Response - - - ```shell shell - { - "id": "string", - "network": "ETH_MAINNET", - "type": "MINED_TRANSACTION", - "url": "string", - "isActive": true, - "timeCreated": "string", - "signingKey": "string", - "version": "string", - "appId": "string" - } - ``` - - -# Use Cases - -Here are some potential use cases for the `createWebhook` method: - -* **Notification of a completed transaction**: If you have a web or mobile application that relies on completing transactions, you can use `createWebhook` to notify your application when a transaction is completed. This way, you can provide your users with real-time updates on the status of their transactions. - -* **Monitoring data changes**: If you have a database or a system that stores data, you can use `createWebhook` to monitor changes in the data. This can be useful if you need to keep track of updates to customer information, inventory levels, or any other data that is important to your business. - -* **Real-time updates for chat applications**: If you have a chat application, you can use `createWebhook` to notify your users in real-time when a new message is received or when a user has joined or left the chat. - -# Related Methods - -* [updateWebhook](/reference/updatewebhook-sdk): Update a `NftActivityWebhook's` active status or NFT filters. - -* [deleteWebhook](/reference/deletewebhook-sdk): Delete a webhook. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-deletewebhook.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-deletewebhook.mdx deleted file mode 100644 index 7e9b2cbe..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-deletewebhook.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: deleteWebhook - SDK -description: Delete the provided webhook. -subtitle: Delete the provided webhook. -url: https://docs.alchemy.com/reference/sdk-deletewebhook -slug: reference/sdk-deletewebhook ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Delete the provided webhook. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ---------------------- | -| `webhook` | `string` | The webhook to delete. | - -# Response - -| Property | Type | Description | -| --------------- | ------ | ---------------- | -| `Promise` | `void` | Returns nothing. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Setup: npm install alchemy-sdk - // Github: https://github.com/alchemyplatform/alchemy-sdk-js - import { Alchemy, Network, WebhookType } from "alchemy-sdk"; - - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const settings = { - authToken: "your-notify-auth-token", - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - const minedTxWebhook = await alchemy.notify.createWebhook( - "https://webhook.site/your-webhook-url", - WebhookType.MINED_TRANSACTION, - { appId: "wq9fgv022aff81pg" } - ); - - //Perform deletion of Webhooks - const deleteViaWebhookID = await alchemy.notify.deleteWebhook("wh_qv16bt12wbj9kax4"); - const deleteMinedTxWebhook = await alchemy.notify.deleteWebhook(minedTxWebhook); - ``` - - -## Response - - - ```shell shell - Returns nothing. - ``` - - -# Use Cases - -Here are some potential use cases for the `deleteWebhook` method: - -* **Updating webhook settings**: If you need to update the URL or other settings of a webhook, you can delete the existing webhook using `deleteWebhook` and then create a new one with the updated settings using `createWebhook`. - -* **Removing unused webhooks**: If you have created a webhook that is no longer needed, you can delete it using `deleteWebhook` to clean up your API and reduce clutter. - -* **Resolving issues with a webhook**: If you are experiencing issues with a webhook, deleting it and creating a new one can help resolve the issue. - -* **Revoking access**: If you need to revoke access to your API for a particular webhook, you can delete it using `deleteWebhook`. - -# Related Methods - -* [createWebhook](/reference/createwebhook-sdk) - Create a new Webhook to track transactions sent by the app associated with the app id. -* [updateWebhook](/reference/updatewebhook-sdk) - Update a webhoolk address. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-estimategas.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-estimategas.mdx deleted file mode 100644 index c04ceaaf..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-estimategas.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: estimateGas - SDK -description: Returns an estimate of the amount of gas that would be required to submit a transaction to the network. -subtitle: Returns an estimate of the amount of gas that would be required to submit a transaction to the network. -url: https://docs.alchemy.com/reference/sdk-estimategas -slug: reference/sdk-estimategas ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns an estimate of the amount of gas that would be required to submit a transaction to the network. - -An estimate may not be accurate since there could be another transaction on the network that was not accounted for, but after being mined affects the relevant state. - -# Parameters - -| Name | Type | Description | -| ------------- | -------- | ------------------------------------ | -| `transaction` | `object` | The transaction to estimate gas for. | - -### `transaction` object parameters - -| Parameter | Type | Description | -| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `DATA`, 20 Bytes - The address to the transaction is directed to. | -| `from` | `string` | `DATA`, 20 Bytes - (optional) The address the transaction is sent from. | -| `gasPrice?` | `number / string` | `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas. | -| `data?` | `string` | `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html) | -| `value?` | `number` | `QUANTITY` - (optional) Integer of the value sent with this transaction | -| `nonce?` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `gasLimit?` | `string` | the maximum gas allowed. | -| `chainId?` | `number` | `optional` the Id of the transaction chain. | -| `type?` | `number` | `Optional` This is the type of transaction. | -| `accessList?` | `array of strings` | The `accessList` is an optional transaction parameter that specifies addresses and storage keys a transaction interacts with, enabling gas cost optimization and compatibility with future Ethereum upgrades. | -| `maxPriorityFee?` | `number` | This describes the maximum priority fee for this transaction. | -| `maxFeePerGas?` | `number` | This is the maximum fee per gas for this transaction. | -| `ccipReadEnabled?` | `boolean` | This specifies if the CCIP read is enabled. | - -# Response - -| Property | Type | Description | -| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Promise` | `object` | Returns an estimate of the amount of gas that would be required to submit the transaction to the network. This is an estimate of the amount of gas required to submit the given transaction to the network. An example of the output is `BigNumber { _hex: '0x651a', _isBigNumber: true }`. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make an `estimateGas` request using the Alchemy SDK: - - - ```javascript estimateGas.js - // Imports the Alchemy SDK - const { Alchemy, Network, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const response = await alchemy.core.estimateGas({ - // Wrapped ETH address - to: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - // `function deposit() payable` - data: "0xd0e30db0", - // 1 ether - value: Utils.parseEther("1.0") - }); - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - BigNumber { _hex: '0x651a', _isBigNumber: true } - ``` - - -# Use Cases - -Here are some common use cases for the `estimateGas` method: - -* **Optimizing transaction fees**: Gas is the fee paid by the sender of a transaction to compensate the miners for processing it. By estimating the gas required for a transaction beforehand, developers can optimize their transaction fees by choosing the right gas price and limit. - -* **Ensuring successful transactions**: If a transaction runs out of gas before it is completed, it will fail and the sender will lose the gas spent on it. By estimating the required gas beforehand, developers can ensure that the transaction has enough gas to complete successfully. - -* **Validating transaction parameters**: When submitting a transaction, certain parameters such as the gas limit and gas price must be set correctly to avoid issues such as network congestion or excessive fees. By using `estimateGas`, developers can validate these parameters before submitting the transaction. - -# Related Methods - -Here are the methods related to `estimateGas`: - -* [getBalance](/reference/getbalance-sdk): Returns the balance of a given address as of the provided block. -* [cal](/reference/call-sdk): Returns the result of executing the transaction, using call. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-findcontractdeployer.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-findcontractdeployer.mdx deleted file mode 100644 index 364e90fb..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-findcontractdeployer.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: findContractDeployer -SDK -description: Finds the address that deployed the provided contract and block number it was deployed in. -subtitle: Finds the address that deployed the provided contract and block number it was deployed in. -url: https://docs.alchemy.com/reference/sdk-findcontractdeployer -slug: reference/sdk-findcontractdeployer ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Finds the address that deployed the provided contract and the block number it was deployed in. - - - This method performs a binary search across all blocks since genesis and can take a long time to complete. This method is a convenience method that will eventually be replaced by a single call to an Alchemy endpoint with this information cached. - - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ---------------------------------------------- | -| `contractAddress` | `string` | The contract address to find the deployer for. | - -# Response - -| Property | Type | Description | -| ----------------------- | -------- | ------------------------------------------------------------------------------------------------ | -| `Promise` | `object` | Returns the address that deployed the provided contract and the block number it was deployed in. | - -### `DeployResult` response object parameters - -| Property | Type | Description | -| ----------------- | -------- | -------------------------------------------------------- | -| `deployerAddress` | `string` | The address of the contract deployer, if it is available | -| `blockNumber` | `number` | The block number the contract was deployed in | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `findContractDeployer` request using the Alchemy SDK: - - - ```javascript findContractDeployer.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Assign the contract address to a variable - let address = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" - - //The response fetches the contract deployer of the above address - let response = await alchemy.core.findContractDeployer(address) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```shell response - { - deployerAddress: '0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03', - blockNumber: 12287507 - } - ``` - - -# Use Cases - -Here are some common use cases for `findContractDeployer` method: - -* **Contract verification**: When a new contract is deployed on a blockchain, it is important to verify the identity of the deployer to ensure that the contract was deployed by a trusted source. By using the `findContractDeployer` method, developers can easily verify the deployer of a contract and ensure that the contract is legitimate. - -* **Security auditing**: Security auditors can use the `findContractDeployer` method to identify potential security vulnerabilities in a smart contract by analyzing the behavior of the deployer. If the deployer is identified as a potential threat, additional security measures can be implemented to prevent unauthorized access to the contract. - -* **Contract management**: Smart contracts are often used to automate business processes and manage digital assets. By using the `findContractDeployer` method, contract managers can identify who has deployed a particular contract and ensure that it is being used in accordance with the terms and conditions agreed upon by all parties. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getaddresses.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getaddresses.mdx deleted file mode 100644 index 4be75c0f..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getaddresses.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: getAddresses - SDK -description: Get all addresses tracked for the provided AddressActivityWebhook . An Address Activity Webhook tracks ETH , ERC20 , ERC721 , and ERC1155 transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. -subtitle: Get all addresses tracked for the provided AddressActivityWebhook . An Address Activity Webhook tracks ETH , ERC20 , ERC721 , and ERC1155 transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. -url: https://docs.alchemy.com/reference/sdk-getaddresses -slug: reference/sdk-getaddresses ---- - -Get all addresses tracked for the provided `AddressActivityWebhook`. - -An Address Activity Webhook tracks `ETH`, `ERC20`, `ERC721`, and `ERC1155` transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all addresses tracked for the provided `AddressActivityWebhook`. - -An Address Activity Webhook tracks `ETH`, `ERC20`, `ERC721`, and `ERC1155` transfers for the provided addresses. This can be used to notify your app of real-time state changes when your tracked addresses send or receive tokens. - -# Parameters - -| Name | Type | Description | -| ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addressWebhook` | `string` | The Address Activity webhook. Available options are: `MINED_TRANSACTION`,`DROPPED_TRANSACTION`, `ADDRESS_ACTIVITY`, `NFT_ACTIVITY`. | -| `options` | `object` | `Optional` Pagination options when fetching addresses. Parameters include: 1. `limit` - `number` Number of addresses to fetch. 2. `pageKey` - `string` Page cursor for the next page. | - -# Response - -| Property | Type | Description | -| ---------------------------------- | ------------------ | -------------------------------------- | -| `Promise` | `array of objects` | List of addresses and pagination info. | - -### `AddressActivityResponse` parameters - -| Property | Type | Description | -| ------------ | ------------------ | ---------------------------------------------------------- | -| `addresses` | `array of strings` | List of addresses associated with given webhook. | -| `totalCount` | `number` | The total number of addresses. | -| `pageKey` | `string` | `Optional` Page key used to fetch the remaining addresses. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network} = require("alchemy-sdk"); - - // Configures the Alchemy SDK - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const config = { - authToken: "your-auth-token ", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the webhooks by fetching all the Webhooks - const hooks = await alchemy.notify.getAllWebhooks(); - - //Call the method to return the addresses by ID using the webhookId. - const addressesById = await alchemy.notify.getAddresses("wh_qv16bt12wbj9kax4", { - limit: 3, - }); - - // Get the addresses by webhooks - const addressesByWebhook = await alchemy.notify.getAddresses( - hooks.webhooks[3], - { limit: 3, pageKey: 1 } - ); - - //Logging the response to the console - console.log(addressesById, addressesByWebhook) - } - - main(); - ``` - - -## Response - - - ```shell shell - [ - { - "addresses": [ - "string" - ], - "totalCount": 0, - "pageKey": "string" - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getAddresses` method: - -* **Monitoring User Balances**: Developers can use Alchemy Notify to monitor user balances for specific Ethereum addresses. `getAddresses` can be used to retrieve the addresses currently being monitored and ensure that the balances of these addresses are up-to-date. - -* **Monitoring Smart Contract Events**: Alchemy Notify can also be used to monitor events on smart contracts. Developers can use `getAddresses` to retrieve the addresses currently being monitored and ensure that events from these addresses are being properly received and processed. - -* **Tracking Transactions**: Developers can use Alchemy Notify to track transactions on the Ethereum network.`getAddresses` can be used to retrieve the addresses of the wallets or contracts involved in a particular transaction and ensure that the transaction is being tracked properly. - -# Related Methods - -* [getAllWebhooks](/reference/getallwebhooks-sdk) - Get all webhooks on your team. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getallwebhooks.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getallwebhooks.mdx deleted file mode 100644 index b5bca12d..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getallwebhooks.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: getAllWebhooks - SDK -description: Get all webhooks on your team. The team is determined by the authToken provided into the AlchemySettings object when creating a new Alchemy instance. This method returns a response object containing all the webhooks. -subtitle: Get all webhooks on your team. The team is determined by the authToken provided into the AlchemySettings object when creating a new Alchemy instance. This method returns a response object containing all the webhooks. -url: https://docs.alchemy.com/reference/sdk-getallwebhooks -slug: reference/sdk-getallwebhooks ---- - -Get all webhooks on your team. The team is determined by the `authToken` provided into the `AlchemySettings` object when creating a new Alchemy instance. - -This method returns a response object containing all the webhooks. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all webhooks on your team. The team is determined by the `authToken` provided into the `AlchemySettings` object when creating a new Alchemy instance. - -This method returns a response object containing all the webhooks. - -# Response - -| Property | Type | Description | -| --------------------------------- | ------------------ | -------------------------------- | -| `Promise` | `array of objects` | Returns list of webhook objects. | - -### `GetAllWebhooksResponse` parameters - -| Property | Type | Description | -| ------------ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `webhooks` | `array of objects` | List of webhooks for your team. The parameters contained in this property include: 1. `id` - `string` The webhook's unique id. 2. `network` - `string` The network the webhook is on, e.g., `ETH_MAINNET`, `ETH_GOERLI`, `ETH_ROPSTEN`, `ETH_RINKEBY`, etc. 3. `type` - `string` The type of webhook. e.g., `MINED_TRANSACTION`, `DROPPED_TRANSACTION`, etc. 4. `url` - `string` The url that the webhook sends its payload to. 5. `isActive` - `boolean` Whether the webhook is currently active. 6. `timeCreated` - `string` The creation time of the webhook as an ISO string. 7. `signingKey` - `string` The signing key used to verify payloads for the webhook. 8. `version` - `string` The webhook version. All newly created webhooks default to V2. 9. `appId` - `string` Only exists for Mined / Dropped Transactions. The App ID of the project the webhook is connected to. | -| `totalCount` | `number` | The total number of webhooks. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network} = require("alchemy-sdk"); - - // Configures the Alchemy SDK - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const config = { - authToken: "", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return the webhooks - const response = await alchemy.notify.getAllWebhooks() - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```json json - { webhooks: [Array], totalCount: 0 } - ``` - - -# Use Cases - -Here are some potential use cases for the `getAllWebhooks` method: - -* **Monitoring transactions**: By setting up a webhook for transaction events, you can receive real-time notifications about when transactions are sent or received by your smart contract. This can be useful for tracking the progress of a transaction, and for triggering other actions in response to specific transaction events. - -* **Monitoring contract events**: In addition to tracking transactions, you can also set up webhooks to receive notifications when specific events occur within your smart contract. For example, you could set up a webhook to trigger an alert whenever a new user registers on your decentralized application. - -* **Managing account balances**: By using webhooks to monitor changes in your account balances, you can keep track of your cryptocurrency holdings in real time. This can be useful for managing your portfolio, and for triggering automated trades or other actions based on changes in your account balances. - -# Related Methods - -Some methods related to `getAllWebhooks` include: - -* [getAddresses](/reference/getaddresses-sdk) - Get all addresses tracked for the provided address activity. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getassettransfers.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getassettransfers.mdx deleted file mode 100644 index c50cdcdc..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getassettransfers.mdx +++ /dev/null @@ -1,222 +0,0 @@ ---- -title: getAssetTransfers - SDK -description: The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. See the web documentation for the full details. -subtitle: The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. See the web documentation for the full details. -url: https://docs.alchemy.com/reference/sdk-getassettransfers -slug: reference/sdk-getassettransfers ---- - -The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. - -See the [web documentation](/reference/alchemy-getassettransfers#alchemy_getassettransfers) for the full details. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. - -See the [web documentation](/reference/alchemy-getassettransfers#alchemy_getassettransfers) for the full details. - -# Parameters - -| Parameter | Type | Description | -| --------- | -------- | -------------------------------------------------------- | -| `params` | `object` | An object containing fields for the asset transfer query | - -### `params` object parameters - -| Param | Type | Description | -| ------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fromBlock` | `string` | The starting block to check for transfers. This value is inclusive and defaults to `0x0` if omitted. | -| `toBlock` | `string` | Inclusive to block (hex string, int, or latest). Defaults to `latest` if omitted. | -| `order?` | `string` | Whether to return results in ascending or descending order by block number. Defaults to `ascending` if omitted. | -| `fromAddress?` | `string` | The `from` address to filter transfers by. This value defaults to a wildcard for all addresses if omitted. | -| `toAddress?` | `string` | The `to` address to filter transfers by. This value defaults to a wildcard for all addresses if omitted. | -| `contractAddresses` | `array of strings` | List of contract addresses to filter for - only applies to `erc20`, `erc721`, `erc1155` transfers. Defaults to all addresses if omitted. | -| `excludeZeroValue` | `boolean` | Whether to exclude transfers with zero value. Note that `zero` value is different from `null` value. Defaults to `true` if omitted. | -| `category` | array\` | An array of categories to get transfers for. Available categories include: \[ EXTERNAL = `external`, INTERNAL = `internal`, ERC20 = `erc20`, ERC721 = `erc721`, ERC1155 = `erc1155`, SPECIALNFT = `specialnft` | -| `maxCount` | `number` | The maximum number of results to return per page. Defaults to **1000** if omitted. | -| `pageKey?` | `string` | Optional page key from an existing one to use for pagination. | -| `withMetadata` | `boolean` | Whether to include additional metadata about each transfer event. Defaults to `false` if omitted. | - -# Response - -| Property | Type | Description | -| ---------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------- | -| `Promise` | `object` | This returns the object response depending on whether `withMetadata` was set to `true`or not. | - -### `AssetTransfersResponse` response object parameters - -| parameter | type | description | -| ----------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `uniqueId` | `string` | The unique ID of the transfer. | -| `category` | `string` | The category of the transfer. | -| `blockNum` | `string` | The block number where the transfer occurred. | -| `from` | `string` | The from address of the transfer. | -| `to` | `string \| null` | The to address of the transfer. | -| `value` | `number \| null` | Converted asset transfer value as a number (raw value divided by contract decimal). `null` if ERC721 transfer or contract decimal not available. | -| `erc721TokenId` | `string \| null` | The raw ERC721 token id of the transfer as a hex string. `null` if not an ERC721 transfer. | -| `erc1155Metadata` | `ERC1155Metadata[] \| null` | A list of ERC1155 metadata objects if the asset transferred is an ERC1155 token. `null` if not an ERC1155 transfer. | -| `tokenId` | `string \| null` | The token id of the token transferred. | -| `asset` | `string \| null` | Returns the token's symbol or ETH for other transfers. `null` if the information was not available. | -| `hash` | `string` | The transaction hash of the transfer transaction. | -| `rawContract` | `RawContract` | Information about the raw contract of the asset transferred. | - -### `AssetTransfersWithMetadataResponse` object parameters - -| parameter | type | description | -| ----------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uniqueId` | `string` | The unique ID of the transfer. | -| `category` | `string` | The category of the transfer. | -| `blockNum` | `string` | The block number where the transfer occurred. | -| `from` | `string` | The from address of the transfer. | -| `to` | `string \| null` | The to address of the transfer. | -| `value` | `number \| null` | Converted asset transfer value as a number (raw value divided by contract decimal). `null` if ERC721 transfer or contract decimal not available. | -| `erc721TokenId` | `string \| null` | The raw ERC721 token id of the transfer as a hex string. `null` if not an ERC721 transfer. | -| `erc1155Metadata` | `ERC1155Metadata[] \| null` | A list of ERC1155 metadata objects if the asset transferred is an ERC1155 token. `null` if not an ERC1155 transfer. | -| `tokenId` | `string \| null` | The token id of the token transferred. | -| `asset` | `string \| null` | Returns the token's symbol or ETH for other transfers. `null` if the information was not available. | -| `hash` | `string` | The transaction hash of the transfer transaction. | -| `rawContract` | `RawContract` | Information about the raw contract of the asset transferred. | -| `metadata` | `AssetTransfersMetadata` | Additional metadata about the transfer event. The additional metadata object includes: 1. `blockTimestamp`: `string` / *Timestamp of the block from which the transaction event originated.*/ | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getAssetTransfers` request using the Alchemy SDK: - - - ```javascript getAssetTransfers.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Assign the contract address to a variable - let toAddress = "0x1E6E8695FAb3Eb382534915eA8d7Cc1D1994B152"; - - //The response fetches the transactions the specified addresses. - let response = await alchemy.core.getAssetTransfers({ - fromBlock: "0x0", - fromAddress: "0x0000000000000000000000000000000000000000", - toAddress: toAddress, - excludeZeroValue: true, - category: ["erc721", "erc1155"], - }) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - transfers: [ - { - blockNum: '0xd2113f', - uniqueId: '0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d:log:165', - hash: '0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d', - from: '0x0000000000000000000000000000000000000000', - to: '0x1e6e8695fab3eb382534915ea8d7cc1d1994b152', - value: null, - erc721TokenId: '0x0000000000000000000000000000000000000000000000000000000000001acb', - erc1155Metadata: null, - tokenId: '0x0000000000000000000000000000000000000000000000000000000000001acb', - asset: 'DUSK', - category: 'erc721', - rawContract: [Object] - }, - { - blockNum: '0xd2113f', - uniqueId: '0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d:log:166', - hash: '0xb8ad1138a22a0dcc5eddca1db9aa0c731891fe60041ed6f4d9ceb737c9f1b06d', - from: '0x0000000000000000000000000000000000000000', - to: '0x1e6e8695fab3eb382534915ea8d7cc1d1994b152', - value: null, - erc721TokenId: '0x0000000000000000000000000000000000000000000000000000000000001acc', - erc1155Metadata: null, - tokenId: '0x0000000000000000000000000000000000000000000000000000000000001acc', - asset: 'DUSK', - category: 'erc721', - rawContract: [Object] - }, - { - blockNum: '0xe4284a', - uniqueId: '0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157:log:345', - hash: '0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157', - from: '0x0000000000000000000000000000000000000000', - to: '0x1e6e8695fab3eb382534915ea8d7cc1d1994b152', - value: null, - erc721TokenId: '0x0000000000000000000000000000000000000000000000000000000000000bc0', - erc1155Metadata: null, - tokenId: '0x0000000000000000000000000000000000000000000000000000000000000bc0', - asset: 'NC', - category: 'erc721', - rawContract: [Object] - }, - { - blockNum: '0xe4284a', - uniqueId: '0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157:log:346', - hash: '0x04573492a1ecb47102a2a70af190fa47f605a71f54ea62d94a1da1e225b7e157', - from: '0x0000000000000000000000000000000000000000', - to: '0x1e6e8695fab3eb382534915ea8d7cc1d1994b152', - value: null, - erc721TokenId: '0x0000000000000000000000000000000000000000000000000000000000000bc1', - erc1155Metadata: null, - tokenId: '0x0000000000000000000000000000000000000000000000000000000000000bc1', - asset: 'NC', - category: 'erc721', - rawContract: [Object] - } - ] - } - ``` - - -# Use Cases - -Here are some common use cases for the `getAssetTransfers` method: - -* **Asset tracking**: One of the most common use cases for `getAssetTransfers` is to track the movement of a particular asset on the blockchain. This can be useful for businesses and organizations that need to keep track of their assets as they move on-chain. - -* **Audit trails**: By using `getAssetTransfers` to retrieve a history of all transfers of a particular asset, auditors can verify the authenticity and provenance of the asset. This can help to prevent fraud and ensure compliance with regulations. - -* **Payment verification**: `getAssetTransfers` can also be used to verify that a payment has been made or received. For example, if a company is expecting a payment in a particular asset, they can use this function to confirm that the payment has been transferred to their account. - -# Related Methods - -Here are the methods related to `getAssetTransfers`: - -* [call](/reference/call-sdk): Returns the result of executing the transaction, using call. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getbalance.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getbalance.mdx deleted file mode 100644 index 58a6c005..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getbalance.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: getBalance - SDK -description: Returns the balance of a given address as of the provided block. -subtitle: Returns the balance of a given address as of the provided block. -url: https://docs.alchemy.com/reference/sdk-getbalance -slug: reference/sdk-getbalance ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the balance of a given address as of the provided block. - -# Parameters - -| Name | Type | Description | -| --------------- | -------- | ---------------------------------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the balance for. | -| `blockTag` | `string` | The optional block number or hash to get the balance for. Defaults to `latest` if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Goerli**. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Goerli.** -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| -------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Promise` | `object` | This is an estimate of the balance of gas. Properties returned in this object include: 1. `_hex`: `string` This is the hex. 2. `_isBigNumber`: `boolean` specifies if it is a big number. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getBalance` request using the Alchemy SDK: - - - ```javascript getbalance.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // This response fetches the balance of the given address in the parameter as of the provided block. - let response = await alchemy.core.getBalance("vitalik.eth", "latest") - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - BigNumber { _hex: '0x015336dfb4eec83a6dcd', _isBigNumber: true } - ``` - - -# Use Cases - -Here are some common use cases for the `getBalance` method: - -* **Retrieve balance**: One of the most common use cases for `getBalance` is to retrieve the balance of a particular address on the blockchain. - -* **Payment verification**: `getBalance` can also be used to verify that a payment has been made or received. - -# Related Methods - -Here are the methods related to `getBalance`: - -* [getAssetTransfers](/reference/getassettransfers-sdk): Get transactions for specific addresses -* [call](/reference/call-sdk): Returns the result of executing the transaction, using call. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblock.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblock.mdx deleted file mode 100644 index 2ca070ce..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblock.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: getBlock -SDK -description: Returns the block from the network based on the provided block number or hash. -subtitle: Returns the block from the network based on the provided block number or hash. -url: https://docs.alchemy.com/reference/sdk-getblock -slug: reference/sdk-getblock ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the block from the network based on the provided block number or hash. Transactions on the block are represented as an array of transaction hashes. To get the full transaction details on the block, use [getBlockWithTransactions](/reference/sdk-getblockwithtransactions) instead. - -# Parameters - -| Name | Type | Description | -| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `blockHashOrBlockTag` | `string` | The block hash or one of the following block tags: - `pending`: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Intuitively, you can think of this as block that have not been mined yet. - `latest`: The most recent block in the chain observed by the client, this block may be re-orged out of the chain even under normal conditions. - `earliest`: The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. | - -# Response - -| Property | Type | Description | -| ---------------- | -------- | ----------------------------------------------------------------------------------- | -| `Promise` | `object` | Returns a block object with the following fields or `null` when no block was found. | - -### `Block` response object parameters - -| Parameter | Type | Description | -| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `hash` | `string` | `32 Bytes` - hash of the block. `null` when its pending block. | -| `parentHash` | `string` | `32 Bytes` - hash of the parent block. | -| `number` | `number` | The block number. `null` when its pending block. | -| `timestamp` | `number` | The unix timestamp for when the block was collated. | -| `nonce` | `string` | A nonce is a value that represents the number of transactions sent by the sender's address, ensuring the transactions are processed in order and preventing replay attacks. | -| `difficulty` | `number` | Integer of the difficulty for this block. | -| `gasLimit` | `BigNumber` | The maximum gas allowed in this block. | -| `gasUsed` | `BigNumber` | The total used gas by all transactions in this block. | -| `miner` | `string` | `20 Bytes` - the address of the beneficiary to whom the mining rewards were given. | -| `transactions` | `array` | An arrray containing transactions. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getBlock` request using the Alchemy SDK: - - - ```javascript getblock.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // using the block tag "latest" to get the latest block - // could've used a block hash to get a particualr block as well - let blockTagOrHash = "latest" - - // calling the getBlock method to get the latest block - let response = await alchemy.core.getBlock(blockTagOrHash); - - // logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - hash: '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3', - parentHash: '0x6890edf8ad6900a5472c2a7ee3ef795f020ef6f907afb7f4ebf6a92d6aeb1804', - number: 15221026, - timestamp: 1658877717, - nonce: '0xd8c399035d6e6e8f', - difficulty: null, - gasLimit: BigNumber { _hex: '0x01ca35d2', _isBigNumber: true }, - gasUsed: BigNumber { _hex: '0x01ca1ae1', _isBigNumber: true }, - miner: '0x52bc44d5378309EE2abF1539BF71dE1b7d7bE3b5', - extraData: '0x6e616e6f706f6f6c2e6f7267', - transactions: [ - '0xba4938ea41154427c8cb424ea89d9f150f139ed10065fe43ce11102dc82e1c37', - '0x98cc6b4b66453e184f65728fee265a726b030c5ddcfc1311a01ea5345c3959ab', - '0x2cbb4968cce66c73f2755fe7ef177981962afa7943f658b323e61850f31e4163', - '0x34e65a26b58ec93ec3a35c5c3269f1179801604e027cfd6a7cad8bef78e4fe62', - '0x745e34c019f924316863e5af9f2cfbe6f660071310054e8331e9dc1fcdfc26a8', - ... 253 more items - ], - baseFeePerGas: BigNumber { _hex: '0x02aa2d1d80', _isBigNumber: true }, - _difficulty: BigNumber { _hex: '0x2a31d8a2cf4dd7', _isBigNumber: true } - } - ``` - - -# Related Methods - -Here are the methods related to `getBlock`: - -* [getBlockWithTransactions](/reference/getblockwithtransactions-sdk): Returns the block from the network based on the provided block number or hash. Includes full transactions from the block. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblocknumber.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblocknumber.mdx deleted file mode 100644 index 232ead48..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblocknumber.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: getBlockNumber - SDK -description: Returns the block number of the most recently mined block. -subtitle: Returns the block number of the most recently mined block. -url: https://docs.alchemy.com/reference/sdk-getblocknumber -slug: reference/sdk-getblocknumber ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the block number of the most recently mined block. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ----------------------------------------------------- | -| `Promise` | `number` | Integer of the current block number the client is on. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getBlockNumber` request using the Alchemy SDK: - - - ```javascript getblocknumber.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //The response returns the block number of the most recently mined block - let response = await alchemy.core.getBlockNumber() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - 16698044 - ``` - - -# Use Cases - -Here are some potential use cases for the `getBlockNumber` method: - -* **Monitoring**: You can use `getBlockNumber` to monitor the progress of the Ethereum network by checking the current block number. This can be useful for tracking the growth of the network and understanding how it is evolving over time. - -* **Smart Contract Development**: If you are developing a smart contract, you may need to know the current block number for certain operations, such as setting timeouts or scheduling transactions. You can use `getBlockNumber` to get the current block number and use it in your contract logic. - -# Related Methods - -Here are the methods related to `getBlockNumber`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblockwithtransactions.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblockwithtransactions.mdx deleted file mode 100644 index d15c4486..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getblockwithtransactions.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: getBlockWithTransactions - SDK -description: Returns the block from the network based on the provided block number or hash. In addition to the transaction hashes included in the block, it also returns the full transaction objects. -subtitle: Returns the block from the network based on the provided block number or hash. In addition to the transaction hashes included in the block, it also returns the full transaction objects. -url: https://docs.alchemy.com/reference/sdk-getblockwithtransactions -slug: reference/sdk-getblockwithtransactions ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the block from the network based on the provided block number or hash. In addition to the transaction hashes included in the block, it also returns the full transaction objects. - -# Parameters - -| Name | Type | Description | -| --------------------- | -------- | ---------------------------------------------- | -| `blockHashOrBlockTag` | `string` | The block number or hash to get the block for. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ------------------------------------------------------------------------------------ | -| `Promise` | `object` | Returns a block object with the following fields, or `null` when no block was found. | - -### `BlockWithTransactions` response object parameters - -| Parameter | Type | Description | -| -------------- | --------- | ----------------------------------------------------------------------------------------------------- | -| `hash` | `string` | `32 Bytes` - hash of the block. `null` when its pending block. | -| `parentHash` | `string` | `32 Bytes` - hash of the parent block. | -| `number` | `number` | the block number. `null` when its pending block. | -| `logsBloom` | `string` | `256 Bytes` - the bloom filter for the logs of the block. `null` when its pending block. | -| `timestamp` | `number` | the unix timestamp for when the block was collated. | -| `nonce` | `string` | 8 Bytes - hash of the generated proof-of-work. `null` when its pending block. | -| `difficulty` | `number` | integer of the difficulty for this block. | -| `gasLimit` | `number` | the maximum gas allowed in this block. | -| `gasUsed` | `number` | the total used gas by all transactions in this block. | -| `size` | `integer` | the size of this block in bytes. | -| `miner` | `string` | `20 Bytes` - the address of the beneficiary to whom the mining rewards were given. | -| `transactions` | `array` | Array of transaction objects, or `32 Bytes` transaction hashes depending on the last given parameter. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getBlockWithTransactions` request using the Alchemy SDK: - - - ```javascript getblockwithtransactions.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Assign the hash to a variable - let txHash = "0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3" - - //Call the method to return the block with transactions - let response = await alchemy.core.getBlockWithTransactions(txHash) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - hash: '0x58bbdd890cc828a70cf6d65f103d7723e945197b53da2c263ea6270a82fb2ccb', - type: 2, - accessList: [], - blockHash: '0x92fc42b9642023f2ee2e88094df80ce87e15d91afa812fef383e6e5cd96e2ed3', - blockNumber: 15221026, - transactionIndex: 57, - confirmations: 1477819, - from: '0x7abE0cE388281d2aCF297Cb089caef3819b13448', - gasPrice: [BigNumber], - maxPriorityFeePerGas: [BigNumber], - maxFeePerGas: [BigNumber], - gasLimit: [BigNumber], - to: '0x7BA11217CCd0eD428924295BF7f13D50E75B68A4', - value: [BigNumber], - nonce: 310301, - data: '0x', - r: '0x79a3a0a0a9707c3c679e702b115562ce1bc5c8c761891baf05dfae2ddcc38599', - s: '0x488153c1dcdb9b03af4199070b67476fa8f24af865e0f448fb7f538b004b0991', - v: 1, - creates: null, - chainId: 1, - wait: [Function (anonymous)] - }, ............ - ``` - - -# Use Cases - -Here are some possible use cases for this method: - -* **Blockchain Explorer**: When building a blockchain explorer, it is important to be able to retrieve detailed information about blocks and their transactions. `getBlockWithTransactions` can be used to fetch this information and display it to users. - -* **Smart Contract Verification**: When verifying the correctness of a smart contract execution, it may be necessary to retrieve the block and its transactions that triggered the execution. `getBlockWithTransactions` can be used to fetch this information and verify that the smart contract executed correctly. - -* **Payment Processing**: When processing payments on a blockchain, it may be necessary to retrieve the block and its transactions that confirm the payment. `getBlockWithTransactions` can be used to fetch this information and confirm that the payment was successfully processed. - -# Related Methods - -Here are the methods related to `getBlockWithTransactions`: - -* [getBlock](/reference/getBlock-sdk): Returns the block from the network based on the provided block number or hash. -* [getBlockNumber](/reference/getblocknumber-sdk): Returns the result of executing the transaction, using call. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getcode.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getcode.mdx deleted file mode 100644 index 9417ff23..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getcode.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: getCode - SDK -description: Returns the contract code of the provided address at the block. If there is no contract deployed, the result is 0x . -subtitle: Returns the contract code of the provided address at the block. If there is no contract deployed, the result is 0x . -url: https://docs.alchemy.com/reference/sdk-getcode -slug: reference/sdk-getcode ---- - -Returns the contract code of the provided address at the block. If there is no contract deployed, the result is `0x`. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the contract code of the provided address at the block. If there is no contract deployed, the result is `0x`. - -# Parameters - -| Name | Type | Description | -| --------------- | -------- | ----------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the code for. | -| `blockTag` | `string` | The optional block number or hash. Defaults to `latest` if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Goerli**. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Goerli.** -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ----------------- | -| `Promise` | `string` | Returns the code. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getCode` request using the Alchemy SDK: - - - ```javascript getcode.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let address = "registrar.firefly.eth" - - //Call the method to retrieve code of address - let response = await alchemy.core.getCode(address) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - 0x606060405236156100885763fffffffffffffffffffffff1916600160a060020a0383161790555b50565b600654600554600160a060020a033016315b909192565b6004545b90565b80516001820190600080808060048510806106af5750601485115b156106ba5760006000fd5b600093505b8484101561072a57855160ff16925060618310806106e05750607a8360ff16115b80156106fc575060308360ff1610806106fc575060398360ff16115b5b801561070d57508260ff16602d14155b156107185760006000fd5b6001909501945b6001909301926106bf565b60045434101561073a5760006000fd5b866040518082805190602001908083835b6020831061076a5780518252601f19909201916020918201910161074b565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060035483528282018190528451928390038501832060008054948401819052865160e060020a6302571be3028152600481018390529651929a509098509650600160a060020a0390921694506302571be393602480820194509192919082900301818787803b15156107ff57fe5b60325a03f1151561080c57fe5b505060405151600160a060020a031691909114905061082b5760006000fd5b60008054600354604080517f06ab5923000000000000000000000000000000000000000000000000000000008152600481019290925260248201869052600160a060020a03308116604484015290519216926306ab59239260648084019382900301818387803b151561089a57fe5b60325a03f115156108a757fe5b505060008054600154604080517f1896f70a0000000000000000000000000 - ``` - - -# Use Cases - -The everyday use case for the `getCode` method is to return the contract code of an address on the blockchain. However, here are some other possible use cases for the `getCode` method: - -* **Contract verification**: Developers can use the `getCode` method to verify that the bytecode of a deployed contract matches the expected bytecode. This can be used to ensure that a contract has not been tampered with or to verify that a contract has been deployed correctly. - -* **Contract debugging**: If a contract is not behaving as expected, developers can use `getCode` to retrieve the bytecode and examine it for errors or unexpected behavior. - -* **Contract analysis**: Researchers or security auditors might use `getCode` to analyze the bytecode of a contract for vulnerabilities or other issues. - -* **Contract migration**: If a contract needs to be migrated to a new address, developers can use `getCode` to retrieve the bytecode of the existing contract and then deploy it to the new address. - -Overall, `getCode` is a useful tool for developers who are building on the EVM networks and need to interact with deployed contracts. It can be used for a variety of purposes, from debugging and analysis to migration and verification. - -# Related Methods - -Here are the methods related to `getCode`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. -* [getBlockNumber](/reference/getblocknumber-sdk): Returns the block number of the most recently mined block. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getcontractmetadata.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getcontractmetadata.mdx deleted file mode 100644 index c7b4dec3..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getcontractmetadata.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: getContractMetadata - SDK -description: Get the NFT collection metadata associated with the provided parameters. -subtitle: Get the NFT collection metadata associated with the provided parameters. -url: https://docs.alchemy.com/reference/sdk-getcontractmetadata -slug: reference/sdk-getcontractmetadata ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get the NFT collection metadata associated with the provided parameters. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | - -# Response - -| Property | Type | Description | -| ---------------------- | -------- | ---------------------------- | -| `Promise` | `object` | The NFT collection metadata. | - -### `NftContract` response object parameters - -| Property | Type | Descriptioin | -| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `tokenType` | `string` | The type of the token in the contract. Available options are: `ERC721` = "ERC721", `ERC1155` = "ERC1155", `UNKNOWN` = "UNKNOWN" | -| `name` | `string` | The name of the contract. | -| `symbol` | `string` | The symbol of the contract. | -| `openSea` | `object` | OpenSea's metadata for the contract. | -| `contractDeployer` | `string` | The address that deployed the NFT contract. | -| `deployedBlockNumber` | `number` | The block number the NFT contract deployed in. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the address whose contract metadata you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch metadata - const response = await alchemy.nft.getContractMetadata(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - { - contract: { - address: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', - name: 'BoredApeYachtClub', - symbol: 'BAYC', - totalSupply: '10000', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03', - deployedBlockNumber: 12287507 - }, - tokenId: '99', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-03-02T17:33:56.457Z', - metadataError: undefined, - rawMetadata: { - image: 'ipfs://QmWiXSKwbwHkobDdZbDc6t66kf192P33Ru5UJYhL5mPJTk', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://alchemy.mypinata.cloud/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/99', - raw: 'ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/99' - }, - media: [ [Object] ], - spamInfo: undefined - }, - ... 9900 more items - ] - admin@Admins-MBP Alchem % node index.js - { - address: '0x61fce80d72363b731425c3a2a46a1a5fed9814b2', - name: 'CyborgMercenariesCm', - symbol: 'CYBORG', - totalSupply: '8039', - tokenType: 'ERC1155', - openSea: { - floorPrice: 0.0015, - collectionName: 'Undead Warriors', - safelistRequestStatus: 'verified', - imageUrl: 'https://i.seadn.io/gcs/files/6cd7bec4ad4b280adb53c33c815bd3dc.png?w=500&auto=format', - description: 'Core Team\n' + - 'https://opensea.io/theseansneed | https://opensea.io/W3-Freedom | https://opensea.io/Xc4libur\n' + - 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.\n' + - '\n', - externalUrl: 'http://undeadwarriors.io', - twitterUsername: 'undead_warriors', - discordUrl: 'https://discord.gg/qjZbJMPS86', - lastIngestedAt: '2023-02-22T03:39:05.000Z' - }, - contractDeployer: '0xd32bb311467060cec58cd6e9b37134ca6d81377f', - deployedBlockNumber: 13950908 - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getContractMetadata` method: - -* **Querying contract information**: The `getContractMetadata` method can be used to retrieve general information about a smart contract, such as the contract's name, version, and author. - -* **Verifying contract authenticity**: The metadata of a smart contract can include a cryptographic hash of the source code used to compile the contract. By retrieving this hash through `getContractMetadata`, users can verify that the deployed contract matches the original source code. - -* **Automating contract interactions**: Some smart contracts may include metadata that provides additional information about the contract's functions and parameters. This information can be used to automatically generate code for interacting with the contract, which can save time and reduce errors. - -# Related Methods - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getfeedata.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getfeedata.mdx deleted file mode 100644 index 914de925..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getfeedata.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: getFeeData - SDK -description: Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas should be used. For legacy transactions and networks which do not support EIP-1559, the gasPrice should be used. -subtitle: Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas should be used. For legacy transactions and networks which do not support EIP-1559, the gasPrice should be used. -url: https://docs.alchemy.com/reference/sdk-getfeedata -slug: reference/sdk-getfeedata ---- - -Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the `maxFeePerGas` and `maxPriorityFeePerGas` should be used. - -For legacy transactions and networks which do not support EIP-1559, the `gasPrice` should be used. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the `maxFeePerGas` and `maxPriorityFeePerGas` should be used. - -For legacy transactions and networks which do not support EIP-1559, the `gasPrice` should be used. - -# Response - -| Property | Type | Description | -| ------------------ | -------- | ------------------------------- | -| `Promise` | `object` | Returns an object with the fees | - -### `FeeData` response object parameters - -| Property | Type | Description | -| ---------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `maxFeePerGas` | `number / string` | `BigNumber` - The `maxFeePerGas` to use for a transaction. This is based on the most recent block's baseFee. | -| `maxPriorityFeePerGas` | `number / string` | `BigNumber` - The `maxPriorityFeePerGas` to use for a transaction. This accounts for the uncle risk and for the majority of current MEV risk. | -| `gasPrice` | `number / string` | `BigNumber` - The `gasPrice` to use for legacy transactions or networks which do not support EIP-1559. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getFeeData` request using the Alchemy SDK: - - - ```javascript getfeedata.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - //Call the method to return the recommended fee data to use in a transaction. - let response = await alchemy.core.getFeeData() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - lastBaseFeePerGas: BigNumber { _hex: '0x0d9fbc42bf', _isBigNumber: true }, - maxFeePerGas: BigNumber { _hex: '0x1b98e0b47e', _isBigNumber: true }, - maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true }, - gasPrice: BigNumber { _hex: '0x0da39585ec', _isBigNumber: true } - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getFeeData` method: - -* **Transaction fee estimation**: Developers can use the `getFeeData` method to estimate the fee required for a particular transaction. This information can be used to determine the optimal fee to set for a transaction, given the current network conditions. - -* **Gas price monitoring**: The `getFeeData` method can be used to monitor changes in the gas price of a blockchain network over time. This information can be used to adjust gas price strategies for applications, ensuring they stay competitive and cost-effective. - -* **Smart contract development**: When developing smart contracts, developers need to ensure that their contracts operate within the gas limits of the network. The `getFeeData` method can be used to calculate the gas costs associated with specific operations, helping developers to optimize their contract code and stay within network constraints. - -# Related Methods - -Here are the methods related to `getFeeData`: - -* [getGasPrice](/reference/getgasprice-sdk): Returns the current price per gas in `wei`. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getfloorprice.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getfloorprice.mdx deleted file mode 100644 index 830ed70c..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getfloorprice.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: getFloorPrice - SDK -description: Returns the floor prices of an NFT contract by marketplace. -subtitle: Returns the floor prices of an NFT contract by marketplace. -url: https://docs.alchemy.com/reference/sdk-getfloorprice -slug: reference/sdk-getfloorprice ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the floor prices of an NFT contract by marketplace. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------------------- | -| `contractAddress` | `string` | The contract address for the NFT collection. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | -| `Promise` | `object` | Name of the NFT marketplace where the collection is listed. Current marketplaces supported: **OpenSea**, **LooksRare** | - -### `GetFloorPriceResponse` object parameters - -| Property | Type | Description | -| --------------- | -------- | ------------------------------------------------------------------------- | -| `floorPrice` | `number` | The floor price of the collection on the given marketplace. | -| `priceCurrency` | `string` | The currency in which the floor price is denominated. | -| `collectionUrl` | `string` | The link to the collection on the given marketplace. | -| `retrievedAt` | `string` | UTC timestamp of when the floor price was retrieved from the marketplace. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to check the contract floor price - const response = await alchemy.nft.getFloorPrice(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - openSea: { - floorPrice: 44.5, - priceCurrency: 'ETH', - collectionUrl: 'https://opensea.io/collection/boredapeyachtclub', - retrievedAt: '2023-06-19T00:07:11.601Z' - }, - looksRare: { - floorPrice: 43.65, - priceCurrency: 'ETH', - collectionUrl: 'https://looksrare.org/collections/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', - retrievedAt: '2023-06-19T00:07:11.639Z' - } - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getFloorPrice` method: - -* **NFT marketplaces**: In an NFT marketplace, the `getFloorPrice` method can be used to display the minimum price at which an NFT can be purchased. This helps buyers to determine the minimum price they need to pay for a particular NFT, and also helps sellers to set a minimum price for their NFT. - -* **Auctions**: In an auction, the `getFloorPrice` method can be used to determine the minimum bid amount for an item. This helps to ensure that the auction starts at a fair price and helps to prevent low-ball bids. - -* **Automated market makers (AMMs)**: In an AMM, the `getFloorPrice` method can be used to determine the minimum price at which a particular token can be bought or sold. This helps to ensure that trades are executed at a fair price and helps to prevent price manipulation. - -* **Tokenized real estate**: In the emerging market of tokenized real estate, the `getFloorPrice` method can be used to display the minimum price at which a particular real estate asset can be sold. This helps buyers to determine the minimum price they need to pay for a particular property, and also helps sellers to set a minimum price for their property. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getgasprice.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getgasprice.mdx deleted file mode 100644 index fa1c4dcc..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getgasprice.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: getGasPrice - SDK -description: Returns the best guess of the current gas price to use in a transaction. -subtitle: Returns the best guess of the current gas price to use in a transaction. -url: https://docs.alchemy.com/reference/sdk-getgasprice -slug: reference/sdk-getgasprice ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the best guess of the current gas price to use in a transaction. - -# Response - -| Property | Type | Description | -| -------------------- | -------- | ----------------------------------------------------------------------------------- | -| `Promise` | `object` | `BigNumber` Returns an object with the `_hex`: *string* and `_isBigNumber`: boolean | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getGasPrice` request using the Alchemy SDK: - - - ```javascript getgasprice.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - //Call the method - let response = await alchemy.core.getGasPrice() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - BigNumber { _hex: '0x05813ed1b5', _isBigNumber: true } - ``` - - -# Use Cases - -Here are some possible use cases for the `getGasPrice` method: - -* **Gas estimation**: Before submitting a transaction to the EVM networks, it's important to estimate the amount of gas that will be required to execute the transaction. `getGasPrice` can be used to retrieve the current gas price and use it to estimate the gas cost of a transaction. - -* **Gas price optimization**: Gas prices on the EVM networks can vary widely depending on network congestion and other factors. By using `getGasPrice`, developers can dynamically adjust the gas price of their transactions to optimize for speed and cost. - -* **Gas price monitoring**: Gas prices can fluctuate rapidly, and it's important to stay up-to-date on the current market conditions. `getGasPrice` can be used to monitor gas prices and alert developers when prices are high or low. - -* **Network analysis**: Gas prices can be an important indicator of network health and congestion. By analyzing historical gas prices using `getGasPrice`, developers can gain insights into network usage patterns and identify potential bottlenecks or congestion points. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getlogs.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getlogs.mdx deleted file mode 100644 index 0e4a0acd..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getlogs.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: getLogs - SDK -description: Returns an array of logs that match the provided filter. -subtitle: Returns an array of logs that match the provided filter. -url: https://docs.alchemy.com/reference/sdk-getlogs -slug: reference/sdk-getlogs ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns an array of logs that match the provided filter. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | --------------------------------------------------------------------- | -| `filter` | `object` | The filter object to use. Includes the `fromBlock` and the `toBlock`. | - -### `filter` parameters - -| Parameter | Type | Description | -| ----------- | -------- | ------------------------------------------------------------------------------------- | -| `fromBlock` | `string` | Either the hex value of a **block number** OR One of the **block tags** listed below. | -| `toBlock` | `string` | Either the hex value of a **block number** OR One of the **block tags** listed below: | - -* `pending` (Not available on Ethereum) - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Goerli**. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Goerli.** -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| --------------------- | ------- | ------------------------------------------------------------------------------------- | -| `Promise>` | `array` | `Array of log objects`, or an empty array if nothing has changed since the last poll. | - -### `>` response object parameters - -| Prameter | Type | Description | -| ------------------ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `blockHash` | `string` | `32 Bytes` - hash of the block where this log was in. null when its pending. `null` when its pending log. | -| `blockNumber` | `integer` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `transactionIndex` | `integer` | Integer of the transactions index position log was created from. null when its pending log. | -| `address` | `string` | `20 Bytes` - address from which this log originated. | -| `logIndex` | `integer` | Integer of the log index position in the block. `null` when its pending log. | -| `data` | `string` | Contains one or more 32 Bytes non-indexed arguments of the log. | -| `removed` | `boolean` | `true` when the log was removed, due to a chain reorganization. `false` if its a valid log. | -| `topics` | `array of strings` | Array of zero to four 32 Bytes DATA of indexed log arguments. **In solidity**: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier. | -| `transactionHash` | `string` | Hash of the transactions this log was created from. `null` when its pending log. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getLogs` request using the Alchemy SDK: - - - ```javascript getlogs.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - let address = "0xdAC17F958D2ee523a2206206994597C13D831ec7" - let topics = [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" ] - let blockHash = "0x49664d1de6b3915d7e6fa297ff4b3d1c5328b8ecf2ff0eefb912a4dc5f6ad4a0" - - //Call the method to return array of logs - let response = await alchemy.core.getLogs(address, topics, blockHash) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - blockNumber: 16701233, - blockHash: '0x2bdfc733ded7277d23e9859455609b5deadc2fe3cc404e25ed6f6667ab271b42', - transactionIndex: 25, - removed: false, - address: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', - data: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', - topics: [ - '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', - '0x00000000000000000000000015891db79f767e4ace21f4e511cdb72008dc9fca', - '0x000000000000000000000000a3a7b6f88361f48403514059f1f16c8e78d60eec' - ], - transactionHash: '0xe8479758b8dd54f529187da4109898d5e89db2fd2fade7073b24cfe99dcf1d14', - logIndex: 40 - }, - { - blockNumber: 16701233, - blockHash: '0x2bdfc733ded7277d23e9859455609b5deadc2fe3cc404e25ed6f6667ab271b42', - transactionIndex: 29, - removed: false, - address: '0xdAC17F958D2ee523a2206206994597C13D831ec7', - data: '0x0000000000000000000000000000000000000000000000000000000023c34600', - topics: [ - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', - '0x000000000000000000000000f097b3c3598692811e14a6fe6a4cf030df5d73eb', - '0x000000000000000000000000debb5b7df78c148694b9ca1fce6f9b2b0e584899' - ], - transactionHash: '0xf638486c1a9e76bcb66f92bcf58439dad9c3ea3a2cde41c33769713479148828', - logIndex: 41 - }, - { - blockNumber: 16701233, - blockHash: '0x2bdfc733ded7277d23e9859455609b5deadc2fe3cc404e25ed6f6667ab271b42', - transactionIndex: 32, - removed: false, - address: '0x514910771AF9Ca656af840dff83E8264EcF986CA', - data: '0x0000000000000000000000000000000000000000000000017085b53104e2e000', - topics: [ - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', - '0x000000000000000000000000dfd5293d8e347dfe59e90efd55b2956a1343963d', - '0x000000000000000000000000787afa42f5d0e0b34189ad4d8b47ba87f615b416' - ], - transactionHash: '0xa5c97ea24020ad959708886007e95df5eb5778c70d1a34e0c3dc18bd7de9225a', - logIndex: 42 - }, ...................... - ``` - - -# Use Cases - -Here are some possible use cases for the `getLogs` method: - -* **Event tracking**: `getLogs` can be used to track specific events generated by smart contracts. This is useful for monitoring the state changes of a smart contract and taking action based on those changes. - -* **Analytics**: `getLogs` can be used to analyze smart contract data and generate reports or visualizations. For example, you could use `getLogs` to analyze the frequency and volume of trades on a decentralized exchange. - -* **Debugging**: `getLogs` can be used to debug smart contracts. If a smart contract is not behaving as expected, you can use `getLogs` to retrieve the events generated by the contract and identify where the issue is occurring. - -# Related Methods - -Here are the methods related to `getLogs`: - -* [getBlock -SDK](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getmintednfts.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getmintednfts.mdx deleted file mode 100644 index 9e2d5875..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getmintednfts.mdx +++ /dev/null @@ -1,253 +0,0 @@ ---- -title: getMintedNfts - SDK -description: The getMintedNfts method gets all the NFTs minted by a specified owner address. -subtitle: The getMintedNfts method gets all the NFTs minted by a specified owner address. -url: https://docs.alchemy.com/reference/sdk-getmintednfts -slug: reference/sdk-getmintednfts ---- - -The `getMintedNfts` method gets all the NFTs minted by a specified owner address. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`getMintedNfts` gets all the NFTs minted by a specified owner address. - -# Parameters - -| Name | Type | Description           | Example | -| ---------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| Owner Address | `string` | Address for the NFT owner (can be in ENS format). | `"vitalik.eth"` or `"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"` | -| Options (Optional): 1. `contractAddresses` 2. `tokenType` 3. `pageKey` | `Object`: 1. \[`string`] 2. `string` 3. `string` | An optional object with the following properties: 1. `contractAddresses`: An array of NFT contract addresses to filter mints by. If omitted, defaults to all contract addresses. 2. `tokenType`: ENUM option to filter mints by `ERC721` vs `ERC1155` contracts. If omitted, defaults to all NFTs. 3. `pageKey`: Optional page key from an existing response to use for pagination. | `{ contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"], tokenType: "ERC721" }` | - -# Response - -The `getMintedNfts` method returns a `Promise` object that contains the NFT mints by the specified owner address. - -The returned object has the following fields: - -| Property (Field) | Description | -| ---------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | An array of the transfer objects. Each transfer object contains information about the transferred NFT. | -| `pageKey?` | Optional page key to use to fetch the next group of NFTs. `undefined` if all the transfers are already included in the response. | - -Each mint object has the following fields: - -| Property (Field) | Description | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | The address of the NFT contract | -| `tokenId` | The unique identifier of the NFT being transferred. | -| `tokenType` | The type of NFT being transferred (`ERC721` or `ERC1155`) | -| `title` | Title or name of the NFT. | -| `description` | A brief description of the NFT. | -| `timeLastUpdated` | When the NFT was last updated in the blockchain. Represented in ISO-8601 format. | -| `metadataError?` | Holds an error message if there was an issue fetching metadata. | -| `rawMetadata?` | The raw metadata fetched from the metadata URL specified by the NFT. The field is `undefined` if Alchemy was unable to fetch metadata. | -| `tokenUri?` | URIs for accessing the NFT's metadata blob. | -| `media` | URIs for accessing the NFT's media assets. | -| `spamInfo?` | Detailed information on why an NFT was classified as spam. `undefined` if the NFT is not classified as spam. | -| `from` | The address the NFT was sent from. For minted NFTs, this field is set to `0x0000000000000000000000000000000000000000`. | -| `to` | The address the NFT was sent or minted to. | -| `transactionHash` | The transaction hash where the transfer or mint occurred. | -| `blockNumber` | The block number as a hex string of when the transfer or mint occurred. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```text yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getMintedNfts` request using the Alchemy SDK: - - - ```javascript getMintedNfts.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getMintedNfts method - const main = async () => { - // Address for the NFT owner (can be in ENS format). - let address = "vitalik.eth"; - - // Additional options for the request. (Optional) - let options = { - /** - * List of NFT contract addresses to filter mints by. If omitted, defaults to - * all contract addresses. - */ - contractAddresses: ["0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85"], - /** - * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all - * NFTs. - */ - tokenType: "ERC721", - }; - - // Calling the getMintedNfts method - let mintedNfts = await alchemy.nft.getMintedNfts(address, options); - - // Logging the response to the console - console.log(mintedNfts); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json getMintedNfts response - { - "nfts": [ - { - "contract": { - "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0007, - "collectionName": "ENS: Ethereum Name Service", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-02-03T11:00:29.000Z" - }, - "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8", - "deployedBlockNumber": 9380410 - }, - "tokenId": "111352653673047713804124050598355152059184664886497242203777472800304891334469", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-02-07T08:25:55.167Z", - "rawMetadata": {}, - "tokenUri": { - "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45", - "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xf62f5e56fe8da20b0f4596383d464ebbaf1968de230cfb3dd53fc91800228f45" - }, - "media": [], - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xc5bc4cf983e98ad9708dee356a17196aa367228f9ec87f81e622c81adaa6211e", - "blockNumber": "0xe88086" - }, - { - "contract": { - "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0007, - "collectionName": "ENS: Ethereum Name Service", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-02-03T11:00:29.000Z" - }, - "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8", - "deployedBlockNumber": 9380410 - }, - "tokenId": "103040680624633360426956226800459505851045291463662393946817594920946384752224", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-02-07T08:25:59.882Z", - "rawMetadata": {}, - "tokenUri": { - "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60", - "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xe3cef55f7067b9353a1b591cd3ea3af56e998792eb10d19a1b96f0a09917ce60" - }, - "media": [], - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0x9f21fad5549aaf94e7731f5c4649353926cf7520b96891b8b511d099020fb887", - "blockNumber": "0xf47bcd" - }, - { - "contract": { - "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.0007, - "collectionName": "ENS: Ethereum Name Service", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", - "description": "Ethereum Name Service (ENS) domains are secure domain names for the decentralized world. ENS domains provide a way for users to map human readable names to blockchain and non-blockchain resources, like Ethereum addresses, IPFS hashes, or website URLs. ENS domains can be bought and sold on secondary markets.", - "externalUrl": "https://ens.domains", - "twitterUsername": "ensdomains", - "lastIngestedAt": "2023-02-03T11:00:29.000Z" - }, - "contractDeployer": "0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8", - "deployedBlockNumber": 9380410 - }, - "tokenId": "79362104341617195787435013155216554898816343870453146709166302825328240112628", - "tokenType": "ERC721", - "title": "", - "description": "", - "timeLastUpdated": "2023-02-07T15:29:43.200Z", - "rawMetadata": {}, - "tokenUri": { - "raw": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4", - "gateway": "https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf755bf78de2496dbb4f4c665d1437ed11cd5c8835e8e32b16f3bf500cb633f4" - }, - "media": [], - "from": "0x0000000000000000000000000000000000000000", - "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "transactionHash": "0xe3c78eca914f215644922e15d080b4198d552885a64958f4bec6516ace149b43", - "blockNumber": "0xf47bcd" - } - ] - } - ``` - - -# Use Cases - -Some of the use cases for `getMintedNfts` are: - -* **NFT Collector Portfolio**: NFT collectors could use the API to retrieve information about all NFTs they have minted and display them as part of their online portfolio. - -* **NFT Market Analysis**: An NFT market analysis platform could use the API to gather data on NFTs minted by a specific creator and analyze their popularity and market demand. - -* **NFT Creator Monitoring**: NFT contract owners or administrators could use the API to monitor the NFTs minted by a specific creator and ensure that they comply with the rules and regulations set by the NFT contract. - -* **NFT Creator Stats**: An NFT creator could use the API to retrieve information about all their NFTs minted and view statistics such as the total number of NFTs minted. - -* **NFT Creator Tracking**: Investors or fans of a specific NFT creator could use the API to track their NFT creation activity and stay updated on their latest NFT releases. - -# Related Methods - -Here are the methods related to `getMintedNfts`: - -* [`getTransfersForOwner`](/reference/sdk-gettransfersforowner): Returns all NFT transfers for a given owner address. - -* [`getTransfersForContract`](/reference/sdk-gettransfersforcontract): Returns all NFT transfers for a given NFT contract address. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftfilters.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftfilters.mdx deleted file mode 100644 index eb392433..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftfilters.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: getNftFilters - SDK -description: Get all NFT filters tracked for the provided NftActivityWebhook , i.e., the \NFT_ACTIVITY\. -subtitle: Get all NFT filters tracked for the provided NftActivityWebhook , i.e., the \NFT_ACTIVITY\. -url: https://docs.alchemy.com/reference/sdk-getnftfilters -slug: reference/sdk-getnftfilters ---- - -Get all NFT filters tracked for the provided `NftActivityWebhook`, i.e., the "NFT\_ACTIVITY". - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all NFT filters tracked for the provided `NftActivityWebhook`, i.e., the "NFT\_ACTIVITY". - -# Parameters - -| Name | Type | Description | -| ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `webhookId` | `string` | The `id` of the NFT activity webhook. Passing in an incorrect id of a non-NFT webhook will result in a response object with no filters. | -| `options` | `object` | `Optional` Pagination options when fetching nft filters. Parameters include: 1. `limit` - `number` Number of addresses to fetch. 2. `pageKey` - `string` Page cursor for the next page. | - -# Response - -| Property | Type | Description | -| ----------------------------- | ------------------ | ------------------------------------- | -| `Promise` | `array of objects` | Returns a list of nft filter objects. | - -### `NftFiltersResponse` parameters - -| Property | Type | Description | -| ------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `filters` | `array of objects` | The NFT filters on the provided webhook. The parameters in the objects include: 1. `contractAddress` - `string` The contract address of the NFT. 2. `tokenId` - `string` The token id of the NFT to track. If this field is omitted, defaults to tracking all NFTs for the provided contract address. | -| `totalCount` | `number` | The total number of NFT filters on the webhook. | -| `pageKey` | `string` | `Optional` Page key used to fetch the remaining filters. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network} = require("alchemy-sdk"); - - // Configures the Alchemy SDK - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/signup - const config = { - authToken: "your-notify-auth-token", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the webhooks by fetching all the Webhooks - const hooks = await alchemy.notify.getAllWebhooks(); - - //Call the method to return the nfts by ID - const nftsById = await alchemy.notify.getNftFilters("wh_zyhqo5im08n6ougk", { - limit: 3, - pageKey: 1, - }); - - // Get the nfts by webhooks - const nftsByWebhook = await alchemy.notify.getNftFilters(hooks.webhooks[1]); - - //Logging the response to the console - console.log(nftsById, nftsByWebhook); - } - - main(); - ``` - - -## Response - - - ```shell shell - [ - { - "addresses": [ - { - "contractAddress": "string", - "tokenId": "string" - } - ], - "totalCount": 0, - "pageKey": "string" - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftFilters` method: - -* **Tracking NFT transfers**: You can use `getNftFilters` to track the transfer of NFTs between addresses. This can be useful for tracking the movement of valuable NFTs, such as rare digital art pieces or collectibles. - -* **Monitoring NFT sales**: If you're interested in the buying and selling of NFTs, you can use `getNftFilters` to receive notifications whenever an NFT is sold on a particular marketplace or exchange. This can help you stay up to date with market trends and fluctuations. - -* **Watching NFT auctions**: Many NFTs are sold through auction houses or bidding platforms. With `getNftFilters`, you can track the progress of NFT auctions in real-time and receive notifications when bids are placed, updated, or withdrawn. - -* **Monitoring NFT metadata changes**: The metadata associated with an NFT can be just as valuable as the NFT itself. With `getNftFilters`, you can track changes to NFT metadata, such as updates to the image or description, and receive notifications when these changes occur. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftmetadata.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftmetadata.mdx deleted file mode 100644 index 0bd4744b..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftmetadata.mdx +++ /dev/null @@ -1,254 +0,0 @@ ---- -title: getNftMetadata - SDK -description: Get the NFT metadata associated with the provided parameters. -subtitle: Get the NFT metadata associated with the provided parameters. -url: https://docs.alchemy.com/reference/sdk-getnftmetadata -slug: reference/sdk-getnftmetadata ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get the NFT metadata associated with the provided parameters. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | Token id of the NFT. | -| `options` | `object` | Options for the request. A null object should still be passed in the params if no options are given for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ---------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `tokenType?` | `object` | Optional field to specify the type of token to speed up the query. Available options include: \[`ERC721` = "ERC721", `ERC1155` = "ERC1155", `UNKNOWN` = "UNKNOWN"] | -| `tokenUriTimeoutInMs?` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to 0. | -| `refreshCache?` | `boolean` | Whether to refresh the metadata for the given NFT token before returning the response. Defaults to false for faster response times. | - -# Response - -| Property | Type | Description | -| -------------- | ------------------ | -------------------------------------------- | -| `Promise` | `array of objects` | An array of objects containing nft metadata. | - -### `Nft` response object parameters - -| Property | Type | Description | -| ----------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `contractDeployer?`: `string` The address that deployed the NFT contract. 2. `name`: `string` The name of the contract. 3. `symbol`: `string` The symbol of the contract. 4. `totalSupply`: `string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 5. `tokenType`: `string` The type of the token in the contract. e.g, `ERC721`, `ERC1155`, `UNKNOWN` } | -| `title` | `string` | The NFT title. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `metadataError` | `string \| undefined` | Holds an error message if there was an issue fetching metadata. | -| `rawMetadata` | `object` | The raw metadata fetched from the metadata URL specified by the NFT. The field is undefined if Alchemy was unable to fetch metadata. | -| `tokenURI` | `object` | URIs for accessing the NFT's metadata blob. | -| `media` | `array` | URIs for accessing the NFT's media assets. | -| `spamInfo` | `object` | Detailed information on why an NFT was classified as spam. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const contractAddress = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - const tokenId = "1590"; - - // call the method - let response = await alchemy.nft.getNftMetadata(contractAddress, tokenId, {}); - - // logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - [ - { - contract: { - address: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', - name: 'BoredApeYachtClub', - symbol: 'BAYC', - totalSupply: '10000', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03', - deployedBlockNumber: 12287507 - }, - tokenId: '3', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-26T08:28:13.584Z', - metadataError: undefined, - rawMetadata: { - image: 'ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3', - raw: 'ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3' - }, - media: [ [Object] ], - spamInfo: undefined - }, - { - contract: { - address: '0x8a90cab2b38dba80c64b7734e58ee1db38b8992e', - name: 'Doodles', - symbol: 'DOODLE', - totalSupply: '10000', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0x2b3ab8e7bb14988616359b78709538b10900ab7d', - deployedBlockNumber: 13430097 - }, - tokenId: '4', - tokenType: 'ERC721', - title: 'Doodle #4', - description: 'A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.', - timeLastUpdated: '2023-02-26T08:28:13.658Z', - metadataError: undefined, - rawMetadata: { - image: 'ipfs://QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm', - name: 'Doodle #4', - description: 'A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://ipfs.io/ipfs/QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4', - raw: 'ipfs://QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4' - }, - media: [ [Object] ], - spamInfo: undefined - } - ] - admin@Admins-MBP Alchem % node index.js - { - contract: { - address: '0x5180db8f5c931aae63c74266b211f580155ecac8', - name: 'Crypto Coven', - symbol: 'WITCH', - totalSupply: undefined, - tokenType: 'ERC721', - openSea: { - floorPrice: 0.124988, - collectionName: 'Crypto Coven', - safelistRequestStatus: 'verified', - imageUrl: 'https://i.seadn.io/gae/E8MVasG7noxC0Fa_duhnexc2xze1PzT1jzyeaHsytOC4722C2Zeo7EhUR8-T6mSem9-4XE5ylrCtoAsceZ_lXez_kTaMufV5pfLc3Fk?w=500&auto=format', - description: "it's the season of the witch. ????", - externalUrl: 'https://www.cryptocoven.xyz/', - twitterUsername: 'crypto_coven', - discordUrl: 'https://discord.gg/cryptocoven', - lastIngestedAt: '2023-02-21T15:08:44.000Z' - }, - contractDeployer: '0xac9d54ca08740a608b6c474e5ca07d51ca8117fa', - deployedBlockNumber: 13547115 - }, - tokenId: '1590', - tokenType: 'ERC721', - title: 'balsa vault', - description: 'You are a WITCH with eyes that hold eons. You write poems filled with charms. Your magic spawns from a few hours of sleep. You arch your back into a bridge between the living and the dead. SHINE!', - timeLastUpdated: '2023-02-26T04:08:28.725Z', - metadataError: undefined, - rawMetadata: { - image: 'https://cryptocoven.s3.amazonaws.com/a7875f5758f85544dcaab79a8a1ca406.png', - external_url: 'https://www.cryptocoven.xyz/witches/1590', - background_color: '', - coven: { - skills: [Object], - name: 'balsa vault', - description: [Object], - styles: [Array], - id: 1590, - type: 'necromancer', - hash: 'a7875f5758f85544dcaab79a8a1ca406', - birthChart: [Object] - }, - name: 'balsa vault', - description: 'You are a WITCH with eyes that hold eons. You write poems filled with charms. Your magic spawns from a few hours of sleep. You arch your back into a bridge between the living and the dead. SHINE!', - attributes: [ - [Object], [Object], [Object], - [Object], [Object], [Object], - [Object], [Object], [Object], - [Object], [Object], [Object], - [Object], [Object], [Object], - [Object], [Object], [Object], - [Object], [Object], [Object], - [Object], [Object], [Object], - [Object], [Object] - ] - }, - tokenUri: { - gateway: 'https://alchemy.mypinata.cloud/ipfs/QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm/1590.json', - raw: 'ipfs://QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm/1590.json' - }, - media: [ - { - gateway: 'https://nft-cdn.alchemy.com/eth-mainnet/d19db83206d00d210696cba9be86f754', - thumbnail: 'https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/d19db83206d00d210696cba9be86f754', - raw: 'https://cryptocoven.s3.amazonaws.com/a7875f5758f85544dcaab79a8a1ca406.png', - format: 'png', - bytes: 2724759 - } - ], - spamInfo: undefined - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftMetadata` function: - -* **Displaying NFT information**: When a user wants to view information about a specific NFT, such as its name, description, image, or other attributes, `getNftMetadata` can be called to retrieve this information from the NFT metadata. - -* **NFT marketplaces**: NFT marketplaces can use `getNftMetadata` to display information about NFTs that are available for sale or auction. This information can help potential buyers make informed decisions about which NFTs to purchase. - -* **Verification**: `getNftMetadata` can be used to verify the authenticity of an NFT. If the metadata associated with an NFT matches the expected values, then it is more likely to be a genuine NFT. - -# Related Methods - -Here are the methods related to `getNftMetadata`: - -* [getNftMetadataBatch](/reference/getnftmetadatabatch-sdk): Gets the NFT metadata for multiple NFT tokens. - -* [searchContractMetadata](/reference/searchcontractmetadata-sdk): Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftmetadatabatch.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftmetadatabatch.mdx deleted file mode 100644 index b3e80ad4..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftmetadatabatch.mdx +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: getNftMetadataBatch - SDK -description: Gets the NFT metadata for multiple NFT tokens. -subtitle: Gets the NFT metadata for multiple NFT tokens. -url: https://docs.alchemy.com/reference/sdk-getnftmetadatabatch -slug: reference/sdk-getnftmetadatabatch ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets the NFT metadata for multiple NFT tokens. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | --------------------------------------------- | -| `tokens` | `array` | An array of NFT tokens to fetch metadata for. | -| `options` | `string` | Configuration options for making the request. | - -# Response - -| Property | Type | Description | -| ----------------- | ------------------ | -------------------------------------------- | -| ` Promise` | `array of objects` | An array of objects containing nft metadata. | - -### ` Nft[]` response object parameters - -| Property | Type | Description | -| ----------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | `object` | The NFT's underlying contract and relevant contract metadata. Parameters in the contract include: 1. `contractDeployer?`: `string` The address that deployed the NFT contract. 2. `name`: `string` The name of the contract. 3. `symbol`: `string` The symbol of the contract. 4. `totalSupply`: `string` The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. 5. `tokenType`: `string` The type of the token in the contract. e.g, `ERC721`, `ERC1155`, `UNKNOWN`. | -| `title` | `string` | The NFT title. | -| `description` | `string` | The NFT description. | -| `timeLastUpdated` | `string` | When the NFT was last updated in the blockchain. Represented in `ISO-8601` format. | -| `metadataError` | `string \| undefined` | Holds an error message if there was an issue fetching metadata. | -| `rawMetadata` | `object` | The raw metadata fetched from the metadata URL specified by the NFT. The field is undefined if Alchemy was unable to fetch metadata. | -| `tokenURI` | `object` | URIs for accessing the NFT's metadata blob. | -| `media` | `array` | URIs for accessing the NFT's media assets. | -| `spamInfo` | `object` | Detailed information on why an NFT was classified as spam. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - - //Call the method - let response = await alchemy.nft.getNftMetadataBatch( - [ - { - contractAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", - tokenId: "3", - tokenType: "ERC721" - }, - { - contractAddress: "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e", - tokenId: "4", - tokenType: "ERC721" - } - ], - { - tokenUriTimeoutInMs: 5000, - refreshCache: true - } - ) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - [ - { - contract: { - address: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', - name: 'BoredApeYachtClub', - symbol: 'BAYC', - totalSupply: '10000', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03', - deployedBlockNumber: 12287507 - }, - tokenId: '3', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-26T08:28:13.584Z', - metadataError: undefined, - rawMetadata: { - image: 'ipfs://QmYxT4LnK8sqLupjbS6eRvu1si7Ly2wFQAqFebxhWntcf6', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3', - raw: 'ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/3' - }, - media: [ [Object] ], - spamInfo: undefined - }, - { - contract: { - address: '0x8a90cab2b38dba80c64b7734e58ee1db38b8992e', - name: 'Doodles', - symbol: 'DOODLE', - totalSupply: '10000', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0x2b3ab8e7bb14988616359b78709538b10900ab7d', - deployedBlockNumber: 13430097 - }, - tokenId: '4', - tokenType: 'ERC721', - title: 'Doodle #4', - description: 'A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.', - timeLastUpdated: '2023-02-26T08:28:13.658Z', - metadataError: undefined, - rawMetadata: { - image: 'ipfs://QmcyuFVLbfBmSeQ9ynu4dk67r97nB1abEekotuVuRGWedm', - name: 'Doodle #4', - description: 'A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://ipfs.io/ipfs/QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4', - raw: 'ipfs://QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/4' - }, - media: [ [Object] ], - spamInfo: undefined - } - ] - ``` - - -# Use Cases - -Here are some use cases for the `getNftMetadataBatch` function: - -* **NFT Marketplaces**: An NFT marketplace is a platform where users can buy and sell NFTs. In such platforms, the `getNftMetadataBatch` function can be used to retrieve metadata for multiple NFTs in a single API call. This can improve the platform's performance and user experience, as users can quickly view information about multiple NFTs at once. - -* **NFT Galleries**: NFT galleries are websites or apps that showcase a collection of NFTs. With `getNftMetadataBatch`, gallery owners can easily retrieve and display metadata for multiple NFTs, making it easier for visitors to browse and explore the collection. - -* **NFT Wallets**: NFT wallets are digital wallets that allow users to store, manage, and trade their NFTs. When users want to view their NFTs, the `getNftMetadataBatch` function can be used to retrieve metadata for all NFTs in the wallet, providing a quick overview of the user's collection. - -# Related Methods - -Here are the methods related to `getNftMetadataBatch`: - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnfts.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnfts.mdx deleted file mode 100644 index a6bcc87e..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnfts.mdx +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: getNftsForOwner - SDK -description: Get all NFTs for an owner. -subtitle: Get all NFTs for an owner. -url: https://docs.alchemy.com/reference/sdk-getnfts -slug: reference/sdk-getnfts ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all NFTs for an owner. - -This method returns the full NFTs in the contract. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------------- | -| `owner` | `string` | The address of the owner. | -| `options` | `string` | The optional parameters to use for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ---------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contractAddresses?` | `array of strings` | Optional list of contract addresses to filter the results by. Limit is 45. | -| `omitMetadata?` | `boolean` | Optional boolean flag to omit NFT metadata. Defaults to `false`. | -| `excludeFilters?` | `string` | Optional list of filters applied to the query. NFTs that match one or more of these filters are excluded from the response. Available options include: `SPAM`, `AIRDROPS`. | -| `includeFilters?` | `string` | Optional list of filters applied to the query. NFTs that match one or more of these filters are included in the response. Available options include: `SPAM`, `AIRDROPS`. | -| `pageSize?` | `number` | Sets the total number of NFTs to return in the response. Defaults to **100**. Maximum page size is **100**. | -| `tokenUriTimeoutInMs?` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live to fetch any metadata for cache misses then set this value to `0`. | -| `orderBy?` | `string` | Order in which to return results. By default, results are ordered by contract address and token ID in lexicographic order. The available option is `TRANSFERTIME`. | -| `pageKey?` | string | Optional page key to use for pagination. | - -# Response - -| Property | Type | Description | -| ---------------------------- | -------- | -------------------------------------------- | -| `Promise` | `object` | An object containing nfts owned by an owner. | - -### `Promise` object parameters - -| Property | Type | Description | -| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ownedNfts` | `array` | The NFTs owned by the provided address. The sub-property of the `ownedNfts` object are: 1. `contract`: The contract object detailing the specifics of the contract for the returned NFT. 2. `tokenId`: The unique identifier of the token. This could be in hexadecimal or decimal format. 3. `tokenType`: This defines the standard of the token. Valid types include 'ERC721' and 'ERC1155'. If the input contract address doesn't support a known NFT standard, the error will be 'NO\_SUPPORTED\_NFT\_STANDARD', or 'NOT\_A\_CONTRACT' if there is no contract deployed at the input address. 4. `title`: This is the name of the NFT asset. 5. `description`: A brief human-readable description of the NFT asset. 6. `timeLastUpdated`: The ISO timestamp of the last cache refresh for the information returned in the metadata field. 7. `metadataError`: A string describing a particular reason that the API was unable to fetch complete metadata for the NFT. 8. `rawMetadata`: The unparsed metadata of the NFT. 9. `tokenUri`: The URI representing the location of the NFT's original metadata blob. 10. `media`: Array of objects holding information about the media assets related to this NFT. 11. `spamInfo`: Object containing information regarding whether the NFT is classified as spam or not. 12. `balance`: The token balance indicating how many units of this NFT the owner holds. 13. `acquiredAt`: Object representing the time and block number when the NFT was most recently acquired ( Only available when specifying `orderBy = TRANSFERTIME` in the request ) - `blockTimestamp`: The timestamp of the block where the NFT was most recently acquired. - `blockNumber`: The number of the block where the NFT was most recently acquired. | -| `pageKey?` | `string` | Pagination token that can be passed into another request to fetch the next NFTs. If there is no page key, then there are no more NFTs to fetch. | -| `totalCount` | `number` | The total count of NFTs owned by the provided address. | -| `blockHash` | `string` | The canonical head block hash of when your request was received. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let owner = "vitalik.eth"; - - //Call the method to get the nfts owned by this address - let response = await alchemy.nft.getNftsForOwner(owner) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - { - contract: [Object], - tokenId: '338', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-25T23:46:06.986Z', - metadataError: undefined, - rawMetadata: {}, - tokenUri: [Object], - media: [], - spamInfo: [Object], - balance: 1 - }, - { - contract: [Object], - tokenId: '13581', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-26T06:49:04.094Z', - metadataError: 'Failed to get token uri', - rawMetadata: [Object], - tokenUri: undefined, - media: [], - spamInfo: [Object], - balance: 1 - }, - { - contract: [Object], - tokenId: '25187', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-02-26T06:49:04.083Z', - metadataError: 'Failed to get token uri', - rawMetadata: [Object], - tokenUri: undefined, - media: [], - spamInfo: [Object], - balance: 1 - } - ], - pageKey: 'MHgyMDg2ZjZmOTE2YTZiZjIyOTIwY2I5YjI4ZmM0MTE5Y2UyNDVkZmY0OjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNjI2MzpmYWxzZQ==', - totalCount: 586, - blockHash: '0x9d03a75a889ed722b3c6a15a12d2dca7dafaaae29055f4dee3800175898c3657' - } - ``` - - -# Use Cases - -The `getNftsForOwner` method can be used to retrieve information about non-fungible tokens (NFTs) owned by a specific address. Some possible use cases for this method include: - -* **Displaying NFTs owned by a user**: DApps or marketplaces that display a user's NFT collection can use the `getNftsForOwner` method to retrieve information about the NFTs owned by a specific address. This can be useful for providing a customized view of a user's NFTs and allowing them to easily manage their collection. - -* **Tracking NFT ownership**: The `getNftsForOwner` method can be used to track the ownership of specific NFTs over time. This can be useful for tracking the ownership history of rare or valuable NFTs and verifying the authenticity of ownership claims. - -* **Verifying ownership in a smart contract**: Smart contracts that require ownership of specific NFTs as a condition for executing certain functions can use the `getNftsForOwner` method to verify that a user owns the required NFTs. - -# Related Methods - -Here are the methods related to `getNftsForOwner`: - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsales.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsales.mdx deleted file mode 100644 index fc1b6429..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsales.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: getNftSales - SDK -description: Returns NFT sales that have happened through on-chain marketplaces. -subtitle: Returns NFT sales that have happened through on-chain marketplaces. -url: https://docs.alchemy.com/reference/sdk-getnftsales -slug: reference/sdk-getnftsales ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns NFT sales that have happened through on-chain marketplaces. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------------- | -| `options` | `object` | The optional parameters to use for the request. | - -### `options` parameters - -| parameter | type | description | -| --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fromBlock` | `number` | The block number to start fetching NFT sales data from, i.e.,`latest`. | -| `toBlock` | `number` | The block number limit to fetch NFT sales data from, i.e.,`latest` | -| `order` | `string` | Whether to return the results in ascending or descending order by block number. ASCENDING = `asc`, DESCENDING = `desc`. | -| `marketplace` | `string` | The NFT marketplace to filter sales by. Examples are \[SEAPORT = `seaport`, LOOKSRARE = `looksrare`, X2Y2 = `x2y2`, WYVERN' = `wyvern`, 'CRYPTOPUNKS' = `cryptopunks`, UNKNOWN = `unknown` | -| `buyerAddress` | `string` | The address of the NFT buyer to filter sales by. | -| `sellerAddress` | `string` | The address of the NFT seller to filter sales by. | -| `taker` | `string` | Filter by whether the buyer or seller was the taker in the NFT trade. Defaults to returning both buyer and seller taker trades. Available options are: \[ BUYER = `buyer`, SELLER = `seller`]. | -| `limit` | `number` | The maximum number of NFT sales to return. | -| `pageKey` | `string` | Key for pagination to use to fetch results from the next page if available. | - -# Response - -| Property | Type | Description | -| ------------------------------ | ------ | ----------------------------------------------------------------------- | -| `Promise` | object | Returns the NFT sales that have happened through on-chain marketplaces. | - -### `Promise` object parameters - -| Property | Type | Description | -| ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `nftSales` | `object` | List of NFT sales that match the query. | -| `validAt` | `object` | Block Information of the block as of which the corresponding data is valid. Includes the following properties: - `blockNumber`: The block number the sale information is valid at. - `blockHash`: The block hash. Used to detect reorgs. - `blockTimestamp`: The timestamp for the block. | -| `pageKey` | `string` | The page key to use to fetch the next page if more results are available. | - -### `nftSales` parameters - -| Parameter | Type | Description | -| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `marketplace` | `string` | The marketplace the sale took place on. Currently tracked marketplaces are Seaport, Looksrare, X2Y2, Wyvern, Blur and Cryptopunks. For all other marketplaces this field is unknown. | -| `contractAddress` | `string` | The NFT contract address. | -| `tokenId` | `string` | The decimal token ID of the NFT being sold. | -| `quantity` | `string` | The number of tokens sold in the sale as a decimal integer string. | -| `buyerAddress` | `string` | The address of the buyer in the NFT sale. | -| `sellerAddress` | `string` | The address of the seller in the NFT sale. | -| `taker` | `string` | Whether the price taker in the trade was the buyer or the seller. | -| `sellerFee` | `object` | The payment from buyer to the seller. The parameters in this object incude: `amount`: *string*, `symbol`: *string*, `decimals`: *number*, `decimal` ( deprecated ): *number* | -| `protocolFee` | `object` | The payment from buyer to the marketplace. The parameters in this object include: `amount`: *string*, `symbol`: *string*, `decimals`: *number*, `decimal`( deprecated ): *number*. | -| `royaltyFee` | `object` | The payment from buyer to the royalty address of the NFT collection. The parameters in this object incude: `amount`: *string*, `symbol`: *string*, `decimals`: *number*, `decimal`( deprecated ): *number*. | -| `blockNumber` | `number` | The block number the NFT sale took place in. | -| `logIndex` | `number` | The log number of the sale event emitted within the block. | -| `bundleIndex` | `number` | The index of the token within the bundle of NFTs sold in the sale. | -| `transactionHash` | `string` | The transactionHash of the NFT sale. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return the nft sales data - const response = await alchemy.nft.getNftSales() - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - "nftSales": [ - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "544", - "quantity": "1", - "buyerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f", - "sellerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a", - "taker": "seller", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919706, - "logIndex": 25, - "bundleIndex": 0, - "transactionHash": "0xb28b5f2c186bf534e4fc4b8604b1496c9632e42269424f70ef1bdce61ea8ba52" - }, - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "3134", - "quantity": "1", - "buyerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a", - "sellerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f", - "taker": "buyer", - "sellerFee": { - "amount": "10000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919721, - "logIndex": 9, - "bundleIndex": 0, - "transactionHash": "0x65579455ac3227e7b3db72b4e359e988bb16cae6d26c88818d1a6991b478b274" - }, - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "5056", - "quantity": "1", - "buyerAddress": "0x00bd9fd57c423a1b1c969823d409156d90974d77", - "sellerAddress": "0xc352b534e8b987e036a93539fd6897f53488e56a", - "taker": "buyer", - "sellerFee": { - "amount": "100000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 3919847, - "logIndex": 35, - "bundleIndex": 0, - "transactionHash": "0xd79cca9282c06a0edb8f9426aae734119f0f2ed0d9683dfe3723dc7814f5fccd" - }, - { - "marketplace": "cryptopunks", - "contractAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", - "tokenId": "5719", - "quantity": "1", - "buyerAddress": "0x00bd3a6660309fb9e0129b9b777a9ccb9c2869dc", - "sellerAddress": "0x5b098b00621eda6a96b7a476220661ad265f083f", - "taker": "buyer", - "sellerFee": { - "amount": "40000000000000000", - "tokenAddress": "0x0000000000000000000000000000000000000000", - "symbol": "ETH", - "decimals": 18 - }, - "marketplaceFee": {}, - "protocolFee": {}, - "royaltyFee": {}, - "blockNumber": 4367925, - "logIndex": 71, - "bundleIndex": 0, - "transactionHash": "0xe6e1885bd2dd142c63b79df6aca0ad3213e37c3a9f01a550c30fa1b234d3c7f2" - } - ], - "validAt": { - "blockNumber": 17736688, - "blockHash": "0x09c001045ba91210c239bf53948ce23329306cd64fe9c1618d6b9459ff283817", - "blockTimestamp": "2023-07-20T20:13:35Z" - }, - "pageKey": "NDM2ODAyNSw3Miww" - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftSales` method: - -* **NFT market analysis**: By using `getNftSales`, users can retrieve data about the sales of various NFTs on the blockchain network. This data can be used to analyze market trends and understand the popularity of specific NFTs. This information can be used by investors and traders to make informed decisions about buying or selling NFTs. - -* **Royalty calculation**: NFTs often include royalty clauses that enable creators to receive a percentage of the sale price every time the NFT is sold. `getNftSales` can be used to retrieve information about all the sales of a specific NFT, allowing creators to calculate their royalty payments accurately. - -* **Proof of ownership**: `getNftSales` can be used to verify the ownership of an NFT by checking the history of its sales. This can be helpful in cases where the ownership of an NFT is disputed or when verifying the authenticity of an NFT. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforcontract.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforcontract.mdx deleted file mode 100644 index f74f0697..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforcontract.mdx +++ /dev/null @@ -1,242 +0,0 @@ ---- -title: getNftsForContract - SDK -description: Get all NFTs for a given contract address. This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the options parameter. -subtitle: Get all NFTs for a given contract address. This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the options parameter. -url: https://docs.alchemy.com/reference/sdk-getnftsforcontract -slug: reference/sdk-getnftsforcontract ---- - -Get all NFTs for a given contract address. - -This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the `options` parameter. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get all NFTs for a given contract address. - -This method returns the full NFTs in the contract. To get all NFTs without their associated metadata, use the `options` parameter. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT contract. | -| `options` | `object` | The parameters to use for the request. | - -#### `options` parameters - -| Property | Type | Description | -| --------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageKey?` | `string` | Optional page key from an existing `OwnedBaseNftsResponse` or `OwnedNftsResponse` to use for pagination. | -| `pageSize` | `number` | Sets the total number of NFTs to return in the response. Defaults to 100. Maximum page size is **100**. | -| `omniMetadata` | `boolean` | `Optional` boolean flag to omit NFT metadata. Defaults to `false`. | -| `tokenUriTimeoutInMs` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to `0`. | - -# Response - -| Property | Type | Description | -| ---------------------------------- | -------- | ------------------------- | -| `Promise` | `object` | The NFTs for the contract | - -### `NftContractNftsResponse` object parameters - -| Property | Type | Description | -| --------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | `array of strings` | An array of NFTs with metadata. | -| `pageKey` | `string` | Pagination token that can be passed into another request to fetch the next NFTs. If there is no page key, then there are no more NFTs to fetch. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address whose NFTs you want to fetch - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch metadata - const response = await alchemy.nft.getNftsForContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - [ - { - contract: [Object], - tokenId: '345', - tokenType: 'ERC1155', - title: 'Undead Warrior #345', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:14.728Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '346', - tokenType: 'ERC1155', - title: 'Undead Warrior #346', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:15.998Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '347', - tokenType: 'ERC1155', - title: 'Undead Warrior #347', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:17.183Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '348', - tokenType: 'ERC1155', - title: 'Undead Warrior #348', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:19.944Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '349', - tokenType: 'ERC1155', - title: 'Undead Warrior #349', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:21.174Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '350', - tokenType: 'ERC1155', - title: 'Undead Warrior #350', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:22.455Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '351', - tokenType: 'ERC1155', - title: 'Undead Warrior #351', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:23.755Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '352', - tokenType: 'ERC1155', - title: 'Undead Warrior #352', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-12T22:59:29.229Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - }, - { - contract: [Object], - tokenId: '353', - tokenType: 'ERC1155', - title: 'Undead Warrior #353', - description: 'Undead Warriors are a collection of NFTs powered by the Undead Coin (UDC) battling the most difficult challenges in the E-Gaming and Web 3 space.', - timeLastUpdated: '2023-02-04T14:55:26.213Z', - metadataError: undefined, - rawMetadata: [Object], - tokenUri: [Object], - media: [Array], - spamInfo: undefined - } - ], - pageKey: '0x0162' - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftsForContract` method: - -* **NFT marketplace integration**: An NFT marketplace could use the `getNftsForContract` method to display all the NFTs associated with a particular contract address. This would allow users to easily browse and search for NFTs on the marketplace. - -* **Portfolio tracking**: NFT collectors or investors could use the `getNftsForContract` method to track their NFT holdings associated with a specific contract address. This could be particularly useful for investors who are interested in tracking the performance of specific NFT projects or creators. - -* **Gaming applications**: Gaming applications that use NFTs could use the `getNftsForContract` method to retrieve all the NFTs associated with a particular game or game studio. This could help developers create more immersive gaming experiences and reward players with unique NFTs for their in-game achievements. - -# Related Methods - -* [getNftsForContractIterator](/reference/getnftsforcontractiterator-sdk): Fetches all NFTs for a given contract address and yields them in an async iterable. - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforcontractiterator.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforcontractiterator.mdx deleted file mode 100644 index c060ea68..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforcontractiterator.mdx +++ /dev/null @@ -1,205 +0,0 @@ ---- -title: getNftsForContractIterator -SDK -description: Fetches all NFTs for a given contract address and yields them in an async iterable. This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. -subtitle: Fetches all NFTs for a given contract address and yields them in an async iterable. This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. -url: https://docs.alchemy.com/reference/sdk-getnftsforcontractiterator -slug: reference/sdk-getnftsforcontractiterator ---- - -Fetches all NFTs for a given contract address and yields them in an async iterable. - -This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Fetches all NFTs for a given contract address and yields them in an async iterable. - -This method returns the full NFTs in the contract and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the `options` parameter in the body of the request. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT contract. | -| `options` | `object` | The optional parameters to use for the request. | - -### `options` parameters - -| Property | Type | Description | -| --------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageKey?` | `string` | Optional page key from an existing `OwnedBaseNftsResponse` or `OwnedNftsResponse` to use for pagination. | -| `pageSize?` | `number` | Sets the total number of NFTs to return in the response. Defaults to 100. Maximum page size is **100**. | -| `omniMetadata?` | `boolean` | Optional boolean flag to omit NFT metadata. Defaults to `false`. | -| `tokenUriTimeoutInMs` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to `0`. | - -# Response - -| Property | Type | Description | -| -------------------- | -------- | ------------------------- | -| `AsyncIterable` | `object` | The NFTs for the contract | - -### `AsyncIterable - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address whose NFTs you want to fetch - const contractAddress = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - // create an async generator function that uses the getNftsForContractIterator method - async function getNftsForContract() { - try { - let nfts = []; - // Get the async iterable for the contract's NFTs. - const nftsIterable = alchemy.nft.getNftsForContractIterator(contractAddress); - - // Iterate over the NFTs and add them to the nfts array. - for await (const nft of nftsIterable) { - nfts.push(nft); - } - - // Log the NFTs. - console.log(nfts); - } catch (error) { - console.log(error); - } - } - - // call the async generator function - getNftsForContract(); - - }; - - main(); - ``` - - -## Response - - - ```shell shell - [ - { - contract: { - address: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', - name: 'BoredApeYachtClub', - symbol: 'BAYC', - totalSupply: '10000', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03', - deployedBlockNumber: 12287507 - }, - tokenId: '98', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-03-02T17:33:56.703Z', - metadataError: undefined, - rawMetadata: { - image: 'ipfs://Qma1kbYN4LzAK9XvQUNJ6nf79iAd3dM6K87ivm8oLrisVV', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://alchemy.mypinata.cloud/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/98', - raw: 'ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/98' - }, - media: [ [Object] ], - spamInfo: undefined - }, - { - contract: { - address: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', - name: 'BoredApeYachtClub', - symbol: 'BAYC', - totalSupply: '10000', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03', - deployedBlockNumber: 12287507 - }, - tokenId: '99', - tokenType: 'ERC721', - title: '', - description: '', - timeLastUpdated: '2023-03-02T17:33:56.457Z', - metadataError: undefined, - rawMetadata: { - image: 'ipfs://QmWiXSKwbwHkobDdZbDc6t66kf192P33Ru5UJYhL5mPJTk', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://alchemy.mypinata.cloud/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/99', - raw: 'ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/99' - }, - media: [ [Object] ], - spamInfo: undefined - }, - ... 9900 more items - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftsForContractIterator` method: - -* **Marketplace platforms**: Marketplace platforms that enable buying and selling of NFTs often require the ability to search for specific NFTs based on contract addresses. The `getNftsForContractIterator` method can be used to retrieve all NFTs associated with a given contract, allowing users to browse and search for NFTs from a particular collection. - -* **Wallet applications**: Wallet applications that support NFTs may need to display all the NFTs owned by a user for a particular contract. The `getNftsForContractIterator` method can be used to retrieve all NFTs associated with a specific contract that is owned by a given address. - -* **NFT explorer tools**: NFT explorer tools allow users to browse and search for NFTs on the blockchain. These tools often require the ability to query the blockchain for NFTs associated with a specific contract. The `getNftsForContractIterator` method can be used to retrieve all NFTs associated with a given contract, which can then be displayed and searched through an explorer tool. - -Overall, `getNftsForContractIterator` is a useful method for any application that involves querying the blockchain for NFTs associated with a particular contract. - -# Related Methods - -* [getNftsForOwnerIterator](/reference/getnftsforowneriterator-sdk): Fetches all NFTs for a given owner and yields them in an async iterable. - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforowneriterator.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforowneriterator.mdx deleted file mode 100644 index d3285608..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getnftsforowneriterator.mdx +++ /dev/null @@ -1,246 +0,0 @@ ---- -title: getNftsForOwnerIterator - SDK -description: Fetches all NFTs for a given owner and yields them in an async iterable. This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the options parameter in the body of the request. -subtitle: Fetches all NFTs for a given owner and yields them in an async iterable. This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the options parameter in the body of the request. -url: https://docs.alchemy.com/reference/sdk-getnftsforowneriterator -slug: reference/sdk-getnftsforowneriterator ---- - -Fetches all NFTs for a given owner and yields them in an async iterable. - -This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the `options` parameter in the body of the request. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Fetches all NFTs for a given owner and yields them in an async iterable. - -This method returns the full NFT for the owner and pages through all page keys until all NFTs have been fetched. To get all NFTs without their associated metadata, use the `options` parameter in the body of the request. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------------- | -| `owner` | `string` | The owner of the address. | -| `options` | `object` | The optional parameters to use for the request. | - -### `options` parameters - -| Property | Type | Description | -| --------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pageKey?` | `string` | Optional page key from an existing `OwnedBaseNftsResponse` or `OwnedNftsResponse` to use for pagination. | -| `contractAddresses` | `array of strings` | Optional list of contract addresses to filter the results by. Limit is `20`. | -| `excludeFilters` | `array of strings` | Optional list of filters applied to the query. NFTs that match one or more of these filters are excluded from the response. | -| `includeFilters` | `array of strings` | Optional list of filters applied to the query. NFTs that match one or more of these filters are included in the response. | -| ` pageSize` | number\` | Sets the total number of NFTs to return in the response. Defaults to 100. Maximum page size is **100**. | -| `omniMetadata` | `boolean` | Optional boolean flag to omit NFT metadata. Defaults to `false`. | -| `tokenUriTimeoutInMs` | `number` | No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to `0`. | -| `orderBy` | `string` | Order in which to return results. By default, results are ordered by contract address and token ID in lexicographic order. `TRANSFERTIME` = "TRANSFERTIME" | - -# Response - -| Property | Type | Description | -| ------------------------- | -------- | -------------------------------------------- | -| `AsyncIterable` | `object` | An object containing nfts owned by an owner. | - -### \``AsyncIterable` object properties - -| Property | Type | Description | -| ----------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ownedNfts` | `array` | The NFTs owned by the provided address. The sub-property of the `ownedNft` object are: 1. `contract`: The contract object detailing the specifics of the contract for the returned NFT. 2. `tokenId`: The unique identifier of the token. This could be in hexadecimal or decimal format. 3. `tokenType`: This defines the standard of the token. Valid types include 'ERC721' and 'ERC1155'. If the input contract address doesn't support a known NFT standard, the error will be 'NO\_SUPPORTED\_NFT\_STANDARD', or 'NOT\_A\_CONTRACT' if there is no contract deployed at the input address. 4. `title`: This is the name of the NFT asset. 5. `description`: A brief human-readable description of the NFT asset. 6. `timeLastUpdated`: The ISO timestamp of the last cache refresh for the information returned in the metadata field. 7. `metadataError`: A string describing a particular reason that the API was unable to fetch complete metadata for the NFT. 8. `rawMetadata`: The unparsed metadata of the NFT. 9. `tokenUri`: The URI representing the location of the NFT's original metadata blob. 10. `media`: Array of objects holding information about the media assets related to this NFT. 11. `spamInfo`: Object containing information regarding whether the NFT is classified as spam or not. 12. `balance`: The token balance indicating how many units of this NFT the owner holds. 13. `acquiredAt`: Object representing the time and block number when the NFT was most recently acquired ( Only available when specifying `orderBy = TRANSFERTIME` in the request ) - `blockTimestamp`: The timestamp of the block where the NFT was most recently acquired. - `blockNumber`: The number of the block where the NFT was most recently acquired. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the owner address whose NFTs you want to fetch - const owner = "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8"; - - // create an async generator function that uses the getNftsForOwnerIterator method - async function getNftsForOwner() { - try { - let nfts = []; - // Get the async iterable for the owner's NFTs. - const nftsIterable = alchemy.nft.getNftsForOwnerIterator(owner); - - // Iterate over the NFTs and add them to the nfts array. - for await (const nft of nftsIterable) { - nfts.push(nft); - } - - // Log the NFTs. - console.log(nfts); - } catch (error) { - console.log(error); - } - } - - getNftsForOwner(); - }; - - main(); - ``` - - -## Response - - - ```shell shell - [ - { - contract: { - address: '0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734', - name: 'Elephants', - symbol: 'ELENFT', - totalSupply: '7778', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8', - deployedBlockNumber: 15140845 - }, - tokenId: '3990', - tokenType: 'ERC721', - title: '3L3PHANTS #3990', - description: '3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time', - timeLastUpdated: '2023-02-28T17:51:29.181Z', - metadataError: undefined, - rawMetadata: { - name: '3L3PHANTS #3990', - description: '3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time', - image: 'ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg', - attributes: [Array] - }, - tokenUri: { - gateway: 'https://alchemy.mypinata.cloud/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990', - raw: 'ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990' - }, - media: [ [Object] ], - spamInfo: undefined, - balance: 1 - }, - { - contract: { - address: '0xd4307e0acd12cf46fd6cf93bc264f5d5d1598792', - name: 'Base, Introduced', - symbol: 'BASEINTRODUCED', - totalSupply: '373715', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0x2ea881cecb8b79686a2971c9926e1f92b906b63c', - deployedBlockNumber: 16691530 - }, - tokenId: '59725', - tokenType: 'ERC721', - title: 'Base, Introduced 59725', - description: 'Meet Base, an Ethereum L2 that offers a secure, low-cost, developer-friendly way for anyone, anywhere, to build decentralized apps.\n' + - '\n' + - 'For the next 5 days, we’ll be evolving the artwork to tell the story of the builders who will help us bring 1B+ people onchain. Check your NFT for the latest evolution every day at 12p ET until 3/6.\n' + - '\n' + - 'Today, we’re telling the story of collaboration. Base is made possible by all of us working together to build an open and decentralized future.\n' + - '\n' + - 'Mint ‘Base, Introduced’ to celebrate the testnet launch and join the broader Base community. We’re excited to build Base together with you.', - timeLastUpdated: '2023-02-28T17:51:19.977Z', - metadataError: undefined, - rawMetadata: { - name: 'Base, Introduced 59725', - description: 'Meet Base, an Ethereum L2 that offers a secure, low-cost, developer-friendly way for anyone, anywhere, to build decentralized apps.\n' + - '\n' + - 'For the next 5 days, we’ll be evolving the artwork to tell the story of the builders who will help us bring 1B+ people onchain. Check your NFT for the latest evolution every day at 12p ET until 3/6.\n' + - '\n' + - 'Today, we’re telling the story of collaboration. Base is made possible by all of us working together to build an open and decentralized future.\n' + - '\n' + - 'Mint ‘Base, Introduced’ to celebrate the testnet launch and join the broader Base community. We’re excited to build Base together with you.', - image: 'ipfs://bafybeiabs6thetplku4hykmcxbzzmqfbkizbflyvwiawbyubam6czl2h7i', - properties: [Object] - }, - tokenUri: { - gateway: '', - raw: 'data:application/json;base64,eyJuYW1lIjogIkJhc2UsIEludHJvZHVjZWQgNTk3MjUiLCAiZGVzY3JpcHRpb24iOiAiTWVldCBCYXNlLCBhbiBFdGhlcmV1bSBMMiB0aGF0IG9mZmVycyBhIHNlY3VyZSwgbG93LWNvc3QsIGRldmVsb3Blci1mcmllbmRseSB3YXkgZm9yIGFueW9uZSwgYW55d2hlcmUsIHRvIGJ1aWxkIGRlY2VudHJhbGl6ZWQgYXBwcy5cblxuRm9yIHRoZSBuZXh0IDUgZGF5cywgd2XigJlsbCBiZSBldm9sdmluZyB0aGUgYXJ0d29yayB0byB0ZWxsIHRoZSBzdG9yeSBvZiB0aGUgYnVpbGRlcnMgd2hvIHdpbGwgaGVscCB1cyBicmluZyAxQisgcGVvcGxlIG9uY2hhaW4uIENoZWNrIHlvdXIgTkZUIGZvciB0aGUgbGF0ZXN0IGV2b2x1dGlvbiBldmVyeSBkYXkgYXQgMTJwIEVUIHVudGlsIDMvNi5cblxuVG9kYXksIHdl4oCZcmUgdGVsbGluZyB0aGUgc3Rvcnkgb2YgY29sbGFib3JhdGlvbi4gQmFzZSBpcyBtYWRlIHBvc3NpYmxlIGJ5IGFsbCBvZiB1cyB3b3JraW5nIHRvZ2V0aGVyIHRvIGJ1aWxkIGFuIG9wZW4gYW5kIGRlY2VudHJhbGl6ZWQgZnV0dXJlLlxuXG5NaW50IOKAmEJhc2UsIEludHJvZHVjZWTigJkgdG8gY2VsZWJyYXRlIHRoZSB0ZXN0bmV0IGxhdW5jaCBhbmQgam9pbiB0aGUgYnJvYWRlciBCYXNlIGNvbW11bml0eS4gV2XigJlyZSBleGNpdGVkIHRvIGJ1aWxkIEJhc2UgdG9nZXRoZXIgd2l0aCB5b3UuIiwgImltYWdlIjogImlwZnM6Ly9iYWZ5YmVpYWJzNnRoZXRwbGt1NGh5a21jeGJ6em1xZmJraXpiZmx5dndpYXdieXViYW02Y3psMmg3aSIsICJwcm9wZXJ0aWVzIjogeyJudW1iZXIiOiA1OTcyNSwgIm5hbWUiOiAiQmFzZSwgSW50cm9kdWNlZCJ9fQ==' - }, - media: [ [Object] ], - spamInfo: undefined, - balance: 1 - }, - { - contract: { - address: '0xea67b4dd7bacae340bc4e43652044b5cded1963c', - name: 'Moonkys', - symbol: 'MOONK', - totalSupply: '8966', - tokenType: 'ERC721', - openSea: [Object], - contractDeployer: '0x94f65107eb422c67e61588682fcf9d85aac940b8', - deployedBlockNumber: 14045176 - }, - tokenId: '2378', - tokenType: 'ERC721', - title: 'Moonky #2378', - description: 'A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.', - timeLastUpdated: '2023-02-28T17:51:26.990Z', - metadataError: undefined, - rawMetadata: { - name: 'Moonky #2378', - description: 'A collection of 9000 randomly generated Moonkys, living on ETH Blockchain. All different, All endearing.', - image: 'https://ipfs.io/ipfs/QmRmquSbLpiYRd8nCURUmP2fJ9LbaEtG3tJLGGscFp1WAT', - attributes: [Array], - external_link: 'https://www.moonkys.art' - }, - tokenUri: { - gateway: 'https://api.moonkys.art/meta/2378', - raw: 'https://api.moonkys.art/meta/2378' - }, - media: [ [Object] ], - spamInfo: undefined, - balance: 1 - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getNftsForOwnerIterator` method: - -* **NFT marketplace platforms**: NFT marketplace platforms can use this method to retrieve a list of all NFTs owned by a user and display them on the user's profile page. This can help users keep track of their NFTs and also make it easier for them to sell or trade their NFTs on the platform. - -* **Asset management**: Companies or individuals who own a large number of NFTs can use this function to keep track of their assets on the blockchain. They can use this function to retrieve a list of all the NFTs they own and their corresponding metadata. - -* **Gaming platforms**: Gaming platforms that use NFTs as in-game assets can use this function to retrieve a list of all NFTs owned by a player's account. This can be useful for players to keep track of their in-game assets and also for game developers to design games around NFT ownership. - -# Related Methods - -* [getNftsForContractIterator](/reference/getnftsforcontractiterator-sdk): Fetches all NFTs for a given contract address and yields them in an async iterable. - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getownersforcontract.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getownersforcontract.mdx deleted file mode 100644 index 479fbfe9..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getownersforcontract.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: getOwnersForContract - SDK -description: Gets all the owners for a given NFT contract along with the token balance. -subtitle: Gets all the owners for a given NFT contract along with the token balance. -url: https://docs.alchemy.com/reference/sdk-getownersforcontract -slug: reference/sdk-getownersforcontract ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets all the owners for a given NFT contract along with the token balance. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `contractAddress` | `string` | The NFT contract to get the owners for. | -| `options` | `object` | Optional parameters to use for the request. | - -### `options` parameters - -| Parameter | Type | Description | -| ------------------- | --------- | ---------------------------------------------------------------------------------------------------- | -| `withTokenBalances` | `boolean` | Whether to include the token balances per token id for each owner. Defaults to `false` when omitted. | -| `pageKey?` | `string` | `Optional` page key to paginate the next page for large requests. | - -# Response - -| Property | Type | Description | -| ------------------------------------------------------------------------------------------------ | -------- | ---------------------------------------------- | -| `Promise / Promise` | `object` | An object containing the owners of a contract. | - -### `GetOwnersForContractResponse` parameters - -| Property | Type | Description | -| ---------- | ------------------ | ----------------------------------------------------------------------------------- | -| `owner` | `array of strings` | An array of owner addresses for the provided contract address. | -| `pageKey?` | `string` | `Optional` Page key that is returned when a collection has more than 50,000 owners. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x61fce80d72363b731425c3a2a46a1a5fed9814b2"; - - //Call the method to fetch the owners for the contract - const response = await alchemy.nft.getOwnersForContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - owners: [ - '0x001a61213d72f2f3c95ff743c80f472749ab8ad3', - '0x003a1acce28eb335f3ff1e93a5b09cd4b598ef62', - '0x00614efd868dabb5f92e15b0440d1f85ac0f9be1', - '0x006f48d6ed87efd9e0bc56cc7a8703d0455c2858', - '0x008b7903f1f0b825636739c7a3defb7eebc94f1d', - '0x008c79f10cbd14070b106b05d5fd494e084ee8a5', - '0x037fc3f7f58771cbcc4c32327814769fbf5a8f3f', - '0x038080b8bf89847ca926f9731695859d9c55a4c6', - '0x03ce01608bf011fdd2b5e81a5c72bb709474e58f', - '0x042b19ed48bb70b8e81ac4211a5c9e931a67c9ec', - '0x0453666dd9e1a17f8b38cea6d2b9189546263572', - '0x047781fd846091ad98efbe64113610d3336c28a7', - '0x048299c13f35f13cc465aa787e34e7b5730e037f', - '0x04a97c45d5606004231181a472849bcd4f42653a', - '0x04d518bb2ca20b5a44f7db207c097289cdb7073b', - '0x051c78b4dcbc271f2a5b96a4dd392cafbdf8b8e0', - '0x053b009f1a0839e73d041c45355182518fe2a39b', - '0x054dc6bde8cf7f912ee4659e2186375d624c1f69', - '0x0585363ba152d19b7fb72b889fb9a7cdb82087f1', - '0x058abdd94dfd4d20f12ee25acc05fcdb4378051c', - '0x05ad2d2a45961ba4e2eab0325f6977b5a2eca86d', - '0x05ad4be7fd4d68433df73b9e9a862b0c1e3bfe2b', - '0x05c3b4c3e551c20aea7c32dc6f914ab0c86746a0', - '0x05d25b0d23093b2b49185a8bf218a0baf9433d0b', - '0x05f98985d33976bd1a7d46e24e7ec66325366a2e', - '0x063d42b01090cd51783b73ed9fec16d8b4f87567', - '0x064823ec7b68ee7954d366c7f0fa5dceb18774ea', - '0x0653bff77a1874f9cbc9bb1ab421af0facc6a0e8', - '0x0abbd7ac101013d399e0bdb2fa51aef640713787', - '0x0ac12fdf2575f15e7c50a2696578534c0070c86d', - '0x0ad400e573165902d18c80c32eb8a288c656234f', - '0x0afcde756f48b71b590e75dfe5077b04ce547420', - '0x0b14d39408fac8e4402f1758ef9a5e6098fc5afe', - '0x0b221773b43c02381eddfbff3811a32868d24175', - '0x0b282b5b1c6a476d53035168a869cc8a8b6bcb23', - '0x0b384d3b3e27d2a12dfb2644e421b6ae16872a82', - '0x0b469c12c2d37192ea91a0c81c5f7839eed5ab79', - '0x0b4d4723c39bee4eb163ce6584044750c6c8428c', - '0x0b6b82f3360d57561268545fb3ad8d30f9e60277', - '0x0b79ad573555c0f33543cf1b235da24d948ed04f', - '0x0ba01e04f7545bbfc3ab20aa8ee91722fea0a217', - ... 1980 more items - ] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getOwnersForContract` function: - -* **Portfolio tracking**: The `getOwnersForContract` method can be used to track a user's portfolio of NFTs from a specific contract. This information can be used to display the user's NFT holdings and their current market value. - -* **Marketplace analytics**: NFT marketplaces can use the `getOwnersForContract` method to analyze the ownership distribution of NFTs from a particular contract. This information can be used to identify trends and inform marketplace strategies. - -* **Royalty tracking**: Similar to the `getOwnersForNft` method, the `getOwnersForContract` method can be used to track the ownership of NFTs representing intellectual property, such as music or art, and ensure that royalties are paid to the correct parties. - -* **Fraud prevention**: The `getOwnersForContract` method can also be used to detect potential fraudulent activity. For example, if a large number of NFTs from a specific contract are being rapidly and frequently transferred to different wallet addresses, it may be a sign of a fraudulent transaction. - -# Related Methods - -Here are the methods related to `getOwnersForContract`: - -* [searchContractMetadata](/reference/searchcontractmetadata-sdk): Search for a keyword across the metadata of all `ERC-721` and `ERC-1155` smart contracts. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getownersfornft.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getownersfornft.mdx deleted file mode 100644 index 4355f185..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getownersfornft.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: getOwnersForNft - SDK -description: Gets all the owners for a given NFT contract address and token ID. -subtitle: Gets all the owners for a given NFT contract address and token ID. -url: https://docs.alchemy.com/reference/sdk-getownersfornft -slug: reference/sdk-getownersfornft ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets all the owners for a given NFT contract address and token ID. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | Token id of the NFT. | - -# Response - -| Property | Type | Description | -| -------- | ------------------ | --------------------------------------------------- | -| `owners` | `array of strings` | An array of owner addresses for the provided token. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and token Id w - const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - const tokenId = "1590"; - - //Call the method to fetch the owners for the collection - const response = await alchemy.nft.getOwnersForNft(address, tokenId) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { owners: [ '0xf5fff32cf83a1a614e15f25ce55b0c0a6b5f8f2c' ] } - ``` - - -# Use Cases - -Here are some potential use cases for the `getOwnersForNft` method: - -* **Royalty tracking**: NFTs can be used to represent intellectual property, such as music or art. The `getOwnersForNft` method can be used to track the ownership of the NFT and ensure that royalties are paid to the correct parties. - -* **Fraud prevention**: The `getOwnersForNft` method can be used to detect potential fraudulent activity. For example, if the ownership of an NFT changes rapidly and frequently, it may be a sign of a fraudulent transaction. - -# Related Methods - -Here are the methods related to `getOwnersForNft`: - -* [getNftMetadataBatch](/reference/getnftmetadatabatch-sdk): Gets the NFT metadata for multiple NFT tokens. - -* [getNftMetadata](/reference/getnftmetadata-sdk): Gets the metadata associated with a given NFT. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getspamcontracts.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getspamcontracts.mdx deleted file mode 100644 index faf4fcfe..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getspamcontracts.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: getSpamContracts - SDK -description: Returns a list of all spam contracts marked by Alchemy. -subtitle: Returns a list of all spam contracts marked by Alchemy. -url: https://docs.alchemy.com/reference/sdk-getspamcontracts -slug: reference/sdk-getspamcontracts ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns a list of all spam contracts marked by Alchemy. For details on how Alchemy marks spam contracts, go to [this link](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification). - -# Response - -| Property | Description | Description | -| ------------------- | ------------------ | ------------------------------------ | -| `Promise` | `array of strings` | A list of identified spam contracts. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Call the method to return a list of spam contracts - const response = await alchemy.nft.getSpamContracts() - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - [ - '0x0103a04286a05a3ebdbe5f04ebd5641e9cd2b795', - '0x010d7618b6c2f6d926f0f41d2c97f6644300317d', - '0x013c7e2f908a2e9a7576bd416e9ed5d0f36872e3', - '0x02dabd06e79aaa35b77b2e51c5123a0a97e769e3', - '0x02ecbde3b983f9867a1b06328d4787f99eb1ecf2', - '0x02ecf3f6af760c9e50bf141479822251e01044b3', - '0x02f625fe7a75ae6cb548bedbc709da34c8a08224', - '0x030f0ab2fd3e44c06e221d0142be5cc0fd007885', - '0x0327c782d647c06e73910c08bd3a2f5bff8dc7ec', - '0x032d96756697af7ec02ce03d39001b39f7a5d849', - '0x03364b89dc0eede57a54798f84da9fd799361361', - '0x0337e808a32fb6e915a0187a28560979528402c1', - '0x033c71e788ac167ce566d8b851cbf27ef37964a5', - '0x034a0e87ccb2943e60ddc1fd6a3ab3aaa442e554', - '0x0356b7113be6c7c914305819f0c4c141217f16e6', - '0x0356d96097723355c6a00011633659a8f2c96c9e', - '0x03673bc69f8348a2009fc43765d03f8bdf3fe7a4', - '0x037c265012f140629e3aa275ea30c0f6a21d1e93', - '0x038cc0f103c380400482d87be0d3abcc4d9b2225', - '0x03998026ef319e663364d2bb3947af6ee64a3888', - '0x039b52db88ae51b86b7ab091fa710082ef60dd7b', - '0x039ff95d9cd2b67ec0b2da048ccce4637f23cb36', - ... 7368 more items - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `getSpamContracts` method: - -* **Anti-spam measures**: `getSpamContracts` could be used to identify and flag contracts or agreements that are likely to be spam or fraudulent. For example, a system could use machine learning algorithms to analyze contracts and agreements for patterns and characteristics commonly associated with spam or fraudulent activity. - -* **Contract management**: `getSpamContracts` could be used as a tool to manage and organize a large number of contracts or agreements. By identifying contracts that are unlikely to be legitimate, the system could prioritize the review and processing of valid contracts. - -* **Legal compliance**: `getSpamContracts` could be used as part of a compliance process to ensure that all contracts and agreements meet legal and regulatory requirements. By identifying potential spam or fraudulent contracts, the system could prevent violations of legal and regulatory frameworks. - -# Related Methods - -* [isSpamContract](/reference/isspamcontract-sdk) - Returns whether a contract is marked as spam or not by Alchemy. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getstorageat.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getstorageat.mdx deleted file mode 100644 index 626ca2f8..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-getstorageat.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: getStorageAt - SDK -description: Returns the value of the provided position at the provided address, at the provided block in Bytes32 format. -subtitle: Returns the value of the provided position at the provided address, at the provided block in Bytes32 format. -url: https://docs.alchemy.com/reference/sdk-getstorageat -slug: reference/sdk-getstorageat ---- - -Returns the value of the provided position at the provided address, at the provided block in `Bytes32` format. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the value of the provided position at the provided address, at the provided block in `Bytes32` format. - -# Parameters - -| Parameter | Type | Description | -| --------------- | --------- | ------------------------------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the code for. | -| `position` | `integer` | The position of the storage slot to get. | -| `blockTag` | `string` | The optional block number or hash to get the code for. Defaults to 'latest' if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Goerli**. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Goerli.** -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `Promise` | `string` | Returns the value at this storage position. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getStorageAt` request using the Alchemy SDK: - - - ```javascript getStorageAt.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - let address = "registrar.firefly.eth" - let position = 0 - - //Call the method to get storage - let response = await alchemy.core.getStorageAt(address, position) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - 0x000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b - ``` - - -# Related Methods - -Here are the methods related to `getStorageAt`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettokenbalances.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettokenbalances.mdx deleted file mode 100644 index 1791f29f..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettokenbalances.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: getTokenBalances - SDK -description: Returns the ERC-20 token balances for a specific owner address. -subtitle: Returns the ERC-20 token balances for a specific owner address. -url: https://docs.alchemy.com/reference/sdk-gettokenbalances -slug: reference/sdk-gettokenbalances ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the ERC-20 token balances for a specific owner address. - -# Parameters - -| Name | Type | Description | -| -------------------------------- | -------- | ------------------------------------------------------------ | -| `addressOrName` | `string` | The owner address or ENS name to get the token balances for. | -| `contractAddresses` ( optional ) | `array` | List of contract addresses to filter by. | - -# Response - -| Parameter | Type | Description | -| ------------------------------------- | -------- | -------------------------- | -| `Promise` | `object` | The ERC-20 token balances. | - -### `TokenBalancesResponseErc20` response object parameters - -| Property | Type | Description | -| --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `address` | `string` | Returns the value at this storage position. | -| `tokenBalances` | `array` | returns an array of token balance objects. Each object contains: `contractAddress`, `tokenBalance`: *hex-encoded*, `error`, One of `tokenBalance` or error will be `null`. | -| `pageKey?` | `string` | Applies only to the `erc20` request type. An address to be passed into the `pageKey` of the next request to paginate through an owner's tokens. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTokenBalances` request using the Alchemy SDK: - - - ```javascript gettokenbalances.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - let vitalikAddress = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; - let usdcContract = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; - - //Call the method to return the token balances for this address - let response = await alchemy.core.getTokenBalances(vitalikAddress, [usdcContract]) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045', - tokenBalances: [ - { - contractAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', - tokenBalance: '0x0000000000000000000000000000000000000000000000000000000002561840' - } - ] - } - ``` - - -# Use Cases - -For guidance on how to leverage this method, check out the following tutorials: - -* [How to Get Token Balance for an Address](/docs/how-to-get-token-balance-for-an-address) -* [How to Get All Tokens Owned by an Address](/docs/how-to-get-all-tokens-owned-by-an-address) - -# Related Methods - -Here are the methods related to `getTokenBalances`: - -* [getBlock](/reference/getblock-sdk): Returns the block from the network based on the provided block number or hash. -* [getBalance](/reference/getbalance-sdk): Returns the balance of a given address as of the provided block. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettokenmetadata.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettokenmetadata.mdx deleted file mode 100644 index a9db408e..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettokenmetadata.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: getTokenMetadata - SDK -description: Returns metadata for a given token contract address. -subtitle: Returns metadata for a given token contract address. -url: https://docs.alchemy.com/reference/sdk-gettokenmetadata -slug: reference/sdk-gettokenmetadata ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns metadata for a given token contract address. - -# Parameters - -| Name | Type | Description | -| --------- | -------- | ----------------------------------------- | -| `address` | `string` | The contract address to get metadata for. | - -# Response - -| Parameters | Type | Description | -| -------------------------------- | -------- | --------------------------------------------------- | -| `Promise` | `object` | Returns metadata for a given token contract address | - -### `TokenMetadataResponse` object parameters - -| Property | Type | Description | -| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | The token's name, `null` if not defined in the contract and not available from other sources. | -| `symbol` | `string` | The token's symbol. `null` if not defined in the contract and not available from other sources. | -| `decimals` | `number` | The number of decimals of the token. `null` if not defined in the contract and not available from other sources. | -| `logo` | `string` | URL of the token's logo image. `null` if not available. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTokenMetadata` request using the Alchemy SDK: - - - ```javascript gettokenmetadata.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - const usdcContract = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; - - //Call the method to retrieve the token metadata - let response = await alchemy.core.getTokenMetadata(usdcContract) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - decimals: 6, - logo: 'https://static.alchemyapi.io/images/assets/3408.png', - name: 'USD Coin', - symbol: 'USDC' - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getTokenMetadata` method: - -* **Displaying Token Information**: DApps and other blockchain applications often need to display information about a particular token. By using `getTokenMetadata`, developers can easily retrieve information such as the token name, symbol, and decimal places for display in their application. - -# Related Methods - -Here are the methods related to `getTokenMetadata`: - -* [getTokenBalances](/reference/gettokenbalances): Returns the ERC-20 token balances for a specific owner address. -* [getFeeData](/reference/getfeedata-sdk): Returns the recommended fee data to use in a transaction. For an EIP-1559 transaction, the `maxFeePerGas` and `maxPriorityFeePerGas` should be used. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransaction.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransaction.mdx deleted file mode 100644 index 56d6eb41..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransaction.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: getTransaction - SDK -description: Returns the transaction with hash or null if the transaction is unknown. If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent a... -subtitle: Returns the transaction with hash or null if the transaction is unknown. If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent a... -url: https://docs.alchemy.com/reference/sdk-gettransaction -slug: reference/sdk-gettransaction ---- - -Returns the transaction with `hash` or `null` if the transaction is unknown. - -If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent and not yet indexed) in which case this method may also return null. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the transaction with hash or null if the transaction is unknown. - -If a transaction has not been mined, this method will search the transaction pool. Various backends may have more restrictive transaction pool access (e.g. if the gas price is too low or the transaction was only recently sent and not yet indexed) in which case this method may also return null. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------- | -| `transactionHash` | `string` | The hash of the transaction to get. | - -# Response - -| Property | Type | Description | -| ------------------------------------- | -------- | --------------------------------- | -| `Promise` | `object` | Returns the transaction response. | - -### `TransactionResponse` object parameters - -| Property | Type | Description | -| --------------- | -------- | --------------------------------------------------------------------------------------------------------- | -| `hash` | `string` | The transaction hash. | -| `from` | `string` | `20 Bytes`. The `from` address. | -| `blockNumber?` | `number` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `blockHash?` | `string` | `32 Bytes` - hash of the block where this log was in. null when its pending. `null` when its pending log. | -| `timestamp?` | `number` | `Optional`. Returns only if a transaction has been mined. | -| `confirmations` | `number` | number of transaction confirmations. | -| `raw` | `string` | Raw value. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const txHash = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.getTransaction(txHash) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - hash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b', - type: 0, - accessList: null, - blockHash: '0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2', - blockNumber: 6139707, - transactionIndex: 65, - confirmations: 10639439, - from: '0xa7d9ddBE1f17865597fBD27EC712455208B6B76d', - gasPrice: BigNumber { _hex: '0x04a817c800', _isBigNumber: true }, - gasLimit: BigNumber { _hex: '0xc350', _isBigNumber: true }, - to: '0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB', - value: BigNumber { _hex: '0x0f3dbb76162000', _isBigNumber: true }, - nonce: 21, - data: '0x68656c6c6f21', - r: '0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea', - s: '0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c', - v: 37, - creates: null, - chainId: 1, - wait: [Function (anonymous)] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getTransaction` method: - -* **Transaction status**: You can use `getTransaction` to check the status of a transaction by its hash. If the transaction has been mined and confirmed, you will be able to see the block number and other details. If the transaction has not yet been mined, you can use `getTransactionReceipt` to get the current status. - -* **Transaction details**: You can use `getTransaction` to retrieve the details of a transaction, including the sender and recipient addresses, the amount transferred, and the gas used. This information can be useful for auditing purposes or to reconcile your own records. - -* **Debugging**: If you are experiencing issues with a transaction, you can use `getTransaction` to retrieve the details and identify the source of the problem. For example, if a transaction is failing due to insufficient gas, you can use `getTransaction` to confirm the gas limit and adjust it as needed. - -# Related Methods - -Here are the methods related to `getTransaction`: - -* [sendTransaction](/reference/sendtransaction-sdk) - Submits transaction to the network to be mined. -* [waitForTransaction](/reference/waitfortransaction-sdk) - Returns a promise which will not resolve until specified transaction hash is mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactioncount.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactioncount.mdx deleted file mode 100644 index ea445d84..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactioncount.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: getTransactionCount - SDK -description: Returns the number of transactions ever sent from the provided address, as of the provided block tag. This value is used as the nonce for the next transaction from the address sent to the network. -subtitle: Returns the number of transactions ever sent from the provided address, as of the provided block tag. This value is used as the nonce for the next transaction from the address sent to the network. -url: https://docs.alchemy.com/reference/sdk-gettransactioncount -slug: reference/sdk-gettransactioncount ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the number of transactions ever sent from the provided address, as of the provided block tag. This value is used as the nonce for the next transaction from the address sent to the network. - -# Parameters - -| Name | Type | Description | -| --------------- | -------- | ----------------------------------------------------------------------- | -| `addressOrName` | `string` | The address or ENS name of the account to get the nonce for. | -| `blockTag` | `string` | The optional block number or hash. Defaults to 'latest' if unspecified. | - -### `blockTag` parameters - -* `pending` - A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from `local` mempool. Intuitively, you can think of these as blocks that have not been mined yet. -* `latest` - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. -* `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Goerli**. -* `finalized `- The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Goerli.** -* `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created. - -# Response - -| Property | Type | Description | -| ----------------- | -------- | ------------------------------- | -| `Promise` | `number` | Returns the value of the count. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTransactionCount` request using the Alchemy SDK: - - - ```javascript getTransactionCount.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - const address = "vitalik.eth" - - //Call the method - let response = await alchemy.core.getTransactionCount(address) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - 1017 - ``` - - -# Related Methods - -* [getTransactionReceipts](/reference/gettransactionreceipts-sdk): Returns the transaction receipt for hash or `null` if the transaction has not been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactionreceipt.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactionreceipt.mdx deleted file mode 100644 index 173d9451..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactionreceipt.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: getTransactionReceipt - SDK -description: Returns the transaction receipt for hash or null if the transaction has not been mined. -subtitle: Returns the transaction receipt for hash or null if the transaction has not been mined. -url: https://docs.alchemy.com/reference/sdk-gettransactionreceipt -slug: reference/sdk-gettransactionreceipt ---- - -Returns the transaction receipt for hash or `null` if the transaction has not been mined. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns the transaction receipt for hash or `null` if the transaction has not been mined. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------- | -| `transactionHash` | `string` | `32 Bytes` - Hash of a transaction. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | ----------------------------------------------------------------- | -| `Promise` | `object` | A transaction receipt object, or `null` when no receipt was found | - -### `TransactionReceipt` response object parameters - -| Parameter | Type | Description | -| -------------------- | --------- | ------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `20 Bytes` - address of the receiver. `null` when its a contract creation transaction | -| from | `string` | `20 Bytes` - address of the sender | -| `contractAddress` | `string` | `20 Bytes` - The contract address created, if the transaction was a contract creation, otherwise `null` | -| `transactionIndex` | `number` | Integer of the transactions index position log was created from. `null` when its pending log. | -| `root?` | `string` | `32 bytes` of post-transaction stateroot (pre Byzantium) | -| `gasUsed` | `number` | The amount of gas used by this specific transaction alone | -| `logsBloom` | `string` | `256 Bytes` - Bloom filter for light clients to quickly retrieve related logs | -| `transactionHash` | `string` | `32 Bytes` - hash of the transaction | -| `logs` | `array` | Array of log objects, which this transaction generated | -| `blockNumber` | `number` | The block number where this log was in. null when its pending. `null` when its pending log. | -| `type` | `number` | type | -| `status` | `integer` | Either `1` (success) or `0` (failure) | -| `cummulativeGasUsed` | `number` | A cummulative amount of gas used for the transaction. | -| `effectiveGasPrice` | `number` | the gas price. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTransactionReceipt` request using the Alchemy SDK: - - - ```javascript gettransactionreceipt.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Initialize variables for the parameters - const tx = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b" - - //Call the method to fetch the transaction receipt of the tx - let response = await alchemy.core.getTransactionReceipt(tx) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - to: '0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB', - from: '0xa7d9ddBE1f17865597fBD27EC712455208B6B76d', - contractAddress: null, - transactionIndex: 65, - gasUsed: BigNumber { _hex: '0x53a0', _isBigNumber: true }, - logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', - blockHash: '0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2', - transactionHash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b', - logs: [], - blockNumber: 6139707, - confirmations: 10565824, - cumulativeGasUsed: BigNumber { _hex: '0x20ec2d', _isBigNumber: true }, - effectiveGasPrice: BigNumber { _hex: '0x04a817c800', _isBigNumber: true }, - status: 1, - type: 0, - byzantium: true - } - ``` - - -# Use Cases - -Here are some potential use cases for the `getTransactionReceipt` method: - -* **Confirming transaction execution**: When a transaction is sent on the Ethereum blockchain, it may take some time for it to be processed and confirmed. The `getTransactionReceipt` method can be used to confirm that a particular transaction has been processed and its status (success or failure). - -* **Verifying smart contract execution**: Smart contracts are self-executing programs that run on the Ethereum blockchain. They can execute transactions and perform various operations on the blockchain. The `getTransactionReceipt` method can be used to verify that a smart contract has executed as intended and to check its output. - -* **Tracking token transactions**: Tokens are a type of digital asset that can be traded on the Ethereum blockchain. The `getTransactionReceipt` method can be used to track token transactions and to verify that they have been executed correctly. - -* **Auditing blockchain transactions**: The transparency and immutability of blockchain transactions make them an ideal platform for auditing purposes. The `getTransactionReceipt` method can be used to audit transactions and to ensure that they have been executed correctly and securely. - -# Related Methods - -Here are the methods related to `getTransactionReceipt`: - -* [getTransactionReceipts](/reference/gettransactionreceipts-sdk): Gets all transaction receipts for a given block by number or block hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactionreceipts.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactionreceipts.mdx deleted file mode 100644 index 057ad411..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransactionreceipts.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: getTransactionReceipts - SDK -description: Gets all transaction receipts for a given block by number or block hash. -subtitle: Gets all transaction receipts for a given block by number or block hash. -url: https://docs.alchemy.com/reference/sdk-gettransactionreceipts -slug: reference/sdk-gettransactionreceipts ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Gets all transaction receipts for a given block by number or block hash. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `params` | `object` | The api only takes in one parameter - an object with at least a `blockNumber` or `blockHash`. If both are provided, `blockHash` is prioritized. | - -### `params` Parameters - -| Parameter | Type | Description | -| ------------- | -------- | -------------------------------------------------------------------- | -| `blockNumber` | `number` | The block number you want to get transaction receipts for, in *hex*. | -| `blockHash` | `string` | The block hash you want to get transaction receipts for. | - -# Response - -| Property | Type | Description | -| -------------------------------------- | ------------------ | ------------------------------------------------------------------ | -| `Promise` | `array of objects` | A list of transaction receipts for each transaction in this block. | - -### `TransactionReceiptsResponse` object parameters - -| Parameter | Type | Description | -| -------------------- | --------- | ------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `20 Bytes` - address of the receiver. `null` when its a contract creation transaction | -| `from` | `string` | `20 Bytes` - address of the sender | -| `contractAddress` | `string` | `20 Bytes` - The contract address created, if the transaction was a contract creation, otherwise `null` | -| `transactionIndex` | `number` | Integer of the transactions index position log was created from. `null` when its pending log. | -| `root?` | `string` | `32 bytes` of post-transaction stateroot (pre Byzantium) | -| `gasUsed` | `number` | The amount of gas used by this specific transaction alone | -| `logsBloom` | `string` | `256 Bytes` - Bloom filter for light clients to quickly retrieve related logs | -| `transactionHash` | `string` | `32 Bytes` - hash of the transaction | -| `logs` | `array` | Array of log objects, which this transaction generated | -| `blockNumber` | `number` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `type` | `number` | type | -| `status` | `integer` | Either `1` (success) or `0` (failure) | -| `cummulativeGasUsed` | `number` | A cummulative amount of gas used for the transaction. | -| `effectiveGasPrice` | `number` | the gas price. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTransactionReceipts` request using the Alchemy SDK: - - - ```javascript gettransactionreceipts.js - // Imports the Alchemy SDK - const { Alchemy, Network, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - //Define the params object - const params = { - // blockNumber - blockNumber: "0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe" - }; - - //The response returns the transaction receipts of the `blockNumber` - let response = await alchemy.core.getTransactionReceipts(params) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - to: '0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB', - from: '0xa7d9ddBE1f17865597fBD27EC712455208B6B76d', - contractAddress: null, - transactionIndex: 65, - gasUsed: BigNumber { _hex: '0x53a0', _isBigNumber: true }, - logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', - blockHash: '0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2', - transactionHash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b', - logs: [], - blockNumber: 6139707, - confirmations: 10565824, - cumulativeGasUsed: BigNumber { _hex: '0x20ec2d', _isBigNumber: true }, - effectiveGasPrice: BigNumber { _hex: '0x04a817c800', _isBigNumber: true }, - status: 1, - type: 0, - byzantium: true - }, - { - to: '0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB', - from: '0xa7d9ddBE1f17865597fBD27EC712455208B6B76d', - contractAddress: null, - transactionIndex: 65, - gasUsed: BigNumber { _hex: '0x53a0', _isBigNumber: true }, - logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', - blockHash: '0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2', - transactionHash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b', - logs: [], - blockNumber: 6139707, - confirmations: 10565824, - cumulativeGasUsed: BigNumber { _hex: '0x20ec2d', _isBigNumber: true }, - effectiveGasPrice: BigNumber { _hex: '0x04a817c800', _isBigNumber: true }, - status: 1, - type: 0, - byzantium: true - } - ``` - - -# Use Cases - -Here are some possible use cases for the `getTransactionReceipts` method: - -* **Transaction Confirmation**: You can use `getTransactionReceipts` to check if a transaction has been successfully confirmed by the EVM networks. A transaction receipt contains information such as the block number and transaction status, which can indicate if the transaction was successful or not. - -* **Contract Interaction**: When you interact with a smart contract on the EVM networks, you typically receive a transaction hash. You can use `getTransactionReceipts` to retrieve the transaction receipt for that hash, which contains the contract address and any events emitted by the contract during the transaction. - -* **Transaction History**: If you need to keep track of the transactions you have sent or received on the EVM networks, you can use `getTransactionReceipts` to retrieve the receipts for those transactions. You can then store this information in your application's database or use it to generate reports. - -# Related Methods - -Here are the methods related to `getTransactionReceipts`: - -* [getTransactionReceipt](/reference/gettransactionreceipt-sdk): Returns the transaction receipt for hash or null if the transaction has not been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransfersforcontract.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransfersforcontract.mdx deleted file mode 100644 index 1dd586c5..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransfersforcontract.mdx +++ /dev/null @@ -1,308 +0,0 @@ ---- -title: getTransfersForContract - SDK -description: The getTransfersForContract method gets all NFT transfers for a given NFT contract address. -subtitle: The getTransfersForContract method gets all NFT transfers for a given NFT contract address. -url: https://docs.alchemy.com/reference/sdk-gettransfersforcontract -slug: reference/sdk-gettransfersforcontract ---- - -The `getTransfersForContract` method gets all NFT transfers for a given NFT contract address. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`getTransfersForContract` gets all NFT transfers for a given NFT contract address. - -# Parameters - -| Name | Type | Description | Example | -| ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | -| Contract Address | `string` | The NFT contract address to get transfers for. | `"0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"` | -| Options (Optional) | `object` | An optional object with the following properties: 1. `fromBlock`: Starting block (inclusive) to get transfers from. This can be an integer of the block number, hex string of the block number or a block tag such as `latest`, `earliest` or `finalized`. 2. `toBlock`: Ending block (inclusive) to get transfers from. This can be an integer of the block number, hex string of the block number or a block tag such as `latest`, `earliest` or `finalized`. 3. `order`: Whether to return results in ascending or descending order by block number. Defaults to ascending if omitted. The options are `"asc"` for ascending order and `"desc"` for descending order. 4. `pageKey`: Optional page key from an existing response to use for pagination. | `{ fromBlock: 16564734, toBlock: 16567427, order: "desc", }` | - -# Response - -The `getTransfersForContract` method returns a `Promise` object that contains the NFT transfers for the given NFT contract address. - -The returned object has the following fields: - -| Property (Field) | Description | -| ---------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | An array of the transfer objects. Each transfer object contains information about the transferred NFT. | -| `pageKey?` | Optional page key to use to fetch the next group of NFTs. `undefined` if all the transfers are already included in the response. | - -Each transfer object has the following fields: - -| Property (Field) | Description | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | The address of the NFT contract | -| `tokenId` | The unique identifier of the NFT being transferred. | -| `tokenType` | The type of NFT being transferred (`ERC721` or `ERC1155`) | -| `title` | Title or name of the NFT. | -| `description` | A brief description of the NFT. | -| `timeLastUpdated` | When the NFT was last updated in the blockchain. Represented in ISO-8601 format. | -| `metadataError?` | Holds an error message if there was an issue fetching metadata. | -| `rawMetadata?` | The raw metadata fetched from the metadata URL specified by the NFT. The field is `undefined` if Alchemy was unable to fetch metadata. | -| `tokenUri?` | URIs for accessing the NFT's metadata blob. | -| `media` | URIs for accessing the NFT's media assets. | -| `spamInfo?` | Detailed information on why an NFT was classified as spam. `undefined` if the NFT is not classified as spam. | -| `from` | The address the NFT was sent from. For minted NFTs, this field is set to `0x0000000000000000000000000000000000000000`. | -| `to` | The address the NFT was sent or minted to. | -| `transactionHash` | The transaction hash where the transfer or mint occurred. | -| `blockNumber` | The block number as a hex string of when the transfer or mint occurred. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```text yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTransfersForContract` request using the Alchemy SDK: - - - ```javascript getTransfersForContract.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getTransfersForContract method - const main = async () => { - // The nft contract address to get transfers for - let contractAddress = "0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"; - - // Additional options for the request. (Optional) - let options = { - /** Starting block (inclusive) to get transfers from. */ - fromBlock: 16564734, - /** Ending block (inclusive) to get transfers from. */ - toBlock: 16567427, - /** - * Whether to return results in ascending or descending order by block number. - * Defaults to ascending if omitted. - */ - order: "desc", - }; - - // Calling the getTransfersForContract method - let transfers = await alchemy.nft.getTransfersForContract( - contractAddress, - options - ); - - // Logging the response to the console - console.log(transfers); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json getTransfersForContract response - { - "nfts": [ - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.022, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-02-02T08:11:43.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "890", - "tokenType": "ERC721", - "title": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-02-04T23:45:33.795Z", - "rawMetadata": { - "name": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - { - "value": "Glowing", - "trait_type": "Body" - }, - { - "value": "Clubmasters", - "trait_type": "Eyes" - }, - { - "value": "Shocked", - "trait_type": "Mouth" - }, - { - "value": "Tie Dye", - "trait_type": "Outfit" - }, - { - "value": "Double", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890", - "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890" - }, - "media": [ - { - "raw": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "format": "png", - "bytes": 199542 - } - ], - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x84561625814e1c7e882c1ae20a9d722a8c301f04", - "transactionHash": "0x43ff4418ca88d94857f3b687e8ac7450e107c2a36517e8d59a5308dba4acec94", - "blockNumber": "0xec8125" - }, - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.022, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-02-02T08:11:43.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "3990", - "tokenType": "ERC721", - "title": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-01-07T22:53:31.448Z", - "rawMetadata": { - "name": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "attributes": [ - { - "value": "Pink Checkerboard", - "trait_type": "Background" - }, - { - "value": "Mammoth", - "trait_type": "Body" - }, - { - "value": "Mad", - "trait_type": "Eyes" - }, - { - "value": "Tennis Ball", - "trait_type": "Item" - }, - { - "value": "Lips Open", - "trait_type": "Mouth" - }, - { - "value": "Green Doctor", - "trait_type": "Outfit" - }, - { - "value": "Nubs", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990", - "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990" - }, - "media": [ - { - "raw": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "format": "png", - "bytes": 198447 - } - ], - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x6a3623db71c1b3442a94e3fd4655334b48114693", - "transactionHash": "0x13f33287ac95893e06cda2cd30c08003808ac46867382d8c92e1c864e4895ec6", - "blockNumber": "0xec8131" - } - ] - } - ``` - - -# Use Cases - -Some of the use cases for `getTransfersForContract` are: - -* **NFT Market Analysis**: An NFT market analysis platform could use the API to gather data on NFT transfers for a specific NFT contract and analyze the demand and supply of that particular NFT. - -* **NFT Contract Monitoring**: An NFT contract owner or administrator could use the API to monitor all transfers of their NFT contract and ensure that they are being used in a compliant manner. - -* **NFT Trading Platform**: An NFT trading platform could use the API to retrieve information about all transfers of a specific NFT contract and display it to users, allowing them to trade and buy/sell NFTs. - -* **NFT Project Tracking**: Investors or fans of a specific NFT project could use the API to track the growth and adoption of the project by monitoring the number and frequency of NFT transfers for the associated NFT contract. - -# Related Methods - -Here are the methods related to `getTransfersForContract`: - -* [`getTransfersForOwner`](/reference/sdk-gettransfersforowner): Returns all NFT transfers for a given owner address. - -* [`getMintedNfts`](/reference/sdk-getmintednfts): Returns all the NFTs minted by a specified owner address. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransfersforowner.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransfersforowner.mdx deleted file mode 100644 index cf76cfad..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-gettransfersforowner.mdx +++ /dev/null @@ -1,312 +0,0 @@ ---- -title: getTransfersForOwner - SDK -description: The getTransfersForOwner method gets all NFT transfers for a given owner address. -subtitle: The getTransfersForOwner method gets all NFT transfers for a given owner address. -url: https://docs.alchemy.com/reference/sdk-gettransfersforowner -slug: reference/sdk-gettransfersforowner ---- - -The `getTransfersForOwner` method gets all NFT transfers for a given owner address. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`getTransfersForOwner` gets all NFT transfers for a given owner's address. - -# Parameters - -| Name | Type | Description | Example | -| ------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| Owner Address | `string` | The owner address to get transfers for. | `"0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"` | -| Category (Optional) | `string` | Whether to get transfers `TO` or `FROM` the owner address. | `TO`, `FROM` | -| Options (Optional) | `Object` | An optional object with the following properties: 1. `contractAddresses`: An array of NFT contract addresses to filter mints by. If omitted, defaults to all contract addresses. 2. `tokenType`: Filter mints by `ERC721` vs `ERC1155` contracts. If omitted, defaults to all NFTs. 3. `pageKey`: Optional page key from an existing response to use for pagination. | `{ contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"], tokenType: "ERC721" }` | - -# Response - -The `getTransfersForOwner` method returns a `Promise` object that contains the NFT transfers for the given owner address. - -The returned object has the following fields: - -| Property (Field) | Description | -| ---------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `nfts` | An array of the transfer objects. Each transfer object contains information about the transferred NFT. | -| `pageKey?` | Optional page key to use to fetch the next group of NFTs. `undefined` if all the transfers are already included in the response. | - -Each transfer object has the following fields: - -| Property (Field) | Description | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `contract` | The address of the NFT contract | -| `tokenId` | The unique identifier of the NFT being transferred. | -| `tokenType` | The type of NFT being transferred (`ERC721` or `ERC1155`) | -| `title` | Title or name of the NFT. | -| `description` | A brief description of the NFT. | -| `timeLastUpdated` | When the NFT was last updated in the blockchain. Represented in ISO-8601 format. | -| `metadataError?` | Holds an error message if there was an issue fetching metadata. | -| `rawMetadata?` | The raw metadata fetched from the metadata URL specified by the NFT. The field is `undefined` if Alchemy was unable to fetch metadata. | -| `tokenUri?` | URIs for accessing the NFT's metadata blob. | -| `media` | URIs for accessing the NFT's media assets. | -| `spamInfo?` | Detailed information on why an NFT was classified as spam. `undefined` if the NFT is not classified as spam. | -| `from` | The address the NFT was sent from. For minted NFTs, this field is set to `0x0000000000000000000000000000000000000000`. | -| `to` | The address the NFT was sent or minted to. | -| `transactionHash` | The transaction hash where the transfer or mint occurred. | -| `blockNumber` | The block number as a hex string of when the transfer or mint occurred. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```text yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `getTransfersForOwner` request using the Alchemy SDK: - - - ```javascript getTransfersForOwner.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the new getTransfersForOwner method - const main = async () => { - // The owner address to get transfers for - let address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"; - - // Whether to get transfers TO or FROM the owner address. (Optional) - let category = "FROM"; - - // Additional options for the request. (Optional) - let options = { - /** - * List of NFT contract addresses to filter mints by. If omitted, defaults to - * all contract addresses. - */ - contractAddresses: ["0x1F02bF9dDe7C79137a08B2Dd4FC964BfD2499734"], - /** - * Filter mints by ERC721 vs ERC1155 contracts. If omitted, defaults to all - * NFTs. - */ - tokenType: "ERC721", - }; - - // Calling the getTransfersForOwner method - let transfers = await alchemy.nft.getTransfersForOwner( - address, - category, - options - ); - - // Logging the response to the console - console.log(transfers); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json getTransfersForOwner response - { - "nfts": [ - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.022, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-02-02T08:11:43.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "890", - "tokenType": "ERC721", - "title": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-02-04T23:45:33.795Z", - "rawMetadata": { - "name": "3L3PHANTS #890", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "attributes": [ - { - "value": "Red", - "trait_type": "Background" - }, - { - "value": "Glowing", - "trait_type": "Body" - }, - { - "value": "Clubmasters", - "trait_type": "Eyes" - }, - { - "value": "Shocked", - "trait_type": "Mouth" - }, - { - "value": "Tie Dye", - "trait_type": "Outfit" - }, - { - "value": "Double", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890", - "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/890" - }, - "media": [ - { - "raw": "ipfs://QmTvmGSL6cFxRyoam2vBRgVL8vjcLrzdum14K9qMQ7MP2b", - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/121fdb0563b1917179c9ad7d97ae081f", - "format": "png", - "bytes": 199542 - } - ], - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x84561625814e1c7e882c1ae20a9d722a8c301f04", - "transactionHash": "0x43ff4418ca88d94857f3b687e8ac7450e107c2a36517e8d59a5308dba4acec94", - "blockNumber": "0xec8125" - }, - { - "contract": { - "address": "0x1f02bf9dde7c79137a08b2dd4fc964bfd2499734", - "name": "Elephants", - "symbol": "ELENFT", - "totalSupply": "7778", - "tokenType": "ERC721", - "openSea": { - "floorPrice": 0.022, - "collectionName": "3L3Phants Official", - "safelistRequestStatus": "verified", - "imageUrl": "https://i.seadn.io/gcs/files/71dfb6cacb894a713d91f493917fa1b5.png?w=500&auto=format", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. From the mind of Ic3cream and designed by World Renowned Artist Tornado Toad. Join the Herd today!\n\nEarn $NUT token in our discord now!\n\nhttps://discord.gg/3l3phantsnft", - "externalUrl": "http://3l3phants.io", - "twitterUsername": "3L3NFT", - "discordUrl": "https://discord.gg/3L3phantsnft", - "lastIngestedAt": "2023-02-02T08:11:43.000Z" - }, - "contractDeployer": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "deployedBlockNumber": 15140845 - }, - "tokenId": "3990", - "tokenType": "ERC721", - "title": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "timeLastUpdated": "2023-01-07T22:53:31.448Z", - "rawMetadata": { - "name": "3L3PHANTS #3990", - "description": "3L3Phants NFT is a collection of 7,777 Elephants stampeding on the Ethereum blockchain. Saving 3L3Phants & Wildlife one NFT at a time", - "image": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "attributes": [ - { - "value": "Pink Checkerboard", - "trait_type": "Background" - }, - { - "value": "Mammoth", - "trait_type": "Body" - }, - { - "value": "Mad", - "trait_type": "Eyes" - }, - { - "value": "Tennis Ball", - "trait_type": "Item" - }, - { - "value": "Lips Open", - "trait_type": "Mouth" - }, - { - "value": "Green Doctor", - "trait_type": "Outfit" - }, - { - "value": "Nubs", - "trait_type": "Tusks" - } - ] - }, - "tokenUri": { - "raw": "ipfs://QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990", - "gateway": "https://ipfs.io/ipfs/QmcpMnvcmUvn3EsQ6QmV1J7QwouBKimrhbHpEV5Db9gFgy/3990" - }, - "media": [ - { - "raw": "ipfs://QmaL3UbrR8T1tz7j8SuYmQxkQJoPXYZeU49YC5DCHphKDg", - "gateway": "https://nft-cdn.alchemy.com/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/8e8706cbd7f6f2b46576dd386410b805", - "format": "png", - "bytes": 198447 - } - ], - "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8", - "to": "0x6a3623db71c1b3442a94e3fd4655334b48114693", - "transactionHash": "0x13f33287ac95893e06cda2cd30c08003808ac46867382d8c92e1c864e4895ec6", - "blockNumber": "0xec8131" - } - ] - } - ``` - - -# Use Cases - -Some of the use cases for `getTransfersForOwner` are: - -* **NFT Marketplace**: An NFT marketplace could use the API to retrieve all the NFT transfers for a particular owner and display them on their website for the owner to see their NFT collection and transactions history. - -* **NFT Portfolio Tracking**: An individual or a company could use the API to track all the NFT transfers to and from their address, and keep a record of their NFT portfolio. - -* **NFT Analytics**: An NFT analytics platform could use the API to gather data on NFT transfers, and analyze the NFT market trends and patterns. - -# Related Methods - -Here are the methods related to `getTransfersForOwner`: - -* [`getMintedNfts`](/reference/sdk-getmintednfts): Returns all the NFTs minted by a specified owner address. - -* [`getTransfersForContract`](/reference/sdk-gettransfersforcontract): Returns all NFT transfers for a given NFT contract address. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-isspamcontract.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-isspamcontract.mdx deleted file mode 100644 index 46459934..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-isspamcontract.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: isSpamContract - SDK -description: Returns whether a contract is marked as spam or not by Alchemy. -subtitle: Returns whether a contract is marked as spam or not by Alchemy. -url: https://docs.alchemy.com/reference/sdk-isspamcontract -slug: reference/sdk-isspamcontract ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns whether a contract is marked as spam or not by Alchemy. For more information on how we classify spam, go to our [NFT API FAQ page](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification). - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------ | -| `contractAddress` | `string` | The contract address to check. | - -# Response - -| Property | Description | -| ------------------ | ------------------------------------------------------------------ | -| `Promise` | The spam status of the contract. Returns either `true` or `false`. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x000440f08436a7b866d1ae42db5e0be801da722a"; - - //Call the method to check if a contract is a spam - const response = await alchemy.nft.isSpamContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - false - ``` - - -# Use Cases - -Here are some potential use cases for the `isSpamContract` method: - -* **Preventing spam transactions**: If you are building a blockchain-based application or service, you may want to prevent spam transactions from being processed on your network. By checking whether a contract is a spam, you can filter out transactions that are likely to be spam and prevent them from clogging up your network. - -* **Improving search results**: If you are building a search engine for smart contracts, you may want to filter out spam contracts from your search results. By using the `isSpamContract` method, you can identify and exclude contracts that are known to be spam. - -* **Enhancing security**: If you are building a security system for a smart contract platform, you may want to identify contracts that are known to be malicious or spammy. By using the `isSpamContract` method, you can flag these contracts as high-risk and take additional security measures to protect your platform and users. - -# Related Methods - -* [getSpamContracts](/reference/getspamcontracts-sdk): Returns a list of all spam contracts marked by Alchemy. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-refreshcontract.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-refreshcontract.mdx deleted file mode 100644 index 232d4cd8..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-refreshcontract.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: refreshContract - SDK -description: Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. -subtitle: Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. -url: https://docs.alchemy.com/reference/sdk-refreshcontract -slug: reference/sdk-refreshcontract ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -Triggers a metadata refresh of all NFTs in the provided contract address. This method is useful after an NFT collection is revealed. - -Refreshes are queued on the Alchemy backend and may take time to fully process. To refresh the metadata for a specific token, use the [refreshNftMetadata](/reference/sdk-refreshnftmetadata) method instead. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT collection. | - -# Response - -| Property | Type | Description | -| -------------------------------- | -------- | ----------------------------------- | -| `Promise` | `object` | The refresh result response object. | - -### `RefreshContractResult` response object parameters - -| Property | Type | Description | -| ----------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `contractAddress` | `string` | The NFT contract address that was passed in to be refreshed. | -| `refreshState` | `string` | The current state of the refresh request. | -| `progress` | `string \| null` | Percentage of tokens currently refreshed, represented as an integer string. Field can be `null` if the refresh has not occurred. Available options are: *The contract does not exist* `DOES_NOT_EXIST` = "does*not\_exist", \_The contract has already been queued for refresh.* `ALREADY_QUEUED` = "already*queued", \_The contract is currently being refreshed.* `IN_PROGRESS` = "in*progress", \_The contract refresh is complete.*`FINISHED` = "finished", *The contract refresh has been queued and await execution.*`QUEUED` = "queued", *The contract was unable to be queued due to an internal error.*`QUEUE_FAILED` = "queue\_failed" | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address - const address = "0x5180db8F5c931aaE63c74266b211F580155ecac8"; - - //Call the method to return the refresh result response object - const response = await alchemy.nft.refreshContract(address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - contractAddress: '0x5180db8f5c931aae63c74266b211f580155ecac8', - refreshState: 'queued', - progress: 0 - } - ``` - - -# Use Cases - -Here are some potential use cases for the `refreshContract` method: - -* **Marketplace management**: NFT marketplaces can use the `refreshContract` method to ensure that the data for a specific contract is up-to-date, including any changes to the contract's metadata or events. This information is crucial for ensuring that the marketplace accurately reflects the current state of the contract. - -* **Contract management**: Developers can use the `refreshContract` method to update the data for a contract they are developing. This can be useful for ensuring that the contract is functioning properly and for identifying any potential issues or bugs. - -* **User interface updates**: DApp developers can use the `refreshContract` method to update their user interfaces to reflect any changes to the contract's metadata or events. This can be useful for improving the user experience and ensuring that the DApp is always displaying the most accurate information. - -# Related Methods - -Here are the methods related to `refreshContract`: - -* [refreshNftMetadata](/reference/refreshnftmetadata-sdk): Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. - -* [searchContractMetadata](/reference/searchcontractmetadata-sdk): Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-refreshnftmetadata.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-refreshnftmetadata.mdx deleted file mode 100644 index 8b213553..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-refreshnftmetadata.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: refreshNftMetadata -SDK -description: Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. -subtitle: Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. -url: https://docs.alchemy.com/reference/sdk-refreshnftmetadata -slug: reference/sdk-refreshnftmetadata ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Refreshes the cached metadata for a provided NFT contract address and token id. Returns a boolean value indicating whether the metadata was refreshed. - -This method is useful when you want to refresh the metadata for an NFT that has been updated since the last time it was fetched. - - - Note that the backend only allows one refresh per token every 15 minutes, globally for all users. The last refresh time for an NFT can be accessed on the `Nft.timeLastUpdated` field. - - -To trigger a refresh for all NFTs in a contract, use [refreshContract](/reference/refreshcontract-sdk) instead. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | -------------------------------- | -| `contractAddress` | `string` | The contract address of the NFT. | -| `tokenId` | `string` | Token id of the NFT. | - -# Response - -| Property | Type | Description | -| ------------------ | --------- | ---------------------------- | -| `Promise` | `boolean` | specifies `true` or `false`. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const contractAddress = "0x06012c8cf97bead5deae237070f9587f8e7a266d"; - const tokenId = "1"; - //Call the method - let response = await alchemy.nft.refreshNftMetadata(contractAddress, tokenId) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - false - ``` - - -# Use Cases - -Here are some potential use cases for the `refreshNftMetadata` method: - -* **Updating NFT information**: NFT owners can use the `refreshNftMetadata` method to update the metadata associated with their NFT. For example, they can update the name, description, image, or other attributes. - -* **Correcting errors**: Sometimes errors can occur in the metadata associated with an NFT. For example, the wrong image may have been uploaded or the description may contain a typo. The `refreshNftMetadata` method can be used to correct these errors. - -* **Improving NFT marketability**: The metadata associated with an NFT can have a significant impact on its marketability. By updating the metadata, NFT owners can improve the chances of their NFTs being sold or traded. - -# Related Methods - -Here are some methods that are similar to the `refreshNftMetadata` method: - -* [refreshContract](/reference/refreshcontract-sdk) - Triggers a metadata refresh of all NFTs in the provided contract address. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-searchcontractmetadata.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-searchcontractmetadata.mdx deleted file mode 100644 index 60b1cc85..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-searchcontractmetadata.mdx +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: searchContractMetadata - SDK -description: Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. -subtitle: Search for a keyword across the metadata of all ERC-721 and ERC-1155 smart contracts. -url: https://docs.alchemy.com/reference/sdk-searchcontractmetadata -slug: reference/sdk-searchcontractmetadata ---- - -Search for a keyword across the metadata of all `ERC-721` and `ERC-1155` smart contracts. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Search for a keyword across the metadata of all `ERC-721` and `ERC-1155` smart contracts. - -# Parameters - -| Name | Type | Description | -| ------- | -------- | ------------------------------------------------------------------- | -| `query` | `string` | The search string that you want to search for in contract metadata. | - -# Response - -| Property | Type | Description | -| ------------------------ | ------------------ | ----------------------------------------------- | -| `Promise` | `array of objects` | An array of objects returning the nft metadata. | - -### `NftContract` response parameters - -| Property | Type | Description | -| --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------- | -| `tokenType` | `string` | The type of token in the contract. Options are: `ERC721` = "ERC721", `ERC1155` = "ERC1155", `UNKNOWN` = "UNKNOWN" | -| `name` | `string` | The name of the contract. | -| `symbol` | `string` | The symbol of the contract. | -| `totalSupply` | `string` | The number of NFTs in the contract as an integer string. This field is only available on ERC-721 contracts. | -| `openSea` | `object` | OpenSea's metadata for the contract. | -| `contractDeployer` | `string` | The address that deployed the NFT contract. | -| `deployedBlockNumber` | `number` | The block number the NFT contract deployed in. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const kw = "hair" - - //Call the method to fetch metadata - const response = await alchemy.nft.searchContractMetadata(kw) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - [ - { - address: '0x1eac31a0b93e81bd093d116f5d36a83be08f381b', - name: 'Sneakr Token', - symbol: 'SNKR', - totalSupply: '326', - tokenType: 'ERC721', - openSea: { - floorPrice: 1, - collectionName: 'SneakrCred Drop 1: EthAIReum', - safelistRequestStatus: 'verified', - imageUrl: 'https://i.seadn.io/gae/7JKgjQsQP6PNiuuT6J7upfs4Iq3btwg1zFMxpzvW9ZFpGFWrf0i2H08vbG-1glj9ZY9HDUxco5z_xMWc7e_f5myd5A?w=500&auto=format', - description: 'The first official Sneakr Drop.', - externalUrl: 'https://www.sneakrcred.com', - twitterUsername: undefined, - discordUrl: undefined, - lastIngestedAt: '2023-02-27T00:27:33.000Z' - }, - contractDeployer: '0xccb74148d315b0397da4e3c7482036dbadd762e5', - deployedBlockNumber: 9458121 - }, - { - address: '0x7e2a853626d75321d2b6ed060f6320324d31b7e8', - name: 'Happy Little Hairdos', - symbol: 'HLHD', - totalSupply: '235', - tokenType: 'ERC721', - openSea: { - floorPrice: 0.25, - collectionName: 'Happy Little Hairdos', - safelistRequestStatus: 'approved', - imageUrl: 'https://i.seadn.io/gae/bx3ZIky25jfqxG_ield-BWVNuWvoOLJsqm-1TPN90xVuzyLrEjROQAX_Qf2jgMb5OrCsF_OKaRWq3DEpWztPRK2DriuRMN997kar?w=500&auto=format', - description: 'Happy Little Hairdos is a parody collection of 10,000 unique NFTs celebrating the man we all know as the painter with a Fro. Straight from the imagination & hand of artist J.J. Weinberg, what began as a Prismacolor illustration on paper in 2014 & an idea of a ☕ table ???? has found its way onto the blockchain. Weinberg is determined to push the envelope on the connection of the metaverse & the physical world. Let the #FROMO begin!\r\n' + - '\r\n' + - 'Details - www.happylittlehairdos.com\r\n' + - '\r\n' + - 'Highlights\r\n' + - '\r\n' + - 'Art / Print quality images 3000x3000k (Set to print at 10”x10” 300 dpi)\r\n' + - 'Coffee table book featuring “Curated Cuts” & randomly chosen HLHD’s\r\n' + - 'Infinite “Bob”jects\r\n' + - 'Early access to merch via the Fromo Boutique\r\n' + - '“Curated Cuts for a Cause” the rarity’s for charity on these special tokens outside of the 10K\r\n' + - 'Access to Alexander Bill’s “ART”cade\r\n' + - 'Special token access to commissioned work by the artist & derivative license\r\n' + - 'Joy of Minting mini-series\r\n' + - 'Special thanks @cheforche - IG @jjweinberg - IG', - externalUrl: 'https://www.happylittlehairdos.com', - twitterUsername: 'happylittlehair', - discordUrl: 'https://discord.gg/kWFU5xP74W', - lastIngestedAt: '2023-02-23T04:54:27.000Z' - }, - contractDeployer: '0x5582809dd5d7b8848397c6033d8a41e4b06f8ded', - deployedBlockNumber: 12885162 - }, - { - address: '0x82cb9d20862641301c987f0b096086d32bc11b65', - name: 'AStrandOfHair', - symbol: 'ASOH', - totalSupply: '10358', - tokenType: 'ERC721', - openSea: { - floorPrice: 0, - collectionName: 'AStrandOfHair', - safelistRequestStatus: 'approved', - imageUrl: 'https://i.seadn.io/gcs/files/5aa37f4f867ad6f1d5ab710f67f6cfdd.jpg?w=500&auto=format', - description: "It's a metaverse built by wizards. From just a strand of hair to the entire world. We are not just a meme, we are a culture strongly rooted by our community. ", - externalUrl: 'https://astrandofhair.xyz/', - twitterUsername: 'Hair_xyz', - discordUrl: undefined, - lastIngestedAt: '2023-02-23T08:27:10.000Z' - }, - contractDeployer: '0xc4c2a776a352a8994be83d2ef2bb4a9604dc6e97', - deployedBlockNumber: 15210942 - }, .... - } - ] - ``` - - -# Use Cases - -Here are some potential use cases for the `searchContractMetadata` method: - -* **Finding relevant smart contracts**: If you are looking for a particular smart contract to interact with on a blockchain network, you can use `searchContractMetadata` to find contracts that match certain metadata criteria, such as contract name, author, or version. - -* **Analyzing smart contract usage**: Blockchain networks allow for the deployment of multiple instances of the same smart contract, each with its own metadata. `searchContractMetadata` can be used to analyze metadata from various instances of a particular contract to gain insights into its usage patterns and adoption rates. - -* **Auditing smart contracts**: Smart contracts are self-executing and can be complex, making them susceptible to bugs and vulnerabilities. `searchContractMetadata` can be used to audit the metadata associated with a particular smart contract to ensure that it is trustworthy and secure. - -# Related Methods - -* [getNftMetadata](/reference/getnftmetadata-sdk): Get the NFT metadata associated with the provided parameters. - -* [getNftMetadataBatch](/reference/getnftmetadatabatch-sdk): Gets the NFT metadata for multiple NFT tokens. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-send.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-send.mdx deleted file mode 100644 index d869bf37..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-send.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: send - SDK -description: Allows sending a raw message to the Alchemy backend. -subtitle: Allows sending a raw message to the Alchemy backend. -url: https://docs.alchemy.com/reference/sdk-send -slug: reference/sdk-send ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Allows sending a raw message to the Alchemy backend. - -# Parameters - -| Name | Type | Description | -| -------- | -------- | ------------------------------------------------- | -| `params` | `array` | The parameters to pass to the method. | -| `method` | `string` | The method to call, e.g., `eth_getBlockByNumber`. | - -# Response - -| Property | Type | Description | -| -------------- | -------- | ----------------------------------------------------- | -| `Promise` | `object` | Returns an object corresponding to the method called. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `send` request using the Alchemy SDK: - - - ```javascript send.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - let method = "eth_getBlockByNumber"; - let params = ["0xEDD023", false]; - - //Call the method - let response = await alchemy.core.send(method, params) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```shell shell - { - number: '0xedd023', - hash: '0x18760312114f3fdf11f9d5846245995835aa59994d5fc4203faee52d2f7eaabe', - transactions: [ - '0xcbe7ce4c134f142265f66002865b9c70c653f331db166bd04145d017099d32a5', - '0xf0605f4c7e07737142a6dfccf44dd77faab6574404bf99faab9e347addeef728', - '0xf95639f915762ea2e57f4009595b1d7a00b4e896334695d75ec5e658bf0be6f8', - '0x3711b290df2402ce92eac90682c31814b90f89a8ab76878f479b3816455255b9', - '0xb903a9bb990b2f0576e84b72c3ba997b0e1e0e35656fcb35388021669ab10939', - '0x4bdd80fc079e3ed9f34f3851ac6ec393f80d6029eb0933ecdb317a5ca8929a3a', - '0x0b6188fbd2727060e03c657286eecf2819fb114a44a332bea98db5a14389de73', - '0x9724e919acff0392810d6cb373ecb315caa2c8ea93af3c2dee20c426ab252834', - '0xcbfe9a33127daa41b4254d041f1f44cfde317f011013e5576fb02ba7cf23c96f', - '0x0f0d44dbde0b877f8b51ceaebf05f4189afe12da0bf71bb0e85a2969c2c068be', - '0x4c9ca3b0ff18af68b11f17e3fcd71308c6dfef625b10f60c953114254a33f280', - '0x5ff2f1bbb2adfe70be2616abadf1e5c4840e49e25f8608ec5ebe916bcd9e3d5c', - '0x6eb27c6b68c7d0813e4751b245dbe456d3a1aa3522d63adc5a885cc92dfbf694', - '0xdaf12541d960f59e07454ed8652751326d8a7f0cd51c80aa658abd0f46b514fe', - '0x1666d9a752e1d5b3e59f5c59d0e13b5cfddee4e420d0d0eea170cfa6caca2fd6', - '0x3ef79b21db8716ad87fa08976b509ea8c8f9687859052b0dfe4db97fad9ac52f', - '0x6954f24dcffff19b99ff20d85a19173871efb1c3f7d07634f0ee894d47f3e306', - '0xd77574d4a17e8657b5297ac924803a7e26181abc9d0f7b8610c5dfa7251cbb87', - '0xbbd1c5ce3b55fec2153449b98351399e35a279a90961776ffbc47ad51ffece65', - '0x47169a29662dee6acb6b7fe3d8cb38f28bc107242d7e08aa6123ab6d5df4b95b', - '0x7a00d99e26bda5d9008e3948eb6548f84b19fe86740add3721c2701b0e85c2d8', - '0xc5b2f3fba21affb3eb84895551ed25ab497509026b3a6db6df97977c92d313c2', - '0x531e9dadda5a6ed8b65e99f342ac7f861173ad6ab261116883ddd124317338b1', - '0xe902d41d7600b7ed1bf36aeb0f544eaded9db41148cdd593b9b80c69cc7cd4cb', - '0xa3bd42e0a83f8ca5a2c23cb5d195897bfacc8d6897664c51eb7ba150594a003c', - '0x5cc61393f3dc49563f73aa6cbee365e8feef77b5b1da152b8c6cca6a39849e14', - '0x70e3dac3e3ca3ddd9453d7122f04603901f22ed8d18b001877c4436ecd20e5cd', - '0xe081332bc5456121715f91948e59a201555250f756238a7617a90e8f8026d0bd', - '0xa903afcd80f69f4beff17735e87c267fb2a653937f96a95c1051782529eeac0b', - '0xf54f3420c1f7504d3260d3e9cd48521dc42785317df2f280d63fc614f731008c' - ], - difficulty: '0x0', - extraData: '0x', - gasLimit: '0x1c9c380', - gasUsed: '0x1d41ca', - logsBloom: '0x00020000210008000200000400000001006042000400000000000000041000400020040000043000200a0811000101000a8002000b18200000080000002060000000080000008008280001280400000400000040004002000080080034000450020010020200004010011041000008080000028000000600000001100008408000000000228004280808000000000180008059000110400120284000011030041240210400017000020f0080000064020000200004008001003100022008800840000632000030000100084000000080012000200108010100400102001062000210200800008080000011084000080200001000400000000000088200800000', - miner: '0x388c818ca8b9251b393131c08a736a67ccb19297', - mixHash: '0x006ff88775a192a1a71dd002325549419f37a2f69732bd3f004d16fb35ac16fc', - nonce: '0x0000000000000000', - parentHash: '0xdf690ffd33a8715fcd6622426c2b498064e1fd8ed585da053302185f9bd7ad59', - receiptsRoot: '0x1086fbfce054458970c81893549fbf0c3861a183f96d2bb2c6e83aec97799aac', - sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - size: '0x21d4', - stateRoot: '0x562c00e97e229c109f1979bd0bb9836f567f8468c6a535990a0b05e2d4861a3a', - timestamp: '0x632bac4b', - totalDifficulty: '0xc70d815d562d3cfa955', - transactionsRoot: '0x25bc257b1b2393f16a7a0331986c1faa2dcc6b6cdae0be01783734bc70f5eb9b', - uncles: [], - baseFeePerGas: '0x1deff4daf' - } - ``` - - -# Use Cases - -Here are some possible use cases for the `send` method: - -* **Sending Ether**: The `send` method can be used to send Ether from one Ethereum address to another. This is the most common use case for the send function and is used in a wide variety of applications, from simple wallet transfers to complex smart contract interactions. - -* **Sending Tokens**: In addition to Ether, the `send` method can also be used to send ERC-20 tokens. This is particularly useful for decentralized applications (dApps) that require the transfer of tokens as part of their functionality. - -* **Triggering Smart Contract Interactions**: The `send` method can be used to trigger smart contract interactions, such as executing a function or changing a contract's state. This is a powerful feature that enables developers to build complex dApps that interact with the Ethereum blockchain. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-sendtransaction.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-sendtransaction.mdx deleted file mode 100644 index c846f2ab..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-sendtransaction.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: sendTransaction - SDK -description: Submits transaction to the network to be mined. The transaction must be signed, and be valid (i.e. the nonce is correct and the account has sufficient balance to pay for the transaction). -subtitle: Submits transaction to the network to be mined. The transaction must be signed, and be valid (i.e. the nonce is correct and the account has sufficient balance to pay for the transaction). -url: https://docs.alchemy.com/reference/sdk-sendtransaction -slug: reference/sdk-sendtransaction ---- - -Submits transaction to the network to be mined. The transaction must be signed, and be valid (i.e. the `nonce` is correct and the account has sufficient balance to pay for the transaction). - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Submits transaction to the network to be mined. The transaction must be signed, and valid (i.e. the `nonce` is correct and the account has sufficient balance to pay for the transaction). - -# Parameters - -| Name | Type | Description | -| ------------------- | -------- | ------------------------------- | -| `signedTransaction` | `string` | The signed transaction to send. | - -# Response - -| Property | Type | Description | -| ------------------------------ | -------- | --------------------------------- | -| `Promise` | `object` | Returns the transaction response. | - -### `TransactionResponse`. object parameters - -| Property | Type | Description | -| --------------- | -------- | ----------------------------------------------------------------------------------------------------------- | -| `hash` | `string` | The transaction hash. | -| `from` | `string` | `20 Bytes`. The `from` address. | -| `blockNumber?` | `number` | The block number where this log was in. null when its pending. `null` when its pending log. | -| `blockHash?` | `string` | `32 Bytes` - hash of the block where this log was in. `null` when its pending. `null` when its pending log. | -| `timestamp?` | `number` | `Optional`. Returns only if a transaction has been mined. | -| `confirmations` | `number` | number of transaction confirmations. | -| `raw` | `string` | Raw value. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network, Wallet, Utils } = require("alchemy-sdk"); - const dotenv = require("dotenv"); - dotenv.config(); - - //Replace with your own private key - const {PRIVATE_KEY} = process.env; - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - const wallet = new Wallet(PRIVATE_KEY); - - const main = async () => { - // define the transaction - const transaction = { - to: "0xa238b6008Bc2FBd9E386A5d4784511980cE504Cd", - value: Utils.parseEther("0.001"), - gasLimit: "21000", - maxPriorityFeePerGas: Utils.parseUnits("5", "gwei"), - maxFeePerGas: Utils.parseUnits("20", "gwei"), - nonce: await alchemy.core.getTransactionCount(wallet.getAddress()), - type: 2, - chainId: 5, // Corresponds to ETH_GOERLI - }; - - const rawTransaction = await wallet.signTransaction(transaction); - const response = await alchemy.transact.sendTransaction(rawTransaction) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - value: { - to: '0xa238b6008Bc2FBd9E386A5d4784511980cE504Cd', - value: BigNumber { _hex: '0x038d7ea4c68000', _isBigNumber: true }, - gasLimit: '21000', - maxPriorityFeePerGas: BigNumber { _hex: '0x012a05f200', _isBigNumber: true }, - maxFeePerGas: BigNumber { _hex: '0x04a817c800', _isBigNumber: true }, - type: 2, - chainId: 5 - } - } - ``` - - -# Use Cases - -Here are some potential use cases for the `sendTransaction` method: - -* **Sending ETH**: `sendTransaction` can be used to send Ether from one Ethereum address to another. This is one of the most common use cases for sendTransaction. - -* **Deploying a smart contract**: When you deploy a smart contract to the Ethereum blockchain, you need to send a transaction that includes the bytecode of the contract. `sendTransaction` can be used to send this transaction. - -* **Interacting with a smart contract**: Once a smart contract has been deployed, you can interact with it by sending transactions that call its functions. `sendTransaction` can be used to send these transactions. - -* **Token transfers**: Tokens on the Ethereum blockchain are often built using smart contracts. `sendTransaction` can be used to transfer tokens from one Ethereum address to another. - -# Related Methods - -Here are the methods related to `sendTransaction`: - -* [sendPrivateTransaction](/reference/sendprivatetransaction-sdk): Used to send a single transaction to Flashbots. Flashbots will attempt to send the transaction to miners for the next 25 blocks. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-summarizenftattributes.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-summarizenftattributes.mdx deleted file mode 100644 index 5b478256..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-summarizenftattributes.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -title: summarizeNftAttributes - SDK -description: Get a summary of attribute prevalence for an NFT collection. -subtitle: Get a summary of attribute prevalence for an NFT collection. -url: https://docs.alchemy.com/reference/sdk-summarizenftattributes -slug: reference/sdk-summarizenftattributes ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Get a summary of attribute prevalence for an NFT collection. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ---------------------------------------- | -| `contractAddress` | `string` | Contract address for the NFT collection. | - -# Response - -| Property | Type | Description | -| -------------------------------- | ------------------ | -------------------------------------------- | -| `Promise` | `array of objects` | An array of objects containing nft metadata. | - -### `NftAttributesResponse` object parameters - -| Property | Type | Description | -| ----------------- | -------- | -------------------------------------------------------------------------------------- | -| `contractAddress` | `string` | The specified NFT contract's address. | -| `totalSupply` | `number` | The specified NFT contract's total supply. | -| `summary` | `string` | The attribute prevalence of each trait grouped by the trait type for the provided NFT. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - const collection = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to fetch a summary a attribute prevalence for an NFT collection. - const response = await alchemy.nft.summarizeNftAttributes(collection) - - //Logging the response to the console - console.log(response) - }; - - main(); - ``` - - -## Response - - - ```json json - { - summary: { - Fur: { - Tan: 626, - 'Death Bot': 175, - Trippy: 77, - Brown: 1370, - Gray: 496, - 'Golden Brown': 778, - Blue: 490, - Noise: 155, - Zombie: 302, - Cream: 636, - 'Solid Gold': 46, - Dmt: 215, - Black: 1229, - Cheetah: 406, - 'Dark Brown': 1352, - Red: 474, - Pink: 511, - White: 397, - Robot: 265 - }, - Eyes: { - Heart: 394, - Sleepy: 751, - Eyepatch: 333, - 'X Eyes': 243, - Zombie: 308, - Angry: 432, - Coins: 479, - 'Blue Beams': 49, - 'Wide Eyed': 549, - Hypnotized: 220, - Bloodshot: 846, - Blindfold: 264, - Sunglasses: 352, - '3d': 487, - Bored: 1714, - 'Laser Eyes': 69, - Cyborg: 108, - Crazy: 407, - Closed: 710, - Sad: 551, - Scumbag: 233, - Robot: 350, - Holographic: 151 - }, - Background: { - Gray: 1170, - Aquamarine: 1266, - Blue: 1242, - Purple: 1291, - Yellow: 1283, - 'New Punk Blue': 1232, - 'Army Green': 1243, - Orange: 1273 - }, - Mouth: { - 'Phoneme Vuh': 333, - Discomfort: 208, - 'Bored Unshaven Pipe': 101, - 'Bored Cigarette': 710, - Rage: 266, - 'Bored Bubblegum': 119, - 'Bored Pizza': 50, - Grin: 713, - 'Bored Party Horn': 88, - Bored: 2272, - 'Bored Unshaven Bubblegum': 65, - 'Bored Unshaven Cigarette': 438, - Jovial: 296, - 'Tongue Out': 202, - 'Grin Multicolored': 116, - 'Small Grin': 272, - 'Bored Unshaven Party horn': 45, - 'Phoneme ooo': 255, - 'Bored Unshaven': 1551, - 'Bored Unshaven Pizza': 26, - 'Bored Unshaven Dagger': 28, - 'Phoneme Wah': 163, - 'Phoneme Oh': 237, - Dumbfounded: 505, - 'Bored Pipe': 132, - 'Grin Gold Grill': 91, - 'Bored Unshaven Cigar': 94, - 'Phoneme L': 241, - 'Bored Unshaven Kazoo': 61, - 'Grin Diamond Grill': 78, - 'Bored Dagger': 49, - 'Bored Cigar': 121, - 'Bored Kazoo': 74 - }, - Hat: { - "Trippy Captain's Hat": 65, - 'Bayc Flipped Brim': 231, - 'Short Mohawk': 318, - Safari: 182, - 'Cowboy Hat': 354, - "Sea Captain's Hat": 304, - 'Vietnam Era Helmet': 223, - 'Sushi Chef Headband': 187, - 'Irish Boho': 225, - "Girl's Hair Short": 150, - 'Laurel Wreath': 72, - "Girl's Hair Pink": 105, - 'Bayc Hat Red': 119, - Horns: 252, - "Fisherman's Hat": 345, - Bowler: 262, - 'Spinner Hat': 181, - 'Faux Hawk': 136, - "Seaman's Hat": 420, - 'Ww2 Pilot Helm': 110, - 'Party Hat 1': 120, - 'Party Hat 2': 107, - Beanie: 578, - "King's Crown": 77, - 'Army Hat': 294, - 'Commie Hat': 304, - 'Bunny Ears': 195, - 'S&m Hat': 235, - 'Stuntman Helmet': 157, - Fez: 377, - 'Bandana Blue': 89, - 'Bayc Hat Black': 228, - Halo: 324, - 'Police Motorcycle Helmet': 130, - 'Prussian Helmet': 130, - "Baby's Bonnet": 158 - } - }, - totalSupply: 10000, - contractAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d' - } - ``` - - -# Use Cases - -Here is a potential use case for the `summarizeNftAttributes` method: - -* Users can use the `summarizeNftAttributes` method to get an overview of all the traits in an NFT Collection and also find out which traits are rare. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-traceblock.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-traceblock.mdx deleted file mode 100644 index 5174850e..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-traceblock.mdx +++ /dev/null @@ -1,2018 +0,0 @@ ---- -title: traceBlock - SDK -description: Replays a block that has already been mined. -subtitle: Replays a block that has already been mined. -url: https://docs.alchemy.com/reference/sdk-traceblock -slug: reference/sdk-traceblock ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`traceBlock`replays a block that has already been mined. - -# Parameters - -| Name | Type | Description | Example | -| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | -| `blockIdentifier` | `object` | The block to debug. Can be a block hash, block number hex string, or a commitment level. There are the following commitment levels: 1. `pending`: Sample next block inferred by Alchemy built on top of the latest block. 2. `latest`: The most recent block in the canonical chain observed by Alchemy. 3. `safe`: The most recent crypto-economically secure block that cannot be re-orged outside of manual intervention driven by community coordination. This is only available on Goerli testent. 4. `finalized`: The most recent secure block that has been accepted by >2/3 of validators. This block is very unlikely to be re-orged. This is only available on Goerli testnet. 5. `earliest`: The lowest numbered block available that is usually the first block created. | `0x5568A`, `latest`, `0x04e19fc95ec33e65c667d26a69d66d024732891c13742a345f5001ff900bd60a `etc. | -| `tracer` | `object` | Tracer type and configuration. This tracer tracks all call frames executed during a transaction, including depth 0. The returned result is a nested list of call frames executed as part of the call. It is an object with the following options: 1. `type`: The type of tracer to use during the execution. The options are [`callTracer`](/reference/debug-tracecall#calltracer) and [`prestateTracer`](/reference/debug-tracecall#prestatetracer) 2. `onlyTopCall?`: Whether to only trace the main (top-level) calls and ignore sub-calls. It is a boolean and defaults to `false`. | `{ type: callTracer, onlyTopCall: true }` | - -# Response - -The `traceBlock` method returns a response object with the following properties. - -| Property (Field) | Description | -| ---------------- | ------------------------------------------------------------ | -| `type` | The type of call: `CALL` or `CREATE` for the top-level call. | -| `from` | From address of the transaction. | -| `to` | To address of the transaction. | -| `value` | Amount of value transfer as a hex string. | -| `gas` | Gas provided for call as a hex string. | -| `gasUsed` | Gas used during the call as a hex string. | -| `input` | Call data. | -| `output` | Return data. | -| `errror?` | Optional error field. | -| `revertReason?` | Solidity revert reason, if the call reverted. | -| `calls?` | Array of sub-calls executed as part of the original call. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```text yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `traceBlock` request using the Alchemy SDK: - - - ```javascript getTransaction.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the traceBlock method - const main = async () => { - // The block to debug. - let block = "latest"; - - // Tracer type and configuration. - let tracerConfig = { - type: "callTracer", - onlyTopCall: true, - }; - - // Calling the traceCall method - let response = await alchemy.debug.traceBlock(block, tracerConfig); - - // Logging the response to the console - console.log(response); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json traceBlock response - [ - { - "result": { - "type": "CALL", - "from": "0x4970197593ef5aed9d2c33409b953f5f9bb22563", - "to": "0x00000000008c4fb1c916e0c88fd4cc402d935e7d", - "value": "0x0", - "gas": "0x1d16ed", - "gasUsed": "0x20607", - "input": "0x06e399490e04c2b0f2a7f736d3b908bdde8608177c8fc28c1690f1ee7348e45ef0e838c705c2eece6d414d4aab3f3a880652f47bfaa771908c07dd8673a787daed3a003e5b0e9a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a58335e010000000000000000000000000000000000000000000000792e54dff737a4f35000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xec640f1dbe4c3e880c69c988ca5398028f770266", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x64fc8", - "gasUsed": "0x4a6c3", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e30fb700000000000000000000000000000000000000000000000000000000000000040a08000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000001600000000000000000000000003a880652f47bfaa771908c07dd8673a787daed3a000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3156b00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041111d0f98eeaa4cafb38f3d6697a8e7ca83918ad36664e6d76653348e247790392576049075b2e8e7ffe88398e927e10dc0b1c7713657cdf4cd366bc98edebce31c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000086e4085398776b4943000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000003a880652f47bfaa771908c07dd8673a787daed3a000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c79aef20e01a400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000084c79aef20e01a4", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x4970197593ef5aed9d2c33409b953f5f9bb22563", - "to": "0x00000000008c4fb1c916e0c88fd4cc402d935e7d", - "value": "0x0", - "gas": "0x3e353", - "gasUsed": "0x2293e", - "input": "0x07e399490e04f1ee7348e45ef0e838c705c2eece6d414d4aab3fc2b0f2a7f736d3b908bdde8608177c8fc28c1690a0b86991c6218b36c1d19d4a2e9eb0ce3606eb483a880652f47bfaa771908c07dd8673a787daed3a000000000000000000000000000000000000000000000000000000005f48dd540000000000000000000000000000000000000000000000d060d0fc3307ce45cf0000000000000000000000000000000000000000000000000000000000000000006926cfde0100000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x77ad3a15b78101883af36ad4a875e17c86ac65d1", - "to": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", - "value": "0xb8bb52bb", - "gas": "0x1b108", - "gasUsed": "0xd033", - "input": "0x11733f6c5aea6314efbd34195b1ae7f070379aa3f000000000000000000000000008f7ea8911420412e765bfa6d85aaac94b4f7b708c89be2e2b01f4", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x491336a7d4e49996f5f4c07d51dfc4eb501a541e", - "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45", - "value": "0x0", - "gas": "0x44d03", - "gasUsed": "0x353e2", - "input": "0x5ae401dc0000000000000000000000000000000000000000000000000000000063e3159f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000124b858183f00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080000000000000000000000000491336a7d4e49996f5f4c07d51dfc4eb501a541e0000000000000000000000000000000000000000000000000000000165a85d2000000000000000000000000000000000000000000000000000000000113c99660000000000000000000000000000000000000000000000000000000000000042dac17f958d2ee523a2206206994597c13d831ec70001f4a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4420412e765bfa6d85aaac94b4f7b708c89be2e2b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000113c9eeb" - } - }, - { - "result": { - "type": "CALL", - "from": "0x77ad3a15b78101883af36ad4a875e17c86ac65d1", - "to": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", - "value": "0xba54e866", - "gas": "0x189a6", - "gasUsed": "0xb86b", - "input": "0x12733f6c5aea6314efbd34195b1ae7f070379aa3f000000000000000000000000008f7ea8812420412e765bfa6d85aaac94b4f7b708c89be2e2b01f4", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xccfb4b91ff5d1a2319c96ab6b59be4cdefb8437d", - "to": "0x000000000dfde7deaf24138722987c9a6991e2d4", - "value": "0xfd0253", - "gas": "0x5c24c", - "gasUsed": "0x12331", - "input": "0xe0f6740b000000000000000000000000e45b4a84e0ad24b8617a489d743c52b84b7acebe000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000005b7533812759b45c2b44c19e320ba2cd2681b542000000000000000000000000000000000000000000000000188f10884e62111c0000000000000000000000000000000000000000000000000000006c05829eb7", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x644268d381ec51203266e1daf2f608aefd05c3e1", - "to": "0x7f29b85834d6a2ba4bb1c64325686c6057b1b3c5", - "value": "0x61b31ab352c0000", - "gas": "0x5ab06", - "gasUsed": "0x5ab06", - "input": "0xeea3ea3f0000000000000000000000002fc6ca8047ca95fcaab0b380ec1f367b6ca90a230000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000041418c12f7cb5e94e4d052c62c3af7a7163e6a4c5a0e8217c588a2451b23ed09515feb1e3061e0c2082e0925d784690bd6e0b689503ff4def2818f44832ac6547e1c00000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x44533302d433fba8b230f3b1a884d113066d4016", - "to": "0x7f29b85834d6a2ba4bb1c64325686c6057b1b3c5", - "value": "0x61b31ab352c0000", - "gas": "0x5a131", - "gasUsed": "0x5a131", - "input": "0xeea3ea3f00000000000000000000000044533302d433fba8b230f3b1a884d113066d4016000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004133e0d03c629b6dbbd983a76cfd3b82e180b15ea38bc95f4740cfdfd089d798c31bb9497a076fcbd87311d3cf346c162b2ef6705771176c7298e71a07803704741b00000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x45c23ed336ecee9c738f9433853acce9f84aa3fa", - "to": "0x1d1cbdd1b22801121929e0a64929b4e65bea5723", - "value": "0x0", - "gas": "0x3059d0", - "gasUsed": "0x30b51", - "input": "0x44bc90af00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000009000000000000000000000000fb7ecd86bcb8dc6a3ec68be7c9fe5965144aea83000000000000000000000000ae26630a7b02be6ae0e99c3974bdf07b631bec16000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000d6e24a896ea4069b7f011139489a81c62d6da1c000000000000000000000000465189f89b525a58b8db12e45b940a5d92d2dfd9000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c48b6ac33c9d7256eac30c2cce129f0332be3ed8000000000000000000000000f823d524d9bccfef733c5b8455dc20f53618bc69000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000005916b251c46596a83c94d9b05af9244dd0b0ba49000000000000000000000000706176fadb0ae74bf508a6d20b6e9d93ea01de79000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000004c315af217543b01a184f8c831497d76088e319d000000000000000000000000f14fc70135d6929d08da4eb8fcd97cbc4db78ca2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000e50e73a78bf111d19a9c6f8630062ca5c6f4f29400000000000000000000000056f1de3c47d8b3d167cc42f2e0a8a25ebff1cf20000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000013d9789cf817949b4845e89438a0609a9468760c0000000000000000000000008b8572b7d380e2803211570bf017b674ca9389ec000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000f61d74f5c0aa27163a2213beb5c8a9e421bc4813000000000000000000000000268631bde48388ea741b5474767a4d43dc375036000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000686e635c39e4b0e00ab1ba70d1d0543f9b24a5c500000000000000000000000071bb1b737d6a01c5681704a54095a0deb889a527000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x59198d89a4881265a1170073efe20188098da5ac", - "to": "0x99a58482bd75cbab83b27ec03ca68ff489b5788f", - "value": "0x0", - "gas": "0x5d35e", - "gasUsed": "0x46445", - "input": "0x9db4f7aa000000000000000000000000c55126051b22ebb829d00368f4b12bde432de5da0000000000000000000000006e314039f4c56000f4ebb3a7854a84cc6225fb92000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f90f8ec529238550000000000000000000000000000000000000000000000000e75118b94a2567b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x0000000000000000000000000000000000000000000000000e78c5f79aad435a" - } - }, - { - "result": { - "type": "CALL", - "from": "0x888c15c949a7bb3360bf023944db440138c4946e", - "to": "0x88df592f8eb5d7bd38bfef7deb0fbc02cf3778a0", - "value": "0x0", - "gas": "0x8d334", - "gasUsed": "0x1348c", - "input": "0xa9059cbb000000000000000000000000a35a27aff2641129beb8a51f782c1270daa558d9000000000000000000000000000000000000000000000000e33fafbdd5058000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x4f28f1f438c3f7ab6648989a5cc2e3e7e96feb03", - "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", - "value": "0x0", - "gas": "0x401e1", - "gasUsed": "0x26829", - "input": "0x791ac947000000000000000000000000000000000000000000000000001c34654ad9620000000000000000000000000000000000000000000000000001edf307ad2bfd9c00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000004f28f1f438c3f7ab6648989a5cc2e3e7e96feb030000000000000000000000000000000000000000000000000000000063e30f250000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ade00882d86a0f4d84c2a36819b79aba3074d6af000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x005fde5294199d5c3eb5eb7a6e51954123b74b1c", - "to": "0x4a137fd5e7a256ef08a7de531a17d0be0cc7b6b6", - "value": "0x98acbdc6a650", - "gas": "0x8aa80", - "gasUsed": "0x1e227", - "input": "0xec0ab6a7000000000000000000000000000000000000000000000000000098acbdc6a650000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104414bf3890000000000000000000000001f9840a85d5af5bf1d1762f925bdaddc4201f984000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000004a137fd5e7a256ef08a7de531a17d0be0cc7b6b60000000000000000000000000000000000000000000000000000000063e30ee70000000000000000000000000000000000000000000000268e9c94e4d0fa000000000000000000000000000000000000000000000000000000000001280e6a12000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x0d0707963952f2fba59dd06f2b425ace40b492fe", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0xeedd8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000db519336b92bc6fb72d43fdff6471bacdea8b139000000000000000000000000000000000000000000000000000000001fbe0174", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x96ea9e96b847996eb70f7ee110122e6895dd3fe9", - "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x6925", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000007735940", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x2faec4d3355a69e7954332bc2b9dc0d1f5ddfd37", - "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "value": "0x0", - "gas": "0x9604", - "gasUsed": "0x6925", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000007270e00", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x5370950cb85735c8fee79d54b6438e4dac316bfa", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000017a06e70", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9d40a3ce0597cd31e446dfe5807506d1d9fba608", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd290703000000000000000000000000000000000000000000000000000000001d8119c0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x4c8916b1c51a7225d8c6f88e817b33c6446fe638", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000018e64098", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xe82400e88c89360ae88e5332f36326c313acf35e", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd290703000000000000000000000000000000000000000000000000000000001911c8b9", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x70c2680bf4c34b54ec7a43a3b8ffd200d9c855ff", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd29070300000000000000000000000000000000000000000000000000000000191422b0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x39022b509cb6fc115695a1d3c60627ecfffd5ed0", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000017c49840", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x3292391318750cfcf2377bfb0e382f6bcfc36167", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000017dda2a0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc56b6be15d5d4d11aced8101fbe164845463bbf7", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd29070300000000000000000000000000000000000000000000000000000000173aced0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb5e37acb8e3532ceb6379ab5a1361076fff83fc4", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x95f8", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd290703000000000000000000000000000000000000000000000000000000003b023380", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x671e49f6616e7873816716f78a621469cd091e9c", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x9604", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000017d78400", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x65780cf5d3b4bc55d3d7ee73bb251956341446db", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x9604", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000000000000024f47300", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x0b5c4a7fcda49e0a8661419bb55b86161a86db2a", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x18058", - "gasUsed": "0xa281", - "input": "0xa9059cbb00000000000000000000000047616f1811f30a31a63ace953f2801a5fc22f23b000000000000000000000000000000000000000000000000000000003d4ff410", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x47dc027c76ee1302c0e77ec07f7a21ef7f57b444", - "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "value": "0x0", - "gas": "0xa555", - "gasUsed": "0x3674", - "input": "0x2e1a7d4d00000000000000000000000000000000000000000000000001599ba503c00000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf0521830264078de5586e9dde2d202aebdb22fb0", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x75a82714960a2090", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x94f0cf2b3332f31d0ac4769a94ecabcc41b8fa64", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x64691c0f2f896890", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xacb2c6c75067199a180a6b0006c336dcecf075d6", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x1ceefe8f0e6eb890", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa4ed328feadc567b29b193105e9ed0e339796672", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x189ea48a7a4f9c90", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa89ec017dfe46793f0dea80b45d33079c2da4f04", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0xf275e5a6ed155f8", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xfbca3bc9622ca977773fbb211085e95f86a13021", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x6d42e645dc52090", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x52292fc18eab8d6dfeb4fbefef5e227ca883dee8", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x347017c9ad2bb83", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x61a0e0d4d6145f267d0116c874bb896cf1abcbe6", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x30dd7d54add2090", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x8dfdf75f463fef6a16eb2d843a7e4360b3222a6e", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x307db55a86ad090", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc5e89100e3a314988d31a08d721a4bca46650ec8", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x2d1726c59aea090", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xd13b0c7445888d614f4fbbaeb5645e5a23ec4a01", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x1bc6cac85d4fc90", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x0eb7bb2119760c139f42abe9a86c572d19bb452d", - "to": "0x0dcb0bc432b0c57014dfa222058dbb070603df1f", - "value": "0x178d56fea782090", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xae45a8240147e6179ec7c9f92c5a18f9a97b3fca", - "to": "0x54d86c89b5e82e35253dbc29e03975dd817ceb04", - "value": "0x6612afabc9b0f", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xae45a8240147e6179ec7c9f92c5a18f9a97b3fca", - "to": "0x0fec0db40798a095cfcae0d4bd6eefa56a158f31", - "value": "0x67b027e1976cb", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x401a3d4183bacfbfe5052d3ae7aead00a6eaef01", - "to": "0xc944e90c64b2c07662a292be6244bdf05cda44a7", - "value": "0x0", - "gas": "0x4d5e", - "gasUsed": "0x3262", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd29070300000000000000000000000000000000000000000000006c6b935b8bbd400000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6c024c0d8b29824ce96a4a4dc47f561fa1f60289", - "to": "0xaea46a60368a7bd060eec7df8cba43b7ef41ad85", - "value": "0x0", - "gas": "0x5826", - "gasUsed": "0x3b5e", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000199650db3ca0600000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb8699e12c24df1bbb4b8f6017e8ac17793068bcf", - "to": "0xaea46a60368a7bd060eec7df8cba43b7ef41ad85", - "value": "0x0", - "gas": "0x5826", - "gasUsed": "0x3b5e", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000000000197a8f6dd551980000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x04b42f89fb78d04202a9ea5e320a84f15675e010", - "to": "0x7420b4b9a0110cdc71fb720908340c03f9bc03ec", - "value": "0x0", - "gas": "0x4e4e", - "gasUsed": "0x3328", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd29070300000000000000000000000000000000000000000000065a4da25d3016c00000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xe58cb11ba222c2cd597e3663a4b6411b9851c422", - "to": "0x839e71613f9aa06e5701cf6de63e303616b0dde3", - "value": "0x0", - "gas": "0x4d0f", - "gasUsed": "0x321a", - "input": "0xa9059cbb000000000000000000000000cffad3200574698b78f32232aa9d63eabd2907030000000000000000000000000000000000000000002e0aeb29da3b71a530c800", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x881374ab1e22f673578a2b22d4019a88ea0ebdde", - "to": "0xcffad3200574698b78f32232aa9d63eabd290703", - "value": "0xdb6dbcf24f3", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x5b3d5b497d91ca43a8a1b66461888016e9db323a", - "to": "0xcffad3200574698b78f32232aa9d63eabd290703", - "value": "0x3715b85f53a444", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x53f0b9d1b3b2ac4639c64746e22e782932b9221e", - "to": "0xcffad3200574698b78f32232aa9d63eabd290703", - "value": "0x365ee25cf9fd8c", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x64919eb2823e0dccb3bd29d24b7d4bc6ab992f0c", - "to": "0x53ff14d1d42dbba9f171b5c79182e7c4ec867160", - "value": "0x4922ee41b7c00", - "gas": "0x981d", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x5a52e96bacdabb82fd05763e25335261b270efcb", - "to": "0xac51066d7bec65dc4589368da368b212745d63e8", - "value": "0x0", - "gas": "0x3265", - "gasUsed": "0x3265", - "input": "0xa9059cbb00000000000000000000000028c6c06298d514db089934071355e5743bf21d600000000000000000000000000000000000000000000000000000005d21dba000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x421ebe75a526ee7c2199a69997a699f8d4094913", - "to": "0x6dfc34609a05bc22319fa4cce1d1e2929548c0d7", - "value": "0x189851bbb48a800", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xe119fe05a25efb8ad14292ea3933947e41cddfc2", - "to": "0x6dfc34609a05bc22319fa4cce1d1e2929548c0d7", - "value": "0x345acbc3df3400", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xd0d8f212a672830c15be9c29b7830cd9da688afc", - "to": "0x6dfc34609a05bc22319fa4cce1d1e2929548c0d7", - "value": "0xdb9f8684ad0800", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x151b381058f91cf871e7ea1ee83c45326f61e96d", - "to": "0x12cd6585ebf92b06bc4d08930b7926cc066a3576", - "value": "0x498a8a52d9c000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x609a59923c6a9d6ccd43ffdd7f6d3e20bedfaaa4", - "to": "0xf4ed146735321e6fde17ed89d6062f063ed02691", - "value": "0x0", - "gas": "0x111b5f", - "gasUsed": "0xac3f1", - "input": "0xbaa2067b000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000008ae0000000000000000000000000000000000000000000000000000000063e2d7f00000000000000000000000000000000000000000000000000000000063e429700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004167e5453175381bae79dd64b166b0c128b9b7c702d2ce70a2034c541e44def4d032923ad25111d447f5cb248106f4b4e5fdb698bc5d6f20d87fab1ebffe4620d81c00000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xfe42e9d4216d0fc999a28076b983a294537f90f7", - "to": "0xaea46a60368a7bd060eec7df8cba43b7ef41ad85", - "value": "0x0", - "gas": "0xa851", - "gasUsed": "0x7e2a", - "input": "0xa9059cbb00000000000000000000000056d617e2cbd5d0d392351fa9054562b2aa0b1171000000000000000000000000000000000000000000000c76c0b66ba71ccc0000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa5137efa76eec41c6c0309d7ef33dfe9e28ee5fc", - "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", - "value": "0x0", - "gas": "0x20ed0", - "gasUsed": "0x1cf5d", - "input": "0x18cbafe500000000000000000000000000000000000000000065768db5391f1727819372000000000000000000000000000000000000000000000000012af20d19b687f500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a5137efa76eec41c6c0309d7ef33dfe9e28ee5fc0000000000000000000000000000000000000000000000000000000063e3134700000000000000000000000000000000000000000000000000000000000000020000000000000000000000002e516ba5bf3b7ee47fb99b09eadb60bde80a82e0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "output": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000065768db5391f1727819372000000000000000000000000000000000000000000000000012c70b390e1af0a" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9723b6d608d4841eb4ab131687a5d4764eb30138", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x61444", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb00000000000000000000000049b44b10effb523eb700e119809f3828823049fe0000000000000000000000000000000000000000000000000000000002053e10", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6cc5f688a315f3dc28a7781717a9a798a59fda7b", - "to": "0xccc8cb5229b0ac8069c51fd58367fd1e622afd97", - "value": "0x0", - "gas": "0x613fc", - "gasUsed": "0x35c9", - "input": "0xa9059cbb00000000000000000000000005eaa0d179845414dd301ff2f13c14bb6c55066b0000000000000000000000000000000000000000000003ed59a8206941350800", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xd7d53ebcc5cb87e8b34b0463ce55925c144d864a", - "to": "0xcc4304a31d09258b0029ea7fe63d032f52e44efe", - "value": "0x0", - "gas": "0x12e7e", - "gasUsed": "0x71ad", - "input": "0xa9059cbb00000000000000000000000030741289523c2e4d2a62c7d6722686d14e72385100000000000000000000000000000000000000000000021cdab05f96a8440000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x693a46652332b933fd4b06eab2b564748b141877", - "to": "0x252b9f56359901a0bde52d0675b1f1130d86f471", - "value": "0x0", - "gas": "0xfefb", - "gasUsed": "0x4473", - "input": "0xa9059cbb00000000000000000000000030741289523c2e4d2a62c7d6722686d14e72385100000000000000000000000000000000000000000000170267a4c8dc558ff000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x77e448e5db2a5cc5eb24c8923fc7552e35e0e4bc", - "to": "0x6bc08509b36a98e829dffad49fde5e412645d0a3", - "value": "0x0", - "gas": "0x18028", - "gasUsed": "0x31c2", - "input": "0xa9059cbb000000000000000000000000e93381fb4c4f14bda253907b18fad305d799241a00000000000000000000000000000000000000000000152d02c7e14af6800000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6767526a362ec6c6b1df185478e4f01506b73ff3", - "to": "0x15d4c048f83bd7e37d49ea4c83a07267ec4203da", - "value": "0x0", - "gas": "0x2d498", - "gasUsed": "0x339c", - "input": "0xa9059cbb00000000000000000000000028c6c06298d514db089934071355e5743bf21d6000000000000000000000000000000000000000000000000000003508c25ec040", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xdfd5293d8e347dfe59e90efd55b2956a1343963d", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x2d4b0", - "gasUsed": "0xa281", - "input": "0xa9059cbb000000000000000000000000fc9fc06da2debff2e4b462c40f7dc710119d75ef0000000000000000000000000000000000000000000000000000000005bfb5d0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x56eddb7aa87536c09ccc2793473599fd21a8b17f", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x2d4b0", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb000000000000000000000000c0e11bd9c64e00c4baeae460683c869d7cbe506200000000000000000000000000000000000000000000000000000002cc727894", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x28c6c06298d514db089934071355e5743bf21d60", - "to": "0xfbb3ce96e6c337cb946cd4d820bd0575263ba58a", - "value": "0x12b01fa482015000", - "gas": "0x2d710", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x21a31ee1afc51d94c2efccaa2092ad1028285549", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x2d4a4", - "gasUsed": "0xa281", - "input": "0xa9059cbb0000000000000000000000009ff5ecdde25a36e66e12fff37d5008feacea33f800000000000000000000000000000000000000000000000000000002336b1fde", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x28c6c06298d514db089934071355e5743bf21d60", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x2d4a4", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb00000000000000000000000064a3cbbff91dac8a2a32c95015b11bc2927d9b300000000000000000000000000000000000000000000000000000000505ff3d90", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x24cf1be6eb40b0fea8a42ae96ffd983ee6c566c1", - "to": "0x3845badade8e6dff049820680d1f14bd3903a5d0", - "value": "0x0", - "gas": "0xd83a", - "gasUsed": "0x73f0", - "input": "0xa9059cbb000000000000000000000000d7da95c47ab359bc26b7fe2cd87ea96322451f7200000000000000000000000000000000000000000000000601c0a7dc23919230", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf60c2ea62edbfe808163751dd0d8693dcb30019c", - "to": "0x6892f09a7834e93c84ae3d0829ad00aef1094732", - "value": "0x1c6d859e313000", - "gas": "0x2d710", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x3018018c44338b9728d02be12d632c6691e020d1", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x13244", - "gasUsed": "0xa281", - "input": "0xa9059cbb0000000000000000000000006543e5d27ffd804e13988e5785151ac908ac57a1000000000000000000000000000000000000000000000000000000001dcd6500", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x21bea2e90ac69dda877bc1da3e6674df32fb5f50", - "to": "0x6bba316c48b49bd1eac44573c5c871ff02958469", - "value": "0x0", - "gas": "0x354dc", - "gasUsed": "0x47bd", - "input": "0xa9059cbb000000000000000000000000f89d7b9c864f589bbf53a82105107622b35eaa400000000000000000000000000000000000000000006ce6a542b8b19802b50000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x0fe4e205ac12f55333f9d02483a8309b1e80eb24", - "to": "0xdde2445c5b9b6741d8b43a8150198add4f80a474", - "value": "0x4009c5effea8c20", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x90c59078072c666944040fbd9cc9dd49ad60c034", - "to": "0xe66b31678d6c16e9ebf358268a790b763c133750", - "value": "0x5482cdfaecea88", - "gas": "0x2b4fc", - "gasUsed": "0x28721", - "input": "0x5cf5402600000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000053aa74e1604e960000000000000000000000009f9c8ec3534c3ce16f928381372bfbfbfb9f4d240000000000000000000000000000000000000000000000000000d859198c9bf200000000000000000000000000000000000000000000000000000000000001083598d8ab0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000068fbad54be84103e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20027109f9c8ec3534c3ce16f928381372bfbfbfb9f4d24000000000000000000000000000000000000000000869584cd000000000000000000000000382ffce2287252f930e1c8dc9328dac5bf282ba100000000000000000000000000000000000000000000002a124d22d963e30ea2000000000000000000000000000000000000000000000000", - "output": "0x00000000000000000000000000000000000000000000006c3ae2326aad190ffb" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf89d7b9c864f589bbf53a82105107622b35eaa40", - "to": "0x813be2026f7b814846c63fb83eb6755b1ef952c5", - "value": "0x8e7584d144e800", - "gas": "0x10d88", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb058b5bd4be74c4f6fe24926d46dfff1de3d01da", - "to": "0x6923cc9c35230f0d18ef813a0f3aa88400c78409", - "value": "0x0", - "gas": "0x1cd84", - "gasUsed": "0x10f63", - "input": "0x6db305b8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000002e75", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x28218df2a8143e0d21533b3ece267d5d66000000", - "to": "0x52c36fb0d9a40dae716144275b76f42a7ac865c4", - "value": "0x0", - "gas": "0x8aeca", - "gasUsed": "0x339ba", - "input": "0xc5c2d919000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000240000000000000000000000000d782e53a49d564f5fce4ba99555dd25d16d02a750000000000000000000000000000000000000000000000000000000000000006000000000000000000000000a75a3c5e0c68dd35ca910bb4a6d67facec53ceba000000000000000000000000a0afce3168eff7dc8c27ecdce7267b7a8508417b000000000000000000000000dce882dc48543cb582b2f70d0fae3c78a3860317000000000000000000000000f2901161823e5828a6897e29dad7841f4190d013000000000000000000000000008ac259510b61830113ee2917f2bb07eebf3c5c0000000000000000000000005813b68da7ec1a5df1ef82b9aa633e3def2a668400000000000000000000000000000000000000000000000000000000000000060000000000000000000000005b7533812759b45c2b44c19e320ba2cd2681b542000000000000000000000000bb0e17ef65f82ab018d8edd776e8dd940327b28b0000000000000000000000000abdace70d3790235af448c88547603b945604ea00000000000000000000000095ad61b0a150d79219dcf64e1e6cc01f0b64c4ce00000000000000000000000095ad61b0a150d79219dcf64e1e6cc01f0b64c4ce000000000000000000000000467719ad09025fcc6cf6f8311755809d45a5e5f3000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000006fc23ac0000000000000000000000000000000000000000000000000ad31dde0cce0000000000000000000000000000000000000000000000000008ca4e3295d91c487400000000000000000000000000000000000000000000084595161401484a000000000000000000000000000000000000000000000000091835c75b387921b8b4000000000000000000000000000000000000000000000000000000000039b28200", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x943ef61ea4452a37dcecf2eaeb658e54d82f723b", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x81704", - "gasUsed": "0x6a314", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159300000000000000000000000000000000000000000000000000000000000000030a080c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000c1923b2d669a853d74c2ca9f45b83ffa75b5b1d8000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3159d00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041ba120b183fcb7fa1d2d9b07d540b183b8dbb8967e258f96af5ee30b8852163552e99360a15ae46050399a2edb50745d46246c506a1c8b7ae8d6aa3ef08feb3ce1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000910deca5fa74b2200000000000000000000000000000000000000000000000000000001f21af9a78df1e400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c1923b2d669a853d74c2ca9f45b83ffa75b5b1d8000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000001f21af9a78df1e4", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xbb948900bb2a7314d6933cca9885b1ae0a9fc20d", - "to": "0x000000000000ad05ccc4f10045630fb830b95127", - "value": "0x417b1fcd0434000", - "gas": "0x68624", - "gasUsed": "0x4ac02", - "input": "0x9a1fc3a7000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001c48f67b7a52f0b3c5dfc76eac3d8f639edc2439384114ee4cc162691b41343b7f7a568310b99086590a4392e78ecdefb146697001a257d53c1e8069e3424a98e1000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd0251000000000000000000000000e6217ce478c851f4bb307ea2f588cb50b296871200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000dab4a563819e8fd93dba3b25bc34950000000000000000000000001afef6b252cc35ec061efe6a9676c90915a73f1800000000000000000000000000000000000000000000000000000000000014c3000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000417b1fcd04340000000000000000000000000000000000000000000000000000000000063e3047e0000000000000000000000000000000000000000000000000000000063e3128d00000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000003b6b3545e97cccf85040dab7a563120e000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000032000000000000000000000000c247a0e6c575e8a290eae455585062ea859c9c03000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001c08e09a676d273d23cd1e6b8fcc23b9ce6f6122e70cedc6c764b5e132599a7e882af2415838ad65a32230782332e30542bd783c54a41c812faae4a5382774b46500000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd0251000000000000000000000000bb948900bb2a7314d6933cca9885b1ae0a9fc20d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dab4a563819e8fd93dba3b25bc34950000000000000000000000001afef6b252cc35ec061efe6a9676c90915a73f1800000000000000000000000000000000000000000000000000000000000014c3000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000417b1fcd04340000000000000000000000000000000000000000000000000000000000063e3047f0000000000000000000000000000000000000000000000000000000063e31cac00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000eb1b2be4d4bf9c14c7cd60538a8456d500000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001b7344692446ddb6cbcc1380abc05b6b4c1e0e70610c35558303b908363ef687d27a5f5eeeac282b742e70e8549d34f9263a9a7092ab92c241037c2bfb6f5e1f32", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xcf327c0fc74b399b9db5821843fbe9c1c1b03428", - "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "value": "0x0", - "gas": "0x47b3", - "gasUsed": "0x3674", - "input": "0x2e1a7d4d000000000000000000000000000000000000000000000000086a5c1a73c920dc", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf3418de533f56ff11587fe6a90a5f2f820923552", - "to": "0x881d40237659c251811cec9c364ef91dc08d300c", - "value": "0xc7d713b49da0000", - "gas": "0x39a88", - "gasUsed": "0x38862", - "input": "0x5f575529000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c7d713b49da000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000f706d6d46656544796e616d69637634000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000c65af70c63d1000000000000000000000000000000000000000000000000000000000005798866400000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000017c1ca839cf000000000000000000000000000f326e4de8f66a0bdc0970b79e0924e33c79f1915000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000059622b180000000000000000000000000000000000000000000000000c65af70c63d100000000000000000000000000056178a0d5f301baf6cf3e1cd53d9863437345bf900000000000000000000000074de5d4fcbf63e00296fd95d33236b9794016631000000000000000000000000f3418de533f56ff11587fe6a90a5f2f82092355200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e30f2201ffffffffffffffffffffffffffffffffffffff092c183b63e30e8c000000330000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000001be079157d5b19979a8c82c27f0bd9d3937d2eb5ae2b8c632a0ff25ff3c9bec8c5443d1570ef0a88aa4cda4045f8e34f786b5365445f1cf57be4552952ba0fb8fc0000000000000000000000000000000000000000000000000c65af70c63d100026", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x925da14218d97de3dc5a856d0f7c3ae35544b637", - "to": "0x39da41747a83aee658334415666f3ef92dd0d541", - "value": "0x0", - "gas": "0x6ab32", - "gasUsed": "0x146e8", - "input": "0x09ba153d000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000a39bb272e79075ade125fd351887ac000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000ff15b836df800000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000ff15b836df800000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000924f7fc708b000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000008e000000000000000000000000000000000000000000000000000ff15b836df8000000000000000000000000000bd8451d2d5fb88469a764b05c1e0b623c51061450000000000000000000000000000000000000000000000000000000000fd01e4000000000000000000000000000000000000000000000000000000000000001c90b2cb7c65469386c587350bdf5800fff855c289ac0684ca09fa1479ca18a8e52bdd85b18b180a7c6e183d68d7e2f45956970288a2ad10bd496a2417ebde467c00000000000000000000000000000000000000000000000000000000000007a49a1fc3a70000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001bc7fef3b558d5a5d6b970e27243bf01832ce88b24dd65df945f7b93bbe6abbbff2b175298ca893b3eef5487013cfe92bc98c4c196b3a496776bbe5f9375743f42000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000fd01e4000000000000000000000000f8d0a4542b1277d8a330e69cc56bdc109029c62300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000dab4a563819e8fd93dba3b25bc3495000000000000000000000000bd8451d2d5fb88469a764b05c1e0b623c510614500000000000000000000000000000000000000000000000000000000000037880000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff15b836df80000000000000000000000000000000000000000000000000000000000063e304070000000000000000000000000000000000000000000000000000000063ec3e8600000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000b1e8a25f2e179988adf4f7affcf2b7d1000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000032000000000000000000000000c8f8e2f59dd95ff67c3d39109eca2e2a017d4c8a0000000000000000000000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001b8b3814af6b46b802051c64e6769359c9e0e7cc28796997eaf5738ce17730615652737f4e4b42281cd83c96667ba6c5709e40fc6896001540f1811ef84c22c8080000000000000000000000000000000000000000000000000000000000000001c87859fd8e932f4bae008308bb0684ff4e4d6d923f0ecfb5d938397135fc0a9700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd01e400000000000000000000000039da41747a83aee658334415666f3ef92dd0d54100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dab4a563819e8fd93dba3b25bc3495000000000000000000000000bd8451d2d5fb88469a764b05c1e0b623c510614500000000000000000000000000000000000000000000000000000000000037880000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff15b836df80000000000000000000000000000000000000000000000000000000000063e304080000000000000000000000000000000000000000000000000000000063e3179500000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000df78c65ccfd0c84d6ca3702c5a50982500000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001c2131911137891eed3c375f213783c4f4c15907cc534dcb8bcf1fce1df0a2e5a513b24bfae81ea4c9d4f4b45e0c7cf1a143439a7a6cc695730ae3258adc9a1ddf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000037880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000242e1a7d4d00000000000000000000000000000000000000000000000000ff15b836df8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000115369676e61747572652065787069726564000000000000000000000000000000", - "error": "execution reverted" - } - }, - { - "result": { - "type": "CALL", - "from": "0x217e4af3bad04cc4d0463df3cfdff9ce7a028925", - "to": "0x1111111254eeb25477b68fb85ed929f73a960582", - "value": "0x0", - "gas": "0x27f63", - "gasUsed": "0x19c43", - "input": "0xe449022e0000000000000000000000000000000000000000000000435436639a1b280000000000000000000000000000000000000000000000000000000000007725b2c200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c72abb13b6bdfa64770cb5b1f57bebd36a91a29ee26b9977", - "output": "0x000000000000000000000000000000000000000000000000000000007737288a" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc1553f4561e98d9f6ed110b52138dfc0a57b8c7a", - "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", - "value": "0x0", - "gas": "0x20ab1", - "gasUsed": "0x1cba0", - "input": "0x18cbafe500000000000000000000000000000000000000000000008313898182aa4f387d0000000000000000000000000000000000000000000000000be909f9d6f17ae600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000c1553f4561e98d9f6ed110b52138dfc0a57b8c7a0000000000000000000000000000000000000000000000000000000063e313470000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f3dcbc6d72a4e1892f7917b7c43b74131df8480e000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "output": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000008313898182aa4f387d0000000000000000000000000000000000000000000000000c078784049cdad9" - } - }, - { - "result": { - "type": "CALL", - "from": "0x19a420ec9260473150b74d7af6b7d146167e6764", - "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", - "value": "0x203ee4d342559bf", - "gas": "0x22ec4", - "gasUsed": "0x1ec80", - "input": "0xfb3bdb410000000000000000000000000000000000000000000000022b1c8c1227a00000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000019a420ec9260473150b74d7af6b7d146167e67640000000000000000000000000000000000000000000000000000000063e3133b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381", - "output": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000002015d3212c5a4720000000000000000000000000000000000000000000000022b1c8c1227a00000" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf16e9b0d03470827a95cdfd0cb8a8a3b46969b91", - "to": "0x11613b1f840bb5a40f8866d857e24da126b79d73", - "value": "0x0", - "gas": "0x2b8e4", - "gasUsed": "0x3c90", - "input": "0xa9059cbb000000000000000000000000aee290aa24833d00b4ab4ba5be296450b6d6220f0000000000000000000000000000000000000000000000000000000008d44f4e", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc2b39a520d5088afda4fdeac32dba62516ed6119", - "to": "0x5954ab967bc958940b7eb73ee84797dc8a2afbb9", - "value": "0x0", - "gas": "0x7ea5", - "gasUsed": "0x7ea5", - "input": "0x8279e760", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x41636ddf4abb1aa78863101626acdc861d4e8a0b", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0xc05c", - "gasUsed": "0x7b46", - "input": "0xfd9f1e1000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000041636ddf4abb1aa78863101626acdc861d4e8a0b000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000063e30d72000000000000000000000000000000000000000000000000000000006407f7720000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000ae089fe912a726900000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000007f29b85834d6a2ba4bb1c64325686c6057b1b3c5000000000000000000000000000000000000000000000000000000000000034e000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049960d1622d2800000000000000000000000000000000000000000000000000049960d1622d280000000000000000000000000041636ddf4abb1aa78863101626acdc861d4e8a0b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e306e64fa9800000000000000000000000000000000000000000000000000001e306e64fa98000000000000000000000000000000a26b00c1f0df003000390027140000faa71900000000360c6ebe", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc081e2b99bfa1ebf4cd2f474a4fbca346981121f", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x64369", - "gasUsed": "0x54846", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f0000000000000000000000000000000000000000000000000000000000000002080c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000014ca0681acf55c00000000000000000000000000000000000000000000000002b2a907148eaa6e00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000fdf674d96c80e724bede24bc2813372771054489000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000002b2a907148eaa6e", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xbf7e05cc37038de19daf01cdea81ac2e207d670a", - "to": "0xc8db4b3ce2aac6b1c53fb307f46225be576151f7", - "value": "0x470de4df820000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x91aae0aafd9d2d730111b395c6871f248d7bd728", - "to": "0x98c3d3183c4b8a650614ad179a1a98be0a8d6b8e", - "value": "0x0", - "gas": "0x43c06", - "gasUsed": "0x2c76", - "input": "0xce2e62ff00000000000000000000000000000000000000000000000018811a464eecc7000000000000000000000000000000000000000000000000000000006bb909778c000000000000000000000000e45b4a84e0ad24b8617a489d743c52b84b7acebe000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e30ef0", - "error": "execution reverted" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6b056837e1968e495d05d7cc0114e9693d2c9002", - "to": "0xb7460cbf82d79dea302dc8466163fc828e1904e5", - "value": "0x0", - "gas": "0x72474", - "gasUsed": "0x22f56", - "input": "0xc98075390000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000003e0010000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002600000000000000000000000fadfdde6afb880c404a9da3a008fa39300039ebe050c0f0406010507080e02030a0d090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000281959b000000000000000000000000000000000000000000000000000000000281959b000000000000000000000000000000000000000000000000000000000281959b000000000000000000000000000000000000000000000000000000000281959b000000000000000000000000000000000000000000000000000000000281bbc0a00000000000000000000000000000000000000000000000000000000281bbc0a00000000000000000000000000000000000000000000000000000000281bbc0a00000000000000000000000000000000000000000000000000000000281bbc0a00000000000000000000000000000000000000000000000000000000281bbc0a00000000000000000000000000000000000000000000000000000000281d674900000000000000000000000000000000000000000000000000000000281f128800000000000000000000000000000000000000000000000000000000281f128800000000000000000000000000000000000000000000000000000000281f128800000000000000000000000000000000000000000000000000000000281f128800000000000000000000000000000000000000000000000000000000281f128800000000000000000000000000000000000000000000000000000000000000006b58b9eaee77f7e02d49330a97c0d294f0f9e43e648d33850d697dd4f273c02fe6dc9fc56ed11e52d1211d0387e01f140da6c0c6a198cb133b3951ba41106aa7df42a7edd0cd0fe4801117266b20e1761e2c87fef426f1a00077d3418966d10d957d8cf92a1b41e4c72d941ef506c7f939952a3a1b7f2b80e69b59ef5e3fc0a72d3b668f28ae799f2910fced5034c0a53e2bc3527f6984c07930c8b2c2c6c5acd66f5cc67d63350de0c8d0954fec4b1918a93442e458e98cb3d3694279320363b00000000000000000000000000000000000000000000000000000000000000064fe4b2ba2d75f58562bb733ac4a1b6f043d1d595ca48c94217b3f5d4199ef94477063c721334bc992135303c274c0810726ac4a54e3ffefa692c32bdb5d897530da2bf5531430928d06af4ec4107fcc3b86f5845c3a47715539badb11aa4f4b76b7c9c10c80c600401cee228cf09d6efc5199ec90da5bd281a8a27322c5110ca5030b83a6f32af15d82bd6b8a87ab57b49bac998f3bda16aac1cd117ac0f727b57a0f6949bd019aa6421dd21e48e84db908f57fe79e2c20c0b7e64a0f1f938fc", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x79776c175ebe87ca08f00142599f8dbf4720594e", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x30604814560a670", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x8cada160eee3fc211932d6e20fe686132831dca9", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x685c682846f0000", - "gas": "0x364ba", - "gasUsed": "0x2b774", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000020b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000685c682846f0000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000685c682846f000000000000000000000000000000000000000000000000119a58737bb050fc66ff00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb8f411903cbc70a74d22900a5de66a2dda66507255000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb99af14667098ee10d4379c933e14d3d034a79bc", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0x55e8e", - "gasUsed": "0x3f107", - "input": "0x55944a4200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000d6000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000fb20add8c2437cc3995e9cbc5800989c68b978aa000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000063e30e880000000000000000000000000000000000000000000000000000000063e3120b0000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000677c64dc160bc4aa0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000848d3f5091e00000000000000000000000000000000000000000000000000000848d3f5091e000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000bf3cf7960ad8827c75d821f4b3353af8d4fbca4da10289a75a7dd51c08a4792bf964aa5c0bf7ebbb2bfd0f4d579fc4969fd084700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000fb20add8c2437cc3995e9cbc5800989c68b978aa0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035054c86a0c0000000000000000000000000000000000000000000000000000035054c86a0c000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4c9d0257ee00000000000000000000000000000000000000000000000000000a4c9d0257ee0000000000000000000000000000fa25281056c30807c6bbbf02efe40a98ed9f4a0000000000000000000000000000000000000000000000000000000000000041525f52c20965972efe9ed4f6d202b33efab874830bba8961324a4b058b80f838462baeef068c88588693c7ca4962049a92edc6c93be80060ed059c079ca768741b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000b99af14667098ee10d4379c933e14d3d034a79bc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e30e880000000000000000000000000000000000000000000000000000000063e3120b0000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000d35bc78a428596df0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bf3cf7960ad8827c75d821f4b3353af8d4fbca400000000000000000000000000000000000000000000000000000000000004ab0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076f04d85cfe6000000000000000000000000000000000000000000000000000076f04d85cfe600000000000000000000000000b99af14667098ee10d4379c933e14d3d034a79bc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004ab00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000d2e17c7e749607c12a0a5fe5420a079a1e7caacfa7046ed6c93e61077f88d0e1eddd0db05f2eb8a6a0122c00b0a8fe45eed7871e790d35317dd760444671bd28ed4625f01012ec34ef52511d8fa118cb5b52dcfa4882f3e827c5484b076db5688c47a5a5da8c9e4c23854fbe4a1cb56e448ae52e2b93a96df83b7cc95452e9b805cebf104241956c04eb325c922bc67eb05d95fdcf45bc48286b6154e67f01d789d6979ea43d7100142a8842c032c1b2ee4b3a3e780b69ca337a988f0ab0e674cdac3a1f874a7338629a35e48dd7a3928904677fce626f59e4845233b37e845c38cf24b0a6fd91bc3cfeacbc7b1948a317d6940dcf635c805c67a174b8580b0b5af453bb13ceb4a70b8864837b0e563f96d0cdb883c35a68c19bafd0c135772eae6e4986f6c6d3302f2d81364313fbb1a1019a01766073a26811b3110ebc17cbd4957b52d16fee78384df25e24b9d8567b85f5871106545cd2918d4a85db9c1f97165dad6fa5bdd8ef932368c04e8be5fc7ec4f6bfe30f700ffad227a6c658950a5cb7907d1fb5186c4ccbc186d155ac6cd6502a2c7e9f8a200ce7db9b7d6d3cf00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000360c6ebe", - "output": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bf3cf7960ad8827c75d821f4b3353af8d4fbca400000000000000000000000000000000000000000000000000000000000004ab0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000fb20add8c2437cc3995e9cbc5800989c68b978aa000000000000000000000000b99af14667098ee10d4379c933e14d3d034a79bc0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035054c86a0c000000000000000000000000000000a26b00c1f0df003000390027140000faa719000000000000000000000000fb20add8c2437cc3995e9cbc5800989c68b978aa0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4c9d0257ee0000000000000000000000000000fa25281056c30807c6bbbf02efe40a98ed9f4a000000000000000000000000fb20add8c2437cc3995e9cbc5800989c68b978aa0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076f04d85cfe600000000000000000000000000b99af14667098ee10d4379c933e14d3d034a79bc000000000000000000000000fb20add8c2437cc3995e9cbc5800989c68b978aa0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000" - } - }, - { - "result": { - "type": "CALL", - "from": "0x584dcfe6f9f622d726c0be72ea6523c639adc040", - "to": "0x0c2e57efddba8c768147d1fdf9176a0a6ebd5d83", - "value": "0x0", - "gas": "0x6121", - "gasUsed": "0x6121", - "input": "0xa22cb46500000000000000000000000000000000000111abe46ff893f3b2fdf1f759a8a80000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x23cb5c7cd2ceafa8ca2a8fc0cb45aedd34ac9048", - "to": "0xf36c5f04127f7470834ed6f98bddc1be62aba48d", - "value": "0x0", - "gas": "0x874f", - "gasUsed": "0x6283", - "input": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xebd7c0190a0fcc17f34f396e89870372c66d2901", - "to": "0x3f5d410ee253fc8110e87fee01cf02d729d4e848", - "value": "0xb1a2bc2ec50000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6450be8951a099a92c12aacd6c5f80cff74ad96a", - "to": "0xf202d5a6fd22e77e6af6e466090f097bbcec6f4a", - "value": "0x429d069189e0000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xca69da5ac328fbb0af4e7ecf9c88756d4550a6e9", - "to": "0x5954ab967bc958940b7eb73ee84797dc8a2afbb9", - "value": "0x0", - "gas": "0x13a3e", - "gasUsed": "0x13a3e", - "input": "0x9dcaafb400000000000000000000000000000000000000000000001cd5dff518a80cc000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9b9c09dffcaea00a6ed39af98275136f0b731c1b", - "to": "0xac57de9c1a09fec648e93eb98875b212db0d460b", - "value": "0x0", - "gas": "0x342b3", - "gasUsed": "0x21045", - "input": "0xa9059cbb000000000000000000000000d284d90ca74746c4521af905bdc15cdb1caa967d00000000000000000000000000000000000000000000000059ade1d1c96199ec", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x84e295f14985f6dfbf25bd0c7e47d3c01dccc783", - "to": "0x2e71b2688019ebdfdde5a45e6921aaebb15b25fb", - "value": "0x9851c70b3b082", - "gas": "0x3afb2", - "gasUsed": "0x3a72e", - "input": "0xe2bbb15800000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000025c33226cd78c2f6b", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x820fe284be0254d3c7f0cc800c8d7183e40ee5dd", - "to": "0xfc34a4d998d219f60717c1a5db0e5405ab4b53a4", - "value": "0x0", - "gas": "0x11e67", - "gasUsed": "0x115e2", - "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x1f2eb98b4e5a445b166cf152e50c008b85ea17b1", - "to": "0xba0b09fb5c2078698f84d47e23f33bb0c284d827", - "value": "0xde0b6b3a7640000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xef3396952a570fab461646042a1e921e571e4d3b", - "to": "0x512d03379c135b464b0c62847141eeed6ccb1bd8", - "value": "0x0", - "gas": "0x8683", - "gasUsed": "0x8683", - "input": "0x2e7ba6ef00000000000000000000000000000000000000000000000000000000000037a2000000000000000000000000ef3396952a570fab461646042a1e921e571e4d3b000000000000000000000000000000000000000000000001a0c01934d640c0000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f745e2c3654e73f076b6e1d67660188069a17cd5363050501bfb62c81d690d218e6060d801e51ef8087f7684e4d6c79c45c4fd9a4350d08927e0f6472ab4b8e1622f358234771f9fe6855c38cc3646388e2791c2029d8b5a1010a2454b0bc3b8d75cffdba8304751a47d294ba3054b48151d44a28ba797f6c3760fcc49b64934b327657d5a5fb4d8109d21f9f92c92b030c153311e6c7f23d0a6de82261c2bb7b8bb70d5bdc6bd8cf28343a82b78128c556689867f15ab2321ddf7835087277565c22b204aa2713e00546b4f443c6058d8929564627957f181972193c4bc0a735a4f4d878f381eacc846cd39542ab8de5bdade1ed81e8a660cb4535999645a48bc6c7549e961afe50c8cf85e00fc1b0c2d347942c324238800087cba4c8ff54295dd9831c90b8ba75a633313c419109b06ea44876c12f0e0c6dd56890b32157302b3eeb73d87d8be6ef6d82d105d16100e02367c5c4f65bad23257104332f40bbc35a67b9fde03357aa9fb52d21e0b142900bcdcd7a3bf314771fc7dc551afb88c0be4a25fd5cfe0c34c57114d755b160b5f38bf622e064df5e07aeee24ba24c517b536f159c21270d5451d4fcaa1b1a4bb66e005191c464712a0cd1505d7665c9eb45b25983fb2abb4f06d2366e03614c8ea8ef995b0ff2883b3aea4d2469e23", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf9530ea194648c5859be70c6ab03a4ffc7e04284", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x38d7ea4c68000", - "gas": "0x199d9", - "gasUsed": "0x1915e", - "input": "0xfb0f3ee1000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000376c1e0a7f000000000000000000000000000eeb3756560dc82814b4155e4e15d2588205ecf82000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c0000000000000000000000000057f1887a8bf19b14fc0df6fd9b2acc9af147ea85f940bbe1f9b3662500d9642220ef681024503553631adbc11dc31b47ebe7308d000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000063e05e170000000000000000000000000000000000000000000000000000000063e998970000000000000000000000000000000000000000000000000000000000000000360c6ebe000000000000000000000000000000000000000052974f353af0d0e80000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000e76a6dc9af8080b48c51e564e964cd15b9d66640001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000016bcc41e90000000000000000000000000000000a26b00c1f0df003000390027140000faa71900000000000000000000000000000000000000000000000000000000000000419cc7aa2f0820658a80133cb94a47db723c8db73d2b661842fe53e17a794693ba4bfa821aafd0331e31bfc29c2fb34102fe21b9fbd046a89a7ea19666824f9b811c00000000000000000000000000000000000000000000000000000000000000c5d24601", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc63fc0ae83555e2553762edd887433573f77cfc2", - "to": "0x48c3399719b582dd63eb5aadf12a40b4c3f52fa2", - "value": "0x0", - "gas": "0xa89e", - "gasUsed": "0x7c0d", - "input": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba300000000000000000000000000000000000000000000033d97e7358b4869b5bf", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa12a635362203c561845f1090bff55db0b980aa7", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0x5638a", - "gasUsed": "0x3f459", - "input": "0x55944a4200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000d8000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000063e2488d0000000000000000000000000000000000000000000000000000000063e399fb0000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000dc660db8875869750000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001040f031d8f000000000000000000000000000000000000000000000000000001040f031d8f00000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000031aaf705fa77a3a7c7b22c1890c387a36b3e17182f544baf2a0c7db16a74b1d8766980c4ffbc19c76325992bb0725c6b110a1cff000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006806013f060000000000000000000000000000000000000000000000000000006806013f060000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a01804fc18000000000000000000000000000000000000000000000000000001a01804fc18000000000000000000000000000e53f976b720a0be0fd60508f9e938185dfd43657000000000000000000000000000000000000000000000000000000000000004164f269a92a5cec60c5aa9f5a7fc6b6617a463a4affde8fc27ec4683a2a59f7c576b5021ac056adbdde890cfcb44dd177bf0608d402e8ab206bcda9e8c44e72131c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000a12a635362203c561845f1090bff55db0b980aa700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e2488d0000000000000000000000000000000000000000000000000000000063e399fb0000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000019030b59443fa570000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000031aaf705fa77a3a7c7b22c1890c387a36b3e17180000000000000000000000000000000000000000000000000000000000001e820000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e38d22b9dd200000000000000000000000000000000000000000000000000000e38d22b9dd2000000000000000000000000000a12a635362203c561845f1090bff55db0b980aa70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e8200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000e6987684467c8c9584ccceeb6369701b084939bc7b7b78e8d9778d5eb265e336665d5e096f2382896a142fb5e3a532d04b8a3307f3a65b3fa3c9ae9441438c5c9ffacd707cf5875b4ecb451ed8332bfa1f9552338ee6040a81b36c8b3969fb4b39ba201459565d67585231723b47f98e282f55db646a04c825a4804f315fdcb89d394111c22f1995a82ce12b9f73cef75fa51c26c791917479709b7a59227a3b9c1d509d5c68fffd1ad1f9d04cc88baeb773cb191bc908a5516f007a4e2397e828276aa2252ab4601cd4deddb6c9d03d4e94adefd71e92c909cbbda4a912fdbad8c9f2cc89a2e6aaaaf467e187768ea4546231b85eefda87c1e9f95028eda1232606a077f640cc7884e92d19f5a9feb5e3867334a3b422c003b32e2f7baebe455d0d2f7f866df9c43e85ac013c6a756ae75da0ca15913e25a4d2d6d6cb042f60de2aca74650de52641eafc1b47bbdf5e723395ea301a26ee3d1bf292e847e77c5171d18d98e6ce887eb3494788f593bad6cbb73688c95a723fa6f9b265a689d2d25453fe871b5bd2dc5fcbd9d8f04bfe076cade6fd77ee9a63b71016948a85ceedb60e5e3059f09ef6d2582b6c34f76aeca5050c9eb8f1c6c7e011b88998f200300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000360c6ebe", - "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000031aaf705fa77a3a7c7b22c1890c387a36b3e17180000000000000000000000000000000000000000000000000000000000001e8200000000000000000000000000000000000000000000000000000000000000010000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c000000000000000000000000a12a635362203c561845f1090bff55db0b980aa70000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006806013f060000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a01804fc18000000000000000000000000000e53f976b720a0be0fd60508f9e938185dfd436570000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e38d22b9dd2000000000000000000000000000a12a635362203c561845f1090bff55db0b980aa70000000000000000000000003ba5de9aabfa647ec48b7344e0a917256583f99c0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000" - } - }, - { - "result": { - "type": "CALL", - "from": "0x560a2edd994f2ba4883cdf8e0d164558d8c803ac", - "to": "0x44e94034afce2dd3cd5eb62528f239686fc8f162", - "value": "0x2386f26fc10000", - "gas": "0x16dcb", - "gasUsed": "0x1654f", - "input": "0x26c858a4000000000000000000000000fc9e10cb276c957ccd06edfcc6e8759b59e70600000000000000000000000000000000000000000000000000000000005adef0f0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000560a2edd994f2ba4883cdf8e0d164558d8c803ac00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc22938f454cf63a010a6cf7210239f7dd83c3085", - "to": "0xeea25ef21ab82eaec7d56400f0260d349a668feb", - "value": "0x3782dace9d90000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa0651a30a86dfd3befcf89a1454536b499ffbc5c", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0xc599", - "gasUsed": "0x7e0f", - "input": "0xfd9f1e10000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000a0651a30a86dfd3befcf89a1454536b499ffbc5c000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c0000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000639577c800000000000000000000000000000000000000000000000000000000640c1ec80000000000000000000000000000000000000000000000000000000000000000360c6ebe00000000000000000000000000000000000000000e774b081c397d9f0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000a604060890923ff400e8c6f5290461a83aedaceca0651a30a86dfd3befcf89a1454536b499ffbc5c000000000000010000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004882edd1176a80000000000000000000000000000000000000000000000000004882edd1176a80000000000000000000000000000a0651a30a86dfd3befcf89a1454536b499ffbc5c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000000000000000000000001e87f85809dc000000000000000000000000000007d6d221a707470196f84560423444cd75bba77000000000360c6ebe", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xce906632838073f6a82c1c92f252388dfa46ef5e", - "to": "0xa8c774a1567b7bb3b397fe75617dd92eafbe1f86", - "value": "0x15280a7ba33000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x417eec998e20b71bfd5b51e1db737a4420e7958f", - "to": "0x4d224452801aced8b2f0aebe155379bb5d594381", - "value": "0x0", - "gas": "0x847f", - "gasUsed": "0x602b", - "input": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0xcdc4508b5a9e05abdfdd45fb509e92400aceb4eb", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x552dd75989f516c", - "gas": "0x3e770", - "gasUsed": "0x32756", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e310bf00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000552dd75989f516c000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000552dd75989f516c0000000000000000000000000000000000000000000032507ece494ff634926200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000235c8ee913d93c68d2902a8e0b5a643755705726", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6081258689a75d253d87ce902a8de3887239fe80", - "to": "0xf9803984b021bc6a2730e6ff4c318216bf2ae7fa", - "value": "0x69cd4d4b737f60", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xd493e90dffdd4740b11aed8401e6347e405b0c1f", - "to": "0xdea65dd08eb6d51fb23038322376897c54668964", - "value": "0x0", - "gas": "0x62f7", - "gasUsed": "0x62f7", - "input": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c710000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x8c46b3b70e895935f9465a6f10e2bc876119f51d", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0xb1a2bc2ec50000", - "gas": "0x43799", - "gasUsed": "0x368f2", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000000006055becbcfb00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002d886570a0da04885bfd6eb48ed8b8ff01a0eb7e", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x2a8ce51e7c0a1ee60e20bd859ecd07fd2530a3f3", - "to": "0x000000000000ad05ccc4f10045630fb830b95127", - "value": "0x0", - "gas": "0x4b27b", - "gasUsed": "0x41a66", - "input": "0x9a1fc3a7000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd024f0000000000000000000000002a8ce51e7c0a1ee60e20bd859ecd07fd2530a3f300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000b92d5d043faf7cecf7e2ee6aaed232000000000000000000000000aa462106da447c0440a4be29614c19387a59a3310000000000000000000000000000000000000000000000000000000000001a3900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000a39bb272e79075ade125fd351887ac00000000000000000000000000000000000000000000000000f8b0a10e4700000000000000000000000000000000000000000000000000000000000063e273250000000000000000000000000000000000000000000000000000000063e31c9900000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000006d97635e4d809e94bb9c2fe985a61c3800000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001b549a9137fa00c9f56d3848caa7e40ce8c3207d05fff91f083f109297add8c76c269c6d3e97321dff11d26c54c091ba99f86ee076ff40053cce718faa61e7390d00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001c5960890e57ffe8115685f286a475d36278461b9dc01f55623267a28129401be374c02d7e9b215ab194b51d2c2b36b1458020911d1fe8307148f1f01936ba7eac00000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd024f000000000000000000000000ba1ba61ff159422bcb07f78017186624e94e693600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b92d5d043faf7cecf7e2ee6aaed232000000000000000000000000aa462106da447c0440a4be29614c19387a59a331000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000a39bb272e79075ade125fd351887ac00000000000000000000000000000000000000000000000000f8b0a10e4700000000000000000000000000000000000000000000000000000000000063e273240000000000000000000000000000000000000000000000000000000065c3a6a400000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000741bc6b4483a7d07db999dadbc87fc5e00000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001b47dd2f5e55b3ebdedac66fed02f8fe19bf62c9b2556e6adeb54831cbac620c79362da5c5ce79601c9fb20247a71c5ba9ce5ef9b982ea1ebb7d281e1bdb9ed242", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb501a6d4901fcc36fda522b068d16b4d352b8bad", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x54607fc96a60000", - "gas": "0x3d6fd", - "gasUsed": "0x319d3", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159300000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000054607fc96a6000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000054607fc96a60000000000000000000000000000000000000000000000000000000000814af0229500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000022beb89e08fbfd32ade3d106beef43d0b04c5b56", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x0d07ef7954b276f11288b288f3c6375bef5d4d16", - "to": "0x9c8882c6b3e40530cdbce404eef003443b1e455a", - "value": "0x0", - "gas": "0x967b", - "gasUsed": "0x6063", - "input": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c710000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x55908c7cfb7ca9531b8f53ea954d13bcf81fda4c", - "to": "0x389dcc122a2304a95ef929e71b7ef2504c6cc3ac", - "value": "0x0", - "gas": "0x966e", - "gasUsed": "0x6059", - "input": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c710000000000000000000000000000000000000000000000000000000000000001", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xceb69f6342ece283b2f5c9088ff249b5d0ae66ea", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x2b8cc", - "gasUsed": "0xa281", - "input": "0xa9059cbb000000000000000000000000796ef1e4b1457fe4761cd119ac703d802a8d53b000000000000000000000000000000000000000000000000000000005ce442fd9", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xc438f0c5f01cb9841a26660b31a61176996e3df8", - "to": "0xa48a76f8537d1aed135849fa6809de088730245f", - "value": "0x1bc16d674ec80000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xf0533476b7b4c421219e15fa2887f14149a7de70", - "to": "0xdba2efb64d1a8423a656728c874377c85af5c9ef", - "value": "0x34e3f33f3b921e", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6ec2bdcbc5804a4fbdfa578e46918cd0040db843", - "to": "0x0000000000a39bb272e79075ade125fd351887ac", - "value": "0x14d1120d7b160000", - "gas": "0x733c", - "gasUsed": "0x71e1", - "input": "0xd0e30db0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x4318003afdb642777c78f0e23483c3ce7cf429e7", - "to": "0x098852059b3a0b69b91cf373edae574bd1d08fd6", - "value": "0x71afd498d00000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x75a28b8c1a05f6da98647df616a6ed44d087be7d", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x3367b", - "gasUsed": "0x292a2", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000030a000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000f3dcbc6d72a4e1892f7917b7c43b74131df8480e000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b8e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3159600000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000414dad984b6d9148ba77fe93123d3fda77b69e4346bb74d28d01a44f7089c80bb23cecb3e4bf23332b0eefdb24bc6590d81b0a833157cc23205d1651e29cdfb2201b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000004becf3f7465f955b6000000000000000000000000000000000000000000000000006fe2f28f3e9fe000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002bf3dcbc6d72a4e1892f7917b7c43b74131df8480e000bb8c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000006fe2f28f3e9fe0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9da24ce4fd54c7a0c17371c05149a8a6ab0c489c", - "to": "0x5d5092c22c5d0fd3fec42b6b2ce796d5b33421c6", - "value": "0x0", - "gas": "0x7fdf", - "gasUsed": "0x7fdf", - "input": "0x987fa5e10000000000000000000000000000000000000000000000000000000000000002", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9c48c15556719b287ef1286f6375fef24ae4d666", - "to": "0x0000000000a39bb272e79075ade125fd351887ac", - "value": "0x4db732547630000", - "gas": "0x2f60", - "gasUsed": "0x2f15", - "input": "0xd0e30db0", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x65dc656ad1cd9e36d649a4a4be68a6e3d5250064", - "to": "0x4c8e924df8f84c0d4f4b456ad2b9b073638ee35f", - "value": "0x2c68af0bb140000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x5b3edd9a0d2673292a044507d015c651c0525b32", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2fae0b5a77346ce", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xcf073e31974ad3a24ae6d7580f6cada98438d040", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x303de6e23f2a488", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x7a76fcc57262b28d2a86fa4e5c9cb7ce8d386b3a", - "to": "0x5954ab967bc958940b7eb73ee84797dc8a2afbb9", - "value": "0x0", - "gas": "0xc171", - "gasUsed": "0xc171", - "input": "0x8279e760", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xacee7804b9e60050953e5dbdbc1a9af298988086", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x3b1d2", - "gasUsed": "0x2f96b", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000030a080c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000d8a4b3f4afd16eed638cbbd19d5801a5735c0930000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b8f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3159700000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041eb1bca1f57a9cd1e129f399fec13d043c83d14d6bb4a36a9b0ac83da36e438cc4732401ff488042ca8a602bbac8ddf692891c4cef9314582d31e0dbc92c268011c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000fc5a35a7dde1582200000000000000000000000000000000000000000000000009165ad432c029c400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d8a4b3f4afd16eed638cbbd19d5801a5735c0930000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000009165ad432c029c4", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xdaa9a5b37d369a40080bfeb3c251c5d5a42c14a3", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2fa03565a8d2088", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb4e85f3b797954549d9ce1dd29e0267787baf3bb", - "to": "0xe95b3dc78c0881dea17a69bafc6cfeb8d891e9de", - "value": "0x2c68af0bb140000", - "gas": "0x434f9", - "gasUsed": "0x42ab0", - "input": "0xcfe96c84000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000002c68af0bb14000002a8e4f0decfd0db4a5bb479c92432456d1c4dac272712f9e8b2f9df8af7b1770000000000000000000000000000000000000000000000000564fd1c1b80027700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002a87c0252000000000000000000000000007122db0ebe4eb9b434a9f2ffe6760bc03bfbd0e000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000007122db0ebe4eb9b434a9f2ffe6760bc03bfbd0e0000000000000000000000000e95b3dc78c0881dea17a69bafc6cfeb8d891e9de00000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000000000013e92f4900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e70000000000000000000000000000000000000000000000000000a900001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2397ff1542f962076d0bfe58ea045ffa2d347aca06ae4071138002dc6c0397ff1542f962076d0bfe58ea045ffa2d347aca01111111254fb6c44bac0bed2854e76f90643097d0000000000000000000000000000000000000000000000000000000013cf921ac02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000002c68af0bb14000000000000000000000000000000000000000000000000000000cfee7c08000000000000000000000000000000000000000000000000", - "error": "execution reverted" - } - }, - { - "result": { - "type": "CALL", - "from": "0xe6ed110ecc46174f2bb2ca41db388a23d7a57517", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2ff737cfe303a22", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xa8e093ff7d6aaea1c6b5e35141d18f8ef15f8db3", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x2fd58145d7e2088", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xab8fa57d08e8132072ac04b6c84ab8d4d557c567", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x16345785d8a0000", - "gas": "0x2e2fd", - "gasUsed": "0x24f3c", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000004d41f220db795bec6803958c300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006e9513330fe54ad5a793908dfe5676596394534a", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x10c04f0161c669080fadad3d43e3a9108ee72988", - "to": "0xc3aa9bc72bd623168860a1e5c6a4530d3d80456c", - "value": "0x0", - "gas": "0x1f53c", - "gasUsed": "0x1edda", - "input": "0x2407a746000000000000000000000000d2036d4c669be440ae9aff6ce025ab91f3bfd212ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9c3b95d11fbfdb61ec64d7b038328d403e5f9fd9", - "to": "0xa26e73c8e9507d50bf808b7a2ca9d5de4fcc4a04", - "value": "0x3026b63d9f040fc", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xd8722a0fc8c97b3ddeb66280f9d2ea17d2fa84f4", - "to": "0x587eef1f295b3462f545c279c95e82b799aa3f0e", - "value": "0x8401699a6f84000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9b1c83c13d7dc590ece3ef753222e2a051362965", - "to": "0x7f1949644840691593ba1c93bb17c4cd5a3074a7", - "value": "0x0", - "gas": "0x1376e", - "gasUsed": "0x1243f", - "input": "0x6a761202000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000044a9059cbb00000000000000000000000087cb4b5ae8e1e9cf16bd107320a59a5b34411ed700000000000000000000000000000000000000000000000000000002540be400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082edc9ca983c15ac021594567e8e59dfffbf159a3eb201ec169e3eaed90929b6931dbea5c338b3ca4992a0cd450d3107867b570c59b4347f2a969d067c8a77f7b4200000000000000000000000009b1c83c13d7dc590ece3ef753222e2a051362965000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x97ec0a17432d71a3234ef7173c6b48a2c0940896", - "to": "0x9008d19f58aabd9ed0d60971565aa8510560ab41", - "value": "0x0", - "gas": "0x8dec3", - "gasUsed": "0x5f8f3", - "input": "0x13d79a0b0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe840000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000002129893c72065ea5f8c288f0000000000000000000000000000000000000000000000000de864e41aac624c000000000000000000000000000000000000000000000000021570c41aabd80c000000000000000000000000000000000000000000000000000000000ee6b2800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db34edc8c96608c64126600e0470d65173e9e741000000000000000000000000000000000000000000000000000000000ee6b280000000000000000000000000000000000000000000000000021570c41aabd80600000000000000000000000000000000000000000000000000000000640a4467c1164815465bff632c198b8455e9a421c07e8ce426c8cd1b59eef7b305b8ca9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee6b2800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000004139dd1acd15e32f3e7beee395a5e4e17416e55d7b7f77847fcc796dafa25a5db90322182db5be6172d79634ef9a7cd852a2654a70bc8b40d898efc41519353b7a1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000009e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000007a0000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002249240529c000000000000000000000000d9fcd98c322942075a5c3860693e9f4f03aae07b000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000078e022da39a700000000000000000000000000000000000000000000000000000000000003454ba800000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b9b48bbdd8018396daad50364c467246db30d87000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009b858be6e3047d88820f439b240deac2418a255100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e770560000000000000000000000000000000000000000000000000000000063de35d60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001b0f2cc6131727e8675034fc8a512c6e4b4fef81f7269d6c255d2c613bb07d32b72dbf151f9447536ede55543f09ab3d4d4d19472228bf94fdcac4778e342c4ed50000000000000000000000000000000000000000000000000000000003454ba800000000000000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002249240529c000000000000000000000000d9fcd98c322942075a5c3860693e9f4f03aae07b000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000001a055690d9db80000000000000000000000000000000000000000000000000000000000000bfb044000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b9b48bbdd8018396daad50364c467246db30d87000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009b858be6e3047d88820f439b240deac2418a255100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063e76fe20000000000000000000000000000000000000000000000000000000063de35620000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001b5bbfe47fad6f5438d519e2ec35d2fe5c8ed400353c6b03e15d6bc34619f686b52868db545239f9f6922f1ca52ac9cbf5510dbae52aa464c09bc78516a84a4ab6000000000000000000000000000000000000000000000000000000000ab62f8300000000000000000000000000000000000000000000000000000000000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000104414bf389000000000000000000000000d9fcd98c322942075a5c3860693e9f4f03aae07b000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000027100000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab410000000000000000000000000000000000000000000000001741badeb2c03dd5000000000000000000000000000000000000000000000001ed1d65345428fd280000000000000000000000000000000000000000000000000214401e56a0cc4c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001048803dbee000000000000000000000000000000000000000000000000021570c41aabd80400000000000000000000000000000000000000000000000002169089528d765f00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000009008d19f58aabd9ed0d60971565aa8510560ab41ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xb6480922cc2af4180b8f10ec0fb3e8527d0db7e1", - "to": "0x00000000006c3852cbef3e08e8df289169ede581", - "value": "0x0", - "gas": "0x36bf6", - "gasUsed": "0x2726f", - "input": "0x55944a4200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000ca000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004e00000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000063e1a1900000000000000000000000000000000000000000000000000000000063eadc0c0000000000000000000000000000000000000000000000000000000000000000360c6ebe00000000000000000000000000000000000000009734ece8b84f03dc0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001aa535d3d0c000000000000000000000000000000000000000000000000000001aa535d3d0c000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005000000000000000000000000f37cb20090057bdc70b928b7f91d081d412cfe5cd7fe02fa40860f55ab87c4ee6f9ede8c666ca6ca0f6b26a3ba377335b687bc8d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aa87bee538000000000000000000000000000000000000000000000000000000aa87bee5380000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000041842a7dbf1e3d541de8eca813b68b87cc7d551f6540dbbb23122232a56b2c503c4a1ae11b893d34e3ede03adb104d2d9396bd5e27e8676299eb8424faadd924601c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000063e1a1900000000000000000000000000000000000000000000000000000000063eadc0c0000000000000000000000000000000000000000000000000000000000000000360c6ebe000000000000000000000000000000000000000025dab100f1b6ac8e0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f37cb20090057bdc70b928b7f91d081d412cfe5c00000000000000000000000000000000000000000000000000000000000014460000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029911687df40000000000000000000000000000000000000000000000000000029911687df4000000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000d7a7099eb680d441ddb24e7dea202d08e126b69005cadb75dedbd1c03ed6e81d90d648591800c33f79ee1de2c4dcdc2ba70f345d877f609289eee98984554dd0dc41c37e81afcba9e16d91b8b567c929e80e4125f437ab73e1b99fb4d021b5d31b2d018f280d40cb7407da97753e04ddeb45a10c5e6f997c409c4740c90c9c14800a5c2a3a988b3636acc8e799caaae7de7636963db00f25b5aa33254a45c3ddb7d24d7063cda107a67729a83b8f5ed39f534308ecdea0d4c2b2c597d2c12e36d8a13d799b1872652bc38a906b343c90c498459c74b770b7bc2797ce7eaf97d804b92284ceef53c86617ca43178c4fe136b805d164ecbee4855880906b3b830e44834307ed94fb7c8ae6e0c10f683a455c4b882e0073ab68495c0ae1f50a7efeb488cd5e9609e76450adc0359c8f18f39c222f0076b2f56a79ec7febe874d77fe09c2681ff0e7c6be557a4f3c911d7de0286580b2317cf21a56a0c2c0847b947508735bbf56238886da5e8e386b72c9aad91c76cf8400ad655439e5c8d1445ec18b3c047eef04f0419f3cb7510cd8d4845fb72371abb6024e0d3076a82cda6d6e0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000360c6ebe", - "output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f37cb20090057bdc70b928b7f91d081d412cfe5c000000000000000000000000000000000000000000000000000000000000144600000000000000000000000000000000000000000000000000000000000000010000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e10000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029911687df4000000000000000000000000000b6480922cc2af4180b8f10ec0fb3e8527d0db7e10000000000000000000000009acd59419ee55f121ea7022e989ca74c2aca9fae0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000" - } - }, - { - "result": { - "type": "CALL", - "from": "0x9a7d666f031e4748bcbae05e97ad0a7fd0737be8", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x71b7", - "gasUsed": "0x5fb5", - "input": "0xa9059cbb00000000000000000000000029c79c0ce4bdd81c0340cba99a85f1e2ee99a0f00000000000000000000000000000000000000000000000000000000006052340", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x215a800eb51dd612f75618b892601ddcbee911e8", - "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", - "value": "0x16345785d8a0000", - "gas": "0x2a97c", - "gasUsed": "0x22dbd", - "input": "0x7ff36ab50000000000000000000000000000000000000000000000000000001ca3f97dde0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000215a800eb51dd612f75618b892601ddcbee911e80000000000000000000000000000000000000000000000000000000063e313470000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000022beb89e08fbfd32ade3d106beef43d0b04c5b56", - "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000229a058cd1" - } - }, - { - "result": { - "type": "CALL", - "from": "0x951d5aac7edc356dbf3cddba53ba8573642b4f55", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x0", - "gas": "0x32369", - "gasUsed": "0x282c4", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e3159f00000000000000000000000000000000000000000000000000000000000000030a080c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001600000000000000000000000003106a0a076bedae847652f42ef07fd58589e001f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000640a9b8e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b0000000000000000000000000000000000000000000000000000000063e3159600000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000004102dd678bf27099c616a307cbf6106f7d3c1405492168af8ed1d4e48dad51a1ed459388919258e5f6889b4e27952fa75729ca5bbe8c34fa3a744ed1e473710cbf1b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000d8d726b7177a82cac00000000000000000000000000000000000000000000000000688ce32dbcbebb00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000003106a0a076bedae847652f42ef07fd58589e001f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000688ce32dbcbebb", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x011ce6fe10159b88b27f2711d8bd696408dd0fb6", - "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "value": "0x0", - "gas": "0x11de9", - "gasUsed": "0xa281", - "input": "0xa9059cbb0000000000000000000000001262a61792460d203ba1007f8d69d4d1d77852a50000000000000000000000000000000000000000000000000000000005f5e100", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x8931ec04113c2485964eebaaa7f08d434e0b22a3", - "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b", - "value": "0x26db992a3b18000", - "gas": "0x33dc7", - "gasUsed": "0x29ae4", - "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000063e315ab00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000026db992a3b1800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000026db992a3b1800000000000000000000000000000000000000000000015be1e604f98060e92134b00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000003cb63598d2cc62f3ddc760c918b3437b45c15961", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0xec3dcf56da0be96f69c45353c5df9da2bd908cce", - "to": "0xab7878196133c2f24b9539ef58c0b8b76b85ada4", - "value": "0x50677e59d5f54a", - "gas": "0x3e4", - "gasUsed": "0x0", - "input": "0x00", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6887246668a3b87f54deb3b94ba47a6f63f32985", - "to": "0x5e4e65926ba27467555eb562121fac00d24e9dd2", - "value": "0x0", - "gas": "0x21754", - "gasUsed": "0x13a7f", - "input": "0xd0f89344000457bd880000380000050000000000000000000000000000000000000b0000000063e30e820000fd021d00001b0000000063e30e920000fd021e0000010000000063e30e920000fd021f0000110000000063e30ea10000fd021f789cdcbd0558555bd338be0f87eeee0e91104491430802222129d288484a4a97c521a5430e25e1060549c5221411459152c240ba51bae5d0ffe7c27def07f783b355defbfebff737cf739feb3eb367af596bcdcc9a596b6601c02e2dc1ecfd931602c8e46503d4546551fe05828332476d8e1b54a875ca269e77cbd39a374496c1b08b1f165701db8086a988d967fe8c039784f297b4fb12c1290d25080033c07e17dfd677abd924139b1f821e23580c90bedb0ffd1f200ece4f7006086cb84a9472298c7b15c47098e660dff91a628e77809bc6eb5b669f0568a6c0e2042327bbcc448d2e32b38f668d61213b7d349443787049081dc9c6780d80b92cc12ee96c0e3756fa286ae8a6fc65c2f191430313936cf4bd34577182692c8328fc8c0d54ca60d872aa73a1dbdb97ffdf2ce16e7f582b41d9f272d34853873474f4be75e0e1497033c5dc23a2d2ed4ff6b7d4e12f9ae544eb329f88849cf5602c18712ec1446d31403e8001bdd98dbdd18226bd2cca6498f9fb63cc2996e59cdc9f14c50f097d47cbd31e292fe6372a68a07a6c3ada263e7b72e2743e780d3f7f7c42e875a6b0f33ba128e015c32755f831239117398f9ec62a3a375df605e0ee4b70177f18f6e6a8631b0ba09eea4e2c74a24de53f4cb1891dcee2278fd2cdd60926871319163d2983631f8bd35383e0ea02041ec484b41820bb0d410f27821143bc82991e020fc57f256634ac17825e16028fb5376a6b1a20da87f83c8617b882679d5e6122fd99f631cfef4f80c00da07dfcd883687404ed8b69b91beef5d21ec94f00a252280dff59801a7fc80144808717f20866fc65280e57c41d79f4de1ed96d40601c4a3fcd7d327954d9e7b66a0148604aca4515654164a0ecf66aaa2a3300be11465fe0e5fbf27416f9613526025900ebfe1256be3f2c32808ab2290046fa06a577a450e575bb439db326d20c61ae2472776c84115986a560e749b943207ccf79aa95532f59a784045ccd5021aea3aba2c5fb9d51d8d65fa801f92f071884c2020ab938a9cfb7ff906b3bf0f5c91dcfac149a77647cdd45d12ff3f1fc307f02fe7d1f0cca6d7f1028d6cd3897e0656f147deffc1ae7a3cac304d11b501f809258041818c2562bc4606bcde7434da6681f1c8ee0f1794c9a571f6b30aee3ed7a6a4a1de47731c4b18fb29e400b152e901d3c3d9d1553ff8cea4544057deda7a982f1a05c0098408f05e0a520022835910170125914d870b4cb4999e1931ba7b9be0fff3a176955b52fb23450112da505c18e75121d2f0372ca3c2fdd47f952436a431e69e04367faa30acacd2be9791cb3f22310f4d4c67dabb6a4e46796edf43fc904ba9acebd168898ff52ed538745419d999de234800069693497575c354e2c2ca93aa71554dd79fc34e9e513adba2bc719ed25cd253510204eecbbf7632c461c37eed07fe6517a37c833f924ff9942c095e746aa8a15a2ace2005080cef387696c2e8b303261d46e7a872c5520387feff176de70996e500a35abc61fc8a1624f0d33cc3eca73257f0302c441276b8220a976b5764b968816e787c5ae99ad7106d207460e19dd29bfc013e29c071e080fc38d49357c6fcd28b12891613193ddc17d5fabaac2d12065a68e84a289e6cfe9d131fe6f981e7130fcac7a4f3bcbe9ce93ea99731185733a9dbc7d923efc6189c19f68df26fac0fc419f6ede519d7eab1b6b3f3e8f6987af0e48d94b60572dcae636e6cef8f297b58803803ddad69f35ef2fd77cfef1619982942ebfe884d3bc835f53273eddbe71121978ca05704780fd374b90787793d76c78a592ad35af2cd44695bfb7a331208d8e8b6067932fcd04090b2e22db8e99283abc44bce42579eaa0d15d93777fa8a383fbc5a1b8a4f302cc00e080b6f337aef8ab35c6a197ce494cd1f47ce9fe4778b841e11ac7c46a641060c08f0f20c06cf91c758b136e53cbd42bac42f9d70e6fb0c6c79fd25b9cd62531f67aab27d2068a4dbc38fcb67751cd33e80bfbb268898838eafa708384aab4fbb15b083cca98a93f030f258ecdf606fb2a7f3af0a83019f44b5c4d54046ec62670a51fd0a8779681324cbf1b78c8e2e4b5d78bebec497746c559beec4079032f94f443b40f88588b49482044cd24f608a110609aa3149bd37057163feaae9bfacac67878e5cb8d9ecfe497fc1e77dad913aa91827683ab1cd95a4cc3a1696414aed12f8dad667bf204230a053f48315b798fdb5201c0387ad41fb61579e0d955a276d362646960b6dcf52f10dc6270de7e02c8bf97ee8522338a4c294b9979220e56e4882fbce77ea7f6ed10aee63ab18e79c1c5262d9257ca0e2425d41d1374a24ea04b2cca1a3cf5f88715eef13a61dd6a25fdb57b6ffd8655f5e1b347632f7dfa761fc0265bc2260e802f936d7538831dc5cc32ab49822b675ab510ceccd6de655a63c2a7852c83dfad457a4840f08cc48cc68270a7a1bc7128d8b1bac7706ef0a1e9406f46c2376fd4e26d2c00ec61721c3c383e8085838d0b23f8ad06a0c201424c48bc18b38398f1899e98f1a99731e31b309a73bc98d6867de16385af60c6cb619c7fbc58a36accf8ea754c780000b0031b549d0faa0ee7c555749d5bf1c5ff402176572dd6b63aacc12e1b65e6c4503478ebcc01ebc0833dc9861c4e4c4384efc2ae8345672f9bab2ff7b7bc175ccd76e24d4e198d551eba7d5b934ec2d655ca939b1337db86a5f19c91efc4f0a9e265d204393ca94ba71a6ff1f010930fcd465da4509520e9ad108e88bfc8e8e7e9e8c807c59fcd4b2a3a97948bc4caf341b165a88da093095ee2e3ec046ca743068ed5183692d1a8df2f363bb4ecf754aeeb85f19d4aa6ca0446029f3579aa45ecb13b1f51f0299e1c92451fa7b0c8613463727d4c5a55b5e3859a159f77341f9a1a6c3496cdd36deeb3ae65ab16e5474de71d89497a6d1d7a86f796bcd0652f55c5f7e5129d9f0f8b8309d6f7980212c82fb4b9aeaf7ca8f3bea4d06bd06b69eb18728a4b6d96dfc1330984133f9939e7814fb46499e4d87c1bc7a7e6a808a0a379e5086eaf6691309df10100e6b004b315dd3407a45c293fbdde4404982cdfd1e01fa6f3f84eda9f2ee8aa66d7ff1c62b820a3ab3d60c0296601f9906aef5885b3c385445ee464fc7ed71b0b0f73b34b18f008f0a4145a411cf1fdedf17691b3f704569bf5e94bcfe357bd9da267a1a73e7fec602b289be033ebc859743664f10c0efbe79121937cc19766f3bde0467268e76a75fb45004b63094bd51f16b515fd49e3ec11fdc106ff1efdfd626442a7ec09b9feffbf1efd41d96f28f8c7a33371f05eb3f310c2625d30fe66bd1b8364e5e2a98cfb8b0dc6a2d8b8c9f6a81ee7935da00d2fb3c6686d577440bc4827a8deef4a0c94c447063c5d4922ee5486e1d59e04f08f2ce10bfbc3fc363518378c1ed53d933f2008d7d08de83aab1f6b79dc2043b2811c59865723a76b55b4bd7154117e1ea09f4a85573425a872ab2d2c6228ca603b7e7217c0d81b129de4bd47e24b619a700c1a623ca0f68fb021f0100e093684c06343ecdfe140f1470a8187681f0e25b0ec10f81d0035bfbfbea9066530e010fc41e1b1308f3f26f9fa29806a1f525fff4e4fa97bc9d6cdcbcc59efe8cf34bf7ffd8090ef9dfbd3bb9da140d0432d08f2bbcb94e5ae3b93b0f97fd7b6ed5ff0bb1ec4cf02947d811a9f1df8dd7abf4f0f05eaf0038abf1df6e597ec3bac8d925ed863c7f83c3008fd4a44667f506bfc3c3aafc95c3f64b20c2aa223da27ff50dbb950fa0df57d28fdda217f50f67537088e0f7cbfe31990c2d6746eafccaf21ac8977c32946e0c74dec41aa9fff7a2ade6280341c01be562c9c6456df48a93493451e7fdb3e9dd0fad94a3823cb6b446645abe97a4624c8ac19df629414de7030287434e54a5268ed5ca5ff51e9986a81daaad48956d01b006cd0d601782d07feda66e24a8afd529d3781dfa8f27ca06760758671b16508894480b10e9501934f63a46548ccb03a1ebcb06f5e4924fb21be2cc327452da1cdf2d9093cc972ee9183f80fff1893eecb1fcc06418f5033ca77b7961135ceac835e65669d00908fcef5c712fba325ff52146a17ad90df6533b575a6cb4485dd42a5eefbd3a0d5a20fd20933b64ed09ba9f81c25ccc7ab28db13710d5cbc573bb25669430c6e9f99ed9be311eda3b694a4033d4f2c69b35179c86768bc484aadef97f8c07249af2eea8ccd5dadb0f4e60c81100046b20423f487c5fd3530bce1460a1257d3a2b4dd4f4c8c1f38ae74a1939111597a37c4632c703bbf787207b12f38b7a5529b44bf73511f7ca595f521154a18f60292dee2c7f730986aa2a66487f58f06057bbea04432d8e3ff47b852381d327b65ee83970eada210256e8cdf7c711c6b1dceed5ae257cc614e8dd666209e979c68767119ef9786f9779f1ab90d78be2f236c6aac8fe89de579705afadba53f67efc6e6ec8d65a0dac981d41726785dc4e3d56666ab71adb50049c62eb3c7d94a1ec7067b65c39ca14f364d3b213f76e52a3fd4ec2140f7e74f9b52eb96ae9918df4410df087c68a703237e27a42e71d2a881053fe9531248c3b1ea2c1d7ebb437150a56246c6f2daf3af1a73fca1b1e794d8d7ba84e22a620120177deff426af8dbc3fbb6d9ffa3d4caf99fd30606628b35888779ac905407dc6383d9a85ed08f03c2ba766ef399ef3cacfe645a5ba7866567a4d3fbc1c258cbad418ca17235ed2081a60517fcf7d14b83ce7f53db3d6fc461341e4926d864983d2a260fb6b694f4267000845dff05bdd9433f8b328d478f4a80f96d37ab34dc34235efbbf9e0d62b9ea6c8bba0cb211b0cacc0acc07240fcb6318beb7b7a0dcbc1b5188ffb15b718975571683a85bbee63cfeac93cacae300475ba3d9d98b94d9b6893fb720f947b13311489b40d29665db660a5bbdb207c3f1220165b223e1a8097d2b4798640d0e181f2fb7673281738feaae6a5ae2d48265a6ce2514477035b9fd22d67a5b28ce80d0e3e8a15e3200180f5f6073e275df4cac1c1a45283a6f276dc36dd47f527123152c3d4f0a1ce22a0ce1a20f8dbe16b86977febd12a5e97f59a56f29cd134078c7b1d2330931342ad4510be3c21d45a04e58bec33970106b1d6c1a1629d39f40c382138c7e01a616ebf7a538057d23ebbabe67a35d7835cd941e348ba11a14cba3a70c6ea4ea3ee17ede0d0b8b0517f55f56b071c6aa317127513c76a2dafa4f393898036677b3aacb570993c443f9c8c21c7631d0f843b50c72dcaa8067156a69a567c036f869dac9d906f7b55a8edf5b97d9d433fe85b346ba5cdb370c1f78ef4a64004179833d316de25cda04ab23e84e761962a92e42bdd765bbe22df37d48afaf0276a43d020cd22dbc794ceed4d124ad6eff39359b59225da98c2c98f9311b2e1a515d325482428d2346f8f7bd8aeb2915949838d7e85c7a4d353f2cccbd5533fd2d18af2f46d20f24f8018921de33bbf049b418265c7323457d0f7deaba628760c88901ca01a25d8c023835f55199eef78d3f5a003ac455fba065793c2398155b506bfe2a3202116a6b15009c6cdab7fbda273ba7501ac977376f7742996db28e120209e96749f247c73ded444376860c2c15c178b8d05ec90c0ab5b3d61101165cf13bb81bae5b162549f71575f4358c5c9627558877a064c2f69c94f4008fa5f37eb2c93b4ef3734556154f02bf05bd5117513cfff71f52bf8f91ceb6007ad64eccac0aa0dd5f5b32f72dc9ac4260f3404ad87c559c5d70f2980f7b4db0ae75bce55363f80fb84591da49de6eb3f861e123d47dd347b6143632408949667287c979b2e7f6142f9a5ea45da61ceebf6c0a99a5326463c32dc76f3ee7ce0878fed0d49d20d1c6e06fd7a676e7d7ac97ff09e6f62c2790d2746009d9f73d615cc90177debbeba162ca2103b38ca2e2d6777a2f443068eeec3a9ce8fd694cba67a6096d5fdf6383c05ed8ab9230c49345dabec638a23c3f137270ba947fc034ef85283c52194f7683de8c6fd3407b339d6478ac4b3ead2ddcbe7ed10eed71ed617cf7c0119dd6f1cee6b79a19ee1e33a81772240942281682cab17f86e1fa3d6f1a03c221e34a7bcca1a218a2775319c5dd52ea1ee4635eee3e9f0891ba43d8f8366700f1236831e4078afb80da9e3d585814b537d1aee2d4bb7eb40961180f0135b7648eb9b9c5f10109ce5259c45f6329cb9259c695800ce55c2b2ff712efffc17d6ff38ac9bff2707b6bbb0e43b5f06762001fccdffd877bcb96953b076bc02fcfd6bffcbeafcfd0c4376eb0b7b582772ac3fbefbe7c7d8770e073b40bee56093ff2d8e63ff173b4bd843e81454d167ac11f10953f5d961bff54b72b7671344be08a02dc0ae59ed42a6fe9a14dbd74536ab88c8bc78817b33166f32680f2e18a92f703d9eda61af76b3e790c9497bbc00232c2e512b23e80500b4012af3b260a67a4b449fe6d3854055c3203678e78c7f1fd8c3f186a624aa4557b036915265801f47b27c18ff3261efcadc62e453bad3a2717b37cdd560f9e6f520357a09a5ee56582250d525166a3dd134fd883a1096e1dddf0716551f59306565921294f69f671d74b17f5249466612f8fec12b3903a6528fcb9aa550cbd07e539ef420ce35616af87be2fef417302faee8369491cebab6e8770a45c7b3d681e601478ec79f247fd4076ac84d52f51effdcab6079e329f7da9bb01f05b30e78ea051d3dc54fdd9f08fa2996424da813041eaaebd4db1f7693cabd3b3eee27935427b30493dc635a475e4c9872dfa58dd2949ad700f82292a5381176851106efba725dc274ea47fdcb20773aa042dd3f53f5e05e80f5aeac3bfdb24bb6a72cfd8f824000f5afb859e8b65d2d411f68ad71c0e76a378562d76a59d6c7f96e33badba9148f6c83929f130c07cfcbd309ec5b2ef6f09cfe996eee09fb3d1dc781c0c3c44146f9875c0803e0a3ab588cd829b4affbf8e5e0a4c2b88b598627bed4234f74e782475bad2896c4752e569fa866ebab387df02d91c8a5b75544a9fed42b55910f2e9400d8514bd8e1feb0e8add32cadc37b9c666173fffd342bf986c4cbf6c2eeab7152287e1b1c89a304d1e9edfbeb2fe469d63fbd79f80f0394438ec51d89dcc09891006d3560f5ff4092e9bf29c9f2ff266380e5ff55c6a044e197e13f701a1a9de2eb65657db1037d3acd58f3cc4459e786c8e3055eff8b3a3c94ecc7e76818c0231d1a53ba6322bc791caf9ba84ee37e99eb24afdf68f08b927d15e98bd233f3fd577e53fef05ff94d0da2b4a28aaa4ecd9cacea67aeb6222974f30b74ff53f94d30d87eacce8efca6d7be391ccb7c8b383521a32b1f75b51b002c1306383e0e361e012e00c3fabdc5625ff94d81df89315adcc0ef6d7ba708fe811fb98971290d1c07315a2b48fce4283946fca206c6f985c207e134e4ec07ff879b98f184f752cfc704bdd0be2fd71f5ade2828b073087e1e83252a62f15059e547c0693b95323166fb1c144782f493e12561dee994d3641a3e82cbc722efa5b4deffa4f5be70a194f178344d3dc9c1e82f32d14b53afe88bce9debff21f9b2fdcbd59c7e23f51838778472de8351e7d0a65a871e66fa40514f843ece411e3e868f94355e50e536d8b2e8abd58f326fe659691d25cee1a8dbb899bd8cc73739aa9a784ea0227020da8e72099956e26a37cef23d88cef98a6255f86557efc964029977fcf2f023da343592b32f48ee6253c8ac89c2739f5874d7327214378b33885531524890bcef5c4b1027920d78615a1eccb0be701547273fac0d3b78c8b7bfb94560c65ee163d3330771b0ee6b0ae171ced232e79831a7c40f0ba2b45c2c1cd8a5e2dc4cf6b2178ba6461c4197e3914d84c7920647b910ed96368b0fc42d4f7147371fb4f573b366217bf6b868abb24c77abb24cfdeaee9565b8eb9aca04ff1d9565f318d09bddd81b4d51764d4f02d2114580fd22cd089b07141c64b49689ba8736188b5e552aa12a46ea5a401fc3db74ea8ea0307d2fa7f92761d6f32538599ec6ac099381046fbcddb26df98a2259a7477439012cb2252ce200b84edae6b093d079a278beb21b1b492009de9f5f5479cb792cd1e522c7656419ec6e4fdcdb3df35eff847ff7a1fddfc9b18524c7c330bf83edbbfd094a2a7ec521c06b3af360505a16a3a51237eb73c1c85eb9e0dec7ea8c0cb4aa5add94db7f3220e341dd2d4c635d7d1d4c5ce553a153dbdd87718cc441756a176a8d477eda34a2e68547576f950ab40bdfc77e3ac33af70cfff5b9bee604905b26504603517b2f5c82f0e0b71949f4c9c08e93cd82defa27ec7894c9aa47a901a0109d1f0053cede2aaaf09745b9c8c812c105423b6edb909fd7629b39724122300659aa401760c2fcbf3920a60400f8379805a939c000625c952c06485311a082948695f4f7c85c86e3c3b2868f5d2f181c94fb482a57d4f9967448dcdbfc241a1438e5725dc6a023fde2a4b9e639c020f3210d73a11751f751c9b047c71c6b59d2ffca9326ffcb8f3021a7e7ae8e7b4768b351f5bea841425352b36cfc3fe647ec2b7ad9e1477c555c7edd5a7fce70be5db2d1e3a4af1c807dc5181b0b868f838b874df09b41e7befc08fe1ee11398f15918231ffe5e6a1a8cf8be79997f14dfaf82d1f3e51fa8c6b826f00f5562d43e28fc1fe609dfac7d58b5d859eb660256dbd52e412b257ae5c4a396831e776e0ad6be7e3de73927fb5c3fb7fe59669278655f3dde634aa165c39b8b0e2742ab471e4d509e7f61623d62e1e05a8a42507ba5bc311dd40ef466209588b926a2509ec681db73d5b6c1b07e70489faceb45d9f560fa51da55de9441017f9851f79992b08285c7eeb52150fc71892e475be935b7ac7780b0d35a976e9c22f1c06393d0228c3fd628243ce6d2c0d7feeef2e95bbad63473f28732e2610703b34f6b1d150acc264ffe1ee75428d42a7aa23c2a879e97c17bd8ddfc947e3943337d7fc0d929a23ce6f1a09736d7db390ded2a834ae698f87c96bdbbae1c3eef4c3bc6154fb4f15aed2c659fb3da6d073b04b87e965530a18da6dfb4fe6d531f275f904a5270d78cd0fd707cb8c15ca5675b2b889b19ab2dee96ab841bd076ec86d989b49067063dd5061401a6849651b7b2b9d2fe951970e157330344f54f5cd350656398d3180093d48a576419615079ef7b0361ce95c9b318cc097c60c03bdd7fef44ec3f3303c4c1427243fd8226e08cd0f553822678599ca77a7ca70d7ee05dc4bf164554f3b9f00b48f3bdf03d15b55150c9985e5d08ef277d45a57557cd1096655d61ede74f533fad6c9eb56f968efb67b2ee75d6fef73056883ed7a445e70c188b4b75b465563cee528e7d30a6ee62ad7ab18b83a1e75cdac7dd8c2917c4bb1eddfc61e9dc781d6d54fbee6298f483385ce4449b1f284777ed855b59d63afdabb2716b78a30a999660e6fc8f8d4c4f5a2c96a7914b12ffbacee1c7ffe9eb1c8c1347f05950389110f418c16280749fdb687f080727990dfa848e574983bdee71fb83b12d090b1c7d213e4ce107adc6620f3296f88052246c35dd78c10ffd05d6dc8191d22ee3f2d5b460ffce139278b1d9579cc3d400600c3de2d7b395923c49bf8fa2aadf5ef6a09268483a78abcf5db37c2f0e065ccf49496cc71b96ad6d7a851f79afa145745c0187897eec4d82590b4f47fc2c28f836785eecb3e217c38c52819bd71a651a6df5eb56a372f8de766470302539e700b0c8255898dfd3ad5c8e9743a854cab8b8181c3e860722baf34cf3b4641faded9c9065306efa8cc37b8b3b99a0b1cc38fcf19e7872d7ccf5bacf4310dddeb15456b19fed90eebb7adee6d44793171acf83c9faadda30115b0c900f427c7fc77cb01d79f85a5457bcb27ac17fb588d32df53483c60e75ff8dfc4f983878d7f084a118bbff31404f7cbd742d9df6d365877837befe0d40fd340efb158404e8b9804c9b1a11e3d5e2695168994aa439249a19707fe900d72253f377bcdbcbb57faafba5825f56f7a352ac77f97222493e457cab74a0bd90daea74122a86ff5d75e714edd7694ebc0a410d01ff0e7547806d6431519fba7b57e1619fef89b5dabe831bdf656af5ba97503cccfa99694af320c82667efd4d5e6ff35484944a342a2fc71349abb3935f8b2f7a07d1fefb9cf99119b25b9017086b9cd014f4a40a2388df194dee01e4aea1fd1f7e07fdb7afc5ac1460c3240769d401c3cdc75d3722cbdcfa044f065ce86a3fe499f8a8eec952f9271c54f66c4bf5b13c8835473ecce7e0fd314857474d5488e22c72797911e852ea2e717414e6bee63cff20158d4122cdc1f3b702ba65f70dd53dfe6e9acbfeede691819f1b46597218463c589cd7a1362f476e85b217188146c38cde75d1e5739d3ed367bda3c594e4cc41603e47310dfdf213ec7c3adb0f41b9fceba2e262ff43f19d68acb60dc71caf33b3bd1e2a0ce8f8a6ccd8286a93bc4579512e77d66db2cd2d6047cbbecacfc35bd108d5c8920ee459b83ed42653c4c5fd9c6c42c2566e90ffb3e7be8eb9921d6d47f3fd68c2c66b3461ab9e90a68e3a33ad98ff5ac0d95a79ee6180bf5092bbc9f52524818827f166c11390e004804882c6b596df4b9c57056e7b25ba48982e1f944c4c589b1fadab6139fda89f893be82b21c4251d85106f514041cde2f526f2d8597b5f39b99057c6b6b0fa192bba192bce979d06f36d78e83da6d4c76cbf2db4544a033123f9e2a759f276552a5b3f0a718e3ce160d39145fb3fc450978677399e3118d7d3ea827063fd64bddd2cdc67372ccfbf4c21dd2b1d8918b294632bc1d9c554a0453af00f20f4be4f5fe5888ad8d109f41d46e89adc83272cb806619285352b99fb986ab884a61fe3cd465196410611ed98eeddcddf27cf7a25c6af89af176ef34827f015481f5afa467ed06ff7439dcdef34b51e583e8ddc9fe35f67cc7b005921b59dfbbe72f29cfb7760a65edfba2aeeda0e6c69df5402f3de29a0a175d5f956e792c0db7e2767c35dfcbe069a119996836538fc2ef39b4ba3792a3317f114a7c897774104a3e76ab62fb15fc2eb0c356ffbaad24caf97b051d541f7ea58d9fd101b8bacd7e2be8f699350a75084d00a543fbac9083a810fbc50a39a8f9fbf757c861411de243e1f79c9f9fb4a11000d5fe2f6fb6b3e859393859ba3a395a4110fe7bf8875c0376cc4fc691f662ca8e7365abb7de1c001b388c44b9966af7d9fe3f9d64b24ffdc181d2cffdeacf6f1f846c0194fe40253541e1b12bf75981b7cff67f597f18e4adacdc6d9c3cad2e796ffdb01ffee1ea368b10ed431d55ecb00fcf283939393923c3ef9e8a0ff3009dd5f5ec676b20be0fb1be6041c91f940f0825dfbd57b4bcce067cfc32cd6114cd4726982e3456f1e1d1b6af8643d043c13ef51f261b7adbcd4bab434f20e4d520e52403561289a4b2c236fea0b27ea0dadfdf2545fbbfe17187ff01653fa0f6977e23defda7edf33e2b5cf79df6bbdf0a5aa8f9f925ffe8976f90d8a542f6ea33d2925c599b23a7022abc5cde8eb7f30cbe69de83b4fd91c7f20d8b01d2df2ebc8480ffbfaf4bd977fb081067b290b935b871bc2e365cd5de989d233bcbe7ccddaffaaa0c37b5bf2a9eeba705b5d1b4496e66aba9442f73cee9bdc22df3d2f69e97bad8c4b068792f9940e7c4e53f2f4784ff672e4714609ee7ac5f730f0dd5294da156c16a9909d699b338691fd18264cbc529cebf045af0b83e706c7a4255b3eca0c461a8605ce4ef2d3de8c1ea2e6dc7b736705e4301009cd08efe3f78b7b60a55a651c5c14d1951da0abe065ffb8f0f0d893c6c3ca7dc17a276e853e2e25227801407bd603586c24f5883d28a569f25cf4a91e4cd25dbb5136b2c04da9335dc573e7d12bc7c81ad6282e2f5a16f65962ade3f08b1ab633db024b22ce0a9d86b89734ed3f1009087cef17bb05584aafab3c3438c6fc047647f202c6e45f7f2b445cc1d456293624c33c99861488c000df86e46f7f3937fa5ba8e57237c2ebcc382f9473cb11f9b2436de71225a45e58be001bb79d603626dce1a2b320f5129acf6be252c61fcab6c489962369d75a50c230078887ea0b159f409ab34401900dc091cedda843d9d198e992461a69568eaaf37f018d7542201a05461c8d2ac1042c0c4b73f740b2a7f0c36a935bad5c55e03d378ddfd7654b70501b6dc591b6ca5e9f4be7fc13246c967fa3ca511bfbb6dec754593da97a31b3aad69205ccd2a743a426235edfd3786f9681151e265a5b6f569e1685f112dd9c94b13545b12880ddb924007695484d3c1d9993b35be6471e1092d1eec6d1eac356dbb0c31eb5b7c243939e72b9ac3a0ad2d998e62b3e2a99bd012183215dd7ff36a7e5bf6c7404d7bc382797dd1bede330f6567c71d3d1b3f3d973202bde8f2df71ad7d3e5b36c91f6089a01dbd7eabdd5e8b80ce5ff2b67d637dfc922000ffb004aff7c70ad9e497e840286ab7e2686419dc32edc962de768677abb5de8ea7425474a6718e57783acee0d49a4b7066fa588cff0a7e3795dc8edf6d5c21e6ffbf1da0e2cffd7a0fffe525087b03d32bc78b1a187c7fa6e23ce3f6e9d7181375fe13800007e7eaf12307af4b5173ac8707315e15e6f7e419e8d0e42a91afaff64f56b656050951641b233db4b8f664f2da0f2253d4a8066f21c4ce2a6b4b64a4977fb42782ffebee0c5ec8bb33a20b2a9bfafa5bac6b59cbe11bda4ec9e823511a55cc5732c996ebcd65559eaf80a7bd2e5716d8f9e12c7bf0e5b58fd43ec9c0bddc5c9725c4784433d5c271c987f5cfc5d66ccbd45174fdaca93b74cc9e42ad3ca77be3d08d80d1d759594734fb7aa04d9d9b0495bdaf91bab943bd34c3c7eeb3eb7265be4dada643253d17cf4e58f049db83221d702e0bc72b645395b131d2c627af2604f31fe1496b7c948bd888c855d666d9ba2c02e6bfb9f6dd27fbd9b5ef770c330254afe40bb91f7561fcba973127c353d5c9ebc6beadcfe4e8eb93cfc06469524cc640594e06a2f108c716d12f24f962773aef2cd3bee1de10196494c08aedf70c165a05804b68077f22adadc10d0651cbdac9c152ee2b556f023e3b78a2d351a892a32a3760e46d22972a0124021c496fe70ca564f4e6ccc65e929c9bcd47a5a69ecfd3830f53e9ccda74ff889e0239e89e96b3cbb4c89fd5f61c11bb631b51d88fe71d7482f7c1012f47e6a7aa550800084387f8ad6db6872f7e0df5a0277686bdbbf6b8d59a45c7e7718490499da93ff2eedbb1d1f1dd65178b95a1b7f6d92359001007596203c6928c6f0fe2052811f71eaa1488923dfb3c496c96e1e96497ce8be04a72d09ade84a48f452fec2859eebc86ab327789e3b100b5db8f34b48bc2b0d81c8535360fd1f47ef15a8fdf71e210208a97d5678acfd212f729ad108514a1684a6360d9a11cad9bb5b9c844db3940193c372bf59ea46af901dd35babb96b72def04359a456a3190b797cb9deebcf01ee50dc01b97e00d017829cd9b9e8a3c6c61d7eb29fe58437984af40d958c7ed0fce8cf1ce97b1620ac2631ebba4470d3d2217c30fc0484d69811f3cc630fcf293a56ffc49d9571d8e5e5ac3218da6a1583aea5216edb324b8d75f41e121f88388d0b0dcb73fed565dba85a9e5011cd398686ddf49c1a5d795ee1bc12cf3137a78ca1400a75feef33e729a7e12bf0f809b9f3a628af1a25a5c38cf9e278f5b40f4f1dfccd4dfa017e3cda8b8d8144d98e9a14e66213775a8c16cb56443f62b72cb4fe553497d70625f721fd08322da0b1060ef9daf8f8fe0dc7922bd5e5f54465249271115b346e5f0a6185edbedcac0f1cd00d409192b9e5a0a9ee1b5710682eb57727ed8249659298c565e33b9463898d9c10360152c61e5726dfde199291065f358d1e0e88aeb3dd2f7f341bd83ef5e045bad9e42966129180dc23a31b16231c00cf52749f6f127577e861ef28ed1412dae273ddb7f80dab4fa8d43274c352100c63ee24ed3e9d51bb462a43e120155a1b11f50509155dd3b0b6a17fe8897f313bf2e45101a3b4d32e3c769df3c7b96db19530308f03b03bd84eefd6b64ca7dd24a0b1ed80c296cc2c5de2ad2853527aab3a6a44c1740be843ad998c9aab43efd212101a3cc37c05537518d436f9805620839441abf5ed88ce9b75238601f9a50eaa3e9b111e6a159829f6cebaab55daf5c91136c41962af43f7f0875ffdbde76101ee920f6ec3bbd38e8ebae6b292c94ba2c7df50ee985a65a59bcb6f2d8e9d195be760df87161b5ce52d0d77f9d623da8c7251b37b7b7857dca439f4c6c39eda497aa01dced508cc6370b0036be041b61d8d2ad852f7b25470562488e7a7b7dca5ce7900b1aa35915efbb0625773b368b8b9e4b1a643fbe1380903d76aae5a5a4cb0ae1438c66cf62807c09e2fb3be4fa9f488efa15fadfb80e10260ea25716aacdb1bdc3f20428ebdf1b9c61968c3fda49acd00bbfd4e4f603611b2d040a2add53644ac399196e3709564cfb8af2bd60fa42773c0e572941b2e9ebeb985e00a6ba045356dd9c6eb23836d46ed799214b07b3151c7654b6f91ea6cae37817e823392c0f936d72962c60f2acd88bcd7f256f6104cdc23d3311f1468896fbd0add618e9551f62b82d1e5bbae466d88ecab550fd9b562d33c164391f4b99692eca5260bf32481307f9026076cac7878ad7bfc57fce4f7f462aab94784895f1e909ddf1439f556d992e803a52dee76f73e7397ea5e69e289666683ac55cf7fd0515051b4c2c71f6e32c3edbff170000ffff2b8f1de7", - "output": "0x" - } - }, - { - "result": { - "type": "CALL", - "from": "0x6dfc34609a05bc22319fa4cce1d1e2929548c0d7", - "to": "0xaedf386b755465871ff874e3e37af5976e247064", - "value": "0x0", - "gas": "0x13220", - "gasUsed": "0x74ef", - "input": "0xa9059cbb000000000000000000000000d79367527ef941bb7f4fae3cb943ef72dfbaf07f0000000000000000000000000000000000000000000000031708ae0045440000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - }, - { - "result": { - "type": "CALL", - "from": "0x690b9a9e9aa1c9db991c7721a92d351db4fac990", - "to": "0x388c818ca8b9251b393131c08a736a67ccb19297", - "value": "0x16be3ca23fceca3", - "gas": "0x1964", - "gasUsed": "0x457", - "input": "0x", - "output": "0x" - } - } - ] - ``` - - -# Use Cases - -Here's a potential use case for `traceBlock`: - -* **Analyzing Network Performance**: The `traceBlock` method can be used to analyze the performance of the EVM networks by tracing the execution of all transactions within a specific block and evaluating gas usage and other metrics. - -# Related Methods - -Here are the methods related to `traceBlock`: - -* [`traceCall`](/reference/sdk-tracecall): Runs an `eth_call` with the context of the provided block execution using the final state of the parent block as the base. - -* [`traceTransaction`](/reference/sdk-tracetransaction): Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-tracecall.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-tracecall.mdx deleted file mode 100644 index c6cc62fb..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-tracecall.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: traceCall - SDK -description: Runs an eth_call with the context of the provided block execution using the final state of the parent block as the base. -subtitle: Runs an eth_call with the context of the provided block execution using the final state of the parent block as the base. -url: https://docs.alchemy.com/reference/sdk-tracecall -slug: reference/sdk-tracecall ---- - -Runs an `eth_call` with the context of the provided block execution using the final state of the parent block as the base. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`traceCall`runs an [`eth_call`](/reference/eth-call) with the context of the provided block execution using the final state of the parent block as the base. - -# Parameters - -| Name | Type | Description | Example | -| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `transaction` | `object` | The transaction to debug trace. This is an object with the following optional properties: 1. `to?`: The address the transaction is directed to. 2. `from?`: The address the transaction is sent from. 3. `gas?`: The gas provided for the transaction execution, as a hex string. 4. `gasPrice?`: The gas price to use as a hex string. 5. `value?`: The value associated with the transaction as a hex string. 6. `data?`: The data associated with the transaction. | `{ "from": "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638", "to": "0x6b175474e89094c44da98b954eedeac495271d0f", "value": "0x0", "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}` | -| `blockIdentifier` | `object` | The block to debug the transaction in. Can be a block hash, block number hex string, or a commitment level. There are the following commitment levels: 1. `pending`: Sample next block inferred by Alchemy built on top of the latest block. 2. `latest`: The most recent block in the canonical chain observed by Alchemy. 3. `safe`: The most recent crypto-economically secure block that cannot be re-orged outside of manual intervention driven by community coordination. This is only available on Goerli testent. 4. `finalized`: The most recent secure block that has been accepted by >2/3 of validators. This block is very unlikely to be re-orged. This is only available on Goerli testnet. 5. `earliest`: The lowest numbered block available that is usually the first block created. | `0x5568A`, `latest`, `0x04e19fc95ec33e65c667d26a69d66d024732891c13742a345f5001ff900bd60a `etc. | -| `tracer` | `object` | Tracer type and configuration. This tracer tracks all call frames executed during a transaction, including depth 0. The returned result is a nested list of call frames executed as part of the call. It is an object with the following options: 1. `type`: The type of tracer to use during the execution. The options are [`callTracer`](/reference/debug-tracecall#calltracer) and [`prestateTracer`](/reference/debug-tracecall#prestatetracer) 2. `onlyTopCall?`: Whether to only trace the main (top-level) calls and ignore sub-calls. It is a boolean and defaults to `false`. | `{ type: callTracer, onlyTopCall: true }` | - -# Response - -The `traceCall` method returns a response object with the following properties. - -| Property (Field) | Description | -| ---------------- | ------------------------------------------------------------ | -| `type` | The type of call: `CALL` or `CREATE` for the top-level call. | -| `from` | From address of the transaction. | -| `to` | To address of the transaction. | -| `value` | Amount of value transfer as a hex string. | -| `gas` | Gas provided for call as a hex string. | -| `gasUsed` | Gas used during the call as a hex string. | -| `input` | Call data. | -| `output` | Return data. | -| `errror?` | Optional error field. | -| `revertReason?` | Solidity revert reason, if the call reverted. | -| `calls?` | Array of sub-calls executed as part of the original call. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```text yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `traceCall` request using the Alchemy SDK: - - - ```javascript traceCall response - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the traceCall method - const main = async () => { - // The transaction to debug trace. - let transaction = { - from: "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638", - to: "0x6b175474e89094c44da98b954eedeac495271d0f", - value: "0x0", - data: "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE", - }; - - // The block to debug the transaction in. - let block = "latest"; - - // Tracer type and configuration. - let tracerConfig = { - type: "callTracer", - onlyTopCall: true, - }; - - // Calling the traceCall method - let response = await alchemy.debug.traceCall( - transaction, - block, - tracerConfig - ); - - // Logging the response to the console - console.log(response); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json sendTransaction Response - { - type: 'CALL', - from: '0x6f1fb6efdf50f34bfa3f2bc0e5576edd71631638', - to: '0x6b175474e89094c44da98b954eedeac495271d0f', - value: '0x0', - gas: '0x7fffffffffffac47', - gasUsed: '0xa2a', - input: '0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be', - output: '0x0000000000000000000000000000000000000000000000000858898f93629000' - } - ``` - - -# Use Cases - -Some of the use cases for `traceCall` are: - -* **Debugging Contract Issues**: Developers can use the `traceCall` method to diagnose and fix issues with smart contract execution by tracing the flow of execution and the state changes made by the contract. - -* **Optimizing Contract Performance**: Developers can use the `traceCall` method to identify and optimize slow or inefficient sections of code by tracing the execution and gas consumption of smart contract calls. - -* **Verifying Contract Security**: Security auditors can use the `traceCall` method to verify the security of smart contracts by tracing the execution of malicious inputs and evaluating the contract's response. - -* **Improving Contract User Experience**: Developers can use the `traceCall` method to improve the user experience of smart contract interactions by tracing the execution of user inputs and evaluating the contract's response. - -# Related Methods - -Here are the methods related to `traceCall`: - -* [`traceTransaction`](/reference/sdk-tracetransaction): Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. -* [`traceBlock`](/reference/sdk-traceblock): Replays a block that has already been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-tracetransaction.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-tracetransaction.mdx deleted file mode 100644 index 65f42fa9..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-tracetransaction.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: traceTransaction - SDK -description: Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. -subtitle: Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. -url: https://docs.alchemy.com/reference/sdk-tracetransaction -slug: reference/sdk-tracetransaction ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -`traceTransaction`attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash. - -# Parameters - -| Name | Type | Description | Example | -| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `transactionHash` | `string` | The transaction hash of the transaction to trace. | `0x60e07437b027f8b64b409137f75e527583f1139741d311c6969d4efc879d94b8` | -| `tracer` | `object` | Tracer type and configuration. This tracer tracks all call frames executed during a transaction, including depth 0. The returned result is a nested list of call frames executed as part of the call. It is an object with the following options: 1. `type`: The type of tracer to use during the execution. The options are [`callTracer`](/reference/debug-tracecall#calltracer) and [`prestateTracer`](/reference/debug-tracecall#prestatetracer) 2. `onlyTopCall?`: Whether to only trace the main (top-level) calls and ignore sub-calls. It is a boolean and defaults to `false`. | `{ type: callTracer, onlyTopCall: true }` | -| `timeout?` | `string` | A optional duration string of decimal numbers that overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Max timeout is "10s". Valid time units are "ns", "us", "ms", "s" each with optional fraction, such as "300ms" or "2s45ms" | `"10s"`, `"300ms"` etc. | - -# Response - -The `traceTransaction` method returns a response object with the following properties. - -| Property (Field) | Description | -| ---------------- | ------------------------------------------------------------ | -| `type` | The type of call: `CALL` or `CREATE` for the top-level call. | -| `from` | From address of the transaction. | -| `to` | To address of the transaction. | -| `value` | Amount of value transfer as a hex string. | -| `gas` | Gas provided for call as a hex string. | -| `gasUsed` | Gas used during the call as a hex string. | -| `input` | Call data. | -| `output` | Return data. | -| `errror?` | Optional error field. | -| `revertReason?` | Solidity revert reason, if the call reverted. | -| `calls?` | Array of sub-calls executed as part of the original call. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```text yarn - yarn add alchemy-sdk - ``` - - -## Request - -Here is an example of how to make a `traceTransaction` request using the Alchemy SDK: - - - ```javascript getTransaction.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "demo", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - // Example of using the traceTransaction method - const main = async () => { - // The transaction hash of the transaction to trace. - let txHash = - "0x45c1b4c9685a0a9312e698ad273802c20f0354a2248f3f20bbd3623ef32f9523"; - - // Tracer type and configuration. - let tracerConfig = { - type: "callTracer", - onlyTopCall: true, - }; - - let timeout = "10s"; - - // Calling the traceTransaction method - let response = await alchemy.debug.traceTransaction( - txHash, - tracerConfig, - timeout - ); - - // Logging the response to the console - console.log(response); - }; - - main(); - ``` - - -## Response - -And here is an example of what a successful response to this request might look like: - - - ```json traceTransaction response - { - type: 'CALL', - from: '0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8', - to: '0xdac17f958d2ee523a2206206994597c13d831ec7', - value: '0x0', - gas: '0x11def', - gasUsed: '0xa281', - input: '0xa9059cbb0000000000000000000000006a3623db71c1b3442a94e3fd4655334b4811469300000000000000000000000000000000000000000000000000000000000f4240', - output: '0x' - } - ``` - - -# Use Cases - -Some of the use cases for `traceCall` are: - -* **Debugging Contract Issues**: Developers can use the `traceTransaction` method to diagnose and fix issues with smart contract execution by tracing the flow of execution and the state changes made by the contract in response to a specific transaction. - -* **Optimizing Contract Performance**: Developers can use the `traceTransaction` method to identify and optimize slow or inefficient sections of code by tracing the execution and gas consumption of a specific transaction. - -* **Verifying Contract Security**: Security auditors can use the `traceTransaction` method to verify the security of smart contracts by tracing the execution of malicious transactions and evaluating the contract's response. - -# Related Methods - -Here are the methods related to `traceTransaction`: - -* [`traceCall`](/reference/sdk-tracecall): Runs an `eth_call` with the context of the provided block execution using the final state of the parent block as the base. - -* [`traceBlock`](/reference/sdk-traceblock): Replays a block that has already been mined. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-updatewebhook.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-updatewebhook.mdx deleted file mode 100644 index ab82cb05..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-updatewebhook.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: updateWebhook - SDK -description: Update a NftActivityWebhook's active status or NFT filters. -subtitle: Update a NftActivityWebhook's active status or NFT filters. -url: https://docs.alchemy.com/reference/sdk-updatewebhook -slug: reference/sdk-updatewebhook ---- - -Update a `NftActivityWebhook's` active status or NFT filters. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Update a `NftActivityWebhook's` active status or NFT filters. - -# Parameters - -| Name | Type | Description | -| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `nftWebhook` | `string` | The NFT activity webhook to update, i.e., NFT\_ACTIVITY = `NFT_ACTIVITY`. | -| `update` | `object` | Object containing the update. Parameters include: 1. `limit` - `number` Number of addresses to fetch. 2. `pageKey` - `string` Page cursor for the next page. | - -### `update` parameters - - - Include only one of these `update` objects as the second parameter. - - -| Name | Type | Description | -| ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `WebhookStatusUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `isActive` - `boolean` Whether the webhook is active. | -| `WebhookAddressUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `addAddresses` - `array of strings` The addresses to additionally track. 2. `removeAddresses` - `array of strings` Existing addresses to remove. | -| `WebhookAddressOverride` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `newAddresses` - `array of strings` The new addresses to track. Existing addresses will be removed. | -| `WebhookNftFilterUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to add and remove NFT filters for a `NFT_ACTIVITY`. Parameters here include: 1. `addFilters` - `array of strings` The filters to additionally track. 2. `removeFilters` - `array of strings` Existing filters to remove. | -| `CustomGraphqlWebhookUpdate` | `object` | Params object when calling [updateWebhook](/reference/updatewebhook-sdk) to update the status for `GRAPHQL`. Parameters here include: 1. `isActive` - `boolean` Whether the webhook is active. | - -# Response - -| Property | Type | Description | -| --------------- | ------ | ----------------- | -| `Promise` | `void` | Returns undefined | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Setup: npm install alchemy-sdk - // Github: https://github.com/alchemyplatform/alchemy-sdk-js - const { Alchemy, Network } = require("alchemy-sdk"); - - // authToken is required to use Notify APIs. Found on the top right corner of - // https://dashboard.alchemy.com/notify. - const settings = { - authToken: "your-auth-token", - network: Network.ETH_MAINNET, // Replace with your network. - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(settings); - - const main = async () => { - const updateWebhookById = await alchemy.notify.updateWebhook("wh_qv16bt12wbj9kax4", { isActive: false }); - - //// Updating Address Activity Webhook: add/remove addresses - const updateAddresses = - await alchemy.notify.updateWebhook("wh_qv16bt12wbj9kax4", { - addAddresses: [ - "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96010", - "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96011", - ], - removeAddresses: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96043"], - }); - - // Updating Address Activity Webhook: replace all addresses - const replaceAddresses = - await alchemy.notify.updateWebhook("wh_qv16bt12wbj9kax4", { - newAddresses: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96010"], - }); - - // Updating NFT Filter Webhook: add/remove filters - const updateNftFilterWebhook = - await alchemy.notify.updateWebhook("wh_zyhqo5im08n6ougk", { - addFilters: [ - { - contractAddress: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - tokenId: "101", - }, - ], - removeFilters: [ - { - contractAddress: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", - tokenId: "24", - }, - ], - }); - - //Logging the response to the console - console.log(updateWebhookByIdById, updateAddresses, updateNftFilterWebhook, replaceAddresses) - } - - main(); - ``` - - -## Response - - - ```shell shell - Returns undefined. - ``` - - -# Use Cases - -Here are some potential use cases for the `updateWebhook` method: - -* **Changing the endpoint URL**: If you need to update the endpoint URL for an existing webhook, you can use the `updateWebhook` method to change it. - -* **Updating the authentication credentials**: If you need to update the authentication credentials for an existing webhook, you can use the `updateWebhook` method to provide new credentials. - -* **Modifying the notification format**: If you need to modify the format of the notifications that are sent to the webhook, you can use the `updateWebhook` method to update the payload format. - -* **Adding or removing headers**: If you need to add or remove headers to the requests that are sent to the webhook, you can use the `updateWebhook` method to modify the headers. - -# Related Methods - -* [createWebhook](/reference/createwebhook-sdk) - Create a new Webhook to track transactions sent by the app associated with the app id. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-verifynftownership.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-verifynftownership.mdx deleted file mode 100644 index dd4c2dbb..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-verifynftownership.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: verifyNftOwnership - SDK -description: Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. -subtitle: Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. -url: https://docs.alchemy.com/reference/sdk-verifynftownership -slug: reference/sdk-verifynftownership ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Checks that the provided owner address owns one or more of the provided NFTs. Returns a boolean indicating whether the owner's address owns the provided NFT. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ----------------------------------------------- | -| `owner` | `string` | The owner address to check. | -| `contractAddress` | `string` | An NFT contract address to check ownership for. | - -# Response - -| Property | Type | Description | -| ------------------ | --------- | ----------------------------------------------------------------------- | -| `Promise` | `boolean` | A boolean indicating whether the owner's address owns the provided NFT. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the contract address and owner - const address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"; - const owner = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; - - //Call the method to display the rarity of each attribute of the NFT - const response = await alchemy.nft.verifyNftOwnership(owner, address) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - false - ``` - - -# Use Cases - -Here are some potential use cases for the `verifyNftOwnership` method: - -* **Authenticating ownership during a transaction**: When a user wants to sell their NFT, the `verifyNftOwnership` method can be used to ensure that the seller is the rightful owner of the NFT. This helps prevent fraudulent transactions. - -* **Proving ownership for insurance or legal purposes**: In cases where the ownership of an NFT is disputed, the `verifyNftOwnership` method can be used to prove ownership. This can be useful in legal cases or when purchasing insurance for the NFT. - -* **NFT lending or borrowing**: NFT owners may want to lend their NFTs to others for a fee or borrow NFTs from others. The `verifyNftOwnership` method can be used to verify ownership before entering into such agreements. - -# Related Methods - -Here are the methods related to `verifyNftOwnership`: - -* [getOwnersForNft](/reference/getownersfornft-sdk): Gets all the owners for a given NFT contract address and token ID. - -* [getNftsForOwner](/reference/getnftsforowner-sdk): Get all NFTs for an owner. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-waitfortransaction.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-waitfortransaction.mdx deleted file mode 100644 index 72074c06..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/sdk-waitfortransaction.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: waitForTransaction - SDK -description: Returns a promise which will not resolve until specified transaction hash is mined. If confirmations is 0, this method is non-blocking, and if the transaction has not been mined returns null . Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in w... -subtitle: Returns a promise which will not resolve until specified transaction hash is mined. If confirmations is 0, this method is non-blocking, and if the transaction has not been mined returns null . Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in w... -url: https://docs.alchemy.com/reference/sdk-waitfortransaction -slug: reference/sdk-waitfortransaction ---- - -Returns a promise which will not resolve until specified transaction hash is mined. - -If `confirmations` is 0, this method is non-blocking, and if the transaction has not been mined returns `null`. Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in which it was mined. - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Returns a promise which will not resolve until the specified transaction hash is mined. - -If `confirmations` is 0, this method is non-blocking, and if the transaction has not been mined returns `null`. Otherwise, this method will block until the transaction has confirmed blocks mined on top of the block in which it was mined. - -# Parameters - -| Name | Type | Description | -| ----------------- | -------- | ------------------------------------------------------------------- | -| `transactionHash` | `string` | The hash of the transaction to wait for. | -| `confirmations` | `number` | `Optional` The number of blocks to wait for. | -| `timeout` | `number` | `Optional` The maximum time to wait for the transaction to confirm. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | ------------------------------- | -| `Promise` | `object` | Returns the transaction status. | - -### `TransactionReceipt` response object parameters - -| Property | Type | Description | -| -------------------- | ------------------ | -------------------------------------------------------------------------------------------------------- | -| `to` | `string` | `20 Bytes` - address of the receiver. `null` when its a contract creation transaction | -| `from` | `string` | `20 Bytes` - address of the sender. | -| `contractAddress` | `string` | `20 Bytes` - The contract address created, if the transaction was a contract creation, otherwise `null`. | -| `transactionIndex` | number\` | Integer of the transactions index position log was created from. `null` when its pending log. | -| `root?` | `string` | `32 bytes` of post-transaction stateroot (pre Byzantium). | -| `gasUsed` | `number \| string` | The amount of gas used by this specific transaction alone | -| `logsBloom` | `string` | `256 Bytes` - Bloom filter for light clients to quickly retrieve related logs. | -| `blockHash` | `string` | `32 Bytes` - hash of the block where this log was in. null when its pending. null when its pending log. | -| `transactionHash` | `string` | `32 Bytes` - hash of the transaction | -| `logs` | `array` | Array of log objects, which this transaction generated. | -| `blockNumber` | `number` | The block number where this log was in. `null` when its pending. `null` when its pending log. | -| `confirmations` | `number` | Describes the number of confirmations. | -| `cummulativeGasUsed` | `number \| string` | The total amount of gas used when this transaction was executed in the block. | -| `effectiveGasPrice` | `number \| string` | Effective gas price used. | -| `byzantium` | `boolean` | specifies `true` or `falsle`. | -| `type` | `number` | Describes the type. | -| `status?` | `number` | Either **1** (success) or **0** (failure) | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network, Wallet, Utils } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const txHash = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method - const response = await alchemy.transact.waitForTransaction(txHash) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - to: '0xF02c1c8e6114b1Dbe8937a39260b5b0a374432bB', - from: '0xa7d9ddBE1f17865597fBD27EC712455208B6B76d', - contractAddress: null, - transactionIndex: 65, - gasUsed: BigNumber { _hex: '0x53a0', _isBigNumber: true }, - logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', - blockHash: '0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2', - transactionHash: '0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b', - logs: [], - blockNumber: 6139707, - confirmations: 10641165, - cumulativeGasUsed: BigNumber { _hex: '0x20ec2d', _isBigNumber: true }, - effectiveGasPrice: BigNumber { _hex: '0x04a817c800', _isBigNumber: true }, - status: 1, - type: 0, - byzantium: true - } - ``` - - -# Use Cases - -Here are some potential use cases for the `waitForTransaction` method: - -* **Ensuring transaction execution**: When sending a transaction to the Ethereum network, there is no guarantee that the transaction will be executed immediately. `waitForTransaction` can be used to ensure that the transaction is mined and executed before moving on to the next step in the program. - -* **Waiting for contract deployment**: When deploying a new smart contract to the Ethereum network, it may take some time for the contract to be deployed and ready for use. `waitForTransaction` can be used to wait for the contract deployment transaction to be confirmed before interacting with the contract. - -* **Checking transaction status**: `waitForTransaction` can be used to check the status of a transaction and ensure that it was successfully mined and confirmed by the network. This is useful for ensuring that funds were successfully transferred, or for verifying that a contract function was executed as expected. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateassetchanges-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateassetchanges-sdk.mdx deleted file mode 100644 index 03bbf7e4..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateassetchanges-sdk.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: simulateAssetChanges - SDK -description: Simulates the asset changes resulting from a single transaction. Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. -subtitle: Simulates the asset changes resulting from a single transaction. Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. -url: https://docs.alchemy.com/reference/simulateassetchanges-sdk -slug: reference/simulateassetchanges-sdk ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates the asset changes resulting from a single transaction. - -Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transaction` | `object` | The transaction to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transaction` object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to` | `string` | The address the transaction is directed to. | -| `value` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| --------------------------------------- | -------- | --------------------------------- | -| `Promise` | `object` | Returns the transaction response. | - -### `SimulateAssetChangesResponse` object parameters - -| Property | Type | Description | -| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | `array` | An array of asset changes that resulted from the transaction. | -| `error?` | `object` | Optional error field that is present if an error occurred. The available parameter in this error response is: `message`: `string` The error message. | -| `gasUsed?` | `string` | The amount of gas used by the transaction represented as a hex string. The field is undefined if an error occurred. | - -### `changes` array property parameters - -| Property | Type | Description | -| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount?` | `string` | The amount as an integer string. This value is calculated by applying the decimals field to the `rawAmount` field. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `assetType` | `string` | The type of asset from the transaction. | -| `changeType` | `string` | The type of change from the transaction. | -| `contractAddress?` | `string` | The contract address of the asset. Only applicable to ERC20, ERC721, ERC1155, NFT and SPECIAL\_NFT transactions. | -| `decimals?` | `number` | The number of decimals used by the ERC20 token. Set to 0 for APPROVE changes. Field is undefined if it's not defined in the contract and not available from other sources. | -| `from` | `string` | The from address. | -| `logo?` | `string` | URL for the logo of the asset, if available. Only applicable to ERC20 transactions. | -| `name?` | `string` | The name of the asset transferred, if available. | -| `rawAmount` | `string` | The raw amount as an integer string. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `symbol?` | `string` | The symbol of the asset transferred if available. | -| `to` | `string` | The to address. | -| `tokenId` | `string` | The token id of the asset transferred. Only applicable to ERC721, ERC1155 and SPECIAL\_NFT NFTs. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnx = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.simulateAssetChanges(trnx) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - changes: [ - { - assetType: 'NATIVE', - changeType: 'TRANSFER', - from: '0xa7d9ddbe1f17865597fbd27ec712455208b6b76d', - to: '0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb', - rawAmount: '4290000000000000', - contractAddress: undefined, - tokenId: undefined, - decimals: 18, - symbol: 'ETH', - name: 'Ethereum', - logo: 'https://static.alchemyapi.io/images/network-assets/eth.png', - amount: '0.00429' - } - ], - gasUsed: '0x53a0', - error: undefined - } - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateAssetChanges` method: - -* **Testing**: Developers can use `simulateAssetChanges` to test their smart contracts before deploying them to a blockchain network. By simulating the changes that would occur, developers can identify potential errors and debug their code. - -* **Optimizing asset transactions**: Businesses that regularly perform asset transactions, such as banks or trading firms, can use `simulateAssetChanges` to optimize their transaction strategies. By simulating different transaction scenarios, these firms can identify the most efficient ways to move assets between accounts. - -# Related Methods - -Here are the methods related to `simulateAssestChanges`: - -* [simulateAssetChangesBundle](/reference/simulateassetchangesbundle-sdk): Simulates the asset changes resulting from a list of transactions simulated in sequence. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateassetchangesbundle-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateassetchangesbundle-sdk.mdx deleted file mode 100644 index abe31868..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateassetchangesbundle-sdk.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: simulateAssetChangesBundle - SDK -description: Simulates the asset changes resulting from a list of transactions simulated in sequence. Returns a list of asset changes for each transaction during simulation. -subtitle: Simulates the asset changes resulting from a list of transactions simulated in sequence. Returns a list of asset changes for each transaction during simulation. -url: https://docs.alchemy.com/reference/simulateassetchangesbundle-sdk -slug: reference/simulateassetchangesbundle-sdk ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates the asset changes resulting from a list of transactions simulated in sequence. - -Returns a list of asset changes for each transaction during simulation. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transactions` | `array` | Transactions list of max 3 transactions to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transactions` array object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to` | `string` | The address the transaction is directed to. | -| `value` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| ----------------------------------------- | ----------------- | ---------------------------------- | -| `Promise` | `array of object` | Returns the transactions response. | - -### `SimulateAssetChangesResponse` object parameters - -| Property | Type | Description | -| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | `array` | An array of asset changes that resulted from the transaction. | -| `error?` | `object` | Optional error field that is present if an error occurred. The available parameter in this error response is: `message`: `string` The error message. | -| `gasUsed?` | `string` | The amount of gas used by the transaction represented as a hex string. The field is undefined if an error occurred. | - -### `changes` array property parameters - -| Property | Type | Description | -| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount?` | `string` | The amount as an integer string. This value is calculated by applying the decimals field to the `rawAmount` field. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `assetType` | `string` | The type of asset from the transaction. | -| `changeType` | `string` | The type of change from the transaction. | -| `contractAddress?` | `string` | The contract address of the asset. Only applicable to ERC20, ERC721, ERC1155, NFT and SPECIAL\_NFT transactions. | -| `decimals?` | `number` | The number of decimals used by the ERC20 token. Set to 0 for APPROVE changes. Field is undefined if it's not defined in the contract and not available from other sources. | -| `from` | `string` | The from address. | -| `logo?` | `string` | URL for the logo of the asset, if available. Only applicable to ERC20 transactions. | -| `name?` | `string` | The name of the asset transferred, if available. | -| `rawAmount` | `string` | The raw amount as an integer string. Only available on TRANSFER changes for NATIVE and ERC20 assets, or ERC721/ERC1155 disapprove changes (field set to '0'). | -| `symbol?` | `string` | The symbol of the asset transferred if available. | -| `to` | `string` | The to address. | -| `tokenId` | `string` | The token id of the asset transferred. Only applicable to ERC721, ERC1155 and SPECIAL\_NFT NFTs. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnxs = - [ - { - tr1: "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b", - tr2: "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bbrrewn67353841eer3432cb45" - } - ] - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.simulateAssetChangesBundle(trnxs) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - [ { changes: [], gasUsed: '0xcf08', error: undefined } ] - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateAssetChangesBundle` method: - -* **Testing**: Developers can use `simulateAssetChangesBundle` to test their smart contracts before deploying them to a blockchain network. By simulating the changes that would occur, developers can identify potential errors and debug their code. - -* **Optimizing asset transactions**: Businesses that regularly perform asset transactions, such as banks or trading firms, can use `simulateAssetChangesBundle` to optimize their transaction strategies. By simulating different transactions scenarios, these firms can identify the most efficient ways to move assets between accounts. - -# Related Methods - -Here are the methods related to `simulateAssestChanges`: - -* [simulateAssetChangesBundle](/reference/simulateassetchanges-sdk): Simulates the asset changes resulting from a single transaction. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateexecution-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateexecution-sdk.mdx deleted file mode 100644 index 260ecc09..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateexecution-sdk.mdx +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: simulateExecution - SDK -description: Simulates a single transaction and the resulting and returns list of decoded traces and logs that occurred during the transaction simulation. -subtitle: Simulates a single transaction and the resulting and returns list of decoded traces and logs that occurred during the transaction simulation. -url: https://docs.alchemy.com/reference/simulateexecution-sdk -slug: reference/simulateexecution-sdk ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates the asset changes resulting from a single transaction. - -Returns list of asset changes that occurred during the transaction simulation. Note that this method does not run the transaction on the blockchain. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transaction` | `object` | The transaction to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transaction` object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to` | `string` | The address the transaction is directed to. | -| `value` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | -------------------------------------------- | -| `Promise` | `object` | Returns the transaction simulation response. | - -### `SimulateExecutionResponse` object parameters - -| Property | Type | Description | -| -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `calls` | `array` | An array of traces generated during simulation that represent the execution of the transaction along with the decoded calls if available. | -| `logs` | `array` | An array of logs emitted during simulation along with the decoded logs if available. | - -### `calls` array property parameters - -| Property | Type | Description | -| ---------- | -------- | --------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the call. Provided on a best-effort basis. | -| `error` | `string` | Optional error field. | -| `gas` | `string` | Gas provided for call as a hex string. | -| `gasUsed` | `string` | Gas used during the call as a hex string. | -| `input` | `string` | Call data. | -| `from` | `string` | From address of the transaction. | -| `output` | `string` | Return data. | -| `type` | `string` | The type of call. | -| `value` | `string` | Amount of value transfer as a hex string. | -| `to` | `string` | To address of the transaction. | - -### `logs` array property parameters - -| Property | Type | Description | -| ---------- | ------------------ | -------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the log. Provided on a best-effort basis. | -| `address` | `string` | The address of the contract that generated the log. | -| `data` | `string` | The data included the log. | -| `topics` | `array of strings` | An array of topics in the log. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnx = "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"; - - //Call the method to display the transaction based on the transaction hash - const response = await alchemy.transact.simulateExecution(trnx) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - calls: [ - { - type: 'CALL', - from: '0xa7d9ddbe1f17865597fbd27ec712455208b6b76d', - to: '0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb', - value: '0xf3dbb76162000', - gas: '0x6fb0', - gasUsed: '0x53a0', - input: '0x68656c6c6f21', - output: '0x' - } - ], - logs: [] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateExecution` method: - -* **Testing**: You can use `simulateExecution` to test the logic of your smart contract without incurring the cost of actually executing the transaction on the blockchain. - -* **Gas estimation**: The method can also be used to estimate the amount of gas required to execute a transaction. This can be useful in determining the appropriate gas limit to set for a transaction to ensure it is processed efficiently. - -* **Debugging**: When you encounter errors while interacting with a smart contract, `simulateExecution` can help you debug the issue. By simulating the execution of the transaction, you can identify the specific line of code that is causing the error. - -# Related Methods - -Here are the methods related to `simulateExecution`: - -* [simulateExecutionBundle](/reference/simulateExecutionBundle-sdk): Simulates a list of transactions in sequence and returns list of decoded traces and logs that occurred for each transaction during simulation. diff --git a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateexecutionbundle-sdk.mdx b/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateexecutionbundle-sdk.mdx deleted file mode 100644 index 6a474b41..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-v2-methods/simulateexecutionbundle-sdk.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: simulateExecutionBundle - SDK -description: Simulates a list of transactions in sequence and returns list of decoded traces and logs that occurred for each transaction during simulation. Note that this method does not run any transactions on the blockchain. -subtitle: Simulates a list of transactions in sequence and returns list of decoded traces and logs that occurred for each transaction during simulation. Note that this method does not run any transactions on the blockchain. -url: https://docs.alchemy.com/reference/simulateexecutionbundle-sdk -slug: reference/simulateexecutionbundle-sdk ---- - - - Start using this method in your app today. [Get started for free](https://dashboard.alchemy.com/signup) - - -# Description - -Simulates a list of transactions in sequence and returns a list of decoded traces and logs that occurred for each transaction during simulation. - -Note that this method does not run any transactions on the blockchain. - -# Parameters - -| Name | Type | Description | -| ------------------ | -------- | --------------------------------------------------------- | -| `transactions` | `object` | Transactions list of max 3 transactions to simulate. | -| `blockIdentifier?` | `string` | Optional block identifier to simulate the transaction in. | - -### `transactions` object parameters - -| Property | Type | Description | -| ----------- | -------- | ---------------------------------------------------------------- | -| `data?` | `string` | The data associated with the transaction. | -| `from?` | `string` | The address the transaction is sent from. | -| `gas?` | `string` | The gas provided for the transaction execution, as a hex string. | -| `gasPrice?` | `string` | The gas price to use as a hex string. | -| `to?` | `string` | The address the transaction is directed to. | -| `value?` | `string` | The value associated with the transaction as a hex string. | - -# Response - -| Property | Type | Description | -| ------------------------------------ | -------- | -------------------------------------------- | -| `Promise[]` | `array` of `SimulateExecutionResponse` | Returns execution traces for each transaction in the bundle. | - -### `SimulateExecutionResponse` object parameters - -| Property | Type | Description | -| -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `calls` | `array` | An array of traces generated during simulation that represent the execution of the transaction along with the decoded calls if available. | -| `logs` | `array` | An array of logs emitted during simulation along with the decoded logs if available. | - -### `calls` array property parameters - -| Property | Type | Description | -| ---------- | -------- | --------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the call. Provided on a best-effort basis. | -| `error` | `string` | Optional error field. | -| `gas` | `string` | Gas provided for call as a hex string. | -| `gasUsed` | `string` | Gas used during the call as a hex string. | -| `input` | `string` | Call data. | -| `from` | `string` | From address of the transaction. | -| `output` | `string` | Return data. | -| `type` | `string` | The type of call. | -| `value` | `string` | Amount of value transfer as a hex string. | -| `to` | `string` | To address of the transaction. | - -### `logs` array property parameters - -| Property | Type | Description | -| ---------- | ------------------ | -------------------------------------------------------------- | -| `decoded?` | `string` | A decoded version of the log. Provided on a best-effort basis. | -| `address` | `string` | The address of the contract that generated the log. | -| `data` | `string` | The data included the log. | -| `topics` | `array of strings` | An array of topics in the log. | - -# Example Request and Response - -**Prerequisite**: You will need to install the Alchemy SDK before making requests with it. - -The commands for installing it using **npm** or **yarn** are given below: - - - ```shell npm - npm install alchemy-sdk - ``` - - ```shell yarn - yarn add alchemy-sdk - ``` - - -## Request - - - ```javascript index.js - // Imports the Alchemy SDK - const { Alchemy, Network } = require("alchemy-sdk"); - - // Configures the Alchemy SDK - const config = { - apiKey: "alchemy-replit", // Replace with your API key - network: Network.ETH_MAINNET, // Replace with your network - }; - - // Creates an Alchemy object instance with the config to use for making requests - const alchemy = new Alchemy(config); - - const main = async () => { - // define the transaction hash - const trnxs = [ - { - transaction: - "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"} - ]; - - //Call the method to display the transaction simulation execution - const response = await alchemy.transact.simulateExecutionBundle(trnxs) - - //Logging the response to the console - console.log(response) - } - - main(); - ``` - - -## Response - - - ```shell shell - { - calls: [ - { - type: 'CALL', - from: '0xa7d9ddbe1f17865597fbd27ec712455208b6b76d', - to: '0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb', - value: '0xf3dbb76162000', - gas: '0x6fb0', - gasUsed: '0x53a0', - input: '0x68656c6c6f21', - output: '0x' - } - ], - logs: [] - } - ``` - - -# Use Cases - -Here are some potential use cases for the `simulateExecutionBundle` method: - -* **Testing**: You can use `simulateExecutionBundle` to test the logic of your smart contract without incurring the cost of actually executing the transactions on the blockchain. - -* **Gas estimation**: The method can also be used to estimate the amount of gas required to execute a series of transactions. This can be useful in determining the appropriate gas limit to set for a transaction to ensure it is processed efficiently. - -* **Debugging**: When you encounter errors while interacting with a smart contract, `simulateExecutionBundle` can help you debug the issue. By simulating the execution of the set of transactions, you can identify the specific line of code that is causing the error. - -# Related Methods - -Here are the methods related to `simulateExecutionBundle`: - -* [simulateExecution](/reference/simulateexecution-sdk): Simulates a single transaction and the results and returns a list of decoded traces and logs that occurred during the transaction simulation. diff --git a/fern/api-reference/alchemy-sdk/sdk-websockets-endpoints.mdx b/fern/api-reference/alchemy-sdk/sdk-websockets-endpoints.mdx deleted file mode 100644 index c0c7a446..00000000 --- a/fern/api-reference/alchemy-sdk/sdk-websockets-endpoints.mdx +++ /dev/null @@ -1,255 +0,0 @@ ---- -title: SDK WebSockets Endpoints -description: How to use WebSockets with the Alchemy SDK -subtitle: How to use WebSockets with the Alchemy SDK -url: https://docs.alchemy.com/reference/sdk-websockets-endpoints -slug: reference/sdk-websockets-endpoints ---- - -# Available Subscription Types - -| Subscription Type | Description | -| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Alchemy Mined Transactions | Emits full transaction objects or hashes that are mined on the network based on provided filters and block tags. | -| Alchemy Pending Transactions | Emits full transaction objects or hashes that are sent to the network, marked as "pending", based on provided filters. | -| block (newHeads) | Emits new blocks that are added to the blockchain. | -| transactions | Emitted when a specified transaction has been mined. | -| logs | Emits logs attached to a new block that match certain topic filters. | - -# What are WebSockets and how do they differ from HTTP? - -WebSockets is a bidirectional communication protocol that maintains a network connection between a server and a client. Unlike HTTP, with WebSockets clients don't need to continuously make requests when they want information. - -Instead, an open WebSocket connection can push network updates to clients by allowing them to subscribe to certain network states, such as new transactions or blocks being added to the blockchain. - -*** - -# Getting Started - -The [Alchemy SDK](/reference/alchemy-sdk-quickstart) is the easiest way to start using WebSockets. It exposes WebSockets support via the [Ethers.js syntax](https://docs.ethers.io/v5/single-page/#/v5/api/providers/provider/-%23-Provider--event-methods). In addition, it exposes an additional Enhanced APIs created by Alchemy. - -See an example below: - - - ```javascript alchemy-sdk - // Setup: npm install alchemy-sdk - import { Alchemy, AlchemySubscription } from "alchemy-sdk"; - - // Optional config object, but defaults to demo api-key and eth-mainnet. - const settings = { - apiKey: "demo", // Replace with your Alchemy API Key. - network: Network.ETH_MAINNET, // Replace with your network. - }; - - const alchemy = new Alchemy(settings); - - // Subscription for new blocks on Eth Mainnet. - alchemy.ws.on("block", (blockNumber) => - console.log("The latest block number is", blockNumber) - ); - - // Subscription for Alchemy's pendingTransactions Enhanced API - alchemy.ws.on( - { - method: AlchemySubscription.PENDING_TRANSACTIONS, - toAddress: "vitalik.eth", - }, - (tx) => console.log(tx) - ); - ``` - - - - [The Alchemy SDK](/reference/alchemy-sdk-quickstart) automatically adds retry handling for WebSocket failures with no configuration necessary. - - -# Alchemy SDK's Subscription Methods - -These are the methods that you can call to begin a subscription. For types of events you can subscribe to, see [Alchemy SDK's Subscription Types](#alchemy-sdks-subscription-types). - -The Alchemy SDK's WebSockets is built on top of [Ethers.js](https://docs.ethers.io/v5/single-page/#/v5/api/providers/provider/-%23-Provider--event-methods)'s implementation of WebSockets, so the majority of the syntax will be identical. - -| Subscription Method | Description | -| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `alchemy.ws.on( eventName , listener ) ⇒ this` | Add a listener to be triggered for each eventName event. | -| `alchemy.ws.once( eventName , listener ) ⇒ this` | Add a listener to be triggered for only the next eventName event, at which time it will be removed. | -| `alchemy.ws.emit( eventName , ...args ) ⇒ boolean` | Notify all listeners of the eventName event, passing args to each listener. This is generally only used internally. | -| `alchemy.ws.off( eventName [ , listener ] ) ⇒ this` | Remove a listener for the eventName event. If no listener is provided, all listeners for eventName are removed. | -| `alchemy.ws.removeAllListeners( [ eventName ] ) ⇒ this` | Remove all the listeners for the eventName events. If no eventName is provided, all events are removed. | -| `alchemy.ws.listenerCount( [ eventName ] ) ⇒ number` | Returns the number of listeners for the eventName events. If no eventName is provided, the total number of listeners is returned. | -| `alchemy.ws.listeners( eventName ) ⇒ Array< Listener >` | Returns the list of Listeners for the eventName events. | - -# SDK Subscription Types Support by Chain - -| Chain | Mined Transactions | Pending Transactions | transactions | block (newHeads) | logs | -| -------------------------------------------------------- | ------------------ | -------------------- | ------------ | ---------------- | ---- | -| [Ethereum](/reference/websockets) | ❌ | ✅ | ✅ | ✅ | ✅ | -| [Polygon](/reference/websockets-polygon) | ❌ | ✅ | ✅ | ✅ | ✅ | -| [Arbitrum](/reference/websockets-arbitrum) | ❌ | ❌ | ❌ | ✅ | ✅ | -| [Optimism](/reference/websockets-optimism) | ❌ | ❌ | ❌ | ✅ | ✅ | -| [Polygon zkEVM](/reference/polygon-zkevm-api-quickstart) | ❌ | ❌ | ❌ | ❌ | ❌ | - -# Alchemy SDK's Subscription Types - -## `block (newHeads)` - -Emitted when a new block is mined. - - - ```javascript alchemy-sdk - import { Alchemy } from "alchemy-sdk"; - const alchemy = new Alchemy(); - - // Subscribe to new blocks, or newHeads - alchemy.ws.on("block", (blockNumber) => - console.log("Latest block:", blockNumber) - ); - ``` - - -## `AlchemySubscription.MINED_TRANSACTIONS` - -Emitted when a transaction is confirmed onto the blockchain. Alchemy's custom implementation of this endpoint allows you to filter based on `fromAddress` or `toAddress`, the address a transaction was sent to or received from. - - - ```javascript alchemy-sdk - import { Alchemy, AlchemySubscription } from "alchemy-sdk"; - const alchemy = new Alchemy(); - - // Subscription for Alchemy's Mined Transactions API - alchemy.ws.on( - { - method: AlchemySubscription.MINED_TRANSACTIONS, - addresses: [ - { - from: "0x473780deaf4a2ac070bbba936b0cdefe7f267dfc", - to: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - }, - { - to: "0x473780deaf4a2ac070bbba936b0cdefe7f267dfc", - }, - ], - includeRemoved: true, - hashesOnly: false, - }, - (tx) => console.log(tx) - ); - ``` - - -## `AlchemySubscription.PENDING_TRANSACTIONS` - -Emitted when a new transaction enters the memory pool. Alchemy's custom implementation of this endpoint allows you to filter based on `fromAddress` or `toAddress`, the address a transaction was sent to or received from. - - - If you were previously using the `newPendingTransactions` method on either Web3.js or Ethers.js, you should use `alchemy_pendingTransactions`. It's a strict superset of the functionality of `newPendingTransactions`, and functions identically if you don't pass in a `fromAddress` or `toAddress` filter. - - - - ```javascript alchemy-sdk - import { Alchemy, AlchemySubscription } from "alchemy-sdk"; - const alchemy = new Alchemy(); - - // Subscription for Alchemy's pendingTransactions API - alchemy.ws.on( - { - method: AlchemySubscription.PENDING_TRANSACTIONS, - toAddress: "vitalik.eth", - fromAddress: "vitalik.eth", - }, - (tx) => console.log(tx) - ); - ``` - - -## `transactions` - -Emitted when a specified transaction has been mined. - - - ```javascript alchemy-sdk - import { Alchemy } from "alchemy-sdk"; - const alchemy = new Alchemy(); - - const txHash = "0xfc89ec10998a74c37a107535ca1cf8714edad409bff40d6da9e8a436cef6daad"; - - // Subscription for a specific transaction to be mined - alchemy.ws.on( - txHash, - (tx) => console.log(tx) - ); - ``` - - -## `logs` - -A filter is an object, representing a contract log Filter, which has the optional properties address (the source contract) and topics (a topic-set to match). - -If address is unspecified, the filter matches any contract address. - - - ```javascript alchemy-sdk - import { Alchemy } from "alchemy-sdk"; - const alchemy = new Alchemy(); - - // This filter could also be generated with the Contract or - // Interface API. If address is not specified, any address - // matches and if topics is not specified, any log matches - const filter = { - address: "dai.tokens.ethers.eth", - topics: [ - utils.id("Transfer(address,address,uint256)") - ] - } - alchemy.ws.on(filter, (log, event) => { - // Emitted whenever a DAI token transfer occurs - }) - - // Notice this is an array of topic-sets and is identical to - // using a filter with no address (i.e. match any address) - const topicSets = [ - utils.id("Transfer(address,address,uint256)"), - null, - [ - hexZeroPad(myAddress, 32), - hexZeroPad(myOtherAddress, 32) - ] - ] - alchemy.ws.on(topicSets, (log, event) => { - // Emitted any token is sent TO either address - }) - ``` - - -*** - -# Subscription Type Support Per Chain - -For the latest Alchemy support by chain for certain WebSockets requests, check our [Feature Support By Chain article here](/reference/feature-support-by-chain). - -*** - -# WebSocket Limits - -The following limits apply for WebSocket connections: - -* There is a limit of **100 WebSocket connections** for the FREE tier and **2,000 WebSocket connections** for all other tiers, with a maximum of 50,000 connections per instance. -* **No limits** on the number of **parallel** WebSocket subscriptions per WebSocket connection. -* The maximum size of a JSON-RPC `batch` request that can be sent over a WebSocket connection is 1000 - -*** - -# Error Codes - -| Error Code | Error Message | Solution | -| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `32600` | `"Sorry, the maximum batch request size is 1000. Please reduce the size of your request and try again."` | Occurs when user attempts to send high-volume JSON-RPC traffic over Websockets. We recommend this traffic be sent over HTTP instead to optimize server backends. | -| `1008` | `"WebSocket connection limit reached for this app. Please close existing connections and try again."` | Triggered when the number of open WebSocket connections for the app reaches the allowed limit. Close unused connections to restore access. | -| `1008` | `" This app has exceeded its limit of open WebSockets. Please close some other connections first."` | Triggered when the team previously exceeded the limit and tries to reconnect again before the backoff interval expires. Close existing connections and wait. | -| `1008` | `" You have exceeded the maximum number of concurrent requests on a single WebSocket. At most 200 concurrent requests are allowed per WebSocket."` | Triggered when a client has too many pending JSON-RPC requests on a single WebSocket. Ensure each request completes before sending more. | - -*** - -# Example Projects - -* [How to Listen to NFT Mints](/docs/how-to-listen-to-nft-mints) diff --git a/fern/api-reference/arbitrum/alchemy-sdk-js.png b/fern/api-reference/arbitrum/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/arbitrum/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx b/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx index ed9df15a..cd13d36c 100644 --- a/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx +++ b/fern/api-reference/arbitrum/arbitrum-api-quickstart.mdx @@ -102,10 +102,3 @@ Check out the following tutorials to learn how to build on Arbitrum: * [Arbitrum API FAQ](/reference/arbitrum-api-faq) * [How to Add Arbitrum to Metamask](/docs/how-to-add-arbitrum-to-metamask) -For full documentation on the available endpoints for alchemy-sdk, check the github repo: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) diff --git a/fern/api-reference/arbitrum/arbitrum-api-quickstart/alchemy-sdk-js.png b/fern/api-reference/arbitrum/arbitrum-api-quickstart/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/arbitrum/arbitrum-api-quickstart/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-api-quickstart.mdx b/fern/api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-api-quickstart.mdx index ed9df15a..cd13d36c 100644 --- a/fern/api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-api-quickstart.mdx +++ b/fern/api-reference/arbitrum/arbitrum-api-quickstart/arbitrum-api-quickstart.mdx @@ -102,10 +102,3 @@ Check out the following tutorials to learn how to build on Arbitrum: * [Arbitrum API FAQ](/reference/arbitrum-api-faq) * [How to Add Arbitrum to Metamask](/docs/how-to-add-arbitrum-to-metamask) -For full documentation on the available endpoints for alchemy-sdk, check the github repo: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) diff --git a/fern/api-reference/astar/alchemy-sdk-js.png b/fern/api-reference/astar/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/astar/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/astar/astar-api-quickstart.mdx b/fern/api-reference/astar/astar-api-quickstart.mdx index 7c89bc5e..477296c7 100644 --- a/fern/api-reference/astar/astar-api-quickstart.mdx +++ b/fern/api-reference/astar/astar-api-quickstart.mdx @@ -99,10 +99,3 @@ Head towards Alchemy Tutorials. [**View**: https://docs.alchemy.com/docs](https://docs.alchemy.com/docs) -For full documentation on the available endpoints for alchemy-sdk, check the github repo: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) diff --git a/fern/api-reference/data/nft-api/alchemy-sdk-js.png b/fern/api-reference/data/nft-api/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/data/nft-api/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/data/nft-api/nft-api-quickstart.mdx b/fern/api-reference/data/nft-api/nft-api-quickstart.mdx index db5fed1d..b102a5ef 100644 --- a/fern/api-reference/data/nft-api/nft-api-quickstart.mdx +++ b/fern/api-reference/data/nft-api/nft-api-quickstart.mdx @@ -72,11 +72,11 @@ Open up a terminal, and from the command line, create a new repository to hold y ### a) Alchemy SDK (*Recommended*) -You can install the `alchemy-sdk-js` module to easily interact with Alchemy APIs. We highly recommend using the Alchemy SDK because you also get WebSocket support, retries, and other benefits without the complexity! +You can install the `alchemy-sdk` module to easily interact with Alchemy APIs. We highly recommend using the Alchemy SDK because you also get WebSocket support, retries, and other benefits without the complexity! -For full documentation on `alchemy-sdk-js`, check the GitHub repo: +For full documentation, check the GitHub repo: -[View the Alchemy SDK on GitHub](https://github.com/alchemyplatform/alchemy-sdk-js) +[Alchemy SDK on GitHub](https://github.com/alchemyplatform/alchemy-sdk) #### Installation @@ -195,9 +195,9 @@ You should see output like this: ``` -For full documentation on the available endpoints for `alchemy-sdk`, check the github repo: +For full documentation on the available endpoints for `alchemy-sdk`, check the GitHub repo: -[View the Alchemy SDK on GitHub](https://github.com/alchemyplatform/alchemy-sdk-js) +[Alchemy SDK on GitHub](https://github.com/alchemyplatform/alchemy-sdk) ### b) Node-Fetch diff --git a/fern/api-reference/data/prices-api/prices-api-quickstart.mdx b/fern/api-reference/data/prices-api/prices-api-quickstart.mdx index 5aa6d6fc..108d142e 100644 --- a/fern/api-reference/data/prices-api/prices-api-quickstart.mdx +++ b/fern/api-reference/data/prices-api/prices-api-quickstart.mdx @@ -30,7 +30,7 @@ The Prices API includes the following REST endpoints: ## Via Alchemy SDK -The [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk-js) provides a convenient and fully featured way to interact with Alchemy’s APIs, including the Prices API. +The [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk) provides a convenient and fully featured way to interact with Alchemy’s APIs, including the Prices API. ### Installation diff --git a/fern/api-reference/data/token-api/token-api-quickstart.mdx b/fern/api-reference/data/token-api/token-api-quickstart.mdx index 5eec84eb..290098c6 100644 --- a/fern/api-reference/data/token-api/token-api-quickstart.mdx +++ b/fern/api-reference/data/token-api/token-api-quickstart.mdx @@ -12,7 +12,7 @@ slug: reference/token-api-quickstart Install the `alchemy-sdk` module to easily interact with Alchemy APIs. We highly recommend the `alchemy-sdk` for WebSocket support, retries, and more. -Check the Github repo here: [https://github.com/alchemyplatform/alchemy-sdk-js](https://github.com/alchemyplatform/alchemy-sdk-js) +Check the Github repo here: [https://github.com/alchemyplatform/alchemy-sdk](https://github.com/alchemyplatform/alchemy-sdk) ### Installation diff --git a/fern/api-reference/op-mainnet/alchemy-sdk-js.png b/fern/api-reference/op-mainnet/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/op-mainnet/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/alchemy-sdk-js.png b/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/optimism-api-quickstart.mdx b/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/optimism-api-quickstart.mdx index 1df7168b..1b2d0b41 100644 --- a/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/optimism-api-quickstart.mdx +++ b/fern/api-reference/op-mainnet/op-mainnet-api-quickstart/optimism-api-quickstart.mdx @@ -101,10 +101,3 @@ Check out the following tutorials to learn how to build on Optimism: * [Optimism API FAQ](/reference/optimism-api-faq) * [How to Add Optimism To Metamask](/docs/how-to-add-optimism-to-metamask) -For full documentation on the available endpoints for alchemy-sdk, check the github repo: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) diff --git a/fern/api-reference/op-mainnet/optimism-api-quickstart.mdx b/fern/api-reference/op-mainnet/optimism-api-quickstart.mdx index 1df7168b..1b2d0b41 100644 --- a/fern/api-reference/op-mainnet/optimism-api-quickstart.mdx +++ b/fern/api-reference/op-mainnet/optimism-api-quickstart.mdx @@ -101,10 +101,3 @@ Check out the following tutorials to learn how to build on Optimism: * [Optimism API FAQ](/reference/optimism-api-faq) * [How to Add Optimism To Metamask](/docs/how-to-add-optimism-to-metamask) -For full documentation on the available endpoints for alchemy-sdk, check the github repo: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) diff --git a/fern/api-reference/polygon-pos/alchemy-sdk-js.png b/fern/api-reference/polygon-pos/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/polygon-pos/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/polygon-pos/polygon-api-quickstart.mdx b/fern/api-reference/polygon-pos/polygon-api-quickstart.mdx index 47fac1b4..e3a89855 100644 --- a/fern/api-reference/polygon-pos/polygon-api-quickstart.mdx +++ b/fern/api-reference/polygon-pos/polygon-api-quickstart.mdx @@ -102,10 +102,3 @@ Check out the following tutorials to learn how to build on Polygon: * [Polygon API FAQ](/reference/polygon-api-faq) * [How to Add Polygon to Metamask](/docs/how-to-add-polygon-to-metamask) -For full documentation on the available endpoints for alchemy-sdk, check the github repo: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) diff --git a/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/alchemy-sdk-js.png b/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/polygon-api-quickstart.mdx b/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/polygon-api-quickstart.mdx index 47fac1b4..e3a89855 100644 --- a/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/polygon-api-quickstart.mdx +++ b/fern/api-reference/polygon-pos/polygon-pos-api-quickstart/polygon-api-quickstart.mdx @@ -102,10 +102,3 @@ Check out the following tutorials to learn how to build on Polygon: * [Polygon API FAQ](/reference/polygon-api-faq) * [How to Add Polygon to Metamask](/docs/how-to-add-polygon-to-metamask) -For full documentation on the available endpoints for alchemy-sdk, check the github repo: - -[![GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js: The easiest way to connect your dApp to the blockchain.](https://github.com/alchemyplatform/alchemy-sdk-js) diff --git a/fern/api-reference/pricing-resources/resources/batch-requests.mdx b/fern/api-reference/pricing-resources/resources/batch-requests.mdx index 69564bf9..ce4edcad 100644 --- a/fern/api-reference/pricing-resources/resources/batch-requests.mdx +++ b/fern/api-reference/pricing-resources/resources/batch-requests.mdx @@ -117,7 +117,6 @@ Batch Requests are usually for JSON-RPC endpoints, but Alchemy SDK is providing ``` ```javascript javascript - // Github: https://github.com/alchemyplatform/alchemy-sdk-js // Setup: npm install alchemy-sdk import { Network, Alchemy } from "alchemy-sdk"; diff --git a/fern/tutorials/getting-started/alchemy-quickstart-guide/alchemy-quickstart-guide.mdx b/fern/tutorials/getting-started/alchemy-quickstart-guide/alchemy-quickstart-guide.mdx index 215538b6..c6720f66 100644 --- a/fern/tutorials/getting-started/alchemy-quickstart-guide/alchemy-quickstart-guide.mdx +++ b/fern/tutorials/getting-started/alchemy-quickstart-guide/alchemy-quickstart-guide.mdx @@ -112,7 +112,7 @@ Find out how to set up or switch your current provider to Alchemy by using the A ### The Alchemy SDK -There are tons of Web3 libraries you can integrate with Alchemy. However, we recommend using the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk-js), a drop-in replacement for Ethers.js, built and configured to work seamlessly with Alchemy. This provides multiple advantages such as automatic retries and robust WebSocket support. +There are tons of Web3 libraries you can integrate with Alchemy. However, we recommend using the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk), a drop-in replacement for Ethers.js, built and configured to work seamlessly with Alchemy. This provides multiple advantages such as automatic retries and robust WebSocket support. ### 1. From your [command line](https://www.computerhope.com/jargon/c/commandi.htm), create a new project directory and install the Alchemy SDK. diff --git a/fern/tutorials/getting-started/developer-best-practices/best-practices-when-using-alchemy.mdx b/fern/tutorials/getting-started/developer-best-practices/best-practices-when-using-alchemy.mdx index f8846418..c58f4d01 100644 --- a/fern/tutorials/getting-started/developer-best-practices/best-practices-when-using-alchemy.mdx +++ b/fern/tutorials/getting-started/developer-best-practices/best-practices-when-using-alchemy.mdx @@ -40,7 +40,7 @@ Instead, **retry your requests with exponential backoff on response failures**, If you need to handle timeouts, you can also retry your requests on Alchemy-based timeouts, which will prevent you from accidentally retrying requests before nodes have finished processing them. Alternatively, increase your client-side timeouts to see if your request success rate improves. -To save development overhead, you can use the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk-js) which handles exponential backoff retries on failure for you automatically, among other benefits! +To save development overhead, you can use the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk) which handles exponential backoff retries on failure for you automatically, among other benefits! ## 4. Send Requests over HTTPS, not WebSockets diff --git a/fern/tutorials/getting-started/how-to-set-up-core-web3-developer-tools/alchemy-sdk-js.png b/fern/tutorials/getting-started/how-to-set-up-core-web3-developer-tools/alchemy-sdk-js.png deleted file mode 100644 index 818596b6..00000000 Binary files a/fern/tutorials/getting-started/how-to-set-up-core-web3-developer-tools/alchemy-sdk-js.png and /dev/null differ diff --git a/fern/tutorials/getting-started/how-to-set-up-core-web3-developer-tools/how-to-set-up-core-web3-developer-tools.mdx b/fern/tutorials/getting-started/how-to-set-up-core-web3-developer-tools/how-to-set-up-core-web3-developer-tools.mdx index bd64d97e..1f4d0a9e 100644 --- a/fern/tutorials/getting-started/how-to-set-up-core-web3-developer-tools/how-to-set-up-core-web3-developer-tools.mdx +++ b/fern/tutorials/getting-started/how-to-set-up-core-web3-developer-tools/how-to-set-up-core-web3-developer-tools.mdx @@ -193,11 +193,7 @@ The [Alchemy SDK](/reference/alchemy-sdk-quickstart) is a lightweight, modular S Check out the full Github repo here: -[![GitHub - alchemyplatform/alchemy-sdk-js](alchemy-sdk-js.png)](https://github.com/alchemyplatform/alchemy-sdk-js) - -[![github.com](favicon.ico)github.com](https://github.com/alchemyplatform/alchemy-sdk-js) - -[GitHub - alchemyplatform/alchemy-sdk-js](https://github.com/alchemyplatform/alchemy-sdk-js) +[Alchemy SDK on GitHub](https://github.com/alchemyplatform/alchemy-sdk) To install the Alchemy SDK, you can use npm or yarn: diff --git a/fern/tutorials/getting-started/set-up-alchemy-as-client.mdx b/fern/tutorials/getting-started/set-up-alchemy-as-client.mdx index 04a40774..c5957f88 100644 --- a/fern/tutorials/getting-started/set-up-alchemy-as-client.mdx +++ b/fern/tutorials/getting-started/set-up-alchemy-as-client.mdx @@ -20,7 +20,7 @@ Find out how to set up or switch your current provider to Alchemy by using the A ### The Alchemy SDK -There are tons of Web3 libraries you can integrate with Alchemy. However, we recommend using the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk-js), a drop-in replacement for Ethers.js, built and configured to work seamlessly with Alchemy. This provides multiple advantages such as automatic retries and robust WebSocket support. +There are tons of Web3 libraries you can integrate with Alchemy. However, we recommend using the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk), a drop-in replacement for Ethers.js, built and configured to work seamlessly with Alchemy. This provides multiple advantages such as automatic retries and robust WebSocket support. ### 1. From your [command line](https://www.computerhope.com/jargon/c/commandi.htm), create a new project directory and install the Alchemy SDK. diff --git a/fern/tutorials/nfts/nft-api-tutorials/how-to-resolve-ewallet-given-ens.mdx b/fern/tutorials/nfts/nft-api-tutorials/how-to-resolve-ewallet-given-ens.mdx index d20a0e65..8890d44a 100644 --- a/fern/tutorials/nfts/nft-api-tutorials/how-to-resolve-ewallet-given-ens.mdx +++ b/fern/tutorials/nfts/nft-api-tutorials/how-to-resolve-ewallet-given-ens.mdx @@ -61,7 +61,7 @@ If you run into module errors, you may need to add `'type':'module'` to your `pa ``` -### 4. Write script using [resolveName](https://github.com/alchemyplatform/alchemy-sdk-js/blob/main/docs-md/classes/CoreNamespace.md#resolvename) to resolve a Wallet address from an ENS domain. +### 4. Write script using [resolveName](https://github.com/alchemyplatform/alchemy-sdk/blob/main/docs-md/classes/CoreNamespace.md#resolvename) to resolve a Wallet address from an ENS domain. In this example we'll resolve the address for the ENS name: vitalik.eth diff --git a/fern/tutorials/smart-wallets/learn-account-abstraction/how-to-create-a-gasless-nft-minter-using-aa-sdk-create-web3-dapp-userbase.mdx b/fern/tutorials/smart-wallets/learn-account-abstraction/how-to-create-a-gasless-nft-minter-using-aa-sdk-create-web3-dapp-userbase.mdx index 1f3e2979..474c627c 100644 --- a/fern/tutorials/smart-wallets/learn-account-abstraction/how-to-create-a-gasless-nft-minter-using-aa-sdk-create-web3-dapp-userbase.mdx +++ b/fern/tutorials/smart-wallets/learn-account-abstraction/how-to-create-a-gasless-nft-minter-using-aa-sdk-create-web3-dapp-userbase.mdx @@ -1415,7 +1415,7 @@ Nice, the `localhost:3000/sign-up` and `localhost:3000/login` routes should now Let's go ahead and set up all of the API requests, whether external or on the server-side of our NextJS application in this step. We will set up **four** endpoints to: 1. Get the owner address for a smart contract wallet deterministically (uses the [AA SDK](https://github.com/alchemyplatform/aa-sdk)) -2. Get a smart contract wallet's owned NFTs (uses the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk-js)) +2. Get a smart contract wallet's owned NFTs (uses the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk)) 3. Submit a sponsored user operation on behalf of the user's smart contract wallet (uses the AA SDK) 4. Get a user's private key from the Userbase server whenever necessary