Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 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 ...
0
votes
1answer
15 views

Why is truffle migration failing to deploy contracts? “cannot read options of undefined”

I am trying to deploy a local version of SushiSwap on a local test Ethereum chain. I am using Ganache and Truffle to deploy the smart contracts locally. When I run truffle migrate and attempt to ...
0
votes
0answers
5 views

For Ganache and BuidlerEVM I have different estimated gas

For Ganache and BuidlerEVM I have different (several times) estimated (by Ethers.js) gas for the same computation. Is it a bug? Isn't the Ethereum standard specifying particular gas amount for every ...
0
votes
1answer
12 views

Modify storage in Ganache or BuidlerEVM?

I have an orchestrated contract with a function that can only be called by another contract. While struggling to find an elegant solution for writing a unit test, I realised that I could circumvent ...
0
votes
0answers
38 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
22 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.
0
votes
1answer
26 views

Connect web3.py with Ganache

I am new to this. So, how do I connect web3.py with Ganache. I've got Ganache up and running, smart contract deployed. I would like to interact with it from, lets say, a python shell. So, this is what ...
0
votes
1answer
23 views

How can i create more that one node for test purposes?

I really need to have more than one node to test my smart contract. I'm using remix and i also installed ganache, however, ganache doesn't allow me to have more than one node as I hoped for... I have ...
0
votes
0answers
10 views

What would be good result measures in Ethereum

I'm thinking of a way to present relevant results measures for my blockchain. I can see how for hyperledger is interesting to present (transactions per second x block size) or (latency x block size). ...
1
vote
1answer
42 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 ...
0
votes
0answers
22 views

Truffle console is hanging on function call

I have a contract deployed to ropsten. It has a function called enter: function enter() public payable { assert(msg.value == MINIMUM); assert(OPEN == true); players.push(...
0
votes
0answers
25 views

Ganache stuck when loading truffle project

I am not sure what can be wrong. When I try to load a truffle project (by adding the truffle-config.js file to the workspace config), ganache gets stuck at the loading icon and I get this lines at the ...
0
votes
1answer
26 views

Reproducing a Ganache Server across multiple computers

There are multiple developers on the team and it seems as though we all want to be working on a specific test network with specific public and private keys with a specific number of users who all have ...
0
votes
1answer
26 views

call a contract function which creates a new contract in web3.js makes an error VM Exception while processing transaction: revert

At first I'm developing with truffle v5.1.34, Node v10.16.0, Web3 v1.2.4 To make it simple, I have a Two contracts, DApp and User What i'm doing is call a DApp contract function which creates a new ...
0
votes
0answers
10 views

require() statement to use for including Ganache GUI in the Dapp not Canache-cli

When using ganache-cli, we assign it using the require() statement. How do we do the same for ganache GUI? I don't want to use the ganache-cli for my app execution. Also how do I assign the provider ...
1
vote
0answers
62 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 ...
0
votes
0answers
83 views

How to debug this metamsk error ? - Error: [ethjs-rpc] rpc error with payload:

I have a DApp integrated with metamask and ganache, front-end built on react. I am getting this error when I interact with the smart contract from front-end, contract send calls. Smart contract ...
0
votes
1answer
24 views

Error when retrieving the instance of a deployed contract

I have developed a EnergyExchange DApp in the Ganache local network with React that consist of one main contract "EnergyExchange". This main contract has a function to deploy new Agent ...
0
votes
1answer
16 views

Error when calling a get function from a deployed contract instance

I have developed a EnergyExchange DApp in the Ganache local network with React that consist of one main contract "EnergyExchange". This main contract has a function to deploy new Agent ...
0
votes
0answers
37 views

how to send transaction without private key ganache?

I need access to oracle accounts (whose private keys i do not have) to test my contract. I'm trying to use ganache to fork my local node with the accounts unlocked through the ganache api, but ...
0
votes
0answers
13 views

Does Ganache Support Mappings?

I have a function where I am trying to compare the values of 2 mappings. However, I am receiving an invalid opcode error. Which has me confuzzled because I already set the values of both the mappings ...
0
votes
0answers
23 views

Web3- Sending data to Ganache and then loading a new page to retrieve the same data back

JAVASCRIPT const address = '0x2537155193458a51c99d840e3dBc1f60E004aA85'; var contract = new web3.eth.Contract(abi,address); console.log(contract); $('#invoice-btn').click(function(){ contract.methods....
0
votes
1answer
26 views

Error: while migrating Event: invalid address (arg=“benificiaryAddress”, coderType=“address”, value=undefined) [closed]

let Event = artifacts.require("./Event.sol"); const field= { nameOfEvent : "Music", ticketCount : 100, ticketCharge :10000, durationInMinute :1200 } module....
0
votes
1answer
19 views

MetaMask custom RPC connection error with private ganache-cli, EC2

Currently I am trying to build private dapp using ganache-cli as a blockchain backend with aws ec2 instance. I get the expected result when ssh from another shell. request: curl -X POST --data '{"...
0
votes
0answers
33 views

“TxRejectedError” Using Ganache with Web3

I am having trouble sending my transaction Using Ganache. I am showing the logic that creates and sends the transaction and it says it cant be found or it is rejected don;t really know what the error ...
0
votes
0answers
21 views

Metamask not connecting with my account in ganache

I'm developing a project with truffle pet shop . when i connect my project to metamask using the private keys of a account , im not able to receive my account address on my code and though i connected ...
0
votes
1answer
64 views

Invalid address

I deployed my contract in ganache. When I was started to call a function with two arguments I started getting an error. I used an address from ganache. Error: invalid address (arg="user", ...
0
votes
1answer
35 views

address(this) in solidity is returning wrong contract address

This is my cantract code which I was using in truffle pragma solidity 0.5.16; contract Test { function getAdd() public view returns(address){ address add = address(this); return ...
0
votes
0answers
82 views

My is metamask returning RPC Error: Error: [ethjs-rpc] rpc error with payload, metamask shows failed [object, object]

My metamask shows ALERT: Transaction Error. Exception thrown in contract code. When I am about to transfer using truffle, open zeppelin and ganache on localhost:7545 after confirming the transaction ...
0
votes
0answers
12 views

1) How can we use Ethereum Alarm Clock for Scheduling a txn in Private network(using geth/ganache)

2) Can we schedule a txn in such a manner that it could be executed multiple times in a particular time window?(For eg: if we need to schedule the txn everyday 5.00 pm) or the EAC has the option of ...
0
votes
0answers
14 views

CheckMarx Docker based Example: Installing the ganache and Truffle again

I am trying to work on an example provided at: CheckMarx Example $ ./ddenv Pulling ganache (trufflesuite/ganache-cli:latest)... ERROR: Get https://registry-1.docker.io/v2/: net/http: request ...
0
votes
0answers
15 views

Creating Multiple ERC721 Tokens

Imagine you wright your own token following the ERC721 standard. Now you want to create 10,000 tokens of this type. Do you need one contract to manage each token? Do you have to deploy 10,000 token ...
3
votes
1answer
34 views

Ethereum Signing using HSM

I tried signing a Message using the SHA256withECDSA algorithm . It gives a different signed(r,s) output everytime. When i try to recover the address using the ecrevover method .it gives me a different ...
0
votes
1answer
48 views

Compiled solidity contract run out of gas on deployment

I have a solidity contract that compiles ok (0.5.1 compiler version), but it runs out of gas if I deploy the whole of it. If I comment some of the external methods of the contract, it compiles and ...
0
votes
1answer
56 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
17 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
25 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
33 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
21 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
23 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
23 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
49 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
44 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
13 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
22 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
34 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
103 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
57 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
31 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
29 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, ...

1
2 3 4 5
8