importing contracts is counted as read every time they are read not once
🐞 Bug Report
When reading an imported contract TotalBytesRead is incremented every time this is done, even if the same contract is read twice in the same transaction.
So given the following scenario:
A imports B
A imports C
B imports C
Then C is counted as read twice.
What is the severity of this bug?
Should have: * It would be better if we do this before we ship, but it's OK if we don't (product functions without this, but it's a better user experience). Consider adding to a future sprint.
Expected behaviour
I would expect C to be count as read once.
@janezpodhostnik @ramtinms
Today I removed the "B imports C" part in my code and then I am below the limit again. C in my case here is FIND and that contract is 50k.
Duplicate of https://github.com/onflow/cadence/issues/1684