TestRPC/Ganache: the tx doesn’t have the correct nonce

Using MetaMask v3.14.1 you can reset your account as follow: Resetting an Account In the Settings menu, MetaMask has a “Reset Account” button. This button wipes the current account’s transaction history, which is used to calculate the current account nonce. Normal users should never have a reason to use this feature. This is useful for … Read more

Difference between various blockchain protocols [closed]

This is a good question, though not one easily addressed with a simple answer. As @Mat0 commented above, one difference is the approaches that the various platforms are using to achieve consensus. Some use proof of work (PoW), others use variants of byzantine fault tolerant strategies (PBFT, SBFT, etc). Some use PAXOS derivative strategies. Hyperledger … Read more

Data location must be “memory” for return parameter in function, but none was given

You should add memory keyword for string parameter, which was introduced in solidity version 0.5.0 As per the documentation: Explicit data location for all variables of struct, array or mapping types is now mandatory. This is also applied to function parameters and return variables. For example, change uint[] x = m_x to uint[] storage x … Read more

What is address(0) in Solidity

Within an Ethereum transaction, the zero-account is just a special case used to indicate that a new contract is being deployed. It is literally ‘0x0’ set to the to field in the raw transaction. Every Ethereum transaction, whether it’s a transfer between two external accounts, a request to execute contract code, or a request to … Read more

In Ethereum Solidity, what is the purpose of the “memory” keyword?

Without the memory keyword, Solidity tries to declare variables in storage. Lead Solidity dev chriseth: “You can think of storage as a large array that has a virtual structure… a structure you cannot change at runtime – it is determined by the state variables in your contract”. That is, the structure of storage is set … Read more