Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 131

questions for finding and squashing bugs in smart contracts and decentralized development

3 votes
Accepted

Can't increase contract balance. Bug?

As of Solidity 0.4, contracts must explicitly allow themselves to receive ETH by defining a fallback function with the payable modifier. It would look like this in your case: function() payable {} …
Tjaden Hess's user avatar
  • 37.3k
6 votes
Accepted

Why isn't msg.sender.send getting called?

In your contract you are trying to send 1 finney, but you are only providing your contract with 0.1 finney... A Finney is 0.001 ETH, not 0.0001
Tjaden Hess's user avatar
  • 37.3k
4 votes
Accepted

Why variable A's value does not change by calling function to change it?

The issue is that the argument A in the function changeA is being set to 0 instead of the global variable A that you intend. To fix this, either change the name of the argument to something else, li …
Tjaden Hess's user avatar
  • 37.3k
2 votes
Accepted

Why Are These Values Not Immutable

No values in solidity are immutable if your contract's logic chooses to change them. To protect against overwriting, you need to use a flag of some sort to mark an ID as used. If one of your variabl …
Tjaden Hess's user avatar
  • 37.3k
3 votes
Accepted

Contract to contract send

Often, when you send to another contract, you run into an out-of-gas error. This can be fixed by manually setting the gas that you want to supply, using the .gas() property. owner.call.value(fee).ga …
Tjaden Hess's user avatar
  • 37.3k
0 votes

What is the most efficient way to map two different key types to a struct?

You can simply map the licence to an address, and then do two lookups to dereference a licence. mapping(string => address) mcyclelicences; function getMcycleByLic(string _license) public view retur …
Tjaden Hess's user avatar
  • 37.3k
29 votes
Accepted

How can I debug a smart contract?

The Remix IDE has a great integrated block-by-block simulator and debugger. Ganache allows fast contract testing without the hassle of running a node. Once the contract is live, the etherscan.io blo …
Tjaden Hess's user avatar
  • 37.3k
4 votes
Accepted

Exception in Contract Reverts Entire Stack, Uses all Gas

Yes, all EVM exceptions cause all state changes to be rolled back, and all gas is forfeit to the miner. Thus, while throwing errors is convenient, it sometimes makes sense to just return some error v …
Tjaden Hess's user avatar
  • 37.3k
3 votes
Accepted

Geth What does the eth.contract(abi).at function do?

This function creates a new MyContract object with the address field set to the argument. You should pass in the address of an already deployed contract. The function returns an object that you ca …
Tjaden Hess's user avatar
  • 37.3k