Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

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

Can we see events in ganache?

I am using Ganache and wanted to understand where can we see the events in the Ganache UI. I tried checking the events in the transaction and logs tab but I did not find it. Here is one sample code. ...
1
vote
0answers
52 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
159 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.
3
votes
2answers
130 views

Check your gas amount error ERC721

I am trying to deploy contracts to Ganache for testing using Truffle, but no matter what I set gas price / gas limit / gas to both in truffle.js and Ganache itself, it always get check gas amount on ...
1
vote
0answers
99 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
2answers
840 views

Get Gas use of a transaction with web3

is it possible to get the information about the actual amount of gas that was used for a transaction? I have the transaction hash and I'd like to know the gas that was used by this transaction after ...
0
votes
3answers
47 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
1answer
145 views

Basic token transfer and unit test

I am having trouble testing a very naive transfer method for my coin, based off of the ethereum.org demo coin. I've simplified it down into the essentials, yet my solidity unit test keeps failing. ...
0
votes
1answer
304 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
1answer
93 views

How can I use an account created on a webpage?

I am developing an API in javascript and one of the method calls is to register an account. I use web3.js to create an account and then I return the public and private key of this account. Another ...
1
vote
1answer
2k views

Web3 server-side trouble connect with ganache

I need to create server in nodejs that will create transaction to blockchain and i have trouble to connect my nodejs app with ganache. Look at my code: const Web3 = require('web3'); var web3 = new ...
1
vote
0answers
166 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 ...
0
votes
0answers
73 views

Remix and ganache-cli | Contract override

I have a problem when developing in Remix and using my testnet as a blockchain. I have a contract that connects through an interface with an standart ERC20 contract. Everything works fine until I ...
0
votes
2answers
391 views

Metamask won't display correct balance after creating customrpc for ganache accounts

I made a customrpc network on metamask using the correct server and imported a private key from ganache, which worked but the eth balance is displaying 0 when I expected it to display 100. According ...
4
votes
1answer
1k views

Attach to ganache-cli using geth

Is it possible to attach with geth to ganache-cli? I start ganache-cli like this: ganache-cli --db ~/ganache -i 15 Then I try to attach to the chain like this: geth --datadir ~/ganache/ --...
1
vote
1answer
269 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 ...
0
votes
1answer
161 views

The MetaMask Web3 object does not support synchronous methods

Hi I'm having this error when I try to set a variable in remix. inpage.js:1 Uncaught Error: The MetaMask Web3 object does not support synchronous methods like eth_sendTransaction without a callback ...
1
vote
1answer
230 views

Exceeds block gas limit error to call view functions

With solidity view function, you can specific the amount of gas to use. My understand is since it is not a state changing transaction, all the gas cost is not charged for, and the client should be ...
0
votes
1answer
311 views

How can we assign unique hash id to the id that created inside our smart contract in ethereum?

I am using truffle, ganache and web3. I am initializing user id in smart contract while deploying the smart contract. As of now, everything is done by account[0] of Ganache. Now, I want functionality ...
1
vote
1answer
87 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 ...
0
votes
0answers
96 views

How to be sure “ethereumjs” is installed?

I installed ethereumjs library using following command: npm i ethereumjs-testrpc And here is the output: And then I tried to run an html example which uses ethereumjs-vm. The example is here : ...
2
votes
3answers
141 views

Is drizzle a contracts lib?

I'm researching about smart contracts, and been seeing a lot of truffleframework, ganache and drizzle. In the other hand, only found broad descriptions of those tools: "Drizzle is a collection of ...
0
votes
1answer
289 views

Ganache and truffle - how to set zero deployment fees

I am running a local ganache-cli node on my machine and would like to have zero transaction fees. For this reason I am starting the node using ganache-cli -g 0 which sets the gas price to zero. ...
0
votes
3answers
831 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 ...
2
votes
0answers
220 views

Truffle deployment with metamask to ganache leads private key error

I'm using Truffle, web3js and Metamask to build a webapp. I'm using ganache for local testing. I'm trying to deploy a contract with import TruffleDeployer from 'truffle-deployer'; import ...
0
votes
1answer
103 views

If statement in for loop not filtering out items

// @param physicalAddress - the actual address of the home a host wants to list (not the ethereum address) // @return _id - list of ids for homes function listHomesByAddress(string ...
1
vote
1answer
599 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 ...
2
votes
1answer
854 views

How to connect ethereum wallet to ganache? [closed]

Can anyone list out the steps on how to connect the ethereum wallet to ganache? Thanks in Advance
0
votes
2answers
176 views

Batch processing of contracts

Is there a way of defining contract data to be deployed and then running in a batch to deploy to the Blockchain? I am developing an application and would like to have the ability to load up test data ...
1
vote
1answer
330 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
0answers
280 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
2answers
1k 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-...
0
votes
0answers
80 views

Unable to check for msg.value

Here is my code: pragma solidity ^0.4.24; contract TRY{ uint public temp=0; function transfer_ether() public payable{ require(msg.value>=60); temp=60; ...
3
votes
1answer
531 views

Ganache (UI) save blockchain

I am running a testnet on Ganache UI. But when I deploy a contract and close and reopen ganache, there are no blocks and the contract deployment is gone. Is it possible to save/load a blockchain ...
2
votes
0answers
188 views

Couldn't estimate the gas when running Mist against ganache-cli

I am running ganache-cli locally, then connecting Mist with /Applications/Mist.app/Contents/MacOS/Mist --rpc http://localhost:8545 Then, when I try to send from one test acccount to another in the ...
1
vote
0answers
41 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 ...
0
votes
1answer
217 views

Ganache not working

I am developing on a testnet on ganache and using remix. I am working with web3 and working on the user interface. when trying to fetch a function with web3/ganache, I get the following error: "...
1
vote
2answers
555 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
741 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
0answers
123 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?
0
votes
0answers
19 views

How to use bytes to get the same hashed output [duplicate]

I previously asked a question here: link to previous question. Found out the answer is to use string instead of bytes here: pragma solidity ^0.4.18; contract C { bytes32 public temp; ...
0
votes
1answer
272 views

adress.transfer fails in ganache

I am calling address.transfer() from the one of the deployed contract. While, this works fine with remix(JavaScript VM environment), the same fails if I deploy and run the same contract on 'ganache'. ...
0
votes
1answer
365 views

Truffle test not working when I add migration.js

I have written javascript tests that run fine with truffle test ./test/Token.js However, when I have the following: var UTO = artifacts.require("./uto.sol"); module.exports = function(deployer) { ...
1
vote
1answer
200 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
182 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 ...
0
votes
1answer
47 views

Gas amount to store a contract?

i'm trying to run truffle migrate and it gives me always this error. Error: The contract code couldn't be stored, please check your gas amount. MBP-de-Alicia-2:smartContracts alicialombarte$ truffle ...
2
votes
2answers
936 views

Cannot read property '2' of null

pragma solidity ^0.4.23; import'./ID.sol'; import'./Whitelisted.sol'; contract IDFactory is Ownable { Whitelisted whitelist; event IDCreated(uint id, address idContractAddress); ...
3
votes
1answer
304 views

Can't send data to non-contract address using web3 1.0.0 and ganache

Problem According to this question, it is possible to send data to a non-contract address in Ethereum. However, if I run my code which sends ether from the first account to the second account on ...
0
votes
2answers
831 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
0answers
70 views

Why account balance can decrease when gasPrice is 0 and msg.value is 0?

It also spends pretty large amount, which doesn't seem to be related to gasUsed Contract: pragma solidity ^0.4.24; contract Test { bool i; function hello() public { i = true; } }...

1 3 4 5 6 7