You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contract methods that use function arguments with complex structures could result in a test ID that is longer than the file system limit of 255 characters.
OSError: [Errno 36] File name too long: 'out/proofs/src%ThisIsAContractExample.thisIsAMethod((uint256,address,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes):0/proof.json'
As a workaround, I've modified the FoundryTest.name property to hash the arguments used in the method signature, but we must find a permanent solution for this corner case.
Output:
@property
def name(self) -> str:
n = f'{self.contract.name_with_path}.{self.method.signature}'
if len(n) > 250:
h = hashlib.sha256(self.method.signature.encode('utf-8')).hexdigest()[:10]
n = f'{self.contract.name_with_path}.{self.method.name}({h})'
return n
The text was updated successfully, but these errors were encountered:
Contract methods that use function arguments with complex structures could result in a test ID that is longer than the file system limit of 255 characters.
As a workaround, I've modified the
FoundryTest.name
property to hash the arguments used in the method signature, but we must find a permanent solution for this corner case.Output:
Code changed:
The text was updated successfully, but these errors were encountered: