Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

Filter by
Sorted by
Tagged with
1
vote
0answers
36 views

Testing response times using Ganache

If you want to simulate repsonse time of your smart contract, how realisitc is it to use ganache? I'm thinking that in a live network, ropsten for example, there would be a lot more transactions ...
1
vote
0answers
62 views

How to deploy blockchain app in heroku

I want to deploy my blockchain app in heroku and i just want to use ganache as my blockchain network. is that possible?
1
vote
2answers
144 views

Accessing database in solidity

I am developing a voting application using blockchain (ganache). So basically i am registering the candidates by a web form and storing the data in phpmyadmin database. Now i want to access this data ...
1
vote
3answers
134 views

Can the mapping storage change after contract deployment?

I am beginner in mapping.I work on Truffle and Ganache. I deploy the following contract: pragma solidity ^0.5.12; contract customerFinder{ mapping(uint256 => address payable) public ...
1
vote
0answers
54 views

Does ganache only store the most recent transaction's events?

I can log them to the console in each transaction with subscribe, but the ganache UI only ever shows the latest one, as does web3.eth.getPastLogs.
1
vote
1answer
55 views

ganache-cli 127.0.0.1:8080 bad request

Alright, it looks like everything in the terminals is running well. The contract looks to be deployed successfully. It seems like there's supposed to be an API or something I can access via looking up ...
1
vote
1answer
107 views

I got this error during truffle testing. AssertionError: it returns true: expected { Object (tx, receipt, …) } to equal true

DappToken.sol function transfer(address _to, uint256 _value) public returns (bool success){ require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] -= _value; balanceOf[...
1
vote
1answer
130 views

web3py error while interacting with smart contract 'message': 'execution error: revert', 'code': -32000

When I try to interact with the contract with web3.py, I am using ganache, I get the completely useless error message: ValueError: {'message': 'execution error: revert', 'code': -32000, ... , '...
1
vote
0answers
60 views

An error occurred while running C:\Users\path marketplace1\marketplace1\truffle-config.js! Did you forget to `npm install` your project?

I am getting this error when I try to add the truffle-config file to my project in ganache. What to do?
1
vote
0answers
48 views

How to interact with smart contracts on Ganache from Express app

How can I interact with the smart contract on ganache from my express app using Web3.js Any Tutorials?
1
vote
0answers
320 views

Ganache is not showing any events

I have a contract method which emits events but ganache seems not to catch any events. I say this because when I deploy my contract on ropsten the events are being caught fine but only in ganache I ...
1
vote
1answer
25 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 ...
1
vote
1answer
402 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 ...
1
vote
0answers
117 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 ...
1
vote
0answers
26 views

When does 'truffle deploy' yield a different output every time?

truffle deploy (aka truffle migrate) is documented here. I'm doing the following sequence: Starting a local Ganache node Running truffle deploy I'd expect this sequence to yield the exact same ...
1
vote
1answer
112 views

Unable to install Mocha Web3 and Ganache-cli

I have been trying to install mocha,Web3 and ganache all through one command but I am facing an issue while installing can someone help me in sorting our this error. Quick response will be appreciated ...
1
vote
1answer
160 views

Cannot deploy contract

I'm having difficulty deploying a solc-compiled contract to ganache test network using web3. package.json { "name": "smartinvoice", "version": "1.0.0", "description": "", "main": "index.js", ...
1
vote
1answer
207 views

Can't call function from contract using web3.js due to gas issue

I'm building a smart contract and dapp using ganache and web3.js. In my smart contract I have a function (named "add_pilot") which gets 4 parameters and add them to a mapping. It looks like this: ...
1
vote
0answers
170 views

Error: Cannot create instance of X; no code at address

Having a little issue. I have deployed a Mock ERC20 contract on development network like so: const ERC20Mock = artifacts.require("ERC20Mock"); module.exports = async function(deployer, network, ...
1
vote
1answer
543 views

Cannot connect to ganache-cli with web3 and nodejs

from package.json: "ganache-cli": "^6.3.0", "web3": "^1.0.0-beta.41", in my createContract.js const Web3 = require("web3"); const ganache = require("ganache-cli"); console.log('ganache.provider :', ...
1
vote
1answer
83 views

Processing gas cost on a sidechain

I am developing a sidechain that will store data and I want to evaluate the processing of this data in the ethereum network to get the cost in gas. I'm going to develop a smart contract that will ...
1
vote
2answers
2k views

ALERT: [ethjs-rpc] rpc error with payload

I am trying to create transaction local blockchain using ganache on When i confirm the transaction i get the error as "{"id":4818399857527,"jsonrpc":"2.0","params":..", please refer screenshot for ...
1
vote
0answers
37 views

access remix addresses within contact

I want to write tests for my simple solidity contract and one of the tests I have is to pass an address dynamically from remix or ganache-cli. Is there a way to access all other addresses from remix ...
1
vote
1answer
76 views

Truffle migrate ERC820Registry

I use Truffle and Ganache and I want to test some contracts that use the ERC820 Registry. I'm new to Truffle (and JavaScript in general) and I'm struggling to follow the instructions described in EIP-...
1
vote
1answer
83 views

Truffle fails to migrate an Oraclize contract into Ganache

I have a contract that is using Oraclize. When deploying the contract from the Remix IDE into Ganache/Ethereum-bridge via MetaMask, the contract is fully functional. However, when trying to migrate ...
1
vote
1answer
149 views

Simple Open Auction example - how to run it?

I'm trying to run Simple Open Auction, compiled successfully in Remix. I receive "Exception while processing transaction: revert" when I try to enter recipient account addresses from Ganache, or "...
1
vote
0answers
29 views

Trying to iterate through an array to send signed transactions results in one failure and one success

I'm trying to iterate through an array of address/key pairs and send a transaction from each one. When I do this on testrpc with an array of the account info for two different accounts, one ...
1
vote
1answer
285 views

Why doesn't my contract call create a new transaction in my ganache transaction section?

goes easy on me because I'm quite new to all of this stuff. So I've created a function which signs my transaction using web3js library and looks like this: signTx = async () => { const { ...
1
vote
1answer
203 views

Installing Ganache GUI on windows 8.1

How to install Ganache UI on windows 8.1 ? I downloaded from Official website but after downloading i am unable to install it on my machine. I tried to install it through power shell but facing ...
1
vote
0answers
62 views

Why do are the 'type' & 'removed' fields in receipt logs different between Ganache and Geth?

When I run a particular transaction and log the receipt, I am getting different results depending on if my EVM is Geth or Ganache. Specifically, Ganache returns receipt.logs[0].type: 'mined' while in ...
1
vote
1answer
171 views

Once i use selfdestruct(owner) then `Attempting to run transaction which calls a contract function, but recipient address is not a contract address`

How do I fix this? I've already tried truffle migrate --reset and/or deleting the .json files.
1
vote
0answers
109 views

How to deploy contract in Mist Browser connected to Ganache?

I connected Mist to my Private Ganache Blockchain, but when I try to deploy it it gives the following error: Returned Error: Method personal sign_Transaction not supported I can deploy contracts ...
1
vote
0answers
235 views

Remix - Contract A doesn't work anymore when I deploy contract B

I recently had to deploy my second contract on the local Ganache Blockchain (Windows) using http://remix.ethereum.org/. But every single time I deploy contract B after I deployed contract A, contract ...
1
vote
1answer
327 views

Uncaught TypeError: this._eth.sendTransaction is not a function

Hi I'm trying to make a voting module which the user can cast votes by pressing radio button. But when I run this error comes out. Uncaught TypeError: this._eth.sendTransaction is not a function ...
1
vote
1answer
748 views

Create Private blockchain network using ganache

I am working on Truffle framework for creating DApps. My Question is that,In ganache can I use my private blockchain network address instead of testrpc accounts.Suppose I use private blockchain ...
1
vote
0answers
321 views

Mocha timeout, not resolving promise of large array from method.mymethod.call()

I'm trying to test a contract getter method that returns a large array. I am testing using the web3 library in Mocha with ganache-cli provider. My contract deploys alright, but trying to call the ...
1
vote
0answers
45 views

Same Transaction is getting mined twice

I have a smart contract which generates a random number and compares it with the user's input to check if both are equals, and based on that it updates a mapping. But anyhow the same transaction is ...
1
vote
0answers
134 views

How can I import the Accounts from ganache-cli into Nethereum?

Is there a way to automatically load the Accounts created by ganache-li into a project which uses Nethereum?
1
vote
0answers
203 views

How can I watch my contract using Ganache testRPC?

I want to get the transaction hash + contract address ... using Ganache testRPC. since I don't have the option of using etherscan because testrpc of ganache use everything locally.
1
vote
1answer
154 views

Testing ethereum smart-contracts that work with oraclize

I'm new in Ethereum and I have a smart-contract that receive exchange rate from API through oraclize. But I have problems with testing my smart-contract. For testing I use truffle + ganache. Could ...
1
vote
0answers
422 views

Ganache Cli private network, all ethers on the network go to 0 after a while

I create a ganache cli and initialize my accounts to have ethers using ganache-cli -h "159.89.119.189" -a 3 -e "1000000000000000000000000000" --secure -u 0 -u 1 -u 2 -s 20 but after a couple of ...
1
vote
0answers
103 views

Truffle migrate hangs when I run ganache with the --db flag

From the command line, when I run the following command: ganache-cli --db ~/Documents/Ethereum/ --mnemonic "bride forest screen jazz injury grit rather seek also donate media mechanic" and I run "...
1
vote
0answers
427 views

“truffle migrate” running all migrations everytime

I have a very weird behavior happening whenever I run "truffle migrate". Ideally, as per the documentation, it states: This will run all migrations located within your project's migrations ...
1
vote
0answers
93 views

Using Ganache UI: Is there a way to find the names of the smart contracts?

I realize this might be a limitation of Ethereum blockchain itself, but I thought that once I migrated a contract to Ganache I would be able to see the names, methods and method arguments of the ...
1
vote
1answer
107 views

Unable to write data into blockchain - Ganache

I've this contract and web3js html GUI that's interacting with it. The contract is deployed in ganache at localhost 8545 and unable to write data into blockchain. SimpleStorage.sol - pragma ...
1
vote
0answers
225 views

Simple Bool Assignment runs out of Gas- can't figure out why?

I'm testing using Remix against web3 provider (Ganache). Here is my code: when "Startup = false" is uncommented, it runs out of gas. It works fine on Javascript VM in Remix, but not on Ganache ...
0
votes
1answer
386 views

Comparison of Metamask vs Ganache [closed]

I watched some videos about Metamask but I am so confused by it Metamask: To use the final application like the end user would. Based on that, what is the purpose of React then? What are the ...
0
votes
2answers
595 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
2answers
1k views

Metamask not returning current account address with web3js and ganache

How to return the address of my current account from Metamask? I have tried with web3.eth.getCoinbase() but this and metamask has two different address. web3.eth.getCoinbase() returns me the first ...
0
votes
3answers
100 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 2 3
4
5
8