Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

Filter by
Sorted by
Tagged with
0
votes
1answer
8 views

ganache modify code of smart contract after fork?

Ganache has recently introduced the ability to fork from a live blockchain at a particular block number. https://github.com/trufflesuite/ganache/releases/tag/v7.0.0 After forking, I would like to be ...
0
votes
0answers
6 views

Finding the proper transaction gas and gasLimit combinations in contract deployment on private network

The long story I am trying to deploy a contract to a private network. The contract is written in Solidity and pre-compiled into bytecode using Hardhat, and I've successfully tested it using Ganache ...
0
votes
1answer
21 views

Remix IDE not connecting to Ganache Web3 Provider

I'm trying to deploy my smart contract to Ganache (perferably the Ganache desktop app but this issue is also occurring for ganache-cli). When I select "Web3 Provider" under the "...
0
votes
0answers
5 views

Ganache UI infinite spinner / workspace not accesable

I have been using Ganache UI for over a year now on CentOS7. But last week it hadn't been working correctly. Whenever I create a new Workspace and add a project, the UI gets stuck For example: I open ...
1
vote
0answers
30 views

Not able to call any method from contract in react js app (Solidity, Ganache, Truffle & React)

Not able to call any method from contract in react-js app, but if I print contracts in console, I can see all the methods that I've define in contract. I have also upload this project to git here is ...
0
votes
0answers
13 views

Issue with web3 trying to connect to ganache from node's console [closed]

I'm trying to connect to my ganache and I'm getting this error. Welcome to Node.js v17.2.0. Type ".help" for more information. > const web3 = new Web3('http://127.0.0.1:7545) const web3 = ...
0
votes
0answers
15 views

Why can't I see my updates I made with truffle test in ganache?

making my first steps in blockchain technique I picked the most simple example SimpleStorage I'm using truffle and ganache. I coded the contract simple_storage.sol: // SPDX-License-Identifier: MIT ...
0
votes
1answer
19 views

Is the smart contract receiving funds or is it the address?

//SPDX-License-Identifier: MIT pragma solidity 0.6.12; contract ExceptionExample { mapping(address => uint) public balanceReceived; function receiveMoney() public payable { ...
0
votes
0answers
11 views

Ganache Storage not updated after minting ERC721 token

I am using a standard OpenZeppelin ERC721 token API to mint a NFT. The code looks as below: pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@...
0
votes
1answer
15 views

TypeError: Greeter.deployed(...).greet is not a function

Getting error Code: address payable owner; constructor () { owner= payable(msg.sender); } function kill() public { if(msg.sender== owner) {selfdestruct(owner);} } } ...
0
votes
2answers
39 views

ERC20 Token deployed to Ganache not seen on Metamask

I connected my truffle project to the ganache network. Also I added ganache network into the metamask. After deploying erc20 contract to ganache, I can see my account's token balance on truffle ...
0
votes
0answers
11 views

Could not connect to your Ethereum client with the following parameters

Following my first tutorial on truffle, zeppelin and ganache (and nothing else). I am trying truffle migrate. The code compiles, then issues this error: > Something went wrong while attempting to ...
0
votes
1answer
28 views

withdraw function for withdraw ethereum token from a contract is behaving weird

I copy a withdrawal function from the solidity documentation and added it to my contract function withdraw() public onlyOwner { uint256 ownerBalance = address(this).balance; require(...
1
vote
1answer
31 views

Truffle migration from within WSL not connecting to Ganache

Truffle migrate and test would not connect to Ganache [
0
votes
1answer
18 views

Why does `brownie run <script>` fail with FileNotFoundError even though the script does exist? [duplicate]

I have been trying to run a python "Hello" code using brownie run scripts/deploy.py I am obtaining the following output: Brownie v1.17.2 - Python development framework for Ethereum ...
0
votes
1answer
8 views

How does Ganache choose which accounts to take ETH from?

I have set up a basic project (the code isn't relevant, but you can see it here if need be). In the project there is a Token and a "bank". I also have a series of tests. I'm mocking ...
0
votes
1answer
18 views

Ganache: How to find private keys of an account

How can I find a account's public key. Is it `Account Address`?
0
votes
1answer
26 views

Ganache QuickStart displaying only 0.0.0.0 - All Interfaces on Windows10

I restarted Ganache several times Uninstall and reinstall the Program still getting the same error.
0
votes
0answers
56 views

Ganache Error/Bug?: Incompatible EIP155-based V 0 and chain id 1

I'm trying to mainnet-fork using the Ganache UI (instead of ganache-cli which seems to work fine.) The error mentions the chain id. I've used all sorts of chain ids. Mostly 1377 and 1. I'm not really ...
0
votes
0answers
18 views

sendSignedTransaction - (node:90923) UnhandledPromiseRejectionWarning: Error: Returned error: Invalid Signature

Hi I'm using Web3js and Ganache. I'm trying to send a serialized transaction but got the following error: (node:90923) UnhandledPromiseRejectionWarning: Error: Returned error: Invalid Signature . I'...
0
votes
1answer
38 views

Brownie Contract Interaction

If I deploy open auction contract on ganache with brownie, how can I send a bid into the contract with a brownie command? >>> Openauction[0].bid(Wei(1e18)) is giving me an error, how can I ...
0
votes
0answers
7 views

How to persiste ganache contracts on docker environment [duplicate]

I am trying to make a container that will run ganache and persist the contracts that are deployed there. So, even if the container restarts, everything will be there. I don't know if that is fully ...
0
votes
1answer
45 views

truffle is using 5777 as default network_id

ganache is using 1337 as the network Id but truffle keeps using 5777 by default,how do i change this? truffle-config.js require('babel-register'); require('babel-polyfill'); module.exports={ ...
1
vote
0answers
55 views

I am getting virtual machine error while running my brownie fundme contract

PS E:\brownie_fund_me> brownie run scripts/fund_and_withdraw.py --network ganache-local INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for ...
0
votes
0answers
9 views

What are best practices around "staging" environments for smart contracts?

Do you tend to just deploy to public testnets and test against them? Or is it best practice to have a private network? Or a server that simply runs ganache - does this give you confidence when ...
0
votes
1answer
20 views

While using Ganache in a web UI, how can I change address of user

While using Ganache in a web UI, I have assigned defalutAddress as a particular address. But if I have to change user , do I have to always change defaultAddress in indx.html ? Thanks
1
vote
0answers
10 views

How to add both Geth ang Ganache to metamask?

I have been facing an issue. I want to connect Both Geth and Ganache (GUI) to Metamask one at a time for testing smart contract. But in Metamask it's already showing a network localhost RPC endpoint ...
0
votes
0answers
18 views

Ganache-cli server and Webjs not connecting : Returned values aren't valid, did it run Out of Gas?

I am trying to connect web3js in the javascript section of my html to my ganache-cli nodejs server ganache deployment script: const ganache = require("ganache-cli"); const Web3 = require(&...
0
votes
2answers
34 views

Uncaught TypeError: contract.name is not a function

I`m trying to check if I correctly deploy a contract with truffle and ganache. I run truffle console and then contract = await Kryptobird.deployed(). But when I try to get the name of the contract I ...
0
votes
1answer
108 views

Key Error: 'eth_usd_price_feed' during brownie test

from brownie import Lottery, accounts, config, network from web3 import Web3 def test_get_entrance_fee(): account = accounts[0] lottery = Lottery.deploy( config["networks"][...
0
votes
0answers
17 views

MetaMask - RPC Error: results is not defined. Error after changing the Ganache environment

After changing the Ganache environment, the following browser-side error occurs when running npm run dev MetaMask - RPC Error: results is not defined inpage.js:1 {code: -32603, message: 'results ...
0
votes
1answer
273 views

Deploying ganache-local w/brownie: VM Exception while processing transaction: invalid opcode

I am going through brownie_fund_me part of this course: https://github.com/PatrickAlphaC/brownie_fund_me The initial deploy,.py works properly, but I keep getting some variation of invalid opcode and ...
0
votes
0answers
20 views

How can I make Contracts shown in Ganache?

I installed Ganache Version 2.5.4 (2.5.4.1367) on Mac and also installed ganache-cli and truffle with node. But I can't open contract and it gives me this error: Could not find 'node'. Node.js is ...
0
votes
0answers
14 views

Unable to simulate openingTime for a TimedCrowdsale while testing

I'm writing the tests for a TimedCrowdsale smart contract and I'm not being able to simulate the openingTime. I'm doing this: it('should accept payments after start', async function () { await ...
0
votes
0answers
36 views

Difference in cost of deploying

Why is the difference in cost of deploying contracts between Rinkeby and Ganache so high? The cost for one contract on Rinkeby is 5.7 ETH and the cost for the same contract on Ganache is 0.004886 ETH ...
0
votes
1answer
44 views

Get this error when transfer to other accounts: `RuntimeError: VM Exception while processing transaction`

I am using truffle and ganache for developing smartcontract. The issue I have is not able call transfer method. I got below exception when calling transfer inside sendCoin method. data: { '...
1
vote
1answer
57 views

Can't get the nonce meaning using web3.py

I'm following the freecodecamp solidity tutorial and unfortunately I get a mistake when I try to get the nonce meaning. I use web3.py and ganache as it's shown in the tutorial. Here's my code: from ...
0
votes
0answers
13 views

<UnknownContract> when calling call trace in brownie console

I'm using Ganache + brownie and having trouble generating a meaningful call trace on "mainnet-fork". How do I go about resolving this? I believe it has to do with a USDC contract I am ...
0
votes
2answers
241 views

How to test Uniswap contracts locally?

So far I developed smart contracts in Solidity using Ganache. I didn't have to use Uniswap in any way. Now I'd like to use Uniswap to put some of my ERC-20 token as liquidity. I started reading the ...
0
votes
0answers
29 views

i am getting value error while compiling brownie in python

brownie compile INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum File "C:\Users\scs\AppData\Local\Programs\Python\Python310\lib\...
0
votes
0answers
23 views

Calling a function takes forever and then times out with error

I wrote this example smart contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract TestContract { function foo() public pure returns (string memory) { string memory ...
0
votes
1answer
96 views

Truffle console showing irrelevant balance irrelevant BN{ negative: 0, words: [ 16777216, 62077800, 20718012, <1 empty item> ], length: 4, red: null }

I'm using ganache network, truffle network, web3, chai and mocha. while using truffle console in terminal it shows: truffle(develompment)> balance BN { negative: 0, words: [ 16777216, 62077800, ...
0
votes
1answer
29 views

Sending Ether from contract to the sender

This is a very common question. I am trying to withdraw fund from the contract. I have tried send,transfer and call but the transaction hash always shows 0 value transferred pragma solidity >=0.4....
0
votes
0answers
58 views

Web3 get accounts doesn't update when I switch Metamask addresses

I have a node app that connects to a basic frontend, and one of the get calls in the server is to get the address of the user. It works the first time, however, when I manually switch addresses/...
0
votes
1answer
19 views

Does "ganache" implements the specification in the Yellow Paper?

I wondered whether ganache, which produces a blockchain on my machine and is used for development, implements the Etherum yellow paper protocol. Please follow my line of logic: That is when the ...
0
votes
1answer
62 views

Sending ether to a payable function in Solidity doesn't decrease the sender's Ether in Ganache

I have the following smart contract: pragma solidity ^0.8.0; import "./IERC20.sol"; import "./MyCoinSupply.sol"; contract MyCoinDEX { IERC20 public token; event Bought(...
0
votes
0answers
64 views

Transaction error on betting

I am following this tutorial to make a betting App. I want to setup in my local environment with ganache. I didn't take the ropsten network approach as shown in tutorial Tutorial: https://medium.com/...
0
votes
1answer
35 views

Import 100k records into contract

I have a contract in which I must import ~100k ETH addresses into a map. Whenever I try to do that on Ropsten network (via Infura), I receive the error: Error: exceeds block gas limit If I try to do ...
1
vote
2answers
92 views

How to proxy for a DEX router in ganache (development)?

I am testing a smart contract that uses a Pancake Swap as DEX exchange/router. For learning purposes, I am trying to setup everything in local environment. I have successfully setup ganache in the ...
0
votes
1answer
38 views

How can I get returns in Truffle (using json-rpc)?

I am newbie at Truffle environment. I built a new smart contract. Now I am trying to test this in truffle environment. I digged web for solving this problem but couldn't find any solution :( Question ...

1
2 3 4 5
11