Questions tagged [ganache]
For questions about using the Ganache personal blockchain testing environment.
643 questions
0
votes
0
answers
25
views
Ganache-UI connection with Remix IDE [duplicate]
I connected Ganache-UI with Remix and able to view all the accounts and balances, but upon deploying a basic contract, I get such message:
Gas estimation errored with the following message (see below)....
1
vote
1
answer
37
views
Can't call POOL.flashLoan provided by Aave
I'm trying to call POOL.flashLoan provided by Aave core v3. This is for a test and done on forked mainnet using ganache/truffle.
contract FlashLoanArbitrage {
IPool public POOL;
...
0
votes
0
answers
20
views
i have an error to bulid web app react by blockchain solidity, truffle, ganache, metamask:the solution for frequency error please give me the solutio
import React, { useState, useEffect } from 'react';
import { BrowserRouter as Router, Routes, Route, Link } from 'react-router-dom';
import Web3 from 'web3';
import HomePage from './HomePage';
import ...
0
votes
0
answers
54
views
when using call function in web3.py im getting error
Error: Could not transact with/call contract function, is contract deployed correctly and chain synced?
import streamlit as st
from web3 import Web3
import hashlib
import json
# Connect to local ...
0
votes
1
answer
18
views
Truffle Test Error: UnhandledRejections detected VM Exception while processing transaction: revert code: -32000
I am still learning solidity and using Ganache.
Below is the contract I am trying to execute:
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
contract FundMe {
address payable public ...
0
votes
1
answer
23
views
Copying of type struct ECommerceMarketplace.OrderItem memory[] memory to storage not yet supported
I am working on creating an E-Commerce Smart Contract. But when I run the migrate command, I'm getting this error:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract ...
0
votes
0
answers
61
views
Bootnode return ip="invalid IP" udp=0 tcp=0 on local environment?
I'm learning and the process i found limitations with Ganache.
First with alternatives i have ?
Trying to create my own private block with geth i got this issue:
I try to create two nodes with ...
0
votes
0
answers
14
views
Why is VSCode not fetching the details that are given to the contract after the deployment to the Remix IDE?
Why is VSCode not fetching the details that are given to the contract after the deployment to the Remix IDE?
import React, {useEffect, useState} from 'react'
import { FaDonate } from 'react-icons/fa';
...
0
votes
0
answers
45
views
Smart contract is compiled but not deployed to ganache
I am developing a DAO Dapp, but when I run truffle migrate --reset, the contract compiles but does not get deployed to Ganache. There are no deployment details shown in the console, and the contract ...
0
votes
1
answer
41
views
Call to view function, which returns a bytes value, got error: VM Exception while processing transaction: invalid opcode
I have this test smart contract
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
pragma solidity 0.8.26;
contract TestSomething {
bytes state;
bytes32 state32;
constructor() {}
...
1
vote
2
answers
161
views
Ganache alternative in docker
After the Sunset of Truffle and Ganache . Are they already some alternative to the Ganache docker image https://hub.docker.com/r/trufflesuite/ganache with enabled persistent data for local development ...
0
votes
0
answers
33
views
How can I create new accounts and interact with the blockchain using Ganache (or other testnets)?
I am developing an Android app with kotlin and I want to create new accounts in the blockchain. I am using Ganache as a testnet. I am creating a new Bip32ECKeyPair for every user in the app and I want ...
1
vote
1
answer
83
views
Storing MQTT on Ethereum Chain or is there a better way?
I'm working on a college project where we are using IoT sensors (raspberry pi) to monitor the supply chain conditions, think temp, pressure, humidity etc. This data is being transmitted via MQTT to a ...
1
vote
1
answer
29
views
When I try to deploy my smart contract with ganache and try yo conect to the virtual blockchain, this message pop up in the terminal of visual studio
When I try to deploy my smart contract with ganache and try yo conect to the virtual blockchain, this message pop up in the terminal of visual studio. Why?
I hope somebody give my a response please. I'...
0
votes
1
answer
72
views
Web3.js => _data.trim() is not a function?
Trying to deploy to ganache but keeps giving this error.
Error :
TypeError: _data.trim is not a function
at ContractBuilder.deploy (C:\Users\user\Desktop\lotteryv2\node_modules\web3-eth-contract\lib\...
0
votes
0
answers
12
views
DNS using blockchain (how can i hashed my domain name ) in the code below help me to complete this code
import Web3 from "web3";
import Registry from "./contracts/Registry.json";
import Resolver from "./contracts/Resolver.json";
import Cache from "./contracts/Cache....
1
vote
0
answers
94
views
Missing Revert Data (Hardhat/Ganache)
shortMessage: 'missing revert data',
info: {
error: {
message: 'VM Exception while processing transaction: invalid opcode',
stack: 'RuntimeError: VM Exception while processing ...
0
votes
0
answers
34
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 ...
0
votes
0
answers
79
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 ...
0
votes
1
answer
129
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/...
0
votes
1
answer
538
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="...
0
votes
2
answers
83
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 ...
1
vote
0
answers
36
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 ...
0
votes
1
answer
131
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')....
0
votes
0
answers
46
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 ...
0
votes
0
answers
11
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&...
1
vote
0
answers
19
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....
0
votes
1
answer
42
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;
...
1
vote
1
answer
466
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....
1
vote
0
answers
32
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;
...
0
votes
1
answer
254
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 ...
1
vote
0
answers
41
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 = ...
0
votes
1
answer
388
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],
...
0
votes
2
answers
1k
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;
...
0
votes
0
answers
245
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....
0
votes
1
answer
45
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/...
0
votes
1
answer
118
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 ...
1
vote
1
answer
26
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&...
1
vote
0
answers
32
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....
1
vote
1
answer
2k
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;
...
1
vote
1
answer
317
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 ...
-1
votes
1
answer
121
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??
1
vote
0
answers
121
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 ...
0
votes
1
answer
52
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 >=...
0
votes
1
answer
102
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 ...
1
vote
3
answers
924
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 ...
0
votes
0
answers
43
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 ...
1
vote
1
answer
201
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!...
0
votes
1
answer
487
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 ...
0
votes
1
answer
664
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 = ...