Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

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

Truffle and Ganache - do I need to set the same gas-price and gas-limit in both of them?

Or can I set different values? If I can set different values, then how will they be used in the system (i.e., what gas-price and gas-limit will apply in every transaction that I execute)? Here is my ...
0
votes
3answers
1k views

Ganache get the mnemonic of all accounts

When I install the Ganache a mnemonic is shown at the user interface. I think that the mnemonic which is shown in Ganache UI is for first account (account[0]). As a test I open the MetaMask select ...
0
votes
1answer
1k views

How to synchronise Ganache-CLI accounts with Ganache-UI?

When I launch ganache-cli for Port 7545, it will create 10 accounts by default. ganache-cli -p 7545 However, when I then open the Ganache-Desktop-App, it will show different accounts and the ...
0
votes
1answer
194 views

Creating workspace kind in ganache-cli

I am presently developing a Dapp and I am now trying to deploy it on cloud. So what I do is create an EC2 instance and drop all my code there. Then I install ganache-cli there and before on my local ...
0
votes
1answer
407 views

the tx doesn't have the correct nonce. account has nonce of: 12 tx has nonce of: 3 - Ganache

I am trying to run my simple contract with different parameters (in the form of encoded signatures) and intends to put multiple transaction into ONE block. If I set Ganache GUI with automine option, ...
0
votes
3answers
2k 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
2answers
248 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
2answers
695 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 │ ...
0
votes
1answer
265 views

Can't connect Android app to Ganache using retrofit

I'm have deployed contracts on ethereum blockchain. I have ganache running on server I'm tring to connect to it from android with this code: private BlockChainService() { Retrofit retrofit =...
0
votes
2answers
941 views

web3.utils.fromWei(web3.eth.getBalance(web3.eth.coinbase), 'ether').toNumber() gives error

web3.utils.fromWei(web3.eth.getBalance(web3.eth.coinbase), 'ether').toNumber() gives this error: > /usr/local/lib/node_modules/truffle/build/cli.bundled.js:369506 > throw new Error('...
0
votes
3answers
53 views

How I add Security to the smart contract?

I deployed this contract and also interacted with it using ganache. pragma solidity ^0.4.0; contract Counter { int private count = 0; function incrementCounter() public { ...
0
votes
2answers
1k views

Viewing Tokens on Ganache or an alternative

I'm currently working with the truffle suite and so am using ganache as my test blockchain. Is there something I can do with it or with a similar product to see token balances?
0
votes
1answer
388 views

Can I edit genesis.json file of ganache

I want to configure ganache for using proof of authorisation consensus mechanism instead of using proof of work. I want to edit genesis.json file for the same. I want to know where ganache stores its ...
0
votes
1answer
17 views

Truffle doesn't see the smart contract deployed on ganache

etherjs (5.0) is used to deployed a smart contract Hello.sol. Here is the js code (truffle 5.1.52/ganache CLI 6.12.1): import { ContractFactory, ethers } from "ethers"; let privateKey = ...
0
votes
1answer
47 views

Deployed contract address in Truffle does not match Ganache

I have truffle set up with Ganache. I am running tests on my solidity contract that involve sending ether to the contract and withdrawing it from the contract. Funny thing is my tests are PASSING, but ...
0
votes
1answer
50 views

ReferenceError: cannot access 'CONTRACT' before initialization

I'm trying to test a single smart contract (PCE_Contract.sol) with (PCE_Contract_test.js) using Truffle. When I run Truffle test, console output is : ReferenceError: Cannot access 'PCE_Contract' ...
0
votes
1answer
20 views

Need Some Basic Information related Ethereum [closed]

I'm newbie to block chaining and need help related truffle and related tools.... Q. Whats difference between truffle and ganache? Q1. Is truffle/Ganache(Don't know difference) is server side EVM, I ...
0
votes
1answer
61 views

Why is truffle migration failing to deploy contracts? “cannot read options of undefined”

I am trying to deploy a local version of SushiSwap on a local test Ethereum chain. I am using Ganache and Truffle to deploy the smart contracts locally. When I run truffle migrate and attempt to ...
0
votes
1answer
17 views

Modify storage in Ganache or BuidlerEVM?

I have an orchestrated contract with a function that can only be called by another contract. While struggling to find an elegant solution for writing a unit test, I realised that I could circumvent ...
0
votes
1answer
117 views

Connect web3.py with Ganache

I am new to this. So, how do I connect web3.py with Ganache. I've got Ganache up and running, smart contract deployed. I would like to interact with it from, lets say, a python shell. So, this is what ...
0
votes
1answer
24 views

How can i create more that one node for test purposes?

I really need to have more than one node to test my smart contract. I'm using remix and i also installed ganache, however, ganache doesn't allow me to have more than one node as I hoped for... I have ...
0
votes
1answer
34 views

Reproducing a Ganache Server across multiple computers

There are multiple developers on the team and it seems as though we all want to be working on a specific test network with specific public and private keys with a specific number of users who all have ...
0
votes
1answer
33 views

Error: while migrating Event: invalid address (arg=“benificiaryAddress”, coderType=“address”, value=undefined) [closed]

let Event = artifacts.require("./Event.sol"); const field= { nameOfEvent : "Music", ticketCount : 100, ticketCharge :10000, durationInMinute :1200 } module....
0
votes
1answer
160 views

What are the accounts generated by Truffle and Ganache? How is the Truffle migration done eactly?

I have a few question regarding Truffle, Ganache, and testing: When I execute truffle develop and get 10 accounts and 10 private keys, do those represent my accounts in my wallet or other users? For ...
0
votes
1answer
24 views

Ganache, Truffle, Metamask, and Geth [closed]

Can someone please explain the uses of these things and how these things are different or similar to each other, and how and when they can be used interchangeably?
0
votes
1answer
25 views

Limit the amount of times a smart contract can receive ether

How would I set a limit to the amount of people who could send ether to a contract? I can't find anything on google or youtube. Ideally the contract would stop taking inputs after 2(or however many) ...
0
votes
1answer
75 views

Metamask not returning the current address

I am using web3.eth.getcoinbase() function to get the address of the current account but instead, it returns null. Can someone help me with this? This is the code web3.eth.getCoinbase(function(err, ...
0
votes
1answer
47 views

Security flaws in a simple smart contract

I developed a simple smart contract to store two privacy preferences for a user. I am testing and evaluating this contract on a private blockchain via Ganache. I am currently validating the security ...
0
votes
1answer
22 views

Web3 call should return different result based on time passed

I am experiencing a weird issue. I am building a DApp where I want the new season of the game to start every 5 minutes (for testing purposes). However, web3 call returns old data, seems that it cached ...
0
votes
1answer
57 views

“VM Exception while processing transaction: invalid opcode” only with Byzantium hardfork

i'm testing my Smart Contract with Truffle and Ganache, everything works fine while using hadfork version "Petersburg", but when i switch to Byzantium i receive this error while truffle performs ...
0
votes
1answer
76 views

Truffle Test: Setting blockTime

I'm using Truffle and I want to increase the blocktime to mimic that of the mainnet when i run my tests. As i understand it, Truffle has already instantiated a web3 instance that's ready to use so i ...
0
votes
2answers
58 views

Create fastest possible localhost Ethereum test net

Is there an Ethereum test blockchain (similar to Ganache) which prioritises calculating transactions and creating a local blockchain 'db' as quickly as possible? Requirements: - Calculate ...
0
votes
1answer
368 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 ...
0
votes
1answer
377 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
0
votes
1answer
230 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
1answer
216 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....
0
votes
1answer
378 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
221 views

problem of call() returns null

contract permission{ struct transaction { address payable sender; address receiver; string datatype; Status status; } function getTransactionCount() public view ...
0
votes
1answer
90 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
1answer
37 views

Monitor transactions on private chain

I have a consortium chain (I have access to all machines where the nodes are running, but can't stop or restart them), and want to monitor what's happening on a high level. Similar to what ganache ...
0
votes
2answers
2k views

Truffle compile and migrate not working

I have a geth node running on my laptop. This is the command I used to start geth. geth --port 4321 --networkid 1234 --datadir=./dataDir --rpc --rpcport 8543 --rpcaddr 127.0.0.1 --rpcapi "eth,net,...
0
votes
1answer
591 views

Ganache provider not working with web3

I am trying to run a test script for my smart contract but ganache provider is not being accepted by web3 here is my code. const assert = require('assert'); const ganache = require('ganache-cli');...
0
votes
1answer
214 views

Error generating new account with Web3j

Im using the Web3j library to make transactions with my blockchain (Ganache). I have a method that instantiate a Web3j object and im trying to generate a new account with the given String url = "...
0
votes
1answer
361 views

Truffle and Ganache-cli test case fails

So I have this setup : truffle and ganache-cli I'm sending some ether to my contract, here is the related part of my contract: mapping(address => uint256) public balanceOf; function () ...
0
votes
1answer
132 views

Meta Mask - Breaking Change and Ganache

I have seen the announcement about the privacy changes that Meta Mask has made about no longer injecting Web3. And the article post they made gave a snip of code to include to request Web3 to be ...
0
votes
1answer
461 views

Remix IDE + Ganache vs Truffle + Ganache

I have an issue migrating a smart contract from Truffle into Ganache. However, when I run the same smart contract from Remix IDE via MetaMask into Ganache, everything works fine. To bypass the ...
0
votes
1answer
338 views

How to use Ganache, Remix IDE, MetaMask, and Web3js without Truffle

I am having an issue migrating a contract using Oraclize API to Ganache from Truffle. However, everything is working fine when running the contract from Remix IDE via MetaMask. As I want to write the ...
0
votes
3answers
2k views

Cannot connect ganache-cli to metamask

I am trying to follow the truffle pet shop tutorial. But failed to connect metamask with ganache-cli I ran ganache-cli in the console and changed the rpc url to http://127.0.0.1:8545 But the addresses ...
0
votes
1answer
231 views

Solidity contract runs on Ganache but gives runtime errors on Geth

I have a really simple contract. The tests run great on Ganache, but on Geth I get strange runtime errors. Solidity contract: pragma solidity ^0.4.17; contract SimpleStorage { mapping(address =&...
0
votes
1answer
270 views

Getting error in the contract code “please check your gas amount”

I am getting this error: Error: The contract code couldn't be stored, please check your gas amount. This is when I am importing one extra contract with the name of TimedCrowdsale from ...

1
4
5
6 7 8