Skip to main content
POST
/
api
/
v1
/
contract-templates
Create contract template
curl --request POST \
  --url https://sandbox.oumla.com/api/v1/contract-templates \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-sdk-version: <x-sdk-version>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "bytecode": "<string>",
  "abi": [
    {
      "type": "function",
      "inputs": [
        {
          "name": "<string>",
          "type": "<string>",
          "value": {},
          "description": "<string>",
          "internalType": "<string>",
          "components": [
            {
              "name": "<string>",
              "type": "<string>",
              "description": "<string>",
              "internalType": "<string>"
            }
          ],
          "indexed": true
        }
      ],
      "name": "<string>",
      "stateMutability": "pure",
      "outputs": [
        {
          "name": "<string>",
          "type": "<string>",
          "value": {},
          "description": "<string>",
          "internalType": "<string>",
          "components": [
            {
              "name": "<string>",
              "type": "<string>",
              "description": "<string>",
              "internalType": "<string>"
            }
          ],
          "indexed": true
        }
      ],
      "description": "<string>",
      "anonymous": true
    }
  ],
  "longDescription": "<string>",
  "sourceCode": "<string>",
  "type": "<string>",
  "attributes": {
    "useCases": [
      "<string>"
    ],
    "standards": [
      "<string>"
    ]
  }
}
'
{
  "contract": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "longDescription": "<string>",
    "bytecode": "<string>",
    "sourceCode": "<string>",
    "type": "<string>",
    "docs": {}
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

x-sdk-version
string
default:1.0.0
required

SDK version header

Body

application/json
name
string
required
description
string
required
bytecode
string
required
abi
object[]
required
longDescription
string
sourceCode
string
type
string
docs
object
attributes
object

Response

Contract template created

contract
object