@@ -413,36 +413,6 @@ public async Task<List<LogEvent>> GetContractEvents (string address, string topi
413
413
/// <returns>Returns response of the function executed</returns>
414
414
public async Task < string > RunContractFunction ( string address , string functionName , RunContractDto abi , ChainList chain , string subdomain = null , string providerUrl = null )
415
415
{
416
-
417
- //// Verify the required parameter 'address' is set
418
- //if (address == null) throw new ApiException(400, "Missing required parameter 'address' when calling RunContractFunction");
419
-
420
- //// Verify the required parameter 'functionName' is set
421
- //if (functionName == null) throw new ApiException(400, "Missing required parameter 'functionName' when calling RunContractFunction");
422
-
423
- //// Verify the required parameter 'abi' is set
424
- //if (abi == null) throw new ApiException(400, "Missing required parameter 'abi' when calling RunContractFunction");
425
-
426
- //var postBody = new Dictionary<String, object>();
427
- //var queryParams = new Dictionary<String, String>();
428
- //var headerParams = new Dictionary<String, String>();
429
- //var formParams = new Dictionary<String, String>();
430
- //var fileParams = new Dictionary<String, FileParameter>();
431
-
432
- //var path = "/functions/runContractFunction";
433
- //if (address != null) postBody.Add("address", ApiClient.ParameterToString(address));
434
- //if (functionName != null) postBody.Add("function_name", ApiClient.ParameterToString(functionName));
435
- //if (abi != null) postBody.Add("abi", abi.Abi);
436
- //if (abi != null) postBody.Add("params", abi.Params);
437
- //if (abi != null) postBody.Add("params", ApiClient.ParameterToString(abi.Params));
438
- //if (subdomain != null) postBody.Add("subdomain", ApiClient.ParameterToString(subdomain));
439
- //if (providerUrl != null) postBody.Add("providerUrl", ApiClient.ParameterToString(providerUrl));
440
- //if(chain != null) postBody.Add("chain", ApiClient.ParameterToHex((long)chain));
441
-
442
- //// Authentication setting, if any
443
- //String[] authSettings = new String[] { "ApiKeyAuth" };
444
-
445
- //string bodyData = postBody.Count > 0 ? JsonConvert.SerializeObject(postBody) : null;
446
416
// Verify the required parameter 'address' is set
447
417
if ( address == null ) throw new ApiException ( 400 , "Missing required parameter 'address' when calling RunContractFunction" ) ;
448
418
@@ -482,7 +452,10 @@ public async Task<string> RunContractFunction (string address, string functionNa
482
452
else if ( ( ( int ) response . StatusCode ) == 0 )
483
453
throw new ApiException ( ( int ) response . StatusCode , "Error calling RunContractFunction: " + response . ErrorMessage , response . ErrorMessage ) ;
484
454
485
- return ( ( CloudFunctionResult < string > ) ApiClient . Deserialize ( response . Content , typeof ( CloudFunctionResult < string > ) , response . Headers ) ) . Result ;
455
+
456
+ object respObject = ( ( CloudFunctionResult < object > ) ApiClient . Deserialize ( response . Content , typeof ( CloudFunctionResult < object > ) , response . Headers ) ) . Result ;
457
+
458
+ return JsonConvert . SerializeObject ( respObject ) ;
486
459
}
487
460
}
488
461
}
0 commit comments