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)?

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.

  • So only those global variables are accessible to contract code, no? – Sebi Jul 15 '16 at 15:58
  • 1
    Yes, it seems so. I don't know if there are plans to add more methods to solidity block global object. – Sergeon Jul 15 '16 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.