Questions tagged [ganache-cli]

Ganache CLI, part of the Truffle suite of Ethereum development tools, is the command line version of Ganache, your personal blockchain for Ethereum development.

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

How to change response from oracle?

I need to test my contract, and to test I need to change data that I recieve from ChainLink Oracle (I get Ethereum price from it). So how can I change price on ETH local for tests using Ganache-Cli or ...
0 x's user avatar
  • 1
0 votes
0 answers
17 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
1 answer
11 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,418
0 votes
0 answers
14 views

Ganche-cli, mine multiple transactions into one block

I am using ganache-cli and web3 to build a DAPP. As part of this project I am trying to add multiple transactions into one block but facing unusual behavior. I tried options -b and --blockTime as well....
111Seven's user avatar
1 vote
1 answer
213 views

`web3.eth.abi.decodeParameters()` returning error: AbiError: Parameter decoding error: overflow

I am trying to decode the transaction input which is an hex data. I am using the following code for the same const functionABI = abi.find(entry => entry.name === 'check'); decodedInput = web3.eth....
111Seven's user avatar
0 votes
0 answers
21 views

Ganache-cli block explorer

I am working on a project and creating private blockchain network using ganache-cli. I store the blockchain in the database using --db option. I am trying to understand what is stored in each block of ...
111Seven's user avatar
0 votes
0 answers
18 views

Ganache-cli unable to create database to store blockchain

I am new to smart contracts, web3. I am trying to deploy a smart contract to ganache-cli and store the blockchain in a database. When I run the below code I am able to deploy the contract but unable ...
111Seven's user avatar
0 votes
0 answers
28 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
0 votes
0 answers
50 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
108 views

How can I view all the values of all the variables in a smart contract when using ganache-cli and web3.py?

I'm new to this domain and have used remix since few months. Now I'm developing application locally. I do not want to write getters for every variable just to know my previous transactions worked ...
P S's user avatar
  • 101
0 votes
1 answer
402 views

How to load a smart contract which has been deployed in ganache-cli in remix?

I have deployed a smart contract in ganache-cli. How can I interact with it using remix? Currently remix is saying "No compiled contracts found." when I try to load my smart contract with ...
P S's user avatar
  • 101
0 votes
0 answers
21 views

After using ganache bifurcation, how to convert ETH to WETH and DAI?

1: How to convert ETH to WETH and DAI after using ganache bifurcation, 2: Although the exchange is successful in MetaMask, I cannot display the converted tokens every time I add assets. How do I ...
lingxxcc's user avatar
1 vote
0 answers
59 views

network ID error while deploying a truffle project to ganache cli. how do i resolve it

when I deploy my truffle project to ganache I get the error, network id are not the same. and when I checked the network id on ganache and truffle, i changed the network id of truffle to match that of ...
grog's user avatar
  • 11
0 votes
0 answers
131 views

How ganache unlocks account that doesn't belong to me?

In ganache mainnet fork, I can unlock any account and make transactions on behalf of that account: npx ganache-cli -p 8545 -f https://mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID --unlock $...
Mr.Snow's user avatar
0 votes
1 answer
48 views

Can't connect to Remix after changing ganache-cli host?

you look at the bottom of the photo referenced, I've changed hosts. I created a public server on AWS and ran ganache-cli on port 8545. I can connect well with modules such as metamask or web3, etherjs,...
imelon2's user avatar
  • 455
0 votes
1 answer
197 views

Truffle/Ganache Gas Limit Increase [duplicate]

I had posted on the GitHub Discussion as well. I have this massive smart contract and my goal is to study the scalability of the contract. The values work for smaller sizes. However, it fails at ...
Harish Karthikeyan's user avatar
0 votes
1 answer
95 views

I am getting this error when I deploy my contract in ganache using the command node deploy.js

I am getting this error when I deploy my contract in ganache using the command node deploy.js
HARI SUDARSAN's user avatar
0 votes
1 answer
287 views

Getting error "Ownable: caller is not the owner"

I've been trying to run an onlyOwner function in Ganache-cli, but I keep getting this error, even though migrated the contract a minute earlier and didn't change the owner. This the first test since ...
Antheloth's user avatar
1 vote
1 answer
43 views

How to fork form Geth light client to Ganache CLI?

I am currently forking the Ethereum mainnet into Ganache CLI using Infura (command: ganache --fork https://mainnet.infura.io/v3/my_project_id) However, I want to use my own Geth light client with ...
Suraj S Jain's user avatar
0 votes
1 answer
608 views

ethers.queryFilter returns TypeError: Cannot read properties of undefined (reading 'map')

I have a typescript project using ethersjs to connect and interact with a smart contract, on a fork made with ganache. This specific code is throwing an error: const eventFilter: ethers.EventFilter =...
Julissa DC's user avatar
  • 1,828
0 votes
0 answers
129 views

Cannot connect to ganache-cli remotely

Currently working on a NFT project for myself. Felt it would be easier, for myself, to view the NFTs within Metamask on my phone. Interacting with smart contracts directly... might be the only way... ...
Nolan Robidoux's user avatar
0 votes
1 answer
207 views

Access deployed contracts on Ganache local blockchain - BrownieEnvironmentError: Functionality not available in local environment

Using a generic SimpleStorage.sol contract and a deploy.py I'm able to create a contract on a Ganache local blockchain and access it during execution. On brownie console is possible to do the same ...
Max-Cap-ll's user avatar
1 vote
1 answer
375 views

How do you import a custom unlocked account from Ganache-CLI into MetaMask?

I'm attempting to write some test contracts that interacts w/ Uniswap and am using the following stack: Remix (Injected Web3) -> MetaMask -> Ganache-CLI -> Alchemy (Fork of Ethereum Mainnet) ...
J Shapiro's user avatar
  • 113
0 votes
1 answer
97 views

is there a way to use ganache with dapps

For development I use Ganache and forking the mainnet. I also have a metamask wallet than can access this. The issue is that every-time I want to do something on a contract (like aave, uniswap etc) I ...
user1995187's user avatar
0 votes
2 answers
1k views

Error : contract.methods.myfunction().call() is not a function

I'm new to web 3 and I'm trying to interact with a contract deployed with ganache and I get an error here is a screenshot: `
dev's user avatar
  • 15
0 votes
1 answer
475 views

Windows Ganache install Errors [closed]

I'm attempting to install ganache via npm install ganache from my windows machine using PowerShell. Upon execution, a list of errors is populated. One asked me to install python which I thought was ...
sltdev's user avatar
  • 117
0 votes
1 answer
346 views

ganache-cli functions.balanceOf web3.exceptions.BadFunctionCallOutput

I have forked BSC testnet using Ganache v7.04 and I am able to swap BNB for a token using the PancakeSwap contract and check the native balance without issue, but now when I am working on a script to ...
saltyeggs's user avatar
2 votes
1 answer
2k views

Ganache and webscockets

I'm searching the docs, but, I cannot find anything. Does ganache support WebSocket connections? People seem to use for web socket connections in different posts.
Nikos Iliakis's user avatar
2 votes
1 answer
316 views

Brownie ConnectionResetError on running forks

I am running a test script with mainnet-fork using alchemy. The test appears to be successfully completed, but during the tear down bit, brownie throws up: ConnectionResetError: [WinError 10054] An ...
calnix's user avatar
  • 21
1 vote
1 answer
109 views

truffle with ganache uses "UNKNOWN" network instead of "development"

When I run truffle migrate --reset and then truffle networks I see that the contracts were deployed to a network named UNKNOWN. I have this configuration: development: { host: "127.0.0.1&...
Rony Tesler's user avatar
1 vote
0 answers
133 views

How to install ganache Cli with the new update on chromeos?

i tried installing ganache cli on chromeos with npm but it keeps giving me this error: npm WARN deprecated [email protected]: ganache-cli is now ganache; visit https://trfl.io/g7 for details npm WARN ...
Claudio Ibe's user avatar
0 votes
1 answer
124 views

My contract is failing to deploy because my code is not reading what address I am deploying from. How can I get this contract to deploy?

from brownie import accounts, config, SimpleStorage def deploy_simple_storage(): account = accounts[0] simple_storage = SimpleStorage.deploy({"from: account"}) print(...
Gray Blanchard's user avatar
1 vote
3 answers
3k views

Error: Transaction's maxFeePerGas (0) is less than the block's baseFeePerGas (527514873)

Not Able to deploy to Ganache- Local chain, I have tried using func from Web3.eth , tried to import GasNowStrategy, Redownload the ganache as well and also tried to copy exact same code from GIT. ...
dheeraj borde's user avatar
0 votes
1 answer
82 views

Contract Development: How can I run an entire folder of scripts through Brownie?

I am trying to run my "deploy.py" file, and I was having trouble just deploying that at first, however, I figured that out. Is there a way that I can run every script under a certain folder ...
Gray Blanchard's user avatar
1 vote
1 answer
543 views

Brownie testing for reverted transactions does not work with pytest.raises() or brownie.reverts()

disclaimer: this is a duplicate from https://stackoverflow.com/questions/71126128/ I couldn't find out how to move the question, so I copied it here. Issue description: Brownie tests containing either ...
Black Pepperz's user avatar
0 votes
1 answer
335 views

Brownie test skips over a function

So I wanted to test my lottery contract and python scripts. I have three functions namely test_get_entrance_fee() , test_cant_enter_unless_started() and can_start_and_enter_lottery() Out of these ...
binoy john's user avatar
5 votes
1 answer
228 views

Is it possible to fork multiple blockchains at the same time for testing smart contracts?

I am trying to fork ethereum, polygon, and arbitrum at the same time. I tried to use ganache-cli specifying different ports for each chain but it does not seem to grab the chain data when I use a ...
Prox Ima's user avatar
0 votes
1 answer
2k 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 "...
CJ_12321's user avatar
1 vote
0 answers
151 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 ...
Sky's user avatar
  • 2,204
1 vote
1 answer
623 views

Ganache-cli Not Working properly WSL 2

I installed npm install -g ganache-cli on my WSL, but when I entered ganache-cli, it is showing me this error. Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:...
Victor's user avatar
  • 51
0 votes
1 answer
307 views

How to run Truffle Solidity tests in Gitlab CI?

Here is my .gitlab-ci.yml file, inspired by @GrandFleet's answer: image: node:latest cache: paths: - node_modules/ stages: - test test_async: stage: test services: - trufflesuite/...
Benjamin Azoulay's user avatar
1 vote
0 answers
97 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(&...
alexis's user avatar
  • 11
0 votes
1 answer
778 views

Ganache-Cli Error: Digital Envelope Routines Unsupported

When running the command ganache-cli in Git Bash, I get the following error. I have already installed Truffle and Ganache-Cli, and I've even tried on Powershell and the Windows command prompt (all ...
Wolfizzy's user avatar
  • 117
1 vote
2 answers
824 views

ganache-cli command not found

I tried installing ganache-cli with yarn. Even though yarn has successfully installed ganache-cli, I bash can't find the ganache-cli. smakbar@OMEN:~/cryptoCurrencies/web3$ yarn global add ganache-cli ...
Syed Muhammad Akbar's user avatar
1 vote
1 answer
796 views

How to add polygon fork network to brownie with correct chain-id

I want to add a forked network to brownie. If i do it like this: brownie networks add development polygon-main-fork-dev cmd=ganache-cli host=http://127.0.0.1 chainid=137 fork='https://polygon-mainnet....
Egirus Ornila's user avatar
0 votes
1 answer
1k views

TypeError: this._deployData.startsWith is not a function

I'm trying to deploy my smart contract that compiled without any problem and stored all the compiled data in two separate files. Then I'm requiring the ABI and bytecode and tries to deploy it. I get ...
Adil Nehal's user avatar
0 votes
0 answers
150 views

Cannot run the script through Brownie 'deploy.py' [duplicate]

I've been following the amazing tutorial on Blockchain/Python/Solidity and I'm stuck on the first steps of using Brownie. I'm operating on Windows 10, I have pipx, yarn and ganache-cli installed as ...
Anne CHRETIEN's user avatar
0 votes
1 answer
57 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 ...
Anonymous's user avatar
  • 287
0 votes
1 answer
200 views

Ethereum fork on Ganache: ran out of gas

what I'm trying to do is to fork the Ethereum Mainnet on my local ganache blockchain in order to interact with smart contract like Uniswap on my local machine. I forked the Ethereum network using ...
xcsob's user avatar
  • 157
0 votes
0 answers
780 views

How do I set initial supply for a ERC-1155?

In my smart contract I set 2 different token types: uint256 public constant COIN = 0; uint256 public constant OBJECT_NFT = 1; And my constructor has the initial mint for a specific address, but when ...
Iván Javier Londoño Rueda's user avatar