Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Truffle ganache debug not working

I have installed truffle and ganache and the @ganache/console.log library. Furthermore, I have the following contract from an online course which serves as an example to demostrate the debug mode of ...
TheDude's user avatar
  • 111
0 votes
0 answers
15 views

Hyperledger-caliper Ethereum Benchmarking (Error: nonce undefined)

I am using hyperledger-caliper to benchmark the Ethereum local network (Ganache). The contract is a simple storage contract, nothing fancy. I can deploy the contract using the code provided below. But ...
111Seven's user avatar
0 votes
1 answer
14 views

Foundry Anvil (local test network) database

I am using the Foundray Anvil local network to test my application. Is there an option while initiating the test network to store data of blockchain in a specific location? Similar to this --db /my/...
111Seven's user avatar
0 votes
1 answer
48 views

Subject: Facing "TypeError: invalid private key" during deployment

Description: I'm encountering an issue while attempting to deploy a contract using ethers.js. The error message I'm receiving is as follows: Error: TypeError: invalid private key (argument="...
Amine Merad's user avatar
0 votes
2 answers
32 views

MethodUnavailable(error) when shifting from Ganache to Sepolia Testnet

I previously used Ganche to deploy a solidity contract in python with web3py and it worked with given http provider & account details. But now I want to deploy the flask application that connects ...
Anushka.N12's user avatar
1 vote
0 answers
26 views

Accessing a String[ ][ ] type array from a Solidity Backend to a React Frontend

Greetings to the one reading this issue. My project uses: Ganache - Deployment Solidity - Smart Contract React - Frontend Metamask - Wallet Here is the screenshot of the problem. I am unable to ...
Siddhant Khare's user avatar
0 votes
1 answer
38 views

Unable to connect ganache with Hardhat

I am not being able to connect hardhat to the local ganache network. I have already connected the ganache to the metamask. Here is my hardhat.config.js code: /** @type import('hardhat/config')....
imbot's user avatar
  • 11
0 votes
0 answers
20 views

Ethers.js Deployment Issues with Ganache: Import Errors and Network Detection

I'm encountering deployment issues while using ethers.js with Ganache. Initially, I faced import statement errors with ethers v6 and downgraded to v5.7.2. However, I now encounter a network detection ...
Beefy.py's user avatar
0 votes
0 answers
10 views

Contract is not deploying

const ethers = require("ethers"); const fs = require("fs-extra"); async function main() { const provider = new ethers.providers.JsonRpcProvider("http://172.27.128.1:7545&...
Muhammad Farhan's user avatar
1 vote
0 answers
10 views

Why are my exceptions rendered differently after versions update?

I don't remember the previous versions I was using but I remember upgrading because I hoped to have a local test network (via Ganache) supporting EIP-1559. My versions are: Truffle v5.11.5 (core: 5.11....
Luis Masuelli's user avatar
0 votes
1 answer
26 views

Ganache doesn't return tx.origin

web3 6.12.0 solc-v0.8.23 Python 3.12.1 Ganache v2.7.1 I've deployed this contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract TestContract { address public myAddress; ...
bordolot's user avatar
0 votes
1 answer
74 views

I'm getting this Error: cannot estimate gas; transaction may fail or may require manual gas limit

MY CODE: const ethers = require("ethers"); const fs = require("fs-extra"); async function main() { // HTTP://172.17.32.1:7545 const provider = new ethers.providers....
Edward Kenway's user avatar
1 vote
0 answers
28 views

Truffle migration of an ownable contract

Initially, I deploy everything using REMIX IDE, currently I would like to try to deploy a contract that is ownable into local ganache blockchain using truffle migration: pragma solidity ^0.8.18; ...
tony's user avatar
  • 13
0 votes
1 answer
114 views

Invalid OpCode while deploying "HelloWorld"

I'm receiving the following error message trying to deploy a very simple contract to Ganache. How can I resolve this? Contract: pragma solidity ^0.8.21; // ^0.4.24; contract HelloWorld { string ...
Mark P's user avatar
  • 1
0 votes
0 answers
38 views

Which consensus algorithm PoW or POS is used for mining a block in latest ganache ethereum client?

Which consensus algorithm have been used in the latest version of ganache for ethereum blockchain simulation.
Narayan Khatri's user avatar
1 vote
0 answers
29 views

How to fix `Invalid callback object specfied` error when deploying a smart contract?

My smart contract: // SPDX-License-Identifier: MIT pragma solidity 0.8.19; contract Inbox { string public message; constructor (string memory initiialMessage) { message = ...
Jyobala's user avatar
  • 11
0 votes
1 answer
117 views

Error when deploying my contract and interact with him

Here is the error message : Deploying, please wait... BaseContract { target: '0x80f4D1df2Da11Ca9437A01519d3972d07E54A43E', interface: Interface { fragments: [ [ConstructorFragment], ...
Marsattak's user avatar
0 votes
1 answer
315 views

Error: missing revert data when deploying Solidity contract with ethers.js and Ganache

I'm having an issue deploying a Solidity smart contract using ethers.js and Ganache. I have a simple contract called SimpleStorage.sol: // SPDX-License-Identifier: MIT pragma solidity 0.8.21; ...
Shuvo's user avatar
  • 1
0 votes
0 answers
25 views

Error occure when deploy smart contract in Ganache blockchain simulator

Error Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Returned error: {"jsonrpc":"2.0",&...
Dilshan Madhuranga's user avatar
0 votes
0 answers
121 views

Web3.py exception contract logic error; execution reverted: VM exception

I would like to contract the transactions to solidity compiler and got the following error; raise ContractLogicError(f"execution reverted: {message}", data=data) web3.exceptions....
Narayan Khatri's user avatar
0 votes
0 answers
16 views

Transaction gets reverted when using send web3 function in angular

I am using [email protected] to access my ganache blockchain through localhost. I am new to dapp development and I'm trying to call a function that updates the ganache blockchain through web3 in angular. I ...
newcoder's user avatar
0 votes
0 answers
75 views

Send transaction failed: Error: [number-to-bn] while converting number [] to BN.js instance

error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "" . if you use an injected provider, please check ...
Dilshan Madhuranga's user avatar
0 votes
1 answer
24 views

Whenever I add the truffle config file to ganache, all the account balances become 0.00 ETH, any solutions?

The truffle compile and migrate work fine, but when I add the config file to the ganache, it makes all the account balances as 0.00 ETH. I am following this repo https://github.com/SuyashMore/...
Ayan Mukherjee's user avatar
0 votes
1 answer
39 views

Perplexing issue: Ownable: caller is not the owner'

i am a new developer and i am struggling with an issue since two weeks now and can't get to the bottom of it. Here is some context: I have two smart contracts, one minting an NFT and the other issuing ...
Brandas's user avatar
0 votes
0 answers
95 views

When sending a transaction using web3 I recive EIP1559FeeMarketTransaction.fillFromResult error

I am using a ganache local blockchain and truffle to test my smart contracts, this problem started to occur all of a sudden, since before I wasn't running into this problem. So when I call the ...
blackopps166's user avatar
1 vote
1 answer
15 views

brownie test results in ValueError: sender account not recognized

I am trying to run curve finance's multi-rewards test suite with brownie test, however, the tests fail with the following error: accounts = <brownie.network.account.Accounts object at 0x103e0caf0&...
MShakeG's user avatar
  • 1,593
1 vote
0 answers
17 views

Mainnet fork deployment - Error: *** Deployment Failed *** "Migrations" hit an invalid opcode while deploying

I am trying to deploy contracts on a mainnet fork. I have my fork running with the command ganache --fork https://mainnet.infura.io/v3/$INFURA_API_KEY --wallet.unlockedAccounts=$MY_ACCOUNT --chain....
justinsacco's user avatar
1 vote
1 answer
849 views

Got `invalid opcode` when deploying a contract to Ganache test network from Truffle

I have launched Ganache 2.7.1 in Mac and using truffle 5.11.3. I tried to deploy below contract to Ganache but filed: helloworld.sol // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.18; ...
Joey Yi Zhao's user avatar
0 votes
0 answers
39 views

Error when Importing Web3 in React: Module not found for './formats' and

I'm encountering an issue while trying to import the Web3 library in a React project. The error message I'm receiving is: Module not found: Error: Can't resolve './formats' in '/Users/kaustubhsharma/...
kaustubh sharma's user avatar
1 vote
1 answer
136 views

How do I fix Error: Deployment Failed on ganache?

I am encountering this error while deploying my smart contract on the Ganache blockchain, can anyone help me fix it? Error: *** Deployment Failed *** "Coffee" hit an invalid opcode while ...
kaustubh sharma's user avatar
0 votes
0 answers
30 views

Can I add an NFT image to MetaMask on the Ganache test network?

Here is my code: const addImageToMetaMask = async (_tokenAddress, _tokenName, _tokenSymbol, _urlImage, _tokenId) => { try { if (typeof window.ethereum !== 'undefined') { const provider =...
azam's user avatar
  • 1
-1 votes
1 answer
37 views

how can i deploy my Dapp?

what if I have deployed my smart contract on truffle and used ganache to deploy the same and i havn't used any test network, so if I go to deploy it on netlify to demonstrate the same will it work??
kaustubh sharma's user avatar
1 vote
0 answers
95 views

Importing ERC20 token on Ganache silently fails

I have deployed an ERC20 contract on my local Ganache network, I am trying to add it to Metamask. It seems to find it, but then fails to display it in my token list after import: First I add the token ...
S..'s user avatar
  • 81
0 votes
2 answers
28 views

TypeError: Member "add" not found or not visible after argument-dependent lookup in struct Chainlink.Request memory

I encounter this error when trying to compile and migrate to my blockchain EVM.The smart contract supposed to trigger a job from Chainlink from Ganache EVM. This is the code to it pragma solidity >=...
xopherwwl's user avatar
0 votes
1 answer
62 views

Chainlink says my EVM node is unreachable to localhost ganache

I have followed the instructions from chainlink doc here. In the instruction, instead of sepolia, I renamed to ganache because it will be linking with my ganache EVM. As everything is setup, my ...
xopherwwl's user avatar
0 votes
0 answers
42 views

AttributeError: 'Eth' object has no attribute 'abi'

I am building a web application using django to register phone battery details and it interacts with a smart contract. I am trying to use the decode_log method but I keep getting this error: ...
Koyemushi's user avatar
1 vote
3 answers
446 views

CALL_EXCEPTION in estimateGas with local ganache

I am trying to deploy a contract to a local ganache network using Nodejs v20. Nodejs is able to connect with local Ganache but the deploy() method is giving following error: Error: missing revert ...
amol's user avatar
  • 21
0 votes
0 answers
30 views

Are accounts on Ganache Blockchain considered Nodes?

I wanted to ask a question: the accounts on Ganache are nodes, for example I mean, if I am in the project, I let the account send the transaction to another account This process considers that you are ...
Ghada AbdulWahab's user avatar
0 votes
0 answers
34 views

Too much time to upload a file to ganache-cli blockchain

I am trying to upload a 1.6 Mb file to a state variable of type bytes in a smart contract I deployed in ganache blockchain, so I started it using this command to avoid the out of gas error in python ...
jnano's user avatar
  • 33
1 vote
1 answer
104 views

web3.js how to call receive() external payable?

firstly, I have a code in a contract as below: receive() external payable { // function enter() external payable { require(msg.value > 0.1 ether, "require minimum 0.1 ether!...
cyann's user avatar
  • 11
0 votes
0 answers
60 views

write failed transactions to ganache

i'm trying to debug a complex transaction in ganache (using mainnet fork). it reverts and i want to debug why exactly. i cannot use truffle debugger because it wants transaction hash, but i don't have ...
guest1622's user avatar
0 votes
1 answer
268 views

Invalid opcode error in ganache 2.7.1

I have created a smart contract and deployed it using web3.py by connecting to the ganache 2.7.0 version and deployed the smart contract in it but suddenly there was a update in ganache which I did ...
Abisheg Sridhar's user avatar
0 votes
1 answer
407 views

Error: Returned error: sender account not recognized

this contract for Deploys instances of other smart contracts and i'm using ganache contract Contracts_Factory { // Common Section uint256 SIZE = 10; uint index = 0; string[] accounts = ...
abdou's user avatar
  • 3
1 vote
2 answers
789 views

How to configure custom ethereum node in foundry project?

Hardhat allows users to configure a custom network in the networks configuration object. This allows developers to run their JS/TS test suites against another local node such as Ganache or even a live ...
MShakeG's user avatar
  • 1,593
1 vote
0 answers
32 views

React dapp using same previous account(from ganache) even though changed in metamask

I have tried to interact and call functions from ethereum contract deployed at local blockchain ganache in my react dapp. And I am using metamask. But even though I change the account in metamask the ...
K7000's user avatar
  • 11
0 votes
0 answers
81 views

Unhandled Rejection (Error): Internal JSON-RPC error

I keep getting this error: Unhandled Rejection (Error): Internal JSON-RPC error. { "message": "VM Exception while processing transaction: revert", "stack": "...
Bashir Abubakar's user avatar
1 vote
0 answers
178 views

How to implement a custom consensus mechanism in Ganache

As a beginner in the Ethereum world, I have developed a blockchain network in Ethereum using Truffle, Ganache and Web3.js. I can deploy smart contract to Ganache network and transactions are included ...
Tripoli's user avatar
  • 11
0 votes
0 answers
27 views

How to measure time taken (computation) for each task in Ganache/Truffle?

If we have deployed a Dapp and using Ganache, how to measure the time taken for each step/task? or the total time taken for the entire application or the time taken for the creation of each block in ...
G Pavithra 's user avatar
1 vote
1 answer
929 views

Unhandled Exception: Connection refused - Truffle Ganache Connection with Flutter

I am getting this error when trying to link a smart contract deployed on a Ganache local blockchain with Flutter web3dart package. Note: Testing on android (both emulator and physical device give the ...
Tomas Ward's user avatar
4 votes
4 answers
2k views

contract.deployTransaction.wait(1) not working in ethers version 6

To be specific I am using ethers version 6.2.3 Error is in this line const deploymentReceipt = await contract.deployTransaction.wait(1); Entire code I am using to deploy contract and wait const { ...
Neeraj Walia's user avatar

1
2 3 4 5
13