Ask a Question

Why is my app calling eth_chainId so many times?

Hello, I have a python script that uses web3.py and does various things like querying an address balance, trading crypto, getting price data etc. I noticed on my Alchemy dashboard that every other RPC call is an eth_chainId call. In my script I am calling Web3.eth.chain_id only once and storing it for the duration of my runtime. So I'm wondering how or why I am making so many calls? Do I need to specify chain id when I first instantiate my web3 socket connection or else it will make this call over and over? Something else? Thanks.

eth_getTransactionByHash input decode

How do you decode the input value?

Running Error : Type Error in index.js

Dear Team, I was in Second Part of the Tutorial , Minting my NFT , I went to the terminal and typed : node scripts/mint-nft.js. Then I got a running error on a file that I didnt write. It is a file automatically generated , called : index.js, the error is : TypeError: Cannot read properties of undefined (reading 'toHexString') How can I solve this problem , Please help. Arturo

Nft metadata force refresh

Is possible to get just updated NFT metadata from api like a force refresh? How long does Alchemy keep NFT metadata in cache until refresh it for public calls?

Address blacklisted

Hello. I can't seem to execute smart contract method on a smart contract. Alchemy endpoint returns this: `ProviderError: Address <xxx> is blacklisted.` Why is that? Why would an address on ethereum be "blacklisted"?

EVM_Snapshot error

I am getting this error when I test my smart contract on rinkeby ProviderError: Unsupported method: evm_snapshot. See available methods at https://docs.alchemy.com/alchemy/documentation/apis I am using this RPC url RINKEBY_RPC_URL_OLD=https://eth-rinkeby.alchemyapi.io/v2/BG92v2ejEUplKTgsKpmUiW8miuV6aGIO Is it because of deprication of rinkeby testnet? Should I test on Goerli? I am also using Chainlink VRF/Keepers in my code. Chainlink keepers do not support Goerli. What are the other options for me?

Unable to fetch all NFT owners with token balances for the OpenSea shared storefront contract

Hi - I'm trying to fetch all the NFT owners for the OpenSea Shared Storefront contract (`0x495f947276749ce646f68ac8c248420045cb7b5e`) using [Alchemy's getOwnersForCollection](https://docs.alchemy.com/reference/getownersforcollection) endpoint with the `withTokenBalances` parameter. It returns me a 500 error. It however works when I remove the `withTokenBalances` parameter

Does Alchemy's Solana endpoint support logsSubscribe ?

I was trying to query logsSubscribe using solana cli using the below command `solana logs <address> --ws wss://solana-devnet.g.alchemy.com/v2/<My-Alchemy-API-Key>` but it returns the below error ``` Streaming transaction logs mentioning 9SNdwhMrxADTVkakYPUe6pDD9rXdbQn4eFUGwoSrhuns. Confirmed commitment Error: unexpected message format: {"error": Object({"code": Number(-32601), "message": String("Unsupported subscription method: logsSubscribe")}), "id": Number(1), "jsonrpc": String("2.0")} ```

Is getNftsForOwner not a function?

I'm getting an error with the Alchemy SDK when running the below code ``` const nftsForOwner = await alchemy.getNftsForOwner(account, { contractAddresses: [ "0xe361f10965542ee57D39043C9c3972B77841F581", ], withMetadata: true, }); ``` The error I'm getting is `TypeError: alchemy.getNftsForOwner is not a function` This is being run as an API request on next.js to keep the API Key environment variable hidden.