Questions tagged [ganache-cli]

The tag has no usage guidance.

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

ganache test returns characters instead of numbers

mapping(uint256 => uint256) public amount; function saveAmount(uint256 _id, uint256 _amount) public { amount[_id] = _amount; } I have a function that saves amount in mapping. When I test ...
1
vote
2answers
20 views

How do I specify the network ID in the config file when migrating/testing contracts on my local ganache?

So my issue is when I run the compile and then migrate commands everything goes smooth, then I try to test by running the truffle test command and it gives me an error saying 'Error: The network id ...
1
vote
2answers
39 views

Understanding ganache timestamps

Sometimes, when I use the ganache specific evm_increaseTime method and advance to the next block, the next timestamp is NOT: current timestamp + advanced time But instead: current timestamp + ...
0
votes
2answers
33 views

Store/retrieve data doesn't work using node

i trying something simple, store and retrieve a data in a smart contract, but when i want to retrieve the data, nothing is returned. solc version is 0.4.24 web3 version is 1.2 Solidity code: pragma ...
0
votes
0answers
13 views

Why is the filter ID different ganache-cli and geth

request {"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":["0x100791de9f40bf2d56ffa6dc5597d2fd0b2703ea70bc7548cd74c04f5d215ab7"]}],"id":0} ganache-cli`s response {"jsonrpc"='2.0', "id"=...
0
votes
0answers
33 views

How to fix? Tx nonce go out of sync when using multiple unit tests on the same contract under Ganache+Truffle

Here is my example contract (ignore the fact this could be pure, this is a simplified example and my real example is not a pure function, it changes state, but I can reproduce the bug with this simple ...
0
votes
0answers
45 views

Running Migrate in Truffle does not work

I have been using Remix for developing my dapp but decided I should use Truffle to make things a little more robust and professional. I have truffle and ganache installed. I run truffle migrate and ...
0
votes
1answer
18 views

Syntax Error when trying to run ganache-cli with node v6.14.3

My environment ganache-cli 6.4.4 node v6.14.3 Mac OS Terminal I run the following commands to install ganache-cli Aseems-MacBook-Pro:bdnd aseem$ nvm use v8.11.3 Aseems-MacBook-Pro:bdnd aseem$ npm ...
0
votes
1answer
34 views

Can I pass my mnemonic to ganache/ ganache-cli when it is starting up?

I am wondering if I can pass the mnemonic that I created using metamask to boot up my local ganache network so that I do not have to log out and login metamask with different mnemonic everytime for a ...
1
vote
1answer
110 views

Smart Contract is being deployed but call does not return contract address after deployment

So I have been trying to deploy a smart contract using nodejs, but when I call the function to deploy, I get no contract address on my console. It's like the send() function never completed its ...
0
votes
1answer
28 views

Why do my events not emit the correct value?

When testing a contract with Truffle, I have found that the variables that are emitted by the event do not match the values that are passed into the event emission. Why does the event not return the ...
0
votes
0answers
54 views

Is it possible to access MetaMask functionality for integration testing?

I'd like to be able to access MetaMask to test potential user actions. I doubt it's possible to directly simulate sending transactions, but what I hope I can at least confirm is that transactions are ...
0
votes
2answers
143 views

Uncaught TypeError: e is not a function from getAccounts() + web3 1.0.0-beta.37 + truffle + React Dapp

I am creating my first Dapp by using web3 1.0.0-beta.37 and trufflfe While getting the accounts in app.js by using ganache-CLI and Metamask, I am getting following error. Uncaught TypeError: e is ...
1
vote
2answers
103 views

Can't deploy contract with web3.js and ganache-cli

I'm using the solc module to compile a Solidity contract. The compilation step looks to be working correctly, however, when I attempt to deploy the contract to the Ganache network (in a Mocha test), ...
0
votes
0answers
28 views

It is an error to execute ERC20 contract token using ganache / go-ethereum

I use go-ethereum.Error: nonce generation function failed or private key is invalid [Execution environment] ・node:11.6.0-alpine ・ganache-cli@6.3.0 Please tell the person who understands the cause. ...
1
vote
1answer
33 views

How to increase the number of test accounts?

I have encountered a problem where I need a large number of test accounts. How can I increase the number of test accounts from 10. Remix and ganache only give 10 accounts. I require more than that.