Search code examples
transactionsethereumchainlinketherscan

State of a smart contract updated, but no transaction listed on etherscan


I'm looking at a contract on etherscan and I can see that a variable has been updated, but looking at the list of transactions it doesn't seem that any transaction has modified the state.

Let's take this transaction for example.

We can see exactly 4 transactions: ETH/USD

Now, using the read contract functionality of Etherscan, we can see the various responses of phaseAggregators, defined in the smart contract as such:

mapping(uint16 => AggregatorV2V3Interface) public phaseAggregators;

We can add 0,1,2,3,4,5 etc and still get responses.

However, only 2 elements were added to the mapping from the 4 transactions! (marked in green): Transaction List

But using the etherscan "read contract" functionality, I have found that the phaseAggregators mapping has 5 elements.

In my understanding there should be 3 more transactions. Where are they?

Is it possible that etherscan is not showing all the transactions?


Solution

  • In Etherscan, there is a second, although oddly named, list of transactions called internal transactions. Internal Transactions are transactions that have been initiated by another contract.

    So you could imagine the flow like this:

    Person -> Contract A -> Contract B

    Contract A's transaction to Contract B would show up as an "internal transaction".

    This can be a very long list.