New answers tagged

0

The mistake that I was doing was that I was not running nvm use v8.11.3 directly in my terminal. I had a env.sh script containing nvm use v8.11.3. I was running bash ./env.sh to run the script. I assumed that changed the node version in my terminal. But it turns out that does not work. That change was valid only till the script execution happened. I had to ...


0

Well i had an extesion called Dapper..so i unistall it and it;s ok now!


0

An artifact is a json file inside the build/ directory that contains information of the contract's deployment. For example address, network id and libraries linked. The mismatch error appear when the information in the artifacts doesn't match the current network. Sometimes it happens because the network id has changed. For example ganache by default will ...


1

There is no information about your deployment/testing methodology in the OP. Here's a likely cause. Ganache blockchains are transient. Each time you restart ganache it's a new network with a new network id. Any previous deployments/migrations will not be present. Make it your habit to $ truffle migrate --reset when you restart ganache. You'll see ...


0

ok I figured it out: My solidity code had some problems. Using this one compiling with 0.5.7 worked. pragma solidity ^0.5.0; contract MessageContract{ string private message = "Hello World"; function getMessage() public view returns(string memory){ return message; } function setMessage(string memory ...


0

Usually a client will update its internal state before triggering events. But still there is the possibility of a chain reorg between the event being triggered and the request for extra data. Either you add a check for chain reorgs or send enough data in the event so you don't have to make the extra query.


Top 50 recent answers are included