6

Is it possible for smart contract to view past transactions done on it, in other words would it be possible for a smart contract to see who has sent it Ether since its inception?

eth
  • 85,679
  • 53
  • 285
  • 406
RFV
  • 633
  • 7
  • 16
  • Related: https://ethereum.stackexchange.com/questions/6073/checking-the-blockchain-within-solidity-contract – eth Apr 27 '17 at 06:15

1 Answers1

2

it is possible only if you had registred them (in a map for example). the smart contract hasn't the ability to explore the blockchain to know has a log of the transaction senders.

Badr Bellaj
  • 18,780
  • 4
  • 58
  • 75
  • That is what I suspected. I am trying to write contract that accepts ETH and after a set date will allocate tokens to those, but as wel all know the fallback function cant do much (not even a save to a gloabl map) with a send(). – RFV Apr 26 '17 at 15:47
  • 1
    @RFVenter The contract could have a buyTokens payable function that checks the block number or timestamp and then allocates tokens. – eth Apr 27 '17 at 06:18