2

Is it possible to have a contract whose methods iterate through the block chain? in that they can read block/transaction related data and make transactions based on them?

Or monitor the block chain for new blocks and perform future transactions (act like event handlers but for the block chain as a whole)?

Sebi
  • 5,294
  • 6
  • 27
  • 52

1 Answers1

3

I'm afraid you can't. As that answer states, solidity can only fetch few info from blocks.

I don't know what you want to achieve, but it seems you will need oracles to constantly feed your contract with blockchain data.

What I don't know is, in the event of actually this is really impossible, if this is so by design or is a solidity feature that could be implemented in the future.

Sergeon
  • 396
  • 1
  • 8