Questions tagged [contract-debugging]

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

699 questions
4
votes
2 answers

Debug failing transaction on mainnet

We have a smart contract deployed on main net and some of the recent transactions have started failing. Any idea how we can start debugging the contract? Contract address: 0x81EAF1fF62BB8ccaa5314287B14e75E04E21b8F2 Most recent three transactions…
jatinshah
  • 141
  • 3
4
votes
0 answers

Debugging smart contract with source trace

I am currently able to debug a tx with source trace in remix if I use my local geth node as rpc provider. The problem is that keeping a local node in sync is time and resource consuming. I am asking here if there is a way to use an external…
Anton M
  • 141
  • 3
3
votes
1 answer

Can't increase contract balance. Bug?

New to Ethereum. Started working with a simple sample contract. It's working correctly except for the fact that I simply cannot seem to increase its balance. Any thoughts? contract Faucet { address owner; uint256 sendAmount; …
Max
  • 636
  • 4
  • 15
3
votes
3 answers

Revising Smart Contracts

If I create a Smart Contract that pays users for sharing their data, how can I ever update this smart contract in the case it has an error, or perhaps I wish to change the amount paid for data sharing? From what I understand, I basically must…
R N
  • 31
  • 1
3
votes
0 answers

How to configure parameter reexec of debug_traceTransaction?

I am trying to use debug_traceTransaction to scan the internal transactions of smart contracts, so I need set the value of reexec, what value should I use? It seems that reexec is the number of blocks the EVM need to re-execute to generate the…
Jack Xu
  • 31
  • 1
2
votes
1 answer

Why is "+=" operator used in this auction example?

Here's an auction code from blog.ethereum.org contract auction { address highestBidder; uint highestBid; mapping(address => uint) refunds; function bid() { if (msg.value < highestBid) throw; if (highestBidder != 0) …
manidos
  • 4,298
  • 3
  • 31
  • 55
2
votes
0 answers

safewithdrawal on contracts not work with goal not met?

I created a crowdsale contract and sent ethereum to it to test it. The contract was supposed to last for 3 months and then end at which point I thought all the eth would be returned to anyone who sent it if the goal was not met. The funds have not…
tyco
  • 81
  • 1
  • 6
2
votes
1 answer

Google BigData ETh Query Question

This is a question for all those that are familiar with crafting Google BigData queries to extract data. My request is fairly simple. I'm looking to extract a definitive list of smart contracts with unique bytecode. The first query I sent through…
librehash
  • 33
  • 4
2
votes
1 answer

Returning public properties of child object

I think I'm missing something very simple. The following contract contract Genobject{ uint public item; function Genobject(uint _val){ item=_val;} } contract Caller{ Genobject public instance; function Caller(){ instance= new…
user1938620
  • 681
  • 1
  • 6
  • 12
1
vote
1 answer

how are the exploited smart contracts fixed

We have seen many defi hacks taking place one thing i don't understand is how the bug in contract fixed given that smart contracts are immutable. Is it somehow related to delegate call or interfaces.please provide a detailed answer. Eg the furocombo…
Seth jain
  • 23
  • 5
1
vote
0 answers

Is there any EVM debugger with a flexible UI layout available as of 2021?

Remix debugger seems to be pretty mature. But, its web-based interface makes it impossible to shuffle the block around. For example, I want to move the "Stack" section to the right sidebar so that it can take up a longer/wider space; thus fitting a…
sherlock
  • 201
  • 1
  • 5
1
vote
1 answer

dApp index.html fails to load for dAppUniversity election application

Hit a brick wall with this. git clone https://github.com/dappuniversity/election The following is the Shell output I get when I npm run dev. I’m using the cloned project from GitHub but I’ve changed the solidity version because it wouldn’t…
A Cameron
  • 21
  • 4
1
vote
2 answers

ERC-20 token address on Rinkeby for testing

I am looking for addresses of ERC-20 tokens on Rinkeby in order to test my smart contract. I know that I can find a lot of them at https://rinkeby.etherscan.io/. However, it would be nicer if there are some that works as kind of reference for…
1
vote
2 answers

how to send my precrowdsale funds to crowdsale contract?

I'm having a precrowdsale and a crowdsale, How can I send the ether from the first to the second once the precrowdsale is over? this is the script I have: //send to crowdsale if(receiver_address.send(amount_in_Wei)){ //sending is successful } else…
deathloser
  • 29
  • 2
0
votes
1 answer

Are these BTCQ tokens sent to contract properly locked?

In the case of this contract code, all the tokens sent to the contract are forever locked? Were they effectively burned? I don't see any function like the solutions offered in this question, and I can't read the code well enough to tell, hence this…
user2066480
  • 101
  • 2
1
2