Questions tagged [ganache]

For questions about using the Ganache personal blockchain testing environment.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Ganache launch unexpected token in JSON: Syntax Error

After launching Ganache on my Windows 10 laptop. Ganache was working fine but one day, while running Ganache, my laptop shut down because of some problem with the battery. After opening the laptop ...
1
vote
1answer
12 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('./...
0
votes
0answers
38 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
31 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 ...
0
votes
0answers
97 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 ...
0
votes
1answer
19 views

Need Some Basic Information related Ethereum [closed]

I'm newbie to block chaining and need help related truffle and related tools.... Q. Whats difference between truffle and ganache? Q1. Is truffle/Ganache(Don't know difference) is server side EVM, I ...
0
votes
0answers
13 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
52 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
7 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
15 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 ...
1
vote
0answers
96 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
26 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
58 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
24 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
48 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
23 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
29 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
29 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
27 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
101 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
119 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
19 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
65 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
16 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
30 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
38 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
42 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
23 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
95 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
37 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
112 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
13 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
16 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
17 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
37 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
54 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
102 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
37 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
22 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
31 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
24 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
60 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
45 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'...

1
2 3 4 5
8