Skip to main content
GET
/
platform
/
admin
/
smart_contract_implementations
List smart contract implementations
curl --request GET \
  --url https://api.example.com/platform/admin/smart_contract_implementations
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

Returns a collection of all smart contract implementations that serve as reusable templates for deploying contracts across multiple blockchains. Each implementation contains Solidity source code and deployment configuration.

Input

No input parameters required beyond authentication credentials.

Output

Returns a collection of SmartContractImplementationReportModel objects, each containing:
  • id (long) - Unique identifier for the implementation.
  • type (string) - Classification type (e.g., IssuerFactoryImplementation).
  • description (string) - Human-readable description of the contract purpose.
  • contractClassName (string) - Main contract class name from Solidity code.
  • sourceCode (string) - Complete Solidity source code.
  • createdDate (DateTime) - Timestamp of implementation creation.

Examples

Request
GET /api/platform/smart-contract-implementations
Authorization: Bearer {token}
Response (200 OK)
{
  "data": [
    {
      "id": 1,
      "type": "IssuerFactoryImplementation",
      "description": "Factory contract for creating token issuers",
      "contractClassName": "IssuerFactory",
      "sourceCode": "pragma solidity ^0.8.0;\n\ncontract IssuerFactory {\n  // Contract code\n}",
      "createdDate": "2024-01-15T10:30:00Z"
    },
    {
      "id": 2,
      "type": "TokenImplementation",
      "description": "ERC20 compliant token contract",
      "contractClassName": "CustomToken",
      "sourceCode": "pragma solidity ^0.8.0;\n\ncontract CustomToken {\n  // Token logic\n}",
      "createdDate": "2024-02-20T14:15:00Z"
    }
  ]
}

Errors

  • 401 Unauthorized: Missing or invalid authentication token.
  • 403 Forbidden: User lacks platform administrator privileges.
  • 500 Internal Server Error: Unexpected system error occurred.

Notes

Requires platform administrator privileges. Implementations are templates that can be deployed multiple times across different blockchain networks. Changes to implementations do not affect previously deployed contracts.

Query Parameters

api-version
string | null

Response

Smart contract implementations retrieved 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[] | null

The result value returned when the operation is successful.