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
2 votes
2 answers
29 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 ...
user avatar
  • 104
0 votes
1 answer
10 views

Why is token URI being updated on chain but not in Alchemy Web3?

I deployed a contract and minted 5 tokens under the ERC-1155 standard. After reading in multiple that you can replace old URI with a new one to update the metadata of a token, I tried to use my setURI ...
user avatar
  • 1
1 vote
1 answer
48 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) ...
user avatar
  • 113
0 votes
0 answers
81 views

How to write the Mint function in an ERC1155 Smart Contract and Ethers js library

Can anyone help me implement the mintPass(mintAmount) method in my next js application using ether.js library how can I write the mintPass so people can mint till 4 passes I am using ethers.js library ...
user avatar
  • 1
1 vote
1 answer
675 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. ...
user avatar
  • 457
0 votes
1 answer
28 views

Should all state-changing functions to a smart contract go through MetaMask?

For a Dapp that is using its own node provider such as Infura or Alchemy, all read operations can go through this node, but any state-changing operations will require a signer. These node providers do ...
user avatar
  • 13
0 votes
1 answer
190 views

error: Invalid JSON RPC response: "" when trying to transfer testnet token

I am trying to transfer testnet tokens using Node.js, Web3.js, Ethers, and Alchemy but I am receiving Invalid JSON RPC response: "" whenever I deploy my code to Railway. Is this an issue of ...
user avatar
  • 101
0 votes
1 answer
80 views

Nothing happens when I call web3.eth.sendTransaction

I am very new to web3, I am trying to use metamask with alchemy web3 wrapper. Metamask is connected and I can get account address and account balance but when I try "transaction" function, ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
0 votes
0 answers
68 views

Alchemy pending transactions indefinetly

I changed literally nothing and the transactions for contract creations don't go through anymore. I'm using hardhat and deploying on mumbai. I have set blockGasLimit: 999999999999999,. Any ideas why ...
user avatar
1 vote
1 answer
58 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 ...
user avatar
0 votes
1 answer
41 views

route.midPrice.toSignificant() - Calculate Price for Swap Tokens - Not matching Price

I try to swap coins on QuickSwap for this i use the quickswap-sdk and the ethers In the following exapmle i want to swap 0.05 Matic to Sand I am this to get the amount of tokens i want to swap: const ...
user avatar
1 vote
0 answers
71 views

Alchemy Mumbai endpoint not working from truffle

I am trying to deploy some smart contracts on Mumbai network from truffle using an Alchemy endpoint I just created. this is my truffle-config.js But I am getting errors all the time : Not to long ...
user avatar
1 vote
1 answer
88 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 ...
user avatar
1 vote
0 answers
94 views

Wait for web3.eth.sendSignedTransaction and lambda timeout

I'm using alchemy to mint NFT and in the specific case this piece of code //the transaction const tx = { from: PUBLIC_KEY, to: blockChainAddress, nonce: nonce, ...
user avatar
  • 111
1 vote
1 answer
214 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 ...
user avatar
0 votes
1 answer
76 views

Deploying same contract with different owner using alchemy

I am trying to deploy contract to polygon mumbai testnet. It works with the first wallet address, but when i use a different wallet address it doesn't work. I am using the same alchemy rpc url truffle ...
user avatar
1 vote
0 answers
94 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 ...
user avatar
  • 1,850
0 votes
1 answer
420 views

Get Token Balance of Address at Particular Block Number with Alchemy

I have been trying to get the token balances for an address at the first of the month for every month in the past year. There is an incredible article about how to do this with chainstack: https://...
user avatar
0 votes
1 answer
106 views

Deploy using alchemy or remix

Initially I interact with my smart contract using remix but when it comes to interact on my website. I face some issues so that I deploy my contract to alchemy. Two questions confuse me. can I regard ...
user avatar
  • 107
0 votes
1 answer
107 views

Web3 Chainstack Guide to Batch Transactions gives Error: This contract object doesn't have address set yet, please set an address first

I am trying to get the token balances for all of the tokens in my address. To do that I followed the steps in this guide here: https://chainstack.com/the-ultimate-guide-to-getting-multiple-token-...
user avatar
0 votes
1 answer
466 views

How to decode the hex string of an eth_sendRawTransaction request in Alchemy?

I'm using an Alchemy rpc endpoint to facilitate all my MetaMask transactions. I sent a transaction a few hours ago and it's stuck in pending, and now every few seconds (or.. every time I open MetaMask ...
user avatar
0 votes
0 answers
71 views

Retrying on 4xx/5xx HTTP errors in an ethers.js/Node.js project using Alchemy JSON RPC

I'm wondering how to handle HTTP errors from an Alchemy RPC endpoint. I have a Typescript/Node.js project using ethers.js. The code is using an onBlock() handler and executing some transactions ...
user avatar
  • 101
0 votes
0 answers
17 views

Error initializing Alchemy Provider in next.js

I want to init alchemy json Provider in next.js the alchemy url with key is stored inside env.local like so- ALCHEMY_URL=https://polygon-mumbai.g.alchemy.com/v2/myAlchemyKey page: /nft const ...
user avatar
  • 43
1 vote
1 answer
70 views

How can I properly set a minting price with Alchemy?

I am having trouble establishing a mint price as Alchemy offers a too abstract coding practice for the smart contract part. I would like to know how I might set a minting price for my collection so ...
user avatar
1 vote
1 answer
733 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 ...
user avatar
0 votes
1 answer
1k views

Hardhat compile/deploy error

I'm following this tutorial for creating and deploying a smart contract (https://docs.alchemy.com/alchemy/tutorials/how-to-create-an-nft), but instead of deploying it on the ropstein test network I ...
user avatar
0 votes
1 answer
657 views

I get error saying "invalid contract address or ENS name" when I try to run Interact.js script from Alchemy's Hello world smart contract tutorial

I was following This tutorial from Alchemy to build a HelloWorld smart contract. After successfully deploying it to alchemy, when I wrote the 'Interact.js' script from the tutorial and tried to run it,...
user avatar
0 votes
1 answer
75 views

NFT Tutorial Downloading Hardhat Error

After going through the steps listed in https://docs.alchemy.com/alchemy/tutorials/how-to-create-an-nft, I keep getting an error message when downloading Hardhat. The three error messages are: npm ERR!...
user avatar
1 vote
0 answers
21 views

NFT on Opensea #Alchemy

I followed all steps in 3 parts of this tutorial https://ethereum.org/en/developers/tutorials/how-to-view-nft-in-metamask/ I also registered NFT in Metamask wallet. Wallet adress ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
0 votes
0 answers
146 views

Trying to use an Alchemy Websockets address to subscribe to an event but it errors out when it tries to update

Here is the script: const Big = require('big.js'); const blk = require('./blockchain'); const UniswapV2Pair = require('./abi/IUniswapV2Pair.json'); const cc = require('./common_code'); const ...
user avatar