Skip to main content

Questions tagged [recursive]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
43 views

Recursive function in solidity(array parameter) [duplicate]

I'm trying to implement a recursive function with solidity as we did in Python or JavaScript. Parameters must be an array. and implement functions like this Python function. Can you help me? def ...
Arsalan Shiran's user avatar
1 vote
0 answers
38 views

Simplest recursive SNARK working example

I have been doing some research into recursive SNARKs. But I haven't found a working code example such as this one using Zokrates or this one using snarkjs. Anyone knows one such example, say, for ...
sinoTrinity's user avatar
0 votes
1 answer
40 views

Smart contracts calling each other, costs and atomicity doubt

According to what I know, If you invoke function F on Contract C, you pay the gas fees related to F's operations and if for some reason something goes wrong, all state changes performed by F until ...
Alberto Molina's user avatar
1 vote
0 answers
56 views

What's the difference between this.function() and function() in recursion?

I stumbled across some odd behavior that I can't explain regarding recursive functions in Solidity. As a note, I have attempted to run this on ganache in case it is actually ganache that is throwing ...
Shiri's user avatar
  • 796
0 votes
0 answers
211 views

gas estimation fails when trying to run a recursive function? Is there an alternative?

I have been trying to traverse a graph kind of data structure and the only way to do this is by using a recursive function is what I feel. So, now when I try to execute my contract code in remix it ...
vteja711's user avatar
  • 402
0 votes
2 answers
426 views

Can I make recursive calls using Ethereum Alarm Clock Scheduler? [duplicate]

Answer given here does not provide full solution. Can some one please suggest me if it is practically feasible to execute a method in my smart contract every 24 hours using Ethereum Alarm Clock? You ...
Gagan's user avatar
  • 433
2 votes
1 answer
330 views

Simulating DAO recursive/reentrancy attack

Trying to simulate the attack. In my attack contract: function attack() public { target.call(bytes4(keccak256("withdraw()")),amount); } function() payable public { if (msg.sender == ...
user avatar
0 votes
1 answer
46 views

Why doesn't this function work and is there another way to do it?

For the function getAllcars, I wanted to return a struct array. However, it seems this cannot be done (yet). I attempted a workaround by using a recursive function which returns the details of each ...
CreatedAMadman's user avatar
0 votes
1 answer
701 views

Time Specified calls in Solidity using Oraclize

I have started learning coding in Solidity and I have written the below contract using the official Oraclize guidelines. My aim is to: Make the update() function be called on its own on the ...
kosnet2's user avatar
2 votes
1 answer
262 views

Would `throw` prevent this recursive attack?

I am writing a basic contract to split ethereum evenly between two addresses. Within my withdraw() function, I have the following code: function withdraw() { uint256 amount = this.balance / 2; ...
user avatar
3 votes
2 answers
294 views

Is it possible to define a default index for directories hosted by swarm?

I've uploaded my homepage to swarm, using the --recursive flag, i.e.: 0 ✓ user@ursae ~/.src/github.com/5chdn $ swarm --recursive up co/ I0115 11:32:09.046878 upload.go:195] uploading file co/...
q9f's user avatar
  • 32.9k