Questions tagged [ganache]

Ganache, formerly known as TestRPC, is a command line application and GUI for Ethereum blockchain development used to run local tests, execute commands, and inspect state while controlling how the chain operates.

Ganache enables developers to quickly fire up a personal Ethereum blockchain which can be used to run tests, execute commands, and inspect state while controlling how the chain operates.

The GUI can be downloaded at https://truffleframework.com/ganache and the CLI via npm install ganache-cli -g or yarn add ganche-cli -g.

For ganache-cli documentation see https://github.com/trufflesuite/ganache-cli

317 questions
32
votes
5 answers

Why do I get the error "Method eth_maxPriorityFeePerGas not supported" when I try to run Web3py with Ganache?

Running Web3.py with Ganache-cli returns this error: Method eth_maxPriorityFeePerGas not supported. However this does work when working with a test-network like Ropsten directly without Ganache-cli. Running this code in following a tutorial: from…
Axceus
  • 407
  • 3
  • 7
13
votes
7 answers

The transaction declared chain ID 5777, but the connected node is on 1337

I am trying to deploy my SimpleStorage.sol contract to a ganache local chain by making a transaction using python. It seems to have trouble connecting to the chain. from solcx import compile_standard from web3 import Web3 import json import os from…
E_charles
  • 133
  • 1
  • 4
13
votes
1 answer

ValueError: Method eth_maxPriorityFeePerGas not supported, web3.py with ganache

I'm running the following code with web3.py: transaction = SimpleStorage.constructor().buildTransaction( {"chainId": chain_id, "from": my_address, "nonce": nonce} ) And I am running into the following error: Traceback (most recent call last): …
Patrick Collins
  • 5,621
  • 3
  • 26
  • 64
11
votes
1 answer

This version of µWS is not compatible with your Node.js build: Error: node-loader. while running "truffle console"

I'm working on a Blockchain project where I use Truffle. when I run the Truffle Console command I face this issue. Complete Log: This version of µWS is not compatible with your Node.js build: Error: node-loader: Error: The specified module could not…
Abdur Rahman
  • 153
  • 2
  • 7
10
votes
6 answers

Metamask not connecting to localhost 8545

I was trying to follow a tutorial from devto.io and to send transactions to the smart contract, I would need to connect my MetaMask wallet using one of the accounts created when I ran npx hardhat node command. To do so, I opened MetaMask and updated…
fairdev610
  • 148
  • 1
  • 1
  • 10
10
votes
0 answers

How to fix 'write tcp 127.0.0.1:54917->127.0.0.1:8545: i/o timeout' error in golang code that listens to smart contract events

I am using golang to listen to the smart contract events. I deployed my contracts to ganache ui and ganache-cli ports. But I get the below error: ➜ sc_events go run main.go 2019/04/17 14:25:04 write tcp 127.0.0.1:54917->127.0.0.1:8545: i/o…
10
votes
3 answers

Where does ganache store the Ethereum blockchain

I'm actually using truffle with Ganache to do some development. I would like to know where does Ganache store it's blockchain to see how much data is used by my test. Is it stored somewhere accessible on the pc ? I'm using Ubuntu 17.10…
Zackorrigan
  • 178
  • 1
  • 10
8
votes
4 answers

Brownie doesn't automatically attach to local ganache when I have Ganache open in the background. It is stuck with ganache-cli

Brownie doesn't automatically attach to local ganache when I have Ganache open in the background. It is stuck with ganache-cli (1st image) (2nd image is what I am looking for). Can someone help?
waupelani
  • 107
  • 1
  • 3
6
votes
3 answers

command not found: ganache-cli

I have installed and reinstalled npm to try to run ganache and it has not been successful..really need help here! (base) user bin % npm install -g ganache-cli changed 6 packages, and audited 102 packages in 4s 2 packages are looking for funding run…
YAL
  • 651
  • 2
  • 7
  • 22
6
votes
5 answers

error in ganache installation: The term 'ganache-cli' is not recognized as the name of a cmdlet, function, script file, or operable program

I installed ganache with yarn, but when I check the version to see if correctly installed, I get the error: "The term 'ganache-cli' is not recognized as the name of a cmdlet, function, script file, or operable program".
mosta
  • 63
  • 1
  • 5
6
votes
1 answer

ganache-cli how to read private key from account json file

I am running ganache-cli through a node application: const ganache = require('ganache-core'); const ethers = require('ethers'); const provider = new ethers.providers.Web3Provider( ganache.provider({ total_accounts: 5, account_keys_path:…
hkjhadj1
  • 848
  • 3
  • 13
  • 32
6
votes
2 answers

Issues with npm config & errors installing ganache-cli and truffle

I want to install ganache-cli and truffle using npm and am getting two types of errors (see codes pasted below). npm config If I run the command npm config, I get the following errors. Could that be the reason for the errors in 2.? :~ john$ npm…
Weisel2095
  • 61
  • 3
5
votes
3 answers

Deploying Uniswap v2 / Sushiswap or similar in Brownie, Hardhat or Truffle test suite

I am writing an automated test suite that needs to test functions against Uniswap v2 style automated market marker: do swaps and use different order routing. Thus, routers need to be deployed. Are there any existing examples of how to deploy a…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
5
votes
3 answers

RPC Error - valid string HTTPs rpc in Metamask

In my project, I tried to connect with metamask on Ganache. But I got the error like the following. inpage.js:1 MetaMask - RPC Error: Expected an array with at least one valid string HTTPS url 'rpcUrls', Received: http://127.0.0.1:7545/ code:…
tomato
  • 153
  • 2
  • 10
5
votes
2 answers

How to change account in truffle(ganache)?

I use ganache-cli to build local blockchain and truffle to deploy contract. To interact with deployed contracts i use truffle console. For example i transfer tokens from my current account(that is web3.eth.personal.getAccounts()[0]) to…
raury
  • 85
  • 1
  • 7
1
2 3
21 22