Call Smart Contract Function
POSThttps://api.chaingate.dev/fantom/callSmartContractFunction
Executes a smart contract function call without sending a transaction.
Request
- application/json
Bodyrequired
- The request body.
contractstringrequired
datastringrequired
Responses
- 200
- 400
- 500
The result of the smart contract function call.
- application/json
- Schema
- Example (auto)
Schema
resultstringrequired
{
"result": "string"
}
Bad request
Internal server error
Authorization: apiKey
name: apiKeytype: apiKeyin: query
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.chaingate.dev/fantom/callSmartContractFunction");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"contract\": \"string\",\n \"data\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear