@@ -69,16 +69,22 @@ def test_safe_operation_view(self):
6969 "safeOperationHash" : safe_operation .hash ,
7070 "userOperation" : {
7171 "sender" : safe_operation .user_operation .sender ,
72- "nonce" : safe_operation .user_operation .nonce ,
72+ "nonce" : str ( safe_operation .user_operation .nonce ) ,
7373 "userOperationHash" : safe_operation .user_operation .hash ,
7474 "ethereumTxHash" : safe_operation .user_operation .ethereum_tx_id ,
7575 "initCode" : "0x" ,
7676 "callData" : "0x" ,
77- "callGasLimit" : safe_operation .user_operation .call_gas_limit ,
78- "verificationGasLimit" : safe_operation .user_operation .verification_gas_limit ,
79- "preVerificationGas" : safe_operation .user_operation .pre_verification_gas ,
80- "maxFeePerGas" : safe_operation .user_operation .max_fee_per_gas ,
81- "maxPriorityFeePerGas" : safe_operation .user_operation .max_priority_fee_per_gas ,
77+ "callGasLimit" : str (safe_operation .user_operation .call_gas_limit ),
78+ "verificationGasLimit" : str (
79+ safe_operation .user_operation .verification_gas_limit
80+ ),
81+ "preVerificationGas" : str (
82+ safe_operation .user_operation .pre_verification_gas
83+ ),
84+ "maxFeePerGas" : str (safe_operation .user_operation .max_fee_per_gas ),
85+ "maxPriorityFeePerGas" : str (
86+ safe_operation .user_operation .max_priority_fee_per_gas
87+ ),
8288 "paymaster" : NULL_ADDRESS ,
8389 "paymasterData" : "0x" ,
8490 "entryPoint" : safe_operation .user_operation .entry_point ,
@@ -149,16 +155,22 @@ def test_safe_operations_view(self):
149155 "safeOperationHash" : safe_operation .hash ,
150156 "userOperation" : {
151157 "sender" : safe_operation .user_operation .sender ,
152- "nonce" : safe_operation .user_operation .nonce ,
158+ "nonce" : str ( safe_operation .user_operation .nonce ) ,
153159 "userOperationHash" : safe_operation .user_operation .hash ,
154160 "ethereumTxHash" : safe_operation .user_operation .ethereum_tx_id ,
155161 "initCode" : "0x" ,
156162 "callData" : "0x" ,
157- "callGasLimit" : safe_operation .user_operation .call_gas_limit ,
158- "verificationGasLimit" : safe_operation .user_operation .verification_gas_limit ,
159- "preVerificationGas" : safe_operation .user_operation .pre_verification_gas ,
160- "maxFeePerGas" : safe_operation .user_operation .max_fee_per_gas ,
161- "maxPriorityFeePerGas" : safe_operation .user_operation .max_priority_fee_per_gas ,
163+ "callGasLimit" : str (safe_operation .user_operation .call_gas_limit ),
164+ "verificationGasLimit" : str (
165+ safe_operation .user_operation .verification_gas_limit
166+ ),
167+ "preVerificationGas" : str (
168+ safe_operation .user_operation .pre_verification_gas
169+ ),
170+ "maxFeePerGas" : str (safe_operation .user_operation .max_fee_per_gas ),
171+ "maxPriorityFeePerGas" : str (
172+ safe_operation .user_operation .max_priority_fee_per_gas
173+ ),
162174 "paymaster" : NULL_ADDRESS ,
163175 "paymasterData" : "0x" ,
164176 "signature" : "0x" + "0" * 24 ,
@@ -890,16 +902,22 @@ def test_user_operation_view(self):
890902 self .assertEqual (response .status_code , status .HTTP_200_OK )
891903 expected = {
892904 "sender" : safe_operation .user_operation .sender ,
893- "nonce" : safe_operation .user_operation .nonce ,
905+ "nonce" : str ( safe_operation .user_operation .nonce ) ,
894906 "userOperationHash" : safe_operation .user_operation .hash ,
895907 "ethereumTxHash" : safe_operation .user_operation .ethereum_tx_id ,
896908 "initCode" : "0x" ,
897909 "callData" : "0x" ,
898- "callGasLimit" : safe_operation .user_operation .call_gas_limit ,
899- "verificationGasLimit" : safe_operation .user_operation .verification_gas_limit ,
900- "preVerificationGas" : safe_operation .user_operation .pre_verification_gas ,
901- "maxFeePerGas" : safe_operation .user_operation .max_fee_per_gas ,
902- "maxPriorityFeePerGas" : safe_operation .user_operation .max_priority_fee_per_gas ,
910+ "callGasLimit" : str (safe_operation .user_operation .call_gas_limit ),
911+ "verificationGasLimit" : str (
912+ safe_operation .user_operation .verification_gas_limit
913+ ),
914+ "preVerificationGas" : str (
915+ safe_operation .user_operation .pre_verification_gas
916+ ),
917+ "maxFeePerGas" : str (safe_operation .user_operation .max_fee_per_gas ),
918+ "maxPriorityFeePerGas" : str (
919+ safe_operation .user_operation .max_priority_fee_per_gas
920+ ),
903921 "paymaster" : NULL_ADDRESS ,
904922 "paymasterData" : "0x" ,
905923 "signature" : "0x" + "0" * 24 ,
@@ -935,24 +953,31 @@ def test_user_operations_view(self):
935953 response .json (), {"count" : 0 , "next" : None , "previous" : None , "results" : []}
936954 )
937955 safe_operation = factories .SafeOperationFactory (
938- user_operation__sender = safe_address
956+ user_operation__sender = safe_address ,
957+ user_operation__nonce = 131872201376309576872419307987365003264 ,
939958 )
940959 response = self .client .get (
941960 reverse ("v1:account_abstraction:user-operations" , args = (safe_address ,))
942961 )
943962 self .assertEqual (response .status_code , status .HTTP_200_OK )
944963 expected = {
945964 "sender" : safe_operation .user_operation .sender ,
946- "nonce" : safe_operation .user_operation .nonce ,
965+ "nonce" : str ( safe_operation .user_operation .nonce ) ,
947966 "userOperationHash" : safe_operation .user_operation .hash ,
948967 "ethereumTxHash" : safe_operation .user_operation .ethereum_tx_id ,
949968 "initCode" : "0x" ,
950969 "callData" : "0x" ,
951- "callGasLimit" : safe_operation .user_operation .call_gas_limit ,
952- "verificationGasLimit" : safe_operation .user_operation .verification_gas_limit ,
953- "preVerificationGas" : safe_operation .user_operation .pre_verification_gas ,
954- "maxFeePerGas" : safe_operation .user_operation .max_fee_per_gas ,
955- "maxPriorityFeePerGas" : safe_operation .user_operation .max_priority_fee_per_gas ,
970+ "callGasLimit" : str (safe_operation .user_operation .call_gas_limit ),
971+ "verificationGasLimit" : str (
972+ safe_operation .user_operation .verification_gas_limit
973+ ),
974+ "preVerificationGas" : str (
975+ safe_operation .user_operation .pre_verification_gas
976+ ),
977+ "maxFeePerGas" : str (safe_operation .user_operation .max_fee_per_gas ),
978+ "maxPriorityFeePerGas" : str (
979+ safe_operation .user_operation .max_priority_fee_per_gas
980+ ),
956981 "paymaster" : NULL_ADDRESS ,
957982 "paymasterData" : "0x" ,
958983 "signature" : "0x" + "0" * 24 ,
0 commit comments