Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

Filter by
Sorted by
Tagged with
1
vote
1answer
562 views

Error processing transaction request: sender doesn't have enough funds to send tx

In a Java project im testing the web3j library. there I have a method that generate a new account to the blockchain public String url = "http://localhost:7545/"; public Admin admin = Admin.build(new ...
1
vote
1answer
724 views

web3js - Promises - web3.eth.getAccounts()

Objective: Assign a global variable to the first indexed address returned in web3.eth.getAccounts(). I want this so I can use it in the rest of my code and simply reference a variable. Problem: ...
1
vote
1answer
537 views

Smart Contract to send ether

I have Solidity contract that is meant to send ether to someone. Unfortunately it's giving me a cryptic error message after I confirm the transaction in MetaMask. I'm testing on a local ethereum ...
1
vote
2answers
2k views

Is it possible to run multiple Ganache nodes for private test network?

I wonder if i can create my own private cluster as it can be done with Geth for development & test purposes : https://github.com/ethereum/go-ethereum/wiki/Setting-up-private-network-or-local-...
1
vote
1answer
964 views

Difference between `0x01` and `0x1` status code?

Sometimes when running Ganache I receive status code 0x01, sometimes 0x1. Should I treat both as successful executions?
1
vote
1answer
22 views

Truffle ganache fork

Suppose I have access to a full archive Node and I want to fork from a specific block using Ganache. Using ganache-cli, I can specify where to fork using the --fork parameter by passing it the Node ...
1
vote
2answers
382 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
3answers
164 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(...); })...
1
vote
1answer
613 views

Solidity Compiler won't upgrade

I updated to the latest version of Truffle using: npm uninstall -g truffle followed by: npm install -g truffle I verified this succeeded by doing: truffle --version and got this: You can ...
1
vote
1answer
337 views

Solidity test file reaches gas limit due to imports

I have a sol contract X.sol and a sol test file TestX.sol. X.sol is large: ~4m Gas after optimisation TextX.sol compiles, migrates and executes tests fine when just executing a single test - testY, ...
1
vote
1answer
54 views

Where goes eth cost in private chain

I have a private test blockchain with ganache. I deploy one contract and make a couple transactions. Looking at the ganache UI I realized that the first account haves a ether consume to make the ...
1
vote
2answers
511 views

How to set maximum block gas in ganache-cli

I'm running ganache-cli which seems to have a block gas maximum of around 6.5 million. All the research I've done about this question seems to provide answers of the user themselves setting the user ...
1
vote
1answer
470 views

Creation of test network using ganache

Can we reuse the values stored in the ganache test network which is running in the local machine, even if the terminal which is running ganache test network is closed or what are the possible ways to ...
1
vote
1answer
199 views

Out of gas in web3 but not Remix?

I have a test function: function test(uint[400] subscriptions, uint[400] subscriptionIndexes) public view returns (uint[4000], uint[4000], uint[400]) { uint[4000] memory postSenders; ...
1
vote
1answer
322 views

How do I access the owner's funds in the Truffle test environment?

I'm trying to test my simple coin-based contract in the Truffle test environment by sending funds to the first user's address. My understanding is that the contract is created (thereby calling the ...
1
vote
1answer
120 views

See the contract code in Meta Mask or/and Ganache

I have set up Ganache and Meta Mask on my browser and I have deployed a sample contract in it. Just follow the steps mentioned in https://truffleframework.com/tutorials/pet-shop. As far as I found ...
1
vote
1answer
422 views

Not displaying ether on Metamask on importing address from Ganache

I'm following PetShop tutorial, and everything works fine until Metamask came to the picture. I've restored vault using mnemonic, added RPC URLHTTP://127.0.0.1:7545, it displaying Private Network at ...
1
vote
2answers
773 views

Truffle test error: Cannot create instance of Vault; no code at address

I'm trying to make a simple test in Truffle using Ganache where I call a function from a smart contract instance. This component will create a Vault and return me its address. My truffle test does ...
1
vote
1answer
212 views

Is Geth a better client to begin with understanding ethereum world?

When developing a dapp, is Geth a better choice to start with for a beginner? I see there's other options which are ganache and truffle, but not so sure which one to begin with. I guess beginners ...
1
vote
1answer
970 views

JSONRPC error on sendSignedTransaction

I run ganache, truffle and metmask. If I run the code below I get an error on the this.web3.eth.sendSignedTransaction() function: EDIT: changed my code to the following.. Error remained the same ...
1
vote
1answer
20 views

Web3py didn't throw error(in Remix it did)

The contracts I used: EtherDelta(DEX) Freedomcoin(Token) Here is my logic: I use userA who deployed the two contracts to transfer 100Ether to userB, then userB invoke depositToken, however, as there ...
1
vote
1answer
15 views

Running test with multiple contract address on a local Ganache blockchain

I'm developing with Truffle and Ganache I have an standard ERC20 ABI that I import in my test file. it only has 3 optionals functions name, symbol and decimals. const Token = artifacts.require('./...
1
vote
1answer
36 views

How to find value of non-public state variable

I understand that public state variables automatically creates a getter function when deployed, its value can be accessed via the getter function. However, if a state variable is not public, how can ...
1
vote
1answer
61 views

MetaMask won't send txs on local dev chain

I'm running a local dev chain for development using Etherlime. When trying to interact with the chain using MetaMask, I get the following error: MetaMask - RPC Error: Error: [ethjs-rpc] rpc error with ...
1
vote
1answer
38 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 ...
1
vote
1answer
34 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 ...
1
vote
1answer
24 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
1answer
68 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
1answer
192 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) ...
1
vote
1answer
68 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: ...
1
vote
1answer
70 views

TxPool on Ganache

I started using Ganache to run Ethereum and tried via cURL the following: curl -X POST -d '{"jsonrpc":"2.0","method":"txpool_status","params":[],"id":1}' http://ip:port But I got the message: ...
1
vote
1answer
168 views

Connecting to a blockchain started with ganache-cli with Ganache GUI

I start a blockchain with ganache-cli, then I create a workspace in Ganache GUI the same seed phrase and port, but I keep getting this error in Ganache: I get and error this port is being used by ...
1
vote
2answers
893 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 ...
1
vote
1answer
219 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 ...
1
vote
1answer
114 views

Can ganache-cli connects to another ganache-cli?

Is it possible to create a private network using ganache-cli? Can a ganache-cli running on port 8545 connect to ganache-cli running on port 9545? Can we use ganache-cli as a node? Or it is a ...
1
vote
1answer
213 views

Dapp on Ganache and Truffle but… what about Remix?

My dapp runs well with Ganache and Truffle but how to deploy with Remix and connect the contract to web GUI without abi? I mean, i created a Dapp that runs really good on Ganache and i run the web ...
1
vote
1answer
141 views

Ganache-cli EADDRINUSE 127.0.0.1:8545 error?

when i start ganache-cli with command, it gives this error : ❯ ganache-cli Ganache CLI v6.4.1 (ganache-core: 2.5.3) Error: listen EADDRINUSE 127.0.0.1:8545 at Server.setupListenHandle [as ...
1
vote
1answer
177 views

Error when trying to open Ganache on Ubuntu: archive type not supported

After downloading a fresh copy of the latest Ganache and double click to run it, the following error is shown: archive type not supported Versions Ubuntu: 16 and 17 All Ganache versions: for ...
1
vote
1answer
71 views

How to test time-dependent contracts on the mainnet?

In Ganache, I use evm_mine to simulate the passage of time. Assuming block times are accurate enough, what are the best practices to test some contracts on the mainnet or a testnet which depend on ...
1
vote
1answer
643 views

How to find out the number of blocks in Ganache?

I have tested a contract on truffle using the command: truffle test I got following message: D:\Funding4\contracts>truffle test Compiling .\contracts\Funding4.sol... Compiling .\contracts\...
1
vote
1answer
118 views

How do I see how much gas a .call() transaction used in remix IDE connected to ganache-cli?

I've got remix connected to ganache-cli and I'm running some read-only transactions. I can't seem to figure out how to see how much gas those transactions used up? Any help would be great thanks!
1
vote
1answer
392 views

Connecting with existing ganache core server

I have a ganache-core server running at port 18545 (part of an npm app) How can I attach to it and see the transactions/blocks in that. I tried running ganache GUI and setting port number as 18545 in ...
1
vote
1answer
175 views

geth calling funtion from a different contract not working, ganache & remix works

I'm trying to call a contract function from another contract, using web3.js. When using ganache or remix everything works fine: web3.js returns the events fired and the gas used (33938 in this ...
1
vote
1answer
208 views

How do OpenZeppelin ERC721 tests pass?

I don't understand how the following test can pass. I tried it in my application and it fails. The entry point is the description 'when called by the owner'. In this function two test cases are ...
1
vote
0answers
72 views

UniswapV2 addLiquidityETH() reverting when trying to deploy to ganache locally

I'm trying to locally deploy a contract similar to sushiswap, but I keep getting a revert from addLiquidityETH(), no message other than VM Exception while processing transaction: revert //module....
1
vote
0answers
34 views

How to test your smart contract against currently existing ones on mainnet locally using Truffle?

Background I am fairly new to smart contracts and am currently experimenting using Ganache and Truffle to test on my local machine. My goal would be to have the smart contract interacting with other ...
1
vote
0answers
122 views

How can I handle the UniswapV2: LOCKED revert reason when calling swapETHForExactTokens on the Uniswap router2 contract

I have forked the eth mainnet onto my local machine using ganache cli and am trying to call the UNISWAP router2's SwapETHForExactTokens to swap eth for MEME tokens. I call the function from truffle ...
1
vote
0answers
129 views

How to deploy uniswap contract with open zeppelin?

I was following the quick start here which suggests to "Deploy the UniswapV2Factory" under the writing tests header. I'm using OpenZeppelin and have Ganache running but I wasn't able to ...
1
vote
0answers
38 views

Time-dependent tests with Buidler?

For Ganache, there are several solutions. What about Buidler? They implemented their own local blockchain, buidlerevm, which is different to Ganache.
1
vote
0answers
141 views

Alternative to ganache

can someone please tell me an alternative to Ganache? Tried installing ganache on my laptop and it's not supported. Ganache works on 64 bit computers and mine is 32bit. Is there a way I can go round ...

1 2
3
4 5
8