Does it cost more if a contract stores more?

Say I deploy a contract with a
mapping (uint => bool) public addressList;

on each call to the contract, the address of the caller is stored in the mapping above and set to true (addressList[_address] = true)
this means that the addressList keeps growing on each unique call

If a contract has it’s own storage space, does that mean each subsequent call to the contract will cost more gas?

How does this affect gas price on calls that retrieve from the map? eg: addressList[_address]


Hi, when you store new value, you will use the opcode sstore, and if this is a non-zero value, this is almost the most expensive execution.

I think when you write data to the contract, it only depends how many pieces of data would you like to write, not related to mapping size.

Yes, I think so.

gas price? I think you mean gas cost.

What about read opcodes?
in ERC20 _balances is a mapping,
but reading balances from an ERC20 contract is free…

so does this mean that fee is collected only when writing to the blockchain and not when reading ?