Skip to main content
POST
/
tenant
/
{tenantId}
/
smart_contract_templates
/
create_edit_transaction
Creates a transaction for editing a smart contract template.
curl --request POST \
  --url https://api.example.com/tenant/{tenantId}/smart_contract_templates/create_edit_transaction \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "mint",
  "parameters": [
    {
      "name": "to",
      "value": "0x1234567890abcdef1234567890abcdef12345678",
      "blockchainType": "address",
      "blockchainName": "Ethereum",
      "order": 0,
      "fields": []
    },
    {
      "name": "amount",
      "value": "1000000000000000000",
      "blockchainType": "uint256",
      "blockchainName": "Ethereum",
      "order": 1,
      "fields": []
    }
  ],
  "caller": null
}
'
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Path Parameters

tenantId
integer<int64>
required

Identifier of the tenant.

Body

application/json

Request containing template edit transaction details.

Request model for invoking a smart contract method with typed parameters.

name
string

Name of the smart contract function to invoke.

Example:

"mint"

parameters
object[]

Ordered list of parameters to pass to the smart contract function.

Example:

"[{\"name\": \"to\", \"value\": \"0x...\", \"blockchainType\": \"address\", ...}]"

caller
object

Optional caller context for the transaction.

Example:
{
"name": "recipient",
"value": "0x1234567890abcdef1234567890abcdef12345678",
"blockchainType": "address",
"blockchainName": "Ethereum",
"order": 0,
"fields": []
}
tokenProxyAddress
string
blockchainId
integer<int64>

Response

200 - application/json

Template edit transaction created successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object

The result value returned when the operation is successful.

Example:
{ "proposalId": 10042 }