Questions tagged [ganache]

Ganache, formerly known as TestRPC, is a command line application and GUI for Ethereum blockchain development used to run local tests, execute commands, and inspect state while controlling how the chain operates.

Ganache enables developers to quickly fire up a personal Ethereum blockchain which can be used to run tests, execute commands, and inspect state while controlling how the chain operates.

The GUI can be downloaded at https://truffleframework.com/ganache and the CLI via npm install ganache-cli -g or yarn add ganche-cli -g.

For ganache-cli documentation see https://github.com/trufflesuite/ganache-cli

317 questions
4
votes
2 answers

Truffle init not creating Migration.sol file

Output for truffle version command: "Truffle v5.5.27 (core: 5.5.27) Ganache v7.4.0 Solidity - 0.8.16 (solc-js) Node v16.16.0 Web3.js v1.7.4" truffle init does give a success message as below "Init successful, sweet! Try our scaffold commands to get…
Prithvi Patil
  • 41
  • 1
  • 4
4
votes
1 answer

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

Issue description: Brownie tests containing either pytest.raises(exceptions.VirtualMachineError) or brownie.reverts() producing an error, when the request by design fails (is reverted). On…
4
votes
1 answer

When is tx.wait(1) required?

I'm new to programming and currently following a brownie tutorial. While interacting with smart contracts, my tutor puts a tx.wait(1) after every transaction that requires a state change of the contract. I'm guessing tx.wait(1) means that we tell…
Navraj Sharma
  • 43
  • 1
  • 1
  • 5
4
votes
2 answers

How to fix "the method txpool_inspect does not exist/is not available"

I'm having trouble getting the python function web3.geth.txpool.inspect() to work. I've tried using a geth server from the command line, from the ethereum/client-go container, and from the trufflesuite/ganache-cli:v6.7.0 container. In every case, I…
rotten
  • 1,580
  • 19
  • 25
4
votes
2 answers

Truffle/Ganache: is there a way to set a deployment address?

I'm currently developing a dapp in Solidity and want to frequently test it locally along with the updates - so I don't really want to redeploy it everytime to a test net. However, everytime I deploy it, the address the smart contract is deployed to…
Thanh-Quy Nguyen
  • 2,995
  • 7
  • 30
  • 46
3
votes
4 answers

Python Web3 Ganache - Traceback error on BuildTransaction

I am going through the freeCodeCamp course on YouTube and have caught an error regarding when I run. As I am trying to build a transaction into Ganache. I see in Ganache logs that there is activity as well. First time posting, so let me know what…
Justin Cho
  • 31
  • 2
3
votes
2 answers

Error when trying to deploy standard OpenZeppelin ERC777 contract to ganache-cli using the brownie framework

I am familiarizing myself with smart contract development using the brownie framework and solidity. To start of I was using the brownie console to deploy some standard OpenZeppelin token contracts. I did this by copying the code right from their…
Andre
  • 41
  • 1
3
votes
0 answers

Truffle test doesn't seem to finish before "succeeding", and doesn't wait for transactionHash of a sent tx

Quick problem I've been slamming my head against since last night, My truffle (v5.2.3) test file performs two (2) tests, that serially call() then actually send a transaction to make persistent changes on my smart contract's storage. These tests are…
Dimitris Sfounis
  • 2,400
  • 4
  • 31
  • 46
3
votes
2 answers

How to interact with OpenZeppelin proxy contracts from Truffle console?

I cannot figure out how to use @truffle/contract to interact with contracts deployed by package @openzeppelin/truffle-upgrades (ProxyAdmin and AdminUpgradeabilityProxy). I have deployed my contracts to Ganache: Deploying 'MetaToken' …
kivi_o
  • 103
  • 1
  • 9
3
votes
2 answers

sending signTransaction with web3.js. but I can't confirm this transaction in ganache

I want to put data in rawTransaction and send it to the smart contact of the ganache local node. By the way, the raw transaction I made with the data was created, but I can't see the transaction on ganache. Why did you do that? const Web3 =…
yuhatown
  • 33
  • 1
  • 4
3
votes
1 answer

How can I mint test Dai using local host

While I have be successful in minting test Dai using Compound's exchange interface, I have been having some problems when it comes to using Ganache and my local machine. When attempting to mint, I have the following script (which is also posted from…
Brennan
  • 355
  • 1
  • 5
  • 10
3
votes
0 answers

uint256 value is not exactly same that i initialised

I deployed a smart contract includes a state uint256 value uint256 public cost=1000000000000000000;. But when, after deploy, i see the storage of that smart contract value cost:uint1441171407640000. Why both are not equal together. Contract state…
Alireza
  • 227
  • 1
  • 11
3
votes
0 answers

After running truffle unbox react getting error

After first initialization of running truffle compile then truffle unbox react getting error Unhandled Rejection (Error): This contract object doesn't have address set yet, please set an address first. I am trying to install a react dapp so i can…
Elisha Day
  • 43
  • 1
3
votes
1 answer

How to fix "Unknown network "ganache". See your Truffle configuration file for available networks."

I'm trying to deploy a contract to rinkeby. I'm using the following command: $ truffle migrate --networks rinkeby Compiling your contracts... =========================== > Compiling ./contracts/Migrations.sol > Compiling ./contracts/Voting.sol >…
ErickAgrazal
  • 83
  • 1
  • 9
3
votes
1 answer

Unit test error with mocha: Timeout of 20000ms exceeded

I'm getting a timeout error when I try to send the contract to Ganache. My code is as follows, const assert = require('assert'); const ganache = require('ganache-cli'); const Web3 = require('web3'); const web3 = new Web3(ganache.provider()); const…
cuser
  • 432
  • 1
  • 5
  • 13
1
2
3
21 22