Closed PaulRBerg closed 2 months ago
Any updates on this, @smol-ninja? It's likely that this will get flagged during the audit.
The tests are passing because the fuzzed streams are transferrable (since most streams are transferrable, the probability of getting a stream with non-transferability is very low).
If isTransferable
is true
, the description
field of uri
will be the "same" for v2.2, v2.1 and v2.0.
The description of v2.2 SVG only differs from v2.0 and v2.1 when isTransferable
is false
and that's when the test would also fail.
However, I was thinking since the goal is to check the "compatibility" of the new NFTDescriptor
with previous deployments, the only necessary check should be that the call to tokenURI
doesn't revert. So we should only check that it passes without to need for equality/inequality at all (we are doing that separately in tokenURI.t.sol
).
What do you think about this?
Great sleuthing! You're right.
the only necessary check should be that the call to tokenURI doesn't revert
Yeah, that makes sense.
There's no expectNotRevert
so we can resort to adding an explanatory comment above the final call that explains this rationale.
We have expectCall
. I ran some tests and the expectCall
fails if the next call reverts.
Awesome, let's go with expectCall
then
As pointed out here, the following tests are incorrect:
testForkFuzz_TokenURI_LockupDynamic_V2_0
testForkFuzz_TokenURI_LockupLinear_V2_0
The
tokenURIBefore
should NOT equal thetokenURIAfter
because the latest NFT descriptor contains the note about transferability, whereas the previous NFTDescriptor (part of the V2.1 release) used by V2.0 doesn't contain such a note.What we have to do: