Smart contract has quite limited abilities to observe blockchain content. Basically, Solidity allows reading the following information:
- Hashes of 256 most recent blocks
- Current block's miner address
- Current block difficulty
- Current block gas limit
- Current block number
- Current block timestamp
- Current transaction gas price
- Current transaction origin (i.e. from address)
- Current contract's storage slots allocated for state variables
- Current balance of arbitrary address
EVM allows reading a bit more (available in Solidity via inline assembly):
- Arbitrary slots of current contract's storage
- Byte code of arbitrary contract
- Hash of byte code of arbitrary contract
And that's basically it.
Please note that the contract cannot read other contracts, only incoming contracts to itsself.What do you mean? I can have interaction between contract like this: https://ethereum.stackexchange.com/questions/1599/basic-example-of-interaction-between-2-contracts – Chaos Apr 15 '19 at 14:54