> For the complete documentation index, see [llms.txt](https://docs.swttoken.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swttoken.com/api-reference/rest-api/contractcall.md).

# ContractCall()

### Summary <a href="#summary" id="summary"></a>

| Route                  | Type | Example                                               |
| ---------------------- | ---- | ----------------------------------------------------- |
| /contract/contractcall | POST | <http://176.113.80.7:62000/api/contract/contractcall> |

### Description <a href="#description" id="description"></a>

Executes smart contract and actually forms a transaction to be executed, that’s why the output is the same with calling the method **TransactionExec()**. From the user point of view it looks like a selection of a smart contract, its methods, specifying parameters for selected methods. This is the work for front-end developer. The RESTful API has only the function to pack all of this information in a transaction and output an array of data for signature.

### Request <a href="#request" id="request"></a>

#### Request Structure <a href="#request-structure" id="request-structure"></a>

```json
{

// parameters common for all requests для любых запросов

…..

// API method name to form and process a transaction

"MethodApi" : "string_value",

// sender public key

"PublicKey":"string_value",

// smart contract public key

"ReceiverPublicKey":"string_value",

// maximum fee allowed by the user

"Fee":"decimal",

// invoked smart contract method

"Method":"string_value",

// arguments for the execution of a smart contract method

"Args":"string_value",

// data the user sent with the transaction

"UserData":"string_value"

}
```

#### Request Parameters <a href="#request-parameters" id="request-parameters"></a>

MethodApi: string value - it’s vital to specify the API method to pack the transaction: "SmartDeploy", "SmartMethodExecute";

PublicKey: string\_value - sender public key in base58

ReceiverPublicKey: string\_value - recipient public key (in this case, smart contract public key in base58 will be generated automatically)

Amount: decimal - transaction amount as a decimal or integer number. This field is not required to deploy or initiate the smart contract

Fee: decimal - maximum fee approved by the user as a decimal or integer number

Method: string\_value - Name of the invoked smart contract method

Args: string\_value - arguments for smart contract execution in base58 separate by base58

UserData: string\_value - data the user sent with the transaction including the data about deployment and initiation of a smart contract

TransactionSignature: string\_value - transaction signature in base58

### Response <a href="#response" id="response"></a>

#### Response Structure <a href="#response-structure" id="response-structure"></a>

string: transaction\_id - transaction number containing new state -> in TransactionExec()

string: commission: - fee for the execution

```json
{

// upon successful transaction execution

"result": "transaction_id"

// upon successful smart contract execution

"result": "string_value"

// fee for the execution of a transaction/smart contract (and all its attachments) 

"fee": "decimal"

}
```
