Skip to main content

Questions tagged [alchemy]

Used for questions related to Alchemy, a Web3 developer platform that provides supernode infrastructure, enhanced APIs, and other building and monitoring tools for building decentralized blockchain applications.

Filter by
Sorted by
Tagged with
6 votes
3 answers
3k views

Trying to understand the difference between trace_call and debug_traceCall methods

can someone help me understand the difference between trace_call and debug_traceCall? From what I've read, trace_call is to see the opcodes executed and the gas used for a transaction. debug_traceCall ...
Devin Jackson's user avatar
4 votes
2 answers
2k views

How to instantiate contract instances with ethers.js and alchemy-sdk

(Found this from the public Alchemy discord, and wanted to ask the question here so it can get indexed online 💙) I'm trying to instantiate contracts in my javascript code so that I can call ABI ...
thatguyintech's user avatar
4 votes
1 answer
303 views

If `provider` is essential in communicating with the blockchain, how is this following code working?

Here is the smart contract code: // SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; interface Bucket { function drop(...
amit's user avatar
  • 390
4 votes
1 answer
321 views

Goerli Smart Contract Deployment taking way too long because of pending transactions

My deployments are very slow. I've read that I need to override pending transactions by resetting the nonce. I'm using Infura. Is there a way to view pending transactions and their nonce like I would ...
HeeeeSark's user avatar
3 votes
2 answers
928 views

window.ethereum.isConnected() always returns true

I'm currently working on "How to build an NFT Marketplace from Scratch" and, Implementing wallet connection. The wallet connect Button is always shows as "connected" even if I ...
吉川遼's user avatar
3 votes
3 answers
2k views

Does Alchemy "getAssetTransfers" get all transactions or just all asset transfers?

I'm working with alchemy's SDK and it looks like the getAssetTransfers API endpoint will return any value transaction from an address. However, it also looks like it can return a list of all ...
Patrick Collins's user avatar
3 votes
1 answer
313 views

StateDiff in trace_call report invalid balance

I have a TX that wrap 0.23 ETH to WETH, I'am using trace_replayTransaction to get the stateDiff in this way: curl https://eth-mainnet.alchemyapi.io/v2/<api-key> \ -X POST \ -H "Content-...
0x0smile's user avatar
3 votes
1 answer
3k views

How Can I Connect Alchemy as a Custom RPC Node Provider in MetaMask?

I saw this doc on adding a custom RPC endpoint to MetaMask. I'm wondering what are the steps to fill out the information specifically if I have an Alchemy endpoint available? I would like to use the ...
Patrick Collins's user avatar
3 votes
1 answer
307 views

How to store Ethereum JSON-RPC node API Key in a React app

So the thing is, by using React I see no way not to expose my API KEY. Is there any best practices on how to store it? Is it dangerous if someone will inspect my code and find this API key? How people ...
Paul's user avatar
  • 134
3 votes
2 answers
155 views

TypeError: Member "push" is not available in uint256[] memory outside of storage

// SPDX-License-Identifier: MIT pragma solidity 0.8.4; contract Contract { function filternEven(uint[] memory arr) external pure returns(uint[] memory a){ for(uint i=0;i<arr....
No Brain's user avatar
3 votes
0 answers
90 views

Contract events not being emitted reliably from ethers

I'm having a problem with contract events being not reliable as in they are mostly not emitted but sometimes are emitted. Events from a smart contract (Gnosis Safe contract, SignMsg but true for other ...
Firatov's user avatar
  • 73
3 votes
1 answer
856 views

Get logs for a transaction without actually sending the transaction

I'm trying to simulate a transaction without actually sending the transaction. The trace_call method (on Alchemy) returns 3 types of traces - vmTrace, trace, stateDiff. The trace object returns all ...
pbsh's user avatar
  • 2,471
2 votes
1 answer
200 views

How to find total value in ETH of all NFTs owned by a user

I am aware that we could find all the NFTs owned by a user using alchemy’s NFTs API. However, I was wondering if there was a way to them compute the value of that particular users portfolio.
datasleuths8648's user avatar
2 votes
1 answer
830 views

Fetch last 10 blocks using Alchemy Transfers API

could someone please elaborate on: fromBlock: the starting time range we want to fetch NFT mints over (defaults to latest) I tried to pass a block but its not working... I have also seen fromBlock&...
Kamo's user avatar
  • 21
2 votes
1 answer
1k views

Can someone explain me providers and the different types of it?

I can make providers using ether-hardhat, alchemy, and metamask. What is the difference between these?
amit's user avatar
  • 390
2 votes
1 answer
2k views

Alchemy - replacement transaction underpriced

SC: 0x3c445903aCa6c4d1B55357Fb9F8e22252899478A I simply try to mint() on Polygon Mumbai but I had to workaround "replacement transaction underpriced", I still can't see any pending/unmined ...
ibox's user avatar
  • 61
2 votes
1 answer
630 views

How to get detailed error message from Alchemy using ethersJS

I am using Alchemy as my RPC URL node provider, my connected address currently has 0 ETH for gas. When I try to run a transaction that requires gas in a try-catch block, I error I catch is Error: ...
user105612's user avatar
2 votes
2 answers
2k views

Is Alchemy API key a private information?

I'm checking out Alchemy's tutorial https://docs.alchemy.com/alchemy/tutorials/hello-world-smart-contract/part-4, and it seems that they (and also every repo I have seen on the internet) store the ...
user3799934's user avatar
2 votes
1 answer
77 views

RPC endpoint for production environments

Context For testing environments, I'm spinning up AWS instances with App-chain client nodes and using the AWS ALB to access the exposed RPC endpoint. It is protected by the security group rules, so ...
quantumdust's user avatar
2 votes
1 answer
604 views

Error with Sepolia Faucet - ReCAPTCHA not Recognized Despite Correct Completion

I am facing an issue while using the Sepolia Faucet provided by Alchemy through sepoliafaucet.com. Every time I try to access the faucet and complete the ReCAPTCHA, I encounter the error message, &...
Ibrahim Khalil's user avatar
2 votes
1 answer
387 views

Why is Alchemy eth_getLogs not finding event logs for AaveV3 Supply events?

I have created a Node project that connects to Alchemy via ethers. I am trying to capture all Supply events for AaveV3 However, when I use the getLogs function, and use the contract address as the ...
Oscar Chambers's user avatar
2 votes
1 answer
276 views

Does Alchemy support batch requests for getAssetTransfers?

I am trying to make a batch request for getAssetTransfers endpoint. However, when I try to do this, I get this error: jsonrpc: '2.0', id: 1, error: { code: -32600, message: '...
bison's user avatar
  • 21
2 votes
1 answer
94 views

Is dedicated gateway a need for marketplace projects?

I am developing an NFT marketplace. It has a section showing images of NFTs ( NFTCards with some information ) of a specific contract address. Since the number of minted NFTs by the contract is high, ...
Sina Rahimi's user avatar
2 votes
2 answers
1k views

Forking mainnet with Hardhat + Alchemy fails with "Too Many Requests"

Running into a problem attempting to test with hardhat by forking mainnet. I'm following the instructions here: https://hardhat.org/hardhat-network/docs/guides/forking-other-networks. I have a ...
Madbreaks's user avatar
  • 161
1 vote
1 answer
619 views

How to use the alchemy api on a local hardhat node?

I am working on a website in which I want to call on different NFTs connected to the currently selected MetaMask account. For testing I am running a local Hardhat node on which I have deployed my ...
rajohs's user avatar
  • 179
1 vote
3 answers
302 views

Getting NFTs of an address in a specific collection

I am using Alchemy API to handle fetching NFTs and their metadata in my platform. It has valuable methods, such as retrieving all issued NFTs of a collection or all owned NFTs of an address within a ...
Sina Rahimi's user avatar
1 vote
1 answer
8k views

ethers contract call for value of state variable reverts with "missing revert data"

I am trying to obtain the value of a state variable in my smart contract declared simply as string public projectName; at the top of my smart contract, which is deployed to the Polygon Mumbai testnet. ...
GGizmos's user avatar
  • 741
1 vote
1 answer
7k views

When trying to deploy a smart contract, I keep getting `Error HH100: Network ropsten doesn't exist` -- how do I resolve?

I'm running through these docs on deploying an NFT and I keep getting the error: Error HH100: Network ropsten doesn't exist The command I'm using can be found at step 16: npx hardhat --network ropsten ...
thatguyintech's user avatar
1 vote
3 answers
947 views

When I try to deploy my smart contract to the goerli network, nothing happens

I finally got to test my smart contract for the first time on the Goerli network through alchemy. It worked twice as I check on Etherscan which is now gone, but when I run the command; 'npx hardhat ...
Slatt's user avatar
  • 11
1 vote
4 answers
1k views

Get all Nfts of a collection owned by a wallet using alchemy sdk

I am using alchemy sdk , can u please tell me how I can use getNftsForOwner() to get all the nfts owned by a wallet of a particular contract adddress? I need the exact syntax. Thank u
Blockchain dev's user avatar
1 vote
1 answer
429 views

web3.eth - getBlock FetchError: request to https://eth-mainnet.g.alchemy.io/v2/api_key failed, reason: getaddrinfo ENOTFOUND eth-mainnet.g.alchemy.io

I'm trying to get Eth blocks by blockNum using Alchemy's apis. The docs mention two methods: getBlockByHash and getBlockByNum, but those methods don't exist on the web3.eth object. Here are the ...
T. Young's user avatar
1 vote
1 answer
112 views

How can I decode the output of the first call and use it to send a transaction?

I am attempting to call view function “0x…” with argument of value “3…” to a specific address “0x…” and also send X wei to that address I am looking to acquire the hash of the successful tx. Tools/...
QuantumDomain's user avatar
1 vote
1 answer
87 views

Sepolia - stalled on waitForDeployment

I use Hardhat and have some scripts to perform functions, such as deploy. I've been using Goerli but have been aware that it is being shuttered, and also i've found the transaction fee to be high and ...
HankCa's user avatar
  • 175
1 vote
1 answer
1k views

Problem in getting test ethers from sepolia faucet by alchemy

I am getting error "Sorry! To be fair to all developers, we only send 1 Sepolia ETH every 24 hours. Please try again after 24 hours from your original request." on sepolia and mumbai faucets ...
Siddhartha Sahu's user avatar
1 vote
2 answers
2k views

Insufficient funds when trying to deploy smart contract at goerli test network with alchemy

When I run the command "npx hardhat run scripts/deploy.js --network goerli" it gives me the error Error: insufficient funds for intrinsic transaction cost. More specifically looks like this:...
User G Amsterdam's user avatar
1 vote
3 answers
2k views

Retrying after error: 429: Your app has exceeded its concurrent requests capacity - fetching NFTs

I was fetching NFTs from certain contract for connected wallet using alchemy-sdk, and it was working fine, NFTs were retrieved and displayed on the frontend app. But unfortunately this solution ...
BlackH3art's user avatar
1 vote
1 answer
841 views

Minting 3D files onto opensea

I am new and I am building an NFT collection on Open Sea for my personal project. I have watched a couple of videos from Alchemy, the ERC721 smart contract video outlined how to upload and host files ...
TheBaby's user avatar
  • 11
1 vote
1 answer
459 views

Im trying to deploy contract on Polygon Mumbai but cant

I get this error when deploying my contract. It only takes 3,600,000 gas to deploy and mumbai gas limit is 20,000,000. deploying "DeqityFactory"exceeds block gas limit {"name":&...
MaximilianFullStack's user avatar
1 vote
1 answer
436 views

How do you import a custom unlocked account from Ganache-CLI into MetaMask?

I'm attempting to write some test contracts that interacts w/ Uniswap and am using the following stack: Remix (Injected Web3) -> MetaMask -> Ganache-CLI -> Alchemy (Fork of Ethereum Mainnet) ...
J Shapiro's user avatar
  • 113
1 vote
1 answer
514 views

estimateGas gets called too early and doesn't return correct value

I am using a alchemy node to calculate the gas limit of a smart contract once the state of the contract has changed to what I am looking for. I monitor this change by calling a read method on the ...
justanotherguy's user avatar
1 vote
2 answers
467 views

Sending hundreds of transactions every minute, TXs seem to get randomly stuck in mempool even after setting high gas

I'm building an application that needs to send hundreds of transactions every minute (consistently for hours & even days) to the Polygon blockchain. To achieve this I'm setting unique (and +1 ...
Shanzid Shaiham's user avatar
1 vote
1 answer
1k views

What do alchemy and infura actually do?

I deployed a contract via (?) alchemy, then deleted the alchemy app. The contract still works, on etherscan, as it did before — even for writes. This is encouraging, but begs the question: for which ...
hihihihihihihihi's user avatar
1 vote
1 answer
39 views

How do I get all incoming transactions to an Ethereum address during a certain time period with a python script using Alchemy API?

I have an Alchemy API python script that checks the balance for an Ethereum address. You can set up the Alchemy API object like this: from alchemy import Alchemy, Network # create Alchemy object ...
ChristianOConnor's user avatar
1 vote
0 answers
59 views

Transaction stuck and blocking any new transactions, but changing node provider solved it. Why?

Can someone please help me understand what just happened, so I and others can account for this in error handling? I was using web3.py to swap USDC for WMATIC through the UniswapV3 Router on Polygon ...
Skeppet's user avatar
  • 111
1 vote
1 answer
84 views

How to fix invalid sender error using alchemy-sdk?

Trying to send a transaction with Alchemy-sdk, but I keep getting invalid sender. What am I doing wrong or missing, code below: My provider is created using ethers.providers.JSONRPCProvider(...
Maniac_1979's user avatar
1 vote
0 answers
337 views

Alchemy API: How to get transaction history including failed and pending transactions for a specific wallet address?

In React I'm building a transaction history screen to list succeeded, failed and pending Polygon transactions. Using alchemy_getAssetTransfers I can retrieve the transaction history for a specific ...
Operator's user avatar
  • 111
1 vote
0 answers
194 views

Why Alchemy responds eth_getBlockByNumber with wrong data

Network: Polygon Mainnet. I am using the Alchemy RPC in the following manner: I listen for new blocks and then retrieve block data, including transactions, based on the block number. However, today my ...
Alexandr Kalashnikov's user avatar
1 vote
0 answers
35 views

How to filter smart contracts via method signature

is there anyone here who is an expert on dune/ethereum etl/alchemy? the question is - i'm doing research and want to find a quick way to query all smart contracts that implement/have called a certain ...
bilbob2392's user avatar
1 vote
0 answers
110 views

Unable to run concurrent contract executions on polygon mainnet (Alchemy)

I'm currently encountering a peculiar issue on the Polygon Mainnet, which doesn't seem to occur on the Testnet. When running two or more parallel node processes which have two different wallets with ...
Rakesh Bhatt's user avatar
1 vote
1 answer
78 views

before all" hook for "should allow a purchase" error - Chainshot

I am completing series of tutorials on chainshot. Now I am on events 4. - Sale and I am getting an error "before all" hook for "should allow a purchase" and I don't have an idea ...
rad2's user avatar
  • 13