I am getting the below message:
,Warning: Contract code size is 28837 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
I think it is due to:
function fetchPatientProfile(PatientProfileData storage self, address key) internal view returns (Patient memory) {
Patient memory patientProfile = self.patientProfiles[key]; // get value
return patientProfile;
}
Is there a better way to create a fetch from storage variable?
I'm creating profiles from the below function, which calls a library:
function createPatientProfile(Patient calldata profile) external onlyOwner {
require(patientProfiles.addPatientProfile(profile));
}