Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 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
13 views

input from second form won't display [closed]

The project is to change someone's name, and I have two forms for two names. When I run the code in solidity, I can change the names, no problem. When I run it with ganache, the name change in the ...
0
votes
2answers
15 views

Deploying App on Ropsten or any Test Network

I have a web3.js application which uses truffle and interacts with smart contracts deployed on Ganache. How do I deploy my smart contract on a Test Network and interact with it through my application?
1
vote
1answer
18 views

Accessing contract functions from web3 and javascript

I have deployed a contract in a private blockchain using remix and ganache. Now I want to interact with it trough web3 and the console from my browser, but I'm not managing to interact with the ...
0
votes
1answer
16 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
16 views

linking form submission to smart contract

I have a smart contract that sends x ether to an address. I have an html page that has a form for the address, and the amount to be sent. Theoretically it should interface with the smart contract. ...
0
votes
1answer
19 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
33 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
33 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
0answers
7 views

Failed to get events from kovan testnet. Same code working in ganache testnet

I'm unable to get events from kovan testnet. The same code is working with ganache blockchain, but when using kovan testnet. I'm not getting any response. Can anyone tell me what I have done wrong?. I'...
0
votes
1answer
14 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
17 views

Out of Gas when using Web3py

I have a contract that I am trying to deploy using Web3PY that is failing with: VM Exception while processing transaction: out of gas. It deploys with no errors when using Web3 on node. I am running ...
0
votes
1answer
56 views

Web3 is not connecting to metamask. TypeError: Null object returned to account

I am currently following the tutorial in Dapp University YouTube channel where I am coding my own ERC-20 token https://www.youtube.com/watch?v=XdKv5uwEk5A&t=21611s. At 5:51:00 onwards you can see ...
0
votes
1answer
19 views

How to get block size and block mining time while using ganache and truffle

I am using truffle framework and Ganache (GUI) as emulator. I want to know the size of the generated block. Also I want to know the time required to mine/generate/create a block after the command. I ...
1
vote
0answers
26 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 ...
0
votes
1answer
16 views

Transaction response doesn't contain “receipt” value

i'm doing this send function let result = await myContract.methods.myMethod().send({from: account}); console.log("result:", result); using web3.js ^1.2.2 on testRPC with Ganache, hardfork Byzantium, ...
0
votes
1answer
37 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 ...
1
vote
1answer
21 views

Can't find address in abi encoded data of event

I have an event with the signature Event(address, uint256, string) which my smart contract emit from time to time. I am testing said contract on a ganache test net where when the Ganache picks up ...
0
votes
1answer
17 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 ...
2
votes
1answer
20 views

How to connect local ganache node with epirus

I tried apirus to connect to local ganache node. Ganache node is running on localhost:7545. git clone https://github.com/blk-io/epirus-free.git cd epirus-free docker-compose pull NODE_ENDPOINT=http:/...
1
vote
1answer
17 views

Is it fine to use Ganache in a staging environment?

We are currently using Rinkeby in our staging environment, but planning to stop using it cause it doesn't make sense as our application will communicate with a private Ethereum network when it goes to ...
1
vote
0answers
33 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?
0
votes
0answers
28 views

Is it possible to use ganache blockchain when I deploy my web app in heroku? or should I deploy the contract first to a test network?

const web3 = new Web3( new Web3.providers.HttpProvider( "https://kovan.infura.io/v3/INFURA_KEY" ) ); const abi = JSON.parse( '[ { "constant": false, "inputs": [ { "internalType": "string", "...
1
vote
1answer
28 views

Testing solidity transfer method not transferring tokens

I have this solidity contract: contract Token { mapping(address => uint256) public balanceOf; event Transfer( address indexed _from, address indexed _to, uint256 _value ); ...
1
vote
2answers
49 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 ...
0
votes
0answers
36 views

Web3j and Ganache stack underflow error

I'm experiencing the error "Error processing transaction request: VM Exception while processing transaction: stack underflow" basically with any contract. I'm using Ganache v2.1.2 and Web3j 4.5.15. ...
0
votes
0answers
53 views

Truffle revert when deploying contract

solidity newbie here working on moving from remix to truffle suite. I have a contract that worked fine on remix but is raising the following error message when attempting to deploy to local test chain ...
2
votes
1answer
57 views

Signing transactions with Ledger Nano S on Ganache with Metamask

I am trying to sign transactions and move funds on a private Ethereum Blockchain with my Ledger Nano S on MetaMask. So far I have tried to do so in Ganache and via blockchain setup via custom RPC. ...
1
vote
2answers
55 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 ...
0
votes
1answer
45 views

Importing OpenZeppelin loads all node_modules contracts into Ganache

I install OpenZeppelin's contracts npm install @openzeppelin/contracts Create a contract: pragma solidity ^0.5.0; import "@openzeppelin/contracts/token/ERC20/ERC20Mintable.sol"; contract NewCoin ...
1
vote
0answers
28 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
40 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 ...
0
votes
1answer
13 views

How of should I migrate my Smart Contract?

I am developing a scraper which scrapes data and puts it on ethereum blockchain(ganache for dev) every week. So as to put this data onto the blockchain should I migrate my smart contract each time I ...
2
votes
1answer
27 views

Is gas used during truffle tests on ganache the same as main net?

I am testing the amount of gas used for my contract functions using Truffle and Ganache CLI. Does anyone know if I can assume that the gas usage reported during my tests will be an accurate ...
1
vote
1answer
91 views

Ganache: out-of-gas during deployment

I have a bunch of contracts which deploy just fine. Deployment of one of the contracts, XBRNetwork takes exactly 5418911 gas - no problems with that. However, once I add another trivial (public) ...
-2
votes
2answers
67 views

Can I make a proper website by using ganache and truffle? Like maybe abc.com?

I have developed a voting system usinh dapp that runs on local host. It uses accounts from ganache and metamask for transactions of votes. Now if i want to buy a domain and make the thing work, is it ...
0
votes
0answers
59 views

Web3.py Could not transact with/call contract function, is contract deployed correctly and chain synced?

I am trying to call a contract function deployed in Ganache. I am pretty sure the contract is deployed because I can transact() and work with other functions. But when I call() it, I get this error: ...
1
vote
1answer
30 views

How to send transaction using web3 contract instance from address which is not a node's account

I succeeded creating transaction from node's account(created by ganache) to a contract using web3.js . const contract = new web3.eth.Contract(abi, contractAddress, { from: from, gasPrice: ...
0
votes
1answer
91 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
47 views

Ganache become disconnected after some hours

I am running my program to deploy thousand of contracts and millions of transaction to interact with them, which definitely need a lot of hours. But, when i let my program running during night (...
2
votes
2answers
125 views

Ganache Processing becomes very slow (with Automining Option) after consecutive thousands transactions

I am trying to deploy thousands of contracts on Ganache GUI. At first, it process all transactions very fast (deploy contracts and transactions for calling setters functions) . After some transactions,...
2
votes
1answer
93 views

Does ganache-cli support istanbul hardfork?

I am trying to run ganache-cli with istanbul --hardfork, but I am having following error: Error: Hardfork istanbul not set as supported in supportedHardforks $ ganache-cli --version Ganache CLI v6.4....
0
votes
0answers
91 views

Error: Returned values aren't valid, did it run Out of Gas? during deployment of huge number of contracts

I am trying to deploy very large number of contracts (more than 300 thousands) with automine option at Ganache GUI .. Is it possible to do such experiments ? when i want to deploy such huge number of ...
0
votes
1answer
189 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, ...
1
vote
2answers
144 views

How to insert multiple transactions into One Block in Ganache GUI

Is it possible to enable Ganache GUI to put multiple transactions into ONE block ?. The details about Why i need this thing, is given below; I am going to test Transaction Order Dependence (TOD) ...
1
vote
1answer
49 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[...
0
votes
0answers
31 views

No response from live networks except ganache when interacting with truffle-contract

I am developing a Web3 app for a private Ethereum network. Throughout the development I used ganache-cli and now I wanted to test in the private live network. I can successfully interact with the ...
1
vote
1answer
80 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
41 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
46 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
2 3 4 5
7