From 1f4686a2b0e546a792f86cf8170d5cd8aad14dc9 Mon Sep 17 00:00:00 2001 From: "ALGO Tables (Jeff S.)" <105945985+algotables@users.noreply.github.com> Date: Fri, 10 May 2024 23:29:04 -0700 Subject: [PATCH] Fix type mismatch in smart contract function signatures This commit resolves the type mismatch issues in the VerifyMedicalAI smart contract by aligning the method signatures of `record_ai_info` with ARC4-specific types instead of basic Python types. The update ensures type safety and compatibility with ARC4's static type system, preventing build-time type errors. Changes: - Updated parameter types in the `record_ai_info` method from Python builtins to ARC4-specific types, ensuring that the method signatures correctly utilize `arc4.String`, `arc4.UInt64`, and `arc4.Bool` types as defined in the AiInfo struct. --- .../smart_contracts/verify_medical_ai/contract.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/challenge/smart_contracts/verify_medical_ai/contract.py b/projects/challenge/smart_contracts/verify_medical_ai/contract.py index 17bd48c..a52c9d8 100644 --- a/projects/challenge/smart_contracts/verify_medical_ai/contract.py +++ b/projects/challenge/smart_contracts/verify_medical_ai/contract.py @@ -28,12 +28,12 @@ def opt_in(self) -> None: @arc4.abimethod() def record_ai_info( self, - name: str, - used_model: str, - medical_degree: str, - mcat_score: UInt64, - residency_training: bool, - medical_license: bool, + name: arc4.String, + used_model: arc4.String, + medical_degree: arc4.String, + mcat_score: arc4.UInt64, + residency_training: arc4.Bool, + medical_license: arc4.Bool, ) -> None: self.ai_info[Txn.sender] = AiInfo( name=name,