Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

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

How can I debug a my Solidity smart contract with a GUI?

Is there any way to debug a Solidity smart contract with a GUI, like remix? How can I do it for both testnets and mainnet?
1
vote
1answer
17 views

Can the block number be set back in ganache?

I know about tools like ganache-time-traveler that let you advance the block number. But is it possible to go back to a lower value?
0
votes
1answer
14 views

What are the ways to call a smart contract function during development?

What are the ways to call a smart contract function during development using Truffle simulated VM with a GUI interface (like Remix or EtherScan offer)? I know I could use CLI options like Truffle ...
0
votes
0answers
28 views

Smart Contract is not working on Geth private network, while it does work on Ganache as well as Remix

I've only begun working with geth from last week and have faced the quite a challenge. I've written a smart contract and it works on remix (JavaScript VM) but somehow it does not work on my geth ...
0
votes
0answers
19 views

Can't create eth accounts on wifi by using ganache-cli@v7.0.0-beta.0

I was previously getting out of gas error which was resolved by following this issue. Now i installed ganache-cli@v7.0.0-beta.0 . It creates ethereum accounts on localhost if i write the following ...
0
votes
0answers
17 views

“Out of Gas” while transferring ethereum from account to contract

I am using ganache to create 10 ethereum accounts. I want to transfer ethereum from one account to a smart contract. I am doing this by writing two following smart contracts in solidity; pragma ...
0
votes
1answer
16 views

How DApp actually talks to Ganache ethereum node?

Both Metamask and web3.js seems to be enabling a DApp communicates to a remote ethereum node. There are a few different aspects to developing blockchain applications with Ethereum: Smart ...
1
vote
1answer
61 views

Issue with Ganche and Truffle with Metamask. Can't load token balance

I'm testing to create a token in Truffle; it compiles fine, but it won't load the balance of the token in to Metamask. I've set the connection correct: it does load the ETH balances of the Ganache ...
3
votes
0answers
27 views

`eth_getTransactionReceipt` returns the transaction hash not the receipt

I use sol-coverage in a truffle project. Ganache is my development blockchain. I have a lot of tests which end up doing more than a few thousand JSON RPC calls. Due to unbeknownst reasons, the ...
0
votes
2answers
52 views

Where web3.eth.accounts.create() creates new account?

I am using ganache which creates an ethereum blockchain with 10 accounts. The blockchain created by ganache is linked with truffle's pet-shop box using web3. I want to add a new account in that ...
0
votes
1answer
15 views

How to connect a NodeJS App to locally running Ganache

Most of the tutorials I have found so far connect a FrontEnd App (say, React) through the web3.js that gets injected by Metamask. I have been asked to produce an NodeJS App that connects to a ...
1
vote
1answer
21 views

Uncaught (in promise) Error: Contract has not been deployed to detected network (network/artifact mismatch)

The client side application always throws the above error. I have connected the ganache account(by copying the private key)also with the correct port number in Metamask extension as well as in the ...
2
votes
2answers
67 views

Ganache GUI installation error

node version v12.8.0,npm version 6.10.2 I followed the below steps to install the ganache GUI but I got the error $mkdir ~/ganache $git clone https://github.com/trufflesuite/ganache.git $npm install ...
1
vote
2answers
23 views

How do I specify the network ID in the config file when migrating/testing contracts on my local ganache?

So my issue is when I run the compile and then migrate commands everything goes smooth, then I try to test by running the truffle test command and it gives me an error saying 'Error: The network id ...
1
vote
2answers
47 views

Understanding ganache timestamps

Sometimes, when I use the ganache specific evm_increaseTime method and advance to the next block, the next timestamp is NOT: current timestamp + advanced time But instead: current timestamp + ...
0
votes
1answer
46 views

How to set allowUnlimitedContractSize in Ganache V2.1.0 with windows 10

while following this or this solution I found nowhere any file to make change for allowUnlimitedContractSize = true so my problem is same as in link but how I can change this in Ganache v 2.1.0
3
votes
0answers
38 views

Does 'estimateGas' behave the same on Ganache and on mainnet?

I noticed that estimateGas behavior in Ganache has changed: In version 6.4.1, it throws an exception if exceeding the gas-limit. In version 6.5.1, it returns the estimation even if exceeding the gas-...
2
votes
0answers
46 views

Android Studio And Ethereum?

how i can connect android studio application with Ganache? i'm trying to build an application on android (that is my Front end) with a Smart contract (Back end) on my private Blockchain (Ganache). it'...
0
votes
1answer
53 views

Confusion around Truffle, Ganache and Meta Mask

I am building a simple contract. In truffle when I give 'truffle develop' command, I get following information: On the Ganache, I have this: And finally on Meta Mask, I see this: here, Shikhar is ...
0
votes
0answers
15 views

Ganache does not show the transferred amount.but it shows theme in account section

as shown in the picture the amount of value which is transferred to contract is shown in the transaction section of Ganache. I mean it shows the amount which is transacted to the address. in the my ...
0
votes
0answers
16 views

Help etc20 ganache

Good morning, I can't solve the problem at all: Not possible to connect to the Web3 provider. Make sure the provider is running and a connection is open (via IPC or RPC) can anybody help me? I am ...
0
votes
1answer
31 views

i'm creating new account and when i get the balance for that account it returns 0 and cant do any transaction saying dont have enough funds

How to load funds/ether into newly created account. I'm using Ganache and Web3js var web3 = new Web3("HTTP://localhost:7545"); var privateAccount = await web3.Personal....
1
vote
1answer
48 views

Request to http://localhost:8545 from https website

I am building a website that should interact (from the browser, not back-end) with custom Ethereum nodes, including local, something like MyEtherWallet. I can connect to ganache http://localhost:8545 ...
0
votes
0answers
12 views

Getting error when importing, no error when using code in single file: Failed to execute 'postMessage' on 'Window'

I am trying to access the web3 object injected into my browser by Metamask. I am using custom rpc (). I can see my accounts and correct balances in Metamask. I have the following code: //web3.js ...
0
votes
1answer
12 views

Problem with loading my front end local host due to metamask

I have been trying this Dapp university tutorial online and after following it meticulously I've come across this problem. I suspect it's metamask as the video said if I get this loading message I ...
0
votes
0answers
145 views

web3.eth.getAccounts() returns empty array

I'm trying to get accounts like that: window.web3.eth.getAccounts( (error, accounts) => { console.log(accounts, error) } ); but it keeps returning an empty array. I'm running Ganache and I can ...
0
votes
0answers
35 views

How to fix? Tx nonce go out of sync when using multiple unit tests on the same contract under Ganache+Truffle

Here is my example contract (ignore the fact this could be pure, this is a simplified example and my real example is not a pure function, it changes state, but I can reproduce the bug with this simple ...
0
votes
1answer
22 views

Syntax Error when trying to run ganache-cli with node v6.14.3

My environment ganache-cli 6.4.4 node v6.14.3 Mac OS Terminal I run the following commands to install ganache-cli Aseems-MacBook-Pro:bdnd aseem$ nvm use v8.11.3 Aseems-MacBook-Pro:bdnd aseem$ npm ...
0
votes
2answers
25 views

Truffle error missmatch artifact

What does this means?network/artifact mismatch Contract has not been deployed to detected network but when i write truffle network i can see mine.
-1
votes
1answer
24 views

Truffle ganache error

I have this error~! Contract has not been deployed to detected network (network/artifact mismatch) Can you help me thank you!
0
votes
1answer
52 views

Getting Error:VM Exception while processing transaction: revert', 'code': -32000. when deploying to Ganache using Web3.py

I get the following error message: Getting Error:VM Exception while processing transaction: revert', 'code': -32000 I am connected to Ganache. Here is my code: import json from web3 import Web3 ...
0
votes
1answer
25 views

Web3 event listener - timing issue when immediately retrieving contract values

I'd like to be able to immediately get a struct value from a mapping after calling a function that updates the struct, however, when testing with Ganache, sometimes the event arrives to the listener ...
0
votes
1answer
48 views

Can I pass my mnemonic to ganache/ ganache-cli when it is starting up?

I am wondering if I can pass the mnemonic that I created using metamask to boot up my local ganache network so that I do not have to log out and login metamask with different mnemonic everytime for a ...
0
votes
1answer
19 views

“new” Solidity keyword deploying the “Factory” contract again instead of “MyContract”

I have been trying to develop a parent contract that will deploy other contracts on request with different parameters. I came across the "new" keyword which seemed like a perfect choice. But when I ...
0
votes
3answers
182 views

Can not install Ganache GUI on Ubuntu?

I am trying to install Ganache GUI on my ubuntu 18.04. I downloaded the Ganache-2.0.1.AppImage from the site. On the site it says that the package installs automatically when double clicked. But it is ...
0
votes
0answers
33 views

It is an error to execute ERC20 contract token using ganache / go-ethereum

I use go-ethereum.Error: nonce generation function failed or private key is invalid [Execution environment] ・node:11.6.0-alpine ・ganache-cli@6.3.0 Please tell the person who understands the cause. ...
2
votes
1answer
56 views

When do you use ganache-cli and when do you use ganache-core?

I have seen two usages over the internet 1. const ganache = require("ganache-cli"); web3.setProvider(ganache.provider()); 2. const ganache = require("ganache-core"); web3.setProvider(ganache....
0
votes
3answers
49 views

Solidity Compatibility Configuration

I am a cyber security analyst who is new to ethereum and working on a project to study crypto security. It's a series of 22 vulnerable smart contracts that you're supposed to exploit. For anyone who ...
1
vote
1answer
234 views

Web3 - Cannot read property 'clearSubscriptions' of undefined

While creating a web3 instance, and attempting to call setProvider with a valid provider (Ganache), I get a TypeError. TypeError: Cannot read property 'clearSubscriptions' of undefined Steps to ...
2
votes
2answers
74 views

Metamask injects one account in web3, but calls contracts using another account

Building a React app, MetaMask injects web3, I get accounts[0] from getAccounts(), then pass it to my contract functions together with other parameters. I want my modifiers to lock incoming function ...
1
vote
1answer
36 views

How to increase the number of test accounts?

I have encountered a problem where I need a large number of test accounts. How can I increase the number of test accounts from 10. Remix and ganache only give 10 accounts. I require more than that.
1
vote
1answer
94 views

openzeppelin,VM Exception while processing transaction: revert

using openzeppelin-solidity to create crowdsale. Then I use this statement to Buy Token: MyCrowdsaleInstance.sendTransaction({ from: purchaser[1], value: web3.utils.toWei("0.5", "ether"), ...
3
votes
1answer
107 views

Ganache + Truffle: how to deploy a contract without considering the gas

I am working with Ganache and Truffle. I am trying to deploy kind of a huge smart contract, but most of the functions in this smart contract are pre-prod functions, so I do not really worry about real-...
0
votes
0answers
55 views

Contract has no network id set, cannot lookup artifact data

I am using web3 v1.0.0-beta.37 and truffle contract for server.js configuration. I have defined two contracts FlightSuretyData.sol and FlightSuretyApp.sol FlightSuretyApp contract access functions ...
0
votes
1answer
140 views

problem of call() returns null

contract permission{ struct transaction { address payable sender; address receiver; string datatype; Status status; } function getTransactionCount() public view ...
1
vote
3answers
150 views

Increase block number on Ganache

How can we increase block.number on Ganache for testing purpose ? If not possible do you know an alternative like passing X fake transactions to artificially increase block.number. Or if we have to ...
1
vote
3answers
88 views

A single exception in Truffle test causes every other test cases to fail

I'm making test script for my contract and it looks likes contract('...', async () => { let token = null; before('deploy', async () => { token = await MyContract.new(...); })...
0
votes
2answers
106 views

web3 1.0 events never fire

First off, my setup. System: ArchLinux Ganache: v2.0.0 (correction, v1.3.1) Solidity: 0.5.8 web3: 1.0.0-beta.37 (anything higher than 37, contract wont deploy) Node: 'latest' Some background and ...
0
votes
1answer
35 views

Create a large number of contracts with different addresses

I'm developing a performance test where I check the time a gateway spends to find a contract in a blockchain. I'm using ganache-cli to simulate the blockchain, my doubts are: 1) Is it possible to ...
0
votes
2answers
336 views

Solc error invalid opcode, but works in truffle

I am trying to compile solidity code in solc(nodejs) but unsuccessful so far. I have created a sample app for demo. Here is sample's directory structure (node.js and truffle combined): │ app.js │ ...