I'm trying to follow a tutorial to create an NFT: https://ethereum.org/en/developers/tutorials/how-to-write-and-deploy-an-nft/
I took a faucet here: https://faucet.metamask.io/
But when trying to mint the contract I get this error:
λ npx hardhat --network ropsten run scripts/deploy.js Error: insufficient funds for intrinsic transaction cost (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.5.3) at Logger.makeError (E:\chat\nft\my-nft\node_modules\#ethersproject\logger\src.ts\index.ts:225:28) at Logger.throwError (E:\chat\nft\my-nft\node_modules\#ethersproject\logger\src.ts\index.ts:237:20) at checkError (E:\chat\nft\my-nft\node_modules\#ethersproject\providers\src.ts\json-rpc-provider.ts:53:16) at E:\chat\nft\my-nft\node_modules\#ethersproject\providers\src.ts\json-rpc-provider.ts:215:24 at processTicksAndRejections (internal/process/task_queues.js:93:5) { reason: 'insufficient funds for intrinsic transaction cost', code: 'INSUFFICIENT_FUNDS', error: ProviderError: insufficient funds for gas * price + value at HttpProvider.request (E:\chat\nft\my-nft\node_modules\hardhat\src\internal\core\providers\http.ts:49:19) at LocalAccountsProvider.request (E:\chat\nft\my-nft\node_modules\hardhat\src\internal\core\providers\accounts.ts:182:36) at processTicksAndRejections (internal/process/task_queues.js:93:5) at EthersProviderWrapper.send (E:\chat\nft\my-nft\node_modules\#nomiclabs\hardhat-ethers\src\internal\ethers-provider-wrapper.ts:13:20), method: 'sendTransaction', transaction: undefined } I have tried to find on the net I do not understand why it does not work when I am on the ropsten test network.
how i can solve this problem?
Thank you
I also had the same problem, and I reached the same point in that tutorial failing with the same exact message.
The problem on my side was the address was indeed without funds.
Go to this address to request funds from the faucet https://fauceth.komputing.org/ and enter your wallet address from metamask. if you have the browser extension you can find your correct address right there, see the following image:
You can also check on Etherscan to validate if the funds are really there in your address.
Hope it helps Rija Cloud !
Make sure you select rospten network in Alchemy.
Make sure when you update your testnet eg: from rinkeby to kovan, you also go ahead and get the new URL to reflect that change in network. If you done the URL will be pointing to the wrong testnet.
Related
With each modification that I make, I execute the compilation and deploy to the Goerli testnet.
Now, it's complaining that I have 5 similar contracts and it's giving an error when checking.
What to do?
https://goerli.etherscan.io/address/0xD6a0Fc642879BFCDb41979be4572D5E7d6212d15#code
When attempting to make a call to a program compiled with #solana/solidity, I'm getting the following error:
Transaction simulation failed: Error processing Instruction 0: Program failed to complete
Program jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N invoke [1]
Program log: pxKTQePwHC9MiR52J5AYaRtSLAtkVfcoGS3GaLD24YX
Program log: sender account missing from transaction
Program jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N consumed 200000 of 200000 compute units
Program failed to complete: BPF program Panicked in solana.c at 285:0
Program jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N failed: Program failed to complete
jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N is the program's public key and pxKTQePwHC9MiR52J5AYaRtSLAtkVfcoGS3GaLD24YX is the sender's public key.
I'm using a fork of the #solana/solidity library that exposes the Transaction object so that it can be signed and sent by Phantom Wallet on the front end. The code that results in the error is as follows:
// Generate the transaction
const transaction = contract.transactions.send(...args);
// Add recent blockhash and fee payer
const recentBlockhash = (await connection.getRecentBlockhash()).blockhash;
transaction.recentBlockhash = recentBlockhash;
transaction.feePayer = provider.publicKey;
// Sign and send the transaction (throws an error)
const res = await provider.signAndSendTransaction(transaction);
I would attempt to debug this further myself, but I'm not sure where to start. Looking up the error message hasn't yielded any results and the error message isn't very descriptive. I'm not sure if this error is occurring within the program execution itself or if it's an issue with the composition of the transaction object. If it is an issue within the program execution, is there a way for me to add logs to my solidity code? If it's an issue with the transaction object, what could be missing? How can I better debug issues like this?
Thank you for any help.
Edit: I'm getting a different error now, although I haven't changed any of the provided code. The error message is now the following:
Phantom - RPC Error: Transaction creation failed. {code: -32003, message: 'Transaction creation failed.'}
Unfortunately this error message is even less helpful than the last one. I'm not sure if Phantom Wallet was updated or if a project dependency was updated at some point, but given the vague nature of both of these error messages and the fact that none of my code has changed, I believe they're being caused by the same issue. Again, any help or debugging tips are appreciated.
I was able to solve this issue, and although I've run into another issue it's not related to the contents of this question so I'll post it separately.
Regarding my edit, I found that the difference between the error messages came down to how I was sending the transaction. At first, I tried sending it with Phantom's .signAndSendTransaction() method, which yielded the second error message (listed under my edit). Then I tried signing & sending the transaction manually, like so:
const signed = await provider.request({
method: 'signTransaction',
params: {
message: bs58.encode(transaction.serializeMessage()),
},
});
const signature = bs58.decode(signed.signature);
transaction.addSignature(provider.publicKey, signature);
await connection.sendRawTransaction(transaction.serialize())
Which yielded the more verbose error included in my original post. That error message did turn out to be helpful once I realized what to look for -- the sending account's public key was missing from the keys field on the TransactionInstruction on the Transaction. I added it in my fork of the #solana/solidity library and the error went away.
In short, the way I was able to debug this was by
Using provider.request({ method: 'signTransaction' }) and connection.sendRawTransaction(transaction) rather than Phantom's provider.signAndSendTransaction() method for a more verbose error message
Logging the transaction object and inspecting the instructions closely
I hope this helps someone else in the future.
I am using web3 version 1.3.3 and tried to call the contract method using send() but it is showing an error above( Error: Returned error: insufficient funds for gas * price + value at Object.ErrorResponse )
const ERC20ListInst = await this.contract;
const res = await ERC20ListInst.methods.tokenToWei(addr, this.web3.utils.toHex(amount)).send({
from: this.web3.eth.defaultAccount,
gas: 100000
});
I have enough eth on the account and can't sure why this is happening.
Is there anyone has faced this one before?
There was issue on truffle wallet provider url. I was going to use Goerli and there was enough fund but I wrote with mainnet url. So it was checking mainnet account and showing me insufficient balance. After I indicate wallet provider to goerli then it worked. Thanks.
I've got problem with printing transactions received on address.
On my machine I've got full sync node
but still cannot get transactions on address. Command which I use:
bitcoin-cli getreceivedbyaddress ADDRESS
Result:
error code: -4
error message:
Address not found in wallet
Is there anything more that I should do?
getreceivedbyaddress is a wallet RPC query. It queries your own wallet.
Bitcoind does not maintain a full per-address index of the blockchain.
To query any address you should use importaddress RPC call
importaddress "address" ( "label" rescan p2sh ) Adds an address or
script (in hex) that can be watched as if it were in your wallet but
cannot be used to spend. Requires a new wallet backup.
rescan is on by default and rescanning can take some time.
I am trying to fetch data from blockchain using query in chaincode. I have invoked around 2,50,000 records in blockchain and trying to fetch the data using query. When i run the chaincode and get the peer logs, I am getting the below error.
failed to invoke chaincode name:"scbcch" , error: timeout expired while executing transaction
When i do a query for lesser data my code works fine without these errors.
Can anybody please help me in solving the issue please.
I am using Hyperledger Fabric 1.4.
Here is my Query code:
queryString := fmt.Sprintf("{\"selector\":{\"_id\": {\"$gt\": null},\"$and\":[{\"terminationReportID\":{\"$ne\":\"%s\"}},{\"terminationReportFlag\":{\"$eq\":\"%s\"}},{\"effectiveDateOfAction\":{\"$gt\":\"%s\"}},{\"importDate\":{\"$eq\":\"%s\"}}]},\"fields\": [\"bankID\",\"effectiveDateOfAction\",\"costCentre\"],\"use_index\":[\"_design/indexTerminationReportDoc\",\"indexTerminationReportName\"]}","null", "Yes", "2018-10-31", lastImportDatekey)
queryResultss11, errtr := getQueryResultForQueryString(stub, queryString)
And my Indexing is:
{"index":{"fields":["terminationReportID","terminationReportFlag","effectiveDateOfAction","importDate"]},"ddoc":"indexTerminationReportDoc", "name":"indexTerminationReportName","type":"json"}
Can anyone please help me to figure out and resolve the issue. I am stuck with this for more than 3 days.
Is there anything I have to change on my index part. I am re-posting the same issue as I am not getting any support for this issue.
The issue is with the chaincode execution timeout.You can customize it in the docker file of your peers.
CORE_CHAINCODE_EXECUTETIMEOUT=80s